diff --git a/.gn b/.gn
index 3e47759..20f642ef 100644
--- a/.gn
+++ b/.gn
@@ -65,7 +65,7 @@
 
   # Changes some setup for the Crashpad build to set them to build against
   # Chromium's zlib, base, etc.
-  crashpad_in_chromium = true
+  crashpad_dependencies = "chromium"
 }
 
 # These are the targets to check headers for by default. The files in targets
diff --git a/DEPS b/DEPS
index c1c7c264..9b4f54ac 100644
--- a/DEPS
+++ b/DEPS
@@ -78,11 +78,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '0a241ce808511ceb1c72d6f2473b01b455ac5101',
+  'skia_revision': '16c81a1ee9e2b90b97d73a1f08b03bebfadfbc81',
   # 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': 'e9e8333047d3d1669adf888673922eaf586368c8',
+  'v8_revision': '3a16c856cbe26b11cc603e105c60a043727703dc',
   # 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.
@@ -90,7 +90,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': 'ffd27d85371b27b6d7faf2aa675373537bf204b1',
+  'angle_revision': '0c37100dfc684824ee3c532d90c8f2e3f03e10e2',
   # 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.
@@ -102,7 +102,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': '30ef542b6f631f0ffbcd4110857e7c1a304a8a23',
+  'pdfium_revision': '1986bdfb19614b1bf18941b89ded895e237b53ae',
   # 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.
@@ -110,7 +110,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling BoringSSL
   # and whatever else without interference from each other.
-  'boringssl_revision': '0c9c1aad352235db1be3bf05e769c97fcc215112',
+  'boringssl_revision': '02e6256b16b54319b1c01d4133ca3317e82b2dbb',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling google-toolbox-for-mac
   # and whatever else without interference from each other.
@@ -134,7 +134,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': '788d0fd19737ac55103321922dce69153a46999a',
+  'catapult_revision': 'a586b0072a208470e55680d2d6f097e5b7c674ff',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -317,7 +317,7 @@
 
   # For Linux and Chromium OS.
   'src/third_party/cros_system_api': {
-      'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '3d171a2fcf084cfbafe35eb910c3df2883a1a0cc',
+      'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + 'b9797a0794435eecb9899ec13bc4ea3ea164e264',
       'condition': 'checkout_linux',
   },
 
@@ -327,7 +327,7 @@
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'aac382b3b65d5a2805c6467e1d9b359625569f91',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '9b5cb92fa457c8f61a058c6584c3bec233088c3b',
 
   # DevTools node modules. Used on Linux buildbots only.
   'src/third_party/devtools-node-modules': {
@@ -344,7 +344,7 @@
   },
 
   'src/third_party/errorprone/lib': {
-      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '635c410fc42614b48518ae6818105bc83af88497',
+      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '0fce89415c910ed2196f4bddf601ffddd90504fa',
       'condition': 'checkout_android',
   },
 
@@ -478,7 +478,7 @@
   },
 
   'src/third_party/libvpx/source/libvpx':
-    Var('chromium_git') + '/webm/libvpx.git' + '@' +  '14dbdd95e686eafbe556c154c9e0bd76fe1d2d1a',
+    Var('chromium_git') + '/webm/libvpx.git' + '@' +  'a2127236ae4742f329e5571d76b84de08cd3b8ea',
 
   'src/third_party/libwebm/source':
     Var('chromium_git') + '/webm/libwebm.git' + '@' + '4956b2dec65352af32dc71bab553acb631c64177',
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 34a4952..4d5abc4 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -148,7 +148,7 @@
   return static_cast<AwBrowserContext*>(web_contents->GetBrowserContext());
 }
 
-void AwBrowserContext::PreMainMessageLoopRun() {
+void AwBrowserContext::PreMainMessageLoopRun(net::NetLog* net_log) {
   FilePath cache_path;
   PathService::Get(base::DIR_CACHE, &cache_path);
   cache_path =
@@ -158,8 +158,9 @@
 
   InitUserPrefService();
 
-  url_request_context_getter_ = new AwURLRequestContextGetter(
-      cache_path, CreateProxyConfigService(), user_pref_service_.get());
+  url_request_context_getter_ =
+      new AwURLRequestContextGetter(cache_path, CreateProxyConfigService(),
+                                    user_pref_service_.get(), net_log);
 
   scoped_refptr<base::SequencedTaskRunner> db_task_runner =
       base::CreateSequencedTaskRunnerWithTraits(
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h
index 4e4b42434..8ed787f 100644
--- a/android_webview/browser/aw_browser_context.h
+++ b/android_webview/browser/aw_browser_context.h
@@ -32,6 +32,10 @@
 class WebContents;
 }
 
+namespace net {
+class NetLog;
+}
+
 namespace policy {
 class URLBlacklistManager;
 class BrowserPolicyConnectorBase;
@@ -76,7 +80,7 @@
       content::WebContents* web_contents);
 
   // Maps to BrowserMainParts::PreMainMessageLoopRun.
-  void PreMainMessageLoopRun();
+  void PreMainMessageLoopRun(net::NetLog* net_log);
 
   // These methods map to Add methods in visitedlink::VisitedLinkMaster.
   void AddVisitedURLs(const std::vector<GURL>& urls);
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc
index fa72178d..7c94abc9 100644
--- a/android_webview/browser/aw_browser_main_parts.cc
+++ b/android_webview/browser/aw_browser_main_parts.cc
@@ -120,7 +120,8 @@
 }
 
 void AwBrowserMainParts::PreMainMessageLoopRun() {
-  browser_client_->InitBrowserContext()->PreMainMessageLoopRun();
+  browser_client_->InitBrowserContext()->PreMainMessageLoopRun(
+      browser_client_->GetNetLog());
 
   content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
 
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index a5a5673..abcf0291 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -62,6 +62,7 @@
 #include "content/public/common/url_loader_throttle.h"
 #include "content/public/common/web_preferences.h"
 #include "net/android/network_library.h"
+#include "net/log/net_log.h"
 #include "net/ssl/ssl_cert_request_info.h"
 #include "net/ssl/ssl_info.h"
 #include "services/service_manager/public/cpp/binder_registry.h"
@@ -191,7 +192,7 @@
   return AwBrowserContext::GetDefault();
 }
 
-AwContentBrowserClient::AwContentBrowserClient() {
+AwContentBrowserClient::AwContentBrowserClient() : net_log_(new net::NetLog()) {
   frame_interfaces_.AddInterface(
       base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver));
   // Although WebView does not support password manager feature, renderer code
@@ -436,7 +437,7 @@
 }
 
 net::NetLog* AwContentBrowserClient::GetNetLog() {
-  return browser_context_->GetAwURLRequestContext()->GetNetLog();
+  return net_log_.get();
 }
 
 base::FilePath AwContentBrowserClient::GetDefaultDownloadDirectory() {
diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h
index 877d338..2b07fcb 100644
--- a/android_webview/browser/aw_content_browser_client.h
+++ b/android_webview/browser/aw_content_browser_client.h
@@ -19,6 +19,10 @@
 class RenderFrameHost;
 }
 
+namespace net {
+class NetLog;
+}
+
 namespace safe_browsing {
 class UrlCheckerDelegate;
 }
@@ -160,6 +164,8 @@
  private:
   safe_browsing::UrlCheckerDelegate* GetSafeBrowsingUrlCheckerDelegate();
 
+  std::unique_ptr<net::NetLog> net_log_;
+
   // Android WebView currently has a single global (non-off-the-record) browser
   // context.
   std::unique_ptr<AwBrowserContext> browser_context_;
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index 6ae4478..99117a3 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -49,7 +49,6 @@
 #include "net/http/http_network_session.h"
 #include "net/http/http_stream_factory.h"
 #include "net/log/file_net_log_observer.h"
-#include "net/log/net_log.h"
 #include "net/log/net_log_capture_mode.h"
 #include "net/log/net_log_util.h"
 #include "net/net_features.h"
@@ -180,9 +179,10 @@
 AwURLRequestContextGetter::AwURLRequestContextGetter(
     const base::FilePath& cache_path,
     std::unique_ptr<net::ProxyConfigService> config_service,
-    PrefService* user_pref_service)
+    PrefService* user_pref_service,
+    net::NetLog* net_log)
     : cache_path_(cache_path),
-      net_log_(new net::NetLog()),
+      net_log_(net_log),
       proxy_config_service_(std::move(config_service)),
       http_user_agent_settings_(new AwHttpUserAgentSettings()) {
   // CreateSystemProxyConfigService for Android must be called on main thread.
@@ -243,7 +243,7 @@
 
     file_net_log_observer_ = net::FileNetLogObserver::CreateUnbounded(
         net_log_path, std::move(constants_dict));
-    file_net_log_observer_->StartObserving(net_log_.get(),
+    file_net_log_observer_->StartObserving(net_log_,
                                            net::NetLogCaptureMode::Default());
   }
 }
@@ -290,9 +290,9 @@
     builder.set_proxy_service(net::ProxyService::CreateFixed(proxy));
   } else {
     builder.set_proxy_service(net::ProxyService::CreateWithoutProxyResolver(
-        std::move(proxy_config_service_), net_log_.get()));
+        std::move(proxy_config_service_), net_log_));
   }
-  builder.set_net_log(net_log_.get());
+  builder.set_net_log(net_log_);
   builder.SetCookieAndChannelIdStores(std::make_unique<AwCookieStoreWrapper>(),
                                       std::move(channel_id_service));
 
@@ -350,10 +350,6 @@
   request_interceptors_.swap(request_interceptors);
 }
 
-net::NetLog* AwURLRequestContextGetter::GetNetLog() {
-  return net_log_.get();
-}
-
 // static
 void AwURLRequestContextGetter::set_check_cleartext_permitted(bool permitted) {
 #if DCHECK_IS_ON()
diff --git a/android_webview/browser/net/aw_url_request_context_getter.h b/android_webview/browser/net/aw_url_request_context_getter.h
index da09423..10254cfcf 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.h
+++ b/android_webview/browser/net/aw_url_request_context_getter.h
@@ -38,17 +38,14 @@
   AwURLRequestContextGetter(
       const base::FilePath& cache_path,
       std::unique_ptr<net::ProxyConfigService> config_service,
-      PrefService* pref_service);
+      PrefService* pref_service,
+      net::NetLog* net_log);
 
   // net::URLRequestContextGetter implementation.
   net::URLRequestContext* GetURLRequestContext() override;
   scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
       const override;
 
-  // NetLog is thread-safe, so clients can call this method from arbitrary
-  // threads (UI and IO).
-  net::NetLog* GetNetLog();
-
   static void set_check_cleartext_permitted(bool permitted);
 
  private:
@@ -78,7 +75,7 @@
 
   const base::FilePath cache_path_;
 
-  std::unique_ptr<net::NetLog> net_log_;
+  net::NetLog* net_log_;
   std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
   std::unique_ptr<net::URLRequestJobFactory> job_factory_;
   std::unique_ptr<net::HttpUserAgentSettings> http_user_agent_settings_;
diff --git a/android_webview/common/crash_reporter/crash_keys.cc b/android_webview/common/crash_reporter/crash_keys.cc
index 080a077..43e3d3a 100644
--- a/android_webview/common/crash_reporter/crash_keys.cc
+++ b/android_webview/common/crash_reporter/crash_keys.cc
@@ -19,20 +19,7 @@
 const char kAndroidSdkInt[] = "android-sdk-int";
 
 size_t RegisterWebViewCrashKeys() {
-  base::debug::CrashKey fixed_keys[] = {
-      {kNumVariations, kSmallSize},
-      {kVariations, kHugeSize},
-
-      // TODO(sunnyps): Remove after fixing crbug.com/724999.
-      {"gl-context-set-current-stack-trace", kMediumSize},
-  };
-
-  // This dynamic set of keys is used for sets of key value pairs when gathering
-  // a collection of data, like command line switches or extension IDs.
-  std::vector<base::debug::CrashKey> keys(fixed_keys,
-                                          fixed_keys + arraysize(fixed_keys));
-
-  return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
+  return 0;
 }
 
 // clang-format off
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java
index d30ee62f..600e71a 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java
@@ -19,6 +19,7 @@
 
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.test.util.CallbackHelper;
+import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
 import org.chromium.content.browser.test.util.Criteria;
 import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -146,8 +147,10 @@
      * keydown event.
      */
     // https://crbug.com/787651
+    // Flaky! - https://crbug.com/795423
     @Test
-    @SmallTest
+    // @SmallTest
+    @DisabledTest
     public void testImeDpadMovesFocusOutOfWebView() throws Throwable {
         loadContentEditableBody();
         focusOnEditTextAndShowKeyboard();
diff --git a/android_webview/renderer/aw_content_renderer_client.cc b/android_webview/renderer/aw_content_renderer_client.cc
index f14b2a4..7043379 100644
--- a/android_webview/renderer/aw_content_renderer_client.cc
+++ b/android_webview/renderer/aw_content_renderer_client.cc
@@ -190,16 +190,6 @@
 void AwContentRendererClient::RenderViewCreated(
     content::RenderView* render_view) {
   AwRenderViewExt::RenderViewCreated(render_view);
-
-#if BUILDFLAG(ENABLE_SPELLCHECK)
-  // This is a workaround keeping the behavior that, the Blink side spellcheck
-  // enabled state is initialized on RenderView creation.
-  // TODO(xiaochengh): Design better way to sync between Chrome-side and
-  // Blink-side spellcheck enabled states.  See crbug.com/710097.
-  if (SpellCheckProvider* provider =
-          SpellCheckProvider::Get(render_view->GetMainRenderFrame()))
-    provider->EnableSpellcheck(spellcheck_->IsSpellcheckEnabled());
-#endif
 }
 
 bool AwContentRendererClient::HasErrorPage(int http_status_code) {
diff --git a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
index 3147d8a..b8a02c4 100644
--- a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
+++ b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
@@ -1732,6 +1732,7 @@
     getter marginHeight
     getter marginWidth
     getter name
+    getter policy
     getter sandbox
     getter scrolling
     getter src
diff --git a/ash/public/interfaces/wallpaper.mojom b/ash/public/interfaces/wallpaper.mojom
index d75f86e5..e138386 100644
--- a/ash/public/interfaces/wallpaper.mojom
+++ b/ash/public/interfaces/wallpaper.mojom
@@ -130,6 +130,10 @@
                                 mojo.common.mojom.FilePath file_path,
                                 mojo.common.mojom.FilePath resized_directory);
 
+  // Sets whether device wallpaper policy is enforced on this device. Updates/
+  // clears the device policy controlled wallpaper if applicable.
+  SetDeviceWallpaperPolicyEnforced(bool enforced);
+
   // Shows the user's wallpaper, which is determined in the following order:
   // 1) Use device policy wallpaper if it exists AND we are at the login screen.
   // 2) Use user policy wallpaper if it exists.
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index bd1b553..1661a41 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -341,8 +341,7 @@
 
   // TODO(jamescook): Pass |shelf_| into the constructors for these layout
   // managers.
-  if (panel_layout_manager_)
-    panel_layout_manager_->SetShelf(shelf_.get());
+  panel_layout_manager_->SetShelf(shelf_.get());
 
   // TODO(jamescook): Eliminate this. Refactor AttachedPanelWidgetTargeter's
   // access to Shelf.
@@ -702,6 +701,10 @@
 
   InitLayoutManagers();
   InitTouchHuds();
+  // Initializing views shelf here will cause it being visible on login screen
+  // on secondary display once views based login is enabled. See
+  // https://crbug.com/796239.
+  InitializeShelf();
 
   if (Shell::GetPrimaryRootWindowController()
           ->GetSystemModalLayoutManager(nullptr)
@@ -716,10 +719,6 @@
   } else {
     window_tree_host_->Show();
 
-    // At the login screen the shelf will be hidden because its container window
-    // is hidden. InitializeShelf() will make it visible.
-    InitializeShelf();
-
     // Notify shell observers about new root window.
     shell->OnRootWindowAdded(root_window);
   }
@@ -880,11 +879,7 @@
   wm::SetSnapsChildrenToPhysicalPixelBoundary(app_list_container);
   app_list_container->SetProperty(kUsesScreenCoordinatesKey, true);
 
-  // The shelf should be displayed on lock screen if md-based login/lock UI is
-  // enabled.
-  aura::Window* shelf_container_parent = switches::IsUsingWebUiLock()
-                                             ? non_lock_screen_containers
-                                             : lock_screen_related_containers;
+  aura::Window* shelf_container_parent = lock_screen_related_containers;
   aura::Window* shelf_container = CreateContainer(
       kShellWindowId_ShelfContainer, "ShelfContainer", shelf_container_parent);
   wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_container);
diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h
index ffff227b..c50144b 100644
--- a/ash/root_window_controller.h
+++ b/ash/root_window_controller.h
@@ -121,9 +121,6 @@
 
   Shelf* shelf() const { return shelf_.get(); }
 
-  // Initializes the shelf for this root window and notifies observers.
-  void InitializeShelf();
-
   // Returns the instance of the sidebar.
   Sidebar* sidebar() { return sidebar_.get(); }
 
@@ -269,6 +266,9 @@
 
   void InitLayoutManagers();
 
+  // Initializes the shelf for this root window and notifies observers.
+  void InitializeShelf();
+
   // Creates the containers (aura::Windows) used by the shell.
   void CreateContainers();
 
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc
index bd12c06..e3fb871 100644
--- a/ash/rotator/screen_rotation_animator.cc
+++ b/ash/rotator/screen_rotation_animator.cc
@@ -228,10 +228,10 @@
   // takes output copy after contents are properlly resized, such as wallpaper
   // and ARC apps.
   ui::Compositor* compositor = root_window_->layer()->GetCompositor();
-  compositor->set_allow_locks_to_extend_timeout(true);
+  compositor->SetAllowLocksToExtendTimeout(true);
   Shell::Get()->display_manager()->SetDisplayRotation(display_id, new_rotation,
                                                       source);
-  compositor->set_allow_locks_to_extend_timeout(false);
+  compositor->SetAllowLocksToExtendTimeout(false);
   const display::Display display =
       Shell::Get()->display_manager()->GetDisplayForId(display_id);
   old_layer_tree_owner_->root()->SetTransform(
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc
index de3fadd..db8769b4 100644
--- a/ash/shelf/shelf.cc
+++ b/ash/shelf/shelf.cc
@@ -303,7 +303,6 @@
   shelf_layout_manager_->OnKeyboardWorkspaceDisplacingBoundsChanging(
       state.displaced_bounds);
   shelf_layout_manager_->OnKeyboardAppearanceChanging(state);
-  shelf_layout_manager_->OnKeyboardBoundsChanging(bounds);
 }
 
 ShelfLockingManager* Shelf::GetShelfLockingManagerForTesting() {
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 0606518eb..e04b6da 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -113,12 +113,19 @@
 ShelfWidget::DelegateView::~DelegateView() = default;
 
 // static
-bool ShelfWidget::IsUsingMdLoginShelf() {
-  return !switches::IsUsingWebUiLock() &&
-         (Shell::Get()->session_controller()->GetSessionState() ==
-              session_manager::SessionState::LOCKED ||
-          Shell::Get()->session_controller()->GetSessionState() ==
-              session_manager::SessionState::LOGIN_SECONDARY);
+bool ShelfWidget::IsUsingViewsShelf() {
+  switch (Shell::Get()->session_controller()->GetSessionState()) {
+    case session_manager::SessionState::ACTIVE:
+      return true;
+    case session_manager::SessionState::LOCKED:
+    case session_manager::SessionState::LOGIN_SECONDARY:
+      return !switches::IsUsingWebUiLock();
+    case session_manager::SessionState::UNKNOWN:
+    case session_manager::SessionState::OOBE:
+    case session_manager::SessionState::LOGIN_PRIMARY:
+    case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE:
+      return switches::IsUsingViewsLogin();
+  }
 }
 
 void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) {
@@ -143,7 +150,7 @@
 views::View* ShelfWidget::DelegateView::GetDefaultFocusableChild() {
   // If views-based login shelf is shown, we want to focus either its first or
   // last child, otherwise focus on the first child as default.
-  if (IsUsingMdLoginShelf())
+  if (IsUsingViewsShelf())
     return FindFirstOrLastFocusableChild(shelf_widget_->login_shelf_view_,
                                          default_last_focusable_child_);
   return GetFirstFocusableChild();
@@ -358,26 +365,34 @@
 }
 
 void ShelfWidget::OnSessionStateChanged(session_manager::SessionState state) {
-  switch (state) {
-    case session_manager::SessionState::ACTIVE:
-      login_shelf_view_->SetVisible(false);
-      shelf_view_->SetVisible(true);
-      // TODO(wzang): Combine with the codes specific to SessionState::ACTIVE
-      // in PostCreateShelf() when view-based shelf on login screen is
-      // supported.
-      break;
-    case session_manager::SessionState::LOCKED:
-    case session_manager::SessionState::LOGIN_SECONDARY:
-      shelf_view_->SetVisible(false);
-      login_shelf_view_->SetVisible(true);
-      break;
-    case session_manager::SessionState::OOBE:
-    case session_manager::SessionState::LOGIN_PRIMARY:
-    case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE:
-    case session_manager::SessionState::UNKNOWN:
-      login_shelf_view_->SetVisible(false);
-      shelf_view_->SetVisible(false);
-      break;
+  if (!IsUsingViewsShelf()) {
+    login_shelf_view_->SetVisible(false);
+    shelf_view_->SetVisible(false);
+  } else {
+    switch (state) {
+      case session_manager::SessionState::ACTIVE:
+        login_shelf_view_->SetVisible(false);
+        shelf_view_->SetVisible(true);
+        // TODO(wzang): Combine with the codes specific to SessionState::ACTIVE
+        // in PostCreateShelf() when view-based shelf on login screen is
+        // supported.
+        break;
+      case session_manager::SessionState::LOCKED:
+      case session_manager::SessionState::LOGIN_SECONDARY:
+        shelf_view_->SetVisible(false);
+        login_shelf_view_->SetVisible(true);
+        break;
+      case session_manager::SessionState::OOBE:
+      case session_manager::SessionState::LOGIN_PRIMARY:
+      case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE:
+        login_shelf_view_->SetVisible(true);
+        shelf_view_->SetVisible(false);
+        break;
+      case session_manager::SessionState::UNKNOWN:
+        login_shelf_view_->SetVisible(false);
+        shelf_view_->SetVisible(false);
+        break;
+    }
   }
   login_shelf_view_->UpdateAfterSessionStateChange(state);
 }
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h
index 8880f71..e1cc6109 100644
--- a/ash/shelf/shelf_widget.h
+++ b/ash/shelf/shelf_widget.h
@@ -43,8 +43,8 @@
   ShelfWidget(aura::Window* shelf_container, Shelf* shelf);
   ~ShelfWidget() override;
 
-  // Returns true if the views-based login shelf is being shown.
-  static bool IsUsingMdLoginShelf();
+  // Returns true if the views-based shelf is being shown.
+  static bool IsUsingViewsShelf();
 
   void CreateStatusAreaWidget(aura::Window* status_container);
 
diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
index 5d6c17e..fa8989ca 100644
--- a/ash/shelf/shelf_widget_unittest.cc
+++ b/ash/shelf/shelf_widget_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "ash/shelf/shelf_widget.h"
 
+#include "ash/public/cpp/ash_switches.h"
 #include "ash/root_window_controller.h"
 #include "ash/shelf/login_shelf_view.h"
 #include "ash/shelf/shelf.h"
@@ -17,6 +18,7 @@
 #include "ash/test/ash_test_helper.h"
 #include "ash/test_shell_delegate.h"
 #include "ash/wm/window_util.h"
+#include "components/session_manager/session_manager_types.h"
 #include "ui/aura/window_event_dispatcher.h"
 #include "ui/display/display.h"
 #include "ui/events/event_utils.h"
@@ -44,6 +46,7 @@
                                      .ToString());
 }
 
+using SessionState = session_manager::SessionState;
 using ShelfWidgetTest = AshTestBase;
 
 TEST_F(ShelfWidgetTest, TestAlignment) {
@@ -401,73 +404,102 @@
             SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
 }
 
-TEST_F(ShelfWidgetAfterLoginTest, ToggleVisibilityAfterSessionStateChange) {
-  ShelfWidget* shelf_widget = GetShelfWidget();
-  ASSERT_NE(nullptr, shelf_widget);
-  ShelfView* shelf_view = shelf_widget->shelf_view_for_testing();
-  ASSERT_NE(nullptr, shelf_view);
-  LoginShelfView* login_shelf_view =
-      shelf_widget->login_shelf_view_for_testing();
-  ASSERT_NE(nullptr, login_shelf_view);
+class ShelfWidgetViewsVisibilityTest : public AshTestBase {
+ public:
+  ShelfWidgetViewsVisibilityTest() { set_start_session(false); }
+  ~ShelfWidgetViewsVisibilityTest() override = default;
+
+  enum ShelfVisibility {
+    kNone,        // Shelf views hidden.
+    kShelf,       // ShelfView visible.
+    kLoginShelf,  // LoginShelfView visible.
+  };
+
+  void InitShelfVariables() {
+    ShelfWidget* shelf_widget = GetShelfWidget();
+    ASSERT_NE(nullptr, shelf_widget);
+    shelf_view_ = shelf_widget->shelf_view_for_testing();
+    ASSERT_NE(nullptr, shelf_view_);
+    login_shelf_view_ = shelf_widget->login_shelf_view_for_testing();
+    ASSERT_NE(nullptr, login_shelf_view_);
+  };
+
+  void ExpectVisible(session_manager::SessionState state,
+                     ShelfVisibility shelf_visibility) {
+    GetSessionControllerClient()->SetSessionState(state);
+    EXPECT_EQ(shelf_visibility == kLoginShelf, login_shelf_view_->visible());
+    EXPECT_EQ(shelf_visibility == kShelf, shelf_view_->visible());
+  }
+
+ private:
+  LoginShelfView* login_shelf_view_;
+  ShelfView* shelf_view_;
+
+  DISALLOW_COPY_AND_ASSIGN(ShelfWidgetViewsVisibilityTest);
+};
+
+TEST_F(ShelfWidgetViewsVisibilityTest, LoginWebUiLockViews) {
+  // Web UI login enabled by default. Views lock enabled by default.
+  InitShelfVariables();
 
   // Both shelf views are hidden when session state hasn't been initialized.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::UNKNOWN);
-  EXPECT_FALSE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
-
-  // The shelf is not initialized until session state becomes active, so the
-  // following cases don't have visible effects until we support views-based
-  // shelf for all session states, but it's still good to check them here.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::OOBE);
-  EXPECT_FALSE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
-
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::LOGIN_PRIMARY);
-  EXPECT_FALSE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
+  ExpectVisible(SessionState::UNKNOWN, kNone);
+  // Web UI login is used, so views shelf is not visible during login.
+  ExpectVisible(SessionState::OOBE, kNone);
+  ExpectVisible(SessionState::LOGIN_PRIMARY, kNone);
 
   SimulateUserLogin("user1@test.com");
 
-  // Both shelf views are hidden after user login and before the active session
-  // starts.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::LOGGED_IN_NOT_ACTIVE);
-  EXPECT_FALSE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
+  ExpectVisible(SessionState::LOGGED_IN_NOT_ACTIVE, kNone);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOCKED, kLoginShelf);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOGIN_SECONDARY, kLoginShelf);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+}
 
-  // The login shelf is hidden during an active session.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::ACTIVE);
-  EXPECT_TRUE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
+TEST_F(ShelfWidgetViewsVisibilityTest, LoginViewsLockViews) {
+  // Enable views login. Views lock enabled by default.
+  base::CommandLine::ForCurrentProcess()->AppendSwitch(
+      switches::kShowViewsLogin);
+  InitShelfVariables();
 
-  // The shelf for active session is hidden when lock screen is shown.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::LOCKED);
-  EXPECT_TRUE(login_shelf_view->visible());
-  EXPECT_FALSE(shelf_view->visible());
+  ExpectVisible(SessionState::UNKNOWN, kNone);
+  ExpectVisible(SessionState::OOBE, kLoginShelf);
+  ExpectVisible(SessionState::LOGIN_PRIMARY, kLoginShelf);
 
-  // The login shelf is hidden when session state becomes active again.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::ACTIVE);
-  EXPECT_TRUE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
+  SimulateUserLogin("user1@test.com");
 
-  // The shelf for active session is hidden when add user screen is shown.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::LOGIN_SECONDARY);
-  EXPECT_TRUE(login_shelf_view->visible());
-  EXPECT_FALSE(shelf_view->visible());
+  ExpectVisible(SessionState::LOGGED_IN_NOT_ACTIVE, kLoginShelf);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOCKED, kLoginShelf);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOGIN_SECONDARY, kLoginShelf);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+}
 
-  // The login shelf is hidden when session state becomes active again.
-  GetSessionControllerClient()->SetSessionState(
-      session_manager::SessionState::ACTIVE);
-  EXPECT_TRUE(shelf_view->visible());
-  EXPECT_FALSE(login_shelf_view->visible());
+TEST_F(ShelfWidgetViewsVisibilityTest, LoginWebUiLockWebUi) {
+  // Enable web UI lock. Web UI login enabled by default.
+  base::CommandLine::ForCurrentProcess()->AppendSwitch(
+      switches::kShowWebUiLock);
+  InitShelfVariables();
+
+  // Views based shelf is never visible.
+  ExpectVisible(SessionState::UNKNOWN, kNone);
+  ExpectVisible(SessionState::OOBE, kNone);
+  ExpectVisible(SessionState::LOGIN_PRIMARY, kNone);
+
+  SimulateUserLogin("user1@test.com");
+
+  // Views based shelf is only visible on non-lock screen (ACTIVE session).
+  ExpectVisible(SessionState::LOGGED_IN_NOT_ACTIVE, kNone);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOCKED, kNone);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
+  ExpectVisible(SessionState::LOGIN_SECONDARY, kNone);
+  ExpectVisible(SessionState::ACTIVE, kShelf);
 }
 
 }  // namespace
+
 }  // namespace ash
diff --git a/ash/shell.cc b/ash/shell.cc
index f8dc3cd1..bf596d5 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -1238,10 +1238,12 @@
 }
 
 void Shell::OnSessionStateChanged(session_manager::SessionState state) {
-  // Initialize the shelf when a session becomes active. It's safe to do this
-  // multiple times (e.g. initial login vs. multiprofile add session).
+  // Initialize the |shelf_window_watcher_| when a session becomes active.
+  // Shelf itself is initialized in RootWindowController.
   if (state == session_manager::SessionState::ACTIVE) {
-    InitializeShelf();
+    if (!shelf_window_watcher_)
+      shelf_window_watcher_ =
+          std::make_unique<ShelfWindowWatcher>(shelf_model());
   }
   // Recreates keyboard on user profile change, to refresh keyboard
   // extensions with the new profile and the extensions call proper IME.
@@ -1276,18 +1278,6 @@
 #endif
 }
 
-void Shell::InitializeShelf() {
-  // Must occur after SessionController creation and user login.
-  DCHECK(session_controller());
-  DCHECK_GT(session_controller()->NumberOfLoggedInUsers(), 0);
-
-  if (!shelf_window_watcher_)
-    shelf_window_watcher_ = std::make_unique<ShelfWindowWatcher>(shelf_model());
-
-  for (RootWindowController* root : GetAllRootWindowControllers())
-    root->InitializeShelf();
-}
-
 void Shell::OnLocalStatePrefServiceInitialized(
     std::unique_ptr<::PrefService> pref_service) {
   DCHECK(!local_state_);
diff --git a/ash/shell.h b/ash/shell.h
index f91e499..b620f74 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -613,10 +613,6 @@
   void OnLoginStatusChanged(LoginStatus login_status) override;
   void OnLockStateChanged(bool locked) override;
 
-  // Finalizes the shelf state. Called after the user session is active and
-  // the profile is available.
-  void InitializeShelf();
-
   // Callback for prefs::ConnectToPrefService.
   void OnLocalStatePrefServiceInitialized(
       std::unique_ptr<::PrefService> pref_service);
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
index 5280814..ab58e30 100644
--- a/ash/system/ime_menu/ime_menu_tray.cc
+++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -517,8 +517,6 @@
   HideBubbleWithView(bubble_view);
 }
 
-void ImeMenuTray::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {}
-
 void ImeMenuTray::OnKeyboardClosed() {
   if (InputMethodManager::Get())
     InputMethodManager::Get()->OverrideKeyboardUrlRef(std::string());
diff --git a/ash/system/ime_menu/ime_menu_tray.h b/ash/system/ime_menu/ime_menu_tray.h
index 983469a9..b540277 100644
--- a/ash/system/ime_menu/ime_menu_tray.h
+++ b/ash/system/ime_menu/ime_menu_tray.h
@@ -70,7 +70,6 @@
   void HideBubble(const views::TrayBubbleView* bubble_view) override;
 
   // keyboard::KeyboardControllerObserver:
-  void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
   void OnKeyboardClosed() override;
   void OnKeyboardHidden() override;
 
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index a644030..db9c6ea 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -276,7 +276,7 @@
   if (!delegate || !delegate->ShouldFocusOut(reverse))
     return;
   // Focus shelf widget when shift+tab is used and views-based shelf is shown.
-  if (reverse && ShelfWidget::IsUsingMdLoginShelf()) {
+  if (reverse && ShelfWidget::IsUsingViewsShelf()) {
     shelf->shelf_widget()->set_default_last_focusable_child(reverse);
     Shell::Get()->focus_cycler()->FocusWidget(shelf->shelf_widget());
   } else {
diff --git a/ash/system/virtual_keyboard/virtual_keyboard_tray.cc b/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
index 6c390ddd..0195652 100644
--- a/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
+++ b/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
@@ -95,9 +95,9 @@
   }
 }
 
-void VirtualKeyboardTray::OnKeyboardBoundsChanging(
-    const gfx::Rect& new_bounds) {
-  SetIsActive(!new_bounds.IsEmpty());
+void VirtualKeyboardTray::OnKeyboardAvailabilityChanging(
+    const bool is_available) {
+  SetIsActive(is_available);
 }
 
 void VirtualKeyboardTray::OnKeyboardControllerCreated() {
diff --git a/ash/system/virtual_keyboard/virtual_keyboard_tray.h b/ash/system/virtual_keyboard/virtual_keyboard_tray.h
index a7e55f35..3a0ed26ea 100644
--- a/ash/system/virtual_keyboard/virtual_keyboard_tray.h
+++ b/ash/system/virtual_keyboard/virtual_keyboard_tray.h
@@ -36,7 +36,7 @@
   void OnKeyboardEnabledStateChanged(bool new_enabled) override;
 
   // keyboard::KeyboardControllerObserver:
-  void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
+  void OnKeyboardAvailabilityChanging(const bool is_available) override;
 
   // ShellObserver:
   void OnKeyboardControllerCreated() override;
diff --git a/ash/wallpaper/wallpaper_controller.cc b/ash/wallpaper/wallpaper_controller.cc
index 2b49438..5879694 100644
--- a/ash/wallpaper/wallpaper_controller.cc
+++ b/ash/wallpaper/wallpaper_controller.cc
@@ -63,6 +63,11 @@
 const char kNewWallpaperLocationNodeName[] = "file";
 const char kNewWallpaperTypeNodeName[] = "type";
 
+// The directory and file name to save the downloaded device policy controlled
+// wallpaper.
+const char kDeviceWallpaperDir[] = "device_wallpaper";
+const char kDeviceWallpaperFile[] = "device_wallpaper_image.jpg";
+
 // How long to wait reloading the wallpaper after the display size has changed.
 constexpr int kWallpaperReloadDelayMs = 100;
 
@@ -355,6 +360,13 @@
   return true;
 }
 
+// static
+base::FilePath WallpaperController::GetDevicePolicyWallpaperFilePath() {
+  DCHECK(!dir_chrome_os_wallpapers_path_.empty());
+  return dir_chrome_os_wallpapers_path_.Append(kDeviceWallpaperDir)
+      .Append(kDeviceWallpaperFile);
+}
+
 void WallpaperController::BindRequest(
     mojom::WallpaperControllerRequest request) {
   bindings_.AddBinding(this, std::move(request));
@@ -506,7 +518,6 @@
 
 void WallpaperController::SetWallpaperImage(const gfx::ImageSkia& image,
                                             const WallpaperInfo& info) {
-  current_user_wallpaper_info_ = info;
   wallpaper::WallpaperLayout layout = info.layout;
   VLOG(1) << "SetWallpaper: image_id="
           << wallpaper::WallpaperResizer::GetImageId(image)
@@ -517,6 +528,7 @@
     return;
   }
 
+  current_location_ = info.location;
   // Cancel any in-flight color calculation because we have a new wallpaper.
   if (color_calculator_) {
     color_calculator_->RemoveObserver(this);
@@ -664,9 +676,6 @@
 void WallpaperController::SetUserWallpaperInfo(const AccountId& account_id,
                                                const WallpaperInfo& info,
                                                bool is_persistent) {
-  // TODO(xdai): Remove this line after wallpaper refactoring is done.
-  // |current_user_wallpaper_info_| will be later updated in SetWallpaperImage()
-  // so theoretically it should be safe to remove the udpate here.
   current_user_wallpaper_info_ = info;
   if (!is_persistent)
     return;
@@ -860,6 +869,22 @@
   NOTIMPLEMENTED();
 }
 
+void WallpaperController::SetDeviceWallpaperPolicyEnforced(bool enforced) {
+  bool previous_enforced = is_device_wallpaper_policy_enforced_;
+  is_device_wallpaper_policy_enforced_ = enforced;
+
+  if (ShouldSetDevicePolicyWallpaper()) {
+    SetDevicePolicyWallpaper();
+  } else if ((previous_enforced != enforced) && !enforced) {
+    // If the device wallpaper policy is cleared, the wallpaper should revert to
+    // the wallpaper of the current user with the large pod in the users list in
+    // the login screen. If there is no such user, use the first user in the
+    // users list.
+    // TODO(xdai): Get the account id from the session controller and then call
+    // ShowUserWallpaper() to display it.
+  }
+}
+
 void WallpaperController::ShowUserWallpaper(
     mojom::WallpaperUserInfoPtr user_info) {
   NOTIMPLEMENTED();
@@ -909,8 +934,8 @@
   color_calculator_.reset();
   // TODO(crbug.com/787134): The prominent colors of wallpapers with empty
   // location should be cached as well.
-  if (!current_user_wallpaper_info_.location.empty())
-    CacheProminentColors(colors, current_user_wallpaper_info_.location);
+  if (!current_location_.empty())
+    CacheProminentColors(colors, current_location_);
   SetProminentColors(colors);
 }
 
@@ -1120,9 +1145,9 @@
     color_calculator_.reset();
   }
 
-  if (!current_user_wallpaper_info_.location.empty()) {
+  if (!current_location_.empty()) {
     base::Optional<std::vector<SkColor>> cached_colors =
-        GetCachedColors(current_user_wallpaper_info_.location);
+        GetCachedColors(current_location_);
     if (cached_colors.has_value()) {
       SetProminentColors(cached_colors.value());
       return;
@@ -1181,6 +1206,48 @@
   return false;
 }
 
+bool WallpaperController::ShouldSetDevicePolicyWallpaper() const {
+  // Only allow the device wallpaper if the policy is in effect for enterprise
+  // managed devices.
+  if (!is_device_wallpaper_policy_enforced_)
+    return false;
+
+  // Only set the device wallpaper if we're at the login screen.
+  if (Shell::Get()->session_controller()->IsActiveUserSessionStarted())
+    return false;
+
+  return true;
+}
+
+void WallpaperController::SetDevicePolicyWallpaper() {
+  DCHECK(ShouldSetDevicePolicyWallpaper());
+  ReadAndDecodeWallpaper(
+      base::BindRepeating(&WallpaperController::OnDevicePolicyWallpaperDecoded,
+                          weak_factory_.GetWeakPtr()),
+      sequenced_task_runner_.get(), GetDevicePolicyWallpaperFilePath());
+}
+
+void WallpaperController::OnDevicePolicyWallpaperDecoded(
+    std::unique_ptr<user_manager::UserImage> device_wallpaper_image) {
+  // It might be possible that the device policy controlled wallpaper finishes
+  // decoding after the user logs in. In this case do nothing.
+  if (!ShouldSetDevicePolicyWallpaper())
+    return;
+
+  if (device_wallpaper_image->image().isNull()) {
+    // If device policy wallpaper failed decoding, fall back to the default
+    // wallpaper.
+    SetDefaultWallpaperImpl(EmptyAccountId(), user_manager::USER_TYPE_REGULAR,
+                            true /*show_wallpaper=*/,
+                            MovableOnDestroyCallbackHolder());
+  } else {
+    WallpaperInfo info(GetDevicePolicyWallpaperFilePath().value(),
+                       wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED,
+                       wallpaper::DEVICE, base::Time::Now().LocalMidnight());
+    SetWallpaperImage(device_wallpaper_image->image(), info);
+  }
+}
+
 void WallpaperController::GetInternalDisplayCompositorLock() {
   if (display::Display::HasInternalDisplay()) {
     aura::Window* root_window =
diff --git a/ash/wallpaper/wallpaper_controller.h b/ash/wallpaper/wallpaper_controller.h
index c981c54..795833c 100644
--- a/ash/wallpaper/wallpaper_controller.h
+++ b/ash/wallpaper/wallpaper_controller.h
@@ -185,6 +185,9 @@
                                       int height,
                                       SkColor color);
 
+  // Returns the expected file path of the device policy wallpaper.
+  static base::FilePath GetDevicePolicyWallpaperFilePath();
+
   // Binds the mojom::WallpaperController interface request to this object.
   void BindRequest(mojom::WallpaperControllerRequest request);
 
@@ -337,6 +340,7 @@
       const GURL& wallpaper_url,
       const base::FilePath& file_path,
       const base::FilePath& resized_directory) override;
+  void SetDeviceWallpaperPolicyEnforced(bool enforced) override;
   void ShowUserWallpaper(mojom::WallpaperUserInfoPtr user_info) override;
   void ShowSigninWallpaper() override;
   void RemoveUserWallpaper(mojom::WallpaperUserInfoPtr user_info,
@@ -427,6 +431,19 @@
   // Returns whether the current wallpaper is set by device policy.
   bool IsDevicePolicyWallpaper() const;
 
+  // Returns true if device wallpaper policy is in effect and we are at the
+  // login screen right now.
+  bool ShouldSetDevicePolicyWallpaper() const;
+
+  // Reads the device wallpaper file and sets it as the current wallpaper. Note
+  // when it's called, it's guaranteed that ShouldSetDevicePolicyWallpaper()
+  // should be true.
+  void SetDevicePolicyWallpaper();
+
+  // Called when the device policy controlled wallpaper has been decoded.
+  void OnDevicePolicyWallpaperDecoded(
+      std::unique_ptr<user_manager::UserImage> device_wallpaper_image);
+
   // When wallpaper resizes, we can check which displays will be affected. For
   // simplicity, we only lock the compositor for the internal display.
   void GetInternalDisplayCompositorLock();
@@ -460,9 +477,7 @@
   // Caches the color profiles that need to do wallpaper color extracting.
   const std::vector<color_utils::ColorProfile> color_profiles_;
 
-  // Cached current user wallpaper info. Note its location is used as a key for
-  // storing |prominent_colors_| in the wallpaper::kWallpaperColors pref. An
-  // empty string disables color caching.
+  // Cached logged-in user wallpaper info.
   wallpaper::WallpaperInfo current_user_wallpaper_info_;
 
   // Cached wallpapers of users.
@@ -475,6 +490,11 @@
   base::FilePath customized_default_wallpaper_small_;
   base::FilePath customized_default_wallpaper_large_;
 
+  // Location (see WallpaperInfo::location) used by the current wallpaper.
+  // Used as a key for storing |prominent_colors_| in the
+  // wallpaper::kWallpaperColors pref. An empty string disables color caching.
+  std::string current_location_;
+
   gfx::Size current_max_display_size_;
 
   base::OneShotTimer timer_;
@@ -483,6 +503,9 @@
 
   bool is_wallpaper_blurred_ = false;
 
+  // Whether the device wallpaper policy is enforced on this device.
+  bool is_device_wallpaper_policy_enforced_ = false;
+
   scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_;
 
   ScopedSessionObserver scoped_session_observer_;
diff --git a/ash/wm/lock_layout_manager_unittest.cc b/ash/wm/lock_layout_manager_unittest.cc
index 587b4ff2..49fcfa1f 100644
--- a/ash/wm/lock_layout_manager_unittest.cc
+++ b/ash/wm/lock_layout_manager_unittest.cc
@@ -277,6 +277,13 @@
 
   keyboard::SetKeyboardOverscrollOverride(
       keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE);
+
+  keyboard->SetContainerType(keyboard::ContainerType::FLOATING);
+  ShowKeyboard(true);
+  primary_display = display::Screen::GetScreen()->GetPrimaryDisplay();
+  screen_bounds = primary_display.bounds();
+  EXPECT_EQ(screen_bounds.ToString(), window->GetBoundsInScreen().ToString());
+  ShowKeyboard(false);
 }
 
 TEST_F(LockLayoutManagerTest, MultipleMonitors) {
diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc
index bd7aa47..d27367b 100644
--- a/ash/wm/lock_window_state.cc
+++ b/ash/wm/lock_window_state.cc
@@ -181,16 +181,13 @@
 
   keyboard::KeyboardController* keyboard_controller =
       keyboard::KeyboardController::GetInstance();
-  gfx::Rect keyboard_bounds;
-
-  if (keyboard_controller && !keyboard::IsKeyboardOverscrollEnabled() &&
-      keyboard_controller->keyboard_visible()) {
-    keyboard_bounds = keyboard_controller->current_keyboard_bounds();
-  }
-
+  const int keyboard_height =
+      keyboard_controller
+          ? keyboard_controller->GetKeyboardLockScreenOffsetBounds().height()
+          : 0;
   gfx::Rect bounds = ScreenUtil::GetDisplayBoundsWithShelf(window);
   bounds.Inset(0, Shelf::ForWindow(window)->GetAccessibilityPanelHeight(), 0,
-               keyboard_bounds.height());
+               keyboard_height);
   return bounds;
 }
 
diff --git a/base/BUILD.gn b/base/BUILD.gn
index f5cbb79..1e09a0bb 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -38,9 +38,6 @@
   # details and the expected format.
   override_build_date = "N/A"
 
-  # Partition alloc is included by default except iOS.
-  use_partition_alloc = !is_ios
-
   # Indicates if the Location object contains the source code information
   # (file, function, line). False means only the program counter (and currently
   # file name) is saved.
diff --git a/base/allocator/OWNERS b/base/allocator/OWNERS
index 6a22df64..de658d0 100644
--- a/base/allocator/OWNERS
+++ b/base/allocator/OWNERS
@@ -1,7 +1,4 @@
 primiano@chromium.org
 wfh@chromium.org
 
-# For changes to tcmalloc it is advisable to ask jar@chromium.org
-# before proceeding.
-
 # COMPONENT: Internals
diff --git a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
index 53c4e10..0751264 100644
--- a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
+++ b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
@@ -212,6 +212,18 @@
     }
 
     /**
+     * Records a sample in a histogram of times. Useful for recording long durations. This is the
+     * Java equivalent of the UMA_HISTOGRAM_LONG_TIMES_100 C++ macro.
+     * @param name name of the histogram
+     * @param duration duration to be recorded
+     * @param timeUnit the unit of the duration argument
+     */
+    public static void recordLongTimesHistogram100(String name, long duration, TimeUnit timeUnit) {
+        recordCustomTimesHistogramMilliseconds(
+                name, timeUnit.toMillis(duration), 1, TimeUnit.HOURS.toMillis(1), 100);
+    }
+
+    /**
      * Records a sample in a histogram of times with custom buckets. This is the Java equivalent of
      * the UMA_HISTOGRAM_CUSTOM_TIMES C++ macro.
      * @param name name of the histogram
diff --git a/base/android/jni_generator/AndroidManifest.xml b/base/android/jni_generator/AndroidManifest.xml
new file mode 100644
index 0000000..ec28ff5
--- /dev/null
+++ b/base/android/jni_generator/AndroidManifest.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.jni.generator">
+
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="24" />
+    <application></application>
+
+</manifest>
diff --git a/base/android/jni_generator/BUILD.gn b/base/android/jni_generator/BUILD.gn
index 68e5519..4dda6cd 100644
--- a/base/android/jni_generator/BUILD.gn
+++ b/base/android/jni_generator/BUILD.gn
@@ -64,7 +64,7 @@
 
 android_apk("sample_jni_apk") {
   apk_name = "SampleJni"
-  android_manifest = "//build/android/AndroidManifest.xml"
+  android_manifest = "AndroidManifest.xml"
   deps = [
     ":jni_sample_java",
     "//base:base_java",
diff --git a/base/memory/scoped_refptr.h b/base/memory/scoped_refptr.h
index fb0a9c4..506f2c12 100644
--- a/base/memory/scoped_refptr.h
+++ b/base/memory/scoped_refptr.h
@@ -159,28 +159,24 @@
 
   scoped_refptr() {}
 
+  // Constructs from raw pointer.
   scoped_refptr(T* p) : ptr_(p) {
     if (ptr_)
       AddRef(ptr_);
   }
 
-  // Copy constructor.
-  scoped_refptr(const scoped_refptr& r) : ptr_(r.ptr_) {
-    if (ptr_)
-      AddRef(ptr_);
-  }
+  // Copy constructor. This is required in addition to the copy conversion
+  // constructor below.
+  scoped_refptr(const scoped_refptr& r) : scoped_refptr(r.ptr_) {}
 
   // Copy conversion constructor.
   template <typename U,
             typename = typename std::enable_if<
                 std::is_convertible<U*, T*>::value>::type>
-  scoped_refptr(const scoped_refptr<U>& r) : ptr_(r.get()) {
-    if (ptr_)
-      AddRef(ptr_);
-  }
+  scoped_refptr(const scoped_refptr<U>& r) : scoped_refptr(r.ptr_) {}
 
-  // Move constructor. This is required in addition to the conversion
-  // constructor below in order for clang to warn about pessimizing moves.
+  // Move constructor. This is required in addition to the move conversion
+  // constructor below.
   scoped_refptr(scoped_refptr&& r) noexcept : ptr_(r.ptr_) { r.ptr_ = nullptr; }
 
   // Move conversion constructor.
diff --git a/base/optional.h b/base/optional.h
index e95bf6c..00c586726 100644
--- a/base/optional.h
+++ b/base/optional.h
@@ -6,6 +6,7 @@
 #define BASE_OPTIONAL_H_
 
 #include <type_traits>
+#include <utility>
 
 #include "base/logging.h"
 
@@ -37,14 +38,8 @@
   // to avoid errors in g++ 4.8.
   constexpr OptionalStorage() : empty_('\0') {}
 
-  constexpr explicit OptionalStorage(const T& value)
-      : is_null_(false), value_(value) {}
-
-  constexpr explicit OptionalStorage(T&& value)
-      : is_null_(false), value_(std::move(value)) {}
-
   template <class... Args>
-  constexpr explicit OptionalStorage(base::in_place_t, Args&&... args)
+  constexpr explicit OptionalStorage(in_place_t, Args&&... args)
       : is_null_(false), value_(std::forward<Args>(args)...) {}
 
   // When T is not trivially destructible we must call its
@@ -70,14 +65,8 @@
   // to avoid errors in g++ 4.8.
   constexpr OptionalStorage() : empty_('\0') {}
 
-  constexpr explicit OptionalStorage(const T& value)
-      : is_null_(false), value_(value) {}
-
-  constexpr explicit OptionalStorage(T&& value)
-      : is_null_(false), value_(std::move(value)) {}
-
   template <class... Args>
-  constexpr explicit OptionalStorage(base::in_place_t, Args&&... args)
+  constexpr explicit OptionalStorage(in_place_t, Args&&... args)
       : is_null_(false), value_(std::forward<Args>(args)...) {}
 
   // When T is trivially destructible (i.e. its destructor does nothing) there
@@ -95,6 +84,84 @@
   };
 };
 
+// Base class to support conditionally usable copy-/move- constructors
+// and assign operators.
+template <typename T>
+class OptionalBase {
+  // This class provides implementation rather than public API, so everything
+  // should be hidden. Often we use composition, but we cannot in this case
+  // because of C++ language restriction.
+ protected:
+  constexpr OptionalBase() = default;
+
+  // TODO(dcheng): Make these constexpr iff T is trivially constructible.
+  OptionalBase(const OptionalBase& other) {
+    if (!other.storage_.is_null_)
+      Init(other.storage_.value_);
+  }
+
+  OptionalBase(OptionalBase&& other) {
+    if (!other.storage_.is_null_)
+      Init(std::move(other.storage_.value_));
+  }
+
+  template <class... Args>
+  constexpr explicit OptionalBase(in_place_t, Args&&... args)
+      : storage_(in_place, std::forward<Args>(args)...) {}
+
+  ~OptionalBase() = default;
+
+  OptionalBase& operator=(const OptionalBase& other) {
+    if (other.storage_.is_null_) {
+      FreeIfNeeded();
+      return *this;
+    }
+
+    InitOrAssign(other.storage_.value_);
+    return *this;
+  }
+
+  OptionalBase& operator=(OptionalBase&& other) {
+    if (other.storage_.is_null_) {
+      FreeIfNeeded();
+      return *this;
+    }
+
+    InitOrAssign(std::move(other.storage_.value_));
+    return *this;
+  }
+
+  template <class... Args>
+  void Init(Args&&... args) {
+    DCHECK(storage_.is_null_);
+    new (&storage_.value_) T(std::forward<Args>(args)...);
+    storage_.is_null_ = false;
+  }
+
+  void InitOrAssign(const T& value) {
+    if (storage_.is_null_)
+      Init(value);
+    else
+      storage_.value_ = value;
+  }
+
+  void InitOrAssign(T&& value) {
+    if (storage_.is_null_)
+      Init(std::move(value));
+    else
+      storage_.value_ = std::move(value);
+  }
+
+  void FreeIfNeeded() {
+    if (storage_.is_null_)
+      return;
+    storage_.value_.~T();
+    storage_.is_null_ = true;
+  }
+
+  OptionalStorage<T> storage_;
+};
+
 }  // namespace internal
 
 // base::Optional is a Chromium version of the C++17 optional class:
@@ -111,60 +178,40 @@
 // - No exceptions are thrown, because they are banned from Chromium.
 // - All the non-members are in the 'base' namespace instead of 'std'.
 template <typename T>
-class Optional {
+class Optional : public internal::OptionalBase<T> {
  public:
   using value_type = T;
 
+  // Defer default/copy/move constructor implementation to OptionalBase.
+  // TODO(hidehiko): Implement conditional enabling.
   constexpr Optional() = default;
+  Optional(const Optional& other) = default;
+  Optional(Optional&& other) = default;
 
-  constexpr Optional(base::nullopt_t) {}
+  constexpr Optional(nullopt_t) {}
 
-  // TODO(dcheng): Make these constexpr iff T is trivially constructible.
-  Optional(const Optional& other) {
-    if (!other.storage_.is_null_)
-      Init(other.value());
-  }
+  constexpr Optional(const T& value)
+      : internal::OptionalBase<T>(in_place, value) {}
 
-  Optional(Optional&& other) {
-    if (!other.storage_.is_null_)
-      Init(std::move(other.value()));
-  }
-
-  constexpr Optional(const T& value) : storage_(value) {}
-
-  constexpr Optional(T&& value) : storage_(std::move(value)) {}
+  constexpr Optional(T&& value)
+      : internal::OptionalBase<T>(in_place, std::move(value)) {}
 
   template <class... Args>
-  constexpr explicit Optional(base::in_place_t, Args&&... args)
-      : storage_(base::in_place, std::forward<Args>(args)...) {}
+  constexpr explicit Optional(in_place_t, Args&&... args)
+      : internal::OptionalBase<T>(in_place, std::forward<Args>(args)...) {}
 
   ~Optional() = default;
 
-  Optional& operator=(base::nullopt_t) {
+  // Defer copy-/move- assign operator implementation to OptionalBase.
+  // TOOD(hidehiko): Implement conditional enabling.
+  Optional& operator=(const Optional& other) = default;
+  Optional& operator=(Optional&& other) = default;
+
+  Optional& operator=(nullopt_t) {
     FreeIfNeeded();
     return *this;
   }
 
-  Optional& operator=(const Optional& other) {
-    if (other.storage_.is_null_) {
-      FreeIfNeeded();
-      return *this;
-    }
-
-    InitOrAssign(other.value());
-    return *this;
-  }
-
-  Optional& operator=(Optional&& other) {
-    if (other.storage_.is_null_) {
-      FreeIfNeeded();
-      return *this;
-    }
-
-    InitOrAssign(std::move(other.value()));
-    return *this;
-  }
-
   template <class U>
   typename std::enable_if<std::is_same<std::decay_t<U>, T>::value,
                           Optional&>::type
@@ -268,197 +315,190 @@
   }
 
  private:
-  void Init(const T& value) {
-    DCHECK(storage_.is_null_);
-    new (&storage_.value_) T(value);
-    storage_.is_null_ = false;
-  }
-
-  void Init(T&& value) {
-    DCHECK(storage_.is_null_);
-    new (&storage_.value_) T(std::move(value));
-    storage_.is_null_ = false;
-  }
-
-  template <class... Args>
-  void Init(Args&&... args) {
-    DCHECK(storage_.is_null_);
-    new (&storage_.value_) T(std::forward<Args>(args)...);
-    storage_.is_null_ = false;
-  }
-
-  void InitOrAssign(const T& value) {
-    if (storage_.is_null_)
-      Init(value);
-    else
-      storage_.value_ = value;
-  }
-
-  void InitOrAssign(T&& value) {
-    if (storage_.is_null_)
-      Init(std::move(value));
-    else
-      storage_.value_ = std::move(value);
-  }
-
-  void FreeIfNeeded() {
-    if (storage_.is_null_)
-      return;
-    storage_.value_.~T();
-    storage_.is_null_ = true;
-  }
-
-  internal::OptionalStorage<T> storage_;
+  // Accessing template base class's protected member needs explicit
+  // declaration to do so.
+  using internal::OptionalBase<T>::FreeIfNeeded;
+  using internal::OptionalBase<T>::Init;
+  using internal::OptionalBase<T>::InitOrAssign;
+  using internal::OptionalBase<T>::storage_;
 };
 
-template <class T>
-constexpr bool operator==(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return !!lhs != !!rhs ? false : lhs == nullopt || (*lhs == *rhs);
+// Here after defines comparation operators. The definition follows
+// http://en.cppreference.com/w/cpp/utility/optional/operator_cmp
+// while bool() casting is replaced by has_value() to meet the chromium
+// style guide.
+template <class T, class U>
+constexpr bool operator==(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (lhs.has_value() != rhs.has_value())
+    return false;
+  if (!lhs.has_value())
+    return true;
+  return *lhs == *rhs;
+}
+
+template <class T, class U>
+constexpr bool operator!=(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (lhs.has_value() != rhs.has_value())
+    return true;
+  if (!lhs.has_value())
+    return false;
+  return *lhs != *rhs;
+}
+
+template <class T, class U>
+constexpr bool operator<(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (!rhs.has_value())
+    return false;
+  if (!lhs.has_value())
+    return true;
+  return *lhs < *rhs;
+}
+
+template <class T, class U>
+constexpr bool operator<=(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (!lhs.has_value())
+    return true;
+  if (!rhs.has_value())
+    return false;
+  return *lhs <= *rhs;
+}
+
+template <class T, class U>
+constexpr bool operator>(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (!lhs.has_value())
+    return false;
+  if (!rhs.has_value())
+    return true;
+  return *lhs > *rhs;
+}
+
+template <class T, class U>
+constexpr bool operator>=(const Optional<T>& lhs, const Optional<U>& rhs) {
+  if (!rhs.has_value())
+    return true;
+  if (!lhs.has_value())
+    return false;
+  return *lhs >= *rhs;
 }
 
 template <class T>
-constexpr bool operator!=(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return !(lhs == rhs);
-}
-
-template <class T>
-constexpr bool operator<(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return rhs == nullopt ? false : (lhs == nullopt ? true : *lhs < *rhs);
-}
-
-template <class T>
-constexpr bool operator<=(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return !(rhs < lhs);
-}
-
-template <class T>
-constexpr bool operator>(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return rhs < lhs;
-}
-
-template <class T>
-constexpr bool operator>=(const Optional<T>& lhs, const Optional<T>& rhs) {
-  return !(lhs < rhs);
-}
-
-template <class T>
-constexpr bool operator==(const Optional<T>& opt, base::nullopt_t) {
+constexpr bool operator==(const Optional<T>& opt, nullopt_t) {
   return !opt;
 }
 
 template <class T>
-constexpr bool operator==(base::nullopt_t, const Optional<T>& opt) {
+constexpr bool operator==(nullopt_t, const Optional<T>& opt) {
   return !opt;
 }
 
 template <class T>
-constexpr bool operator!=(const Optional<T>& opt, base::nullopt_t) {
-  return !!opt;
+constexpr bool operator!=(const Optional<T>& opt, nullopt_t) {
+  return opt.has_value();
 }
 
 template <class T>
-constexpr bool operator!=(base::nullopt_t, const Optional<T>& opt) {
-  return !!opt;
+constexpr bool operator!=(nullopt_t, const Optional<T>& opt) {
+  return opt.has_value();
 }
 
 template <class T>
-constexpr bool operator<(const Optional<T>& opt, base::nullopt_t) {
+constexpr bool operator<(const Optional<T>& opt, nullopt_t) {
   return false;
 }
 
 template <class T>
-constexpr bool operator<(base::nullopt_t, const Optional<T>& opt) {
-  return !!opt;
+constexpr bool operator<(nullopt_t, const Optional<T>& opt) {
+  return opt.has_value();
 }
 
 template <class T>
-constexpr bool operator<=(const Optional<T>& opt, base::nullopt_t) {
+constexpr bool operator<=(const Optional<T>& opt, nullopt_t) {
   return !opt;
 }
 
 template <class T>
-constexpr bool operator<=(base::nullopt_t, const Optional<T>& opt) {
+constexpr bool operator<=(nullopt_t, const Optional<T>& opt) {
   return true;
 }
 
 template <class T>
-constexpr bool operator>(const Optional<T>& opt, base::nullopt_t) {
-  return !!opt;
+constexpr bool operator>(const Optional<T>& opt, nullopt_t) {
+  return opt.has_value();
 }
 
 template <class T>
-constexpr bool operator>(base::nullopt_t, const Optional<T>& opt) {
+constexpr bool operator>(nullopt_t, const Optional<T>& opt) {
   return false;
 }
 
 template <class T>
-constexpr bool operator>=(const Optional<T>& opt, base::nullopt_t) {
+constexpr bool operator>=(const Optional<T>& opt, nullopt_t) {
   return true;
 }
 
 template <class T>
-constexpr bool operator>=(base::nullopt_t, const Optional<T>& opt) {
+constexpr bool operator>=(nullopt_t, const Optional<T>& opt) {
   return !opt;
 }
 
-template <class T>
-constexpr bool operator==(const Optional<T>& opt, const T& value) {
-  return opt != nullopt ? *opt == value : false;
+template <class T, class U>
+constexpr bool operator==(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt == value : false;
 }
 
-template <class T>
-constexpr bool operator==(const T& value, const Optional<T>& opt) {
-  return opt == value;
+template <class T, class U>
+constexpr bool operator==(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value == *opt : false;
 }
 
-template <class T>
-constexpr bool operator!=(const Optional<T>& opt, const T& value) {
-  return !(opt == value);
+template <class T, class U>
+constexpr bool operator!=(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt != value : true;
 }
 
-template <class T>
-constexpr bool operator!=(const T& value, const Optional<T>& opt) {
-  return !(opt == value);
+template <class T, class U>
+constexpr bool operator!=(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value != *opt : true;
 }
 
-template <class T>
-constexpr bool operator<(const Optional<T>& opt, const T& value) {
-  return opt != nullopt ? *opt < value : true;
+template <class T, class U>
+constexpr bool operator<(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt < value : true;
 }
 
-template <class T>
-constexpr bool operator<(const T& value, const Optional<T>& opt) {
-  return opt != nullopt ? value < *opt : false;
+template <class T, class U>
+constexpr bool operator<(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value < *opt : false;
 }
 
-template <class T>
-constexpr bool operator<=(const Optional<T>& opt, const T& value) {
-  return !(opt > value);
+template <class T, class U>
+constexpr bool operator<=(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt <= value : true;
 }
 
-template <class T>
-constexpr bool operator<=(const T& value, const Optional<T>& opt) {
-  return !(value > opt);
+template <class T, class U>
+constexpr bool operator<=(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value <= *opt : false;
 }
 
-template <class T>
-constexpr bool operator>(const Optional<T>& opt, const T& value) {
-  return value < opt;
+template <class T, class U>
+constexpr bool operator>(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt > value : false;
 }
 
-template <class T>
-constexpr bool operator>(const T& value, const Optional<T>& opt) {
-  return opt < value;
+template <class T, class U>
+constexpr bool operator>(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value > *opt : true;
 }
 
-template <class T>
-constexpr bool operator>=(const Optional<T>& opt, const T& value) {
-  return !(opt < value);
+template <class T, class U>
+constexpr bool operator>=(const Optional<T>& opt, const U& value) {
+  return opt.has_value() ? *opt >= value : false;
 }
 
-template <class T>
-constexpr bool operator>=(const T& value, const Optional<T>& opt) {
-  return !(value < opt);
+template <class T, class U>
+constexpr bool operator>=(const U& value, const Optional<T>& opt) {
+  return opt.has_value() ? value >= *opt : true;
 }
 
 template <class T>
diff --git a/base/optional_unittest.cc b/base/optional_unittest.cc
index b47a91a..03c566b7 100644
--- a/base/optional_unittest.cc
+++ b/base/optional_unittest.cc
@@ -73,9 +73,11 @@
   }
 
   bool operator==(const TestObject& other) const {
-    return foo_ == other.foo_ && bar_ == other.bar_;
+    return std::tie(foo_, bar_) == std::tie(other.foo_, other.bar_);
   }
 
+  bool operator!=(const TestObject& other) const { return !(*this == other); }
+
   int foo() const { return foo_; }
   State state() const { return state_; }
   int move_ctors_count() const { return move_ctors_count_; }
@@ -606,6 +608,13 @@
   EXPECT_FALSE(a == b);
 }
 
+TEST(OptionalTest, Equals_DifferentType) {
+  Optional<int> a(0);
+  Optional<double> b(0);
+
+  EXPECT_TRUE(a == b);
+}
+
 TEST(OptionalTest, NotEquals_TwoEmpty) {
   Optional<int> a;
   Optional<int> b;
@@ -634,6 +643,13 @@
   EXPECT_TRUE(a != b);
 }
 
+TEST(OptionalTest, NotEquals_DifferentType) {
+  Optional<int> a(0);
+  Optional<double> b(0.0);
+
+  EXPECT_FALSE(a != b);
+}
+
 TEST(OptionalTest, Less_LeftEmpty) {
   Optional<int> l;
   Optional<int> r(1);
@@ -676,6 +692,13 @@
   }
 }
 
+TEST(OptionalTest, Less_DifferentType) {
+  Optional<int> l(1);
+  Optional<double> r(2.0);
+
+  EXPECT_TRUE(l < r);
+}
+
 TEST(OptionalTest, LessEq_LeftEmpty) {
   Optional<int> l;
   Optional<int> r(1);
@@ -718,6 +741,13 @@
   }
 }
 
+TEST(OptionalTest, LessEq_DifferentType) {
+  Optional<int> l(1);
+  Optional<double> r(2.0);
+
+  EXPECT_TRUE(l <= r);
+}
+
 TEST(OptionalTest, Greater_BothEmpty) {
   Optional<int> l;
   Optional<int> r;
@@ -760,6 +790,13 @@
   }
 }
 
+TEST(OptionalTest, Greater_DifferentType) {
+  Optional<int> l(1);
+  Optional<double> r(2.0);
+
+  EXPECT_FALSE(l > r);
+}
+
 TEST(OptionalTest, GreaterEq_BothEmpty) {
   Optional<int> l;
   Optional<int> r;
@@ -802,6 +839,13 @@
   }
 }
 
+TEST(OptionalTest, GreaterEq_DifferentType) {
+  Optional<int> l(1);
+  Optional<double> r(2.0);
+
+  EXPECT_FALSE(l >= r);
+}
+
 TEST(OptionalTest, OptNullEq) {
   {
     Optional<int> opt;
@@ -950,6 +994,11 @@
   }
 }
 
+TEST(OptionalTest, ValueEq_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(opt == 0.0);
+}
+
 TEST(OptionalTest, EqValue_Empty) {
   Optional<int> opt;
   EXPECT_FALSE(1 == opt);
@@ -966,6 +1015,11 @@
   }
 }
 
+TEST(OptionalTest, EqValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(0.0 == opt);
+}
+
 TEST(OptionalTest, ValueNotEq_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(opt != 1);
@@ -982,6 +1036,11 @@
   }
 }
 
+TEST(OPtionalTest, ValueNotEq_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_FALSE(opt != 0.0);
+}
+
 TEST(OptionalTest, NotEqValue_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(1 != opt);
@@ -998,6 +1057,11 @@
   }
 }
 
+TEST(OptionalTest, NotEqValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_FALSE(0.0 != opt);
+}
+
 TEST(OptionalTest, ValueLess_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(opt < 1);
@@ -1018,6 +1082,11 @@
   }
 }
 
+TEST(OPtionalTest, ValueLess_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(opt < 1.0);
+}
+
 TEST(OptionalTest, LessValue_Empty) {
   Optional<int> opt;
   EXPECT_FALSE(1 < opt);
@@ -1038,6 +1107,11 @@
   }
 }
 
+TEST(OptionalTest, LessValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_FALSE(0.0 < opt);
+}
+
 TEST(OptionalTest, ValueLessEq_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(opt <= 1);
@@ -1058,6 +1132,11 @@
   }
 }
 
+TEST(OptionalTest, ValueLessEq_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(opt <= 0.0);
+}
+
 TEST(OptionalTest, LessEqValue_Empty) {
   Optional<int> opt;
   EXPECT_FALSE(1 <= opt);
@@ -1078,6 +1157,11 @@
   }
 }
 
+TEST(OptionalTest, LessEqValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(0.0 <= opt);
+}
+
 TEST(OptionalTest, ValueGreater_Empty) {
   Optional<int> opt;
   EXPECT_FALSE(opt > 1);
@@ -1098,6 +1182,11 @@
   }
 }
 
+TEST(OptionalTest, ValueGreater_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_FALSE(opt > 0.0);
+}
+
 TEST(OptionalTest, GreaterValue_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(1 > opt);
@@ -1118,6 +1207,11 @@
   }
 }
 
+TEST(OptionalTest, GreaterValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_FALSE(0.0 > opt);
+}
+
 TEST(OptionalTest, ValueGreaterEq_Empty) {
   Optional<int> opt;
   EXPECT_FALSE(opt >= 1);
@@ -1138,6 +1232,11 @@
   }
 }
 
+TEST(OptionalTest, ValueGreaterEq_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(opt <= 0.0);
+}
+
 TEST(OptionalTest, GreaterEqValue_Empty) {
   Optional<int> opt;
   EXPECT_TRUE(1 >= opt);
@@ -1158,6 +1257,11 @@
   }
 }
 
+TEST(OptionalTest, GreaterEqValue_DifferentType) {
+  Optional<int> opt(0);
+  EXPECT_TRUE(0.0 >= opt);
+}
+
 TEST(OptionalTest, NotEquals) {
   {
     Optional<float> a(0.1f);
@@ -1172,6 +1276,12 @@
   }
 
   {
+    Optional<int> a(1);
+    Optional<double> b(2);
+    EXPECT_NE(a, b);
+  }
+
+  {
     Optional<TestObject> a(TestObject(3, 0.1));
     Optional<TestObject> b(TestObject(4, 1.0));
     EXPECT_TRUE(a != b);
diff --git a/base/test/launcher/test_results_tracker.cc b/base/test/launcher/test_results_tracker.cc
index 16587a1..1acd657 100644
--- a/base/test/launcher/test_results_tracker.cc
+++ b/base/test/launcher/test_results_tracker.cc
@@ -11,10 +11,11 @@
 
 #include "base/base64.h"
 #include "base/command_line.h"
+#include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/format_macros.h"
-#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_writer.h"
 #include "base/json/string_escape.h"
 #include "base/logging.h"
 #include "base/strings/string_util.h"
@@ -437,8 +438,23 @@
   }
   summary_root->Set("test_locations", std::move(test_locations));
 
-  JSONFileValueSerializer serializer(path);
-  return serializer.Serialize(*summary_root);
+  std::string json;
+  if (!JSONWriter::Write(*summary_root, &json))
+    return false;
+
+  File output(path, File::FLAG_CREATE_ALWAYS | File::FLAG_WRITE);
+  if (!output.IsValid())
+    return false;
+
+  int json_size = static_cast<int>(json.size());
+  if (output.WriteAtCurrentPos(json.data(), json_size) != json_size) {
+    return false;
+  }
+
+  // File::Flush() will call fsync(). This is important on Fuchsia to ensure
+  // that the file is written to the disk - the system running under qemu will
+  // shutdown shortly after the test completes.
+  return output.Flush();
 }
 
 TestResultsTracker::TestStatusMap
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index c29e2f2..a1e1096 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -390,13 +390,13 @@
   javac_cmd = [javac_path]
 
   javac_cmd.extend((
-      '-g',
-      # Chromium only allows UTF8 source files.  Being explicit avoids
-      # javac pulling a default encoding from the user's environment.
-      '-encoding', 'UTF-8',
-      # Prevent compiler from compiling .java files not listed as inputs.
-      # See: http://blog.ltgt.net/most-build-tools-misuse-javac/
-      '-sourcepath', ':',
+    '-g',
+    # Chromium only allows UTF8 source files.  Being explicit avoids
+    # javac pulling a default encoding from the user's environment.
+    '-encoding', 'UTF-8',
+    # Prevent compiler from compiling .java files not listed as inputs.
+    # See: http://blog.ltgt.net/most-build-tools-misuse-javac/
+    '-sourcepath', ':',
   ))
 
   if options.java_version:
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index c6f74aa9..b120234 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -19,8 +19,9 @@
 import shutil
 import subprocess
 import sys
-import xml.etree.ElementTree
 import zipfile
+from xml.etree import ElementTree
+
 
 import generate_v14_compatible_resources
 
@@ -503,6 +504,13 @@
         files_to_zip[archive_path] = path
   build_utils.DoZip(files_to_zip.iteritems(), zip_path)
 
+def _SortZip(original_path, sorted_path):
+  with zipfile.ZipFile(sorted_path, 'w') as sorted_zip, \
+      zipfile.ZipFile(original_path, 'r') as original_zip:
+    for info in sorted(original_zip.infolist(), key=lambda i: i.filename):
+      sorted_zip.writestr(info, original_zip.read(info))
+
+
 
 def _DuplicateZhResources(resource_dirs):
   for resource_dir in resource_dirs:
@@ -514,7 +522,7 @@
         shutil.copyfile(path, hk_path)
 
 def _ExtractPackageFromManifest(manifest_path):
-  doc = xml.etree.ElementTree.parse(manifest_path)
+  doc = ElementTree.parse(manifest_path)
   return doc.getroot().get('package')
 
 
@@ -602,45 +610,62 @@
                            'config (trigger=%s)') % (name, trigger.pattern))
 
 
-def _CreatePackageApkArgs(options):
-  package_command = [
+def _CreateLinkApkArgs(options):
+  link_command = [
+    options.aapt_path + '2',
+    'link',
     '--version-code', options.version_code,
     '--version-name', options.version_name,
-    '-f',
-    '-F', options.apk_path,
+    '--auto-add-overlay',
+    '--no-version-vectors',
+    '-I', options.android_sdk_jar,
+    '-o', options.apk_path,
   ]
 
   if options.proguard_file:
-    package_command += ['-G', options.proguard_file]
+    link_command += ['--proguard', options.proguard_file]
   if options.proguard_file_main_dex:
-    package_command += ['-D', options.proguard_file_main_dex]
+    link_command += ['--proguard-main-dex', options.proguard_file_main_dex]
 
   if options.no_compress:
     for ext in options.no_compress.split(','):
-      package_command += ['-0', ext]
+      link_command += ['-0', ext]
 
   if options.shared_resources:
-    package_command.append('--shared-lib')
-  if options.app_as_shared_lib:
-    package_command.append('--app-as-shared-lib')
+    link_command.append('--shared-lib')
 
   if options.create_density_splits:
     for config in _DENSITY_SPLITS.itervalues():
-      package_command.extend(('--split', ','.join(config)))
+      link_command.extend(('--split', ','.join(config)))
 
   if options.language_splits:
     for lang in options.language_splits:
-      package_command.extend(('--split', lang))
-
-  if options.debuggable:
-    package_command += ['--debug-mode']
+      link_command.extend(('--split', lang))
 
   if options.locale_whitelist:
     aapt_locales = _ToAaptLocales(
         options.locale_whitelist, options.support_zh_hk)
-    package_command += ['-c', ','.join(aapt_locales)]
+    link_command += ['-c', ','.join(aapt_locales)]
 
-  return package_command
+  return link_command
+
+
+def _EnableDebugInManifest(manifest_path, temp_dir):
+  debug_manifest_path = os.path.join(temp_dir, 'AndroidManifest.xml')
+  _ANDROID_NAMESPACE = 'http://schemas.android.com/apk/res/android'
+  _TOOLS_NAMESPACE = 'http://schemas.android.com/tools'
+  ElementTree.register_namespace('android', _ANDROID_NAMESPACE)
+  ElementTree.register_namespace('tools', _TOOLS_NAMESPACE)
+  original_manifest = ElementTree.parse(manifest_path)
+
+  app_node = original_manifest.find('application')
+  app_node.set('{%s}%s' % (_ANDROID_NAMESPACE, 'debuggable'), 'true')
+
+  with open(debug_manifest_path, 'w') as debug_manifest:
+    debug_manifest.write(ElementTree.tostring(
+        original_manifest.getroot(), encoding='UTF-8'))
+
+  return debug_manifest_path
 
 
 def _ResourceNameFromPath(path):
@@ -685,10 +710,37 @@
   pool.join()
 
 
-def _PackageApk(options, package_command, dep_subdirs):
-  _DuplicateZhResources(dep_subdirs)
+def _CompileDeps(aapt_path, dep_subdirs, temp_dir):
+  partials_dir = os.path.join(temp_dir, 'partials')
+  build_utils.MakeDirectory(partials_dir)
+  partial_compile_command = [
+      aapt_path + '2',
+      'compile',
+      '--no-crunch',
+  ]
+  pool = multiprocessing.pool.ThreadPool(10)
+  def compile_partial(directory):
+    dirname = os.path.basename(directory)
+    partial_path = os.path.join(partials_dir, dirname + '.zip')
+    compile_command = (partial_compile_command +
+                       ['--dir', directory, '-o', partial_path])
+    build_utils.CheckOutput(compile_command)
 
-  package_command += _CreatePackageApkArgs(options)
+    # Sorting the files in the partial ensures deterministic output from the
+    # aapt2 link step which uses order of files in the partial.
+    sorted_partial_path = os.path.join(partials_dir, dirname + '.sorted.zip')
+    _SortZip(partial_path, sorted_partial_path)
+
+    return sorted_partial_path
+
+  partials = pool.map(compile_partial, dep_subdirs)
+  pool.close()
+  pool.join()
+  return partials
+
+
+def _PackageApk(options, dep_subdirs, temp_dir, gen_dir, r_txt_path):
+  _DuplicateZhResources(dep_subdirs)
 
   keep_predicate = _CreateKeepPredicate(
       dep_subdirs, options.exclude_xxxhdpi, options.xxxhdpi_whitelist)
@@ -704,10 +756,26 @@
   for directory in dep_subdirs:
     _MoveImagesToNonMdpiFolders(directory)
 
+  link_command = _CreateLinkApkArgs(options)
+  link_command += ['--output-text-symbols', r_txt_path]
+  link_command += ['--java', gen_dir]
+
+  if options.debuggable:
+    debug_manifest = _EnableDebugInManifest(options.android_manifest, temp_dir)
+    link_command += ['--manifest', debug_manifest]
+  else:
+    link_command += ['--manifest', options.android_manifest]
+
+  partials = _CompileDeps(options.aapt_path, dep_subdirs, temp_dir)
+  # It only works if partials are reversed (resource clobbering). This could be
+  # due to aapt2 processes the partials in reversed order (compared to aapt)
+  for partial in reversed(partials):
+    link_command += ['-R', partial]
+
   # Creates a .zip with AndroidManifest.xml, resources.arsc, res/*
   # Also creates R.txt
   build_utils.CheckOutput(
-      package_command, print_stdout=False, print_stderr=False)
+      link_command, print_stdout=False, print_stderr=False)
 
   if options.create_density_splits or options.language_splits:
     _CheckForMissedConfigs(options.apk_path, options.create_density_splits,
@@ -717,10 +785,38 @@
     _RenameDensitySplits(options.apk_path)
 
 
-def _PackageLibrary(options, package_command, temp_dir):
+# _PackageLibrary uses aapt rather than aapt2 because aapt2 compile does not
+# support outputting an R.txt file.
+def _PackageLibrary(options, dep_subdirs, temp_dir, gen_dir):
   v14_dir = os.path.join(temp_dir, 'v14')
   build_utils.MakeDirectory(v14_dir)
 
+  # Generate R.java. This R.java contains non-final constants and is used only
+  # while compiling the library jar (e.g. chromium_content.jar). When building
+  # an apk, a new R.java file with the correct resource -> ID mappings will be
+  # generated by merging the resources from all libraries and the main apk
+  # project.
+  package_command = [options.aapt_path,
+                     'package',
+                     '-m',
+                     '-M', options.android_manifest,
+                     '--no-crunch',
+                     '--auto-add-overlay',
+                     '--no-version-vectors',
+                     '-I', options.android_sdk_jar,
+                     '--output-text-symbols', gen_dir,
+                     '-J', gen_dir,  # Required for R.txt generation.
+                     '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN]
+
+  # Adding all dependencies as sources is necessary for @type/foo references
+  # to symbols within dependencies to resolve. However, it has the side-effect
+  # that all Java symbols from dependencies are copied into the new R.java.
+  # E.g.: It enables an arguably incorrect usage of
+  # "mypackage.R.id.lib_symbol" where "libpackage.R.id.lib_symbol" would be
+  # more correct. This is just how Android works.
+  for d in dep_subdirs:
+    package_command += ['-S', d]
+
   input_resource_dirs = options.resource_dirs
 
   for d in input_resource_dirs:
@@ -814,36 +910,10 @@
 
     dep_subdirs = _ExtractDeps(options.dependencies_res_zips, deps_dir)
 
-    # Generate R.java. This R.java contains non-final constants and is used only
-    # while compiling the library jar (e.g. chromium_content.jar). When building
-    # an apk, a new R.java file with the correct resource -> ID mappings will be
-    # generated by merging the resources from all libraries and the main apk
-    # project.
-    package_command = [options.aapt_path,
-                       'package',
-                       '-m',
-                       '-M', options.android_manifest,
-                       '--no-crunch',
-                       '--auto-add-overlay',
-                       '--no-version-vectors',
-                       '-I', options.android_sdk_jar,
-                       '--output-text-symbols', gen_dir,
-                       '-J', gen_dir,  # Required for R.txt generation.
-                       '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN]
-
-    # Adding all dependencies as sources is necessary for @type/foo references
-    # to symbols within dependencies to resolve. However, it has the side-effect
-    # that all Java symbols from dependencies are copied into the new R.java.
-    # E.g.: It enables an arguably incorrect usage of
-    # "mypackage.R.id.lib_symbol" where "libpackage.R.id.lib_symbol" would be
-    # more correct. This is just how Android works.
-    for d in dep_subdirs:
-      package_command += ['-S', d]
-
     if options.apk_path:
-      _PackageApk(options, package_command, dep_subdirs)
+      _PackageApk(options, dep_subdirs, temp_dir, gen_dir, r_txt_path)
     else:
-      _PackageLibrary(options, package_command, temp_dir)
+      _PackageLibrary(options, dep_subdirs, temp_dir, gen_dir)
 
     _CreateRTxtAndSrcJar(options, r_txt_path, srcjar_dir)
 
@@ -882,12 +952,13 @@
     options.v14_skip,
     options.exclude_xxxhdpi,
     options.xxxhdpi_whitelist,
+    str(options.debuggable),
     str(options.png_to_webp),
     str(options.support_zh_hk),
   ]
 
   if options.apk_path:
-    input_strings.extend(_CreatePackageApkArgs(options))
+    input_strings.extend(_CreateLinkApkArgs(options))
 
   possible_input_paths = [
     options.aapt_path,
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index cd3d372..a77532c 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -35,7 +35,7 @@
 from util import build_utils
 
 # Types that should never be used as a dependency of another build config.
-_ROOT_TYPES = ('android_apk', 'deps_dex', 'java_binary',
+_ROOT_TYPES = ('android_apk', 'java_binary',
                'java_annotation_processor', 'junit_binary', 'resource_rewriter')
 # Types that should not allow code deps to pass through.
 _RESOURCE_TYPES = ('android_assets', 'android_resources')
@@ -366,7 +366,6 @@
       'android_assets': ['build_config'],
       'android_resources': ['build_config', 'resources_zip'],
       'android_apk': ['build_config','dex_path'] + jar_path_options,
-      'deps_dex': ['build_config', 'dex_path'],
       'dist_jar': ['build_config'],
       'resource_rewriter': ['build_config'],
       'group': ['build_config'],
@@ -602,7 +601,7 @@
     config['resources']['extra_package_names'] = extra_package_names
     config['resources']['extra_r_text_files'] = extra_r_text_files
 
-  if options.type in ['android_apk', 'deps_dex']:
+  if options.type == 'android_apk':
     deps_dex_files = [c['dex_path'] for c in all_library_deps]
 
   if is_java_target:
@@ -614,6 +613,9 @@
     # rebuilt.
     javac_interface_classpath = [
         c['interface_jar_path'] for c in direct_library_deps]
+    # The classpath used for error prone.
+    javac_full_interface_classpath = [
+        c['interface_jar_path'] for c in all_library_deps]
     # The classpath used for bytecode-rewritting.
     javac_full_classpath = [c['unprocessed_jar_path'] for c in all_library_deps]
     # The classpath to use to run this target (or as an input to ProGuard).
@@ -634,6 +636,8 @@
     extra_jars = [p for p in extra_jars if p not in javac_classpath]
     javac_classpath.extend(extra_jars)
     javac_interface_classpath.extend(extra_jars)
+    javac_full_interface_classpath.extend(
+        p for p in extra_jars if p not in javac_full_classpath)
     javac_full_classpath.extend(
         p for p in extra_jars if p not in javac_full_classpath)
     if extra_jars:
@@ -672,7 +676,13 @@
     # Include in the classpath classes that are added directly to the apk under
     # test (those that are not a part of a java_library).
     javac_classpath.append(tested_apk_config['unprocessed_jar_path'])
+    javac_full_classpath.append(tested_apk_config['unprocessed_jar_path'])
     javac_interface_classpath.append(tested_apk_config['interface_jar_path'])
+    javac_full_interface_classpath.append(
+        tested_apk_config['interface_jar_path'])
+    javac_full_interface_classpath.extend(
+        p for p in tested_apk_config['javac_full_interface_classpath']
+        if p not in javac_full_interface_classpath)
     javac_full_classpath.extend(
         p for p in tested_apk_config['javac_full_classpath']
         if p not in javac_full_classpath)
@@ -706,8 +716,8 @@
     proguard_config['lib_paths'] = extra_jars
     proguard_config['lib_configs'] = lib_configs
 
-  # Dependencies for the final dex file of an apk or a 'deps_dex'.
-  if options.type in ['android_apk', 'deps_dex']:
+  # Dependencies for the final dex file of an apk.
+  if options.type == 'android_apk':
     config['final_dex'] = {}
     dex_config = config['final_dex']
     dex_config['dependency_dex_files'] = deps_dex_files
@@ -722,6 +732,7 @@
     config['javac']['processor_classes'] = [
         c['main_class'] for c in processor_deps.Direct()]
     deps_info['javac_full_classpath'] = javac_full_classpath
+    deps_info['javac_full_interface_classpath'] = javac_full_interface_classpath
 
     if options.type in (
         'android_apk', 'dist_jar', 'java_binary', 'junit_binary'):
diff --git a/build/android/lint/suppressions.xml b/build/android/lint/suppressions.xml
index ef84286..e5ef842 100644
--- a/build/android/lint/suppressions.xml
+++ b/build/android/lint/suppressions.xml
@@ -374,7 +374,6 @@
   <issue id="WrongConstant">
     <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java"/>
     <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDialog.java"/>
-    <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndSyncView.java"/>
   </issue>
   <issue id="IconLauncherFormat" severity="ignore">
     <!-- TODO(crbug.com/739746): Remove after lint version has been updated. -->
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 5f7c196..ddc80f7 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -568,10 +568,10 @@
     self._test_package = self._test_apk.GetPackageName()
     all_instrumentations = self._test_apk.GetAllInstrumentations()
     all_junit3_runner_classes = [
-        x for x in all_instrumentations if ('true' not in x.get(
+        x for x in all_instrumentations if ('0xffffffff' not in x.get(
             'chromium-junit4', ''))]
     all_junit4_test_runner_classes = [
-        x for x in all_instrumentations if ('true' in x.get(
+        x for x in all_instrumentations if ('0xffffffff' in x.get(
             'chromium-junit4', ''))]
 
     if len(all_junit3_runner_classes) > 1:
diff --git a/build/check_gn_headers_whitelist.txt b/build/check_gn_headers_whitelist.txt
index f7a765c2..08f33c4 100644
--- a/build/check_gn_headers_whitelist.txt
+++ b/build/check_gn_headers_whitelist.txt
@@ -256,7 +256,6 @@
 third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h
 third_party/WebKit/Source/core/style/ShapeValue.h
 third_party/WebKit/Source/core/style/TransformOrigin.h
-third_party/WebKit/Source/platform/ColorSuggestion.h
 third_party/WebKit/Source/platform/EncryptedMediaRequest.h
 third_party/WebKit/Source/platform/fonts/FontSelector.h
 third_party/WebKit/Source/platform/fonts/Glyph.h
diff --git a/build/config/allocator.gni b/build/config/allocator.gni
index 5ac3ed67..fc5000a3 100644
--- a/build/config/allocator.gni
+++ b/build/config/allocator.gni
@@ -30,6 +30,9 @@
 
   # Causes all the allocations to be routed via allocator_shim.cc.
   use_allocator_shim = _default_use_allocator_shim
+
+  # Partition alloc is included by default except iOS.
+  use_partition_alloc = !is_ios
 }
 
 if (is_nacl) {
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index cceb26f254..cf2f7f1 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -84,10 +84,9 @@
     build_config = invoker.build_config
 
     assert(type == "android_apk" || type == "java_library" ||
-           type == "android_resources" || type == "deps_dex" ||
-           type == "dist_jar" || type == "android_assets" ||
-           type == "resource_rewriter" || type == "java_binary" ||
-           type == "group" || type == "junit_binary" ||
+           type == "android_resources" || type == "dist_jar" ||
+           type == "android_assets" || type == "resource_rewriter" ||
+           type == "java_binary" || type == "group" || type == "junit_binary" ||
            type == "java_annotation_processor")
 
     forward_variables_from(invoker,
@@ -150,7 +149,6 @@
     is_apk = type == "android_apk"
     is_android_assets = type == "android_assets"
     is_android_resources = type == "android_resources"
-    is_deps_dex = type == "deps_dex"
     is_group = type == "group"
 
     supports_android = is_android_assets || is_android_resources
@@ -168,7 +166,6 @@
     # Mark these variables as used.
     assert(is_apk || true)
     assert(is_android_resources || true)
-    assert(is_deps_dex || true)
     assert(is_group || true)
 
     if (defined(invoker.jar_path)) {
@@ -2187,8 +2184,8 @@
         "--java-srcjars=$_rebased_java_srcjars",
         "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)",
         "--java-version=1.8",
-        "--classpath=@FileArg($_rebased_build_config:javac:classpath)",
-        "--interface-classpath=@FileArg($_rebased_build_config:javac:interface_classpath)",
+        "--classpath=@FileArg($_rebased_build_config:deps_info:javac_full_classpath)",
+        "--interface-classpath=@FileArg($_rebased_build_config:deps_info:javac_full_interface_classpath)",
         "--processorpath=@FileArg($_rebased_build_config:javac:processor_classpath)",
         "--processors=@FileArg($_rebased_build_config:javac:processor_classes)",
       ]
@@ -2656,39 +2653,6 @@
     }
   }
 
-  # Produces a single .dex.jar out of a set of Java dependencies.
-  template("deps_dex") {
-    set_sources_assignment_filter([])
-    build_config = "$target_gen_dir/${target_name}.build_config"
-    build_config_target_name = "${target_name}__build_config"
-
-    write_build_config(build_config_target_name) {
-      forward_variables_from(invoker, [ "dex_path" ])
-      if (defined(invoker.deps)) {
-        possible_config_deps = invoker.deps
-      }
-      type = "deps_dex"
-      build_config = build_config
-    }
-
-    rebased_build_config = rebase_path(build_config, root_build_dir)
-    dex(target_name) {
-      inputs = [
-        build_config,
-      ]
-      output = invoker.dex_path
-      dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
-      args = [ "--inputs=@FileArg($dex_arg_key)" ]
-      if (defined(invoker.excluded_jars)) {
-        excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
-        args += [ "--excluded-paths=${excluded_jars}" ]
-      }
-      deps = [
-        ":$build_config_target_name",
-      ]
-    }
-  }
-
   # Creates an AndroidManifest.xml for an APK split.
   template("generate_split_manifest") {
     assert(defined(invoker.main_manifest))
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index f7f4fb7..ce19e7b7 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -56,12 +56,9 @@
   _runtime_deps_file = "$target_gen_dir/${target_name}.runtimedeps"
   _runtime_deps_target_name = "${target_name}__runtime_deps"
   group(_runtime_deps_target_name) {
-    forward_variables_from(invoker, [ "deps" ])
     data = _sanitizer_runtimes
-    if (is_component_build || is_asan) {
-      data_deps = [
-        "//build/android:cpplib_stripped",
-      ]
+    if (defined(invoker.deps)) {
+      data_deps = invoker.deps
     }
     write_runtime_deps = _runtime_deps_file
   }
@@ -1526,26 +1523,6 @@
     }
   }
 
-  # Declare a target that packages a set of Java dependencies into a standalone
-  # .dex.jar.
-  #
-  # Variables
-  #   deps: specifies the dependencies of this target. Android libraries in deps
-  #     will be packaged into the resulting .dex.jar file.
-  #   dex_path: location at which the output file will be put
-  template("android_standalone_library") {
-    deps_dex(target_name) {
-      forward_variables_from(invoker,
-                             [
-                               "deps",
-                               "dex_path",
-                               "excluded_jars",
-                             ])
-    }
-    supports_android = true
-    requires_android = true
-  }
-
   # Declare an Android library target for a prebuilt jar
   #
   # This target creates an Android library containing java code and Android
diff --git a/build/fuchsia/runner_common.py b/build/fuchsia/runner_common.py
index a1dac34..7670c27 100755
--- a/build/fuchsia/runner_common.py
+++ b/build/fuchsia/runner_common.py
@@ -133,11 +133,9 @@
   return expanded
 
 
-def _GetSymbolsMapping(dry_run, file_mapping, output_directory):
-  """For each stripped executable or dynamic library in |file_mapping|, looks
-  for an unstripped version in [exe|lib].unstripped under |output_directory|.
-  Returns a map from target filenames to un-stripped binary, if available, or
-  to the run-time binary otherwise."""
+def _GetSymbolsMapping(dry_run, file_mapping):
+  """Generates symbols mapping from |file_mapping| by filtering out all files
+  that are not ELF binaries."""
   symbols_mapping = {}
   for target, source in file_mapping.iteritems():
     with open(source, 'rb') as f:
@@ -145,22 +143,8 @@
     if file_tag != '\x7fELF':
       continue
 
-    # TODO(wez): Rather than bake-in assumptions about the naming of unstripped
-    # binaries, once we have ELF Build-Id values in the stack printout we should
-    # just scan the two directories to populate an Id->path mapping.
-    binary_name = os.path.basename(source)
-    exe_unstripped_path = os.path.join(
-        output_directory, 'exe.unstripped', binary_name)
-    lib_unstripped_path = os.path.join(
-        output_directory, 'lib.unstripped', binary_name)
-    if os.path.exists(exe_unstripped_path):
-      symbols_mapping[target] = exe_unstripped_path
-    elif os.path.exists(lib_unstripped_path):
-      # TODO(wez): libraries are named by basename in stacks, not by path.
-      symbols_mapping[binary_name] = lib_unstripped_path
-      symbols_mapping[target] = lib_unstripped_path
-    else:
-      symbols_mapping[target] = source
+    symbols_mapping[os.path.basename(target)] = source
+    symbols_mapping[target] = source
 
     if dry_run:
       print 'Symbols:', binary_name, '->', symbols_mapping[target]
@@ -332,11 +316,11 @@
   autorun_file.write('\n')
 
   if shutdown_machine:
-    autorun_file.write('echo Sleeping and shutting down...\n')
+    autorun_file.write('echo Shutting down...\n')
 
-    # A delay is required to give the guest OS or remote device a chance to
-    # flush its output before it terminates.
-    autorun_file.write('msleep 8000\n')
+    # Sleep 1 second to let test outputs get flushed to the console.
+    autorun_file.write('msleep 1000\n')
+
     if use_device:
       autorun_file.write('dm reboot\n')
     else:
@@ -403,8 +387,7 @@
       lambda x: _MakeTargetImageName(DIR_SOURCE_ROOT, icd.output_directory, x))
 
   # Determine the locations of unstripped versions of each binary, if any.
-  symbols_mapping = _GetSymbolsMapping(
-      icd.dry_run, file_mapping, icd.output_directory)
+  symbols_mapping = _GetSymbolsMapping(icd.dry_run, file_mapping)
 
   return file_mapping, symbols_mapping
 
@@ -495,8 +478,8 @@
   return results
 
 
-def _LookupDebugBinary(entry, file_mapping):
-  """Looks up the binary listed in |entry| in the |file_mapping|, and returns
+def _LookupDebugBinary(entry, symbols_mapping):
+  """Looks up the binary listed in |entry| in the |symbols_mapping|, and returns
   the corresponding host-side binary's filename, or None."""
   binary = entry['binary']
   if not binary:
@@ -517,25 +500,25 @@
     binary = binary[len(system_prefix):]
   # Allow any other paths to pass-through; sometimes neither prefix is present.
 
-  if binary in file_mapping:
-    return file_mapping[binary]
+  if binary in symbols_mapping:
+    return symbols_mapping[binary]
 
   # |binary| may be truncated by the crashlogger, so if there is a unique
-  # match for the truncated name in |file_mapping|, use that instead.
-  matches = filter(lambda x: x.startswith(binary), file_mapping.keys())
+  # match for the truncated name in |symbols_mapping|, use that instead.
+  matches = filter(lambda x: x.startswith(binary), symbols_mapping.keys())
   if len(matches) == 1:
-    return file_mapping[matches[0]]
+    return symbols_mapping[matches[0]]
 
   return None
 
 
-def _SymbolizeBacktrace(backtrace, file_mapping):
+def _SymbolizeBacktrace(backtrace, symbols_mapping):
   # Group |backtrace| entries according to the associated binary, and locate
   # the path to the debug symbols for that binary, if any.
   batches = {}
 
   for entry in backtrace:
-    debug_binary = _LookupDebugBinary(entry, file_mapping)
+    debug_binary = _LookupDebugBinary(entry, symbols_mapping)
     if debug_binary:
       entry['debug_binary'] = debug_binary
     batches.setdefault(debug_binary, []).append(entry)
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index e437d06..4aaca367 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -39,6 +39,8 @@
     "input/page_scale_animation.h",
     "input/scroll_elasticity_helper.cc",
     "input/scroll_elasticity_helper.h",
+    "input/scroll_snap_data.cc",
+    "input/scroll_snap_data.h",
     "input/scroll_state.cc",
     "input/scroll_state.h",
     "input/scroll_state_data.cc",
diff --git a/cc/input/scroll_snap_data.cc b/cc/input/scroll_snap_data.cc
new file mode 100644
index 0000000..1c3a025
--- /dev/null
+++ b/cc/input/scroll_snap_data.cc
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/input/scroll_snap_data.h"
+
+namespace cc {
+
+SnapContainerData::SnapContainerData() : SnapContainerData(ScrollSnapType()) {}
+
+SnapContainerData::SnapContainerData(ScrollSnapType type)
+    : scroll_snap_type(type) {}
+
+SnapContainerData::SnapContainerData(ScrollSnapType type, gfx::ScrollOffset max)
+    : scroll_snap_type(type), max_position(max) {}
+
+SnapContainerData::SnapContainerData(const SnapContainerData& other)
+    : scroll_snap_type(other.scroll_snap_type),
+      max_position(other.max_position),
+      snap_area_list(other.snap_area_list) {}
+
+SnapContainerData::~SnapContainerData() {}
+
+void SnapContainerData::AddSnapAreaData(SnapAreaData snap_area_data) {
+  snap_area_list.push_back(snap_area_data);
+}
+
+std::ostream& operator<<(std::ostream& ostream, const SnapAreaData& area_data) {
+  return ostream << area_data.snap_position.x() << ", "
+                 << area_data.snap_position.y();
+}
+
+std::ostream& operator<<(std::ostream& ostream,
+                         const SnapContainerData& container_data) {
+  for (SnapAreaData area_data : container_data.snap_area_list) {
+    ostream << area_data << "\n";
+  }
+  return ostream;
+}
+
+}  // namespace cc
diff --git a/cc/input/scroll_snap_data.h b/cc/input/scroll_snap_data.h
new file mode 100644
index 0000000..efeb997
--- /dev/null
+++ b/cc/input/scroll_snap_data.h
@@ -0,0 +1,148 @@
+// 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 CC_INPUT_SCROLL_SNAP_DATA_H_
+#define CC_INPUT_SCROLL_SNAP_DATA_H_
+
+#include <vector>
+
+#include "cc/cc_export.h"
+#include "ui/gfx/geometry/scroll_offset.h"
+
+namespace cc {
+
+// See https://www.w3.org/TR/css-scroll-snap-1/#snap-axis
+enum class SnapAxis : unsigned {
+  kBoth,
+  kX,
+  kY,
+  kBlock,
+  kInline,
+};
+
+// See https://www.w3.org/TR/css-scroll-snap-1/#snap-strictness
+// TODO(sunyunjia): Add kNone for SnapStrictness to match the spec.
+// crbug.com/791663
+enum class SnapStrictness : unsigned { kProximity, kMandatory };
+
+// See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-align
+enum class SnapAlignment : unsigned { kNone, kStart, kEnd, kCenter };
+
+struct ScrollSnapType {
+  ScrollSnapType()
+      : is_none(true),
+        axis(SnapAxis::kBoth),
+        strictness(SnapStrictness::kProximity) {}
+
+  ScrollSnapType(bool snap_type_none, SnapAxis axis, SnapStrictness strictness)
+      : is_none(snap_type_none), axis(axis), strictness(strictness) {}
+
+  bool operator==(const ScrollSnapType& other) const {
+    return is_none == other.is_none && axis == other.axis &&
+           strictness == other.strictness;
+  }
+
+  bool operator!=(const ScrollSnapType& other) const {
+    return !(*this == other);
+  }
+
+  // Whether the scroll-snap-type is none or the snap-strictness field has the
+  // value None.
+  // TODO(sunyunjia): Consider combining is_none with SnapStrictness.
+  bool is_none;
+
+  SnapAxis axis;
+  SnapStrictness strictness;
+};
+
+struct ScrollSnapAlign {
+  ScrollSnapAlign()
+      : alignmentX(SnapAlignment::kNone), alignmentY(SnapAlignment::kNone) {}
+
+  explicit ScrollSnapAlign(SnapAlignment alignment)
+      : alignmentX(alignment), alignmentY(alignment) {}
+
+  ScrollSnapAlign(SnapAlignment x, SnapAlignment y)
+      : alignmentX(x), alignmentY(y) {}
+
+  bool operator==(const ScrollSnapAlign& other) const {
+    return alignmentX == other.alignmentX && alignmentY == other.alignmentY;
+  }
+
+  bool operator!=(const ScrollSnapAlign& other) const {
+    return !(*this == other);
+  }
+
+  SnapAlignment alignmentX;
+  SnapAlignment alignmentY;
+};
+
+// Snap area is a bounding box that could be snapped to when a scroll happens in
+// its scroll container.
+// This data structure describes the data needed for SnapCoordinator if we want
+// to snap to this snap area.
+struct SnapAreaData {
+  // kInvalidScrollOffset is used to mark that the snap_position on a specific
+  // axis is not applicable, thus should not be considered when snapping on that
+  // axis. This is because the snap area has SnapAlignmentNone on that axis.
+  static const int kInvalidScrollPosition = -1;
+
+  SnapAreaData() {}
+
+  SnapAreaData(SnapAxis axis, gfx::ScrollOffset position, bool msnap)
+      : snap_axis(axis), snap_position(position), must_snap(msnap) {}
+
+  // The axes along which the area has specified snap positions.
+  SnapAxis snap_axis;
+
+  // The scroll_position to snap the area at the specified alignment in that
+  // axis.
+  // This is in the same coordinate with blink's scroll position, which is the
+  // location of the top/left of the scroll viewport in the top/left of the
+  // overflow rect.
+  gfx::ScrollOffset snap_position;
+
+  // Whether this area has scroll-snap-stop: always.
+  // See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-stop
+  bool must_snap;
+
+  // TODO(sunyunjia): Add fields for visibility requirement and large area
+  // snapping.
+};
+
+// Snap container is a scroll container that has non-'none' value for
+// scroll-snap-type. It can be snapped to one of its snap areas when a scroll
+// happens.
+// This data structure describes the data needed for SnapCoordinator to perform
+// snapping in the snap container.
+struct CC_EXPORT SnapContainerData {
+  SnapContainerData();
+  explicit SnapContainerData(ScrollSnapType type);
+  SnapContainerData(ScrollSnapType type, gfx::ScrollOffset max);
+  SnapContainerData(const SnapContainerData& other);
+  ~SnapContainerData();
+
+  void AddSnapAreaData(SnapAreaData snap_area_data);
+
+  // Specifies whether a scroll container is a scroll snap container, how
+  // strictly it snaps, and which axes are considered.
+  // See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-type for details.
+  ScrollSnapType scroll_snap_type;
+
+  // The maximal scroll position of the SnapContainer, in the same coordinate
+  // with blink's scroll position.
+  gfx::ScrollOffset max_position;
+
+  // The SnapAreaData for the snap areas in this snap container. When a scroll
+  // happens, we iterate through the snap_area_list to find the best snap
+  // position.
+  std::vector<SnapAreaData> snap_area_list;
+};
+
+CC_EXPORT std::ostream& operator<<(std::ostream&, const SnapAreaData&);
+CC_EXPORT std::ostream& operator<<(std::ostream&, const SnapContainerData&);
+
+}  // namespace cc
+
+#endif  // CC_INPUT_SCROLL_SNAP_DATA_H_
diff --git a/cc/ipc/cc_param_traits_unittest.cc b/cc/ipc/cc_param_traits_unittest.cc
index 7010601..43c059e 100644
--- a/cc/ipc/cc_param_traits_unittest.cc
+++ b/cc/ipc/cc_param_traits_unittest.cc
@@ -569,11 +569,11 @@
 
 TEST_F(CCParamTraitsTest, Resources) {
   IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
-  gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO,
                                   gpu::CommandBufferId::FromUnsafeValue(0x123),
                                   71234838);
   arbitrary_token1.SetVerifyFlush();
-  gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO,
                                   gpu::CommandBufferId::FromUnsafeValue(0x123),
                                   53589793);
   arbitrary_token2.SetVerifyFlush();
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 1e60174..9d6179b 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -15,6 +15,7 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event_argument.h"
+#include "build/build_config.h"
 #include "cc/base/math_util.h"
 #include "cc/benchmarks/micro_benchmark_impl.h"
 #include "cc/debug/debug_colors.h"
@@ -631,6 +632,23 @@
   }
   viewport_rect_for_tile_priority_in_content_space_ =
       visible_rect_in_content_space;
+#if defined(OS_ANDROID)
+  // On android, if we're in a scrolling gesture, the pending tree does not
+  // reflect the fact that we may be hiding the top controls. Thus, it would
+  // believe that the viewport is smaller than it actually is which can cause
+  // activation flickering issues. So, if we're in this situation adjust the
+  // visible rect by the top controls height. This isn't ideal since we're not
+  // always in this case, but since we should be prioritizing the active tree
+  // anyway, it doesn't cause any serious issues. https://crbug.com/794456.
+  if (layer_tree_impl()->IsPendingTree() &&
+      layer_tree_impl()->IsActivelyScrolling()) {
+    viewport_rect_for_tile_priority_in_content_space_.Inset(
+        0,                                           // left
+        0,                                           // top,
+        0,                                           // right,
+        -layer_tree_impl()->top_controls_height());  // bottom
+  }
+#endif
 }
 
 PictureLayerImpl* PictureLayerImpl::GetPendingOrActiveTwinLayer() const {
@@ -1581,14 +1599,12 @@
          (contributes_to_drawn_render_surface() || raster_even_if_not_drawn());
 }
 
-void PictureLayerImpl::InvalidateRegionForImages(
+PictureLayerImpl::ImageInvalidationResult
+PictureLayerImpl::InvalidateRegionForImages(
     const PaintImageIdFlatSet& images_to_invalidate) {
-  TRACE_EVENT0("cc", "PictureLayerImpl::InvalidateRegionForImages");
-
   if (!raster_source_ || !raster_source_->GetDisplayItemList() ||
       raster_source_->GetDisplayItemList()->discardable_image_map().empty()) {
-    TRACE_EVENT0("cc", "PictureLayerImpl::InvalidateRegionForImages NoImages");
-    return;
+    return ImageInvalidationResult::kNoImages;
   }
 
   InvalidationRegion image_invalidation;
@@ -1602,11 +1618,8 @@
   Region invalidation;
   image_invalidation.Swap(&invalidation);
 
-  if (invalidation.IsEmpty()) {
-    TRACE_EVENT0("cc",
-                 "PictureLayerImpl::InvalidateRegionForImages NoInvalidation");
-    return;
-  }
+  if (invalidation.IsEmpty())
+    return ImageInvalidationResult::kNoInvalidation;
 
   // Make sure to union the rect from this invalidation with the update_rect
   // instead of over-writing it. We don't want to reset the update that came
@@ -1620,8 +1633,7 @@
   invalidation_.Union(invalidation);
   tilings_->Invalidate(invalidation);
   SetNeedsPushProperties();
-  TRACE_EVENT1("cc", "PictureLayerImpl::InvalidateRegionForImages Invalidation",
-               "Invalidation", invalidation.ToString());
+  return ImageInvalidationResult::kInvalidated;
 }
 
 void PictureLayerImpl::RegisterAnimatedImages() {
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 10ebaed..319300cf 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -108,7 +108,18 @@
     is_directly_composited_image_ = is_directly_composited_image;
   }
 
-  void InvalidateRegionForImages(
+  // This enum is the return value of the InvalidateRegionForImages() call. The
+  // possible values represent the fact that there are no images on this layer
+  // (kNoImages), the fact that the invalidation images don't cause an
+  // invalidation on this layer (kNoInvalidation), or the fact that the layer
+  // was invalidated (kInvalidated).
+  enum class ImageInvalidationResult {
+    kNoImages,
+    kNoInvalidation,
+    kInvalidated,
+  };
+
+  ImageInvalidationResult InvalidateRegionForImages(
       const PaintImageIdFlatSet& images_to_invalidate);
 
   bool RasterSourceUsesLCDTextForTesting() const { return can_use_lcd_text_; }
diff --git a/cc/layers/texture_layer_impl_unittest.cc b/cc/layers/texture_layer_impl_unittest.cc
index 86157245..2c626ef7 100644
--- a/cc/layers/texture_layer_impl_unittest.cc
+++ b/cc/layers/texture_layer_impl_unittest.cc
@@ -58,7 +58,7 @@
   gl->GenMailboxCHROMIUM(mailbox.name);
   auto resource = viz::TransferableResource::MakeGL(
       std::move(mailbox), GL_LINEAR, GL_TEXTURE_2D,
-      gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0x123,
+      gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO,
                      gpu::CommandBufferId::FromUnsafeValue(0x234), 0x456));
 
   TextureLayerImpl* texture_layer_impl =
@@ -119,7 +119,7 @@
   resource.is_software = false;
   gl->GenMailboxCHROMIUM(resource.mailbox_holder.mailbox.name);
   resource.mailbox_holder.sync_token =
-      gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0x123,
+      gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO,
                      gpu::CommandBufferId::FromUnsafeValue(0x234), 0x456);
   resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
 
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 998ee16..1e5dade 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -62,7 +62,7 @@
 }
 
 gpu::SyncToken SyncTokenFromUInt(uint32_t value) {
-  return gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0,
+  return gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO,
                         gpu::CommandBufferId::FromUnsafeValue(0x123), value);
 }
 
@@ -112,11 +112,9 @@
       : mailbox_name1_(MailboxFromChar('1')),
         mailbox_name2_(MailboxFromChar('2')),
         sync_token1_(gpu::CommandBufferNamespace::GPU_IO,
-                     123,
                      gpu::CommandBufferId::FromUnsafeValue(0x234),
                      1),
         sync_token2_(gpu::CommandBufferNamespace::GPU_IO,
-                     123,
                      gpu::CommandBufferId::FromUnsafeValue(0x234),
                      2) {
     release_callback1_ =
diff --git a/cc/paint/paint_op_buffer.cc b/cc/paint/paint_op_buffer.cc
index 2f1336bc..d953ccf 100644
--- a/cc/paint/paint_op_buffer.cc
+++ b/cc/paint/paint_op_buffer.cc
@@ -16,7 +16,7 @@
 #include "third_party/skia/include/core/SkAnnotation.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkRegion.h"
-#include "third_party/skia/include/core/SkWriteBuffer.h"
+#include "third_party/skia/include/core/SkSerialProcs.h"
 
 namespace cc {
 #define TYPES(M)      \
@@ -1537,21 +1537,10 @@
   DCHECK(*left->blob);
   DCHECK(*right->blob);
 
-  SkBinaryWriteBuffer left_flattened;
-  left->blob->ToSkTextBlob()->flatten(left_flattened);
-  std::vector<char> left_mem(left_flattened.bytesWritten());
-  left_flattened.writeToMemory(left_mem.data());
-
-  SkBinaryWriteBuffer right_flattened;
-  right->blob->ToSkTextBlob()->flatten(right_flattened);
-  std::vector<char> right_mem(right_flattened.bytesWritten());
-  right_flattened.writeToMemory(right_mem.data());
-
-  if (left_mem.size() != right_mem.size())
-    return false;
-  if (left_mem != right_mem)
-    return false;
-  return true;
+  SkSerialProcs default_procs;
+  return left->blob->ToSkTextBlob()
+      ->serialize(default_procs)
+      ->equals(right->blob->ToSkTextBlob()->serialize(default_procs).get());
 }
 
 bool NoopOp::AreEqual(const PaintOp* base_left, const PaintOp* base_right) {
diff --git a/cc/paint/paint_op_buffer_unittest.cc b/cc/paint/paint_op_buffer_unittest.cc
index c81230d..81246ab 100644
--- a/cc/paint/paint_op_buffer_unittest.cc
+++ b/cc/paint/paint_op_buffer_unittest.cc
@@ -19,7 +19,6 @@
 #include "cc/test/transfer_cache_test_helper.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkFlattenableSerialization.h"
-#include "third_party/skia/include/core/SkWriteBuffer.h"
 #include "third_party/skia/include/effects/SkBlurMaskFilter.h"
 #include "third_party/skia/include/effects/SkColorMatrixFilter.h"
 #include "third_party/skia/include/effects/SkDashPathEffect.h"
diff --git a/cc/raster/raster_buffer_provider_perftest.cc b/cc/raster/raster_buffer_provider_perftest.cc
index 66bad93..e96c498c 100644
--- a/cc/raster/raster_buffer_provider_perftest.cc
+++ b/cc/raster/raster_buffer_provider_perftest.cc
@@ -73,7 +73,7 @@
   }
   void GenUnverifiedSyncTokenCHROMIUM(GLbyte* sync_token) override {
     // Copy the data over after setting the data to ensure alignment.
-    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
+    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId(), 0);
     memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
   }
diff --git a/cc/resources/layer_tree_resource_provider_unittest.cc b/cc/resources/layer_tree_resource_provider_unittest.cc
index 3478b55c..3207e64 100644
--- a/cc/resources/layer_tree_resource_provider_unittest.cc
+++ b/cc/resources/layer_tree_resource_provider_unittest.cc
@@ -41,7 +41,7 @@
   }
 
   gpu::SyncToken SyncTokenFromUInt(uint32_t value) {
-    return gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO, 0,
+    return gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO,
                           gpu::CommandBufferId::FromUnsafeValue(0x123), value);
   }
 
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index 139088d..800510d 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -122,7 +122,7 @@
   void RetireTextureId(GLuint) override {}
 
   void genSyncToken(GLbyte* sync_token) override {
-    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
+    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(0x123),
                                    next_fence_sync_++);
     sync_token_data.SetVerifyFlush();
@@ -198,7 +198,7 @@
 
   void genSyncToken(GLbyte* sync_token) override {
     uint64_t fence_sync = shared_data_->InsertFenceSync();
-    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
+    gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(0x123),
                                    fence_sync);
     sync_token_data.SetVerifyFlush();
@@ -2575,7 +2575,7 @@
         CreateResourceSettings()));
 
     unsigned texture_id = 1;
-    gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+    gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                               gpu::CommandBufferId::FromUnsafeValue(0x12),
                               0x34);
     const GLuint64 current_fence_sync = child_context->GetNextFenceSync();
@@ -2739,7 +2739,7 @@
       gpu_memory_buffer_manager_.get(), kDelegatedSyncPointsRequired,
       CreateResourceSettings()));
 
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(0x12), 0x34);
   const GLuint64 current_fence_sync = child_context->GetNextFenceSync();
 
@@ -2836,7 +2836,7 @@
       context_provider.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), CreateResourceSettings());
 
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(0x12), 0x34);
   const GLuint64 current_fence_sync = context->GetNextFenceSync();
 
@@ -2893,7 +2893,7 @@
       context_provider.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), CreateResourceSettings());
 
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(0x12), 0x34);
   const GLuint64 current_fence_sync = context->GetNextFenceSync();
 
@@ -3362,7 +3362,7 @@
     ResourceProvider::ScopedWriteLockGL lock(child_resource_provider_.get(),
                                              id);
     gpu::SyncToken token;
-    token.Set(gpu::CommandBufferNamespace::INVALID, 0, gpu::CommandBufferId(),
+    token.Set(gpu::CommandBufferNamespace::INVALID, gpu::CommandBufferId(),
               release_counts[i]);
     lock.set_sync_token(token);
   }
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 3d440f7..34fb091 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -81,7 +81,7 @@
       break;
     case media::PIXEL_FORMAT_YV12:
     case media::PIXEL_FORMAT_I422:
-    case media::PIXEL_FORMAT_YV24:
+    case media::PIXEL_FORMAT_I444:
     case media::PIXEL_FORMAT_YV12A:
     case media::PIXEL_FORMAT_NV21:
     case media::PIXEL_FORMAT_YUY2:
@@ -98,7 +98,6 @@
     case media::PIXEL_FORMAT_YUV420P12:
     case media::PIXEL_FORMAT_YUV422P12:
     case media::PIXEL_FORMAT_YUV444P12:
-    case media::PIXEL_FORMAT_Y8:
     case media::PIXEL_FORMAT_Y16:
     case media::PIXEL_FORMAT_UNKNOWN:
       break;
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index 0af41808..5cac8e3 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -253,7 +253,6 @@
 
 const gpu::SyncToken VideoResourceUpdaterTest::kMailboxSyncToken =
     gpu::SyncToken(gpu::CommandBufferNamespace::GPU_IO,
-                   0,
                    gpu::CommandBufferId::FromUnsafeValue(0x123),
                    7);
 
@@ -617,7 +616,7 @@
                                resource_provider3d_.get(),
                                false /* use_stream_video_draw_quad */);
 
-  const gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  const gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                                   gpu::CommandBufferId::FromUnsafeValue(0x123),
                                   123);
 
@@ -641,11 +640,11 @@
                                resource_provider3d_.get(),
                                false /* use_stream_video_draw_quad */);
 
-  const gpu::SyncToken sync_token1(gpu::CommandBufferNamespace::GPU_IO, 0,
+  const gpu::SyncToken sync_token1(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(0x123),
                                    123);
 
-  const gpu::SyncToken sync_token2(gpu::CommandBufferNamespace::GPU_IO, 0,
+  const gpu::SyncToken sync_token2(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(0x234),
                                    234);
 
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index 51d5171..12110bd 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -129,7 +129,7 @@
   const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
 
   static const gpu::SyncToken kSyncTokenForMailboxTextureQuad(
-      gpu::CommandBufferNamespace::GPU_IO, 0,
+      gpu::CommandBufferNamespace::GPU_IO,
       gpu::CommandBufferId::FromUnsafeValue(0x123), 30);
   *sync_token_for_mailbox_tebxture = kSyncTokenForMailboxTextureQuad;
 
@@ -277,7 +277,7 @@
   const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
 
   static const gpu::SyncToken kSyncTokenForMailboxTextureQuad(
-      gpu::CommandBufferNamespace::GPU_IO, 0,
+      gpu::CommandBufferNamespace::GPU_IO,
       gpu::CommandBufferId::FromUnsafeValue(0x123), 30);
   *sync_token_for_mailbox_tebxture = kSyncTokenForMailboxTextureQuad;
 
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index a55b1b1..541c3ea 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -648,7 +648,7 @@
   // of CommandBufferProxyImpl.
   if (context_lost_)
     return;
-  gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO,
                                  gpu::CommandBufferId(),
                                  next_insert_fence_sync_++);
   sync_token_data.SetVerifyFlush();
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 8b9698d3..6fb4812 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -128,7 +128,6 @@
 void PictureLayerTiling::TakeTilesAndPropertiesFrom(
     PictureLayerTiling* pending_twin,
     const Region& layer_invalidation) {
-  TRACE_EVENT0("cc", "TakeTilesAndPropertiesFrom");
   SetRasterSourceAndResize(pending_twin->raster_source_);
 
   RemoveTilesInRegion(layer_invalidation, false /* recreate tiles */);
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 0404981f..d642e93 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -322,7 +322,7 @@
             &BrowserCompositorInvalidateLayerTreePerfTest::ReleaseMailbox,
             base::Unretained(this)));
 
-    gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+    gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(1),
                                    next_fence_sync_);
     next_sync_token.SetVerifyFlush();
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 00b78eac..2d65a6b 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -298,15 +298,37 @@
 
 void LayerTreeImpl::InvalidateRegionForImages(
     const PaintImageIdFlatSet& images_to_invalidate) {
+  TRACE_EVENT_BEGIN1("cc", "LayerTreeImpl::InvalidateRegionForImages",
+                     "total_layer_count", picture_layers_.size());
   DCHECK(IsSyncTree());
 
-  if (images_to_invalidate.empty())
-    return;
-
-  // TODO(khushalsagar): It might be better to keep track of layers with images
-  // and only iterate through those here.
-  for (auto* picture_layer : picture_layers_)
-    picture_layer->InvalidateRegionForImages(images_to_invalidate);
+  size_t no_images_count = 0;
+  size_t no_invalidation_count = 0;
+  size_t invalidated_count = 0;
+  if (!images_to_invalidate.empty()) {
+    // TODO(khushalsagar): It might be better to keep track of layers with
+    // images and only iterate through those here.
+    for (auto* picture_layer : picture_layers_) {
+      auto result =
+          picture_layer->InvalidateRegionForImages(images_to_invalidate);
+      switch (result) {
+        case PictureLayerImpl::ImageInvalidationResult::kNoImages:
+          ++no_images_count;
+          break;
+        case PictureLayerImpl::ImageInvalidationResult::kNoInvalidation:
+          ++no_invalidation_count;
+          break;
+        case PictureLayerImpl::ImageInvalidationResult::kInvalidated:
+          ++invalidated_count;
+          break;
+      }
+    }
+  }
+  TRACE_EVENT_END1(
+      "cc", "LayerTreeImpl::InvalidateRegionForImages", "counts",
+      base::StringPrintf("no_images[%zu] no_invalidaton[%zu] invalidated[%zu]",
+                         no_images_count, no_invalidation_count,
+                         invalidated_count));
 }
 
 bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const {
@@ -368,6 +390,7 @@
 }
 
 void LayerTreeImpl::PushPropertyTreesTo(LayerTreeImpl* target_tree) {
+  TRACE_EVENT0("cc", "LayerTreeImpl::PushPropertyTreesTo");
   // Property trees may store damage status. We preserve the active tree
   // damage status by pushing the damage status from active tree property
   // trees to pending tree property trees or by moving it onto the layers.
@@ -405,6 +428,7 @@
 }
 
 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
+  TRACE_EVENT0("cc", "LayerTreeImpl::PushPropertiesTo");
   // The request queue should have been processed and does not require a push.
   DCHECK_EQ(ui_resource_request_queue_.size(), 0u);
 
@@ -2097,6 +2121,10 @@
   host_impl_->UpdateImageDecodingHints(std::move(decoding_mode_map));
 }
 
+bool LayerTreeImpl::IsActivelyScrolling() const {
+  return host_impl_->IsActivelyScrolling();
+}
+
 void LayerTreeImpl::SetPendingPageScaleAnimation(
     std::unique_ptr<PendingPageScaleAnimation> pending_animation) {
   pending_page_scale_animation_ = std::move(pending_animation);
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 8815683..90091ab 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -141,6 +141,7 @@
   void UpdateImageDecodingHints(
       base::flat_map<PaintImage::Id, PaintImage::DecodingMode>
           decoding_mode_map);
+  bool IsActivelyScrolling() const;
 
   // Tree specific methods exposed to layer-impl tree.
   // ---------------------------------------------------------------------------
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 87efee0..7dadbbe 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -130,14 +130,18 @@
 
 void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree,
                                            LayerTreeImpl* active_tree) {
-  PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(),
-                              active_tree);
+  const auto& layers = pending_tree->LayersThatShouldPushProperties();
+  TRACE_EVENT1("cc", "TreeSynchronizer::PushLayerPropertiesTo.Impl",
+               "layer_count", layers.size());
+  PushLayerPropertiesInternal(layers, active_tree);
 }
 
 void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree,
                                            LayerTreeImpl* impl_tree) {
-  PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(),
-                              impl_tree);
+  const auto& layers = host_tree->LayersThatShouldPushProperties();
+  TRACE_EVENT1("cc", "TreeSynchronizer::PushLayerPropertiesTo.Main",
+               "layer_count", layers.size());
+  PushLayerPropertiesInternal(layers, impl_tree);
 }
 
 }  // namespace cc
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 207ea16f..66fb710b 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -343,6 +343,7 @@
     "//chrome/browser/android/shortcut_info.h",
     "//chrome/browser/android/tab_android.h",
     "//chrome/browser/android/webapk/webapk_install_service.h",
+    "//chrome/browser/android/webapk/webapk_installer.h",
     "//chrome/browser/android/webapk/webapk_types.h",
     "//chrome/browser/banners/app_banner_settings_helper.h",
     "//chrome/browser/notifications/notification_channels_provider_android.h",
@@ -1080,9 +1081,11 @@
   android_manifest_dep = ":monochrome_public_android_manifest"
   apk_name = "MonochromePublic"
 
-  # Resource whitelist used when generating R.java files and causes
-  # only the webview subset of resources to be marked as non-final.
-  shared_resources_whitelist_target = "//android_webview:system_webview_apk"
+  if (public_android_sdk) {
+    # Resource whitelist used when generating R.java files and causes
+    # only the webview subset of resources to be marked as non-final.
+    shared_resources_whitelist_target = "//android_webview:system_webview_apk"
+  }
 
   deps = [
     ":monochrome_java",
diff --git a/chrome/android/java/res/layout/data_reduction_main_menu_item.xml b/chrome/android/java/res/layout/data_reduction_main_menu_item.xml
index fe546c2..a298cef 100644
--- a/chrome/android/java/res/layout/data_reduction_main_menu_item.xml
+++ b/chrome/android/java/res/layout/data_reduction_main_menu_item.xml
@@ -25,7 +25,7 @@
 
         <ImageView
             android:id="@+id/chart_icon"
-            android:src="@+drawable/data_reduction_main_menu_icon"
+            android:src="@drawable/data_reduction_main_menu_icon"
             android:layout_width="@dimen/data_reduction_main_menu_icon_width"
             android:layout_height="match_parent"
             android:layout_gravity="start|center_vertical"
diff --git a/chrome/android/java/res/layout/signin_and_sync_view.xml b/chrome/android/java/res/layout/sync_promo_view.xml
similarity index 76%
rename from chrome/android/java/res/layout/signin_and_sync_view.xml
rename to chrome/android/java/res/layout/sync_promo_view.xml
index 29dced95..f4cb9ff 100644
--- a/chrome/android/java/res/layout/signin_and_sync_view.xml
+++ b/chrome/android/java/res/layout/sync_promo_view.xml
@@ -2,13 +2,13 @@
 <!-- Copyright 2016 The Chromium Authors. All rights reserved.
      Use of this source code is governed by a BSD-style license that can be
      found in the LICENSE file. -->
-<org.chromium.chrome.browser.signin.SigninAndSyncView
+<org.chromium.chrome.browser.signin.SyncPromoView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:chrome="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:padding="@dimen/signin_and_sync_view_padding"
+    android:padding="@dimen/sync_promo_view_padding"
     android:layout_marginStart="@dimen/list_item_default_margin"
     android:layout_marginEnd="@dimen/list_item_default_margin"
     android:background="@drawable/content_card_modern_background">
@@ -35,16 +35,6 @@
         android:gravity="center_vertical"
         android:orientation="horizontal" >
 
-        <Button
-            android:id="@+id/no_thanks"
-            style="@style/ButtonCompatBorderless"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/no_thanks"
-            android:textAllCaps="true"
-            android:textColor="@color/light_active_color"
-            android:textSize="15sp" />
-
         <org.chromium.ui.widget.ButtonCompat
             android:id="@+id/sign_in"
             android:layout_width="wrap_content"
@@ -55,4 +45,4 @@
             chrome:buttonColor="@color/light_active_color" />
     </LinearLayout>
 
-</org.chromium.chrome.browser.signin.SigninAndSyncView>
+</org.chromium.chrome.browser.signin.SyncPromoView>
diff --git a/chrome/android/java/res/values/colors.xml b/chrome/android/java/res/values/colors.xml
index de3d4e18..f0dcd48 100644
--- a/chrome/android/java/res/values/colors.xml
+++ b/chrome/android/java/res/values/colors.xml
@@ -88,6 +88,7 @@
 
     <!-- Preferences Colors -->
     <color name="pref_accent_color">@color/light_active_color</color>
+    <color name="pref_dragged_row_background">@color/white_alpha_90</color>
 
     <!-- Data Saver Colors -->
     <color name="data_reduction_compressed_color">@color/pref_accent_color</color>
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
index d14dec5..46f34d4 100644
--- a/chrome/android/java/res/values/dimens.xml
+++ b/chrome/android/java/res/values/dimens.xml
@@ -462,6 +462,7 @@
     <dimen name="pref_languages_padding">16dp</dimen>
     <dimen name="pref_languages_add_button_padding">24dp</dimen>
     <dimen name="pref_languages_item_popup_width">260dp</dimen>
+    <dimen name="pref_languages_item_dragged_elevation">6dp</dimen>
 
     <!-- Dialog dimensions.
          https://www.google.com/design/spec/components/dialogs.html#dialogs-simple-dialogs -->
@@ -519,7 +520,7 @@
     <dimen name="action_bar_shadow_height">10dp</dimen>
     <dimen name="card_corner_radius">2dp</dimen>
     <dimen name="clear_text_button_end_padding">8dp</dimen>
-    <dimen name="signin_and_sync_view_padding">16dp</dimen>
+    <dimen name="sync_promo_view_padding">16dp</dimen>
     <dimen name="sad_tab_bullet_gap">12dp</dimen>
     <dimen name="sad_tab_bullet_leading_offset">1dp</dimen>
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
index 53529a8c..d306fb8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
@@ -34,14 +34,13 @@
      * Specifies the view types that the bookmark manager screen can contain.
      */
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef({ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.GENERIC_SIGNIN_PROMO, ViewType.SYNC_PROMO,
-            ViewType.FOLDER, ViewType.BOOKMARK})
+    @IntDef({ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER,
+            ViewType.BOOKMARK})
     private @interface ViewType {
         int PERSONALIZED_SIGNIN_PROMO = 0;
-        int GENERIC_SIGNIN_PROMO = 1;
-        int SYNC_PROMO = 2;
-        int FOLDER = 3;
-        int BOOKMARK = 4;
+        int SYNC_PROMO = 1;
+        int FOLDER = 2;
+        int BOOKMARK = 3;
     }
 
     private static final int MAXIMUM_NUMBER_OF_SEARCH_RESULTS = 500;
@@ -213,8 +212,6 @@
         switch (viewType) {
             case ViewType.PERSONALIZED_SIGNIN_PROMO:
                 return mPromoHeaderManager.createPersonalizedSigninPromoHolder(parent);
-            case ViewType.GENERIC_SIGNIN_PROMO:
-                return mPromoHeaderManager.createGenericSigninPromoHolder(parent);
             case ViewType.SYNC_PROMO:
                 return mPromoHeaderManager.createSyncPromoHolder(parent);
             case ViewType.FOLDER:
@@ -240,7 +237,6 @@
                 PersonalizedSigninPromoView view = (PersonalizedSigninPromoView) holder.itemView;
                 mPromoHeaderManager.setupPersonalizedSigninPromo(view);
                 break;
-            case ViewType.GENERIC_SIGNIN_PROMO:
             case ViewType.SYNC_PROMO:
                 break;
             case ViewType.FOLDER:
@@ -377,9 +373,6 @@
             case BookmarkPromoHeader.PromoState.PROMO_SIGNIN_PERSONALIZED:
                 mPromoHeaderSection.add(ViewType.PERSONALIZED_SIGNIN_PROMO);
                 return;
-            case BookmarkPromoHeader.PromoState.PROMO_SIGNIN_GENERIC:
-                mPromoHeaderSection.add(ViewType.GENERIC_SIGNIN_PROMO);
-                return;
             case BookmarkPromoHeader.PromoState.PROMO_SYNC:
                 mPromoHeaderSection.add(ViewType.SYNC_PROMO);
                 return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
index 6cb27b6..79cb854 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
@@ -17,16 +17,15 @@
 
 import org.chromium.base.ContextUtils;
 import org.chromium.base.VisibleForTesting;
-import org.chromium.base.metrics.RecordUserAction;
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.signin.DisplayableProfileData;
 import org.chromium.chrome.browser.signin.PersonalizedSigninPromoView;
 import org.chromium.chrome.browser.signin.ProfileDataCache;
 import org.chromium.chrome.browser.signin.SigninAccessPoint;
-import org.chromium.chrome.browser.signin.SigninAndSyncView;
 import org.chromium.chrome.browser.signin.SigninManager;
 import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
 import org.chromium.chrome.browser.signin.SigninPromoController;
+import org.chromium.chrome.browser.signin.SyncPromoView;
 import org.chromium.components.signin.AccountManagerFacade;
 import org.chromium.components.signin.AccountsChangeObserver;
 import org.chromium.components.signin.ChromeSigninController;
@@ -47,21 +46,17 @@
      * Specifies the various states in which the Bookmarks promo can be.
      */
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef({PromoState.PROMO_NONE, PromoState.PROMO_SIGNIN_PERSONALIZED,
-            PromoState.PROMO_SIGNIN_GENERIC, PromoState.PROMO_SYNC})
+    @IntDef({PromoState.PROMO_NONE, PromoState.PROMO_SIGNIN_PERSONALIZED, PromoState.PROMO_SYNC})
     @interface PromoState {
         int PROMO_NONE = 0;
         int PROMO_SIGNIN_PERSONALIZED = 1;
-        int PROMO_SIGNIN_GENERIC = 2;
-        int PROMO_SYNC = 3;
+        int PROMO_SYNC = 2;
     }
 
     // Personalized signin promo preference.
     private static final String PREF_PERSONALIZED_SIGNIN_PROMO_DECLINED =
             "signin_promo_bookmarks_declined";
     // Generic signin and sync promo preferences.
-    private static final String PREF_GENERIC_SIGNIN_PROMO_DECLINED =
-            "enhanced_bookmark_signin_promo_declined";
     private static final String PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT =
             "enhanced_bookmark_signin_promo_show_count";
     // TODO(kkimlabs): Figure out the optimal number based on UMA data.
@@ -87,9 +82,8 @@
 
         AndroidSyncSettings.registerObserver(mContext, this);
 
-        if (SigninPromoController.arePersonalizedPromosEnabled()
-                && SigninPromoController.hasNotReachedImpressionLimit(
-                           SigninAccessPoint.BOOKMARK_MANAGER)) {
+        if (SigninPromoController.hasNotReachedImpressionLimit(
+                    SigninAccessPoint.BOOKMARK_MANAGER)) {
             int imageSize =
                     mContext.getResources().getDimensionPixelSize(R.dimen.user_picture_size);
             mProfileDataCache = new ProfileDataCache(mContext, imageSize);
@@ -105,17 +99,13 @@
         mSignInManager.addSignInStateObserver(this);
 
         mPromoState = calculatePromoState();
-        if (mPromoState == PromoState.PROMO_SIGNIN_GENERIC
-                || mPromoState == PromoState.PROMO_SYNC) {
+        if (mPromoState == PromoState.PROMO_SYNC) {
             int promoShowCount = ContextUtils.getAppSharedPreferences().getInt(
                     PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT, 0);
             ContextUtils.getAppSharedPreferences()
                     .edit()
                     .putInt(PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT, promoShowCount + 1)
                     .apply();
-            if (mPromoState == PromoState.PROMO_SIGNIN_GENERIC) {
-                RecordUserAction.record("Signin_Impression_FromBookmarkManager");
-            }
         }
     }
 
@@ -155,24 +145,11 @@
     }
 
     /**
-     * TODO(crbug.com/737743): Remove this after rolling out personalized promos.
-     * @return Generic signin promo header {@link ViewHolder} instance that can be used with
-     *         {@link RecyclerView}.
-     */
-    ViewHolder createGenericSigninPromoHolder(ViewGroup parent) {
-        // The generic signin promo and the sync promo use the same view.
-        return createSyncPromoHolder(parent);
-    }
-
-    /**
      * @return Sync promo header {@link ViewHolder} instance that can be used with
      *         {@link RecyclerView}.
      */
     ViewHolder createSyncPromoHolder(ViewGroup parent) {
-        SigninAndSyncView.Listener listener = this::setGenericSigninPromoDeclined;
-
-        SigninAndSyncView view =
-                SigninAndSyncView.create(parent, listener, SigninAccessPoint.BOOKMARK_MANAGER);
+        SyncPromoView view = SyncPromoView.create(parent, SigninAccessPoint.BOOKMARK_MANAGER);
 
         // ViewHolder is abstract and it cannot be instantiated directly.
         return new ViewHolder(view) {};
@@ -214,19 +191,6 @@
     }
 
     /**
-     * Saves that the generic signin promo was declined and updates the UI.
-     * TODO(crbug.com/737743): Remove this after rolling out personalized promos.
-     */
-    private void setGenericSigninPromoDeclined() {
-        SharedPreferences.Editor sharedPreferencesEditor =
-                ContextUtils.getAppSharedPreferences().edit();
-        sharedPreferencesEditor.putBoolean(PREF_GENERIC_SIGNIN_PROMO_DECLINED, true);
-        sharedPreferencesEditor.apply();
-        mPromoState = calculatePromoState();
-        mPromoHeaderChangeAction.run();
-    }
-
-    /**
      * @return Whether the user declined the personalized signin promo.
      */
     private boolean wasPersonalizedSigninPromoDeclined() {
@@ -234,15 +198,6 @@
                 PREF_PERSONALIZED_SIGNIN_PROMO_DECLINED, false);
     }
 
-    /**
-     * TODO(crbug.com/737743): Remove this after rolling out personalized promos.
-     * @return Whether user tapped "No" button on the generic signin promo.
-     */
-    private boolean wasGenericSigninPromoDeclined() {
-        return ContextUtils.getAppSharedPreferences().getBoolean(
-                PREF_GENERIC_SIGNIN_PROMO_DECLINED, false);
-    }
-
     private @PromoState int calculatePromoState() {
         if (sPromoStateForTests != null) {
             return sPromoStateForTests;
@@ -252,36 +207,21 @@
             return PromoState.PROMO_NONE;
         }
 
-        // If the user is signed in, then we should show the sync promo if Chrome sync is disabled
-        // and the impression limit has not been reached yet.
-        if (ChromeSigninController.get().isSignedIn()) {
-            boolean impressionLimitNotReached = ContextUtils.getAppSharedPreferences().getInt(
-                                                        PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT, 0)
-                    < MAX_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT;
-            if (!AndroidSyncSettings.isChromeSyncEnabled(mContext) && impressionLimitNotReached) {
-                return PromoState.PROMO_SYNC;
+        if (!ChromeSigninController.get().isSignedIn()) {
+            boolean impressionLimitReached = !SigninPromoController.hasNotReachedImpressionLimit(
+                    SigninAccessPoint.BOOKMARK_MANAGER);
+            if (!mSignInManager.isSignInAllowed() || impressionLimitReached
+                    || wasPersonalizedSigninPromoDeclined()) {
+                return PromoState.PROMO_NONE;
             }
-            return PromoState.PROMO_NONE;
+            return PromoState.PROMO_SIGNIN_PERSONALIZED;
         }
 
-        if (!mSignInManager.isSignInAllowed()) {
-            return PromoState.PROMO_NONE;
-        }
-
-        if (SigninPromoController.arePersonalizedPromosEnabled()) {
-            if (SigninPromoController.hasNotReachedImpressionLimit(
-                        SigninAccessPoint.BOOKMARK_MANAGER)
-                    && !wasPersonalizedSigninPromoDeclined()) {
-                return PromoState.PROMO_SIGNIN_PERSONALIZED;
-            }
-            return PromoState.PROMO_NONE;
-        }
-
-        int numImpressions = ContextUtils.getAppSharedPreferences().getInt(
-                PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT, 0);
-        boolean impressionLimitNotReached = numImpressions < MAX_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT;
-        if (impressionLimitNotReached && !wasGenericSigninPromoDeclined()) {
-            return PromoState.PROMO_SIGNIN_GENERIC;
+        boolean impressionLimitNotReached = ContextUtils.getAppSharedPreferences().getInt(
+                                                    PREF_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT, 0)
+                < MAX_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT;
+        if (!AndroidSyncSettings.isChromeSyncEnabled(mContext) && impressionLimitNotReached) {
+            return PromoState.PROMO_SYNC;
         }
         return PromoState.PROMO_NONE;
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 43b556f..3a35dff2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -203,8 +203,8 @@
             args.putLong(PageLoadMetrics.CONNECT_START, connectStartMs);
             args.putLong(PageLoadMetrics.CONNECT_END, connectEndMs);
             args.putLong(PageLoadMetrics.REQUEST_START, requestStartMs);
-            args.putLong(PageLoadMetrics.RESPONSE_START, sendStartMs);
-            args.putLong(PageLoadMetrics.RESPONSE_END, sendEndMs);
+            args.putLong(PageLoadMetrics.SEND_START, sendStartMs);
+            args.putLong(PageLoadMetrics.SEND_END, sendEndMs);
             mConnection.notifyPageLoadMetrics(mSession, args);
         }
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
index 462ea36e..1fa96e9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
@@ -738,15 +738,16 @@
 
     @Override
     public void onItemsAvailable() {
-        List<OfflineItem> offlineItems = getOfflineContentProvider().getAllItems();
-        for (OfflineItem item : offlineItems) {
-            if (item.isTransient) continue;
-            DownloadHistoryItemWrapper wrapper = createDownloadHistoryItemWrapper(item);
-            addDownloadHistoryItemWrapper(wrapper);
-        }
+        getOfflineContentProvider().getAllItems(offlineItems -> {
+            for (OfflineItem item : offlineItems) {
+                if (item.isTransient) continue;
+                DownloadHistoryItemWrapper wrapper = createDownloadHistoryItemWrapper(item);
+                addDownloadHistoryItemWrapper(wrapper);
+            }
 
-        recordOfflineItemCountHistograms();
-        onItemsRetrieved(LoadingStateDelegate.OFFLINE_ITEMS);
+            recordOfflineItemCountHistograms();
+            onItemsRetrieved(LoadingStateDelegate.OFFLINE_ITEMS);
+        });
     }
 
     private void recordOfflineItemCountHistograms() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
index 685e5c2..f46c487 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
@@ -11,7 +11,6 @@
 import android.os.Bundle;
 
 import org.chromium.base.Log;
-import org.chromium.chrome.browser.LaunchIntentDispatcher;
 import org.chromium.chrome.browser.customtabs.CustomTabsConnection;
 import org.chromium.chrome.browser.init.AsyncInitializationActivity;
 import org.chromium.chrome.browser.metrics.UmaUtils;
@@ -25,6 +24,8 @@
     // Incoming parameters:
     public static final String EXTRA_COMING_FROM_CHROME_ICON = "Extra.ComingFromChromeIcon";
     public static final String EXTRA_CHROME_LAUNCH_INTENT = "Extra.FreChromeLaunchIntent";
+    public static final String EXTRA_CHROME_LAUNCH_INTENT_IS_CCT =
+            "Extra.FreChromeLaunchIntentIsCct";
 
     static final String SHOW_WELCOME_PAGE = "ShowWelcome";
     static final String SHOW_DATA_REDUCTION_PAGE = "ShowDataReduction";
@@ -89,25 +90,33 @@
     protected final boolean sendPendingIntentIfNecessary(final boolean complete) {
         PendingIntent pendingIntent =
                 IntentUtils.safeGetParcelableExtra(getIntent(), EXTRA_CHROME_LAUNCH_INTENT);
+        boolean pendingIntentIsCCT = IntentUtils.safeGetBooleanExtra(
+                getIntent(), EXTRA_CHROME_LAUNCH_INTENT_IS_CCT, false);
         if (pendingIntent == null) return false;
 
+        // Calling pending intent to report failure can result in UI flicker (crbug.com/788153).
+        // Avoid doing that unless the intent is for custom tabs, in which case we don't have a
+        // choice because we need to call "first run" CCT callback with the intent.
+        if (!complete && !pendingIntentIsCCT) return false;
+
         Intent extraDataIntent = new Intent();
         extraDataIntent.putExtra(EXTRA_FIRST_RUN_ACTIVITY_RESULT, true);
         extraDataIntent.putExtra(EXTRA_FIRST_RUN_COMPLETE, complete);
 
         try {
-            // After the PendingIntent has been sent, send a first run callback to custom tabs if
-            // necessary.
-            PendingIntent.OnFinished onFinished = new PendingIntent.OnFinished() {
-                @Override
-                public void onSendFinished(PendingIntent pendingIntent, Intent intent,
-                        int resultCode, String resultData, Bundle resultExtras) {
-                    if (LaunchIntentDispatcher.isCustomTabIntent(intent)) {
+            PendingIntent.OnFinished onFinished = null;
+            if (pendingIntentIsCCT) {
+                // After the PendingIntent has been sent, send a first run callback to custom tabs
+                // if necessary.
+                onFinished = new PendingIntent.OnFinished() {
+                    @Override
+                    public void onSendFinished(PendingIntent pendingIntent, Intent intent,
+                            int resultCode, String resultData, Bundle resultExtras) {
                         CustomTabsConnection.getInstance().sendFirstRunCallbackIfNecessary(
                                 intent, complete);
                     }
-                }
-            };
+                };
+            }
 
             // Use the PendingIntent to send the intent that originally launched Chrome. The intent
             // will go back to the ChromeLauncherActivity, which will route it accordingly.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
index de6a0f8e..a286024 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
@@ -20,6 +20,7 @@
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.ChromeSwitches;
+import org.chromium.chrome.browser.LaunchIntentDispatcher;
 import org.chromium.chrome.browser.locale.LocaleManager;
 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
@@ -311,6 +312,8 @@
                     caller, FIRST_RUN_EXPERIENCE_REQUEST_CODE, fromIntent, pendingIntentFlags);
         }
         firstRunIntent.putExtra(FirstRunActivity.EXTRA_CHROME_LAUNCH_INTENT, pendingIntent);
+        firstRunIntent.putExtra(FirstRunActivity.EXTRA_CHROME_LAUNCH_INTENT_IS_CCT,
+                LaunchIntentDispatcher.isCustomTabIntent(fromIntent));
     }
 
     /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java
index 04093433..845e6e4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java
@@ -24,8 +24,8 @@
     public static final String CONNECT_START = "connectStart";
     public static final String CONNECT_END = "connectEnd";
     public static final String REQUEST_START = "requestStart";
-    public static final String RESPONSE_START = "responseStart";
-    public static final String RESPONSE_END = "responseEnd";
+    public static final String SEND_START = "sendStart";
+    public static final String SEND_END = "sendEnd";
     public static final String EFFECTIVE_CONNECTION_TYPE = "effectiveConnectionType";
     public static final String HTTP_RTT = "httpRtt";
     public static final String TRANSPORT_RTT = "transportRtt";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/StartupPageLoadMetricsObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/StartupPageLoadMetricsObserver.java
new file mode 100644
index 0000000..4836ca4
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/StartupPageLoadMetricsObserver.java
@@ -0,0 +1,46 @@
+// 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.
+
+package org.chromium.chrome.browser.metrics;
+
+import org.chromium.content_public.browser.WebContents;
+
+/**
+ * Page load metrics observer for the first navigation after the application start.
+ */
+public class StartupPageLoadMetricsObserver implements PageLoadMetrics.Observer {
+    private final static long NO_NAVIGATION_ID = -1;
+
+    private long mNavigationId = NO_NAVIGATION_ID;
+    private boolean mShouldRecordHistograms;
+
+    @Override
+    public void onNewNavigation(WebContents webContents, long navigationId) {
+        if (mNavigationId != NO_NAVIGATION_ID) return;
+
+        mNavigationId = navigationId;
+        mShouldRecordHistograms = UmaUtils.isRunningApplicationStart();
+    }
+
+    @Override
+    public void onNetworkQualityEstimate(WebContents webContents, long navigationId,
+            int effectiveConnectionType, long httpRttMs, long transportRttMs) {}
+
+    @Override
+    public void onFirstContentfulPaint(WebContents webContents, long navigationId,
+            long navigationStartTick, long firstContentfulPaintMs) {
+        if (navigationId != mNavigationId || !mShouldRecordHistograms) return;
+
+        UmaUtils.recordFirstContentfulPaint(navigationStartTick / 1000 + firstContentfulPaintMs);
+    }
+
+    @Override
+    public void onLoadEventStart(WebContents webContents, long navigationId,
+            long navigationStartTick, long loadEventStartMs) {}
+
+    @Override
+    public void onLoadedMainResource(WebContents webContents, long navigationId, long dnsStartMs,
+            long dnsEndMs, long connectStartMs, long connectEndMs, long requestStartMs,
+            long sendStartMs, long sendEndMs) {}
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
index f90a361e..bed12cbb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
@@ -18,11 +18,14 @@
 @JNINamespace("chrome::android")
 public class UmaUtils {
     private static long sApplicationStartWallClockMs;
-
     private static boolean sRunningApplicationStart;
+
+    // All these values originate from SystemClock.uptimeMillis().
     private static long sApplicationStartTimeMs;
     private static long sForegroundStartTimeMs;
     private static long sBackgroundTimeMs;
+
+    // Event duration recorded from the |sApplicationStartTimeMs|.
     private static long sFirstCommitTimeMs;
 
     /**
@@ -58,19 +61,34 @@
     }
 
     /**
-     * Record the time after a navigation is finished.
+     * Registers the fact that a navigation has finished. Based on this fact, may discard recording
+     * histograms later.
      */
-    public static void recordFinishNavigation(boolean isTrackedPage) {
-        boolean shouldRecordHistogram =
-                isTrackedPage && sRunningApplicationStart && sFirstCommitTimeMs == 0;
-        if (shouldRecordHistogram) {
+    public static void registerFinishNavigation(boolean isTrackedPage) {
+        if (!isRunningApplicationStart()) return;
+
+        if (isTrackedPage) {
             sFirstCommitTimeMs = SystemClock.uptimeMillis() - sApplicationStartTimeMs;
-            // Uses the same buckets as UMA_HISTOGRAM_LONG_TIMES_100
-            RecordHistogram.recordCustomTimesHistogram(
+            RecordHistogram.recordLongTimesHistogram100(
                     "Startup.Android.Experimental.Cold.TimeToFirstNavigationCommit",
-                    sFirstCommitTimeMs, 1, TimeUnit.HOURS.toMillis(1), TimeUnit.MILLISECONDS, 100);
+                    sFirstCommitTimeMs, TimeUnit.MILLISECONDS);
         }
-        sRunningApplicationStart = false;
+        setRunningApplicationStart(false);
+    }
+
+    /**
+     * Record the First Contentful Paint time.
+     *
+     * @param firstContentfulPaintMs timestamp in uptime millis.
+     */
+    public static void recordFirstContentfulPaint(long firstContentfulPaintMs) {
+        // First commit time histogram should be recorded before this one. We should discard a
+        // record if the first commit time wasn't recorded.
+        if (sFirstCommitTimeMs == 0) return;
+
+        RecordHistogram.recordLongTimesHistogram100(
+                "Startup.Android.Experimental.Cold.TimeToFirstContentfulPaint",
+                firstContentfulPaintMs - sApplicationStartTimeMs, TimeUnit.MILLISECONDS);
     }
 
     /**
@@ -81,6 +99,15 @@
     }
 
     /**
+     * Whether the application is in the early stage since the browser process start. Currently, the
+     * very first finished navigation in the lifetime of the process ends the "application start".
+     * Must only be called on the UI thread.
+     */
+    public static boolean isRunningApplicationStart() {
+        return sRunningApplicationStart;
+    }
+
+    /**
      * Marks/unmarks the "application start" stage of the browser process lifetime.
      * Must only be called on the UI thread.
      */
@@ -110,10 +137,6 @@
         return sApplicationStartWallClockMs;
     }
 
-    public static long getApplicationStartTimeMs() {
-        return sApplicationStartTimeMs;
-    }
-
     public static long getForegroundStartTime() {
         assert sForegroundStartTimeMs != 0;
         return sForegroundStartTimeMs;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java
index f6b32ce..8844a52a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java
@@ -244,8 +244,7 @@
             @Override
             protected Void doInBackground(Void... params) {
                 mAvailableSpaceInByte = getAvailableSpaceAboveLowSpaceLimit();
-                mCacheSizeInByte =
-                        getDirectorySizeInByte(ContextUtils.getApplicationContext().getCacheDir());
+                mCacheSizeInByte = getCacheDirSize();
                 return null;
             }
 
@@ -310,8 +309,12 @@
         return sizeInByte;
     }
 
+    /**
+     * @return The available space that can be used to install WebAPK. Negative value means there is
+     * less free space available than the system's minimum by the given amount.
+     */
     @SuppressWarnings("deprecation")
-    private static long getAvailableSpaceAboveLowSpaceLimit() {
+    public static long getAvailableSpaceAboveLowSpaceLimit() {
         long partitionAvailableBytes;
         long partitionTotalBytes;
         StatFs partitionStats = new StatFs(Environment.getDataDirectory().getAbsolutePath());
@@ -330,6 +333,13 @@
     }
 
     /**
+     * @return Size of the cache directory.
+     */
+    public static long getCacheDirSize() {
+        return getDirectorySizeInByte(ContextUtils.getApplicationContext().getCacheDir());
+    }
+
+    /**
      * Mirror the system-derived calculation of reserved bytes and return that value.
      */
     private static long getLowSpaceLimitBytes(long partitionTotalBytes) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java
index d9332dd..5f03f537 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java
@@ -57,13 +57,11 @@
         void onUpdated();
     }
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef({PromoState.PROMO_NONE, PromoState.PROMO_SIGNIN_PERSONALIZED,
-            PromoState.PROMO_SIGNIN_GENERIC, PromoState.PROMO_SYNC})
+    @IntDef({PromoState.PROMO_NONE, PromoState.PROMO_SIGNIN_PERSONALIZED, PromoState.PROMO_SYNC})
     @interface PromoState {
         int PROMO_NONE = 0;
         int PROMO_SIGNIN_PERSONALIZED = 1;
-        int PROMO_SIGNIN_GENERIC = 2;
-        int PROMO_SYNC = 3;
+        int PROMO_SYNC = 2;
     }
 
     private static final int RECENTLY_CLOSED_MAX_TAB_COUNT = 5;
@@ -359,23 +357,19 @@
      */
     @PromoState
     int getPromoType() {
-        if (ChromeSigninController.get().isSignedIn()) {
-            if (AndroidSyncSettings.isSyncEnabled(mContext)
-                    && AndroidSyncSettings.isChromeSyncEnabled(mContext)
-                    && !mForeignSessions.isEmpty()) {
+        if (!ChromeSigninController.get().isSignedIn()) {
+            if (!SigninManager.get(mContext).isSignInAllowed()) {
                 return PromoState.PROMO_NONE;
             }
-            return PromoState.PROMO_SYNC;
-        }
-
-        if (!SigninManager.get(mContext).isSignInAllowed()) {
-            return PromoState.PROMO_NONE;
-        }
-
-        if (SigninPromoController.arePersonalizedPromosEnabled()) {
             return PromoState.PROMO_SIGNIN_PERSONALIZED;
         }
-        return PromoState.PROMO_SIGNIN_GENERIC;
+
+        if (AndroidSyncSettings.isSyncEnabled(mContext)
+                && AndroidSyncSettings.isChromeSyncEnabled(mContext)
+                && !mForeignSessions.isEmpty()) {
+            return PromoState.PROMO_NONE;
+        }
+        return PromoState.PROMO_SYNC;
     }
 
     void recordRecentTabMetrics() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java
index b70b10b1..4419d6e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java
@@ -21,7 +21,6 @@
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.base.metrics.RecordHistogram;
-import org.chromium.base.metrics.RecordUserAction;
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.favicon.FaviconHelper.FaviconImageCallback;
 import org.chromium.chrome.browser.ntp.ForeignSessionHelper.ForeignSession;
@@ -29,8 +28,7 @@
 import org.chromium.chrome.browser.ntp.ForeignSessionHelper.ForeignSessionWindow;
 import org.chromium.chrome.browser.signin.PersonalizedSigninPromoView;
 import org.chromium.chrome.browser.signin.SigninAccessPoint;
-import org.chromium.chrome.browser.signin.SigninAndSyncView;
-import org.chromium.components.signin.ChromeSigninController;
+import org.chromium.chrome.browser.signin.SyncPromoView;
 import org.chromium.ui.base.DeviceFormFactor;
 import org.chromium.ui.mojom.WindowOpenDisposition;
 
@@ -48,7 +46,6 @@
         NONE,
         DEFAULT_CONTENT,
         PERSONALIZED_SIGNIN_PROMO,
-        GENERIC_SIGNIN_PROMO,
         SYNC_PROMO
     }
 
@@ -393,29 +390,6 @@
     }
 
     /**
-     * A group containing the generic signin promo.
-     * TODO(crbug.com/737743): Remove this after rolling out personalized promos.
-     */
-    class GenericSigninPromoGroup extends PromoGroup {
-        @Override
-        public ChildType getChildType() {
-            return ChildType.GENERIC_SIGNIN_PROMO;
-        }
-
-        @Override
-        View getChildView(
-                int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
-            if (convertView == null) {
-                convertView = SigninAndSyncView.create(parent, null, SigninAccessPoint.RECENT_TABS);
-            }
-            if (!ChromeSigninController.get().isSignedIn()) {
-                RecordUserAction.record("Signin_Impression_FromRecentTabs");
-            }
-            return convertView;
-        }
-    }
-
-    /**
      * A group containing the sync promo.
      */
     class SyncPromoGroup extends PromoGroup {
@@ -428,7 +402,7 @@
         View getChildView(
                 int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
             if (convertView == null) {
-                convertView = SigninAndSyncView.create(parent, null, SigninAccessPoint.RECENT_TABS);
+                convertView = SyncPromoView.create(parent, SigninAccessPoint.RECENT_TABS);
             }
             return convertView;
         }
@@ -795,9 +769,6 @@
             case RecentTabsManager.PromoState.PROMO_SIGNIN_PERSONALIZED:
                 addGroup(new PersonalizedSigninPromoGroup());
                 break;
-            case RecentTabsManager.PromoState.PROMO_SIGNIN_GENERIC:
-                addGroup(new GenericSigninPromoGroup());
-                break;
             case RecentTabsManager.PromoState.PROMO_SYNC:
                 addGroup(new SyncPromoGroup());
                 break;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index bf7b065..2c6ed38 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -948,6 +948,16 @@
         nativeUpdateUserAcceptLanguages(languageCode, add);
     }
 
+    /**
+     * Move a language to the given postion of the user's accept language.
+     *
+     * @param languageCode A valid language code to set.
+     * @param offset The offset from the original position of the language.
+     */
+    public void moveAcceptLanguage(String languageCode, int offset) {
+        nativeMoveAcceptLanguage(languageCode, offset);
+    }
+
     private native boolean nativeIsContentSettingEnabled(int contentSettingType);
     private native boolean nativeIsContentSettingManaged(int contentSettingType);
     private native void nativeSetContentSettingEnabled(int contentSettingType, boolean allow);
@@ -1135,6 +1145,7 @@
     private native void nativeGetChromeAcceptLanguages(List<LanguageItem> list);
     private native void nativeGetUserAcceptLanguages(List<String> list);
     private native void nativeUpdateUserAcceptLanguages(String language, boolean add);
+    private native void nativeMoveAcceptLanguage(String language, int offset);
     private native String nativeGetDownloadDefaultDirectory();
     private native void nativeSetDownloadDefaultDirectory(String directory);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
index 6eef39db..a4a2ac96 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
@@ -131,8 +131,7 @@
             return;
         }
 
-        if (SigninPromoController.hasNotReachedImpressionLimit(SigninAccessPoint.SETTINGS)
-                && SigninPromoController.arePersonalizedPromosEnabled()) {
+        if (SigninPromoController.hasNotReachedImpressionLimit(SigninAccessPoint.SETTINGS)) {
             setupPersonalizedPromo();
             return;
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java
index affd76de..b38a595b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java
@@ -6,6 +6,7 @@
 
 import android.app.Activity;
 import android.app.Fragment;
+import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v7.widget.DividerItemDecoration;
@@ -44,9 +45,14 @@
     }
 
     private class LanguageSearchListAdapter extends LanguageListBaseAdapter {
+        LanguageSearchListAdapter(Context context) {
+            super(context);
+        }
+
         @Override
         public void onBindViewHolder(LanguageRowViewHolder holder, int position) {
-            holder.bindView(getItemByPosition(position), mItemClickListener, null, 0);
+            super.onBindViewHolder(holder, position);
+            holder.setItemClickListener(getItemByPosition(position), mItemClickListener);
         }
 
         /**
@@ -107,16 +113,13 @@
                 new DividerItemDecoration(activity, layoutMangager.getOrientation()));
 
         mFullLanguageList = LanguagesManager.getInstance().getLanguageItemsExcludingUserAccept();
-        mItemClickListener = new LanguageListBaseAdapter.ItemClickListener() {
-            @Override
-            public void onLanguageClicked(LanguageItem item) {
-                Intent intent = new Intent();
-                intent.putExtra(INTENT_NEW_ACCEPT_LANGAUGE, item.getCode());
-                activity.setResult(activity.RESULT_OK, intent);
-                activity.finish();
-            }
+        mItemClickListener = item -> {
+            Intent intent = new Intent();
+            intent.putExtra(INTENT_NEW_ACCEPT_LANGAUGE, item.getCode());
+            activity.setResult(activity.RESULT_OK, intent);
+            activity.finish();
         };
-        mAdapter = new LanguageSearchListAdapter();
+        mAdapter = new LanguageSearchListAdapter(activity);
 
         mRecyclerView.setAdapter(mAdapter);
         mAdapter.reload(mFullLanguageList);
@@ -131,13 +134,10 @@
         mSearchView = (SearchView) menu.findItem(R.id.search).getActionView();
         mSearchView.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN);
 
-        mSearchView.setOnCloseListener(new SearchView.OnCloseListener() {
-            @Override
-            public boolean onClose() {
-                mSearch = "";
-                mAdapter.reload(mFullLanguageList);
-                return false;
-            }
+        mSearchView.setOnCloseListener(() -> {
+            mSearch = "";
+            mAdapter.reload(mFullLanguageList);
+            return false;
         });
 
         mSearchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListBaseAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListBaseAdapter.java
index 0ce7c77e..d48cc4f8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListBaseAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListBaseAdapter.java
@@ -4,19 +4,30 @@
 
 package org.chromium.chrome.browser.preferences.languages;
 
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Color;
 import android.support.annotation.DrawableRes;
+import android.support.annotation.NonNull;
+import android.support.v4.view.ViewCompat;
 import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.RecyclerView.ViewHolder;
+import android.support.v7.widget.helper.ItemTouchHelper;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
 
+import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.chrome.R;
+import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.widget.ListMenuButton;
 import org.chromium.chrome.browser.widget.TintedImageView;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -24,6 +35,8 @@
  */
 public class LanguageListBaseAdapter
         extends RecyclerView.Adapter<LanguageListBaseAdapter.LanguageRowViewHolder> {
+    private static final int ANIMATION_DELAY_MS = 100;
+
     /**
      * Listener used to respond to click event on a langauge item.
      */
@@ -34,19 +47,16 @@
         void onLanguageClicked(LanguageItem item);
     }
 
-    static class LanguageRowViewHolder extends RecyclerView.ViewHolder {
-        private View mRow;
+    static class LanguageRowViewHolder extends ViewHolder {
         private TextView mTitle;
         private TextView mDescription;
 
         private TintedImageView mStartIcon;
         private ListMenuButton mMoreButton;
 
-        private ItemClickListener mItemClickListener;
-
         LanguageRowViewHolder(View view) {
             super(view);
-            mRow = view;
+
             mTitle = (TextView) view.findViewById(R.id.title);
             mDescription = (TextView) view.findViewById(R.id.description);
 
@@ -54,8 +64,13 @@
             mMoreButton = (ListMenuButton) view.findViewById(R.id.more);
         }
 
-        private void setDisplayName(LanguageItem item) {
+        /**
+         * Update the current {@link LanguageRowViewHolder} with basic language info.
+         * @param item A {@link LanguageItem} with the language details.
+         */
+        private void updateLanguageInfo(LanguageItem item) {
             mTitle.setText(item.getDisplayName());
+
             // Avoid duplicate display names.
             if (TextUtils.equals(item.getDisplayName(), item.getNativeDisplayName())) {
                 mDescription.setVisibility(View.GONE);
@@ -63,42 +78,57 @@
                 mDescription.setVisibility(View.VISIBLE);
                 mDescription.setText(item.getNativeDisplayName());
             }
+
+            // The default visibility for the views below is GONE.
+            mStartIcon.setVisibility(View.GONE);
+            mMoreButton.setVisibility(View.GONE);
         }
 
         /**
-         * Binds this {@link LanguageRowViewHolder} with the given params.
-         * @param item The {@link LanguageItem} with language details.
-         * @param itemClickListener Callback for the click event on this row.
-         * @param menuButtonDelegate A {@link ListMenuButton.Delegate} to set up an optional menu
-         *                           button at the end of this row.
-         * @param startIconId An optional icon at the beginning of this row.
+         * Sets drawable for the icon at the beginning of this row with the given resId.
+         * @param iconResId The identifier of the drawable resource for the icon.
          */
-        void bindView(LanguageItem item, ItemClickListener itemClickListener,
-                ListMenuButton.Delegate menuButtonDelegate, @DrawableRes int startIconId) {
-            setDisplayName(item);
+        void setStartIcon(@DrawableRes int iconResId) {
+            mStartIcon.setVisibility(View.VISIBLE);
+            mStartIcon.setImageResource(iconResId);
+        }
 
-            if (startIconId != 0) {
-                mStartIcon.setImageResource(startIconId);
-            } else {
-                mStartIcon.setVisibility(View.GONE);
-            }
+        /**
+         * Sets up the menu button at the end of this row with a given delegate.
+         * @param delegate A {@link ListMenuButton.Delegate}.
+         */
+        void setMenuButtonDelegate(@NonNull ListMenuButton.Delegate delegate) {
+            mMoreButton.setVisibility(View.VISIBLE);
+            mMoreButton.setDelegate(delegate);
+        }
 
-            if (menuButtonDelegate != null) {
-                mMoreButton.setDelegate(menuButtonDelegate);
-            } else {
-                mMoreButton.setVisibility(View.GONE);
-            }
-
-            if (itemClickListener != null) {
-                mRow.setOnClickListener(view -> itemClickListener.onLanguageClicked(item));
-            }
+        /**
+         * Set the OnClickListener for this row with a given callback.
+         * @param item The {@link LanguageItem} with language details.
+         * @param listener A {@link ItemClickListener} to respond to click event.
+         */
+        void setItemClickListener(LanguageItem item, @NonNull ItemClickListener listener) {
+            itemView.setOnClickListener(view -> listener.onLanguageClicked(item));
         }
     }
 
+    private final int mDraggedBackgroundColor;
+    private final float mDraggedElevation;
+
+    private boolean mDragEnabled;
+    private ItemTouchHelper mItemTouchHelper;
     private List<LanguageItem> mLanguageList;
 
-    LanguageListBaseAdapter() {
+    protected Context mContext;
+
+    LanguageListBaseAdapter(Context context) {
+        mContext = context;
         mLanguageList = new ArrayList<>();
+
+        Resources resource = context.getResources();
+        mDraggedBackgroundColor =
+                ApiCompatibilityUtils.getColor(resource, R.color.pref_dragged_row_background);
+        mDraggedElevation = resource.getDimension(R.dimen.pref_languages_item_dragged_elevation);
     }
 
     @Override
@@ -110,7 +140,16 @@
 
     @Override
     public void onBindViewHolder(LanguageRowViewHolder holder, int position) {
-        holder.bindView(mLanguageList.get(position), null, null, 0);
+        holder.updateLanguageInfo(mLanguageList.get(position));
+        if (mDragEnabled) {
+            assert mItemTouchHelper != null;
+            holder.mStartIcon.setOnTouchListener((v, event) -> {
+                if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
+                    mItemTouchHelper.startDrag(holder);
+                }
+                return false;
+            });
+        }
     }
 
     @Override
@@ -127,4 +166,77 @@
         mLanguageList.addAll(languageList);
         notifyDataSetChanged();
     }
+
+    /**
+     * Enables drag & drop interaction on the given RecyclerView.
+     * @param recyclerView The RecyclerView you want to drag from.
+     */
+    void enableDrag(RecyclerView recyclerView) {
+        mDragEnabled = true;
+
+        ItemTouchHelper.Callback touchHelperCallBack = new ItemTouchHelper.Callback() {
+            @Override
+            public int getMovementFlags(RecyclerView recyclerView, ViewHolder viewHolder) {
+                return makeMovementFlags(
+                        ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0 /* swipe flags */);
+            }
+
+            @Override
+            public boolean onMove(
+                    RecyclerView recyclerView, ViewHolder current, ViewHolder target) {
+                int from = current.getAdapterPosition();
+                int to = target.getAdapterPosition();
+                if (from == to) return false;
+
+                String languageCode = getItemByPosition(from).getCode();
+                Collections.swap(mLanguageList, from, to);
+                PrefServiceBridge.getInstance().moveAcceptLanguage(languageCode, to - from);
+                notifyItemMoved(from, to);
+                return true;
+            }
+
+            @Override
+            public void onSelectedChanged(ViewHolder viewHolder, int actionState) {
+                super.onSelectedChanged(viewHolder, actionState);
+                if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
+                    updateVisualState(true, viewHolder.itemView);
+                }
+            }
+
+            @Override
+            public void clearView(RecyclerView recyclerView, ViewHolder viewHolder) {
+                super.clearView(recyclerView, viewHolder);
+                updateVisualState(false, viewHolder.itemView);
+            }
+
+            @Override
+            public boolean isLongPressDragEnabled() {
+                return true;
+            }
+
+            @Override
+            public boolean isItemViewSwipeEnabled() {
+                return false;
+            }
+
+            @Override
+            public void onSwiped(ViewHolder viewHolder, int direction) {
+                // no-op
+            }
+
+            private void updateVisualState(boolean dragged, View view) {
+                ViewCompat.animate(view)
+                        .translationZ(dragged ? mDraggedElevation : 0)
+                        .withEndAction(
+                                ()
+                                        -> view.setBackgroundColor(dragged ? mDraggedBackgroundColor
+                                                                           : Color.TRANSPARENT))
+                        .setDuration(ANIMATION_DELAY_MS)
+                        .start();
+            }
+        };
+
+        mItemTouchHelper = new ItemTouchHelper(touchHelperCallBack);
+        mItemTouchHelper.attachToRecyclerView(recyclerView);
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListPreference.java
index 32b1abb8..3a2da40 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/languages/LanguageListPreference.java
@@ -16,10 +16,13 @@
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.chrome.R;
+import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.widget.ListMenuButton;
 import org.chromium.chrome.browser.widget.ListMenuButton.Item;
 import org.chromium.chrome.browser.widget.TintedDrawable;
 
+import java.util.ArrayList;
+
 /**
  * A preference that displays the current accept language list.
  */
@@ -27,24 +30,35 @@
     // TODO(crbug/783049): Make the item in the list drag-able.
     private static class LanguageListAdapter
             extends LanguageListBaseAdapter implements LanguagesManager.AcceptLanguageObserver {
-        private Context mContext;
 
         LanguageListAdapter(Context context) {
-            super();
-            mContext = context;
+            super(context);
         }
 
         @Override
         public void onBindViewHolder(
                 LanguageListBaseAdapter.LanguageRowViewHolder holder, int position) {
+            super.onBindViewHolder(holder, position);
+
+            holder.setStartIcon(R.drawable.ic_drag_handle_grey600_24dp);
+
             final LanguageItem info = getItemByPosition(position);
-            holder.bindView(info, null, new ListMenuButton.Delegate() {
+            holder.setMenuButtonDelegate(new ListMenuButton.Delegate() {
                 @Override
                 public Item[] getItems() {
-                    return new Item[] {
-                            new Item(mContext, R.string.languages_item_option_offer_to_translate,
-                                    R.drawable.ic_check_googblue_24dp, info.isSupported()),
-                            new Item(mContext, R.string.remove, getItemCount() > 1)};
+                    ArrayList<Item> menuItems = new ArrayList<>();
+                    // Show "Offer to translate" option if "Chrome Translate" is enabled.
+                    if (PrefServiceBridge.getInstance().isTranslateEnabled()) {
+                        menuItems.add(new Item(mContext,
+                                R.string.languages_item_option_offer_to_translate,
+                                info.isSupported()));
+                    }
+
+                    // Show "Remove" option if there are more than 1 accept language.
+                    if (getItemCount() > 1) {
+                        menuItems.add(new Item(mContext, R.string.remove, true));
+                    }
+                    return menuItems.toArray(new Item[menuItems.size()]);
                 }
 
                 @Override
@@ -55,7 +69,7 @@
                         LanguagesManager.getInstance().removeFromAcceptLanguages(info.getCode());
                     }
                 }
-            }, R.drawable.ic_drag_handle_grey600_24dp);
+            });
         }
 
         @Override
@@ -97,6 +111,10 @@
         mRecyclerView.addItemDecoration(
                 new DividerItemDecoration(getContext(), layoutMangager.getOrientation()));
 
+        // Due to a known native bug (crbug/640763), the list order written into Preference Service
+        // might be different from the order shown after it's adjusted by dragging.
+        mAdapter.enableDrag(mRecyclerView);
+
         return mView;
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
index 344a2edb..384b22c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
@@ -147,6 +147,11 @@
             if (!ChromeFeatureList.isEnabled(ChromeFeatureList.SOUND_CONTENT_SETTING)) {
                 getPreferenceScreen().removePreference(findPreference(SOUND_KEY));
             }
+            // The new Languages Preference *feature* is an advanced version of this translate
+            // preference. Once Languages Preference is enabled, remove this setting.
+            if (ChromeFeatureList.isEnabled(ChromeFeatureList.LANGUAGES_PREFERENCE)) {
+                getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
+            }
         }
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndSyncView.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndSyncView.java
deleted file mode 100644
index b8814f87..0000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndSyncView.java
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.signin;
-
-import android.content.Context;
-import android.content.Intent;
-import android.provider.Settings;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import org.chromium.base.ThreadUtils;
-import org.chromium.chrome.R;
-import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.signin.AccountSigninActivity.AccessPoint;
-import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
-import org.chromium.chrome.browser.sync.ui.SyncCustomizationFragment;
-import org.chromium.components.signin.ChromeSigninController;
-import org.chromium.components.sync.AndroidSyncSettings;
-import org.chromium.components.sync.AndroidSyncSettings.AndroidSyncSettingsObserver;
-
-import javax.annotation.Nullable;
-
-/**
- * A View that shows the user the next step they must complete to start syncing their data (eg.
- * Recent Tabs or Bookmarks). For example, if the user is not signed in, the View will prompt them
- * to do so and link to the AccountSigninActivity.
- * If inflated manually, {@link SigninAndSyncView#init(Listener, int)} must be called before
- * attaching this View to a ViewGroup.
- */
-public class SigninAndSyncView extends LinearLayout
-        implements AndroidSyncSettingsObserver, SignInStateObserver {
-    private @Nullable Listener mListener;
-    private @AccessPoint int mAccessPoint;
-    private boolean mInitialized;
-    private final SigninManager mSigninManager;
-
-    private TextView mTitle;
-    private TextView mDescription;
-    private Button mNegativeButton;
-    private Button mPositiveButton;
-
-    /**
-     * A listener for the container of the SigninAndSyncView to be informed of certain user
-     * interactions.
-     */
-    public interface Listener {
-        /**
-         * The user has pressed 'no thanks' and expects the view to be removed from its parent.
-         */
-        void onViewDismissed();
-    }
-
-    /**
-     * A convenience method to inflate and initialize a SigninAndSyncView.
-     * @param parent A parent used to provide LayoutParams (the SigninAndSyncView will not be
-     *         attached).
-     * @param listener Listener for user interactions. A null listener marks that the promo is not
-     *         dismissible.
-     * @param accessPoint Where the SigninAndSyncView is used.
-     */
-    public static SigninAndSyncView create(
-            ViewGroup parent, @Nullable Listener listener, @AccessPoint int accessPoint) {
-        if (listener == null) {
-            assert accessPoint
-                    == SigninAccessPoint.RECENT_TABS
-                : "The promo should not be dismissible in Recent Tabs!";
-        }
-        SigninAndSyncView signinView = (SigninAndSyncView) LayoutInflater.from(parent.getContext())
-                .inflate(R.layout.signin_and_sync_view, parent, false);
-        signinView.init(listener, accessPoint);
-        return signinView;
-    }
-
-    /**
-     * Constructor for inflating from xml.
-     */
-    public SigninAndSyncView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mSigninManager = SigninManager.get(getContext());
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mTitle = (TextView) findViewById(R.id.title);
-        mDescription = (TextView) findViewById(R.id.description);
-        mNegativeButton = (Button) findViewById(R.id.no_thanks);
-        mPositiveButton = (Button) findViewById(R.id.sign_in);
-    }
-
-    /**
-     * Provide the information necessary for this class to function.
-     * @param listener Listener for user interactions.
-     * @param accessPoint Where this UI component is used.
-     */
-    public void init(Listener listener, @AccessPoint int accessPoint) {
-        mListener = listener;
-        mAccessPoint = accessPoint;
-        mInitialized = true;
-
-        assert mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER
-                || mAccessPoint == SigninAccessPoint.RECENT_TABS
-                : "SigninAndSyncView only has strings for bookmark manager and recent tabs.";
-
-        // The title stays the same no matter what action the user must take.
-        if (mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER) {
-            mTitle.setText(R.string.sync_your_bookmarks);
-        } else {
-            mTitle.setVisibility(View.GONE);
-        }
-
-        // We don't call update() here as it will be called in onAttachedToWindow().
-    }
-
-    private void update() {
-        ViewState viewState;
-        if (!ChromeSigninController.get().isSignedIn()) {
-            viewState = getStateForSignin();
-        } else if (!AndroidSyncSettings.isMasterSyncEnabled(getContext())) {
-            viewState = getStateForEnableAndroidSync();
-        } else if (!AndroidSyncSettings.isChromeSyncEnabled(getContext())) {
-            viewState = getStateForEnableChromeSync();
-        } else {
-            viewState = getStateForStartUsing();
-        }
-        viewState.apply(mDescription, mPositiveButton, mNegativeButton);
-    }
-
-    /**
-     * The ViewState class represents all the UI elements that can change for each variation of
-     * this View. We use this to ensure each variation (created in the getStateFor* methods)
-     * explicitly touches each UI element.
-     */
-    private static class ViewState {
-        private final int mDescriptionText;
-        private final ButtonState mPositiveButtonState;
-        private final ButtonState mNegativeButtonState;
-
-        public ViewState(int mDescriptionText,
-                ButtonState mPositiveButtonState, ButtonState mNegativeButtonState) {
-            this.mDescriptionText = mDescriptionText;
-            this.mPositiveButtonState = mPositiveButtonState;
-            this.mNegativeButtonState = mNegativeButtonState;
-        }
-
-        public void apply(TextView description, Button positiveButton, Button negativeButton) {
-            description.setText(mDescriptionText);
-            mNegativeButtonState.apply(negativeButton);
-            mPositiveButtonState.apply(positiveButton);
-        }
-    }
-
-    /**
-     * Classes to represent the state of a button that we are interested in, used to keep ViewState
-     * tidy and provide some convenience methods.
-     */
-    private interface ButtonState {
-        void apply(Button button);
-    }
-
-    private static class ButtonAbsent implements ButtonState {
-        @Override
-        public void apply(Button button) {
-            button.setVisibility(View.GONE);
-        }
-    }
-
-    private static class ButtonPresent implements ButtonState {
-        private final int mTextResource;
-        private final OnClickListener mOnClickListener;
-
-        public ButtonPresent(int textResource, OnClickListener onClickListener) {
-            mTextResource = textResource;
-            mOnClickListener = onClickListener;
-        }
-
-        @Override
-        public void apply(Button button) {
-            button.setVisibility(View.VISIBLE);
-            button.setText(mTextResource);
-            button.setOnClickListener(mOnClickListener);
-        }
-    }
-
-    private ViewState getStateForSignin() {
-        int descId = mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER
-                ? R.string.bookmark_sign_in_promo_description
-                : R.string.recent_tabs_sign_in_promo_description;
-
-        ButtonState positiveButton = new ButtonPresent(R.string.sign_in_button, view -> {
-            Context context = getContext();
-            context.startActivity(AccountSigninActivity.createIntentForDefaultSigninFlow(
-                    context, mAccessPoint, false));
-        });
-
-        ButtonState negativeButton;
-        if (mAccessPoint == SigninAccessPoint.RECENT_TABS) {
-            negativeButton = new ButtonAbsent();
-        } else {
-            negativeButton =
-                    new ButtonPresent(R.string.no_thanks, view -> mListener.onViewDismissed());
-        }
-
-        return new ViewState(descId, positiveButton, negativeButton);
-    }
-
-    private ViewState getStateForEnableAndroidSync() {
-        assert mAccessPoint == SigninAccessPoint.RECENT_TABS
-                : "Enable Android Sync should not be showing from bookmarks";
-
-        int descId = R.string.recent_tabs_sync_promo_enable_android_sync;
-
-        ButtonState positiveButton = new ButtonPresent(R.string.open_settings_button, view -> {
-            // TODO(crbug.com/557784): Like AccountManagementFragment, this would also
-            // benefit from going directly to an account.
-            Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
-            intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"});
-            getContext().startActivity(intent);
-        });
-
-        return new ViewState(descId, positiveButton, new ButtonAbsent());
-    }
-
-    private ViewState getStateForEnableChromeSync() {
-        int descId = mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER
-                ? R.string.bookmarks_sync_promo_enable_sync
-                : R.string.recent_tabs_sync_promo_enable_chrome_sync;
-
-        ButtonState positiveButton = new ButtonPresent(R.string.enable_sync_button,
-                view -> PreferencesLauncher.launchSettingsPage(
-                        getContext(), SyncCustomizationFragment.class.getName()));
-
-        return new ViewState(descId, positiveButton, new ButtonAbsent());
-    }
-
-    private ViewState getStateForStartUsing() {
-        // TODO(peconn): Ensure this state is never seen when used for bookmarks.
-        // State is updated before this view is removed, so this invalid state happens, but is not
-        // visible. I want there to be a guarantee that this state is never seen, but to do so would
-        // require some code restructuring.
-
-        return new ViewState(R.string.ntp_recent_tabs_sync_promo_instructions,
-                new ButtonAbsent(), new ButtonAbsent());
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        assert mInitialized : "init(...) must be called on SigninAndSyncView before use.";
-
-        super.onAttachedToWindow();
-        mSigninManager.addSignInStateObserver(this);
-        AndroidSyncSettings.registerObserver(getContext(), this);
-        update();
-    }
-
-    @Override
-    protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        mSigninManager.removeSignInStateObserver(this);
-        AndroidSyncSettings.unregisterObserver(getContext(), this);
-    }
-
-    // SigninStateObserver
-    @Override
-    public void onSignedIn() {
-        update();
-    }
-
-    @Override
-    public void onSignedOut() {
-        update();
-    }
-
-    // AndroidSyncStateObserver
-    @Override
-    public void androidSyncSettingsChanged() {
-        // AndroidSyncSettings calls this method from non-UI threads.
-        ThreadUtils.runOnUiThread(this::update);
-    }
-}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncPromoView.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncPromoView.java
new file mode 100644
index 0000000..0cdffd14
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncPromoView.java
@@ -0,0 +1,214 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.signin;
+
+import android.content.Context;
+import android.content.Intent;
+import android.provider.Settings;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import org.chromium.base.ThreadUtils;
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.preferences.PreferencesLauncher;
+import org.chromium.chrome.browser.signin.AccountSigninActivity.AccessPoint;
+import org.chromium.chrome.browser.sync.ui.SyncCustomizationFragment;
+import org.chromium.components.sync.AndroidSyncSettings;
+import org.chromium.components.sync.AndroidSyncSettings.AndroidSyncSettingsObserver;
+
+/**
+ * A View that shows the user the next step they must complete to start syncing their data (eg.
+ * Recent Tabs or Bookmarks).
+ * If inflated manually, {@link SyncPromoView#init(int)} must be called before
+ * attaching this View to a ViewGroup.
+ */
+public class SyncPromoView extends LinearLayout implements AndroidSyncSettingsObserver {
+    private @AccessPoint int mAccessPoint;
+    private boolean mInitialized;
+
+    private TextView mTitle;
+    private TextView mDescription;
+    private Button mPositiveButton;
+
+    /**
+     * A convenience method to inflate and initialize a SyncPromoView.
+     * @param parent A parent used to provide LayoutParams (the SyncPromoView will not be
+     *         attached).
+     * @param accessPoint Where the SyncPromoView is used.
+     */
+    public static SyncPromoView create(ViewGroup parent, @AccessPoint int accessPoint) {
+        SyncPromoView result = (SyncPromoView) LayoutInflater.from(parent.getContext())
+                                       .inflate(R.layout.sync_promo_view, parent, false);
+        result.init(accessPoint);
+        return result;
+    }
+
+    /**
+     * Constructor for inflating from xml.
+     */
+    public SyncPromoView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+
+        mTitle = (TextView) findViewById(R.id.title);
+        mDescription = (TextView) findViewById(R.id.description);
+        mPositiveButton = (Button) findViewById(R.id.sign_in);
+    }
+
+    /**
+     * Provide the information necessary for this class to function.
+     * @param accessPoint Where this UI component is used.
+     */
+    public void init(@AccessPoint int accessPoint) {
+        mAccessPoint = accessPoint;
+        mInitialized = true;
+
+        assert mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER
+                || mAccessPoint == SigninAccessPoint.RECENT_TABS
+                : "SyncPromoView only has strings for bookmark manager and recent tabs.";
+
+        // The title stays the same no matter what action the user must take.
+        if (mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER) {
+            mTitle.setText(R.string.sync_your_bookmarks);
+        } else {
+            mTitle.setVisibility(View.GONE);
+        }
+
+        // We don't call update() here as it will be called in onAttachedToWindow().
+    }
+
+    private void update() {
+        ViewState viewState;
+        if (!AndroidSyncSettings.isMasterSyncEnabled(getContext())) {
+            viewState = getStateForEnableAndroidSync();
+        } else if (!AndroidSyncSettings.isChromeSyncEnabled(getContext())) {
+            viewState = getStateForEnableChromeSync();
+        } else {
+            viewState = getStateForStartUsing();
+        }
+        viewState.apply(mDescription, mPositiveButton);
+    }
+
+    /**
+     * The ViewState class represents all the UI elements that can change for each variation of
+     * this View. We use this to ensure each variation (created in the getStateFor* methods)
+     * explicitly touches each UI element.
+     */
+    private static class ViewState {
+        private final int mDescriptionText;
+        private final ButtonState mPositiveButtonState;
+
+        public ViewState(int mDescriptionText, ButtonState mPositiveButtonState) {
+            this.mDescriptionText = mDescriptionText;
+            this.mPositiveButtonState = mPositiveButtonState;
+        }
+
+        public void apply(TextView description, Button positiveButton) {
+            description.setText(mDescriptionText);
+            mPositiveButtonState.apply(positiveButton);
+        }
+    }
+
+    /**
+     * Classes to represent the state of a button that we are interested in, used to keep ViewState
+     * tidy and provide some convenience methods.
+     */
+    private interface ButtonState {
+        void apply(Button button);
+    }
+
+    private static class ButtonAbsent implements ButtonState {
+        @Override
+        public void apply(Button button) {
+            button.setVisibility(View.GONE);
+        }
+    }
+
+    private static class ButtonPresent implements ButtonState {
+        private final int mTextResource;
+        private final OnClickListener mOnClickListener;
+
+        public ButtonPresent(int textResource, OnClickListener onClickListener) {
+            mTextResource = textResource;
+            mOnClickListener = onClickListener;
+        }
+
+        @Override
+        public void apply(Button button) {
+            button.setVisibility(View.VISIBLE);
+            button.setText(mTextResource);
+            button.setOnClickListener(mOnClickListener);
+        }
+    }
+
+    private ViewState getStateForEnableAndroidSync() {
+        assert mAccessPoint == SigninAccessPoint.RECENT_TABS
+                : "Enable Android Sync should not be showing from bookmarks";
+
+        int descId = R.string.recent_tabs_sync_promo_enable_android_sync;
+
+        ButtonState positiveButton = new ButtonPresent(R.string.open_settings_button, view -> {
+            // TODO(https://crbug.com/557784): Like AccountManagementFragment, this would also
+            // benefit from going directly to an account.
+            Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
+            intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"});
+            getContext().startActivity(intent);
+        });
+
+        return new ViewState(descId, positiveButton);
+    }
+
+    private ViewState getStateForEnableChromeSync() {
+        int descId = mAccessPoint == SigninAccessPoint.BOOKMARK_MANAGER
+                ? R.string.bookmarks_sync_promo_enable_sync
+                : R.string.recent_tabs_sync_promo_enable_chrome_sync;
+
+        ButtonState positiveButton = new ButtonPresent(R.string.enable_sync_button,
+                view -> PreferencesLauncher.launchSettingsPage(
+                        getContext(), SyncCustomizationFragment.class.getName()));
+
+        return new ViewState(descId, positiveButton);
+    }
+
+    private ViewState getStateForStartUsing() {
+        // TODO(peconn): Ensure this state is never seen when used for bookmarks.
+        // State is updated before this view is removed, so this invalid state happens, but is not
+        // visible. I want there to be a guarantee that this state is never seen, but to do so would
+        // require some code restructuring.
+
+        return new ViewState(R.string.ntp_recent_tabs_sync_promo_instructions, new ButtonAbsent());
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        assert mInitialized : "init(...) must be called on SyncPromoView before use.";
+
+        super.onAttachedToWindow();
+        AndroidSyncSettings.registerObserver(getContext(), this);
+        update();
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        AndroidSyncSettings.unregisterObserver(getContext(), this);
+    }
+
+    // AndroidSyncStateObserver
+    @Override
+    public void androidSyncSettingsChanged() {
+        // AndroidSyncSettings calls this method from non-UI threads.
+        ThreadUtils.runOnUiThread(this::update);
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeHomeSurveyController.java b/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeHomeSurveyController.java
index a004b59..817e63a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeHomeSurveyController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeHomeSurveyController.java
@@ -110,7 +110,9 @@
                 onSurveyAvailable(siteId);
             }
         };
-        surveyController.downloadSurvey(context, siteId, onSuccessRunnable);
+        String siteContext =
+                String.format("ChromeHomeEnabled=%s", FeatureUtilities.isChromeHomeEnabled());
+        surveyController.downloadSurvey(context, siteId, onSuccessRunnable, siteContext);
     }
 
     /** @return Whether the user qualifies for the survey. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/survey/SurveyController.java b/chrome/android/java/src/org/chromium/chrome/browser/survey/SurveyController.java
index 779c5f2..9b5d9c6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/survey/SurveyController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/survey/SurveyController.java
@@ -33,8 +33,11 @@
      * @param siteId The id of the site from where the survey will be downloaded.
      * @param onSuccessRunnable The runnable to notify when the survey is ready.
      *                          If no survey is available, the runnable will not be run.
+     * @param siteContext Optional parameter to build the download request. Site context can be
+     *                    used for adding metadata.
      */
-    public void downloadSurvey(Context context, String siteId, Runnable onSuccessRunnable) {}
+    public void downloadSurvey(
+            Context context, String siteId, Runnable onSuccessRunnable, String siteContext) {}
 
     /**
      * Show the survey.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 23aeacb..a299b0b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -70,6 +70,9 @@
 import org.chromium.chrome.browser.help.HelpAndFeedback;
 import org.chromium.chrome.browser.infobar.InfoBarContainer;
 import org.chromium.chrome.browser.media.ui.MediaSessionTabHelper;
+import org.chromium.chrome.browser.metrics.PageLoadMetrics;
+import org.chromium.chrome.browser.metrics.StartupPageLoadMetricsObserver;
+import org.chromium.chrome.browser.metrics.UmaUtils;
 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
 import org.chromium.chrome.browser.ntp.NativePageAssassin;
 import org.chromium.chrome.browser.ntp.NativePageFactory;
@@ -208,6 +211,7 @@
     // Content layer Observers and Delegates
     private TabWebContentsObserver mWebContentsObserver;
     private TabWebContentsDelegateAndroid mWebContentsDelegate;
+    private StartupPageLoadMetricsObserver mStartupPageLoadMetricsObserver;
 
     /**
      * If this tab was opened from another tab, store the id of the tab that
@@ -1820,6 +1824,10 @@
             mWebContentsDelegate = mDelegateFactory.createWebContentsDelegate(this);
             mWebContentsObserver =
                     new TabWebContentsObserver(mContentViewCore.getWebContents(), this);
+            if (UmaUtils.isRunningApplicationStart()) {
+                mStartupPageLoadMetricsObserver = new StartupPageLoadMetricsObserver();
+                PageLoadMetrics.addObserver(mStartupPageLoadMetricsObserver);
+            }
 
             mDownloadDelegate = new ChromeDownloadDelegate(mThemedApplicationContext, this);
 
@@ -2449,6 +2457,11 @@
             mWebContentsObserver = null;
         }
 
+        if (mStartupPageLoadMetricsObserver != null) {
+            PageLoadMetrics.removeObserver(mStartupPageLoadMetricsObserver);
+            mStartupPageLoadMetricsObserver = null;
+        }
+
         assert mNativeTabAndroid != 0;
         nativeDestroyWebContents(mNativeTabAndroid, deleteNativeWebContents);
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUma.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUma.java
index 58cbce3..98604fe 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUma.java
@@ -139,17 +139,6 @@
     }
 
     /**
-     * Records a sample in a histogram of times. This is the Java equivalent of the
-     * UMA_HISTOGRAM_LONG_TIMES_100.
-     */
-    private void recordLongTimesHistogram100(String name, long duration) {
-        RecordHistogram.recordCustomTimesHistogram(
-                name, TimeUnit.MILLISECONDS.toMillis(duration),
-                TimeUnit.MILLISECONDS.toMillis(1), TimeUnit.HOURS.toMillis(1),
-                TimeUnit.MILLISECONDS, 100);
-    }
-
-    /**
      * Record the tab state transition into histograms.
      * @param prevState Previous state of the tab.
      * @param newState New state of the tab.
@@ -157,9 +146,11 @@
      */
     private void recordTabStateTransition(int prevState, int newState, long delta) {
         if (prevState == TAB_STATE_ACTIVE && newState == TAB_STATE_INACTIVE) {
-            recordLongTimesHistogram100("Tabs.StateTransfer.Time_Active_Inactive", delta);
+            RecordHistogram.recordLongTimesHistogram100(
+                    "Tabs.StateTransfer.Time_Active_Inactive", delta, TimeUnit.MILLISECONDS);
         } else if (prevState == TAB_STATE_ACTIVE && newState == TAB_STATE_CLOSED) {
-            recordLongTimesHistogram100("Tabs.StateTransfer.Time_Active_Closed", delta);
+            RecordHistogram.recordLongTimesHistogram100(
+                    "Tabs.StateTransfer.Time_Active_Closed", delta, TimeUnit.MILLISECONDS);
         }
 
         if (prevState == TAB_STATE_INITIAL) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
index 282fa64..ac97013 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
@@ -206,7 +206,7 @@
 
         boolean isTrackedPage = hasCommitted && isInMainFrame && !isErrorPage && !isSameDocument
                 && !isFragmentNavigation && UrlUtilities.isHttpOrHttps(url);
-        UmaUtils.recordFinishNavigation(isTrackedPage);
+        UmaUtils.registerFinishNavigation(isTrackedPage);
         if (!hasCommitted) return;
 
         if (isInMainFrame) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
index f7559bdf..a0a7d32 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
@@ -6,6 +6,7 @@
 
 import android.content.pm.PackageManager;
 import android.graphics.Bitmap;
+import android.os.AsyncTask;
 
 import org.chromium.base.Callback;
 import org.chromium.base.ContextUtils;
@@ -123,6 +124,29 @@
         mInstallDelegate.updateAsync(packageName, version, title, token, callback);
     }
 
+    @CalledByNative
+    private void checkFreeSpace() {
+        new AsyncTask<Void, Void, Integer>() {
+            @Override
+            protected Integer doInBackground(Void... params) {
+                long availableSpaceInBytes = WebApkUma.getAvailableSpaceAboveLowSpaceLimit();
+
+                if (availableSpaceInBytes > 0) return SpaceStatus.ENOUGH_SPACE;
+
+                long cacheSizeInBytes = WebApkUma.getCacheDirSize();
+                if (cacheSizeInBytes + availableSpaceInBytes > 0) {
+                    return SpaceStatus.ENOUGH_SPACE_AFTER_FREE_UP_CACHE;
+                }
+                return SpaceStatus.NOT_ENOUGH_SPACE;
+            }
+
+            @Override
+            protected void onPostExecute(Integer result) {
+                nativeOnGotSpaceStatus(mNativePointer, result);
+            }
+        }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+    }
+
     private boolean isWebApkInstalled(String packageName) {
         PackageManager packageManager = ContextUtils.getApplicationContext().getPackageManager();
         return InstallerDelegate.isInstalled(packageManager, packageName);
@@ -130,4 +154,5 @@
 
     private native void nativeOnInstallFinished(
             long nativeWebApkInstaller, @WebApkInstallResult int result);
+    private native void nativeOnGotSpaceStatus(long nativeWebApkInstaller, int status);
 }
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 4e640bf..8a2d6dc 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -631,6 +631,7 @@
   "java/src/org/chromium/chrome/browser/metrics/OneShotImpressionListener.java",
   "java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java",
   "java/src/org/chromium/chrome/browser/metrics/StartupMetrics.java",
+  "java/src/org/chromium/chrome/browser/metrics/StartupPageLoadMetricsObserver.java",
   "java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java",
   "java/src/org/chromium/chrome/browser/metrics/UmaUtils.java",
   "java/src/org/chromium/chrome/browser/metrics/VariationsSession.java",
@@ -1079,12 +1080,12 @@
   "java/src/org/chromium/chrome/browser/signin/PersonalizedSigninPromoView.java",
   "java/src/org/chromium/chrome/browser/signin/ProfileDataCache.java",
   "java/src/org/chromium/chrome/browser/signin/SignOutDialogFragment.java",
-  "java/src/org/chromium/chrome/browser/signin/SigninAndSyncView.java",
   "java/src/org/chromium/chrome/browser/signin/SigninHelper.java",
   "java/src/org/chromium/chrome/browser/signin/SigninInvestigator.java",
   "java/src/org/chromium/chrome/browser/signin/SigninManager.java",
   "java/src/org/chromium/chrome/browser/signin/SigninPromoController.java",
   "java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java",
+  "java/src/org/chromium/chrome/browser/signin/SyncPromoView.java",
   "java/src/org/chromium/chrome/browser/snackbar/BottomContainer.java",
   "java/src/org/chromium/chrome/browser/snackbar/DataReductionPromoSnackbarController.java",
   "java/src/org/chromium/chrome/browser/snackbar/DataUseSnackbarController.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java
index ebfb21c..54d4802 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkTest.java
@@ -275,8 +275,7 @@
     @Test
     @MediumTest
     public void testSearchBookmarks() throws Exception {
-        BookmarkPromoHeader.forcePromoStateForTests(
-                BookmarkPromoHeader.PromoState.PROMO_SIGNIN_GENERIC);
+        BookmarkPromoHeader.forcePromoStateForTests(BookmarkPromoHeader.PromoState.PROMO_SYNC);
         addBookmark(TEST_PAGE_TITLE_GOOGLE, mTestPage);
         addBookmark(TEST_PAGE_TITLE_FOO, mTestPageFoo);
         openBookmarkManager();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/ui/StubbedProvider.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/ui/StubbedProvider.java
index 79e3da2d5..e3886ee 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/ui/StubbedProvider.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/ui/StubbedProvider.java
@@ -10,6 +10,7 @@
 import android.os.Handler;
 import android.os.Looper;
 
+import org.chromium.base.Callback;
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.test.util.CallbackHelper;
 import org.chromium.chrome.browser.download.DownloadInfo;
@@ -128,8 +129,8 @@
         }
 
         @Override
-        public ArrayList<OfflineItem> getAllItems() {
-            return items;
+        public void getAllItems(Callback<ArrayList<OfflineItem>> callback) {
+            mHandler.post(() -> callback.onResult(items));
         }
 
         @Override
@@ -165,8 +166,8 @@
         }
 
         @Override
-        public OfflineItem getItemById(ContentId id) {
-            return null;
+        public void getItemById(ContentId id, Callback<OfflineItem> callback) {
+            mHandler.post(() -> callback.onResult(null));
         }
 
         @Override
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/PageLoadMetricsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/PageLoadMetricsTest.java
index 4c5aa2b4..2f2316ee 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/PageLoadMetricsTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/PageLoadMetricsTest.java
@@ -19,7 +19,6 @@
 import org.chromium.base.test.util.RetryOnFailure;
 import org.chromium.chrome.browser.ChromeActivity;
 import org.chromium.chrome.browser.ChromeSwitches;
-import org.chromium.chrome.browser.tab.Tab;
 import org.chromium.chrome.test.ChromeActivityTestRule;
 import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
 import org.chromium.content_public.browser.WebContents;
@@ -47,7 +46,6 @@
     private String mTestPage;
     private String mTestPage2;
     private EmbeddedTestServer mTestServer;
-    private PageLoadMetricsObserver mMetricsObserver;
 
     @Before
     public void setUp() throws Exception {
@@ -55,20 +53,14 @@
         mTestServer = EmbeddedTestServer.createAndStartServer(InstrumentationRegistry.getContext());
         mTestPage = mTestServer.getURL(TEST_PAGE);
         mTestPage2 = mTestServer.getURL(TEST_PAGE_2);
-
-        mMetricsObserver =
-                new PageLoadMetricsObserver(mActivityTestRule.getActivity().getActivityTab());
     }
 
     @After
     public void tearDown() throws Exception {
-        ThreadUtils.runOnUiThreadBlocking(
-                (Runnable) () -> PageLoadMetrics.removeObserver(mMetricsObserver));
-
         mTestServer.stopAndDestroyServer();
     }
 
-    private void assertMetricsEmitted(PageLoadMetricsObserver observer)
+    private void assertMetricsEmitted(PageLoadMetricsTestObserver observer)
             throws InterruptedException {
         Assert.assertTrue("First Contentful Paint should be reported",
                 observer.waitForFirstContentfulPaintEvent());
@@ -76,18 +68,18 @@
                 "Load event start event should be reported", observer.waitForLoadEventStartEvent());
     }
 
-    private static class PageLoadMetricsObserver implements PageLoadMetrics.Observer {
+    /**
+     * Implementation of PageLoadMetrics.Observer for tests that allows to synchronously wait for
+     * various page load metrics events. Observes only the first seen navigation, all other
+     * navigations are ignored.
+     */
+    static class PageLoadMetricsTestObserver implements PageLoadMetrics.Observer {
         private static final long NO_NAVIGATION_ID = -1;
 
-        private final Tab mTab;
         private final CountDownLatch mFirstContentfulPaintLatch = new CountDownLatch(1);
         private final CountDownLatch mLoadEventStartLatch = new CountDownLatch(1);
         private long mNavigationId = NO_NAVIGATION_ID;
 
-        public PageLoadMetricsObserver(Tab tab) {
-            mTab = tab;
-        }
-
         @Override
         public void onNewNavigation(WebContents webContents, long navigationId) {
             if (mNavigationId == NO_NAVIGATION_ID) mNavigationId = navigationId;
@@ -96,7 +88,7 @@
         @Override
         public void onFirstContentfulPaint(WebContents webContents, long navigationId,
                 long navigationStartTick, long firstContentfulPaintMs) {
-            if (webContents != mTab.getWebContents() || navigationId != mNavigationId) return;
+            if (mNavigationId != navigationId) return;
 
             if (firstContentfulPaintMs > 0) mFirstContentfulPaintLatch.countDown();
         }
@@ -104,17 +96,25 @@
         @Override
         public void onLoadEventStart(WebContents webContents, long navigationId,
                 long navigationStartTick, long loadEventStartMs) {
-            if (webContents != mTab.getWebContents() || navigationId != mNavigationId) return;
+            if (mNavigationId != navigationId) return;
 
             if (loadEventStartMs > 0) mLoadEventStartLatch.countDown();
         }
 
         public boolean waitForFirstContentfulPaintEvent() throws InterruptedException {
+            // The event will not occur if there is no navigation to observe, so we can exit
+            // earlier.
+            if (mNavigationId == NO_NAVIGATION_ID) return false;
+
             return mFirstContentfulPaintLatch.await(
                     PAGE_LOAD_METRICS_TIMEOUT_MS, TimeUnit.MILLISECONDS);
         }
 
         public boolean waitForLoadEventStartEvent() throws InterruptedException {
+            // The event will not occur if there is no navigation to observe, so we can exit
+            // earlier.
+            if (mNavigationId == NO_NAVIGATION_ID) return false;
+
             return mLoadEventStartLatch.await(PAGE_LOAD_METRICS_TIMEOUT_MS, TimeUnit.MILLISECONDS);
         }
 
@@ -137,31 +137,38 @@
     public void testPageLoadMetricEmitted() throws InterruptedException {
         Assert.assertFalse("Tab shouldn't be loading anything before we add observer",
                 mActivityTestRule.getActivity().getActivityTab().isLoading());
-        ThreadUtils.runOnUiThreadBlocking(
-                (Runnable) () -> PageLoadMetrics.addObserver(mMetricsObserver));
+        PageLoadMetricsTestObserver metricsObserver = new PageLoadMetricsTestObserver();
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.addObserver(metricsObserver));
 
         mActivityTestRule.loadUrl(mTestPage);
-        assertMetricsEmitted(mMetricsObserver);
+        assertMetricsEmitted(metricsObserver);
+
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.removeObserver(metricsObserver));
     }
 
     @Test
     @SmallTest
     public void testPageLoadMetricNavigationIdSetCorrectly() throws InterruptedException {
-        ThreadUtils.runOnUiThreadBlocking(
-                (Runnable) () -> PageLoadMetrics.addObserver(mMetricsObserver));
+        PageLoadMetricsTestObserver metricsObserver = new PageLoadMetricsTestObserver();
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.addObserver(metricsObserver));
         mActivityTestRule.loadUrl(mTestPage);
-        assertMetricsEmitted(mMetricsObserver);
+        assertMetricsEmitted(metricsObserver);
 
-        PageLoadMetricsObserver metricsObserver2 =
-                new PageLoadMetricsObserver(mActivityTestRule.getActivity().getActivityTab());
-        ThreadUtils.runOnUiThreadBlocking(
-                (Runnable) () -> PageLoadMetrics.addObserver(metricsObserver2));
+        PageLoadMetricsTestObserver metricsObserver2 = new PageLoadMetricsTestObserver();
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.addObserver(metricsObserver2));
         mActivityTestRule.loadUrl(mTestPage2);
         assertMetricsEmitted(metricsObserver2);
 
         Assert.assertNotEquals("Subsequent navigations should have different navigation ids",
-                mMetricsObserver.getNavigationId(), metricsObserver2.getNavigationId());
-        ThreadUtils.runOnUiThreadBlocking(
-                (Runnable) () -> PageLoadMetrics.removeObserver(metricsObserver2));
+                metricsObserver.getNavigationId(), metricsObserver2.getNavigationId());
+
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.removeObserver(metricsObserver));
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.removeObserver(metricsObserver2));
     }
 }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java
index e5edc994..e732920 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java
@@ -8,12 +8,14 @@
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.LargeTest;
 
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import org.chromium.base.ThreadUtils;
 import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.base.test.util.CommandLineFlags;
 import org.chromium.base.test.util.RetryOnFailure;
@@ -35,84 +37,130 @@
 
     private static final String TEST_PAGE = "/chrome/test/data/android/google.html";
     private static final String TEST_PAGE_2 = "/chrome/test/data/android/test.html";
+    private static final String ERROR_PAGE = "/close-socket";
     private static final String FIRST_COMMIT_HISTOGRAM =
             "Startup.Android.Experimental.Cold.TimeToFirstNavigationCommit";
+    private static final String FIRST_CONTENTFUL_PAINT_HISTOGRAM =
+            "Startup.Android.Experimental.Cold.TimeToFirstContentfulPaint";
 
     private String mTestPage;
     private String mTestPage2;
+    private String mErrorPage;
     private EmbeddedTestServer mTestServer;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() throws InterruptedException {
         Context appContext = InstrumentationRegistry.getInstrumentation()
                                      .getTargetContext()
                                      .getApplicationContext();
         mTestServer = EmbeddedTestServer.createAndStartServer(appContext);
         mTestPage = mTestServer.getURL(TEST_PAGE);
         mTestPage2 = mTestServer.getURL(TEST_PAGE_2);
+        mErrorPage = mTestServer.getURL(ERROR_PAGE);
+    }
+
+    @After
+    public void tearDown() {
+        mTestServer.stopAndDestroyServer();
+    }
+
+    private interface InterruptibleRunnable { void run() throws InterruptedException; }
+
+    private void runAndWaitForPageLoadMetricsRecorded(InterruptibleRunnable runnable)
+            throws InterruptedException {
+        PageLoadMetricsTest.PageLoadMetricsTestObserver testObserver =
+                new PageLoadMetricsTest.PageLoadMetricsTestObserver();
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.addObserver(testObserver));
+        runnable.run();
+        // First Contentful Paint may be recorded asynchronously after a page load is finished, we
+        // have to wait the event to occur.
+        testObserver.waitForFirstContentfulPaintEvent();
+        ThreadUtils.runOnUiThreadBlockingNoException(
+                () -> PageLoadMetrics.removeObserver(testObserver));
+    }
+
+    private void loadUrlAndWaitForPageLoadMetricsRecorded(String url) throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(() -> mActivityTestRule.loadUrl(url));
+    }
+
+    private void assertHistogramsRecorded(int expectedCount) throws InterruptedException {
+        Assert.assertEquals(expectedCount,
+                RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
+        Assert.assertEquals(expectedCount,
+                RecordHistogram.getHistogramTotalCountForTesting(FIRST_CONTENTFUL_PAINT_HISTOGRAM));
     }
 
     /**
-     * Tests that the startup time to first navigation commit histograms are recorded only once on
-     * startup.
+     * Tests that the startup loading histograms are recorded only once on startup.
      */
     @Test
     @LargeTest
     @RetryOnFailure
-    public void testNavigationCommitUmaRecorded() throws InterruptedException {
-        mActivityTestRule.startMainActivityWithURL(mTestPage);
-        Assert.assertEquals(
-                1, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
-        mActivityTestRule.loadUrl(mTestPage2);
-        Assert.assertEquals(
-                1, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
+    public void testStartWithURLRecorded() throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(
+                () -> mActivityTestRule.startMainActivityWithURL(mTestPage));
+        assertHistogramsRecorded(1);
+        loadUrlAndWaitForPageLoadMetricsRecorded(mTestPage2);
+        assertHistogramsRecorded(1);
     }
 
     /**
-     * Tests that the startup time to first navigation commit histograms are recorded in case of
-     * intent coming from an external app.
+     * Tests that the startup loading histograms are recorded in case of intent coming from an
+     * external app.
      */
     @Test
     @LargeTest
     @RetryOnFailure
-    public void testNavigationCommitUmaFromExternalAppRecorded() throws InterruptedException {
-        mActivityTestRule.startMainActivityFromExternalApp(mTestPage, null);
-        Assert.assertEquals(
-                1, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
-        mActivityTestRule.loadUrl(mTestPage2);
-        Assert.assertEquals(
-                1, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
+    public void testFromExternalAppRecorded() throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(
+                () -> mActivityTestRule.startMainActivityFromExternalApp(mTestPage, null));
+        assertHistogramsRecorded(1);
+        loadUrlAndWaitForPageLoadMetricsRecorded(mTestPage2);
+        assertHistogramsRecorded(1);
     }
 
     /**
-     * Tests that the startup time to first navigation commit histograms are not recorded in case of
-     * navigation to the NTP.
+     * Tests that the startup loading histograms are not recorded in case of navigation to the NTP.
      */
     @Test
     @LargeTest
     @RetryOnFailure
-    public void testNavigationCommitUmaNTPNotRecorded() throws InterruptedException {
-        mActivityTestRule.startMainActivityFromLauncher();
-        Assert.assertEquals(
-                0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
-        mActivityTestRule.loadUrl(mTestPage2);
-        Assert.assertEquals(
-                0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
+    public void testNTPNotRecorded() throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(
+                () -> mActivityTestRule.startMainActivityFromLauncher());
+        assertHistogramsRecorded(0);
+        loadUrlAndWaitForPageLoadMetricsRecorded(mTestPage2);
+        assertHistogramsRecorded(0);
     }
 
     /**
-     * Tests that the startup time to first navigation commit histograms are not recorded in case of
-     * navigation to the blank page.
+     * Tests that the startup loading histograms are not recorded in case of navigation to the blank
+     * page.
      */
     @Test
     @LargeTest
     @RetryOnFailure
-    public void testNavigationCommitUmaBlankPageNotRecorded() throws InterruptedException {
-        mActivityTestRule.startMainActivityOnBlankPage();
-        Assert.assertEquals(
-                0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
-        mActivityTestRule.loadUrl(mTestPage2);
-        Assert.assertEquals(
-                0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_COMMIT_HISTOGRAM));
+    public void testBlankPageNotRecorded() throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(
+                () -> mActivityTestRule.startMainActivityOnBlankPage());
+        assertHistogramsRecorded(0);
+        loadUrlAndWaitForPageLoadMetricsRecorded(mTestPage2);
+        assertHistogramsRecorded(0);
     }
-}
\ No newline at end of file
+
+    /**
+     * Tests that the startup loading histograms are not recorded in case of navigation to the error
+     * page.
+     */
+    @Test
+    @LargeTest
+    @RetryOnFailure
+    public void testErrorPageNotRecorded() throws InterruptedException {
+        runAndWaitForPageLoadMetricsRecorded(
+                () -> mActivityTestRule.startMainActivityWithURL(mErrorPage));
+        assertHistogramsRecorded(0);
+        loadUrlAndWaitForPageLoadMetricsRecorded(mTestPage2);
+        assertHistogramsRecorded(0);
+    }
+}
diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc
index dfc5a47..bfd8d08 100644
--- a/chrome/app/chrome_crash_reporter_client_win.cc
+++ b/chrome/app/chrome_crash_reporter_client_win.cc
@@ -38,25 +38,7 @@
 using namespace crash_keys;
 
 size_t RegisterCrashKeysHelper() {
-  // The following keys may be chunked by the underlying crash logging system,
-  // but ultimately constitute a single key-value pair.
-  //
-  // For now these need to be kept relatively up to date with those in
-  // chrome/common/crash_keys.cc::RegisterChromeCrashKeys().
-  static constexpr base::debug::CrashKey kFixedKeys[] = {
-      {kNumVariations, kSmallSize},
-      {kVariations, kHugeSize},
-
-      // TODO(sunnyps): Remove after fixing crbug.com/724999.
-      {"gl-context-set-current-stack-trace", kMediumSize},
-  };
-
-  // This dynamic set of keys is used for sets of key value pairs when gathering
-  // a collection of data, like command line switches or extension IDs.
-  std::vector<base::debug::CrashKey> keys(std::begin(kFixedKeys),
-                                          std::end(kFixedKeys));
-
-  return base::debug::InitCrashKeys(&keys[0], keys.size(), kChunkMaxLength);
+  return 0;
 }
 
 }  // namespace
diff --git a/chrome/app/md_extensions_strings.grdp b/chrome/app/md_extensions_strings.grdp
index fd8f48bc..6f7030f 100644
--- a/chrome/app/md_extensions_strings.grdp
+++ b/chrome/app/md_extensions_strings.grdp
@@ -67,6 +67,9 @@
   <message name="IDS_MD_EXTENSIONS_ITEM_DETAILS" desc="The text on the button to show more details for a given extension.">
     Details
   </message>
+  <message name="IDS_MD_EXTENSIONS_EXTENSION_A11Y_ASSOCIATION" desc="Label used to associate an app or extension with actions for screen readers. This will only be read out lout.">
+    Related to <ph name="NAME_PH">$1<ex>AdBlock</ex></ph>
+  </message>
   <message name="IDS_MD_EXTENSIONS_APP_ICON" desc="The alt text for the app's icon. Used for accessibility.">
     App Icon
   </message>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index acf6ed4..b0102d1 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3628,6 +3628,9 @@
         "media/cdm_storage_id_key.cc",
         "media/cdm_storage_id_key.h",
       ]
+      if (is_chrome_branded) {
+        sources += [ "internal/google_chrome_cdm_storage_id_key.h" ]
+      }
     }
     deps += [ "//media/mojo/interfaces" ]
     if (mojo_media_host == "browser") {
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index ab9a2e5..65f5f23a 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -138,7 +138,6 @@
   "+third_party/WebKit/public/platform/WebSecurityStyle.h",
   "+third_party/WebKit/public/platform/WebSuddenTerminationDisablerType.h",
   "+third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h",
-  "+third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h",
   "+third_party/WebKit/public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h",
   "+third_party/WebKit/public/public_features.h",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 7f64263..16355e3e 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -256,22 +256,6 @@
      security_state::switches::kMarkHttpAs,
      security_state::switches::kMarkHttpAsDangerous}};
 
-const FeatureEntry::Choice kDataReductionProxyLoFiChoices[] = {
-    {flags_ui::kGenericExperimentChoiceDefault, "", ""},
-    {flag_descriptions::kDataReductionProxyLoFiAlwaysOn,
-     data_reduction_proxy::switches::kDataReductionProxyLoFi,
-     data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn},
-    {flag_descriptions::kDataReductionProxyLoFiCellularOnly,
-     data_reduction_proxy::switches::kDataReductionProxyLoFi,
-     data_reduction_proxy::switches::kDataReductionProxyLoFiValueCellularOnly},
-    {flag_descriptions::kDataReductionProxyLoFiDisabled,
-     data_reduction_proxy::switches::kDataReductionProxyLoFi,
-     data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled},
-    {flag_descriptions::kDataReductionProxyLoFiSlowConnectionsOnly,
-     data_reduction_proxy::switches::kDataReductionProxyLoFi,
-     data_reduction_proxy::switches::
-         kDataReductionProxyLoFiValueSlowConnectionsOnly}};
-
 const FeatureEntry::Choice kDataReductionProxyServerExperiment[] = {
     {flags_ui::kGenericExperimentChoiceDefault, "", ""},
     {flag_descriptions::kDataReductionProxyServerAlternative1,
@@ -2080,15 +2064,11 @@
      flag_descriptions::kHarfbuzzRendertextDescription, kOsMac,
      SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)},
 #endif  // OS_MACOSX
-    {"data-reduction-proxy-lo-fi",
-     flag_descriptions::kDataReductionProxyLoFiName,
-     flag_descriptions::kDataReductionProxyLoFiDescription, kOsAll,
-     MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices)},
-    {"enable-data-reduction-proxy-lite-page",
-     flag_descriptions::kEnableDataReductionProxyLitePageName,
-     flag_descriptions::kEnableDataReductionProxyLitePageDescription, kOsAll,
-     SINGLE_VALUE_TYPE(
-         data_reduction_proxy::switches::kEnableDataReductionProxyLitePage)},
+    {"data-saver-server-previews",
+     flag_descriptions::kDataSaverServerPreviewsName,
+     flag_descriptions::kDataSaverServerPreviewsDescription, kOsAll,
+     FEATURE_VALUE_TYPE(
+         data_reduction_proxy::features::kDataReductionProxyDecidesTransform)},
     {"enable-data-reduction-proxy-server-experiment",
      flag_descriptions::kEnableDataReductionProxyServerExperimentName,
      flag_descriptions::kEnableDataReductionProxyServerExperimentDescription,
@@ -2978,6 +2958,9 @@
     {"lsd-permission-prompt", flag_descriptions::kLsdPermissionPromptName,
      flag_descriptions::kLsdPermissionPromptDescription, kOsAndroid,
      FEATURE_VALUE_TYPE(features::kLsdPermissionPrompt)},
+    {"language-settings", flag_descriptions::kLanguagesPreferenceName,
+     flag_descriptions::kLanguagesPreferenceDescription, kOsAndroid,
+     FEATURE_VALUE_TYPE(chrome::android::kLanguagesPreference)},
 #endif
 
 #if defined(OS_CHROMEOS)
@@ -3299,7 +3282,7 @@
     {"enable-picture-in-picture",
      flag_descriptions::kEnablePictureInPictureName,
      flag_descriptions::kEnablePictureInPictureDescription, kOsDesktop,
-     SINGLE_VALUE_TYPE(switches::kEnablePictureInPicture)},
+     FEATURE_VALUE_TYPE(media::kPictureInPicture)},
 #endif  // !defined(OS_ANDROID)
     {"navigation-mojo-response", flag_descriptions::kNavigationMojoResponseName,
      flag_descriptions::kNavigationMojoResponseDescription, kOsAll,
diff --git a/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc b/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc
index 6db3112..4d9aee5 100644
--- a/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc
+++ b/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc
@@ -197,8 +197,8 @@
   content::mojom::URLLoaderFactory* loader_factory =
       content::BrowserContext::GetDefaultStoragePartition(profile)
           ->GetURLLoaderFactoryForBrowserProcess();
-  fetcher_ = base::MakeUnique<chrome::BitmapFetcher>(gurl, this,
-                                                     NO_TRAFFIC_ANNOTATION_YET);
+  fetcher_ =
+      base::MakeUnique<BitmapFetcher>(gurl, this, NO_TRAFFIC_ANNOTATION_YET);
   fetcher_->Init(
       std::string(),
       blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin,
diff --git a/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h b/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h
index 5a2e27c..b1ead56b 100644
--- a/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h
+++ b/chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h
@@ -24,7 +24,7 @@
 class ContextualSearchLayer;
 
 class ContextualSearchSceneLayer : public SceneLayer,
-    public chrome::BitmapFetcherDelegate {
+                                   public BitmapFetcherDelegate {
  public:
   ContextualSearchSceneLayer(JNIEnv* env,
                              const base::android::JavaRef<jobject>& jobj);
@@ -124,7 +124,7 @@
   base::android::ScopedJavaGlobalRef<jobject> object_;
   float base_page_brightness_;
   std::string thumbnail_url_;
-  std::unique_ptr<chrome::BitmapFetcher> fetcher_;
+  std::unique_ptr<BitmapFetcher> fetcher_;
 
   scoped_refptr<ContextualSearchLayer> contextual_search_layer_;
   scoped_refptr<cc::Layer> content_container_;
diff --git a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc
index 488f0f5..976dec6 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc
@@ -41,22 +41,25 @@
     JNIEnv* env,
     jobject obj,
     const base::android::JavaParamRef<jobject>& java_web_contents) {
-  web_contents_ = content::WebContents::FromJavaWebContents(java_web_contents);
-  if (!web_contents_)
+  content::WebContents* web_contents =
+      content::WebContents::FromJavaWebContents(java_web_contents);
+  if (!web_contents)
     return;
 
-  SetupRankerPredictor();
+  source_id_ = ukm::GetSourceIdForWebContentsDocument(web_contents);
+  SetupRankerPredictor(*web_contents);
   // Start building example data based on features to be gathered and logged.
   ranker_example_ = std::make_unique<assist_ranker::RankerExample>();
 }
 
-void ContextualSearchRankerLoggerImpl::SetupRankerPredictor() {
+void ContextualSearchRankerLoggerImpl::SetupRankerPredictor(
+    const content::WebContents& web_contents) {
   // Create one predictor for the current BrowserContext.
   if (browser_context_) {
-    DCHECK(browser_context_ == web_contents_->GetBrowserContext());
+    DCHECK(browser_context_ == web_contents.GetBrowserContext());
     return;
   }
-  browser_context_ = web_contents_->GetBrowserContext();
+  browser_context_ = web_contents.GetBrowserContext();
 
   assist_ranker::AssistRankerService* assist_ranker_service =
       assist_ranker::AssistRankerServiceFactory::GetForBrowserContext(
@@ -119,10 +122,9 @@
 
 void ContextualSearchRankerLoggerImpl::WriteLogAndReset(JNIEnv* env,
                                                         jobject obj) {
-  if (predictor_ && ranker_example_) {
-    ukm::SourceId source_id =
-        ukm::GetSourceIdForWebContentsDocument(web_contents_);
-    predictor_->LogExampleToUkm(*ranker_example_.get(), source_id);
+  if (predictor_ && ranker_example_ && source_id_ != ukm::kInvalidSourceId) {
+    predictor_->LogExampleToUkm(*ranker_example_.get(), source_id_);
+    source_id_ = ukm::kInvalidSourceId;
   }
   has_predicted_decision_ = false;
   ranker_example_ = std::make_unique<assist_ranker::RankerExample>();
diff --git a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h
index 41a3aa3..a62bad96 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h
@@ -7,6 +7,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/memory/weak_ptr.h"
+#include "services/metrics/public/cpp/ukm_source_id.h"
 
 namespace content {
 class BrowserContext;
@@ -73,12 +74,10 @@
   void LogFeature(const std::string& feature_name, int value);
 
   // Sets up the Ranker Predictor for the given |web_contents|.
-  void SetupRankerPredictor();
+  void SetupRankerPredictor(const content::WebContents& web_contents);
 
-  // The WebContents object used to produce the source_id for UKMs, and to get
-  // browser_context when fetching the predictor. The object is not owned by
-  // ContextualSearchRankerLoggerImpl.
-  content::WebContents* web_contents_ = nullptr;
+  // The source_id for UKMs for the current page.
+  ukm::SourceId source_id_ = ukm::kInvalidSourceId;
 
   // The Ranker Predictor for whether a tap gesture should be suppressed or not.
   base::WeakPtr<assist_ranker::BinaryClassifierPredictor> predictor_;
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index bdb0c85..ddacac85 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -1195,6 +1195,34 @@
   }
 }
 
+static void JNI_PrefServiceBridge_MoveAcceptLanguage(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj,
+    const JavaParamRef<jstring>& language,
+    jint offset) {
+  std::unique_ptr<translate::TranslatePrefs> translate_prefs =
+      ChromeTranslateClient::CreateTranslatePrefs(GetPrefService());
+
+  std::vector<std::string> languages;
+  translate_prefs->GetLanguageList(&languages);
+
+  std::string language_code(ConvertJavaStringToUTF8(env, language));
+
+  translate::TranslatePrefs::RearrangeSpecifier where =
+      translate::TranslatePrefs::kNone;
+
+  if (offset > 0) {
+    where = translate::TranslatePrefs::kDown;
+  } else {
+    offset = -offset;
+    where = translate::TranslatePrefs::kUp;
+  }
+
+  for (int i = 0; i < offset; ++i) {
+    translate_prefs->RearrangeLanguage(language_code, where, languages);
+  }
+}
+
 static ScopedJavaLocalRef<jstring>
 JNI_PrefServiceBridge_GetDownloadDefaultDirectory(
     JNIEnv* env,
diff --git a/chrome/browser/android/webapk/webapk_installer.cc b/chrome/browser/android/webapk/webapk_installer.cc
index 41700b4..142dc0c6 100644
--- a/chrome/browser/android/webapk/webapk_installer.cc
+++ b/chrome/browser/android/webapk/webapk_installer.cc
@@ -12,6 +12,7 @@
 #include "base/android/jni_string.h"
 #include "base/android/path_utils.h"
 #include "base/bind.h"
+#include "base/callback.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
@@ -31,16 +32,17 @@
 #include "chrome/browser/android/webapk/webapk_icon_hasher.h"
 #include "chrome/browser/android/webapk/webapk_install_service.h"
 #include "chrome/browser/android/webapk/webapk_metrics.h"
+#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/version_info/version_info.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/browser/browsing_data_remover.h"
 #include "content/public/common/manifest_util.h"
 #include "jni/WebApkInstaller_jni.h"
 #include "net/base/load_flags.h"
 #include "net/http/http_status_code.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
-#include "net/url_request/url_fetcher.h"
 #include "ui/gfx/android/java_bitmap.h"
 #include "ui/gfx/codec/png_codec.h"
 #include "ui/gfx/color_utils.h"
@@ -60,6 +62,44 @@
 // the WebAPK server.
 const int kWebApkDownloadUrlTimeoutMs = 60000;
 
+class CacheClearer : public content::BrowsingDataRemover::Observer {
+ public:
+  ~CacheClearer() override { remover_->RemoveObserver(this); }
+
+  // Clear Chrome's cache. Run |callback| once clearing the cache is complete.
+  static void FreeCacheAsync(content::BrowsingDataRemover* remover,
+                             base::OnceClosure callback) {
+    // CacheClearer manages its own lifetime and deletes itself when finished.
+    auto* cache_clearer = new CacheClearer(remover, std::move(callback));
+    remover->AddObserver(cache_clearer);
+    remover->RemoveAndReply(base::Time(), base::Time::Max(),
+                            content::BrowsingDataRemover::DATA_TYPE_CACHE,
+                            ChromeBrowsingDataRemoverDelegate::ALL_ORIGIN_TYPES,
+                            cache_clearer);
+  }
+
+ private:
+  CacheClearer(content::BrowsingDataRemover* remover,
+               base::OnceClosure callback)
+      : remover_(remover), install_callback_(std::move(callback)) {}
+
+  void OnBrowsingDataRemoverDone() override {
+    std::move(install_callback_).Run();
+    delete this;  // Matches the new in FreeCacheAsync()
+  }
+
+  content::BrowsingDataRemover* remover_;
+
+  base::OnceClosure install_callback_;
+
+  DISALLOW_COPY_AND_ASSIGN(CacheClearer);
+};
+
+net::URLRequestContextGetter* GetRequestContext(
+    content::BrowserContext* browser_context) {
+  return Profile::FromBrowserContext(browser_context)->GetRequestContext();
+}
+
 // Returns the WebAPK server URL based on the command line.
 GURL GetServerUrl() {
   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -404,8 +444,7 @@
 }
 
 WebApkInstaller::WebApkInstaller(content::BrowserContext* browser_context)
-    : request_context_getter_(
-          Profile::FromBrowserContext(browser_context)->GetRequestContext()),
+    : browser_context_(browser_context),
       server_url_(GetServerUrl()),
       webapk_server_timeout_ms_(kWebApkDownloadUrlTimeoutMs),
       relax_updates_(false),
@@ -433,18 +472,33 @@
   finish_callback_ = finish_callback;
   task_type_ = INSTALL;
 
-  // We need to take the hash of the bitmap at the icon URL prior to any
-  // transformations being applied to the bitmap (such as encoding/decoding
-  // the bitmap). The icon hash is used to determine whether the icon that
-  // the user sees matches the icon of a WebAPK that the WebAPK server
-  // generated for another user. (The icon can be dynamically generated.)
-  //
-  // We redownload the icon in order to take the Murmur2 hash. The redownload
-  // should be fast because the icon should be in the HTTP cache.
-  WebApkIconHasher::DownloadAndComputeMurmur2Hash(
-      request_context_getter_, install_shortcut_info_->best_primary_icon_url,
-      base::Bind(&WebApkInstaller::OnGotPrimaryIconMurmur2Hash,
-                 weak_ptr_factory_.GetWeakPtr()));
+  CheckFreeSpace();
+}
+
+void WebApkInstaller::CheckFreeSpace() {
+  JNIEnv* env = base::android::AttachCurrentThread();
+  Java_WebApkInstaller_checkFreeSpace(env, java_ref_);
+}
+
+void WebApkInstaller::OnGotSpaceStatus(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj,
+    jint status) {
+  SpaceStatus space_status = static_cast<SpaceStatus>(status);
+
+  if (space_status == SpaceStatus::NOT_ENOUGH_SPACE) {
+    OnResult(WebApkInstallResult::FAILURE);
+    return;
+  }
+
+  if (space_status == SpaceStatus::ENOUGH_SPACE_AFTER_FREE_UP_CACHE) {
+    CacheClearer::FreeCacheAsync(
+        content::BrowserContext::GetBrowsingDataRemover(browser_context_),
+        base::BindOnce(&WebApkInstaller::OnHaveSufficientSpaceForInstall,
+                       weak_ptr_factory_.GetWeakPtr()));
+  } else {
+    OnHaveSufficientSpaceForInstall();
+  }
 }
 
 void WebApkInstaller::UpdateAsync(const base::FilePath& update_request_path,
@@ -514,6 +568,22 @@
   InstallOrUpdateWebApk(response->package_name(), version, token);
 }
 
+void WebApkInstaller::OnHaveSufficientSpaceForInstall() {
+  // We need to take the hash of the bitmap at the icon URL prior to any
+  // transformations being applied to the bitmap (such as encoding/decoding
+  // the bitmap). The icon hash is used to determine whether the icon that
+  // the user sees matches the icon of a WebAPK that the WebAPK server
+  // generated for another user. (The icon can be dynamically generated.)
+  //
+  // We redownload the icon in order to take the Murmur2 hash. The redownload
+  // should be fast because the icon should be in the HTTP cache.
+  WebApkIconHasher::DownloadAndComputeMurmur2Hash(
+      GetRequestContext(browser_context_),
+      install_shortcut_info_->best_primary_icon_url,
+      base::Bind(&WebApkInstaller::OnGotPrimaryIconMurmur2Hash,
+                 weak_ptr_factory_.GetWeakPtr()));
+}
+
 void WebApkInstaller::OnGotPrimaryIconMurmur2Hash(
     const std::string& primary_icon_hash) {
   // An empty hash indicates an error during hash calculation.
@@ -526,7 +596,8 @@
       install_shortcut_info_->best_badge_icon_url !=
           install_shortcut_info_->best_primary_icon_url) {
     WebApkIconHasher::DownloadAndComputeMurmur2Hash(
-        request_context_getter_, install_shortcut_info_->best_badge_icon_url,
+        GetRequestContext(browser_context_),
+        install_shortcut_info_->best_badge_icon_url,
         base::Bind(&WebApkInstaller::OnGotBadgeIconMurmur2Hash,
                    weak_ptr_factory_.GetWeakPtr(), true, primary_icon_hash));
   } else {
@@ -571,7 +642,7 @@
 
   url_fetcher_ =
       net::URLFetcher::Create(server_url_, net::URLFetcher::POST, this);
-  url_fetcher_->SetRequestContext(request_context_getter_);
+  url_fetcher_->SetRequestContext(GetRequestContext(browser_context_));
   url_fetcher_->SetUploadData(kProtoMimeType, *serialized_proto);
   url_fetcher_->SetLoadFlags(
       net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SEND_COOKIES |
diff --git a/chrome/browser/android/webapk/webapk_installer.h b/chrome/browser/android/webapk/webapk_installer.h
index 6139cbc..03e43a0 100644
--- a/chrome/browser/android/webapk/webapk_installer.h
+++ b/chrome/browser/android/webapk/webapk_installer.h
@@ -31,6 +31,14 @@
 class BrowserContext;
 }
 
+// A Java counterpart will be generated for this enum.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.webapps
+enum class SpaceStatus {
+  ENOUGH_SPACE = 0,
+  ENOUGH_SPACE_AFTER_FREE_UP_CACHE = 1,
+  NOT_ENOUGH_SPACE = 2,
+};
+
 // Talks to Chrome WebAPK server to download metadata about a WebAPK and issue
 // a request for it to be installed. The native WebApkInstaller owns the Java
 // WebApkInstaller counterpart.
@@ -79,6 +87,14 @@
                          const base::android::JavaParamRef<jobject>& obj,
                          jint result);
 
+  // Checks if there is enough space to install a WebAPK.
+  // If yes, continue the WebAPK installation process. If there is not enough
+  // space to install (even after clearing Chrome's cache), fails the
+  // installation process immediately.
+  void OnGotSpaceStatus(JNIEnv* env,
+                        const base::android::JavaParamRef<jobject>& obj,
+                        jint status);
+
   // Asynchronously builds the WebAPK proto on a background thread for an update
   // or install request. Runs |callback| on the calling thread when complete.
   static void BuildProto(
@@ -115,6 +131,9 @@
                                      int version,
                                      const std::string& token);
 
+  // Checks if there is enough space to install a WebAPK.
+  virtual void CheckFreeSpace();
+
   // Called when the install or update process has completed or failed.
   void OnResult(WebApkInstallResult result);
 
@@ -143,6 +162,12 @@
   void UpdateAsync(const base::FilePath& update_request_path,
                    const FinishCallback& finish_callback);
 
+  // Called once there is sufficient space on the user's device to install a
+  // WebAPK. The user may already have had sufficient space on their device
+  // prior to initiating the install process. This method might be called as a
+  // result of freeing up memory by clearing Chrome's cache.
+  void OnHaveSufficientSpaceForInstall();
+
   // Called with the contents of the update request file.
   void OnReadUpdateRequest(std::unique_ptr<std::string> update_request);
 
@@ -164,7 +189,7 @@
   // Google Play.
   void SendRequest(std::unique_ptr<std::string> serialized_proto);
 
-  net::URLRequestContextGetter* request_context_getter_;
+  content::BrowserContext* browser_context_;
 
   // Sends HTTP request to WebAPK server.
   std::unique_ptr<net::URLFetcher> url_fetcher_;
diff --git a/chrome/browser/android/webapk/webapk_installer_unittest.cc b/chrome/browser/android/webapk/webapk_installer_unittest.cc
index 574a83f..4cca7f18 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -65,8 +65,9 @@
 // WebApkInstaller::InstallOrUpdateWebApkFromGooglePlay() are stubbed out.
 class TestWebApkInstaller : public WebApkInstaller {
  public:
-  explicit TestWebApkInstaller(content::BrowserContext* browser_context)
-      : WebApkInstaller(browser_context) {}
+  explicit TestWebApkInstaller(content::BrowserContext* browser_context,
+                               SpaceStatus status)
+      : WebApkInstaller(browser_context), test_space_status_(status) {}
 
   void InstallOrUpdateWebApk(const std::string& package_name,
                              int version,
@@ -82,6 +83,14 @@
   }
 
  private:
+  void CheckFreeSpace() override {
+    OnGotSpaceStatus(nullptr, base::android::JavaParamRef<jobject>(nullptr),
+                     static_cast<int>(test_space_status_));
+  }
+
+  // The space status used in tests.
+  SpaceStatus test_space_status_;
+
   DISALLOW_COPY_AND_ASSIGN(TestWebApkInstaller);
 };
 
@@ -90,10 +99,12 @@
  public:
   WebApkInstallerRunner(content::BrowserContext* browser_context,
                         const GURL& best_primary_icon_url,
-                        const GURL& best_badge_icon_url)
+                        const GURL& best_badge_icon_url,
+                        SpaceStatus test_space_status)
       : browser_context_(browser_context),
         best_primary_icon_url_(best_primary_icon_url),
-        best_badge_icon_url_(best_badge_icon_url) {}
+        best_badge_icon_url_(best_badge_icon_url),
+        test_space_status_(test_space_status) {}
 
   ~WebApkInstallerRunner() {}
 
@@ -126,7 +137,8 @@
 
   WebApkInstaller* CreateWebApkInstaller() {
     // WebApkInstaller owns itself.
-    WebApkInstaller* installer = new TestWebApkInstaller(browser_context_);
+    WebApkInstaller* installer =
+        new TestWebApkInstaller(browser_context_, test_space_status_);
     installer->SetTimeoutMs(100);
     return installer;
   }
@@ -147,6 +159,9 @@
   const GURL best_primary_icon_url_;
   const GURL best_badge_icon_url_;
 
+  // The space status used in tests.
+  SpaceStatus test_space_status_;
+
   // Called after the installation process has succeeded or failed.
   base::Closure on_completed_callback_;
 
@@ -312,9 +327,14 @@
     webapk_response_builder_ = builder;
   }
 
+  // Sets the function that should be used to build the response to the
+  // WebAPK creation request.
+  void SetSpaceStatus(const SpaceStatus status) { test_space_status_ = status; }
+
   std::unique_ptr<WebApkInstallerRunner> CreateWebApkInstallerRunner() {
-    return std::unique_ptr<WebApkInstallerRunner>(new WebApkInstallerRunner(
-        profile_.get(), best_primary_icon_url_, best_badge_icon_url_));
+    return std::unique_ptr<WebApkInstallerRunner>(
+        new WebApkInstallerRunner(profile_.get(), best_primary_icon_url_,
+                                  best_badge_icon_url_, test_space_status_));
   }
 
   std::unique_ptr<BuildProtoRunner> CreateBuildProtoRunner() {
@@ -330,6 +350,7 @@
     SetBestBadgeIconUrl(test_server_.GetURL(kBestBadgeIconUrl));
     SetWebApkServerUrl(test_server_.GetURL(kServerUrl));
     SetWebApkResponseBuilder(base::Bind(&BuildValidWebApkResponse, kToken));
+    SetSpaceStatus(SpaceStatus::ENOUGH_SPACE);
   }
 
   std::unique_ptr<net::test_server::HttpResponse> HandleWebApkRequest(
@@ -350,6 +371,9 @@
   // Builds response to the WebAPK creation request.
   WebApkResponseBuilder webapk_response_builder_;
 
+  // The space status used in tests.
+  SpaceStatus test_space_status_;
+
   DISALLOW_COPY_AND_ASSIGN(WebApkInstallerTest);
 };
 
@@ -360,6 +384,14 @@
   EXPECT_EQ(WebApkInstallResult::SUCCESS, runner->result());
 }
 
+// Test that installation fails if there is not enough space on device.
+TEST_F(WebApkInstallerTest, FailOnLowSpace) {
+  SetSpaceStatus(SpaceStatus::NOT_ENOUGH_SPACE);
+  std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();
+  runner->RunInstallWebApk();
+  EXPECT_EQ(WebApkInstallResult::FAILURE, runner->result());
+}
+
 // Test that installation fails if fetching the bitmap at the best primary icon
 // URL returns no content. In a perfect world the fetch would always succeed
 // because the fetch for the same icon succeeded recently.
diff --git a/chrome/browser/android/webapk/webapk_metrics.cc b/chrome/browser/android/webapk/webapk_metrics.cc
index 9bd8681..e2e9cea 100644
--- a/chrome/browser/android/webapk/webapk_metrics.cc
+++ b/chrome/browser/android/webapk/webapk_metrics.cc
@@ -36,6 +36,8 @@
       break;
     case WebAppInstallSource::MENU:
       source = InstallSource::INSTALL_SOURCE_MENU;
+    case WebAppInstallSource::MANAGEMENT_API:
+    // MANAGEMENT_API is not reported. Fallthrough to NOTREACHED().
     case WebAppInstallSource::COUNT:
       NOTREACHED();
       return;
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 89bc54c5..d749138 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -1401,13 +1401,6 @@
 #if defined(OS_MACOSX)
   if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
           ::switches::kEnableTranslateNewUX)) {
-    // On MacViews kEnableTranslateNewUX will engage the MacViews bubble UI
-    // which isn't ready and isn't used yet. The Cocoa browser still uses an
-    // InfoBar. See http://crbug.com/781134. So only continue when testing the
-    // Cocoa UI.
-    if (base::FeatureList::IsEnabled(features::kShowAllDialogsWithViewsToolkit))
-      return;
-
     base::CommandLine::ForCurrentProcess()->AppendSwitch(
         ::switches::kEnableTranslateNewUX);
   }
diff --git a/chrome/browser/background_fetch/background_fetch_delegate_impl.cc b/chrome/browser/background_fetch/background_fetch_delegate_impl.cc
index d25348e..8c48a5ea 100644
--- a/chrome/browser/background_fetch/background_fetch_delegate_impl.cc
+++ b/chrome/browser/background_fetch/background_fetch_delegate_impl.cc
@@ -396,19 +396,23 @@
   // TODO(delphick): Start new downloads that weren't started because of pause.
 }
 
-const offline_items_collection::OfflineItem*
-BackgroundFetchDelegateImpl::GetItemById(
-    const offline_items_collection::ContentId& id) {
+void BackgroundFetchDelegateImpl::GetItemById(
+    const offline_items_collection::ContentId& id,
+    SingleItemCallback callback) {
   auto it = job_details_map_.find(id.id);
-  return (it != job_details_map_.end()) ? &it->second.offline_item : nullptr;
+  base::Optional<offline_items_collection::OfflineItem> offline_item;
+  if (it != job_details_map_.end())
+    offline_item = it->second.offline_item;
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), offline_item));
 }
 
-BackgroundFetchDelegateImpl::OfflineItemList
-BackgroundFetchDelegateImpl::GetAllItems() {
+void BackgroundFetchDelegateImpl::GetAllItems(MultipleItemCallback callback) {
   OfflineItemList item_list;
   for (auto& entry : job_details_map_)
     item_list.push_back(entry.second.offline_item);
-  return item_list;
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), item_list));
 }
 
 void BackgroundFetchDelegateImpl::GetVisualsForItem(
diff --git a/chrome/browser/background_fetch/background_fetch_delegate_impl.h b/chrome/browser/background_fetch/background_fetch_delegate_impl.h
index c4d60880..3c90e5e 100644
--- a/chrome/browser/background_fetch/background_fetch_delegate_impl.h
+++ b/chrome/browser/background_fetch/background_fetch_delegate_impl.h
@@ -81,9 +81,9 @@
   void PauseDownload(const offline_items_collection::ContentId& id) override;
   void ResumeDownload(const offline_items_collection::ContentId& id,
                       bool has_user_gesture) override;
-  const offline_items_collection::OfflineItem* GetItemById(
-      const offline_items_collection::ContentId& id) override;
-  OfflineItemList GetAllItems() override;
+  void GetItemById(const offline_items_collection::ContentId& id,
+                   SingleItemCallback callback) override;
+  void GetAllItems(MultipleItemCallback callback) override;
   void GetVisualsForItem(const offline_items_collection::ContentId& id,
                          const VisualsCallback& callback) override;
   void AddObserver(Observer* observer) override;
diff --git a/chrome/browser/banners/app_banner_manager_desktop.cc b/chrome/browser/banners/app_banner_manager_desktop.cc
index d8ed4a2..98ad248 100644
--- a/chrome/browser/banners/app_banner_manager_desktop.cc
+++ b/chrome/browser/banners/app_banner_manager_desktop.cc
@@ -83,16 +83,14 @@
 }
 
 void AppBannerManagerDesktop::ShowBannerUi(WebAppInstallSource install_source) {
-  // TODO(mcgreevy): log install_source to Webapp.Install.InstallSource
-  // histogram.
   content::WebContents* contents = web_contents();
   DCHECK(contents && !manifest_.IsEmpty());
 
   Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
   WebApplicationInfo web_app_info;
 
-  bookmark_app_helper_.reset(
-      new extensions::BookmarkAppHelper(profile, web_app_info, contents));
+  bookmark_app_helper_.reset(new extensions::BookmarkAppHelper(
+      profile, web_app_info, contents, install_source));
 
   if (IsExperimentalAppBannersEnabled()) {
     RecordDidShowBanner("AppBanner.WebApp.Shown");
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
index b3c6a4a..80f0d540 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
@@ -11,8 +11,6 @@
 #include "net/url_request/url_request_context_getter.h"
 #include "net/url_request/url_request_status.h"
 
-namespace chrome {
-
 BitmapFetcher::BitmapFetcher(
     const GURL& url,
     BitmapFetcherDelegate* delegate,
@@ -72,5 +70,3 @@
 void BitmapFetcher::ReportFailure() {
   delegate_->OnFetchComplete(url_, NULL);
 }
-
-}  // namespace chrome
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
index 3e28b91..0e459e44 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.h
@@ -19,8 +19,6 @@
 
 class SkBitmap;
 
-namespace chrome {
-
 // Asynchrounously fetches an image from the given URL and returns the
 // decoded Bitmap to the provided BitmapFetcherDelegate.
 class BitmapFetcher : public ImageDecoder::ImageRequest {
@@ -73,6 +71,4 @@
   DISALLOW_COPY_AND_ASSIGN(BitmapFetcher);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_BROWSER_BITMAP_FETCHER_BITMAP_FETCHER_H_
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
index c9e4144..8c17e644 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
@@ -35,8 +35,6 @@
 using net::test_server::HttpRequest;
 using net::test_server::HttpResponse;
 
-namespace chrome {
-
 // Class to catch events from the BitmapFetcher for testing.
 class BitmapFetcherTestDelegate : public BitmapFetcherDelegate {
  public:
@@ -230,5 +228,3 @@
 
   EXPECT_FALSE(delegate.success());
 }
-
-}  // namespace chrome
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
index 8956153..a92d00a 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
@@ -10,8 +10,6 @@
 
 class SkBitmap;
 
-namespace chrome {
-
 // A delegate interface for users of BitmapFetcher.
 class BitmapFetcherDelegate {
  public:
@@ -29,6 +27,4 @@
   DISALLOW_COPY_AND_ASSIGN(BitmapFetcherDelegate);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_BROWSER_BITMAP_FETCHER_BITMAP_FETCHER_DELEGATE_H_
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc
index 1052408..d6b8b62 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc
@@ -32,13 +32,13 @@
   BitmapFetcherService::RequestId request_id() const { return request_id_; }
 
   // Weak ptr |fetcher| is used to identify associated fetchers.
-  void set_fetcher(const chrome::BitmapFetcher* fetcher) { fetcher_ = fetcher; }
-  const chrome::BitmapFetcher* get_fetcher() const { return fetcher_; }
+  void set_fetcher(const BitmapFetcher* fetcher) { fetcher_ = fetcher; }
+  const BitmapFetcher* get_fetcher() const { return fetcher_; }
 
  private:
   const BitmapFetcherService::RequestId request_id_;
   std::unique_ptr<BitmapFetcherService::Observer> observer_;
-  const chrome::BitmapFetcher* fetcher_;
+  const BitmapFetcher* fetcher_;
 
   DISALLOW_COPY_AND_ASSIGN(BitmapFetcherRequest);
 };
@@ -110,8 +110,7 @@
     return REQUEST_ID_INVALID;
 
   // Make sure there's a fetcher for this URL and attach to request.
-  const chrome::BitmapFetcher* fetcher =
-      EnsureFetcherForUrl(url, traffic_annotation);
+  const BitmapFetcher* fetcher = EnsureFetcherForUrl(url, traffic_annotation);
   request->set_fetcher(fetcher);
 
   requests_.push_back(std::move(request));
@@ -125,11 +124,11 @@
     EnsureFetcherForUrl(url, traffic_annotation);
 }
 
-std::unique_ptr<chrome::BitmapFetcher> BitmapFetcherService::CreateFetcher(
+std::unique_ptr<BitmapFetcher> BitmapFetcherService::CreateFetcher(
     const GURL& url,
     const net::NetworkTrafficAnnotationTag& traffic_annotation) {
-  std::unique_ptr<chrome::BitmapFetcher> new_fetcher(
-      new chrome::BitmapFetcher(url, this, traffic_annotation));
+  std::unique_ptr<BitmapFetcher> new_fetcher(
+      new BitmapFetcher(url, this, traffic_annotation));
 
   new_fetcher->Init(
       std::string(),
@@ -141,21 +140,20 @@
   return new_fetcher;
 }
 
-const chrome::BitmapFetcher* BitmapFetcherService::EnsureFetcherForUrl(
+const BitmapFetcher* BitmapFetcherService::EnsureFetcherForUrl(
     const GURL& url,
     const net::NetworkTrafficAnnotationTag& traffic_annotation) {
-  const chrome::BitmapFetcher* fetcher = FindFetcherForUrl(url);
+  const BitmapFetcher* fetcher = FindFetcherForUrl(url);
   if (fetcher)
     return fetcher;
 
-  std::unique_ptr<chrome::BitmapFetcher> new_fetcher =
+  std::unique_ptr<BitmapFetcher> new_fetcher =
       CreateFetcher(url, traffic_annotation);
   active_fetchers_.push_back(std::move(new_fetcher));
   return active_fetchers_.back().get();
 }
 
-const chrome::BitmapFetcher* BitmapFetcherService::FindFetcherForUrl(
-    const GURL& url) {
+const BitmapFetcher* BitmapFetcherService::FindFetcherForUrl(const GURL& url) {
   for (auto it = active_fetchers_.begin(); it != active_fetchers_.end(); ++it) {
     if (url == (*it)->url())
       return it->get();
@@ -163,7 +161,7 @@
   return nullptr;
 }
 
-void BitmapFetcherService::RemoveFetcher(const chrome::BitmapFetcher* fetcher) {
+void BitmapFetcherService::RemoveFetcher(const BitmapFetcher* fetcher) {
   auto it = active_fetchers_.begin();
   for (; it != active_fetchers_.end(); ++it) {
     if (it->get() == fetcher)
@@ -176,7 +174,7 @@
 
 void BitmapFetcherService::OnFetchComplete(const GURL& url,
                                            const SkBitmap* bitmap) {
-  const chrome::BitmapFetcher* fetcher = FindFetcherForUrl(url);
+  const BitmapFetcher* fetcher = FindFetcherForUrl(url);
   DCHECK(fetcher);
 
   // Notify all attached requests of completion.
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h
index a40834c..cf02144 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h
@@ -18,17 +18,13 @@
 class BrowserContext;
 }  // namespace content
 
-namespace chrome {
 class BitmapFetcher;
-}  // namespace chrome
-
 class BitmapFetcherRequest;
 class GURL;
 class SkBitmap;
 
 // Service to retrieve images for Answers in Suggest.
-class BitmapFetcherService : public KeyedService,
-                             public chrome::BitmapFetcherDelegate {
+class BitmapFetcherService : public KeyedService, public BitmapFetcherDelegate {
  public:
   typedef int RequestId;
   static const RequestId REQUEST_ID_INVALID = 0;
@@ -69,7 +65,7 @@
  protected:
   // Create a bitmap fetcher for the given |url| and start it. Virtual method
   // so tests can override this for different behavior.
-  virtual std::unique_ptr<chrome::BitmapFetcher> CreateFetcher(
+  virtual std::unique_ptr<BitmapFetcher> CreateFetcher(
       const GURL& url,
       const net::NetworkTrafficAnnotationTag& traffic_annotation);
 
@@ -78,22 +74,22 @@
 
   // Gets the existing fetcher for |url| or constructs a new one if it doesn't
   // exist.
-  const chrome::BitmapFetcher* EnsureFetcherForUrl(
+  const BitmapFetcher* EnsureFetcherForUrl(
       const GURL& url,
       const net::NetworkTrafficAnnotationTag& traffic_annotation);
 
   // Find a fetcher with a given |url|. Return NULL if none is found.
-  const chrome::BitmapFetcher* FindFetcherForUrl(const GURL& url);
+  const BitmapFetcher* FindFetcherForUrl(const GURL& url);
 
   // Remove |fetcher| from list of active fetchers. |fetcher| MUST be part of
   // the list.
-  void RemoveFetcher(const chrome::BitmapFetcher* fetcher);
+  void RemoveFetcher(const BitmapFetcher* fetcher);
 
   // BitmapFetcherDelegate implementation.
   void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override;
 
   // Currently active image fetchers.
-  std::vector<std::unique_ptr<chrome::BitmapFetcher>> active_fetchers_;
+  std::vector<std::unique_ptr<BitmapFetcher>> active_fetchers_;
 
   // Currently active requests.
   std::vector<std::unique_ptr<BitmapFetcherRequest>> requests_;
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
index 4da421b..26015c7 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
@@ -48,11 +48,10 @@
 
   // Create a fetcher, but don't start downloading. That allows side-stepping
   // the decode step, which requires a utility process.
-  std::unique_ptr<chrome::BitmapFetcher> CreateFetcher(
+  std::unique_ptr<BitmapFetcher> CreateFetcher(
       const GURL& url,
       const net::NetworkTrafficAnnotationTag& traffic_annotation) override {
-    return base::MakeUnique<chrome::BitmapFetcher>(url, this,
-                                                   traffic_annotation);
+    return base::MakeUnique<BitmapFetcher>(url, this, traffic_annotation);
   }
 };
 
@@ -75,8 +74,7 @@
   const std::vector<std::unique_ptr<BitmapFetcherRequest>>& requests() const {
     return service_->requests_;
   }
-  const std::vector<std::unique_ptr<chrome::BitmapFetcher>>& active_fetchers()
-      const {
+  const std::vector<std::unique_ptr<BitmapFetcher>>& active_fetchers() const {
     return service_->active_fetchers_;
   }
   size_t cache_size() const { return service_->cache_.size(); }
@@ -87,7 +85,7 @@
 
   // Simulate finishing a URL fetch and decode for the given fetcher.
   void CompleteFetch(const GURL& url) {
-    const chrome::BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
+    const BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
     ASSERT_TRUE(fetcher);
 
     // Create a non-empty bitmap.
@@ -95,20 +93,20 @@
     image.allocN32Pixels(2, 2);
     image.eraseColor(SK_ColorGREEN);
 
-    const_cast<chrome::BitmapFetcher*>(fetcher)->OnImageDecoded(image);
+    const_cast<BitmapFetcher*>(fetcher)->OnImageDecoded(image);
   }
 
   void FailFetch(const GURL& url) {
-    const chrome::BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
+    const BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
     ASSERT_TRUE(fetcher);
-    const_cast<chrome::BitmapFetcher*>(fetcher)->OnImageDecoded(SkBitmap());
+    const_cast<BitmapFetcher*>(fetcher)->OnImageDecoded(SkBitmap());
   }
 
   // A failed decode results in a nullptr image.
   void FailDecode(const GURL& url) {
-    const chrome::BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
+    const BitmapFetcher* fetcher = service_->FindFetcherForUrl(url);
     ASSERT_TRUE(fetcher);
-    const_cast<chrome::BitmapFetcher*>(fetcher)->OnDecodeImageFailed();
+    const_cast<BitmapFetcher*>(fetcher)->OnDecodeImageFailed();
   }
 
  protected:
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 5ff8817..562fe79 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -577,8 +577,7 @@
   if (!network_connection_tracker_) {
     network_connection_tracker_ =
         std::make_unique<content::NetworkConnectionTracker>();
-    network_connection_tracker_->Initialize(
-        io_thread_->GetNetworkServiceOnUIThread());
+    network_connection_tracker_->Initialize(content::GetNetworkService());
   }
   return network_connection_tracker_.get();
 }
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
index 2f223ff..1da88bf22 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -392,7 +392,7 @@
     int remove_mask,
     const BrowsingDataFilterBuilder& filter_builder,
     int origin_type_mask,
-    const base::Closure& callback) {
+    base::OnceClosure callback) {
   DCHECK(((remove_mask & ~FILTERABLE_DATA_TYPES) == 0) ||
          filter_builder.IsEmptyBlacklist());
 
@@ -433,7 +433,7 @@
   //////////////////////////////////////////////////////////////////////////////
   // INITIALIZATION
   synchronous_clear_operations_.Start();
-  callback_ = callback;
+  callback_ = std::move(callback);
 
   delete_begin_ = delete_begin;
   delete_end_ = delete_end;
@@ -1130,7 +1130,7 @@
     return;
 
   DCHECK(!callback_.is_null());
-  callback_.Run();
+  std::move(callback_).Run();
 }
 
 bool ChromeBrowsingDataRemoverDelegate::AllDone() {
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h
index fae6465..09c34a15 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h
@@ -188,7 +188,7 @@
       int remove_mask,
       const content::BrowsingDataFilterBuilder& filter_builder,
       int origin_type_mask,
-      const base::Closure& callback) override;
+      base::OnceClosure callback) override;
 
 #if defined(OS_ANDROID)
   void OverrideWebappRegistryForTesting(
@@ -246,7 +246,7 @@
   base::Time delete_end_;
 
   // Completion callback to call when all data are deleted.
-  base::Closure callback_;
+  base::OnceClosure callback_;
 
   // A callback to NotifyIfDone() used by SubTasks instances.
   const base::Closure sub_task_forward_callback_;
diff --git a/chrome/browser/chrome_content_gpu_manifest_overlay.json b/chrome/browser/chrome_content_gpu_manifest_overlay.json
index d7ce0b6..0d7c7c1 100644
--- a/chrome/browser/chrome_content_gpu_manifest_overlay.json
+++ b/chrome/browser/chrome_content_gpu_manifest_overlay.json
@@ -5,8 +5,6 @@
       "provides": {
         "browser": [
           "arc::mojom::ProtectedBufferManager",
-          "arc::mojom::VideoDecodeAcceleratorDeprecated",
-          "arc::mojom::VideoDecodeClientDeprecated",
           "arc::mojom::VideoDecodeAccelerator",
           "arc::mojom::VideoDecodeClient",
           "arc::mojom::VideoEncodeAccelerator",
diff --git a/chrome/browser/chrome_site_per_process_browsertest.cc b/chrome/browser/chrome_site_per_process_browsertest.cc
index 91a9a7c..8c6ea242 100644
--- a/chrome/browser/chrome_site_per_process_browsertest.cc
+++ b/chrome/browser/chrome_site_per_process_browsertest.cc
@@ -888,7 +888,7 @@
 
   // Disable spellcheck
   PrefService* prefs = user_prefs::UserPrefs::Get(browser_context);
-  prefs->SetBoolean(spellcheck::prefs::kEnableSpellcheck, false);
+  prefs->SetBoolean(spellcheck::prefs::kSpellCheckEnable, false);
   base::RunLoop().RunUntilIdle();
 
   GURL main_url(embedded_test_server()->GetURL(
@@ -909,7 +909,7 @@
   EXPECT_FALSE(filter->HasReceivedText());
 
   content::SetBrowserClientForTesting(old_browser_client);
-  prefs->SetBoolean(spellcheck::prefs::kEnableSpellcheck, true);
+  prefs->SetBoolean(spellcheck::prefs::kSpellCheckEnable, true);
 }
 
 #if BUILDFLAG(HAS_SPELLCHECK_PANEL)
diff --git a/chrome/browser/chromeos/app_mode/app_launch_utils.cc b/chrome/browser/chromeos/app_mode/app_launch_utils.cc
index 0311b0fa..286e26d 100644
--- a/chrome/browser/chromeos/app_mode/app_launch_utils.cc
+++ b/chrome/browser/chromeos/app_mode/app_launch_utils.cc
@@ -50,8 +50,6 @@
     // with the same app version as the restored session.
     return true;
   }
-  void OnLoadingOAuthFile() override {}
-  void OnInitializingTokenService() override {}
   void OnInstallingApp() override {}
   void OnReadyToLaunch() override { startup_app_launcher_->LaunchApp(); }
   void OnLaunchSucceeded() override { Cleanup(); }
diff --git a/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc b/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc
index 391cbc1..74fc98b 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/files/file_util.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
-#include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/chromeos/app_mode/fake_cws.h"
 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
@@ -27,9 +26,6 @@
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/fake_session_manager_client.h"
 #include "components/ownership/mock_owner_key_util.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/notification_service.h"
 #include "extensions/common/value_builder.h"
 #include "extensions/test/extension_test_message_listener.h"
 #include "net/dns/mock_host_resolver.h"
@@ -42,33 +38,6 @@
 
 const char kTestKioskApp[] = "ggbflgnkafappblpkiflbgpmkfdpnhhe";
 
-// Used to listen for app termination notification.
-class TerminationObserver : public content::NotificationObserver {
- public:
-  TerminationObserver() {
-    registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
-                   content::NotificationService::AllSources());
-  }
-  ~TerminationObserver() override = default;
-
-  // Whether app has been terminated - i.e. whether app termination notification
-  // has been observed.
-  bool terminated() const { return notification_seen_; }
-
- private:
-  void Observe(int type,
-               const content::NotificationSource& source,
-               const content::NotificationDetails& details) override {
-    ASSERT_EQ(chrome::NOTIFICATION_APP_TERMINATING, type);
-    notification_seen_ = true;
-  }
-
-  bool notification_seen_ = false;
-  content::NotificationRegistrar registrar_;
-
-  DISALLOW_COPY_AND_ASSIGN(TerminationObserver);
-};
-
 }  // namespace
 
 class KioskCrashRestoreTest : public InProcessBrowserTest {
@@ -105,11 +74,6 @@
     fake_cws_->SetUpdateCrx(test_app_id_, test_app_id_ + ".crx", "1.0.0");
   }
 
-  void PreRunTestOnMainThread() override {
-    termination_observer_.reset(new TerminationObserver());
-    InProcessBrowserTest::PreRunTestOnMainThread();
-  }
-
   void SetUpOnMainThread() override {
     extensions::browsertest_util::CreateAndInitializeLocalCache();
 
@@ -124,9 +88,6 @@
 
   const std::string& test_app_id() const { return test_app_id_; }
 
- protected:
-  std::unique_ptr<TerminationObserver> termination_observer_;
-
  private:
   void SetUpExistingKioskApp() {
     // Create policy data that contains the test app as an existing kiosk app.
@@ -191,7 +152,6 @@
   // If app is not installed when restoring from crash, the kiosk launch is
   // expected to fail, as in that case the crash occured during the app
   // initialization - before the app was actually launched.
-  EXPECT_TRUE(termination_observer_->terminated());
   EXPECT_EQ(KioskAppLaunchError::UNABLE_TO_LAUNCH, KioskAppLaunchError::Get());
 }
 
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
index 120801ab..41c09543 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc
@@ -6,9 +6,6 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
-#include "base/files/file_path.h"
-#include "base/json/json_file_value_serializer.h"
-#include "base/path_service.h"
 #include "base/syslog_logging.h"
 #include "base/task_scheduler/post_task.h"
 #include "base/time/time.h"
@@ -16,23 +13,18 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
 #include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h"
-#include "chrome/browser/chromeos/login/session/user_session_manager.h"
 #include "chrome/browser/chromeos/net/delay_network_call.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/install_tracker.h"
 #include "chrome/browser/extensions/install_tracker_factory.h"
 #include "chrome/browser/extensions/updater/extension_updater.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
-#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/extensions/app_launch_params.h"
 #include "chrome/browser/ui/extensions/application_launch.h"
-#include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/crx_file/id_util.h"
 #include "components/session_manager/core/session_manager.h"
-#include "components/signin/core/browser/profile_oauth2_token_service.h"
-#include "components/signin/core/browser/signin_manager.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_service.h"
 #include "extensions/browser/extension_system.h"
@@ -42,14 +34,7 @@
 #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
 #include "extensions/common/manifest_handlers/offline_enabled_info.h"
 #include "extensions/common/manifest_url_handlers.h"
-#include "google_apis/gaia/gaia_auth_consumer.h"
-#include "google_apis/gaia/gaia_constants.h"
 #include "net/base/load_flags.h"
-#include "net/url_request/url_fetcher.h"
-#include "net/url_request/url_fetcher_delegate.h"
-#include "net/url_request/url_request_context_getter.h"
-#include "net/url_request/url_request_status.h"
-#include "url/gurl.h"
 
 using content::BrowserThread;
 using extensions::Extension;
@@ -58,13 +43,6 @@
 
 namespace {
 
-const char kOAuthRefreshToken[] = "refresh_token";
-const char kOAuthClientId[] = "client_id";
-const char kOAuthClientSecret[] = "client_secret";
-
-const base::FilePath::CharType kOAuthFileName[] =
-    FILE_PATH_LITERAL("kiosk_auth");
-
 const int kMaxLaunchAttempt = 5;
 
 }  // namespace
@@ -76,7 +54,8 @@
     : profile_(profile),
       app_id_(app_id),
       diagnostic_mode_(diagnostic_mode),
-      delegate_(delegate) {
+      delegate_(delegate),
+      weak_ptr_factory_(this) {
   DCHECK(profile_);
   DCHECK(crx_file::id_util::IdIsValid(app_id_));
   KioskAppManager::Get()->AddObserver(this);
@@ -87,14 +66,12 @@
 
   // StartupAppLauncher can be deleted at anytime during the launch process
   // through a user bailout shortcut.
-  ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
-      ->RemoveObserver(this);
   extensions::InstallTrackerFactory::GetForBrowserContext(profile_)
       ->RemoveObserver(this);
 }
 
 void StartupAppLauncher::Initialize() {
-  StartLoadingOAuthFile();
+  MaybeInitializeNetwork();
 }
 
 void StartupAppLauncher::ContinueWithNetworkReady() {
@@ -117,54 +94,6 @@
   KioskAppManager::Get()->UpdateExternalCache();
 }
 
-void StartupAppLauncher::StartLoadingOAuthFile() {
-  delegate_->OnLoadingOAuthFile();
-
-  KioskOAuthParams* auth_params = new KioskOAuthParams();
-  base::PostTaskWithTraitsAndReply(
-      FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
-      base::BindOnce(&StartupAppLauncher::LoadOAuthFileAsync, auth_params),
-      base::BindOnce(&StartupAppLauncher::OnOAuthFileLoaded, AsWeakPtr(),
-                     base::Owned(auth_params)));
-}
-
-// static.
-void StartupAppLauncher::LoadOAuthFileAsync(KioskOAuthParams* auth_params) {
-  int error_code = JSONFileValueDeserializer::JSON_NO_ERROR;
-  std::string error_msg;
-  base::FilePath user_data_dir;
-  CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
-  base::FilePath auth_file = user_data_dir.Append(kOAuthFileName);
-  std::unique_ptr<JSONFileValueDeserializer> deserializer(
-      new JSONFileValueDeserializer(user_data_dir.Append(kOAuthFileName)));
-  std::unique_ptr<base::Value> value =
-      deserializer->Deserialize(&error_code, &error_msg);
-  base::DictionaryValue* dict = NULL;
-  if (error_code != JSONFileValueDeserializer::JSON_NO_ERROR ||
-      !value.get() || !value->GetAsDictionary(&dict)) {
-    return;
-  }
-
-  dict->GetString(kOAuthRefreshToken, &auth_params->refresh_token);
-  dict->GetString(kOAuthClientId, &auth_params->client_id);
-  dict->GetString(kOAuthClientSecret, &auth_params->client_secret);
-}
-
-void StartupAppLauncher::OnOAuthFileLoaded(KioskOAuthParams* auth_params) {
-  auth_params_ = *auth_params;
-  // Override chrome client_id and secret that will be used for identity
-  // API token minting.
-  if (!auth_params_.client_id.empty() && !auth_params_.client_secret.empty()) {
-    UserSessionManager::GetInstance()->SetAppModeChromeClientOAuthInfo(
-            auth_params_.client_id,
-            auth_params_.client_secret);
-  }
-
-  // If we are restarting chrome (i.e. on crash), we need to initialize
-  // OAuth2TokenService as well.
-  InitializeTokenService();
-}
-
 void StartupAppLauncher::RestartLauncher() {
   // If the installer is still running in the background, we don't need to
   // restart the launch process. We will just wait until it completes and
@@ -212,52 +141,6 @@
     BeginInstall();
 }
 
-void StartupAppLauncher::InitializeTokenService() {
-  delegate_->OnInitializingTokenService();
-
-  ProfileOAuth2TokenService* profile_token_service =
-      ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
-  SigninManagerBase* signin_manager =
-      SigninManagerFactory::GetForProfile(profile_);
-  const std::string primary_account_id =
-      signin_manager->GetAuthenticatedAccountId();
-  if (profile_token_service->RefreshTokenIsAvailable(primary_account_id) ||
-      auth_params_.refresh_token.empty()) {
-    MaybeInitializeNetwork();
-  } else {
-    // Pass oauth2 refresh token from the auth file.
-    // TODO(zelidrag): We should probably remove this option after M27.
-    // TODO(fgorski): This can go when we have persistence implemented on PO2TS.
-    // Unless the code is no longer needed.
-    // TODO(rogerta): Now that this CL implements token persistence in PO2TS, is
-    // this code still needed?  See above two TODOs.
-    //
-    // ProfileOAuth2TokenService triggers either OnRefreshTokenAvailable or
-    // OnRefreshTokensLoaded. Given that we want to handle exactly one event,
-    // whichever comes first, both handlers call RemoveObserver on PO2TS.
-    // Handling any of the two events is the only way to resume the execution
-    // and enable Cleanup method to be called, self-invoking a destructor.
-    profile_token_service->AddObserver(this);
-
-    profile_token_service->UpdateCredentials(
-        primary_account_id,
-        auth_params_.refresh_token);
-  }
-}
-
-void StartupAppLauncher::OnRefreshTokenAvailable(
-    const std::string& account_id) {
-  ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
-      ->RemoveObserver(this);
-  MaybeInitializeNetwork();
-}
-
-void StartupAppLauncher::OnRefreshTokensLoaded() {
-  ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)
-      ->RemoveObserver(this);
-  MaybeInitializeNetwork();
-}
-
 void StartupAppLauncher::MaybeLaunchApp() {
   SYSLOG(INFO) << "MaybeLaunchApp";
   const Extension* extension = GetPrimaryAppExtension();
@@ -275,16 +158,16 @@
   // If the app is not offline enabled, make sure the network is ready before
   // launching.
   if (offline_enabled || delegate_->IsNetworkReady()) {
-    BrowserThread::PostTask(
-        BrowserThread::UI, FROM_HERE,
-        base::BindOnce(&StartupAppLauncher::OnReadyToLaunch, AsWeakPtr()));
+    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+                            base::BindOnce(&StartupAppLauncher::OnReadyToLaunch,
+                                           weak_ptr_factory_.GetWeakPtr()));
   } else {
     ++launch_attempt_;
     if (launch_attempt_ < kMaxLaunchAttempt) {
       BrowserThread::PostTask(
           BrowserThread::UI, FROM_HERE,
           base::BindOnce(&StartupAppLauncher::MaybeInitializeNetwork,
-                         AsWeakPtr()));
+                         weak_ptr_factory_.GetWeakPtr()));
       return;
     }
     OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_LAUNCH);
@@ -313,8 +196,9 @@
   // compatible with the new chromeos. See crbug.com/555083.
   extensions::ExtensionUpdater::CheckParams params;
   params.install_immediately = true;
-  params.callback = base::Bind(
-      &StartupAppLauncher::OnExtensionUpdateCheckFinished, AsWeakPtr());
+  params.callback =
+      base::Bind(&StartupAppLauncher::OnExtensionUpdateCheckFinished,
+                 weak_ptr_factory_.GetWeakPtr());
   updater->CheckNow(params);
 }
 
@@ -568,7 +452,7 @@
     DelayNetworkCall(
         base::TimeDelta::FromMilliseconds(kDefaultNetworkRetryDelayMS),
         base::Bind(&StartupAppLauncher::MaybeInstallSecondaryApps,
-                   AsWeakPtr()));
+                   weak_ptr_factory_.GetWeakPtr()));
     return;
   }
 
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.h b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
index e6ffe547..3f55a54 100644
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
@@ -15,7 +15,6 @@
 #include "chrome/browser/extensions/install_observer.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
-#include "google_apis/gaia/oauth2_token_service.h"
 
 class Profile;
 
@@ -23,17 +22,12 @@
 
 // Launches the app at startup. The flow roughly looks like this:
 // First call Initialize():
-// - Attempts to load oauth token file. Stores the loaded tokens in
-//   |auth_params_|.
-// - Initialize token service and inject |auth_params_| if needed.
 // - Initialize network if app is not installed or not offline_enabled.
 // - If network is online, install or update the app as needed.
 // - After the app is installed/updated, launch it and finish the flow;
 // Report OnLauncherInitialized() or OnLaunchFailed() to observers:
 // - If all goes good, launches the app and finish the flow;
-class StartupAppLauncher : public base::SupportsWeakPtr<StartupAppLauncher>,
-                           public OAuth2TokenService::Observer,
-                           public extensions::InstallObserver,
+class StartupAppLauncher : public extensions::InstallObserver,
                            public KioskAppManagerObserver,
                            public content::NotificationObserver {
  public:
@@ -50,8 +44,6 @@
     // skip app installation steps.
     virtual bool ShouldSkipAppInstallation() = 0;
 
-    virtual void OnLoadingOAuthFile() = 0;
-    virtual void OnInitializingTokenService() = 0;
     virtual void OnInstallingApp() = 0;
     virtual void OnReadyToLaunch() = 0;
     virtual void OnLaunchSucceeded() = 0;
@@ -82,13 +74,6 @@
   void RestartLauncher();
 
  private:
-  // OAuth parameters from /home/chronos/kiosk_auth file.
-  struct KioskOAuthParams {
-    std::string refresh_token;
-    std::string client_id;
-    std::string client_secret;
-  };
-
   void OnLaunchSuccess();
   void OnLaunchFailure(KioskAppLaunchError::Error error);
 
@@ -96,7 +81,6 @@
   void OnReadyToLaunch();
   void MaybeUpdateAppData();
 
-  void InitializeTokenService();
   void MaybeInitializeNetwork();
   void MaybeInstallSecondaryApps();
   void MaybeLaunchApp();
@@ -104,10 +88,6 @@
   void MaybeCheckExtensionUpdate();
   void OnExtensionUpdateCheckFinished();
 
-  void StartLoadingOAuthFile();
-  static void LoadOAuthFileAsync(KioskOAuthParams* auth_params);
-  void OnOAuthFileLoaded(KioskOAuthParams* auth_params);
-
   void OnKioskAppDataLoadStatusChanged(const std::string& app_id);
 
   // Returns true if any secondary app is pending.
@@ -129,10 +109,6 @@
 
   const extensions::Extension* GetPrimaryAppExtension() const;
 
-  // OAuth2TokenService::Observer overrides.
-  void OnRefreshTokenAvailable(const std::string& account_id) override;
-  void OnRefreshTokensLoaded() override;
-
   // extensions::InstallObserver overrides.
   void OnFinishCrxInstall(const std::string& extension_id,
                           bool success) override;
@@ -146,10 +122,10 @@
                const content::NotificationSource& source,
                const content::NotificationDetails& details) override;
 
-  Profile* profile_;
+  Profile* const profile_;
   const std::string app_id_;
   const bool diagnostic_mode_;
-  Delegate* delegate_;
+  Delegate* const delegate_;
   bool network_ready_handled_ = false;
   int launch_attempt_ = 0;
   bool ready_to_launch_ = false;
@@ -157,9 +133,10 @@
   bool secondary_apps_installed_ = false;
   bool extension_update_found_ = false;
 
-  KioskOAuthParams auth_params_;
   content::NotificationRegistrar registrar_;
 
+  base::WeakPtrFactory<StartupAppLauncher> weak_ptr_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher);
 };
 
diff --git a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
index 8883712..0a9b901 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
@@ -105,7 +105,6 @@
   }
   void BeforeSessionStart() override {}
   void Finalize(base::OnceClosure) override {}
-  void OpenInternetDetailDialog(const std::string& network_id) override {}
   void SetStatusAreaVisible(bool visible) override {}
   void StartWizard(chromeos::OobeScreen first_screen) override {
     // Reset the controller first since there could only be one wizard
@@ -120,17 +119,12 @@
   chromeos::WizardController* GetWizardController() override {
     return wizard_controller_.get();
   }
-  chromeos::AppLaunchController* GetAppLaunchController() override {
-    return nullptr;
-  }
   void StartUserAdding(base::OnceClosure completion_callback) override {}
   void CancelUserAdding() override {}
   void OnStartSignInScreen(
       const chromeos::LoginScreenContext& context) override {}
   void OnPreferencesChanged() override {}
-  void StartAppLaunch(const std::string& app_id,
-                      bool diagnostic_mode,
-                      bool is_auto_launch) override {}
+  void OnStartAppLaunch() override {}
   void StartArcKiosk(const AccountId& account_id) override {}
   void StartVoiceInteractionOobe() override {
     is_voice_interaction_oobe_ = true;
diff --git a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
index 7bd94bc..96a44436 100644
--- a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
@@ -9,18 +9,18 @@
 #include "base/memory/singleton.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/chromeos/arc/arc_util.h"
+#include "chrome/browser/notifications/notification_display_service.h"
+#include "chrome/browser/notifications/notification_display_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/theme_resources.h"
 #include "components/arc/arc_browser_context_keyed_service_factory_base.h"
 #include "components/signin/core/account_id/account_id.h"
-#include "components/user_manager/user.h"
-#include "components/user_manager/user_manager.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/chromeos/devicetype_utils.h"
 #include "ui/gfx/image/image.h"
-#include "ui/message_center/message_center.h"
 #include "ui/message_center/notification.h"
 #include "ui/message_center/notification_types.h"
 #include "ui/message_center/notifier_id.h"
@@ -33,42 +33,6 @@
 constexpr char kManagedProvisionNotificationId[] = "arc_managed_provision";
 constexpr char kManagedProvisionNotifierId[] = "arc_managed_provision";
 
-class DelegateImpl : public ArcProvisionNotificationService::Delegate {
- public:
-  void ShowManagedProvisionNotification() override;
-  void RemoveManagedProvisionNotification() override;
-};
-
-void DelegateImpl::ShowManagedProvisionNotification() {
-  message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
-      kManagedProvisionNotifierId);
-  const AccountId& account_id =
-      user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId();
-  notifier_id.profile_id = account_id.GetUserEmail();
-  message_center::RichNotificationData optional_fields;
-  optional_fields.never_timeout = true;
-
-  message_center::MessageCenter::Get()->AddNotification(
-      std::make_unique<message_center::Notification>(
-          message_center::NOTIFICATION_TYPE_SIMPLE,
-          kManagedProvisionNotificationId,
-          l10n_util::GetStringUTF16(
-              IDS_ARC_MANAGED_PROVISION_NOTIFICATION_TITLE),
-          l10n_util::GetStringFUTF16(
-              IDS_ARC_MANAGED_PROVISION_NOTIFICATION_MESSAGE,
-              ui::GetChromeOSDeviceName()),
-          gfx::Image(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
-              IDR_ARC_PLAY_STORE_OPTIN_IN_PROGRESS_NOTIFICATION)),
-          l10n_util::GetStringUTF16(IDS_ARC_NOTIFICATION_DISPLAY_SOURCE),
-          GURL(), notifier_id, optional_fields, nullptr));
-}
-
-void DelegateImpl::RemoveManagedProvisionNotification() {
-  message_center::MessageCenter::Get()->RemoveNotification(
-      kManagedProvisionNotificationId, false);
-}
-
 // Singleton factory for ArcProvisionNotificationService.
 class ArcProvisionNotificationServiceFactory
     : public internal::ArcBrowserContextKeyedServiceFactoryBase<
@@ -84,16 +48,14 @@
 
  private:
   friend base::DefaultSingletonTraits<ArcProvisionNotificationServiceFactory>;
-  ArcProvisionNotificationServiceFactory() = default;
+  ArcProvisionNotificationServiceFactory() {
+    DependsOn(NotificationDisplayServiceFactory::GetInstance());
+  }
   ~ArcProvisionNotificationServiceFactory() override = default;
 };
 
 }  // namespace
 
-ArcProvisionNotificationService::Delegate::Delegate() = default;
-
-ArcProvisionNotificationService::Delegate::~Delegate() = default;
-
 // static
 ArcProvisionNotificationService*
 ArcProvisionNotificationService::GetForBrowserContext(
@@ -104,63 +66,75 @@
 ArcProvisionNotificationService::ArcProvisionNotificationService(
     content::BrowserContext* context,
     ArcBridgeService* bridge_service)
-    : ArcProvisionNotificationService(context,
-                                      std::make_unique<DelegateImpl>()) {}
+    : context_(context) {
+  ArcSessionManager::Get()->AddObserver(this);
+}
 
 ArcProvisionNotificationService::~ArcProvisionNotificationService() {
-  // Make sure no notification is left being shown.
-  delegate_->RemoveManagedProvisionNotification();
-
   ArcSessionManager::Get()->RemoveObserver(this);
 }
 
-// static
-std::unique_ptr<ArcProvisionNotificationService>
-ArcProvisionNotificationService::CreateForTesting(
-    content::BrowserContext* context,
-    std::unique_ptr<Delegate> delegate) {
-  return base::WrapUnique<ArcProvisionNotificationService>(
-      new ArcProvisionNotificationService(context, std::move(delegate)));
+void ArcProvisionNotificationService::ShowNotification() {
+  Profile* profile = Profile::FromBrowserContext(context_);
+  message_center::NotifierId notifier_id(
+      message_center::NotifierId::SYSTEM_COMPONENT,
+      kManagedProvisionNotifierId);
+  notifier_id.profile_id =
+      multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail();
+  message_center::RichNotificationData optional_fields;
+  optional_fields.never_timeout = true;
+
+  message_center::Notification notification(
+      message_center::NOTIFICATION_TYPE_SIMPLE, kManagedProvisionNotificationId,
+      l10n_util::GetStringUTF16(IDS_ARC_MANAGED_PROVISION_NOTIFICATION_TITLE),
+      l10n_util::GetStringFUTF16(IDS_ARC_MANAGED_PROVISION_NOTIFICATION_MESSAGE,
+                                 ui::GetChromeOSDeviceName()),
+      gfx::Image(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+          IDR_ARC_PLAY_STORE_OPTIN_IN_PROGRESS_NOTIFICATION)),
+      l10n_util::GetStringUTF16(IDS_ARC_NOTIFICATION_DISPLAY_SOURCE), GURL(),
+      notifier_id, optional_fields, nullptr);
+
+  NotificationDisplayService::GetForProfile(profile)->Display(
+      NotificationHandler::Type::TRANSIENT, notification);
 }
 
-ArcProvisionNotificationService::ArcProvisionNotificationService(
-    content::BrowserContext* context,
-    std::unique_ptr<Delegate> delegate)
-    : context_(context), delegate_(std::move(delegate)) {
-  ArcSessionManager::Get()->AddObserver(this);
+void ArcProvisionNotificationService::HideNotification() {
+  NotificationDisplayService::GetForProfile(
+      Profile::FromBrowserContext(context_))
+      ->Close(NotificationHandler::Type::TRANSIENT,
+              kManagedProvisionNotificationId);
 }
 
 void ArcProvisionNotificationService::OnArcPlayStoreEnabledChanged(
     bool enabled) {
-  if (!enabled) {
-    // Make sure no notification is shown after ARC gets disabled.
-    delegate_->RemoveManagedProvisionNotification();
-  }
+  // Make sure no notification is shown after ARC gets disabled.
+  if (!enabled)
+    HideNotification();
 }
 
 void ArcProvisionNotificationService::OnArcOptInManagementCheckStarted() {
   // This observer is notified at an early phase of the opt-in flow, so start
   // showing the notification if the opt-in flow happens silently (due to the
   // managed prefs), or ensure that no notification is shown otherwise.
-  const Profile* const profile = Profile::FromBrowserContext(context_);
+  Profile* profile = Profile::FromBrowserContext(context_);
   if (IsArcPlayStoreEnabledPreferenceManagedForProfile(profile) &&
       AreArcAllOptInPreferencesIgnorableForProfile(profile)) {
-    delegate_->ShowManagedProvisionNotification();
+    ShowNotification();
   } else {
-    delegate_->RemoveManagedProvisionNotification();
+    HideNotification();
   }
 }
 
 void ArcProvisionNotificationService::OnArcInitialStart() {
   // The opt-in flow finished successfully, so remove the notification.
-  delegate_->RemoveManagedProvisionNotification();
+  HideNotification();
 }
 
 void ArcProvisionNotificationService::OnArcSessionStopped(
     ArcStopReason stop_reason) {
   // One of the reasons of ARC being stopped is a failure of the opt-in flow.
   // Therefore remove the notification if it is shown.
-  delegate_->RemoveManagedProvisionNotification();
+  HideNotification();
 }
 
 void ArcProvisionNotificationService::OnArcErrorShowRequested(
@@ -169,7 +143,7 @@
   // the notification should be therefore removed if it is shown. Do this here
   // unconditionally as there should be no notification displayed otherwise
   // anyway.
-  delegate_->RemoveManagedProvisionNotification();
+  HideNotification();
 }
 
 }  // namespace arc
diff --git a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.h b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.h
index bb41a862..54acf6c 100644
--- a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.h
+++ b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.h
@@ -22,40 +22,19 @@
 class ArcProvisionNotificationService : public KeyedService,
                                         public ArcSessionManager::Observer {
  public:
-  // The delegate whose methods are used by the service for showing/hiding the
-  // notifications. The delegate exists for unit testing purposes.
-  class Delegate {
-   public:
-    Delegate();
-    virtual ~Delegate();
-    virtual void ShowManagedProvisionNotification() = 0;
-    virtual void RemoveManagedProvisionNotification() = 0;
-
-   private:
-    DISALLOW_COPY_AND_ASSIGN(Delegate);
-  };
-
   // Returns singleton instance for the given BrowserContext,
   // or nullptr if the browser |context| is not allowed to use ARC.
   static ArcProvisionNotificationService* GetForBrowserContext(
       content::BrowserContext* context);
 
-  // Constructs with the default delegate implementation that uses message
-  // center for showing the notifications.
   ArcProvisionNotificationService(content::BrowserContext* context,
                                   ArcBridgeService* bridge_service);
-
   ~ArcProvisionNotificationService() override;
 
-  // Constructs an instance with the supplied delegate.
-  static std::unique_ptr<ArcProvisionNotificationService> CreateForTesting(
-      content::BrowserContext* context,
-      std::unique_ptr<Delegate> delegate);
-
  private:
-  // Constructs with the supplied delegate.
-  ArcProvisionNotificationService(content::BrowserContext* context,
-                                  std::unique_ptr<Delegate> delegate);
+  // Shows/hides the notification.
+  void ShowNotification();
+  void HideNotification();
 
   // ArcSessionManager::Observer:
   void OnArcPlayStoreEnabledChanged(bool enabled) override;
@@ -65,7 +44,6 @@
   void OnArcErrorShowRequested(ArcSupportHost::Error error) override;
 
   content::BrowserContext* const context_;
-  std::unique_ptr<Delegate> delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcProvisionNotificationService);
 };
diff --git a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service_unittest.cc b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service_unittest.cc
index 7232ab75..6c5b8b9 100644
--- a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service_unittest.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service_unittest.cc
@@ -9,15 +9,14 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
-#include "base/files/scoped_temp_dir.h"
 #include "base/values.h"
 #include "chrome/browser/chromeos/arc/arc_auth_notification.h"
 #include "chrome/browser/chromeos/arc/arc_optin_uma.h"
 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
+#include "chrome/browser/notifications/notification_display_service_tester.h"
+#include "chrome/test/base/browser_with_test_window_test.h"
 #include "chrome/test/base/testing_profile.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/fake_session_manager_client.h"
 #include "components/arc/arc_prefs.h"
 #include "components/arc/arc_service_manager.h"
 #include "components/arc/arc_util.h"
@@ -26,60 +25,38 @@
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "components/user_manager/scoped_user_manager.h"
 #include "components/user_manager/user_manager.h"
-#include "content/public/test/test_browser_thread_bundle.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using testing::AnyNumber;
-using testing::AtLeast;
-using testing::Mock;
-using testing::StrictMock;
+#include "ui/message_center/notification.h"
 
 namespace arc {
 
 namespace {
 
-class MockArcProvisionNotificationServiceDelegate
-    : public ArcProvisionNotificationService::Delegate {
- public:
-  MOCK_METHOD0(ShowManagedProvisionNotification, void());
-  MOCK_METHOD0(RemoveManagedProvisionNotification, void());
-};
+const char kArcManagedProvisionNotificationId[] = "arc_managed_provision";
 
-class ArcProvisionNotificationServiceTest : public testing::Test {
+class ArcProvisionNotificationServiceTest : public BrowserWithTestWindowTest {
  protected:
   ArcProvisionNotificationServiceTest()
       : user_manager_enabler_(
             std::make_unique<chromeos::FakeChromeUserManager>()) {}
 
   void SetUp() override {
-    chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
-        std::make_unique<chromeos::FakeSessionManagerClient>());
-    chromeos::DBusThreadManager::Initialize();
-
     SetArcAvailableCommandLineForTesting(
         base::CommandLine::ForCurrentProcess());
     ArcSessionManager::DisableUIForTesting();
     ArcAuthNotification::DisableForTesting();
 
-    ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
-    TestingProfile::Builder profile_builder;
-    profile_builder.SetProfileName("user@gmail.com");
-    profile_builder.SetPath(temp_dir_.GetPath().AppendASCII("TestArcProfile"));
-    profile_ = profile_builder.Build();
-
     arc_service_manager_ = std::make_unique<ArcServiceManager>();
     arc_session_manager_ = std::make_unique<ArcSessionManager>(
         std::make_unique<ArcSessionRunner>(base::Bind(FakeArcSession::Create)));
-    std::unique_ptr<MockArcProvisionNotificationServiceDelegate>
-        mock_arc_provision_notification_service_delegate = std::make_unique<
-            StrictMock<MockArcProvisionNotificationServiceDelegate>>();
-    arc_provision_notification_service_delegate_ =
-        mock_arc_provision_notification_service_delegate.get();
-    arc_provision_notification_service_ =
-        ArcProvisionNotificationService::CreateForTesting(
-            profile_.get(),
-            std::move(mock_arc_provision_notification_service_delegate));
+
+    // This creates |profile()|, so it has to come after the arc managers.
+    BrowserWithTestWindowTest::SetUp();
+
+    arc_service_manager_->set_browser_context(profile());
+    display_service_ =
+        std::make_unique<NotificationDisplayServiceTester>(profile());
+    // Create the service (normally handled by ArcServiceLauncher).
+    ArcProvisionNotificationService::GetForBrowserContext(profile());
 
     const AccountId account_id(AccountId::FromUserEmailGaiaId(
         profile()->GetProfileUserName(), "1234567890"));
@@ -88,47 +65,28 @@
   }
 
   void TearDown() override {
-    EXPECT_CALL(*arc_provision_notification_service_delegate(),
-                RemoveManagedProvisionNotification())
-        .Times(AtLeast(1));
-    arc_provision_notification_service_.reset();
-    arc_provision_notification_service_delegate_ = nullptr;
+    // The session manager has to be shutdown before the profile is destroyed so
+    // it stops observing prefs, but can't be reset completely because some
+    // profile keyed services call into it.
+    arc_session_manager_->Shutdown();
+    display_service_.reset();
+    arc_service_manager_->set_browser_context(nullptr);
+    BrowserWithTestWindowTest::TearDown();
     arc_session_manager_.reset();
     arc_service_manager_.reset();
-    profile_.reset();
-    chromeos::DBusThreadManager::Shutdown();
   }
 
-  TestingProfile* profile() { return profile_.get(); }
-  ArcServiceManager* arc_service_manager() {
-    return arc_service_manager_.get();
-  }
-  ArcSessionManager* arc_session_manager() {
-    return arc_session_manager_.get();
-  }
-  MockArcProvisionNotificationServiceDelegate*
-  arc_provision_notification_service_delegate() {
-    return arc_provision_notification_service_delegate_;
-  }
-  ArcProvisionNotificationService* arc_provision_notification_service() {
-    return arc_provision_notification_service_.get();
-  }
   chromeos::FakeChromeUserManager* GetFakeUserManager() {
     return static_cast<chromeos::FakeChromeUserManager*>(
         user_manager::UserManager::Get());
   }
 
- private:
-  content::TestBrowserThreadBundle thread_bundle_;
-  user_manager::ScopedUserManager user_manager_enabler_;
-  base::ScopedTempDir temp_dir_;
-  std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<ArcSessionManager> arc_session_manager_;
-  std::unique_ptr<ArcProvisionNotificationService>
-      arc_provision_notification_service_;
-  MockArcProvisionNotificationServiceDelegate*
-      arc_provision_notification_service_delegate_ = nullptr;
+  std::unique_ptr<NotificationDisplayServiceTester> display_service_;
+
+ private:
+  user_manager::ScopedUserManager user_manager_enabler_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcProvisionNotificationServiceTest);
 };
@@ -147,38 +105,29 @@
   profile()->GetTestingPrefService()->SetManagedPref(
       prefs::kArcLocationServiceEnabled, std::make_unique<base::Value>(false));
 
-  arc_session_manager()->SetProfile(profile());
-  arc_session_manager()->Initialize();
+  arc_session_manager_->SetProfile(profile());
+  arc_session_manager_->Initialize();
 
   // Trigger opt-in flow. The notification gets shown.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              ShowManagedProvisionNotification());
-  arc_session_manager()->RequestEnable();
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  arc_session_manager_->RequestEnable();
+  EXPECT_TRUE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
   EXPECT_EQ(ArcSessionManager::State::CHECKING_ANDROID_MANAGEMENT,
-            arc_session_manager()->state());
-  arc_session_manager()->StartArcForTesting();
-  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
+            arc_session_manager_->state());
+  arc_session_manager_->StartArcForTesting();
+  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager_->state());
 
   // Emulate successful provisioning. The notification gets removed.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              RemoveManagedProvisionNotification())
-      .Times(AtLeast(1));
-  arc_session_manager()->OnProvisioningFinished(ProvisioningResult::SUCCESS);
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  arc_session_manager_->OnProvisioningFinished(ProvisioningResult::SUCCESS);
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
 }
 
 // The managed provision notification is not displayed after the restart if the
 // provisioning was successful.
 TEST_F(ArcProvisionNotificationServiceTest,
        ManagedProvisionNotification_Restart) {
-  // No notifications are expected to be shown in this test, but the delegate
-  // method that removes the notification is allowed to be called.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              RemoveManagedProvisionNotification())
-      .Times(AnyNumber());
+  // No notifications are expected to be shown in this test.
 
   // Set up managed ARC and assign managed values to all opt-in prefs.
   profile()->GetTestingPrefService()->SetManagedPref(
@@ -191,14 +140,18 @@
   // performed.
   profile()->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true);
 
-  arc_session_manager()->SetProfile(profile());
-  arc_session_manager()->Initialize();
+  arc_session_manager_->SetProfile(profile());
+  arc_session_manager_->Initialize();
 
   // Enable ARC. The opt-in flow doesn't take place, and no notification is
   // shown.
-  arc_session_manager()->RequestEnable();
-  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
-  arc_session_manager()->OnProvisioningFinished(ProvisioningResult::SUCCESS);
+  arc_session_manager_->RequestEnable();
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
+  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager_->state());
+  arc_session_manager_->OnProvisioningFinished(ProvisioningResult::SUCCESS);
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
 }
 
 // The managed provision notification is displayed from the beginning of the
@@ -213,29 +166,24 @@
   profile()->GetTestingPrefService()->SetManagedPref(
       prefs::kArcLocationServiceEnabled, std::make_unique<base::Value>(false));
 
-  arc_session_manager()->SetProfile(profile());
-  arc_session_manager()->Initialize();
+  arc_session_manager_->SetProfile(profile());
+  arc_session_manager_->Initialize();
 
   // Trigger opt-in flow. The notification gets shown.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              ShowManagedProvisionNotification());
-  arc_session_manager()->RequestEnable();
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  arc_session_manager_->RequestEnable();
+  EXPECT_TRUE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
   EXPECT_EQ(ArcSessionManager::State::CHECKING_ANDROID_MANAGEMENT,
-            arc_session_manager()->state());
-  arc_session_manager()->StartArcForTesting();
-  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
+            arc_session_manager_->state());
+  arc_session_manager_->StartArcForTesting();
+  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager_->state());
 
   // Emulate provisioning failure that leads to stopping ARC. The notification
   // gets removed.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              RemoveManagedProvisionNotification())
-      .Times(AtLeast(1));
-  arc_session_manager()->OnProvisioningFinished(
+  arc_session_manager_->OnProvisioningFinished(
       ProvisioningResult::CHROME_SERVER_COMMUNICATION_ERROR);
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
 }
 
 // The managed provision notification is displayed from the beginning of the
@@ -250,60 +198,57 @@
   profile()->GetTestingPrefService()->SetManagedPref(
       prefs::kArcLocationServiceEnabled, std::make_unique<base::Value>(false));
 
-  arc_session_manager()->SetProfile(profile());
-  arc_session_manager()->Initialize();
+  arc_session_manager_->SetProfile(profile());
+  arc_session_manager_->Initialize();
 
   // Trigger opt-in flow. The notification gets shown.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              ShowManagedProvisionNotification());
-  arc_session_manager()->RequestEnable();
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  arc_session_manager_->RequestEnable();
+  EXPECT_TRUE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
   EXPECT_EQ(ArcSessionManager::State::CHECKING_ANDROID_MANAGEMENT,
-            arc_session_manager()->state());
-  arc_session_manager()->StartArcForTesting();
-  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
+            arc_session_manager_->state());
+  arc_session_manager_->StartArcForTesting();
+  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager_->state());
 
   // Emulate provisioning failure that leads to showing an error screen without
   // shutting ARC down. The notification gets removed.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              RemoveManagedProvisionNotification())
-      .Times(AtLeast(1));
-  arc_session_manager()->OnProvisioningFinished(
+  arc_session_manager_->OnProvisioningFinished(
       ProvisioningResult::NO_NETWORK_CONNECTION);
-  Mock::VerifyAndClearExpectations(
-      arc_provision_notification_service_delegate());
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
 }
 
 // The managed provision notification is not displayed when opt-in prefs are not
 // managed.
 TEST_F(ArcProvisionNotificationServiceTest,
        ManagedProvisionNotification_NotSilent) {
-  // No notifications are expected to be shown in this test, but the delegate
-  // method that removes the notification is allowed to be called.
-  EXPECT_CALL(*arc_provision_notification_service_delegate(),
-              RemoveManagedProvisionNotification())
-      .Times(AnyNumber());
+  // No notifications are expected to be shown in this test.
 
   // Set ARC to be managed.
   profile()->GetTestingPrefService()->SetManagedPref(
       prefs::kArcEnabled, std::make_unique<base::Value>(true));
 
-  arc_session_manager()->SetProfile(profile());
-  arc_session_manager()->Initialize();
+  arc_session_manager_->SetProfile(profile());
+  arc_session_manager_->Initialize();
 
   // Trigger opt-in flow. The notification is not shown.
-  arc_session_manager()->RequestEnable();
+  arc_session_manager_->RequestEnable();
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
   EXPECT_EQ(ArcSessionManager::State::NEGOTIATING_TERMS_OF_SERVICE,
-            arc_session_manager()->state());
+            arc_session_manager_->state());
 
   // Emulate accepting the terms of service.
-  arc_session_manager()->OnTermsOfServiceNegotiatedForTesting(true);
-  arc_session_manager()->StartArcForTesting();
-  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager()->state());
+  arc_session_manager_->OnTermsOfServiceNegotiatedForTesting(true);
+  arc_session_manager_->StartArcForTesting();
+  EXPECT_EQ(ArcSessionManager::State::ACTIVE, arc_session_manager_->state());
 
   // Emulate successful provisioning.
-  arc_session_manager()->OnProvisioningFinished(ProvisioningResult::SUCCESS);
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
+  arc_session_manager_->OnProvisioningFinished(ProvisioningResult::SUCCESS);
+  EXPECT_FALSE(
+      display_service_->GetNotification(kArcManagedProvisionNotificationId));
 }
 
 }  // namespace arc
diff --git a/chrome/browser/chromeos/arc/user_session/arc_user_session_service.cc b/chrome/browser/chromeos/arc/user_session/arc_user_session_service.cc
index 8c104f54..e8a1214 100644
--- a/chrome/browser/chromeos/arc/user_session/arc_user_session_service.cc
+++ b/chrome/browser/chromeos/arc/user_session/arc_user_session_service.cc
@@ -46,6 +46,9 @@
 }
 
 ArcUserSessionService::~ArcUserSessionService() {
+  // OnConnectionClosed() is not guaranteed to be called before destruction.
+  session_manager::SessionManager::Get()->RemoveObserver(this);
+
   arc_bridge_service_->intent_helper()->RemoveObserver(this);
 }
 
diff --git a/chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.cc b/chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.cc
index 991e4f89..491f36e 100644
--- a/chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.cc
+++ b/chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.cc
@@ -14,7 +14,6 @@
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_browser_context_keyed_service_factory_base.h"
 #include "components/arc/common/video_decode_accelerator.mojom.h"
-#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/gpu_service_registry.h"
 #include "content/public/common/service_manager_connection.h"
@@ -54,15 +53,6 @@
 
   ~VideoAcceleratorFactoryService() override = default;
 
-  void CreateDecodeAcceleratorDeprecated(
-      mojom::VideoDecodeAcceleratorDeprecatedRequest request) override {
-    content::BrowserThread::PostTask(
-        content::BrowserThread::IO, FROM_HERE,
-        base::BindOnce(&content::BindInterfaceInGpuProcess<
-                           mojom::VideoDecodeAcceleratorDeprecated>,
-                       std::move(request)));
-  }
-
   void CreateDecodeAccelerator(
       mojom::VideoDecodeAcceleratorRequest request) override {
     content::BrowserThread::PostTask(
@@ -100,12 +90,6 @@
     DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   }
 
-  void CreateDecodeAcceleratorDeprecated(
-      mojom::VideoDecodeAcceleratorDeprecatedRequest request) override {
-    DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-    arc_->CreateVideoDecodeAcceleratorDeprecated(std::move(request));
-  }
-
   void CreateDecodeAccelerator(
       mojom::VideoDecodeAcceleratorRequest request) override {
     DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc
index 12e40473..297ab89 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.cc
+++ b/chrome/browser/chromeos/login/app_launch_controller.cc
@@ -441,16 +441,6 @@
   return false;
 }
 
-void AppLaunchController::OnLoadingOAuthFile() {
-  app_launch_splash_screen_view_->UpdateAppLaunchState(
-      AppLaunchSplashScreenView::APP_LAUNCH_STATE_LOADING_AUTH_FILE);
-}
-
-void AppLaunchController::OnInitializingTokenService() {
-  app_launch_splash_screen_view_->UpdateAppLaunchState(
-      AppLaunchSplashScreenView::APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE);
-}
-
 void AppLaunchController::OnInstallingApp() {
   app_launch_splash_screen_view_->UpdateAppLaunchState(
       AppLaunchSplashScreenView::APP_LAUNCH_STATE_INSTALLING_APPLICATION);
diff --git a/chrome/browser/chromeos/login/app_launch_controller.h b/chrome/browser/chromeos/login/app_launch_controller.h
index c4856ed..14c5f2f 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.h
+++ b/chrome/browser/chromeos/login/app_launch_controller.h
@@ -102,8 +102,6 @@
   void InitializeNetwork() override;
   bool IsNetworkReady() override;
   bool ShouldSkipAppInstallation() override;
-  void OnLoadingOAuthFile() override;
-  void OnInitializingTokenService() override;
   void OnInstallingApp() override;
   void OnReadyToLaunch() override;
   void OnLaunchSucceeded() override;
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index 7e1d003..c7075856 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -239,7 +239,7 @@
       extensions::ExtensionSystem::Get(app_profile)
           ->extension_service()
           ->GetInstalledExtension(app_id);
-  return app != nullptr && version == app->version()->GetString();
+  return app != nullptr && version == app->version().GetString();
 }
 
 extensions::Manifest::Type GetAppType(const std::string& app_id) {
@@ -617,7 +617,7 @@
   }
 
   const base::Version& GetInstalledAppVersion() {
-    return *GetInstalledApp()->version();
+    return GetInstalledApp()->version();
   }
 
   extensions::Manifest::Location GetInstalledAppLocation() {
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index 8d67451..753f15f 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -36,6 +36,7 @@
 #include "chromeos/settings/cros_settings_names.h"
 #include "components/signin/core/account_id/account_id.h"
 #include "components/user_manager/user_names.h"
+#include "content/public/browser/notification_service.h"
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/test_utils.h"
 #include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h b/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h
index 9f8b104..7212fde 100644
--- a/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h
+++ b/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h
@@ -14,8 +14,6 @@
 class AppLaunchSplashScreenView {
  public:
   enum AppLaunchState {
-    APP_LAUNCH_STATE_LOADING_AUTH_FILE,
-    APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE,
     APP_LAUNCH_STATE_PREPARING_NETWORK,
     APP_LAUNCH_STATE_INSTALLING_APPLICATION,
     APP_LAUNCH_STATE_WAITING_APP_WINDOW,
diff --git a/chrome/browser/chromeos/login/ui/login_display_host.cc b/chrome/browser/chromeos/login/ui/login_display_host.cc
index defdcd9..de1fd2b 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host.cc
@@ -5,10 +5,12 @@
 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
 
 #include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/login/app_launch_controller.h"
 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
 #include "chrome/browser/chromeos/login/startup_utils.h"
 #include "chrome/browser/chromeos/mobile_config.h"
 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#include "chrome/browser/chromeos/system/device_disabling_manager.h"
 
 namespace chromeos {
 namespace {
@@ -27,6 +29,10 @@
 
 LoginDisplayHost::~LoginDisplayHost() = default;
 
+AppLaunchController* LoginDisplayHost::GetAppLaunchController() {
+  return app_launch_controller_.get();
+}
+
 void LoginDisplayHost::StartSignInScreen(const LoginScreenContext& context) {
   PrewarmAuthentication();
 
@@ -65,6 +71,43 @@
       &LoginDisplayHost::OnAuthPrewarmDone, weak_factory_.GetWeakPtr()));
 }
 
+void LoginDisplayHost::StartAppLaunch(const std::string& app_id,
+                                      bool diagnostic_mode,
+                                      bool is_auto_launch) {
+  VLOG(1) << "Login >> start app launch.";
+  SetStatusAreaVisible(false);
+
+  // Wait for the |CrosSettings| to become either trusted or permanently
+  // untrusted.
+  const CrosSettingsProvider::TrustedStatus status =
+      CrosSettings::Get()->PrepareTrustedValues(base::Bind(
+          &LoginDisplayHost::StartAppLaunch, weak_factory_.GetWeakPtr(), app_id,
+          diagnostic_mode, is_auto_launch));
+  if (status == CrosSettingsProvider::TEMPORARILY_UNTRUSTED)
+    return;
+
+  if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) {
+    // If the |CrosSettings| are permanently untrusted, refuse to launch a
+    // single-app kiosk mode session.
+    LOG(ERROR) << "Login >> Refusing to launch single-app kiosk mode.";
+    SetStatusAreaVisible(true);
+    return;
+  }
+
+  if (system::DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation()) {
+    // If the device is disabled, bail out. A device disabled screen will be
+    // shown by the DeviceDisablingManager.
+    return;
+  }
+
+  OnStartAppLaunch();
+
+  app_launch_controller_ = std::make_unique<AppLaunchController>(
+      app_id, diagnostic_mode, this, GetOobeUI());
+
+  app_launch_controller_->StartAppLaunch(is_auto_launch);
+}
+
 void LoginDisplayHost::StartDemoAppLaunch() {
   VLOG(1) << "Login >> starting demo app.";
   SetStatusAreaVisible(false);
diff --git a/chrome/browser/chromeos/login/ui/login_display_host.h b/chrome/browser/chromeos/login/ui/login_display_host.h
index 2f0cb7a5..a4e59fa 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host.h
+++ b/chrome/browser/chromeos/login/ui/login_display_host.h
@@ -59,10 +59,6 @@
   // instance is gone.
   virtual void Finalize(base::OnceClosure completion_callback) = 0;
 
-  // Open the internet details dialog. If |network_id| is not empty, shows the
-  // details dialog for that network.
-  virtual void OpenInternetDetailDialog(const std::string& network_id) = 0;
-
   // Toggles status area visibility.
   virtual void SetStatusAreaVisible(bool visible) = 0;
 
@@ -77,7 +73,7 @@
 
   // Returns current AppLaunchController, if it exists.
   // Result should not be stored.
-  virtual AppLaunchController* GetAppLaunchController() = 0;
+  AppLaunchController* GetAppLaunchController();
 
   // Starts screen for adding user into session.
   // |completion_callback| is invoked after login display host shutdown.
@@ -98,9 +94,9 @@
 
   // Starts app launch splash screen. If |is_auto_launch| is true, the app is
   // being auto-launched with no delay.
-  virtual void StartAppLaunch(const std::string& app_id,
-                              bool diagnostic_mode,
-                              bool is_auto_launch) = 0;
+  void StartAppLaunch(const std::string& app_id,
+                      bool diagnostic_mode,
+                      bool is_auto_launch);
 
   // Starts the demo app launch.
   void StartDemoAppLaunch();
@@ -119,6 +115,7 @@
   static LoginDisplayHost* default_host_;
 
   virtual void OnStartSignInScreen(const LoginScreenContext& context) = 0;
+  virtual void OnStartAppLaunch() = 0;
 
   // Deletes |auth_prewarmer_|.
   void OnAuthPrewarmDone();
@@ -126,6 +123,9 @@
   // Active instance of authentication prewarmer.
   std::unique_ptr<AuthPrewarmer> auth_prewarmer_;
 
+  // App launch controller.
+  std::unique_ptr<AppLaunchController> app_launch_controller_;
+
   // Demo app launcher.
   std::unique_ptr<DemoAppLauncher> demo_app_launcher_;
 
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_views.cc b/chrome/browser/chromeos/login/ui/login_display_host_views.cc
index 5df61e51..8a6882b 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_views.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_views.cc
@@ -47,11 +47,6 @@
   NOTIMPLEMENTED();
 }
 
-void LoginDisplayHostViews::OpenInternetDetailDialog(
-    const std::string& network_id) {
-  NOTREACHED();
-}
-
 void LoginDisplayHostViews::SetStatusAreaVisible(bool visible) {
   NOTIMPLEMENTED();
 }
@@ -65,11 +60,6 @@
   return nullptr;
 }
 
-AppLaunchController* LoginDisplayHostViews::GetAppLaunchController() {
-  NOTIMPLEMENTED();
-  return nullptr;
-}
-
 void LoginDisplayHostViews::StartUserAdding(
     base::OnceClosure completion_callback) {
   NOTIMPLEMENTED();
@@ -107,9 +97,7 @@
   NOTIMPLEMENTED();
 }
 
-void LoginDisplayHostViews::StartAppLaunch(const std::string& app_id,
-                                           bool diagnostic_mode,
-                                           bool is_auto_launch) {
+void LoginDisplayHostViews::OnStartAppLaunch() {
   NOTIMPLEMENTED();
 }
 
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_views.h b/chrome/browser/chromeos/login/ui/login_display_host_views.h
index 808af84..45d1110 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_views.h
+++ b/chrome/browser/chromeos/login/ui/login_display_host_views.h
@@ -33,18 +33,14 @@
   WebUILoginView* GetWebUILoginView() const override;
   void BeforeSessionStart() override;
   void Finalize(base::OnceClosure completion_callback) override;
-  void OpenInternetDetailDialog(const std::string& network_id) override;
   void SetStatusAreaVisible(bool visible) override;
   void StartWizard(OobeScreen first_screen) override;
   WizardController* GetWizardController() override;
-  AppLaunchController* GetAppLaunchController() override;
   void StartUserAdding(base::OnceClosure completion_callback) override;
   void CancelUserAdding() override;
   void OnStartSignInScreen(const LoginScreenContext& context) override;
   void OnPreferencesChanged() override;
-  void StartAppLaunch(const std::string& app_id,
-                      bool diagnostic_mode,
-                      bool is_auto_launch) override;
+  void OnStartAppLaunch() override;
   void StartArcKiosk(const AccountId& account_id) override;
   void StartVoiceInteractionOobe() override;
   bool IsVoiceInteractionOobe() override;
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
index af6ac50..f792fc3bb 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
@@ -53,13 +53,11 @@
 #include "chrome/browser/chromeos/policy/enrollment_config.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/chromeos/settings/cros_settings.h"
-#include "chrome/browser/chromeos/system/device_disabling_manager.h"
 #include "chrome/browser/chromeos/system/input_device_settings.h"
 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h"
 #include "chrome/browser/chromeos/system/timezone_util.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/ash/ash_util.h"
-#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_switches.h"
@@ -419,7 +417,6 @@
 LoginDisplayHostWebUI::LoginDisplayHostWebUI(const gfx::Rect& wallpaper_bounds)
     : wallpaper_bounds_(wallpaper_bounds),
       startup_sound_played_(StartupUtils::IsOobeCompleted()),
-      pointer_factory_(this),
       animation_weak_ptr_factory_(this) {
   if (ash_util::IsRunningInMash()) {
     // Animation, and initializing hidden, are not currently supported for Mash.
@@ -621,11 +618,6 @@
   }
 }
 
-void LoginDisplayHostWebUI::OpenInternetDetailDialog(
-    const std::string& network_id) {
-  InternetDetailDialog::ShowDialog(network_id);
-}
-
 void LoginDisplayHostWebUI::SetStatusAreaVisible(bool visible) {
   if (initialize_webui_hidden_)
     status_area_saved_visibility_ = visible;
@@ -670,10 +662,6 @@
   return wizard_controller_.get();
 }
 
-AppLaunchController* LoginDisplayHostWebUI::GetAppLaunchController() {
-  return app_launch_controller_.get();
-}
-
 void LoginDisplayHostWebUI::StartUserAdding(
     base::OnceClosure completion_callback) {
   DisableKeyboardOverscroll();
@@ -788,35 +776,7 @@
     login_display_->OnPreferencesChanged();
 }
 
-void LoginDisplayHostWebUI::StartAppLaunch(const std::string& app_id,
-                                           bool diagnostic_mode,
-                                           bool auto_launch) {
-  VLOG(1) << "Login WebUI >> start app launch.";
-  SetStatusAreaVisible(false);
-
-  // Wait for the |CrosSettings| to become either trusted or permanently
-  // untrusted.
-  const CrosSettingsProvider::TrustedStatus status =
-      CrosSettings::Get()->PrepareTrustedValues(base::Bind(
-          &LoginDisplayHostWebUI::StartAppLaunch, pointer_factory_.GetWeakPtr(),
-          app_id, diagnostic_mode, auto_launch));
-  if (status == CrosSettingsProvider::TEMPORARILY_UNTRUSTED)
-    return;
-
-  if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) {
-    // If the |CrosSettings| are permanently untrusted, refuse to launch a
-    // single-app kiosk mode session.
-    LOG(ERROR) << "Login WebUI >> Refusing to launch single-app kiosk mode.";
-    SetStatusAreaVisible(true);
-    return;
-  }
-
-  if (system::DeviceDisablingManager::IsDeviceDisabledDuringNormalOperation()) {
-    // If the device is disabled, bail out. A device disabled screen will be
-    // shown by the DeviceDisablingManager.
-    return;
-  }
-
+void LoginDisplayHostWebUI::OnStartAppLaunch() {
   // Animation is not supported in Mash.
   if (!ash_util::IsRunningInMash())
     finalize_animation_type_ = ANIMATION_FADE_OUT;
@@ -824,11 +784,6 @@
     LoadURL(GURL(kAppLaunchSplashURL));
 
   login_view_->set_should_emit_login_prompt_visible(false);
-
-  app_launch_controller_.reset(
-      new AppLaunchController(app_id, diagnostic_mode, this, GetOobeUI()));
-
-  app_launch_controller_->StartAppLaunch(auto_launch);
 }
 
 void LoginDisplayHostWebUI::StartArcKiosk(const AccountId& account_id) {
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_webui.h b/chrome/browser/chromeos/login/ui/login_display_host_webui.h
index e45df00..57838d1b 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_webui.h
+++ b/chrome/browser/chromeos/login/ui/login_display_host_webui.h
@@ -13,7 +13,6 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "chrome/browser/chromeos/login/app_launch_controller.h"
 #include "chrome/browser/chromeos/login/existing_user_controller.h"
 #include "chrome/browser/chromeos/login/signin_screen_controller.h"
 #include "chrome/browser/chromeos/login/ui/login_display.h"
@@ -67,18 +66,14 @@
   WebUILoginView* GetWebUILoginView() const override;
   void BeforeSessionStart() override;
   void Finalize(base::OnceClosure completion_callback) override;
-  void OpenInternetDetailDialog(const std::string& network_id) override;
   void SetStatusAreaVisible(bool visible) override;
   void StartWizard(OobeScreen first_screen) override;
   WizardController* GetWizardController() override;
-  AppLaunchController* GetAppLaunchController() override;
   void StartUserAdding(base::OnceClosure completion_callback) override;
   void CancelUserAdding() override;
   void OnStartSignInScreen(const LoginScreenContext& context) override;
   void OnPreferencesChanged() override;
-  void StartAppLaunch(const std::string& app_id,
-                      bool diagnostic_mode,
-                      bool auto_launch) override;
+  void OnStartAppLaunch() override;
   void StartArcKiosk(const AccountId& account_id) override;
   bool IsVoiceInteractionOobe() override;
   void StartVoiceInteractionOobe() override;
@@ -201,9 +196,6 @@
 
   std::unique_ptr<SignInScreenController> signin_screen_controller_;
 
-  // App launch controller.
-  std::unique_ptr<AppLaunchController> app_launch_controller_;
-
   // ARC kiosk controller.
   std::unique_ptr<ArcKioskController> arc_kiosk_controller_;
 
@@ -295,7 +287,6 @@
 
   bool is_voice_interaction_oobe_ = false;
 
-  base::WeakPtrFactory<LoginDisplayHostWebUI> pointer_factory_;
   base::WeakPtrFactory<LoginDisplayHostWebUI> animation_weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostWebUI);
diff --git a/chrome/browser/chromeos/login/ui/mock_login_display_host.h b/chrome/browser/chromeos/login/ui/mock_login_display_host.h
index d28dd8d..eaaa8883 100644
--- a/chrome/browser/chromeos/login/ui/mock_login_display_host.h
+++ b/chrome/browser/chromeos/login/ui/mock_login_display_host.h
@@ -29,12 +29,10 @@
     MockFinalize(&completion_callback);
   }
 
-  MOCK_METHOD1(OpenInternetDetailDialog, void(const std::string&));
   MOCK_METHOD1(SetStatusAreaVisible, void(bool));
   MOCK_METHOD0(ShowBackground, void(void));
   MOCK_METHOD1(StartWizard, void(OobeScreen));
   MOCK_METHOD0(GetWizardController, WizardController*(void));
-  MOCK_METHOD0(GetAppLaunchController, AppLaunchController*(void));
 
   // Workaround for move-only args in GMock.
   MOCK_METHOD1(MockStartUserAdding, void(base::OnceClosure*));
@@ -47,7 +45,7 @@
   MOCK_METHOD0(ResumeSignInScreen, void(void));
   MOCK_METHOD0(OnPreferencesChanged, void(void));
   MOCK_METHOD0(PrewarmAuthentication, void(void));
-  MOCK_METHOD3(StartAppLaunch, void(const std::string&, bool, bool));
+  MOCK_METHOD0(OnStartAppLaunch, void());
   MOCK_METHOD0(StartDemoAppLaunch, void(void));
   MOCK_METHOD1(StartArcKiosk, void(const AccountId&));
   MOCK_METHOD0(StartVoiceInteractionOobe, void(void));
diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc
index 01626129..7a7957f 100644
--- a/chrome/browser/chromeos/login/ui/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc
@@ -603,7 +603,7 @@
   // goes to the system tray, because the web-UI shelf has already been
   // traversed when we reach here.
   ash::Shelf* shelf = ash::Shelf::ForWindow(GetWidget()->GetNativeWindow());
-  if (!reverse && ash::ShelfWidget::IsUsingMdLoginShelf()) {
+  if (!reverse && ash::ShelfWidget::IsUsingViewsShelf()) {
     shelf->shelf_widget()->set_default_last_focusable_child(reverse);
     ash::Shell::Get()->focus_cycler()->FocusWidget(shelf->shelf_widget());
     return true;
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
index 53c4783..13c260a 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -790,6 +790,7 @@
   }
 
   gfx::ImageSkia user_wallpaper;
+  *GetCachedWallpaperInfo() = info;
   if (GetWallpaperFromCache(account_id, &user_wallpaper)) {
     GetPendingWallpaper()->SetWallpaperFromImage(account_id, user_wallpaper,
                                                  info);
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
index 48b8ecf..de49627 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
@@ -489,10 +489,8 @@
   // Log in a test user and set the user wallpaper policy. The user policy
   // controlled wallpaper shows up in the user session.
   LoginUser(testUsers_[0]);
-  RunUntilWallpaperChangeCount(3);
-
   InjectPolicy(0, kGreenImageFileName);
-  RunUntilWallpaperChangeCount(4);
+  RunUntilWallpaperChangeCount(3);
   EXPECT_EQ(kGreenImageColor, GetAverageWallpaperColor());
 
   // Set the device wallpaper policy inside the user session. That that the
diff --git a/chrome/browser/chromeos/net/network_state_notifier.cc b/chrome/browser/chromeos/net/network_state_notifier.cc
index a6edca8..b3bd9ce 100644
--- a/chrome/browser/chromeos/net/network_state_notifier.cc
+++ b/chrome/browser/chromeos/net/network_state_notifier.cc
@@ -13,6 +13,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/chromeos/net/shill_error.h"
+#include "chrome/browser/notifications/notification_display_service.h"
 #include "chrome/browser/ui/ash/system_tray_client.h"
 #include "chrome/grit/generated_resources.h"
 #include "chromeos/network/network_configuration_handler.h"
@@ -24,7 +25,6 @@
 #include "third_party/cros_system_api/dbus/service_constants.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/message_center.h"
 #include "ui/message_center/notification.h"
 #include "ui/message_center/public/cpp/message_center_switches.h"
 
@@ -77,8 +77,9 @@
                            const base::Closure& callback) {
   NET_LOG(ERROR) << "ShowErrorNotification: " << service_path << ": "
                  << base::UTF16ToUTF8(title);
-  std::unique_ptr<message_center::Notification> notification =
-      message_center::Notification::CreateSystemNotification(
+  NotificationDisplayService::GetForSystemNotifications()->Display(
+      NotificationHandler::Type::TRANSIENT,
+      *message_center::Notification::CreateSystemNotification(
           message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
           message, gfx::Image(), base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
@@ -87,9 +88,7 @@
           message_center::RichNotificationData(),
           new message_center::HandleNotificationClickDelegate(callback),
           GetErrorNotificationVectorIcon(network_type),
-          message_center::SystemNotificationWarningLevel::CRITICAL_WARNING);
-  message_center::MessageCenter::Get()->AddNotification(
-      std::move(notification));
+          message_center::SystemNotificationWarningLevel::CRITICAL_WARNING));
 }
 
 bool ShouldConnectFailedNotificationBeShown(const std::string& error_name,
@@ -280,15 +279,14 @@
     return;
 
   cellular_activating_.erase(cellular->path());
-  int icon_id;
-  if (cellular->network_technology() == shill::kNetworkTechnologyLte)
-    icon_id = IDR_AURA_UBER_TRAY_NETWORK_NOTIFICATION_LTE;
-  else
-    icon_id = IDR_AURA_UBER_TRAY_NETWORK_NOTIFICATION_3G;
   const gfx::Image& icon =
-      ui::ResourceBundle::GetSharedInstance().GetImageNamed(icon_id);
-  message_center::MessageCenter::Get()->AddNotification(
-      message_center::Notification::CreateSystemNotification(
+      ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+          cellular->network_technology() == shill::kNetworkTechnologyLte
+              ? IDR_AURA_UBER_TRAY_NETWORK_NOTIFICATION_LTE
+              : IDR_AURA_UBER_TRAY_NETWORK_NOTIFICATION_3G);
+  NotificationDisplayService::GetForSystemNotifications()->Display(
+      NotificationHandler::Type::TRANSIENT,
+      *message_center::Notification::CreateSystemNotification(
           kNetworkActivateNotificationId,
           l10n_util::GetStringUTF16(IDS_NETWORK_CELLULAR_ACTIVATED_TITLE),
           l10n_util::GetStringFUTF16(IDS_NETWORK_CELLULAR_ACTIVATED,
@@ -324,8 +322,9 @@
                    << guid;
     return;
   }
-  message_center::MessageCenter::Get()->AddNotification(
-      message_center::Notification::CreateSystemNotification(
+  NotificationDisplayService::GetForSystemNotifications()->Display(
+      NotificationHandler::Type::TRANSIENT,
+      *message_center::Notification::CreateSystemNotification(
           kNetworkActivateNotificationId,
           l10n_util::GetStringUTF16(IDS_NETWORK_ACTIVATION_ERROR_TITLE),
           l10n_util::GetStringFUTF16(IDS_NETWORK_ACTIVATION_NEEDS_CONNECTION,
@@ -338,12 +337,8 @@
 }
 
 void NetworkStateNotifier::RemoveConnectNotification() {
-  message_center::MessageCenter* message_center =
-      message_center::MessageCenter::Get();
-  if (message_center) {
-    message_center->RemoveNotification(kNetworkConnectNotificationId,
-                                       false /* not by user */);
-  }
+  NotificationDisplayService::GetForSystemNotifications()->Close(
+      NotificationHandler::Type::TRANSIENT, kNetworkConnectNotificationId);
 }
 
 void NetworkStateNotifier::ConnectErrorPropertiesSucceeded(
diff --git a/chrome/browser/chromeos/net/network_state_notifier_unittest.cc b/chrome/browser/chromeos/net/network_state_notifier_unittest.cc
index 586f96e5..88c02a0 100644
--- a/chrome/browser/chromeos/net/network_state_notifier_unittest.cc
+++ b/chrome/browser/chromeos/net/network_state_notifier_unittest.cc
@@ -7,18 +7,19 @@
 #include <memory>
 
 #include "base/macros.h"
-#include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/notifications/notification_display_service_tester.h"
+#include "chrome/test/base/browser_with_test_window_test.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/shill_device_client.h"
 #include "chromeos/dbus/shill_service_client.h"
 #include "chromeos/login/login_state.h"
 #include "chromeos/network/network_connect.h"
 #include "chromeos/network/network_handler.h"
-#include "testing/gtest/include/gtest/gtest.h"
 #include "testing/platform_test.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
-#include "ui/message_center/message_center.h"
+#include "ui/message_center/notification.h"
 
 namespace chromeos {
 namespace test {
@@ -56,18 +57,16 @@
   DISALLOW_COPY_AND_ASSIGN(NetworkConnectTestDelegate);
 };
 
-class NetworkStateNotifierTest : public testing::Test {
+class NetworkStateNotifierTest : public BrowserWithTestWindowTest {
  public:
   NetworkStateNotifierTest() {}
   ~NetworkStateNotifierTest() override {}
 
   void SetUp() override {
-    testing::Test::SetUp();
-    DBusThreadManager::Initialize();
+    BrowserWithTestWindowTest::SetUp();
     LoginState::Initialize();
     SetupDefaultShillState();
     NetworkHandler::Initialize();
-    message_center::MessageCenter::Initialize();
     base::RunLoop().RunUntilIdle();
     network_connect_delegate_.reset(new NetworkConnectTestDelegate);
     NetworkConnect::Initialize(network_connect_delegate_.get());
@@ -76,11 +75,9 @@
   void TearDown() override {
     NetworkConnect::Shutdown();
     network_connect_delegate_.reset();
-    message_center::MessageCenter::Shutdown();
     LoginState::Shutdown();
     NetworkHandler::Shutdown();
-    DBusThreadManager::Shutdown();
-    testing::Test::TearDown();
+    BrowserWithTestWindowTest::TearDown();
   }
 
  protected:
@@ -113,19 +110,17 @@
   }
 
   std::unique_ptr<NetworkConnectTestDelegate> network_connect_delegate_;
-  base::MessageLoop message_loop_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifierTest);
 };
 
 TEST_F(NetworkStateNotifierTest, ConnectionFailure) {
+  NotificationDisplayServiceTester tester(ProfileHelper::GetSigninProfile());
   NetworkConnect::Get()->ConnectToNetworkId(kWiFi1Guid);
   base::RunLoop().RunUntilIdle();
   // Failure should spawn a notification.
-  message_center::MessageCenter* message_center =
-      message_center::MessageCenter::Get();
-  EXPECT_TRUE(message_center->FindVisibleNotificationById(
+  EXPECT_TRUE(tester.GetNotification(
       NetworkStateNotifier::kNetworkConnectNotificationId));
 }
 
diff --git a/chrome/browser/chromeos/smb_client/smb_file_system.cc b/chrome/browser/chromeos/smb_client/smb_file_system.cc
index 3531bcb..0caaf24 100644
--- a/chrome/browser/chromeos/smb_client/smb_file_system.cc
+++ b/chrome/browser/chromeos/smb_client/smb_file_system.cc
@@ -11,6 +11,15 @@
 namespace chromeos {
 namespace smb_client {
 
+namespace {
+
+storage::DirectoryEntry::DirectoryEntryType MapEntryType(bool is_directory) {
+  return is_directory ? storage::DirectoryEntry::DIRECTORY
+                      : storage::DirectoryEntry::FILE;
+}
+
+}  // namespace
+
 using file_system_provider::AbortCallback;
 
 SmbFileSystem::SmbFileSystem(
@@ -122,7 +131,10 @@
 AbortCallback SmbFileSystem::ReadDirectory(
     const base::FilePath& directory_path,
     const storage::AsyncFileUtil::ReadDirectoryCallback& callback) {
-  NOTIMPLEMENTED();
+  GetSmbProviderClient()->ReadDirectory(
+      GetMountId(), directory_path,
+      base::BindOnce(&SmbFileSystem::HandleRequestReadDirectoryCallback,
+                     weak_ptr_factory_.GetWeakPtr(), callback));
   return AbortCallback();
 }
 
@@ -273,6 +285,18 @@
   NOTIMPLEMENTED();
 }
 
+void SmbFileSystem::HandleRequestReadDirectoryCallback(
+    const storage::AsyncFileUtil::ReadDirectoryCallback& callback,
+    smbprovider::ErrorType error,
+    const smbprovider::DirectoryEntryList& entries) const {
+  storage::AsyncFileUtil::EntryList entry_list;
+  for (const smbprovider::DirectoryEntry& entry : entries.entries()) {
+    entry_list.emplace_back(entry.name(), MapEntryType(entry.is_directory()));
+  }
+  // TODO(allenvic): Implement has_more (https://crbug.com/796246).
+  callback.Run(TranslateError(error), entry_list, false /* has_more */);
+}
+
 base::WeakPtr<file_system_provider::ProvidedFileSystemInterface>
 SmbFileSystem::GetWeakPtr() {
   return weak_ptr_factory_.GetWeakPtr();
diff --git a/chrome/browser/chromeos/smb_client/smb_file_system.h b/chrome/browser/chromeos/smb_client/smb_file_system.h
index c4afa70..7b56b84 100644
--- a/chrome/browser/chromeos/smb_client/smb_file_system.h
+++ b/chrome/browser/chromeos/smb_client/smb_file_system.h
@@ -171,6 +171,11 @@
       const storage::AsyncFileUtil::StatusCallback& callback,
       smbprovider::ErrorType smb_error) const;
 
+  void HandleRequestReadDirectoryCallback(
+      const storage::AsyncFileUtil::ReadDirectoryCallback& callback,
+      smbprovider::ErrorType error,
+      const smbprovider::DirectoryEntryList& entries) const;
+
   int32_t GetMountId() const;
 
   SmbProviderClient* GetSmbProviderClient() const;
diff --git a/chrome/browser/chromeos/ui/low_disk_notification.cc b/chrome/browser/chromeos/ui/low_disk_notification.cc
index ebfb771..55e2fba 100644
--- a/chrome/browser/chromeos/ui/low_disk_notification.cc
+++ b/chrome/browser/chromeos/ui/low_disk_notification.cc
@@ -13,6 +13,7 @@
 #include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#include "chrome/browser/notifications/notification_display_service.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/chrome_pages.h"
 #include "chrome/grit/generated_resources.h"
@@ -36,31 +37,12 @@
 constexpr base::TimeDelta kNotificationInterval =
     base::TimeDelta::FromMinutes(2);
 
-class LowDiskNotificationDelegate
-    : public message_center::NotificationDelegate {
- public:
-  LowDiskNotificationDelegate() {}
-
-  // message_center::NotificationDelegate
-  void ButtonClick(int button_index) override {
-    chrome::ShowSettingsSubPageForProfile(
-        ProfileManager::GetActiveUserProfile(), kStoragePage);
-  }
-
- private:
-  ~LowDiskNotificationDelegate() override {}
-
-  DISALLOW_COPY_AND_ASSIGN(LowDiskNotificationDelegate);
-};
-
 }  // namespace
 
 namespace chromeos {
 
 LowDiskNotification::LowDiskNotification()
-    : message_center_(g_browser_process->message_center()),
-      notification_interval_(kNotificationInterval),
-      weak_ptr_factory_(this) {
+    : notification_interval_(kNotificationInterval), weak_ptr_factory_(this) {
   DCHECK(DBusThreadManager::Get()->GetCryptohomeClient());
   DBusThreadManager::Get()->GetCryptohomeClient()->AddObserver(this);
 }
@@ -87,7 +69,8 @@
   if (severity != last_notification_severity_ ||
       (severity == HIGH &&
        now - last_notification_time_ > notification_interval_)) {
-    message_center_->AddNotification(CreateNotification(severity));
+    NotificationDisplayService::GetForSystemNotifications()->Display(
+        NotificationHandler::Type::TRANSIENT, *CreateNotification(severity));
     last_notification_time_ = now;
     last_notification_severity_ = severity;
   }
@@ -120,12 +103,19 @@
       message_center::NotifierId::SYSTEM_COMPONENT,
       ash::system_notifier::kNotifierDisk);
 
+  auto on_click = base::BindRepeating([](base::Optional<int> button_index) {
+    if (button_index) {
+      DCHECK_EQ(0, *button_index);
+      chrome::ShowSettingsSubPageForProfile(
+          ProfileManager::GetActiveUserProfile(), kStoragePage);
+    }
+  });
   std::unique_ptr<message_center::Notification> notification =
       message_center::Notification::CreateSystemNotification(
           message_center::NOTIFICATION_TYPE_SIMPLE, kLowDiskId, title, message,
           gfx::Image(), base::string16(), GURL(), notifier_id, optional_fields,
-          new LowDiskNotificationDelegate(), kNotificationStorageFullIcon,
-          warning_level);
+          new message_center::HandleNotificationClickDelegate(on_click),
+          kNotificationStorageFullIcon, warning_level);
 
   return notification;
 }
@@ -139,11 +129,6 @@
   return Severity::NONE;
 }
 
-void LowDiskNotification::SetMessageCenterForTest(
-    message_center::MessageCenter* message_center) {
-  message_center_ = message_center;
-}
-
 void LowDiskNotification::SetNotificationIntervalForTest(
     base::TimeDelta notification_interval) {
   notification_interval_ = notification_interval;
diff --git a/chrome/browser/chromeos/ui/low_disk_notification.h b/chrome/browser/chromeos/ui/low_disk_notification.h
index 2e4a663..7f2cdfe8 100644
--- a/chrome/browser/chromeos/ui/low_disk_notification.h
+++ b/chrome/browser/chromeos/ui/low_disk_notification.h
@@ -17,7 +17,6 @@
 
 namespace message_center {
 class Notification;
-class MessageCenter;
 }
 
 namespace chromeos {
@@ -56,16 +55,12 @@
   // left on the disk.
   Severity GetSeverity(uint64_t free_disk_bytes);
 
-  // Sets the MessageCenter instance to use.  Should only be used in tests.
-  void SetMessageCenterForTest(message_center::MessageCenter* message_center);
-
   // Sets the minimum time to wait between notifications of the same severity.
   // Should only be used in tests.
   void SetNotificationIntervalForTest(base::TimeDelta interval);
 
   base::Time last_notification_time_;
   Severity last_notification_severity_ = NONE;
-  message_center::MessageCenter* message_center_;
   base::TimeDelta notification_interval_;
   base::ThreadChecker thread_checker_;
   base::WeakPtrFactory<LowDiskNotification> weak_ptr_factory_;
diff --git a/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc b/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc
index ab009f4..de6d505 100644
--- a/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc
+++ b/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc
@@ -8,17 +8,17 @@
 
 #include <utility>
 
-#include "base/test/scoped_task_environment.h"
-#include "base/threading/platform_thread.h"
 #include "base/time/time.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/notifications/notification_display_service_tester.h"
 #include "chrome/grit/generated_resources.h"
+#include "chrome/test/base/browser_with_test_window_test.h"
+#include "chrome/test/base/testing_profile_manager.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/fake_cryptohome_client.h"
-#include "testing/gtest/include/gtest/gtest.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/message_center/fake_message_center.h"
-#include "ui/message_center/message_center.h"
+#include "ui/message_center/notification.h"
 
 namespace {
 
@@ -30,39 +30,44 @@
 
 namespace chromeos {
 
-class LowDiskNotificationTest : public testing::Test,
-                                public message_center::FakeMessageCenter {
+class LowDiskNotificationTest : public BrowserWithTestWindowTest {
  public:
   LowDiskNotificationTest() {}
+  ~LowDiskNotificationTest() override {}
 
   void SetUp() override {
     DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient(
         std::unique_ptr<CryptohomeClient>(new FakeCryptohomeClient));
-    message_center::MessageCenter::Initialize();
+
+    BrowserWithTestWindowTest::SetUp();
+
+    tester_ = std::make_unique<NotificationDisplayServiceTester>(
+        ProfileHelper::GetSigninProfile());
+    tester_->SetNotificationAddedClosure(base::BindRepeating(
+        &LowDiskNotificationTest::OnNotificationAdded, base::Unretained(this)));
     low_disk_notification_.reset(new LowDiskNotification());
-    low_disk_notification_->SetMessageCenterForTest(this);
-    low_disk_notification_->SetNotificationIntervalForTest(
-        base::TimeDelta::FromMilliseconds(10));
     notification_count_ = 0;
   }
 
   void TearDown() override {
     low_disk_notification_.reset();
-    last_notification_.reset();
-    message_center::MessageCenter::Shutdown();
-    DBusThreadManager::Shutdown();
+    BrowserWithTestWindowTest::TearDown();
   }
 
-  void AddNotification(
-      std::unique_ptr<message_center::Notification> notification) override {
-    last_notification_ = std::move(notification);
-    notification_count_++;
+  base::Optional<message_center::Notification> GetNotification() {
+    return tester_->GetNotification("low_disk");
   }
 
+  void SetNotificationThrottlingInterval(int ms) {
+    low_disk_notification_->SetNotificationIntervalForTest(
+        base::TimeDelta::FromMilliseconds(ms));
+  }
+
+  void OnNotificationAdded() { notification_count_++; }
+
  protected:
-  base::test::ScopedTaskEnvironment scoped_task_environment_;
+  std::unique_ptr<NotificationDisplayServiceTester> tester_;
   std::unique_ptr<LowDiskNotification> low_disk_notification_;
-  std::unique_ptr<message_center::Notification> last_notification_;
   int notification_count_;
 };
 
@@ -70,8 +75,9 @@
   base::string16 expected_title =
       l10n_util::GetStringUTF16(IDS_LOW_DISK_NOTIFICATION_TITLE);
   low_disk_notification_->LowDiskSpace(kMediumNotification);
-  EXPECT_NE(nullptr, last_notification_);
-  EXPECT_EQ(expected_title, last_notification_->title());
+  auto notification = GetNotification();
+  ASSERT_TRUE(notification);
+  EXPECT_EQ(expected_title, notification->title());
   EXPECT_EQ(1, notification_count_);
 }
 
@@ -80,28 +86,29 @@
       l10n_util::GetStringUTF16(IDS_CRITICALLY_LOW_DISK_NOTIFICATION_TITLE);
   low_disk_notification_->LowDiskSpace(kMediumNotification);
   low_disk_notification_->LowDiskSpace(kHighNotification);
-  EXPECT_NE(nullptr, last_notification_);
-  EXPECT_EQ(expected_title, last_notification_->title());
+  auto notification = GetNotification();
+  ASSERT_TRUE(notification);
+  EXPECT_EQ(expected_title, notification->title());
   EXPECT_EQ(2, notification_count_);
 }
 
 TEST_F(LowDiskNotificationTest, NotificationsAreThrottled) {
+  SetNotificationThrottlingInterval(10000000);
   low_disk_notification_->LowDiskSpace(kHighNotification);
-  base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(5));
   low_disk_notification_->LowDiskSpace(kHighNotification);
   EXPECT_EQ(1, notification_count_);
 }
 
 TEST_F(LowDiskNotificationTest, HighNotificationsAreShownAfterThrottling) {
+  SetNotificationThrottlingInterval(-1);
   low_disk_notification_->LowDiskSpace(kHighNotification);
-  base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(15));
   low_disk_notification_->LowDiskSpace(kHighNotification);
   EXPECT_EQ(2, notification_count_);
 }
 
 TEST_F(LowDiskNotificationTest, MediumNotificationsAreNotShownAfterThrottling) {
+  SetNotificationThrottlingInterval(-1);
   low_disk_notification_->LowDiskSpace(kMediumNotification);
-  base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(15));
   low_disk_notification_->LowDiskSpace(kMediumNotification);
   EXPECT_EQ(1, notification_count_);
 }
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index a3a4513..f5915bc 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -1128,7 +1128,7 @@
 content::ColorChooser* DevToolsWindow::OpenColorChooser(
     WebContents* web_contents,
     SkColor initial_color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   return chrome::ShowColorChooser(web_contents, initial_color);
 }
 
diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h
index 7659ef7..ce0147f 100644
--- a/chrome/browser/devtools/devtools_window.h
+++ b/chrome/browser/devtools/devtools_window.h
@@ -307,7 +307,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
       override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const content::FileChooserParams& params) override;
diff --git a/chrome/browser/extensions/api/automation/automation_apitest.cc b/chrome/browser/extensions/api/automation/automation_apitest.cc
index c196bed..81b2727 100644
--- a/chrome/browser/extensions/api/automation/automation_apitest.cc
+++ b/chrome/browser/extensions/api/automation/automation_apitest.cc
@@ -281,7 +281,7 @@
 }
 
 // TODO(crbug.com/725420) Flaky
-IN_PROC_BROWSER_TEST_F(AutomationApiTest, DISABLED_Attributes) {
+IN_PROC_BROWSER_TEST_F(AutomationApiTest, Attributes) {
   StartEmbeddedTestServer();
   ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs", "attributes.html"))
       << message_;
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc
index 1b0604b4..4a705c1 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
@@ -146,32 +146,28 @@
   switch (details->cause) {
     // Report an inserted cookie as an "explicit" change cause. All other causes
     // only make sense for deletions.
-    case net::CookieStore::ChangeCause::INSERTED:
-    case net::CookieStore::ChangeCause::EXPLICIT:
-    case net::CookieStore::ChangeCause::EXPLICIT_DELETE_BETWEEN:
-    case net::CookieStore::ChangeCause::EXPLICIT_DELETE_PREDICATE:
-    case net::CookieStore::ChangeCause::EXPLICIT_DELETE_SINGLE:
-    case net::CookieStore::ChangeCause::EXPLICIT_DELETE_CANONICAL:
+    case network::mojom::CookieChangeCause::INSERTED:
+    case network::mojom::CookieChangeCause::EXPLICIT:
       cause = keys::kExplicitChangeCause;
       break;
 
-    case net::CookieStore::ChangeCause::OVERWRITE:
+    case network::mojom::CookieChangeCause::OVERWRITE:
       cause = keys::kOverwriteChangeCause;
       break;
 
-    case net::CookieStore::ChangeCause::EXPIRED:
+    case network::mojom::CookieChangeCause::EXPIRED:
       cause = keys::kExpiredChangeCause;
       break;
 
-    case net::CookieStore::ChangeCause::EVICTED:
+    case network::mojom::CookieChangeCause::EVICTED:
       cause = keys::kEvictedChangeCause;
       break;
 
-    case net::CookieStore::ChangeCause::EXPIRED_OVERWRITE:
+    case network::mojom::CookieChangeCause::EXPIRED_OVERWRITE:
       cause = keys::kExpiredOverwriteChangeCause;
       break;
 
-    case net::CookieStore::ChangeCause::UNKNOWN_DELETION:
+    case network::mojom::CookieChangeCause::UNKNOWN_DELETION:
       NOTREACHED();
   }
   dict->SetString(keys::kCauseKey, cause);
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index f190258..8d03bf41 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -85,7 +85,6 @@
 #include "storage/browser/fileapi/file_system_operation_runner.h"
 #include "storage/browser/fileapi/isolated_context.h"
 #include "ui/base/l10n/l10n_util.h"
-#include "ui/base/text/bytes_formatting.h"
 
 namespace extensions {
 
@@ -676,11 +675,8 @@
   if (!extension)
     return RespondNow(Error(kNoSuchExtensionError));
 
-  // TODO(dpapad): Share this logic with
-  // chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc.
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
-      base::BindOnce(&base::ComputeDirectorySize, extension->path()),
+  extensions::path_util::CalculateAndFormatExtensionDirectorySize(
+      extension->path(), IDS_APPLICATION_INFO_SIZE_SMALL_LABEL,
       base::BindOnce(
           &DeveloperPrivateGetExtensionSizeFunction::OnSizeCalculated,
           this /* refcounted */));
@@ -689,17 +685,8 @@
 }
 
 void DeveloperPrivateGetExtensionSizeFunction::OnSizeCalculated(
-    int64_t size_in_bytes) {
-  base::string16 response;
-
-  const int one_mebibyte_in_bytes = 1024 * 1024;
-  if (size_in_bytes < one_mebibyte_in_bytes) {
-    response = l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SIZE_SMALL_LABEL);
-  } else {
-    response =
-        ui::FormatBytesWithUnits(size_in_bytes, ui::DATA_UNITS_MEBIBYTE, true);
-  }
-  Respond(OneArgument(std::make_unique<base::Value>(response)));
+    const base::string16& size) {
+  Respond(OneArgument(std::make_unique<base::Value>(size)));
 }
 
 DeveloperPrivateGetItemsInfoFunction::DeveloperPrivateGetItemsInfoFunction() {}
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index 4ef3918..fe917f45 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -359,7 +359,7 @@
   ~DeveloperPrivateGetExtensionSizeFunction() override;
   ResponseAction Run() override;
 
-  void OnSizeCalculated(int64_t size_in_bytes);
+  void OnSizeCalculated(const base::string16& size);
 
   DISALLOW_COPY_AND_ASSIGN(DeveloperPrivateGetExtensionSizeFunction);
 };
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
index ecebcd2..963dcc72 100644
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
@@ -149,7 +149,8 @@
     }
 
     bookmark_app_helper_.reset(new extensions::BookmarkAppHelper(
-        Profile::FromBrowserContext(context), web_app, NULL));
+        Profile::FromBrowserContext(context), web_app, nullptr,
+        WebAppInstallSource::MANAGEMENT_API));
     bookmark_app_helper_->Create(
         base::Bind(&extensions::ManagementGenerateAppForLinkFunction::
                        FinishCreateBookmarkApp,
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
index efbc99286..4364aed 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -177,7 +177,7 @@
       settings_private::PrefType::PREF_TYPE_BOOLEAN;
 
   // Languages page
-  (*s_whitelist)[spellcheck::prefs::kEnableSpellcheck] =
+  (*s_whitelist)[spellcheck::prefs::kSpellCheckEnable] =
       settings_private::PrefType::PREF_TYPE_BOOLEAN;
   (*s_whitelist)[spellcheck::prefs::kSpellCheckDictionaries] =
       settings_private::PrefType::PREF_TYPE_LIST;
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
index 49eaae2b..c0a1ce1 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
@@ -281,13 +281,15 @@
 }
 
 void WebrtcAudioPrivateGetAssociatedSinkFunction::CalculateHMACOnIOThread(
-    const std::string& raw_sink_id) {
+    const base::Optional<std::string>& raw_sink_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DCHECK(!raw_sink_id || !raw_sink_id->empty());
+  // If no |raw_sink_id| is provided, the default device is used.
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
       base::BindOnce(
           &WebrtcAudioPrivateGetAssociatedSinkFunction::ReceiveHMACOnUIThread,
-          this, CalculateHMAC(raw_sink_id)));
+          this, CalculateHMAC(raw_sink_id.value_or(std::string()))));
 }
 
 void WebrtcAudioPrivateGetAssociatedSinkFunction::ReceiveHMACOnUIThread(
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
index 2d706be3..9f02238 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
@@ -135,7 +135,7 @@
 
   // IO thread: Receives the raw sink ID, calculates HMAC and replies to IO
   // thread with ReceiveHMACOnUIThread().
-  void CalculateHMACOnIOThread(const std::string& raw_sink_id);
+  void CalculateHMACOnIOThread(const base::Optional<std::string>& raw_sink_id);
 
   // Receives the associated sink ID as HMAC and sends the response.
   void ReceiveHMACOnUIThread(const std::string& hmac);
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
index b845e30..85228f0e 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -427,8 +427,6 @@
 // Tests getWebGLStatus function when WebGL is blacklisted.
 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) {
   content::GpuDataManager::GetInstance()->BlacklistWebGLForTesting();
-  EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL));
 
   bool webgl_allowed = false;
   RunTest(webgl_allowed);
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc
index 62f02ac..42e6ee53 100644
--- a/chrome/browser/extensions/bookmark_app_helper.cc
+++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -531,12 +531,14 @@
 
 BookmarkAppHelper::BookmarkAppHelper(Profile* profile,
                                      WebApplicationInfo web_app_info,
-                                     content::WebContents* contents)
+                                     content::WebContents* contents,
+                                     WebAppInstallSource install_source)
     : profile_(profile),
       contents_(contents),
       web_app_info_(web_app_info),
       crx_installer_(extensions::CrxInstaller::CreateSilent(
           ExtensionSystem::Get(profile)->extension_service())),
+      install_source_(install_source),
       weak_factory_(this) {
   if (contents)
     installable_manager_ = InstallableManager::FromWebContents(contents);
@@ -729,6 +731,11 @@
   if (user_accepted) {
     web_app_info_ = web_app_info;
     crx_installer_->InstallWebApp(web_app_info_);
+
+    if (InstallableMetrics::IsReportableInstallSource(install_source_) &&
+        installable_ == INSTALLABLE_YES) {
+      InstallableMetrics::TrackInstallSource(install_source_);
+    }
   } else {
     callback_.Run(nullptr, web_app_info_);
   }
diff --git a/chrome/browser/extensions/bookmark_app_helper.h b/chrome/browser/extensions/bookmark_app_helper.h
index c969d1b..2405c5d4 100644
--- a/chrome/browser/extensions/bookmark_app_helper.h
+++ b/chrome/browser/extensions/bookmark_app_helper.h
@@ -13,6 +13,7 @@
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
+#include "chrome/browser/installable/installable_metrics.h"
 #include "chrome/common/web_application_info.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
@@ -55,9 +56,11 @@
   // All existing icons from WebApplicationInfo will also be used. The user
   // will then be prompted to edit the creation information via a bubble and
   // will have a chance to cancel the operation.
+  // |install_source| indicates how the installation was triggered.
   BookmarkAppHelper(Profile* profile,
                     WebApplicationInfo web_app_info,
-                    content::WebContents* contents);
+                    content::WebContents* contents,
+                    WebAppInstallSource install_source);
   ~BookmarkAppHelper() override;
 
   // Update the given WebApplicationInfo with information from the manifest.
@@ -165,6 +168,9 @@
 
   Installable installable_ = INSTALLABLE_UNKNOWN;
 
+  // The mechanism via which the app creation was triggered.
+  WebAppInstallSource install_source_;
+
   // With fast tab unloading enabled, shutting down can cause BookmarkAppHelper
   // to be destroyed before the bookmark creation bubble. Use weak pointers to
   // prevent a heap-use-after free in this instance (https://crbug.com/534994).
diff --git a/chrome/browser/extensions/bookmark_app_helper_browsertest.cc b/chrome/browser/extensions/bookmark_app_helper_browsertest.cc
index 58259a8..ed2e067 100644
--- a/chrome/browser/extensions/bookmark_app_helper_browsertest.cc
+++ b/chrome/browser/extensions/bookmark_app_helper_browsertest.cc
@@ -31,8 +31,9 @@
   TestBookmarkAppHelper(Profile* profile,
                         WebApplicationInfo web_app_info,
                         content::WebContents* contents,
-                        base::Closure on_icons_downloaded_closure)
-      : BookmarkAppHelper(profile, web_app_info, contents),
+                        base::Closure on_icons_downloaded_closure,
+                        WebAppInstallSource install_source)
+      : BookmarkAppHelper(profile, web_app_info, contents, install_source),
         on_icons_downloaded_closure_(on_icons_downloaded_closure) {}
 
   // TestBookmarkAppHelper:
@@ -73,7 +74,8 @@
       info.title = base::UTF8ToUTF16(info.app_url.spec());
 
     bookmark_app_helper_ = base::MakeUnique<TestBookmarkAppHelper>(
-        browser()->profile(), info, web_contents(), quit_closure_);
+        browser()->profile(), info, web_contents(), quit_closure_,
+        WebAppInstallSource::MENU);
     bookmark_app_helper_->Create(
         base::Bind(&BookmarkAppHelperTest::FinishCreateBookmarkApp,
                    base::Unretained(this)));
diff --git a/chrome/browser/extensions/bookmark_app_helper_unittest.cc b/chrome/browser/extensions/bookmark_app_helper_unittest.cc
index 0e1b4e8..4cf41cc 100644
--- a/chrome/browser/extensions/bookmark_app_helper_unittest.cc
+++ b/chrome/browser/extensions/bookmark_app_helper_unittest.cc
@@ -283,7 +283,10 @@
   TestBookmarkAppHelper(ExtensionService* service,
                         WebApplicationInfo web_app_info,
                         content::WebContents* contents)
-      : BookmarkAppHelper(service->profile(), web_app_info, contents),
+      : BookmarkAppHelper(service->profile(),
+                          web_app_info,
+                          contents,
+                          WebAppInstallSource::MENU),
         bitmap_(CreateSquareBitmapWithColor(32, SK_ColorRED)) {}
 
   ~TestBookmarkAppHelper() override {}
diff --git a/chrome/browser/extensions/chrome_app_icon_unittest.cc b/chrome/browser/extensions/chrome_app_icon_unittest.cc
index f0874ab..2f2f0a6 100644
--- a/chrome/browser/extensions/chrome_app_icon_unittest.cc
+++ b/chrome/browser/extensions/chrome_app_icon_unittest.cc
@@ -5,7 +5,6 @@
 #include <memory>
 #include <vector>
 
-#include "ash/app_list/model/app_list_item.h"
 #include "base/macros.h"
 #include "base/run_loop.h"
 #include "chrome/browser/extensions/chrome_app_icon.h"
@@ -24,6 +23,7 @@
 #if defined(OS_CHROMEOS)
 #include "chrome/browser/chromeos/arc/arc_util.h"
 #include "chrome/browser/ui/app_list/arc/arc_app_test.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 #include "chrome/browser/ui/app_list/extension_app_model_builder.h"
 #include "chrome/browser/ui/app_list/search/extension_app_result.h"
 #include "chrome/browser/ui/app_list/test/fake_app_list_model_updater.h"
@@ -278,7 +278,7 @@
     model_updater_.reset();
   }
 
-  app_list::AppListItem* FindAppListItem(const std::string& app_id) {
+  ChromeAppListItem* FindAppListItem(const std::string& app_id) {
     return model_updater_->FindItem(app_id);
   }
 
@@ -300,9 +300,9 @@
 
   // App list item is already created. Wait until all image representations are
   // updated and take image snapshot.
-  app_list::AppListItem* app_list_item = FindAppListItem(kTestAppId);
+  ChromeAppListItem* app_list_item = FindAppListItem(kTestAppId);
   ASSERT_TRUE(app_list_item);
-  WaitForIconUpdates<app_list::AppListItem>(*app_list_item);
+  WaitForIconUpdates<ChromeAppListItem>(*app_list_item);
   std::unique_ptr<gfx::ImageSkia> app_list_item_image =
       app_list_item->icon().DeepCopy();
 
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc
index 7fc4082..6f9b15f2 100644
--- a/chrome/browser/extensions/convert_web_app_unittest.cc
+++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -271,7 +271,7 @@
   EXPECT_EQ("zVvdNZy3Mp7CFU8JVSyXNlDuHdVLbP7fDO3TGVzj/0w=",
             extension->public_key());
   EXPECT_EQ("oplhagaaipaimkjlbekcdjkffijdockj", extension->id());
-  EXPECT_EQ("1978.12.11.0", extension->version()->GetString());
+  EXPECT_EQ("1978.12.11.0", extension->version().GetString());
   EXPECT_EQ(base::UTF16ToUTF8(web_app.title), extension->name());
   EXPECT_EQ(base::UTF16ToUTF8(web_app.description), extension->description());
   EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension.get()));
@@ -317,7 +317,7 @@
   EXPECT_EQ("zVvdNZy3Mp7CFU8JVSyXNlDuHdVLbP7fDO3TGVzj/0w=",
             extension->public_key());
   EXPECT_EQ("oplhagaaipaimkjlbekcdjkffijdockj", extension->id());
-  EXPECT_EQ("1978.12.11.0", extension->version()->GetString());
+  EXPECT_EQ("1978.12.11.0", extension->version().GetString());
   EXPECT_EQ(base::UTF16ToUTF8(web_app.title), extension->name());
   EXPECT_EQ("", extension->description());
   EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension.get()));
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index e426489..277df69c 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -324,19 +324,19 @@
   }
 
   if (minimum_version_.IsValid() &&
-      extension->version()->CompareTo(minimum_version_) < 0) {
+      extension->version().CompareTo(minimum_version_) < 0) {
     return CrxInstallError(l10n_util::GetStringFUTF16(
         IDS_EXTENSION_INSTALL_UNEXPECTED_VERSION,
         base::ASCIIToUTF16(minimum_version_.GetString() + "+"),
-        base::ASCIIToUTF16(extension->version()->GetString())));
+        base::ASCIIToUTF16(extension->version().GetString())));
   }
 
   if (expected_version_.IsValid() && fail_install_if_unexpected_version_ &&
-      expected_version_ != *extension->version()) {
+      expected_version_ != extension->version()) {
     return CrxInstallError(l10n_util::GetStringFUTF16(
         IDS_EXTENSION_INSTALL_UNEXPECTED_VERSION,
         base::ASCIIToUTF16(expected_version_.GetString()),
-        base::ASCIIToUTF16(extension->version()->GetString())));
+        base::ASCIIToUTF16(extension->version().GetString())));
   }
 
   // Make sure the manifests match if we want to bypass the prompt.
@@ -554,14 +554,14 @@
       }
       base::Version version_required(import.minimum_version);
       if (version_required.IsValid() &&
-          imported_module->version()->CompareTo(version_required) < 0) {
+          imported_module->version().CompareTo(version_required) < 0) {
         ReportFailureFromUIThread(CrxInstallError(
             CrxInstallError::ERROR_DECLINED,
             l10n_util::GetStringFUTF16(
                 IDS_EXTENSION_INSTALL_DEPENDENCY_OLD_VERSION,
                 base::UTF8ToUTF16(imported_module->name()),
                 base::ASCIIToUTF16(import.minimum_version),
-                base::ASCIIToUTF16(imported_module->version()->GetString()))));
+                base::ASCIIToUTF16(imported_module->version().GetString()))));
         return;
       }
       if (!SharedModuleInfo::IsExportAllowedByWhitelist(imported_module,
@@ -787,7 +787,7 @@
   DCHECK(installer_task_runner_->RunsTasksInCurrentSequence());
 
   if (current_version_.IsValid() &&
-      current_version_.CompareTo(*(extension()->version())) > 0) {
+      current_version_.CompareTo(extension()->version()) > 0) {
     ReportFailureFromFileThread(CrxInstallError(
         CrxInstallError::ERROR_DECLINED,
         l10n_util::GetStringUTF16(
@@ -916,10 +916,9 @@
     // We update the extension's granted permissions if the user already
     // approved the install (client_ is non NULL), or we are allowed to install
     // this silently.
-    if ((client_ || allow_silent_install_) &&
-        grant_permissions_ &&
+    if ((client_ || allow_silent_install_) && grant_permissions_ &&
         (!expected_version_.IsValid() ||
-         expected_version_ == *extension()->version())) {
+         expected_version_ == extension()->version())) {
       PermissionsUpdater perms_updater(profile());
       perms_updater.InitializePermissions(extension());
       perms_updater.GrantActivePermissions(extension());
diff --git a/chrome/browser/extensions/crx_installer_browsertest.cc b/chrome/browser/extensions/crx_installer_browsertest.cc
index f3a56e2..9b861c1d 100644
--- a/chrome/browser/extensions/crx_installer_browsertest.cc
+++ b/chrome/browser/extensions/crx_installer_browsertest.cc
@@ -639,7 +639,7 @@
      registry->enabled_extensions().GetByID(extension_id);
   ASSERT_TRUE(extension);
   ASSERT_EQ(extension_id, extension->id());
-  ASSERT_EQ("1.0", extension->version()->GetString());
+  ASSERT_EQ("1.0", extension->version().GetString());
 
   // Make test extension non-idle by opening the extension's options page.
   ExtensionTabUtil::OpenOptionsPage(extension, browser());
@@ -652,7 +652,7 @@
 
   ASSERT_EQ(1u, service->delayed_installs()->size());
   extension = registry->enabled_extensions().GetByID(extension_id);
-  ASSERT_EQ("1.0", extension->version()->GetString());
+  ASSERT_EQ("1.0", extension->version().GetString());
 
   // Make the extension idle again by navigating away from the options page.
   // This should not trigger the delayed install.
@@ -660,7 +660,7 @@
   WaitForExtensionIdle(extension_id);
   ASSERT_EQ(1u, service->delayed_installs()->size());
   extension = registry->enabled_extensions().GetByID(extension_id);
-  ASSERT_EQ("1.0", extension->version()->GetString());
+  ASSERT_EQ("1.0", extension->version().GetString());
 
   // Install version 3 of the extension. Because the extension is idle,
   // this install should succeed.
@@ -668,14 +668,14 @@
   ASSERT_FALSE(v3_path.empty());
   ASSERT_TRUE(UpdateExtensionWaitForIdle(extension_id, v3_path, 0));
   extension = registry->enabled_extensions().GetByID(extension_id);
-  ASSERT_EQ("3.0", extension->version()->GetString());
+  ASSERT_EQ("3.0", extension->version().GetString());
 
   // The version 2 delayed install should be cleaned up, and finishing
   // delayed extension installation shouldn't break anything.
   ASSERT_EQ(0u, service->delayed_installs()->size());
   service->MaybeFinishDelayedInstallations();
   extension = registry->enabled_extensions().GetByID(extension_id);
-  ASSERT_EQ("3.0", extension->version()->GetString());
+  ASSERT_EQ("3.0", extension->version().GetString());
 }
 
 #if defined(FULL_SAFE_BROWSING)
diff --git a/chrome/browser/extensions/extension_cookie_notifier.cc b/chrome/browser/extensions/extension_cookie_notifier.cc
index 14b5ea8..a4e2923 100644
--- a/chrome/browser/extensions/extension_cookie_notifier.cc
+++ b/chrome/browser/extensions/extension_cookie_notifier.cc
@@ -11,61 +11,46 @@
 #include "chrome/browser/net/chrome_cookie_notification_details.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
+#include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_service.h"
-
-namespace {
-
-void OnCookieChangedAsyncHelper(Profile* profile,
-                                const net::CanonicalCookie& cookie,
-                                bool removed,
-                                net::CookieStore::ChangeCause cause) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
-  // Confirm the profile hasn't gone away since this object was created.
-  if (!g_browser_process->profile_manager()->IsValidProfile(profile))
-    return;
-
-  ChromeCookieDetails cookie_details(&cookie, removed, cause);
-  content::NotificationService::current()->Notify(
-      chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS,
-      content::Source<Profile>(profile),
-      content::Details<ChromeCookieDetails>(&cookie_details));
-}
-
-}  // namespace
+#include "content/public/browser/storage_partition.h"
+#include "net/cookies/canonical_cookie.h"
 
 ExtensionCookieNotifier::ExtensionCookieNotifier(Profile* profile)
     : profile_(profile) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   DCHECK(profile);
-  DETACH_FROM_SEQUENCE(sequence_checker_);
-}
 
-void ExtensionCookieNotifier::AddStore(net::CookieStore* store) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  std::unique_ptr<net::CookieStore::CookieChangedSubscription> sub =
-      store->AddCallbackForAllChanges(
-          base::Bind(&ExtensionCookieNotifier::OnCookieChanged,
-                     // |*store| is guaranteed to outlive this object, and
-                     // this object's destruction will deregister the
-                     // subscription.
-                     base::Unretained(this)));
+  network::mojom::CookieManagerPtr manager_ptr;
 
-  subscriptions_.push_back(std::move(sub));
+  content::BrowserContext::GetDefaultStoragePartition(profile)
+      ->GetNetworkContext()
+      ->GetCookieManager(mojo::MakeRequest(&manager_ptr));
+
+  network::mojom::CookieChangeNotificationPtr notification_ptr;
+  binding_ =
+      std::make_unique<mojo::Binding<network::mojom::CookieChangeNotification>>(
+          this, mojo::MakeRequest(&notification_ptr));
+  manager_ptr->RequestGlobalNotifications(std::move(notification_ptr));
 }
 
 void ExtensionCookieNotifier::OnCookieChanged(
     const net::CanonicalCookie& cookie,
-    net::CookieStore::ChangeCause cause) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+    network::mojom::CookieChangeCause cause) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  content::BrowserThread::PostTask(
-      content::BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&OnCookieChangedAsyncHelper, profile_, cookie,
-                     !(cause == net::CookieStore::ChangeCause::INSERTED),
-                     cause));
+  // Confirm the profile hasn't gone away since this object was created.
+  if (!g_browser_process->profile_manager()->IsValidProfile(profile_))
+    return;
+
+  ChromeCookieDetails cookie_details(
+      &cookie, cause != network::mojom::CookieChangeCause::INSERTED, cause);
+  content::NotificationService::current()->Notify(
+      chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS,
+      content::Source<Profile>(profile_),
+      content::Details<ChromeCookieDetails>(&cookie_details));
 }
 
 ExtensionCookieNotifier::~ExtensionCookieNotifier() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 }
diff --git a/chrome/browser/extensions/extension_cookie_notifier.h b/chrome/browser/extensions/extension_cookie_notifier.h
index 33c5c4e..d7552f1 100644
--- a/chrome/browser/extensions/extension_cookie_notifier.h
+++ b/chrome/browser/extensions/extension_cookie_notifier.h
@@ -9,36 +9,32 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/sequence_checker.h"
-#include "net/cookies/cookie_store.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/network/public/interfaces/cookie_manager.mojom.h"
 
 class Profile;
 
+namespace net {
+class CanonicalCookie;
+}
+
 // Sends cookie-change notifications on the UI thread via
-// chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS.
-// This class must be used (AddStore() and OnCookieChanged() called) on a
-// single thread, but it may be constructed on a different thread.
-class ExtensionCookieNotifier {
+// chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS for all cookie
+// changes associated with the given profile.
+class ExtensionCookieNotifier
+    : public network::mojom::CookieChangeNotification {
  public:
   explicit ExtensionCookieNotifier(Profile* profile);
-  ~ExtensionCookieNotifier();
-
-  // Add a CookieStore for which cookie notifications will be transmitted.
-  // This store will be monitored until this object is destructed; i.e.
-  // |*store| must outlive this object.
-  // Must be called on the IO thread.
-  void AddStore(net::CookieStore* store);
+  ~ExtensionCookieNotifier() override;
 
  private:
-  // net::CookieStore::CookieChangedCallback implementation.
+  // network::mojom::CookieChangeNotification implementation.
   void OnCookieChanged(const net::CanonicalCookie& cookie,
-                       net::CookieStore::ChangeCause cause);
+                       network::mojom::CookieChangeCause cause) override;
 
   Profile* profile_;
-  std::vector<std::unique_ptr<net::CookieStore::CookieChangedSubscription>>
-      subscriptions_;
-
-  SEQUENCE_CHECKER(sequence_checker_);
+  std::unique_ptr<mojo::Binding<network::mojom::CookieChangeNotification>>
+      binding_;
 
   DISALLOW_COPY_AND_ASSIGN(ExtensionCookieNotifier);
 };
diff --git a/chrome/browser/extensions/extension_loading_browsertest.cc b/chrome/browser/extensions/extension_loading_browsertest.cc
index 12c2c1b..f855ff9 100644
--- a/chrome/browser/extensions/extension_loading_browsertest.cc
+++ b/chrome/browser/extensions/extension_loading_browsertest.cc
@@ -87,7 +87,7 @@
   // Upgrade the extension.
   new_tab_extension = UpdateExtension(
       new_tab_extension->id(), extension_dir.Pack(), 0 /*expected upgrade*/);
-  EXPECT_THAT(new_tab_extension->version()->components(),
+  EXPECT_THAT(new_tab_extension->version().components(),
               testing::ElementsAre(2));
 
   // The extension takes a couple round-trips to the renderer in order
@@ -159,7 +159,7 @@
 
   EXPECT_TRUE(new_tab_extension->permissions_data()->HasAPIPermission(
       APIPermission::kNewTabPageOverride));
-  EXPECT_THAT(new_tab_extension->version()->components(),
+  EXPECT_THAT(new_tab_extension->version().components(),
               testing::ElementsAre(2));
 }
 
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
index 6c733a65..f593d7f0 100644
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -269,8 +269,8 @@
   // If there are no minimum version required for |extension|, return true.
   if (iter == settings_by_id_.end() || !iter->second->minimum_version_required)
     return true;
-  bool meets_requirement = extension->version()->CompareTo(
-                             *iter->second->minimum_version_required) >= 0;
+  bool meets_requirement = extension->version().CompareTo(
+                               *iter->second->minimum_version_required) >= 0;
   // Output a human readable version string for prompting if necessary.
   if (!meets_requirement && required_version)
     *required_version = iter->second->minimum_version_required->GetString();
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index ab55eb7..39476b8 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1296,8 +1296,7 @@
   const Extension* old = GetInstalledExtension(extension->id());
   if (old) {
     is_extension_loaded = true;
-    int version_compare_result =
-        extension->version()->CompareTo(*(old->version()));
+    int version_compare_result = extension->version().CompareTo(old->version());
     is_extension_upgrade = version_compare_result > 0;
     // Other than for unpacked extensions, CrxInstaller should have guaranteed
     // that we aren't downgrading.
@@ -1359,10 +1358,11 @@
   const base::Version old_version(old_version_string);
 
   VLOG(1) << "AddComponentExtension " << extension->name();
-  if (!old_version.IsValid() || old_version != *extension->version()) {
+  if (!old_version.IsValid() || old_version != extension->version()) {
     VLOG(1) << "Component extension " << extension->name() << " ("
-        << extension->id() << ") installing/upgrading from '"
-        << old_version_string << "' to " << extension->version()->GetString();
+            << extension->id() << ") installing/upgrading from '"
+            << old_version_string << "' to "
+            << extension->version().GetString();
 
     // TODO(crbug.com/696822): If needed, add support for Declarative Net
     // Request to component extensions and pass the ruleset checksum here.
@@ -1503,11 +1503,11 @@
     // to a permissions increase, send a request to the custodian.
     if (extensions::util::IsExtensionSupervised(extension, profile_) &&
         !ExtensionSyncService::Get(profile_)->HasPendingReenable(
-            extension->id(), *extension->version())) {
+            extension->id(), extension->version())) {
       SupervisedUserService* supervised_user_service =
           SupervisedUserServiceFactory::GetForProfile(profile_);
       supervised_user_service->AddExtensionUpdateRequest(extension->id(),
-                                                         *extension->version());
+                                                         extension->version());
     }
 #endif
   }
@@ -1847,7 +1847,7 @@
          Manifest::IsExternalLocation(existing->location()));
 
     if (!is_default_apps_migration) {
-      switch (existing->version()->CompareTo(info.version)) {
+      switch (existing->version().CompareTo(info.version)) {
         case -1:  // existing version is older, we should upgrade
           break;
         case 0:  // existing version is same, do nothing
diff --git a/chrome/browser/extensions/extension_service_sync_unittest.cc b/chrome/browser/extensions/extension_service_sync_unittest.cc
index 87c004f..f860551 100644
--- a/chrome/browser/extensions/extension_service_sync_unittest.cc
+++ b/chrome/browser/extensions/extension_service_sync_unittest.cc
@@ -703,7 +703,7 @@
   EXPECT_EQ(extensions::util::IsIncognitoEnabled(good_crx, profile()),
             data->incognito_enabled());
   EXPECT_EQ(ExtensionSyncData::BOOLEAN_UNSET, data->all_urls_enabled());
-  EXPECT_EQ(data->version(), *extension->version());
+  EXPECT_EQ(data->version(), extension->version());
   EXPECT_EQ(extensions::ManifestURL::GetUpdateURL(extension),
             data->update_url());
   EXPECT_EQ(extension->name(), data->name());
@@ -811,7 +811,7 @@
   EXPECT_EQ(extensions::util::IsIncognitoEnabled(good_crx, profile()),
             data->incognito_enabled());
   EXPECT_EQ(ExtensionSyncData::BOOLEAN_UNSET, data->all_urls_enabled());
-  EXPECT_EQ(data->version(), *extension->version());
+  EXPECT_EQ(data->version(), extension->version());
   EXPECT_EQ(extensions::ManifestURL::GetUpdateURL(extension),
             data->update_url());
   EXPECT_EQ(extension->name(), data->name());
@@ -1113,7 +1113,7 @@
       app_specifics->mutable_extension();
   extension_specifics->set_id(good_crx);
   extension_specifics->set_version(
-      service()->GetInstalledExtension(good_crx)->version()->GetString());
+      service()->GetInstalledExtension(good_crx)->version().GetString());
 
   {
     extension_specifics->set_enabled(true);
@@ -1166,7 +1166,7 @@
   sync_pb::ExtensionSpecifics* ext_specifics = specifics.mutable_extension();
   ext_specifics->set_id(good_crx);
   ext_specifics->set_version(
-      service()->GetInstalledExtension(good_crx)->version()->GetString());
+      service()->GetInstalledExtension(good_crx)->version().GetString());
   ext_specifics->set_enabled(false);
 
   {
@@ -1331,7 +1331,7 @@
   sync_pb::ExtensionSpecifics* ext_specifics = specifics.mutable_extension();
   ext_specifics->set_id(good_crx);
   ext_specifics->set_version(
-      service()->GetInstalledExtension(good_crx)->version()->GetString());
+      service()->GetInstalledExtension(good_crx)->version().GetString());
   ext_specifics->set_enabled(false);
   ext_specifics->set_incognito_enabled(true);
 
@@ -1362,7 +1362,7 @@
   ext_specifics->set_enabled(true);
 
   const base::Version installed_version =
-      *service()->GetInstalledExtension(good_crx)->version();
+      service()->GetInstalledExtension(good_crx)->version();
 
   {
     ext_specifics->set_version(installed_version.GetString());
@@ -1888,7 +1888,7 @@
       CheckDisabledForCustodianApproval(id);
     }
 
-    EXPECT_EQ(*extension->version(), base::Version("1"));
+    EXPECT_EQ(base::Version("1"), extension->version());
 
     return id;
   }
@@ -1902,7 +1902,7 @@
     const Extension* extension = registry()->GetInstalledExtension(id);
     ASSERT_TRUE(extension);
     // The version should have been updated.
-    EXPECT_EQ(*extension->version(), base::Version(version));
+    EXPECT_EQ(base::Version(version), extension->version());
   }
 
   // Simulate a custodian approval for enabling the extension coming in
@@ -2208,7 +2208,7 @@
   const Extension* extension = registry()->enabled_extensions().GetByID(id);
   ASSERT_TRUE(extension);
   // The version should have changed.
-  EXPECT_EQ(*extension->version(), base::Version(version2));
+  EXPECT_EQ(base::Version(version2), extension->version());
   EXPECT_FALSE(IsPendingCustodianApproval(id));
 }
 
@@ -2408,7 +2408,7 @@
   const Extension* extension = registry()->enabled_extensions().GetByID(id);
   ASSERT_TRUE(extension);
   // The version should have increased.
-  EXPECT_EQ(1, extension->version()->CompareTo(base::Version(version1)));
+  EXPECT_EQ(1, extension->version().CompareTo(base::Version(version1)));
 
   // Check that the approved version has been updated in the prefs as well.
   // Prefs are updated via Sync.  If the prefs are updated, then the new
@@ -2419,7 +2419,7 @@
       pref_service->GetDictionary(prefs::kSupervisedUserApprovedExtensions);
   approved_extensions->GetStringWithoutPathExpansion(id, &approved_version);
 
-  EXPECT_EQ(base::Version(approved_version), *extension->version());
+  EXPECT_EQ(base::Version(approved_version), extension->version());
   EXPECT_FALSE(IsPendingCustodianApproval(id));
 }
 
@@ -2633,7 +2633,7 @@
       ExtensionSyncData::CreateFromSyncData(app_change.sync_data());
   EXPECT_TRUE(app_data->is_app());
   EXPECT_EQ(id, app_data->id());
-  EXPECT_EQ(*v1->version(), app_data->version());
+  EXPECT_EQ(v1->version(), app_data->version());
 
   // Update the app to v2, which is an extension.
   const Extension* v2 =
@@ -2651,7 +2651,7 @@
       ExtensionSyncData::CreateFromSyncData(extension_change.sync_data());
   EXPECT_FALSE(extension_data->is_app());
   EXPECT_EQ(id, extension_data->id());
-  EXPECT_EQ(*v2->version(), extension_data->version());
+  EXPECT_EQ(v2->version(), extension_data->version());
 
   // Get the current data from the change processors to use as the input to
   // the following call to MergeDataAndStartSyncing. This simulates what should
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index e8eebe4..943aae57 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -2302,14 +2302,14 @@
       InstallCRX(extensions_path.AppendASCII("v1.crx"), INSTALL_NEW);
   ASSERT_EQ(1u, registry()->enabled_extensions().size());
   std::string id = extension->id();
-  ASSERT_EQ(std::string("1"), extension->version()->GetString());
+  ASSERT_EQ(std::string("1"), extension->version().GetString());
 
   // Now try updating to v2.
   UpdateExtension(id,
                   extensions_path.AppendASCII("v2.crx"),
                   ENABLED);
   ASSERT_EQ(std::string("2"),
-            service()->GetExtensionById(id, false)->version()->GetString());
+            service()->GetExtensionById(id, false)->version().GetString());
 }
 
 // Verifies that the NTP page and launch ordinals are kept when updating apps.
@@ -2323,7 +2323,7 @@
       InstallCRX(extensions_path.AppendASCII("v1.crx"), INSTALL_NEW);
   ASSERT_EQ(1u, registry()->enabled_extensions().size());
   std::string id = extension->id();
-  ASSERT_EQ(std::string("1"), extension->version()->GetString());
+  ASSERT_EQ(std::string("1"), extension->version().GetString());
 
   // Modify the ordinals so we can distinguish them from the defaults.
   syncer::StringOrdinal new_page_ordinal =
@@ -2337,7 +2337,7 @@
   // Now try updating to v2.
   UpdateExtension(id, extensions_path.AppendASCII("v2.crx"), ENABLED);
   ASSERT_EQ(std::string("2"),
-            service()->GetExtensionById(id, false)->version()->GetString());
+            service()->GetExtensionById(id, false)->version().GetString());
 
   // Verify that the ordinals match.
   ASSERT_TRUE(new_page_ordinal.Equals(sorting->GetPageOrdinal(id)));
@@ -2512,7 +2512,7 @@
   const Extension* extension = InstallCRX(path, INSTALL_NEW);
   std::string id = extension->id();
 
-  ASSERT_EQ("1.0.0.0", extension->version()->GetString());
+  ASSERT_EQ("1.0.0.0", extension->version().GetString());
   ASSERT_EQ(0u, GetErrors().size());
 
   // Upgrade to version 1.0.0.1.
@@ -2521,7 +2521,7 @@
   InstallCRX(path, INSTALL_UPDATED, Extension::NO_FLAGS, "My extension 1");
   extension = service()->GetExtensionById(id, false);
 
-  ASSERT_EQ("1.0.0.1", extension->version()->GetString());
+  ASSERT_EQ("1.0.0.1", extension->version().GetString());
   ASSERT_EQ("My updated extension 1", extension->name());
   ASSERT_EQ(0u, GetErrors().size());
 }
@@ -2553,7 +2553,7 @@
   UpdateExtension(good_crx, path, ENABLED);
   ASSERT_EQ(
       "1.0.0.1",
-      service()->GetExtensionById(good_crx, false)->version()->GetString());
+      service()->GetExtensionById(good_crx, false)->version().GetString());
 }
 
 // Extensions should not be updated during browser shutdown.
@@ -2575,7 +2575,7 @@
   ASSERT_FALSE(updated);
   ASSERT_EQ(
       "1.0.0.0",
-      service()->GetExtensionById(good_crx, false)->version()->GetString());
+      service()->GetExtensionById(good_crx, false)->version().GetString());
 }
 
 // Test updating a not-already-installed extension - this should fail
@@ -2606,7 +2606,7 @@
   UpdateExtension(good_crx, path, FAILED);
   ASSERT_EQ(
       "1.0.0.1",
-      service()->GetExtensionById(good_crx, false)->version()->GetString());
+      service()->GetExtensionById(good_crx, false)->version().GetString());
 }
 
 // Make sure calling update with an identical version does nothing
@@ -2640,7 +2640,7 @@
   UpdateExtension(good_crx, path, INSTALLED);
   ASSERT_EQ(1u, registry()->disabled_extensions().size());
   const Extension* good2 = service()->GetExtensionById(good_crx, true);
-  ASSERT_EQ("1.0.0.1", good2->version()->GetString());
+  ASSERT_EQ("1.0.0.1", good2->version().GetString());
   EXPECT_TRUE(extensions::util::IsIncognitoEnabled(good2->id(), profile()));
   EXPECT_EQ(extensions::disable_reason::DISABLE_USER_ACTION,
             ExtensionPrefs::Get(profile())->GetDisableReasons(good2->id()));
@@ -2660,7 +2660,7 @@
   path = data_dir().AppendASCII("good2.crx");
   UpdateExtension(good_crx, path, ENABLED);
   const Extension* good2 = service()->GetExtensionById(good_crx, false);
-  ASSERT_EQ("1.0.0.1", good2->version()->GetString());
+  ASSERT_EQ("1.0.0.1", good2->version().GetString());
   EXPECT_EQ(good2->location(), Manifest::EXTERNAL_PREF);
 }
 
@@ -4247,7 +4247,7 @@
       registry()->disabled_extensions().GetByID(good_crx);
   ASSERT_TRUE(extension);
   // Double check that we did, in fact, update the extension.
-  EXPECT_EQ("1.0.0.1", extension->version()->GetString());
+  EXPECT_EQ("1.0.0.1", extension->version().GetString());
 }
 
 // Test that if an extension is installed before the "prompt for external
@@ -4291,7 +4291,7 @@
     const Extension* extension =
         registry()->enabled_extensions().GetByID(good_crx);
     ASSERT_TRUE(extension);
-    EXPECT_EQ("1.0.0.1", extension->version()->GetString());
+    EXPECT_EQ("1.0.0.1", extension->version().GetString());
   }
   EXPECT_FALSE(prefs->IsExternalExtensionAcknowledged(good_crx));
   EXPECT_EQ(extensions::disable_reason::DISABLE_NONE,
@@ -5057,7 +5057,7 @@
   ASSERT_EQ(0u, GetErrors().size());
   ASSERT_EQ(1u, loaded_.size());
   ASSERT_EQ(location, loaded_[0]->location());
-  ASSERT_EQ("1.0.0.0", loaded_[0]->version()->GetString());
+  ASSERT_EQ("1.0.0.0", loaded_[0]->version().GetString());
   ExtensionPrefs* prefs = ExtensionPrefs::Get(profile());
   EXPECT_TRUE(prefs->GetInstalledExtensionInfo(good_crx));
   // TODO(devlin): Testing the underlying values of the prefs for extensions
@@ -5085,7 +5085,7 @@
   WaitForExternalExtensionInstalled();
   ASSERT_EQ(0u, GetErrors().size());
   ASSERT_EQ(1u, loaded_.size());
-  ASSERT_EQ("1.0.0.1", loaded_[0]->version()->GetString());
+  ASSERT_EQ("1.0.0.1", loaded_[0]->version().GetString());
   EXPECT_TRUE(prefs->GetInstalledExtensionInfo(good_crx));
   ValidateIntegerPref(good_crx, "state", Extension::ENABLED);
   ValidateIntegerPref(good_crx, "location", location);
@@ -5290,7 +5290,7 @@
   ASSERT_EQ(0u, GetErrors().size());
   ASSERT_EQ(1u, loaded_.size());
   ASSERT_EQ(Manifest::EXTERNAL_PREF, loaded_[0]->location());
-  ASSERT_EQ("1.0.0.0", loaded_[0]->version()->GetString());
+  ASSERT_EQ("1.0.0.0", loaded_[0]->version().GetString());
   ValidatePrefKeyCount(1);
   ValidateIntegerPref(good_crx, "state", Extension::ENABLED);
   ValidateIntegerPref(good_crx, "location", Manifest::EXTERNAL_PREF);
@@ -6002,8 +6002,8 @@
 
   // Tests assume |older_version| is less than the installed version, and
   // |newer_version| is greater.  Verify this:
-  ASSERT_LT(older_version, *ext->version());
-  ASSERT_GT(newer_version, *ext->version());
+  ASSERT_LT(older_version, ext->version());
+  ASSERT_GT(newer_version, ext->version());
 
   // An external install for the same location should fail if the version is
   // older, or the same, and succeed if the version is newer.
@@ -6014,7 +6014,7 @@
   EXPECT_FALSE(pending->IsIdPending(kGoodId));
 
   // Same version as the installed version...
-  info.version = *ext->version();
+  info.version = ext->version();
   EXPECT_FALSE(service()->OnExternalExtensionFileFound(info));
   EXPECT_FALSE(pending->IsIdPending(kGoodId));
 
diff --git a/chrome/browser/extensions/extension_sync_data.cc b/chrome/browser/extensions/extension_sync_data.cc
index 1d16eada..7a1b924d 100644
--- a/chrome/browser/extensions/extension_sync_data.cc
+++ b/chrome/browser/extensions/extension_sync_data.cc
@@ -117,7 +117,7 @@
       all_urls_enabled_(all_urls_enabled),
       installed_by_custodian_(installed_by_custodian),
       version_(extension.from_bookmark() ? base::Version("0")
-                                         : *extension.version()),
+                                         : extension.version()),
       update_url_(ManifestURL::GetUpdateURL(&extension)),
       name_(extension.non_localized_name()),
       app_launch_ordinal_(app_launch_ordinal),
diff --git a/chrome/browser/extensions/extension_sync_service.cc b/chrome/browser/extensions/extension_sync_service.cc
index a37978b..de1e6e6f 100644
--- a/chrome/browser/extensions/extension_sync_service.cc
+++ b/chrome/browser/extensions/extension_sync_service.cc
@@ -295,7 +295,7 @@
   if (it != pending_updates_.end()) {
     const base::Version& version = it->second.version;
     // If we have a pending version, it should be newer than the installed one.
-    DCHECK_EQ(-1, extension.version()->CompareTo(version));
+    DCHECK_EQ(-1, extension.version().CompareTo(version));
     result.set_version(version);
     // If we'll re-enable the extension once it's updated, also send that back
     // to sync.
@@ -383,7 +383,7 @@
     INSTALLED_NEWER,
   } state = NOT_INSTALLED;
   if (extension) {
-    switch (extension->version()->CompareTo(extension_sync_data.version())) {
+    switch (extension->version().CompareTo(extension_sync_data.version())) {
       case -1: state = INSTALLED_OUTDATED; break;
       case 0: state = INSTALLED_MATCHING; break;
       case 1: state = INSTALLED_NEWER; break;
@@ -458,7 +458,7 @@
       if (!has_all_permissions && (state == INSTALLED_NEWER) &&
           extensions::util::IsExtensionSupervised(extension, profile_)) {
         SupervisedUserServiceFactory::GetForProfile(profile_)
-            ->AddExtensionUpdateRequest(id, *extension->version());
+            ->AddExtensionUpdateRequest(id, extension->version());
       }
 #endif
     } else {
@@ -613,7 +613,7 @@
   // Clear pending version if the installed one has caught up.
   auto it = pending_updates_.find(extension->id());
   if (it != pending_updates_.end()) {
-    int compare_result = extension->version()->CompareTo(it->second.version);
+    int compare_result = extension->version().CompareTo(it->second.version);
     if (compare_result == 0 && it->second.grant_permissions_and_reenable) {
       // The call to SyncExtensionChangeIfNeeded below will take care of syncing
       // changes to this extension, so we don't want to trigger sync activity
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
index 5086041..867bc44b 100644
--- a/chrome/browser/extensions/extension_system_impl.cc
+++ b/chrome/browser/extensions/extension_system_impl.cc
@@ -368,7 +368,8 @@
 
 void ExtensionSystemImpl::InitForRegularProfile(bool extensions_enabled) {
   TRACE_EVENT0("browser,startup", "ExtensionSystemImpl::InitForRegularProfile");
-  DCHECK(!profile_->IsOffTheRecord());
+  cookie_notifier_ = std::make_unique<ExtensionCookieNotifier>(profile_);
+
   if (shared_user_script_master() || extension_service())
     return;  // Already initialized.
 
@@ -377,6 +378,10 @@
   shared_->Init(extensions_enabled);
 }
 
+void ExtensionSystemImpl::InitForIncognitoProfile() {
+  cookie_notifier_ = std::make_unique<ExtensionCookieNotifier>(profile_);
+}
+
 ExtensionService* ExtensionSystemImpl::extension_service() {
   return shared_->extension_service();
 }
diff --git a/chrome/browser/extensions/extension_system_impl.h b/chrome/browser/extensions/extension_system_impl.h
index 1f1ddae1..2ed73825 100644
--- a/chrome/browser/extensions/extension_system_impl.h
+++ b/chrome/browser/extensions/extension_system_impl.h
@@ -9,6 +9,7 @@
 
 #include "base/macros.h"
 #include "build/build_config.h"
+#include "chrome/browser/extensions/extension_cookie_notifier.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
 #include "extensions/browser/extension_system.h"
@@ -49,6 +50,7 @@
   void Shutdown() override;
 
   void InitForRegularProfile(bool extensions_enabled) override;
+  void InitForIncognitoProfile() override;
 
   ExtensionService* extension_service() override;  // shared
   RuntimeData* runtime_data() override;            // shared
@@ -160,6 +162,8 @@
     OneShotEvent ready_;
   };
 
+  std::unique_ptr<ExtensionCookieNotifier> cookie_notifier_;
+
   Profile* profile_;
 
   Shared* shared_;
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
index 16525738..1fbf673 100644
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -214,7 +214,7 @@
 content::ColorChooser* ExtensionViewHost::OpenColorChooser(
     WebContents* web_contents,
     SkColor initial_color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   // Similar to the file chooser below, opening a color chooser requires a
   // visible <input> element to click on. Therefore this code only exists for
   // extensions with a view.
diff --git a/chrome/browser/extensions/extension_view_host.h b/chrome/browser/extensions/extension_view_host.h
index af9a69b..7ca4c298 100644
--- a/chrome/browser/extensions/extension_view_host.h
+++ b/chrome/browser/extensions/extension_view_host.h
@@ -79,7 +79,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
       override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const content::FileChooserParams& params) override;
diff --git a/chrome/browser/extensions/shared_module_service.cc b/chrome/browser/extensions/shared_module_service.cc
index 81061e0..a3f0f70 100644
--- a/chrome/browser/extensions/shared_module_service.cc
+++ b/chrome/browser/extensions/shared_module_service.cc
@@ -67,7 +67,7 @@
     } else if (!SharedModuleInfo::IsSharedModule(imported_module)) {
       return IMPORT_STATUS_UNRECOVERABLE;
     } else if (version_required.IsValid() &&
-               imported_module->version()->CompareTo(version_required) < 0) {
+               imported_module->version().CompareTo(version_required) < 0) {
       if (imported_module->from_webstore()) {
         outdated_modules->push_back(*iter);
         status = IMPORT_STATUS_UNSATISFIED;
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 0ed74a7..1d432c4 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -24,6 +24,7 @@
 #include "chrome/browser/extensions/install_tracker_factory.h"
 #include "chrome/browser/extensions/webstore_inline_installer.h"
 #include "chrome/browser/extensions/webstore_inline_installer_factory.h"
+#include "chrome/browser/installable/installable_metrics.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sessions/session_tab_helper.h"
 #include "chrome/browser/shell_integration.h"
@@ -365,8 +366,8 @@
       if (web_app_info_.title.empty())
         web_app_info_.title = base::UTF8ToUTF16(web_app_info_.app_url.spec());
 
-      bookmark_app_helper_.reset(
-          new BookmarkAppHelper(profile_, web_app_info_, web_contents()));
+      bookmark_app_helper_.reset(new BookmarkAppHelper(
+          profile_, web_app_info_, web_contents(), WebAppInstallSource::MENU));
       bookmark_app_helper_->Create(base::Bind(
           &TabHelper::FinishCreateBookmarkApp, weak_ptr_factory_.GetWeakPtr()));
       break;
diff --git a/chrome/browser/extensions/test_extension_system.h b/chrome/browser/extensions/test_extension_system.h
index 03911a5..73b4e6d 100644
--- a/chrome/browser/extensions/test_extension_system.h
+++ b/chrome/browser/extensions/test_extension_system.h
@@ -51,6 +51,7 @@
   void CreateSocketManager();
 
   void InitForRegularProfile(bool extensions_enabled) override {}
+  void InitForIncognitoProfile() override {}
   void SetExtensionService(ExtensionService* service);
   ExtensionService* extension_service() override;
   RuntimeData* runtime_data() override;
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 2be854c..87d9dd2 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -177,7 +177,7 @@
           ReportExtensionLoadError(kImportNotSharedModule);
           return;
         } else if (imported_module && (version_required.IsValid() &&
-                                       imported_module->version()->CompareTo(
+                                       imported_module->version().CompareTo(
                                            version_required) < 0)) {
           ReportExtensionLoadError(kImportMinVersionNewer);
           return;
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
index b520ee4..4a49f7f 100644
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -81,8 +81,7 @@
               "Not implemented, considered not useful."
           })");
 
-    icon_fetcher_.reset(
-        new chrome::BitmapFetcher(icon_url_, this, traffic_annotation));
+    icon_fetcher_.reset(new BitmapFetcher(icon_url_, this, traffic_annotation));
     icon_fetcher_->Init(
         std::string(),
         blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin,
diff --git a/chrome/browser/extensions/webstore_install_helper.h b/chrome/browser/extensions/webstore_install_helper.h
index 5c8342d..6ddf60ee 100644
--- a/chrome/browser/extensions/webstore_install_helper.h
+++ b/chrome/browser/extensions/webstore_install_helper.h
@@ -18,9 +18,7 @@
 class Value;
 }
 
-namespace chrome {
 class BitmapFetcher;
-}
 
 namespace content {
 namespace mojom {
@@ -39,7 +37,7 @@
 // fetching/decoding icon data. Clients must implement the
 // WebstoreInstallHelper::Delegate interface to receive the parsed data.
 class WebstoreInstallHelper : public base::RefCounted<WebstoreInstallHelper>,
-                              public chrome::BitmapFetcherDelegate {
+                              public BitmapFetcherDelegate {
  public:
   class Delegate {
    public:
@@ -83,7 +81,7 @@
   void OnJSONParseSucceeded(std::unique_ptr<base::Value> result);
   void OnJSONParseFailed(const std::string& error_message);
 
-  // Implementing the chrome::BitmapFetcherDelegate interface.
+  // Implementing the BitmapFetcherDelegate interface.
   void OnFetchComplete(const GURL& url, const SkBitmap* image) override;
 
   void ReportResultsIfComplete();
@@ -100,7 +98,7 @@
   // If |icon_url_| is non-empty, it needs to be fetched and decoded into an
   // SkBitmap.
   GURL icon_url_;
-  std::unique_ptr<chrome::BitmapFetcher> icon_fetcher_;
+  std::unique_ptr<BitmapFetcher> icon_fetcher_;
 
   // Flags for whether we're done doing icon decoding and manifest parsing.
   bool icon_decode_complete_;
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index 8ab3d3c..e478343a 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -417,7 +417,7 @@
   } else {
     const base::Version version_required(info.minimum_version);
     if (version_required.IsValid() &&
-        extension->version()->CompareTo(version_required) < 0) {
+        extension->version().CompareTo(version_required) < 0) {
       // It should not happen, CrxInstaller will make sure the version is
       // equal or newer than version_required.
       ReportFailure(kDependencyNotFoundError,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 4b6e71bb..a47dd75 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -165,16 +165,9 @@
     "Highly experimental where guests such as &lt;webview> are implemented on "
     "the out-of-process iframe infrastructure.";
 
-const char kDataReductionProxyLoFiName[] = "Data Saver Lo-Fi mode";
-const char kDataReductionProxyLoFiDescription[] =
-    "Forces Data Saver Lo-Fi mode to be always enabled, enabled only on "
-    "cellular connections, or disabled. Data Saver must be enabled for Lo-Fi "
-    "mode to be used.";
-const char kDataReductionProxyLoFiAlwaysOn[] = "Always on";
-const char kDataReductionProxyLoFiCellularOnly[] = "Cellular only";
-const char kDataReductionProxyLoFiDisabled[] = "Disable";
-const char kDataReductionProxyLoFiSlowConnectionsOnly[] =
-    "Slow connections only";
+const char kDataSaverServerPreviewsName[] = "Data Saver Server Previews";
+const char kDataSaverServerPreviewsDescription[] =
+    "Allow the Data Reduction Proxy to serve previews.";
 
 const char kDatasaverPromptName[] = "Cellular Data Saver Prompt";
 const char kDatasaverPromptDescription[] =
@@ -333,13 +326,6 @@
 const char kEnableNoScriptPreviewsDescription[] =
     "Enable disabling JavaScript on some pages on slow networks.";
 
-const char kEnableDataReductionProxyLitePageName[] =
-    "Lite pages for Data Saver Lo-Fi mode";
-const char kEnableDataReductionProxyLitePageDescription[] =
-    "Enable lite pages in Data Saver Lo-Fi mode. Previews of pages will be "
-    "shown instead of image placeholders when Lo-Fi is on. Data Saver and "
-    "Lo-Fi must be enabled for lite pages to be shown.";
-
 const char kDataReductionProxyServerAlternative1[] = "Use alt. server config 1";
 const char kDataReductionProxyServerAlternative2[] = "Use alt. server config 2";
 const char kDataReductionProxyServerAlternative3[] = "Use alt. server config 3";
@@ -1953,6 +1939,10 @@
     "If enabled, some of prefetched content suggestions are not replaced by "
     "the new fetched suggestions.";
 
+const char kLanguagesPreferenceName[] = "Language Settings";
+const char kLanguagesPreferenceDescription[] =
+    "Enable this option for Language Settings feature on Android.";
+
 const char kLsdPermissionPromptName[] =
     "Location Settings Dialog Permission Prompt";
 const char kLsdPermissionPromptDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 2d384c7..2dc0327 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -125,12 +125,8 @@
 extern const char kCrossProcessGuestViewIsolationName[];
 extern const char kCrossProcessGuestViewIsolationDescription[];
 
-extern const char kDataReductionProxyLoFiName[];
-extern const char kDataReductionProxyLoFiDescription[];
-extern const char kDataReductionProxyLoFiAlwaysOn[];
-extern const char kDataReductionProxyLoFiCellularOnly[];
-extern const char kDataReductionProxyLoFiDisabled[];
-extern const char kDataReductionProxyLoFiSlowConnectionsOnly[];
+extern const char kDataSaverServerPreviewsName[];
+extern const char kDataSaverServerPreviewsDescription[];
 
 extern const char kDatasaverPromptName[];
 extern const char kDatasaverPromptDescription[];
@@ -229,9 +225,6 @@
 extern const char kEnableNoScriptPreviewsName[];
 extern const char kEnableNoScriptPreviewsDescription[];
 
-extern const char kEnableDataReductionProxyLitePageName[];
-extern const char kEnableDataReductionProxyLitePageDescription[];
-
 extern const char kDataReductionProxyServerAlternative1[];
 extern const char kDataReductionProxyServerAlternative2[];
 extern const char kDataReductionProxyServerAlternative3[];
@@ -1187,6 +1180,9 @@
 extern const char kKeepPrefetchedContentSuggestionsName[];
 extern const char kKeepPrefetchedContentSuggestionsDescription[];
 
+extern const char kLanguagesPreferenceName[];
+extern const char kLanguagesPreferenceDescription[];
+
 extern const char kLsdPermissionPromptName[];
 extern const char kLsdPermissionPromptDescription[];
 
diff --git a/chrome/browser/hang_monitor/hang_crash_dump_win.cc b/chrome/browser/hang_monitor/hang_crash_dump_win.cc
index f36aa407..e7201ecc 100644
--- a/chrome/browser/hang_monitor/hang_crash_dump_win.cc
+++ b/chrome/browser/hang_monitor/hang_crash_dump_win.cc
@@ -19,57 +19,12 @@
 // How long do we wait for the crash to be generated (in ms).
 static const int kGenerateDumpTimeoutMS = 10000;
 
-enum NoCrashKeyReason {
-  kNoCrashKeyReasonVirtualAlloc = 1,
-  kNoCrashKeyReasonWriteProcessMemory,
-  kNoCrashKeyReasonNoKeys
-};
-
 }  // namespace
 
-void CrashDumpAndTerminateHungChildProcess(
-    HANDLE hprocess,
-    const base::StringPairs& additional_child_crash_keys) {
+void CrashDumpAndTerminateHungChildProcess(HANDLE hprocess) {
   // Before terminating the process we try collecting a dump. Which
   // a transient thread in the child process will do for us.
-  DWORD crash_key_failure = 0;
-  void* remote_memory = nullptr;
-  bool send_remote_memory = false;
-  std::vector<std::string> keys;
-  for (const auto& crash_key : additional_child_crash_keys) {
-    DCHECK(base::debug::LookupCrashKey(crash_key.first));
-    std::string serialized_key = crash_key.first;
-    serialized_key.append(":");
-    serialized_key.append(crash_key.second);
-    keys.push_back(serialized_key);
-  }
-  std::string serialized_keys = base::JoinString(keys, ",");
-
-  if (!serialized_keys.empty()) {
-    size_t data_length = serialized_keys.length() + 1;
-    remote_memory = VirtualAllocEx(hprocess, nullptr, data_length,
-                                   MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
-    if (remote_memory) {
-      send_remote_memory =
-          !!WriteProcessMemory(hprocess, remote_memory, serialized_keys.c_str(),
-                               data_length, nullptr);
-      crash_key_failure =
-          MAKELPARAM(kNoCrashKeyReasonWriteProcessMemory, GetLastError());
-    } else {
-      crash_key_failure =
-          MAKELPARAM(kNoCrashKeyReasonVirtualAlloc, GetLastError());
-    }
-  } else {
-    crash_key_failure = MAKELPARAM(kNoCrashKeyReasonNoKeys, 0);
-  }
-
-  HANDLE remote_thread = nullptr;
-  if (send_remote_memory) {
-    remote_thread = InjectDumpForHungInput_ExportThunk(hprocess, remote_memory);
-  } else {
-    remote_thread = InjectDumpForHungInputNoCrashKeys_ExportThunk(
-        hprocess, crash_key_failure);
-  }
+  HANDLE remote_thread = InjectDumpForHungInput_ExportThunk(hprocess);
   DCHECK(remote_thread) << "Failed creating remote thread: error "
                         << GetLastError();
   if (remote_thread) {
diff --git a/chrome/browser/hang_monitor/hang_crash_dump_win.h b/chrome/browser/hang_monitor/hang_crash_dump_win.h
index 42a518b..51c009d2 100644
--- a/chrome/browser/hang_monitor/hang_crash_dump_win.h
+++ b/chrome/browser/hang_monitor/hang_crash_dump_win.h
@@ -10,11 +10,7 @@
 #include "base/strings/string_split.h"
 
 // Causes the given child process to generate a crash dump and terminates the
-// process. |additional_serialized_crash_keys| are additional key/value string
-// pairs that will be logged in the child crash report. The crash keys provided
-// must be preregistered before calling this method.
-void CrashDumpAndTerminateHungChildProcess(
-    HANDLE hprocess,
-    const base::StringPairs& additional_crash_keys);
+// process.
+void CrashDumpAndTerminateHungChildProcess(HANDLE hprocess);
 
 #endif  // CHROME_BROWSER_HANG_MONITOR_HANG_CRASH_DUMP_WIN_H_
diff --git a/chrome/browser/installable/installable_metrics.cc b/chrome/browser/installable/installable_metrics.cc
index 080e063..bb58ed59 100644
--- a/chrome/browser/installable/installable_metrics.cc
+++ b/chrome/browser/installable/installable_metrics.cc
@@ -9,10 +9,18 @@
 
 // static
 void InstallableMetrics::TrackInstallSource(WebAppInstallSource source) {
+  DCHECK(IsReportableInstallSource(source));
   UMA_HISTOGRAM_ENUMERATION("Webapp.Install.InstallSource", source,
                             WebAppInstallSource::COUNT);
 }
 
+// static
+bool InstallableMetrics::IsReportableInstallSource(WebAppInstallSource source) {
+  return source == WebAppInstallSource::AUTOMATIC_PROMPT ||
+         source == WebAppInstallSource::MENU ||
+         source == WebAppInstallSource::API;
+}
+
 namespace {
 
 void WriteMenuOpenHistogram(InstallabilityCheckStatus status, int count) {
diff --git a/chrome/browser/installable/installable_metrics.h b/chrome/browser/installable/installable_metrics.h
index 4b9f8d9..2392a61 100644
--- a/chrome/browser/installable/installable_metrics.h
+++ b/chrome/browser/installable/installable_metrics.h
@@ -32,11 +32,14 @@
 };
 
 // The ways that an app install can be triggered.
+// NOTE: each enum entry which is reportable must be added to
+// InstallableMetrics::IsReportableInstallSource().
 // This enum backs a UMA histogram and must be treated as append-only.
 enum class WebAppInstallSource {
   AUTOMATIC_PROMPT = 0,  // Automatic prompt e.g. install banner.
   MENU = 1,              // Chrome menu
   API = 2,               // BeforeInstallPrompt.prompt().
+  MANAGEMENT_API = 3,    // Extensions management API (not reported).
   COUNT,
 };
 
@@ -59,8 +62,14 @@
   InstallableMetrics();
   ~InstallableMetrics();
 
+  // Records |source| in the Webapp.Install.InstallSource histogram.
+  // IsReportableInstallSource(|source|) must be true.
   static void TrackInstallSource(WebAppInstallSource source);
 
+  // Returns whether |source| is a value that may be passed to
+  // TrackInstallSource.
+  static bool IsReportableInstallSource(WebAppInstallSource source);
+
   // This records the state of the installability check when the Android menu is
   // opened.
   void RecordMenuOpen();
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 59be2de..42e44e4 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -63,6 +63,7 @@
 #include "content/public/common/content_switches.h"
 #include "content/public/common/user_agent.h"
 #include "content/public/network/ignore_errors_cert_verifier.h"
+#include "content/public/network/network_service.h"
 #include "content/public/network/url_request_context_builder_mojo.h"
 #include "extensions/features/features.h"
 #include "net/cert/caching_cert_verifier.h"
@@ -295,7 +296,6 @@
 #endif
       globals_(nullptr),
       is_quic_allowed_on_init_(true),
-      network_service_request_(mojo::MakeRequest(&ui_thread_network_service_)),
       weak_factory_(this) {
   scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy =
       BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
@@ -689,7 +689,7 @@
 
 void IOThread::DisableQuic() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  globals_->network_service->DisableQuic();
+  globals_->quic_disabled = true;
 }
 
 net::SSLConfigService* IOThread::GetSSLConfigService() {
@@ -739,21 +739,11 @@
           : net::ProxyService::SanitizeUrlPolicy::UNSAFE);
 }
 
-content::mojom::NetworkService* IOThread::GetNetworkServiceOnUIThread() {
-  if (base::FeatureList::IsEnabled(features::kNetworkService)) {
-    return content::GetNetworkService();
-  } else {
-    return ui_thread_network_service_.get();
-  }
-}
-
 certificate_transparency::TreeStateTracker* IOThread::ct_tree_tracker() const {
   return ct_tree_tracker_.get();
 }
 
 void IOThread::ConstructSystemRequestContext() {
-  DCHECK(network_service_request_.is_pending());
-
   std::unique_ptr<content::URLRequestContextBuilderMojo> builder =
       base::MakeUnique<content::URLRequestContextBuilderMojo>();
 
@@ -807,16 +797,22 @@
 
   SetUpProxyService(builder.get());
 
-  globals_->network_service = content::NetworkService::Create(
-      std::move(network_service_request_), net_log_);
   if (!is_quic_allowed_on_init_)
-    globals_->network_service->DisableQuic();
+    globals_->quic_disabled = true;
 
-  globals_->system_network_context =
-      globals_->network_service->CreateNetworkContextWithBuilder(
-          std::move(network_context_request_),
-          std::move(network_context_params_), std::move(builder),
-          &globals_->system_request_context);
+  if (base::FeatureList::IsEnabled(features::kNetworkService)) {
+    globals_->system_request_context_owner =
+        std::move(builder)->Create(std::move(network_context_params_).get(),
+                                   !is_quic_allowed_on_init_, net_log_);
+    globals_->system_request_context =
+        globals_->system_request_context_owner.url_request_context.get();
+  } else {
+    globals_->system_network_context =
+        content::GetNetworkServiceImpl()->CreateNetworkContextWithBuilder(
+            std::move(network_context_request_),
+            std::move(network_context_params_), std::move(builder),
+            &globals_->system_request_context);
+  }
 
 #if defined(USE_NSS_CERTS)
   net::SetURLRequestContextForNSSHttpIO(globals_->system_request_context);
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index b590583..0865c4f4 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -30,7 +30,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/browser_thread_delegate.h"
 #include "content/public/common/network_service.mojom.h"
-#include "content/public/network/network_service.h"
+#include "content/public/network/url_request_context_owner.h"
 #include "extensions/features/features.h"
 #include "net/base/network_change_notifier.h"
 #include "net/nqe/network_quality_estimator.h"
@@ -115,10 +115,7 @@
     Globals();
     ~Globals();
 
-    // In-process NetworkService for use in URLRequestContext configuration when
-    // the network service created through the ServiceManager is disabled. See
-    // SystemNetworkContextManager's header comment for more details
-    std::unique_ptr<content::NetworkService> network_service;
+    bool quic_disabled = false;
 
     // Ascribes all data use in Chrome to a source, such as page loads.
     std::unique_ptr<data_use_measurement::ChromeDataUseAscriber>
@@ -133,7 +130,11 @@
 #endif  // defined(OS_ANDROID)
     std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs;
     std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences;
+    // When the network service is enabled, this holds on to a
+    // content::NetworkContext class that owns |system_request_context|.
     std::unique_ptr<content::mojom::NetworkContext> system_network_context;
+    // When the network service is disabled, this owns |system_request_context|.
+    content::URLRequestContextOwner system_request_context_owner;
     net::URLRequestContext* system_request_context;
     SystemRequestContextLeakChecker system_request_context_leak_checker;
 #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -328,9 +329,6 @@
   // True if QUIC is initially enabled.
   bool is_quic_allowed_on_init_;
 
-  content::mojom::NetworkServicePtr ui_thread_network_service_;
-  content::mojom::NetworkServiceRequest network_service_request_;
-
   base::WeakPtrFactory<IOThread> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(IOThread);
diff --git a/chrome/browser/media/cdm_storage_id_key.cc b/chrome/browser/media/cdm_storage_id_key.cc
index 10abd08..c34d6f2f 100644
--- a/chrome/browser/media/cdm_storage_id_key.cc
+++ b/chrome/browser/media/cdm_storage_id_key.cc
@@ -6,7 +6,11 @@
 
 #include "media/media_features.h"
 
-#if BUILDFLAG(ENABLE_CDM_STORAGE_ID) && defined(GOOGLE_CHROME_BUILD)
+#if !BUILDFLAG(ENABLE_CDM_STORAGE_ID)
+#error This should only be compiled if "enable_cdm_storage_id" specified.
+#endif
+
+#if defined(GOOGLE_CHROME_BUILD)
 #include "chrome/browser/internal/google_chrome_cdm_storage_id_key.h"
 #endif
 
@@ -14,6 +18,9 @@
 #if defined(CDM_STORAGE_ID_KEY)
   return CDM_STORAGE_ID_KEY;
 #else
-#error CDM_STORAGE_ID_KEY must be defined if enable_cdm_storage_id specified.
+  // For non-Google-Chrome builds, the GN flag "alternate_cdm_storage_id_key"
+  // must be set if "enable_cdm_storage_id" specified. See comments in
+  // media/media_options.gni.
+  return BUILDFLAG(ALTERNATE_CDM_STORAGE_ID_KEY);
 #endif
 }
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc b/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc
index 12607906..4df6832 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_metrics.cc
@@ -53,11 +53,8 @@
 void MediaRouterMojoMetrics::RecordMediaRouteProviderVersion(
     const extensions::Extension& extension) {
   MediaRouteProviderVersion version = MediaRouteProviderVersion::UNKNOWN;
-  const base::Version* extension_version = extension.version();
-  if (extension_version) {
-    version = GetMediaRouteProviderVersion(
-        *extension_version, base::Version(version_info::GetVersionNumber()));
-  }
+  version = GetMediaRouteProviderVersion(
+      extension.version(), base::Version(version_info::GetVersionNumber()));
 
   DCHECK_LT(static_cast<int>(version),
             static_cast<int>(MediaRouteProviderVersion::TOTAL_COUNT));
diff --git a/chrome/browser/net/chrome_cookie_notification_details.h b/chrome/browser/net/chrome_cookie_notification_details.h
index 25276bd..7685524 100644
--- a/chrome/browser/net/chrome_cookie_notification_details.h
+++ b/chrome/browser/net/chrome_cookie_notification_details.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_NET_CHROME_COOKIE_NOTIFICATION_DETAILS_H_
 #define CHROME_BROWSER_NET_CHROME_COOKIE_NOTIFICATION_DETAILS_H_
 
-#include "net/cookies/cookie_monster.h"
+#include "services/network/public/interfaces/cookie_manager.mojom.h"
 
 namespace net {
 class CanonicalCookie;
@@ -15,15 +15,12 @@
  public:
   ChromeCookieDetails(const net::CanonicalCookie* cookie_copy,
                       bool is_removed,
-                      net::CookieStore::ChangeCause cause)
-      : cookie(cookie_copy),
-        removed(is_removed),
-        cause(cause) {
-  }
+                      network::mojom::CookieChangeCause cause)
+      : cookie(cookie_copy), removed(is_removed), cause(cause) {}
 
   const net::CanonicalCookie* cookie;
   bool removed;
-  net::CookieStore::ChangeCause cause;
+  network::mojom::CookieChangeCause cause;
 };
 
 #endif  // CHROME_BROWSER_NET_CHROME_COOKIE_NOTIFICATION_DETAILS_H_
diff --git a/chrome/browser/net/predictor_browsertest.cc b/chrome/browser/net/predictor_browsertest.cc
index 2cacbf1..f2d4710 100644
--- a/chrome/browser/net/predictor_browsertest.cc
+++ b/chrome/browser/net/predictor_browsertest.cc
@@ -23,7 +23,6 @@
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/synchronization/lock.h"
-#include "base/test/scoped_feature_list.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
@@ -515,7 +514,6 @@
         Predictor::kMaxSpeculativeResolveQueueDelayMs + 300);
     rule_based_resolver_proc_->AddRuleWithLatency("delay.google.com",
                                                   "127.0.0.1", 1000 * 60);
-    scoped_feature_list_.InitAndEnableFeature(features::kPreconnectMore);
   }
 
   ~PredictorBrowserTest() override {}
@@ -806,8 +804,6 @@
     EXPECT_TRUE(result);
   }
 
-  base::test::ScopedFeatureList scoped_feature_list_;
-
   const GURL startup_url_;
   const GURL referring_url_;
   const GURL target_url_;
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
index c919339..3ea38b8 100644
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -36,7 +36,6 @@
     safe_browsing::SafeBrowsingService* safe_browsing_service) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
 
-  // Disable QUIC for HttpNetworkSessions using IOThread's NetworkService.
   io_thread->DisableQuic();
 
   // Safebrowsing isn't yet using the IOThread's NetworkService, so must be
@@ -82,8 +81,8 @@
     content::mojom::NetworkContextRequest* network_context_request,
     content::mojom::NetworkContextParamsPtr* network_context_params,
     bool* is_quic_allowed) {
-  *network_context_request = mojo::MakeRequest(&io_thread_network_context_);
   if (!base::FeatureList::IsEnabled(features::kNetworkService)) {
+    *network_context_request = mojo::MakeRequest(&io_thread_network_context_);
     *network_context_params = CreateNetworkContextParams();
   } else {
     // Just use defaults if the network service is enabled, since
@@ -112,8 +111,7 @@
   // Profiles will also have QUIC disabled (because both IOThread's
   // NetworkService and the network service, if enabled will disable QUIC).
 
-  if (base::FeatureList::IsEnabled(features::kNetworkService))
-    content::GetNetworkService()->DisableQuic();
+  content::GetNetworkService()->DisableQuic();
 
   IOThread* io_thread = g_browser_process->io_thread();
   // Nothing more to do if IOThread has already been shut down.
diff --git a/chrome/browser/net/system_network_context_manager.h b/chrome/browser/net/system_network_context_manager.h
index 5ec05485..2a6aebf 100644
--- a/chrome/browser/net/system_network_context_manager.h
+++ b/chrome/browser/net/system_network_context_manager.h
@@ -39,9 +39,7 @@
   // NetworkContext. If the network service is disabled,
   // |network_context_request| will be for the NetworkContext used by the
   // SystemNetworkContextManager. Otherwise, this method can still be used to
-  // help set up the IOThread's in-process URLRequestContext, and
-  // |network_context_request| will still be populated, but the associated
-  // NetworkContext will not be used by the SystemNetworkContextManager.
+  // help set up the IOThread's in-process URLRequestContext.
   //
   // Must be called before the system NetworkContext is first used.
   //
diff --git a/chrome/browser/notifications/stub_notification_display_service.cc b/chrome/browser/notifications/stub_notification_display_service.cc
index ade292b..599fc95 100644
--- a/chrome/browser/notifications/stub_notification_display_service.cc
+++ b/chrome/browser/notifications/stub_notification_display_service.cc
@@ -86,6 +86,9 @@
     DCHECK(!handler);
 
     auto* delegate = iter->notification.delegate();
+    if (!delegate)
+      return;
+
     if (reply.has_value()) {
       DCHECK(action_index.has_value());
       delegate->ButtonClickWithReply(action_index.value(), reply.value());
@@ -94,13 +97,14 @@
     } else {
       delegate->Click();
     }
-  } else {
-    DCHECK(handler);
-    base::RunLoop run_loop;
-    handler->OnClick(profile_, iter->notification.origin_url(), notification_id,
-                     action_index, reply, run_loop.QuitClosure());
-    run_loop.Run();
+    return;
   }
+
+  DCHECK(handler);
+  base::RunLoop run_loop;
+  handler->OnClick(profile_, iter->notification.origin_url(), notification_id,
+                   action_index, reply, run_loop.QuitClosure());
+  run_loop.Run();
 }
 
 void StubNotificationDisplayService::SimulateSettingsClick(
@@ -113,7 +117,8 @@
   NotificationHandler* handler = GetNotificationHandler(notification_type);
   if (notification_type == NotificationHandler::Type::TRANSIENT) {
     DCHECK(!handler);
-    iter->notification.delegate()->SettingsClick();
+    if (iter->notification.delegate())
+      iter->notification.delegate()->SettingsClick();
   } else {
     DCHECK(handler);
     handler->OpenSettings(profile_, iter->notification.origin_url());
@@ -133,7 +138,8 @@
     NotificationHandler* handler = GetNotificationHandler(notification_type);
     if (notification_type == NotificationHandler::Type::TRANSIENT) {
       DCHECK(!handler);
-      iter->notification.delegate()->Close(by_user);
+      if (iter->notification.delegate())
+        iter->notification.delegate()->Close(by_user);
     } else {
       base::RunLoop run_loop;
       handler->OnClose(profile_, iter->notification.origin_url(),
@@ -159,7 +165,7 @@
                          iter->notification.id(), by_user,
                          run_loop.QuitClosure());
         run_loop.Run();
-      } else {
+      } else if (iter->notification.delegate()) {
         iter->notification.delegate()->Close(by_user);
       }
       iter = notifications_.erase(iter);
diff --git a/chrome/browser/permissions/permission_uma_util.cc b/chrome/browser/permissions/permission_uma_util.cc
index 9c3832c..7c67292 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -92,6 +92,8 @@
       return "AudioCapture";
     case PermissionRequestType::PERMISSION_MEDIASTREAM_CAMERA:
       return "VideoCapture";
+    case PermissionRequestType::PERMISSION_CLIPBOARD_READ:
+      return "ClipboardRead";
     default:
       NOTREACHED();
       return "";
@@ -500,9 +502,9 @@
   bool secure_origin = content::IsOriginSecure(requesting_origin);
 
   switch (permission) {
-    // Geolocation, MidiSysEx, Push, and Media permissions are disabled on
-    // insecure origins, so there's no need to record separate metrics for
-    // secure/insecure.
+    // Geolocation, MidiSysEx, Push, Media and Clipboard permissions are
+    // disabled on insecure origins, so there's no need to record separate
+    // metrics for secure/insecure.
     case CONTENT_SETTINGS_TYPE_GEOLOCATION:
       UMA_HISTOGRAM_ENUMERATION("Permissions.Action.Geolocation", action,
                                 PermissionAction::NUM);
@@ -536,6 +538,10 @@
                             "Permissions.Action.SecureOrigin.Flash",
                             "Permissions.Action.InsecureOrigin.Flash", action);
       break;
+    case CONTENT_SETTINGS_TYPE_CLIPBOARD_READ:
+      UMA_HISTOGRAM_ENUMERATION("Permissions.Action.ClipboardRead", action,
+                                PermissionAction::NUM);
+      break;
     // The user is not prompted for these permissions, thus there is no
     // permission action recorded for them.
     default:
diff --git a/chrome/browser/permissions/permission_util.cc b/chrome/browser/permissions/permission_util.cc
index 632c931..6edf0c95 100644
--- a/chrome/browser/permissions/permission_util.cc
+++ b/chrome/browser/permissions/permission_util.cc
@@ -46,6 +46,8 @@
       return "AccessibilityEvents";
     case CONTENT_SETTINGS_TYPE_CLIPBOARD_READ:
       return "ClipboardRead";
+    case CONTENT_SETTINGS_TYPE_CLIPBOARD_WRITE:
+      return "ClipboardWrite";
     default:
       break;
   }
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index 0dc5066..ffd9cd65c 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -340,7 +340,7 @@
     prefs::kPromptForDownload,
     base::Value::Type::BOOLEAN },
   { key::kSpellcheckEnabled,
-    spellcheck::prefs::kEnableSpellcheck,
+    spellcheck::prefs::kSpellCheckEnable,
     base::Value::Type::BOOLEAN },
 
   // First run import.
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 2f92991..07df9540 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1804,7 +1804,7 @@
   ASSERT_TRUE(extension);
 
   const std::string old_version_number =
-      service->GetExtensionById(kGoodCrxId, true)->version()->GetString();
+      service->GetExtensionById(kGoodCrxId, true)->version().GetString();
 
   base::FilePath test_path;
   GetTestDataDirectory(&test_path);
@@ -1825,13 +1825,13 @@
   updater->CheckNow(params);
   update_observer.WaitForExtensionWillBeInstalled();
 
-  const base::Version* new_version =
+  const base::Version& new_version =
       service->GetExtensionById(kGoodCrxId, true)->version();
-  ASSERT_TRUE(new_version->IsValid());
+  ASSERT_TRUE(new_version.IsValid());
   base::Version old_version(old_version_number);
   ASSERT_TRUE(old_version.IsValid());
 
-  EXPECT_EQ(1, new_version->CompareTo(old_version));
+  EXPECT_EQ(1, new_version.CompareTo(old_version));
 
   EXPECT_EQ(0u, interceptor.GetPendingSize());
 
@@ -2071,7 +2071,7 @@
 
   // The extension should be auto-updated to newer version and re-enabled.
   EXPECT_EQ("1.0.0.1",
-            service->GetInstalledExtension(kGoodCrxId)->version()->GetString());
+            service->GetInstalledExtension(kGoodCrxId)->version().GetString());
   EXPECT_TRUE(registry->enabled_extensions().Contains(kGoodCrxId));
 }
 
@@ -2109,7 +2109,7 @@
   EXPECT_EQ(extensions::disable_reason::DISABLE_UPDATE_REQUIRED_BY_POLICY,
             extension_prefs->GetDisableReasons(kGoodCrxId));
   EXPECT_EQ("1.0.0.0",
-            service->GetInstalledExtension(kGoodCrxId)->version()->GetString());
+            service->GetInstalledExtension(kGoodCrxId)->version().GetString());
 
   // An extension management policy update should trigger an update as well.
   EXPECT_EQ(1u, interceptor.GetPendingSize());
@@ -2129,7 +2129,7 @@
 
   // It should be updated to 1.0.0.1 but remain disabled.
   EXPECT_EQ("1.0.0.1",
-            service->GetInstalledExtension(kGoodCrxId)->version()->GetString());
+            service->GetInstalledExtension(kGoodCrxId)->version().GetString());
   EXPECT_TRUE(registry->disabled_extensions().Contains(kGoodCrxId));
   EXPECT_EQ(extensions::disable_reason::DISABLE_UPDATE_REQUIRED_BY_POLICY,
             extension_prefs->GetDisableReasons(kGoodCrxId));
diff --git a/chrome/browser/previews/previews_service.cc b/chrome/browser/previews/previews_service.cc
index daba21e..e7ae3b5 100644
--- a/chrome/browser/previews/previews_service.cc
+++ b/chrome/browser/previews/previews_service.cc
@@ -32,13 +32,9 @@
     case previews::PreviewsType::OFFLINE:
       return previews::params::IsOfflinePreviewsEnabled();
     case previews::PreviewsType::LOFI:
-      return server_previews_enabled ||
-             previews::params::IsClientLoFiEnabled() ||
-             data_reduction_proxy::params::IsLoFiOnViaFlags();
+      return server_previews_enabled || previews::params::IsClientLoFiEnabled();
     case previews::PreviewsType::LITE_PAGE:
-      return server_previews_enabled ||
-             (data_reduction_proxy::params::IsLoFiOnViaFlags() &&
-              data_reduction_proxy::params::AreLitePagesEnabledViaFlags());
+      return server_previews_enabled;
     case previews::PreviewsType::AMP_REDIRECTION:
       return previews::params::IsAMPRedirectionPreviewEnabled();
     case previews::PreviewsType::NOSCRIPT:
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 9277cc2..16579d0 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -194,10 +194,33 @@
     int page_count,
     PrinterHandler::PrintCallback callback,
     scoped_refptr<printing::PrinterQuery> printer_query) {
-  queue_->QueuePrinterQuery(printer_query.get());
+
+  // Check if the job was cancelled. This should only happen on Windows when
+  // the system dialog is cancelled.
+  if (printer_query &&
+      printer_query->last_status() == PrintingContext::CANCEL) {
+    queue_->QueuePrinterQuery(printer_query.get());
+#if defined(OS_WIN)
+    content::BrowserThread::PostTask(
+        content::BrowserThread::UI, FROM_HERE,
+        base::BindOnce(&PrintViewManagerBase::SystemDialogCancelled,
+                       base::Unretained(this)));
+#endif
+    std::move(callback).Run(base::Value());
+    return;
+  }
+
+  if (!printer_query || !printer_query->cookie() ||
+      !printer_query->settings().dpi()) {
+    if (printer_query)
+      printer_query->StopWorker();
+    std::move(callback).Run(base::Value("Update settings failed"));
+    return;
+  }
 
   // Post task so that the query has time to reset the callback before calling
   // OnDidGetPrintedPagesCount.
+  queue_->QueuePrinterQuery(printer_query.get());
   content::BrowserThread::PostTask(
       content::BrowserThread::UI, FROM_HERE,
       base::BindOnce(&PrintViewManagerBase::StartLocalPrintJob,
@@ -380,6 +403,7 @@
 void PrintViewManagerBase::SystemDialogCancelled() {
   // System dialog was cancelled. Clean up the print job and notify the
   // BackgroundPrintingManager.
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   ReleasePrinterQuery();
   TerminatePrintJob(true);
   content::NotificationService::current()->Notify(
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 1167b6d..abd3151 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -194,6 +194,8 @@
       new extensions::ExtensionIconSource(profile_);
   content::URLDataSource::Add(this, icon_source);
 
+  extensions::ExtensionSystem::Get(this)->InitForIncognitoProfile();
+
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
       base::BindOnce(&NotifyOTRProfileCreatedOnIOThread, profile_, this));
diff --git a/chrome/browser/profiles/profile_avatar_downloader.cc b/chrome/browser/profiles/profile_avatar_downloader.cc
index 9b9b50d7..e3b6bfb 100644
--- a/chrome/browser/profiles/profile_avatar_downloader.cc
+++ b/chrome/browser/profiles/profile_avatar_downloader.cc
@@ -51,7 +51,7 @@
             "No content is being uploaded or saved; this request merely "
             "downloads a publicly available PNG file."
         })");
-  fetcher_.reset(new chrome::BitmapFetcher(url, this, traffic_annotation));
+  fetcher_.reset(new BitmapFetcher(url, this, traffic_annotation));
 }
 
 ProfileAvatarDownloader::~ProfileAvatarDownloader() {
diff --git a/chrome/browser/profiles/profile_avatar_downloader.h b/chrome/browser/profiles/profile_avatar_downloader.h
index e4bb887..5c32ee3 100644
--- a/chrome/browser/profiles/profile_avatar_downloader.h
+++ b/chrome/browser/profiles/profile_avatar_downloader.h
@@ -14,7 +14,7 @@
 class Image;
 }
 
-class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate {
+class ProfileAvatarDownloader : public BitmapFetcherDelegate {
  public:
   using FetchCompleteCallback = base::Callback<void(const gfx::Image*,
                                                     const std::string&,
@@ -31,7 +31,7 @@
 
  private:
   // Downloads the avatar image from a url.
-  std::unique_ptr<chrome::BitmapFetcher> fetcher_;
+  std::unique_ptr<BitmapFetcher> fetcher_;
 
   // Index of the avatar being downloaded.
   size_t icon_index_;
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 2734de8..a189eb1e7 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -76,11 +76,14 @@
 #include "components/url_formatter/url_fixer.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/devtools_network_transaction_factory.h"
+#include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/resource_context.h"
+#include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/proxy_config_traits.h"
 #include "content/public/network/ignore_errors_cert_verifier.h"
+#include "content/public/network/network_service.h"
 #include "content/public/network/url_request_context_builder_mojo.h"
 #include "extensions/features/features.h"
 #include "net/cert/caching_cert_verifier.h"
@@ -116,7 +119,6 @@
 #include "third_party/WebKit/public/public_features.h"
 
 #if BUILDFLAG(ENABLE_EXTENSIONS)
-#include "chrome/browser/extensions/extension_cookie_notifier.h"
 #include "extensions/browser/extension_protocols.h"
 #include "extensions/browser/extension_system.h"
 #include "extensions/browser/extension_throttle_manager.h"
@@ -433,8 +435,6 @@
 #if BUILDFLAG(ENABLE_EXTENSIONS)
   params->extension_info_map =
       extensions::ExtensionSystem::Get(profile)->info_map();
-  params->extension_cookie_notifier =
-      base::MakeUnique<ExtensionCookieNotifier>(profile);
 #endif
 
   if (auto* loading_predictor =
@@ -1221,11 +1221,19 @@
   builder->SetCreateHttpTransactionFactoryCallback(
       base::BindOnce(&content::CreateDevToolsNetworkTransactionFactory));
 
-  main_network_context_ =
-      io_thread_globals->network_service->CreateNetworkContextWithBuilder(
-          std::move(profile_params_->main_network_context_request),
-          std::move(profile_params_->main_network_context_params),
-          std::move(builder), &main_request_context_);
+  if (base::FeatureList::IsEnabled(features::kNetworkService)) {
+    main_request_context_owner_ = std::move(builder)->Create(
+        std::move(profile_params_->main_network_context_params).get(),
+        io_thread_globals->quic_disabled, io_thread->net_log());
+    main_request_context_ =
+        main_request_context_owner_.url_request_context.get();
+  } else {
+    main_network_context_ =
+        content::GetNetworkServiceImpl()->CreateNetworkContextWithBuilder(
+            std::move(profile_params_->main_network_context_request),
+            std::move(profile_params_->main_network_context_params),
+            std::move(builder), &main_request_context_);
+  }
 
   if (chrome_network_delegate_unowned->domain_reliability_monitor()) {
     // Save a pointer to shut down Domain Reliability cleanly before the
@@ -1240,14 +1248,6 @@
         !GetMetricsEnabledStateOnIOThread());
   }
 
-#if BUILDFLAG(ENABLE_EXTENSIONS)
-  extension_cookie_notifier_ =
-      std::move(profile_params_->extension_cookie_notifier);
-  // Cookie store will outlive notifier by order of declaration in
-  // profile_io_data.h.
-  extension_cookie_notifier_->AddStore(main_request_context_->cookie_store());
-#endif
-
   // Attach some things to the URLRequestContextBuilder's
   // TransportSecurityState.  Since no requests have been made yet, safe to do
   // this even after the call to Build().
@@ -1262,7 +1262,7 @@
             "stricter security policies, such as with HTTP Public Key Pinning. "
             "Websites can use this feature to discover misconfigurations that "
             "prevent them from complying with stricter security policies that "
-            "they've opted in to."
+            "they\'ve opted in to."
           trigger:
             "Chrome observes that a user is loading a resource from a website "
             "that has opted in for security policy reports, and the connection "
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index 6fc8cd3..a6ce2ff 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -30,6 +30,7 @@
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/resource_context.h"
 #include "content/public/common/network_service.mojom.h"
+#include "content/public/network/url_request_context_owner.h"
 #include "extensions/features/features.h"
 #include "net/cookies/cookie_store.h"
 #include "net/http/http_cache.h"
@@ -42,7 +43,6 @@
 class ChromeNetworkDelegate;
 class ChromeURLRequestContextGetter;
 class ChromeExpectCTReporter;
-class ExtensionCookieNotifier;
 class HostContentSettingsMap;
 class ProtocolHandlerRegistry;
 
@@ -338,7 +338,6 @@
     scoped_refptr<net::SSLConfigService> ssl_config_service;
 #if BUILDFLAG(ENABLE_EXTENSIONS)
     scoped_refptr<extensions::InfoMap> extension_info_map;
-    std::unique_ptr<ExtensionCookieNotifier> extension_cookie_notifier;
 #endif
     std::unique_ptr<chrome_browser_net::LoadingPredictorObserver>
         loading_predictor_observer_;
@@ -601,9 +600,11 @@
   mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_;
 #endif
 
-  // The NetworkContext that owns and configures |main_request_context_|. It's
-  // set up through IOThread's NetworkService.
+  // When the network service is enabled, this holds on to a
+  // content::NetworkContext class that owns |main_request_context_|.
   mutable std::unique_ptr<content::mojom::NetworkContext> main_network_context_;
+  // When the network service is disabled, this owns |system_request_context|.
+  mutable content::URLRequestContextOwner main_request_context_owner_;
   mutable net::URLRequestContext* main_request_context_;
 
   // Pointed to by the TransportSecurityState (owned by
@@ -634,7 +635,6 @@
   // Is NULL if switches::kDisableExtensionsHttpThrottling is on.
   mutable std::unique_ptr<extensions::ExtensionThrottleManager>
       extension_throttle_manager_;
-  mutable std::unique_ptr<ExtensionCookieNotifier> extension_cookie_notifier_;
 #endif
 
   mutable std::unique_ptr<certificate_transparency::TreeStateTracker>
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.cc b/chrome/browser/push_messaging/push_messaging_service_impl.cc
index 0e8d0f3f..b2050ea 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc
@@ -55,6 +55,7 @@
 #include "content/public/common/content_switches.h"
 #include "content/public/common/push_messaging_status.mojom.h"
 #include "content/public/common/push_subscription_options.h"
+#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
 #include "ui/base/l10n/l10n_util.h"
 
 #if BUILDFLAG(ENABLE_BACKGROUND_MODE)
@@ -108,20 +109,20 @@
                             InstanceID::LAST_RESULT + 1);
 }
 
-blink::WebPushPermissionStatus ToPushPermission(
+blink::mojom::PermissionStatus ToPermissionStatus(
     ContentSetting content_setting) {
   switch (content_setting) {
     case CONTENT_SETTING_ALLOW:
-      return blink::kWebPushPermissionStatusGranted;
+      return blink::mojom::PermissionStatus::GRANTED;
     case CONTENT_SETTING_BLOCK:
-      return blink::kWebPushPermissionStatusDenied;
+      return blink::mojom::PermissionStatus::DENIED;
     case CONTENT_SETTING_ASK:
-      return blink::kWebPushPermissionStatusPrompt;
+      return blink::mojom::PermissionStatus::ASK;
     default:
       break;
   }
   NOTREACHED();
-  return blink::kWebPushPermissionStatusDenied;
+  return blink::mojom::PermissionStatus::DENIED;
 }
 
 void UnregisterCallbackToClosure(
@@ -517,10 +518,10 @@
     return;
   }
 
-  blink::WebPushPermissionStatus permission_status =
+  blink::mojom::PermissionStatus permission_status =
       GetPermissionStatus(requesting_origin, options.user_visible_only);
 
-  if (permission_status != blink::kWebPushPermissionStatusGranted) {
+  if (permission_status != blink::mojom::PermissionStatus::GRANTED) {
     SubscribeEndWithError(
         register_callback,
         content::mojom::PushRegistrationStatus::PERMISSION_DENIED);
@@ -531,16 +532,16 @@
               CONTENT_SETTING_ALLOW);
 }
 
-blink::WebPushPermissionStatus PushMessagingServiceImpl::GetPermissionStatus(
+blink::mojom::PermissionStatus PushMessagingServiceImpl::GetPermissionStatus(
     const GURL& origin,
     bool user_visible) {
   if (!user_visible)
-    return blink::kWebPushPermissionStatusDenied;
+    return blink::mojom::PermissionStatus::DENIED;
 
   // Because the Push API is tied to Service Workers, many usages of the API
   // won't have an embedding origin at all. Only consider the requesting
   // |origin| when checking whether permission to use the API has been granted.
-  return ToPushPermission(
+  return ToPermissionStatus(
       PermissionManager::Get(profile_)
           ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin,
                                 origin)
@@ -1061,7 +1062,7 @@
 // if the permission was previously granted and not revoked.
 bool PushMessagingServiceImpl::IsPermissionSet(const GURL& origin) {
   return GetPermissionStatus(origin, true /* user_visible */) ==
-         blink::kWebPushPermissionStatusGranted;
+         blink::mojom::PermissionStatus::GRANTED;
 }
 
 void PushMessagingServiceImpl::GetEncryptionInfoForAppId(
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h
index a1f4b71..a5c3996 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h
@@ -31,8 +31,6 @@
 #include "content/public/browser/notification_registrar.h"
 #include "content/public/browser/push_messaging_service.h"
 #include "content/public/common/push_event_payload.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
-#include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 
 class Profile;
 class PushMessagingAppIdentifier;
@@ -67,6 +65,10 @@
   explicit PushMessagingServiceImpl(Profile* profile);
   ~PushMessagingServiceImpl() override;
 
+  // Gets the permission status for the given |origin|.
+  blink::mojom::PermissionStatus GetPermissionStatus(const GURL& origin,
+                                                     bool user_visible);
+
   // gcm::GCMAppHandler implementation.
   void ShutdownHandler() override;
   void OnStoreReset() override;
@@ -103,9 +105,6 @@
                    int64_t service_worker_registration_id,
                    const std::string& sender_id,
                    const UnregisterCallback&) override;
-  blink::WebPushPermissionStatus GetPermissionStatus(
-      const GURL& origin,
-      bool user_visible) override;
   bool SupportNonVisibleMessages() override;
   void DidDeleteServiceWorkerRegistration(
       const GURL& origin,
diff --git a/chrome/browser/push_messaging/push_messaging_service_unittest.cc b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
index b3abca7..ea383e0 100644
--- a/chrome/browser/push_messaging/push_messaging_service_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
@@ -158,7 +158,7 @@
   const GURL origin(kTestOrigin);
 
   // (1) Make sure that |kExampleOrigin| has access to use Push Messaging.
-  ASSERT_EQ(blink::kWebPushPermissionStatusGranted,
+  ASSERT_EQ(blink::mojom::PermissionStatus::GRANTED,
             push_service->GetPermissionStatus(origin, true));
 
   std::string subscription_id;
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 4d5c413..4fd946f6 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -116,6 +116,7 @@
 #include "content/public/common/menu_item.h"
 #include "content/public/common/url_utils.h"
 #include "extensions/features/features.h"
+#include "media/base/media_switches.h"
 #include "net/base/escape.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "ppapi/features/features.h"
@@ -1536,8 +1537,7 @@
 }
 
 void RenderViewContextMenu::AppendPictureInPictureItem() {
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnablePictureInPicture))
+  if (base::FeatureList::IsEnabled(media::kPictureInPicture))
     menu_model_.AddItemWithStringId(IDC_CONTENT_CONTENT_PICTUREINPICTURE,
                                     IDS_CONTENT_CONTENT_PICTUREINPICTURE);
 }
@@ -1577,7 +1577,7 @@
   // Allow Spell Check language items on sub menu for text area context menu.
   if ((id >= IDC_SPELLCHECK_LANGUAGES_FIRST) &&
       (id < IDC_SPELLCHECK_LANGUAGES_LAST)) {
-    return prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck);
+    return prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable);
   }
 
   // Extension items.
@@ -1722,7 +1722,7 @@
     case IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS:
       return true;
     case IDC_CHECK_SPELLING_WHILE_TYPING:
-      return prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck);
+      return prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable);
 
 #if !defined(OS_MACOSX) && defined(OS_POSIX)
     // TODO(suzhe): this should not be enabled for password fields.
@@ -2612,8 +2612,7 @@
 }
 
 void RenderViewContextMenu::ExecPictureInPicture() {
-  if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnablePictureInPicture))
+  if (!base::FeatureList::IsEnabled(media::kPictureInPicture))
     return;
 
   PictureInPictureWindowController* window_controller =
diff --git a/chrome/browser/renderer_context_menu/spelling_options_submenu_observer.cc b/chrome/browser/renderer_context_menu/spelling_options_submenu_observer.cc
index 8a514b1..3343628 100644
--- a/chrome/browser/renderer_context_menu/spelling_options_submenu_observer.cc
+++ b/chrome/browser/renderer_context_menu/spelling_options_submenu_observer.cc
@@ -136,7 +136,7 @@
   if (command_id == IDC_CHECK_SPELLING_WHILE_TYPING) {
     Profile* profile = Profile::FromBrowserContext(proxy_->GetBrowserContext());
     return profile->GetPrefs()->GetBoolean(
-        spellcheck::prefs::kEnableSpellcheck);
+        spellcheck::prefs::kSpellCheckEnable);
   }
 
   return false;
@@ -151,7 +151,7 @@
   if ((command_id >= IDC_SPELLCHECK_LANGUAGES_FIRST &&
        command_id < IDC_SPELLCHECK_LANGUAGES_LAST) ||
       command_id == IDC_SPELLCHECK_MULTI_LINGUAL) {
-    return pref->GetBoolean(spellcheck::prefs::kEnableSpellcheck);
+    return pref->GetBoolean(spellcheck::prefs::kSpellCheckEnable);
   }
 
   switch (command_id) {
@@ -185,9 +185,9 @@
   switch (command_id) {
     case IDC_CHECK_SPELLING_WHILE_TYPING:
       profile->GetPrefs()->SetBoolean(
-          spellcheck::prefs::kEnableSpellcheck,
+          spellcheck::prefs::kSpellCheckEnable,
           !profile->GetPrefs()->GetBoolean(
-              spellcheck::prefs::kEnableSpellcheck));
+              spellcheck::prefs::kSpellCheckEnable));
       break;
 
     case IDC_SPELLCHECK_MULTI_LINGUAL:
diff --git a/chrome/browser/renderer_context_menu/spelling_options_submenu_observer_browsertest.cc b/chrome/browser/renderer_context_menu/spelling_options_submenu_observer_browsertest.cc
index 2419010..5bd6a68 100644
--- a/chrome/browser/renderer_context_menu/spelling_options_submenu_observer_browsertest.cc
+++ b/chrome/browser/renderer_context_menu/spelling_options_submenu_observer_browsertest.cc
@@ -43,8 +43,8 @@
   void InitMenu(bool enable_spellcheck,
                 const std::string& accept_languages,
                 const std::vector<std::string>& dictionaries) {
-    menu()->GetPrefs()->SetBoolean(
-        spellcheck::prefs::kEnableSpellcheck, enable_spellcheck);
+    menu()->GetPrefs()->SetBoolean(spellcheck::prefs::kSpellCheckEnable,
+                                   enable_spellcheck);
     menu()->GetPrefs()->SetString(prefs::kAcceptLanguages, accept_languages);
     base::ListValue dictionaries_value;
     dictionaries_value.AppendStrings(dictionaries);
@@ -55,9 +55,8 @@
 
   void ExpectPreferences(bool spellcheck_enabled,
                          const std::vector<std::string>& dictionaries) {
-    EXPECT_EQ(spellcheck_enabled,
-              menu()->GetPrefs()->GetBoolean(
-                  spellcheck::prefs::kEnableSpellcheck));
+    EXPECT_EQ(spellcheck_enabled, menu()->GetPrefs()->GetBoolean(
+                                      spellcheck::prefs::kSpellCheckEnable));
     base::ListValue dictionaries_value;
     dictionaries_value.AppendStrings(dictionaries);
     EXPECT_TRUE(dictionaries_value.Equals(menu()->GetPrefs()->GetList(
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
index af75ce2..ba707a1 100644
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
@@ -125,8 +125,7 @@
       Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
       DCHECK(profile);
       NSCellStateValue checkedState =
-          profile->GetPrefs()->GetBoolean(
-              spellcheck::prefs::kEnableSpellcheck)
+          profile->GetPrefs()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)
               ? NSOnState
               : NSOffState;
       [(id)item setState:checkedState];
@@ -217,9 +216,8 @@
   Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
   DCHECK(profile);
   PrefService* pref = profile->GetPrefs();
-  pref->SetBoolean(
-      spellcheck::prefs::kEnableSpellcheck,
-      !pref->GetBoolean(spellcheck::prefs::kEnableSpellcheck));
+  pref->SetBoolean(spellcheck::prefs::kSpellCheckEnable,
+                   !pref->GetBoolean(spellcheck::prefs::kSpellCheckEnable));
 }
 
 // END Spellchecking methods
diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
index ff29021..a5ea92f 100644
--- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
+++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
@@ -59,7 +59,7 @@
       }
       case PpapiHostMsg_OutputProtection_Create::ID: {
         scoped_refptr<ResourceMessageFilter> output_protection_filter(
-            new chrome::PepperOutputProtectionMessageFilter(host_, instance));
+            new PepperOutputProtectionMessageFilter(host_, instance));
         return std::unique_ptr<ResourceHost>(
             new MessageFilterHost(host_->GetPpapiHost(), instance, resource,
                                   output_protection_filter));
diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc
index d59c3a59..60ec7b8 100644
--- a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc
@@ -17,8 +17,6 @@
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ui/display/types/display_constants.h"
 
-namespace chrome {
-
 namespace {
 
 static_assert(static_cast<int>(PP_OUTPUT_PROTECTION_LINK_TYPE_PRIVATE_NONE) ==
@@ -161,5 +159,3 @@
   SendReply(reply_context,
             PpapiPluginMsg_OutputProtection_EnableProtectionReply());
 }
-
-}  // namespace chrome
diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h
index d475fb40..89ad19d6 100644
--- a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h
+++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h
@@ -28,8 +28,6 @@
 
 class OutputProtectionProxy;
 
-namespace chrome {
-
 class PepperOutputProtectionMessageFilter
     : public ppapi::host::ResourceMessageFilter {
  public:
@@ -82,6 +80,4 @@
   DISALLOW_COPY_AND_ASSIGN(PepperOutputProtectionMessageFilter);
 };
 
-}  // namespace chrome
-
 #endif  // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_MESSAGE_FILTER_H_
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 8edcf41..e05adba 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -319,7 +319,7 @@
       return node.root.role == Role.DESKTOP;
     case Role.ROOT_WEB_AREA:
       if (node.parent && node.parent.role == Role.WEB_VIEW &&
-          !node.parent.state[chrome.automation.StateType.FOCUSED]) {
+          !node.parent.state[State.FOCUSED]) {
         // If parent web view is not focused, we should allow this root web area
         // to be crossed when performing traversals up the ancestry chain.
         return false;
@@ -493,4 +493,13 @@
       AutomationPredicate.cellLike(node);
 };
 
+/**
+ * Matches against a node that handles multi line key commands.
+ * @param {!AutomationNode} node
+ * @return {boolean}
+ */
+AutomationPredicate.multiline = function(node) {
+  return node.state[State.MULTILINE] || node.state[State.RICHLY_EDITABLE];
+};
+
 });  // goog.scope
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 1460182..313d624 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -349,10 +349,7 @@
 
         var command = BrailleCommandHandler.getCommand(evt.brailleDots);
         if (command) {
-          if (!ChromeVoxState.instance.currentRange ||
-              !ChromeVoxState.instance.currentRange.start.node
-                   .state[StateType.EDITABLE] ||
-              BrailleCommandHandler.onEditCommand(command))
+          if (BrailleCommandHandler.onEditCommand(command))
             CommandHandler.onCommand(command);
         }
         break;
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index eed2f17..058083a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -1301,3 +1301,57 @@
         .replay();
   });
 });
+
+TEST_F('BackgroundTest', 'EditableKeyCommand', function() {
+  var mockFeedback = this.createMockFeedback();
+  this.runWithLoadedTree(function(root) {/*!
+    <input type="text"></input>
+    <textarea>test</textarea>
+    <div role="textbox" contenteditable>test</div>
+  */}, function(root) {
+    var assertCurNode = function(node) {
+      return function() {
+        assertEquals(node, ChromeVoxState.instance.currentRange.start.node);
+      };
+    };
+    var doBrlCmd = function(command) {
+      return function() {
+        BrailleCommandHandler.onEditCommand(command);
+      };
+    };
+
+    var textField = root.firstChild;
+    var textArea = textField.nextSibling;
+    var contentEditable = textArea.nextSibling;
+
+    mockFeedback.call(assertCurNode(textField))
+        .call(doCmd('nextObject'))
+        .call(assertCurNode(textArea))
+
+        // Processed as edit commands.
+        .call(doCmd('nextObject'))
+        .call(assertCurNode(textArea))
+        // Output here is wrong.
+        .expectBraille('test mled mled', {startIndex: 4, endIndex: 4})
+        .call(doBrlCmd('previousObject'))
+        .call(assertCurNode(textArea))
+        .expectBraille('test mled mled', {startIndex: 0, endIndex: 0}) 
+
+        // Sticky mode overrides the edit keys.
+        .call(doCmd('toggleStickyMode'))
+        .call(doCmd('nextObject'))
+        .call(assertCurNode(contentEditable))
+
+        // Flipping sticky off returns us to editing.
+        .call(doCmd('toggleStickyMode'))
+        .call(doCmd('nextObject'))
+        .call(assertCurNode(contentEditable))
+        .expectBraille('test', {startIndex: 4, endIndex: 4})
+
+        .call(doBrlCmd('previousObject'))
+        .call(assertCurNode(contentEditable.firstChild))
+        .expectBraille('test', {startIndex: 0, endIndex: 0}) 
+
+        .replay();
+  });
+});
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/braille_command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/braille_command_handler.js
index 9aa65f4..106922a53 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/braille_command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/braille_command_handler.js
@@ -12,6 +12,7 @@
 
 goog.scope(function() {
 var Mod = constants.ModifierFlag;
+var StateType = chrome.automation.StateType;
 
 /**
  * Maps a dot pattern to a command.
@@ -98,6 +99,12 @@
  * @return {boolean} True if the command should propagate.
  */
 BrailleCommandHandler.onEditCommand = function(command) {
+  var current = ChromeVoxState.instance.currentRange;
+  if (cvox.ChromeVox.isStickyModeOn() || !current || !current.start ||
+      !current.start.node || !current.start.node.state[StateType.EDITABLE])
+    return true;
+
+  var isMultiline = AutomationPredicate.multiline(current.start.node);
   switch (command) {
     case 'previousCharacter':
       BackgroundKeyboardHandler.sendKeyPress(37, 'ArrowLeft');
@@ -113,10 +120,14 @@
       break;
     case 'previousObject':
     case 'previousLine':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(38, 'ArrowUp');
       break;
     case 'nextObject':
     case 'nextLine':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(40, 'ArrowDown');
       break;
     case 'previousGroup':
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
index e0e8f5b..91cf7df6d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
@@ -245,7 +245,7 @@
   var current = ChromeVoxState.instance.currentRange_;
 
   // Allow edit commands first.
-  if (!CommandHandler.onEditCommand_(current, command))
+  if (!CommandHandler.onEditCommand_(command))
     return false;
 
   var dir = Dir.FORWARD;
@@ -916,16 +916,17 @@
 /**
  * Provides a partial mapping from ChromeVox key combinations to
  * Search-as-a-function key as seen in Chrome OS documentation.
- * @param {cursors.Range} current
  * @param {string} command
  * @return {boolean} True if the command should propagate.
  * @private
  */
-CommandHandler.onEditCommand_ = function(current, command) {
+CommandHandler.onEditCommand_ = function(command) {
+  var current = ChromeVoxState.instance.currentRange;
   if (cvox.ChromeVox.isStickyModeOn() || !current || !current.start ||
       !current.start.node || !current.start.node.state[StateType.EDITABLE])
     return true;
 
+  var isMultiline = AutomationPredicate.multiline(current.start.node);
   switch (command) {
     case 'previousCharacter':
       BackgroundKeyboardHandler.sendKeyPress(36, 'Home', Mod.SHIFT);
@@ -942,15 +943,23 @@
           35, 'End', Mod.SHIFT | Mod.CONTROL);
       break;
     case 'previousObject':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(36, 'Home');
       break;
     case 'nextObject':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(35, 'End');
       break;
     case 'previousLine':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(33, 'PageUp');
       break;
     case 'nextLine':
+      if (!isMultiline)
+        return true;
       BackgroundKeyboardHandler.sendKeyPress(34, 'PageDown');
       break;
     case 'jumpToTop':
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/keyboard_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/keyboard_handler.js
index 636e087..997098a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/keyboard_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/keyboard_handler.js
@@ -40,7 +40,7 @@
     if (cvox.ChromeVox.passThroughMode)
       return false;
 
-    if (cvox.ChromeVoxKbHandler.basicKeyDownActionsListener(evt)) {
+    if (!cvox.ChromeVoxKbHandler.basicKeyDownActionsListener(evt)) {
       evt.preventDefault();
       evt.stopPropagation();
       this.eatenKeyDowns_.add(evt.keyCode);
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_test.extjs
index e2b2c1d..c3a91a9 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_test.extjs
@@ -65,7 +65,8 @@
   */}
 };
 
-TEST_F('PanelTest', 'ActivateMenu', function() {
+// Flaky, see https://crbug.com/795840
+TEST_F('PanelTest', 'DISABLED_ActivateMenu', function() {
   var mockFeedback = this.createMockFeedback();
   this.runWithLoadedTree(this.linksDoc, function(root) {
     var openMenus = new PanelCommand(PanelCommandType.OPEN_MENUS);
diff --git a/chrome/browser/resources/chromeos/emulator/audio_settings.html b/chrome/browser/resources/chromeos/emulator/audio_settings.html
index 688da48..d633a93 100644
--- a/chrome/browser/resources/chromeos/emulator/audio_settings.html
+++ b/chrome/browser/resources/chromeos/emulator/audio_settings.html
@@ -14,9 +14,8 @@
 
 <dom-module id="audio-settings">
   <template>
-    <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
-         See https://github.com/Polymer/polymer/pull/3668. -->
-    <style include="device-emulator-shared-styles cr-shared-style iron-flex iron-flex-alignment iron-positioning">
+    <style include="device-emulator-shared-styles cr-shared-style iron-flex
+        iron-flex-alignment iron-positioning">
     </style>
     <dialog is="cr-dialog" id="editDialog">
       <div slot="title">[[currentEditableObject.deviceName]]</div>
diff --git a/chrome/browser/resources/chromeos/emulator/battery_settings.html b/chrome/browser/resources/chromeos/emulator/battery_settings.html
index 8454f6b..1889b1c5 100644
--- a/chrome/browser/resources/chromeos/emulator/battery_settings.html
+++ b/chrome/browser/resources/chromeos/emulator/battery_settings.html
@@ -13,8 +13,6 @@
 
 <dom-module id="battery-settings">
   <template>
-    <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
-         See https://github.com/Polymer/polymer/pull/3668. -->
     <style include="device-emulator-shared-styles iron-flex iron-flex-alignment
         iron-positioning md-select">
     </style>
diff --git a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html
index 5389e24..9bc4a1d 100644
--- a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html
+++ b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html
@@ -14,9 +14,8 @@
 
 <dom-module id="bluetooth-settings">
   <template>
-    <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
-         See https://github.com/Polymer/polymer/pull/3668. -->
-    <style include="device-emulator-shared-styles cr-shared-style iron-flex iron-flex-alignment iron-positioning">
+    <style include="device-emulator-shared-styles cr-shared-style iron-flex
+        iron-flex-alignment iron-positioning">
     </style>
     <dialog is="cr-dialog" id="editDialog">
       <div slot="title">[[currentEditableObject.alias]]</div>
diff --git a/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html b/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
index 9d876d3..e2abe2d5 100644
--- a/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
+++ b/chrome/browser/resources/chromeos/emulator/device_emulator_pages.html
@@ -21,9 +21,8 @@
 
 <dom-module id="device-emulator-pages">
   <template>
-    <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
-         See https://github.com/Polymer/polymer/pull/3668. -->
-    <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning">
+    <style include="device-emulator-shared-styles iron-flex iron-flex-alignment
+        iron-positioning">
       :host {
         display: flex;
         flex-direction: column;
diff --git a/chrome/browser/resources/chromeos/emulator/input_device_settings.html b/chrome/browser/resources/chromeos/emulator/input_device_settings.html
index 871e31e..8726551 100644
--- a/chrome/browser/resources/chromeos/emulator/input_device_settings.html
+++ b/chrome/browser/resources/chromeos/emulator/input_device_settings.html
@@ -7,9 +7,8 @@
 
 <dom-module id="input-device-settings">
   <template>
-    <!-- TODO(michaelpg): Wrap the line below to fit within the 80-char limit.
-         See https://github.com/Polymer/polymer/pull/3668. -->
-    <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning">
+    <style include="device-emulator-shared-styles iron-flex iron-flex-alignment
+         iron-positioning">
       .content > *:not(:first-child) {
         margin-top: 10px;
       }
diff --git a/chrome/browser/resources/md_extensions/detail_view.html b/chrome/browser/resources/md_extensions/detail_view.html
index 4b8b86b..06733dc 100644
--- a/chrome/browser/resources/md_extensions/detail_view.html
+++ b/chrome/browser/resources/md_extensions/detail_view.html
@@ -25,7 +25,8 @@
 
 <dom-module id="extensions-detail-view">
   <template>
-    <style include="iron-flex cr-shared-style cr-icons action-link paper-button-style">
+    <style include="iron-flex cr-shared-style cr-icons action-link
+        paper-button-style">
       :host {
         --iron-icon-fill-color: var(--paper-grey-600);
         display: block;
@@ -181,8 +182,8 @@
       }
 
       #size {
-        display: flex;
         align-items: center;
+        display: flex;
       }
 
       paper-spinner-lite {
diff --git a/chrome/browser/resources/md_extensions/item.html b/chrome/browser/resources/md_extensions/item.html
index c9c013e5..971e243 100644
--- a/chrome/browser/resources/md_extensions/item.html
+++ b/chrome/browser/resources/md_extensions/item.html
@@ -195,11 +195,23 @@
       #blacklisted-warning:empty {
         display: none;
       }
+
+      #a11yAssociation {
+        height: 0;
+        overflow: hidden;
+      }
     </style>
+    <!-- Invisible instead of hidden because VoiceOver refuses to read text of
+      element that's hidden when referenced by an aria label.  Unfortunately,
+      this text can be found by Ctrl + F because it isn't hidden. -->
+    <div id="a11yAssociation" aria-hidden="true">
+      [[a11yAssociation_(data.name)]]
+    </div>
     <div id="card" class$="[[computeClasses_(data.state, inDevMode)]]">
       <div id="main">
         <div id="icon-wrapper">
           <img id="icon" src="[[data.iconUrl]]"
+              aria-describedby="a11yAssociation"
               alt$="[[appOrExtension(
                   data.type,
                   '$i18nPolymer{appIcon}',
@@ -208,6 +220,7 @@
               if="[[computeSourceIndicatorIcon_(data.*)]]">
             <div id="source-indicator">
               <div class="source-icon-wrapper" role="img"
+                  aria-describedby="a11yAssociation"
                   aria-label$="[[computeSourceIndicatorText_(data.*)]]">
                 <iron-icon icon="[[computeSourceIndicatorIcon_(data.*)]]">
                 </iron-icon>
@@ -220,7 +233,7 @@
         <template is="dom-if"
             if="[[computeSourceIndicatorIcon_(data.*)]]">
           <paper-tooltip id="source-indicator-text" for="source-indicator"
-              position="top" fit-to-visible-bounds>
+              position="top" fit-to-visible-bounds aria-hidden="true">
             [[computeSourceIndicatorText_(data.*)]]
           </paper-tooltip>
         </template>
@@ -241,15 +254,15 @@
           </div>
           <template is="dom-if" if="[[hasWarnings_(data.*)]]">
             <div id="warnings" >
-              <div id="suspicious-warning"
-                   hidden$="[[!data.disableReasons.suspiciousInstall]]">
+              <div id="suspicious-warning" aria-describedby="a11yAssociation"
+                  hidden$="[[!data.disableReasons.suspiciousInstall]]">
                 $i18n{itemSuspiciousInstall}
                 <a target="_blank" id="learn-more-link"
                     href="$i18n{suspiciousInstallHelpUrl}">
                   $i18n{learnMore}
                 </a>
               </div>
-              <div id="corrupted-warning"
+              <div id="corrupted-warning" aria-describedby="a11yAssociation"
                   hidden$="[[!data.disableReasons.corruptInstall]]">
                 $i18n{itemCorruptInstall}
               </div>
@@ -266,7 +279,9 @@
                   doesn't shrink (because it's not display: flex).-->
               <div>
                 <div id="inspect-views">
-                  <span>$i18n{itemInspectViews}</span>
+                  <span aria-describedby="a11yAssociation">
+                    $i18n{itemInspectViews}
+                  </span>
                   <a class="clippable-flex-text" is="action-link"
                       title="[[computeFirstInspectTitle_(data.views)]]"
                       on-tap="onInspectTap_">
@@ -285,34 +300,37 @@
       </div>
       <div id="button-strip" class="layout horizontal center">
         <div class="layout flex horizontal center">
-          <paper-button id="details-button" on-tap="onDetailsTap_">
+          <paper-button id="details-button" on-tap="onDetailsTap_"
+              aria-describedby="a11yAssociation">
             $i18n{itemDetails}
           </paper-button>
           <paper-button id="remove-button" on-tap="onRemoveTap_"
+              aria-describedby="a11yAssociation"
               hidden="[[isControlled_(data.controlledInfo)]]">
             $i18n{itemRemove}
           </paper-button>
           <template is="dom-if" if="[[shouldShowErrorsButton_(data.*)]]">
-            <paper-button id="errors-button" on-tap="onErrorsTap_">
+            <paper-button id="errors-button" on-tap="onErrorsTap_"
+                aria-describedby="a11yAssociation">
               $i18n{itemErrors}
             </paper-button>
           </template>
         </div>
         <template is="dom-if" if="[[!computeDevReloadButtonHidden_(data.*)]]">
           <button id="dev-reload-button" is="paper-icon-button-light"
-              aria-label="$i18n{itemReload}"
+              aria-label="$i18n{itemReload}" aria-describedby="a11yAssociation"
               class="icon-refresh no-overlap" on-tap="onReloadTap_">
           </button>
         </template>
         <template is="dom-if" if="[[data.disableReasons.corruptInstall]]">
           <paper-button id="repair-button" class="action-button"
-              on-tap="onRepairTap_">
+              aria-describedby="a11yAssociation" on-tap="onRepairTap_">
             $i18n{itemRepair}
           </paper-button>
         </template>
         <template is="dom-if" if="[[isTerminated_(data.state)]]">
           <paper-button id="terminated-reload-button" on-tap="onReloadTap_"
-              class="action-button">
+              aria-describedby="a11yAssociation" class="action-button">
             $i18n{itemReload}
           </paper-button>
         </template>
@@ -321,7 +339,7 @@
                 data.type,
                 '$i18nPolymer{appEnabled}',
                 '$i18nPolymer{extensionEnabled}')]]"
-            aria-describedby="name"
+            aria-describedby="a11yAssociation"
             checked="[[isEnabled_(data.state)]]" on-change="onEnableChange_"
             disabled="[[!isEnableToggleEnabled_(data.*)]]"
             hidden$="[[!showEnableToggle_(data.*)]]">
diff --git a/chrome/browser/resources/md_extensions/item.js b/chrome/browser/resources/md_extensions/item.js
index f2fb984..30f9f41 100644
--- a/chrome/browser/resources/md_extensions/item.js
+++ b/chrome/browser/resources/md_extensions/item.js
@@ -107,6 +107,11 @@
       'observeIdVisibility_(inDevMode, showingDetails_, data.id)',
     ],
 
+    /** @private string */
+    a11yAssociation_: function() {
+      return this.i18n('extensionA11yAssociation', this.data.name);
+    },
+
     /** @private */
     observeIdVisibility_: function(inDevMode, showingDetails, id) {
       Polymer.dom.flush();
@@ -336,8 +341,8 @@
      * @private
      */
     computeExtraInspectLabel_: function() {
-      return loadTimeData.getStringF(
-          'itemInspectViewsExtra', this.data.views.length - 1);
+      return this.i18n(
+          'itemInspectViewsExtra', (this.data.views.length - 1).toString());
     },
 
     /**
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js
index d86170d..f79772f5 100644
--- a/chrome/browser/resources/print_preview/data/destination.js
+++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -109,6 +109,15 @@
 print_preview.Cdd;
 
 /**
+ * Enumeration of color modes used by Chromium.
+ * @enum {number}
+ */
+print_preview.ColorMode = {
+  GRAY: 1,
+  COLOR: 2
+};
+
+/**
  * @typedef {{id: string,
  *            origin: print_preview.DestinationOrigin,
  *            account: string,
@@ -291,6 +300,19 @@
                       .NEEDS_USB_PERMISSION ||
               this.isExtension,
           'Provisional USB destination only supprted with extension origin.');
+
+      /**
+       * @private {!Array<string>} List of capability types considered color.
+       * @const
+       */
+      this.COLOR_TYPES_ = ['STANDARD_COLOR', 'CUSTOM_COLOR'];
+
+      /**
+       * @private {!Array<string>} List of capability types considered
+       *     monochrome.
+       * @const
+       */
+      this.MONOCHROME_TYPES_ = ['STANDARD_MONOCHROME', 'CUSTOM_MONOCHROME'];
     }
 
     /** @return {string} ID of the destination. */
@@ -586,6 +608,90 @@
     get isEnterprisePrinter() {
       return this.isEnterprisePrinter_;
     }
+
+    /**
+     * @return {Object} Color capability of this destination.
+     * @private
+     */
+    colorCapability_() {
+      return this.capabilities && this.capabilities.printer &&
+              this.capabilities.printer.color ?
+          this.capabilities.printer.color :
+          null;
+    }
+
+    /**
+     * @return {boolean} Whether the printer supports both black and white and
+     *     color printing.
+     */
+    get hasColorCapability() {
+      const capability = this.colorCapability_();
+      if (!capability || !capability.option)
+        return false;
+      let hasColor = false;
+      let hasMonochrome = false;
+      capability.option.forEach(option => {
+        const type = assert(option.type);
+        hasColor = hasColor || this.COLOR_TYPES_.includes(option.type);
+        hasMonochrome =
+            hasMonochrome || this.MONOCHROME_TYPES_.includes(option.type);
+      });
+      return hasColor && hasMonochrome;
+    }
+
+    /**
+     * @param {boolean} isColor Whether to use a color printing mode.
+     * @return {Object} Selected color option.
+     */
+    getSelectedColorOption(isColor) {
+      const typesToLookFor =
+          isColor ? this.COLOR_TYPES_ : this.MONOCHROME_TYPES_;
+      const capability = this.colorCapability_();
+      if (!capability || !capability.option)
+        return null;
+      for (let i = 0; i < typesToLookFor.length; i++) {
+        const matchingOptions = capability.option.filter(option => {
+          return option.type == typesToLookFor[i];
+        });
+        if (matchingOptions.length > 0)
+          return matchingOptions[0];
+      }
+      return null;
+    }
+
+    /**
+     * @param {boolean} isColor Whether to use a color printing mode.
+     * @return {number} Native color model of the destination.
+     */
+    getNativeColorModel(isColor) {
+      // For non-local printers or printers without capability, native color
+      // model is ignored.
+      const capability = this.colorCapability_();
+      if (!capability || !capability.option || !this.isLocal) {
+        return isColor ? print_preview.ColorMode.COLOR :
+                         print_preview.ColorMode.GRAY;
+      }
+      const selected = this.getSelectedColorOption(isColor);
+      const mode = parseInt(selected ? selected.vendor_id : null, 10);
+      if (isNaN(mode)) {
+        return isColor ? print_preview.ColorMode.COLOR :
+                         print_preview.ColorMode.GRAY;
+      }
+      return mode;
+    }
+
+    /**
+     * @return {Object} The default color option for the destination.
+     */
+    get defaultColorOption() {
+      const capability = this.colorCapability_();
+      if (!capability || !capability.option)
+        return null;
+      const defaultOptions = capability.option.filter(option => {
+        return option.is_default;
+      });
+      return defaultOptions.length != 0 ? defaultOptions[0] : null;
+    }
   }
 
   /**
diff --git a/chrome/browser/resources/print_preview/data/print_ticket_store.js b/chrome/browser/resources/print_preview/data/print_ticket_store.js
index b1ad663..6ae5c7fd 100644
--- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
+++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
@@ -426,7 +426,8 @@
         cjt.print.collate = {collate: this.collate.getValue()};
       }
       if (this.color.isCapabilityAvailable() && this.color.isUserEdited()) {
-        const selectedOption = this.color.getSelectedOption();
+        const selectedOption =
+            destination.getSelectedColorOption(this.color.getValue());
         if (!selectedOption) {
           console.error('Could not find correct color option');
         } else {
@@ -440,7 +441,7 @@
         // reasonable reader of the ticket will have to do more work, or process
         // the ticket sub-optimally, in order to safely handle the lack of a
         // color ticket item.
-        const defaultOption = this.color.defaultColorOption();
+        const defaultOption = destination.defaultColorOption;
         if (defaultOption) {
           cjt.print.color = {type: defaultOption.type};
           if (defaultOption.hasOwnProperty('vendor_id')) {
diff --git a/chrome/browser/resources/print_preview/data/ticket_items/color.js b/chrome/browser/resources/print_preview/data/ticket_items/color.js
index f5e0077..56bc361d 100644
--- a/chrome/browser/resources/print_preview/data/ticket_items/color.js
+++ b/chrome/browser/resources/print_preview/data/ticket_items/color.js
@@ -27,62 +27,14 @@
 
     /** @override */
     isCapabilityAvailable() {
-      const capability = this.capability;
-      if (!capability) {
-        return false;
-      }
-      let hasColor = false;
-      let hasMonochrome = false;
-      capability.option.forEach(function(option) {
-        hasColor = hasColor || (Color.COLOR_TYPES_.indexOf(option.type) >= 0);
-        hasMonochrome = hasMonochrome ||
-            (Color.MONOCHROME_TYPES_.indexOf(option.type) >= 0);
-      });
-      return hasColor && hasMonochrome;
-    }
-
-    /** @return {Object} Color capability of the selected destination. */
-    get capability() {
       const dest = this.getSelectedDestInternal();
-      return (dest && dest.capabilities && dest.capabilities.printer &&
-              dest.capabilities.printer.color) ||
-          null;
-    }
-
-    /** @return {Object} Printer's default color option. */
-    defaultColorOption() {
-      const capability = this.capability;
-      if (!capability) {
-        return null;
-      }
-      const defaultOptions = capability.option.filter(function(option) {
-        return option.is_default;
-      });
-      return defaultOptions.length != 0 ? defaultOptions[0] : null;
-    }
-
-    /** @return {Object} Color option corresponding to the current value. */
-    getSelectedOption() {
-      const capability = this.capability;
-      const options = capability ? capability.option : null;
-      if (options) {
-        const typesToLookFor =
-            this.getValue() ? Color.COLOR_TYPES_ : Color.MONOCHROME_TYPES_;
-        for (let i = 0; i < typesToLookFor.length; i++) {
-          const matchingOptions = options.filter(function(option) {
-            return option.type == typesToLookFor[i];
-          });
-          if (matchingOptions.length > 0) {
-            return matchingOptions[0];
-          }
-        }
-      }
-      return null;
+      return dest ? dest.hasColorCapability : false;
     }
 
     /** @override */
     getDefaultValueInternal() {
-      const defaultOption = this.defaultColorOption();
+      const dest = this.getSelectedDestInternal();
+      const defaultOption = dest ? dest.defaultColorOption : null;
       return defaultOption &&
           (Color.COLOR_TYPES_.indexOf(defaultOption.type) >= 0);
     }
diff --git a/chrome/browser/resources/print_preview/new/color_settings.html b/chrome/browser/resources/print_preview/new/color_settings.html
index cca961b..b95459a 100644
--- a/chrome/browser/resources/print_preview/new/color_settings.html
+++ b/chrome/browser/resources/print_preview/new/color_settings.html
@@ -11,7 +11,7 @@
     <print-preview-settings-section>
       <span id="color-label" slot="title">$i18n{optionColor}</span>
       <div slot="controls">
-        <select aria-labelledby="color-label">
+        <select aria-labelledby="color-label" on-change="onChange_">
           <option value="bw" selected>$i18n{optionBw}</option>
           <option value="color">$i18n{optionColor}</option>
         </select>
diff --git a/chrome/browser/resources/print_preview/new/color_settings.js b/chrome/browser/resources/print_preview/new/color_settings.js
index b28f250..075141f 100644
--- a/chrome/browser/resources/print_preview/new/color_settings.js
+++ b/chrome/browser/resources/print_preview/new/color_settings.js
@@ -4,4 +4,21 @@
 
 Polymer({
   is: 'print-preview-color-settings',
+
+  behaviors: [SettingsBehavior],
+
+  observers: ['onColorSettingChange_(settings.color.value)'],
+
+  /**
+   * @param {*} value The new value of the color setting.
+   * @private
+   */
+  onColorSettingChange_: function(value) {
+    this.$$('select').value = /** @type {boolean} */ (value) ? 'color' : 'bw';
+  },
+
+  /** @private */
+  onChange_: function() {
+    this.setSetting('color', this.$$('select').value == 'color');
+  },
 });
diff --git a/chrome/browser/resources/print_preview/new/compiled_resources2.gyp b/chrome/browser/resources/print_preview/new/compiled_resources2.gyp
index d12b908..cc4e4cc 100644
--- a/chrome/browser/resources/print_preview/new/compiled_resources2.gyp
+++ b/chrome/browser/resources/print_preview/new/compiled_resources2.gyp
@@ -71,12 +71,14 @@
     {
       'target_name': 'layout_settings',
       'dependencies': [
+        'settings_behavior',
       ],
       'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
     },
     {
       'target_name': 'color_settings',
       'dependencies': [
+        'settings_behavior',
       ],
       'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
     },
diff --git a/chrome/browser/resources/print_preview/new/copies_settings.html b/chrome/browser/resources/print_preview/new/copies_settings.html
index f6d9374..f1168f6 100644
--- a/chrome/browser/resources/print_preview/new/copies_settings.html
+++ b/chrome/browser/resources/print_preview/new/copies_settings.html
@@ -13,12 +13,11 @@
         default-value="1" input-label="$i18n{copiesLabel}"
         input-string="{{inputString_}}" input-valid="{{inputValid_}}"
         hint-message="$i18n{copiesInstruction}">
-      <div slot="opt-inside-content" class="collate-container checkbox"
-          aria-live="polite"
+      <div slot="opt-inside-content" class="checkbox" aria-live="polite"
           hidden$="[[collateHidden_(inputString_, inputValid_)]]">
         <label>
-          <input class="collate" type="checkbox" checked
-                 aria-labelledby="copies-collate-label">
+          <input id="collate" type="checkbox" on-change="onCollateChange_"
+              aria-labelledby="copies-collate-label">
           <span id="copies-collate-label">$i18n{optionCollate}</span>
         </label>
       </div>
diff --git a/chrome/browser/resources/print_preview/new/copies_settings.js b/chrome/browser/resources/print_preview/new/copies_settings.js
index b58408ff..826c5de2 100644
--- a/chrome/browser/resources/print_preview/new/copies_settings.js
+++ b/chrome/browser/resources/print_preview/new/copies_settings.js
@@ -20,7 +20,7 @@
 
   observers: [
     'onInputChanged_(inputString_, inputValid_)',
-    'onInitialized_(settings.copies.value)'
+    'onInitialized_(settings.copies.value, settings.collate.value)'
   ],
 
   /**
@@ -32,7 +32,9 @@
       return;
     this.isInitialized_ = true;
     const copies = this.getSetting('copies');
-    this.set('inputString_', copies.value);
+    this.inputString_ = /** @type {string} */ (copies.value.toString());
+    const collate = this.getSetting('collate');
+    this.$.collate.checked = /** @type {boolean} */ (collate.value);
   },
 
   /**
@@ -53,4 +55,9 @@
   collateHidden_: function() {
     return !this.inputValid_ || parseInt(this.inputString_, 10) == 1;
   },
+
+  /** @private */
+  onCollateChange_: function() {
+    this.setSetting('collate', this.$.collate.checked);
+  },
 });
diff --git a/chrome/browser/resources/print_preview/new/layout_settings.html b/chrome/browser/resources/print_preview/new/layout_settings.html
index d283f42..afbc18b 100644
--- a/chrome/browser/resources/print_preview/new/layout_settings.html
+++ b/chrome/browser/resources/print_preview/new/layout_settings.html
@@ -2,6 +2,7 @@
 
 <link rel="import" href="print_preview_shared_css.html">
 <link rel="import" href="select_css.html">
+<link rel="import" href="settings_behavior.html">
 <link rel="import" href="settings_section.html">
 
 <dom-module id="print-preview-layout-settings">
@@ -10,7 +11,7 @@
     <print-preview-settings-section>
       <span id="layout-label" slot="title">$i18n{layoutLabel}</span>
       <div slot="controls">
-        <select aria-labelledby="layout-label">
+        <select aria-labelledby="layout-label" on-change="onChange_">
           <option value="portrait" selected>$i18n{optionPortrait}</option>
           <option value="landscape">$i18n{optionLandscape}</option>
         </select>
diff --git a/chrome/browser/resources/print_preview/new/layout_settings.js b/chrome/browser/resources/print_preview/new/layout_settings.js
index 21bac56..77d4319 100644
--- a/chrome/browser/resources/print_preview/new/layout_settings.js
+++ b/chrome/browser/resources/print_preview/new/layout_settings.js
@@ -4,4 +4,22 @@
 
 Polymer({
   is: 'print-preview-layout-settings',
+
+  behaviors: [SettingsBehavior],
+
+  observers: ['onLayoutSettingChange_(settings.layout.value)'],
+
+  /**
+   * @param {*} value The new value of the layout setting.
+   * @private
+   */
+  onLayoutSettingChange_: function(value) {
+    this.$$('select').value =
+        /** @type {boolean} */ (value) ? 'landscape' : 'portrait';
+  },
+
+  /** @private */
+  onChange_: function() {
+    this.setSetting('layout', this.$$('select').value == 'landscape');
+  },
 });
diff --git a/chrome/browser/resources/print_preview/new/model.js b/chrome/browser/resources/print_preview/new/model.js
index 5bd8ec7..43cad0e 100644
--- a/chrome/browser/resources/print_preview/new/model.js
+++ b/chrome/browser/resources/print_preview/new/model.js
@@ -177,18 +177,6 @@
        'documentInfo.hasSelection)'],
 
   /**
-   * @private {!Array<string>} List of capability types considered color.
-   * @const
-   */
-  COLOR_TYPES_: ['STANDARD_COLOR', 'CUSTOM_COLOR'],
-
-  /**
-   * @private {!Array<string>} List of capability types considered monochrome.
-   * @const
-   */
-  MONOCHROME_TYPES_: ['STANDARD_MONOCHROME', 'CUSTOM_MONOCHROME'],
-
-  /**
    * Updates the availability of the settings sections.
    * @private
    */
@@ -205,7 +193,7 @@
     this.set('settings.copies.available', !!caps && !!(caps.copies));
     this.set('settings.collate.available', !!caps && !!(caps.collate));
     this.set('settings.layout.available', this.isLayoutAvailable_(caps));
-    this.set('settings.color.available', this.isColorAvailable_(caps));
+    this.set('settings.color.available', this.destination.hasColorCapability);
     this.set('settings.margins.available', this.documentInfo.isModifiable);
     this.set(
         'settings.mediaSize.available',
@@ -253,19 +241,4 @@
     });
     return hasLandscapeOption && hasAutoOrPortraitOption;
   },
-
-  /** @param {?print_preview.CddCapabilities} caps The printer capabilities. */
-  isColorAvailable_: function(caps) {
-    if (!caps || !caps.color || !caps.color.option)
-      return false;
-    let hasColor = false;
-    let hasMonochrome = false;
-    caps.color.option.forEach(option => {
-      const type = assert(option.type);
-      hasColor = hasColor || this.COLOR_TYPES_.includes(option.type);
-      hasMonochrome =
-          hasMonochrome || this.MONOCHROME_TYPES_.includes(option.type);
-    });
-    return hasColor && hasMonochrome;
-  },
 });
diff --git a/chrome/browser/resources/print_preview/preview_generator.js b/chrome/browser/resources/print_preview/preview_generator.js
index c0ff0a1..4cfb3d90 100644
--- a/chrome/browser/resources/print_preview/preview_generator.js
+++ b/chrome/browser/resources/print_preview/preview_generator.js
@@ -210,8 +210,8 @@
         pageRange: printTicketStore.pageRange.getDocumentPageRanges(),
         mediaSize: printTicketStore.mediaSize.getValue(),
         landscape: printTicketStore.landscape.getValue(),
-        color: PreviewGenerator.getNativeColorModel(
-            destination, printTicketStore.color),
+        color:
+            destination.getNativeColorModel(printTicketStore.color.getValue()),
         headerFooterEnabled: printTicketStore.headerFooter.getValue(),
         marginsType: printTicketStore.marginsType.getValue(),
         isFirstRequest: this.inFlightRequestId_ == 0,
@@ -484,28 +484,6 @@
   };
 
   /**
-   * Enumeration of color modes used by Chromium.
-   * @enum {number}
-   */
-  PreviewGenerator.ColorMode = {GRAY: 1, COLOR: 2};
-
-  /**
-   * @param {!print_preview.Destination} destination Destination to print to.
-   * @param {!print_preview.ticket_items.Color} color Color ticket item.
-   * @return {number} Native color model.
-   */
-  PreviewGenerator.getNativeColorModel = function(destination, color) {
-    // For non-local printers native color model is ignored anyway.
-    const option = destination.isLocal ? color.getSelectedOption() : null;
-    const nativeColorModel = parseInt(option ? option.vendor_id : null, 10);
-    if (isNaN(nativeColorModel)) {
-      return color.getValue() ? PreviewGenerator.ColorMode.COLOR :
-                                PreviewGenerator.ColorMode.GRAY;
-    }
-    return nativeColorModel;
-  };
-
-  /**
    * Constant values matching printing::DuplexMode enum.
    * @enum {number}
    */
diff --git a/chrome/browser/resources/print_preview/previewarea/preview_area.js b/chrome/browser/resources/print_preview/previewarea/preview_area.js
index cde64b4..09456592 100644
--- a/chrome/browser/resources/print_preview/previewarea/preview_area.js
+++ b/chrome/browser/resources/print_preview/previewarea/preview_area.js
@@ -361,6 +361,7 @@
 
     /** @override */
     exitDocument: function() {
+      this.cancelTimeout();
       print_preview.Component.prototype.exitDocument.call(this);
       this.overlayEl_ = null;
       this.openSystemDialogButton_ = null;
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index f7c0695d..eb534d9 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -603,8 +603,8 @@
         mediaSize: printTicketStore.mediaSize.getValue(),
         pageCount: printTicketStore.pageRange.getPageNumberSet().size,
         landscape: printTicketStore.landscape.getValue(),
-        color: print_preview.PreviewGenerator.getNativeColorModel(
-            destination, printTicketStore.color),
+        color:
+            destination.getNativeColorModel(printTicketStore.color.getValue()),
         headerFooterEnabled: false,  // Only used in print preview
         marginsType: printTicketStore.marginsType.getValue(),
         duplex: printTicketStore.duplex.getValue() ?
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html
index cb2bfd5..09abbf0 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.html
@@ -14,6 +14,7 @@
 <link rel="import" href="../controls/settings_toggle_button.html">
 <link rel="import" href="../settings_shared_css.html">
 <link rel="import" href="chrome_cleanup_proxy.html">
+<link rel="import" href="items_to_remove_list.html">
 
 <dom-module id="settings-chrome-cleanup-page">
   <template>
@@ -22,20 +23,6 @@
         height: 20px;
         width: 20px;
       }
-
-      #files-to-remove-container {
-        padding: 0 var(--settings-box-row-padding);
-        /* Use the full available width for file paths to avoid inconsistent
-         *  line breaks when zooming in or out */
-        width: calc(var(--settings-card-max-width) -
-            2 * var(--settings-box-row-padding));
-      }
-
-      #files-to-remove-list {
-        margin: 0;
-        word-break: break-all;
-      }
-
       #learn-more {
         -webkit-margin-start: 0;
       }
@@ -101,7 +88,8 @@
         <div hidden="[[!showExplanation_]]">
           <span class="secondary">[[explanation_]]</span>
           <a id="learn-more" href="$i18n{chromeCleanupLearnMoreUrl}"
-              on-tap="learnMore_" target="_blank" hidden="[[!showLearnMore_]]">
+              on-tap="learnMore_" target="_blank"
+              hidden="[[!showLearnMore_]]">
             $i18n{learnMore}
           </a>
         </div>
@@ -123,22 +111,33 @@
              userInitiatedCleanupsEnabled_)]]"
         on-settings-boolean-control-change="changeLogsPermission_">
     </settings-toggle-button>
-    <div id="show-files-button" class="settings-box" actionable
+    <div id="show-items-button" class="settings-box" actionable
         on-tap="toggleExpandButton_" hidden="[[!showItemsToRemove_]]">
-      <div class="start">
-        $i18n{chromeCleanupLinkShowFiles}
-      </div>
-      <cr-expand-button expanded="{{filesToRemoveListExpanded_}}"
-          alt="$i18n{chromeCleanupLinkShowFiles}">
+      <div class="start">[[showItemsLinkLabel_]]</div>
+      <cr-expand-button expanded="{{itemsToRemoveSectionExpanded_}}"
+          alt="[[showItemsLinkLabel_]]">
       </cr-expand-button>
     </div>
-    <iron-collapse opened="[[filesToRemoveListExpanded_]]">
-      <div id="files-to-remove-container">
-        <ul id="files-to-remove-list" class="secondary">
-          <template is="dom-repeat" items="[[filesToRemove_]]" as="fileName">
-            <li>[[fileName]]</li>
-          </template>
-        </ul>
+    <iron-collapse id="iron-collapse-items"
+        opened="[[itemsToRemoveSectionExpanded_]]">
+      <items-to-remove-list
+          id="files-to-remove-list"
+          hidden="[[!hasFilesToShow_]]"
+          title-visible="[[userInitiatedCleanupsEnabled_]]"
+          title="$i18n{chromeCleanupDetailsFilesAndPrograms}"
+          initially-expanded="[[!userInitiatedCleanupsEnabled_]]"
+          items-to-show="[[scannerResults_.files]]">
+      </items-to-remove-list>
+      <items-to-remove-list
+          id="registry-keys-list"
+          hidden="[[!hasRegistryKeysToShow_]]"
+          title="$i18n{chromeCleanupDetailsRegistryEntries}"
+          items-to-show="[[scannerResults_.registryKeys]]">
+      </items-to-remove-list>
+      <div class="settings-box continuation">
+        <div class="secondary">
+          $i18nRaw{chromeCleanupDetailsExplanation}
+        </div>
       </div>
       <div id="powered-by-settings-box" class="settings-box continuation">
         <div id="powered-by-container" class="secondary"
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
index 82a4851..09f5631 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_page.js
@@ -99,6 +99,14 @@
 settings.ChromeCleanupCardComponents;
 
 /**
+ * @typedef {{
+ *   files: Array<string>,
+ *   registryKeys: Array<string>,
+ * }}
+ */
+settings.ChromeCleanerScannerResults;
+
+/**
  * @fileoverview
  * 'settings-chrome-cleanup-page' is the settings page containing Chrome
  * Cleanup settings.
@@ -117,6 +125,12 @@
 
   properties: {
     /** @private */
+    userInitiatedCleanupsEnabled_: {
+      type: Boolean,
+      value: false,
+    },
+
+    /** @private */
     title_: {
       type: String,
       value: '',
@@ -175,16 +189,43 @@
     },
 
     /** @private */
-    filesToRemoveListExpanded_: {
+    itemsToRemoveSectionExpanded_: {
       type: Boolean,
       value: false,
-      observer: 'filesToRemoveListExpandedChanged_',
+      observer: 'itemsToRemoveSectionExpandedChanged_',
     },
 
     /** @private */
-    filesToRemove_: {
+    showItemsLinkLabel_: {
+      type: String,
+      value: '',
+    },
+
+    /** @private */
+    showingAllFiles_: {
+      type: Boolean,
+      value: false,
+    },
+
+    /** @private {!settings.ChromeCleanerScannerResults} */
+    scannerResults_: {
       type: Array,
-      value: [],
+      value: function() {
+        return {'files': [], 'registryKeys': []};
+      },
+    },
+
+    /** @private */
+    hasFilesToShow_: {
+      type: Boolean,
+      computed: 'computeHasFilesToShow_(scannerResults_)',
+    },
+
+    /** @private */
+    hasRegistryKeysToShow_: {
+      type: Boolean,
+      computed: 'computeHasRegistryKeysToShow_(' +
+          'userInitiatedCleanupsEnabled_, scannerResults_)',
     },
 
     /** @private */
@@ -217,6 +258,9 @@
     },
   },
 
+  /** @private {!settings.ChromeCleanerScannerResults} */
+  emptyChromeCleanerScannerResults_: {'files': [], 'registryKeys': []},
+
   /** @private {?settings.ChromeCleanupProxy} */
   browserProxy_: null,
 
@@ -230,9 +274,6 @@
   /** @private {settings.ChromeCleanupOngoingAction} */
   ongoingAction_: settings.ChromeCleanupOngoingAction.NONE,
 
-  /** @private {boolean} */
-  userInitiatedCleanupsEnabled_: false,
-
   /**
    * If true, the scan offered view is rendered on state idle, regardless of
    * the idle reason received from the cleaner controller. The goal is to
@@ -312,16 +353,16 @@
   },
 
   /**
-   * Notify Chrome that the details section was opened or closed.
+   * Notifies Chrome that the details section was opened or closed.
    * @private
    */
-  filesToRemoveListExpandedChanged_: function() {
-    if (this.browserProxy_)
-      this.browserProxy_.notifyShowDetails(this.filesToRemoveListExpanded_);
+  itemsToRemoveSectionExpandedChanged_: function(newVal, oldVal) {
+    if (!oldVal && newVal)
+      this.browserProxy_.notifyShowDetails(this.itemsToRemoveSectionExpanded_);
   },
 
   /**
-   * Notfies Chrome that the "learn more" link was clicked.
+   * Notifies Chrome that the "learn more" link was clicked.
    * @private
    */
   learnMore_: function() {
@@ -333,7 +374,7 @@
    * @private
    */
   showPoweredBy_: function() {
-    return this.filesToRemoveListExpanded_ && this.isPartnerPowered_;
+    return this.itemsToRemoveSectionExpanded_ && this.isPartnerPowered_;
   },
 
   /**
@@ -346,12 +387,37 @@
   },
 
   /**
+   * Returns true if there are files to show to the user.
+   * @param {!settings.ChromeCleanerScannerResults} scannerResults The cleanup
+   *     items to be presented to the user.
+   * @return {boolean}
+   * @private
+   */
+  computeHasFilesToShow_(scannerResults) {
+    return scannerResults.files.length > 0;
+  },
+
+  /**
+   * Returns true if user-initiated cleanups are enabled and there are registry
+   * keys to show to the user.
+   * @param {!settings.ChromeCleanerScannerResults} scannerResults The cleanup
+   *     items to be presented to the user.
+   * @return {boolean}
+   * @private
+   */
+  computeHasRegistryKeysToShow_(userInitiatedCleanupsEnabled, scannerResults) {
+    return userInitiatedCleanupsEnabled &&
+        scannerResults.registryKeys.length > 0;
+  },
+
+  /**
    * Listener of event 'chrome-cleanup-on-idle'.
    * @param {string} idleReason
    * @private
    */
   onIdle_: function(idleReason) {
     this.ongoingAction_ = settings.ChromeCleanupOngoingAction.NONE;
+    this.scannerResults_ = this.emptyChromeCleanerScannerResults_;
 
     // If user-initiated cleanups are disabled, then the card will be shown at
     // the top of the settings page.
@@ -433,6 +499,7 @@
    */
   onScanning_: function() {
     this.ongoingAction_ = settings.ChromeCleanupOngoingAction.SCANNING;
+    this.scannerResults_ = this.emptyChromeCleanerScannerResults_;
     this.renderScanOfferedByDefault_ = false;
     this.renderCleanupCard_(
         this.userInitiatedCleanupsEnabled_ ?
@@ -443,27 +510,32 @@
   /**
    * Listener of event 'chrome-cleanup-on-infected'.
    * Offers a cleanup to the user and enables presenting files to be removed.
-   * @param {!Array<string>} files The list of files to present to the user.
+   * @param {!settings.ChromeCleanerScannerResults} scannerResults The cleanup
+   *     items to be presented to the user.
    * @private
    */
-  onInfected_: function(files) {
+  onInfected_: function(scannerResults) {
     this.ongoingAction_ = settings.ChromeCleanupOngoingAction.NONE;
     this.renderScanOfferedByDefault_ = false;
-    this.renderCleanupCard_(
-        settings.ChromeCleanerCardState.CLEANUP_OFFERED, files);
+    this.scannerResults_ = scannerResults;
+    this.updateShowItemsLinklabel_();
+    this.renderCleanupCard_(settings.ChromeCleanerCardState.CLEANUP_OFFERED);
   },
 
   /**
    * Listener of event 'chrome-cleanup-on-cleaning'.
    * Shows a spinner indicating that an on-going action and enables presenting
    * files to be removed.
-   * @param {!Array<string>} files The list of files to present to the user.
+   * @param {!settings.ChromeCleanerScannerResults} scannerResults The cleanup
+   *     items to be presented to the user.
    * @private
    */
-  onCleaning_: function(files) {
+  onCleaning_: function(scannerResults) {
     this.ongoingAction_ = settings.ChromeCleanupOngoingAction.CLEANING;
     this.renderScanOfferedByDefault_ = false;
-    this.renderCleanupCard_(settings.ChromeCleanerCardState.CLEANING, files);
+    this.scannerResults_ = scannerResults;
+    this.updateShowItemsLinklabel_();
+    this.renderCleanupCard_(settings.ChromeCleanerCardState.CLEANING);
   },
 
   /**
@@ -474,6 +546,7 @@
    */
   onRebootRequired_: function() {
     this.ongoingAction_ = settings.ChromeCleanupOngoingAction.NONE;
+    this.scannerResults_ = this.emptyChromeCleanerScannerResults_;
     this.renderScanOfferedByDefault_ = false;
     this.renderCleanupCard_(settings.ChromeCleanerCardState.REBOOT_REQUIRED);
   },
@@ -482,14 +555,12 @@
    * Renders the cleanup card given the state and list of files.
    * @param {!settings.ChromeCleanerCardState} state The card state to be
    *     rendered.
-   * @param {Array<string>=} opt_files The list of files to present to the user.
    * @private
    */
-  renderCleanupCard_: function(state, opt_files) {
+  renderCleanupCard_: function(state) {
     var components = this.cardStateToComponentsMap_.get(state);
     assert(components);
 
-    this.filesToRemove_ = opt_files || [];
     this.title_ = components.title || '';
     this.explanation_ = components.explanation || '';
     this.updateIcon_(components.icon);
@@ -550,8 +621,8 @@
 
     // Files to remove list should only be expandable if details are being
     // shown, otherwise it will add extra padding at the bottom of the card.
-    if (!this.showExplanation_)
-      this.filesToRemoveListExpanded_ = false;
+    if (!this.showExplanation_ || !this.showItemsToRemove_)
+      this.itemsToRemoveSectionExpanded_ = false;
   },
 
   /**
@@ -627,6 +698,25 @@
   },
 
   /**
+   * Updates the label for the collapsed detailed view. If user-initiated
+   * cleanups are enabled, the string is obtained from the browser proxy, since
+   * it may require a plural version. Otherwise, use the default value for
+   * |chromeCleanupLinkShowItems|.
+   */
+  updateShowItemsLinklabel_: function() {
+    var setShowItemsLabel = text => this.showItemsLinkLabel_ = text;
+    if (this.userInitiatedCleanupsEnabled_) {
+      this.browserProxy_
+          .getItemsToRemovePluralString(
+              this.scannerResults_.files.length +
+              this.scannerResults_.registryKeys.length)
+          .then(setShowItemsLabel);
+    } else {
+      setShowItemsLabel(this.i18n('chromeCleanupLinkShowItems'));
+    }
+  },
+
+  /**
    * Returns the map of card states to components to be rendered.
    * @return {!Map<settings.ChromeCleanerCardState,
    *               !settings.ChromeCleanupCardComponents>}
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
index 76b3158..c92b662 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
@@ -50,6 +50,22 @@
      * Notifies Chrome that the "learn more" link was clicked.
      */
     notifyLearnMoreClicked() {}
+
+    /**
+     * Requests the plural string for the "show more" link in the detailed
+     * view for either files to delete or registry keys.
+     * @param {number} numHiddenItems
+     * @return {!Promise<string>}
+     */
+    getMoreItemsPluralString(numHiddenItems) {}
+
+    /**
+     * Requests the plural string for the "items to remove" link in the detailed
+     * view.
+     * @param {number} numItems
+     * @return {!Promise<string>}
+     */
+    getItemsToRemovePluralString(numItems) {}
   }
 
   /**
@@ -95,6 +111,16 @@
     notifyLearnMoreClicked() {
       chrome.send('notifyChromeCleanupLearnMoreClicked');
     }
+
+    /** @override */
+    getMoreItemsPluralString(numHiddenItems) {
+      return cr.sendWithPromise('getMoreItemsPluralString', numHiddenItems);
+    }
+
+    /** @override */
+    getItemsToRemovePluralString(numItems) {
+      return cr.sendWithPromise('getItemsToRemovePluralString', numItems);
+    }
   }
 
   cr.addSingletonGetter(ChromeCleanupProxyImpl);
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/compiled_resources2.gyp b/chrome/browser/resources/settings/chrome_cleanup_page/compiled_resources2.gyp
index 34c9d87..b9927717 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/compiled_resources2.gyp
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/compiled_resources2.gyp
@@ -25,5 +25,13 @@
       ],
       'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
     },
+    {
+      'target_name': 'items_to_remove_list',
+      'dependencies': [
+        '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
+        'chrome_cleanup_proxy',
+      ],
+      'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
+    },
   ],
 }
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.html b/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.html
new file mode 100644
index 0000000..6f8b7eb
--- /dev/null
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.html
@@ -0,0 +1,37 @@
+<link rel="import" href="chrome://resources/html/polymer.html">
+
+<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
+<link rel="import" href="chrome://resources/html/util.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
+<link rel="import" href="../settings_shared_css.html">
+<link rel="import" href="chrome_cleanup_proxy.html">
+
+<dom-module id="items-to-remove-list">
+  <template>
+    <style include="settings-shared">
+      :host {
+        display: block;
+        margin: 0;
+        padding: 0 var(--settings-box-row-padding);
+        word-break: break-all;
+      }
+
+      #more-items-link {
+        color: var(--google-blue-500);
+        cursor: pointer;
+      }
+    </style>
+    <div id="title" class="secondary" hidden="[[!titleVisible]]">
+      [[title]]
+    </div>
+    <ul id="list" class="secondary">
+      <template is="dom-repeat" items="[[visibleItems_]]">
+        <li class="visible-item">[[item]]</li>
+      </template>
+      <li id="more-items-link" hidden="[[expanded_]]" on-tap="expandList_">
+        [[moreItemsLinkText_]]
+      </li>
+    </ul>
+  </template>
+  <script src="items_to_remove_list.js"></script>
+</dom-module>
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.js b/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.js
new file mode 100644
index 0000000..e628437c5
--- /dev/null
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/items_to_remove_list.js
@@ -0,0 +1,142 @@
+// 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.
+
+cr.exportPath('settings');
+
+/**
+ * The default number of items to show for files and registry keys on the
+ * detailed view when user-initiated cleanups are enabled.
+ */
+settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW = 4;
+
+/**
+ * @fileoverview
+ * 'items-to-remove-list' represents a list of items to
+ * be removed or changed to be shown on the Chrome Cleanup page.
+ * TODO(crbug.com/776538): Update the strings to say that some items are only
+ *                         changed and not removed.
+ *
+ * Examples:
+ *
+ *    <!-- Items list initially expanded. -->
+ *    <items-to-remove-list
+ *        title="Files and programs:"
+ *        initially-expanded="true"
+ *        items-to-show="[[filesToShow]]">
+ *    </items-to-remove-list>
+ *
+ *    <!-- Items list initially shows |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW|
+ *         items. If there are more than |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW|
+ *         items on the list, then a "show more" link is shown; tapping on it
+ *         expands the list. -->
+ *    <items-to-remove-list
+ *        title="Files and programs:"
+ *        items-to-show="[[filesToShow]]">
+ *    </items-to-remove-list>
+ */
+Polymer({
+  is: 'items-to-remove-list',
+
+  properties: {
+    titleVisible: {
+      type: Boolean,
+      value: true,
+    },
+
+    title: {
+      type: String,
+      value: '',
+    },
+
+    /** @type {!Array<string>} */
+    itemsToShow: Array,
+
+    /**
+     * If true, all items from |itemsToShow| will be presented on the card
+     * by default, and the "show more" link will be omitted.
+     */
+    initiallyExpanded: {
+      type: Boolean,
+      value: false,
+    },
+
+    /**
+     * If true, all items from |itemsToShow| will be presented on the card,
+     * and the "show more" link will be omitted.
+     */
+    expanded_: {
+      type: Boolean,
+      value: false,
+    },
+
+    /**
+     * The list of items to actually present on the card. If |expanded_|, then
+     * it's the same as |itemsToShow|.
+     * @private {?Array<string>}
+     */
+    visibleItems_: Array,
+
+    /**
+     * The text for the "show more" link available if not all files are visible
+     * in the card.
+     * @private
+     */
+    moreItemsLinkText_: {
+      type: String,
+      value: '',
+    },
+  },
+
+  observers: ['updateVisibleState_(itemsToShow, initiallyExpanded)'],
+
+  /** @private */
+  expandList_: function() {
+    this.expanded_ = true;
+    this.visibleItems_ = this.itemsToShow;
+    this.moreItemsLinkText_ = '';
+  },
+
+  /**
+   * Decides which elements will be visible in the card and if the "show more"
+   * link will be rendered.
+   *
+   * Cases handled:
+   *  1. If |initiallyExpanded|, then all items will be visible.
+   *  2. Otherwise:
+   *     (A) If size(itemsToShow) < CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW, then
+   *         all items will be visible.
+   *     (B) Otherwise, exactly |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1| will
+   *         be visible and the "show more" link will be rendered. The list
+   *         presented to the user will contain exactly
+   *         |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| elements, and the last one
+   *         will be the "show more" link.
+   *
+   * @param {!Array<string>} itemsToShow
+   * @param {boolean} initiallyExpanded
+   */
+  updateVisibleState_: function(itemsToShow, initiallyExpanded) {
+    // Start expanded if there are less than
+    // |settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| items to show.
+    this.expanded_ = this.initiallyExpanded ||
+        this.itemsToShow.length <=
+            settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW;
+
+    if (this.expanded_) {
+      this.visibleItems_ = this.itemsToShow;
+      this.moreItemsLinkText_ = '';
+      return;
+    }
+
+    this.visibleItems_ = this.itemsToShow.slice(
+        0, settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1);
+
+    const browserProxy = settings.ChromeCleanupProxyImpl.getInstance();
+    browserProxy
+        .getMoreItemsPluralString(
+            this.itemsToShow.length - this.visibleItems_.length)
+        .then(linkText => {
+          this.moreItemsLinkText_ = linkText;
+        });
+  },
+});
diff --git a/chrome/browser/resources/settings/internet_page/network_proxy_section.html b/chrome/browser/resources/settings/internet_page/network_proxy_section.html
index f5d88e8..4d4ee9d 100644
--- a/chrome/browser/resources/settings/internet_page/network_proxy_section.html
+++ b/chrome/browser/resources/settings/internet_page/network_proxy_section.html
@@ -20,7 +20,8 @@
 
 <dom-module id="network-proxy-section">
   <template>
-    <style include="internet-shared cr-hidden-style iron-flex iron-flex-alignment">
+    <style include="internet-shared cr-hidden-style iron-flex
+       iron-flex-alignment">
       cr-policy-network-indicator {
         -webkit-margin-end: 10px;
       }
diff --git a/chrome/browser/resources/settings/people_page/people_page.html b/chrome/browser/resources/settings/people_page/people_page.html
index cec6369..4ab0dfc 100644
--- a/chrome/browser/resources/settings/people_page/people_page.html
+++ b/chrome/browser/resources/settings/people_page/people_page.html
@@ -274,7 +274,11 @@
         <settings-subpage
             associated-control="[[$$('#manage-other-people-subpage-trigger')]]"
             page-title="$i18n{manageOtherPeople}">
-          <settings-users-page prefs="{{prefs}}"></settings-users-page>
+          <settings-users-page
+              prefs="{{prefs}}"
+              profile-manages-supervised-users=
+                  "[[profileManagesSupervisedUsers_]]">
+          </settings-users-page>
         </settings-subpage>
       </template>
       <template is="dom-if" route-path="/changePicture">
diff --git a/chrome/browser/resources/settings/people_page/users_page.html b/chrome/browser/resources/settings/people_page/users_page.html
index a2fea7f..ac720c86 100644
--- a/chrome/browser/resources/settings/people_page/users_page.html
+++ b/chrome/browser/resources/settings/people_page/users_page.html
@@ -39,11 +39,13 @@
         label="$i18n{guestBrowsingLabel}"
         disabled="[[isEditingDisabled_(isOwner_, isWhitelistManaged_)]]">
     </settings-toggle-button>
-    <settings-toggle-button class="continuation"
-        pref="{{prefs.cros.accounts.supervisedUsersEnabled}}"
-        label="$i18n{supervisedUsersLabel}"
-        disabled="[[isEditingDisabled_(isOwner_, isWhitelistManaged_)]]">
-    </settings-toggle-button>
+    <template is="dom-if" if="[[profileManagesSupervisedUsers]]">
+      <settings-toggle-button class="continuation"
+          pref="{{prefs.cros.accounts.supervisedUsersEnabled}}"
+          label="$i18n{supervisedUsersLabel}"
+          disabled="[[isEditingDisabled_(isOwner_, isWhitelistManaged_)]]">
+      </settings-toggle-button>
+    </template>
     <settings-toggle-button class="continuation"
         pref="{{prefs.cros.accounts.showUserNamesOnSignIn}}"
         label="$i18n{showOnSigninLabel}"
diff --git a/chrome/browser/resources/settings/people_page/users_page.js b/chrome/browser/resources/settings/people_page/users_page.js
index 2d14833a0..762fb67 100644
--- a/chrome/browser/resources/settings/people_page/users_page.js
+++ b/chrome/browser/resources/settings/people_page/users_page.js
@@ -19,6 +19,15 @@
       notify: true,
     },
 
+    /**
+     * True if the current profile manages supervised users.
+     * Set in people-page.
+     */
+    profileManagesSupervisedUsers: {
+      type: Boolean,
+      value: false,
+    },
+
     /** @private */
     isOwner_: {
       type: Boolean,
diff --git a/chrome/browser/resources/settings/settings_resources.grd b/chrome/browser/resources/settings/settings_resources.grd
index f5cc696..2a5b9f2 100644
--- a/chrome/browser/resources/settings/settings_resources.grd
+++ b/chrome/browser/resources/settings/settings_resources.grd
@@ -318,6 +318,12 @@
                    file="chrome_cleanup_page/chrome_cleanup_page.js"
                    type="chrome_html"
                    preprocess="true" />
+        <structure name="IDR_SETTINGS_CHROME_CLEANUP_ITEMS_TO_REMOVE_LIST_HTML"
+                   file="chrome_cleanup_page/items_to_remove_list.html"
+                   type="chrome_html"/>
+        <structure name="IDR_SETTINGS_CHROME_CLEANUP_ITEMS_TO_REMOVE_LIST_JS"
+                   file="chrome_cleanup_page/items_to_remove_list.js"
+                   type="chrome_html"/>
       </if>
       <structure name="IDR_SETTINGS_CLEAR_BROWSING_DATA_BROWSER_PROXY_HTML"
                  file="clear_browsing_data_dialog/clear_browsing_data_browser_proxy.html"
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html
index 36f4372..024f5f2e2 100644
--- a/chrome/browser/resources/settings/settings_shared_css.html
+++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -11,7 +11,8 @@
 <!-- Common styles for Material Design settings. -->
 <dom-module id="settings-shared">
   <template>
-    <style include="settings-icons paper-button-style paper-checkbox-style paper-input-style paper-toggle-style cr-shared-style">
+    <style include="settings-icons paper-button-style paper-checkbox-style
+        paper-input-style paper-toggle-style cr-shared-style">
       /* Prevent action-links from being selected to avoid accidental
        * selection when trying to click it. */
       a[is=action-link] {
diff --git a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection.cc b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection.cc
index 6471ded..33733c1 100644
--- a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection.cc
@@ -34,7 +34,7 @@
     ClientIncidentReport_ExtensionData_ExtensionInfo* extension_info) {
   std::string extension_id = extension.id();
   extension_info->set_id(extension_id);
-  extension_info->set_version(extension.version()->GetString());
+  extension_info->set_version(extension.version().GetString());
   extension_info->set_name(extension.name());
   extension_info->set_description(extension.description());
 
diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc
index 24946e0..9d32ddd 100644
--- a/chrome/browser/sessions/better_session_restore_browsertest.cc
+++ b/chrome/browser/sessions/better_session_restore_browsertest.cc
@@ -614,7 +614,12 @@
 }
 
 // Check that form data is restored after wrench menu quit.
-IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PostCloseAllBrowsers) {
+#if defined(OS_LINUX)
+#define MAYBE_PostCloseAllBrowsers DISABLED_PostCloseAllBrowsers
+#else
+#define MAYBE_PostCloseAllBrowsers PostCloseAllBrowsers
+#endif
+IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, MAYBE_PostCloseAllBrowsers) {
   PostFormWithPage("post.html", false);
   Browser* new_browser = QuitBrowserAndRestore(browser(), true);
   CheckFormRestored(new_browser, true, false);
diff --git a/chrome/browser/signin/identity_manager_factory.cc b/chrome/browser/signin/identity_manager_factory.cc
index 9f6ce996..67a5e385 100644
--- a/chrome/browser/signin/identity_manager_factory.cc
+++ b/chrome/browser/signin/identity_manager_factory.cc
@@ -6,6 +6,7 @@
 
 #include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 #include "components/keyed_service/core/keyed_service.h"
@@ -19,7 +20,9 @@
 class IdentityManagerHolder : public KeyedService {
  public:
   explicit IdentityManagerHolder(Profile* profile)
-      : identity_manager_(SigninManagerFactory::GetForProfile(profile)) {}
+      : identity_manager_(
+            SigninManagerFactory::GetForProfile(profile),
+            ProfileOAuth2TokenServiceFactory::GetForProfile(profile)) {}
 
   identity::IdentityManager* identity_manager() { return &identity_manager_; }
 
@@ -31,6 +34,7 @@
     : BrowserContextKeyedServiceFactory(
           "IdentityManager",
           BrowserContextDependencyManager::GetInstance()) {
+  DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
   DependsOn(SigninManagerFactory::GetInstance());
 }
 
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index 99e0e63..f02ff11 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -61,7 +61,7 @@
 
   // Instantiates Metrics object for spellchecking for use.
   spellcheck->StartRecordingMetrics(
-      prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck));
+      prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable));
 
   return spellcheck;
 }
@@ -84,8 +84,8 @@
 #else
   uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
 #endif
-  user_prefs->RegisterBooleanPref(
-      spellcheck::prefs::kEnableSpellcheck, true, flags);
+  user_prefs->RegisterBooleanPref(spellcheck::prefs::kSpellCheckEnable, true,
+                                  flags);
 }
 
 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
diff --git a/chrome/browser/spellchecker/spellcheck_language_policy_handler.cc b/chrome/browser/spellchecker/spellcheck_language_policy_handler.cc
index 7c82e9a..5e7d5d2 100644
--- a/chrome/browser/spellchecker/spellcheck_language_policy_handler.cc
+++ b/chrome/browser/spellchecker/spellcheck_language_policy_handler.cc
@@ -60,7 +60,7 @@
     }
   }
 
-  prefs->SetValue(spellcheck::prefs::kEnableSpellcheck,
+  prefs->SetValue(spellcheck::prefs::kSpellCheckEnable,
                   base::MakeUnique<base::Value>(true));
   prefs->SetValue(spellcheck::prefs::kSpellCheckForcedDictionaries,
                   std::move(forced_language_list));
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 17ed6382..2b139903 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -100,7 +100,7 @@
       base::BindRepeating(&SpellcheckService::OnAcceptLanguagesChanged,
                           base::Unretained(this)));
   pref_change_registrar_.Add(
-      spellcheck::prefs::kEnableSpellcheck,
+      spellcheck::prefs::kSpellCheckEnable,
       base::BindRepeating(&SpellcheckService::InitForAllRenderers,
                           base::Unretained(this)));
 
@@ -192,7 +192,7 @@
         hunspell_dictionary->GetLanguage()));
   }
 
-  bool enable = prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck) &&
+  bool enable = prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable) &&
                 !dictionaries.empty();
 
   std::vector<std::string> custom_words;
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index e11bdc1..48f7c91 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -65,8 +65,7 @@
   void InitSpellcheck(bool enable_spellcheck,
                       const std::string& single_dictionary,
                       const std::string& multiple_dictionaries) {
-    prefs_->SetBoolean(spellcheck::prefs::kEnableSpellcheck,
-                       enable_spellcheck);
+    prefs_->SetBoolean(spellcheck::prefs::kSpellCheckEnable, enable_spellcheck);
     prefs_->SetString(spellcheck::prefs::kSpellCheckDictionary,
                       single_dictionary);
     base::ListValue dictionaries_value;
@@ -88,8 +87,7 @@
   }
 
   void EnableSpellcheck(bool enable_spellcheck) {
-    prefs_->SetBoolean(spellcheck::prefs::kEnableSpellcheck,
-                       enable_spellcheck);
+    prefs_->SetBoolean(spellcheck::prefs::kSpellCheckEnable, enable_spellcheck);
   }
 
   void ChangeCustomDictionary() {
@@ -518,13 +516,12 @@
   base::ListValue dictionaries;
   dictionaries.AppendString("en-US");
   GetPrefs()->Set(spellcheck::prefs::kSpellCheckDictionaries, dictionaries);
-  GetPrefs()->SetBoolean(spellcheck::prefs::kEnableSpellcheck, false);
+  GetPrefs()->SetBoolean(spellcheck::prefs::kSpellCheckEnable, false);
 
   // Migrate the preferences.
   SpellcheckServiceFactory::GetForContext(GetContext());
 
-  EXPECT_FALSE(
-      GetPrefs()->GetBoolean(spellcheck::prefs::kEnableSpellcheck));
+  EXPECT_FALSE(GetPrefs()->GetBoolean(spellcheck::prefs::kSpellCheckEnable));
   EXPECT_EQ(1U, GetPrefs()
                     ->GetList(spellcheck::prefs::kSpellCheckDictionaries)
                     ->GetSize());
@@ -537,13 +534,12 @@
   dictionaries.AppendString("en-US");
   dictionaries.AppendString("fr");
   GetPrefs()->Set(spellcheck::prefs::kSpellCheckDictionaries, dictionaries);
-  GetPrefs()->SetBoolean(spellcheck::prefs::kEnableSpellcheck, true);
+  GetPrefs()->SetBoolean(spellcheck::prefs::kSpellCheckEnable, true);
 
   // Should not migrate any preferences.
   SpellcheckServiceFactory::GetForContext(GetContext());
 
-  EXPECT_TRUE(
-      GetPrefs()->GetBoolean(spellcheck::prefs::kEnableSpellcheck));
+  EXPECT_TRUE(GetPrefs()->GetBoolean(spellcheck::prefs::kSpellCheckEnable));
   EXPECT_EQ(2U, GetPrefs()
                     ->GetList(spellcheck::prefs::kSpellCheckDictionaries)
                     ->GetSize());
diff --git a/chrome/browser/spellchecker/spelling_service_client_unittest.cc b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
index e87056c..db94d67 100644
--- a/chrome/browser/spellchecker/spelling_service_client_unittest.cc
+++ b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
@@ -333,7 +333,7 @@
   };
 
   PrefService* pref = profile_.GetPrefs();
-  pref->SetBoolean(spellcheck::prefs::kEnableSpellcheck, true);
+  pref->SetBoolean(spellcheck::prefs::kSpellCheckEnable, true);
   pref->SetBoolean(spellcheck::prefs::kSpellCheckUseSpellingService, true);
 
   for (size_t i = 0; i < arraysize(kTests); ++i) {
@@ -368,12 +368,12 @@
   // When a user disables spellchecking or prevent using the Spelling service,
   // this function should return false both for suggestions and for spellcheck.
   PrefService* pref = profile_.GetPrefs();
-  pref->SetBoolean(spellcheck::prefs::kEnableSpellcheck, false);
+  pref->SetBoolean(spellcheck::prefs::kSpellCheckEnable, false);
   pref->SetBoolean(spellcheck::prefs::kSpellCheckUseSpellingService, false);
   EXPECT_FALSE(client_.IsAvailable(&profile_, kSuggest));
   EXPECT_FALSE(client_.IsAvailable(&profile_, kSpellcheck));
 
-  pref->SetBoolean(spellcheck::prefs::kEnableSpellcheck, true);
+  pref->SetBoolean(spellcheck::prefs::kSpellCheckEnable, true);
   pref->SetBoolean(spellcheck::prefs::kSpellCheckUseSpellingService, true);
 
   // For locales supported by the SpellCheck service, this function returns
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc
index 08a8a63..c37fbea0 100644
--- a/chrome/browser/ssl/ssl_browsertest.cc
+++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -100,10 +100,12 @@
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/restore_type.h"
 #include "content/public/browser/ssl_status.h"
+#include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/common/browser_side_navigation_policy.h"
@@ -6662,6 +6664,26 @@
   }
 }
 
+// Checks that SimpleURLLoader, which uses content/network/url_loader.cc, goes
+// through the new NetworkServiceClient interface to deliver cert error
+// notifications to the browser which then overrides the certificate error.
+IN_PROC_BROWSER_TEST_F(SSLUITestBase, SimpleURLLoaderCertError) {
+  WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
+  ASSERT_NO_FATAL_FAILURE(SetUpUnsafeContentsWithUserException(
+      "/ssl/page_with_unsafe_contents.html"));
+  CheckAuthenticationBrokenState(tab, CertError::NONE, AuthState::NONE);
+
+  content::StoragePartition* partition =
+      content::BrowserContext::GetDefaultStoragePartition(browser()->profile());
+
+  auto* frame = tab->GetMainFrame();
+  EXPECT_EQ(net::OK,
+            content::LoadBasicRequest(
+                partition->GetNetworkContext(),
+                https_server_mismatched_.GetURL("/anchor_download_test.png"),
+                frame->GetProcess()->GetID(), frame->GetRoutingID()));
+}
+
 // TODO(jcampan): more tests to do below.
 
 // Visit a page over https that contains a frame with a redirect.
diff --git a/chrome/browser/ssl/ssl_error_tab_helper.cc b/chrome/browser/ssl/ssl_error_tab_helper.cc
index 8a76432cb..d5d7c4d 100644
--- a/chrome/browser/ssl/ssl_error_tab_helper.cc
+++ b/chrome/browser/ssl/ssl_error_tab_helper.cc
@@ -3,8 +3,9 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/ssl/ssl_error_tab_helper.h"
-
+#include "base/strings/string_number_conversions.h"
 #include "components/security_interstitials/content/security_interstitial_page.h"
+#include "components/security_interstitials/core/controller_client.h"
 #include "content/public/browser/navigation_handle.h"
 
 DEFINE_WEB_CONTENTS_USER_DATA_KEY(SSLErrorTabHelper);
@@ -64,7 +65,7 @@
 }
 
 SSLErrorTabHelper::SSLErrorTabHelper(content::WebContents* web_contents)
-    : WebContentsObserver(web_contents) {}
+    : WebContentsObserver(web_contents), binding_(web_contents, this) {}
 
 void SSLErrorTabHelper::SetBlockingPage(
     int64_t navigation_id,
@@ -72,3 +73,80 @@
         blocking_page) {
   blocking_pages_for_navigations_[navigation_id] = std::move(blocking_page);
 }
+
+void SSLErrorTabHelper::HandleCommand(
+    security_interstitials::SecurityInterstitialCommand cmd) {
+  if (blocking_page_for_currently_committed_navigation_) {
+    // Currently commands need to be converted to strings before passing them
+    // to CommandReceived, which then turns them into integers again, this
+    // redundant conversion will be removed once commited interstitials are the
+    // only supported codepath.
+    blocking_page_for_currently_committed_navigation_->CommandReceived(
+        base::NumberToString(cmd));
+  }
+}
+
+void SSLErrorTabHelper::DontProceed() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_DONT_PROCEED);
+}
+
+void SSLErrorTabHelper::Proceed() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_PROCEED);
+}
+
+void SSLErrorTabHelper::ShowMoreSection() {
+  HandleCommand(security_interstitials::SecurityInterstitialCommand::
+                    CMD_SHOW_MORE_SECTION);
+}
+
+void SSLErrorTabHelper::OpenHelpCenter() {
+  HandleCommand(security_interstitials::SecurityInterstitialCommand::
+                    CMD_OPEN_HELP_CENTER);
+}
+
+void SSLErrorTabHelper::OpenDiagnostic() {
+  // SSL error pages do not implement this.
+  NOTREACHED();
+}
+
+void SSLErrorTabHelper::Reload() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_RELOAD);
+}
+
+void SSLErrorTabHelper::OpenDateSettings() {
+  HandleCommand(security_interstitials::SecurityInterstitialCommand::
+                    CMD_OPEN_DATE_SETTINGS);
+}
+
+void SSLErrorTabHelper::OpenLogin() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_OPEN_LOGIN);
+}
+
+void SSLErrorTabHelper::DoReport() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_DO_REPORT);
+}
+
+void SSLErrorTabHelper::DontReport() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_DONT_REPORT);
+}
+
+void SSLErrorTabHelper::OpenReportingPrivacy() {
+  HandleCommand(security_interstitials::SecurityInterstitialCommand::
+                    CMD_OPEN_REPORTING_PRIVACY);
+}
+
+void SSLErrorTabHelper::OpenWhitepaper() {
+  HandleCommand(
+      security_interstitials::SecurityInterstitialCommand::CMD_OPEN_WHITEPAPER);
+}
+
+void SSLErrorTabHelper::ReportPhishingError() {
+  // SSL error pages do not implement this.
+  NOTREACHED();
+}
diff --git a/chrome/browser/ssl/ssl_error_tab_helper.h b/chrome/browser/ssl/ssl_error_tab_helper.h
index 2b950cc..9280762d 100644
--- a/chrome/browser/ssl/ssl_error_tab_helper.h
+++ b/chrome/browser/ssl/ssl_error_tab_helper.h
@@ -7,6 +7,9 @@
 
 #include <map>
 
+#include "components/security_interstitials/core/common/interfaces/interstitial_commands.mojom.h"
+#include "components/security_interstitials/core/controller_client.h"
+#include "content/public/browser/web_contents_binding_set.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
 
@@ -22,7 +25,8 @@
 // Long-lived helper associated with a WebContents, for owning blocking pages.
 class SSLErrorTabHelper
     : public content::WebContentsObserver,
-      public content::WebContentsUserData<SSLErrorTabHelper> {
+      public content::WebContentsUserData<SSLErrorTabHelper>,
+      public security_interstitials::mojom::InterstitialCommands {
  public:
   ~SSLErrorTabHelper() override;
 
@@ -52,6 +56,23 @@
       std::unique_ptr<security_interstitials::SecurityInterstitialPage>
           blocking_page);
 
+  void HandleCommand(security_interstitials::SecurityInterstitialCommand cmd);
+
+  // security_interstitials::mojom::InterstitialCommands::
+  void DontProceed() override;
+  void Proceed() override;
+  void ShowMoreSection() override;
+  void OpenHelpCenter() override;
+  void OpenDiagnostic() override;
+  void Reload() override;
+  void OpenDateSettings() override;
+  void OpenLogin() override;
+  void DoReport() override;
+  void DontReport() override;
+  void OpenReportingPrivacy() override;
+  void OpenWhitepaper() override;
+  void ReportPhishingError() override;
+
   // Keeps track of blocking pages for navigations that have encountered
   // certificate errors in this WebContents. When a navigation commits, the
   // corresponding blocking page is moved out and stored in
@@ -65,6 +86,10 @@
   std::unique_ptr<security_interstitials::SecurityInterstitialPage>
       blocking_page_for_currently_committed_navigation_;
 
+  content::WebContentsFrameBindingSet<
+      security_interstitials::mojom::InterstitialCommands>
+      binding_;
+
   DISALLOW_COPY_AND_ASSIGN(SSLErrorTabHelper);
 };
 
diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc
index d9892b96..2260272f 100644
--- a/chrome/browser/supervised_user/supervised_user_service.cc
+++ b/chrome/browser/supervised_user/supervised_user_service.cc
@@ -958,7 +958,7 @@
   // If the installed version is approved, then the extension is allowed,
   // otherwise, it requires approval.
   if (extension_it != approved_extensions_map_.end() &&
-      extension_it->second == *extension.version()) {
+      extension_it->second == extension.version()) {
     return ExtensionState::ALLOWED;
   }
   return ExtensionState::REQUIRE_APPROVAL;
@@ -1051,7 +1051,7 @@
         SupervisedUserService* supervised_user_service =
             SupervisedUserServiceFactory::GetForProfile(profile_);
         supervised_user_service->AddExtensionInstallRequest(
-            extension->id(), *extension->version());
+            extension->id(), extension->version());
       }
     }
   }
@@ -1069,7 +1069,7 @@
 
   ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(profile_);
   const std::string& id = extension->id();
-  const base::Version& version = *extension->version();
+  const base::Version& version = extension->version();
 
   // If an already approved extension is updated without requiring
   // new permissions, we update the approved_version.
diff --git a/chrome/browser/sync/glue/extension_data_type_controller.cc b/chrome/browser/sync/glue/extension_data_type_controller.cc
index 11f0241..9bd0ea2 100644
--- a/chrome/browser/sync/glue/extension_data_type_controller.cc
+++ b/chrome/browser/sync/glue/extension_data_type_controller.cc
@@ -29,7 +29,8 @@
 
 bool ExtensionDataTypeController::StartModels() {
   DCHECK(CalledOnValidThread());
-  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true);
+  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(
+      true /* extensions_enabled */);
   return true;
 }
 
diff --git a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
index c34a66d..532fbca 100644
--- a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
+++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
@@ -33,7 +33,8 @@
 
 bool ExtensionSettingDataTypeController::StartModels() {
   DCHECK(CalledOnValidThread());
-  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true);
+  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(
+      true /* extensions_enabled */);
   return true;
 }
 
diff --git a/chrome/browser/sync/glue/theme_data_type_controller.cc b/chrome/browser/sync/glue/theme_data_type_controller.cc
index de61089..f8a43782 100644
--- a/chrome/browser/sync/glue/theme_data_type_controller.cc
+++ b/chrome/browser/sync/glue/theme_data_type_controller.cc
@@ -25,7 +25,8 @@
 
 bool ThemeDataTypeController::StartModels() {
   DCHECK(CalledOnValidThread());
-  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true);
+  extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(
+      true /* extensions_enabled */);
   return true;
 }
 
diff --git a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
index 26db9df..8c855ad 100644
--- a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
@@ -148,10 +148,10 @@
     service->SetPinPosition(app_ids.back(), pin_position);
     pin_position = pin_position.CreateAfter();
   }
-  SyncAppListHelper::GetInstance()->MoveAppToFolder(
-      profile, 2, "folder1");
-  SyncAppListHelper::GetInstance()->MoveAppToFolder(
-      profile, 3, "folder2");
+  SyncAppListHelper::GetInstance()->MoveAppToFolder(profile, app_ids[2],
+                                                    "folder1");
+  SyncAppListHelper::GetInstance()->MoveAppToFolder(profile, app_ids[3],
+                                                    "folder2");
 
   app_list::AppListSyncableService compare_service(
       profile, extensions::ExtensionSystem::Get(profile));
@@ -170,11 +170,10 @@
     service->SetPinPosition(app_id, pin_position);
     pin_position = pin_position.CreateAfter();
   }
-  SyncAppListHelper::GetInstance()->MoveAppFromFolder(
-      profile, 0, "folder1");
-  SyncAppListHelper::GetInstance()->MoveAppFromFolder(
-      profile, 0, "folder2");
-  SyncAppListHelper::GetInstance()->MoveApp(profile, 0, 1);
+  SyncAppListHelper::GetInstance()->MoveAppFromFolder(profile, app_ids[0],
+                                                      "folder1");
+  SyncAppListHelper::GetInstance()->MoveAppFromFolder(profile, app_ids[0],
+                                                      "folder2");
 
   EXPECT_FALSE(SyncItemsMatch(service, &compare_service));
 
diff --git a/chrome/browser/sync/test/integration/sync_app_helper.cc b/chrome/browser/sync/test/integration/sync_app_helper.cc
index 61902068..8052bdd1 100644
--- a/chrome/browser/sync/test/integration/sync_app_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_app_helper.cc
@@ -149,12 +149,12 @@
     return;
 
   for (int i = 0; i < test->num_clients(); ++i) {
-    extensions::ExtensionSystem::Get(
-        test->GetProfile(i))->InitForRegularProfile(true);
+    extensions::ExtensionSystem::Get(test->GetProfile(i))
+        ->InitForRegularProfile(true /* extensions_enabled */);
   }
   if (test->use_verifier()) {
     extensions::ExtensionSystem::Get(test->verifier())
-        ->InitForRegularProfile(true);
+        ->InitForRegularProfile(true /* extensions_enabled */);
   }
 
   setup_completed_ = true;
diff --git a/chrome/browser/sync/test/integration/sync_app_list_helper.cc b/chrome/browser/sync/test/integration/sync_app_list_helper.cc
index a9c0c40c..1fe6262 100644
--- a/chrome/browser/sync/test/integration/sync_app_list_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_app_list_helper.cc
@@ -4,8 +4,9 @@
 
 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h"
 
-#include "ash/app_list/model/app_list_folder_item.h"
-#include "ash/app_list/model/app_list_item.h"
+#include <map>
+#include <vector>
+
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
@@ -13,13 +14,11 @@
 #include "chrome/browser/ui/app_list/app_list_model_updater.h"
 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 #include "chrome/common/extensions/sync_helper.h"
 #include "extensions/browser/app_sorting.h"
 #include "extensions/browser/extension_system.h"
 
-using app_list::AppListFolderItem;
-using app_list::AppListItem;
-using app_list::AppListItemList;
 using app_list::AppListSyncableService;
 using app_list::AppListSyncableServiceFactory;
 
@@ -41,7 +40,8 @@
   }
   test_ = test;
   for (auto* profile : test_->GetAllProfiles()) {
-    extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(true);
+    extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
+        true /* extensions_enabled */);
   }
 
   setup_completed_ = true;
@@ -63,24 +63,24 @@
   }
   bool res = true;
   for (size_t i = 0; i < service1->GetModelUpdater()->ItemCount(); ++i) {
-    AppListItem* item1 = service1->GetModelUpdater()->ItemAt(i);
-    AppListItem* item2 = service2->GetModelUpdater()->ItemAt(i);
+    ChromeAppListItem* item1 = service1->GetModelUpdater()->ItemAtForTest(i);
+    size_t index2;
+    if (!service2->GetModelUpdater()->FindItemIndexForTest(item1->id(),
+                                                           &index2)) {
+      LOG(ERROR) << " Item(" << i << ") in profile1: " << item1->ToDebugString()
+                 << " Not in profile2.";
+      res = false;
+      continue;
+    }
+
+    ChromeAppListItem* item2 =
+        service2->GetModelUpdater()->ItemAtForTest(index2);
     if (item1->CompareForTest(item2))
       continue;
 
-    LOG(ERROR) << "Item(" << i << "): " << item1->ToDebugString()
-               << " != " << item2->ToDebugString();
-    size_t index2;
-    if (!service2->GetModelUpdater()->FindItemIndex(item1->id(), &index2)) {
-      LOG(ERROR) << " Item(" << i << "): " << item1->ToDebugString()
-                 << " Not in profile2.";
-    } else {
-      LOG(ERROR) << " Item(" << i << "): " << item1->ToDebugString()
-                 << " Has different profile2 index: " << index2;
-      item2 = service2->GetModelUpdater()->ItemAt(index2);
-      LOG(ERROR) << " profile2 Item(" << index2
-                 << "): " << item2->ToDebugString();
-    }
+    LOG(ERROR) << "Item(" << i << ") in profile1: " << item1->ToDebugString()
+               << " != "
+               << "Item(" << i << ") in profile2: " << item2->ToDebugString();
     res = false;
   }
   return res;
@@ -103,63 +103,64 @@
   return true;
 }
 
-void SyncAppListHelper::MoveApp(Profile* profile, size_t from, size_t to) {
-  AppListSyncableService* service =
-      AppListSyncableServiceFactory::GetForProfile(profile);
-  service->GetModelUpdater()->MoveItem(from, to);
-}
-
 void SyncAppListHelper::MoveAppToFolder(Profile* profile,
-                                        size_t index,
+                                        const std::string& id,
                                         const std::string& folder_id) {
   AppListSyncableService* service =
       AppListSyncableServiceFactory::GetForProfile(profile);
-  service->GetModelUpdater()->MoveItemToFolder(
-      service->GetModelUpdater()->ItemAt(index)->id(), folder_id);
+  service->GetModelUpdater()->MoveItemToFolder(id, folder_id);
 }
 
 void SyncAppListHelper::MoveAppFromFolder(Profile* profile,
-                                          size_t index_in_folder,
+                                          const std::string& id,
                                           const std::string& folder_id) {
   AppListSyncableService* service =
       AppListSyncableServiceFactory::GetForProfile(profile);
-  AppListFolderItem* folder =
+  app_list::AppListFolderItem* folder =
       service->GetModelUpdater()->FindFolderItem(folder_id);
   if (!folder) {
     LOG(ERROR) << "Folder not found: " << folder_id;
     return;
   }
-  service->GetModelUpdater()->MoveItemToFolder(
-      folder->item_list()->item_at(index_in_folder)->id(), "");
+  service->GetModelUpdater()->MoveItemToFolder(id, "");
 }
 
 void SyncAppListHelper::PrintAppList(Profile* profile) {
   AppListSyncableService* service =
       AppListSyncableServiceFactory::GetForProfile(profile);
+  // Build a map from each folder item's id to a list of its child items.
+  std::map<const std::string, std::vector<ChromeAppListItem*>> children;
   for (size_t i = 0; i < service->GetModelUpdater()->ItemCount(); ++i) {
-    AppListItem* item = service->GetModelUpdater()->ItemAt(i);
+    ChromeAppListItem* item = service->GetModelUpdater()->ItemAtForTest(i);
+    if (!item->folder_id().empty())
+      children[item->folder_id()].push_back(item);
+  }
+  for (size_t i = 0; i < service->GetModelUpdater()->ItemCount(); ++i) {
+    ChromeAppListItem* item = service->GetModelUpdater()->ItemAtForTest(i);
+    // Skip if it's not a top level item.
+    if (item->folder_id().empty())
+      continue;
     std::string label = base::StringPrintf("Item(%d): ", static_cast<int>(i));
     PrintItem(profile, item, label);
+    // Print children if it has any.
+    if (children.count(item->id())) {
+      auto& child_items = children[item->folder_id()];
+      for (size_t j = 0; j < child_items.size(); ++j) {
+        ChromeAppListItem* child_item = child_items[j];
+        std::string child_label =
+            base::StringPrintf(" Folder Item(%d): ", static_cast<int>(j));
+        PrintItem(profile, child_item, child_label);
+      }
+    }
   }
 }
 
 void SyncAppListHelper::PrintItem(Profile* profile,
-                                  AppListItem* item,
+                                  ChromeAppListItem* item,
                                   const std::string& label) {
   extensions::AppSorting* s =
       extensions::ExtensionSystem::Get(profile)->app_sorting();
   std::string id = item->id();
-  if (item->GetItemType() == AppListFolderItem::kItemType) {
-    DVLOG(1) << label << item->ToDebugString();
-    AppListFolderItem* folder = static_cast<AppListFolderItem*>(item);
-    for (size_t i = 0; i < folder->item_list()->item_count(); ++i) {
-      AppListItem* child = folder->item_list()->item_at(i);
-      std::string child_label =
-          base::StringPrintf(" Folder Item(%d): ", static_cast<int>(i));
-      PrintItem(profile, child, child_label);
-    }
-    return;
-  }
   DVLOG(1) << label << item->ToDebugString()
            << " Page: " << s->GetPageOrdinal(id).ToDebugString().substr(0, 8)
            << " Item: "
diff --git a/chrome/browser/sync/test/integration/sync_app_list_helper.h b/chrome/browser/sync/test/integration/sync_app_list_helper.h
index 375cbad..f2f80e2e 100644
--- a/chrome/browser/sync/test/integration/sync_app_list_helper.h
+++ b/chrome/browser/sync/test/integration/sync_app_list_helper.h
@@ -16,9 +16,7 @@
 class Profile;
 class SyncTest;
 
-namespace app_list {
-class AppListItem;
-}
+class ChromeAppListItem;
 
 class SyncAppListHelper {
  public:
@@ -32,17 +30,14 @@
   // Returns true iff all existing profiles have the same app list entries.
   bool AllProfilesHaveSameAppList();
 
-  // Moves an app in |profile|.
-  void MoveApp(Profile* profile, size_t from, size_t to);
-
   // Moves an app in |profile| to |folder_id|.
   void MoveAppToFolder(Profile* profile,
-                       size_t index,
+                       const std::string& id,
                        const std::string& folder_id);
 
   // Moves an app in |profile| from |folder_id| to the top level list of apps.
   void MoveAppFromFolder(Profile* profile,
-                         size_t index_in_folder,
+                         const std::string& id,
                          const std::string& folder_id);
 
   // Helper function for debugging, used to log the app lists on test failures.
@@ -61,7 +56,7 @@
   // Helper function for debugging, logs info for an item, including the
   // contents of any folder items.
   void PrintItem(Profile* profile,
-                 app_list::AppListItem* item,
+                 ChromeAppListItem* item,
                  const std::string& label);
 
   SyncTest* test_;
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.cc b/chrome/browser/sync/test/integration/sync_extension_helper.cc
index 3713d6d..303359b 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.cc
@@ -312,7 +312,8 @@
 }
 
 void SyncExtensionHelper::SetupProfile(Profile* profile) {
-  extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(true);
+  extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
+      true /* extensions_enabled */);
   profile_extensions_.insert(make_pair(profile, ExtensionNameMap()));
 }
 
diff --git a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
index 6d5ff09..e36106d 100644
--- a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
@@ -369,14 +369,6 @@
   AwaitQuiescenceAndInstallAppsPendingForSync();
 
   ASSERT_TRUE(AllProfilesHaveSameAppList());
-
-  size_t first = kNumDefaultApps;
-  SyncAppListHelper::GetInstance()->MoveApp(
-      GetProfile(0), first + 1, first + 2);
-
-  ASSERT_TRUE(AwaitQuiescence());
-
-  ASSERT_TRUE(AllProfilesHaveSameAppList());
 }
 
 // Install a Default App on both clients, then sync. Remove the app on one
@@ -440,8 +432,9 @@
   ASSERT_TRUE(AllProfilesHaveSameAppList());
 
   const int kNumApps = 5;
+  std::vector<std::string> app_ids;
   for (int i = 0; i < kNumApps; ++i) {
-    InstallApp(GetProfile(0), i);
+    app_ids.push_back(InstallApp(GetProfile(0), i));
     InstallApp(GetProfile(1), i);
   }
   ASSERT_TRUE(AwaitQuiescence());
@@ -449,8 +442,8 @@
 
   size_t index = 2u;
   std::string folder_id = "Folder 0";
-  SyncAppListHelper::GetInstance()->MoveAppToFolder(
-      GetProfile(0), index, folder_id);
+  SyncAppListHelper::GetInstance()->MoveAppToFolder(GetProfile(0),
+                                                    app_ids[index], folder_id);
 
   ASSERT_TRUE(AwaitQuiescence());
   ASSERT_TRUE(AllProfilesHaveSameAppList());
@@ -461,8 +454,9 @@
   ASSERT_TRUE(AllProfilesHaveSameAppList());
 
   const int kNumApps = 10;
+  std::vector<std::string> app_ids;
   for (int i = 0; i < kNumApps; ++i) {
-    InstallApp(GetProfile(0), i);
+    app_ids.push_back(InstallApp(GetProfile(0), i));
     InstallApp(GetProfile(1), i);
   }
   ASSERT_TRUE(AwaitQuiescence());
@@ -476,22 +470,22 @@
   size_t item_index = kNumDefaultApps;
   for (size_t i = 0; i < kNumAppsToMove; ++i) {
     SyncAppListHelper::GetInstance()->MoveAppToFolder(
-        GetProfile(0), item_index, folder_id);
+        GetProfile(0), app_ids[item_index], folder_id);
   }
   ASSERT_TRUE(AwaitQuiescence());
   ASSERT_TRUE(AllProfilesHaveSameAppList());
 
   // Remove one app from the folder.
-  SyncAppListHelper::GetInstance()->MoveAppFromFolder(
-      GetProfile(0), 0, folder_id);
+  SyncAppListHelper::GetInstance()->MoveAppFromFolder(GetProfile(0), app_ids[0],
+                                                      folder_id);
 
   ASSERT_TRUE(AwaitQuiescence());
   ASSERT_TRUE(AllProfilesHaveSameAppList());
 
   // Remove remaining apps from the folder (deletes folder).
   for (size_t i = 1; i < kNumAppsToMove; ++i) {
-    SyncAppListHelper::GetInstance()->MoveAppFromFolder(
-        GetProfile(0), 0, folder_id);
+    SyncAppListHelper::GetInstance()->MoveAppFromFolder(GetProfile(0),
+                                                        app_ids[0], folder_id);
   }
 
   ASSERT_TRUE(AwaitQuiescence());
@@ -500,7 +494,7 @@
   // Move apps back to a (new) folder.
   for (size_t i = 0; i < kNumAppsToMove; ++i) {
     SyncAppListHelper::GetInstance()->MoveAppToFolder(
-        GetProfile(0), item_index, folder_id);
+        GetProfile(0), app_ids[item_index], folder_id);
   }
 
   ASSERT_TRUE(AwaitQuiescence());
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 3abb816..a763cd64 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1305,6 +1305,8 @@
       "ash/vpn_list_forwarder.h",
       "ash/wallpaper_controller_client.cc",
       "ash/wallpaper_controller_client.h",
+      "ash/wallpaper_policy_handler.cc",
+      "ash/wallpaper_policy_handler.h",
       "browser_commands_chromeos.cc",
       "browser_commands_chromeos.h",
       "extensions/extension_installed_notification.cc",
@@ -2085,6 +2087,7 @@
         "cocoa/download/md_download_item_progress_indicator.mm",
         "cocoa/download/md_download_item_view.h",
         "cocoa/download/md_download_item_view.mm",
+        "cocoa/download/md_download_item_view_testing.h",
         "cocoa/drag_util.h",
         "cocoa/drag_util.mm",
         "cocoa/draggable_button.h",
diff --git a/chrome/browser/ui/app_list/app_context_menu_unittest.cc b/chrome/browser/ui/app_list/app_context_menu_unittest.cc
index 5eebf93bb..3fa4e204 100644
--- a/chrome/browser/ui/app_list/app_context_menu_unittest.cc
+++ b/chrome/browser/ui/app_list/app_context_menu_unittest.cc
@@ -103,8 +103,8 @@
 
     extensions::MenuManagerFactory::GetInstance()->SetTestingFactory(
         profile(), MenuManagerFactory);
-    controller_.reset(new FakeAppListControllerDelegate());
-    menu_delegate_.reset(new FakeAppContextMenuDelegate());
+    controller_ = std::make_unique<FakeAppListControllerDelegate>();
+    menu_delegate_ = std::make_unique<FakeAppContextMenuDelegate>();
     ChromeAppListItem::OverrideAppListControllerDelegateForTesting(
         controller());
   }
diff --git a/chrome/browser/ui/app_list/app_list_model_builder.cc b/chrome/browser/ui/app_list/app_list_model_builder.cc
index e76639c3..b762748 100644
--- a/chrome/browser/ui/app_list/app_list_model_builder.cc
+++ b/chrome/browser/ui/app_list/app_list_model_builder.cc
@@ -7,8 +7,6 @@
 #include <utility>
 #include <vector>
 
-#include "ash/app_list/model/app_list_item.h"
-
 AppListModelBuilder::AppListModelBuilder(AppListControllerDelegate* controller,
                                          const char* item_type)
     : controller_(controller), item_type_(item_type) {}
@@ -28,8 +26,7 @@
   BuildModel();
 }
 
-void AppListModelBuilder::InsertApp(
-    std::unique_ptr<app_list::AppListItem> app) {
+void AppListModelBuilder::InsertApp(std::unique_ptr<ChromeAppListItem> app) {
   if (service_) {
     service_->AddItem(std::move(app));
     return;
@@ -51,8 +48,8 @@
   return service_ ? service_->GetSyncItem(id) : nullptr;
 }
 
-app_list::AppListItem* AppListModelBuilder::GetAppItem(const std::string& id) {
-  app_list::AppListItem* item = model_updater_->FindItem(id);
+ChromeAppListItem* AppListModelBuilder::GetAppItem(const std::string& id) {
+  ChromeAppListItem* item = model_updater_->FindItem(id);
   if (item && item->GetItemType() != item_type_) {
     VLOG(2) << "App Item matching id: " << id
             << " has incorrect type: '" << item->GetItemType() << "'";
diff --git a/chrome/browser/ui/app_list/app_list_model_builder.h b/chrome/browser/ui/app_list/app_list_model_builder.h
index 53463d2..e62cdb4 100644
--- a/chrome/browser/ui/app_list/app_list_model_builder.h
+++ b/chrome/browser/ui/app_list/app_list_model_builder.h
@@ -43,7 +43,7 @@
   app_list::AppListModelUpdater* model_updater() { return model_updater_; }
 
   // Inserts an app based on app ordinal prefs.
-  void InsertApp(std::unique_ptr<app_list::AppListItem> app);
+  void InsertApp(std::unique_ptr<ChromeAppListItem> app);
 
   // Removes an app based on app id. If |unsynced_change| is set to true then
   // app is removed only from model and sync service is not used.
@@ -53,7 +53,7 @@
       const std::string& id);
 
   // Returns app instance matching |id| or nullptr.
-  app_list::AppListItem* GetAppItem(const std::string& id);
+  ChromeAppListItem* GetAppItem(const std::string& id);
 
  private:
   // Unowned pointers to the service that owns this and associated profile.
diff --git a/chrome/browser/ui/app_list/app_list_model_updater.h b/chrome/browser/ui/app_list/app_list_model_updater.h
index ae6d49c8..0a08f78 100644
--- a/chrome/browser/ui/app_list/app_list_model_updater.h
+++ b/chrome/browser/ui/app_list/app_list_model_updater.h
@@ -10,8 +10,8 @@
 #include <string>
 
 #include "ash/app_list/model/app_list_folder_item.h"
-#include "ash/app_list/model/app_list_item.h"
 #include "ash/app_list/model/app_list_model.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 
 namespace app_list {
 
@@ -19,14 +19,13 @@
 class AppListModelUpdater {
  public:
   // For AppListModel:
-  virtual void AddItem(std::unique_ptr<AppListItem> item) {}
-  virtual void AddItemToFolder(std::unique_ptr<AppListItem> item,
+  virtual void AddItem(std::unique_ptr<ChromeAppListItem> item) {}
+  virtual void AddItemToFolder(std::unique_ptr<ChromeAppListItem> item,
                                const std::string& folder_id) {}
   virtual void RemoveItem(const std::string& id) {}
   virtual void RemoveUninstalledItem(const std::string& id) {}
   virtual void MoveItemToFolder(const std::string& id,
                                 const std::string& folder_id) {}
-  virtual void MoveItem(size_t from_index, size_t to_index) {}
   virtual void SetItemPosition(const std::string& id,
                                const syncer::StringOrdinal& new_position) {}
   virtual void SetStatus(AppListModel::Status status) {}
@@ -36,13 +35,13 @@
   // For SearchModel:
   virtual void SetSearchEngineIsGoogle(bool is_google) {}
 
-  // TODO(hejq): Remove these methods and access the model in a mojo way.
   // For AppListModel:
-  virtual AppListItem* FindItem(const std::string& id) = 0;
+  virtual ChromeAppListItem* FindItem(const std::string& id) = 0;
   virtual size_t ItemCount() = 0;
-  virtual AppListItem* ItemAt(size_t index) = 0;
+  virtual ChromeAppListItem* ItemAtForTest(size_t index) = 0;
+  // TODO(hejq): |FindFolderItem| will return |ChromeAppListItem|.
   virtual AppListFolderItem* FindFolderItem(const std::string& folder_id) = 0;
-  virtual bool FindItemIndex(const std::string& id, size_t* index) = 0;
+  virtual bool FindItemIndexForTest(const std::string& id, size_t* index) = 0;
   virtual app_list::AppListViewState StateFullscreen() = 0;
   virtual std::map<std::string, size_t> GetIdToAppListIndexMap() = 0;
   // For SearchModel:
diff --git a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
index 139e2f9..8268397 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 
-#include "ash/app_list/model/app_list_item.h"
 #include "base/macros.h"
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
@@ -12,6 +11,7 @@
 #include "chrome/browser/ui/app_list/app_list_model_updater.h"
 #include "chrome/browser/ui/app_list/app_list_service.h"
 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 #include "chrome/browser/ui/app_list/test/chrome_app_list_test_support.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/pref_names.h"
@@ -111,8 +111,7 @@
   EXPECT_TRUE(model_updater);
 
   // Get the webstore hosted app, which is always present.
-  app_list::AppListItem* item =
-      model_updater->FindItem(extensions::kWebStoreAppId);
+  ChromeAppListItem* item = model_updater->FindItem(extensions::kWebStoreAppId);
   EXPECT_TRUE(item);
 
   ui::MenuModel* menu_model = item->GetContextMenuModel();
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc
index ce65caedb..fe1dfb6 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc
@@ -220,9 +220,7 @@
 
 class AppListSyncableService::ModelObserver : public AppListModelObserver {
  public:
-  explicit ModelObserver(AppListSyncableService* owner)
-      : owner_(owner),
-        adding_item_(NULL) {
+  explicit ModelObserver(AppListSyncableService* owner) : owner_(owner) {
     DVLOG(2) << owner_ << ": ModelObserver Added";
     owner_->GetModel()->AddObserver(this);
   }
@@ -235,15 +233,15 @@
  private:
   // AppListModelObserver
   void OnAppListItemAdded(AppListItem* item) override {
-    DCHECK(!adding_item_);
-    adding_item_ = item;  // Ignore updates while adding an item.
+    DCHECK(adding_item_id_.empty());
+    adding_item_id_ = item->id();  // Ignore updates while adding an item.
     VLOG(2) << owner_ << " OnAppListItemAdded: " << item->ToDebugString();
     owner_->AddOrUpdateFromSyncItem(item);
-    adding_item_ = NULL;
+    adding_item_id_.clear();
   }
 
   void OnAppListItemWillBeDeleted(AppListItem* item) override {
-    DCHECK(!adding_item_);
+    DCHECK(adding_item_id_.empty());
     VLOG(2) << owner_ << " OnAppListItemDeleted: " << item->ToDebugString();
     // Don't sync folder removal in case the folder still exists on another
     // device (e.g. with device specific items in it). Empty folders will be
@@ -261,10 +259,10 @@
   }
 
   void OnAppListItemUpdated(AppListItem* item) override {
-    if (adding_item_) {
+    if (!adding_item_id_.empty()) {
       // Adding an item may trigger update notifications which should be
       // ignored.
-      DCHECK_EQ(adding_item_, item);
+      DCHECK_EQ(adding_item_id_, item->id());
       return;
     }
     VLOG(2) << owner_ << " OnAppListItemUpdated: " << item->ToDebugString();
@@ -272,7 +270,7 @@
   }
 
   AppListSyncableService* owner_;
-  AppListItem* adding_item_;  // Unowned pointer to item being added.
+  std::string adding_item_id_;
 
   DISALLOW_COPY_AND_ASSIGN(ModelObserver);
 };
@@ -457,7 +455,8 @@
   NotifyObserversSyncUpdated();
 }
 
-void AppListSyncableService::AddItem(std::unique_ptr<AppListItem> app_item) {
+void AppListSyncableService::AddItem(
+    std::unique_ptr<ChromeAppListItem> app_item) {
   SyncItem* sync_item = FindOrAddSyncItem(app_item.get());
   if (!sync_item)
     return;  // Item is not valid.
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.h b/chrome/browser/ui/app_list/app_list_syncable_service.h
index 17e25cb..65e5490b0 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.h
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.h
@@ -25,6 +25,7 @@
 #include "components/sync/protocol/app_list_specifics.pb.h"
 
 class ArcAppModelBuilder;
+class ChromeAppListItem;
 class ExtensionAppModelBuilder;
 class Profile;
 
@@ -92,7 +93,7 @@
 
   // Adds |item| to |sync_items_| and |model_|. If a sync item already exists,
   // updates the existing sync item instead.
-  void AddItem(std::unique_ptr<AppListItem> app_item);
+  void AddItem(std::unique_ptr<ChromeAppListItem> app_item);
 
   // Removes sync item matching |id|.
   void RemoveItem(const std::string& id);
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_unittest.cc b/chrome/browser/ui/app_list/app_list_syncable_service_unittest.cc
index 9f51f7ca..2d21697 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service_unittest.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_unittest.cc
@@ -3,12 +3,12 @@
 // found in the LICENSE file.
 
 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
-#include "ash/app_list/model/app_list_item.h"
 #include "base/files/scoped_temp_dir.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/app_list/app_list_model_updater.h"
 #include "chrome/browser/ui/app_list/app_list_test_util.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "components/crx_file/id_util.h"
@@ -219,10 +219,10 @@
               extensions ::Extension::WAS_INSTALLED_BY_DEFAULT);
   service_->AddExtension(some_app.get());
 
-  app_list::AppListItem* web_store_item =
+  ChromeAppListItem* web_store_item =
       model_updater()->FindItem(web_store_app_id);
   ASSERT_TRUE(web_store_item);
-  app_list::AppListItem* some_app_item = model_updater()->FindItem(some_app_id);
+  ChromeAppListItem* some_app_item = model_updater()->FindItem(some_app_id);
   ASSERT_TRUE(some_app_item);
 
   // Simulate position conflict.
@@ -238,20 +238,20 @@
 
   size_t web_store_app_index;
   size_t some_app_index;
-  size_t oem_app_index;
-  size_t oem_folder_index;
+  EXPECT_TRUE(model_updater()->FindItemIndexForTest(web_store_app_id,
+                                                    &web_store_app_index));
   EXPECT_TRUE(
-      model_updater()->FindItemIndex(web_store_app_id, &web_store_app_index));
-  EXPECT_TRUE(model_updater()->FindItemIndex(some_app_id, &some_app_index));
+      model_updater()->FindItemIndexForTest(some_app_id, &some_app_index));
   // OEM item is not top level element.
-  EXPECT_FALSE(model_updater()->FindItemIndex(oem_app_id, &oem_app_index));
+  ChromeAppListItem* oem_app_item = model_updater()->FindItem(oem_app_id);
+  EXPECT_NE(nullptr, oem_app_item);
+  EXPECT_EQ(oem_app_item->folder_id(),
+            app_list::AppListSyncableService::kOemFolderId);
   // But OEM folder is.
-  EXPECT_TRUE(model_updater()->FindItemIndex(
-      app_list::AppListSyncableService::kOemFolderId, &oem_folder_index));
-
-  // Ensure right item sequence.
-  EXPECT_EQ(some_app_index, web_store_app_index + 1);
-  EXPECT_EQ(oem_folder_index, web_store_app_index + 2);
+  ChromeAppListItem* oem_folder =
+      model_updater()->FindItem(app_list::AppListSyncableService::kOemFolderId);
+  EXPECT_NE(nullptr, oem_folder);
+  EXPECT_EQ(oem_folder->folder_id(), "");
 }
 
 TEST_F(AppListSyncableServiceTest, InitialMerge) {
diff --git a/chrome/browser/ui/app_list/arc/arc_app_item.h b/chrome/browser/ui/app_list/arc/arc_app_item.h
index a0dd7a4..4c8b2de 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_item.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_item.h
@@ -5,9 +5,9 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ITEM_H_
 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ITEM_H_
 
+#include <memory>
 #include <string>
 
-#include "ash/app_list/model/app_list_item.h"
 #include "base/macros.h"
 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
 #include "chrome/browser/ui/app_list/arc/arc_app_icon.h"
diff --git a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
index e03e452..070a534 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
@@ -39,6 +39,7 @@
 #include "chrome/browser/ui/app_list/arc/arc_default_app_list.h"
 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h"
 #include "chrome/browser/ui/app_list/arc/arc_pai_starter.h"
+#include "chrome/browser/ui/app_list/chrome_app_list_item.h"
 #include "chrome/browser/ui/app_list/test/fake_app_list_model_updater.h"
 #include "chrome/browser/ui/app_list/test/test_app_list_controller_delegate.h"
 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
@@ -237,7 +238,7 @@
     size_t arc_count = 0;
     const size_t count = model_updater_->ItemCount();
     for (size_t i = 0; i < count; ++i) {
-      app_list::AppListItem* item = model_updater_->ItemAt(i);
+      ChromeAppListItem* item = model_updater_->ItemAtForTest(i);
       if (item->GetItemType() == ArcAppItem::kItemType)
         ++arc_count;
     }
@@ -249,7 +250,7 @@
     const size_t count = model_updater_->ItemCount();
     ArcAppItem* arc_item = nullptr;
     for (size_t i = 0; i < count; ++i) {
-      app_list::AppListItem* item = model_updater_->ItemAt(i);
+      ChromeAppListItem* item = model_updater_->ItemAtForTest(i);
       if (item->GetItemType() == ArcAppItem::kItemType) {
         if (arc_count++ == index) {
           arc_item = reinterpret_cast<ArcAppItem*>(item);
@@ -304,7 +305,7 @@
 
       const ArcAppItem* app_item = FindArcItem(id);
       ASSERT_NE(nullptr, app_item);
-      EXPECT_EQ(app.name, app_item->GetDisplayName());
+      EXPECT_EQ(app.name, app_item->name());
     }
 
     for (auto& shortcut : shortcuts) {
@@ -318,7 +319,7 @@
 
       const ArcAppItem* app_item = FindArcItem(id);
       ASSERT_NE(nullptr, app_item);
-      EXPECT_EQ(shortcut.name, app_item->GetDisplayName());
+      EXPECT_EQ(shortcut.name, app_item->name());
     }
   }
 
diff --git a/chrome/browser/ui/app_list/chrome_app_list_item.h b/chrome/browser/ui/app_list/chrome_app_list_item.h
index 396eaca9..32d2868 100644
--- a/chrome/browser/ui/app_list/chrome_app_list_item.h
+++ b/chrome/browser/ui/app_list/chrome_app_list_item.h
@@ -14,6 +14,10 @@
 class AppListControllerDelegate;
 class Profile;
 
+namespace app_list {
+class FakeAppListModelUpdater;
+}  // namespace app_list
+
 namespace extensions {
 class AppSorting;
 }  // namespace extensions
@@ -25,6 +29,7 @@
 // Base class of all chrome app list items.
 class ChromeAppListItem : public app_list::AppListItem {
  public:
+  ~ChromeAppListItem() override;
   // AppListControllerDelegate is not properly implemented in tests. Use mock
   // |controller| for unit_tests.
   static void OverrideAppListControllerDelegateForTesting(
@@ -33,8 +38,11 @@
   static gfx::ImageSkia CreateDisabledIcon(const gfx::ImageSkia& icon);
 
  protected:
+  // TODO(hejq): Remove this once we break the inheritance from AppListItem and
+  //             move those protected methods to public.
+  friend class app_list::FakeAppListModelUpdater;
+
   ChromeAppListItem(Profile* profile, const std::string& app_id);
-  ~ChromeAppListItem() override;
 
   Profile* profile() const { return profile_; }
 
diff --git a/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc b/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc
index 4e3c1e8c..71f5c447 100644
--- a/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc
+++ b/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc
@@ -21,12 +21,13 @@
 
 ChromeAppListModelUpdater::~ChromeAppListModelUpdater() = default;
 
-void ChromeAppListModelUpdater::AddItem(std::unique_ptr<AppListItem> app_item) {
+void ChromeAppListModelUpdater::AddItem(
+    std::unique_ptr<ChromeAppListItem> app_item) {
   model_->AddItem(std::move(app_item));
 }
 
 void ChromeAppListModelUpdater::AddItemToFolder(
-    std::unique_ptr<AppListItem> app_item,
+    std::unique_ptr<ChromeAppListItem> app_item,
     const std::string& folder_id) {
   model_->AddItemToFolder(std::move(app_item), folder_id);
 }
@@ -45,10 +46,6 @@
   model_->MoveItemToFolder(item, folder_id);
 }
 
-void ChromeAppListModelUpdater::MoveItem(size_t from_index, size_t to_index) {
-  model_->top_level_item_list()->MoveItem(from_index, to_index);
-}
-
 void ChromeAppListModelUpdater::SetItemPosition(
     const std::string& id,
     const syncer::StringOrdinal& new_position) {
@@ -80,16 +77,17 @@
   search_model_->SetSearchEngineIsGoogle(is_google);
 }
 
-AppListItem* ChromeAppListModelUpdater::FindItem(const std::string& id) {
-  return model_->FindItem(id);
+ChromeAppListItem* ChromeAppListModelUpdater::FindItem(const std::string& id) {
+  return static_cast<ChromeAppListItem*>(model_->FindItem(id));
 }
 
 size_t ChromeAppListModelUpdater::ItemCount() {
   return model_->top_level_item_list()->item_count();
 }
 
-AppListItem* ChromeAppListModelUpdater::ItemAt(size_t index) {
-  return model_->top_level_item_list()->item_at(index);
+ChromeAppListItem* ChromeAppListModelUpdater::ItemAtForTest(size_t index) {
+  return static_cast<ChromeAppListItem*>(
+      model_->top_level_item_list()->item_at(index));
 }
 
 AppListFolderItem* ChromeAppListModelUpdater::FindFolderItem(
@@ -97,8 +95,8 @@
   return model_->FindFolderItem(folder_id);
 }
 
-bool ChromeAppListModelUpdater::FindItemIndex(const std::string& id,
-                                              size_t* index) {
+bool ChromeAppListModelUpdater::FindItemIndexForTest(const std::string& id,
+                                                     size_t* index) {
   return model_->top_level_item_list()->FindItemIndex(id, index);
 }
 
@@ -137,7 +135,7 @@
 
 // For AppListSyncableService:
 void ChromeAppListModelUpdater::AddItemToOemFolder(
-    std::unique_ptr<AppListItem> item,
+    std::unique_ptr<ChromeAppListItem> item,
     AppListSyncableService::SyncItem* oem_sync_item,
     const std::string& oem_folder_id,
     const std::string& oem_folder_name,
diff --git a/chrome/browser/ui/app_list/chrome_app_list_model_updater.h b/chrome/browser/ui/app_list/chrome_app_list_model_updater.h
index 9992fe4..bd5a235 100644
--- a/chrome/browser/ui/app_list/chrome_app_list_model_updater.h
+++ b/chrome/browser/ui/app_list/chrome_app_list_model_updater.h
@@ -23,14 +23,13 @@
   ~ChromeAppListModelUpdater() override;
 
   // AppListModelUpdater:
-  void AddItem(std::unique_ptr<AppListItem> app_item) override;
-  void AddItemToFolder(std::unique_ptr<AppListItem> app_item,
+  void AddItem(std::unique_ptr<ChromeAppListItem> app_item) override;
+  void AddItemToFolder(std::unique_ptr<ChromeAppListItem> app_item,
                        const std::string& folder_id) override;
   void RemoveItem(const std::string& id) override;
   void RemoveUninstalledItem(const std::string& id) override;
   void MoveItemToFolder(const std::string& id,
                         const std::string& folder_id) override;
-  void MoveItem(size_t from_index, size_t to_index) override;
   void SetItemPosition(const std::string& id,
                        const syncer::StringOrdinal& new_position) override;
   void SetStatus(AppListModel::Status status) override;
@@ -39,18 +38,18 @@
   void HighlightItemInstalledFromUI(const std::string& id) override;
   void SetSearchEngineIsGoogle(bool is_google) override;
 
-  AppListItem* FindItem(const std::string& id) override;
+  ChromeAppListItem* FindItem(const std::string& id) override;
   size_t ItemCount() override;
-  AppListItem* ItemAt(size_t index) override;
+  ChromeAppListItem* ItemAtForTest(size_t index) override;
   AppListFolderItem* FindFolderItem(const std::string& folder_id) override;
-  bool FindItemIndex(const std::string& id, size_t* index) override;
+  bool FindItemIndexForTest(const std::string& id, size_t* index) override;
   bool TabletMode() override;
   app_list::AppListViewState StateFullscreen() override;
   bool SearchEngineIsGoogle() override;
   std::map<std::string, size_t> GetIdToAppListIndexMap() override;
 
   // For SynchableService:
-  void AddItemToOemFolder(std::unique_ptr<AppListItem> item,
+  void AddItemToOemFolder(std::unique_ptr<ChromeAppListItem> item,
                           AppListSyncableService::SyncItem* oem_sync_item,
                           const std::string& oem_folder_id,
                           const std::string& oem_folder_name,
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
index b3cf222..154c5c6 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
+++ b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
@@ -46,7 +46,7 @@
     app_list::AppListModelUpdater* model_updater) {
   std::set<std::string> content;
   for (size_t i = 0; i < model_updater->ItemCount(); ++i)
-    content.insert(model_updater->ItemAt(i)->name());
+    content.insert(model_updater->ItemAtForTest(i)->name());
   return content;
 }
 
diff --git a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
index e8e629d..e3e73e5e 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
@@ -12,7 +12,6 @@
 #include <utility>
 
 #include "ash/app_list/model/app_list_folder_item.h"
-#include "ash/app_list/model/app_list_item.h"
 #include "ash/app_list/model/search/search_result.h"
 #include "base/macros.h"
 #include "base/run_loop.h"
diff --git a/chrome/browser/ui/app_list/test/fake_app_list_model_updater.cc b/chrome/browser/ui/app_list/test/fake_app_list_model_updater.cc
index f24e8024..f2fe742 100644
--- a/chrome/browser/ui/app_list/test/fake_app_list_model_updater.cc
+++ b/chrome/browser/ui/app_list/test/fake_app_list_model_updater.cc
@@ -12,18 +12,20 @@
 
 FakeAppListModelUpdater::~FakeAppListModelUpdater() {}
 
-void FakeAppListModelUpdater::AddItem(std::unique_ptr<AppListItem> item) {
+void FakeAppListModelUpdater::AddItem(std::unique_ptr<ChromeAppListItem> item) {
   items_.push_back(std::move(item));
 }
 
-void FakeAppListModelUpdater::AddItemToFolder(std::unique_ptr<AppListItem> item,
-                                              const std::string& folder_id) {
+void FakeAppListModelUpdater::AddItemToFolder(
+    std::unique_ptr<ChromeAppListItem> item,
+    const std::string& folder_id) {
+  item->set_folder_id(folder_id);
   items_.push_back(std::move(item));
 }
 
 void FakeAppListModelUpdater::RemoveItem(const std::string& id) {
   size_t index;
-  if (FindItemIndex(id, &index))
+  if (FindItemIndexForTest(id, &index))
     items_.erase(items_.begin() + index);
 }
 
@@ -31,13 +33,28 @@
   RemoveItem(id);
 }
 
+void FakeAppListModelUpdater::MoveItemToFolder(const std::string& id,
+                                               const std::string& folder_id) {
+  size_t index;
+  if (FindItemIndexForTest(id, &index))
+    items_[index]->set_folder_id(folder_id);
+}
+
+void FakeAppListModelUpdater::SetItemPosition(
+    const std::string& id,
+    const syncer::StringOrdinal& new_position) {
+  size_t index;
+  if (FindItemIndexForTest(id, &index))
+    items_[index]->set_position(new_position);
+}
+
 void FakeAppListModelUpdater::SetSearchEngineIsGoogle(bool is_google) {
   search_engine_is_google_ = is_google;
 }
 
-AppListItem* FakeAppListModelUpdater::FindItem(const std::string& id) {
+ChromeAppListItem* FakeAppListModelUpdater::FindItem(const std::string& id) {
   size_t index;
-  if (FindItemIndex(id, &index))
+  if (FindItemIndexForTest(id, &index))
     return items_[index].get();
   return nullptr;
 }
@@ -46,12 +63,12 @@
   return items_.size();
 }
 
-AppListItem* FakeAppListModelUpdater::ItemAt(size_t index) {
+ChromeAppListItem* FakeAppListModelUpdater::ItemAtForTest(size_t index) {
   return index < items_.size() ? items_[index].get() : nullptr;
 }
 
-bool FakeAppListModelUpdater::FindItemIndex(const std::string& id,
-                                            size_t* index) {
+bool FakeAppListModelUpdater::FindItemIndexForTest(const std::string& id,
+                                                   size_t* index) {
   for (size_t i = 0; i < items_.size(); ++i) {
     if (items_[i]->id() == id) {
       *index = i;
diff --git a/chrome/browser/ui/app_list/test/fake_app_list_model_updater.h b/chrome/browser/ui/app_list/test/fake_app_list_model_updater.h
index f8f14ff3..c9e2f30 100644
--- a/chrome/browser/ui/app_list/test/fake_app_list_model_updater.h
+++ b/chrome/browser/ui/app_list/test/fake_app_list_model_updater.h
@@ -21,20 +21,24 @@
 
   // AppListModelUpdater:
   // For AppListModel:
-  void AddItem(std::unique_ptr<AppListItem> item) override;
-  void AddItemToFolder(std::unique_ptr<AppListItem> item,
+  void AddItem(std::unique_ptr<ChromeAppListItem> item) override;
+  void AddItemToFolder(std::unique_ptr<ChromeAppListItem> item,
                        const std::string& folder_id) override;
   void RemoveItem(const std::string& id) override;
   void RemoveUninstalledItem(const std::string& id) override;
+  void MoveItemToFolder(const std::string& id,
+                        const std::string& folder_id) override;
+  void SetItemPosition(const std::string& id,
+                       const syncer::StringOrdinal& new_position) override;
   // For SearchModel:
   void SetSearchEngineIsGoogle(bool is_google) override;
 
   // For AppListModel:
-  AppListItem* FindItem(const std::string& id) override;
+  ChromeAppListItem* FindItem(const std::string& id) override;
   size_t ItemCount() override;
-  AppListItem* ItemAt(size_t index) override;
+  ChromeAppListItem* ItemAtForTest(size_t index) override;
   AppListFolderItem* FindFolderItem(const std::string& folder_id) override;
-  bool FindItemIndex(const std::string& id, size_t* index) override;
+  bool FindItemIndexForTest(const std::string& id, size_t* index) override;
   app_list::AppListViewState StateFullscreen() override;
   std::map<std::string, size_t> GetIdToAppListIndexMap() override;
   // For SearchModel:
@@ -43,7 +47,7 @@
 
  private:
   bool search_engine_is_google_ = false;
-  std::vector<std::unique_ptr<AppListItem>> items_;
+  std::vector<std::unique_ptr<ChromeAppListItem>> items_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeAppListModelUpdater);
 };
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index 7325031a..84e81f3 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -16,7 +16,6 @@
 #include "chrome/browser/browser_process_platform_part.h"
 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
 #include "chrome/browser/chromeos/login/help_app_launcher.h"
-#include "chrome/browser/chromeos/login/ui/login_display_host.h"
 #include "chrome/browser/chromeos/options/network_config_view.h"
 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
@@ -32,6 +31,7 @@
 #include "chrome/browser/ui/singleton_tabs.h"
 #include "chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h"
 #include "chrome/browser/ui/webui/chromeos/internet_config_dialog.h"
+#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
 #include "chrome/browser/upgrade_detector.h"
 #include "chrome/common/url_constants.h"
 #include "chromeos/chromeos_switches.h"
@@ -399,8 +399,7 @@
   if (session_manager->IsInSecondaryLoginScreen())
     return;
   if (!session_manager->IsSessionStarted()) {
-    chromeos::LoginDisplayHost::default_host()->OpenInternetDetailDialog(
-        network_id);
+    chromeos::InternetDetailDialog::ShowDialog(network_id);
     return;
   }
 
diff --git a/chrome/browser/ui/ash/test_wallpaper_controller.cc b/chrome/browser/ui/ash/test_wallpaper_controller.cc
index fd23e4c..4c8adb3 100644
--- a/chrome/browser/ui/ash/test_wallpaper_controller.cc
+++ b/chrome/browser/ui/ash/test_wallpaper_controller.cc
@@ -61,6 +61,10 @@
   NOTIMPLEMENTED();
 }
 
+void TestWallpaperController::SetDeviceWallpaperPolicyEnforced(bool enforced) {
+  NOTIMPLEMENTED();
+}
+
 void TestWallpaperController::ShowUserWallpaper(
     ash::mojom::WallpaperUserInfoPtr user_info) {
   NOTIMPLEMENTED();
diff --git a/chrome/browser/ui/ash/test_wallpaper_controller.h b/chrome/browser/ui/ash/test_wallpaper_controller.h
index e3c5eb64..c7e22ec 100644
--- a/chrome/browser/ui/ash/test_wallpaper_controller.h
+++ b/chrome/browser/ui/ash/test_wallpaper_controller.h
@@ -55,6 +55,7 @@
       const GURL& wallpaper_url,
       const base::FilePath& file_path,
       const base::FilePath& resized_directory) override;
+  void SetDeviceWallpaperPolicyEnforced(bool enforced) override;
   void ShowUserWallpaper(ash::mojom::WallpaperUserInfoPtr user_info) override;
   void ShowSigninWallpaper() override;
   void RemoveUserWallpaper(ash::mojom::WallpaperUserInfoPtr user_info,
diff --git a/chrome/browser/ui/ash/wallpaper_controller_client.cc b/chrome/browser/ui/ash/wallpaper_controller_client.cc
index ee2dd2c..713b68fe 100644
--- a/chrome/browser/ui/ash/wallpaper_controller_client.cc
+++ b/chrome/browser/ui/ash/wallpaper_controller_client.cc
@@ -101,6 +101,8 @@
       ->GetConnector()
       ->BindInterface(ash::mojom::kServiceName, &wallpaper_controller_);
   BindAndSetClient();
+  // TODO(xdai): Get current device policy enforced flag from
+  // WallpaperPolicyHandler::IsDeviceWallpaperPolicyEnforced() and set here.
 }
 
 void WallpaperControllerClient::InitForTesting(
@@ -218,6 +220,14 @@
   chromeos::WallpaperManager::Get()->OpenWallpaperPicker();
 }
 
+void WallpaperControllerClient::OnDeviceWallpaperChanged() {
+  wallpaper_controller_->SetDeviceWallpaperPolicyEnforced(true /*enforced=*/);
+}
+
+void WallpaperControllerClient::OnDeviceWallpaperPolicyCleared() {
+  wallpaper_controller_->SetDeviceWallpaperPolicyEnforced(false /*enforced=*/);
+}
+
 void WallpaperControllerClient::FlushForTesting() {
   wallpaper_controller_.FlushForTesting();
 }
@@ -236,6 +246,17 @@
   CHECK(PathService::Get(chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS,
                          &chromeos_custom_wallpapers_path));
 
+  // Set the static variables in WallpaperController to make it work under MASH.
+  // The reason we do this is so that the static utility functions in
+  // WallpaperController in ash continue to work under MASH.
+  // TODO(wzang|xdai): Create a WallpaperPaths class under //ash/public/cpp and
+  // move all the unititly functions there. See https://crbug.com/795159.
+  ash::WallpaperController::dir_user_data_path_ = user_data_path;
+  ash::WallpaperController::dir_chrome_os_wallpapers_path_ =
+      chromeos_wallpapers_path;
+  ash::WallpaperController::dir_chrome_os_custom_wallpapers_path_ =
+      chromeos_custom_wallpapers_path;
+
   wallpaper_controller_->SetClientAndPaths(std::move(client), user_data_path,
                                            chromeos_wallpapers_path,
                                            chromeos_custom_wallpapers_path);
diff --git a/chrome/browser/ui/ash/wallpaper_controller_client.h b/chrome/browser/ui/ash/wallpaper_controller_client.h
index 3b9d5bdf..da17c0c 100644
--- a/chrome/browser/ui/ash/wallpaper_controller_client.h
+++ b/chrome/browser/ui/ash/wallpaper_controller_client.h
@@ -7,6 +7,7 @@
 
 #include "ash/public/interfaces/wallpaper.mojom.h"
 #include "base/macros.h"
+#include "chrome/browser/ui/ash/wallpaper_policy_handler.h"
 #include "mojo/public/cpp/bindings/binding.h"
 
 namespace wallpaper {
@@ -17,7 +18,8 @@
 
 // Handles method calls sent from ash to chrome. Also sends messages from chrome
 // to ash.
-class WallpaperControllerClient : public ash::mojom::WallpaperControllerClient {
+class WallpaperControllerClient : public ash::mojom::WallpaperControllerClient,
+                                  public WallpaperPolicyHandler::Delegate {
  public:
   WallpaperControllerClient();
   ~WallpaperControllerClient() override;
@@ -61,6 +63,10 @@
   // ash::mojom::WallpaperControllerClient:
   void OpenWallpaperPicker() override;
 
+  // chromeos::WallpaperPolicyHandler::Delegate:
+  void OnDeviceWallpaperChanged() override;
+  void OnDeviceWallpaperPolicyCleared() override;
+
   // Flushes the mojo pipe to ash.
   void FlushForTesting();
 
diff --git a/chrome/browser/ui/ash/wallpaper_policy_handler.cc b/chrome/browser/ui/ash/wallpaper_policy_handler.cc
new file mode 100644
index 0000000..0a136eb
--- /dev/null
+++ b/chrome/browser/ui/ash/wallpaper_policy_handler.cc
@@ -0,0 +1,187 @@
+// 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.
+
+#include "chrome/browser/ui/ash/wallpaper_policy_handler.h"
+
+#include "ash/wallpaper/wallpaper_controller.h"
+#include "base/bind.h"
+#include "base/files/file_util.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/task_scheduler/post_task.h"
+#include "base/values.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/customization/customization_wallpaper_downloader.h"
+#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#include "chromeos/settings/cros_settings_names.h"
+#include "crypto/sha2.h"
+#include "url/gurl.h"
+
+using chromeos::CrosSettings;
+
+namespace {
+
+// A helper function to check the existing/downloaded device wallpaper file's
+// hash value matches with the hash value provided in the policy settings.
+bool CheckWallpaperFileMatchHash(const base::FilePath& device_wallpaper_file,
+                                 const std::string& hash) {
+  std::string image_data;
+  if (base::ReadFileToString(device_wallpaper_file, &image_data)) {
+    std::string sha_hash = crypto::SHA256HashString(image_data);
+    if (base::ToLowerASCII(base::HexEncode(
+            sha_hash.c_str(), sha_hash.size())) == base::ToLowerASCII(hash)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+}  // namespace
+
+WallpaperPolicyHandler::WallpaperPolicyHandler(Delegate* delegate)
+    : delegate_(delegate), weak_factory_(this) {
+  DCHECK(delegate_);
+  device_wallpaper_image_subscription_ =
+      CrosSettings::Get()->AddSettingsObserver(
+          chromeos::kDeviceWallpaperImage,
+          base::BindRepeating(
+              &WallpaperPolicyHandler::DeviceWallpaperPolicyChanged,
+              weak_factory_.GetWeakPtr()));
+}
+
+WallpaperPolicyHandler::~WallpaperPolicyHandler() {
+  device_wallpaper_image_subscription_.reset();
+}
+
+bool WallpaperPolicyHandler::IsDeviceWallpaperPolicyEnforced() {
+  if (!g_browser_process->platform_part()
+           ->browser_policy_connector_chromeos()
+           ->IsEnterpriseManaged()) {
+    return false;
+  }
+
+  std::string url, hash;
+  return GetDeviceWallpaperPolicyStrings(&url, &hash);
+}
+
+bool WallpaperPolicyHandler::GetDeviceWallpaperPolicyStrings(
+    std::string* url,
+    std::string* hash) {
+  const base::DictionaryValue* dict = nullptr;
+  if (!CrosSettings::Get()->GetDictionary(chromeos::kDeviceWallpaperImage,
+                                          &dict) ||
+      !dict->GetStringWithoutPathExpansion("url", url) ||
+      !dict->GetStringWithoutPathExpansion("hash", hash)) {
+    return false;
+  }
+  return true;
+}
+
+void WallpaperPolicyHandler::DeviceWallpaperPolicyChanged() {
+  // Get the desired file path for device policy wallpaper first.
+  if (device_wallpaper_file_path_.empty()) {
+    device_wallpaper_file_path_ =
+        ash::WallpaperController::GetDevicePolicyWallpaperFilePath();
+  }
+
+  // First check if the device policy was cleared.
+  const base::DictionaryValue* dict = nullptr;
+  if (!CrosSettings::Get()->GetDictionary(chromeos::kDeviceWallpaperImage,
+                                          &dict)) {
+    // In this case delete the local device wallpaper file if it exists and
+    // inform its delegate.
+    base::PostTaskWithTraits(
+        FROM_HERE,
+        {base::MayBlock(), base::TaskPriority::BACKGROUND,
+         base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
+        base::BindOnce(base::IgnoreResult(&base::DeleteFile),
+                       device_wallpaper_file_path_, false /*=recursive*/));
+    delegate_->OnDeviceWallpaperPolicyCleared();
+    return;
+  }
+
+  // Check if the device wallpaper already exists and matches the new provided
+  // hash. Fetch the wallpaper from the provided url if it doesn't exist.
+  base::PostTaskWithTraitsAndReplyWithResult(
+      FROM_HERE, {base::MayBlock()},
+      base::BindOnce(&base::PathExists, device_wallpaper_file_path_),
+      base::BindOnce(&WallpaperPolicyHandler::OnDeviceWallpaperFileExists,
+                     weak_factory_.GetWeakPtr()));
+}
+
+void WallpaperPolicyHandler::OnDeviceWallpaperFileExists(bool exists) {
+  std::string url, hash;
+  if (!GetDeviceWallpaperPolicyStrings(&url, &hash)) {
+    // Do nothing if the strings can not be retrieved.
+    return;
+  }
+
+  if (exists) {
+    base::PostTaskWithTraitsAndReplyWithResult(
+        FROM_HERE, {base::MayBlock()},
+        base::BindOnce(&CheckWallpaperFileMatchHash,
+                       device_wallpaper_file_path_, hash),
+        base::BindOnce(
+            &WallpaperPolicyHandler::OnCheckExistingDeviceWallpaperMatchHash,
+            weak_factory_.GetWeakPtr(), url, hash));
+  } else {
+    GURL wallpaper_url(url);
+    device_wallpaper_downloader_.reset(
+        new chromeos::CustomizationWallpaperDownloader(
+            g_browser_process->system_request_context(), wallpaper_url,
+            device_wallpaper_file_path_.DirName(), device_wallpaper_file_path_,
+            base::BindRepeating(
+                &WallpaperPolicyHandler::OnDeviceWallpaperDownloaded,
+                weak_factory_.GetWeakPtr(), hash)));
+    device_wallpaper_downloader_->Start();
+  }
+}
+
+void WallpaperPolicyHandler::OnCheckExistingDeviceWallpaperMatchHash(
+    const std::string& url,
+    const std::string& hash,
+    bool match) {
+  if (match) {
+    // Notify its delegate that device wallpaper is ready.
+    delegate_->OnDeviceWallpaperChanged();
+    return;
+  }
+
+  GURL wallpaper_url(url);
+  device_wallpaper_downloader_.reset(
+      new chromeos::CustomizationWallpaperDownloader(
+          g_browser_process->system_request_context(), wallpaper_url,
+          device_wallpaper_file_path_.DirName(), device_wallpaper_file_path_,
+          base::BindRepeating(
+              &WallpaperPolicyHandler::OnDeviceWallpaperDownloaded,
+              weak_factory_.GetWeakPtr(), hash)));
+  device_wallpaper_downloader_->Start();
+}
+
+void WallpaperPolicyHandler::OnDeviceWallpaperDownloaded(
+    const std::string& hash,
+    bool success,
+    const GURL& url) {
+  // Do nothing if device wallpaper download failed.
+  if (!success)
+    return;
+
+  base::PostTaskWithTraitsAndReplyWithResult(
+      FROM_HERE, {base::MayBlock()},
+      base::BindOnce(&CheckWallpaperFileMatchHash, device_wallpaper_file_path_,
+                     hash),
+      base::BindOnce(
+          &WallpaperPolicyHandler::OnCheckFetchedDeviceWallpaperMatchHash,
+          weak_factory_.GetWeakPtr()));
+}
+
+void WallpaperPolicyHandler::OnCheckFetchedDeviceWallpaperMatchHash(
+    bool match) {
+  // Do nothing if the provided hash doesn't match with the downloaded image.
+  if (!match)
+    return;
+
+  // Notify its delegate that device wallpaper is ready.
+  delegate_->OnDeviceWallpaperChanged();
+}
diff --git a/chrome/browser/ui/ash/wallpaper_policy_handler.h b/chrome/browser/ui/ash/wallpaper_policy_handler.h
new file mode 100644
index 0000000..9908d2c
--- /dev/null
+++ b/chrome/browser/ui/ash/wallpaper_policy_handler.h
@@ -0,0 +1,71 @@
+// 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_ASH_WALLPAPER_POLICY_HANDLER_H_
+#define CHROME_BROWSER_UI_ASH_WALLPAPER_POLICY_HANDLER_H_
+
+#include "ash/public/interfaces/wallpaper.mojom.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/settings/cros_settings.h"
+#include "url/gurl.h"
+
+namespace chromeos {
+class CustomizationWallpaperDownloader;
+}  // namespace chromeos
+
+// This class observes changes of wallpaper device policy kDeviceWallpaperImage.
+// It's responsible for downloading the new device policy controlled wallpaper
+// and saving it to local file system if the provided hash value matches the
+// downloaded wallpaper. It then notifies its delegate about the changes. The
+// delegate will decide if/when to set device policy controlled wallpaper.
+class WallpaperPolicyHandler {
+ public:
+  // Delegate of WallpaperPolicyHandler.
+  class Delegate {
+   public:
+    virtual void OnDeviceWallpaperChanged() = 0;
+    virtual void OnDeviceWallpaperPolicyCleared() = 0;
+
+   protected:
+    virtual ~Delegate() {}
+  };
+
+  explicit WallpaperPolicyHandler(Delegate* delegate);
+  ~WallpaperPolicyHandler();
+
+  // Returns true if the device wallpaper policy is currently in effect.
+  bool IsDeviceWallpaperPolicyEnforced();
+
+ private:
+  // Gets the device policy controlled wallpaper's url and hash values. Returns
+  // false if the values can't be retrieved.
+  bool GetDeviceWallpaperPolicyStrings(std::string* url, std::string* hash);
+
+  // This is called whenever the device wallpaper policy changes.
+  void DeviceWallpaperPolicyChanged();
+
+  void OnDeviceWallpaperFileExists(bool exists);
+  void OnCheckExistingDeviceWallpaperMatchHash(const std::string& url,
+                                               const std::string& hash,
+                                               bool match);
+  void OnDeviceWallpaperDownloaded(const std::string& hash,
+                                   bool success,
+                                   const GURL& url);
+  void OnCheckFetchedDeviceWallpaperMatchHash(bool match);
+
+  base::FilePath device_wallpaper_file_path_;
+  Delegate* delegate_;
+
+  std::unique_ptr<chromeos::CrosSettings::ObserverSubscription>
+      device_wallpaper_image_subscription_;
+  std::unique_ptr<chromeos::CustomizationWallpaperDownloader>
+      device_wallpaper_downloader_;
+
+  base::WeakPtrFactory<WallpaperPolicyHandler> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(WallpaperPolicyHandler);
+};
+
+#endif  // CHROME_BROWSER_UI_ASH_WALLPAPER_POLICY_HANDLER_H_
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5bec651..bbdea68 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1672,17 +1672,14 @@
   task_manager::WebContentsTags::CreateForTabContents(new_contents);
 }
 
-void Browser::RendererUnresponsive(
-    WebContents* source,
-    const content::WebContentsUnresponsiveState& unresponsive_state) {
+void Browser::RendererUnresponsive(WebContents* source) {
   // Ignore hangs if a tab is blocked.
   int index = tab_strip_model_->GetIndexOfWebContents(source);
   DCHECK_NE(TabStripModel::kNoTab, index);
   if (tab_strip_model_->IsTabBlocked(index))
     return;
 
-  TabDialogs::FromWebContents(source)->ShowHungRendererDialog(
-      unresponsive_state);
+  TabDialogs::FromWebContents(source)->ShowHungRendererDialog();
 }
 
 void Browser::RendererResponsive(WebContents* source) {
@@ -1702,7 +1699,7 @@
 content::ColorChooser* Browser::OpenColorChooser(
     WebContents* web_contents,
     SkColor initial_color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   return chrome::ShowColorChooser(web_contents, initial_color);
 }
 
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index c7b40094..c5b8ccda 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -618,9 +618,7 @@
                           const std::string& frame_name,
                           const GURL& target_url,
                           content::WebContents* new_contents) override;
-  void RendererUnresponsive(
-      content::WebContents* source,
-      const content::WebContentsUnresponsiveState& unresponsive_state) override;
+  void RendererUnresponsive(content::WebContents* source) override;
   void RendererResponsive(content::WebContents* source) override;
   void DidNavigateMainFramePostCommit(
       content::WebContents* web_contents) override;
@@ -629,7 +627,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
       override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const content::FileChooserParams& params) override;
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index b8e1c65..493ccbc 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -1856,8 +1856,8 @@
 IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose1) {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kDisablePopupBlocking);
-  GURL url = ui_test_utils::GetTestUrl(
-      base::FilePath(), base::FilePath().AppendASCII("window.close.html"));
+  ASSERT_TRUE(embedded_test_server()->Start());
+  GURL url = embedded_test_server()->GetURL("/window.close.html");
   GURL::Replacements add_query;
   std::string query("test1");
   add_query.SetQuery(query.c_str(), url::Component(0, query.length()));
@@ -1873,8 +1873,8 @@
 IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose2) {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kDisablePopupBlocking);
-  GURL url = ui_test_utils::GetTestUrl(
-      base::FilePath(), base::FilePath().AppendASCII("window.close.html"));
+  ASSERT_TRUE(embedded_test_server()->Start());
+  GURL url = embedded_test_server()->GetURL("/window.close.html");
   GURL::Replacements add_query;
   std::string query("test2");
   add_query.SetQuery(query.c_str(), url::Component(0, query.length()));
@@ -1890,8 +1890,8 @@
 IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose3) {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kDisablePopupBlocking);
-  GURL url = ui_test_utils::GetTestUrl(
-      base::FilePath(), base::FilePath().AppendASCII("window.close.html"));
+  ASSERT_TRUE(embedded_test_server()->Start());
+  GURL url = embedded_test_server()->GetURL("/window.close.html");
   GURL::Replacements add_query;
   std::string query("test3");
   add_query.SetQuery(query.c_str(), url::Component(0, query.length()));
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
index b2645ac..1d5a8a8c 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -402,19 +402,19 @@
 }
 
 - (NSRect)titleRectForBounds:(NSRect)theRect {
+  // This lays out textRect for LTR and flips it for RTL at the end, if needed.
   NSRect textRect = [super titleRectForBounds:theRect];
   NSRect imageRect = [self imageRectForBounds:theRect];
-  if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
-    textRect.origin.x = kTrailingPadding;
-    if (drawFolderArrow_) {
-      textRect.origin.x +=
-          [arrowImage_ size].width + kHierarchyButtonTrailingPadding;
-    }
-    textRect.size.width =
-        NSMinX(imageRect) - textRect.origin.x - kIconTextSpacer;
-  } else {
-    textRect.origin.x = NSMaxX(imageRect) + kIconTextSpacer;
-  }
+  CGFloat imageEnd = cocoa_l10n_util::ShouldDoExperimentalRTLLayout()
+                         ? NSWidth(theRect) - NSMinX(imageRect)  // Un-flip
+                         : NSMaxX(imageRect);
+  textRect.origin.x = imageEnd + kIconTextSpacer;
+  textRect.size.width = NSWidth(theRect) - NSMinX(textRect) - kTrailingPadding;
+  if (drawFolderArrow_)
+    textRect.size.width -=
+        [arrowImage_ size].width + kHierarchyButtonTrailingPadding;
+  if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
+    textRect.origin.x = NSWidth(theRect) - NSWidth(textRect) - NSMinX(textRect);
   return textRect;
 }
 
diff --git a/chrome/browser/ui/cocoa/download/md_download_item_view.mm b/chrome/browser/ui/cocoa/download/md_download_item_view.mm
index fca2cdb0..8e2cc79 100644
--- a/chrome/browser/ui/cocoa/download/md_download_item_view.mm
+++ b/chrome/browser/ui/cocoa/download/md_download_item_view.mm
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #import "chrome/browser/ui/cocoa/download/md_download_item_view.h"
+#import "chrome/browser/ui/cocoa/download/md_download_item_view_testing.h"
 
 #include "base/strings/sys_string_conversions.h"
 #include "chrome/app/vector_icons/vector_icons.h"
@@ -633,3 +634,15 @@
 }
 
 @end
+
+@implementation MDDownloadItemView (Testing)
+
+- (NSButton*)primaryButton {
+  return button_;
+}
+
+- (NSButton*)menuButton {
+  return menuButton_;
+}
+
+@end
diff --git a/chrome/browser/ui/cocoa/download/md_download_item_view_testing.h b/chrome/browser/ui/cocoa/download/md_download_item_view_testing.h
new file mode 100644
index 0000000..4570055
--- /dev/null
+++ b/chrome/browser/ui/cocoa/download/md_download_item_view_testing.h
@@ -0,0 +1,15 @@
+// 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_DOWNLOAD_MD_DOWNLOAD_ITEM_VIEW_TESTING_H_
+#define CHROME_BROWSER_UI_COCOA_DOWNLOAD_MD_DOWNLOAD_ITEM_VIEW_TESTING_H_
+
+#import "chrome/browser/ui/cocoa/download/md_download_item_view.h"
+
+@interface MDDownloadItemView (Testing)
+@property(readonly) NSButton* primaryButton;
+@property(readonly) NSButton* menuButton;
+@end
+
+#endif  // CHROME_BROWSER_UI_COCOA_DOWNLOAD_MD_DOWNLOAD_ITEM_VIEW_TESTING_H_
diff --git a/chrome/browser/ui/cocoa/download/md_download_item_view_unittest.mm b/chrome/browser/ui/cocoa/download/md_download_item_view_unittest.mm
index 6b1a4b4c..ddb32743 100644
--- a/chrome/browser/ui/cocoa/download/md_download_item_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/md_download_item_view_unittest.mm
@@ -2,13 +2,14 @@
 // 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/download/md_download_item_view.h"
+#import "chrome/browser/ui/cocoa/download/md_download_item_view_testing.h"
 
 #include "base/files/file_path.h"
 #import "base/mac/scoped_nsobject.h"
 #include "chrome/browser/download/download_item_model.h"
 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
 #include "content/public/test/mock_download_item.h"
+#include "testing/gtest_mac.h"
 
 namespace {
 
@@ -61,4 +62,19 @@
   set_state_and_display();
 }
 
+// Verify that the key view loop is empty when full keyboard access is off and
+// comprises the controls when it is on.
+TEST_F(MDDownloadItemViewTest, TestKeyboardAccess) {
+  EXPECT_NSEQ(test_window().validKeyViews, (@[
+                // Nothing.
+              ]));
+
+  test_window().pretendFullKeyboardAccessIsEnabled = YES;
+
+  EXPECT_NSEQ(test_window().validKeyViews, (@[
+                view_.primaryButton,
+                view_.menuButton,
+              ]));
+}
+
 }  // namespace
diff --git a/chrome/browser/ui/cocoa/tab_dialogs_cocoa.h b/chrome/browser/ui/cocoa/tab_dialogs_cocoa.h
index 01b9b6ce..f5c0d32 100644
--- a/chrome/browser/ui/cocoa/tab_dialogs_cocoa.h
+++ b/chrome/browser/ui/cocoa/tab_dialogs_cocoa.h
@@ -17,8 +17,7 @@
   // TabDialogs:
   gfx::NativeView GetDialogParentView() const override;
   void ShowCollectedCookies() override;
-  void ShowHungRendererDialog(
-      const content::WebContentsUnresponsiveState& unresponsive_state) override;
+  void ShowHungRendererDialog() override;
   void HideHungRendererDialog() override;
   bool IsShowingHungRendererDialog() override;
   void ShowProfileSigninConfirmation(
diff --git a/chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm b/chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm
index fe74fa8..f4a2332 100644
--- a/chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm
+++ b/chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm
@@ -51,8 +51,7 @@
   new CollectedCookiesMac(web_contents_);
 }
 
-void TabDialogsCocoa::ShowHungRendererDialog(
-    const content::WebContentsUnresponsiveState& unresponsive_state) {
+void TabDialogsCocoa::ShowHungRendererDialog() {
   [HungRendererController showForWebContents:web_contents_];
 }
 
diff --git a/chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_cocoa.mm b/chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_views_cocoa.mm
similarity index 73%
rename from chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_cocoa.mm
rename to chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_views_cocoa.mm
index bad6d18..dd2a1499 100644
--- a/chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_cocoa.mm
+++ b/chrome/browser/ui/cocoa/translate/translate_bubble_test_utils_views_cocoa.mm
@@ -6,9 +6,11 @@
 
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h"
 #include "chrome/browser/ui/cocoa/browser_window_controller.h"
 #include "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h"
 #include "chrome/browser/ui/translate/translate_bubble_model.h"
+#include "chrome/browser/ui/views/translate/translate_bubble_view.h"
 
 // TODO(groby): Share with translate_bubble_controller_unittest.mm
 @implementation BrowserWindowController (ForTesting)
@@ -25,6 +27,11 @@
 
 const TranslateBubbleModel* GetCurrentModel(Browser* browser) {
   DCHECK(browser);
+  if (chrome::ShowAllDialogsWithViewsToolkit()) {
+    TranslateBubbleView* view = TranslateBubbleView::GetCurrentBubble();
+    return view ? view->model() : nullptr;
+  }
+
   NSWindow* native_window = browser->window()->GetNativeWindow();
   BrowserWindowController* controller =
       [BrowserWindowController browserWindowControllerForWindow:native_window];
@@ -33,6 +40,14 @@
 
 void PressTranslate(Browser* browser) {
   DCHECK(browser);
+
+  if (chrome::ShowAllDialogsWithViewsToolkit()) {
+    TranslateBubbleView* bubble = TranslateBubbleView::GetCurrentBubble();
+    DCHECK(bubble);
+    bubble->HandleButtonPressed(TranslateBubbleView::BUTTON_ID_TRANSLATE);
+    return;
+  }
+
   NSWindow* native_window = browser->window()->GetNativeWindow();
   BrowserWindowController* controller =
       [BrowserWindowController browserWindowControllerForWindow:native_window];
diff --git a/chrome/browser/ui/extensions/hosted_app_browsertest.cc b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
index 5da7b984..23fa3bc 100644
--- a/chrome/browser/ui/extensions/hosted_app_browsertest.cc
+++ b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
@@ -163,7 +163,8 @@
 };
 
 // Tests that "Open link in new tab" opens a link in a foreground tab.
-IN_PROC_BROWSER_TEST_P(HostedAppTest, OpenLinkInNewTab) {
+// Flaky, see https://crbug.com/795055
+IN_PROC_BROWSER_TEST_P(HostedAppTest, DISABLED_OpenLinkInNewTab) {
   SetupApp("app", true);
 
   const GURL url("http://www.foo.com/");
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc
index 997225c..c404772 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.cc
+++ b/chrome/browser/ui/hung_plugin_tab_helper.cc
@@ -49,8 +49,7 @@
     const content::ChildProcessData& data = iter.GetData();
     if (data.id == child_id) {
 #if defined(OS_WIN)
-      base::StringPairs crash_keys = {{"hung-reason", "plugin"}};
-      CrashDumpAndTerminateHungChildProcess(data.handle, crash_keys);
+      CrashDumpAndTerminateHungChildProcess(data.handle);
 #else
       base::Process process =
           base::Process::DeprecatedGetProcessFromHandle(data.handle);
diff --git a/chrome/browser/ui/hung_renderer_browsertest.cc b/chrome/browser/ui/hung_renderer_browsertest.cc
index 5fa897e7..e1ae48d 100644
--- a/chrome/browser/ui/hung_renderer_browsertest.cc
+++ b/chrome/browser/ui/hung_renderer_browsertest.cc
@@ -10,7 +10,6 @@
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/test/test_browser_dialog.h"
 #include "chrome/test/base/ui_test_utils.h"
-#include "content/public/browser/web_contents_unresponsive_state.h"
 #include "content/public/test/browser_test_utils.h"
 #include "net/dns/mock_host_resolver.h"
 #include "ui/base/ui_features.h"
@@ -39,8 +38,7 @@
       browser(), embedded_test_server()->GetURL("a.com", "/title1.html"));
   content::WebContents* active_web_contents =
       browser()->tab_strip_model()->GetActiveWebContents();
-  TabDialogs::FromWebContents(active_web_contents)
-      ->ShowHungRendererDialog(content::WebContentsUnresponsiveState());
+  TabDialogs::FromWebContents(active_web_contents)->ShowHungRendererDialog();
   ui_test_utils::NavigateToURL(
       browser(), embedded_test_server()->GetURL("b.com", "/title2.html"));
   // Expect that the dialog has been dismissed.
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 90edb88c..0eb310d4 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -37,7 +37,6 @@
 #include "components/bookmarks/browser/bookmark_utils.h"
 #include "components/bookmarks/test/bookmark_test_helpers.h"
 #include "components/history/core/browser/history_service.h"
-#include "components/history/core/browser/history_service_observer.h"
 #include "components/omnibox/browser/autocomplete_input.h"
 #include "components/omnibox/browser/autocomplete_match.h"
 #include "components/omnibox/browser/history_quick_provider.h"
@@ -150,8 +149,7 @@
 }  // namespace
 
 class OmniboxViewTest : public InProcessBrowserTest,
-                        public content::NotificationObserver,
-                        public history::HistoryServiceObserver {
+                        public content::NotificationObserver {
  public:
   OmniboxViewTest() {}
 
@@ -318,19 +316,9 @@
                                         history::SOURCE_BROWSED);
     if (entry.starred)
       bookmarks::AddIfNotBookmarked(bookmark_model, url, base::string16());
-    // Wait at least for the AddPageWithDetails() call to finish.
-    {
-      ScopedObserver<history::HistoryService, history::HistoryServiceObserver>
-          observer(this);
-      observer.Add(history_service);
-      content::RunMessageLoop();
-      // We don't want to return until all observers have processed this
-      // notification, because some (e.g. the in-memory history database) may do
-      // something important.  Since we don't know where in the observer list we
-      // stand, just spin the message loop once more to allow the current
-      // callstack to complete.
-      content::RunAllPendingInMessageLoop();
-    }
+
+    // Running the task scheduler until idle finishes AddPageWithDetails.
+    content::RunAllTasksUntilIdle();
   }
 
   void SetupHistory() {
@@ -369,11 +357,6 @@
     base::RunLoop::QuitCurrentWhenIdleDeprecated();
   }
 
-  void OnURLsModified(history::HistoryService* history_service,
-                      const history::URLRows& changed_urls) override {
-    base::RunLoop::QuitCurrentWhenIdleDeprecated();
-  }
-
  private:
   DISALLOW_COPY_AND_ASSIGN(OmniboxViewTest);
 };
diff --git a/chrome/browser/ui/passwords/account_avatar_fetcher.h b/chrome/browser/ui/passwords/account_avatar_fetcher.h
index 3dae0a94..0ae07e8 100644
--- a/chrome/browser/ui/passwords/account_avatar_fetcher.h
+++ b/chrome/browser/ui/passwords/account_avatar_fetcher.h
@@ -27,7 +27,7 @@
 
 // Helper class to download an avatar. It deletes itself once the request is
 // done.
-class AccountAvatarFetcher : public chrome::BitmapFetcherDelegate {
+class AccountAvatarFetcher : public BitmapFetcherDelegate {
  public:
   AccountAvatarFetcher(
       const GURL& url,
@@ -38,10 +38,10 @@
   void Start(content::mojom::URLLoaderFactory* loader_factory);
 
  private:
-  // chrome::BitmapFetcherDelegate:
+  // BitmapFetcherDelegate:
   void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override;
 
-  chrome::BitmapFetcher fetcher_;
+  BitmapFetcher fetcher_;
   base::WeakPtr<AccountAvatarFetcherDelegate> delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(AccountAvatarFetcher);
diff --git a/chrome/browser/ui/tab_dialogs.h b/chrome/browser/ui/tab_dialogs.h
index cb2ecdc..f5365a7 100644
--- a/chrome/browser/ui/tab_dialogs.h
+++ b/chrome/browser/ui/tab_dialogs.h
@@ -16,7 +16,6 @@
 
 namespace content {
 class WebContents;
-struct WebContentsUnresponsiveState;
 }
 
 namespace ui {
@@ -43,8 +42,7 @@
   virtual void ShowCollectedCookies() = 0;
 
   // Shows or hides the hung renderer dialog.
-  virtual void ShowHungRendererDialog(
-      const content::WebContentsUnresponsiveState& unresponsive_state) = 0;
+  virtual void ShowHungRendererDialog() = 0;
   virtual void HideHungRendererDialog() = 0;
   virtual bool IsShowingHungRendererDialog() = 0;
 
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
index 1dcaa1b..64464d354 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
@@ -9,10 +9,8 @@
 #include <vector>
 
 #include "base/callback_forward.h"
-#include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
-#include "base/task_scheduler/post_task.h"
 #include "build/build_config.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/extension_util.h"
@@ -23,13 +21,13 @@
 #include "chrome/grit/generated_resources.h"
 #include "extensions/browser/extension_prefs.h"
 #include "extensions/browser/extension_system.h"
+#include "extensions/browser/path_util.h"
 #include "extensions/common/extension.h"
 #include "extensions/common/manifest.h"
 #include "extensions/common/manifest_handlers/shared_module_info.h"
 #include "extensions/common/manifest_url_handlers.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/models/combobox_model.h"
-#include "ui/base/text/bytes_formatting.h"
 #include "ui/gfx/geometry/insets.h"
 #include "ui/views/controls/combobox/combobox.h"
 #include "ui/views/controls/label.h"
@@ -283,21 +281,13 @@
 }
 
 void AppInfoSummaryPanel::StartCalculatingAppSize() {
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
-      base::Bind(&base::ComputeDirectorySize, app_->path()),
+  extensions::path_util::CalculateAndFormatExtensionDirectorySize(
+      app_->path(), IDS_APPLICATION_INFO_SIZE_SMALL_LABEL,
       base::Bind(&AppInfoSummaryPanel::OnAppSizeCalculated, AsWeakPtr()));
 }
 
-void AppInfoSummaryPanel::OnAppSizeCalculated(int64_t app_size_in_bytes) {
-  const int one_mebibyte_in_bytes = 1024 * 1024;
-  if (app_size_in_bytes < one_mebibyte_in_bytes) {
-    size_value_->SetText(
-        l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SIZE_SMALL_LABEL));
-  } else {
-    size_value_->SetText(ui::FormatBytesWithUnits(
-        app_size_in_bytes, ui::DATA_UNITS_MEBIBYTE, true));
-  }
+void AppInfoSummaryPanel::OnAppSizeCalculated(const base::string16& size) {
+  size_value_->SetText(size);
 }
 
 extensions::LaunchType AppInfoSummaryPanel::GetLaunchType() const {
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
index dacdb70e..f370929c 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
@@ -57,7 +57,7 @@
   // Called asynchronously to calculate and update the size of the app displayed
   // in the dialog.
   void StartCalculatingAppSize();
-  void OnAppSizeCalculated(int64_t app_size_in_bytes);
+  void OnAppSizeCalculated(const base::string16& size);
 
   // Returns the launch type of the app (e.g. pinned tab, fullscreen, etc).
   extensions::LaunchType GetLaunchType() const;
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
index f053e4d..bfad169 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
@@ -353,6 +353,8 @@
     // case if the user exits fullscreen via the restore button.
     if (controller_->IsEnabled() &&
         new_state != ash::mojom::WindowStateType::FULLSCREEN &&
+        new_state != ash::mojom::WindowStateType::PINNED &&
+        new_state != ash::mojom::WindowStateType::TRUSTED_PINNED &&
         new_state != ash::mojom::WindowStateType::MINIMIZED &&
         old_state == ash::mojom::WindowStateType::FULLSCREEN) {
       browser_view_->FullscreenStateChanged();
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
index ef78ca0..3628b60 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
@@ -8,6 +8,8 @@
 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
 #include "ash/public/cpp/immersive/immersive_fullscreen_controller_test_api.h"
 #include "ash/public/cpp/shelf_types.h"
+#include "ash/public/cpp/window_properties.h"
+#include "ash/public/interfaces/window_pin_type.mojom.h"
 #include "ash/root_window_controller.h"
 #include "ash/shelf/shelf_layout_manager.h"
 #include "ash/shell.h"
@@ -282,3 +284,12 @@
   ToggleFullscreen();
   EXPECT_TRUE(tabstrip->CanPaintThrobberToLayer());
 }
+
+// Make sure that going from regular fullscreen to locked fullscreen does not
+// cause a crash. crbug.com/796171
+TEST_F(ImmersiveModeControllerAshTest, RegularFullscreenToLockedFullscreen) {
+  ToggleFullscreen();
+  // Set locked fullscreen state.
+  browser()->window()->GetNativeWindow()->SetProperty(
+      ash::kWindowPinTypeKey, ash::mojom::WindowPinType::TRUSTED_PINNED);
+}
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index c740c91..4e505c1 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -57,7 +57,6 @@
 #endif
 
 using content::WebContents;
-using content::WebContentsUnresponsiveState;
 
 HungRendererDialogView* HungRendererDialogView::g_instance_ = NULL;
 
@@ -212,9 +211,7 @@
 }
 
 // static
-void HungRendererDialogView::Show(
-    WebContents* contents,
-    const WebContentsUnresponsiveState& unresponsive_state) {
+void HungRendererDialogView::Show(WebContents* contents) {
   if (logging::DialogsAreSuppressed())
     return;
 
@@ -228,7 +225,7 @@
     return;
 #endif
   HungRendererDialogView* view = HungRendererDialogView::Create(window);
-  view->ShowForWebContents(contents, unresponsive_state);
+  view->ShowForWebContents(contents);
 }
 
 // static
@@ -255,9 +252,7 @@
   hung_pages_table_->SetModel(NULL);
 }
 
-void HungRendererDialogView::ShowForWebContents(
-    WebContents* contents,
-    const content::WebContentsUnresponsiveState& unresponsive_state) {
+void HungRendererDialogView::ShowForWebContents(WebContents* contents) {
   DCHECK(contents && GetWidget());
 
   // Don't show the warning unless the foreground window is the frame, or this
@@ -306,7 +301,6 @@
                                          hung_pages_table_model_->RowCount()));
     Layout();
 
-    unresponsive_state_ = unresponsive_state;
     // Make Widget ask for the window title again.
     GetWidget()->UpdateWindowTitle();
 
@@ -370,20 +364,8 @@
       hung_pages_table_model_->GetRenderProcessHost();
   if (rph) {
 #if defined(OS_WIN)
-    base::StringPairs crash_keys;
-
-    crash_keys.push_back(std::make_pair(
-        "hung-outstanding-acks",
-        base::IntToString(unresponsive_state_.outstanding_ack_count)));
-    crash_keys.push_back(std::make_pair(
-        "hung-outstanding-event-type",
-        base::IntToString(unresponsive_state_.outstanding_event_type)));
-    crash_keys.push_back(
-        std::make_pair("hung-last-event-type",
-                       base::IntToString(unresponsive_state_.last_event_type)));
-
     // Try to generate a crash report for the hung process.
-    CrashDumpAndTerminateHungChildProcess(rph->GetHandle(), crash_keys);
+    CrashDumpAndTerminateHungChildProcess(rph->GetHandle());
 #else
     rph->Shutdown(content::RESULT_CODE_HUNG, false);
 #endif
diff --git a/chrome/browser/ui/views/hung_renderer_view.h b/chrome/browser/ui/views/hung_renderer_view.h
index 07857514f..4c340bc 100644
--- a/chrome/browser/ui/views/hung_renderer_view.h
+++ b/chrome/browser/ui/views/hung_renderer_view.h
@@ -7,9 +7,7 @@
 
 #include "base/macros.h"
 #include "components/favicon/content/content_favicon_driver.h"
-#include "content/public/browser/web_contents_delegate.h"
 #include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_unresponsive_state.h"
 #include "ui/base/models/table_model.h"
 #include "ui/views/controls/button/button.h"
 #include "ui/views/controls/table/table_view.h"
@@ -110,17 +108,13 @@
   static HungRendererDialogView* GetInstance();
 
   // Shows or hides the hung renderer dialog for the given WebContents.
-  static void Show(
-      content::WebContents* contents,
-      const content::WebContentsUnresponsiveState& unresponsive_state);
+  static void Show(content::WebContents* contents);
   static void Hide(content::WebContents* contents);
 
   // Returns true if the frame is in the foreground.
   static bool IsFrameActive(content::WebContents* contents);
 
-  virtual void ShowForWebContents(
-      content::WebContents* contents,
-      const content::WebContentsUnresponsiveState& unresponsive_state);
+  virtual void ShowForWebContents(content::WebContents* contents);
   virtual void EndForWebContents(content::WebContents* contents);
 
   // views::DialogDelegateView overrides:
@@ -170,10 +164,6 @@
   // Whether or not we've created controls for ourself.
   bool initialized_;
 
-  // A copy of the unresponsive state which ShowForWebContents was
-  // called with.
-  content::WebContentsUnresponsiveState unresponsive_state_;
-
   DISALLOW_COPY_AND_ASSIGN(HungRendererDialogView);
 };
 
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc
index e69ae6aa..9d4c0f7 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc
@@ -389,7 +389,8 @@
   // Create a different profile and then lock it.
   Profile* signed_in = CreateTestingProfile("signed_in");
   SetupProfilesForLock(signed_in);
-  extensions::ExtensionSystem::Get(signed_in)->InitForRegularProfile(true);
+  extensions::ExtensionSystem::Get(signed_in)->InitForRegularProfile(
+      true /* extensions_enabled */);
   Browser* browser_to_lock = CreateBrowser(signed_in);
   EXPECT_EQ(2U, BrowserList::GetInstance()->size());
 
diff --git a/chrome/browser/ui/views/tab_dialogs_views.cc b/chrome/browser/ui/views/tab_dialogs_views.cc
index f433a4f..dec207847 100644
--- a/chrome/browser/ui/views/tab_dialogs_views.cc
+++ b/chrome/browser/ui/views/tab_dialogs_views.cc
@@ -41,9 +41,8 @@
   new CollectedCookiesViews(web_contents_);
 }
 
-void TabDialogsViews::ShowHungRendererDialog(
-    const content::WebContentsUnresponsiveState& unresponsive_state) {
-  HungRendererDialogView::Show(web_contents_, unresponsive_state);
+void TabDialogsViews::ShowHungRendererDialog() {
+  HungRendererDialogView::Show(web_contents_);
 }
 
 void TabDialogsViews::HideHungRendererDialog() {
diff --git a/chrome/browser/ui/views/tab_dialogs_views.h b/chrome/browser/ui/views/tab_dialogs_views.h
index efdda54c..505f250 100644
--- a/chrome/browser/ui/views/tab_dialogs_views.h
+++ b/chrome/browser/ui/views/tab_dialogs_views.h
@@ -17,8 +17,7 @@
   // TabDialogs:
   gfx::NativeView GetDialogParentView() const override;
   void ShowCollectedCookies() override;
-  void ShowHungRendererDialog(
-      const content::WebContentsUnresponsiveState& unresponsive_state) override;
+  void ShowHungRendererDialog() override;
   void HideHungRendererDialog() override;
   bool IsShowingHungRendererDialog() override;
   void ShowProfileSigninConfirmation(
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc
index b7ff326..78162ce 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -14,7 +14,9 @@
 #include "base/memory/singleton.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
+#include "chrome/browser/platform_util.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/translate/chrome_translate_client.h"
 #include "chrome/browser/translate/translate_service.h"
@@ -134,6 +136,17 @@
       new TranslateBubbleModelImpl(step, std::move(ui_delegate)));
   TranslateBubbleView* view = new TranslateBubbleView(
       anchor_view, anchor_point, std::move(model), error_type, web_contents);
+
+#if defined(OS_MACOSX)
+  // On Mac, there's no anchor view (|anchor_point| is used to position).
+  // However, the bubble will be set up with no parent and no anchor. That needs
+  // to be set up before showing the bubble.
+  DCHECK(!anchor_view);
+  view->set_arrow(views::BubbleBorder::TOP_RIGHT);
+  view->set_parent_window(
+      platform_util::GetViewForWindow(web_contents->GetTopLevelNativeWindow()));
+#endif
+
   views::Widget* bubble_widget =
       views::BubbleDialogDelegateView::CreateBubble(view);
   view->ShowForReason(reason);
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc b/chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc
index bbc1767c7..dd23a64 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc
@@ -11,6 +11,7 @@
 #include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_feature_list.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/translate/chrome_translate_client.h"
 #include "chrome/browser/ui/browser.h"
@@ -25,6 +26,7 @@
 #include "components/translate/core/common/language_detection_details.h"
 #include "content/public/browser/notification_details.h"
 #include "ui/base/l10n/l10n_util.h"
+#include "ui/base/ui_base_features.h"
 #include "ui/events/keycodes/dom/dom_code.h"
 #include "ui/views/controls/button/menu_button.h"
 
@@ -34,7 +36,15 @@
   ~TranslateBubbleViewBrowserTest() override {}
 
   void SetUp() override {
+#if defined(OS_MACOSX)
+    // Enable the bubble on Mac (otherwise infobars are used).
+    base::CommandLine::ForCurrentProcess()->AppendSwitch(
+        ::switches::kEnableTranslateNewUX);
+    // Enable toolkit-views bubbles on Mac (otherwise Cocoa bubbles are used).
+    feature_list_.InitAndEnableFeature(features::kSecondaryUiMd);
+#else
     feature_list_.InitAndDisableFeature(translate::kTranslateUI2016Q2);
+#endif
     set_open_about_blank_on_browser_launch(true);
     translate::TranslateManager::SetIgnoreMissingKeyForTesting(true);
     InProcessBrowserTest::SetUp();
diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
index cc49e53..5e86e4f 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
@@ -232,10 +232,6 @@
 int AppLaunchSplashScreenHandler::GetProgressMessageFromState(
     AppLaunchState state) {
   switch (state) {
-    case APP_LAUNCH_STATE_LOADING_AUTH_FILE:
-    case APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE:
-      // TODO(zelidrag): Add better string for this one than "Please wait..."
-      return IDS_SYNC_SETUP_SPINNER_TITLE;
     case APP_LAUNCH_STATE_PREPARING_NETWORK:
       return IDS_APP_START_NETWORK_WAIT_MESSAGE;
     case APP_LAUNCH_STATE_INSTALLING_APPLICATION:
diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
index 6419629..906891b 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
@@ -60,7 +60,7 @@
   AppLaunchSplashScreenHandler::Delegate* delegate_ = nullptr;
   bool show_on_init_ = false;
   std::string app_id_;
-  AppLaunchState state_ = APP_LAUNCH_STATE_LOADING_AUTH_FILE;
+  AppLaunchState state_ = APP_LAUNCH_STATE_PREPARING_NETWORK;
 
   scoped_refptr<NetworkStateInformer> network_state_informer_;
   ErrorScreen* error_screen_;
diff --git a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
index 002553f..cc8e4a4 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc
@@ -17,6 +17,7 @@
 #include "base/time/time.h"
 #include "base/values.h"
 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
+#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
 #include "chromeos/network/network_state_handler.h"
 #include "content/public/browser/web_ui.h"
 #include "ui/base/models/menu_model.h"
@@ -151,7 +152,8 @@
 }
 
 void NetworkDropdown::OpenButtonOptions() {
-  LoginDisplayHost::default_host()->OpenInternetDetailDialog("");
+  // Empty string opens the internet detail dialog for the default network.
+  InternetDetailDialog::ShowDialog("");
 }
 
 bool NetworkDropdown::ShouldOpenButtonOptions() const {
diff --git a/chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.cc
index 648236b9..8cd3308 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.cc
@@ -4,9 +4,9 @@
 
 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h"
 
-#include "chrome/browser/chromeos/login/ui/login_display_host.h"
 #include "chrome/browser/chromeos/login/ui/login_display_webui.h"
 #include "chrome/browser/chromeos/options/network_config_view.h"
+#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown.h"
 #include "chrome/grit/generated_resources.h"
 #include "chromeos/network/network_handler.h"
@@ -78,7 +78,7 @@
 
 void NetworkDropdownHandler::HandleLaunchInternetDetailDialog() {
   // Empty string opens the internet detail dialog for the default network.
-  LoginDisplayHost::default_host()->OpenInternetDetailDialog("");
+  InternetDetailDialog::ShowDialog("");
 }
 
 void NetworkDropdownHandler::HandleLaunchAddWiFiNetworkDialog() {
@@ -96,7 +96,7 @@
     const base::ListValue* args) {
   std::string guid;
   args->GetString(0, &guid);
-  LoginDisplayHost::default_host()->OpenInternetDetailDialog(guid);
+  InternetDetailDialog::ShowDialog(guid);
 }
 
 void NetworkDropdownHandler::OnConnectToNetworkRequested() {
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index cda087a..af4dfdc 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -70,6 +70,7 @@
 #include "chrome/browser/signin/easy_unlock_service.h"
 #include "chrome/browser/ui/ash/session_controller_client.h"
 #include "chrome/browser/ui/ash/tablet_mode_client.h"
+#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h"
 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
@@ -1350,7 +1351,8 @@
 }
 
 void SigninScreenHandler::HandleOpenInternetDetailDialog() {
-  LoginDisplayHost::default_host()->OpenInternetDetailDialog("");
+  // Empty string opens the internet detail dialog for the default network.
+  InternetDetailDialog::ShowDialog("");
 }
 
 void SigninScreenHandler::HandleLoginVisible(const std::string& source) {
diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc
index ba1d575..d7d3a15 100644
--- a/chrome/browser/ui/webui/extensions/extensions_ui.cc
+++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc
@@ -197,6 +197,8 @@
   source->AddLocalizedString("itemErrors", IDS_MD_EXTENSIONS_ITEM_ERRORS);
   source->AddLocalizedString("appIcon", IDS_MD_EXTENSIONS_APP_ICON);
   source->AddLocalizedString("extensionIcon", IDS_MD_EXTENSIONS_EXTENSION_ICON);
+  source->AddLocalizedString("extensionA11yAssociation",
+                             IDS_MD_EXTENSIONS_EXTENSION_A11Y_ASSOCIATION);
   source->AddLocalizedString("itemIdHeading",
                              IDS_MD_EXTENSIONS_ITEM_ID_HEADING);
   source->AddLocalizedString("extensionEnabled",
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 7d67cea..93e1add7 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -28,6 +28,7 @@
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/bad_message.h"
 #include "chrome/browser/browser_process.h"
+#include "chrome/browser/printing/background_printing_manager.h"
 #include "chrome/browser/printing/print_dialog_cloud.h"
 #include "chrome/browser/printing/print_error_dialog.h"
 #include "chrome/browser/printing/print_job_manager.h"
@@ -1250,11 +1251,20 @@
 
 void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
                                         const base::Value& error) {
-  if (error.is_none()) {
+  if (error.is_none())
     ResolveJavascriptCallback(base::Value(callback_id), error);
-    return;
+  else
+    RejectJavascriptCallback(base::Value(callback_id), error);
+  // Remove the preview dialog from the background printing manager if it is
+  // being stored there. Since the PDF has been sent and the callback is
+  // resolved or rejected, it is no longer needed and can be destroyed.
+  printing::BackgroundPrintingManager* background_printing_manager =
+      g_browser_process->background_printing_manager();
+  if (background_printing_manager->HasPrintPreviewDialog(
+          preview_web_contents())) {
+    background_printing_manager->OnPrintRequestCancelled(
+        preview_web_contents());
   }
-  RejectJavascriptCallback(base::Value(callback_id), error);
 }
 
 void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
index e01769d..298c58d2 100644
--- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
+++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
@@ -13,13 +13,17 @@
 #include "base/metrics/user_metrics_action.h"
 #include "base/synchronization/lock.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h"
 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h"
+#include "chrome/grit/generated_resources.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui.h"
 #include "content/public/browser/web_ui_message_handler.h"
+#include "ui/base/l10n/l10n_util.h"
 
 using safe_browsing::ChromeCleanerController;
 
@@ -37,14 +41,36 @@
 };
 
 // Returns a ListValue containing a copy of the file paths stored in |files|.
-base::ListValue GetFilesAsListStorage(const std::set<base::FilePath>& files) {
-  base::ListValue value;
+std::unique_ptr<base::ListValue> GetFilesAsListStorage(
+    const std::set<base::FilePath>& files) {
+  auto value = base::MakeUnique<base::ListValue>();
   for (const base::FilePath& path : files)
-    value.AppendString(path.value());
+    value->AppendString(path.value());
 
   return value;
 }
 
+// Returns a ListValue containing a copy of the registry keys stored in
+// |registry_keys|.
+std::unique_ptr<base::ListValue> GetRegistryKeysAsListStorage(
+    const std::set<base::string16>& registry_keys) {
+  auto value = base::MakeUnique<base::ListValue>();
+  for (const base::string16& key : registry_keys)
+    value->AppendString(key);
+
+  return value;
+}
+
+base::DictionaryValue GetScannerResultsAsDictionary(
+    const safe_browsing::ChromeCleanerScannerResults& scanner_results) {
+  base::DictionaryValue value;
+  value.SetList("files",
+                GetFilesAsListStorage(scanner_results.files_to_delete()));
+  value.SetList("registryKeys",
+                GetRegistryKeysAsListStorage(scanner_results.registry_keys()));
+  return value;
+}
+
 std::string IdleReasonToString(
     ChromeCleanerController::IdleReason idle_reason) {
   switch (idle_reason) {
@@ -115,6 +141,15 @@
       base::BindRepeating(
           &ChromeCleanupHandler::HandleNotifyChromeCleanupLearnMoreClicked,
           base::Unretained(this)));
+  web_ui()->RegisterMessageCallback(
+      "getMoreItemsPluralString",
+      base::BindRepeating(&ChromeCleanupHandler::HandleGetMoreItemsPluralString,
+                          base::Unretained(this)));
+  web_ui()->RegisterMessageCallback(
+      "getItemsToRemovePluralString",
+      base::BindRepeating(
+          &ChromeCleanupHandler::HandleGetItemsToRemovePluralString,
+          base::Unretained(this)));
 }
 
 void ChromeCleanupHandler::OnJavascriptAllowed() {
@@ -142,13 +177,13 @@
 void ChromeCleanupHandler::OnInfected(
     const safe_browsing::ChromeCleanerScannerResults& scanner_results) {
   FireWebUIListener("chrome-cleanup-on-infected",
-                    GetFilesAsListStorage(scanner_results.files_to_delete()));
+                    GetScannerResultsAsDictionary(scanner_results));
 }
 
 void ChromeCleanupHandler::OnCleaning(
     const safe_browsing::ChromeCleanerScannerResults& scanner_results) {
   FireWebUIListener("chrome-cleanup-on-cleaning",
-                    GetFilesAsListStorage(scanner_results.files_to_delete()));
+                    GetScannerResultsAsDictionary(scanner_results));
 }
 
 void ChromeCleanupHandler::OnRebootRequired() {
@@ -289,4 +324,34 @@
       base::UserMetricsAction("SoftwareReporter.CleanupWebui_LearnMore"));
 }
 
+void ChromeCleanupHandler::HandleGetMoreItemsPluralString(
+    const base::ListValue* args) {
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+  GetPluralString(IDS_SETTINGS_RESET_CLEANUP_DETAILS_MORE, args);
+#endif  // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+}
+
+void ChromeCleanupHandler::HandleGetItemsToRemovePluralString(
+    const base::ListValue* args) {
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+  GetPluralString(IDS_SETTINGS_RESET_CLEANUP_DETAILS_ITEMS_TO_BE_REMOVED, args);
+#endif  // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
+}
+
+void ChromeCleanupHandler::GetPluralString(int id,
+                                           const base::ListValue* args) {
+  CHECK_EQ(2U, args->GetSize());
+
+  std::string callback_id;
+  CHECK(args->GetString(0, &callback_id));
+
+  int num_items = 0;
+  args->GetInteger(1, &num_items);
+  DCHECK_GT(0, num_items);
+
+  ResolveJavascriptCallback(
+      base::Value(callback_id),
+      base::Value(l10n_util::GetPluralStringFUTF16(id, num_items)));
+}
+
 }  // namespace settings
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h
index c0d61a2..c0d2a83 100644
--- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h
+++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h
@@ -76,6 +76,16 @@
   // the "learn more" link was clicked.
   void HandleNotifyChromeCleanupLearnMoreClicked(const base::ListValue* args);
 
+  // Callback for the "getMoreItemsPluralString" message, that obtains the text
+  // string for the "show more" items on the detailed view.
+  void HandleGetMoreItemsPluralString(const base::ListValue* args);
+
+  // Callback for the "getItemsToRemovePluralString" message, that obtains the
+  // text string for the detailed view when user-initiated cleanups are enabled.
+  void HandleGetItemsToRemovePluralString(const base::ListValue* args);
+
+  void GetPluralString(int id, const base::ListValue* args);
+
   // Raw pointer to a singleton. Must outlive this object.
   safe_browsing::ChromeCleanerController* controller_;
 
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index 8243e46..4767004 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -763,7 +763,7 @@
        IDS_SETTINGS_RESET_CLEANUP_EXPLANATION_SCAN_ERROR},
       {"chromeCleanupFindButtonLable",
        IDS_SETTINGS_RESET_CLEANUP_FIND_BUTTON_LABEL},
-      {"chromeCleanupLinkShowFiles",
+      {"chromeCleanupLinkShowItems",
        IDS_SETTINGS_RESET_CLEANUP_LINK_SHOW_FILES},
       {"chromeCleanupLogsUploadPermission", IDS_CHROME_CLEANUP_LOGS_PERMISSION},
       {"chromeCleanupRemoveButtonLabel",
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index 0ac9c00..a67f374 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -432,11 +432,6 @@
                                 base::FEATURE_DISABLED_BY_DEFAULT};
 #endif
 
-// Triggers the preconnector on renderer-initiated navigations. This captures
-// more navigations.
-const base::Feature kPreconnectMore{"PreconnectMore",
-                                    base::FEATURE_DISABLED_BY_DEFAULT};
-
 #if BUILDFLAG(ENABLE_PLUGINS)
 // Prefer HTML content by hiding Flash from the list of plugins.
 // https://crbug.com/626728
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h
index f74ca1f..5863e63 100644
--- a/chrome/common/chrome_features.h
+++ b/chrome/common/chrome_features.h
@@ -215,8 +215,6 @@
 
 extern const base::Feature kPermissionsBlacklist;
 
-extern const base::Feature kPreconnectMore;
-
 #if defined(OS_WIN)
 extern const base::Feature kDisablePostScriptPrinting;
 #endif
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index d1ad56b..fe41e6a 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -343,9 +343,6 @@
 const char kEnablePermissionActionReporting[] =
     "enable-permission-action-reporting";
 
-// Enables the picture in picture feature for videos.
-const char kEnablePictureInPicture[] = "enable-picture-in-picture";
-
 // Enables a number of potentially annoying security features (strict mixed
 // content mode, powerful feature restrictions, etc.)
 const char kEnablePotentiallyAnnoyingSecurityFeatures[] =
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 948a98c..5be55dd 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -112,7 +112,6 @@
 extern const char kEnableOfflineAutoReload[];
 extern const char kEnableOfflineAutoReloadVisibleOnly[];
 extern const char kEnablePermissionActionReporting[];
-extern const char kEnablePictureInPicture[];
 extern const char kEnablePotentiallyAnnoyingSecurityFeatures[];
 extern const char kEnablePowerOverlay[];
 extern const char kEnablePrintPreviewRegisterPromos[];
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index f46775d..a0986e5 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -26,28 +26,7 @@
 namespace crash_keys {
 
 size_t RegisterChromeCrashKeys() {
-  // The following keys may be chunked by the underlying crash logging system,
-  // but ultimately constitute a single key-value pair.
-  //
-  // If you're adding keys here, please also add them to the following lists:
-  // chrome/app/chrome_crash_reporter_client_win.cc::RegisterCrashKeysHelper(),
-  // android_webview/common/crash_reporter/crash_keys.cc::
-  //     RegisterWebViewCrashKeys(),
-  // chromecast/crash/cast_crash_keys.cc::RegisterCastCrashKeys().
-  base::debug::CrashKey fixed_keys[] = {
-    {kNumVariations, kSmallSize},
-    {kVariations, kHugeSize},
-
-    // TODO(sunnyps): Remove after fixing crbug.com/724999.
-    {"gl-context-set-current-stack-trace", kMediumSize},
-  };
-
-  // This dynamic set of keys is used for sets of key value pairs when gathering
-  // a collection of data, like command line switches or extension IDs.
-  std::vector<base::debug::CrashKey> keys(
-      fixed_keys, fixed_keys + arraysize(fixed_keys));
-
-  return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
+  return 0;
 }
 
 static bool IsBoringSwitch(const std::string& flag) {
diff --git a/chrome/common/extensions/docs/server2/OWNERS b/chrome/common/extensions/docs/server2/OWNERS
index 8548009..e601596d 100644
--- a/chrome/common/extensions/docs/server2/OWNERS
+++ b/chrome/common/extensions/docs/server2/OWNERS
@@ -1,3 +1,9 @@
 lazyboy@chromium.org
 rdevlin.cronin@chromium.org
 rockot@chromium.org
+
+# Modifying app.yaml needs a corresponding push of the new version to AppEngine.
+per-file app.yaml=set noparent
+per-file app.yaml=karandeepb@chromium.org
+per-file app.yaml=lazyboy@chromium.org
+per-file app.yaml=rdevlin.cronin@chromium.org
diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc
index 4954d83f..2c1be0fe 100644
--- a/chrome/gpu/chrome_content_gpu_client.cc
+++ b/chrome/gpu/chrome_content_gpu_client.cc
@@ -20,7 +20,6 @@
 
 #if defined(OS_CHROMEOS)
 #include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h"
-#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h"
 #include "components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h"
 #include "components/arc/video_accelerator/protected_buffer_manager.h"
 #include "components/arc/video_accelerator/protected_buffer_manager_proxy.h"
@@ -62,11 +61,6 @@
     service_manager::BinderRegistry* registry) {
 #if defined(OS_CHROMEOS)
   registry->AddInterface(
-      base::Bind(
-          &ChromeContentGpuClient::CreateArcVideoDecodeAcceleratorDeprecated,
-          base::Unretained(this)),
-      base::ThreadTaskRunnerHandle::Get());
-  registry->AddInterface(
       base::Bind(&ChromeContentGpuClient::CreateArcVideoDecodeAccelerator,
                  base::Unretained(this)),
       base::ThreadTaskRunnerHandle::Get());
@@ -100,14 +94,6 @@
 }
 
 #if defined(OS_CHROMEOS)
-void ChromeContentGpuClient::CreateArcVideoDecodeAcceleratorDeprecated(
-    ::arc::mojom::VideoDecodeAcceleratorDeprecatedRequest request) {
-  mojo::MakeStrongBinding(
-      std::make_unique<arc::GpuArcVideoDecodeAcceleratorDeprecated>(
-          gpu_preferences_, protected_buffer_manager_.get()),
-      std::move(request));
-}
-
 void ChromeContentGpuClient::CreateArcVideoDecodeAccelerator(
     ::arc::mojom::VideoDecodeAcceleratorRequest request) {
   mojo::MakeStrongBinding(
diff --git a/chrome/gpu/chrome_content_gpu_client.h b/chrome/gpu/chrome_content_gpu_client.h
index 38a2195..f820c0a 100644
--- a/chrome/gpu/chrome_content_gpu_client.h
+++ b/chrome/gpu/chrome_content_gpu_client.h
@@ -14,7 +14,6 @@
 #if defined(OS_CHROMEOS)
 #include "components/arc/common/protected_buffer_manager.mojom.h"
 #include "components/arc/common/video_decode_accelerator.mojom.h"
-#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
 #include "components/arc/common/video_encode_accelerator.mojom.h"
 #include "gpu/command_buffer/service/gpu_preferences.h"
 
@@ -35,9 +34,6 @@
 
  private:
 #if defined(OS_CHROMEOS)
-  void CreateArcVideoDecodeAcceleratorDeprecated(
-      ::arc::mojom::VideoDecodeAcceleratorDeprecatedRequest request);
-
   void CreateArcVideoDecodeAccelerator(
       ::arc::mojom::VideoDecodeAcceleratorRequest request);
 
diff --git a/chrome/installer/zucchini/BUILD.gn b/chrome/installer/zucchini/BUILD.gn
index 1f00eedd..3c13e07d 100644
--- a/chrome/installer/zucchini/BUILD.gn
+++ b/chrome/installer/zucchini/BUILD.gn
@@ -32,8 +32,12 @@
     "element_detection.h",
     "encoded_view.cc",
     "encoded_view.h",
+    "ensemble_matcher.cc",
+    "ensemble_matcher.h",
     "equivalence_map.cc",
     "equivalence_map.h",
+    "heuristic_ensemble_matcher.cc",
+    "heuristic_ensemble_matcher.h",
     "image_index.cc",
     "image_index.h",
     "image_utils.h",
diff --git a/chrome/installer/zucchini/buffer_view.h b/chrome/installer/zucchini/buffer_view.h
index fccda6d..e2ba7e7 100644
--- a/chrome/installer/zucchini/buffer_view.h
+++ b/chrome/installer/zucchini/buffer_view.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <algorithm>
 #include <type_traits>
 
 #include "base/logging.h"
@@ -47,6 +48,7 @@
 
 namespace internal {
 
+// TODO(huangs): Rename to BasicBufferView.
 // BufferViewBase should not be used directly; it is an implementation used for
 // both BufferView and MutableBufferView.
 template <class T>
@@ -139,6 +141,10 @@
   // Returns a BufferRegion describing the full view.
   BufferRegion region() const { return BufferRegion{0, size()}; }
 
+  bool equals(BufferViewBase other) const {
+    return size() == other.size() && std::equal(begin(), end(), other.begin());
+  }
+
   // Modifiers
 
   void shrink(size_type new_size) {
diff --git a/chrome/installer/zucchini/buffer_view_unittest.cc b/chrome/installer/zucchini/buffer_view_unittest.cc
index 51516a4..4be0612 100644
--- a/chrome/installer/zucchini/buffer_view_unittest.cc
+++ b/chrome/installer/zucchini/buffer_view_unittest.cc
@@ -175,4 +175,27 @@
   EXPECT_FALSE(view.covers({size_t(-1), size_t(-1)}));
 }
 
+TEST_F(BufferViewTest, Equals) {
+  // Almost identical to |bytes_|, except at [5] and [6].
+  uint8_t bytes2[kLen] = {0x10, 0x32, 0x54, 0x76, 0x98,
+                          0xAB, 0xCD, 0xFE, 0x10, 0x00};
+  ConstBufferView view1(std::begin(bytes_), kLen);
+  ConstBufferView view2(std::begin(bytes2), kLen);
+
+  EXPECT_TRUE(view1.equals(view1));
+  EXPECT_TRUE(view2.equals(view2));
+  EXPECT_FALSE(view1.equals(view2));
+  EXPECT_FALSE(view2.equals(view1));
+
+  EXPECT_TRUE((view1[{0, 0}]).equals(view2[{0, 0}]));
+  EXPECT_TRUE((view1[{0, 0}]).equals(view2[{5, 0}]));
+  EXPECT_TRUE((view1[{0, 5}]).equals(view2[{0, 5}]));
+  EXPECT_FALSE((view1[{0, 6}]).equals(view2[{0, 6}]));
+  EXPECT_FALSE((view1[{0, 7}]).equals(view1[{0, 6}]));
+  EXPECT_TRUE((view1[{5, 3}]).equals(view1[{5, 3}]));
+  EXPECT_FALSE((view1[{5, 1}]).equals(view1[{5, 3}]));
+  EXPECT_TRUE((view2[{0, 1}]).equals(view2[{8, 1}]));
+  EXPECT_FALSE((view2[{1, 1}]).equals(view2[{8, 1}]));
+}
+
 }  // namespace zucchini
diff --git a/chrome/installer/zucchini/ensemble_matcher.cc b/chrome/installer/zucchini/ensemble_matcher.cc
new file mode 100644
index 0000000..017d82dd
--- /dev/null
+++ b/chrome/installer/zucchini/ensemble_matcher.cc
@@ -0,0 +1,36 @@
+// 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.
+
+#include "chrome/installer/zucchini/ensemble_matcher.h"
+
+#include <limits>
+#include <utility>
+
+#include "base/logging.h"
+#include "base/strings/stringprintf.h"
+
+namespace zucchini {
+
+/******** EnsembleMatcher ********/
+
+EnsembleMatcher::EnsembleMatcher() = default;
+
+EnsembleMatcher::~EnsembleMatcher() = default;
+
+void EnsembleMatcher::Trim() {
+  // TODO(huangs): Add MultiDex handling logic when we add DEX support.
+}
+
+void EnsembleMatcher::GenerateSeparators(ConstBufferView new_image) {
+  ConstBufferView::iterator it = new_image.begin();
+  for (ElementMatch& match : matches_) {
+    ConstBufferView new_sub_image(new_image[match.new_element.region()]);
+    separators_.push_back(
+        ConstBufferView::FromRange(it, new_sub_image.begin()));
+    it = new_sub_image.end();
+  }
+  separators_.push_back(ConstBufferView::FromRange(it, new_image.end()));
+}
+
+}  // namespace zucchini
diff --git a/chrome/installer/zucchini/ensemble_matcher.h b/chrome/installer/zucchini/ensemble_matcher.h
new file mode 100644
index 0000000..8ab2f71
--- /dev/null
+++ b/chrome/installer/zucchini/ensemble_matcher.h
@@ -0,0 +1,72 @@
+// 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_INSTALLER_ZUCCHINI_ENSEMBLE_MATCHER_H_
+#define CHROME_INSTALLER_ZUCCHINI_ENSEMBLE_MATCHER_H_
+
+#include <stddef.h>
+
+#include <vector>
+
+#include "base/macros.h"
+#include "chrome/installer/zucchini/buffer_view.h"
+#include "chrome/installer/zucchini/element_detection.h"
+#include "chrome/installer/zucchini/image_utils.h"
+
+namespace zucchini {
+
+// A base class for ensemble matching strategies, which identify Elements in a
+// "new" and "old" archives, and match each "new" Element to an "old" Element.
+// Matched pairs can then be passed to Disassembler for architecture-specific
+// patching. Notes:
+// - A matched Element pair must have the same ExecutableType.
+// - Special case: Exact matches are ignored, since they can be patched directly
+//   without architecture-specific patching.
+// - Multiple "new" Elements may match a common "old" Element.
+// - A "new" Element may have no match. This can happen when no viable match
+//   exists, or when an exact match is skipped.
+class EnsembleMatcher {
+ public:
+  EnsembleMatcher();
+  virtual ~EnsembleMatcher();
+
+  // Interface to main matching feature. Returns whether match was successful.
+  // This should be called at most once per instace.
+  virtual bool RunMatch(ConstBufferView old_image,
+                        ConstBufferView new_image) = 0;
+
+  // Accessors to RunMatch() results.
+  const std::vector<ElementMatch>& matches() const { return matches_; }
+
+  const std::vector<ConstBufferView>& separators() const { return separators_; }
+
+  size_t num_identical() const { return num_identical_; }
+
+ protected:
+  // Post-processes |matches_| to remove potentially unfavorable entries.
+  void Trim();
+
+  // Populates |separators_| from |new_image_| and |matches_|.
+  void GenerateSeparators(ConstBufferView new_image);
+
+  // Storage of matched elements: A list of matched pairs, where the list of
+  // "new" elements have increasing offsets and don't overlap. May be empty.
+  std::vector<ElementMatch> matches_;
+
+  // Storage of regions before / between (successive) / after |new_ensemble|
+  // elements in |matches_|, including empty regions. Contains 1 more element
+  // than |matches_|.
+  std::vector<ConstBufferView> separators_;
+
+  // Number of identical matches found in match candidates. These should be
+  // excluded from |matches_|.
+  size_t num_identical_ = 0;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(EnsembleMatcher);
+};
+
+}  // namespace zucchini
+
+#endif  // CHROME_INSTALLER_ZUCCHINI_ENSEMBLE_MATCHER_H_
diff --git a/chrome/installer/zucchini/heuristic_ensemble_matcher.cc b/chrome/installer/zucchini/heuristic_ensemble_matcher.cc
new file mode 100644
index 0000000..8a51d375
--- /dev/null
+++ b/chrome/installer/zucchini/heuristic_ensemble_matcher.cc
@@ -0,0 +1,371 @@
+// 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.
+
+#include "chrome/installer/zucchini/heuristic_ensemble_matcher.h"
+
+#include <algorithm>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/bind.h"
+#include "base/numerics/safe_conversions.h"
+#include "base/strings/stringprintf.h"
+#include "chrome/installer/zucchini/binary_data_histogram.h"
+#include "chrome/installer/zucchini/element_detection.h"
+#include "chrome/installer/zucchini/image_utils.h"
+#include "chrome/installer/zucchini/io_utils.h"
+
+namespace zucchini {
+
+namespace {
+
+/******** Helper Functions ********/
+
+// Uses |detector| to find embedded executables inside |image|, and returns the
+// result on success, or base::nullopt on failure,  which occurs if too many (>
+// |kElementLimit|) elements are found.
+base::Optional<std::vector<Element>> FindEmbeddedElements(
+    ConstBufferView image,
+    const std::string& name,
+    ElementDetector&& detector) {
+  // Maximum number of Elements in a file. This is enforced because our matching
+  // algorithm is O(n^2), which suffices for regular archive files that should
+  // have up to 10's of executable files. An archive containing 100's of
+  // executables is likely pathological, and is rejected to prevent exploits.
+  static constexpr size_t kElementLimit = 256;
+  std::vector<Element> elements;
+  ElementFinder element_finder(image, std::move(detector));
+  for (auto element = element_finder.GetNext();
+       element.has_value() && elements.size() <= kElementLimit;
+       element = element_finder.GetNext()) {
+    elements.push_back(*element);
+  }
+  if (elements.size() >= kElementLimit) {
+    LOG(WARNING) << name << ": Found too many elements.";
+    return base::nullopt;
+  }
+  LOG(INFO) << name << ": Found " << elements.size() << " elements.";
+  return elements;
+}
+
+// Determines whether a proposed comparison between Elements should be rejected
+// early, to decrease the likelihood of creating false-positive matches, which
+// may be costly for patching. Our heuristic simply prohibits big difference in
+// size (relative and absolute) between matched elements.
+bool UnsafeDifference(const Element& old_element, const Element& new_element) {
+  static constexpr double kMaxBloat = 2.0;
+  static constexpr size_t kMinWorrysomeDifference = 2 << 20;  // 2MB
+  size_t lo_size = std::min(old_element.size, new_element.size);
+  size_t hi_size = std::max(old_element.size, new_element.size);
+  if (hi_size - lo_size < kMinWorrysomeDifference)
+    return false;
+  if (hi_size < lo_size * kMaxBloat)
+    return false;
+  return true;
+}
+
+std::ostream& operator<<(std::ostream& stream, const Element& elt) {
+  stream << "(" << elt.exe_type << ", " << AsHex<8, size_t>(elt.offset) << " +"
+         << AsHex<8, size_t>(elt.size) << ")";
+  return stream;
+}
+
+/******** MatchingInfoOut ********/
+
+// A class to output detailed information during ensemble matching. Extracting
+// the functionality to a separate class decouples formatting and printing logic
+// from matching logic. The base class consists of stubs.
+class MatchingInfoOut {
+ protected:
+  MatchingInfoOut() = default;
+
+ public:
+  virtual ~MatchingInfoOut() = default;
+  virtual void InitSizes(size_t old_size, size_t new_size) {}
+  virtual void DeclareTypeMismatch(int iold, int inew) {}
+  virtual void DeclareUnsafeDistance(int iold, int inew) {}
+  virtual void DeclareCandidate(int iold, int inew) {}
+  virtual void DeclareMatch(int iold,
+                            int inew,
+                            double dist,
+                            bool is_identical) {}
+  virtual void DeclareOutlier(int iold, int inew) {}
+
+  virtual void OutputCompare(const Element& old_element,
+                             const Element& new_element,
+                             double dist) {}
+
+  virtual void OutputMatch(const Element& best_old_element,
+                           const Element& new_element,
+                           bool is_identical,
+                           double best_dist) {}
+
+  virtual void OutputScores(const std::string& stats) {}
+
+  virtual void OutputTextGrid() {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MatchingInfoOut);
+};
+
+/******** MatchingInfoTerse ********/
+
+// A terse MatchingInfoOut that prints only basic information, using LOG().
+class MatchingInfoOutTerse : public MatchingInfoOut {
+ public:
+  MatchingInfoOutTerse() = default;
+  ~MatchingInfoOutTerse() override = default;
+
+  void OutputScores(const std::string& stats) override {
+    LOG(INFO) << "Best dists: " << stats;
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MatchingInfoOutTerse);
+};
+
+/******** MatchingInfoOutVerbose ********/
+
+// A verbose MatchingInfoOut that prints detailed information using |out_|,
+// including comparison pairs, scores, and a text grid representation of
+// pairwise matching results.
+class MatchingInfoOutVerbose : public MatchingInfoOut {
+ public:
+  explicit MatchingInfoOutVerbose(std::ostream& out) : out_(out) {}
+  ~MatchingInfoOutVerbose() override = default;
+
+  // Outputs sizes and initializes |text_grid_|.
+  void InitSizes(size_t old_size, size_t new_size) override {
+    out_ << "Comparing old (" << old_size << " elements) and new (" << new_size
+         << " elements)" << std::endl;
+    text_grid_.assign(new_size, std::string(old_size, '-'));
+    best_dist_.assign(new_size, -1.0);
+  }
+
+  // Functions to update match status in text grid representation.
+
+  void DeclareTypeMismatch(int iold, int inew) override {
+    text_grid_[inew][iold] = 'T';
+  }
+  void DeclareUnsafeDistance(int iold, int inew) override {
+    text_grid_[inew][iold] = 'U';
+  }
+  void DeclareCandidate(int iold, int inew) override {
+    text_grid_[inew][iold] = 'C';  // Provisional.
+  }
+  void DeclareMatch(int iold,
+                    int inew,
+                    double dist,
+                    bool is_identical) override {
+    text_grid_[inew][iold] = is_identical ? 'I' : 'M';
+    best_dist_[inew] = dist;
+  }
+  void DeclareOutlier(int iold, int inew) override {
+    text_grid_[inew][iold] = 'O';
+  }
+
+  // Functions to print detailed information.
+
+  void OutputCompare(const Element& old_element,
+                     const Element& new_element,
+                     double dist) override {
+    out_ << "Compare old" << old_element << " to new" << new_element << " --> "
+         << base::StringPrintf("%.5f", dist) << std::endl;
+  }
+
+  void OutputMatch(const Element& best_old_element,
+                   const Element& new_element,
+                   bool is_identical,
+                   double best_dist) override {
+    if (is_identical) {
+      out_ << "Skipped old" << best_old_element << " - identical to new"
+           << new_element;
+    } else {
+      out_ << "Matched old" << best_old_element << " to new" << new_element
+           << " --> " << base::StringPrintf("%.5f", best_dist);
+    }
+    out_ << std::endl;
+  }
+
+  void OutputScores(const std::string& stats) override {
+    out_ << "Best dists: " << stats << std::endl;
+  }
+
+  void OutputTextGrid() override {
+    int new_size = static_cast<int>(text_grid_.size());
+    for (int inew = 0; inew < new_size; ++inew) {
+      const std::string& line = text_grid_[inew];
+      out_ << "  ";
+      for (char ch : line) {
+        char prefix = (ch == 'I' || ch == 'M') ? '(' : ' ';
+        char suffix = (ch == 'I' || ch == 'M') ? ')' : ' ';
+        out_ << prefix << ch << suffix;
+      }
+      if (best_dist_[inew] >= 0)
+        out_ << "   " << base::StringPrintf("%.5f", best_dist_[inew]);
+      out_ << std::endl;
+    }
+    if (!text_grid_.empty()) {
+      out_ << "  Legend: I = identical, M = matched, T = type mismatch, "
+              "U = unsafe distance, C = candidate, O = outlier, - = skipped."
+           << std::endl;
+    }
+  }
+
+ private:
+  std::ostream& out_;
+
+  // Text grid representation of matches. Rows correspond to "old" and columns
+  // correspond to "new".
+  std::vector<std::string> text_grid_;
+
+  // For each "new" element, distance of best match. -1 denotes no match.
+  std::vector<double> best_dist_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MatchingInfoOutVerbose);
+};
+
+}  // namespace
+
+/******** HeuristicEnsembleMatcher ********/
+
+HeuristicEnsembleMatcher::HeuristicEnsembleMatcher(std::ostream* out)
+    : out_(out) {}
+
+HeuristicEnsembleMatcher::~HeuristicEnsembleMatcher() = default;
+
+bool HeuristicEnsembleMatcher::RunMatch(ConstBufferView old_image,
+                                        ConstBufferView new_image) {
+  DCHECK(matches_.empty());
+  DCHECK(separators_.empty());
+  LOG(INFO) << "Start matching.";
+
+  // Find all elements in "old" and "new".
+  base::Optional<std::vector<Element>> old_elements =
+      FindEmbeddedElements(old_image, "Old file",
+                           base::BindRepeating(DetectElementFromDisassembler));
+  if (!old_elements.has_value())
+    return false;
+  base::Optional<std::vector<Element>> new_elements =
+      FindEmbeddedElements(new_image, "New file",
+                           base::BindRepeating(DetectElementFromDisassembler));
+  if (!new_elements.has_value())
+    return false;
+
+  std::unique_ptr<MatchingInfoOut> info_out;
+  if (out_)
+    info_out = std::make_unique<MatchingInfoOutVerbose>(*out_);
+  else
+    info_out = std::make_unique<MatchingInfoOutTerse>();
+
+  const int num_new_elements = base::checked_cast<int>(new_elements->size());
+  const int num_old_elements = base::checked_cast<int>(old_elements->size());
+  info_out->InitSizes(num_old_elements, num_new_elements);
+
+  // For each "new" element, match it with the "old" element that's nearest to
+  // it, with distance determined by BinaryDataHistogram. The resulting
+  // "old"-"new" pairs are stored into |results|. Possibilities:
+  // - Type mismatch: No match.
+  // - UnsafeDifference() heuristics fail: No match.
+  // - Identical match: Skip "new" since this is a trivial case.
+  // - Non-identical match: Match "new" with "old" with min distance.
+  // - No match: Skip "new".
+  struct Results {
+    int iold;
+    int inew;
+    double dist;
+  };
+  std::vector<Results> results;
+
+  // Precompute histograms for "old" since they get reused.
+  std::vector<BinaryDataHistogram> old_his(num_old_elements);
+  for (int iold = 0; iold < num_old_elements; ++iold) {
+    ConstBufferView sub_image(old_image[(*old_elements)[iold]]);
+    old_his[iold].Compute(sub_image);
+    // ProgramDetector should have imposed minimal size limit to |sub_image|.
+    // Therefore resulting histogram are expected to be valid.
+    CHECK(old_his[iold].IsValid());
+  }
+
+  const int kUninitIold = num_old_elements;
+  for (int inew = 0; inew < num_new_elements; ++inew) {
+    const Element& cur_new_element = (*new_elements)[inew];
+    ConstBufferView cur_new_sub_image(new_image[cur_new_element.region()]);
+    BinaryDataHistogram new_his;
+    new_his.Compute(cur_new_sub_image);
+    CHECK(new_his.IsValid());
+
+    double best_dist = HUGE_VAL;
+    int best_iold = kUninitIold;
+    bool is_identical = false;
+
+    for (int iold = 0; iold < num_old_elements; ++iold) {
+      const Element& cur_old_element = (*old_elements)[iold];
+      if (cur_old_element.exe_type != cur_new_element.exe_type) {
+        info_out->DeclareTypeMismatch(iold, inew);
+        continue;
+      }
+      if (UnsafeDifference(cur_old_element, cur_new_element)) {
+        info_out->DeclareUnsafeDistance(iold, inew);
+        continue;
+      }
+      double dist = old_his[iold].Distance(new_his);
+      info_out->DeclareCandidate(iold, inew);
+      info_out->OutputCompare(cur_old_element, cur_new_element, dist);
+      if (best_dist > dist) {  // Tie resolution: First-one, first-serve.
+        best_iold = iold;
+        best_dist = dist;
+        if (best_dist == 0) {
+          ConstBufferView sub_image(old_image[cur_old_element.region()]);
+          if (sub_image.equals(cur_new_sub_image)) {
+            is_identical = true;
+            break;
+          }
+        }
+      }
+    }
+
+    if (best_iold != kUninitIold) {
+      const Element& best_old_element = (*old_elements)[best_iold];
+      info_out->DeclareMatch(best_iold, inew, best_dist, is_identical);
+      if (is_identical)  // Skip "new" if identical match is found.
+        ++num_identical_;
+      else
+        results.push_back({best_iold, inew, best_dist});
+      info_out->OutputMatch(best_old_element, cur_new_element, is_identical,
+                            best_dist);
+    }
+  }
+
+  // Populate |matches_| from |result|. To reduce that chance of false-positive
+  // matches, statistics on dists are computed. If a match's |dist| is an
+  // outlier then it is rejected.
+  if (results.size() > 0) {
+    OutlierDetector detector;
+    for (const auto& result : results) {
+      if (result.dist > 0)
+        detector.Add(result.dist);
+    }
+    detector.Prepare();
+    info_out->OutputScores(detector.RenderStats());
+    for (const Results& result : results) {
+      if (detector.DecideOutlier(result.dist) > 0) {
+        info_out->DeclareOutlier(result.iold, result.inew);
+      } else {
+        matches_.push_back(
+            {(*old_elements)[result.iold], (*new_elements)[result.inew]});
+      }
+    }
+    info_out->OutputTextGrid();
+  }
+
+  Trim();
+  GenerateSeparators(new_image);
+  return true;
+}
+
+}  // namespace zucchini
diff --git a/chrome/installer/zucchini/heuristic_ensemble_matcher.h b/chrome/installer/zucchini/heuristic_ensemble_matcher.h
new file mode 100644
index 0000000..397ac2c
--- /dev/null
+++ b/chrome/installer/zucchini/heuristic_ensemble_matcher.h
@@ -0,0 +1,39 @@
+// 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_INSTALLER_ZUCCHINI_HEURISTIC_ENSEMBLE_MATCHER_H_
+#define CHROME_INSTALLER_ZUCCHINI_HEURISTIC_ENSEMBLE_MATCHER_H_
+
+#include <ostream>
+
+#include "base/macros.h"
+#include "chrome/installer/zucchini/buffer_view.h"
+#include "chrome/installer/zucchini/ensemble_matcher.h"
+
+namespace zucchini {
+
+// An ensemble matcher that:
+// - Detects embedded elements in "old" and "new" archive files.
+// - Applies heuristics to create matched pairs.
+// It is desired to have matched pairs that:
+// - Have "reasonable" size difference (see UnsafeDifference() in the .cc file).
+// - Have "minimal distance" among other potential matched pairs.
+class HeuristicEnsembleMatcher : public EnsembleMatcher {
+ public:
+  explicit HeuristicEnsembleMatcher(std::ostream* out);
+  ~HeuristicEnsembleMatcher() override;
+
+  // EnsembleMatcher:
+  bool RunMatch(ConstBufferView old_image, ConstBufferView new_image) override;
+
+ private:
+  // Optional stream to print detailed information during matching.
+  std::ostream* out_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(HeuristicEnsembleMatcher);
+};
+
+}  // namespace zucchini
+
+#endif  // CHROME_INSTALLER_ZUCCHINI_HEURISTIC_ENSEMBLE_MATCHER_H_
diff --git a/chrome/installer/zucchini/main_utils.cc b/chrome/installer/zucchini/main_utils.cc
index fa77067..1b456cc 100644
--- a/chrome/installer/zucchini/main_utils.cc
+++ b/chrome/installer/zucchini/main_utils.cc
@@ -54,7 +54,8 @@
     {"gen", "-gen <old_file> <new_file> <patch_file> [-raw]", 3, &MainGen},
     {"apply", "-apply <old_file> <patch_file> <new_file>", 3, &MainApply},
     {"read", "-read <exe> [-dump]", 1, &MainRead},
-    {"detect", "-detect <archive_file>", 1, &MainDetect},
+    {"detect", "-detect <archive_file> [-dd=format#]", 1, &MainDetect},
+    {"match", "-match <old_file> <new_file>", 2, &MainMatch},
     {"crc32", "-crc32 <file>", 1, &MainCrc32},
 };
 
diff --git a/chrome/installer/zucchini/zucchini_commands.cc b/chrome/installer/zucchini/zucchini_commands.cc
index dc435e62..dd0edcf 100644
--- a/chrome/installer/zucchini/zucchini_commands.cc
+++ b/chrome/installer/zucchini/zucchini_commands.cc
@@ -107,6 +107,23 @@
   return result;
 }
 
+zucchini::status::Code MainMatch(MainParams params) {
+  CHECK_EQ(2U, params.file_paths.size());
+  zucchini::MappedFileReader old_image(params.file_paths[0]);
+  if (!old_image.IsValid())
+    return zucchini::status::kStatusFileReadError;
+  zucchini::MappedFileReader new_image(params.file_paths[1]);
+  if (!new_image.IsValid())
+    return zucchini::status::kStatusFileReadError;
+
+  zucchini::status::Code status =
+      zucchini::MatchAll({old_image.data(), old_image.length()},
+                         {new_image.data(), new_image.length()}, params.out);
+  if (status != zucchini::status::kStatusSuccess)
+    params.err << "Fatal error found when matching executables." << std::endl;
+  return status;
+}
+
 zucchini::status::Code MainCrc32(MainParams params) {
   CHECK_EQ(1U, params.file_paths.size());
   zucchini::MappedFileReader image(params.file_paths[0]);
diff --git a/chrome/installer/zucchini/zucchini_commands.h b/chrome/installer/zucchini/zucchini_commands.h
index 327db4e15..c8cbac9 100644
--- a/chrome/installer/zucchini/zucchini_commands.h
+++ b/chrome/installer/zucchini/zucchini_commands.h
@@ -42,6 +42,9 @@
 // Command Function: Scan an archive file and detect executables.
 zucchini::status::Code MainDetect(MainParams params);
 
+// Command Function: Scan two archive files and match detected executables.
+zucchini::status::Code MainMatch(MainParams params);
+
 // Command Function: Compute CRC-32 of a file.
 zucchini::status::Code MainCrc32(MainParams params);
 
diff --git a/chrome/installer/zucchini/zucchini_tools.cc b/chrome/installer/zucchini/zucchini_tools.cc
index 59caf01..3efaf0f 100644
--- a/chrome/installer/zucchini/zucchini_tools.cc
+++ b/chrome/installer/zucchini/zucchini_tools.cc
@@ -16,6 +16,8 @@
 #include "base/strings/stringprintf.h"
 #include "chrome/installer/zucchini/disassembler.h"
 #include "chrome/installer/zucchini/element_detection.h"
+#include "chrome/installer/zucchini/ensemble_matcher.h"
+#include "chrome/installer/zucchini/heuristic_ensemble_matcher.h"
 #include "chrome/installer/zucchini/io_utils.h"
 
 namespace zucchini {
@@ -114,4 +116,18 @@
   return status::kStatusSuccess;
 }
 
+status::Code MatchAll(ConstBufferView old_image,
+                      ConstBufferView new_image,
+                      std::ostream& out) {
+  HeuristicEnsembleMatcher matcher(&out);
+  if (!matcher.RunMatch(old_image, new_image)) {
+    out << "RunMatch() failed.";
+    return status::kStatusFatal;
+  }
+  out << "Found " << matcher.matches().size() << " nontrivial matches and "
+      << matcher.num_identical() << " identical matches." << std::endl;
+
+  return status::kStatusSuccess;
+}
+
 }  // namespace zucchini
diff --git a/chrome/installer/zucchini/zucchini_tools.h b/chrome/installer/zucchini/zucchini_tools.h
index 98162a659..b2f19d5 100644
--- a/chrome/installer/zucchini/zucchini_tools.h
+++ b/chrome/installer/zucchini/zucchini_tools.h
@@ -13,6 +13,9 @@
 
 namespace zucchini {
 
+// The functions below are called to print diagnosis information, so outputs are
+// printed using std::ostream instead of LOG().
+
 // Prints stats on references found in |image|. If |do_dump| is true, then
 // prints all references (locations and targets).
 status::Code ReadReferences(ConstBufferView image,
@@ -25,6 +28,11 @@
                        std::ostream& out,
                        std::vector<ConstBufferView>* sub_image_list);
 
+// Prints all matched regions from |old_image| to |new_image|.
+status::Code MatchAll(ConstBufferView old_image,
+                      ConstBufferView new_image,
+                      std::ostream& out);
+
 }  // namespace zucchini
 
 #endif  // CHROME_INSTALLER_ZUCCHINI_ZUCCHINI_TOOLS_H_
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 01ea74c..e140efc 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -627,15 +627,7 @@
 #endif  // !defined(OS_ANDROID)
 
 #if BUILDFLAG(ENABLE_SPELLCHECK)
-  SpellCheckProvider* spell_check_provider =
-      new SpellCheckProvider(render_frame, spellcheck_.get(), this);
-  // TODO(xiaochengh): Design better way to sync between Chrome-side and
-  // Blink-side spellcheck enabled states.  See crbug.com/710097.
-  //
-  // TODO(alexmos): Do this for all frames so that this works properly for
-  // OOPIFs.  See https://crbug.com/789273.
-  if (render_frame->IsMainFrame())
-    spell_check_provider->EnableSpellcheck(spellcheck_->IsSpellcheckEnabled());
+  new SpellCheckProvider(render_frame, spellcheck_.get(), this);
 
 #if BUILDFLAG(HAS_SPELLCHECK_PANEL)
   new SpellCheckPanel(render_frame, registry, this);
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 03ca287..b682643 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -1381,6 +1381,7 @@
         "../browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog_browsertest.cc",
         "../browser/ui/views/select_file_dialog_extension_browsertest.cc",
         "../browser/ui/views/sync/profile_signin_confirmation_dialog_views_browsertest.cc",
+        "../browser/ui/views/translate/translate_bubble_view_browsertest.cc",
       ]
       deps += [
         "//components/payments/core:test_support",
@@ -1422,7 +1423,6 @@
           "../browser/ui/views/task_manager_view_browsertest.cc",
           "../browser/ui/views/toolbar/browser_actions_container_browsertest.cc",
           "../browser/ui/views/translate/translate_bubble_test_utils_views.cc",
-          "../browser/ui/views/translate/translate_bubble_view_browsertest.cc",
           "../browser/ui/views/translate/translate_language_browsertest.cc",
           "../browser/ui/views/web_dialog_view_browsertest.cc",
         ]
@@ -4791,7 +4791,7 @@
         sources += [
           "../browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm",
           "../browser/ui/cocoa/permission_bubble/permission_bubble_cocoa_interactive_uitest.mm",
-          "../browser/ui/cocoa/translate/translate_bubble_test_utils_cocoa.mm",
+          "../browser/ui/cocoa/translate/translate_bubble_test_utils_views_cocoa.mm",
           "base/interactive_test_utils_cocoa.mm",
         ]
       }
diff --git a/chrome/test/chromedriver/capabilities.cc b/chrome/test/chromedriver/capabilities.cc
index e2d9f22a..8458495 100644
--- a/chrome/test/chromedriver/capabilities.cc
+++ b/chrome/test/chromedriver/capabilities.cc
@@ -628,6 +628,7 @@
       force_devtools_screenshot(true),
       page_load_strategy(PageLoadStrategy::kNormal),
       network_emulation_enabled(false),
+      accept_insecure_certs(false),
       use_automation_extension(true) {}
 
 Capabilities::~Capabilities() {}
@@ -655,6 +656,8 @@
   parser_map["pageLoadStrategy"] = base::Bind(&ParsePageLoadStrategy);
   parser_map["unexpectedAlertBehaviour"] =
       base::Bind(&ParseUnexpectedAlertBehaviour);
+  parser_map["acceptInsecureCerts"] =
+      base::BindRepeating(&ParseBoolean, &accept_insecure_certs);
   // Network emulation requires device mode, which is only enabled when
   // mobile emulation is on.
   if (desired_caps.GetDictionary("goog:chromeOptions.mobileEmulation",
diff --git a/chrome/test/chromedriver/capabilities.h b/chrome/test/chromedriver/capabilities.h
index 641fa940..98e43fd 100644
--- a/chrome/test/chromedriver/capabilities.h
+++ b/chrome/test/chromedriver/capabilities.h
@@ -146,6 +146,8 @@
 
   bool network_emulation_enabled;
 
+  bool accept_insecure_certs;
+
   PerfLoggingPrefs perf_logging_prefs;
 
   std::unique_ptr<base::ListValue> devtools_events_logging_prefs;
diff --git a/chrome/test/chromedriver/capabilities_unittest.cc b/chrome/test/chromedriver/capabilities_unittest.cc
index e42ca37..31fa8dd 100644
--- a/chrome/test/chromedriver/capabilities_unittest.cc
+++ b/chrome/test/chromedriver/capabilities_unittest.cc
@@ -320,6 +320,23 @@
       capabilities.switches.GetSwitchValue("proxy-server"));
 }
 
+TEST(ParseCapabilities, AcceptInsecureCertsDisabledByDefault) {
+  Capabilities capabilities;
+  base::DictionaryValue caps;
+  Status status = capabilities.Parse(caps);
+  ASSERT_TRUE(status.IsOk());
+  ASSERT_FALSE(capabilities.accept_insecure_certs);
+}
+
+TEST(ParseCapabilities, EnableAcceptInsecureCerts) {
+  Capabilities capabilities;
+  base::DictionaryValue caps;
+  caps.SetBoolean("acceptInsecureCerts", true);
+  Status status = capabilities.Parse(caps);
+  ASSERT_TRUE(status.IsOk());
+  ASSERT_TRUE(capabilities.accept_insecure_certs);
+}
+
 TEST(ParseCapabilities, LoggingPrefsOk) {
   Capabilities capabilities;
   base::DictionaryValue logging_prefs;
diff --git a/chrome/test/chromedriver/chrome/chrome.h b/chrome/test/chromedriver/chrome/chrome.h
index 92c7956..bd0b8f1 100644
--- a/chrome/test/chromedriver/chrome/chrome.h
+++ b/chrome/test/chromedriver/chrome/chrome.h
@@ -42,6 +42,9 @@
   // Activates the specified WebView.
   virtual Status ActivateWebView(const std::string& id) = 0;
 
+  // Enables acceptInsecureCerts mode for the browser.
+  virtual Status SetAcceptInsecureCerts() = 0;
+
   // Get the operation system where Chrome is running.
   virtual std::string GetOperatingSystemName() = 0;
 
diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc
index aa237446..47d47b3 100644
--- a/chrome/test/chromedriver/chrome/chrome_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <utility>
 
+#include "base/values.h"
 #include "chrome/test/chromedriver/chrome/devtools_client.h"
 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
 #include "chrome/test/chromedriver/chrome/devtools_http_client.h"
@@ -142,6 +143,23 @@
   return devtools_http_client_->ActivateWebView(id);
 }
 
+Status ChromeImpl::SetAcceptInsecureCerts() {
+  Status status = devtools_websocket_client_->ConnectIfNecessary();
+  if (status.IsError())
+    return status;
+
+  base::DictionaryValue params;
+  params.SetBoolean("ignore", true);
+  // We ignore the status returned by this command - If it is an error, the
+  // target likely doesn't yet support the command. In that case, we'll fall
+  // back to --ignore-certificate-errors.
+  // TODO(eseckler): Handle status once we remove support for
+  // --ignore-certificate-errors.
+  devtools_websocket_client_->SendCommand("Security.setIgnoreCertificateErrors",
+                                          params);
+  return Status(kOk);
+}
+
 bool ChromeImpl::IsMobileEmulationEnabled() const {
   return false;
 }
diff --git a/chrome/test/chromedriver/chrome/chrome_impl.h b/chrome/test/chromedriver/chrome/chrome_impl.h
index 906418a..fc0b2e2a 100644
--- a/chrome/test/chromedriver/chrome/chrome_impl.h
+++ b/chrome/test/chromedriver/chrome/chrome_impl.h
@@ -39,6 +39,7 @@
   Status GetWebViewById(const std::string& id, WebView** web_view) override;
   Status CloseWebView(const std::string& id) override;
   Status ActivateWebView(const std::string& id) override;
+  Status SetAcceptInsecureCerts() override;
   bool IsMobileEmulationEnabled() const override;
   bool HasTouchScreen() const override;
   std::string page_load_strategy() const override;
diff --git a/chrome/test/chromedriver/chrome/stub_chrome.cc b/chrome/test/chromedriver/chrome/stub_chrome.cc
index 6dd163f4..390a68eb 100644
--- a/chrome/test/chromedriver/chrome/stub_chrome.cc
+++ b/chrome/test/chromedriver/chrome/stub_chrome.cc
@@ -44,6 +44,10 @@
   return Status(kOk);
 }
 
+Status StubChrome::SetAcceptInsecureCerts() {
+  return Status(kOk);
+}
+
 std::string StubChrome::GetOperatingSystemName() {
   return std::string();
 }
diff --git a/chrome/test/chromedriver/chrome/stub_chrome.h b/chrome/test/chromedriver/chrome/stub_chrome.h
index 68fbc7e..c74af2c 100644
--- a/chrome/test/chromedriver/chrome/stub_chrome.h
+++ b/chrome/test/chromedriver/chrome/stub_chrome.h
@@ -31,6 +31,7 @@
   Status GetWebViewById(const std::string& id, WebView** web_view) override;
   Status CloseWebView(const std::string& id) override;
   Status ActivateWebView(const std::string& id) override;
+  Status SetAcceptInsecureCerts() override;
   std::string GetOperatingSystemName() override;
   bool IsMobileEmulationEnabled() const override;
   bool HasTouchScreen() const override;
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index af8464c7..ea4baf6 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -929,8 +929,8 @@
   }
   const base::Value* unscoped_value;
   if (!dict->Get("value", &unscoped_value)) {
-    return Status(kUnknownError,
-                  "call function result missing 'value'");
+    // Missing 'value' indicates the JavaScript code didn't return a value.
+    return Status(kOk);
   }
   result->reset(unscoped_value->DeepCopy());
   return Status(kOk);
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc
index 6c2f008..6f990f8 100644
--- a/chrome/test/chromedriver/chrome_launcher.cc
+++ b/chrome/test/chromedriver/chrome_launcher.cc
@@ -64,6 +64,8 @@
 
 namespace {
 
+// TODO(eseckler): Remove --ignore-certificate-errors for newer Chrome versions
+// that support the Security DevTools domain on the browser target.
 const char* const kCommonSwitches[] = {
     "disable-popup-blocking", "enable-automation", "ignore-certificate-errors",
     "metrics-recording-only",
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 64daa38ed..fe08e4c 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -131,7 +131,7 @@
                download_dir=None, network_connection=None,
                send_w3c_capability=None, send_w3c_request=None,
                page_load_strategy=None, unexpected_alert_behaviour=None,
-               devtools_events_to_log=None):
+               devtools_events_to_log=None, accept_insecure_certs=None):
     self._executor = command_executor.CommandExecutor(server_url)
     self.w3c_compliant = False
 
@@ -222,6 +222,9 @@
     if network_connection:
       params['networkConnectionEnabled'] = network_connection
 
+    if accept_insecure_certs is not None:
+      params['acceptInsecureCerts'] = accept_insecure_certs
+
     if send_w3c_request:
       params = {'capabilities': {'alwaysMatch': params}}
     else:
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index c69fea7..685dd77 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -132,7 +132,8 @@
   caps->SetBoolean("cssSelectorsEnabled", true);
   caps->SetBoolean("webStorageEnabled", true);
   caps->SetBoolean("rotatable", false);
-  caps->SetBoolean("acceptSslCerts", true);
+  caps->SetBoolean("acceptSslCerts", capabilities.accept_insecure_certs);
+  caps->SetBoolean("acceptInsecureCerts", capabilities.accept_insecure_certs);
   caps->SetBoolean("nativeEvents", true);
   caps->SetBoolean("hasTouchScreen", session->chrome->HasTouchScreen());
   caps->SetString("unexpectedAlertBehaviour",
@@ -274,6 +275,12 @@
   if (status.IsError())
     return status;
 
+  if (capabilities.accept_insecure_certs) {
+    status = session->chrome->SetAcceptInsecureCerts();
+    if (status.IsError())
+      return status;
+  }
+
   status = session->chrome->GetWebViewIdForFirstTab(&session->window,
                                                     session->w3c_compliant);
   if (status.IsError())
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 8637c4c..e4fb129 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -188,7 +188,11 @@
 _ANDROID_NEGATIVE_FILTER['chrome_stable'] = (
     _ANDROID_NEGATIVE_FILTER['chrome'])
 _ANDROID_NEGATIVE_FILTER['chrome_beta'] = (
-    _ANDROID_NEGATIVE_FILTER['chrome'])
+    _ANDROID_NEGATIVE_FILTER['chrome'] + [
+      # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2025
+      'ChromeDriverTest.testDoesntHangOnFragmentNavigation',
+    ]
+)
 _ANDROID_NEGATIVE_FILTER['chromium'] = (
     _ANDROID_NEGATIVE_FILTER['chrome'] + [
         'ChromeDriverTest.testSwitchToWindow',
@@ -2571,6 +2575,59 @@
       return end - start
     self._RunDriverPerfTest('cold exe js', Run)
 
+
+class HeadlessInvalidCertificateTest(ChromeDriverBaseTest):
+  """End to end tests for ChromeDriver."""
+
+  @staticmethod
+  def GlobalSetUp():
+    cert_path = os.path.join(chrome_paths.GetTestData(),
+                             'chromedriver/invalid_ssl_cert.pem')
+    HeadlessInvalidCertificateTest._https_server = webserver.WebServer(
+        chrome_paths.GetTestData(), cert_path)
+    if _ANDROID_PACKAGE_KEY:
+      HeadlessInvalidCertificateTest._device = device_utils.DeviceUtils.HealthyDevices()[0]
+      https_host_port = HeadlessInvalidCertificateTest._https_server._server.server_port
+      forwarder.Forwarder.Map([(https_host_port, https_host_port)],
+                              ChromeDriverTest._device)
+
+  @staticmethod
+  def GlobalTearDown():
+    if _ANDROID_PACKAGE_KEY:
+      forwarder.Forwarder.UnmapAllDevicePorts(
+          HeadlessInvalidCertificateTest._device)
+    HeadlessInvalidCertificateTest._https_server.Shutdown()
+
+  @staticmethod
+  def GetHttpsUrlForFile(file_path):
+    return HeadlessInvalidCertificateTest._https_server.GetUrl() + file_path
+
+  def setUp(self):
+    self._driver = self.CreateDriver(chrome_switches = ["--headless"],
+                                     accept_insecure_certs = True)
+
+  def testLoadsPage(self):
+    print "loading"
+    self._driver.Load(self.GetHttpsUrlForFile('/chromedriver/page_test.html'))
+    # Verify that page content loaded.
+    self._driver.FindElement('id', 'link')
+
+  def testNavigateNewWindow(self):
+    print "loading"
+    self._driver.Load(self.GetHttpsUrlForFile('/chromedriver/page_test.html'))
+    self._driver.ExecuteScript(
+        'document.getElementById("link").href = "page_test.html";')
+
+    old_handles = self._driver.GetWindowHandles()
+    self._driver.FindElement('id', 'link').Click()
+    new_window_handle = self.WaitForNewWindow(self._driver, old_handles)
+    self.assertNotEqual(None, new_window_handle)
+    self._driver.SwitchToWindow(new_window_handle)
+    self.assertEquals(new_window_handle, self._driver.GetCurrentWindowHandle())
+    # Verify that page content loaded in new window.
+    self._driver.FindElement('id', 'link')
+
+
 if __name__ == '__main__':
   parser = optparse.OptionParser()
   parser.add_option(
@@ -2640,8 +2697,10 @@
       sys.modules[__name__])
   tests = unittest_util.FilterTestSuite(all_tests_suite, options.filter)
   ChromeDriverTest.GlobalSetUp()
+  HeadlessInvalidCertificateTest.GlobalSetUp()
   MobileEmulationCapabilityTest.GlobalSetUp()
   result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(tests)
   ChromeDriverTest.GlobalTearDown()
+  HeadlessInvalidCertificateTest.GlobalTearDown()
   MobileEmulationCapabilityTest.GlobalTearDown()
   sys.exit(len(result.failures) + len(result.errors))
diff --git a/chrome/test/chromedriver/test/test_expectations b/chrome/test/chromedriver/test/test_expectations
index 5551350..fedf552c 100644
--- a/chrome/test/chromedriver/test/test_expectations
+++ b/chrome/test/chromedriver/test/test_expectations
@@ -252,6 +252,7 @@
     # https://bugs.chromium.org/p/chromedriver/issues/detail?id=1960
     'CorrectEventFiringTest.testShouldNotThrowIfEventHandlerThrows',
     'CorrectEventFiringTest.testShouldFireMouseOverEventWhenClicking',
+    'CorrectEventFiringTest.testShouldFireMouseDownEventWhenClicking',
     'CorrectEventFiringTest.testShouldFireTwoClickEventsWhenClickingOnALabel',
     'CorrectEventFiringTest.testShouldIssueClickEvents',
     'CorrectEventFiringTest.testShouldFireMouseMoveEventWhenClicking',
@@ -263,13 +264,12 @@
     'BasicMouseInterfaceTest.testMoveAndClick',
     'BasicMouseInterfaceTest.testShouldClickElementInIFrame',
     'CombinedInputActionsTest.testCanClickOnLinks',
+
+     # https://bugs.chromium.org/p/chromedriver/issues/detail?id=998
+    'ImplicitWaitTest.testShouldImplicitlyWaitForASingleElement',
 ]
 _OS_NEGATIVE_FILTER['android:chrome_stable'] = (
     _OS_NEGATIVE_FILTER['android:chrome'] + [
-         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=998
-        'ImplicitWaitTest.testShouldImplicitlyWaitForASingleElement',
-         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=1960
-        'CorrectEventFiringTest.testShouldFireMouseDownEventWhenClicking',
         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2076
         'CorrectEventFiringTest.testShouldReportTheXAndYCoordinatesWhenClicking',
         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2077
@@ -282,35 +282,14 @@
 
 _OS_NEGATIVE_FILTER['android:chromium'] = (
     _OS_NEGATIVE_FILTER['android:chrome'] + [
-        'CorrectEventFiringTest.testShouldFireClickEventWhenClicking',
-        'CorrectEventFiringTest.testShouldFireMouseDownEventWhenClicking',
-        # https://bugs.chromium.org/p/chromedriver/issues/detail?id=998
-        'ImplicitWaitTest.testShouldImplicitlyWaitForASingleElement',
     ]
 )
 _OS_NEGATIVE_FILTER['android:chrome_beta'] = (
     _OS_NEGATIVE_FILTER['android:chrome'] + [
-         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=1220
-        'BasicMouseInterfaceTest.testDragAndDrop',
-        'BasicMouseInterfaceTest.testDraggingElementWithMouseFiresEvents',
-        'BasicMouseInterfaceTest.testDraggingElementWithMouseMovesItToAnotherList',
-         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=998
-        'ImplicitWaitTest.testShouldImplicitlyWaitForASingleElement',
-         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=922
-        'ClickTest.testCanClickOnAnElementWithTopSetToANegativeNumber',
-        'CorrectEventFiringTest.testClickEventsShouldBubble',
-        'CorrectEventFiringTest.testShouldFireMouseUpEventWhenClicking',
-        'CorrectEventFiringTest.testShouldFireMouseDownEventWhenClicking',
-        'CorrectEventFiringTest.testSendingKeysToAFocusedElementShouldNotBlurThatElement',
-        'ImplicitWaitTest.testShouldImplicitlyWaitUntilAtLeastOneElementIsFoundWhenSearchingForMany',
-        'ImplicitWaitTest.testShouldImplicitlyWaitForAnElementToBeVisibleBeforeInteracting',
-        'JavascriptEnabledDriverTest.testShouldBeAbleToClickOnSubmitButtons',
-        'JavascriptEnabledDriverTest.testIssue80ClickShouldGenerateClickEvent',
-        'TypingTest.testShiftSelectionDeletes',
-        'VisibilityTest.testShouldModifyTheVisibilityOfAnElementDynamically',
          # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2025
-        'MiscTest.testStimulatesStrangeOnloadInteractionInFirefox',
-        'PageLoadingTest.testShouldNotHangIfDocumentOpenCallIsNeverFollowedByDocumentCloseCall',
+        'PageLoadingTest.testShouldBeAbleToGetAFragmentOnTheCurrentPage',
+         # https://bugs.chromium.org/p/chromedriver/issues/detail?id=2076
+        'CorrectEventFiringTest.testShouldReportTheXAndYCoordinatesWhenClicking',
     ]
 )
 _OS_NEGATIVE_FILTER['android:chromedriver_webview_shell'] = (
diff --git a/chrome/test/chromedriver/test/webserver.py b/chrome/test/chromedriver/test/webserver.py
index 997bc47..6845852 100644
--- a/chrome/test/chromedriver/test/webserver.py
+++ b/chrome/test/chromedriver/test/webserver.py
@@ -5,6 +5,7 @@
 import BaseHTTPServer
 import os
 import threading
+import ssl
 import sys
 
 
@@ -97,9 +98,8 @@
 
     if server_cert_and_key_path is not None:
       self._is_https_enabled = True
-      self._server.socket = ssl.wrap_socket(
-          self._server.socket, certfile=server_cert_and_key_path,
-          server_side=True)
+      self.socket = ssl.wrap_socket(
+          self.socket, certfile=server_cert_and_key_path, server_side=True)
     else:
       self._is_https_enabled = False
 
diff --git a/chrome/test/data/chromedriver/invalid_ssl_cert.pem b/chrome/test/data/chromedriver/invalid_ssl_cert.pem
new file mode 100644
index 0000000..1bf4d5ca
--- /dev/null
+++ b/chrome/test/data/chromedriver/invalid_ssl_cert.pem
@@ -0,0 +1,50 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAn1Ze8Zm9iS7tz0r7ZfiUKv5dM6LRL5CwkHFVZfmDwYy+wmAT
++cZOYIY2mipzlqdPtSaaYWOBF8pRgtpfobf9I2LTfUlXyslJSrbU9wuYN4KXwtkg
+4LzYpBmBDOM7Te86onGpwHMVa/jcuA1+ievq2Joo5KBGFHO/PXr+wHxx50HFi3PA
+osGUwAfiv+ZSaAT3MF4mSjlapQ7PkE3PAEqIhCa5HpHW1Bth4lLBZLKUPI0iY3JJ
+HXQhh2vFRHY9Km8tFoG9lLz7oiizHn7ibrBaeUiCrgIvTw7tZYjy4I67L6o1Jcyd
+RH9jfH9diLyKZuu9byNk4f/1AyjTtFHSNszNRwIDAQABAoIBAE6JdQzi+aBXqFIH
+pHizmNzEOc5Mz40BZXYc1roHzaCmLhSC5PW1gEZlgR5mFElKuKgSmf+s2yGN0LWN
+y5tbpANAH/xeHU7P/jc8fSYz6dhan1EkUudTTfk8tPZUPpQAecc9/SzlzMZGiQyT
+Yi67QSt4ePWP5lsIXlgAevcHn+EbK+KccRV2t3zkGiTlxVxFPNJNkEua5E28eXfw
+jN4qXw6cfmeZApk1nQ8tw49egARzwzYlm7tXyM/+MK+dzj6cB9A13VeN4nrw93jQ
+keyx9xawP5opd31nX5ZYEdqviPmvYHgXeie6F/dXXXKvjMIvS5HLvhGLomQa9WPP
+MUVVmgECgYEA04V0h3YwpnAkhY4Bqq3L8NqNp0AbDm0Yrk9gF8W5BkXHI63LwAIt
+JGHr1aLXpZZquNCunV7WE8fiCnfP+deR+RVZeXrjwmATCpZ3ZSNnwsW4jqiOgBJJ
+FRFB24ZW8fjmcBAiXff734m52RK7GOu/Olvf2rVi1E/NV8rlNSa85kcCgYEAwNfE
+oOulfRdc1mpDnCoiYeVbL615XTp/yvKRAM5uL3m6Gj8Mnqbxp11mHVnAoE+kpVwj
+lm9M4Im+TGoHAQtAf+JU7T12JUHFoPkB1URXmKOphE7L/r/ibCnl0ZU/c73RsVsO
+cMnkft92tpoOabV4LnWwejH9QAWpyWFQ/pE5YQECgYEArqTO7RXB33pSPU9dwu3S
+qF/be49rh4K+URXKknY3aZ1taeESjMt/OD39eZwFj3vdTBFJSzhFa3mrAdehCXla
+1h0xjiLQMOogbqqDlCcigee8lVVIqyft3Y4tITMPUKSgp0A7D/kzpoLRxxA3GMF1
+V5sJ/kureP8W3XjxvOvqJfsCgYBCjnW7wHjmWpjdG+Hn1Rb2yK0XIH1Bsv4GMn/f
+Ul/vHMkhY99cJmxDAlZLDP4RlktSEyHpOtLCsGewgeuW7aY+PQRouQy8wR2PeEGs
+tKCy+tF366Y2b02bXT6HfkZfEQV9e9rZDKVDMKcNUNBmpY4sIsxc8EHixdGawm6s
+3bx7AQKBgARZYHZxra+LMTlrrGlqaUg/iJR6CtYtHUNcl+9CGRzH6lizyZxNCIbq
+pzRpW62UWZErkrI8IFxMuF31YfGzlE/1vRl6Bcb6AX+0ldxv1OurtaXDuPY6+r+m
+TptL7Ozh7iUxBtPqo8vLA9sHHxLZxc4nt/yubl2kre+4MJhaIXVb
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDvjCCAqYCCQD+CD/Svt7GzzANBgkqhkiG9w0BAQUFADCBoDEYMBYGA1UEAwwP
+aW52YWxpZC1zc2wuY29tMRQwEgYDVQQKDAtJbnZhbGlkIFNTTDEUMBIGA1UECwwL
+SW52YWxpZCBTU0wxEDAOBgNVBAcMB0ludmFsaWQxEzARBgNVBAgMCkNhbGlmb3Ju
+aWExCzAJBgNVBAYTAlVTMSQwIgYJKoZIhvcNAQkBFhVhZG1pbkBpbnZhbGlkLXNz
+bC5jb20wHhcNMTcxMjA2MTE0NTE3WhcNMTgxMjA2MTE0NTE3WjCBoDEYMBYGA1UE
+AwwPaW52YWxpZC1zc2wuY29tMRQwEgYDVQQKDAtJbnZhbGlkIFNTTDEUMBIGA1UE
+CwwLSW52YWxpZCBTU0wxEDAOBgNVBAcMB0ludmFsaWQxEzARBgNVBAgMCkNhbGlm
+b3JuaWExCzAJBgNVBAYTAlVTMSQwIgYJKoZIhvcNAQkBFhVhZG1pbkBpbnZhbGlk
+LXNzbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfVl7xmb2J
+Lu3PSvtl+JQq/l0zotEvkLCQcVVl+YPBjL7CYBP5xk5ghjaaKnOWp0+1JpphY4EX
+ylGC2l+ht/0jYtN9SVfKyUlKttT3C5g3gpfC2SDgvNikGYEM4ztN7zqicanAcxVr
++Ny4DX6J6+rYmijkoEYUc789ev7AfHHnQcWLc8CiwZTAB+K/5lJoBPcwXiZKOVql
+Ds+QTc8ASoiEJrkekdbUG2HiUsFkspQ8jSJjckkddCGHa8VEdj0qby0Wgb2UvPui
+KLMefuJusFp5SIKuAi9PDu1liPLgjrsvqjUlzJ1Ef2N8f12IvIpm671vI2Th//UD
+KNO0UdI2zM1HAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAJPhpixaBJsJb/FiMt57
+32l1Ic4aRzvrZlMo8spb6sDR+0qiMmr2uNxnU0Q16sQkYKHXS37G0rgRgnFN0dPq
+tEYG5EzgfZGiJioLcpRlv8lybzFwPoAe0E6sF+Wd2GY90ZTetUPsdlWoA/9NYBXz
+5kVdQTF3A26bj9o3lV633wb9Iy1TKsMO0gXBRhRTbMVAfL4pi1PMMEg96dnqH4jY
+lBK2vzu0QWvP8VYwCarL1CjWF3PFk07fciNc6K+JhzR2fbsWfmkZCtpk5cfuuTVC
+cGaQKa2cHtwrwWTEnfJYc/mUK5BPXWKo2EBh+qEIbyXYfAQYLYgPQ/bNVzr8/xau
+ULs=
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
index ef035457..4130613 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
@@ -30,8 +30,9 @@
                             'ariaCellRowIndex',
                             'tableCellRowSpan' ];
 
-var allTests = [
-  function testDocumentAndScrollAttributes() {
+var disabledTests = [
+  // http://crbug.com/725420
+  function testDocumentAndScrollAttributes_flaky() {
     for (var i = 0; i < DocumentAttributes.length; i++) {
       var attribute = DocumentAttributes[i];
       assertTrue(attribute in rootNode,
@@ -43,7 +44,6 @@
                  'rootNode should have a ' + attribute + ' attribute');
     }
 
-    assertEq(url, rootNode.docUrl);
     assertEq('Automation Tests - Attributes', rootNode.docTitle);
     assertEq(true, rootNode.docLoaded);
     assertEq(1, rootNode.docLoadingProgress);
@@ -54,12 +54,14 @@
     assertEq(0, rootNode.scrollYMin);
     assertEq(0, rootNode.scrollYMax);
     chrome.test.succeed();
-  },
+  }
+];
 
+var allTests = [
   function testActiveDescendant() {
-    var combobox = rootNode.find({ role: 'comboBox' });
+    var combobox = rootNode.find({ role: 'textFieldWithComboBox' });
     assertTrue('activeDescendant' in combobox,
-               'combobox should have an activedescendant attribute');
+               'combobox button should have an activedescendant attribute');
     var listbox = rootNode.find({ role: 'listBox' });
     var opt6 = listbox.children[5];
     assertEq(opt6, combobox.activeDescendant);
@@ -96,11 +98,11 @@
                    attribute + ' attribute');
       }
     }
+
     var input = textFields[0];
     assertEq('text-input', input.name);
     assertEq(2, input.textSelStart);
     assertEq(8, input.textSelEnd);
-
     var textArea = textFields[1];
     assertEq('textarea', textArea.name);
     for (var i = 0; i < EditableTextAttributes.length; i++) {
@@ -113,8 +115,8 @@
 
     var ariaTextbox = textFields[2];
     assertEq('textbox-role', ariaTextbox.name);
-    assertEq(0, ariaTextbox.textSelStart);
-    assertEq(0, ariaTextbox.textSelEnd);
+    assertEq(undefined, ariaTextbox.textSelStart, 'ariaTextbox.textSelStart');
+    assertEq(undefined, ariaTextbox.textSelEnd, 'ariaTextbox.textSelEnd');
 
     chrome.test.succeed();
   },
@@ -320,4 +322,4 @@
   }
 ];
 
-setUpAndRunTests(allTests, 'attributes.html');
+setUpAndRunTests([allTests[2]], 'attributes.html');
diff --git a/chrome/test/data/extensions/api_test/wallpaper_manager/test.js b/chrome/test/data/extensions/api_test/wallpaper_manager/test.js
index 9af55d2..8b93425 100644
--- a/chrome/test/data/extensions/api_test/wallpaper_manager/test.js
+++ b/chrome/test/data/extensions/api_test/wallpaper_manager/test.js
@@ -57,14 +57,10 @@
                                                  true,
                                                  '123',
                                                  pass(function(thumbnail) {
-        // The current wallpaper might have not changed when |thumbnail| data is
-        // passed back. Allow the async setWallpaper task to finish.
-        setTimeout(function() {
-          chrome.wallpaperPrivate.setCustomWallpaperLayout(
-              'CENTER', pass(function() {
-            chrome.wallpaperPrivate.setCustomWallpaperLayout('STRETCH', pass());
-          }));
-        }, 500);
+        chrome.wallpaperPrivate.setCustomWallpaperLayout('CENTER',
+                                                         pass(function() {
+          chrome.wallpaperPrivate.setCustomWallpaperLayout('STRETCH', pass());
+        }));
       }));
     },
     function setCustomPngWallpaper() {
@@ -79,15 +75,11 @@
                                                      true,
                                                      '123',
                                                      pass(function(thumbnail) {
-            // The current wallpaper might have not changed when |thumbnail|
-            // data is passed back. Allow the async setWallpaper task to finish.
-            setTimeout(function() {
-              chrome.wallpaperPrivate.setCustomWallpaperLayout(
-                  'CENTER', pass(function() {
-                chrome.wallpaperPrivate.setCustomWallpaperLayout(
-                    'STRETCH', pass());
-              }));
-            }, 500);
+            chrome.wallpaperPrivate.setCustomWallpaperLayout('CENTER',
+                                                             pass(function() {
+              chrome.wallpaperPrivate.setCustomWallpaperLayout('STRETCH',
+                                                               pass());
+            }));
           }));
         } else {
           chrome.test.fail('Failed to load test.png from local server.');
diff --git a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
index 75bc7d9c..15cf4a7 100644
--- a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
+++ b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
@@ -93,6 +93,18 @@
   this.runMochaTest(settings_sections_tests.TestNames.Other);
 });
 
+TEST_F('PrintPreviewSettingsSectionsTest', 'SetCopies', function() {
+  this.runMochaTest(settings_sections_tests.TestNames.SetCopies);
+});
+
+TEST_F('PrintPreviewSettingsSectionsTest', 'SetLayout', function() {
+  this.runMochaTest(settings_sections_tests.TestNames.SetLayout);
+});
+
+TEST_F('PrintPreviewSettingsSectionsTest', 'SetColor', function() {
+  this.runMochaTest(settings_sections_tests.TestNames.SetColor);
+});
+
 PrintPreviewRestoreStateTest = class extends NewPrintPreviewTest {
   /** @override */
   get browsePreload() {
diff --git a/chrome/test/data/webui/print_preview/print_preview_tests.js b/chrome/test/data/webui/print_preview/print_preview_tests.js
index 93343b5..390f3c6 100644
--- a/chrome/test/data/webui/print_preview/print_preview_tests.js
+++ b/chrome/test/data/webui/print_preview/print_preview_tests.js
@@ -608,8 +608,7 @@
             expectEquals(ticket.duplex,
                          print_preview.PreviewGenerator.DuplexMode.LONG_EDGE);
             expectTrue(ticket.landscape);
-            expectEquals(ticket.color,
-                         print_preview.PreviewGenerator.ColorMode.COLOR);
+            expectEquals(ticket.color, print_preview.ColorMode.COLOR);
             expectEquals(print_preview.ticket_items.MarginsTypeValue.CUSTOM,
                          ticket.marginsType);
             expectEquals(74, ticket.marginsCustom.marginTop);
diff --git a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
index f7f69f5..1cc2103 100644
--- a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
+++ b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
@@ -98,9 +98,7 @@
   'NoPDFPluginErrorMessage',
   'CustomPaperNames',
   'InitIssuesOneRequest',
-  // TODO(https://crbug.com/795626): Re-enable this test when test flakiness on
-  // the Mac bot is fixed.
-  'DISABLED_InvalidSettingsError',
+  'InvalidSettingsError',
   // TODO(thestig): Re-enable this test when the feature works properly.
   // https://crbug.com/746768
   'DISABLED_GenerateDraft',
@@ -142,9 +140,7 @@
 
 GEN('#if defined(OS_WIN)');
 [
-  // TODO(https://crbug.com/795658): Re-enable this test when test flakiness is
-  // fixed.
-  'DISABLED_WinSystemDialogLink',
+  'WinSystemDialogLink',
   'WinSystemDialogLinkBadPrintTicket',
 ].forEach(function(testName) {
   TEST_F('PrintPreviewUIBrowserTest', testName, function() {
diff --git a/chrome/test/data/webui/print_preview/settings_section_test.js b/chrome/test/data/webui/print_preview/settings_section_test.js
index 95b0ad7..e76ee82 100644
--- a/chrome/test/data/webui/print_preview/settings_section_test.js
+++ b/chrome/test/data/webui/print_preview/settings_section_test.js
@@ -13,6 +13,9 @@
     Dpi: 'dpi',
     Scaling: 'scaling',
     Other: 'other',
+    SetCopies: 'set copies',
+    SetLayout: 'set layout',
+    SetColor: 'set color',
   };
 
   const suiteName = 'SettingsSectionsTests';
@@ -292,6 +295,64 @@
       expectEquals(false, optionsElement.hidden);
       expectEquals(false, duplex.hidden);
     });
+
+    test(assert(TestNames.SetCopies), function() {
+      const copiesElement = page.$$('print-preview-copies-settings');
+      expectEquals(false, copiesElement.hidden);
+
+      // Default value is 1
+      const copiesInput =
+          copiesElement.$$('print-preview-number-settings-section')
+              .$$('.user-value');
+      expectEquals('1', copiesInput.value);
+      expectEquals(1, page.settings.copies.value);
+
+      // Change to 2
+      copiesInput.value = '2';
+      copiesInput.dispatchEvent(new CustomEvent('input'));
+      expectEquals(2, page.settings.copies.value);
+
+      // Collate is true by default.
+      const collateInput = copiesElement.$.collate;
+      expectEquals(true, collateInput.checked);
+      expectEquals(true, page.settings.collate.value);
+
+      // Uncheck the box.
+      MockInteractions.tap(collateInput);
+      expectEquals(false, collateInput.checked);
+      collateInput.dispatchEvent(new CustomEvent('change'));
+      expectEquals(false, page.settings.collate.value);
+    });
+
+    test(assert(TestNames.SetLayout), function() {
+      const layoutElement = page.$$('print-preview-layout-settings');
+      expectEquals(false, layoutElement.hidden);
+
+      // Default is portrait
+      const layoutInput = layoutElement.$$('select');
+      expectEquals('portrait', layoutInput.value);
+      expectEquals(false, page.settings.layout.value);
+
+      // Change to landscape
+      layoutInput.value = 'landscape';
+      layoutInput.dispatchEvent(new CustomEvent('change'));
+      expectEquals(true, page.settings.layout.value);
+    });
+
+    test(assert(TestNames.SetColor), function() {
+      const colorElement = page.$$('print-preview-color-settings');
+      expectEquals(false, colorElement.hidden);
+
+      // Default is color
+      const colorInput = colorElement.$$('select');
+      expectEquals('color', colorInput.value);
+      expectEquals(true, page.settings.color.value);
+
+      // Change to black and white.
+      colorInput.value = 'bw';
+      colorInput.dispatchEvent(new CustomEvent('change'));
+      expectEquals(false, page.settings.color.value);
+    });
   });
 
   return {
diff --git a/chrome/test/data/webui/settings/chrome_cleanup_page_test.js b/chrome/test/data/webui/settings/chrome_cleanup_page_test.js
index 7f3c7a7..5b14b74 100644
--- a/chrome/test/data/webui/settings/chrome_cleanup_page_test.js
+++ b/chrome/test/data/webui/settings/chrome_cleanup_page_test.js
@@ -14,6 +14,8 @@
       'startScanning',
       'notifyShowDetails',
       'notifyLearnMoreClicked',
+      'getMoreItemsPluralString',
+      'getItemsToRemovePluralString',
     ]);
   }
 
@@ -56,6 +58,18 @@
   notifyLearnMoreClicked() {
     this.methodCalled('notifyLearnMoreClicked');
   }
+
+  /** @override */
+  getMoreItemsPluralString(numHiddenItems) {
+    this.methodCalled('getMoreItemsPluralString', numHiddenItems);
+    return Promise.resolve('');
+  }
+
+  /** @override */
+  getItemsToRemovePluralString(numItems) {
+    this.methodCalled('getItemsToRemovePluralString', numItems);
+    return Promise.resolve('');
+  }
 }
 
 var chromeCleanupPage = null;
@@ -63,6 +77,23 @@
 /** @type {?TestDownloadsBrowserProxy} */
 var ChromeCleanupProxy = null;
 
+var shortFileList = ['file 1', 'file 2', 'file 3'];
+var exactSizeFileList = ['file 1', 'file 2', 'file 3', 'file 4'];
+var longFileList = ['file 1', 'file 2', 'file 3', 'file 4', 'file 5'];
+var shortRegistryKeysList = ['key 1', 'key 2'];
+var exactSizeRegistryKeysList = ['key 1', 'key 2', 'key 3', 'key 4'];
+var longRegistryKeysList =
+    ['key 1', 'key 2', 'key 3', 'key 4', 'key 5', 'key 6'];
+
+var defaultScannerResults = {
+  'files': shortFileList,
+  'registryKeys': shortRegistryKeysList,
+};
+
+/**
+ * @param {boolean} userInitiatedCleanupsEnabled Whether the user initiated
+ *     cleanup feature is enabled.
+ */
 function initParametrizedTest(userInitiatedCleanupsEnabled) {
   ChromeCleanupProxy = new TestChromeCleanupProxy();
   settings.ChromeCleanupProxyImpl.instance_ = ChromeCleanupProxy;
@@ -77,18 +108,74 @@
   document.body.appendChild(chromeCleanupPage);
 }
 
-function startCleanupFromInfected() {
+/**
+ * @param {!Array} originalItems
+ * @param {!Array} visibleItems
+ * @param {boolean} listCanBeShortened
+ */
+function validateVisibleItemsList(
+    originalItems, visibleItems, listCanBeShortened) {
+  var visibleItemsList = visibleItems.querySelectorAll('.visible-item');
+  var showMoreItems = visibleItems.querySelector('#show-more-items');
+
+  if (!listCanBeShortened ||
+      originalItems.length <= settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW) {
+    assertEquals(visibleItemsList.length, originalItems.length);
+    assertTrue(showMoreItems.hidden);
+  } else {
+    assertEquals(
+        visibleItemsList.length,
+        settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1);
+    assertFalse(showMoreItems.hidden);
+
+    // Tapping on the "show more" link should expand the list.
+    var link = showMoreItems.querySelector('a');
+    MockInteractions.tap(link);
+    Polymer.dom.flush();
+
+    visibleItemsList = visibleItems.querySelectorAll('.visible-item');
+    assertEquals(visibleItemsList.length, originalItems.length);
+    assertTrue(showMoreItems.hidden);
+  }
+}
+
+/**
+ * @param {boolean} userInitiatedCleanupsEnabled Whether the user initiated
+ *     cleanup feature is enabled.
+ * @param {!Array} files The list of files to be cleaned
+ * @param {!Array} registryKeys The list of registry entires to be cleaned.
+ */
+function startCleanupFromInfected(
+    userInitiatedCleanupsEnabled, files, registryKeys) {
+  var scannerResults = {'files': files, 'registryKeys': registryKeys};
+
   cr.webUIListenerCallback('chrome-cleanup-upload-permission-change', false);
-  cr.webUIListenerCallback(
-      'chrome-cleanup-on-infected', ['file 1', 'file 2', 'file 3']);
+  cr.webUIListenerCallback('chrome-cleanup-on-infected', scannerResults);
   Polymer.dom.flush();
 
-  var showFilesButton = chromeCleanupPage.$$('#show-files-button');
-  assertTrue(!!showFilesButton);
-  MockInteractions.tap(showFilesButton);
-  filesToRemove = chromeCleanupPage.$$('#files-to-remove-list');
-  assertTrue(!!filesToRemove);
-  assertEquals(filesToRemove.getElementsByTagName('li').length, 3);
+  var showItemsButton = chromeCleanupPage.$$('#show-items-button');
+  assertTrue(!!showItemsButton);
+  MockInteractions.tap(showItemsButton);
+
+  var filesToRemoveList =
+      chromeCleanupPage.$$('#files-to-remove-list').$$('#list');
+  assertTrue(!!filesToRemoveList);
+  validateVisibleItemsList(
+      files, filesToRemoveList,
+      userInitiatedCleanupsEnabled /* listCanBeShortened */);
+
+  var registryKeysListContainer = chromeCleanupPage.$$('#registry-keys-list');
+  assertTrue(!!registryKeysListContainer);
+  if (userInitiatedCleanupsEnabled && registryKeys.length > 0) {
+    assertFalse(registryKeysListContainer.hidden);
+    var registryKeysList = registryKeysListContainer.$$('#list');
+    assertTrue(!!registryKeysList);
+    validateVisibleItemsList(
+        registryKeys, registryKeysList,
+        true /* listCanBeShortened */);
+  } else {
+    assertTrue(registryKeysListContainer.hidden);
+  }
 
   var actionButton = chromeCleanupPage.$$('#action-button');
   assertTrue(!!actionButton);
@@ -96,7 +183,8 @@
   return ChromeCleanupProxy.whenCalled('startCleanup')
       .then(function(logsUploadEnabled) {
         assertFalse(logsUploadEnabled);
-        cr.webUIListenerCallback('chrome-cleanup-on-cleaning', false);
+        cr.webUIListenerCallback(
+            'chrome-cleanup-on-cleaning', defaultScannerResults);
         Polymer.dom.flush();
 
         var spinner = chromeCleanupPage.$$('#waiting-spinner');
@@ -114,9 +202,13 @@
   return ChromeCleanupProxy.whenCalled('restartComputer');
 }
 
+/**
+ * @param {boolean} userInitiatedCleanupsEnabled Whether the user initiated
+ *     cleanup feature is enabled.
+ */
 function cleanupFailure(userInitiatedCleanupsEnabled) {
   cr.webUIListenerCallback('chrome-cleanup-upload-permission-change', false);
-  cr.webUIListenerCallback('chrome-cleanup-on-cleaning', false);
+  cr.webUIListenerCallback('chrome-cleanup-on-cleaning', defaultScannerResults);
   cr.webUIListenerCallback(
       'chrome-cleanup-on-idle',
       settings.ChromeCleanupIdleReason.CLEANING_FAILED);
@@ -132,8 +224,12 @@
   }
 }
 
+/**
+ * @param {boolean} userInitiatedCleanupsEnabled Whether the user initiated
+ *     cleanup feature is enabled.
+ */
 function cleanupSuccess(userInitiatedCleanupsEnabled) {
-  cr.webUIListenerCallback('chrome-cleanup-on-cleaning', false);
+  cr.webUIListenerCallback('chrome-cleanup-on-cleaning', defaultScannerResults);
   cr.webUIListenerCallback(
       'chrome-cleanup-on-idle',
       settings.ChromeCleanupIdleReason.CLEANING_SUCCEEDED);
@@ -149,10 +245,14 @@
   }
 }
 
+/**
+ * @param {boolean} testingScanOffered Whether to test the case where scanning
+ *     is offered to the user.
+ */
 function testLogsUploading(testingScanOffered) {
   if (testingScanOffered) {
     cr.webUIListenerCallback(
-        'chrome-cleanup-on-infected', ['file 1', 'file 2', 'file 3']);
+        'chrome-cleanup-on-infected', defaultScannerResults);
   } else {
     cr.webUIListenerCallback(
         'chrome-cleanup-on-idle', settings.ChromeCleanupIdleReason.INITIAL);
@@ -179,11 +279,78 @@
 
 suite('ChromeCleanupHandler_UserInitiatedCleanupsDisabled', function() {
   setup(function() {
-    initParametrizedTest(false);
+    initParametrizedTest(false /* userInitiatedCleanupsEnabled */);
   });
 
-  test('startCleanupFromInfected', function() {
-    return startCleanupFromInfected();
+  test('startCleanupFromInfected_FewFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, shortFileList, []);
+  });
+
+  test('startCleanupFromInfected_FewFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, shortFileList,
+        shortRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_FewFilesExactSizeRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, shortFileList,
+        exactSizeRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_FewFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, shortFileList,
+        longRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ExactSizeFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, exactSizeFileList, []);
+  });
+
+  test('startCleanupFromInfected_ExactSizeFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+        shortRegistryKeysList);
+  });
+
+  test(
+      'startCleanupFromInfected_ExactSizeFilesExactSizeRegistryKeys',
+      function() {
+        return startCleanupFromInfected(
+            false /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+            exactSizeRegistryKeysList);
+      });
+
+  test('startCleanupFromInfected_ExactSizeFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+        longRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, longFileList, []);
+  });
+
+  test('startCleanupFromInfected_ManyFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, longFileList,
+        shortRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesExactSizeRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, longFileList,
+        exactSizeRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        false /* userInitiatedCleanupsEnabled */, longFileList,
+        longRegistryKeysList);
   });
 
   test('rebootFromRebootRequired', function() {
@@ -191,21 +358,21 @@
   });
 
   test('cleanupFailure', function() {
-    return cleanupFailure(false);
+    return cleanupFailure(false /* userInitiatedCleanupsEnabled */);
   });
 
   test('cleanupSuccess', function() {
-    return cleanupSuccess(false);
+    return cleanupSuccess(false /* userInitiatedCleanupsEnabled */);
   });
 
   test('logsUploadingOnInfected', function() {
-    return testLogsUploading(false);
+    return testLogsUploading(false /* testingScanOffered */);
   });
 });
 
 suite('ChromeCleanupHandler_UserInitiatedCleanupsEnabled', function() {
   setup(function() {
-    initParametrizedTest(true);
+    initParametrizedTest(true /* userInitiatedCleanupsEnabled */);
   });
 
   function scanOfferedOnInitiallyIdle(idleReason) {
@@ -320,8 +487,75 @@
     assertFalse(!!actionButton);
   });
 
-  test('startCleanupFromInfected', function() {
-    return startCleanupFromInfected();
+  test('startCleanupFromInfected_FewFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, shortFileList, []);
+  });
+
+  test('startCleanupFromInfected_FewFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, shortFileList,
+        shortRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_FewFilesExactSizeRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, shortFileList,
+        exactSizeRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_FewFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, shortFileList,
+        longRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ExactSizeFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, exactSizeFileList, []);
+  });
+
+  test('startCleanupFromInfected_ExactSizeFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+        shortRegistryKeysList);
+  });
+
+  test(
+      'startCleanupFromInfected_ExactSizeFilesExactSizeRegistryKeys',
+      function() {
+        return startCleanupFromInfected(
+            true /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+            exactSizeRegistryKeysList);
+      });
+
+  test('startCleanupFromInfected_ExactSizeFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, exactSizeFileList,
+        longRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesNoRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, longFileList, []);
+  });
+
+  test('startCleanupFromInfected_ManyFilesFewRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, longFileList,
+        shortRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesExactSizeRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, longFileList,
+        exactSizeRegistryKeysList);
+  });
+
+  test('startCleanupFromInfected_ManyFilesManyRegistryKeys', function() {
+    return startCleanupFromInfected(
+        true /* userInitiatedCleanupsEnabled */, longFileList,
+        longRegistryKeysList);
   });
 
   test('rebootFromRebootRequired', function() {
@@ -329,18 +563,18 @@
   });
 
   test('cleanupFailure', function() {
-    return cleanupFailure(true);
+    return cleanupFailure(true /* userInitiatedCleanupsEnabled */);
   });
 
   test('cleanupSuccess', function() {
-    return cleanupSuccess(true);
+    return cleanupSuccess(true /* userInitiatedCleanupsEnabled */);
   });
 
   test('logsUploadingOnScanOffered', function() {
-    return testLogsUploading(true);
+    return testLogsUploading(true /* testingScanOffered */);
   });
 
   test('logsUploadingOnInfected', function() {
-    return testLogsUploading(false);
+    return testLogsUploading(false /* testingScanOffered */);
   });
 });
diff --git a/chrome/test/data/window.close.html b/chrome/test/data/window.close.html
index 653b795..ed2b413 100644
--- a/chrome/test/data/window.close.html
+++ b/chrome/test/data/window.close.html
@@ -4,12 +4,21 @@
   <script>
     var popup, popup2, popup3, popup4;
 
+    function WindowOpen(file, name, attr) {
+      // Force windows to open in a new process. See https://crbug.com/153363.
+      var url = 'http://example.com:' + location.port + '/' + file;
+      var w = window.open('', name, attr);
+      w.opener = null;
+      w.location.href = url;
+      return w;
+    }
+
     // window.open, window.close should be synchronous
     function test1() {
-      popup = window.open('title1.html', 'name');
+      popup = WindowOpen('title1.html', 'name');
       popup.close();
 
-      popup = window.open('title2.html', 'name', 'width=200,height=200');
+      popup = WindowOpen('title2.html', 'name', 'width=200,height=200');
       popup.close();
       document.location = 'title2.html'
     }
@@ -33,10 +42,10 @@
     }
 
     function openPopups() {
-      popup = window.open('title1.html', 'name');
-      popup2 = window.open('title1.html', 'name2');
-      popup3 = window.open('title1.html', 'name3');
-      popup4 = window.open('title1.html', 'name4');
+      popup = WindowOpen('title1.html', 'name');
+      popup2 = WindowOpen('title1.html', 'name2');
+      popup3 = WindowOpen('title1.html', 'name3');
+      popup4 = WindowOpen('title1.html', 'name4');
     }
 
     function closePopups() {
diff --git a/chrome_elf/chrome_elf_x64.def b/chrome_elf/chrome_elf_x64.def
index c8b8a24..8ae8723 100644
--- a/chrome_elf/chrome_elf_x64.def
+++ b/chrome_elf/chrome_elf_x64.def
@@ -12,7 +12,6 @@
   ClearCrashKeyValue_ExportThunk
   CrashForException_ExportThunk
   GetCrashReports_ExportThunk
-  InjectDumpForHungInputNoCrashKeys_ExportThunk
   InjectDumpForHungInput_ExportThunk
   RequestSingleCrashUpload_ExportThunk
   SetCrashKeyValueEx_ExportThunk
diff --git a/chrome_elf/chrome_elf_x86.def b/chrome_elf/chrome_elf_x86.def
index e51bf16..a4fae06 100644
--- a/chrome_elf/chrome_elf_x86.def
+++ b/chrome_elf/chrome_elf_x86.def
@@ -12,7 +12,6 @@
   ClearCrashKeyValue_ExportThunk
   CrashForException_ExportThunk
   GetCrashReports_ExportThunk
-  InjectDumpForHungInputNoCrashKeys_ExportThunk
   InjectDumpForHungInput_ExportThunk
   RequestSingleCrashUpload_ExportThunk
   SetCrashKeyValueEx_ExportThunk
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
index 3e6efd51..911e735c3 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
@@ -99,23 +99,7 @@
         mAudioManager = CastAudioManager.getAudioManager(this);
 
         setContentView(R.layout.cast_web_contents_activity);
-
-        mWindow = new WindowAndroid(this);
-        mContentViewRenderView = new ContentViewRenderView(this) {
-            @Override
-            protected void onReadyToRender() {
-                setOverlayVideoMode(true);
-            }
-        };
-        mContentViewRenderView.onNativeLibraryLoaded(mWindow);
-        // Setting the background color to black avoids rendering a white splash screen
-        // before the players are loaded. See crbug/307113 for details.
-        mContentViewRenderView.setSurfaceViewBackgroundColor(Color.BLACK);
-
         mCastWebContentsLayout = (FrameLayout) findViewById(R.id.web_contents_container);
-        mCastWebContentsLayout.addView(mContentViewRenderView,
-                new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,
-                        FrameLayout.LayoutParams.MATCH_PARENT));
 
         Intent intent = getIntent();
         handleIntent(intent);
@@ -181,7 +165,6 @@
             return;
         }
 
-        detachWebContentsIfAny();
         showWebContents(webContents);
     }
 
@@ -377,9 +360,28 @@
     private void showWebContents(WebContents webContents) {
         if (DEBUG) Log.d(TAG, "showWebContents");
 
+        detachWebContentsIfAny();
+
         // Set ContentVideoViewEmbedder to allow video playback.
         nativeSetContentVideoViewEmbedder(webContents, new ActivityContentVideoViewEmbedder(this));
 
+        // TODO(thoren): Find a way to reuse some of this for efficiency.
+        mWindow = new WindowAndroid(this);
+        mContentViewRenderView = new ContentViewRenderView(this) {
+            @Override
+            protected void onReadyToRender() {
+                setOverlayVideoMode(true);
+            }
+        };
+        mContentViewRenderView.onNativeLibraryLoaded(mWindow);
+        // Setting the background color to black avoids rendering a white splash screen
+        // before the players are loaded. See crbug/307113 for details.
+        mContentViewRenderView.setSurfaceViewBackgroundColor(Color.BLACK);
+
+        mCastWebContentsLayout.addView(mContentViewRenderView,
+                new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,
+                        FrameLayout.LayoutParams.MATCH_PARENT));
+
         // TODO(derekjchow): productVersion
         mContentViewCore = ContentViewCore.create(this, "");
         mContentView = ContentView.createContentView(this, mContentViewCore);
@@ -399,8 +401,13 @@
         if (DEBUG) Log.d(TAG, "detachWebContentsIfAny");
         if (mContentView != null) {
             mCastWebContentsLayout.removeView(mContentView);
+            mContentViewCore.destroy();
+            mContentViewRenderView.destroy();
+            mWindow.destroy();
             mContentView = null;
             mContentViewCore = null;
+            mContentViewRenderView = null;
+            mWindow = null;
 
             CastWebContentsComponent.onComponentClosed(this, mInstanceId);
         }
diff --git a/chromecast/crash/cast_crash_keys.cc b/chromecast/crash/cast_crash_keys.cc
index 4e77a29..e6e2707 100644
--- a/chromecast/crash/cast_crash_keys.cc
+++ b/chromecast/crash/cast_crash_keys.cc
@@ -11,20 +11,7 @@
 namespace crash_keys {
 
 size_t RegisterCastCrashKeys() {
-  const base::debug::CrashKey fixed_keys[] = {
-      // TODO(sanfin): The following crash keys are copied from
-      // chrome/common/crash_keys.cc. When http://crbug.com/598854 is fixed,
-      // remove these and refactor as necessary.
-
-      {::crash_keys::kNumVariations, ::crash_keys::kSmallSize},
-      {::crash_keys::kVariations, ::crash_keys::kHugeSize},
-
-      // TODO(sunnyps): Remove after fixing crbug.com/724999.
-      {"gl-context-set-current-stack-trace", ::crash_keys::kMediumSize},
-  };
-
-  return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
-                                    ::crash_keys::kChunkMaxLength);
+  return 0;
 }
 
 crash_reporter::CrashKeyString<64> last_app("last_app");
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index 5d59846..9cf63ba 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-10228.0.0
\ No newline at end of file
+10232.0.0
\ No newline at end of file
diff --git a/components/arc/common/BUILD.gn b/components/arc/common/BUILD.gn
index ffd8c52..0ea2baf 100644
--- a/components/arc/common/BUILD.gn
+++ b/components/arc/common/BUILD.gn
@@ -71,7 +71,6 @@
     "video.mojom",
     "video_common.mojom",
     "video_decode_accelerator.mojom",
-    "video_decode_accelerator_deprecated.mojom",
     "video_encode_accelerator.mojom",
   ]
 
diff --git a/components/arc/common/video.mojom b/components/arc/common/video.mojom
index 5753a3b..5f5015e 100644
--- a/components/arc/common/video.mojom
+++ b/components/arc/common/video.mojom
@@ -7,7 +7,6 @@
 module arc.mojom;
 
 import "video_decode_accelerator.mojom";
-import "video_decode_accelerator_deprecated.mojom";
 import "video_encode_accelerator.mojom";
 
 // Deprecated method IDs: 0
@@ -30,10 +29,9 @@
   [MinVersion=5] Init@1(VideoHost host_ptr) => ();
 };
 
+// Deprecated method IDs: 0
 // Next method ID: 3
 interface VideoAcceleratorFactory {
-  CreateDecodeAcceleratorDeprecated@0(VideoDecodeAcceleratorDeprecated& video_decoder);
-
   [MinVersion=1]
   CreateEncodeAccelerator@1(VideoEncodeAccelerator& video_encoder);
 
diff --git a/components/arc/common/video_accelerator_struct_traits.h b/components/arc/common/video_accelerator_struct_traits.h
index bd5d830..c1f4e28f 100644
--- a/components/arc/common/video_accelerator_struct_traits.h
+++ b/components/arc/common/video_accelerator_struct_traits.h
@@ -5,7 +5,7 @@
 #ifndef COMPONENTS_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_
 #define COMPONENTS_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_
 
-#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
+#include "components/arc/common/video_common.mojom.h"
 #include "components/arc/video_accelerator/video_frame_plane.h"
 #include "media/base/video_codecs.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/components/arc/common/video_decode_accelerator_deprecated.mojom b/components/arc/common/video_decode_accelerator_deprecated.mojom
deleted file mode 100644
index 5742e0b..0000000
--- a/components/arc/common/video_decode_accelerator_deprecated.mojom
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defined the mojo interface between Android and Chromium for video
-// decoding. See comments of VideoDecodeAcceleratorDeprecated for more info.
-
-module arc.mojom;
-
-import "video_common.mojom";
-
-[Extensible]
-enum HalPixelFormatExtension {
-  HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
-  HAL_PIXEL_FORMAT_H264 = 0x34363248,
-  HAL_PIXEL_FORMAT_VP8 = 0x00385056,
-};
-
-enum PortType {
-  PORT_INPUT = 0,
-  PORT_OUTPUT = 1,
-};
-
-struct BufferMetadata {
-  int64 timestamp;  // in microseconds
-  uint32 bytes_used;
-};
-
-struct VideoFormat {
-  uint32 pixel_format;
-  uint32 buffer_size;
-
-  // minimal number of buffers required to process the video.
-  uint32 min_num_buffers;
-  uint32 coded_width;
-  uint32 coded_height;
-  uint32 crop_left;
-  uint32 crop_width;
-  uint32 crop_top;
-  uint32 crop_height;
-};
-
-// Next MinVersion: 2
-struct VideoDecodeAcceleratorConfigDeprecated {
-  // Deprecated. This config struct is used for decoder only.
-  enum DeviceTypeDeprecated {
-    DEVICE_ENCODER = 0,
-    DEVICE_DECODER = 1,
-  };
-
-  // Deprecated. Only decoder will be supported.
-  DeviceTypeDeprecated device_type_deprecated;
-  uint32 num_input_buffers;
-  uint32 input_pixel_format;
-  [MinVersion=1] bool secure_mode;
-};
-
-// Next MinVersion: 5
-// Deprecated method IDs: 2, 7
-// Next method ID: 11
-interface VideoDecodeAcceleratorDeprecated {
-  enum Result {
-    SUCCESS = 0,
-    ILLEGAL_STATE = 1,
-    INVALID_ARGUMENT = 2,
-    UNREADABLE_INPUT = 3,
-    PLATFORM_FAILURE = 4,
-    INSUFFICIENT_RESOURCES = 5,
-  };
-
-  [MinVersion=2]
-  Initialize@8(VideoDecodeAcceleratorConfigDeprecated config,
-               VideoDecodeClientDeprecated client) => (Result result);
-
-  [MinVersion=4]
-  AllocateProtectedBuffer@10(PortType port, uint32 index, handle handle_fd,
-                             uint64 size) => (bool result);
-
-  BindSharedMemory@1(PortType port, uint32 index, handle ashmem_fd,
-                     uint32 offset, uint32 length);
-
-  [MinVersion=3]
-  BindDmabuf@9(PortType port, uint32 index, handle dmabuf_fd,
-               array<VideoFramePlane> planes);
-
-  UseBuffer@3(PortType port, uint32 index, BufferMetadata metadata);
-
-  SetNumberOfOutputBuffers@4(uint32 number);
-
-  Reset@5();
-
-  Flush@6();
-};
-
-// Deprecated method IDs: 0
-// Next method ID: 6
-interface VideoDecodeClientDeprecated {
-  OnError@1(VideoDecodeAcceleratorDeprecated.Result error);
-
-  OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata);
-
-  OnResetDone@3();
-
-  OnOutputFormatChanged@4(VideoFormat format);
-
-  OnFlushDone@5();
-};
diff --git a/components/arc/video_accelerator/BUILD.gn b/components/arc/video_accelerator/BUILD.gn
index 7febb1a..f381092 100644
--- a/components/arc/video_accelerator/BUILD.gn
+++ b/components/arc/video_accelerator/BUILD.gn
@@ -4,13 +4,8 @@
 
 static_library("video_accelerator") {
   sources = [
-    "arc_video_decode_accelerator_deprecated.h",
-    "chrome_arc_video_decode_accelerator_deprecated.cc",
-    "chrome_arc_video_decode_accelerator_deprecated.h",
     "gpu_arc_video_decode_accelerator.cc",
     "gpu_arc_video_decode_accelerator.h",
-    "gpu_arc_video_decode_accelerator_deprecated.cc",
-    "gpu_arc_video_decode_accelerator_deprecated.h",
     "gpu_arc_video_encode_accelerator.cc",
     "gpu_arc_video_encode_accelerator.h",
     "protected_buffer_manager.cc",
diff --git a/components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h b/components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h
deleted file mode 100644
index 05012551..0000000
--- a/components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-#define COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-
-#include <vector>
-
-#include "base/files/scoped_file.h"
-#include "components/arc/video_accelerator/video_frame_plane.h"
-
-namespace arc {
-
-enum HalPixelFormatExtension {
-  // The pixel formats defined in Android but are used here. They are defined
-  // in "system/core/include/system/graphics.h"
-  HAL_PIXEL_FORMAT_BGRA_8888 = 5,
-  HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
-
-  // The following formats are not defined in Android, but used in
-  // ArcVideoDecodeAccelerator to identify the input format.
-  HAL_PIXEL_FORMAT_H264 = 0x34363248,
-  HAL_PIXEL_FORMAT_VP8 = 0x00385056,
-  HAL_PIXEL_FORMAT_VP9 = 0x00395056,
-};
-
-enum PortType {
-  PORT_INPUT = 0,
-  PORT_OUTPUT = 1,
-  PORT_COUNT = 2,
-};
-
-struct BufferMetadata {
-  int64_t timestamp = 0;  // in microseconds
-  uint32_t bytes_used = 0;
-};
-
-struct VideoFormat {
-  uint32_t pixel_format = 0;
-  uint32_t buffer_size = 0;
-
-  // Minimum number of buffers required to decode/encode the stream.
-  uint32_t min_num_buffers = 0;
-  uint32_t coded_width = 0;
-  uint32_t coded_height = 0;
-  uint32_t crop_left = 0;
-  uint32_t crop_width = 0;
-  uint32_t crop_top = 0;
-  uint32_t crop_height = 0;
-};
-
-// The IPC interface between Android and Chromium for video decoding. Input
-// buffers are sent from Android side and get processed in Chromium and the
-// output buffers are returned back to Android side.
-class ArcVideoDecodeAcceleratorDeprecated {
- public:
-  enum Result {
-    // Note: this enum is used for UMA reporting. The existing values should not
-    // be rearranged, reused or removed and any additions should include updates
-    // to UMA reporting and histograms.xml.
-    SUCCESS = 0,
-    ILLEGAL_STATE = 1,
-    INVALID_ARGUMENT = 2,
-    UNREADABLE_INPUT = 3,
-    PLATFORM_FAILURE = 4,
-    INSUFFICIENT_RESOURCES = 5,
-    RESULT_MAX = 6,
-  };
-
-  struct Config {
-    size_t num_input_buffers = 0;
-    uint32_t input_pixel_format = 0;
-    // If true, only buffers created via AllocateProtectedBuffer() may be used.
-    bool secure_mode = false;
-    // TODO(owenlin): Add output_pixel_format. For now only the native pixel
-    //                format of each VDA on Chromium is supported.
-  };
-
-  // The callbacks of the ArcVideoDecodeAcceleratorDeprecated.
-  // The user of this class should implement this interface.
-  class Client {
-   public:
-    virtual ~Client() {}
-
-    // Called when an asynchronous error happens. The errors in Initialize()
-    // will not be reported here, but will be indicated by a return value
-    // there.
-    virtual void OnError(Result error) = 0;
-
-    // Called when a buffer with the specified |index| and |port| has been
-    // processed and is no longer used in the accelerator. For input buffers,
-    // the Client may fill them with new content. For output buffers, indicates
-    // they are ready to be consumed by the client.
-    virtual void OnBufferDone(PortType port,
-                              uint32_t index,
-                              const BufferMetadata& metadata) = 0;
-
-    // Called when the output format has changed or the output format
-    // becomes available at beginning of the stream after initial parsing.
-    virtual void OnOutputFormatChanged(const VideoFormat& format) = 0;
-
-    // Called as a completion notification for Reset().
-    virtual void OnResetDone() = 0;
-
-    // Called as a completion notification for Flush().
-    virtual void OnFlushDone() = 0;
-  };
-
-  // Initializes the ArcVideoDecodeAcceleratorDeprecated with
-  // specific configuration. This must be called before any other methods.
-  // This call is synchronous and returns SUCCESS
-  // iff initialization is successful.
-  virtual Result Initialize(const Config& config, Client* client) = 0;
-
-  // Allocates a new protected buffer on accelerator side for the given |port|
-  // and |index|, the contents of which will be inaccessible to the client.
-  // The protected buffer will remain valid for at least as long as the resource
-  // backing the passed |handle_fd| is not released (i.e. there is at least one
-  // reference on the file backing |handle_fd|.
-  //
-  // Usable only if the accelerator has been initialized to run in secure mode.
-  // Allocation for input will create a protected buffer of at least |size|;
-  // for output, |size| is ignored, and the currently configured output format
-  // is used instead to determine the required buffer size and format.
-  virtual bool AllocateProtectedBuffer(PortType port,
-                                       uint32_t index,
-                                       base::ScopedFD handle_fd,
-                                       size_t size) = 0;
-
-  // Assigns a shared memory to be used for the accelerator at the specified
-  // port and index. A buffer must be successfully bound before it can be passed
-  // to the accelerator via UseBuffer(). Already bound buffers may be reused
-  // multiple times without additional bindings.
-  // Not allowed in secure_mode, where protected buffers have to be allocated
-  // instead.
-  virtual void BindSharedMemory(PortType port,
-                                uint32_t index,
-                                base::ScopedFD ashmem_fd,
-                                off_t offset,
-                                size_t length) = 0;
-
-  // Assigns a buffer to be used for the accelerator at the specified
-  // port and index. A buffer must be successfully bound before it can be
-  // passed to the accelerator via UseBuffer(). Already bound buffers may be
-  // reused multiple times without additional bindings.
-  // Not allowed in secure_mode, where protected buffers have to be allocated
-  // instead.
-  virtual void BindDmabuf(
-      PortType port,
-      uint32_t index,
-      base::ScopedFD dmabuf_fd,
-      const std::vector<::arc::VideoFramePlane>& planes) = 0;
-
-  // Passes a buffer to the accelerator. For input buffer, the accelerator
-  // will process it. For output buffer, the accelerator will output content
-  // to it.
-  // In secure mode, |port| and |index| must correspond to a protected buffer
-  // allocated using AllocateProtectedBuffer().
-  virtual void UseBuffer(PortType port,
-                         uint32_t index,
-                         const BufferMetadata& metadata) = 0;
-
-  // Sets the number of output buffers. When it fails, Client::OnError() will
-  // be called.
-  virtual void SetNumberOfOutputBuffers(size_t number) = 0;
-
-  // Resets the accelerator. When it is done, Client::OnResetDone() will
-  // be called. Afterwards, all buffers won't be accessed by the accelerator
-  // and there won't be more callbacks.
-  virtual void Reset() = 0;
-
-  // Flushes the accelerator. After all the output buffers pending decode have
-  // been returned to client by OnBufferDone(), Client::OnFlushDone() will be
-  // called.
-  virtual void Flush() = 0;
-
-  virtual ~ArcVideoDecodeAcceleratorDeprecated() {}
-};
-
-}  // namespace arc
-
-#endif  // COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
diff --git a/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.cc b/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.cc
deleted file mode 100644
index 2a15689..0000000
--- a/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.cc
+++ /dev/null
@@ -1,644 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.h"
-
-#include "base/callback_helpers.h"
-#include "base/logging.h"
-#include "base/metrics/histogram_macros.h"
-#include "base/numerics/safe_math.h"
-#include "base/run_loop.h"
-#include "base/unguessable_token.h"
-#include "components/arc/video_accelerator/protected_buffer_manager.h"
-#include "media/base/video_frame.h"
-#include "media/gpu/format_utils.h"
-#include "media/gpu/gpu_video_decode_accelerator_factory.h"
-
-namespace arc {
-
-namespace {
-
-// An arbitrary chosen limit of the number of buffers. The number of
-// buffers used is requested from the untrusted client side.
-const size_t kMaxBufferCount = 128;
-
-// Maximum number of concurrent ARC video clients.
-// Currently we have no way to know the resources are not enough to create more
-// VDA. Arbitrarily chosen a reasonable constant as the limit.
-const int kMaxConcurrentClients = 8;
-
-}  // namespace
-
-int ChromeArcVideoDecodeAcceleratorDeprecated::client_count_ = 0;
-
-ChromeArcVideoDecodeAcceleratorDeprecated::InputRecord::InputRecord(
-    int32_t bitstream_buffer_id,
-    uint32_t buffer_index,
-    int64_t timestamp)
-    : bitstream_buffer_id(bitstream_buffer_id),
-      buffer_index(buffer_index),
-      timestamp(timestamp) {}
-
-ChromeArcVideoDecodeAcceleratorDeprecated::InputBufferInfo::InputBufferInfo() =
-    default;
-
-ChromeArcVideoDecodeAcceleratorDeprecated::InputBufferInfo::~InputBufferInfo() {
-  if (shm_handle.OwnershipPassesToIPC())
-    shm_handle.Close();
-}
-
-ChromeArcVideoDecodeAcceleratorDeprecated::OutputBufferInfo::
-    OutputBufferInfo() = default;
-
-ChromeArcVideoDecodeAcceleratorDeprecated::OutputBufferInfo::
-    ~OutputBufferInfo() {
-  if (!gpu_memory_buffer_handle.is_null()) {
-    for (const auto& fd : gpu_memory_buffer_handle.native_pixmap_handle.fds) {
-      // Close the fd by wrapping it in a ScopedFD and letting
-      // it fall out of scope.
-      base::ScopedFD scoped_fd(fd.fd);
-    }
-  }
-}
-
-ChromeArcVideoDecodeAcceleratorDeprecated::
-    ChromeArcVideoDecodeAcceleratorDeprecated(
-        const gpu::GpuPreferences& gpu_preferences,
-        ProtectedBufferManager* protected_buffer_manager)
-    : arc_client_(nullptr),
-      next_bitstream_buffer_id_(0),
-      output_pixel_format_(media::PIXEL_FORMAT_UNKNOWN),
-      output_buffer_size_(0),
-      requested_num_of_output_buffers_(0),
-      gpu_preferences_(gpu_preferences),
-      protected_buffer_manager_(protected_buffer_manager) {}
-
-ChromeArcVideoDecodeAcceleratorDeprecated::
-    ~ChromeArcVideoDecodeAcceleratorDeprecated() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (vda_) {
-    client_count_--;
-  }
-}
-
-ArcVideoDecodeAcceleratorDeprecated::Result
-ChromeArcVideoDecodeAcceleratorDeprecated::Initialize(
-    const Config& config,
-    ArcVideoDecodeAcceleratorDeprecated::Client* client) {
-  auto result = InitializeTask(config, client);
-  // Report initialization status to UMA.
-  UMA_HISTOGRAM_ENUMERATION(
-      "Media.ChromeArcVideoDecodeAccelerator.InitializeResult", result,
-      RESULT_MAX);
-  return result;
-}
-
-ArcVideoDecodeAcceleratorDeprecated::Result
-ChromeArcVideoDecodeAcceleratorDeprecated::InitializeTask(
-    const Config& config,
-    ArcVideoDecodeAcceleratorDeprecated::Client* client) {
-  DVLOG(5) << "Initialize(input_pixel_format=" << config.input_pixel_format
-           << ", num_input_buffers=" << config.num_input_buffers << ")";
-
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  DCHECK(client);
-
-  if (arc_client_) {
-    DLOG(ERROR) << "Re-Initialize() is not allowed";
-    return ILLEGAL_STATE;
-  }
-
-  arc_client_ = client;
-
-  if (client_count_ >= kMaxConcurrentClients) {
-    LOG(WARNING) << "Reject to Initialize() due to too many clients: "
-                 << client_count_;
-    return INSUFFICIENT_RESOURCES;
-  }
-
-  if (config.secure_mode && !protected_buffer_manager_) {
-    DLOG(ERROR) << "Secure mode unsupported";
-    return PLATFORM_FAILURE;
-  }
-
-  secure_mode_ = config.secure_mode;
-
-  if (config.num_input_buffers > kMaxBufferCount) {
-    DLOG(ERROR) << "Request too many buffers: " << config.num_input_buffers;
-    return INVALID_ARGUMENT;
-  }
-  input_buffer_info_.resize(config.num_input_buffers);
-
-  media::VideoDecodeAccelerator::Config vda_config;
-  switch (config.input_pixel_format) {
-    case HAL_PIXEL_FORMAT_H264:
-      vda_config.profile = media::H264PROFILE_MAIN;
-      break;
-    case HAL_PIXEL_FORMAT_VP8:
-      vda_config.profile = media::VP8PROFILE_ANY;
-      break;
-    case HAL_PIXEL_FORMAT_VP9:
-      vda_config.profile = media::VP9PROFILE_PROFILE0;
-      break;
-    default:
-      DLOG(ERROR) << "Unsupported input format: " << config.input_pixel_format;
-      return INVALID_ARGUMENT;
-  }
-  vda_config.output_mode =
-      media::VideoDecodeAccelerator::Config::OutputMode::IMPORT;
-
-  auto vda_factory = media::GpuVideoDecodeAcceleratorFactory::CreateWithNoGL();
-  vda_ = vda_factory->CreateVDA(
-      this, vda_config, gpu::GpuDriverBugWorkarounds(), gpu_preferences_);
-  if (!vda_) {
-    DLOG(ERROR) << "Failed to create VDA.";
-    return PLATFORM_FAILURE;
-  }
-
-  client_count_++;
-  DVLOG(5) << "Number of concurrent ArcVideoDecodeAccelerator clients: "
-           << client_count_;
-
-  return SUCCESS;
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::SetNumberOfOutputBuffers(
-    size_t number) {
-  DVLOG(5) << "SetNumberOfOutputBuffers(" << number << ")";
-
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-
-  if (number > kMaxBufferCount) {
-    DLOG(ERROR) << "Too many buffers: " << number;
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-
-  std::vector<media::PictureBuffer> buffers;
-  for (size_t id = 0; id < number; ++id) {
-    // TODO(owenlin): Make sure the |coded_size| is what we want.
-    buffers.push_back(
-        media::PictureBuffer(base::checked_cast<int32_t>(id), coded_size_));
-  }
-  vda_->AssignPictureBuffers(buffers);
-
-  buffers_pending_import_.clear();
-  buffers_pending_import_.resize(number);
-}
-
-bool ChromeArcVideoDecodeAcceleratorDeprecated::AllocateProtectedBuffer(
-    PortType port,
-    uint32_t index,
-    base::ScopedFD handle_fd,
-    size_t size) {
-  DVLOG(5) << "port=" << port << " index=" << index
-           << " handle=" << handle_fd.get() << " size=" << size;
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  if (!secure_mode_) {
-    DLOG(ERROR) << "Not in secure mode";
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return false;
-  }
-
-  if (!ValidatePortAndIndex(port, index)) {
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return false;
-  }
-
-  if (port == PORT_INPUT) {
-    auto protected_shmem =
-        protected_buffer_manager_->AllocateProtectedSharedMemory(
-            std::move(handle_fd), size);
-    if (!protected_shmem) {
-      DLOG(ERROR) << "Failed allocating protected shared memory";
-      return false;
-    }
-
-    auto input_info = std::make_unique<InputBufferInfo>();
-    input_info->shm_handle = protected_shmem->shm_handle();
-    input_info->protected_buffer_handle = std::move(protected_shmem);
-    input_buffer_info_[index] = std::move(input_info);
-  } else if (port == PORT_OUTPUT) {
-    auto protected_pixmap =
-        protected_buffer_manager_->AllocateProtectedNativePixmap(
-            std::move(handle_fd),
-            media::VideoPixelFormatToGfxBufferFormat(output_pixel_format_),
-            coded_size_);
-    if (!protected_pixmap) {
-      DLOG(ERROR) << "Failed allocating a protected pixmap";
-      return false;
-    }
-    auto output_info = std::make_unique<OutputBufferInfo>();
-    output_info->gpu_memory_buffer_handle.type = gfx::NATIVE_PIXMAP;
-    output_info->gpu_memory_buffer_handle.native_pixmap_handle =
-        gfx::CloneHandleForIPC(protected_pixmap->native_pixmap_handle());
-    output_info->protected_buffer_handle = std::move(protected_pixmap);
-    buffers_pending_import_[index] = std::move(output_info);
-  }
-
-  return true;
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::BindSharedMemory(
-    PortType port,
-    uint32_t index,
-    base::ScopedFD ashmem_fd,
-    off_t offset,
-    size_t length) {
-  DVLOG(5) << "ArcGVDA::BindSharedMemory, offset: " << offset
-           << ", length: " << length;
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  if (secure_mode_) {
-    DLOG(ERROR) << "not allowed in secure mode";
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-
-  if (port != PORT_INPUT) {
-    DLOG(ERROR) << "SharedBuffer is only supported for input";
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-  if (!ValidatePortAndIndex(port, index)) {
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-
-  auto input_info = std::make_unique<InputBufferInfo>();
-  input_info->shm_handle =
-      base::SharedMemoryHandle(base::FileDescriptor(ashmem_fd.release(), true),
-                               length, base::UnguessableToken::Create());
-  DCHECK(input_info->shm_handle.OwnershipPassesToIPC());
-  input_info->offset = offset;
-  input_buffer_info_[index] = std::move(input_info);
-}
-
-bool ChromeArcVideoDecodeAcceleratorDeprecated::VerifyDmabuf(
-    const base::ScopedFD& dmabuf_fd,
-    const std::vector<::arc::VideoFramePlane>& planes) const {
-  size_t num_planes = media::VideoFrame::NumPlanes(output_pixel_format_);
-  if (planes.size() != num_planes) {
-    DLOG(ERROR) << "Invalid number of dmabuf planes passed: " << planes.size()
-                << ", expected: " << num_planes;
-    return false;
-  }
-
-  off_t size = lseek(dmabuf_fd.get(), 0, SEEK_END);
-  lseek(dmabuf_fd.get(), 0, SEEK_SET);
-  if (size < 0) {
-    DPLOG(ERROR) << "fail to find the size of dmabuf";
-    return false;
-  }
-
-  size_t i = 0;
-  for (const auto& plane : planes) {
-    DVLOG(4) << "Plane " << i << ", offset: " << plane.offset
-             << ", stride: " << plane.stride;
-
-    size_t rows =
-        media::VideoFrame::Rows(i, output_pixel_format_, coded_size_.height());
-    base::CheckedNumeric<off_t> current_size(plane.offset);
-    current_size += base::CheckMul(plane.stride, rows);
-
-    if (!current_size.IsValid() || current_size.ValueOrDie() > size) {
-      DLOG(ERROR) << "Invalid strides/offsets";
-      return false;
-    }
-
-    ++i;
-  }
-
-  return true;
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::BindDmabuf(
-    PortType port,
-    uint32_t index,
-    base::ScopedFD dmabuf_fd,
-    const std::vector<::arc::VideoFramePlane>& planes) {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  if (secure_mode_) {
-    DLOG(ERROR) << "not allowed in secure mode";
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-
-  if (port != PORT_OUTPUT) {
-    DLOG(ERROR) << "Dmabuf is only supported for input";
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-  if (!ValidatePortAndIndex(port, index)) {
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-  if (!VerifyDmabuf(dmabuf_fd, planes)) {
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-
-#if defined(USE_OZONE)
-  auto output_info = std::make_unique<OutputBufferInfo>();
-  output_info->gpu_memory_buffer_handle.type = gfx::NATIVE_PIXMAP;
-  output_info->gpu_memory_buffer_handle.native_pixmap_handle.fds.emplace_back(
-      base::FileDescriptor(dmabuf_fd.release(), true));
-  for (const auto& plane : planes) {
-    output_info->gpu_memory_buffer_handle.native_pixmap_handle.planes
-        .emplace_back(plane.stride, plane.offset, 0, 0);
-  }
-  buffers_pending_import_[index] = std::move(output_info);
-#else
-  arc_client_->OnError(PLATFORM_FAILURE);
-#endif
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::UseBuffer(
-    PortType port,
-    uint32_t index,
-    const BufferMetadata& metadata) {
-  DVLOG(5) << "UseBuffer(port=" << port << ", index=" << index
-           << ", metadata=(bytes_used=" << metadata.bytes_used
-           << ", timestamp=" << metadata.timestamp << ")";
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-  if (!ValidatePortAndIndex(port, index)) {
-    arc_client_->OnError(INVALID_ARGUMENT);
-    return;
-  }
-  switch (port) {
-    case PORT_INPUT: {
-      auto& input_info = input_buffer_info_[index];
-      if (!input_info) {
-        DLOG(ERROR) << "Buffer not initialized";
-        arc_client_->OnError(INVALID_ARGUMENT);
-        return;
-      }
-
-      int32_t bitstream_buffer_id = next_bitstream_buffer_id_;
-      // Mask against 30 bits, to avoid (undefined) wraparound on signed
-      // integer.
-      next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x3FFFFFFF;
-
-      auto duplicated_handle = input_info->shm_handle.Duplicate();
-      if (!duplicated_handle.IsValid()) {
-        arc_client_->OnError(PLATFORM_FAILURE);
-        return;
-      }
-
-      CreateInputRecord(bitstream_buffer_id, index, metadata.timestamp);
-      vda_->Decode(
-          media::BitstreamBuffer(bitstream_buffer_id, duplicated_handle,
-                                 metadata.bytes_used, input_info->offset));
-      break;
-    }
-    case PORT_OUTPUT: {
-      auto& output_info = buffers_pending_import_[index];
-      if (!output_info) {
-        DLOG(ERROR) << "Buffer not initialized";
-        arc_client_->OnError(INVALID_ARGUMENT);
-        return;
-      }
-      // is_null() is false the first time the buffer is passed to the VDA.
-      // In that case, VDA needs to import the buffer first.
-      if (!output_info->gpu_memory_buffer_handle.is_null()) {
-        vda_->ImportBufferForPicture(index,
-                                     output_info->gpu_memory_buffer_handle);
-        // VDA takes ownership, so just clear out, don't close the handle.
-        output_info->gpu_memory_buffer_handle = gfx::GpuMemoryBufferHandle();
-      } else {
-        vda_->ReusePictureBuffer(index);
-      }
-      break;
-    }
-    default:
-      NOTREACHED();
-  }
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::Reset() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-  vda_->Reset();
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::Flush() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (!vda_) {
-    DLOG(ERROR) << "VDA not initialized";
-    return;
-  }
-  vda_->Flush();
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::ProvidePictureBuffers(
-    uint32_t requested_num_of_buffers,
-    media::VideoPixelFormat output_pixel_format,
-    uint32_t textures_per_buffer,
-    const gfx::Size& dimensions,
-    uint32_t texture_target) {
-  DVLOG(5) << "ProvidePictureBuffers("
-           << "requested_num_of_buffers=" << requested_num_of_buffers
-           << ", dimensions=" << dimensions.ToString() << ")";
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  coded_size_ = dimensions;
-
-  // By default, use an empty rect to indicate the visible rectangle is not
-  // available.
-  visible_rect_ = gfx::Rect();
-  if ((output_pixel_format_ != media::PIXEL_FORMAT_UNKNOWN) &&
-      (output_pixel_format_ != output_pixel_format)) {
-    arc_client_->OnError(PLATFORM_FAILURE);
-    return;
-  }
-  output_pixel_format_ = output_pixel_format;
-  requested_num_of_output_buffers_ = requested_num_of_buffers;
-  output_buffer_size_ =
-      media::VideoFrame::AllocationSize(output_pixel_format_, coded_size_);
-
-  NotifyOutputFormatChanged();
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::NotifyOutputFormatChanged() {
-  VideoFormat video_format;
-  switch (output_pixel_format_) {
-    case media::PIXEL_FORMAT_I420:
-    case media::PIXEL_FORMAT_YV12:
-    case media::PIXEL_FORMAT_NV12:
-    case media::PIXEL_FORMAT_NV21:
-      // HAL_PIXEL_FORMAT_YCbCr_420_888 is the flexible pixel format in Android
-      // which handles all 420 formats, with both orderings of chroma (CbCr and
-      // CrCb) as well as planar and semi-planar layouts.
-      video_format.pixel_format = HAL_PIXEL_FORMAT_YCbCr_420_888;
-      break;
-    case media::PIXEL_FORMAT_ARGB:
-      video_format.pixel_format = HAL_PIXEL_FORMAT_BGRA_8888;
-      break;
-    default:
-      DLOG(ERROR) << "Format not supported: " << output_pixel_format_;
-      arc_client_->OnError(PLATFORM_FAILURE);
-      return;
-  }
-  video_format.buffer_size = output_buffer_size_;
-  video_format.min_num_buffers = requested_num_of_output_buffers_;
-  video_format.coded_width = coded_size_.width();
-  video_format.coded_height = coded_size_.height();
-  video_format.crop_top = visible_rect_.y();
-  video_format.crop_left = visible_rect_.x();
-  video_format.crop_width = visible_rect_.width();
-  video_format.crop_height = visible_rect_.height();
-  arc_client_->OnOutputFormatChanged(video_format);
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::DismissPictureBuffer(
-    int32_t picture_buffer) {
-  // no-op
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::PictureReady(
-    const media::Picture& picture) {
-  DVLOG(5) << "PictureReady(picture_buffer_id=" << picture.picture_buffer_id()
-           << ", bitstream_buffer_id=" << picture.bitstream_buffer_id();
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  // Handle visible size change.
-  if (visible_rect_ != picture.visible_rect()) {
-    DVLOG(5) << "visible size changed: " << picture.visible_rect().ToString();
-    visible_rect_ = picture.visible_rect();
-    NotifyOutputFormatChanged();
-  }
-
-  InputRecord* input_record = FindInputRecord(picture.bitstream_buffer_id());
-  if (input_record == nullptr) {
-    DLOG(ERROR) << "Cannot find for bitstream buffer id: "
-                << picture.bitstream_buffer_id();
-    arc_client_->OnError(PLATFORM_FAILURE);
-    return;
-  }
-
-  BufferMetadata metadata;
-  metadata.timestamp = input_record->timestamp;
-  metadata.bytes_used = output_buffer_size_;
-  arc_client_->OnBufferDone(PORT_OUTPUT, picture.picture_buffer_id(), metadata);
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::NotifyEndOfBitstreamBuffer(
-    int32_t bitstream_buffer_id) {
-  DVLOG(5) << "NotifyEndOfBitstreamBuffer(" << bitstream_buffer_id << ")";
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  InputRecord* input_record = FindInputRecord(bitstream_buffer_id);
-  if (input_record == nullptr) {
-    arc_client_->OnError(PLATFORM_FAILURE);
-    return;
-  }
-  arc_client_->OnBufferDone(PORT_INPUT, input_record->buffer_index,
-                            BufferMetadata());
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::NotifyFlushDone() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  arc_client_->OnFlushDone();
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::NotifyResetDone() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  arc_client_->OnResetDone();
-}
-
-static ArcVideoDecodeAcceleratorDeprecated::Result ConvertErrorCode(
-    media::VideoDecodeAccelerator::Error error) {
-  switch (error) {
-    case media::VideoDecodeAccelerator::ILLEGAL_STATE:
-      return ArcVideoDecodeAcceleratorDeprecated::ILLEGAL_STATE;
-    case media::VideoDecodeAccelerator::INVALID_ARGUMENT:
-      return ArcVideoDecodeAcceleratorDeprecated::INVALID_ARGUMENT;
-    case media::VideoDecodeAccelerator::UNREADABLE_INPUT:
-      return ArcVideoDecodeAcceleratorDeprecated::UNREADABLE_INPUT;
-    case media::VideoDecodeAccelerator::PLATFORM_FAILURE:
-      return ArcVideoDecodeAcceleratorDeprecated::PLATFORM_FAILURE;
-    default:
-      DLOG(ERROR) << "Unknown error: " << error;
-      return ArcVideoDecodeAcceleratorDeprecated::PLATFORM_FAILURE;
-  }
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::NotifyError(
-    media::VideoDecodeAccelerator::Error error) {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  DLOG(ERROR) << "Error notified: " << error;
-  arc_client_->OnError(ConvertErrorCode(error));
-}
-
-void ChromeArcVideoDecodeAcceleratorDeprecated::CreateInputRecord(
-    int32_t bitstream_buffer_id,
-    uint32_t buffer_index,
-    int64_t timestamp) {
-  input_records_.push_front(
-      InputRecord(bitstream_buffer_id, buffer_index, timestamp));
-
-  // The same value copied from media::GpuVideoDecoder. The input record is
-  // needed when the input buffer or the corresponding output buffer are
-  // returned from VDA. However there is no guarantee how much buffers will be
-  // kept in the VDA. We kept the last |kMaxNumberOfInputRecords| in
-  // |input_records_| and drop the others.
-  const size_t kMaxNumberOfInputRecords = 128;
-  if (input_records_.size() > kMaxNumberOfInputRecords)
-    input_records_.pop_back();
-}
-
-ChromeArcVideoDecodeAcceleratorDeprecated::InputRecord*
-ChromeArcVideoDecodeAcceleratorDeprecated::FindInputRecord(
-    int32_t bitstream_buffer_id) {
-  for (auto& record : input_records_) {
-    if (record.bitstream_buffer_id == bitstream_buffer_id)
-      return &record;
-  }
-  return nullptr;
-}
-
-bool ChromeArcVideoDecodeAcceleratorDeprecated::ValidatePortAndIndex(
-    PortType port,
-    uint32_t index) const {
-  switch (port) {
-    case PORT_INPUT:
-      if (index >= input_buffer_info_.size()) {
-        DLOG(ERROR) << "Invalid index: " << index;
-        return false;
-      }
-      return true;
-    case PORT_OUTPUT:
-      if (index >= buffers_pending_import_.size()) {
-        DLOG(ERROR) << "Invalid index: " << index;
-        return false;
-      }
-      return true;
-    default:
-      DLOG(ERROR) << "Invalid port: " << port;
-      return false;
-  }
-}
-
-}  // namespace arc
diff --git a/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.h b/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.h
deleted file mode 100644
index 7e749c2b..0000000
--- a/components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-#define COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-
-#include <list>
-#include <memory>
-#include <queue>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/threading/thread_checker.h"
-#include "components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h"
-#include "gpu/command_buffer/service/gpu_preferences.h"
-#include "media/video/video_decode_accelerator.h"
-
-namespace arc {
-
-class ProtectedBufferManager;
-class ProtectedBufferHandle;
-
-// This class is executed in the GPU process. It takes decoding requests from
-// ARC via IPC channels and translates and sends those requests to an
-// implementation of media::VideoDecodeAcceleratorDeprecated.
-// It also returns the decoded frames back to the ARC side.
-class ChromeArcVideoDecodeAcceleratorDeprecated
-    : public ArcVideoDecodeAcceleratorDeprecated,
-      public media::VideoDecodeAccelerator::Client,
-      public base::SupportsWeakPtr<ChromeArcVideoDecodeAcceleratorDeprecated> {
- public:
-  ChromeArcVideoDecodeAcceleratorDeprecated(
-      const gpu::GpuPreferences& gpu_preferences,
-      ProtectedBufferManager* protected_buffer_manager);
-  ~ChromeArcVideoDecodeAcceleratorDeprecated() override;
-
-  // Implementation of the ArcVideoDecodeAcceleratorDeprecated interface.
-  ArcVideoDecodeAcceleratorDeprecated::Result Initialize(
-      const Config& config,
-      ArcVideoDecodeAcceleratorDeprecated::Client* client) override;
-  void SetNumberOfOutputBuffers(size_t number) override;
-  bool AllocateProtectedBuffer(PortType port,
-                               uint32_t index,
-                               base::ScopedFD handle_fd,
-                               size_t size) override;
-  void BindSharedMemory(PortType port,
-                        uint32_t index,
-                        base::ScopedFD ashmem_fd,
-                        off_t offset,
-                        size_t length) override;
-  void BindDmabuf(PortType port,
-                  uint32_t index,
-                  base::ScopedFD dmabuf_fd,
-                  const std::vector<::arc::VideoFramePlane>& planes) override;
-  void UseBuffer(PortType port,
-                 uint32_t index,
-                 const BufferMetadata& metadata) override;
-  void Reset() override;
-  void Flush() override;
-
-  // Implementation of the VideoDecodeAccelerator::Client interface.
-  void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
-                             media::VideoPixelFormat output_format,
-                             uint32_t textures_per_buffer,
-                             const gfx::Size& dimensions,
-                             uint32_t texture_target) override;
-  void DismissPictureBuffer(int32_t picture_buffer) override;
-  void PictureReady(const media::Picture& picture) override;
-  void NotifyEndOfBitstreamBuffer(int32_t bitstream_buffer_id) override;
-  void NotifyFlushDone() override;
-  void NotifyResetDone() override;
-  void NotifyError(media::VideoDecodeAccelerator::Error error) override;
-
- private:
-  // Some information related to a bitstream buffer. The information is required
-  // when input or output buffers are returned back to the client.
-  struct InputRecord {
-    int32_t bitstream_buffer_id;
-    uint32_t buffer_index;
-    int64_t timestamp;
-
-    InputRecord(int32_t bitstream_buffer_id,
-                uint32_t buffer_index,
-                int64_t timestamp);
-  };
-
-  // The information about the shared memory used as an input buffer.
-  struct InputBufferInfo {
-    // SharedMemoryHandle for this buffer to be passed to accelerator.
-    // In non-secure mode, received via BindSharedMemory from the client,
-    // in secure mode, a handle for the SharedMemory in protected_shmem.
-    base::SharedMemoryHandle shm_handle;
-
-    // Used only in secure mode; handle to the protected buffer backing
-    // this input buffer.
-    std::unique_ptr<ProtectedBufferHandle> protected_buffer_handle;
-
-    // Offset to the payload from the beginning of the shared memory buffer.
-    off_t offset = 0;
-
-    InputBufferInfo();
-    ~InputBufferInfo();
-  };
-
-  // The information about the native pixmap used as an output buffer.
-  struct OutputBufferInfo {
-    // GpuMemoryBufferHandle for this buffer to be passed to accelerator.
-    // In non-secure mode, received via BindDmabuf from the client,
-    // in secure mode, a handle to the NativePixmap in protected_pixmap.
-    gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle;
-
-    // Used only in secure mode; handle to the protected buffer backing
-    // this output buffer.
-    std::unique_ptr<ProtectedBufferHandle> protected_buffer_handle;
-
-    OutputBufferInfo();
-    ~OutputBufferInfo();
-  };
-
-  // The helper method to simplify reporting of the status returned to UMA.
-  ArcVideoDecodeAcceleratorDeprecated::Result InitializeTask(
-      const Config& config,
-      ArcVideoDecodeAcceleratorDeprecated::Client* client);
-
-  // Helper function to validate |port| and |index|.
-  bool ValidatePortAndIndex(PortType port, uint32_t index) const;
-
-  // Return true if |planes| is valid for a dmabuf |fd|.
-  bool VerifyDmabuf(const base::ScopedFD& fd,
-                    const std::vector<::arc::VideoFramePlane>& planes) const;
-
-  // Creates an InputRecord for the given |bitstream_buffer_id|. The
-  // |buffer_index| is the index of the associated input buffer. The |timestamp|
-  // is the time the video frame should be displayed.
-  void CreateInputRecord(int32_t bitstream_buffer_id,
-                         uint32_t buffer_index,
-                         int64_t timestamp);
-
-  // Finds the InputRecord which matches to given |bitstream_buffer_id|.
-  // Returns |nullptr| if it cannot be found.
-  InputRecord* FindInputRecord(int32_t bitstream_buffer_id);
-
-  // Notify the client when output format changes.
-  void NotifyOutputFormatChanged();
-
-  // Global counter that keeps track the number of active clients (i.e., how
-  // many VDAs in use by this class).
-  // Since this class only works on the same thread, it's safe to access
-  // |client_count_| without lock.
-  static int client_count_;
-
-  std::unique_ptr<media::VideoDecodeAccelerator> vda_;
-
-  // It's safe to use the pointer here, the life cycle of the |arc_client_|
-  // is longer than this ChromeArcVideoDecodeAcceleratorDeprecated.
-  ArcVideoDecodeAcceleratorDeprecated::Client* arc_client_;
-
-  // The next ID for the bitstream buffer, started from 0.
-  int32_t next_bitstream_buffer_id_;
-
-  gfx::Size coded_size_;
-  gfx::Rect visible_rect_;
-  media::VideoPixelFormat output_pixel_format_;
-
-  // A list of most recent |kMaxNumberOfInputRecord| InputRecords.
-  // |kMaxNumberOfInputRecord| is defined in the cc file.
-  std::list<InputRecord> input_records_;
-
-  // The details of the shared memory of each input buffers.
-  std::vector<std::unique_ptr<InputBufferInfo>> input_buffer_info_;
-
-  // To keep those output buffers which have been bound by bindDmabuf() but
-  // haven't been passed to VDA yet. Will call VDA::ImportBufferForPicture()
-  // when those buffers are used for the first time.
-  std::vector<std::unique_ptr<OutputBufferInfo>> buffers_pending_import_;
-
-  THREAD_CHECKER(thread_checker_);
-  size_t output_buffer_size_;
-
-  // The minimal number of requested output buffers.
-  uint32_t requested_num_of_output_buffers_;
-
-  bool secure_mode_ = false;
-
-  gpu::GpuPreferences gpu_preferences_;
-  ProtectedBufferManager* protected_buffer_manager_;
-
-  DISALLOW_COPY_AND_ASSIGN(ChromeArcVideoDecodeAcceleratorDeprecated);
-};
-
-}  // namespace arc
-
-#endif  // COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
diff --git a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.cc b/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.cc
deleted file mode 100644
index 1ab8935..0000000
--- a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.cc
+++ /dev/null
@@ -1,272 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h"
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "components/arc/video_accelerator/chrome_arc_video_decode_accelerator_deprecated.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/bindings/type_converter.h"
-#include "mojo/public/cpp/system/platform_handle.h"
-
-// Make sure arc::mojom::VideoDecodeAccelerator::Result and
-// arc::ArcVideoDecodeAccelerator::Result match.
-static_assert(
-    static_cast<int>(
-        arc::mojom::VideoDecodeAcceleratorDeprecated::Result::SUCCESS) ==
-        arc::ArcVideoDecodeAcceleratorDeprecated::SUCCESS,
-    "enum mismatch");
-static_assert(
-    static_cast<int>(
-        arc::mojom::VideoDecodeAcceleratorDeprecated::Result::ILLEGAL_STATE) ==
-        arc::ArcVideoDecodeAcceleratorDeprecated::ILLEGAL_STATE,
-    "enum mismatch");
-static_assert(static_cast<int>(arc::mojom::VideoDecodeAcceleratorDeprecated::
-                                   Result::INVALID_ARGUMENT) ==
-                  arc::ArcVideoDecodeAcceleratorDeprecated::INVALID_ARGUMENT,
-              "enum mismatch");
-static_assert(static_cast<int>(arc::mojom::VideoDecodeAcceleratorDeprecated::
-                                   Result::UNREADABLE_INPUT) ==
-                  arc::ArcVideoDecodeAcceleratorDeprecated::UNREADABLE_INPUT,
-              "enum mismatch");
-static_assert(static_cast<int>(arc::mojom::VideoDecodeAcceleratorDeprecated::
-                                   Result::PLATFORM_FAILURE) ==
-                  arc::ArcVideoDecodeAcceleratorDeprecated::PLATFORM_FAILURE,
-              "enum mismatch");
-static_assert(
-    static_cast<int>(arc::mojom::VideoDecodeAcceleratorDeprecated::Result::
-                         INSUFFICIENT_RESOURCES) ==
-        arc::ArcVideoDecodeAcceleratorDeprecated::INSUFFICIENT_RESOURCES,
-    "enum mismatch");
-
-namespace mojo {
-
-template <>
-struct TypeConverter<arc::mojom::BufferMetadataPtr, arc::BufferMetadata> {
-  static arc::mojom::BufferMetadataPtr Convert(
-      const arc::BufferMetadata& input) {
-    arc::mojom::BufferMetadataPtr result = arc::mojom::BufferMetadata::New();
-    result->timestamp = input.timestamp;
-    result->bytes_used = input.bytes_used;
-    return result;
-  }
-};
-
-template <>
-struct TypeConverter<arc::BufferMetadata, arc::mojom::BufferMetadataPtr> {
-  static arc::BufferMetadata Convert(
-      const arc::mojom::BufferMetadataPtr& input) {
-    arc::BufferMetadata result;
-    result.timestamp = input->timestamp;
-    result.bytes_used = input->bytes_used;
-    return result;
-  }
-};
-
-template <>
-struct TypeConverter<arc::mojom::VideoFormatPtr, arc::VideoFormat> {
-  static arc::mojom::VideoFormatPtr Convert(const arc::VideoFormat& input) {
-    arc::mojom::VideoFormatPtr result = arc::mojom::VideoFormat::New();
-    result->pixel_format = input.pixel_format;
-    result->buffer_size = input.buffer_size;
-    result->min_num_buffers = input.min_num_buffers;
-    result->coded_width = input.coded_width;
-    result->coded_height = input.coded_height;
-    result->crop_left = input.crop_left;
-    result->crop_width = input.crop_width;
-    result->crop_top = input.crop_top;
-    result->crop_height = input.crop_height;
-    return result;
-  }
-};
-
-template <>
-struct TypeConverter<arc::ArcVideoDecodeAcceleratorDeprecated::Config,
-                     arc::mojom::VideoDecodeAcceleratorConfigDeprecatedPtr> {
-  static arc::ArcVideoDecodeAcceleratorDeprecated::Config Convert(
-      const arc::mojom::VideoDecodeAcceleratorConfigDeprecatedPtr& input) {
-    arc::ArcVideoDecodeAcceleratorDeprecated::Config result;
-    result.num_input_buffers = input->num_input_buffers;
-    result.input_pixel_format = input->input_pixel_format;
-    result.secure_mode = input->secure_mode;
-    return result;
-  }
-};
-
-}  // namespace mojo
-
-namespace arc {
-
-GpuArcVideoDecodeAcceleratorDeprecated::GpuArcVideoDecodeAcceleratorDeprecated(
-    const gpu::GpuPreferences& gpu_preferences,
-    ProtectedBufferManager* protected_buffer_manager)
-    : gpu_preferences_(gpu_preferences),
-      accelerator_(std::make_unique<ChromeArcVideoDecodeAcceleratorDeprecated>(
-          gpu_preferences_,
-          protected_buffer_manager)) {}
-
-GpuArcVideoDecodeAcceleratorDeprecated::
-    ~GpuArcVideoDecodeAcceleratorDeprecated() {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::OnError(
-    ArcVideoDecodeAcceleratorDeprecated::Result error) {
-  DVLOG(2) << "OnError " << error;
-  DCHECK_NE(error, ArcVideoDecodeAcceleratorDeprecated::SUCCESS);
-  DCHECK(client_);
-  client_->OnError(
-      static_cast<::arc::mojom::VideoDecodeAcceleratorDeprecated::Result>(
-          error));
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::OnBufferDone(
-    PortType port,
-    uint32_t index,
-    const BufferMetadata& metadata) {
-  DVLOG(2) << "OnBufferDone " << port << "," << index;
-  DCHECK(client_);
-  client_->OnBufferDone(static_cast<::arc::mojom::PortType>(port), index,
-                        ::arc::mojom::BufferMetadata::From(metadata));
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::OnFlushDone() {
-  DVLOG(2) << "OnFlushDone";
-  DCHECK(client_);
-  client_->OnFlushDone();
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::OnResetDone() {
-  DVLOG(2) << "OnResetDone";
-  DCHECK(client_);
-  client_->OnResetDone();
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::OnOutputFormatChanged(
-    const VideoFormat& format) {
-  DVLOG(2) << "OnOutputFormatChanged";
-  DCHECK(client_);
-  client_->OnOutputFormatChanged(::arc::mojom::VideoFormat::From(format));
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::Initialize(
-    ::arc::mojom::VideoDecodeAcceleratorConfigDeprecatedPtr config,
-    ::arc::mojom::VideoDecodeClientDeprecatedPtr client,
-    InitializeCallback callback) {
-  DVLOG(2) << "Initialize";
-  DCHECK(!client_);
-
-  client_ = std::move(client);
-  ArcVideoDecodeAcceleratorDeprecated::Result result = accelerator_->Initialize(
-      config.To<ArcVideoDecodeAcceleratorDeprecated::Config>(), this);
-  std::move(callback).Run(
-      static_cast<::arc::mojom::VideoDecodeAcceleratorDeprecated::Result>(
-          result));
-}
-
-base::ScopedFD GpuArcVideoDecodeAcceleratorDeprecated::UnwrapFdFromMojoHandle(
-    mojo::ScopedHandle handle) {
-  DCHECK(client_);
-  if (!handle.is_valid()) {
-    LOG(ERROR) << "handle is invalid";
-    client_->OnError(::arc::mojom::VideoDecodeAcceleratorDeprecated::Result::
-                         INVALID_ARGUMENT);
-    return base::ScopedFD();
-  }
-
-  base::PlatformFile platform_file;
-  MojoResult mojo_result =
-      mojo::UnwrapPlatformFile(std::move(handle), &platform_file);
-  if (mojo_result != MOJO_RESULT_OK) {
-    LOG(ERROR) << "UnwrapPlatformFile failed: " << mojo_result;
-    client_->OnError(::arc::mojom::VideoDecodeAcceleratorDeprecated::Result::
-                         PLATFORM_FAILURE);
-    return base::ScopedFD();
-  }
-
-  return base::ScopedFD(platform_file);
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::AllocateProtectedBuffer(
-    ::arc::mojom::PortType port,
-    uint32_t index,
-    mojo::ScopedHandle handle,
-    uint64_t size,
-    AllocateProtectedBufferCallback callback) {
-  DVLOG(2) << "port=" << port << ", index=" << index << ", size=" << size;
-
-  base::ScopedFD fd = UnwrapFdFromMojoHandle(std::move(handle));
-  if (!fd.is_valid()) {
-    std::move(callback).Run(false);
-    return;
-  }
-
-  bool result = accelerator_->AllocateProtectedBuffer(
-      static_cast<PortType>(port), index, std::move(fd), size);
-
-  std::move(callback).Run(result);
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::BindSharedMemory(
-    ::arc::mojom::PortType port,
-    uint32_t index,
-    mojo::ScopedHandle ashmem_handle,
-    uint32_t offset,
-    uint32_t length) {
-  DVLOG(2) << "BindSharedMemoryCallback port=" << port << ", index=" << index
-           << ", offset=" << offset << ", length=" << length;
-
-  base::ScopedFD fd = UnwrapFdFromMojoHandle(std::move(ashmem_handle));
-  if (!fd.is_valid())
-    return;
-  accelerator_->BindSharedMemory(static_cast<PortType>(port), index,
-                                 std::move(fd), offset, length);
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::BindDmabuf(
-    ::arc::mojom::PortType port,
-    uint32_t index,
-    mojo::ScopedHandle dmabuf_handle,
-    std::vector<::arc::VideoFramePlane> planes) {
-  DVLOG(2) << "BindDmabuf port=" << port << ", index=" << index;
-
-  base::ScopedFD fd = UnwrapFdFromMojoHandle(std::move(dmabuf_handle));
-  if (!fd.is_valid())
-    return;
-
-  accelerator_->BindDmabuf(static_cast<PortType>(port), index, std::move(fd),
-                           std::move(planes));
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::UseBuffer(
-    ::arc::mojom::PortType port,
-    uint32_t index,
-    ::arc::mojom::BufferMetadataPtr metadata) {
-  DVLOG(2) << "UseBuffer port=" << port << ", index=" << index;
-  accelerator_->UseBuffer(static_cast<PortType>(port), index,
-                          metadata.To<BufferMetadata>());
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::SetNumberOfOutputBuffers(
-    uint32_t number) {
-  DVLOG(2) << "SetNumberOfOutputBuffers number=" << number;
-  accelerator_->SetNumberOfOutputBuffers(number);
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::Reset() {
-  DVLOG(2) << "Reset";
-  accelerator_->Reset();
-}
-
-void GpuArcVideoDecodeAcceleratorDeprecated::Flush() {
-  DVLOG(2) << "Flush";
-  accelerator_->Flush();
-}
-
-}  // namespace arc
diff --git a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h b/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h
deleted file mode 100644
index 903b8f8..0000000
--- a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-#define COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
-
-#include <memory>
-#include <vector>
-
-#include "base/files/scoped_file.h"
-#include "base/macros.h"
-#include "base/threading/thread_checker.h"
-#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
-#include "components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h"
-#include "components/arc/video_accelerator/video_frame_plane.h"
-#include "gpu/command_buffer/service/gpu_preferences.h"
-
-namespace arc {
-
-class ProtectedBufferManager;
-
-// GpuArcVideoDecodeAcceleratorDeprecated manages life-cycle
-// and IPC message translation for ArcVideoDecodeAcceleratorDeprecated.
-//
-// For each creation request from GpuArcVideoDecodeAcceleratorHost,
-// GpuArcVideoDecodeAcceleratorDeprecated will create a new IPC channel.
-class GpuArcVideoDecodeAcceleratorDeprecated
-    : public ::arc::mojom::VideoDecodeAcceleratorDeprecated,
-      public ArcVideoDecodeAcceleratorDeprecated::Client {
- public:
-  GpuArcVideoDecodeAcceleratorDeprecated(
-      const gpu::GpuPreferences& gpu_preferences,
-      ProtectedBufferManager* protected_buffer_manager);
-  ~GpuArcVideoDecodeAcceleratorDeprecated() override;
-
- private:
-  // ArcVideoDecodeAcceleratorDeprecated::Client implementation.
-  void OnError(ArcVideoDecodeAcceleratorDeprecated::Result error) override;
-  void OnBufferDone(PortType port,
-                    uint32_t index,
-                    const BufferMetadata& metadata) override;
-  void OnFlushDone() override;
-  void OnResetDone() override;
-  void OnOutputFormatChanged(const VideoFormat& format) override;
-
-  // ::arc::mojom::VideoDecodeAcceleratorDeprecated implementation.
-  void Initialize(
-      ::arc::mojom::VideoDecodeAcceleratorConfigDeprecatedPtr config,
-      ::arc::mojom::VideoDecodeClientDeprecatedPtr client,
-      InitializeCallback callback) override;
-  void AllocateProtectedBuffer(
-      ::arc::mojom::PortType port,
-      uint32_t index,
-      mojo::ScopedHandle handle,
-      uint64_t size,
-      AllocateProtectedBufferCallback callback) override;
-  void BindSharedMemory(::arc::mojom::PortType port,
-                        uint32_t index,
-                        mojo::ScopedHandle ashmem_handle,
-                        uint32_t offset,
-                        uint32_t length) override;
-  void BindDmabuf(::arc::mojom::PortType port,
-                  uint32_t index,
-                  mojo::ScopedHandle dmabuf_handle,
-                  std::vector<::arc::VideoFramePlane> planes) override;
-  void UseBuffer(::arc::mojom::PortType port,
-                 uint32_t index,
-                 ::arc::mojom::BufferMetadataPtr metadata) override;
-  void SetNumberOfOutputBuffers(uint32_t number) override;
-  void Flush() override;
-  void Reset() override;
-
-  base::ScopedFD UnwrapFdFromMojoHandle(mojo::ScopedHandle handle);
-
-  THREAD_CHECKER(thread_checker_);
-
-  gpu::GpuPreferences gpu_preferences_;
-
-  std::unique_ptr<ArcVideoDecodeAcceleratorDeprecated> accelerator_;
-  ::arc::mojom::VideoDecodeClientDeprecatedPtr client_;
-
-  DISALLOW_COPY_AND_ASSIGN(GpuArcVideoDecodeAcceleratorDeprecated);
-};
-
-}  // namespace arc
-
-#endif  // COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
diff --git a/components/autofill/ios/browser/autofill_agent.mm b/components/autofill/ios/browser/autofill_agent.mm
index 53759b2..ae934f6 100644
--- a/components/autofill/ios/browser/autofill_agent.mm
+++ b/components/autofill/ios/browser/autofill_agent.mm
@@ -27,6 +27,7 @@
 #include "components/autofill/core/browser/keyboard_accessory_metrics_logger.h"
 #include "components/autofill/core/browser/popup_item_ids.h"
 #include "components/autofill/core/common/autofill_constants.h"
+#include "components/autofill/core/common/autofill_features.h"
 #include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/autofill/core/common/autofill_util.h"
 #include "components/autofill/core/common/form_data.h"
@@ -938,6 +939,11 @@
 
 - (void)renderAutofillTypePredictions:
     (const std::vector<autofill::FormStructure*>&)structure {
+  if (!base::FeatureList::IsEnabled(
+          autofill::features::kAutofillShowTypePredictions)) {
+    return;
+  }
+
   base::DictionaryValue predictionData;
   for (autofill::FormStructure* form : structure) {
     auto formJSONData = base::MakeUnique<base::DictionaryValue>();
diff --git a/components/crash/content/app/breakpad_win.cc b/components/crash/content/app/breakpad_win.cc
index d5680a8..5e744ed 100644
--- a/components/crash/content/app/breakpad_win.cc
+++ b/components/crash/content/app/breakpad_win.cc
@@ -129,23 +129,13 @@
 }  // namespace
 
 extern "C" HANDLE __declspec(dllexport) __cdecl InjectDumpForHungInput(
-    HANDLE process,
-    void* serialized_crash_keys) {
+    HANDLE process) {
   // |serialized_crash_keys| is not propagated in breakpad but is in crashpad
   // since breakpad is deprecated.
   return CreateRemoteThread(process, NULL, 0, DumpProcessWithoutCrashThread,
                             0, 0, NULL);
 }
 
-extern "C" HANDLE __declspec(
-    dllexport) __cdecl InjectDumpForHungInputNoCrashKeys(HANDLE process,
-                                                         int reason) {
-  // |reason| is not propagated in breakpad but is in crashpad since breakpad
-  // is deprecated.
-  return CreateRemoteThread(process, NULL, 0, DumpProcessWithoutCrashThread, 0,
-                            0, NULL);
-}
-
 // Returns a string containing a list of all modifiers for the loaded profile.
 std::wstring GetProfileType() {
   std::wstring profile_type;
diff --git a/components/crash/content/app/crash_export_stubs.cc b/components/crash/content/app/crash_export_stubs.cc
index b1b5b56..d7e2178 100644
--- a/components/crash/content/app/crash_export_stubs.cc
+++ b/components/crash/content/app/crash_export_stubs.cc
@@ -38,13 +38,7 @@
 
 void ClearCrashKeyValueEx_ExportThunk(const char* key, size_t key_len) {}
 
-HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process,
-                                          void* serialized_crash_keys) {
-  return nullptr;
-}
-
-HANDLE InjectDumpForHungInputNoCrashKeys_ExportThunk(HANDLE process,
-                                                     int reason) {
+HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process) {
   return nullptr;
 }
 
diff --git a/components/crash/content/app/crash_export_thunks.cc b/components/crash/content/app/crash_export_thunks.cc
index cfc8bf1..8e8a85b 100644
--- a/components/crash/content/app/crash_export_thunks.cc
+++ b/components/crash/content/app/crash_export_thunks.cc
@@ -78,20 +78,11 @@
   crash_reporter::ClearCrashKey(base::StringPiece(key, key_len));
 }
 
-HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process,
-                                          void* serialized_crash_keys) {
+HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process) {
   return CreateRemoteThread(
       process, nullptr, 0,
-      crash_reporter::internal::DumpProcessForHungInputThread,
-      serialized_crash_keys, 0, nullptr);
-}
-
-HANDLE InjectDumpForHungInputNoCrashKeys_ExportThunk(HANDLE process,
-                                                     int reason) {
-  return CreateRemoteThread(
-      process, nullptr, 0,
-      crash_reporter::internal::DumpProcessForHungInputNoCrashKeysThread,
-      reinterpret_cast<void*>(reason), 0, nullptr);
+      crash_reporter::internal::DumpProcessForHungInputThread, nullptr, 0,
+      nullptr);
 }
 
 #if defined(ARCH_CPU_X86_64)
diff --git a/components/crash/content/app/crash_export_thunks.h b/components/crash/content/app/crash_export_thunks.h
index 6f3138e..c2115e9 100644
--- a/components/crash/content/app/crash_export_thunks.h
+++ b/components/crash/content/app/crash_export_thunks.h
@@ -66,19 +66,9 @@
 void ClearCrashKeyValueEx_ExportThunk(const char* key, size_t key_len);
 
 // Injects a thread into a remote process to dump state when there is no crash.
-// |serialized_crash_keys| is a nul terminated string in the address space of
 // |process| that represents serialized crash keys sent from the browser.
-// Keys and values are separated by ':', and key/value pairs are separated by
-// ','. All keys should be previously registered as crash keys.
 // This method is used solely to classify hung input.
-HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process,
-                                          void* serialized_crash_keys);
-
-// Injects a thread into a remote process to dump state when there is no crash.
-// This method provides |reason| which will interpreted as an integer and logged
-// as a crash key.
-HANDLE InjectDumpForHungInputNoCrashKeys_ExportThunk(HANDLE process,
-                                                     int reason);
+HANDLE InjectDumpForHungInput_ExportThunk(HANDLE process);
 
 #if defined(ARCH_CPU_X86_64)
 // V8 support functions.
diff --git a/components/crash/content/app/crashpad.h b/components/crash/content/app/crashpad.h
index 87207d3a..a3d6bf74 100644
--- a/components/crash/content/app/crashpad.h
+++ b/components/crash/content/app/crashpad.h
@@ -135,10 +135,9 @@
 void GetPlatformCrashpadAnnotations(
     std::map<std::string, std::string>* annotations);
 
-// The thread functions that implement the InjectDumpForHungInput and
-// InjectDumpForHungInputNoCrashKeys in the target process.
-DWORD WINAPI DumpProcessForHungInputThread(void* crash_keys_str);
-DWORD WINAPI DumpProcessForHungInputNoCrashKeysThread(void* reason);
+// The thread functions that implement the InjectDumpForHungInput in the
+// target process.
+DWORD WINAPI DumpProcessForHungInputThread(void* param);
 
 #if defined(ARCH_CPU_X86_64)
 // V8 support functions.
diff --git a/components/crash/content/app/crashpad_win.cc b/components/crash/content/app/crashpad_win.cc
index a234fa9..a5d1afc4 100644
--- a/components/crash/content/app/crashpad_win.cc
+++ b/components/crash/content/app/crashpad_win.cc
@@ -159,38 +159,13 @@
 }
 
 // We need to prevent ICF from folding DumpProcessForHungInputThread(),
-// DumpProcessForHungInputNoCrashKeysThread() together, since that makes them
-// indistinguishable in crash dumps. We do this by making the function
-// bodies unique, and prevent optimization from shuffling things around.
+// together, since that makes them indistinguishable in crash dumps.
+// We do this by making the function body unique, and prevent optimization
+// from shuffling things around.
 MSVC_DISABLE_OPTIMIZE()
 MSVC_PUSH_DISABLE_WARNING(4748)
 
-// TODO(dtapuska): Remove when enough information is gathered where the crash
-// reports without crash keys come from.
-DWORD WINAPI DumpProcessForHungInputThread(void* crash_keys_str) {
-  base::StringPairs crash_keys;
-  if (crash_keys_str && base::SplitStringIntoKeyValuePairs(
-                            reinterpret_cast<const char*>(crash_keys_str), ':',
-                            ',', &crash_keys)) {
-    auto* simple_annotations =
-        crashpad::CrashpadInfo::GetCrashpadInfo()->simple_annotations();
-    for (const auto& crash_key : crash_keys) {
-      simple_annotations->SetKeyValue(crash_key.first, crash_key.second);
-    }
-  }
-  DumpWithoutCrashing();
-  return 0;
-}
-
-// TODO(dtapuska): Remove when enough information is gathered where the crash
-// reports without crash keys come from.
-DWORD WINAPI DumpProcessForHungInputNoCrashKeysThread(void* reason) {
-#pragma warning(push)
-#pragma warning(disable : 4311 4302)
-  base::debug::SetCrashKeyValue(
-      "hung-reason", base::IntToString(reinterpret_cast<int>(reason)));
-#pragma warning(pop)
-
+DWORD WINAPI DumpProcessForHungInputThread(void* param) {
   DumpWithoutCrashing();
   return 0;
 }
diff --git a/components/crash/core/common/crash_keys.cc b/components/crash/core/common/crash_keys.cc
index 3fcbc16..559313f3 100644
--- a/components/crash/core/common/crash_keys.cc
+++ b/components/crash/core/common/crash_keys.cc
@@ -35,9 +35,6 @@
 
 }  // namespace
 
-const char kNumVariations[] = "num-experiments";
-const char kVariations[] = "variations";
-
 void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) {
   std::string stripped_guid(metrics_client_guid);
   // Remove all instance of '-' char from the GUID. So BCD-WXY becomes BCDWXY.
@@ -68,22 +65,25 @@
 }
 
 void SetVariationsList(const std::vector<std::string>& variations) {
-  base::debug::SetCrashKeyValue(kNumVariations,
-      base::StringPrintf("%" PRIuS, variations.size()));
+  static crash_reporter::CrashKeyString<8> num_variations_key(
+      "num-experiments");
+  num_variations_key.Set(base::NumberToString(variations.size()));
+
+  static constexpr size_t kVariationsKeySize = 2048;
+  static crash_reporter::CrashKeyString<kVariationsKeySize> crash_key(
+      "variations");
 
   std::string variations_string;
-  variations_string.reserve(kHugeSize);
+  variations_string.reserve(kVariationsKeySize);
 
-  for (size_t i = 0; i < variations.size(); ++i) {
-    const std::string& variation = variations[i];
+  for (const auto& variation : variations) {
     // Do not truncate an individual experiment.
-    if (variations_string.size() + variation.size() >= kHugeSize)
+    if (variations_string.size() + variation.size() >= kVariationsKeySize)
       break;
     variations_string += variation;
     variations_string += ",";
   }
-
-  base::debug::SetCrashKeyValue(kVariations, variations_string);
+  crash_key.Set(variations_string);
 }
 
 using SwitchesCrashKey = crash_reporter::CrashKeyString<64>;
diff --git a/components/crash/core/common/crash_keys.h b/components/crash/core/common/crash_keys.h
index 73f1385..23945fa 100644
--- a/components/crash/core/common/crash_keys.h
+++ b/components/crash/core/common/crash_keys.h
@@ -69,15 +69,6 @@
 // be used very sparingly.
 const size_t kHugeSize = kLargeSize * 2;
 
-// Crash Key Name Constants ////////////////////////////////////////////////////
-
-// The total number of experiments the instance has.
-extern const char kNumVariations[];
-
-// The experiments chunk. Hashed experiment names separated by |,|. This is
-// typically set by SetExperimentList.
-extern const char kVariations[];
-
 }  // namespace crash_keys
 
 #endif  // COMPONENTS_CRASH_CORE_COMMON_CRASH_KEYS_H_
diff --git a/components/crash/core/common/crash_keys_unittest.cc b/components/crash/core/common/crash_keys_unittest.cc
index eca2879..edebbfc 100644
--- a/components/crash/core/common/crash_keys_unittest.cc
+++ b/components/crash/core/common/crash_keys_unittest.cc
@@ -4,9 +4,6 @@
 
 #include "components/crash/core/common/crash_keys.h"
 
-#include <stddef.h>
-
-#include <map>
 #include <string>
 
 #include "base/command_line.h"
@@ -27,65 +24,20 @@
  public:
   void SetUp() override {
     ResetData();
-
     crash_reporter::InitializeCrashKeys();
-    self_ = this;
-    base::debug::SetCrashKeyReportingFunctions(
-        &SetCrashKeyValue, &ClearCrashKey);
-  }
-
-  bool InitVariationsCrashKeys() {
-    std::vector<base::debug::CrashKey> keys = {
-        {crash_keys::kNumVariations, crash_keys::kSmallSize},
-        {crash_keys::kVariations, crash_keys::kHugeSize}};
-    return InitCrashKeys(keys);
   }
 
   void TearDown() override {
-    base::debug::ResetCrashLoggingForTesting();
     ResetData();
-    self_ = nullptr;
-  }
-
-  bool HasCrashKey(const std::string& key) {
-    return keys_.find(key) != keys_.end();
-  }
-
-  std::string GetKeyValue(const std::string& key) {
-    std::map<std::string, std::string>::const_iterator it = keys_.find(key);
-    if (it == keys_.end())
-      return std::string();
-    return it->second;
   }
 
  private:
-  bool InitCrashKeys(const std::vector<base::debug::CrashKey>& keys) {
-    base::debug::InitCrashKeys(keys.data(), keys.size(),
-                               crash_keys::kChunkMaxLength);
-    return !keys.empty();
-  }
-
-  static void SetCrashKeyValue(const base::StringPiece& key,
-                               const base::StringPiece& value) {
-    self_->keys_[key.as_string()] = value.as_string();
-  }
-
-  static void ClearCrashKey(const base::StringPiece& key) {
-    self_->keys_.erase(key.as_string());
-  }
-
   void ResetData() {
     crash_keys::ResetCommandLineForTesting();
     crash_reporter::ResetCrashKeysForTesting();
   }
-
-  static CrashKeysTest* self_;
-
-  std::map<std::string, std::string> keys_;
 };
 
-CrashKeysTest* CrashKeysTest::self_ = nullptr;
-
 TEST_F(CrashKeysTest, Switches) {
   // Set three switches.
   {
@@ -159,35 +111,3 @@
         << "switch_name is " << switch_name;
   }
 }
-
-TEST_F(CrashKeysTest, VariationsCapacity) {
-  ASSERT_TRUE(InitVariationsCrashKeys());
-
-  // Variation encoding: two 32bit numbers encorded as hex with a '-' separator.
-  const char kSampleVariation[] = "12345678-12345678";
-  const size_t kVariationLen = std::strlen(kSampleVariation);
-  const size_t kSeparatedVariationLen = kVariationLen + 1U;
-  ASSERT_EQ(17U, kVariationLen);
-
-  // The expected capacity factors in a separator (',').
-  const size_t kExpectedCapacity = 112U;
-  ASSERT_EQ(kExpectedCapacity,
-            crash_keys::kHugeSize / (kSeparatedVariationLen));
-
-  // Create some variations and set the crash keys.
-  std::vector<std::string> variations;
-  for (size_t i = 0; i < kExpectedCapacity + 2; ++i)
-    variations.push_back(kSampleVariation);
-  crash_keys::SetVariationsList(variations);
-
-  // Validate crash keys.
-  ASSERT_TRUE(HasCrashKey(crash_keys::kNumVariations));
-  EXPECT_EQ("114", GetKeyValue(crash_keys::kNumVariations));
-
-  const size_t kExpectedChunks = (kSeparatedVariationLen * kExpectedCapacity) /
-                                 crash_keys::kChunkMaxLength;
-  for (size_t i = 0; i < kExpectedChunks; ++i) {
-    ASSERT_TRUE(HasCrashKey(
-        base::StringPrintf("%s-%" PRIuS, crash_keys::kVariations, i + 1)));
-  }
-}
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 0ec7cb9..0428186 100644
--- a/components/cronet/android/BUILD.gn
+++ b/components/cronet/android/BUILD.gn
@@ -1365,11 +1365,9 @@
 copy("cronet_package_copy_test_files") {
   testonly = true
   sources = [
-    "//net/data/ssl/certificates/quic_test.example.com.crt",
-    "//net/data/ssl/certificates/quic_test.example.com.key",
-    "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8",
-    "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8.pem",
-    "//net/data/ssl/certificates/quic_test.example.com.key.sct",
+    "//net/data/ssl/certificates/quic-chain.pem",
+    "//net/data/ssl/certificates/quic-leaf-cert.key",
+    "//net/data/ssl/certificates/quic-leaf-cert.key.pkcs8.pem",
   ]
   outputs = [
     "$_test_package_dir/assets/test_files/net/data/ssl/certificates/{{source_file_part}}",
diff --git a/components/cronet/android/test/javaperftests/expectations.config b/components/cronet/android/test/javaperftests/expectations.config
new file mode 100644
index 0000000..077755a
--- /dev/null
+++ b/components/cronet/android/test/javaperftests/expectations.config
@@ -0,0 +1,8 @@
+# Test Expectation file for javaperftests.
+
+# tags: All Android_Svelte Android_Webview Android_but_not_webview Mac Win Linux
+# tags: ChromeOS Android Desktop Mobile Nexus_5 Nexus_5X Nexus_6 Nexus_6P
+# tags: Nexus_7 Cherry_Mobile_Android_One Mac_10.11 Mac_10.12 Nexus6_Webview
+# tags: Nexus5X_Webview
+
+# Benchmark: run.CronetPerfTestBenchmark
diff --git a/components/cronet/android/test/javaperftests/run.py b/components/cronet/android/test/javaperftests/run.py
index e0556e6..9b960a0ad 100755
--- a/components/cronet/android/test/javaperftests/run.py
+++ b/components/cronet/android/test/javaperftests/run.py
@@ -221,12 +221,6 @@
   def CreateStorySet(self, options):
     return CronetPerfTestStorySet(self._device)
 
-  def GetExpectations(self):
-    class StoryExpectations(story.expectations.StoryExpectations):
-      def SetExpectations(self):
-        pass # Nothing disabled.
-    return StoryExpectations()
-
 
 class QuicServer(object):
 
@@ -343,13 +337,15 @@
   # Chromium checkout in Telemetry.
   perf_config_file = os.path.join(REPOSITORY_ROOT, 'tools', 'perf', 'core',
       'binary_dependencies.json')
+  expectations_file = os.path.join(top_level_dir, 'expectations.config')
   with open(perf_config_file, "w") as config_file:
     config_file.write('{"config_type": "BaseConfig"}')
   runner_config = project_config.ProjectConfig(
       top_level_dir=top_level_dir,
       benchmark_dirs=[top_level_dir],
       client_configs=[perf_config_file],
-      default_chrome_root=REPOSITORY_ROOT)
+      default_chrome_root=REPOSITORY_ROOT,
+      expectations_file=expectations_file)
   sys.argv.insert(1, 'run')
   sys.argv.insert(2, 'run.CronetPerfTestBenchmark')
   benchmark_runner.main(runner_config)
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
index 55021a3..dbc207f 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
@@ -33,12 +33,12 @@
     /**
      * Name of the file that contains the test server certificate in PEM format.
      */
-    public static final String SERVER_CERT_PEM = "quic_test.example.com.crt";
+    public static final String SERVER_CERT_PEM = "quic-chain.pem";
 
     /**
      * Name of the file that contains the test server private key in PKCS8 PEM format.
      */
-    public static final String SERVER_KEY_PKCS8_PEM = "quic_test.example.com.key.pkcs8.pem";
+    public static final String SERVER_KEY_PKCS8_PEM = "quic-leaf-cert.key.pkcs8.pem";
 
     private static final String TAG = CronetTestRule.class.getSimpleName();
 
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java
index af3ee454..8a115a7 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/PkpTest.java
@@ -40,7 +40,7 @@
  */
 @RunWith(BaseJUnit4ClassRunner.class)
 public class PkpTest {
-    private static final String CERT_USED = "quic_test.example.com.crt";
+    private static final String CERT_USED = "quic-chain.pem";
     private static final String[] CERTS_USED = {CERT_USED};
     private static final int DISTANT_FUTURE = Integer.MAX_VALUE;
     private static final boolean INCLUDE_SUBDOMAINS = true;
diff --git a/components/cronet/android/test/quic_test_server.cc b/components/cronet/android/test/quic_test_server.cc
index d7e1aa1..233b16d 100644
--- a/components/cronet/android/test/quic_test_server.cc
+++ b/components/cronet/android/test/quic_test_server.cc
@@ -50,9 +50,9 @@
   std::unique_ptr<net::ProofSourceChromium> proof_source(
       new net::ProofSourceChromium());
   CHECK(proof_source->Initialize(
-      directory.Append("quic_test.example.com.crt"),
-      directory.Append("quic_test.example.com.key.pkcs8"),
-      directory.Append("quic_test.example.com.key.sct")));
+      directory.Append("quic-chain.pem"),
+      directory.Append("quic-leaf-cert.key"),
+      base::FilePath()));
   g_quic_server = new net::QuicSimpleServer(
       std::move(proof_source), config,
       net::QuicCryptoServerConfig::ConfigOptions(), net::AllSupportedVersions(),
diff --git a/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumNativeTestSupport.java b/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumNativeTestSupport.java
index 05958b6..27d44be 100644
--- a/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumNativeTestSupport.java
+++ b/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumNativeTestSupport.java
@@ -21,12 +21,12 @@
     /**
      * Name of the file that contains the test server certificate in PEM format.
      */
-    private static final String SERVER_CERT_PEM = "quic_test.example.com.crt";
+    private static final String SERVER_CERT_PEM = "quic-chain.pem";
 
     /**
      * Name of the file that contains the test server private key in PKCS8 PEM format.
      */
-    private static final String SERVER_KEY_PKCS8_PEM = "quic_test.example.com.key.pkcs8.pem";
+    private static final String SERVER_KEY_PKCS8_PEM = "quic-leaf-cert.key.pkcs8.pem";
 
     @Override
     public TestServer createTestServer(Context context, Protocol protocol) {
diff --git a/components/cronet/android/test/src/org/chromium/net/CronetTestUtil.java b/components/cronet/android/test/src/org/chromium/net/CronetTestUtil.java
index f697c37..0695d033 100644
--- a/components/cronet/android/test/src/org/chromium/net/CronetTestUtil.java
+++ b/components/cronet/android/test/src/org/chromium/net/CronetTestUtil.java
@@ -18,8 +18,7 @@
 @JNINamespace("cronet")
 public class CronetTestUtil {
     // QUIC test domain must match the certificate used
-    // (quic_test.example.com.crt and quic_test.example.com.key.pkcs8), and
-    // the file served (
+    // (quic-chain.pem and quic-leaf-cert.key), and the file served (
     // components/cronet/android/test/assets/test/quic_data/simple.txt).
     static final String QUIC_FAKE_HOST = "test.example.com";
     private static final String[] TEST_DOMAINS = {QUIC_FAKE_HOST};
diff --git a/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java b/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java
index 2c6b9d3..7af5e88 100644
--- a/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java
+++ b/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java
@@ -21,8 +21,8 @@
     private static final ConditionVariable sBlock = new ConditionVariable();
     private static final String TAG = QuicTestServer.class.getSimpleName();
 
-    private static final String CERT_USED = "quic_test.example.com.crt";
-    private static final String KEY_USED = "quic_test.example.com.key";
+    private static final String CERT_USED = "quic-chain.pem";
+    private static final String KEY_USED = "quic-leaf-cert.key";
     private static final String[] CERTS_USED = {CERT_USED};
 
     private static boolean sServerRunning = false;
diff --git a/components/cronet/ios/cronet_environment.h b/components/cronet/ios/cronet_environment.h
index c9a3003..cf2a8e11 100644
--- a/components/cronet/ios/cronet_environment.h
+++ b/components/cronet/ios/cronet_environment.h
@@ -79,10 +79,6 @@
   bool quic_enabled() const { return quic_enabled_; }
   bool brotli_enabled() const { return brotli_enabled_; }
 
-  void set_quic_user_agent_id(const std::string& quic_user_agent_id) {
-    quic_user_agent_id_ = quic_user_agent_id;
-  }
-
   void set_accept_language(const std::string& accept_language) {
     accept_language_ = accept_language;
   }
@@ -174,7 +170,6 @@
   bool http2_enabled_;
   bool quic_enabled_;
   bool brotli_enabled_;
-  std::string quic_user_agent_id_;
   std::string accept_language_;
   std::string experimental_options_;
   // Effective experimental options. Kept for NetLog.
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index 0b343e27..b6a07c0 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -336,8 +336,10 @@
 
   URLRequestContextConfigBuilder context_config_builder;
   context_config_builder.enable_quic = quic_enabled_;   // Enable QUIC.
+  context_config_builder.quic_user_agent_id =
+      getDefaultQuicUserAgentId();                      // QUIC User Agent ID.
   context_config_builder.enable_spdy = http2_enabled_;  // Enable HTTP/2.
-  context_config_builder.http_cache = http_cache_;      // Set HTTP cache
+  context_config_builder.http_cache = http_cache_;      // Set HTTP cache.
   context_config_builder.storage_path =
       storage_path.value();  // Storage path for http cache and prefs storage.
   context_config_builder.user_agent =
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
index 9902c67..7204fe1 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
@@ -659,21 +659,6 @@
     return false;
   }
 
-  // For the transition to server-driven previews decisions, we will
-  // use existing Lo-Fi flags for disabling and cellular-only mode.
-  // TODO(dougarnett): Refactor flag names as part of bug 725645.
-  if (params::IsLoFiDisabledViaFlags()) {
-    UMA_HISTOGRAM_ENUMERATION(
-        "DataReductionProxy.Protocol.NotAcceptingTransform",
-        NOT_ACCEPTING_TRANSFORM_DISABLED,
-        NOT_ACCEPTING_TRANSFORM_REASON_BOUNDARY);
-    return false;
-  }
-
-  // AlwaysOn skips blacklist or disabled checks.
-  if (params::IsLoFiAlwaysOnViaFlags())
-    return true;
-
   if (IsBlackListedOrDisabled(request, previews_decider,
                               previews::PreviewsType::LITE_PAGE) ||
       IsBlackListedOrDisabled(request, previews_decider,
@@ -685,15 +670,6 @@
     return false;
   }
 
-  if (params::IsLoFiCellularOnlyViaFlags() &&
-      !net::NetworkChangeNotifier::IsConnectionCellular(connection_type_)) {
-    UMA_HISTOGRAM_ENUMERATION(
-        "DataReductionProxy.Protocol.NotAcceptingTransform",
-        NOT_ACCEPTING_TRANSFORM_CELLULAR_ONLY,
-        NOT_ACCEPTING_TRANSFORM_REASON_BOUNDARY);
-    return false;
-  }
-
   return true;
 }
 
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
index 2e614778..4e7b794 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
@@ -995,45 +995,8 @@
   EXPECT_TRUE(test_config()->ShouldAcceptServerPreview(
       *request.get(), *previews_decider.get()));
 
-  // Verify false for kill switch.
-  base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueDisabled);
-  EXPECT_FALSE(test_config()->ShouldAcceptServerPreview(
-      *request.get(), *previews_decider.get()));
-  histogram_tester.ExpectBucketCount(
-      "DataReductionProxy.Protocol.NotAcceptingTransform",
-      0 /* NOT_ACCEPTING_TRANSFORM_DISABLED */, 1);
-
-  // Verify true for Slow Connection flag.
-  base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueSlowConnectionsOnly);
-  EXPECT_TRUE(test_config()->ShouldAcceptServerPreview(
-      *request.get(), *previews_decider.get()));
-
-  // Verify false for Cellular Only flag and WIFI connection.
-  base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueCellularOnly);
-  test_config()->SetConnectionTypeForTesting(
-      net::NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI);
-  EXPECT_FALSE(test_config()->ShouldAcceptServerPreview(
-      *request.get(), *previews_decider.get()));
-  histogram_tester.ExpectBucketCount(
-      "DataReductionProxy.Protocol.NotAcceptingTransform",
-      2 /* NOT_ACCEPTING_TRANSFORM_CELLULAR_ONLY */, 1);
-
-  // Verify true for Cellular Only flag and 3G connection.
-  test_config()->SetConnectionTypeForTesting(
-      net::NetworkChangeNotifier::ConnectionType::CONNECTION_3G);
-  EXPECT_TRUE(test_config()->ShouldAcceptServerPreview(
-      *request.get(), *previews_decider.get()));
-
   // Verify PreviewsDecider check.
+  base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
   previews_decider = base::MakeUnique<TestPreviewsDecider>(false);
   EXPECT_FALSE(test_config()->ShouldAcceptServerPreview(
       *request.get(), *previews_decider.get()));
@@ -1041,14 +1004,6 @@
       "DataReductionProxy.Protocol.NotAcceptingTransform",
       1 /* NOT_ACCEPTING_TRANSFORM_BLACKLISTED */, 1);
   previews_decider = base::MakeUnique<TestPreviewsDecider>(true);
-
-  // Verfiy true for always on.
-  base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueAlwaysOn);
-  EXPECT_TRUE(test_config()->ShouldAcceptServerPreview(
-      *request.get(), *previews_decider.get()));
 }
 
 TEST_F(DataReductionProxyConfigTest, HandleWarmupFetcherResponse) {
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc
index 2acffae..05966fc 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc
@@ -652,16 +652,6 @@
   proxy_delegate()->OnResolveProxy(url, "POST", empty_proxy_retry_info,
                                    &result);
   EXPECT_TRUE(result.is_direct());
-
-  // Without DataCompressionProxyCriticalBypass Finch trial set, the
-  // BYPASS_DATA_REDUCTION_PROXY load flag should be ignored.
-  result.UseDirect();
-  proxy_delegate()->OnResolveProxy(url, "GET", empty_proxy_retry_info, &result);
-  EXPECT_FALSE(result.is_direct());
-
-  proxy_delegate()->OnResolveProxy(url, "GET", empty_proxy_retry_info,
-                                   &other_proxy_info);
-  EXPECT_FALSE(other_proxy_info.is_direct());
 }
 
 // Verifies that requests that were not proxied through data saver proxy due to
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
index 9556511..1d53059 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -923,45 +923,12 @@
       features::kDataReductionProxyDecidesTransform);
 
   // Enable Lo-Fi.
-  const struct {
-    bool lofi_switch_enabled;
-    bool auto_lofi_enabled;
-    bool is_data_reduction_proxy;
-  } tests[] = {
-      {
-          // Lo-Fi enabled through switch and not using a Data Reduction Proxy.
-          true, false, false,
-      },
-      {
-          // Lo-Fi enabled through switch and using a Data Reduction Proxy.
-          true, false, true,
-      },
-      {
-          // Lo-Fi enabled through field trial and not using a Data Reduction
-          // Proxy.
-          false, true, false,
-      },
-      {
-          // Lo-Fi enabled through field trial and using a Data Reduction Proxy.
-          false, true, true,
-      },
-  };
+  bool is_data_reduction_proxy_enabled[] = {false, true};
 
-  for (size_t i = 0; i < arraysize(tests); ++i) {
-    if (tests[i].lofi_switch_enabled) {
-      base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-          switches::kDataReductionProxyLoFi,
-          switches::kDataReductionProxyLoFiValueAlwaysOn);
-    }
-    base::FieldTrialList field_trial_list(nullptr);
-    if (tests[i].auto_lofi_enabled) {
-      base::FieldTrialList::CreateFieldTrial(params::GetLoFiFieldTrialName(),
-                                             "Enabled");
-    }
-
+  for (size_t i = 0; i < arraysize(is_data_reduction_proxy_enabled); ++i) {
     net::ProxyInfo data_reduction_proxy_info;
     std::string proxy;
-    if (tests[i].is_data_reduction_proxy) {
+    if (is_data_reduction_proxy_enabled[i]) {
       data_reduction_proxy_info.UseProxyServer(
           params()->proxies_for_http().front().proxy_server());
     } else {
@@ -986,9 +953,9 @@
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
 
-      VerifyHeaders(tests[i].is_data_reduction_proxy, true, headers);
+      VerifyHeaders(is_data_reduction_proxy_enabled[i], true, headers);
       VerifyDataReductionProxyData(
-          *fake_request, tests[i].is_data_reduction_proxy,
+          *fake_request, is_data_reduction_proxy_enabled[i],
           config()->ShouldAcceptServerPreview(*fake_request.get(),
                                               test_previews_decider));
     }
@@ -1003,9 +970,9 @@
       lofi_decider()->SetIsUsingLoFi(false);
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
-      VerifyHeaders(tests[i].is_data_reduction_proxy, false, headers);
+      VerifyHeaders(is_data_reduction_proxy_enabled[i], false, headers);
       VerifyDataReductionProxyData(*fake_request,
-                                   tests[i].is_data_reduction_proxy, false);
+                                   is_data_reduction_proxy_enabled[i], false);
     }
 
     {
@@ -1019,9 +986,9 @@
       lofi_decider()->SetIsUsingLoFi(true);
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
-      VerifyHeaders(tests[i].is_data_reduction_proxy, true, headers);
+      VerifyHeaders(is_data_reduction_proxy_enabled[i], true, headers);
       VerifyDataReductionProxyData(*fake_request,
-                                   tests[i].is_data_reduction_proxy, true);
+                                   is_data_reduction_proxy_enabled[i], true);
     }
 
     {
@@ -1036,9 +1003,9 @@
       lofi_decider()->SetIsUsingLoFi(false);
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
-      VerifyHeaders(tests[i].is_data_reduction_proxy, false, headers);
+      VerifyHeaders(is_data_reduction_proxy_enabled[i], false, headers);
       VerifyDataReductionProxyData(*fake_request,
-                                   tests[i].is_data_reduction_proxy, false);
+                                   is_data_reduction_proxy_enabled[i], false);
     }
 
     {
@@ -1051,9 +1018,9 @@
       lofi_decider()->SetIsUsingLoFi(false);
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
-      VerifyHeaders(tests[i].is_data_reduction_proxy, false, headers);
+      VerifyHeaders(is_data_reduction_proxy_enabled[i], false, headers);
       VerifyDataReductionProxyData(*fake_request,
-                                   tests[i].is_data_reduction_proxy, false);
+                                   is_data_reduction_proxy_enabled[i], false);
     }
 
     {
@@ -1069,7 +1036,7 @@
       NotifyNetworkDelegate(fake_request.get(), data_reduction_proxy_info,
                             proxy_retry_info, &headers);
       VerifyDataReductionProxyData(
-          *fake_request, tests[i].is_data_reduction_proxy,
+          *fake_request, is_data_reduction_proxy_enabled[i],
           config()->ShouldAcceptServerPreview(*fake_request.get(),
                                               test_previews_decider));
     }
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
index b7aedbb..da23635 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
@@ -119,11 +119,6 @@
       if (!experiment_tokenizer.token().empty())
         experiments_.push_back(experiment_tokenizer.token());
     }
-  } else if (params::AreLitePagesEnabledViaFlags()) {
-    experiments_.push_back(chrome_proxy_experiment_force_lite_page());
-  } else if (params::IsLoFiAlwaysOnViaFlags() ||
-             params::IsLoFiCellularOnlyViaFlags()) {
-    experiments_.push_back(chrome_proxy_experiment_force_empty_image());
   } else {
     // If no other "exp" directive is forced by flags, add the field trial
     // value.
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
index 267a6d29..1a4883c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
@@ -353,20 +353,6 @@
   CreateRequestOptions(kVersion);
   VerifyExpectedHeader(expected_header, kPageIdValue);
 
-  // "force_lite_page" has the next lowest priority.
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueAlwaysOn);
-  base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kEnableDataReductionProxyLitePage);
-  expected_experiments.clear();
-  expected_experiments.push_back(chrome_proxy_experiment_force_lite_page());
-  SetHeaderExpectations(kExpectedSession, kExpectedCredentials, std::string(),
-                        kClientStr, kExpectedBuild, kExpectedPatch, kPageId,
-                        expected_experiments, &expected_header);
-  CreateRequestOptions(kVersion);
-  VerifyExpectedHeader(expected_header, kPageIdValue);
-
   // Setting the experiment explicitly has the highest priority.
   base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
       data_reduction_proxy::switches::kDataReductionProxyExperiment, "bar");
@@ -379,34 +365,6 @@
   VerifyExpectedHeader(expected_header, kPageIdValue);
 }
 
-TEST_F(DataReductionProxyRequestOptionsTest, TestExperimentOtherLoFiFlags) {
-  std::string expected_header;
-  std::vector<std::string> expected_experiments;
-
-  // No "exp=force_*" is set for SlowConnectionOnly flag.
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueSlowConnectionsOnly);
-  expected_experiments.clear();
-  SetHeaderExpectations(kExpectedSession, kExpectedCredentials, std::string(),
-                        kClientStr, kExpectedBuild, kExpectedPatch, kPageId,
-                        expected_experiments, &expected_header);
-  CreateRequestOptions(kVersion);
-  VerifyExpectedHeader(expected_header, kPageIdValue);
-
-  // "exp=force_empty_image" is set for CellularOnly flag.
-  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-      switches::kDataReductionProxyLoFi,
-      switches::kDataReductionProxyLoFiValueAlwaysOn);
-  expected_experiments.clear();
-  expected_experiments.push_back(chrome_proxy_experiment_force_empty_image());
-  SetHeaderExpectations(kExpectedSession, kExpectedCredentials, std::string(),
-                        kClientStr, kExpectedBuild, kExpectedPatch, kPageId,
-                        expected_experiments, &expected_header);
-  CreateRequestOptions(kVersion);
-  VerifyExpectedHeader(expected_header, kPageIdValue);
-}
-
 TEST_F(DataReductionProxyRequestOptionsTest, GetSessionKeyFromRequestHeaders) {
   const struct {
     std::string chrome_proxy_header_key;
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
index 23ec4eab..cf3e45b 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
@@ -44,10 +44,6 @@
 const char kIdentityDirective[] = "identity";
 const char kChromeProxyPagePoliciesDirective[] = "page-policies";
 
-const char kChromeProxyExperimentForceLitePage[] = "force_lite_page";
-const char kChromeProxyExperimentForceEmptyImage[] =
-    "force_page_policies_empty_image";
-
 const char kChromeProxyActionBlockOnce[] = "block-once";
 const char kChromeProxyActionBlock[] = "block";
 const char kChromeProxyActionBypass[] = "bypass";
@@ -179,14 +175,6 @@
   return kChromeProxyPagePoliciesDirective;
 }
 
-const char* chrome_proxy_experiment_force_lite_page() {
-  return kChromeProxyExperimentForceLitePage;
-}
-
-const char* chrome_proxy_experiment_force_empty_image() {
-  return kChromeProxyExperimentForceEmptyImage;
-}
-
 TransformDirective ParseRequestTransform(
     const net::HttpRequestHeaders& headers) {
   std::string accept_transform_value;
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h
index 001b961..00c2d36 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h
@@ -112,14 +112,6 @@
 // a specific page policy.
 const char* page_policies_directive();
 
-// Gets the Chrome-Proxy experiment ("exp") value to force a lite page preview
-// for requests that accept lite pages.
-const char* chrome_proxy_experiment_force_lite_page();
-
-// Gets the Chrome-Proxy experiment ("exp") value to force an empty image
-// preview for requests that enable server provided previews.
-const char* chrome_proxy_experiment_force_empty_image();
-
 // Returns true if the Chrome-Proxy-Content-Transform response header indicates
 // that an empty image has been provided.
 bool IsEmptyImagePreview(const net::HttpResponseHeaders& headers);
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
index 3f1eefb..b51164b0 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
@@ -184,48 +184,6 @@
   return {bypass_min, bypass_max};
 }
 
-bool IsLoFiOnViaFlags() {
-  return IsLoFiAlwaysOnViaFlags() || IsLoFiCellularOnlyViaFlags() ||
-         IsLoFiSlowConnectionsOnlyViaFlags();
-}
-
-bool IsLoFiAlwaysOnViaFlags() {
-  const std::string& lo_fi_value =
-      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
-          data_reduction_proxy::switches::kDataReductionProxyLoFi);
-  return lo_fi_value ==
-         data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn;
-}
-
-bool IsLoFiCellularOnlyViaFlags() {
-  const std::string& lo_fi_value =
-      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
-          data_reduction_proxy::switches::kDataReductionProxyLoFi);
-  return lo_fi_value == data_reduction_proxy::switches::
-                            kDataReductionProxyLoFiValueCellularOnly;
-}
-
-bool IsLoFiSlowConnectionsOnlyViaFlags() {
-  const std::string& lo_fi_value =
-      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
-          data_reduction_proxy::switches::kDataReductionProxyLoFi);
-  return lo_fi_value == data_reduction_proxy::switches::
-                            kDataReductionProxyLoFiValueSlowConnectionsOnly;
-}
-
-bool IsLoFiDisabledViaFlags() {
-  const std::string& lo_fi_value =
-      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
-          data_reduction_proxy::switches::kDataReductionProxyLoFi);
-  return lo_fi_value ==
-         data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled;
-}
-
-bool AreLitePagesEnabledViaFlags() {
-  return base::CommandLine::ForCurrentProcess()->HasSwitch(
-      data_reduction_proxy::switches::kEnableDataReductionProxyLitePage);
-}
-
 bool IsForcePingbackEnabledViaFlags() {
   return base::CommandLine::ForCurrentProcess()->HasSwitch(
       data_reduction_proxy::switches::kEnableDataReductionProxyForcePingback);
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
index 85c496bc6..c1674f4 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
@@ -66,32 +66,6 @@
 // server experiments for the data reduction proxy.
 bool IsIncludedInServerExperimentsFieldTrial();
 
-// Returns true if this client has any of the values to enable Lo-Fi mode for
-// the "data-reduction-proxy-lo-fi" command line switch. This includes the
-// "always-on", "cellular-only", and "slow-connections-only" values.
-bool IsLoFiOnViaFlags();
-
-// Returns true if this client has the command line switch to enable Lo-Fi
-// mode always on.
-bool IsLoFiAlwaysOnViaFlags();
-
-// Returns true if this client has the command line switch to enable Lo-Fi
-// mode only on cellular connections.
-bool IsLoFiCellularOnlyViaFlags();
-
-// Returns true if this client has the command line switch to enable Lo-Fi
-// mode only on slow connections.
-bool IsLoFiSlowConnectionsOnlyViaFlags();
-
-// Returns true if this client has the command line switch to disable Lo-Fi
-// mode.
-bool IsLoFiDisabledViaFlags();
-
-// Returns true if this client has the command line switch to enable lite pages.
-// This means a preview should be requested instead of placeholders whenever
-// Lo-Fi mode is on.
-bool AreLitePagesEnabledViaFlags();
-
 // Returns true if this client has the command line switch to enable forced
 // pageload metrics pingbacks on every page load.
 bool IsForcePingbackEnabledViaFlags();
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
index 510671ff..9ae5784 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
@@ -47,15 +47,6 @@
 // A test key for data reduction proxy authentication.
 const char kDataReductionProxyKey[] = "spdy-proxy-auth-value";
 
-// The mode for Data Reduction Proxy Lo-Fi. The various modes are always-on,
-// cellular-only, slow connections only and disabled.
-const char kDataReductionProxyLoFi[] = "data-reduction-proxy-lo-fi";
-const char kDataReductionProxyLoFiValueAlwaysOn[] = "always-on";
-const char kDataReductionProxyLoFiValueCellularOnly[] = "cellular-only";
-const char kDataReductionProxyLoFiValueDisabled[] = "disabled";
-const char kDataReductionProxyLoFiValueSlowConnectionsOnly[] =
-    "slow-connections-only";
-
 const char kDataReductionPingbackURL[] = "data-reduction-proxy-pingback-url";
 
 // Sets a secure proxy check URL to test before committing to using the Data
@@ -75,12 +66,6 @@
 const char kEnableDataReductionProxyBypassWarning[] =
     "enable-data-reduction-proxy-bypass-warning";
 
-// Enables lite page from the data reduction proxy. This means a lite page
-// should be requested instead of placeholders whenever Lo-Fi mode is on. Lo-fi
-// must also be enabled via a flag or field trial.
-const char kEnableDataReductionProxyLitePage[] =
-    "enable-data-reduction-proxy-lite-page";
-
 // Enables sending a pageload metrics pingback after every page load.
 const char kEnableDataReductionProxyForcePingback[] =
     "enable-data-reduction-proxy-force-pingback";
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h
index 4d3f0ea..e8e008e 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h
@@ -18,11 +18,6 @@
 extern const char kDataReductionProxyFallback[];
 extern const char kDataReductionProxyHttpProxies[];
 extern const char kDataReductionProxyKey[];
-extern const char kDataReductionProxyLoFi[];
-extern const char kDataReductionProxyLoFiValueAlwaysOn[];
-extern const char kDataReductionProxyLoFiValueCellularOnly[];
-extern const char kDataReductionProxyLoFiValueDisabled[];
-extern const char kDataReductionProxyLoFiValueSlowConnectionsOnly[];
 extern const char kDataReductionProxySecureProxyCheckURL[];
 extern const char kDataReductionProxyServerExperimentsDisabled[];
 extern const char kDataReductionProxyServerAlternative1[];
@@ -38,7 +33,6 @@
 extern const char kEnableDataReductionProxy[];
 extern const char kEnableDataReductionProxyBypassWarning[];
 extern const char kEnableDataReductionProxyForcePingback[];
-extern const char kEnableDataReductionProxyLitePage[];
 extern const char kEnableDataReductionProxySavingsPromo[];
 extern const char kDisableDataReductionProxyWarmupURLFetch[];
 
diff --git a/components/exo/shell_surface_base.cc b/components/exo/shell_surface_base.cc
index fc8e2d9..2989e2c 100644
--- a/components/exo/shell_surface_base.cc
+++ b/components/exo/shell_surface_base.cc
@@ -630,6 +630,14 @@
   }
 }
 
+void ShellSurfaceBase::OnSetFrameColors(SkColor active_color,
+                                        SkColor inactive_color) {
+  // TODO(reveman): Allow frame colors to change after surface has been enabled.
+  has_frame_colors_ = true;
+  active_frame_color_ = active_color;
+  inactive_frame_color_ = inactive_color;
+}
+
 void ShellSurfaceBase::OnSetParent(Surface* parent,
                                    const gfx::Point& position) {
   views::Widget* parent_widget =
@@ -749,7 +757,10 @@
   if (!frame_enabled_ && !window_state->HasDelegate()) {
     window_state->SetDelegate(std::make_unique<CustomWindowStateDelegate>());
   }
-  return new CustomFrameView(widget, frame_enabled_);
+  CustomFrameView* frame_view = new CustomFrameView(widget, frame_enabled_);
+  if (has_frame_colors_)
+    frame_view->SetFrameColors(active_frame_color_, inactive_frame_color_);
+  return frame_view;
 }
 
 bool ShellSurfaceBase::WidgetHasHitTestMask() const {
diff --git a/components/exo/shell_surface_base.h b/components/exo/shell_surface_base.h
index 54ccf3a9..03dc1739 100644
--- a/components/exo/shell_surface_base.h
+++ b/components/exo/shell_surface_base.h
@@ -159,6 +159,7 @@
   void OnSurfaceCommit() override;
   bool IsTouchEnabled(Surface* surface) const override;
   void OnSetFrame(SurfaceFrameType type) override;
+  void OnSetFrameColors(SkColor active_color, SkColor inactive_color) override;
   void OnSetParent(Surface* parent, const gfx::Point& position) override;
 
   // Overridden from SurfaceObserver:
@@ -322,6 +323,9 @@
   bool activatable_ = true;
   bool can_minimize_ = true;
   bool frame_enabled_ = false;
+  bool has_frame_colors_ = false;
+  SkColor active_frame_color_ = SK_ColorBLACK;
+  SkColor inactive_frame_color_ = SK_ColorBLACK;
   bool pending_show_widget_ = false;
   std::string application_id_;
   gfx::Rect geometry_;
diff --git a/components/exo/sub_surface.h b/components/exo/sub_surface.h
index 4663036..e0a11185 100644
--- a/components/exo/sub_surface.h
+++ b/components/exo/sub_surface.h
@@ -53,6 +53,8 @@
   bool IsSurfaceSynchronized() const override;
   bool IsTouchEnabled(Surface* surface) const override;
   void OnSetFrame(SurfaceFrameType type) override {}
+  void OnSetFrameColors(SkColor active_color, SkColor inactive_color) override {
+  }
   void OnSetParent(Surface* parent, const gfx::Point& position) override {}
 
   // Overridden from SurfaceObserver:
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index b530ad6..8a416383 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -433,6 +433,14 @@
     delegate_->OnSetFrame(type);
 }
 
+void Surface::SetFrameColors(SkColor active_color, SkColor inactive_color) {
+  TRACE_EVENT2("exo", "Surface::SetFrameColors", "active_color", active_color,
+               "inactive_color", inactive_color);
+
+  if (delegate_)
+    delegate_->OnSetFrameColors(active_color, inactive_color);
+}
+
 void Surface::SetParent(Surface* parent, const gfx::Point& position) {
   TRACE_EVENT2("exo", "Surface::SetParent", "parent", !!parent, "position",
                position.ToString());
diff --git a/components/exo/surface.h b/components/exo/surface.h
index 312d9c6d..ce1ea91 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -143,6 +143,9 @@
   // Request that surface should have the specified frame type.
   void SetFrame(SurfaceFrameType type);
 
+  // Request that surface should use a specific set of frame colors.
+  void SetFrameColors(SkColor active_color, SkColor inactive_color);
+
   // Request "parent" for surface.
   void SetParent(Surface* parent, const gfx::Point& position);
 
diff --git a/components/exo/surface_delegate.h b/components/exo/surface_delegate.h
index 8c8406d..a1895815 100644
--- a/components/exo/surface_delegate.h
+++ b/components/exo/surface_delegate.h
@@ -5,6 +5,7 @@
 #ifndef COMPONENTS_EXO_SURFACE_DELEGATE_H_
 #define COMPONENTS_EXO_SURFACE_DELEGATE_H_
 
+#include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/geometry/point.h"
 
 namespace exo {
@@ -31,6 +32,10 @@
   // Called when surface was requested to use a specific frame type.
   virtual void OnSetFrame(SurfaceFrameType type) = 0;
 
+  // Called when surface was requested to use a specific set of frame colors.
+  virtual void OnSetFrameColors(SkColor active_color,
+                                SkColor inactive_color) = 0;
+
   // Called when a new "parent" was requested for this surface. |position|
   // is the initial position of surface relative to origin of parent.
   virtual void OnSetParent(Surface* parent, const gfx::Point& position) = 0;
diff --git a/components/exo/surface_tree_host.h b/components/exo/surface_tree_host.h
index 274a168..0cfff8f 100644
--- a/components/exo/surface_tree_host.h
+++ b/components/exo/surface_tree_host.h
@@ -92,6 +92,8 @@
   bool IsSurfaceSynchronized() const override;
   bool IsTouchEnabled(Surface* surface) const override;
   void OnSetFrame(SurfaceFrameType type) override {}
+  void OnSetFrameColors(SkColor active_color, SkColor inactive_color) override {
+  }
   void OnSetParent(Surface* parent, const gfx::Point& position) override {}
 
   // Overridden from cc::BeginFrameObserverBase:
diff --git a/components/exo/wayland/aura-shell-client-protocol.h b/components/exo/wayland/aura-shell-client-protocol.h
index 8131b8a..bdee99af 100644
--- a/components/exo/wayland/aura-shell-client-protocol.h
+++ b/components/exo/wayland/aura-shell-client-protocol.h
@@ -217,6 +217,7 @@
 
 #define ZAURA_SURFACE_SET_FRAME 0
 #define ZAURA_SURFACE_SET_PARENT 1
+#define ZAURA_SURFACE_SET_FRAME_COLORS 2
 
 
 /**
@@ -227,6 +228,10 @@
  * @ingroup iface_zaura_surface
  */
 #define ZAURA_SURFACE_SET_PARENT_SINCE_VERSION 2
+/**
+ * @ingroup iface_zaura_surface
+ */
+#define ZAURA_SURFACE_SET_FRAME_COLORS_SINCE_VERSION 3
 
 /** @ingroup iface_zaura_surface */
 static inline void
@@ -280,6 +285,18 @@
 			 ZAURA_SURFACE_SET_PARENT, parent, x, y);
 }
 
+/**
+ * @ingroup iface_zaura_surface
+ *
+ * Set the frame colors.
+ */
+static inline void
+zaura_surface_set_frame_colors(struct zaura_surface *zaura_surface, uint32_t active_color, uint32_t inactive_color)
+{
+	wl_proxy_marshal((struct wl_proxy *) zaura_surface,
+			 ZAURA_SURFACE_SET_FRAME_COLORS, active_color, inactive_color);
+}
+
 #ifndef ZAURA_OUTPUT_SCALE_PROPERTY_ENUM
 #define ZAURA_OUTPUT_SCALE_PROPERTY_ENUM
 /**
diff --git a/components/exo/wayland/aura-shell-protocol.c b/components/exo/wayland/aura-shell-protocol.c
index 8dc4341..1e6d424 100644
--- a/components/exo/wayland/aura-shell-protocol.c
+++ b/components/exo/wayland/aura-shell-protocol.c
@@ -50,7 +50,7 @@
 };
 
 WL_EXPORT const struct wl_interface zaura_shell_interface = {
-	"zaura_shell", 2,
+	"zaura_shell", 3,
 	2, zaura_shell_requests,
 	0, NULL,
 };
@@ -58,11 +58,12 @@
 static const struct wl_message zaura_surface_requests[] = {
 	{ "set_frame", "u", types + 0 },
 	{ "set_parent", "2?oii", types + 6 },
+	{ "set_frame_colors", "3uu", types + 0 },
 };
 
 WL_EXPORT const struct wl_interface zaura_surface_interface = {
-	"zaura_surface", 2,
-	2, zaura_surface_requests,
+	"zaura_surface", 3,
+	3, zaura_surface_requests,
 	0, NULL,
 };
 
diff --git a/components/exo/wayland/aura-shell-server-protocol.h b/components/exo/wayland/aura-shell-server-protocol.h
index 9328c45..e306f8d9 100644
--- a/components/exo/wayland/aura-shell-server-protocol.h
+++ b/components/exo/wayland/aura-shell-server-protocol.h
@@ -212,6 +212,18 @@
 			   struct wl_resource *parent,
 			   int32_t x,
 			   int32_t y);
+	/**
+	 * set the frame colors of this surface
+	 *
+	 * Set the frame colors.
+	 * @param active_color 32 bit ARGB color value, not premultiplied
+	 * @param inactive_color 32 bit ARGB color value, not premultiplied
+	 * @since 3
+	 */
+	void (*set_frame_colors)(struct wl_client *client,
+				 struct wl_resource *resource,
+				 uint32_t active_color,
+				 uint32_t inactive_color);
 };
 
 
@@ -223,6 +235,10 @@
  * @ingroup iface_zaura_surface
  */
 #define ZAURA_SURFACE_SET_PARENT_SINCE_VERSION 2
+/**
+ * @ingroup iface_zaura_surface
+ */
+#define ZAURA_SURFACE_SET_FRAME_COLORS_SINCE_VERSION 3
 
 #ifndef ZAURA_OUTPUT_SCALE_PROPERTY_ENUM
 #define ZAURA_OUTPUT_SCALE_PROPERTY_ENUM
diff --git a/components/exo/wayland/protocol/aura-shell.xml b/components/exo/wayland/protocol/aura-shell.xml
index f4d99e7..549b288 100644
--- a/components/exo/wayland/protocol/aura-shell.xml
+++ b/components/exo/wayland/protocol/aura-shell.xml
@@ -24,7 +24,7 @@
     DEALINGS IN THE SOFTWARE.
   </copyright>
 
-  <interface name="zaura_shell" version="2">
+  <interface name="zaura_shell" version="3">
     <description summary="aura_shell">
       The global interface exposing aura shell capabilities is used to
       instantiate an interface extension for a wl_surface object.
@@ -68,7 +68,7 @@
     </request>
   </interface>
 
-  <interface name="zaura_surface" version="2">
+  <interface name="zaura_surface" version="3">
     <description summary="aura shell interface to a wl_surface">
       An additional interface to a wl_surface object, which allows the
       client to access aura shell specific functionality for surface.
@@ -101,6 +101,16 @@
       <arg name="x" type="int"/>
       <arg name="y" type="int"/>
     </request>
+
+    <!-- Version 3 additions -->
+
+    <request name="set_frame_colors" since="3">
+      <description summary="set the frame colors of this surface">
+	Set the frame colors.
+      </description>
+      <arg name="active_color" type="uint" summary="32 bit ARGB color value, not premultiplied"/>
+      <arg name="inactive_color" type="uint" summary="32 bit ARGB color value, not premultiplied"/>
+    </request>
   </interface>
 
   <interface name="zaura_output" version="2">
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index c1edbae..a0f6de79 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -2471,6 +2471,12 @@
       surface_->SetFrame(type);
   }
 
+  void SetFrameColors(SkColor active_frame_color,
+                      SkColor inactive_frame_color) {
+    if (surface_)
+      surface_->SetFrameColors(active_frame_color, inactive_frame_color);
+  }
+
   void SetParent(AuraSurface* parent, const gfx::Point& position) {
     if (surface_)
       surface_->SetParent(parent ? parent->surface_ : nullptr, position);
@@ -2517,8 +2523,17 @@
       gfx::Point(x, y));
 }
 
+void aura_surface_set_frame_colors(wl_client* client,
+                                   wl_resource* resource,
+                                   uint32_t active_color,
+                                   uint32_t inactive_color) {
+  GetUserDataAs<AuraSurface>(resource)->SetFrameColors(active_color,
+                                                       inactive_color);
+}
+
 const struct zaura_surface_interface aura_surface_implementation = {
-    aura_surface_set_frame, aura_surface_set_parent};
+    aura_surface_set_frame, aura_surface_set_parent,
+    aura_surface_set_frame_colors};
 
 ////////////////////////////////////////////////////////////////////////////////
 // aura_output_interface:
@@ -2609,7 +2624,7 @@
 const struct zaura_shell_interface aura_shell_implementation = {
     aura_shell_get_aura_surface, aura_shell_get_aura_output};
 
-const uint32_t aura_shell_version = 2;
+const uint32_t aura_shell_version = 3;
 
 void bind_aura_shell(wl_client* client,
                      void* data,
diff --git a/components/favicon/content/content_favicon_driver_unittest.cc b/components/favicon/content/content_favicon_driver_unittest.cc
index 6dcc190d3..6ddbfd72 100644
--- a/components/favicon/content/content_favicon_driver_unittest.cc
+++ b/components/favicon/content/content_favicon_driver_unittest.cc
@@ -150,48 +150,5 @@
   EXPECT_TRUE(driver->favicon_urls().empty());
 }
 
-TEST_F(ContentFaviconDriverTest, RecordsHistorgramsForCandidates) {
-  const std::vector<gfx::Size> kSizes16x16and32x32({{16, 16}, {32, 32}});
-  base::HistogramTester tester;
-
-  // Navigation to a page updating one icon.
-  TestFetchFaviconForPage(
-      GURL("http://www.youtube.com"),
-      {content::FaviconURL(GURL("http://www.youtube.com/favicon.ico"),
-                           content::FaviconURL::IconType::kFavicon,
-                           kSizes16x16and32x32)});
-
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesCount"),
-              ElementsAre(base::Bucket(/*min=*/1, /*count=*/1)));
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithDefinedSizesCount"),
-              ElementsAre(base::Bucket(/*min=*/1, /*count=*/1)));
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithTouchIconsCount"),
-              ElementsAre(base::Bucket(/*min=*/0, /*count=*/1)));
-
-  std::vector<content::FaviconURL> favicon_urls = {
-      content::FaviconURL(GURL("http://www.google.ca/favicon.ico"),
-                          content::FaviconURL::IconType::kFavicon,
-                          kSizes16x16and32x32),
-      content::FaviconURL(GURL("http://www.google.ca/precomposed_icon.png"),
-                          content::FaviconURL::IconType::kTouchPrecomposedIcon,
-                          kEmptyIconSizes),
-      content::FaviconURL(GURL("http://www.google.ca/touch_icon.png"),
-                          content::FaviconURL::IconType::kTouchIcon,
-                          kEmptyIconSizes)};
-
-  // Double navigation to a page with 3 different icons.
-  TestFetchFaviconForPage(GURL("http://www.google.ca"), favicon_urls);
-  TestFetchFaviconForPage(GURL("http://www.google.ca"), favicon_urls);
-
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesCount"),
-              ElementsAre(base::Bucket(/*min=*/1, /*count=*/1),
-                          base::Bucket(/*min=*/3, /*count=*/2)));
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithDefinedSizesCount"),
-              ElementsAre(base::Bucket(/*min=*/1, /*count=*/3)));
-  EXPECT_THAT(tester.GetAllSamples("Favicons.CandidatesWithTouchIconsCount"),
-              ElementsAre(base::Bucket(/*min=*/0, /*count=*/1),
-                          base::Bucket(/*min=*/2, /*count=*/2)));
-}
-
 }  // namespace
 }  // namespace favicon
diff --git a/components/favicon/core/favicon_driver_impl.cc b/components/favicon/core/favicon_driver_impl.cc
index f837d17..e4f0588 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -24,27 +24,6 @@
 const bool kEnableTouchIcon = false;
 #endif
 
-void RecordCandidateMetrics(const std::vector<FaviconURL>& candidates) {
-  const favicon_base::IconTypeSet touch_icon_types = {
-      favicon_base::IconType::kTouchIcon,
-      favicon_base::IconType::kTouchPrecomposedIcon};
-  size_t with_defined_touch_icons = 0;
-  size_t with_defined_sizes = 0;
-  for (const auto& candidate : candidates) {
-    if (!candidate.icon_sizes.empty()) {
-      with_defined_sizes++;
-    }
-    if (touch_icon_types.count(candidate.icon_type) != 0) {
-      with_defined_touch_icons++;
-    }
-  }
-  UMA_HISTOGRAM_COUNTS_100("Favicons.CandidatesCount", candidates.size());
-  UMA_HISTOGRAM_COUNTS_100("Favicons.CandidatesWithDefinedSizesCount",
-                           with_defined_sizes);
-  UMA_HISTOGRAM_COUNTS_100("Favicons.CandidatesWithTouchIconsCount",
-                           with_defined_touch_icons);
-}
-
 }  // namespace
 
 FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
@@ -94,7 +73,6 @@
     const GURL& page_url,
     const std::vector<FaviconURL>& candidates,
     const GURL& manifest_url) {
-  RecordCandidateMetrics(candidates);
   for (const std::unique_ptr<FaviconHandler>& handler : handlers_) {
     // We feed in the Web Manifest URL (if any) to the instance handling type
     // kWebManifestIcon, because those compete which each other (i.e. manifest
diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc
index 60b64a6..b9e87bd 100644
--- a/components/favicon/core/favicon_handler.cc
+++ b/components/favicon/core/favicon_handler.cc
@@ -45,35 +45,6 @@
   return bitmap_result.is_valid();
 }
 
-void RecordDownloadAttemptsForHandlerType(
-    FaviconDriverObserver::NotificationIconType handler_type,
-    int attempts) {
-  // If not at least one attempts was recorded or more than 15 attempts were
-  // registered, something went wrong. Underflows are stored in bucket 0 and
-  // overflows in bucket 16.
-  attempts = std::max(0, std::min(attempts, 16));
-  switch (handler_type) {
-    case FaviconDriverObserver::NON_TOUCH_16_DIP:
-      base::UmaHistogramSparse("Favicons.DownloadAttempts.Favicons", attempts);
-      return;
-    case FaviconDriverObserver::NON_TOUCH_LARGEST:
-      base::UmaHistogramSparse("Favicons.DownloadAttempts.LargeIcons",
-                               attempts);
-      return;
-    case FaviconDriverObserver::TOUCH_LARGEST:
-      base::UmaHistogramSparse("Favicons.DownloadAttempts.TouchIcons",
-                               attempts);
-      return;
-  }
-  NOTREACHED();
-}
-
-void RecordDownloadOutcome(FaviconHandler::DownloadOutcome outcome) {
-  UMA_HISTOGRAM_ENUMERATION(
-      "Favicons.DownloadOutcome", outcome,
-      FaviconHandler::DownloadOutcome::DOWNLOAD_OUTCOME_COUNT);
-}
-
 // Returns true if |bitmap_results| is non-empty and:
 // - At least one of the bitmaps in |bitmap_results| is expired
 // OR
@@ -194,7 +165,6 @@
       notification_icon_type_(favicon_base::IconType::kInvalid),
       service_(service),
       delegate_(delegate),
-      num_image_download_requests_(0),
       current_candidate_index_(0u) {
   DCHECK(delegate_);
 }
@@ -243,7 +213,6 @@
   candidates_.clear();
   notification_icon_url_ = GURL();
   notification_icon_type_ = favicon_base::IconType::kInvalid;
-  num_image_download_requests_ = 0;
   current_candidate_index_ = 0u;
   best_favicon_ = DownloadedFavicon();
 
@@ -373,7 +342,6 @@
   cancelable_task_tracker_for_candidates_.TryCancelAll();
   manifest_download_request_.Cancel();
   image_download_request_.Cancel();
-  num_image_download_requests_ = 0;
   current_candidate_index_ = 0u;
   best_favicon_ = DownloadedFavicon();
   manifest_url_ = manifest_url;
@@ -530,13 +498,11 @@
   if (bitmaps.empty()) {
     if (http_status_code == 404) {
       DVLOG(1) << "Failed to Download Favicon:" << image_url;
-      RecordDownloadOutcome(DownloadOutcome::FAILED);
       service_->UnableToDownloadFavicon(image_url);
     } else if (http_status_code != 0) {
       error_other_than_404_found_ = true;
     }
   } else {
-    RecordDownloadOutcome(DownloadOutcome::SUCCEEDED);
     float score = 0.0f;
     gfx::ImageSkia image_skia;
     if (download_largest_icon_) {
@@ -572,10 +538,6 @@
     ++current_candidate_index_;
     DownloadCurrentCandidateOrAskFaviconService();
   } else {
-    // OnDidDownloadFavicon() can only be called after requesting a download, so
-    // |num_image_download_requests_| can never be 0.
-    RecordDownloadAttemptsForHandlerType(handler_type_,
-                                         num_image_download_requests_);
     if (best_favicon_.candidate.icon_type == favicon_base::IconType::kInvalid) {
       // No valid icon found, so check if mappings should be deleted.
       MaybeDeleteFaviconMappings();
@@ -592,7 +554,6 @@
     }
     // Clear download related state.
     current_candidate_index_ = candidates_.size();
-    num_image_download_requests_ = 0;
     best_favicon_ = DownloadedFavicon();
   }
 }
@@ -707,9 +668,6 @@
   if (has_expired_or_incomplete_result) {
     ScheduleImageDownload(current_candidate()->icon_url,
                           current_candidate()->icon_type);
-  } else if (num_image_download_requests_ > 0) {
-    RecordDownloadAttemptsForHandlerType(handler_type_,
-                                         num_image_download_requests_);
   }
 }
 
@@ -721,12 +679,10 @@
       << "More than one ongoing download";
   if (service_->WasUnableToDownloadFavicon(image_url)) {
     DVLOG(1) << "Skip Failed FavIcon: " << image_url;
-    RecordDownloadOutcome(DownloadOutcome::SKIPPED);
     OnDidDownloadFavicon(icon_type, 0, 0, image_url, std::vector<SkBitmap>(),
                          std::vector<gfx::Size>());
     return;
   }
-  ++num_image_download_requests_;
   image_download_request_.Reset(
       base::Bind(&FaviconHandler::OnDidDownloadFavicon, base::Unretained(this),
                  icon_type));
diff --git a/components/favicon/core/favicon_handler.h b/components/favicon/core/favicon_handler.h
index be57e14..7f63f9f 100644
--- a/components/favicon/core/favicon_handler.h
+++ b/components/favicon/core/favicon_handler.h
@@ -76,19 +76,6 @@
 
 class FaviconHandler {
  public:
-  // Outcome of a favicon download.
-  // Recorded as Favicons.DownloadOutcome and public for testing.
-  //
-  // These values must stay in sync with the FaviconDownloadStatus enum
-  // in histograms.xml and should be treated as append-only, since it backs an
-  // UMA histogram..
-  enum class DownloadOutcome {
-    SUCCEEDED = 0,
-    FAILED = 1,
-    SKIPPED = 2,
-    DOWNLOAD_OUTCOME_COUNT = 3
-  };
-
   class Delegate {
    public:
     // Mimics WebContents::ImageDownloadCallback.
@@ -377,10 +364,6 @@
   // This handler's delegate.
   Delegate* delegate_;
 
-  // Captures the number of download requests that were initiated for the
-  // current url_.
-  int num_image_download_requests_;
-
   // The index of the favicon URL in |image_urls_| which is currently being
   // requested from history or downloaded.
   size_t current_candidate_index_;
diff --git a/components/favicon/core/favicon_handler_unittest.cc b/components/favicon/core/favicon_handler_unittest.cc
index 0b5de31..ad0e293 100644
--- a/components/favicon/core/favicon_handler_unittest.cc
+++ b/components/favicon/core/favicon_handler_unittest.cc
@@ -47,7 +47,6 @@
 using testing::Return;
 using testing::_;
 
-using DownloadOutcome = FaviconHandler::DownloadOutcome;
 using IntVector = std::vector<int>;
 using URLVector = std::vector<GURL>;
 using BitmapVector = std::vector<SkBitmap>;
@@ -560,12 +559,6 @@
 
   RunHandlerWithSimpleFaviconCandidates({kIconURL});
   EXPECT_THAT(delegate_.downloads(), IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      IsEmpty());
 }
 
 // Test that UpdateFaviconsAndFetch() is called with the appropriate parameters
@@ -1643,160 +1636,6 @@
        FaviconURL(kIconURL16x16, kFavicon, kEmptySizes)});
 }
 
-TEST_F(FaviconHandlerTest, TestRecordMultipleDownloadAttempts) {
-  base::HistogramTester histogram_tester;
-
-  // Try to download the three failing icons and end up logging three attempts.
-  RunHandlerWithCandidates(
-      FaviconDriverObserver::NON_TOUCH_LARGEST,
-      {FaviconURL(GURL("http://www.google.com/a"), kFavicon, kEmptySizes),
-       FaviconURL(GURL("http://www.google.com/b"), kFavicon, kEmptySizes),
-       FaviconURL(GURL("http://www.google.com/c"), kFavicon, kEmptySizes)});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      ElementsAre(base::Bucket(/*sample=*/3, /*expected_count=*/1)));
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.TouchIcons"),
-      IsEmpty());
-}
-
-TEST_F(FaviconHandlerTest, TestRecordSingleFaviconDownloadAttempt) {
-  base::HistogramTester histogram_tester;
-
-  RunHandlerWithSimpleFaviconCandidates({kIconURL16x16});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      ElementsAre(base::Bucket(/*sample=*/1, /*expected_count=*/1)));
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.TouchIcons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadOutcome"),
-      ElementsAre(base::Bucket(static_cast<int>(DownloadOutcome::SUCCEEDED),
-                               /*expected_count=*/1)));
-}
-
-TEST_F(FaviconHandlerTest, TestRecordSingleLargeIconDownloadAttempt) {
-  base::HistogramTester histogram_tester;
-
-  RunHandlerWithCandidates(FaviconDriverObserver::NON_TOUCH_LARGEST,
-                           {FaviconURL(kIconURL64x64, kFavicon, kEmptySizes)});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      ElementsAre(base::Bucket(/*sample=*/1, /*expected_count=*/1)));
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.TouchIcons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadOutcome"),
-      ElementsAre(base::Bucket(static_cast<int>(DownloadOutcome::SUCCEEDED),
-                               /*expected_count=*/1)));
-}
-
-TEST_F(FaviconHandlerTest, TestRecordSingleTouchIconDownloadAttempt) {
-  base::HistogramTester histogram_tester;
-  RunHandlerWithCandidates(
-      FaviconDriverObserver::TOUCH_LARGEST,
-      {FaviconURL(kIconURL64x64, kTouchIcon, kEmptySizes)});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.TouchIcons"),
-      ElementsAre(base::Bucket(/*sample=*/1, /*expected_count=*/1)));
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadOutcome"),
-      ElementsAre(base::Bucket(static_cast<int>(DownloadOutcome::SUCCEEDED),
-                               /*expected_count=*/1)));
-}
-
-TEST_F(FaviconHandlerTest, TestRecordDownloadAttemptsFinishedByCache) {
-  const GURL kIconURL1024x1024("http://www.google.com/a-404-ing-icon");
-  base::HistogramTester histogram_tester;
-  favicon_service_.fake()->Store(
-      GURL("http://so.de"), kIconURL64x64,
-      CreateRawBitmapResult(kIconURL64x64, kFavicon, /*expired=*/false, 64));
-
-  RunHandlerWithCandidates(
-      FaviconDriverObserver::NON_TOUCH_LARGEST,
-      {FaviconURL(kIconURL1024x1024, kFavicon, {gfx::Size(1024, 1024)}),
-       FaviconURL(kIconURL12x12, kFavicon, {gfx::Size(12, 12)}),
-       FaviconURL(kIconURL64x64, kFavicon, {gfx::Size(64, 64)})});
-
-  // Should try only the first (receive 404) and get second icon from cache.
-  EXPECT_THAT(delegate_.downloads(), ElementsAre(kIconURL1024x1024));
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.LargeIcons"),
-      ElementsAre(base::Bucket(/*sample=*/1, /*expected_count=*/1)));
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      IsEmpty());
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.TouchIcons"),
-      IsEmpty());
-}
-
-TEST_F(FaviconHandlerTest, TestRecordSingleDownloadAttemptForRefreshingIcons) {
-  base::HistogramTester histogram_tester;
-  favicon_service_.fake()->Store(
-      GURL("http://www.google.com/ps"), kIconURL16x16,
-      CreateRawBitmapResult(kIconURL16x16, kFavicon, /*expired=*/true));
-
-  RunHandlerWithSimpleFaviconCandidates({kIconURL16x16});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadAttempts.Favicons"),
-      ElementsAre(base::Bucket(/*sample=*/1, /*expected_count=*/1)));
-}
-
-TEST_F(FaviconHandlerTest, TestRecordFailingDownloadAttempt) {
-  base::HistogramTester histogram_tester;
-  const GURL k404IconURL("http://www.google.com/404.png");
-
-  delegate_.fake_image_downloader().AddError(k404IconURL, 404);
-
-  EXPECT_CALL(favicon_service_, UnableToDownloadFavicon(k404IconURL));
-
-  RunHandlerWithSimpleFaviconCandidates({k404IconURL});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadOutcome"),
-      ElementsAre(base::Bucket(static_cast<int>(DownloadOutcome::FAILED),
-                               /*expected_count=*/1)));
-}
-
-TEST_F(FaviconHandlerTest, TestRecordSkippedDownloadForKnownFailingUrl) {
-  base::HistogramTester histogram_tester;
-  const GURL k404IconURL("http://www.google.com/404.png");
-
-  ON_CALL(favicon_service_, WasUnableToDownloadFavicon(k404IconURL))
-      .WillByDefault(Return(true));
-
-  RunHandlerWithSimpleFaviconCandidates({k404IconURL});
-
-  EXPECT_THAT(
-      histogram_tester.GetAllSamples("Favicons.DownloadOutcome"),
-      ElementsAre(base::Bucket(static_cast<int>(DownloadOutcome::SKIPPED),
-                               /*expected_count=*/1)));
-}
-
 // Test that if a page URL is followed by another page URL which is not
 // considered the same document, favicon candidates listed in the second page
 // get associated to that second page only.
diff --git a/components/grpc_support/test/quic_test_server.cc b/components/grpc_support/test/quic_test_server.cc
index ef1ffce..f47bdd5 100644
--- a/components/grpc_support/test/quic_test_server.cc
+++ b/components/grpc_support/test/quic_test_server.cc
@@ -25,8 +25,7 @@
 namespace grpc_support {
 
 const char kTestServerDomain[] = "example.com";
-// This must match the certificate used (quic_test.example.com.crt and
-// quic_test.example.com.key.pkcs8).
+// This must match the certificate used (quic-chain.pem and quic-leaf-cert.key).
 const char kTestServerHost[] = "test.example.com";
 const char kTestServerUrl[] = "https://test.example.com/hello.txt";
 
@@ -84,7 +83,7 @@
   std::unique_ptr<net::ProofSourceChromium> proof_source(
       new net::ProofSourceChromium());
   CHECK(proof_source->Initialize(directory.AppendASCII("quic-chain.pem"),
-                                 directory.AppendASCII("quic-cert.key"),
+                                 directory.AppendASCII("quic-leaf-cert.key"),
                                  base::FilePath()));
   SetupQuicHttpResponseCache();
 
diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc
index e4cbdb2..8eccbaf 100644
--- a/components/guest_view/browser/guest_view_base.cc
+++ b/components/guest_view/browser/guest_view_base.cc
@@ -642,7 +642,7 @@
 content::ColorChooser* GuestViewBase::OpenColorChooser(
     WebContents* web_contents,
     SkColor color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   if (!attached() || !embedder_web_contents()->GetDelegate())
     return nullptr;
 
diff --git a/components/guest_view/browser/guest_view_base.h b/components/guest_view/browser/guest_view_base.h
index c12f4dc4..50d676c4 100644
--- a/components/guest_view/browser/guest_view_base.h
+++ b/components/guest_view/browser/guest_view_base.h
@@ -357,7 +357,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) final;
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) final;
   void ResizeDueToAutoResize(content::WebContents* web_contents,
                              const gfx::Size& new_size) final;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
diff --git a/components/history/core/browser/web_history_service_unittest.cc b/components/history/core/browser/web_history_service_unittest.cc
index f20cb048a..05e9ad7b 100644
--- a/components/history/core/browser/web_history_service_unittest.cc
+++ b/components/history/core/browser/web_history_service_unittest.cc
@@ -12,10 +12,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "components/signin/core/browser/account_tracker_service.h"
-#include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
-#include "components/signin/core/browser/fake_signin_manager.h"
-#include "components/signin/core/browser/test_signin_client.h"
+#include "base/values.h"
 #include "net/http/http_status_code.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
 #include "net/url_request/url_request_test_util.h"
@@ -33,7 +30,7 @@
 class TestingWebHistoryService : public WebHistoryService {
  public:
   explicit TestingWebHistoryService(
-      ProfileOAuth2TokenService* token_service,
+      OAuth2TokenService* token_service,
       SigninManagerBase* signin_manager,
       const scoped_refptr<net::URLRequestContextGetter>& request_context)
       : WebHistoryService(token_service, signin_manager, request_context),
@@ -216,13 +213,14 @@
 class WebHistoryServiceTest : public testing::Test {
  public:
   WebHistoryServiceTest()
-      : signin_client_(nullptr),
-        signin_manager_(&signin_client_, &account_tracker_),
-        url_request_context_(new net::TestURLRequestContextGetter(
+      : url_request_context_(new net::TestURLRequestContextGetter(
             base::ThreadTaskRunnerHandle::Get())),
-        web_history_service_(&token_service_,
-                             &signin_manager_,
-                             url_request_context_) {}
+        // NOTE: Simply pass null ojects for
+        // SigninManager/OAuth2TokenService. WebHistoryService's only
+        // usage of those objects is to fetch access tokens via RequestImpl,
+        // and TestWebHistoryService deliberately replaces this flow with
+        // TestRequest.
+        web_history_service_(nullptr, nullptr, url_request_context_) {}
 
   ~WebHistoryServiceTest() override {}
 
@@ -239,10 +237,6 @@
 
  private:
   base::test::ScopedTaskEnvironment scoped_task_environment_;
-  FakeProfileOAuth2TokenService token_service_;
-  AccountTrackerService account_tracker_;
-  TestSigninClient signin_client_;
-  FakeSigninManagerBase signin_manager_;
   scoped_refptr<net::URLRequestContextGetter> url_request_context_;
   TestingWebHistoryService web_history_service_;
 
diff --git a/components/metrics/file_metrics_provider.cc b/components/metrics/file_metrics_provider.cc
index fe01db1eb..411f5f84 100644
--- a/components/metrics/file_metrics_provider.cc
+++ b/components/metrics/file_metrics_provider.cc
@@ -94,6 +94,7 @@
   MERGE_HISTOGRAM_DELTAS_FROM_SOURCE,
   RECORD_HISTOGRAM_SNAPSHOTS_FROM_SOURCE,
   PROVIDE_INDEPENDENT_METRICS,
+  SCHEDULE_SOURCES_FAILED,
   MAX_HAPPENINGS
 };
 
@@ -662,12 +663,14 @@
   // because that must complete before the reply runs.
   SourceInfoList* check_list = new SourceInfoList();
   std::swap(sources_to_check_, *check_list);
-  task_runner_->PostTaskAndReply(
+  bool success = task_runner_->PostTaskAndReply(
       FROM_HERE,
       base::Bind(&FileMetricsProvider::CheckAndMergeMetricSourcesOnTaskRunner,
                  base::Unretained(check_list)),
       base::Bind(&FileMetricsProvider::RecordSourcesChecked,
                  weak_factory_.GetWeakPtr(), base::Owned(check_list)));
+  if (!success)
+    RecordHappening(SCHEDULE_SOURCES_FAILED);
 }
 
 void FileMetricsProvider::RecordSourcesChecked(SourceInfoList* checked) {
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
index 84adf71..978f2c7 100644
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
@@ -143,12 +143,17 @@
     Category category,
     DismissedSuggestionsCallback callback) {
   DCHECK_EQ(provided_category_, category);
+  recent_tabs_ui_adapter_->GetAllItems(base::BindOnce(
+      &RecentTabSuggestionsProvider::OnGetDismissedSuggestionsForDebuggingDone,
+      weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
+}
 
-  std::vector<OfflineItem> items = recent_tabs_ui_adapter_->GetAllItems();
-
+void RecentTabSuggestionsProvider::OnGetDismissedSuggestionsForDebuggingDone(
+    DismissedSuggestionsCallback callback,
+    const std::vector<OfflineItem>& offline_items) {
   std::set<std::string> dismissed_ids = ReadDismissedIDsFromPrefs();
   std::vector<ContentSuggestion> suggestions;
-  for (const OfflineItem& item : items) {
+  for (const OfflineItem& item : offline_items) {
     int64_t offline_page_id =
         recent_tabs_ui_adapter_->GetOfflineIdByGuid(item.id.id);
     if (!dismissed_ids.count(base::IntToString(offline_page_id))) {
@@ -157,6 +162,7 @@
 
     suggestions.push_back(ConvertUIItem(item));
   }
+
   std::move(callback).Run(std::move(suggestions));
 }
 
@@ -200,13 +206,19 @@
 }
 
 void RecentTabSuggestionsProvider::FetchRecentTabs() {
-  std::vector<OfflineItem> ui_items = recent_tabs_ui_adapter_->GetAllItems();
+  recent_tabs_ui_adapter_->GetAllItems(
+      base::BindOnce(&RecentTabSuggestionsProvider::OnFetchRecentTabsDone,
+                     weak_ptr_factory_.GetWeakPtr()));
+}
+
+void RecentTabSuggestionsProvider::OnFetchRecentTabsDone(
+    const std::vector<OfflineItem>& offline_items) {
   NotifyStatusChanged(CategoryStatus::AVAILABLE);
   std::set<std::string> old_dismissed_ids = ReadDismissedIDsFromPrefs();
   std::set<std::string> new_dismissed_ids;
   std::vector<OfflineItem> non_dismissed_items;
 
-  for (const OfflineItem& item : ui_items) {
+  for (const OfflineItem& item : offline_items) {
     std::string offline_page_id = base::IntToString(
         recent_tabs_ui_adapter_->GetOfflineIdByGuid(item.id.id));
     if (old_dismissed_ids.count(offline_page_id)) {
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h
index 0dd05266..2fb467ff 100644
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h
@@ -74,6 +74,11 @@
 
   // Manually requests all Recent Tabs UI items and updates the suggestions.
   void FetchRecentTabs();
+  void OnFetchRecentTabsDone(const std::vector<OfflineItem>& offline_items);
+
+  void OnGetDismissedSuggestionsForDebuggingDone(
+      DismissedSuggestionsCallback callback,
+      const std::vector<OfflineItem>& offline_items);
 
   // Converts an OfflineItem to a ContentSuggestion for the
   // |provided_category_|.
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc
index c43ad141..b9e0fe0a 100644
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc
@@ -178,6 +178,7 @@
   for (OfflinePageItem& recent_tab : recent_tabs_list) {
     AddTabAndOfflinePageToModel(recent_tab);
   }
+  task_runner()->RunUntilIdle();
 }
 
 TEST_F(RecentTabSuggestionsProviderTest, ShouldSortByCreationTime) {
@@ -195,6 +196,7 @@
                        ElementsAre(Property(&ContentSuggestion::url,
                                             GURL("http://dummy.com/1")))));
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(1, now));
+  task_runner()->RunUntilIdle();
 
   EXPECT_CALL(
       *observer(),
@@ -204,6 +206,7 @@
               Property(&ContentSuggestion::url, GURL("http://dummy.com/1")),
               Property(&ContentSuggestion::url, GURL("http://dummy.com/2")))));
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(2, yesterday));
+  task_runner()->RunUntilIdle();
 
   offline_pages[1].last_access_time =
       offline_pages[0].last_access_time + base::TimeDelta::FromHours(1);
@@ -217,6 +220,7 @@
               Property(&ContentSuggestion::url, GURL("http://dummy.com/1")),
               Property(&ContentSuggestion::url, GURL("http://dummy.com/2")))));
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(3, tomorrow));
+  task_runner()->RunUntilIdle();
 }
 
 TEST_F(RecentTabSuggestionsProviderTest, ShouldDeliverCorrectCategoryInfo) {
@@ -233,6 +237,7 @@
   for (OfflinePageItem& recent_tab : recent_tabs_list) {
     AddTabAndOfflinePageToModel(recent_tab);
   }
+  task_runner()->RunUntilIdle();
 
   // Dismiss 2 and 3.
   EXPECT_CALL(*observer(), OnNewSuggestions(_, _, _)).Times(0);
@@ -250,6 +255,7 @@
               Property(&ContentSuggestion::url, GURL("http://dummy.com/4")))));
 
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(4));
+  task_runner()->RunUntilIdle();
   Mock::VerifyAndClearExpectations(observer());
 
   // And appear in the dismissed suggestions.
@@ -257,6 +263,7 @@
   provider()->GetDismissedSuggestionsForDebugging(
       recent_tabs_category(),
       base::Bind(&CaptureDismissedSuggestions, &dismissed_suggestions));
+  task_runner()->RunUntilIdle();
   EXPECT_THAT(
       dismissed_suggestions,
       UnorderedElementsAre(
@@ -265,18 +272,21 @@
 
   // Clear dismissed suggestions.
   provider()->ClearDismissedSuggestionsForDebugging(recent_tabs_category());
+  task_runner()->RunUntilIdle();
 
   // They should be gone from the dismissed suggestions.
   dismissed_suggestions.clear();
   provider()->GetDismissedSuggestionsForDebugging(
       recent_tabs_category(),
       base::Bind(&CaptureDismissedSuggestions, &dismissed_suggestions));
+  task_runner()->RunUntilIdle();
   EXPECT_THAT(dismissed_suggestions, IsEmpty());
 
   // And appear in the reported suggestions for the category again.
   EXPECT_CALL(*observer(),
               OnNewSuggestions(_, recent_tabs_category(), SizeIs(5)));
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(5));
+  task_runner()->RunUntilIdle();
   Mock::VerifyAndClearExpectations(observer());
 }
 
@@ -286,6 +296,7 @@
   std::vector<OfflinePageItem> offline_pages = CreateDummyRecentTabs({1, 2, 3});
   for (OfflinePageItem& recent_tab : offline_pages)
     AddTabAndOfflinePageToModel(recent_tab);
+  task_runner()->RunUntilIdle();
 
   // Invalidation of suggestion 2 should be forwarded.
   EXPECT_CALL(*observer(), OnSuggestionInvalidated(_, GetDummySuggestionId(2)));
@@ -297,6 +308,7 @@
   std::vector<OfflinePageItem> offline_pages = CreateDummyRecentTabs({1, 2, 3});
   for (OfflinePageItem& recent_tab : offline_pages)
     AddTabAndOfflinePageToModel(recent_tab);
+  task_runner()->RunUntilIdle();
   EXPECT_THAT(ReadDismissedIDsFromPrefs(), IsEmpty());
 
   provider()->DismissSuggestion(GetDummySuggestionId(2));
@@ -311,6 +323,7 @@
   std::vector<OfflinePageItem> offline_pages = CreateDummyRecentTabs({1, 2, 3});
   for (OfflinePageItem& recent_tab : offline_pages)
     AddTabAndOfflinePageToModel(recent_tab);
+  task_runner()->RunUntilIdle();
 
   provider()->DismissSuggestion(GetDummySuggestionId(2));
   provider()->DismissSuggestion(GetDummySuggestionId(3));
@@ -337,6 +350,7 @@
 
   AddTabAndOfflinePageToModel(offline_pages[0]);
   AddTabAndOfflinePageToModel(offline_pages[1]);
+  task_runner()->RunUntilIdle();
   Mock::VerifyAndClearExpectations(observer());
   EXPECT_CALL(*observer(),
               OnNewSuggestions(
@@ -346,6 +360,7 @@
                       Property(&ContentSuggestion::publish_date, tomorrow))));
 
   AddTabAndOfflinePageToModel(offline_pages[2]);
+  task_runner()->RunUntilIdle();
 }
 
 TEST_F(RecentTabSuggestionsProviderTest,
@@ -361,6 +376,7 @@
        ShouldInvalidateSuggestionWhenTabGone) {
   OfflinePageItem first_tab = CreateDummyRecentTab(1);
   AddTabAndOfflinePageToModel(first_tab);
+  task_runner()->RunUntilIdle();
   Mock::VerifyAndClearExpectations(observer());
 
   EXPECT_CALL(*observer(), OnSuggestionInvalidated(_, GetDummySuggestionId(1)))
@@ -391,6 +407,7 @@
       first_tab.client_id));
   OfflinePageItem second_tab = CreateDummyRecentTab(2);
   AddTabAndOfflinePageToModel(second_tab);
+  task_runner()->RunUntilIdle();
 
   Mock::VerifyAndClearExpectations(observer());
 
@@ -410,6 +427,7 @@
               Property(&ContentSuggestion::url, GURL("http://dummy.com/3")))));
 
   AddTabAndOfflinePageToModel(CreateDummyRecentTab(3));
+  task_runner()->RunUntilIdle();
 }
 
 // The following test uses a different fixture that does not automatically pump
diff --git a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java
index 9fee0affd..8517f2c3 100644
--- a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java
+++ b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentAggregatorBridge.java
@@ -6,6 +6,7 @@
 
 import android.os.Handler;
 
+import org.chromium.base.Callback;
 import org.chromium.base.ObserverList;
 import org.chromium.base.annotations.CalledByNative;
 import org.chromium.base.annotations.JNINamespace;
@@ -75,15 +76,15 @@
     }
 
     @Override
-    public OfflineItem getItemById(ContentId id) {
-        if (mNativeOfflineContentAggregatorBridge == 0) return null;
-        return nativeGetItemById(mNativeOfflineContentAggregatorBridge, id.namespace, id.id);
+    public void getItemById(ContentId id, Callback<OfflineItem> callback) {
+        if (mNativeOfflineContentAggregatorBridge == 0) return;
+        nativeGetItemById(mNativeOfflineContentAggregatorBridge, id.namespace, id.id, callback);
     }
 
     @Override
-    public ArrayList<OfflineItem> getAllItems() {
-        if (mNativeOfflineContentAggregatorBridge == 0) return null;
-        return nativeGetAllItems(mNativeOfflineContentAggregatorBridge);
+    public void getAllItems(Callback<ArrayList<OfflineItem>> callback) {
+        if (mNativeOfflineContentAggregatorBridge == 0) return;
+        nativeGetAllItems(mNativeOfflineContentAggregatorBridge, callback);
     }
 
     @Override
@@ -189,10 +190,10 @@
             long nativeOfflineContentAggregatorBridge, String nameSpace, String id);
     private native void nativeResumeDownload(long nativeOfflineContentAggregatorBridge,
             String nameSpace, String id, boolean hasUserGesture);
-    private native OfflineItem nativeGetItemById(
-            long nativeOfflineContentAggregatorBridge, String nameSpace, String id);
-    private native ArrayList<OfflineItem> nativeGetAllItems(
-            long nativeOfflineContentAggregatorBridge);
+    private native void nativeGetItemById(long nativeOfflineContentAggregatorBridge,
+            String nameSpace, String id, Callback<OfflineItem> callback);
+    private native void nativeGetAllItems(
+            long nativeOfflineContentAggregatorBridge, Callback<ArrayList<OfflineItem>> callback);
     private native void nativeGetVisualsForItem(long nativeOfflineContentAggregatorBridge,
             String nameSpace, String id, VisualsCallback callback);
 }
\ No newline at end of file
diff --git a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentProvider.java b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentProvider.java
index f604522..e4d49902 100644
--- a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentProvider.java
+++ b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineContentProvider.java
@@ -4,6 +4,8 @@
 
 package org.chromium.components.offline_items_collection;
 
+import org.chromium.base.Callback;
+
 import java.util.ArrayList;
 
 /**
@@ -48,10 +50,10 @@
     void resumeDownload(ContentId id, boolean hasUserGesture);
 
     /** See OfflineContentProvider::GetItemById(...). */
-    OfflineItem getItemById(ContentId id);
+    void getItemById(ContentId id, Callback<OfflineItem> callback);
 
     /** See OfflineContentProvider::GetAllItems(). */
-    ArrayList<OfflineItem> getAllItems();
+    void getAllItems(Callback<ArrayList<OfflineItem>> callback);
 
     /** See OfflineContentProvider::GetVisualsForItem(...). */
     void getVisualsForItem(ContentId id, VisualsCallback callback);
diff --git a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.cc b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.cc
index a240e29..8f50f18e 100644
--- a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.cc
+++ b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.cc
@@ -4,6 +4,7 @@
 
 #include "components/offline_items_collection/core/android/offline_content_aggregator_bridge.h"
 
+#include "base/android/callback_android.h"
 #include "base/android/jni_string.h"
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
@@ -44,6 +45,22 @@
       OfflineItemVisualsBridge::CreateOfflineItemVisuals(env, visuals));
 }
 
+void RunGetAllItemsCallback(const base::android::JavaRef<jobject>& j_callback,
+                            const std::vector<OfflineItem>& items) {
+  JNIEnv* env = AttachCurrentThread();
+  RunCallbackAndroid(j_callback,
+                     OfflineItemBridge::CreateOfflineItemList(env, items));
+}
+
+void RunGetItemByIdCallback(const base::android::JavaRef<jobject>& j_callback,
+                            const base::Optional<OfflineItem>& item) {
+  JNIEnv* env = AttachCurrentThread();
+  RunCallbackAndroid(
+      j_callback, item.has_value()
+                      ? OfflineItemBridge::CreateOfflineItem(env, item.value())
+                      : nullptr);
+}
+
 }  // namespace
 
 // static
@@ -134,23 +151,29 @@
                             j_has_user_gesture);
 }
 
-ScopedJavaLocalRef<jobject> OfflineContentAggregatorBridge::GetItemById(
+void OfflineContentAggregatorBridge::GetItemById(
     JNIEnv* env,
     const JavaParamRef<jobject>& jobj,
     const JavaParamRef<jstring>& j_namespace,
-    const JavaParamRef<jstring>& j_id) {
-  const OfflineItem* item =
-      provider_->GetItemById(JNI_OfflineContentAggregatorBridge_CreateContentId(
-          env, j_namespace, j_id));
-
-  return OfflineItemBridge::CreateOfflineItem(env, item);
+    const JavaParamRef<jstring>& j_id,
+    const JavaParamRef<jobject>& jcallback) {
+  OfflineContentProvider::SingleItemCallback callback =
+      base::BindOnce(&RunGetItemByIdCallback,
+                     base::android::ScopedJavaGlobalRef<jobject>(jcallback));
+  provider_->GetItemById(JNI_OfflineContentAggregatorBridge_CreateContentId(
+                             env, j_namespace, j_id),
+                         std::move(callback));
 }
 
-ScopedJavaLocalRef<jobject> OfflineContentAggregatorBridge::GetAllItems(
+void OfflineContentAggregatorBridge::GetAllItems(
     JNIEnv* env,
-    const JavaParamRef<jobject>& jobj) {
-  return OfflineItemBridge::CreateOfflineItemList(env,
-                                                  provider_->GetAllItems());
+    const JavaParamRef<jobject>& jobj,
+    const JavaParamRef<jobject>& jcallback) {
+  OfflineContentProvider::MultipleItemCallback callback =
+      base::BindOnce(&RunGetAllItemsCallback,
+                     base::android::ScopedJavaGlobalRef<jobject>(jcallback));
+
+  provider_->GetAllItems(std::move(callback));
 }
 
 void OfflineContentAggregatorBridge::GetVisualsForItem(
@@ -201,7 +224,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   Java_OfflineContentAggregatorBridge_onItemUpdated(
-      env, java_ref_, OfflineItemBridge::CreateOfflineItem(env, &item));
+      env, java_ref_, OfflineItemBridge::CreateOfflineItem(env, item));
 }
 
 }  // namespace android
diff --git a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h
index 5444009d..f9463b81 100644
--- a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h
+++ b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h
@@ -60,14 +60,14 @@
                       const base::android::JavaParamRef<jstring>& j_namespace,
                       const base::android::JavaParamRef<jstring>& j_id,
                       jboolean j_has_user_gesture);
-  base::android::ScopedJavaLocalRef<jobject> GetItemById(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& jobj,
-      const base::android::JavaParamRef<jstring>& j_namespace,
-      const base::android::JavaParamRef<jstring>& j_id);
-  base::android::ScopedJavaLocalRef<jobject> GetAllItems(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& jobj);
+  void GetItemById(JNIEnv* env,
+                   const base::android::JavaParamRef<jobject>& jobj,
+                   const base::android::JavaParamRef<jstring>& j_namespace,
+                   const base::android::JavaParamRef<jstring>& j_id,
+                   const base::android::JavaParamRef<jobject>& jcallback);
+  void GetAllItems(JNIEnv* env,
+                   const base::android::JavaParamRef<jobject>& jobj,
+                   const base::android::JavaParamRef<jobject>& jcallback);
   void GetVisualsForItem(
       JNIEnv* env,
       const base::android::JavaParamRef<jobject>& jobj,
diff --git a/components/offline_items_collection/core/android/offline_item_bridge.cc b/components/offline_items_collection/core/android/offline_item_bridge.cc
index ed1ff5a..96cf4186 100644
--- a/components/offline_items_collection/core/android/offline_item_bridge.cc
+++ b/components/offline_items_collection/core/android/offline_item_bridge.cc
@@ -50,10 +50,9 @@
 // static
 ScopedJavaLocalRef<jobject> OfflineItemBridge::CreateOfflineItem(
     JNIEnv* env,
-    const OfflineItem* const item) {
-  return item ? JNI_OfflineItemBridge_createOfflineItemAndMaybeAddToList(
-                    env, nullptr, *item)
-              : nullptr;
+    const OfflineItem& item) {
+  return JNI_OfflineItemBridge_createOfflineItemAndMaybeAddToList(env, nullptr,
+                                                                  item);
 }
 
 // static
diff --git a/components/offline_items_collection/core/android/offline_item_bridge.h b/components/offline_items_collection/core/android/offline_item_bridge.h
index 76d1513..beba57f 100644
--- a/components/offline_items_collection/core/android/offline_item_bridge.h
+++ b/components/offline_items_collection/core/android/offline_item_bridge.h
@@ -21,7 +21,7 @@
   // Creates a Java OfflineItem from |item|.
   static base::android::ScopedJavaLocalRef<jobject> CreateOfflineItem(
       JNIEnv* env,
-      const OfflineItem* const item);
+      const OfflineItem& item);
 
   // Creates an Java ArrayList<OfflineItem> from |items|.
   static base::android::ScopedJavaLocalRef<jobject> CreateOfflineItemList(
diff --git a/components/offline_items_collection/core/offline_content_aggregator.cc b/components/offline_items_collection/core/offline_content_aggregator.cc
index 17ff9c5..2e6c1f5 100644
--- a/components/offline_items_collection/core/offline_content_aggregator.cc
+++ b/components/offline_items_collection/core/offline_content_aggregator.cc
@@ -54,6 +54,7 @@
 
   OfflineContentProvider* provider = provider_it->second;
   providers_.erase(provider_it);
+  pending_providers_.erase(provider);
 
   // Only clean up the connection to the provider if the provider isn't
   // associated with any other namespace.
@@ -119,32 +120,69 @@
                         base::Unretained(it->second), id, has_user_gesture));
 }
 
-const OfflineItem* OfflineContentAggregator::GetItemById(const ContentId& id) {
+void OfflineContentAggregator::GetItemById(const ContentId& id,
+                                           SingleItemCallback callback) {
   auto it = providers_.find(id.name_space);
+  if (it == providers_.end() || !it->second->AreItemsAvailable()) {
+    base::ThreadTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, base::BindOnce(std::move(callback), base::nullopt));
+    return;
+  }
 
-  if (it == providers_.end() || !it->second->AreItemsAvailable())
-    return nullptr;
-
-  return it->second->GetItemById(id);
+  it->second->GetItemById(
+      id, base::BindOnce(&OfflineContentAggregator::OnGetItemByIdDone,
+                         weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
 
-OfflineContentProvider::OfflineItemList
-OfflineContentAggregator::GetAllItems() {
-  // Create a set of unique providers to iterate over.
-  std::set<OfflineContentProvider*> providers;
-  for (auto provider_it : providers_)
-    providers.insert(provider_it.second);
+void OfflineContentAggregator::OnGetItemByIdDone(
+    SingleItemCallback callback,
+    const base::Optional<OfflineItem>& item) {
+  std::move(callback).Run(item);
+}
 
-  OfflineItemList items;
-  for (auto* provider : providers) {
+void OfflineContentAggregator::GetAllItems(MultipleItemCallback callback) {
+  // If there is already a call in progress, queue up the callback and wait for
+  // the results.
+  if (!multiple_item_get_callbacks_.empty()) {
+    multiple_item_get_callbacks_.push_back(std::move(callback));
+    return;
+  }
+
+  DCHECK(aggregated_items_.empty());
+  for (auto provider_it : providers_) {
+    auto* provider = provider_it.second;
     if (!provider->AreItemsAvailable())
       continue;
 
-    OfflineItemList provider_items = provider->GetAllItems();
-    items.insert(items.end(), provider_items.begin(), provider_items.end());
+    provider->GetAllItems(
+        base::BindOnce(&OfflineContentAggregator::OnGetAllItemsDone,
+                       weak_ptr_factory_.GetWeakPtr(), provider));
+    pending_providers_.insert(provider);
   }
 
-  return items;
+  if (pending_providers_.empty()) {
+    base::ThreadTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, base::BindOnce(std::move(callback), OfflineItemList()));
+    return;
+  }
+
+  multiple_item_get_callbacks_.push_back(std::move(callback));
+}
+
+void OfflineContentAggregator::OnGetAllItemsDone(
+    OfflineContentProvider* provider,
+    const OfflineItemList& items) {
+  aggregated_items_.insert(aggregated_items_.end(), items.begin(), items.end());
+  pending_providers_.erase(provider);
+  if (!pending_providers_.empty()) {
+    return;
+  }
+
+  auto item_vec = std::move(aggregated_items_);
+  auto callbacks = std::move(multiple_item_get_callbacks_);
+
+  for (auto& callback : callbacks)
+    std::move(callback).Run(item_vec);
 }
 
 void OfflineContentAggregator::GetVisualsForItem(
@@ -187,6 +225,14 @@
   observers_.RemoveObserver(observer);
 }
 
+void OfflineContentAggregator::NotifyItemsAdded(const OfflineItemList& items) {
+  if (items.empty())
+    return;
+
+  for (auto* observer : signaled_observers_)
+    observer->OnItemsAdded(items);
+}
+
 void OfflineContentAggregator::OnItemsAvailable(
     OfflineContentProvider* provider) {
   // Flush any pending actions that should be mirrored to the provider.
@@ -196,11 +242,9 @@
   // initialized.  Just treat this as an OnItemsAdded and notify those observers
   // of the new items.
   if (signaled_observers_.size() > 0) {
-    OfflineItemList items = provider->GetAllItems();
-    if (items.size() > 0) {
-      for (auto* observer : signaled_observers_)
-        observer->OnItemsAdded(items);
-    }
+    provider->GetAllItems(
+        base::BindOnce(&OfflineContentAggregator::NotifyItemsAdded,
+                       weak_ptr_factory_.GetWeakPtr()));
   }
 
   // Check if there were any observers who haven't been told that this class is
diff --git a/components/offline_items_collection/core/offline_content_aggregator.h b/components/offline_items_collection/core/offline_content_aggregator.h
index b66ae04..dce7ffab 100644
--- a/components/offline_items_collection/core/offline_content_aggregator.h
+++ b/components/offline_items_collection/core/offline_content_aggregator.h
@@ -82,8 +82,8 @@
   void CancelDownload(const ContentId& id) override;
   void PauseDownload(const ContentId& id) override;
   void ResumeDownload(const ContentId& id, bool has_user_gesture) override;
-  const OfflineItem* GetItemById(const ContentId& id) override;
-  OfflineItemList GetAllItems() override;
+  void GetItemById(const ContentId& id, SingleItemCallback callback) override;
+  void GetAllItems(MultipleItemCallback callback) override;
   void GetVisualsForItem(const ContentId& id,
                          const VisualsCallback& callback) override;
   void AddObserver(OfflineContentProvider::Observer* observer) override;
@@ -113,6 +113,12 @@
   void RunIfReady(OfflineContentProvider* provider,
                   const base::Closure& action);
 
+  void OnGetAllItemsDone(OfflineContentProvider* provider,
+                         const OfflineItemList& items);
+  void OnGetItemByIdDone(SingleItemCallback callback,
+                         const base::Optional<OfflineItem>& item);
+  void NotifyItemsAdded(const OfflineItemList& items);
+
   // Stores a map of name_space -> OfflineContentProvider.  These
   // OfflineContentProviders are all aggregated by this class and exposed to the
   // consumer as a single list.
@@ -126,6 +132,11 @@
   using PendingActionMap = std::map<OfflineContentProvider*, CallbackList>;
   PendingActionMap pending_actions_;
 
+  // Used by GetAllItems and the corresponding callback.
+  std::vector<MultipleItemCallback> multiple_item_get_callbacks_;
+  OfflineItemList aggregated_items_;
+  std::set<OfflineContentProvider*> pending_providers_;
+
   // A list of all currently registered observers.
   base::ObserverList<OfflineContentProvider::Observer> observers_;
 
diff --git a/components/offline_items_collection/core/offline_content_aggregator_unittest.cc b/components/offline_items_collection/core/offline_content_aggregator_unittest.cc
index a0d9559..152af275 100644
--- a/components/offline_items_collection/core/offline_content_aggregator_unittest.cc
+++ b/components/offline_items_collection/core/offline_content_aggregator_unittest.cc
@@ -70,15 +70,50 @@
 class OfflineContentAggregatorTest : public testing::Test {
  public:
   OfflineContentAggregatorTest()
-      : task_runner_(new base::TestMockTimeTaskRunner), handle_(task_runner_) {}
+      : task_runner_(new base::TestMockTimeTaskRunner),
+        handle_(task_runner_),
+        weak_ptr_factory_(this) {}
   ~OfflineContentAggregatorTest() override {}
 
  protected:
+  MOCK_METHOD1(OnGetAllItemsDone,
+               void(const OfflineContentProvider::OfflineItemList&));
+  MOCK_METHOD1(OnGetItemByIdDone, void(const base::Optional<OfflineItem>&));
+
+  void GetAllItemsAndVerify(
+      OfflineContentProvider* provider,
+      const OfflineContentProvider::OfflineItemList& expected);
+  void GetSingleItemAndVerify(OfflineContentProvider* provider,
+                              const ContentId& id,
+                              const base::Optional<OfflineItem>& expected);
+
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
   base::ThreadTaskRunnerHandle handle_;
   OfflineContentAggregator aggregator_;
+  base::WeakPtrFactory<OfflineContentAggregatorTest> weak_ptr_factory_;
 };
 
+void OfflineContentAggregatorTest::GetAllItemsAndVerify(
+    OfflineContentProvider* provider,
+    const OfflineContentProvider::OfflineItemList& expected) {
+  EXPECT_CALL(*this, OnGetAllItemsDone(expected)).Times(1);
+  provider->GetAllItems(
+      base::BindOnce(&OfflineContentAggregatorTest::OnGetAllItemsDone,
+                     weak_ptr_factory_.GetWeakPtr()));
+  task_runner_->RunUntilIdle();
+}
+
+void OfflineContentAggregatorTest::GetSingleItemAndVerify(
+    OfflineContentProvider* provider,
+    const ContentId& id,
+    const base::Optional<OfflineItem>& expected) {
+  EXPECT_CALL(*this, OnGetItemByIdDone(expected)).Times(1);
+  provider->GetItemById(
+      id, base::BindOnce(&OfflineContentAggregatorTest::OnGetItemByIdDone,
+                         weak_ptr_factory_.GetWeakPtr()));
+  task_runner_->RunUntilIdle();
+}
+
 TEST_F(OfflineContentAggregatorTest, ObserversAddedBeforeProvidersAvailable) {
   ScopedMockOfflineContentProvider provider1("1", &aggregator_);
   ScopedMockOfflineContentProvider provider2("2", &aggregator_);
@@ -145,14 +180,16 @@
     items.push_back(OfflineItem());
 
     ScopedMockOfflineContentProvider provider2("2", &aggregator_);
+    provider2.SetItems(items);
     EXPECT_TRUE(provider2.HasObserver(&aggregator_));
+    GetAllItemsAndVerify(&provider2, items);
 
-    EXPECT_CALL(provider2, GetAllItems()).WillOnce(Return(items));
     EXPECT_CALL(observer1, OnItemsAvailable(&aggregator_)).Times(0);
     EXPECT_CALL(observer2, OnItemsAvailable(&aggregator_)).Times(0);
     EXPECT_CALL(observer1, OnItemsAdded(items)).Times(1);
     EXPECT_CALL(observer2, OnItemsAdded(items)).Times(1);
     provider2.NotifyOnItemsAvailable();
+    task_runner_->RunUntilIdle();
   }
 }
 
@@ -161,6 +198,7 @@
   ScopedMockOfflineContentProvider provider2("2", &aggregator_);
   EXPECT_FALSE(aggregator_.AreItemsAvailable());
 
+  OfflineContentProvider::OfflineItemList empty;
   OfflineContentProvider::OfflineItemList items1;
   items1.push_back(OfflineItem(ContentId("1", "A")));
   items1.push_back(OfflineItem(ContentId("1", "B")));
@@ -169,17 +207,20 @@
   items2.push_back(OfflineItem(ContentId("2", "C")));
   items2.push_back(OfflineItem(ContentId("2", "D")));
 
-  EXPECT_CALL(provider1, GetAllItems()).WillRepeatedly(Return(items1));
-  EXPECT_CALL(provider2, GetAllItems()).WillRepeatedly(Return(items2));
+  provider1.SetItems(items1);
+  provider2.SetItems(items2);
+
+  GetAllItemsAndVerify(&provider1, items1);
+  GetAllItemsAndVerify(&provider2, items2);
+  GetAllItemsAndVerify(&aggregator_, empty);
 
   provider1.NotifyOnItemsAvailable();
-  EXPECT_TRUE(VectorContentsEq(items1, aggregator_.GetAllItems()));
+  GetAllItemsAndVerify(&aggregator_, items1);
 
   OfflineContentProvider::OfflineItemList combined_items(items1);
   combined_items.insert(combined_items.end(), items2.begin(), items2.end());
   provider2.NotifyOnItemsAvailable();
-
-  EXPECT_TRUE(VectorContentsEq(combined_items, aggregator_.GetAllItems()));
+  GetAllItemsAndVerify(&aggregator_, combined_items);
 }
 
 TEST_F(OfflineContentAggregatorTest, QueryingItemFromRemovedProvider) {
@@ -191,11 +232,11 @@
     provider.NotifyOnItemsAvailable();
     EXPECT_TRUE(aggregator_.AreItemsAvailable());
 
-    EXPECT_CALL(provider, GetItemById(id)).WillRepeatedly(Return(&item));
-    EXPECT_EQ(&item, aggregator_.GetItemById(id));
+    provider.SetItems({item});
+    GetSingleItemAndVerify(&aggregator_, id, item);
   }
 
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id));
+  GetSingleItemAndVerify(&aggregator_, id, base::nullopt);
 }
 
 TEST_F(OfflineContentAggregatorTest, QueryingItemWithProviderThatIsntReady) {
@@ -210,22 +251,22 @@
   OfflineItem item1(id1);
   OfflineItem item2(id2);
 
-  EXPECT_CALL(provider1, GetItemById(id1)).WillRepeatedly(Return(&item1));
-  EXPECT_CALL(provider2, GetItemById(id2)).WillRepeatedly(Return(&item2));
+  provider1.SetItems({item1});
+  provider2.SetItems({item2});
 
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id1));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id2));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id3));
+  GetSingleItemAndVerify(&aggregator_, id1, base::nullopt);
+  GetSingleItemAndVerify(&aggregator_, id2, base::nullopt);
+  GetSingleItemAndVerify(&aggregator_, id3, base::nullopt);
 
   provider1.NotifyOnItemsAvailable();
-  EXPECT_EQ(&item1, aggregator_.GetItemById(id1));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id2));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id3));
+  GetSingleItemAndVerify(&aggregator_, id1, item1);
+  GetSingleItemAndVerify(&aggregator_, id2, base::nullopt);
+  GetSingleItemAndVerify(&aggregator_, id3, base::nullopt);
 
   provider2.NotifyOnItemsAvailable();
-  EXPECT_EQ(&item1, aggregator_.GetItemById(id1));
-  EXPECT_EQ(&item2, aggregator_.GetItemById(id2));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id3));
+  GetSingleItemAndVerify(&aggregator_, id1, item1);
+  GetSingleItemAndVerify(&aggregator_, id2, item2);
+  GetSingleItemAndVerify(&aggregator_, id3, base::nullopt);
 }
 
 TEST_F(OfflineContentAggregatorTest, GetItemByIdPropagatesToRightProvider) {
@@ -241,14 +282,12 @@
   OfflineItem item1(id1);
   OfflineItem item2(id2);
 
-  EXPECT_CALL(provider1, GetItemById(id1)).WillRepeatedly(Return(&item1));
-  EXPECT_CALL(provider2, GetItemById(id2)).WillRepeatedly(Return(&item2));
-  EXPECT_CALL(provider1, GetItemById(id3)).WillRepeatedly(Return(nullptr));
-
-  EXPECT_EQ(&item1, aggregator_.GetItemById(id1));
-  EXPECT_EQ(&item2, aggregator_.GetItemById(id2));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id3));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id4));
+  provider1.SetItems({item1});
+  provider2.SetItems({item2});
+  GetSingleItemAndVerify(&aggregator_, id1, item1);
+  GetSingleItemAndVerify(&aggregator_, id2, item2);
+  GetSingleItemAndVerify(&aggregator_, id3, base::nullopt);
+  GetSingleItemAndVerify(&aggregator_, id4, base::nullopt);
 }
 
 TEST_F(OfflineContentAggregatorTest, AreItemsAvailable) {
@@ -452,26 +491,23 @@
   OfflineContentProvider::OfflineItemList items;
   items.push_back(item1);
   items.push_back(item2);
+  provider.SetItems(items);
 
   aggregator_.RegisterProvider("1", &provider);
   aggregator_.RegisterProvider("2", &provider);
   EXPECT_TRUE(provider.HasObserver(&aggregator_));
 
-  EXPECT_CALL(provider, GetAllItems()).WillRepeatedly(Return(items));
-  EXPECT_CALL(provider, GetItemById(id1)).WillRepeatedly(Return(&item1));
-  EXPECT_CALL(provider, GetItemById(id2)).WillRepeatedly(Return(&item2));
-
   EXPECT_CALL(observer, OnItemsAvailable(&aggregator_)).Times(1);
   provider.NotifyOnItemsAvailable();
 
-  EXPECT_TRUE(VectorContentsEq(items, aggregator_.GetAllItems()));
-  EXPECT_EQ(&item1, aggregator_.GetItemById(id1));
-  EXPECT_EQ(&item2, aggregator_.GetItemById(id2));
+  GetAllItemsAndVerify(&aggregator_, items);
+  GetSingleItemAndVerify(&aggregator_, id1, item1);
+  GetSingleItemAndVerify(&aggregator_, id2, item2);
 
   aggregator_.UnregisterProvider("1");
   EXPECT_TRUE(provider.HasObserver(&aggregator_));
-  EXPECT_EQ(nullptr, aggregator_.GetItemById(id1));
-  EXPECT_EQ(&item2, aggregator_.GetItemById(id2));
+  GetSingleItemAndVerify(&aggregator_, id1, base::nullopt);
+  GetSingleItemAndVerify(&aggregator_, id2, item2);
 
   aggregator_.UnregisterProvider("2");
   EXPECT_FALSE(provider.HasObserver(&aggregator_));
diff --git a/components/offline_items_collection/core/offline_content_provider.h b/components/offline_items_collection/core/offline_content_provider.h
index fbaba9f9..848142a5 100644
--- a/components/offline_items_collection/core/offline_content_provider.h
+++ b/components/offline_items_collection/core/offline_content_provider.h
@@ -10,6 +10,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/optional.h"
 #include "url/gurl.h"
 
 namespace offline_items_collection {
@@ -27,6 +28,9 @@
   using OfflineItemList = std::vector<OfflineItem>;
   using VisualsCallback =
       base::Callback<void(const ContentId&, const OfflineItemVisuals*)>;
+  using MultipleItemCallback = base::OnceCallback<void(const OfflineItemList&)>;
+  using SingleItemCallback =
+      base::OnceCallback<void(const base::Optional<OfflineItem>&)>;
 
   // An observer class that should be notified of relevant changes to the
   // underlying data source.
@@ -77,13 +81,16 @@
   // TODO(shaktisahu): Remove |has_user_gesture| if we end up not needing it.
   virtual void ResumeDownload(const ContentId& id, bool has_user_gesture) = 0;
 
-  // Returns an OfflineItem represented by |id| or |nullptr| if none exists.
-  // The caller should not hold ownership of the returned item beyond the scope
-  // of the function call.
-  virtual const OfflineItem* GetItemById(const ContentId& id) = 0;
+  // Requests for an OfflineItem represented by |id|. The implementer should
+  // post any replies even if the result is available immediately to prevent
+  // reentrancy and for consistent behavior.
+  virtual void GetItemById(const ContentId& id,
+                           SingleItemCallback callback) = 0;
 
-  // Returns all OfflineItems for this particular provider.
-  virtual OfflineItemList GetAllItems() = 0;
+  // Requests for all the OfflineItems from this particular provider. The
+  // implementer should post any replies even if the results are available
+  // immediately to prevent reentrancy and for consistent behavior.
+  virtual void GetAllItems(MultipleItemCallback callback) = 0;
 
   // Asks for an OfflineItemVisuals struct for an OfflineItem represented by
   // |id| or |nullptr| if one doesn't exist.  The implementer should post any
diff --git a/components/offline_items_collection/core/test_support/mock_offline_content_provider.cc b/components/offline_items_collection/core/test_support/mock_offline_content_provider.cc
index 748c218..9b0898c 100644
--- a/components/offline_items_collection/core/test_support/mock_offline_content_provider.cc
+++ b/components/offline_items_collection/core/test_support/mock_offline_content_provider.cc
@@ -4,6 +4,9 @@
 
 #include "components/offline_items_collection/core/test_support/mock_offline_content_provider.h"
 
+#include "base/bind.h"
+#include "base/threading/thread_task_runner_handle.h"
+
 namespace offline_items_collection {
 
 MockOfflineContentProvider::MockObserver::MockObserver() = default;
@@ -17,6 +20,10 @@
   return observers_.HasObserver(observer);
 }
 
+void MockOfflineContentProvider::SetItems(const OfflineItemList& items) {
+  items_ = items;
+}
+
 void MockOfflineContentProvider::NotifyOnItemsAvailable() {
   items_available_ = true;
   for (auto& observer : observers_)
@@ -43,6 +50,25 @@
   return items_available_;
 }
 
+void MockOfflineContentProvider::GetAllItems(MultipleItemCallback callback) {
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), items_));
+}
+
+void MockOfflineContentProvider::GetItemById(const ContentId& id,
+                                             SingleItemCallback callback) {
+  base::Optional<OfflineItem> result;
+  for (auto item : items_) {
+    if (item.id == id) {
+      result = item;
+      break;
+    }
+  }
+
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), result));
+}
+
 void MockOfflineContentProvider::AddObserver(Observer* observer) {
   observers_.AddObserver(observer);
 }
diff --git a/components/offline_items_collection/core/test_support/mock_offline_content_provider.h b/components/offline_items_collection/core/test_support/mock_offline_content_provider.h
index 922cc5a..5724c7e 100644
--- a/components/offline_items_collection/core/test_support/mock_offline_content_provider.h
+++ b/components/offline_items_collection/core/test_support/mock_offline_content_provider.h
@@ -31,6 +31,7 @@
   ~MockOfflineContentProvider() override;
 
   bool HasObserver(Observer* observer);
+  void SetItems(const OfflineItemList& items);
   void NotifyOnItemsAvailable();
   void NotifyOnItemsAdded(const OfflineItemList& items);
   void NotifyOnItemRemoved(const ContentId& id);
@@ -43,16 +44,17 @@
   MOCK_METHOD1(CancelDownload, void(const ContentId&));
   MOCK_METHOD1(PauseDownload, void(const ContentId&));
   MOCK_METHOD2(ResumeDownload, void(const ContentId&, bool));
-  MOCK_METHOD1(GetItemById, const OfflineItem*(const ContentId&));
   MOCK_METHOD2(GetVisualsForItem,
                void(const ContentId&, const VisualsCallback&));
-  MOCK_METHOD0(GetAllItems, OfflineItemList());
+  void GetAllItems(MultipleItemCallback callback) override;
+  void GetItemById(const ContentId& id, SingleItemCallback callback) override;
   void AddObserver(Observer* observer) override;
   void RemoveObserver(Observer* observer) override;
 
  private:
   base::ObserverList<Observer> observers_;
   bool items_available_;
+  OfflineItemList items_;
 };
 
 }  // namespace offline_items_collection
diff --git a/components/offline_items_collection/core/throttled_offline_content_provider.cc b/components/offline_items_collection/core/throttled_offline_content_provider.cc
index 0c35682..4fb558d 100644
--- a/components/offline_items_collection/core/throttled_offline_content_provider.cc
+++ b/components/offline_items_collection/core/throttled_offline_content_provider.cc
@@ -68,20 +68,34 @@
   FlushUpdates();
 }
 
-const OfflineItem* ThrottledOfflineContentProvider::GetItemById(
-    const ContentId& id) {
-  const OfflineItem* item = wrapped_provider_->GetItemById(id);
-  if (item)
-    UpdateItemIfPresent(*item);
-  return item;
+void ThrottledOfflineContentProvider::GetItemById(const ContentId& id,
+                                                  SingleItemCallback callback) {
+  wrapped_provider_->GetItemById(
+      id, base::BindOnce(&ThrottledOfflineContentProvider::OnGetItemByIdDone,
+                         weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
 
-OfflineContentProvider::OfflineItemList
-ThrottledOfflineContentProvider::GetAllItems() {
-  OfflineItemList items = wrapped_provider_->GetAllItems();
-  for (auto item : items)
+void ThrottledOfflineContentProvider::GetAllItems(
+    MultipleItemCallback callback) {
+  wrapped_provider_->GetAllItems(
+      base::BindOnce(&ThrottledOfflineContentProvider::OnGetAllItemsDone,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
+}
+
+void ThrottledOfflineContentProvider::OnGetAllItemsDone(
+    MultipleItemCallback callback,
+    const OfflineItemList& items) {
+  for (const auto item : items)
     UpdateItemIfPresent(item);
-  return items;
+  std::move(callback).Run(items);
+}
+
+void ThrottledOfflineContentProvider::OnGetItemByIdDone(
+    SingleItemCallback callback,
+    const base::Optional<OfflineItem>& item) {
+  if (item.has_value())
+    UpdateItemIfPresent(item.value());
+  std::move(callback).Run(item);
 }
 
 void ThrottledOfflineContentProvider::GetVisualsForItem(
diff --git a/components/offline_items_collection/core/throttled_offline_content_provider.h b/components/offline_items_collection/core/throttled_offline_content_provider.h
index 3df43f9d..d21500735 100644
--- a/components/offline_items_collection/core/throttled_offline_content_provider.h
+++ b/components/offline_items_collection/core/throttled_offline_content_provider.h
@@ -45,8 +45,8 @@
   // Because this class queues updates, a call to Observer::OnItemUpdated might
   // get triggered with the same contents as returned by these getter methods in
   // the future.
-  const OfflineItem* GetItemById(const ContentId& id) override;
-  OfflineItemList GetAllItems() override;
+  void GetItemById(const ContentId& id, SingleItemCallback callback) override;
+  void GetAllItems(MultipleItemCallback callback) override;
   void GetVisualsForItem(const ContentId& id,
                          const VisualsCallback& callback) override;
   void AddObserver(OfflineContentProvider::Observer* observer) override;
@@ -63,6 +63,11 @@
   void OnItemRemoved(const ContentId& id) override;
   void OnItemUpdated(const OfflineItem& item) override;
 
+  void OnGetAllItemsDone(MultipleItemCallback callback,
+                         const OfflineItemList& items);
+  void OnGetItemByIdDone(SingleItemCallback callback,
+                         const base::Optional<OfflineItem>& item);
+
   // Used to notify |observer| that the underying OfflineContentProvider has
   // called OfflineContentProvider::Observer::OnItemsAvailable().
   void NotifyItemsAvailable(OfflineContentProvider::Observer* observer);
diff --git a/components/offline_items_collection/core/throttled_offline_content_provider_unittest.cc b/components/offline_items_collection/core/throttled_offline_content_provider_unittest.cc
index e70b2e5..9d4c5fd8 100644
--- a/components/offline_items_collection/core/throttled_offline_content_provider_unittest.cc
+++ b/components/offline_items_collection/core/throttled_offline_content_provider_unittest.cc
@@ -60,9 +60,14 @@
       : task_runner_(new base::TestMockTimeTaskRunner),
         handle_(task_runner_),
         delay_(base::TimeDelta::FromSeconds(1)),
-        provider_(delay_, &wrapped_provider_) {}
+        provider_(delay_, &wrapped_provider_),
+        weak_ptr_factory_(this) {}
   ~ThrottledOfflineContentProviderTest() override {}
 
+  MOCK_METHOD1(OnGetAllItemsDone,
+               void(const OfflineContentProvider::OfflineItemList&));
+  MOCK_METHOD1(OnGetItemByIdDone, void(const base::Optional<OfflineItem>&));
+
  protected:
   base::TimeTicks GetTimeThatWillAllowAnUpdate() {
     return base::TimeTicks::Now() - delay_ -
@@ -75,6 +80,7 @@
   base::TimeDelta delay_;
   MockOfflineContentProvider wrapped_provider_;
   ThrottledOfflineContentProvider provider_;
+  base::WeakPtrFactory<ThrottledOfflineContentProviderTest> weak_ptr_factory_;
 };
 
 TEST_F(ThrottledOfflineContentProviderTest, TestReadyBeforeObserver) {
@@ -116,8 +122,7 @@
   EXPECT_CALL(wrapped_provider_, PauseDownload(id));
   EXPECT_CALL(wrapped_provider_, ResumeDownload(id, true));
   EXPECT_CALL(wrapped_provider_, GetVisualsForItem(id, _));
-  EXPECT_CALL(wrapped_provider_, GetItemById(id)).WillRepeatedly(Return(&item));
-  EXPECT_CALL(wrapped_provider_, GetAllItems()).WillRepeatedly(Return(items));
+  wrapped_provider_.SetItems(items);
   wrapped_provider_.NotifyOnItemsAvailable();
   provider_.OpenItem(id);
   provider_.RemoveItem(id);
@@ -125,8 +130,18 @@
   provider_.PauseDownload(id);
   provider_.ResumeDownload(id, true);
   provider_.GetVisualsForItem(id, OfflineContentProvider::VisualsCallback());
-  EXPECT_EQ(&item, provider_.GetItemById(id));
-  EXPECT_EQ(items, provider_.GetAllItems());
+
+  EXPECT_CALL(*this, OnGetAllItemsDone(items)).Times(1);
+  provider_.GetAllItems(
+      base::BindOnce(&ThrottledOfflineContentProviderTest::OnGetAllItemsDone,
+                     weak_ptr_factory_.GetWeakPtr()));
+
+  EXPECT_CALL(*this, OnGetItemByIdDone(base::make_optional(item))).Times(1);
+  provider_.GetItemById(
+      id,
+      base::BindOnce(&ThrottledOfflineContentProviderTest::OnGetItemByIdDone,
+                     weak_ptr_factory_.GetWeakPtr()));
+  task_runner_->RunUntilIdle();
 }
 
 TEST_F(ThrottledOfflineContentProviderTest, TestRemoveCancelsUpdate) {
@@ -186,9 +201,10 @@
   OfflineItem updated_item1(id1);
   updated_item1.title = "updated1";
 
+  std::vector<OfflineItem> items = {item1, item2};
+  wrapped_provider_.SetItems(items);
+
   EXPECT_CALL(observer, OnItemsAvailable(&provider_)).Times(1);
-  EXPECT_CALL(wrapped_provider_, GetItemById(id1))
-      .WillRepeatedly(Return(&updated_item1));
   EXPECT_CALL(observer, OnItemUpdated(updated_item1)).Times(1);
   EXPECT_CALL(observer, OnItemUpdated(item2)).Times(1);
 
@@ -197,7 +213,14 @@
   wrapped_provider_.NotifyOnItemUpdated(item1);
   wrapped_provider_.NotifyOnItemUpdated(item2);
 
-  EXPECT_EQ(&updated_item1, provider_.GetItemById(id1));
+  items = {updated_item1, item2};
+  wrapped_provider_.SetItems(items);
+
+  auto single_item_callback = [](const base::Optional<OfflineItem>& item) {};
+  provider_.GetItemById(id1, base::BindOnce(single_item_callback));
+
+  provider_.set_last_update_time(GetTimeThatWillAllowAnUpdate());
+  wrapped_provider_.NotifyOnItemUpdated(item2);
 
   task_runner_->FastForwardUntilNoTasksRemain();
 }
@@ -219,16 +242,17 @@
   items.push_back(item2);
 
   EXPECT_CALL(observer, OnItemsAvailable(&provider_)).Times(1);
-  EXPECT_CALL(wrapped_provider_, GetAllItems()).WillRepeatedly(Return(items));
   EXPECT_CALL(observer, OnItemUpdated(updated_item1)).Times(1);
   EXPECT_CALL(observer, OnItemUpdated(item2)).Times(1);
 
+  wrapped_provider_.SetItems(items);
   wrapped_provider_.NotifyOnItemsAvailable();
   provider_.set_last_update_time(base::TimeTicks::Now());
   wrapped_provider_.NotifyOnItemUpdated(item1);
   wrapped_provider_.NotifyOnItemUpdated(item2);
 
-  EXPECT_EQ(items, provider_.GetAllItems());
+  auto callback = [](const OfflineContentProvider::OfflineItemList& items) {};
+  provider_.GetAllItems(base::BindOnce(callback));
 
   task_runner_->FastForwardUntilNoTasksRemain();
 }
diff --git a/components/offline_pages/core/downloads/download_ui_adapter.cc b/components/offline_pages/core/downloads/download_ui_adapter.cc
index 6a76eed..9418a42 100644
--- a/components/offline_pages/core/downloads/download_ui_adapter.cc
+++ b/components/offline_pages/core/downloads/download_ui_adapter.cc
@@ -245,23 +245,31 @@
   }
 }
 
-std::vector<OfflineItem> DownloadUIAdapter::GetAllItems() {
-  std::vector<OfflineItem> result;
+void DownloadUIAdapter::GetAllItems(
+    OfflineContentProvider::MultipleItemCallback callback) {
+  std::vector<OfflineItem> items;
   for (const auto& item : items_) {
     if (delegate_->IsTemporarilyHiddenInUI(item.second->client_id))
       continue;
-    result.push_back(*(item.second->ui_item));
+    items.push_back(*(item.second->ui_item));
   }
-  return result;
+
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), items));
 }
 
-const OfflineItem* DownloadUIAdapter::GetItemById(const ContentId& id) {
+void DownloadUIAdapter::GetItemById(
+    const ContentId& id,
+    OfflineContentProvider::SingleItemCallback callback) {
+  base::Optional<OfflineItem> offline_item;
   OfflineItems::const_iterator it = items_.find(id.id);
-  if (it == items_.end() ||
-      delegate_->IsTemporarilyHiddenInUI(it->second->client_id)) {
-    return nullptr;
+  if (it != items_.end() && it->second->ui_item &&
+      !delegate_->IsTemporarilyHiddenInUI(it->second->client_id)) {
+    offline_item = *it->second->ui_item.get();
   }
-  return it->second->ui_item.get();
+
+  base::ThreadTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE, base::BindOnce(std::move(callback), offline_item));
 }
 
 bool DownloadUIAdapter::AreItemsAvailable() {
@@ -269,7 +277,11 @@
 }
 
 void DownloadUIAdapter::OpenItem(const ContentId& id) {
-  const OfflineItem* item = GetItemById(id);
+  OfflineItems::const_iterator it = items_.find(id.id);
+  if (it == items_.end())
+    return;
+
+  const OfflineItem* item = it->second->ui_item.get();
   if (!item)
     return;
 
diff --git a/components/offline_pages/core/downloads/download_ui_adapter.h b/components/offline_pages/core/downloads/download_ui_adapter.h
index c6d3777..657c150 100644
--- a/components/offline_pages/core/downloads/download_ui_adapter.h
+++ b/components/offline_pages/core/downloads/download_ui_adapter.h
@@ -84,8 +84,11 @@
   void CancelDownload(const ContentId& id) override;
   void PauseDownload(const ContentId& id) override;
   void ResumeDownload(const ContentId& id, bool has_user_gesture) override;
-  const OfflineItem* GetItemById(const ContentId& id) override;
-  std::vector<OfflineItem> GetAllItems() override;
+  void GetItemById(
+      const ContentId& id,
+      OfflineContentProvider::SingleItemCallback callback) override;
+  void GetAllItems(
+      OfflineContentProvider::MultipleItemCallback callback) override;
   void GetVisualsForItem(const ContentId& id,
                          const VisualsCallback& callback) override{};
   void AddObserver(OfflineContentProvider::Observer* observer) override;
diff --git a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
index 06d3aae..7de8794 100644
--- a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
+++ b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
@@ -52,6 +52,22 @@
 static const int kFileSize = 1000;
 static const base::Time kTestCreationTime = base::Time::Now();
 static const base::string16 kTestTitle = base::ASCIIToUTF16("test title");
+
+void GetItemAndVerify(const base::Optional<OfflineItem>& expected,
+                      const base::Optional<OfflineItem>& actual) {
+  EXPECT_EQ(expected.has_value(), actual.has_value());
+  if (!expected.has_value() || !actual.has_value())
+    return;
+
+  EXPECT_EQ(expected.value().id, actual.value().id);
+  EXPECT_EQ(expected.value().state, actual.value().state);
+}
+
+void GetAllItemsAndVerify(size_t expected_size,
+                          const std::vector<OfflineItem>& actual) {
+  EXPECT_EQ(expected_size, actual.size());
+}
+
 }  // namespace
 
 // Mock DownloadUIAdapter::Delegate
@@ -256,9 +272,10 @@
   EXPECT_FALSE(items_loaded);
   PumpLoop();
   EXPECT_TRUE(items_loaded);
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
-  EXPECT_NE(nullptr, item);
+  OfflineItem item(kTestContentId1);
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, InitialItemConversion) {
@@ -266,16 +283,20 @@
   EXPECT_EQ(1UL, model->pages.size());
   EXPECT_EQ(kTestGuid1, model->pages[kTestOfflineId1].client_id.id);
   PumpLoop();
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
-  EXPECT_EQ(kTestGuid1, item->id.id);
-  EXPECT_EQ(kTestUrl, item->page_url.spec());
-  EXPECT_EQ(OfflineItemState::COMPLETE, item->state);
-  EXPECT_EQ(0, item->received_bytes);
-  EXPECT_EQ(kTestFilePath, item->file_path);
-  EXPECT_EQ(kTestCreationTime, item->creation_time);
-  EXPECT_EQ(kFileSize, item->total_size_bytes);
-  EXPECT_EQ(kTestTitle, base::ASCIIToUTF16(item->title));
+
+  auto callback = [](const base::Optional<OfflineItem>& item) {
+    EXPECT_EQ(kTestGuid1, item.value().id.id);
+    EXPECT_EQ(kTestUrl, item.value().page_url.spec());
+    EXPECT_EQ(OfflineItemState::COMPLETE, item.value().state);
+    EXPECT_EQ(0, item.value().received_bytes);
+    EXPECT_EQ(kTestFilePath, item.value().file_path);
+    EXPECT_EQ(kTestCreationTime, item.value().creation_time);
+    EXPECT_EQ(kFileSize, item.value().total_size_bytes);
+    EXPECT_EQ(kTestTitle, base::ASCIIToUTF16(item.value().title));
+  };
+
+  adapter->GetItemById(kTestContentId1, base::BindOnce(callback));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, ItemDeletedAdded) {
@@ -316,9 +337,11 @@
   model->AddInitialPage();
   PumpLoop();
   // Initial Item should be invisible in the collection now.
-  EXPECT_EQ(nullptr,
-            adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1)));
-  EXPECT_EQ(0UL, adapter->GetAllItems().size());
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, base::nullopt));
+  adapter->GetAllItems(base::BindOnce(&GetAllItemsAndVerify, 0UL));
+  PumpLoop();
+
   EXPECT_EQ(0UL, added_guids.size());
   EXPECT_EQ(0UL, deleted_guids.size());
 
@@ -331,9 +354,11 @@
   EXPECT_EQ(1UL, added_guids.size());
   EXPECT_EQ(0UL, deleted_guids.size());
   // Also the item should be visible in the collection of items now.
-  EXPECT_NE(nullptr,
-            adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1)));
-  EXPECT_EQ(1UL, adapter->GetAllItems().size());
+  OfflineItem item(kTestContentId1);
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  adapter->GetAllItems(base::BindOnce(&GetAllItemsAndVerify, 1UL));
+  PumpLoop();
 
   // Switch visibility back to hidden
   adapter_delegate->is_temporarily_hidden = true;
@@ -342,9 +367,10 @@
   EXPECT_EQ(1UL, added_guids.size());
   EXPECT_EQ(1UL, deleted_guids.size());
   // Also the item should be visible in the collection of items now.
-  EXPECT_EQ(nullptr,
-            adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1)));
-  EXPECT_EQ(0UL, adapter->GetAllItems().size());
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, base::nullopt));
+  adapter->GetAllItems(base::BindOnce(&GetAllItemsAndVerify, 0UL));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, ItemAdded) {
@@ -384,9 +410,11 @@
   AddRequest(GURL(kTestUrl), kTestClientId1);
   PumpLoop();
   EXPECT_TRUE(items_loaded);
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
-  EXPECT_NE(nullptr, item);
+  OfflineItem item(kTestContentId1);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, AddRequest) {
@@ -397,10 +425,11 @@
   PumpLoop();
   EXPECT_EQ(1UL, added_guids.size());
   EXPECT_EQ(kTestClientId1.id, added_guids[0]);
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
-  EXPECT_NE(nullptr, item);
-  EXPECT_EQ(OfflineItemState::IN_PROGRESS, item->state);
+  OfflineItem item(kTestContentId1);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, RemoveRequest) {
@@ -408,8 +437,10 @@
   PumpLoop();
   // No added requests, the initial one is loaded.
   EXPECT_EQ(0UL, added_guids.size());
-  EXPECT_NE(nullptr,
-            adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1)));
+  OfflineItem item(kTestContentId1);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
   EXPECT_EQ(0UL, deleted_guids.size());
 
   std::vector<int64_t> requests_to_remove = {id};
@@ -427,8 +458,9 @@
   EXPECT_EQ(0UL, added_guids.size());
   EXPECT_EQ(1UL, deleted_guids.size());
   EXPECT_EQ(kTestClientId1.id, deleted_guids[0]);
-  EXPECT_EQ(nullptr,
-            adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1)));
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, base::nullopt));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, PauseAndResume) {
@@ -439,8 +471,10 @@
   PumpLoop();
 
   size_t num_updates = updated_guids.size();
-  const OfflineItem* item = adapter->GetItemById(kTestContentId1);
-  EXPECT_EQ(OfflineItemState::IN_PROGRESS, item->state);
+  OfflineItem item(kTestContentId1);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
 
   // Pause the download. It should fire OnChanged and the item should move to
   // PAUSED.
@@ -449,8 +483,9 @@
 
   EXPECT_GE(updated_guids.size(), num_updates);
   num_updates = updated_guids.size();
-  item = adapter->GetItemById(kTestContentId1);
-  EXPECT_EQ(OfflineItemState::PAUSED, item->state);
+  item.state = OfflineItemState::PAUSED;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
 
   // Resume the download. It should fire OnChanged again and move the item to
   // IN_PROGRESS.
@@ -458,16 +493,20 @@
   PumpLoop();
 
   EXPECT_GE(updated_guids.size(), num_updates);
-  item = adapter->GetItemById(kTestContentId1);
-  EXPECT_EQ(OfflineItemState::IN_PROGRESS, item->state);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, OnChangedReceivedAfterPageAdded) {
   AddRequest(GURL(kTestUrl), kTestClientId1);
   PumpLoop();
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
-  EXPECT_EQ(OfflineItemState::IN_PROGRESS, item->state);
+  OfflineItem item(kTestContentId1);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 
   // Add a new saved page with the same client id.
   // This simulates what happens when the request is completed.
@@ -477,16 +516,19 @@
   model->AddPageAndNotifyAdapter(page);
   PumpLoop();
 
-  item = adapter->GetItemById(kTestContentId1);
-  EXPECT_EQ(OfflineItemState::COMPLETE, item->state);
+  item.state = OfflineItemState::COMPLETE;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
 
   // Pause the request. It should fire OnChanged, but should not have any effect
   // as the item is already COMPLETE.
   adapter->PauseDownload(kTestContentId1);
   PumpLoop();
 
-  item = adapter->GetItemById(kTestContentId1);
-  EXPECT_EQ(OfflineItemState::COMPLETE, item->state);
+  item.state = OfflineItemState::COMPLETE;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, RequestBecomesPage) {
@@ -495,12 +537,16 @@
   AddRequest(GURL(kTestUrl), kTestClientId1);
   PumpLoop();
 
-  const OfflineItem* item = adapter->GetItemById(kTestContentId1);
-  EXPECT_NE(nullptr, item);
+  OfflineItem item(kTestContentId1);
+
   // The item is still IN_PROGRESS, since we did not delete it when
   // request is competed successfully, waiting for the page with the
   // same client_id to come in.
-  EXPECT_EQ(OfflineItemState::IN_PROGRESS, item->state);
+  item.state = OfflineItemState::IN_PROGRESS;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
+
   // Add a new saved page with the same client id.
   // This simulates what happens when the request is completed.
   // It should not fire and OnAdded or OnDeleted, just OnUpdated.
@@ -516,10 +562,11 @@
 
   EXPECT_GE(updated_guids.size(), 1UL);
   std::string last_updated_guid = updated_guids[updated_guids.size() - 1];
-  item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, last_updated_guid));
-  EXPECT_NE(nullptr, item);
-  EXPECT_EQ(OfflineItemState::COMPLETE, item->state);
+  item.id = ContentId(kOfflinePageNamespace, last_updated_guid);
+  item.state = OfflineItemState::COMPLETE;
+  adapter->GetItemById(kTestContentId1,
+                       base::BindOnce(&GetItemAndVerify, item));
+  PumpLoop();
 }
 
 TEST_F(DownloadUIAdapterTest, RemoveObserversWhenClearingCache) {
@@ -543,15 +590,17 @@
   AddRequest(GURL(kTestUrl), kTestClientId1);
   PumpLoop();
 
-  const OfflineItem* item =
-      adapter->GetItemById(ContentId(kOfflinePageNamespace, kTestGuid1));
+  auto callback = [](const base::Optional<OfflineItem>& item) {
+    ASSERT_TRUE(item.has_value());
+    EXPECT_GT(item.value().received_bytes, 0LL);
+  };
+  adapter->GetItemById(kTestContentId1, base::BindOnce(callback));
 
-  ASSERT_NE(nullptr, item);
-  EXPECT_GT(item->received_bytes, 0LL);
   // Updated 2 times - with progress and to 'completed'.
   EXPECT_EQ(2UL, updated_guids.size());
   EXPECT_EQ(kTestGuid1, updated_guids[0]);
   EXPECT_EQ(kTestGuid1, updated_guids[1]);
+  PumpLoop();
 }
 
 }  // namespace offline_pages
diff --git a/components/security_interstitials/core/BUILD.gn b/components/security_interstitials/core/BUILD.gn
index f1a6a910..83e09b3 100644
--- a/components/security_interstitials/core/BUILD.gn
+++ b/components/security_interstitials/core/BUILD.gn
@@ -49,4 +49,8 @@
     "//net",
     "//ui/base",
   ]
+
+  public_deps = [
+    "//components/security_interstitials/core/common/interfaces:interfaces",
+  ]
 }
diff --git a/components/security_interstitials/core/common/interfaces/BUILD.gn b/components/security_interstitials/core/common/interfaces/BUILD.gn
new file mode 100644
index 0000000..7e7dfd7
--- /dev/null
+++ b/components/security_interstitials/core/common/interfaces/BUILD.gn
@@ -0,0 +1,11 @@
+# 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("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("interfaces") {
+  sources = [
+    "interstitial_commands.mojom",
+  ]
+}
diff --git a/components/security_interstitials/core/common/interfaces/OWNERS b/components/security_interstitials/core/common/interfaces/OWNERS
new file mode 100644
index 0000000..08850f4
--- /dev/null
+++ b/components/security_interstitials/core/common/interfaces/OWNERS
@@ -0,0 +1,2 @@
+per-file *.mojom=set noparent
+per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/components/security_interstitials/core/common/interfaces/interstitial_commands.mojom b/components/security_interstitials/core/common/interfaces/interstitial_commands.mojom
new file mode 100644
index 0000000..01bbd82
--- /dev/null
+++ b/components/security_interstitials/core/common/interfaces/interstitial_commands.mojom
@@ -0,0 +1,22 @@
+
+// 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.
+
+module security_interstitials.mojom;
+
+interface InterstitialCommands {
+  DontProceed();
+  Proceed();
+  ShowMoreSection();
+  OpenHelpCenter();
+  OpenDiagnostic();
+  Reload();
+  OpenDateSettings();
+  OpenLogin();
+  DoReport();
+  DontReport();
+  OpenReportingPrivacy();
+  OpenWhitepaper();
+  ReportPhishingError();
+};
\ No newline at end of file
diff --git a/components/spellcheck/browser/pref_names.cc b/components/spellcheck/browser/pref_names.cc
index a6baa15e..9e57760 100644
--- a/components/spellcheck/browser/pref_names.cc
+++ b/components/spellcheck/browser/pref_names.cc
@@ -8,7 +8,7 @@
 namespace prefs {
 
 // Boolean pref to define the default values for using spellchecker.
-const char kEnableSpellcheck[] = "browser.enable_spellchecking";
+const char kSpellCheckEnable[] = "browser.enable_spellchecking";
 
 // String which represents the dictionary name for our spell-checker.
 // This is an old preference that is being migrated to kSpellCheckDictionaries.
diff --git a/components/spellcheck/browser/pref_names.h b/components/spellcheck/browser/pref_names.h
index ba2f422..4030a0b 100644
--- a/components/spellcheck/browser/pref_names.h
+++ b/components/spellcheck/browser/pref_names.h
@@ -8,7 +8,7 @@
 namespace spellcheck {
 namespace prefs {
 
-extern const char kEnableSpellcheck[];
+extern const char kSpellCheckEnable[];
 extern const char kSpellCheckDictionaries[];
 extern const char kSpellCheckForcedDictionaries[];
 extern const char kSpellCheckDictionary[];
diff --git a/components/spellcheck/browser/spelling_service_client.cc b/components/spellcheck/browser/spelling_service_client.cc
index 0556741..bd52b5c 100644
--- a/components/spellcheck/browser/spelling_service_client.cc
+++ b/components/spellcheck/browser/spelling_service_client.cc
@@ -160,7 +160,7 @@
   // If prefs don't allow spellchecking, if the context is off the record, or if
   // multilingual spellchecking is enabled the spelling service should be
   // unavailable.
-  if (!pref->GetBoolean(spellcheck::prefs::kEnableSpellcheck) ||
+  if (!pref->GetBoolean(spellcheck::prefs::kSpellCheckEnable) ||
       !pref->GetBoolean(spellcheck::prefs::kSpellCheckUseSpellingService) ||
       context->IsOffTheRecord())
     return false;
diff --git a/components/spellcheck/renderer/spellcheck.cc b/components/spellcheck/renderer/spellcheck.cc
index fd39928..03c25d5 100644
--- a/components/spellcheck/renderer/spellcheck.cc
+++ b/components/spellcheck/renderer/spellcheck.cc
@@ -58,9 +58,6 @@
 };
 
 bool UpdateSpellcheckEnabled::Visit(content::RenderFrame* render_frame) {
-  SpellCheckProvider* provider = SpellCheckProvider::Get(render_frame);
-  DCHECK(provider);
-  provider->EnableSpellcheck(enabled_);
   if (!enabled_) {
     if (render_frame && render_frame->GetWebFrame())
       render_frame->GetWebFrame()->RemoveSpellingMarkers();
diff --git a/components/spellcheck/renderer/spellcheck_provider.cc b/components/spellcheck/renderer/spellcheck_provider.cc
index 50ebd97..805ca007 100644
--- a/components/spellcheck/renderer/spellcheck_provider.cc
+++ b/components/spellcheck/renderer/spellcheck_provider.cc
@@ -250,11 +250,6 @@
 }
 #endif
 
-void SpellCheckProvider::EnableSpellcheck(bool enable) {
-  WebLocalFrame* frame = render_frame()->GetWebFrame();
-  frame->EnableSpellChecking(enable);
-}
-
 bool SpellCheckProvider::SatisfyRequestFromCache(
     const base::string16& text,
     WebTextCheckingCompletion* completion) {
diff --git a/components/spellcheck/renderer/spellcheck_provider.h b/components/spellcheck/renderer/spellcheck_provider.h
index 17ce3fb..8a4260e 100644
--- a/components/spellcheck/renderer/spellcheck_provider.h
+++ b/components/spellcheck/renderer/spellcheck_provider.h
@@ -58,9 +58,6 @@
   // Replace shared spellcheck data.
   void set_spellcheck(SpellCheck* spellcheck) { spellcheck_ = spellcheck; }
 
-  // Enables document-wide spellchecking.
-  void EnableSpellcheck(bool enabled);
-
   // content::RenderFrameObserver:
   bool OnMessageReceived(const IPC::Message& message) override;
   void FocusedNodeChanged(const blink::WebNode& node) override;
diff --git a/components/sync/driver/generic_change_processor.cc b/components/sync/driver/generic_change_processor.cc
index d94410aa..6fda063f 100644
--- a/components/sync/driver/generic_change_processor.cc
+++ b/components/sync/driver/generic_change_processor.cc
@@ -445,10 +445,8 @@
     if (change.change_type() == SyncChange::ACTION_DELETE) {
       SyncError error =
           AttemptDelete(change, type_, type_str, &sync_node, error_handler());
-      if (error.IsSet()) {
-        NOTREACHED();
+      if (error.IsSet())
         return error;
-      }
       if (merge_result_.get()) {
         merge_result_->set_num_items_deleted(
             merge_result_->num_items_deleted() + 1);
diff --git a/components/ukm/content/source_url_recorder.cc b/components/ukm/content/source_url_recorder.cc
index 6fb2c248..2e683b1 100644
--- a/components/ukm/content/source_url_recorder.cc
+++ b/components/ukm/content/source_url_recorder.cc
@@ -19,7 +19,7 @@
 namespace {
 
 // SourceUrlRecorderWebContentsObserver is responsible for recording UKM source
-// URLs, for all main frame navigations in a given WebContents.
+// URLs, for all (any only) main frame navigations in a given WebContents.
 // SourceUrlRecorderWebContentsObserver records both the final URL for a
 // navigation, and, if the navigation was redirected, the initial URL as well.
 class SourceUrlRecorderWebContentsObserver
@@ -112,6 +112,9 @@
 void SourceUrlRecorderWebContentsObserver::MaybeRecordUrl(
     content::NavigationHandle* navigation_handle,
     const GURL& initial_url) {
+  DCHECK(navigation_handle->IsInMainFrame());
+  DCHECK(!navigation_handle->IsSameDocument());
+
   ukm::UkmRecorder* ukm_recorder = ukm::UkmRecorder::Get();
   if (!ukm_recorder)
     return;
diff --git a/components/ukm/ukm_recorder_impl.cc b/components/ukm/ukm_recorder_impl.cc
index 8f0ba3c..8cfdb8f 100644
--- a/components/ukm/ukm_recorder_impl.cc
+++ b/components/ukm/ukm_recorder_impl.cc
@@ -239,10 +239,7 @@
     RecordDroppedSource(DroppedDataReason::MAX_HIT);
     return;
   }
-  std::unique_ptr<UkmSource> source = base::MakeUnique<UkmSource>();
-  source->set_id(source_id);
-  source->set_url(url);
-  sources_.insert(std::make_pair(source_id, std::move(source)));
+  sources_.emplace(source_id, base::MakeUnique<UkmSource>(source_id, url));
 }
 
 void UkmRecorderImpl::AddEntry(mojom::UkmEntryPtr entry) {
diff --git a/components/ukm/ukm_source.cc b/components/ukm/ukm_source.cc
index e74e0535..21ee88f0 100644
--- a/components/ukm/ukm_source.cc
+++ b/components/ukm/ukm_source.cc
@@ -39,14 +39,18 @@
   g_custom_tab_state = visible ? kCustomTabTrue : kCustomTabFalse;
 }
 
-UkmSource::UkmSource()
-    : custom_tab_state_(g_custom_tab_state),
-      creation_time_(base::TimeTicks::Now()) {}
+UkmSource::UkmSource(ukm::SourceId id, const GURL& url)
+    : id_(id),
+      url_(url),
+      custom_tab_state_(g_custom_tab_state),
+      creation_time_(base::TimeTicks::Now()) {
+  DCHECK(!url_.is_empty());
+}
 
 UkmSource::~UkmSource() = default;
 
 void UkmSource::UpdateUrl(const GURL& url) {
-  DCHECK(!url_.is_empty());
+  DCHECK(!url.is_empty());
   if (url_ == url)
     return;
   if (initial_url_.is_empty())
diff --git a/components/ukm/ukm_source.h b/components/ukm/ukm_source.h
index e053a1f..d2cb74f2 100644
--- a/components/ukm/ukm_source.h
+++ b/components/ukm/ukm_source.h
@@ -17,7 +17,7 @@
 
 class Source;
 
-// Contains UKM data for a single navigation entry.
+// Contains UKM URL data for a single source id.
 class UkmSource {
  public:
   enum CustomTabState {
@@ -26,11 +26,10 @@
     kCustomTabFalse,
   };
 
-  UkmSource();
+  UkmSource(SourceId id, const GURL& url);
   ~UkmSource();
 
   ukm::SourceId id() const { return id_; }
-  void set_id(ukm::SourceId id) { id_ = id; }
 
   const GURL& initial_url() const { return initial_url_; }
   const GURL& url() const { return url_; }
@@ -39,14 +38,7 @@
   // intended to be anything useful for UKM clients.
   const base::TimeTicks creation_time() const { return creation_time_; }
 
-  // Sets the URL for this source. Should be invoked when a source is
-  // initialized.
-  void set_url(const GURL& url) { url_ = url; }
-
-  // Updates the URL for this source. Must be called after set_url. If a new URL
-  // is passed to UpdateUrl, the initial_url field is populated with the
-  // original URL provided to set_url, and the url field is updated with the
-  // value provided to this method.
+  // Records a new URL for this source.
   void UpdateUrl(const GURL& url);
 
   // Serializes the members of the class into the supplied proto.
@@ -56,13 +48,13 @@
   static void SetCustomTabVisible(bool visible);
 
  private:
-  ukm::SourceId id_;
+  const ukm::SourceId id_;
 
   // The final, canonical URL for this source.
   GURL url_;
 
-  // The initial URL for this source. Only set if different from |url_| (i.e. if
-  // the URL changed over the lifetime of this source).
+  // The initial URL for this source.
+  // Only set if more than one value of URL was recorded.
   GURL initial_url_;
 
   // A flag indicating if metric was collected in a custom tab. This is set
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index 20fdeeb..6defb841 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -75,8 +75,9 @@
 // interpretes it as UserType. It is used in initial users load.
 UserType GetStoredUserType(const base::DictionaryValue* prefs_user_types,
                            const AccountId& account_id) {
-  const base::Value* stored_user_type =
-      prefs_user_types->FindKey(account_id.GetAccountIdKey());
+  const base::Value* stored_user_type = prefs_user_types->FindKey(
+      account_id.HasAccountIdKey() ? account_id.GetAccountIdKey()
+                                   : account_id.GetUserEmail());
   if (!stored_user_type || !stored_user_type->is_int())
     return USER_TYPE_REGULAR;
 
@@ -924,6 +925,8 @@
                         base::UTF8ToUTF16(active_user_->GetAccountName(true)));
     known_user::SetProfileEverInitialized(
         active_user_->GetAccountId(), active_user_->profile_ever_initialized());
+  } else {
+    SaveUserType(active_user_);
   }
 
   AddUserRecord(active_user_);
diff --git a/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc b/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc
index db5a429..6b65636a 100644
--- a/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc
+++ b/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc
@@ -59,10 +59,6 @@
 
   void CloseChannel(int32_t client_id) override {}
 
-  void CreateArcVideoDecodeAcceleratorDeprecated(
-      arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request)
-      override {}
-
   void CreateArcVideoDecodeAccelerator(
       arc::mojom::VideoDecodeAcceleratorRequest vda_request) override {}
 
diff --git a/components/viz/service/display/gl_renderer_unittest.cc b/components/viz/service/display/gl_renderer_unittest.cc
index 9e83e50..547b578 100644
--- a/components/viz/service/display/gl_renderer_unittest.cc
+++ b/components/viz/service/display/gl_renderer_unittest.cc
@@ -2192,7 +2192,7 @@
       cc::FakeResourceProvider::CreateLayerTreeResourceProvider(
           child_context_provider.get(), shared_bitmap_manager.get());
 
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(0x123), 29);
   auto transfer_resource = TransferableResource::MakeGLOverlay(
       gpu::Mailbox::Generate(), GL_LINEAR, GL_TEXTURE_2D, sync_token,
diff --git a/components/viz/service/display/renderer_pixeltest.cc b/components/viz/service/display/renderer_pixeltest.cc
index 3e337256..9acc71b 100644
--- a/components/viz/service/display/renderer_pixeltest.cc
+++ b/components/viz/service/display/renderer_pixeltest.cc
@@ -396,7 +396,7 @@
     case media::PIXEL_FORMAT_I422:
       format = media::PIXEL_FORMAT_YUV422P10;
       break;
-    case media::PIXEL_FORMAT_YV24:
+    case media::PIXEL_FORMAT_I444:
       format = media::PIXEL_FORMAT_YUV444P10;
       break;
 
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
index 3d55c540..1f719ba 100644
--- a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
+++ b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
@@ -48,7 +48,7 @@
 
 gpu::SyncToken GenTestSyncToken(int id) {
   gpu::SyncToken token;
-  token.Set(gpu::CommandBufferNamespace::GPU_IO, 0,
+  token.Set(gpu::CommandBufferNamespace::GPU_IO,
             gpu::CommandBufferId::FromUnsafeValue(id), 1);
   return token;
 }
diff --git a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
index cb2e2b5..c49f902 100644
--- a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
+++ b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc
@@ -22,6 +22,20 @@
 
 namespace viz {
 
+namespace {
+// Returns |raw_size| truncated to positive even-numbered values.
+gfx::Size AdjustSizeForI420(const gfx::Size& raw_size) {
+  gfx::Size result(raw_size.width() & ~1, raw_size.height() & ~1);
+  if (result.width() <= 0) {
+    result.set_width(2);
+  }
+  if (result.height() <= 0) {
+    result.set_height(2);
+  }
+  return result;
+}
+}  // namespace
+
 // static
 constexpr media::VideoPixelFormat
     FrameSinkVideoCapturerImpl::kDefaultPixelFormat;
@@ -260,10 +274,11 @@
 
   // Reserve a buffer from the pool for the next frame.
   const OracleFrameNumber oracle_frame_number = oracle_.next_frame_number();
+  const gfx::Size i420_capture_size = AdjustSizeForI420(oracle_.capture_size());
   scoped_refptr<VideoFrame> frame;
   if (event == VideoCaptureOracle::kPassiveRefreshRequest) {
-    frame = frame_pool_.ResurrectLastVideoFrame(oracle_.capture_size(),
-                                                pixel_format_);
+    frame =
+        frame_pool_.ResurrectLastVideoFrame(i420_capture_size, pixel_format_);
     // If the resurrection failed, promote the passive refresh request to an
     // active refresh request and retry.
     if (!frame) {
@@ -274,8 +289,7 @@
       return;
     }
   } else {
-    frame =
-        frame_pool_.ReserveVideoFrame(oracle_.capture_size(), pixel_format_);
+    frame = frame_pool_.ReserveVideoFrame(i420_capture_size, pixel_format_);
   }
 
   // Compute the current in-flight utilization and attenuate it: The utilization
@@ -391,7 +405,15 @@
   uint8_t* const v = frame->visible_data(VideoFrame::kVPlane) +
                      (content_rect.y() / 2) * v_stride + (content_rect.x() / 2);
   if (result->ReadI420Planes(y, y_stride, u, u_stride, v, v_stride)) {
-    media::LetterboxYUV(frame.get(), content_rect);
+    // The result may be smaller than what was requested, if unforeseen clamping
+    // to the source boundaries occurred by the executor of the
+    // CopyOutputRequest. However, the result should never contain more than
+    // what was requested.
+    DCHECK_LE(result->size().width(), content_rect.width());
+    DCHECK_LE(result->size().height(), content_rect.height());
+    media::LetterboxYUV(
+        frame.get(),
+        gfx::Rect(content_rect.origin(), AdjustSizeForI420(result->size())));
   } else {
     frame = nullptr;
   }
diff --git a/components/viz/service/gl/gpu_service_impl.cc b/components/viz/service/gl/gpu_service_impl.cc
index 7dc98f29..5c31a236 100644
--- a/components/viz/service/gl/gpu_service_impl.cc
+++ b/components/viz/service/gl/gpu_service_impl.cc
@@ -53,7 +53,6 @@
 
 #if defined(OS_CHROMEOS)
 #include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h"
-#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h"
 #include "components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h"
 #include "components/arc/video_accelerator/protected_buffer_manager.h"
 #include "components/arc/video_accelerator/protected_buffer_manager_proxy.h"
@@ -241,20 +240,6 @@
   (*gpu_host_)->RecordLogMessage(severity, header, message);
 }
 
-void GpuServiceImpl::CreateArcVideoDecodeAcceleratorDeprecated(
-    arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
-#if defined(OS_CHROMEOS)
-  DCHECK(io_runner_->BelongsToCurrentThread());
-  main_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&GpuServiceImpl::
-                         CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread,
-                     weak_ptr_, std::move(vda_request)));
-#else
-  NOTREACHED();
-#endif  // defined(OS_CHROMEOS)
-}
-
 void GpuServiceImpl::CreateArcVideoDecodeAccelerator(
     arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
 #if defined(OS_CHROMEOS)
@@ -298,15 +283,6 @@
 }
 
 #if defined(OS_CHROMEOS)
-void GpuServiceImpl::CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread(
-    arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
-  DCHECK(main_runner_->BelongsToCurrentThread());
-  mojo::MakeStrongBinding(
-      std::make_unique<arc::GpuArcVideoDecodeAcceleratorDeprecated>(
-          gpu_preferences_, protected_buffer_manager_.get()),
-      std::move(vda_request));
-}
-
 void GpuServiceImpl::CreateArcVideoDecodeAcceleratorOnMainThread(
     arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
   DCHECK(main_runner_->BelongsToCurrentThread());
diff --git a/components/viz/service/gl/gpu_service_impl.h b/components/viz/service/gl/gpu_service_impl.h
index 27247f3..3e26b06 100644
--- a/components/viz/service/gl/gpu_service_impl.h
+++ b/components/viz/service/gl/gpu_service_impl.h
@@ -140,8 +140,6 @@
                            bool is_gpu_host,
                            EstablishGpuChannelCallback callback) override;
   void CloseChannel(int32_t client_id) override;
-  void CreateArcVideoDecodeAcceleratorDeprecated(
-      arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) override;
   void CreateArcVideoDecodeAccelerator(
       arc::mojom::VideoDecodeAcceleratorRequest vda_request) override;
   void CreateArcVideoEncodeAccelerator(
@@ -179,8 +177,6 @@
   void Stop(StopCallback callback) override;
 
 #if defined(OS_CHROMEOS)
-  void CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread(
-      arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request);
   void CreateArcVideoDecodeAcceleratorOnMainThread(
       arc::mojom::VideoDecodeAcceleratorRequest vda_request);
   void CreateArcVideoEncodeAcceleratorOnMainThread(
diff --git a/components/viz/test/test_frame_sink_manager.cc b/components/viz/test/test_frame_sink_manager.cc
index 0b6afb5..1c31c8e5 100644
--- a/components/viz/test/test_frame_sink_manager.cc
+++ b/components/viz/test/test_frame_sink_manager.cc
@@ -11,8 +11,10 @@
 TestFrameSinkManagerImpl::~TestFrameSinkManagerImpl() {}
 
 void TestFrameSinkManagerImpl::BindRequest(
-    mojom::FrameSinkManagerRequest request) {
+    mojom::FrameSinkManagerRequest request,
+    mojom::FrameSinkManagerClientPtr client) {
   binding_.Bind(std::move(request));
+  client_ = std::move(client);
 }
 
 }  // namespace viz
diff --git a/components/viz/test/test_frame_sink_manager.h b/components/viz/test/test_frame_sink_manager.h
index e66535b..25eb40af 100644
--- a/components/viz/test/test_frame_sink_manager.h
+++ b/components/viz/test/test_frame_sink_manager.h
@@ -16,7 +16,8 @@
   TestFrameSinkManagerImpl();
   ~TestFrameSinkManagerImpl() override;
 
-  void BindRequest(mojom::FrameSinkManagerRequest request);
+  void BindRequest(mojom::FrameSinkManagerRequest request,
+                   mojom::FrameSinkManagerClientPtr client);
 
  private:
   // mojom::FrameSinkManager:
@@ -50,6 +51,7 @@
       mojom::VideoDetectorObserverPtr observer) override {}
 
   mojo::Binding<mojom::FrameSinkManager> binding_;
+  mojom::FrameSinkManagerClientPtr client_;
 
   DISALLOW_COPY_AND_ASSIGN(TestFrameSinkManagerImpl);
 };
diff --git a/components/web_contents_delegate_android/DEPS b/components/web_contents_delegate_android/DEPS
index 01cb852..a022051 100644
--- a/components/web_contents_delegate_android/DEPS
+++ b/components/web_contents_delegate_android/DEPS
@@ -2,6 +2,7 @@
   "+content/public/browser",
   "+content/public/common",
   "+jni",
+  "+third_party/WebKit/common",
   "+ui/android",
   "+ui/base",
   "+ui/gfx"
diff --git a/components/web_contents_delegate_android/color_chooser_android.cc b/components/web_contents_delegate_android/color_chooser_android.cc
index 42b6fe1..8e89372 100644
--- a/components/web_contents_delegate_android/color_chooser_android.cc
+++ b/components/web_contents_delegate_android/color_chooser_android.cc
@@ -20,7 +20,7 @@
 ColorChooserAndroid::ColorChooserAndroid(
     content::WebContents* web_contents,
     SkColor initial_color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
     : web_contents_(web_contents) {
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobjectArray> suggestions_array;
diff --git a/components/web_contents_delegate_android/color_chooser_android.h b/components/web_contents_delegate_android/color_chooser_android.h
index 5432448..03dd7e51 100644
--- a/components/web_contents_delegate_android/color_chooser_android.h
+++ b/components/web_contents_delegate_android/color_chooser_android.h
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "base/strings/string16.h"
 #include "content/public/browser/color_chooser.h"
-#include "content/public/common/color_suggestion.mojom.h"
+#include "third_party/WebKit/common/color_chooser/color_chooser.mojom.h"
 
 using base::android::AttachCurrentThread;
 using base::android::ScopedJavaLocalRef;
@@ -29,7 +29,7 @@
   ColorChooserAndroid(
       content::WebContents* tab,
       SkColor initial_color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions);
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions);
   ~ColorChooserAndroid() override;
 
   void OnColorChosen(JNIEnv* env,
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc
index f601cd2..7d89ab6 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -33,7 +33,6 @@
 using content::RenderWidgetHostView;
 using content::WebContents;
 using content::WebContentsDelegate;
-using content::WebContentsUnresponsiveState;
 
 namespace web_contents_delegate_android {
 
@@ -56,7 +55,7 @@
 ColorChooser* WebContentsDelegateAndroid::OpenColorChooser(
     WebContents* source,
     SkColor color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   return new ColorChooserAndroid(source, color, suggestions);
 }
 
@@ -165,9 +164,7 @@
   Java_WebContentsDelegateAndroid_notifyLoadProgressChanged(env, obj, progress);
 }
 
-void WebContentsDelegateAndroid::RendererUnresponsive(
-    WebContents* source,
-    const WebContentsUnresponsiveState& unresponsive_state) {
+void WebContentsDelegateAndroid::RendererUnresponsive(WebContents* source) {
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
   if (obj.is_null())
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.h b/components/web_contents_delegate_android/web_contents_delegate_android.h
index 99d7a4f..20be760 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.h
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.h
@@ -53,7 +53,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* source,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
       override;
   void NavigationStateChanged(content::WebContents* source,
                               content::InvalidateTypes changed_flags) override;
@@ -63,9 +63,7 @@
                            bool to_different_document) override;
   void LoadProgressChanged(content::WebContents* source,
                            double load_progress) override;
-  void RendererUnresponsive(
-      content::WebContents* source,
-      const content::WebContentsUnresponsiveState& unresponsive_state) override;
+  void RendererUnresponsive(content::WebContents* source) override;
   void RendererResponsive(content::WebContents* source) override;
   void WebContentsCreated(content::WebContents* source_contents,
                           int opener_render_process_id,
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 19d34a9..2bb9ee3c 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -158,6 +158,7 @@
     "//third_party/WebKit/public:resources",
     "//third_party/WebKit/public:scaled_resources",
     "//third_party/angle:angle_common",
+    "//third_party/boringssl",
     "//third_party/brotli:dec",
     "//third_party/icu",
     "//third_party/libyuv",
@@ -977,8 +978,6 @@
     "loader/mojo_async_resource_handler.h",
     "loader/navigation_resource_handler.cc",
     "loader/navigation_resource_handler.h",
-    "loader/navigation_resource_throttle.cc",
-    "loader/navigation_resource_throttle.h",
     "loader/navigation_url_loader.cc",
     "loader/navigation_url_loader.h",
     "loader/navigation_url_loader_delegate.h",
@@ -1155,6 +1154,7 @@
     "net/view_http_cache_job_factory.h",
     "network_service_client.cc",
     "network_service_client.h",
+    "network_service_instance.cc",
     "notification_service_impl.cc",
     "notification_service_impl.h",
     "notifications/blink_notification_service_impl.cc",
@@ -2313,10 +2313,6 @@
     deps += [ "//dbus" ]
   }
 
-  if (is_linux) {
-    deps += [ "//third_party/boringssl" ]
-  }
-
   if (use_ozone) {
     deps += [ "//ui/ozone" ]
   }
diff --git a/content/browser/DEPS b/content/browser/DEPS
index 74781a46..3c69e7d 100644
--- a/content/browser/DEPS
+++ b/content/browser/DEPS
@@ -95,7 +95,6 @@
   "+third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseException.h",
   "+third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h",
   "+third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h",
-  "+third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationError.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationType.h",
diff --git a/content/browser/android/synchronous_compositor_browser_filter.cc b/content/browser/android/synchronous_compositor_browser_filter.cc
index 2faac6f6..6897a6e 100644
--- a/content/browser/android/synchronous_compositor_browser_filter.cc
+++ b/content/browser/android/synchronous_compositor_browser_filter.cc
@@ -14,7 +14,6 @@
 #include "base/stl_util.h"
 #include "content/browser/android/synchronous_compositor_host.h"
 #include "content/browser/bad_message.h"
-#include "content/common/android/sync_compositor_messages.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_process_host.h"
 #include "ui/android/window_android.h"
diff --git a/content/browser/android/synchronous_compositor_browser_filter.h b/content/browser/android/synchronous_compositor_browser_filter.h
index d605d68..51c8208 100644
--- a/content/browser/android/synchronous_compositor_browser_filter.h
+++ b/content/browser/android/synchronous_compositor_browser_filter.h
@@ -12,6 +12,7 @@
 #include "base/macros.h"
 #include "base/synchronization/lock.h"
 #include "components/viz/common/quads/compositor_frame_metadata.h"
+#include "content/common/input/sync_compositor_messages.h"
 #include "content/public/browser/android/synchronous_compositor.h"
 #include "content/public/browser/browser_message_filter.h"
 #include "ui/android/window_android_observer.h"
diff --git a/content/browser/android/synchronous_compositor_host.cc b/content/browser/android/synchronous_compositor_host.cc
index 974571d..b3f08f79 100644
--- a/content/browser/android/synchronous_compositor_host.cc
+++ b/content/browser/android/synchronous_compositor_host.cc
@@ -15,8 +15,8 @@
 #include "content/browser/android/synchronous_compositor_browser_filter.h"
 #include "content/browser/renderer_host/render_widget_host_view_android.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/android/sync_compositor_messages.h"
 #include "content/common/android/sync_compositor_statics.h"
+#include "content/common/input/sync_compositor_messages.h"
 #include "content/public/browser/android/synchronous_compositor_client.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_view_host.h"
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc
index a8b3b10a..1e2eec3 100644
--- a/content/browser/browser_side_navigation_browsertest.cc
+++ b/content/browser/browser_side_navigation_browsertest.cc
@@ -43,12 +43,9 @@
 // If you don't need a custom embedded test server, please use the next class
 // below (BrowserSideNavigationBrowserTest), it will automatically start the
 // default server.
+// TODO(clamy): Rename those NavigationBrowserTests.
 class BrowserSideNavigationBaseBrowserTest : public ContentBrowserTest {
  protected:
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    command_line->AppendSwitch(switches::kEnableBrowserSideNavigation);
-  }
-
   void SetUpOnMainThread() override {
     host_resolver()->AddRule("*", "127.0.0.1");
   }
diff --git a/content/browser/browsing_data/browsing_data_remover_impl.cc b/content/browser/browsing_data/browsing_data_remover_impl.cc
index 3e14f9e0..c9bbd1c5 100644
--- a/content/browser/browsing_data/browsing_data_remover_impl.cc
+++ b/content/browser/browsing_data/browsing_data_remover_impl.cc
@@ -105,7 +105,7 @@
 }
 
 void OnClearedChannelIDsOnIOThread(net::URLRequestContextGetter* rq_context,
-                                   const base::Closure& callback) {
+                                   base::OnceClosure callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   // Need to close open SSL connections which may be using the channel ids we
@@ -115,69 +115,33 @@
   rq_context->GetURLRequestContext()
       ->ssl_config_service()
       ->NotifySSLConfigChange();
-  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
+  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, std::move(callback));
 }
 
 void ClearChannelIDsOnIOThread(
     const base::Callback<bool(const std::string&)>& domain_predicate,
     base::Time delete_begin,
     base::Time delete_end,
-    scoped_refptr<net::URLRequestContextGetter> rq_context,
-    const base::Closure& callback) {
+    scoped_refptr<net::URLRequestContextGetter> request_context,
+    base::OnceClosure callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   net::ChannelIDService* channel_id_service =
-      rq_context->GetURLRequestContext()->channel_id_service();
+      request_context->GetURLRequestContext()->channel_id_service();
   channel_id_service->GetChannelIDStore()->DeleteForDomainsCreatedBetween(
       domain_predicate, delete_begin, delete_end,
       base::Bind(&OnClearedChannelIDsOnIOThread,
-                 base::RetainedRef(std::move(rq_context)), callback));
+                 base::RetainedRef(std::move(request_context)),
+                 base::Passed(std::move(callback))));
 }
 
 }  // namespace
 
-BrowsingDataRemoverImpl::SubTask::SubTask(const base::Closure& forward_callback)
-    : is_pending_(false),
-      forward_callback_(forward_callback),
-      weak_ptr_factory_(this) {
-  DCHECK(!forward_callback_.is_null());
-}
-
-BrowsingDataRemoverImpl::SubTask::~SubTask() {}
-
-void BrowsingDataRemoverImpl::SubTask::Start() {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  DCHECK(!is_pending_);
-  is_pending_ = true;
-}
-
-base::Closure BrowsingDataRemoverImpl::SubTask::GetCompletionCallback() {
-  return base::Bind(&BrowsingDataRemoverImpl::SubTask::CompletionCallback,
-                    weak_ptr_factory_.GetWeakPtr());
-}
-
-void BrowsingDataRemoverImpl::SubTask::CompletionCallback() {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  DCHECK(is_pending_);
-  is_pending_ = false;
-  forward_callback_.Run();
-}
-
 BrowsingDataRemoverImpl::BrowsingDataRemoverImpl(
     BrowserContext* browser_context)
     : browser_context_(browser_context),
       remove_mask_(-1),
       origin_type_mask_(-1),
       is_removing_(false),
-      sub_task_forward_callback_(
-          base::Bind(&BrowsingDataRemoverImpl::NotifyIfDone,
-                     base::Unretained(this))),
-      synchronous_clear_operations_(sub_task_forward_callback_),
-      clear_embedder_data_(sub_task_forward_callback_),
-      clear_cache_(sub_task_forward_callback_),
-      clear_networking_history_(sub_task_forward_callback_),
-      clear_channel_ids_(sub_task_forward_callback_),
-      clear_http_auth_cache_(sub_task_forward_callback_),
-      clear_storage_partition_data_(sub_task_forward_callback_),
       storage_partition_for_testing_(nullptr),
       weak_ptr_factory_(this) {
   DCHECK(browser_context_);
@@ -324,7 +288,8 @@
   // 3. Do not support partial deletion, i.e. only delete your data if
   //    |filter_builder.IsEmptyBlacklist()|. Add a comment explaining why this
   //    is acceptable.
-  synchronous_clear_operations_.Start();
+  base::OnceClosure synchronous_clear_operations(
+      CreatePendingTaskCompletionClosure());
 
   // crbug.com/140910: Many places were calling this with base::Time() as
   // delete_end, even though they should've used base::Time::Max().
@@ -373,16 +338,15 @@
       origin_type_mask_ & ORIGIN_TYPE_UNPROTECTED_WEB) {
     base::RecordAction(UserMetricsAction("ClearBrowsingData_ChannelIDs"));
     // Since we are running on the UI thread don't call GetURLRequestContext().
-    scoped_refptr<net::URLRequestContextGetter> rq_context =
+    scoped_refptr<net::URLRequestContextGetter> request_context =
         BrowserContext::GetDefaultStoragePartition(browser_context_)
             ->GetURLRequestContext();
-    clear_channel_ids_.Start();
     BrowserThread::PostTask(
         BrowserThread::IO, FROM_HERE,
         base::BindOnce(&ClearChannelIDsOnIOThread,
                        filter_builder.BuildChannelIDFilter(), delete_begin_,
-                       delete_end_, std::move(rq_context),
-                       clear_channel_ids_.GetCompletionCallback()));
+                       delete_end_, std::move(request_context),
+                       CreatePendingTaskCompletionClosure()));
   }
 
   //////////////////////////////////////////////////////////////////////////////
@@ -443,8 +407,6 @@
   }
 
   if (storage_partition_remove_mask) {
-    clear_storage_partition_data_.Start();
-
     uint32_t quota_storage_remove_mask =
         ~StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT;
 
@@ -471,10 +433,10 @@
 
     storage_partition->ClearData(
         storage_partition_remove_mask, quota_storage_remove_mask,
-        base::Bind(&DoesOriginMatchMaskAndURLs, origin_type_mask_, filter,
-                   embedder_matcher),
+        base::BindRepeating(&DoesOriginMatchMaskAndURLs, origin_type_mask_,
+                            filter, embedder_matcher),
         cookie_matcher, delete_begin_, delete_end_,
-        clear_storage_partition_data_.GetCompletionCallback());
+        CreatePendingTaskCompletionClosure());
   }
 
   //////////////////////////////////////////////////////////////////////////////
@@ -484,18 +446,16 @@
 
     // TODO(msramek): Clear the cache of all renderers.
 
-    clear_cache_.Start();
     storage_partition->ClearHttpAndMediaCaches(
         delete_begin, delete_end,
         filter_builder.IsEmptyBlacklist() ? base::Callback<bool(const GURL&)>()
                                           : filter,
-        clear_cache_.GetCompletionCallback());
+        CreatePendingTaskCompletionClosure());
 
     // When clearing cache, wipe accumulated network related data
     // (TransportSecurityState and HttpServerPropertiesManager data).
-    clear_networking_history_.Start();
     storage_partition->GetNetworkContext()->ClearNetworkingHistorySince(
-        delete_begin, clear_networking_history_.GetCompletionCallback());
+        delete_begin, CreatePendingTaskCompletionClosure());
 
     // Tell the shader disk cache to clear.
     base::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache"));
@@ -509,25 +469,23 @@
     scoped_refptr<net::URLRequestContextGetter> request_context =
         BrowserContext::GetDefaultStoragePartition(browser_context_)
             ->GetURLRequestContext();
-    clear_http_auth_cache_.Start();
     BrowserThread::PostTaskAndReply(
         BrowserThread::IO, FROM_HERE,
         base::BindOnce(&ClearHttpAuthCacheOnIOThread,
                        std::move(request_context), delete_begin_),
-        clear_http_auth_cache_.GetCompletionCallback());
+        CreatePendingTaskCompletionClosure());
   }
 
   //////////////////////////////////////////////////////////////////////////////
   // Embedder data.
   if (embedder_delegate_) {
-    clear_embedder_data_.Start();
     embedder_delegate_->RemoveEmbedderData(
         delete_begin_, delete_end_, remove_mask, filter_builder,
-        origin_type_mask, clear_embedder_data_.GetCompletionCallback());
+        origin_type_mask, CreatePendingTaskCompletionClosure());
   }
 
   // Notify in case all actions taken were synchronous.
-  synchronous_clear_operations_.GetCompletionCallback().Run();
+  std::move(synchronous_clear_operations).Run();
 }
 
 void BrowsingDataRemoverImpl::AddObserver(Observer* observer) {
@@ -584,15 +542,6 @@
 
 BrowsingDataRemoverImpl::RemovalTask::~RemovalTask() {}
 
-bool BrowsingDataRemoverImpl::AllDone() {
-  return !synchronous_clear_operations_.is_pending() &&
-         !clear_embedder_data_.is_pending() && !clear_cache_.is_pending() &&
-         !clear_networking_history_.is_pending() &&
-         !clear_channel_ids_.is_pending() &&
-         !clear_http_auth_cache_.is_pending() &&
-         !clear_storage_partition_data_.is_pending();
-}
-
 void BrowsingDataRemoverImpl::Notify() {
   // Some tests call |RemoveImpl| directly, without using the task scheduler.
   // TODO(msramek): Improve those tests so we don't have to do this. Tests
@@ -629,12 +578,15 @@
       base::BindOnce(&BrowsingDataRemoverImpl::RunNextTask, GetWeakPtr()));
 }
 
-void BrowsingDataRemoverImpl::NotifyIfDone() {
+void BrowsingDataRemoverImpl::OnTaskComplete() {
   // TODO(brettw) http://crbug.com/305259: This should also observe session
   // clearing (what about other things such as passwords, etc.?) and wait for
   // them to complete before continuing.
 
-  if (!AllDone())
+  DCHECK_GT(num_pending_tasks_, 0);
+  num_pending_tasks_--;
+
+  if (num_pending_tasks_ > 0)
     return;
 
   if (!would_complete_callback_.is_null()) {
@@ -646,6 +598,13 @@
   Notify();
 }
 
+base::OnceClosure
+BrowsingDataRemoverImpl::CreatePendingTaskCompletionClosure() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  num_pending_tasks_++;
+  return base::Bind(&BrowsingDataRemoverImpl::OnTaskComplete, GetWeakPtr());
+}
+
 base::WeakPtr<BrowsingDataRemoverImpl> BrowsingDataRemoverImpl::GetWeakPtr() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   base::WeakPtr<BrowsingDataRemoverImpl> weak_ptr =
diff --git a/content/browser/browsing_data/browsing_data_remover_impl.h b/content/browser/browsing_data/browsing_data_remover_impl.h
index c974deb..0ff0300 100644
--- a/content/browser/browsing_data/browsing_data_remover_impl.h
+++ b/content/browser/browsing_data/browsing_data_remover_impl.h
@@ -33,32 +33,6 @@
     : public BrowsingDataRemover,
       public base::SupportsUserData::Data {
  public:
-  // Used to track the deletion of a single data storage backend.
-  class SubTask {
-   public:
-    // Creates a SubTask that calls |forward_callback| when completed.
-    // |forward_callback| is only kept as a reference and must outlive SubTask.
-    explicit SubTask(const base::Closure& forward_callback);
-    ~SubTask();
-
-    // Indicate that the task is in progress and we're waiting.
-    void Start();
-
-    // Returns a callback that should be called to indicate that the task
-    // has been finished.
-    base::Closure GetCompletionCallback();
-
-    // Whether the task is still in progress.
-    bool is_pending() const { return is_pending_; }
-
-   private:
-    void CompletionCallback();
-
-    bool is_pending_;
-    const base::Closure& forward_callback_;
-    base::WeakPtrFactory<SubTask> weak_ptr_factory_;
-  };
-
   explicit BrowsingDataRemoverImpl(BrowserContext* browser_context);
   ~BrowsingDataRemoverImpl() override;
 
@@ -170,11 +144,14 @@
   // Notifies observers and transitions to the idle state.
   void Notify();
 
-  // Checks if we are all done, and if so, calls Notify().
-  void NotifyIfDone();
+  // Called by the closures returned by CreatePendingTaskCompletionClosure().
+  // Checks if all tasks have completed, and if so, calls Notify().
+  void OnTaskComplete();
 
-  // Returns true if we're all done.
-  bool AllDone();
+  // Increments the number of pending tasks by one, and returns a OnceClosure
+  // that calls OnTaskComplete(). The Remover is complete once all the closures
+  // created by this method have been invoked.
+  base::OnceClosure CreatePendingTaskCompletionClosure();
 
   // Like GetWeakPtr(), but returns a weak pointer to BrowsingDataRemoverImpl
   // for internal purposes.
@@ -210,18 +187,7 @@
   base::Callback<void(const base::Closure& continue_to_completion)>
       would_complete_callback_;
 
-  // A callback to NotifyIfDone() used by SubTasks instances.
-  const base::Closure sub_task_forward_callback_;
-
-  // Keeping track of various subtasks to be completed.
-  // These may only be accessed from UI thread in order to avoid races!
-  SubTask synchronous_clear_operations_;
-  SubTask clear_embedder_data_;
-  SubTask clear_cache_;
-  SubTask clear_networking_history_;
-  SubTask clear_channel_ids_;
-  SubTask clear_http_auth_cache_;
-  SubTask clear_storage_partition_data_;
+  int num_pending_tasks_ = 0;
 
   // Observers of the global state and individual tasks.
   base::ObserverList<Observer, true> observer_list_;
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index 67e306c8..5bf86c11 100644
--- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -22,9 +22,11 @@
 #include "mojo/edk/embedder/scoped_platform_handle.h"
 #include "sandbox/mac/seatbelt_exec.h"
 #include "services/service_manager/sandbox/mac/common_v2.sb.h"
+#include "services/service_manager/sandbox/mac/ppapi_v2.sb.h"
 #include "services/service_manager/sandbox/mac/renderer_v2.sb.h"
 #include "services/service_manager/sandbox/mac/utility.sb.h"
 #include "services/service_manager/sandbox/sandbox.h"
+#include "services/service_manager/sandbox/sandbox_type.h"
 
 namespace content {
 namespace internal {
@@ -63,8 +65,9 @@
   bool no_sandbox = command_line_->HasSwitch(switches::kNoSandbox) ||
                     service_manager::IsUnsandboxedSandboxType(sandbox_type);
 
-  bool v2_process = GetProcessType() == switches::kRendererProcess ||
-                    GetProcessType() == switches::kUtilityProcess;
+  bool v2_process = sandbox_type == service_manager::SANDBOX_TYPE_PPAPI ||
+                    sandbox_type == service_manager::SANDBOX_TYPE_RENDERER ||
+                    sandbox_type == service_manager::SANDBOX_TYPE_UTILITY;
 
   bool use_v2 =
       v2_process && base::FeatureList::IsEnabled(features::kMacV2Sandbox);
@@ -74,9 +77,11 @@
     std::string profile =
         std::string(service_manager::kSeatbeltPolicyString_common_v2);
 
-    if (GetProcessType() == switches::kRendererProcess) {
+    if (sandbox_type == service_manager::SANDBOX_TYPE_PPAPI) {
+      profile += service_manager::kSeatbeltPolicyString_ppapi_v2;
+    } else if (sandbox_type == service_manager::SANDBOX_TYPE_RENDERER) {
       profile += service_manager::kSeatbeltPolicyString_renderer_v2;
-    } else if (GetProcessType() == switches::kUtilityProcess) {
+    } else if (sandbox_type == service_manager::SANDBOX_TYPE_UTILITY) {
       profile += service_manager::kSeatbeltPolicyString_utility;
     }
 
@@ -87,9 +92,10 @@
     seatbelt_exec_client_ = std::make_unique<sandbox::SeatbeltExecClient>();
     seatbelt_exec_client_->SetProfile(profile);
 
-    if (GetProcessType() == switches::kRendererProcess) {
-      SetupRendererSandboxParameters(seatbelt_exec_client_.get());
-    } else {
+    if (sandbox_type == service_manager::SANDBOX_TYPE_RENDERER ||
+        sandbox_type == service_manager::SANDBOX_TYPE_PPAPI) {
+      SetupCommonSandboxParameters(seatbelt_exec_client_.get());
+    } else if (sandbox_type == service_manager::SANDBOX_TYPE_UTILITY) {
       SetupUtilitySandboxParameters(seatbelt_exec_client_.get(),
                                     *command_line_.get());
     }
diff --git a/content/browser/compositor/reflector_impl_unittest.cc b/content/browser/compositor/reflector_impl_unittest.cc
index 504c517950..52d26548 100644
--- a/content/browser/compositor/reflector_impl_unittest.cc
+++ b/content/browser/compositor/reflector_impl_unittest.cc
@@ -18,7 +18,7 @@
 #include "components/viz/service/display_embedder/compositor_overlay_candidate_validator.h"
 #include "content/browser/compositor/browser_compositor_output_surface.h"
 #include "content/browser/compositor/reflector_texture.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/compositor/compositor.h"
 #include "ui/compositor/layer.h"
@@ -142,7 +142,7 @@
     ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory,
                                          &context_factory_private);
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
     task_runner_ = message_loop_->task_runner();
     compositor_task_runner_ = new FakeTaskRunner();
     begin_frame_source_ = std::make_unique<viz::DelayBasedBeginFrameSource>(
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.cc b/content/browser/compositor/test/no_transport_image_transport_factory.cc
deleted file mode 100644
index 7e35c36e..0000000
--- a/content/browser/compositor/test/no_transport_image_transport_factory.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
-
-#include <utility>
-
-#include "base/command_line.h"
-#include "base/memory/ptr_util.h"
-#include "base/threading/sequenced_task_runner_handle.h"
-#include "build/build_config.h"
-#include "components/viz/common/gl_helper.h"
-#include "components/viz/common/gpu/context_provider.h"
-#include "components/viz/service/surfaces/surface_manager.h"
-#include "content/browser/compositor/surface_utils.h"
-#include "gpu/command_buffer/client/gles2_interface.h"
-#include "ui/compositor/compositor.h"
-#include "ui/compositor/compositor_switches.h"
-#include "ui/gl/gl_implementation.h"
-
-namespace content {
-
-NoTransportImageTransportFactory::NoTransportImageTransportFactory()
-    : context_factory_(&host_frame_sink_manager_, &frame_sink_manager_) {
-  surface_utils::ConnectWithLocalFrameSinkManager(&host_frame_sink_manager_,
-                                                  &frame_sink_manager_);
-
-  // The context factory created here is for unit tests, thus using a higher
-  // refresh rate to spend less time waiting for BeginFrames.
-  context_factory_.SetUseFastRefreshRateForTests();
-
-  const auto* command_line = base::CommandLine::ForCurrentProcess();
-  if (command_line->HasSwitch(switches::kEnablePixelOutputInTests))
-    disable_null_draw_ = std::make_unique<gl::DisableNullDrawGLBindings>();
-}
-
-NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {
-  std::unique_ptr<viz::GLHelper> lost_gl_helper = std::move(gl_helper_);
-  context_factory_.SendOnLostResources();
-}
-
-bool NoTransportImageTransportFactory::IsGpuCompositingDisabled() {
-  return false;
-}
-
-ui::ContextFactory* NoTransportImageTransportFactory::GetContextFactory() {
-  return &context_factory_;
-}
-
-ui::ContextFactoryPrivate*
-NoTransportImageTransportFactory::GetContextFactoryPrivate() {
-  return &context_factory_;
-}
-
-viz::GLHelper* NoTransportImageTransportFactory::GetGLHelper() {
-  if (!gl_helper_) {
-    context_provider_ = context_factory_.SharedMainThreadContextProvider();
-    gl_helper_.reset(new viz::GLHelper(context_provider_->ContextGL(),
-                                       context_provider_->ContextSupport()));
-  }
-  return gl_helper_.get();
-}
-
-}  // namespace content
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.h b/content/browser/compositor/test/no_transport_image_transport_factory.h
deleted file mode 100644
index da8a445..0000000
--- a/content/browser/compositor/test/no_transport_image_transport_factory.h
+++ /dev/null
@@ -1,62 +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 CONTENT_BROWSER_COMPOSITOR_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
-#define CONTENT_BROWSER_COMPOSITOR_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "build/build_config.h"
-#include "components/viz/host/host_frame_sink_manager.h"
-#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
-#include "components/viz/service/surfaces/surface_manager.h"
-#include "content/browser/compositor/image_transport_factory.h"
-#include "ui/compositor/test/in_process_context_factory.h"
-
-namespace gl {
-class DisableNullDrawGLBindings;
-}
-
-namespace ui {
-class InProcessContextFactory;
-}
-
-namespace viz {
-class ContextProvider;
-}
-
-namespace content {
-
-// An ImageTransportFactory that disables transport.
-class NoTransportImageTransportFactory : public ImageTransportFactory {
- public:
-  NoTransportImageTransportFactory();
-  ~NoTransportImageTransportFactory() override;
-
-  // ImageTransportFactory implementation.
-  bool IsGpuCompositingDisabled() override;
-  ui::ContextFactory* GetContextFactory() override;
-  ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
-  viz::GLHelper* GetGLHelper() override;
-#if defined(OS_MACOSX)
-  void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
-                                        bool suspended) override {}
-#endif
-
- private:
-  // The FrameSinkManagerImpl implementation lives in-process here for tests.
-  viz::FrameSinkManagerImpl frame_sink_manager_;
-  viz::HostFrameSinkManager host_frame_sink_manager_;
-  ui::InProcessContextFactory context_factory_;
-  scoped_refptr<viz::ContextProvider> context_provider_;
-  std::unique_ptr<viz::GLHelper> gl_helper_;
-  std::unique_ptr<gl::DisableNullDrawGLBindings> disable_null_draw_;
-
-  DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory);
-};
-
-}  // namespace content
-
-#endif  // CONTENT_BROWSER_COMPOSITOR_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
diff --git a/content/browser/compositor/test/test_image_transport_factory.cc b/content/browser/compositor/test/test_image_transport_factory.cc
new file mode 100644
index 0000000..01da6d25
--- /dev/null
+++ b/content/browser/compositor/test/test_image_transport_factory.cc
@@ -0,0 +1,187 @@
+// 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.
+
+#include "content/browser/compositor/test/test_image_transport_factory.h"
+
+#include <limits>
+
+#include "base/command_line.h"
+#include "components/viz/common/gl_helper.h"
+#include "components/viz/common/switches.h"
+#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
+#include "components/viz/test/test_frame_sink_manager.h"
+#include "content/browser/compositor/surface_utils.h"
+#include "ui/compositor/reflector.h"
+#include "ui/compositor/test/in_process_context_provider.h"
+
+namespace content {
+namespace {
+
+// TODO(kylechar): Use the same client id for the browser everywhere.
+constexpr uint32_t kDefaultClientId = std::numeric_limits<uint32_t>::max();
+
+class FakeReflector : public ui::Reflector {
+ public:
+  FakeReflector() = default;
+  ~FakeReflector() override = default;
+
+  void OnMirroringCompositorResized() override {}
+  void AddMirroringLayer(ui::Layer* layer) override {}
+  void RemoveMirroringLayer(ui::Layer* layer) override {}
+};
+
+}  // namespace
+
+TestImageTransportFactory::TestImageTransportFactory()
+    : enable_viz_(base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kEnableViz)),
+      frame_sink_id_allocator_(kDefaultClientId) {
+  if (enable_viz_) {
+    test_frame_sink_manager_impl_ =
+        std::make_unique<viz::TestFrameSinkManagerImpl>();
+
+    viz::mojom::FrameSinkManagerPtr frame_sink_manager;
+    viz::mojom::FrameSinkManagerRequest frame_sink_manager_request =
+        mojo::MakeRequest(&frame_sink_manager);
+    viz::mojom::FrameSinkManagerClientPtr frame_sink_manager_client;
+    viz::mojom::FrameSinkManagerClientRequest
+        frame_sink_manager_client_request =
+            mojo::MakeRequest(&frame_sink_manager_client);
+
+    // Bind endpoints in HostFrameSinkManager.
+    host_frame_sink_manager_.BindAndSetManager(
+        std::move(frame_sink_manager_client_request), nullptr,
+        std::move(frame_sink_manager));
+
+    // Bind endpoints in TestFrameSinkManagerImpl. For non-tests there would be
+    // a FrameSinkManagerImpl running in another process and these interface
+    // endpoints would be bound there.
+    test_frame_sink_manager_impl_->BindRequest(
+        std::move(frame_sink_manager_request),
+        std::move(frame_sink_manager_client));
+  } else {
+    frame_sink_manager_impl_ = std::make_unique<viz::FrameSinkManagerImpl>();
+    surface_utils::ConnectWithLocalFrameSinkManager(
+        &host_frame_sink_manager_, frame_sink_manager_impl_.get());
+  }
+}
+
+TestImageTransportFactory::~TestImageTransportFactory() {
+  std::unique_ptr<viz::GLHelper> lost_gl_helper = std::move(gl_helper_);
+
+  for (auto& observer : observer_list_)
+    observer.OnLostResources();
+}
+
+void TestImageTransportFactory::CreateLayerTreeFrameSink(
+    base::WeakPtr<ui::Compositor> compositor) {
+  compositor->SetLayerTreeFrameSink(cc::FakeLayerTreeFrameSink::Create3d());
+}
+
+scoped_refptr<viz::ContextProvider>
+TestImageTransportFactory::SharedMainThreadContextProvider() {
+  if (shared_main_context_provider_ &&
+      shared_main_context_provider_->ContextGL()->GetGraphicsResetStatusKHR() ==
+          GL_NO_ERROR)
+    return shared_main_context_provider_;
+
+  constexpr bool kSupportsLocking = false;
+  shared_main_context_provider_ = ui::InProcessContextProvider::CreateOffscreen(
+      &gpu_memory_buffer_manager_, &image_factory_, nullptr, kSupportsLocking);
+  auto result = shared_main_context_provider_->BindToCurrentThread();
+  if (result != gpu::ContextResult::kSuccess)
+    shared_main_context_provider_ = nullptr;
+
+  return shared_main_context_provider_;
+}
+
+double TestImageTransportFactory::GetRefreshRate() const {
+  // The context factory created here is for unit tests, thus using a higher
+  // refresh rate to spend less time waiting for BeginFrames.
+  return 200.0;
+}
+
+gpu::GpuMemoryBufferManager*
+TestImageTransportFactory::GetGpuMemoryBufferManager() {
+  return &gpu_memory_buffer_manager_;
+}
+
+cc::TaskGraphRunner* TestImageTransportFactory::GetTaskGraphRunner() {
+  return &task_graph_runner_;
+}
+
+const viz::ResourceSettings& TestImageTransportFactory::GetResourceSettings()
+    const {
+  return renderer_settings_.resource_settings;
+}
+
+void TestImageTransportFactory::AddObserver(
+    ui::ContextFactoryObserver* observer) {
+  observer_list_.AddObserver(observer);
+}
+
+void TestImageTransportFactory::RemoveObserver(
+    ui::ContextFactoryObserver* observer) {
+  observer_list_.RemoveObserver(observer);
+}
+
+std::unique_ptr<ui::Reflector> TestImageTransportFactory::CreateReflector(
+    ui::Compositor* source,
+    ui::Layer* target) {
+  if (!enable_viz_)
+    return std::make_unique<FakeReflector>();
+
+  // TODO(crbug.com/601869): Reflector needs to be rewritten for viz.
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+viz::FrameSinkId TestImageTransportFactory::AllocateFrameSinkId() {
+  return frame_sink_id_allocator_.NextFrameSinkId();
+}
+
+viz::HostFrameSinkManager*
+TestImageTransportFactory::GetHostFrameSinkManager() {
+  return &host_frame_sink_manager_;
+}
+
+viz::FrameSinkManagerImpl* TestImageTransportFactory::GetFrameSinkManager() {
+  if (enable_viz_) {
+    // Nothing should use FrameSinkManagerImpl with --enable-viz.
+    NOTREACHED();
+    return nullptr;
+  }
+
+  return frame_sink_manager_impl_.get();
+}
+
+bool TestImageTransportFactory::IsGpuCompositingDisabled() {
+  return false;
+}
+
+ui::ContextFactory* TestImageTransportFactory::GetContextFactory() {
+  return this;
+}
+
+ui::ContextFactoryPrivate*
+TestImageTransportFactory::GetContextFactoryPrivate() {
+  return this;
+}
+
+viz::GLHelper* TestImageTransportFactory::GetGLHelper() {
+  if (enable_viz_) {
+    // Nothing should use GLHelper with --enable-viz.
+    NOTREACHED();
+    return nullptr;
+  }
+
+  if (!gl_helper_) {
+    auto context_provider = SharedMainThreadContextProvider();
+    gl_helper_ = std::make_unique<viz::GLHelper>(
+        context_provider->ContextGL(), context_provider->ContextSupport());
+  }
+  return gl_helper_.get();
+}
+
+}  // namespace content
diff --git a/content/browser/compositor/test/test_image_transport_factory.h b/content/browser/compositor/test/test_image_transport_factory.h
new file mode 100644
index 0000000..8408557
--- /dev/null
+++ b/content/browser/compositor/test/test_image_transport_factory.h
@@ -0,0 +1,117 @@
+// 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 CONTENT_BROWSER_COMPOSITOR_TEST_TEST_IMAGE_TRANSPORT_FACTORY_H_
+#define CONTENT_BROWSER_COMPOSITOR_TEST_TEST_IMAGE_TRANSPORT_FACTORY_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "build/build_config.h"
+#include "cc/test/fake_layer_tree_frame_sink.h"
+#include "cc/test/test_image_factory.h"
+#include "cc/test/test_task_graph_runner.h"
+#include "components/viz/common/display/renderer_settings.h"
+#include "components/viz/common/surfaces/frame_sink_id_allocator.h"
+#include "components/viz/host/host_frame_sink_manager.h"
+#include "components/viz/test/test_gpu_memory_buffer_manager.h"
+#include "content/browser/compositor/image_transport_factory.h"
+#include "ui/compositor/compositor.h"
+
+namespace viz {
+class GLHelper;
+class FrameSinkManagerImpl;
+class TestFrameSinkManagerImpl;
+}  // namespace viz
+
+namespace content {
+
+// Test implementation of ImageTransportFactory, ContextFactory and
+// ContextFactoryPrivate. This class tries to do very little, mostly setting up
+// HostFrameSinkManager and returning fake implementations where possible.
+//
+// This class will change behavior depending on the --enable-viz flag. With the
+// flag it behaves like VizProcessTransportFactory, otherwise it behaves like
+// GpuProcessTransportFactory.
+class TestImageTransportFactory : public ui::ContextFactory,
+                                  public ui::ContextFactoryPrivate,
+                                  public ImageTransportFactory {
+ public:
+  TestImageTransportFactory();
+  ~TestImageTransportFactory() override;
+
+  // ui::ContextFactory implementation.
+  void CreateLayerTreeFrameSink(
+      base::WeakPtr<ui::Compositor> compositor) override;
+  scoped_refptr<viz::ContextProvider> SharedMainThreadContextProvider()
+      override;
+  void RemoveCompositor(ui::Compositor* compositor) override {}
+  double GetRefreshRate() const override;
+  gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
+  cc::TaskGraphRunner* GetTaskGraphRunner() override;
+  const viz::ResourceSettings& GetResourceSettings() const override;
+  void AddObserver(ui::ContextFactoryObserver* observer) override;
+  void RemoveObserver(ui::ContextFactoryObserver* observer) override;
+
+  // ui::ContextFactoryPrivate implementation.
+  std::unique_ptr<ui::Reflector> CreateReflector(ui::Compositor* source,
+                                                 ui::Layer* target) override;
+  void RemoveReflector(ui::Reflector* reflector) override {}
+  viz::FrameSinkId AllocateFrameSinkId() override;
+  viz::HostFrameSinkManager* GetHostFrameSinkManager() override;
+  void SetDisplayVisible(ui::Compositor* compositor, bool visible) override {}
+  void ResizeDisplay(ui::Compositor* compositor,
+                     const gfx::Size& size) override {}
+  void SetDisplayColorMatrix(ui::Compositor* compositor,
+                             const SkMatrix44& matrix) override {}
+  void SetDisplayColorSpace(
+      ui::Compositor* compositor,
+      const gfx::ColorSpace& blending_color_space,
+      const gfx::ColorSpace& output_color_space) override {}
+  void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
+                                     base::TimeDelta interval) override {}
+  void SetDisplayVSyncParameters(ui::Compositor* compositor,
+                                 base::TimeTicks timebase,
+                                 base::TimeDelta interval) override {}
+  void IssueExternalBeginFrame(ui::Compositor* compositor,
+                               const viz::BeginFrameArgs& args) override {}
+  void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {}
+  viz::FrameSinkManagerImpl* GetFrameSinkManager() override;
+
+  // ImageTransportFactory implementation.
+  bool IsGpuCompositingDisabled() override;
+  ui::ContextFactory* GetContextFactory() override;
+  ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
+  viz::GLHelper* GetGLHelper() override;
+#if defined(OS_MACOSX)
+  void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
+                                        bool suspended) override {}
+#endif
+
+ private:
+  const bool enable_viz_;
+
+  cc::TestTaskGraphRunner task_graph_runner_;
+  cc::TestImageFactory image_factory_;
+  viz::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
+  viz::RendererSettings renderer_settings_;
+  viz::FrameSinkIdAllocator frame_sink_id_allocator_;
+  scoped_refptr<viz::ContextProvider> shared_main_context_provider_;
+  base::ObserverList<ui::ContextFactoryObserver> observer_list_;
+  viz::HostFrameSinkManager host_frame_sink_manager_;
+
+  // Objects that exist if |enable_viz_| is false.
+  std::unique_ptr<viz::FrameSinkManagerImpl> frame_sink_manager_impl_;
+  std::unique_ptr<viz::GLHelper> gl_helper_;
+
+  // Objects that exist if |enable_viz_| is true.
+  std::unique_ptr<viz::TestFrameSinkManagerImpl> test_frame_sink_manager_impl_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestImageTransportFactory);
+};
+
+}  // namespace content
+
+#endif  // CONTENT_BROWSER_COMPOSITOR_TEST_TEST_IMAGE_TRANSPORT_FACTORY_H_
diff --git a/content/browser/devtools/browser_devtools_agent_host.cc b/content/browser/devtools/browser_devtools_agent_host.cc
index 74d57201..275f1b4 100644
--- a/content/browser/devtools/browser_devtools_agent_host.cc
+++ b/content/browser/devtools/browser_devtools_agent_host.cc
@@ -13,6 +13,7 @@
 #include "content/browser/devtools/protocol/io_handler.h"
 #include "content/browser/devtools/protocol/memory_handler.h"
 #include "content/browser/devtools/protocol/protocol.h"
+#include "content/browser/devtools/protocol/security_handler.h"
 #include "content/browser/devtools/protocol/system_info_handler.h"
 #include "content/browser/devtools/protocol/target_handler.h"
 #include "content/browser/devtools/protocol/tethering_handler.h"
@@ -56,6 +57,7 @@
   session->AddHandler(base::WrapUnique(new protocol::IOHandler(
       GetIOContext())));
   session->AddHandler(base::WrapUnique(new protocol::MemoryHandler()));
+  session->AddHandler(base::WrapUnique(new protocol::SecurityHandler()));
   session->AddHandler(base::WrapUnique(new protocol::SystemInfoHandler()));
   session->AddHandler(base::WrapUnique(new protocol::TetheringHandler(
       socket_callback_, tethering_task_runner_)));
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index c080b9c..a3f756f 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -16,6 +16,7 @@
 #include "content/browser/devtools/devtools_session.h"
 #include "content/browser/devtools/forwarding_agent_host.h"
 #include "content/browser/devtools/protocol/page.h"
+#include "content/browser/devtools/protocol/security_handler.h"
 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
 #include "content/browser/devtools/service_worker_devtools_agent_host.h"
 #include "content/browser/devtools/service_worker_devtools_manager.h"
@@ -36,6 +37,34 @@
 
 base::LazyInstance<base::ObserverList<DevToolsAgentHostObserver>>::Leaky
     g_devtools_observers = LAZY_INSTANCE_INITIALIZER;
+
+// Returns a list of all active hosts on browser targets.
+DevToolsAgentHost::List GetBrowserAgentHosts() {
+  DevToolsAgentHost::List result;
+  for (const auto& id_host : g_devtools_instances.Get()) {
+    if (id_host.second->GetType() == DevToolsAgentHost::kTypeBrowser)
+      result.push_back(id_host.second);
+  }
+  return result;
+}
+
+// Notify the provided agent host of a certificate error. Returns true if one of
+// the host's handlers will handle the certificate error.
+bool NotifyCertificateError(
+    DevToolsAgentHost* host,
+    int cert_error,
+    const GURL& request_url,
+    const DevToolsAgentHostImpl::CertErrorCallback& callback) {
+  DevToolsAgentHostImpl* host_impl = static_cast<DevToolsAgentHostImpl*>(host);
+  for (auto* security_handler :
+       protocol::SecurityHandler::ForAgentHost(host_impl)) {
+    if (security_handler->NotifyCertificateError(cert_error, request_url,
+                                                 callback)) {
+      return true;
+    }
+  }
+  return false;
+}
 }  // namespace
 
 const char DevToolsAgentHost::kTypePage[] = "page";
@@ -116,6 +145,29 @@
   return new ForwardingAgentHost(id, std::move(delegate));
 }
 
+// static
+bool DevToolsAgentHostImpl::HandleCertificateError(WebContents* web_contents,
+                                                   int cert_error,
+                                                   const GURL& request_url,
+                                                   CertErrorCallback callback) {
+  DevToolsAgentHost* agent_host =
+      DevToolsAgentHost::GetOrCreateFor(web_contents).get();
+  if (NotifyCertificateError(agent_host, cert_error, request_url, callback)) {
+    // Only allow a single agent host to handle the error.
+    callback.Reset();
+  }
+
+  for (scoped_refptr<DevToolsAgentHost> agent_host : GetBrowserAgentHosts()) {
+    if (NotifyCertificateError(agent_host.get(), cert_error, request_url,
+                               callback)) {
+      // Only allow a single agent host to handle the error.
+      callback.Reset();
+    }
+  }
+
+  return !callback;
+}
+
 DevToolsSession* DevToolsAgentHostImpl::SessionById(int session_id) {
   auto it = session_by_id_.find(session_id);
   return it == session_by_id_.end() ? nullptr : it->second;
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h
index 72951e7..746e2e5 100644
--- a/content/browser/devtools/devtools_agent_host_impl.h
+++ b/content/browser/devtools/devtools_agent_host_impl.h
@@ -16,6 +16,7 @@
 #include "content/common/content_export.h"
 #include "content/common/devtools.mojom.h"
 #include "content/common/devtools_messages.h"
+#include "content/public/browser/certificate_request_result_type.h"
 #include "content/public/browser/devtools_agent_host.h"
 
 namespace content {
@@ -26,6 +27,15 @@
 // Describes interface for managing devtools agents from the browser process.
 class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
  public:
+  // Asks any interested agents to handle the given certificate error. Returns
+  // |true| if the error was handled, |false| otherwise.
+  using CertErrorCallback =
+      base::RepeatingCallback<void(content::CertificateRequestResultType)>;
+  static bool HandleCertificateError(WebContents* web_contents,
+                                     int cert_error,
+                                     const GURL& request_url,
+                                     CertErrorCallback callback);
+
   // DevToolsAgentHost implementation.
   void AttachClient(DevToolsAgentHostClient* client) override;
   void ForceAttachClient(DevToolsAgentHostClient* client) override;
diff --git a/content/browser/devtools/devtools_manager_unittest.cc b/content/browser/devtools/devtools_manager_unittest.cc
index e5e81e5a..9d1d08f 100644
--- a/content/browser/devtools/devtools_manager_unittest.cc
+++ b/content/browser/devtools/devtools_manager_unittest.cc
@@ -87,9 +87,7 @@
   TestWebContentsDelegate() : renderer_unresponsive_received_(false) {}
 
   // Notification that the contents is hung.
-  void RendererUnresponsive(
-      WebContents* source,
-      const WebContentsUnresponsiveState& unresponsive_state) override {
+  void RendererUnresponsive(WebContents* source) override {
     renderer_unresponsive_received_ = true;
   }
 
@@ -146,7 +144,7 @@
 
   // Start with a short timeout.
   inspected_rvh->GetWidget()->StartHangMonitorTimeout(
-      TimeDelta::FromMilliseconds(10), blink::WebInputEvent::kUndefined);
+      TimeDelta::FromMilliseconds(10));
   // Wait long enough for first timeout and see if it fired.
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
       FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
@@ -158,7 +156,7 @@
   client_host.Close();
   // Start with a short timeout.
   inspected_rvh->GetWidget()->StartHangMonitorTimeout(
-      TimeDelta::FromMilliseconds(10), blink::WebInputEvent::kUndefined);
+      TimeDelta::FromMilliseconds(10));
   // Wait long enough for first timeout and see if it fired.
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
       FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
index 6e3c942..e231e87 100644
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -285,13 +285,23 @@
     shell()->web_contents()->SetDelegate(this);
   }
 
-  void TearDownOnMainThread() override {
+  void AttachToBrowserTarget() {
+    // Tethering domain is not used in tests.
+    agent_host_ = DevToolsAgentHost::CreateForBrowser(
+        nullptr, DevToolsAgentHost::CreateServerSocketCallback());
+    agent_host_->AttachClient(this);
+    shell()->web_contents()->SetDelegate(this);
+  }
+
+  void Detach() {
     if (agent_host_) {
       agent_host_->DetachClient(this);
       agent_host_ = nullptr;
     }
   }
 
+  void TearDownOnMainThread() override { Detach(); }
+
   std::unique_ptr<base::DictionaryValue> WaitForNotification(
       const std::string& notification) {
     return WaitForNotification(notification, false);
@@ -1794,6 +1804,63 @@
                           ->GetController()
                           .GetLastCommittedEntry()
                           ->GetURL());
+
+  // Reset override.
+  SendCommand("Security.disable", nullptr, true);
+
+  // Test ignoring all certificate errors.
+  command_params.reset(new base::DictionaryValue());
+  command_params->SetBoolean("ignore", true);
+  SendCommand("Security.setIgnoreCertificateErrors", std::move(command_params),
+              true);
+
+  SendCommand("Network.clearBrowserCache", nullptr, true);
+  SendCommand("Network.clearBrowserCookies", nullptr, true);
+  TestNavigationObserver continue_observer2(shell()->web_contents(), 1);
+  shell()->LoadURL(test_url);
+  WaitForNotification("Network.loadingFinished", true);
+  continue_observer2.Wait();
+  EXPECT_EQ(test_url, shell()
+                          ->web_contents()
+                          ->GetController()
+                          .GetLastCommittedEntry()
+                          ->GetURL());
+}
+
+IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, CertificateErrorBrowserTarget) {
+  net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
+  https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_EXPIRED);
+  https_server.ServeFilesFromSourceDirectory("content/test/data");
+  ASSERT_TRUE(https_server.Start());
+  GURL test_url = https_server.GetURL("/devtools/navigation.html");
+  std::unique_ptr<base::DictionaryValue> params;
+  std::unique_ptr<base::DictionaryValue> command_params;
+
+  shell()->LoadURL(GURL("about:blank"));
+  WaitForLoadStop(shell()->web_contents());
+
+  // Clear cookies and cache to avoid interference with cert error events.
+  Attach();
+  SendCommand("Network.enable", nullptr, true);
+  SendCommand("Network.clearBrowserCache", nullptr, true);
+  SendCommand("Network.clearBrowserCookies", nullptr, true);
+  Detach();
+
+  // Test that browser target can ignore cert errors.
+  AttachToBrowserTarget();
+  command_params.reset(new base::DictionaryValue());
+  command_params->SetBoolean("ignore", true);
+  SendCommand("Security.setIgnoreCertificateErrors", std::move(command_params),
+              true);
+
+  TestNavigationObserver continue_observer(shell()->web_contents(), 1);
+  shell()->LoadURL(test_url);
+  continue_observer.Wait();
+  EXPECT_EQ(test_url, shell()
+                          ->web_contents()
+                          ->GetController()
+                          .GetLastCommittedEntry()
+                          ->GetURL());
 }
 
 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, SubresourceWithCertificateError) {
diff --git a/content/browser/devtools/protocol/security_handler.cc b/content/browser/devtools/protocol/security_handler.cc
index 47b92ac..7494e25 100644
--- a/content/browser/devtools/protocol/security_handler.cc
+++ b/content/browser/devtools/protocol/security_handler.cc
@@ -191,7 +191,7 @@
 }
 
 void SecurityHandler::DidFinishNavigation(NavigationHandle* navigation_handle) {
-  if (certificate_errors_overriden_)
+  if (cert_error_override_mode_ == CertErrorOverrideMode::kHandleEvents)
     FlushPendingCertificateErrorNotifications();
 }
 
@@ -204,14 +204,24 @@
 bool SecurityHandler::NotifyCertificateError(int cert_error,
                                              const GURL& request_url,
                                              CertErrorCallback handler) {
+  if (cert_error_override_mode_ == CertErrorOverrideMode::kIgnoreAll) {
+    if (handler)
+      handler.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE);
+    return true;
+  }
+
   if (!enabled_)
     return false;
+
   frontend_->CertificateError(++last_cert_error_id_,
                               net::ErrorToShortString(cert_error),
                               request_url.spec());
-  if (!certificate_errors_overriden_) {
+
+  if (!handler ||
+      cert_error_override_mode_ != CertErrorOverrideMode::kHandleEvents) {
     return false;
   }
+
   cert_error_callbacks_[last_cert_error_id_] = handler;
   return true;
 }
@@ -226,7 +236,7 @@
 
 Response SecurityHandler::Disable() {
   enabled_ = false;
-  certificate_errors_overriden_ = false;
+  cert_error_override_mode_ = CertErrorOverrideMode::kDisabled;
   WebContentsObserver::Observe(nullptr);
   FlushPendingCertificateErrorNotifications();
   return Response::OK();
@@ -255,11 +265,27 @@
 }
 
 Response SecurityHandler::SetOverrideCertificateErrors(bool override) {
-  if (override && !enabled_)
-    return Response::Error("Security domain not enabled");
-  certificate_errors_overriden_ = override;
-  if (!override)
+  if (override) {
+    if (!enabled_)
+      return Response::Error("Security domain not enabled");
+    if (cert_error_override_mode_ == CertErrorOverrideMode::kIgnoreAll)
+      return Response::Error("Certificate errors are already being ignored.");
+    cert_error_override_mode_ = CertErrorOverrideMode::kHandleEvents;
+  } else {
+    cert_error_override_mode_ = CertErrorOverrideMode::kDisabled;
     FlushPendingCertificateErrorNotifications();
+  }
+  return Response::OK();
+}
+
+Response SecurityHandler::SetIgnoreCertificateErrors(bool ignore) {
+  if (ignore) {
+    if (cert_error_override_mode_ == CertErrorOverrideMode::kHandleEvents)
+      return Response::Error("Certificate errors are already overridden.");
+    cert_error_override_mode_ = CertErrorOverrideMode::kIgnoreAll;
+  } else {
+    cert_error_override_mode_ = CertErrorOverrideMode::kDisabled;
+  }
   return Response::OK();
 }
 
diff --git a/content/browser/devtools/protocol/security_handler.h b/content/browser/devtools/protocol/security_handler.h
index 823b28f..30ff780 100644
--- a/content/browser/devtools/protocol/security_handler.h
+++ b/content/browser/devtools/protocol/security_handler.h
@@ -43,6 +43,7 @@
   Response Disable() override;
   Response HandleCertificateError(int event_id, const String& action) override;
   Response SetOverrideCertificateErrors(bool override) override;
+  Response SetIgnoreCertificateErrors(bool ignore) override;
 
   // NotifyCertificateError will send a CertificateError event. Returns true if
   // the error is expected to be handled by a corresponding
@@ -66,7 +67,9 @@
   RenderFrameHostImpl* host_;
   int last_cert_error_id_ = 0;
   CertErrorCallbackMap cert_error_callbacks_;
-  bool certificate_errors_overriden_ = false;
+  enum class CertErrorOverrideMode { kDisabled, kHandleEvents, kIgnoreAll };
+  CertErrorOverrideMode cert_error_override_mode_ =
+      CertErrorOverrideMode::kDisabled;
 
   DISALLOW_COPY_AND_ASSIGN(SecurityHandler);
 };
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc
index 87b0509..bdf22ded 100644
--- a/content/browser/devtools/protocol/system_info_handler.cc
+++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -12,11 +12,15 @@
 #include "base/command_line.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "gpu/config/gpu_feature_type.h"
 #include "gpu/config/gpu_info.h"
 #include "gpu/config/gpu_switches.h"
+#if defined(OS_CHROMEOS)
+#include "gpu/config/gpu_util.h"
+#endif
 
 namespace content {
 namespace protocol {
@@ -28,7 +32,12 @@
 using GetInfoCallback = SystemInfo::Backend::GetInfoCallback;
 
 // Give the GPU process a few seconds to provide GPU info.
+// Linux Debug builds need more time -- see Issue 796437.
+#if defined(OS_LINUX) && !defined(NDEBUG)
+const int kGPUInfoWatchdogTimeoutMs = 20000;
+#else
 const int kGPUInfoWatchdogTimeoutMs = 5000;
+#endif
 
 class AuxGPUInfoEnumerator : public gpu::GPUInfo::Enumerator {
  public:
@@ -168,7 +177,15 @@
 
   void ObserverWatchdogCallback() {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
+#if defined(OS_CHROMEOS)
+    // TODO(zmo): CHECK everywhere once https://crbug.com/796386 is fixed.
+    gpu::GpuFeatureInfo gpu_feature_info =
+        gpu::ComputeGpuFeatureInfoWithHardwareAccelerationDisabled();
+    GpuDataManagerImpl::GetInstance()->UpdateGpuFeatureInfo(gpu_feature_info);
+    UnregisterAndSendResponse();
+#else
     CHECK(false) << "Gathering system GPU info took more than 5 seconds.";
+#endif
   }
 
   void UnregisterAndSendResponse() {
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index c94bb2fd..a1e4484 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -339,11 +339,11 @@
 
 // PlzNavigate
 // A NavigationControllerTest run with --enable-browser-side-navigation.
+// TODO(clamy): Make those regular NavigationControllerTests.
 class NavigationControllerTestWithBrowserSideNavigation
     : public NavigationControllerTest {
  public:
   void SetUp() override {
-    EnableBrowserSideNavigation();
     NavigationControllerTest::SetUp();
   }
 };
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
index 000ac7f..1e14bfc 100644
--- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -1596,14 +1596,11 @@
 
 // This class allows running tests with PlzNavigate enabled, regardless of
 // default test configuration.
+// TODO(clamy): Make those regular NavigationHandleImplBrowserTests.
 class PlzNavigateNavigationHandleImplBrowserTest : public ContentBrowserTest {
  public:
   PlzNavigateNavigationHandleImplBrowserTest() {}
 
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    command_line->AppendSwitch(switches::kEnableBrowserSideNavigation);
-  }
-
   void SetUpOnMainThread() override {
     host_resolver()->AddRule("*", "127.0.0.1");
   }
diff --git a/content/browser/frame_host/navigation_handle_impl_unittest.cc b/content/browser/frame_host/navigation_handle_impl_unittest.cc
index 76869f1..1e315de 100644
--- a/content/browser/frame_host/navigation_handle_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_unittest.cc
@@ -956,7 +956,6 @@
 
 TEST_F(NavigationHandleImplTest, BlockRequestCustomNetErrorInRedirect) {
   // BLOCK_REQUEST on redirect requires PlzNavigate.
-  EnableBrowserSideNavigation();
   TestNavigationThrottle* block_throttle = CreateTestNavigationThrottle(
       {NavigationThrottle::BLOCK_REQUEST, net::ERR_FILE_NOT_FOUND});
   EXPECT_TRUE(call_counts_match(block_throttle, 0, 0, 0, 0));
@@ -977,7 +976,6 @@
 TEST_F(NavigationHandleImplTest,
        BlockRequestCustomNetErrorAndErrorHTMLInRedirect) {
   // BLOCK_REQUEST on redirect requires PlzNavigate.
-  EnableBrowserSideNavigation();
   std::string expected_error_page_content("<html><body>test</body></html>");
   TestNavigationThrottle* block_throttle = CreateTestNavigationThrottle(
       {NavigationThrottle::BLOCK_REQUEST, net::ERR_FILE_NOT_FOUND,
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index 668680a..32b5215e 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -38,12 +38,9 @@
 #include "ui/base/page_transition_types.h"
 #include "url/url_constants.h"
 
-#if !defined(OS_ANDROID)
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
-#endif
-
 namespace content {
 
+// TODO(clamy): Rename the tests NavigatorTests.
 class NavigatorTestWithBrowserSideNavigation
     : public RenderViewHostImplTestHarness {
  public:
@@ -51,7 +48,6 @@
   using SiteInstanceRelation = RenderFrameHostManager::SiteInstanceRelation;
 
   void SetUp() override {
-    EnableBrowserSideNavigation();
     RenderViewHostImplTestHarness::SetUp();
   }
 
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index c8660add..15eaa55 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -887,8 +887,6 @@
                         OnDidFailLoadWithError)
     IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateState, OnUpdateState)
     IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
-    IPC_MESSAGE_HANDLER(FrameHostMsg_CancelInitialHistoryLoad,
-                        OnCancelInitialHistoryLoad)
     IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted,
                         OnDocumentOnLoadCompleted)
     IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK)
@@ -913,7 +911,6 @@
     IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties,
                         OnDidChangeFrameOwnerProperties)
     IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
-    IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
     IPC_MESSAGE_HANDLER(FrameHostMsg_DidBlockFramebust, OnDidBlockFramebust)
     IPC_MESSAGE_HANDLER(FrameHostMsg_AbortNavigation, OnAbortNavigation)
     IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad)
@@ -1429,7 +1426,7 @@
       params.triggering_event_info);
 }
 
-void RenderFrameHostImpl::OnCancelInitialHistoryLoad() {
+void RenderFrameHostImpl::CancelInitialHistoryLoad() {
   // A Javascript navigation interrupted the initial history load.  Check if an
   // initial subframe cross-process navigation needs to be canceled as a result.
   // TODO(creis, clamy): Cancel any cross-process navigation in PlzNavigate.
@@ -2386,7 +2383,7 @@
       this, title, WebTextDirectionToChromeTextDirection(title_direction));
 }
 
-void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
+void RenderFrameHostImpl::UpdateEncoding(const std::string& encoding_name) {
   // This message is only sent for top-level frames. TODO(avi): when frame tree
   // mirroring works correctly, add a check here to enforce it.
   delegate_->UpdateEncoding(this, encoding_name);
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 6e4fe78..ee831e1 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -780,7 +780,6 @@
   void OnDetach();
   void OnFrameFocused();
   void OnOpenURL(const FrameHostMsg_OpenURL_Params& params);
-  void OnCancelInitialHistoryLoad();
   void OnDocumentOnLoadCompleted(
       FrameMsg_UILoadMetricsReportType::Value report_type,
       base::TimeTicks ui_timestamp);
@@ -828,7 +827,6 @@
                                        const FrameOwnerProperties& properties);
   void OnUpdateTitle(const base::string16& title,
                      blink::WebTextDirection title_direction);
-  void OnUpdateEncoding(const std::string& encoding);
   void OnDidBlockFramebust(const GURL& url);
   void OnAbortNavigation();
   void OnDispatchLoad();
@@ -913,6 +911,8 @@
   void DidSetFramePolicyHeaders(
       blink::WebSandboxFlags sandbox_flags,
       const blink::ParsedFeaturePolicy& parsed_header) override;
+  void CancelInitialHistoryLoad() override;
+  void UpdateEncoding(const std::string& encoding) override;
 
   // Registers Mojo interfaces that this frame host makes available.
   void RegisterMojoInterfaces();
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index c38b650..7b3a3ec 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -2851,11 +2851,11 @@
 }
 
 // RenderFrameHostManagerTest extension for PlzNavigate enabled tests.
+// TODO(clamy): Make those regular RenderFrameHostManagerTests.
 class RenderFrameHostManagerTestWithBrowserSideNavigation
     : public RenderFrameHostManagerTest {
  public:
   void SetUp() override {
-    EnableBrowserSideNavigation();
     RenderFrameHostManagerTest::SetUp();
   }
 };
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 d4b94acd..d637a49 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -178,9 +178,8 @@
 }
 #endif
 
-void RenderWidgetHostViewGuest::ProcessMouseEvent(
-    const blink::WebMouseEvent& event,
-    const ui::LatencyInfo& latency) {
+void RenderWidgetHostViewGuest::PreProcessMouseEvent(
+    const blink::WebMouseEvent& event) {
   if (event.GetType() == blink::WebInputEvent::kMouseDown) {
     DCHECK(guest_->GetOwnerRenderWidgetHostView());
     RenderWidgetHost* embedder =
@@ -195,12 +194,10 @@
     MaybeSendSyntheticTapGesture(event.PositionInWidget(),
                                  event.PositionInScreen());
   }
-  host_->ForwardMouseEventWithLatencyInfo(event, latency);
 }
 
-void RenderWidgetHostViewGuest::ProcessTouchEvent(
-    const blink::WebTouchEvent& event,
-    const ui::LatencyInfo& latency) {
+void RenderWidgetHostViewGuest::PreProcessTouchEvent(
+    const blink::WebTouchEvent& event) {
   if (event.GetType() == blink::WebInputEvent::kTouchStart) {
     DCHECK(guest_->GetOwnerRenderWidgetHostView());
     RenderWidgetHost* embedder =
@@ -215,8 +212,6 @@
     MaybeSendSyntheticTapGesture(event.touches[0].PositionInWidget(),
                                  event.touches[0].PositionInScreen());
   }
-
-  host_->ForwardTouchEventWithLatencyInfo(event, latency);
 }
 
 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const {
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 b7d2da2..d07b130 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -116,10 +116,8 @@
   void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
                               InputEventAckState ack_result) override;
 #endif
-  void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                         const ui::LatencyInfo& latency) override;
+  void PreProcessMouseEvent(const blink::WebMouseEvent& event) override;
+  void PreProcessTouchEvent(const blink::WebTouchEvent& event) override;
 
   void DidStopFlinging() override;
   bool LockMouse() override;
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
index bc24d87..02f0ff67 100644
--- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -14,10 +14,11 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/surface_sequence.h"
+#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
 #include "components/viz/service/surfaces/surface.h"
 #include "components/viz/service/surfaces/surface_manager.h"
 #include "content/browser/browser_plugin/browser_plugin_guest.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -46,7 +47,7 @@
   void SetUp() override {
 #if !defined(OS_ANDROID)
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
 #endif
     browser_context_.reset(new TestBrowserContext);
     MockRenderProcessHost* process_host =
@@ -144,7 +145,7 @@
   void SetUp() override {
 #if !defined(OS_ANDROID)
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
 #endif
     browser_context_.reset(new TestBrowserContext);
     MockRenderProcessHost* process_host =
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index d87bee0..ccb7c4d 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -57,6 +57,15 @@
 
   base::AutoLock auto_lock(lock_);
   private_->InitializeForTesting(kData, gpu_info);
+
+  gpu::GpuFeatureInfo gpu_feature_info;
+  for (int ii = 0; ii < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++ii) {
+    if (ii == static_cast<int>(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL))
+      gpu_feature_info.status_values[ii] = gpu::kGpuFeatureStatusBlacklisted;
+    else
+      gpu_feature_info.status_values[ii] = gpu::kGpuFeatureStatusEnabled;
+  }
+  private_->UpdateGpuFeatureInfo(gpu_feature_info);
 }
 
 void GpuDataManagerImpl::InitializeForTesting(
@@ -66,26 +75,6 @@
   private_->InitializeForTesting(gpu_blacklist_data, gpu_info);
 }
 
-bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const {
-  base::AutoLock auto_lock(lock_);
-  return private_->IsFeatureBlacklisted(feature);
-}
-
-bool GpuDataManagerImpl::IsFeatureEnabled(int feature) const {
-  base::AutoLock auto_lock(lock_);
-  return private_->IsFeatureEnabled(feature);
-}
-
-bool GpuDataManagerImpl::IsWebGLEnabled() const {
-  base::AutoLock auto_lock(lock_);
-  return private_->IsWebGLEnabled();
-}
-
-bool GpuDataManagerImpl::IsWebGL2Enabled() const {
-  base::AutoLock auto_lock(lock_);
-  return private_->IsWebGL2Enabled();
-}
-
 gpu::GPUInfo GpuDataManagerImpl::GetGPUInfo() const {
   base::AutoLock auto_lock(lock_);
   return private_->GetGPUInfo();
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 7bde29e..9f90dd0 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -65,10 +65,6 @@
 
   // GpuDataManager implementation.
   void BlacklistWebGLForTesting() override;
-  bool IsFeatureBlacklisted(int feature) const override;
-  bool IsFeatureEnabled(int feature) const override;
-  bool IsWebGLEnabled() const override;
-  bool IsWebGL2Enabled() const override;
   gpu::GPUInfo GetGPUInfo() const override;
   bool GpuAccessAllowed(std::string* reason) const override;
   void RequestCompleteGpuInfoIfNeeded() override;
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 1ac8a978..e68dfa3b 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -333,28 +333,14 @@
   finalized_ = true;
 
   InitializeImpl(gpu_blacklist_data, gpu_info);
-}
 
-bool GpuDataManagerImplPrivate::IsFeatureBlacklisted(int feature) const {
-  // SwiftShader blacklists all features
-  return use_swiftshader_ || (blacklisted_features_.count(feature) == 1);
-}
-
-bool GpuDataManagerImplPrivate::IsFeatureEnabled(int feature) const {
-  DCHECK_EQ(feature, gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION);
-  return gpu_feature_info_
-             .status_values[gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION] ==
-         gpu::kGpuFeatureStatusEnabled;
-}
-
-bool GpuDataManagerImplPrivate::IsWebGLEnabled() const {
-  return use_swiftshader_ ||
-         !blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL);
-}
-
-bool GpuDataManagerImplPrivate::IsWebGL2Enabled() const {
-  return /*use_swiftshader_ ||*/ // Uncomment to enable WebGL 2 with SwiftShader
-         !blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2);
+  // TODO(zmo): Find a better mechanism to blacklist features for testing.
+  base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+  if (gpu_feature_info_
+          .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL] ==
+      gpu::kGpuFeatureStatusBlacklisted) {
+    cmd_line->AppendSwitch(switches::kDisableWebGL);
+  }
 }
 
 size_t GpuDataManagerImplPrivate::GetBlacklistedFeatureCount() const {
@@ -455,6 +441,7 @@
 gpu::GpuFeatureStatus GpuDataManagerImplPrivate::GetFeatureStatus(
     gpu::GpuFeatureType feature) const {
   DCHECK(feature >= 0 && feature < gpu::NUMBER_OF_GPU_FEATURE_TYPES);
+  DCHECK(gpu_feature_info_.IsValid());
   return gpu_feature_info_.status_values[feature];
 }
 
@@ -677,8 +664,13 @@
     base::CommandLine* command_line) const {
   DCHECK(command_line);
 
-  if (ShouldDisableAcceleratedVideoDecode(command_line))
+#if defined(OS_ANDROID)
+  // TODO(zmo): Move this to renderer side checking with GPU channel.
+  if (blacklisted_features_.count(
+          gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) == 1) {
     command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
+  }
+#endif
 }
 
 void GpuDataManagerImplPrivate::AppendGpuCommandLine(
@@ -696,14 +688,6 @@
   if (use_swiftshader_) {
     command_line->AppendSwitchASCII(
         switches::kUseGL, gl::kGLImplementationSwiftShaderForWebGLName);
-  } else if ((IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL) ||
-              IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) ||
-              IsFeatureBlacklisted(
-                  gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)) &&
-             (use_gl == "any")) {
-    command_line->AppendSwitchASCII(
-        switches::kUseGL,
-        gl::GetGLImplementationName(gl::GetSoftwareGLImplementation()));
   } else if (!use_gl.empty()) {
     command_line->AppendSwitchASCII(switches::kUseGL, use_gl);
   }
@@ -911,19 +895,6 @@
   return true;
 }
 
-bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode(
-    const base::CommandLine* command_line) const {
-  if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
-    // It was already disabled on the command line.
-    return false;
-  }
-  if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE))
-    return true;
-
-  // Accelerated decode is never available with --disable-gpu.
-  return ShouldDisableHardwareAcceleration();
-}
-
 void GpuDataManagerImplPrivate::GetDisabledExtensions(
     std::string* disabled_extensions) const {
   DCHECK(disabled_extensions);
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index e805de0..83261b7 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -42,10 +42,6 @@
 
   void InitializeForTesting(const gpu::GpuControlListData& gpu_blacklist_data,
                             const gpu::GPUInfo& gpu_info);
-  bool IsFeatureBlacklisted(int feature) const;
-  bool IsFeatureEnabled(int feature) const;
-  bool IsWebGLEnabled() const;
-  bool IsWebGL2Enabled() const;
   gpu::GPUInfo GetGPUInfo() const;
   bool GpuAccessAllowed(std::string* reason) const;
   void RequestCompleteGpuInfoIfNeeded();
@@ -92,9 +88,6 @@
 
   void HandleGpuSwitch();
 
-  bool ShouldDisableAcceleratedVideoDecode(
-      const base::CommandLine* command_line) const;
-
   void GetDisabledExtensions(std::string* disabled_extensions) const;
 
   void BlockDomainFrom3DAPIs(
diff --git a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
index 0bc8a42..61ff37b 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
@@ -127,152 +127,6 @@
 // We use new method instead of GetInstance() method because we want
 // each test to be independent of each other.
 
-TEST_F(GpuDataManagerImplPrivateTest, GpuSideBlacklisting) {
-  // If a feature is allowed in preliminary step (browser side), but
-  // disabled when GPU process launches and collects full GPU info,
-  // it's too late to let renderer know, so we basically block all GPU
-  // access, to be on the safe side.
-  ScopedGpuDataManagerImplPrivate manager;
-  EXPECT_EQ(0u, manager->GetBlacklistedFeatureCount());
-  std::string reason;
-  EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-  EXPECT_TRUE(reason.empty());
-
-  const gpu::GpuControlList::Entry kEntries[] = {
-      gpu::kGpuDataManagerTestingEntries
-          [gpu::kGpuDataManagerImplPrivateTest_GpuSideBlacklisting_0],
-      gpu::kGpuDataManagerTestingEntries
-          [gpu::kGpuDataManagerImplPrivateTest_GpuSideBlacklisting_1],
-  };
-  const gpu::GpuControlListData kData(2, kEntries);
-
-  gpu::GPUInfo gpu_info;
-  gpu_info.gpu.vendor_id = 0x10de;
-  gpu_info.gpu.device_id = 0x0640;
-  manager->InitializeForTesting(kData, gpu_info);
-
-  EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-  EXPECT_TRUE(reason.empty());
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-              manager->GetBlacklistedFeatureCount());
-  } else {
-    EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
-  }
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL));
-
-  gpu_info.gl_vendor = "NVIDIA";
-  gpu_info.gl_renderer = "NVIDIA GeForce GT 120";
-  manager->UpdateGpuInfo(gpu_info);
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-    EXPECT_TRUE(reason.empty());
-    EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-              manager->GetBlacklistedFeatureCount());
-    EXPECT_TRUE(manager->IsFeatureBlacklisted(
-        gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2));
-  } else {
-    EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-    EXPECT_TRUE(reason.empty());
-    EXPECT_EQ(2u, manager->GetBlacklistedFeatureCount());
-    EXPECT_FALSE(manager->IsFeatureBlacklisted(
-        gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2));
-  }
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL));
-  EXPECT_TRUE(manager->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
-}
-
-TEST_F(GpuDataManagerImplPrivateTest, GpuSideBlacklistingWebGL) {
-  // If a feature is allowed in preliminary step (browser side), but
-  // disabled when GPU process launches and collects full GPU info,
-  // it's too late to let renderer know, so we basically block all GPU
-  // access, to be on the safe side.
-  ScopedGpuDataManagerImplPrivate manager;
-  EXPECT_EQ(0u, manager->GetBlacklistedFeatureCount());
-  std::string reason;
-  EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-  EXPECT_TRUE(reason.empty());
-
-  const gpu::GpuControlList::Entry kEntries[] = {
-      gpu::kGpuDataManagerTestingEntries
-          [gpu::kGpuDataManagerImplPrivateTest_GpuSideBlacklistingWebGL_0],
-      gpu::kGpuDataManagerTestingEntries
-          [gpu::kGpuDataManagerImplPrivateTest_GpuSideBlacklistingWebGL_1],
-  };
-  const gpu::GpuControlListData kData(2, kEntries);
-
-  gpu::GPUInfo gpu_info;
-  gpu_info.gpu.vendor_id = 0x10de;
-  gpu_info.gpu.device_id = 0x0640;
-  manager->InitializeForTesting(kData, gpu_info);
-
-  EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-  EXPECT_TRUE(reason.empty());
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-              manager->GetBlacklistedFeatureCount());
-  } else {
-    EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
-  }
-  EXPECT_TRUE(manager->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
-
-  gpu_info.gl_vendor = "NVIDIA";
-  gpu_info.gl_renderer = "NVIDIA GeForce GT 120";
-  manager->UpdateGpuInfo(gpu_info);
-  EXPECT_TRUE(manager->GpuAccessAllowed(&reason));
-  EXPECT_TRUE(reason.empty());
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-              manager->GetBlacklistedFeatureCount());
-  } else {
-    EXPECT_EQ(3u, manager->GetBlacklistedFeatureCount());
-  }
-  EXPECT_TRUE(manager->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL));
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2));
-}
-
-TEST_F(GpuDataManagerImplPrivateTest, GpuSideExceptions) {
-  ScopedGpuDataManagerImplPrivate manager;
-  EXPECT_EQ(0u, manager->GetBlacklistedFeatureCount());
-  EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-
-  const gpu::GpuControlList::Entry kEntries[] = {
-      gpu::kGpuDataManagerTestingEntries
-          [gpu::kGpuDataManagerImplPrivateTest_GpuSideException],
-  };
-  const gpu::GpuControlListData kData(1, kEntries);
-
-  gpu::GPUInfo gpu_info;
-  gpu_info.gpu.vendor_id = 0x10de;
-  gpu_info.gpu.device_id = 0x0640;
-  manager->InitializeForTesting(kData, gpu_info);
-
-  EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  EXPECT_EQ(manager->ShouldUseSwiftShader()
-                ? static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES)
-                : 1u,
-            manager->GetBlacklistedFeatureCount());
-
-  // Now assume gpu process launches and full GPU info is collected.
-  gpu_info.gl_renderer = "NVIDIA GeForce GT 120";
-  manager->UpdateGpuInfo(gpu_info);
-  EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  // Since SwiftShader was enabled by first gpu_info,  UpdateGpuInfo
-  // should have failed and SwiftShader should still be active
-  EXPECT_EQ(manager->ShouldUseSwiftShader()
-                ? static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES)
-                : 0u,
-            manager->GetBlacklistedFeatureCount());
-}
-
 TEST_F(GpuDataManagerImplPrivateTest, DisableHardwareAcceleration) {
   ScopedGpuDataManagerImplPrivate manager;
   const gpu::GpuControlListData kData;
@@ -294,49 +148,6 @@
             manager->GetBlacklistedFeatureCount());
 }
 
-TEST_F(GpuDataManagerImplPrivateTest, SwiftShaderRendering) {
-  // Blacklist, then register SwiftShader.
-  ScopedGpuDataManagerImplPrivate manager;
-  const gpu::GpuControlListData kData;
-  manager->InitializeForTesting(kData, gpu::GPUInfo());
-  EXPECT_EQ(0u, manager->GetBlacklistedFeatureCount());
-  EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  EXPECT_FALSE(manager->ShouldUseSwiftShader());
-
-  manager->DisableHardwareAcceleration();
-  EXPECT_EQ(manager->ShouldUseSwiftShader(),
-            manager->GpuAccessAllowed(nullptr));
-  EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-            manager->GetBlacklistedFeatureCount());
-  EXPECT_TRUE(manager->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2));
-}
-
-TEST_F(GpuDataManagerImplPrivateTest, SwiftShaderRendering2) {
-  // Register SwiftShader, then blacklist.
-  ScopedGpuDataManagerImplPrivate manager;
-  const gpu::GpuControlListData kData;
-  manager->InitializeForTesting(kData, gpu::GPUInfo());
-  EXPECT_EQ(0u, manager->GetBlacklistedFeatureCount());
-  EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  EXPECT_FALSE(manager->ShouldUseSwiftShader());
-
-  manager->DisableHardwareAcceleration();
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  } else {
-    EXPECT_FALSE(manager->GpuAccessAllowed(nullptr));
-  }
-  EXPECT_EQ(static_cast<size_t>(gpu::NUMBER_OF_GPU_FEATURE_TYPES),
-            manager->GetBlacklistedFeatureCount());
-  EXPECT_TRUE(manager->IsFeatureBlacklisted(
-      gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
-  EXPECT_TRUE(
-      manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2));
-}
-
 TEST_F(GpuDataManagerImplPrivateTest, GpuInfoUpdate) {
   ScopedGpuDataManagerImpl manager;
 
@@ -358,45 +169,6 @@
   EXPECT_TRUE(observer.gpu_info_updated());
 }
 
-TEST_F(GpuDataManagerImplPrivateTest, NoGpuInfoUpdateWithSwiftShader) {
-  ScopedGpuDataManagerImpl manager;
-  const gpu::GpuControlListData kData;
-  manager->InitializeForTesting(kData, gpu::GPUInfo());
-
-  manager->DisableHardwareAcceleration();
-  if (manager->ShouldUseSwiftShader()) {
-    EXPECT_TRUE(manager->GpuAccessAllowed(nullptr));
-  } else {
-    EXPECT_FALSE(manager->GpuAccessAllowed(nullptr));
-  }
-
-  {
-    base::RunLoop run_loop;
-    run_loop.RunUntilIdle();
-  }
-
-  TestObserver observer;
-  manager->AddObserver(&observer);
-  {
-    base::RunLoop run_loop;
-    run_loop.RunUntilIdle();
-  }
-  EXPECT_FALSE(observer.gpu_info_updated());
-
-  gpu::GPUInfo gpu_info;
-  manager->UpdateGpuInfo(gpu_info);
-  {
-    base::RunLoop run_loop;
-    run_loop.RunUntilIdle();
-  }
-  if (manager->ShouldUseSwiftShader()) {
-    // Once SwiftShader is enabled, the gpu info can no longer be updated
-    EXPECT_FALSE(observer.gpu_info_updated());
-  } else {
-    EXPECT_TRUE(observer.gpu_info_updated());
-  }
-}
-
 base::Time GpuDataManagerImplPrivateTest::JustBeforeExpiration(
     const GpuDataManagerImplPrivate* manager) {
   return GetTimeForTesting() + base::TimeDelta::FromMilliseconds(
diff --git a/content/browser/gpu/gpu_feature_checker_impl.cc b/content/browser/gpu/gpu_feature_checker_impl.cc
index 7c3b5f6..271ef924 100644
--- a/content/browser/gpu/gpu_feature_checker_impl.cc
+++ b/content/browser/gpu/gpu_feature_checker_impl.cc
@@ -6,22 +6,11 @@
 
 #include "base/logging.h"
 #include "build/build_config.h"
+#include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/public/browser/browser_thread.h"
-#include "content/public/browser/gpu_data_manager.h"
 
 namespace content {
 
-namespace {
-
-// A false return value is always valid, but a true one is only valid if full
-// GPU info has been collected in a GPU process.
-bool IsFeatureAllowed(GpuDataManager* manager, gpu::GpuFeatureType feature) {
-  return (manager->GpuAccessAllowed(nullptr) &&
-          !manager->IsFeatureBlacklisted(feature));
-}
-
-}  // namespace
-
 // static
 scoped_refptr<GpuFeatureChecker> GpuFeatureChecker::Create(
     gpu::GpuFeatureType feature,
@@ -37,42 +26,21 @@
 
 void GpuFeatureCheckerImpl::CheckGpuFeatureAvailability() {
   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
-  bool finalized = true;
-#if defined(OS_LINUX)
-  // On Windows and Mac, so far we can always make the final WebGL blacklisting
-  // decision based on partial GPU info; on Linux, we need to launch the GPU
-  // process to collect full GPU info and make the final decision.
-  finalized = false;
-#endif
-
-  GpuDataManager* manager = GpuDataManager::GetInstance();
-  if (manager->IsEssentialGpuInfoAvailable())
-    finalized = true;
-
-  bool feature_allowed = IsFeatureAllowed(manager, feature_);
-  if (!feature_allowed)
-    finalized = true;
-
-  if (finalized) {
-    callback_.Run(feature_allowed);
-  } else {
-    // Matched with a Release in OnGpuInfoUpdate.
-    AddRef();
-
-    manager->AddObserver(this);
-    manager->RequestCompleteGpuInfoIfNeeded();
-  }
+  AddRef();  // Matched with a Release in OnGpuInfoUpdate.
+  GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
+  manager->AddObserver(this);
+  OnGpuInfoUpdate();
 }
 
 void GpuFeatureCheckerImpl::OnGpuInfoUpdate() {
-  GpuDataManager* manager = GpuDataManager::GetInstance();
-  manager->RemoveObserver(this);
-  bool feature_allowed = IsFeatureAllowed(manager, feature_);
-  callback_.Run(feature_allowed);
-
-  // Matches the AddRef in CheckGpuFeatureAvailability().
-  Release();
+  GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
+  if (manager->IsGpuFeatureInfoAvailable()) {
+    manager->RemoveObserver(this);
+    bool feature_allowed =
+        manager->GetFeatureStatus(feature_) == gpu::kGpuFeatureStatusEnabled;
+    callback_.Run(feature_allowed);
+    Release();  // Matches the AddRef in CheckGpuFeatureAvailability().
+  }
 }
 
 }  // namespace content
diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc
deleted file mode 100644
index e81bef98..0000000
--- a/content/browser/loader/navigation_resource_throttle.cc
+++ /dev/null
@@ -1,395 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/loader/navigation_resource_throttle.h"
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-#include "content/browser/frame_host/navigation_handle_impl.h"
-#include "content/browser/frame_host/navigator.h"
-#include "content/browser/frame_host/render_frame_host_impl.h"
-#include "content/browser/loader/navigation_resource_handler.h"
-#include "content/browser/loader/resource_dispatcher_host_impl.h"
-#include "content/browser/loader/resource_loader.h"
-#include "content/browser/loader/resource_request_info_impl.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/navigation_data.h"
-#include "content/public/browser/resource_context.h"
-#include "content/public/browser/resource_dispatcher_host_delegate.h"
-#include "content/public/browser/resource_request_info.h"
-#include "content/public/browser/ssl_status.h"
-#include "content/public/common/referrer.h"
-#include "net/url_request/redirect_info.h"
-#include "net/url_request/url_request.h"
-#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_job_factory.h"
-#include "ui/base/page_transition_types.h"
-
-namespace content {
-
-namespace {
-
-// Used in unit tests to make UI thread checks succeed even if there is no
-// NavigationHandle.
-bool g_ui_checks_always_succeed = false;
-
-// Used in unit tests to transfer all navigations.
-bool g_force_transfer = false;
-
-typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)>
-    UIChecksPerformedCallback;
-
-void SendCheckResultToIOThread(UIChecksPerformedCallback callback,
-                               NavigationThrottle::ThrottleCheckResult result) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  DCHECK_NE(result.action(), NavigationThrottle::DEFER);
-  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-                          base::BindOnce(callback, result));
-}
-
-// Returns the NavigationHandle to use for a navigation in the frame specified
-// by |render_process_id| and |render_frame_host_id|. If not found, |callback|
-// will be invoked to cancel the request.
-//
-// Note: in unit test |callback| may be invoked with a value of proceed if no
-// handle is found. This happens when
-// NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing is
-// called with a value of true.
-NavigationHandleImpl* FindNavigationHandle(
-    int render_process_id,
-    int render_frame_host_id,
-    const UIChecksPerformedCallback& callback) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
-  if (g_ui_checks_always_succeed) {
-    SendCheckResultToIOThread(callback, NavigationThrottle::PROCEED);
-    return nullptr;
-  }
-
-  RenderFrameHostImpl* render_frame_host =
-      RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id);
-  if (!render_frame_host) {
-    SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL);
-    return nullptr;
-  }
-
-  NavigationHandleImpl* navigation_handle =
-      render_frame_host->navigation_handle();
-  if (!navigation_handle) {
-    SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL);
-    return nullptr;
-  }
-  return navigation_handle;
-}
-
-void CheckWillStartRequestOnUIThread(
-    UIChecksPerformedCallback callback,
-    int render_process_id,
-    int render_frame_host_id,
-    const std::string& method,
-    const scoped_refptr<content::ResourceRequestBody>& resource_request_body,
-    const Referrer& sanitized_referrer,
-    bool has_user_gesture,
-    ui::PageTransition transition,
-    bool is_external_protocol,
-    RequestContextType request_context_type,
-    blink::WebMixedContentContextType mixed_content_context_type) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  NavigationHandleImpl* navigation_handle =
-      FindNavigationHandle(render_process_id, render_frame_host_id, callback);
-  if (!navigation_handle)
-    return;
-
-  navigation_handle->WillStartRequest(
-      method, resource_request_body, sanitized_referrer, has_user_gesture,
-      transition, is_external_protocol, request_context_type,
-      mixed_content_context_type,
-      base::Bind(&SendCheckResultToIOThread, callback));
-}
-
-void CheckWillRedirectRequestOnUIThread(
-    UIChecksPerformedCallback callback,
-    int render_process_id,
-    int render_frame_host_id,
-    const GURL& new_url,
-    const std::string& new_method,
-    const GURL& new_referrer_url,
-    bool new_is_external_protocol,
-    scoped_refptr<net::HttpResponseHeaders> headers,
-    net::HttpResponseInfo::ConnectionInfo connection_info) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  NavigationHandleImpl* navigation_handle =
-      FindNavigationHandle(render_process_id, render_frame_host_id, callback);
-  if (!navigation_handle)
-    return;
-
-  GURL new_validated_url(new_url);
-  RenderProcessHost::FromID(render_process_id)
-      ->FilterURL(false, &new_validated_url);
-  navigation_handle->WillRedirectRequest(
-      new_validated_url, new_method, new_referrer_url, new_is_external_protocol,
-      headers, connection_info, nullptr,
-      base::Bind(&SendCheckResultToIOThread, callback));
-}
-
-void WillProcessResponseOnUIThread(
-    UIChecksPerformedCallback callback,
-    int render_process_id,
-    int render_frame_host_id,
-    scoped_refptr<net::HttpResponseHeaders> headers,
-    net::HttpResponseInfo::ConnectionInfo connection_info,
-    const net::HostPortPair& socket_address,
-    const net::SSLInfo& ssl_info,
-    const GlobalRequestID& request_id,
-    bool should_replace_current_entry,
-    bool is_download,
-    bool is_stream,
-    const base::Closure& transfer_callback,
-    std::unique_ptr<NavigationData> navigation_data) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
-  if (g_force_transfer) {
-    BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, transfer_callback);
-  }
-
-  NavigationHandleImpl* navigation_handle =
-      FindNavigationHandle(render_process_id, render_frame_host_id, callback);
-  if (!navigation_handle)
-    return;
-
-  if (navigation_data)
-    navigation_handle->set_navigation_data(std::move(navigation_data));
-
-  RenderFrameHostImpl* render_frame_host =
-      RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id);
-  DCHECK(render_frame_host);
-  navigation_handle->WillProcessResponse(
-      render_frame_host, headers, connection_info, socket_address, ssl_info,
-      request_id, should_replace_current_entry, is_download, is_stream,
-      transfer_callback, base::Bind(&SendCheckResultToIOThread, callback));
-}
-
-}  // namespace
-
-NavigationResourceThrottle::NavigationResourceThrottle(
-    net::URLRequest* request,
-    ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate,
-    RequestContextType request_context_type,
-    blink::WebMixedContentContextType mixed_content_context_type)
-    : request_(request),
-      resource_dispatcher_host_delegate_(resource_dispatcher_host_delegate),
-      request_context_type_(request_context_type),
-      mixed_content_context_type_(mixed_content_context_type),
-      in_cross_site_transition_(false),
-      on_transfer_done_result_(NavigationThrottle::DEFER),
-      weak_ptr_factory_(this) {}
-
-NavigationResourceThrottle::~NavigationResourceThrottle() {}
-
-void NavigationResourceThrottle::WillStartRequest(bool* defer) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  const ResourceRequestInfoImpl* info =
-      ResourceRequestInfoImpl::ForRequest(request_);
-  if (!info)
-    return;
-
-  int render_process_id, render_frame_id;
-  if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_id))
-    return;
-
-  bool is_external_protocol =
-      request_->url().is_valid() &&
-      !info->GetContext()
-           ->GetRequestContext()
-           ->job_factory()
-           ->IsHandledProtocol(request_->url().scheme());
-  UIChecksPerformedCallback callback =
-      base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed,
-                 weak_ptr_factory_.GetWeakPtr());
-  DCHECK(request_->method() == "POST" || request_->method() == "GET");
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(
-          &CheckWillStartRequestOnUIThread, callback, render_process_id,
-          render_frame_id, request_->method(), info->body(),
-          Referrer::SanitizeForRequest(
-              request_->url(),
-              Referrer(GURL(request_->referrer()), info->GetReferrerPolicy())),
-          info->HasUserGesture(), info->GetPageTransition(),
-          is_external_protocol, request_context_type_,
-          mixed_content_context_type_));
-  *defer = true;
-}
-
-void NavigationResourceThrottle::WillRedirectRequest(
-    const net::RedirectInfo& redirect_info,
-    bool* defer) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request_);
-  if (!info)
-    return;
-
-  if (redirect_info.new_method != "POST")
-    info->ResetBody();
-
-  int render_process_id, render_frame_id;
-  if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_id))
-    return;
-
-  bool new_is_external_protocol =
-      request_->url().is_valid() &&
-      !info->GetContext()
-           ->GetRequestContext()
-           ->job_factory()
-           ->IsHandledProtocol(request_->url().scheme());
-  DCHECK(redirect_info.new_method == "POST" ||
-         redirect_info.new_method == "GET");
-  UIChecksPerformedCallback callback =
-      base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed,
-                 weak_ptr_factory_.GetWeakPtr());
-
-  // Send the redirect info to the NavigationHandle on the UI thread.
-  // Note: to avoid threading issues, a copy of the HttpResponseHeaders is sent
-  // in lieu of the original.
-  scoped_refptr<net::HttpResponseHeaders> response_headers;
-  if (request_->response_headers()) {
-    response_headers = new net::HttpResponseHeaders(
-        request_->response_headers()->raw_headers());
-  }
-
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&CheckWillRedirectRequestOnUIThread, callback,
-                     render_process_id, render_frame_id, redirect_info.new_url,
-                     redirect_info.new_method, GURL(redirect_info.new_referrer),
-                     new_is_external_protocol, response_headers,
-                     request_->response_info().connection_info));
-  *defer = true;
-}
-
-void NavigationResourceThrottle::WillProcessResponse(bool* defer) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  const ResourceRequestInfoImpl* info =
-      ResourceRequestInfoImpl::ForRequest(request_);
-  if (!info)
-    return;
-
-  int render_process_id, render_frame_id;
-  if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_id))
-    return;
-
-  // Send a copy of the response headers to the NavigationHandle on the UI
-  // thread.
-  scoped_refptr<net::HttpResponseHeaders> response_headers;
-  if (request_->response_headers()) {
-    response_headers = new net::HttpResponseHeaders(
-        request_->response_headers()->raw_headers());
-  }
-
-  std::unique_ptr<NavigationData> cloned_data;
-  if (resource_dispatcher_host_delegate_) {
-    // Ask the embedder for a NavigationData instance.
-    NavigationData* navigation_data =
-        resource_dispatcher_host_delegate_->GetNavigationData(request_);
-
-    // Clone the embedder's NavigationData before moving it to the UI thread.
-    if (navigation_data)
-      cloned_data = navigation_data->Clone();
-  }
-
-  UIChecksPerformedCallback callback =
-      base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed,
-                 weak_ptr_factory_.GetWeakPtr());
-  base::Closure transfer_callback =
-      base::Bind(&NavigationResourceThrottle::InitiateTransfer,
-                 weak_ptr_factory_.GetWeakPtr());
-
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&WillProcessResponseOnUIThread, callback,
-                     render_process_id, render_frame_id, response_headers,
-                     request_->response_info().connection_info,
-                     request_->response_info().socket_address,
-                     request_->ssl_info(), info->GetGlobalRequestID(),
-                     info->should_replace_current_entry(), info->IsDownload(),
-                     info->is_stream(), transfer_callback,
-                     base::Passed(&cloned_data)));
-  *defer = true;
-}
-
-const char* NavigationResourceThrottle::GetNameForLogging() const {
-  return "NavigationResourceThrottle";
-}
-
-void NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(
-    bool ui_checks_always_succeed) {
-  g_ui_checks_always_succeed = ui_checks_always_succeed;
-}
-
-void NavigationResourceThrottle::set_force_transfer_for_testing(
-    bool force_transfer) {
-  g_force_transfer = force_transfer;
-}
-
-void NavigationResourceThrottle::OnUIChecksPerformed(
-    NavigationThrottle::ThrottleCheckResult result) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  DCHECK_NE(NavigationThrottle::DEFER, result.action());
-  if (in_cross_site_transition_) {
-    on_transfer_done_result_ = result;
-    return;
-  }
-
-  if (result.action() == NavigationThrottle::CANCEL_AND_IGNORE ||
-      result.action() == NavigationThrottle::CANCEL) {
-    Cancel();
-  } else if (result.action() == NavigationThrottle::BLOCK_REQUEST ||
-             result.action() ==
-                 NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE) {
-    CancelWithError(net::ERR_BLOCKED_BY_CLIENT);
-  } else if (result.action() == NavigationThrottle::BLOCK_RESPONSE) {
-    // TODO(mkwst): If we cancel the main frame request with anything other than
-    // 'net::ERR_ABORTED', we'll trigger some special behavior that might not be
-    // desirable here (non-POSTs will reload the page, while POST has some logic
-    // around reloading to avoid duplicating actions server-side). For the
-    // moment, only child frame navigations should be blocked. If we need to
-    // block main frame navigations in the future, we'll need to carefully
-    // consider the right thing to do here.
-    DCHECK(!ResourceRequestInfo::ForRequest(request_)->IsMainFrame());
-    CancelWithError(net::ERR_BLOCKED_BY_RESPONSE);
-  } else {
-    Resume();
-  }
-}
-
-void NavigationResourceThrottle::InitiateTransfer() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  in_cross_site_transition_ = true;
-  ResourceRequestInfoImpl* info =
-      ResourceRequestInfoImpl::ForRequest(request_);
-  ResourceDispatcherHostImpl::Get()->MarkAsTransferredNavigation(
-      info->GetGlobalRequestID(),
-      base::Bind(&NavigationResourceThrottle::OnTransferComplete,
-                 weak_ptr_factory_.GetWeakPtr()));
-}
-
-void NavigationResourceThrottle::OnTransferComplete() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  DCHECK(in_cross_site_transition_);
-  in_cross_site_transition_ = false;
-
-  // If the results of the checks on the UI thread are known, unblock the
-  // navigation. Otherwise, wait until the callback has executed.
-  if (on_transfer_done_result_.action() != NavigationThrottle::DEFER) {
-    OnUIChecksPerformed(on_transfer_done_result_);
-    on_transfer_done_result_ = NavigationThrottle::DEFER;
-  }
-}
-
-}  // namespace content
diff --git a/content/browser/loader/navigation_resource_throttle.h b/content/browser/loader/navigation_resource_throttle.h
deleted file mode 100644
index 62db169..0000000
--- a/content/browser/loader/navigation_resource_throttle.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_THROTTLE_H_
-#define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_THROTTLE_H_
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/navigation_throttle.h"
-#include "content/public/browser/resource_throttle.h"
-#include "content/public/common/request_context_type.h"
-#include "third_party/WebKit/public/platform/WebMixedContentContextType.h"
-
-namespace net {
-class URLRequest;
-}
-
-namespace content {
-class ResourceDispatcherHostDelegate;
-
-// This ResourceThrottle is used to convey throttling information to the UI
-// thread during navigations. The UI thread can then use its NavigationThrottle
-// mechanism to interact with the navigation.
-class NavigationResourceThrottle : public ResourceThrottle {
- public:
-  NavigationResourceThrottle(
-      net::URLRequest* request,
-      ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate,
-      RequestContextType request_context_type,
-      blink::WebMixedContentContextType mixed_content_context_type);
-  ~NavigationResourceThrottle() override;
-
-  // ResourceThrottle overrides:
-  void WillStartRequest(bool* defer) override;
-  void WillRedirectRequest(const net::RedirectInfo& redirect_info,
-                           bool* defer) override;
-  void WillProcessResponse(bool* defer) override;
-  const char* GetNameForLogging() const override;
-
-  // Used in unit tests to make UI checks pass when they would fail due to no
-  // NavigationHandle being present in the RenderFrameHost.
-  CONTENT_EXPORT static void set_ui_checks_always_succeed_for_testing(
-      bool ui_checks_always_succeed);
-
-  // Used in unit tests to make all navigations transfer.
-  CONTENT_EXPORT static void set_force_transfer_for_testing(
-      bool force_transfer);
-
- private:
-  void OnUIChecksPerformed(NavigationThrottle::ThrottleCheckResult result);
-
-  // Used in transfer navigations.
-  void InitiateTransfer();
-  void OnTransferComplete();
-
-  net::URLRequest* request_;
-  ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_;
-  RequestContextType request_context_type_;
-  blink::WebMixedContentContextType mixed_content_context_type_;
-  bool in_cross_site_transition_;
-  NavigationThrottle::ThrottleCheckResult on_transfer_done_result_;
-
-  base::WeakPtrFactory<NavigationResourceThrottle> weak_ptr_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(NavigationResourceThrottle);
-};
-
-}  // namespace content
-
-#endif  // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_THROTTLE_H_
diff --git a/content/browser/loader/navigation_url_loader_network_service.cc b/content/browser/loader/navigation_url_loader_network_service.cc
index 42a161e..57328a4 100644
--- a/content/browser/loader/navigation_url_loader_network_service.cc
+++ b/content/browser/loader/navigation_url_loader_network_service.cc
@@ -17,7 +17,6 @@
 #include "content/browser/frame_host/frame_tree_node.h"
 #include "content/browser/frame_host/navigation_request_info.h"
 #include "content/browser/loader/navigation_resource_handler.h"
-#include "content/browser/loader/navigation_resource_throttle.h"
 #include "content/browser/loader/navigation_url_loader_delegate.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/loader/url_loader_request_handler.h"
diff --git a/content/browser/loader/navigation_url_loader_network_service_unittest.cc b/content/browser/loader/navigation_url_loader_network_service_unittest.cc
index 75552a79..c3a220c 100644
--- a/content/browser/loader/navigation_url_loader_network_service_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_network_service_unittest.cc
@@ -78,9 +78,6 @@
  public:
   NavigationURLLoaderNetworkServiceTest()
       : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP) {
-    // NavigationURLLoader is only used for browser-side navigations.
-    base::CommandLine::ForCurrentProcess()->AppendSwitch(
-        switches::kEnableBrowserSideNavigation);
     feature_list_.InitAndEnableFeature(features::kNetworkService);
 
     // Because the network service is enabled we need a ServiceManagerConnection
diff --git a/content/browser/loader/navigation_url_loader_unittest.cc b/content/browser/loader/navigation_url_loader_unittest.cc
index 3a134214..f469ad0 100644
--- a/content/browser/loader/navigation_url_loader_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_unittest.cc
@@ -134,10 +134,6 @@
     job_factory_.SetProtocolHandler(
         "download", std::make_unique<DownloadProtocolHandler>());
     request_context->set_job_factory(&job_factory_);
-
-    // NavigationURLLoader is only used for browser-side navigations.
-    base::CommandLine::ForCurrentProcess()->AppendSwitch(
-        switches::kEnableBrowserSideNavigation);
   }
 
   std::unique_ptr<NavigationURLLoader> MakeTestLoader(
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index a677791..c34b6ee 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -51,7 +51,6 @@
 #include "content/browser/loader/mime_sniffing_resource_handler.h"
 #include "content/browser/loader/mojo_async_resource_handler.h"
 #include "content/browser/loader/navigation_resource_handler.h"
-#include "content/browser/loader/navigation_resource_throttle.h"
 #include "content/browser/loader/navigation_url_loader_impl_core.h"
 #include "content/browser/loader/null_resource_controller.h"
 #include "content/browser/loader/redirect_to_file_resource_handler.h"
@@ -1506,15 +1505,6 @@
 
   std::vector<std::unique_ptr<ResourceThrottle>> throttles;
 
-  // Add a NavigationResourceThrottle for navigations.
-  // PlzNavigate: the throttle is unnecessary as communication with the UI
-  // thread is handled by the NavigationResourceHandler below.
-  if (!IsBrowserSideNavigationEnabled() && IsResourceTypeFrame(resource_type)) {
-    throttles.push_back(std::make_unique<NavigationResourceThrottle>(
-        request, delegate_, fetch_request_context_type,
-        fetch_mixed_content_context_type));
-  }
-
   if (delegate_) {
     delegate_->RequestBeginning(request,
                                 resource_context,
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index 109683c..0546843 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -30,7 +30,6 @@
 #include "content/browser/frame_host/navigation_request_info.h"
 #include "content/browser/loader/detachable_resource_handler.h"
 #include "content/browser/loader/downloaded_temp_file_impl.h"
-#include "content/browser/loader/navigation_resource_throttle.h"
 #include "content/browser/loader/navigation_url_loader.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/loader/resource_loader.h"
@@ -2160,7 +2159,6 @@
 
 // Tests for crbug.com/31266 (Non-2xx + application/octet-stream).
 TEST_F(ResourceDispatcherHostTest, ForbiddenDownload) {
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   std::string raw_headers("HTTP/1.1 403 Forbidden\n"
                           "Content-disposition: attachment; filename=blah\n"
                           "Content-type: application/octet-stream\n\n");
@@ -2176,120 +2174,6 @@
                                      expected_error_code);
 }
 
-// Test for http://crbug.com/76202 .  We don't want to destroy a
-// download request prematurely when processing a cancellation from
-// the renderer.
-TEST_F(ResourceDispatcherHostTest, IgnoreCancelForDownloads) {
-  // PlzNavigate: A request that ends up being a download is a main resource
-  // request. Hence, it has been initiated by the browser and is not associated
-  // with a renderer. Therefore, it cannot be canceled by a renderer IPC.
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Not applicable with --enable-browser-side-navigation.";
-    return;
-  }
-
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  int render_view_id = 0;
-  int request_id = 1;
-
-  std::string raw_headers("HTTP\n"
-                          "Content-disposition: attachment; filename=foo\n\n");
-  std::string response_data("01234567890123456789\x01foobar");
-
-  // Get past sniffing metrics in the MimeTypeResourceHandler.  Note that
-  // if we don't get past the sniffing metrics, the result will be that
-  // the MimeTypeResourceHandler won't have figured out that it's a download,
-  // won't have constructed a DownloadResourceHandler, and and the request will
-  // be successfully canceled below, failing the test.
-  response_data.resize(1025, ' ');
-
-  SetResponse(raw_headers, response_data);
-  job_factory_->SetDelayedCompleteJobGeneration(true);
-  HandleScheme("http");
-
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, request_id,
-      GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-  // Return some data so that the request is identified as a download
-  // and the proper resource handlers are created.
-  content::RunAllTasksUntilIdle();
-  EXPECT_TRUE(net::URLRequestTestJob::ProcessOnePendingMessage());
-
-  // And now simulate a cancellation coming from the renderer.
-  loader = nullptr;
-  content::RunAllTasksUntilIdle();
-
-  // Since the request had already started processing as a download,
-  // the cancellation above should have been ignored and the request
-  // should still be alive.
-  EXPECT_EQ(1, host_.pending_requests());
-
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-  content::RunAllTasksUntilIdle();
-}
-
-TEST_F(ResourceDispatcherHostTest, CancelRequestsForContext) {
-  if (IsBrowserSideNavigationEnabled())
-    return;
-
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-  EXPECT_EQ(0, host_.pending_requests());
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  int render_view_id = 0;
-  int request_id = 1;
-
-  std::string raw_headers("HTTP\n"
-                          "Content-disposition: attachment; filename=foo\n\n");
-  std::string response_data("01234567890123456789\x01foobar");
-  // Get past sniffing metrics.
-  response_data.resize(1025, ' ');
-
-  SetResponse(raw_headers, response_data);
-  job_factory_->SetDelayedCompleteJobGeneration(true);
-  HandleScheme("http");
-
-  const GURL download_url = GURL("http://example.com/blah");
-
-  MakeTestRequestWithResourceType(filter_.get(), render_view_id, request_id,
-                                  download_url, RESOURCE_TYPE_MAIN_FRAME,
-                                  mojo::MakeRequest(&loader),
-                                  client.CreateInterfacePtr());
-
-  // Return some data so that the request is identified as a download
-  // and the proper resource handlers are created.
-  content::RunAllTasksUntilIdle();
-  EXPECT_TRUE(net::URLRequestTestJob::ProcessOnePendingMessage());
-
-  // And now simulate a cancellation coming from the renderer.
-  loader = nullptr;
-  content::RunAllTasksUntilIdle();
-
-  // Since the request had already started processing as a download,
-  // the cancellation above should have been ignored and the request
-  // should still be alive.
-  EXPECT_EQ(1, host_.pending_requests());
-
-  // Cancelling by other methods shouldn't work either.
-  host_.CancelRequestsForProcess(render_view_id);
-  EXPECT_EQ(1, host_.pending_requests());
-
-  // Cancelling by context should work.
-  host_.CancelRequestsForContext(filter_->resource_context());
-  EXPECT_EQ(0, host_.pending_requests());
-
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {
-  }
-  content::RunAllTasksUntilIdle();
-}
-
 TEST_F(ResourceDispatcherHostTest, CancelRequestsForContextDetached) {
   EXPECT_EQ(0, host_.pending_requests());
   mojom::URLLoaderPtr loader;
@@ -2321,460 +2205,7 @@
   EXPECT_EQ(0, host_.pending_requests());
 }
 
-// Test the cancelling of requests that are being transferred to a new renderer
-// due to a redirection.
-TEST_F(ResourceDispatcherHostTest, CancelRequestsForContextTransferred) {
-  // PlzNavigate: there are no transferred requests in PlzNavigate.
-  if (IsBrowserSideNavigationEnabled())
-    return;
-
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  constexpr int request_id = 1;
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-
-  std::string raw_headers("HTTP/1.1 200 OK\n"
-                          "Content-Type: text/html; charset=utf-8\n\n");
-  std::string response_data("<html>foobar</html>");
-
-  SetResponse(raw_headers, response_data);
-  HandleScheme("http");
-
-  MakeWebContentsAssociatedTestRequestWithResourceType(
-      request_id, GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-  content::RunAllTasksUntilIdle();
-
-  GlobalRequestID global_request_id(web_contents_filter_->child_id(),
-                                    request_id);
-  host_.MarkAsTransferredNavigation(global_request_id, base::Closure());
-
-  // And now simulate a cancellation coming from the renderer.
-  loader = nullptr;
-  content::RunAllTasksUntilIdle();
-
-  // Since the request is marked as being transferred,
-  // the cancellation above should have been ignored and the request
-  // should still be alive.
-  EXPECT_EQ(1, host_.pending_requests());
-
-  // Cancelling by other methods shouldn't work either.
-  host_.CancelRequestsForProcess(web_contents_filter_->child_id());
-  EXPECT_EQ(1, host_.pending_requests());
-
-  // Cancelling by context should work.
-  host_.CancelRequestsForContext(web_contents_filter_->resource_context());
-  EXPECT_EQ(0, host_.pending_requests());
-}
-
-// Test transferred navigations with text/html, which doesn't trigger any
-// content sniffing.
-TEST_F(ResourceDispatcherHostTest, TransferNavigationHtml) {
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Test is not applicable with browser side navigation enabled";
-    return;
-  }
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-  NavigationResourceThrottle::set_force_transfer_for_testing(true);
-
-  constexpr int render_view_id = 0;
-  constexpr int request_id = 1;
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-
-  // Configure initial request.
-  SetResponse("HTTP/1.1 302 Found\n"
-              "Location: http://other.com/blech\n\n");
-
-  HandleScheme("http");
-
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, request_id,
-      GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-
-  client.RunUntilRedirectReceived();
-
-  // Now that we're blocked on the redirect, update the response and unblock by
-  // telling the AsyncResourceHandler to follow the redirect.
-  const std::string kResponseBody = "hello world";
-  SetResponse("HTTP/1.1 200 OK\n"
-              "Content-Type: text/html\n\n",
-              kResponseBody);
-  loader->FollowRedirect();
-  content::RunAllTasksUntilIdle();
-
-  // Flush all the pending requests to get the response through the
-  // MimeTypeResourceHandler.
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-
-  // This second filter is used to emulate a second process.
-  scoped_refptr<TestFilter> second_filter = MakeTestFilter();
-
-  constexpr int new_render_view_id = 1;
-  constexpr int new_request_id = 2;
-  mojom::URLLoaderPtr new_loader;
-  TestURLLoaderClient new_client;
-
-  ResourceRequest request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://other.com/blech"));
-  request.transferred_request_child_id = filter_->child_id();
-  request.transferred_request_request_id = request_id;
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader), new_render_view_id, new_request_id,
-      mojom::kURLLoadOptionNone, request, new_client.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-  content::RunAllTasksUntilIdle();
-
-  CheckSuccessfulRequest(&new_client, kResponseBody);
-
-  second_filter->OnChannelClosing();
-}
-
-// Test transferring two navigations with text/html, to ensure the resource
-// accounting works.
-TEST_F(ResourceDispatcherHostTest, TransferTwoNavigationsHtml) {
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Test is not applicable with browser side navigation enabled";
-    return;
-  }
-
-  NavigationResourceThrottle::set_force_transfer_for_testing(true);
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  constexpr int render_view_id = 0;
-  constexpr int request_id = 1;
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-
-  // Configure initial request.
-  const std::string kResponseBody = "hello world";
-  SetResponse("HTTP/1.1 200 OK\n"
-              "Content-Type: text/html\n\n",
-              kResponseBody);
-
-  HandleScheme("http");
-
-  // Make the first request.
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, request_id,
-      GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-
-  // Make a second request from the same process.
-  constexpr int second_request_id = 2;
-  mojom::URLLoaderPtr loader2;
-  TestURLLoaderClient client2;
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, second_request_id,
-      GURL("http://example.com/foo"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader2), client2.CreateInterfacePtr());
-
-  // Flush all the pending requests to get the response through the
-  // MimeTypeResourceHandler.
-  content::RunAllTasksUntilIdle();
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-
-  NavigationResourceThrottle::set_force_transfer_for_testing(false);
-
-  // This second filter is used to emulate a second process.
-  scoped_refptr<TestFilter> second_filter = MakeTestFilter();
-
-  // Transfer the first request.
-  constexpr int new_render_view_id = 1;
-  constexpr int new_request_id = 5;
-  mojom::URLLoaderPtr new_loader;
-  TestURLLoaderClient new_client;
-  ResourceRequest request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://example.com/blah"));
-  request.transferred_request_child_id = filter_->child_id();
-  request.transferred_request_request_id = request_id;
-
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader), new_render_view_id, new_request_id,
-      mojom::kURLLoadOptionNone, request, new_client.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-  content::RunAllTasksUntilIdle();
-
-  // Transfer the second request.
-  constexpr int new_second_request_id = 6;
-  mojom::URLLoaderPtr new_loader2;
-  TestURLLoaderClient new_client2;
-  ResourceRequest second_request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://example.com/foo"));
-  second_request.transferred_request_child_id = filter_->child_id();
-  second_request.transferred_request_request_id = second_request_id;
-
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader2), new_render_view_id,
-      new_second_request_id, mojom::kURLLoadOptionNone, second_request,
-      new_client2.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-  content::RunAllTasksUntilIdle();
-
-  CheckSuccessfulRequest(&new_client, kResponseBody);
-  CheckSuccessfulRequest(&new_client2, kResponseBody);
-
-  second_filter->OnChannelClosing();
-}
-
-// Test transferred navigations with text/plain, which causes
-// MimeTypeResourceHandler to buffer the response to sniff the content before
-// the transfer occurs.
-TEST_F(ResourceDispatcherHostTest, TransferNavigationText) {
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Test is not applicable with browser side navigation enabled";
-    return;
-  }
-
-  NavigationResourceThrottle::set_force_transfer_for_testing(true);
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  constexpr int render_view_id = 0;
-  constexpr int request_id = 1;
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-
-  // Configure initial request.
-  SetResponse("HTTP/1.1 302 Found\n"
-              "Location: http://other.com/blech\n\n");
-
-  HandleScheme("http");
-
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, request_id,
-      GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-
-  client.RunUntilRedirectReceived();
-
-  // Now that we're blocked on the redirect, update the response and unblock by
-  // telling the AsyncResourceHandler to follow the redirect.  Use a text/plain
-  // MIME type, which causes MimeTypeResourceHandler to buffer it before the
-  // transfer occurs.
-  const std::string kResponseBody = "hello world";
-  SetResponse("HTTP/1.1 200 OK\n"
-              "Content-Type: text/plain\n\n",
-              kResponseBody);
-
-  loader->FollowRedirect();
-  content::RunAllTasksUntilIdle();
-
-  // Flush all the pending requests to get the response through the
-  // MimeTypeResourceHandler.
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-  content::RunAllTasksUntilIdle();
-
-  // This second filter is used to emulate a second process.
-  scoped_refptr<TestFilter> second_filter = MakeTestFilter();
-
-  constexpr int new_render_view_id = 1;
-  constexpr int new_request_id = 2;
-  mojom::URLLoaderPtr new_loader;
-  TestURLLoaderClient new_client;
-
-  ResourceRequest request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://other.com/blech"));
-  request.transferred_request_child_id = filter_->child_id();
-  request.transferred_request_request_id = request_id;
-
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader), new_render_view_id, new_request_id,
-      mojom::kURLLoadOptionNone, request, new_client.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-  content::RunAllTasksUntilIdle();
-
-  CheckSuccessfulRequest(&new_client, kResponseBody);
-
-  second_filter->OnChannelClosing();
-}
-
-TEST_F(ResourceDispatcherHostTest, TransferNavigationWithProcessCrash) {
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Test is not applicable with browser side navigation enabled";
-    return;
-  }
-
-  NavigationResourceThrottle::set_force_transfer_for_testing(true);
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  constexpr int render_view_id = 0;
-  constexpr int request_id = 1;
-  int first_child_id = -1;
-
-  // Configure initial request.
-  SetResponse("HTTP/1.1 302 Found\n"
-              "Location: http://other.com/blech\n\n");
-  const std::string kResponseBody = "hello world";
-
-  HandleScheme("http");
-
-  // Create a first filter that can be deleted before the second one starts.
-  {
-    mojom::URLLoaderPtr loader;
-    TestURLLoaderClient client;
-    scoped_refptr<TestFilter> first_filter = MakeTestFilter();
-    first_child_id = first_filter->child_id();
-
-    ResourceRequest first_request = CreateResourceRequest(
-        "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://example.com/blah"));
-
-    first_filter->CreateLoaderAndStart(
-        mojo::MakeRequest(&loader), render_view_id, request_id,
-        mojom::kURLLoadOptionNone, first_request, client.CreateInterfacePtr(),
-        net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-    content::RunAllTasksUntilIdle();
-    client.RunUntilRedirectReceived();
-
-    // Now that we're blocked on the redirect, update the response and unblock
-    // by telling the AsyncResourceHandler to follow the redirect.
-    SetResponse("HTTP/1.1 200 OK\n"
-                "Content-Type: text/html\n\n",
-                kResponseBody);
-
-    loader->FollowRedirect();
-    content::RunAllTasksUntilIdle();
-
-    // Flush all the pending requests to get the response through the
-    // MimeTypeResourceHandler.
-    while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-
-    first_filter->OnChannelClosing();
-  }
-  // The first filter is now deleted, as if the child process died.
-
-  // Make sure we don't hold onto the ResourceMessageFilter after it is deleted.
-  GlobalRequestID first_global_request_id(first_child_id, request_id);
-
-  // This second filter is used to emulate a second process.
-  scoped_refptr<TestFilter> second_filter = MakeTestFilter();
-
-  constexpr int new_render_view_id = 1;
-  constexpr int new_request_id = 2;
-  mojom::URLLoaderPtr new_loader;
-  TestURLLoaderClient new_client;
-
-  ResourceRequest request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://other.com/blech"));
-  request.transferred_request_child_id = first_child_id;
-  request.transferred_request_request_id = request_id;
-
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader), new_render_view_id, new_request_id,
-      mojom::kURLLoadOptionNone, request, new_client.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-
-  // Check generated messages.
-  CheckSuccessfulRequest(&new_client, kResponseBody);
-
-  second_filter->OnChannelClosing();
-}
-
-TEST_F(ResourceDispatcherHostTest, TransferNavigationWithTwoRedirects) {
-  if (IsBrowserSideNavigationEnabled()) {
-    SUCCEED() << "Test is not applicable with browser side navigation enabled";
-    return;
-  }
-
-  NavigationResourceThrottle::set_force_transfer_for_testing(true);
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
-
-  EXPECT_EQ(0, host_.pending_requests());
-
-  constexpr int render_view_id = 0;
-  constexpr int request_id = 1;
-  mojom::URLLoaderPtr loader;
-  TestURLLoaderClient client;
-
-  // Configure initial request.
-  SetResponse("HTTP/1.1 302 Found\n"
-              "Location: http://other.com/blech\n\n");
-
-  HandleScheme("http");
-
-  MakeTestRequestWithResourceType(
-      filter_.get(), render_view_id, request_id,
-      GURL("http://example.com/blah"), RESOURCE_TYPE_MAIN_FRAME,
-      mojo::MakeRequest(&loader), client.CreateInterfacePtr());
-
-  client.RunUntilRedirectReceived();
-
-  // Now that we're blocked on the redirect, simulate hitting another redirect.
-  SetResponse("HTTP/1.1 302 Found\n"
-              "Location: http://other.com/blerg\n\n");
-  client.ClearHasReceivedRedirect();
-
-  loader->FollowRedirect();
-  content::RunAllTasksUntilIdle();
-
-  client.RunUntilRedirectReceived();
-
-  // Now that we're blocked on the second redirect, update the response and
-  // unblock by telling the AsyncResourceHandler to follow the redirect.
-  // Again, use text/plain to force MimeTypeResourceHandler to buffer before
-  // the transfer.
-  const std::string kResponseBody = "hello world";
-  SetResponse("HTTP/1.1 200 OK\n"
-              "Content-Type: text/plain\n\n",
-              kResponseBody);
-
-  loader->FollowRedirect();
-  content::RunAllTasksUntilIdle();
-
-  // Flush all the pending requests to get the response through the
-  // MimeTypeResourceHandler.
-  while (net::URLRequestTestJob::ProcessOnePendingMessage()) {}
-  content::RunAllTasksUntilIdle();
-
-  // This second filter is used to emulate a second process.
-  scoped_refptr<TestFilter> second_filter = MakeTestFilter();
-
-  constexpr int new_render_view_id = 1;
-  constexpr int new_request_id = 2;
-  mojom::URLLoaderPtr new_loader;
-  TestURLLoaderClient new_client;
-
-  ResourceRequest request = CreateResourceRequest(
-      "GET", RESOURCE_TYPE_MAIN_FRAME, GURL("http://other.com/blech"));
-  request.transferred_request_child_id = filter_->child_id();
-  request.transferred_request_request_id = request_id;
-
-  second_filter->CreateLoaderAndStart(
-      mojo::MakeRequest(&new_loader), new_render_view_id, new_request_id,
-      mojom::kURLLoadOptionNone, request, new_client.CreateInterfacePtr(),
-      net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS));
-
-  // Verify that we update the ResourceRequestInfo.
-  GlobalRequestID global_request_id(second_filter->child_id(), new_request_id);
-  ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(
-      host_.GetURLRequest(global_request_id));
-  EXPECT_EQ(second_filter->child_id(), info->GetChildID());
-  EXPECT_EQ(new_render_view_id, info->GetRouteID());
-  EXPECT_EQ(new_request_id, info->GetRequestID());
-  EXPECT_EQ(second_filter.get(), info->requester_info()->filter());
-
-  // Let request complete.
-  content::RunAllTasksUntilIdle();
-
-  CheckSuccessfulRequest(&new_client, kResponseBody);
-
-  second_filter->OnChannelClosing();
-}
-
 TEST_F(ResourceDispatcherHostTest, UnknownURLScheme) {
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   EXPECT_EQ(0, host_.pending_requests());
 
   HandleScheme("http");
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index 6a44b62..89e09fc 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -67,16 +67,14 @@
 
 // Based on the field trial parameters, this feature will override the value of
 // the maximum number of delayable requests allowed in flight. The number of
-// delayable requests allowed in flight will be based on the BDP ranges and the
+// delayable requests allowed in flight will be based on the network's
+// effective connection type ranges and the
 // corresponding number of delayable requests in flight specified in the
 // experiment configuration. Based on field trial parameters, this experiment
 // may also throttle delayable requests based on the number of non-delayable
-// requests in-flight times a weighting factor. The experiment is enabled only
-// when the effective connection type is strictly greater than
-// net::EFFECTIVE_CONNECTION_TYPE_OFFLINE and less than or equal to the maximum
-// effective connection type in the configuration.
-const base::Feature kThrottleDelayble{"ThrottleDelayable",
-                                      base::FEATURE_DISABLED_BY_DEFAULT};
+// requests in-flight times a weighting factor.
+const base::Feature kThrottleDelayable{"ThrottleDelayable",
+                                       base::FEATURE_DISABLED_BY_DEFAULT};
 
 enum StartMode {
   START_SYNC,
@@ -421,8 +419,9 @@
         did_scheduler_yield_(false),
         network_quality_estimator_(network_quality_estimator),
         max_delayable_requests_(
-            resource_scheduler->throttle_delayable_.GetMaxDelayableRequests(
-                network_quality_estimator)),
+            resource_scheduler->throttle_delayable_
+                .GetParamsForNetworkQuality(network_quality_estimator)
+                .max_delayable_requests),
         resource_scheduler_(resource_scheduler),
         weak_ptr_factory_(this) {
     if (base::FeatureList::IsEnabled(
@@ -507,8 +506,9 @@
 
     is_loaded_ = false;
     max_delayable_requests_ =
-        resource_scheduler_->throttle_delayable_.GetMaxDelayableRequests(
-            network_quality_estimator_);
+        resource_scheduler_->throttle_delayable_
+            .GetParamsForNetworkQuality(network_quality_estimator_)
+            .max_delayable_requests;
   }
 
   void OnWillInsertBody() {
@@ -840,8 +840,9 @@
     // Delayable requests.
     DCHECK_GE(in_flight_requests_.size(), in_flight_delayable_count_);
     size_t num_non_delayable_requests_weighted = static_cast<size_t>(
-        resource_scheduler_->throttle_delayable_.GetCurrentNonDelayableWeight(
-            network_quality_estimator_) *
+        resource_scheduler_->throttle_delayable_
+            .GetParamsForNetworkQuality(network_quality_estimator_)
+            .non_delayable_weight *
         (in_flight_requests_.size() - in_flight_delayable_count_));
     if ((in_flight_delayable_count_ + num_non_delayable_requests_weighted >=
          max_delayable_requests_)) {
@@ -1245,98 +1246,73 @@
   return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id;
 }
 
-ResourceScheduler::ThrottleDelayble::ThrottleDelayble()
-    : max_requests_for_bdp_ranges_(GetMaxRequestsForBDPRanges()),
-      max_effective_connection_type_(
-          net::GetEffectiveConnectionTypeForName(
-              base::GetFieldTrialParamValueByFeature(
-                  kThrottleDelayble,
-                  "MaxEffectiveConnectionType"))
-              .value_or(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN)),
-      non_delayable_weight_(
-          base::GetFieldTrialParamByFeatureAsDouble(kThrottleDelayble,
-                                                    "NonDelayableWeight",
-                                                    0.0)) {}
+ResourceScheduler::ThrottleDelayable::ThrottleDelayable()
+    : params_for_network_quality_container_(
+          GetParamsForNetworkQualityContainer()) {}
 
-ResourceScheduler::ThrottleDelayble::~ThrottleDelayble() {}
+ResourceScheduler::ThrottleDelayable::~ThrottleDelayable() {}
 
-size_t ResourceScheduler::ThrottleDelayble::GetMaxDelayableRequests(
+ResourceScheduler::ParamsForNetworkQuality
+ResourceScheduler::ThrottleDelayable::GetParamsForNetworkQuality(
     const net::NetworkQualityEstimator* network_quality_estimator) const {
-  if (max_requests_for_bdp_ranges_.empty() || !network_quality_estimator)
-    return kDefaultMaxNumDelayableRequestsPerClient;
+  if (network_quality_estimator) {
+    net::EffectiveConnectionType effective_connection_type =
+        network_quality_estimator->GetEffectiveConnectionType();
 
-  if (network_quality_estimator->GetEffectiveConnectionType() >
-          max_effective_connection_type_ ||
-      network_quality_estimator->GetEffectiveConnectionType() <=
-          net::EFFECTIVE_CONNECTION_TYPE_OFFLINE) {
-    return kDefaultMaxNumDelayableRequestsPerClient;
+    for (const auto& range : params_for_network_quality_container_) {
+      if (effective_connection_type == range.effective_connection_type) {
+        return range;
+      }
+    }
   }
 
-  base::Optional<int32_t> bdp_kbits =
-      network_quality_estimator->GetBandwidthDelayProductKbits();
-  if (!bdp_kbits)
-    return kDefaultMaxNumDelayableRequestsPerClient;
-
-  for (const auto& range : max_requests_for_bdp_ranges_) {
-    if (bdp_kbits.value() <= range.max_bdp_kbits)
-      return range.max_requests;
-  }
-  return kDefaultMaxNumDelayableRequestsPerClient;
+  return ResourceScheduler::ParamsForNetworkQuality{
+      net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
+      kDefaultMaxNumDelayableRequestsPerClient, 0.0};
 }
 
-double ResourceScheduler::ThrottleDelayble::GetCurrentNonDelayableWeight(
-    const net::NetworkQualityEstimator* network_quality_estimator) const {
-  if (!network_quality_estimator) {
-    // Fall back to default behavior by setting the weight of non-delayable
-    // requests to 0 when |network_quality_estimator| is not set.
-    return 0.0;
-  }
-  net::EffectiveConnectionType effective_connection_type =
-      network_quality_estimator->GetEffectiveConnectionType();
-  if (effective_connection_type > max_effective_connection_type_ ||
-      effective_connection_type <= net::EFFECTIVE_CONNECTION_TYPE_OFFLINE) {
-    // If the effective connection type is detected as offline or unknown, or
-    // strictly better than the maximum effective connection type set in the
-    // experiment parameters, fall back to the default behavior.
-    return 0.0;
-  }
-  return non_delayable_weight_;
-}
+ResourceScheduler::ParamsForNetworkQualityContainer
+ResourceScheduler::ThrottleDelayable::GetParamsForNetworkQualityContainer() {
+  static const char kMaxDelayableRequestsBase[] = "MaxDelayableRequests";
+  static const char kEffectiveConnectionTypeBase[] = "EffectiveConnectionType";
+  static const char kNonDelayableWeightBase[] = "NonDelayableWeight";
 
-ResourceScheduler::MaxRequestsForBDPRanges
-ResourceScheduler::ThrottleDelayble::GetMaxRequestsForBDPRanges() {
-  const char max_bdp_kbits_base[] = "MaxBDPKbits";
-  const char max_delayable_requests_base[] = "MaxDelayableRequests";
-
-  MaxRequestsForBDPRanges result;
-  if (!base::FeatureList::IsEnabled(kThrottleDelayble))
+  ParamsForNetworkQualityContainer result;
+  if (!base::FeatureList::IsEnabled(kThrottleDelayable))
     return result;
 
   int config_param_index = 1;
   while (true) {
-    int64_t max_bdp_kbits;
     size_t max_delayable_requests;
 
-    if (!base::StringToInt64(
-            base::GetFieldTrialParamValueByFeature(
-                kThrottleDelayble,
-                max_bdp_kbits_base + base::IntToString(config_param_index)),
-            &max_bdp_kbits)) {
-      DCHECK_LE(result.size(), 20u);
-      return result;
-    }
     if (!base::StringToSizeT(
             base::GetFieldTrialParamValueByFeature(
-                kThrottleDelayble, max_delayable_requests_base +
-                                       base::IntToString(config_param_index)),
+                kThrottleDelayable, kMaxDelayableRequestsBase +
+                                        base::IntToString(config_param_index)),
             &max_delayable_requests)) {
       DCHECK_LE(result.size(), 20u);
       return result;
     }
-    // Check that the previous bandwidth delay product is strictly less than the
-    // current bandwidth delay product.
-    DCHECK(result.empty() || result.back().max_bdp_kbits < max_bdp_kbits);
-    result.push_back({max_bdp_kbits, max_delayable_requests});
+
+    base::Optional<net::EffectiveConnectionType> effective_connection_type =
+        net::GetEffectiveConnectionTypeForName(
+            base::GetFieldTrialParamValueByFeature(
+                kThrottleDelayable, kEffectiveConnectionTypeBase +
+                                        base::IntToString(config_param_index)));
+    if (!effective_connection_type)
+      return result;
+
+    double non_delayable_weight;
+    if (!base::StringToDouble(
+            base::GetFieldTrialParamValueByFeature(
+                kThrottleDelayable, kNonDelayableWeightBase +
+                                        base::IntToString(config_param_index)),
+            &non_delayable_weight)) {
+      return result;
+    }
+
+    result.push_back({effective_connection_type.value(), max_delayable_requests,
+                      non_delayable_weight});
     config_param_index++;
   }
 }
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index 15520f4..f4e7cdf 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -66,14 +66,20 @@
 // the URLRequest.
 class CONTENT_EXPORT ResourceScheduler {
  public:
-  // A struct that stores a bandwidth delay product (BDP) and the maximum number
-  // of delayable requests when the observed BDP is below (inclusive) the
-  // specified BDP.
-  struct MaxRequestsForBDPRange {
-    int64_t max_bdp_kbits;
-    size_t max_requests;
+  // A struct that stores the Network Quality values and loading parameters when
+  // the observed Network Quality matches the specified network quality value.
+  struct ParamsForNetworkQuality {
+    // The observed Effective Connection Type (ECT) should be
+    // |effective_connection_type| for the loading parameters specified in this
+    // struct to apply.
+    net::EffectiveConnectionType effective_connection_type;
+    // The maximum number of delayable requests allowed.
+    size_t max_delayable_requests;
+    // The weight of a non-delayable request when counting the effective number
+    // of non-delayable requests in-flight.
+    double non_delayable_weight;
   };
-  typedef std::vector<MaxRequestsForBDPRange> MaxRequestsForBDPRanges;
+  typedef std::vector<ParamsForNetworkQuality> ParamsForNetworkQualityContainer;
 
   explicit ResourceScheduler(bool enabled);
   ~ResourceScheduler();
@@ -134,9 +140,9 @@
                            net::RequestPriority new_priority);
 
   // Public for tests.
-  static MaxRequestsForBDPRanges
-  GetMaxDelayableRequestsExperimentConfigForTests() {
-    return ThrottleDelayble::GetMaxRequestsForBDPRanges();
+  static ParamsForNetworkQualityContainer
+  GetParamsForNetworkQualityContainerForTests() {
+    return ThrottleDelayable::GetParamsForNetworkQualityContainer();
   }
 
   bool priority_requests_delayable() const {
@@ -180,30 +186,17 @@
   };
 
   // Experiment parameters and helper functions for varying the maximum number
-  // of delayable requests in-flight based on the observed bandwidth delay
-  // product (BDP), or in the presence of non-delayable requests in-flight.
-  class ThrottleDelayble {
+  // of delayable requests in-flight based on the observed Effective Connection
+  // Type (ECT), or in the presence of non-delayable requests in-flight.
+  class ThrottleDelayable {
    public:
-    ThrottleDelayble();
+    ThrottleDelayable();
+    ~ThrottleDelayable();
 
-    ~ThrottleDelayble();
-
-    // Returns the maximum delayable requests based on the current
-    // value of the bandwidth delay product (BDP). It falls back to the default
-    // limit on three conditions:
-    // 1. |network_quality_estimator| is null.
-    // 2. The current effective connection type is
-    // net::EFFECTIVE_CONNECTION_TYPE_OFFLINE or
-    // net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN.
-    // 3. The current value of the BDP is not in any of the ranges in
-    // |max_requests_for_bdp_ranges_|.
-    size_t GetMaxDelayableRequests(
-        const net::NetworkQualityEstimator* network_quality_estimator) const;
-
-    // This method computes the correct weight for the non-delayable requests
-    // based on the current effective connection type. If it is out of bounds,
-    // it returns 0, effectively disabling the experiment.
-    double GetCurrentNonDelayableWeight(
+    // Returns the parameters for resource loading based on the current
+    // value of the network quality and the parameters set by ThrottleDelayable
+    // experiment.
+    ParamsForNetworkQuality GetParamsForNetworkQuality(
         const net::NetworkQualityEstimator* network_quality_estimator) const;
 
    private:
@@ -211,32 +204,29 @@
     friend class ResourceScheduler;
 
     // Reads experiment parameters and creates a vector  of
-    // |MaxRequestsForBDPRange| to populate |max_requests_for_bdp_ranges_|. It
-    // looks for configuration parameters with sequential numeric suffixes, and
-    // stops looking after the first failure to find an experimetal parameter.
-    // The BDP values are specified in kilobits. A sample configuration is given
-    // below:
-    // "MaxBDPKbits1": "150",
-    // "MaxDelayableRequests1": "2",
-    // "MaxBDPKbits2": "200",
-    // "MaxDelayableRequests2": "4",
-    // "MaxEffectiveConnectionType": "3G"
-    // This config implies that when BDP <= 150, then the maximum number of
-    // non-delayable requests should be limited to 2. When BDP > 150 and <= 200,
-    // it should be limited to 4. For BDP > 200, the default value should be
-    // used.
-    static MaxRequestsForBDPRanges GetMaxRequestsForBDPRanges();
+    // |ParamsForNetworkQualityContainer| to populate
+    // |params_for_network_quality_container_|. It looks for configuration
+    // parameters with sequential numeric suffixes, and stops looking after the
+    // first failure to find an experimetal parameter. A sample configuration is
+    // given below:
+    // "EffectiveConnectionType1": "Slow-2G",
+    // "MaxDelayableRequests1": "6",
+    // "NonDelayableWeight1": "2.0",
+    // "EffectiveConnectionType2": "3G",
+    // "MaxDelayableRequests2": "12",
+    // "NonDelayableWeight2": "3.0",
+    // This config implies that when Effective Connection Type (ECT) is Slow-2G,
+    // then the maximum number of non-delayable requests should be
+    // limited to 6, and the non-delayable request weight should be set to 2.
+    // When ECT is 3G, it should be limited to 12. For all other values of ECT,
+    // the default values should be used.
+    static ParamsForNetworkQualityContainer
+    GetParamsForNetworkQualityContainer();
 
     // The number of delayable requests in-flight for different ranges of the
-    // bandwidth delay product (BDP).
-    const MaxRequestsForBDPRanges max_requests_for_bdp_ranges_;
-
-    // The maximum ECT for which the experiment should be enabled.
-    const net::EffectiveConnectionType max_effective_connection_type_;
-
-    // The weight of a non-delayable request when counting the effective number
-    // of non-delayable requests in-flight.
-    const double non_delayable_weight_;
+    // network quality.
+    const ParamsForNetworkQualityContainer
+        params_for_network_quality_container_;
   };
 
   typedef int64_t ClientId;
@@ -274,7 +264,7 @@
   int max_requests_before_yielding_;
   base::TimeDelta yield_time_;
 
-  const ThrottleDelayble throttle_delayable_;
+  const ThrottleDelayable throttle_delayable_;
 
   // The TaskRunner to post tasks on. Can be overridden for tests.
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc
index 1b72317..918d633 100644
--- a/content/browser/loader/resource_scheduler_unittest.cc
+++ b/content/browser/loader/resource_scheduler_unittest.cc
@@ -295,13 +295,11 @@
     InitializeThrottleDelayableExperiment(&scoped_feature_list,
                                           experiment_status, 0.0);
 
-    // Set BDP to 120 kbits, which lies in the first configuration bucket. Set
-    // the effective connection type to Slow-2G, which is slower than the
+    // Set the effective connection type to Slow-2G, which is slower than the
     // threshold configured in |InitializeMaxDelayableRequestsExperiment|. Needs
     // to be done before initializing the scheduler because the client is
     // created on the call to |InitializeScheduler|, which is where the initial
     // limits for the delayable requests in flight are computed.
-    network_quality_estimator_.set_bandwidth_delay_product_kbits(120);
     network_quality_estimator_.set_effective_connection_type(
         net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
     // Initialize the scheduler.
@@ -370,17 +368,22 @@
     bool experiment_enabled = false;
     if (lower_delayable_count_enabled) {
       experiment_enabled = true;
-      params["MaxEffectiveConnectionType"] = "2G";
-      params["MaxBDPKbits1"] = "130";
+      params["EffectiveConnectionType1"] = "Slow-2G";
       params["MaxDelayableRequests1"] = "2";
-      params["MaxBDPKbits2"] = "160";
+      params["NonDelayableWeight1"] = "0.0";
+
+      params["EffectiveConnectionType2"] = "3G";
       params["MaxDelayableRequests2"] = "4";
+      params["NonDelayableWeight2"] = "0.0";
     }
 
     if (non_delayable_weight > 0.0) {
       experiment_enabled = true;
-      params["MaxEffectiveConnectionType"] = "2G";
-      params["NonDelayableWeight"] = base::NumberToString(non_delayable_weight);
+      params["EffectiveConnectionType1"] = "Slow-2G";
+      if (params["MaxDelayableRequests1"] == "")
+        params["MaxDelayableRequests1"] = "10";
+      params["NonDelayableWeight1"] =
+          base::NumberToString(non_delayable_weight);
     }
 
     base::FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting();
@@ -401,11 +404,36 @@
                            : base::FeatureList::OVERRIDE_DISABLE_FEATURE,
         field_trial);
     scoped_feature_list->InitWithFeatureList(std::move(feature_list));
+
+    ResourceScheduler::ParamsForNetworkQualityContainer
+        params_network_quality_container =
+            ResourceScheduler::GetParamsForNetworkQualityContainerForTests();
+
+    if (!lower_delayable_count_enabled && non_delayable_weight <= 0.0) {
+      ASSERT_EQ(0u, params_network_quality_container.size());
+      return;
+    }
+
+    // Check that the configuration was parsed and stored correctly.
+    ASSERT_EQ(lower_delayable_count_enabled ? 2u : 1u,
+              params_network_quality_container.size());
+
+    EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G,
+              params_network_quality_container[0].effective_connection_type);
+    EXPECT_EQ(non_delayable_weight > 0.0 ? 10u : 2u,
+              params_network_quality_container[0].max_delayable_requests);
+    EXPECT_EQ(non_delayable_weight > 0.0 ? non_delayable_weight : 0.0,
+              params_network_quality_container[0].non_delayable_weight);
+
+    if (lower_delayable_count_enabled) {
+      EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_3G,
+                params_network_quality_container[1].effective_connection_type);
+      EXPECT_EQ(4u, params_network_quality_container[1].max_delayable_requests);
+      EXPECT_EQ(0.0, params_network_quality_container[1].non_delayable_weight);
+    }
   }
 
-  void ReadConfigTestHelper(size_t num_bdp_ranges,
-                            const std::string& max_ect_string) {
-    base::FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting();
+  void ReadConfigTestHelper(size_t num_ranges) {
     const char kTrialName[] = "TrialName";
     const char kGroupName[] = "GroupName";
     const char kThrottleDelayable[] = "ThrottleDelayable";
@@ -413,12 +441,13 @@
     base::FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting();
     base::test::ScopedFeatureList scoped_feature_list;
     std::map<std::string, std::string> params;
-    params["MaxEffectiveConnectionType"] = max_ect_string;
-    for (size_t bdp_range_index = 1; bdp_range_index <= num_bdp_ranges;
-         bdp_range_index++) {
-      std::string index_str = base::NumberToString(bdp_range_index);
-      params["MaxBDPKbits" + index_str] = index_str + "00";
+    for (size_t index = 1; index <= num_ranges; index++) {
+      std::string index_str = base::NumberToString(index);
+      params["EffectiveConnectionType" + index_str] =
+          net::GetNameForEffectiveConnectionType(
+              static_cast<net::EffectiveConnectionType>(1 + index));
       params["MaxDelayableRequests" + index_str] = index_str + "0";
+      params["NonDelayableWeight" + index_str] = "0";
     }
 
     base::AssociateFieldTrialParams(kTrialName, kGroupName, params);
@@ -431,17 +460,20 @@
         field_trial);
     scoped_feature_list.InitWithFeatureList(std::move(feature_list));
 
-    ResourceScheduler::MaxRequestsForBDPRanges bdp_ranges =
-        ResourceScheduler::GetMaxDelayableRequestsExperimentConfigForTests();
+    ResourceScheduler::ParamsForNetworkQualityContainer
+        params_network_quality_container =
+            ResourceScheduler::GetParamsForNetworkQualityContainerForTests();
 
     // Check that the configuration was parsed and stored correctly.
-    ASSERT_EQ(bdp_ranges.size(), num_bdp_ranges);
-    for (size_t bdp_range_index = 1; bdp_range_index <= num_bdp_ranges;
-         bdp_range_index++) {
-      EXPECT_EQ(bdp_ranges[bdp_range_index - 1].max_bdp_kbits,
-                (int64_t)(bdp_range_index * 100));
-      EXPECT_EQ(bdp_ranges[bdp_range_index - 1].max_requests,
-                bdp_range_index * 10u);
+    ASSERT_EQ(params_network_quality_container.size(), num_ranges);
+    for (size_t index = 1; index <= num_ranges; index++) {
+      EXPECT_EQ(1 + index, params_network_quality_container[index - 1]
+                               .effective_connection_type);
+      EXPECT_EQ(
+          index * 10u,
+          params_network_quality_container[index - 1].max_delayable_requests);
+      EXPECT_EQ(
+          0, params_network_quality_container[index - 1].non_delayable_weight);
     }
   }
 
@@ -453,7 +485,7 @@
     InitializeThrottleDelayableExperiment(&scoped_feature_list, false,
                                           non_delayable_weight);
     network_quality_estimator_.set_effective_connection_type(
-        net::EFFECTIVE_CONNECTION_TYPE_2G);
+        net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
 
     InitializeScheduler();
     // Limit will only trigger after the page has a body.
@@ -1502,15 +1534,13 @@
 }
 
 // Tests that the maximum number of delayable requests is overridden when the
-// experiment is enabled. The BDP buckets are correct and the effective
-// connection type is also in the configuration bucket.
+// experiment is enabled.
 TEST_F(ResourceSchedulerTest, RequestLimitOverrideEnabled) {
   RequestLimitOverrideConfigTestHelper(true);
 }
 
 // Tests that the maximum number of delayable requests is not overridden when
-// the experiment is disabled. The BDP buckets are correct and the effective
-// connection type is also in the configuration bucket.
+// the experiment is disabled.
 TEST_F(ResourceSchedulerTest, RequestLimitOverrideDisabled) {
   RequestLimitOverrideConfigTestHelper(false);
 }
@@ -1524,15 +1554,14 @@
   for (net::EffectiveConnectionType ect :
        {net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
         net::EFFECTIVE_CONNECTION_TYPE_OFFLINE,
-        net::EFFECTIVE_CONNECTION_TYPE_3G, net::EFFECTIVE_CONNECTION_TYPE_4G}) {
-    // Set BDP to 120 kbits, which lies in the configuration bucket. Set the
-    // effective connection type to a value for which the experiment should not
-    // be run.
-    network_quality_estimator_.set_bandwidth_delay_product_kbits(120);
+        net::EFFECTIVE_CONNECTION_TYPE_4G}) {
+    // Set the effective connection type to a value for which the experiment
+    // should not be run.
     network_quality_estimator_.set_effective_connection_type(ect);
 
     // The limit will matter only once the page has a body, since delayable
     // requests are not loaded before that.
+    scheduler()->OnNavigate(kChildId, kRouteId);
     scheduler()->OnWillInsertBody(kChildId, kRouteId);
 
     // Throw in one high priority request to ensure that it does not matter once
@@ -1563,66 +1592,19 @@
   }
 }
 
-// Test that the limit is not overridden when the effective connection type is
-// valid, but the bandwidth delay product (BDP) does not lie in one of the
-// buckets provided in the configuration.
-TEST_F(ResourceSchedulerTest, RequestLimitOverrideConfigOutsideBDPRange) {
-  base::test::ScopedFeatureList scoped_feature_list;
-  InitializeThrottleDelayableExperiment(&scoped_feature_list, true, 0.0);
-  // The BDP should lie outside the provided ranges. Here, the BDP is set to
-  // 200, which lies outside the configuration BDP buckets.
-  // The effective connection type is set to Slow-2G.
-  network_quality_estimator_.set_bandwidth_delay_product_kbits(200);
-  network_quality_estimator_.set_effective_connection_type(
-      net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
-  InitializeScheduler();
-
-  // The limit should be the default limit, which is 10 delayable requests
-  // in-flight. The limit will matter only once the page has a body, since
-  // delayable requests are not loaded before that.
-  scheduler()->OnWillInsertBody(kChildId, kRouteId);
-
-  // Throw in one high priority request to ensure that it does not matter once
-  // a body exists.
-  std::unique_ptr<TestRequest> high(
-      NewRequest("http://host/high", net::HIGHEST));
-  EXPECT_TRUE(high->started());
-
-  // Should be in sync with resource_scheduler.cc.
-  const int kDefaultMaxNumDelayableRequestsPerClient = 10;
-
-  std::vector<std::unique_ptr<TestRequest>> lows_singlehost;
-  // Queue up to the maximum limit. Use different host names to prevent the
-  // per host limit from kicking in.
-  for (int i = 0; i < kDefaultMaxNumDelayableRequestsPerClient; ++i) {
-    // Keep unique hostnames to prevent the per host limit from kicking in.
-    std::string url = "http://host" + base::IntToString(i) + "/low";
-    lows_singlehost.push_back(NewRequest(url.c_str(), net::LOWEST));
-    EXPECT_TRUE(lows_singlehost[i]->started());
-  }
-
-  std::unique_ptr<TestRequest> last_singlehost(
-      NewRequest("http://host/last", net::LOWEST));
-
-  // Last should not start because the maximum requests that can be in-flight
-  // have already started.
-  EXPECT_FALSE(last_singlehost->started());
-}
-
 // Test that a change in network conditions midway during loading does not
 // change the behavior of the resource scheduler.
 TEST_F(ResourceSchedulerTest, RequestLimitOverrideFixedForPageLoad) {
   base::test::ScopedFeatureList scoped_feature_list;
   InitializeThrottleDelayableExperiment(&scoped_feature_list, true, 0.0);
-  // BDP value is in range for which the limit is overridden to 2. The
-  // effective connection type is set to Slow-2G.
-  network_quality_estimator_.set_bandwidth_delay_product_kbits(120);
+  // ECT value is in range for which the limit is overridden to 2.
   network_quality_estimator_.set_effective_connection_type(
       net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
   InitializeScheduler();
 
   // The limit will matter only once the page has a body, since delayable
   // requests are not loaded before that.
+  scheduler()->OnNavigate(kChildId, kRouteId);
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
 
   // Throw in one high priority request to ensure that it does not matter once
@@ -1653,18 +1635,24 @@
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(second_last_singlehost->started());
 
-  // Change the BDP to go outside the experiment buckets and change the network
-  // type to 2G. This should not affect the limit calculated at the beginning of
+  // Change the ECT to go outside the experiment buckets and change the network
+  // type to 4G. This should not affect the limit calculated at the beginning of
   // the page load.
-  network_quality_estimator_.set_bandwidth_delay_product_kbits(50);
   network_quality_estimator_.set_effective_connection_type(
-      net::EFFECTIVE_CONNECTION_TYPE_2G);
+      net::EFFECTIVE_CONNECTION_TYPE_4G);
+  base::RunLoop().RunUntilIdle();
 
   std::unique_ptr<TestRequest> last_singlehost(
       NewRequest("http://host/last", net::LOWEST));
 
   // Last should not start because the limit should not have changed.
   EXPECT_FALSE(last_singlehost->started());
+
+  // The limit should change when there is a new page navigation.
+  scheduler()->OnNavigate(kChildId, kRouteId);
+  scheduler()->OnWillInsertBody(kChildId, kRouteId);
+  base::RunLoop().RunUntilIdle();
+  EXPECT_TRUE(last_singlehost->started());
 }
 
 // Test that when the network quality changes such that the new limit is lower,
@@ -1673,15 +1661,14 @@
 TEST_F(ResourceSchedulerTest, RequestLimitReducedAcrossPageLoads) {
   base::test::ScopedFeatureList scoped_feature_list;
   InitializeThrottleDelayableExperiment(&scoped_feature_list, true, 0.0);
-  // BDP value is in range for which the limit is overridden to 4. The
-  // effective connection type is set to Slow-2G.
-  network_quality_estimator_.set_bandwidth_delay_product_kbits(150);
+  // ECT value is in range for which the limit is overridden to 4.
   network_quality_estimator_.set_effective_connection_type(
-      net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
+      net::EFFECTIVE_CONNECTION_TYPE_3G);
   InitializeScheduler();
 
   // The limit will matter only once the page has a body, since delayable
   // requests are not loaded before that.
+  scheduler()->OnNavigate(kChildId, kRouteId);
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
 
   // Throw in one high priority request to ensure that it does not matter once
@@ -1703,10 +1690,9 @@
     delayable_first_page.push_back(NewRequest(url.c_str(), net::LOWEST));
     EXPECT_TRUE(delayable_first_page[i]->started());
   }
-  // Change the network quality so that the BDP value is in range for which the
+  // Change the network quality so that the ECT value is in range for which the
   // limit is overridden to 2. The effective connection type is set to
   // Slow-2G.
-  network_quality_estimator_.set_bandwidth_delay_product_kbits(120);
   network_quality_estimator_.set_effective_connection_type(
       net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
   // Trigger a navigation event which will recompute limits. Also insert a body,
@@ -1751,27 +1737,34 @@
   for (int i = 0; i < kNumDelayableLow; ++i) {
     EXPECT_TRUE(delayable_second_page[i]->started());
   }
+
+  // No new delayable request should start since there are already
+  // |kNumDelayableLow| requests in flight.
+  std::string url =
+      "http://host" + base::IntToString(kNumDelayableLow) + "/low3";
+  delayable_second_page.push_back(NewRequest(url.c_str(), net::LOWEST));
+  EXPECT_FALSE(delayable_second_page.back()->started());
 }
 
-// Test that a configuration without any BDP range is read correctly. In this
+// Test that a configuration without any ECT ranges is read correctly. In this
 // case, the resource scheduler will fall back to the default limit.
 TEST_F(ResourceSchedulerTest, ReadValidConfigTest0) {
-  ReadConfigTestHelper(0, "2G");
+  ReadConfigTestHelper(0);
 }
 
-// Test that a configuration with 1 BDP range is read correctly.
+// Test that a configuration with 1 range is read correctly.
 TEST_F(ResourceSchedulerTest, ReadValidConfigTest1) {
-  ReadConfigTestHelper(1, "2G");
+  ReadConfigTestHelper(1);
 }
 
-// Test that a configuration with 2 BDP ranges is read correctly.
+// Test that a configuration with 2 ranges is read correctly.
 TEST_F(ResourceSchedulerTest, ReadValidConfigTest2) {
-  ReadConfigTestHelper(2, "2G");
+  ReadConfigTestHelper(2);
 }
 
-// Test that a configuration with 5 BDP ranges is read correctly.
-TEST_F(ResourceSchedulerTest, ReadValidConfigTest5) {
-  ReadConfigTestHelper(5, "2G");
+// Test that a configuration with 3 ranges is read correctly.
+TEST_F(ResourceSchedulerTest, ReadValidConfigTest3) {
+  ReadConfigTestHelper(3);
 }
 
 // Test that a configuration with bad strings does not break the parser, and
@@ -1785,13 +1778,13 @@
 
   base::test::ScopedFeatureList scoped_feature_list;
   std::map<std::string, std::string> params;
-  params["MaxEffectiveConnectionType"] = "2G";
   // Skip configuration parameters for index 2 to test that the parser stops
   // when it cannot find the parameters for an index.
-  for (int bdp_range_index : {1, 3, 4}) {
-    std::string index_str = base::IntToString(bdp_range_index);
-    params["MaxBDPKbits" + index_str] = index_str + "00";
+  for (int range_index : {1, 3, 4}) {
+    std::string index_str = base::IntToString(range_index);
+    params["EffectiveConnectionType" + index_str] = "Slow-2G";
     params["MaxDelayableRequests" + index_str] = index_str + "0";
+    params["NonDelayableWeight" + index_str] = "0";
   }
   // Add some bad configuration strigs to ensure that the parser does not break.
   params["BadConfigParam1"] = "100";
@@ -1807,27 +1800,18 @@
       field_trial);
   scoped_feature_list.InitWithFeatureList(std::move(feature_list));
 
-  ResourceScheduler::MaxRequestsForBDPRanges bdp_ranges =
-      ResourceScheduler::GetMaxDelayableRequestsExperimentConfigForTests();
+  ResourceScheduler::ParamsForNetworkQualityContainer
+      params_network_quality_container =
+          ResourceScheduler::GetParamsForNetworkQualityContainerForTests();
 
   // Only the first configuration parameter must be read because a match was not
   // found for index 2. The configuration parameters with index 3 and 4 must be
   // ignored, even though they are valid configuration parameters.
-  EXPECT_EQ(bdp_ranges.size(), 1u);
-  EXPECT_EQ(bdp_ranges[0].max_bdp_kbits, 100);
-  EXPECT_EQ(bdp_ranges[0].max_requests, 10u);
-}
-
-// Test that the maximum effective connection type is read correctly when it is
-// set to "Slow-2G".
-TEST_F(ResourceSchedulerTest, ReadMaxECTForExperimentTestSlow2G) {
-  ReadConfigTestHelper(3, "Slow-2G");
-}
-
-// Test that the maximum effective connection type is read correctly when it is
-// set to "4G".
-TEST_F(ResourceSchedulerTest, ReadMaxECTForExperimentTest4G) {
-  ReadConfigTestHelper(3, "4G");
+  EXPECT_EQ(1u, params_network_quality_container.size());
+  EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G,
+            params_network_quality_container[0].effective_connection_type);
+  EXPECT_EQ(10u, params_network_quality_container[0].max_delayable_requests);
+  EXPECT_EQ(0.0, params_network_quality_container[0].non_delayable_weight);
 }
 
 // Test that the default limit is used for delayable requests when the
@@ -1850,6 +1834,7 @@
   // Limit will only trigger after the page has a body.
 
   InitializeScheduler();
+  scheduler()->OnNavigate(kChildId, kRouteId);
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
   // Insert one non-delayable request. This should not affect the number of
   // delayable requests started.
@@ -1878,10 +1863,11 @@
   InitializeThrottleDelayableExperiment(&scoped_feature_list, false,
                                         kNonDelayableWeight);
   network_quality_estimator_.set_effective_connection_type(
-      net::EFFECTIVE_CONNECTION_TYPE_2G);
+      net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
 
   InitializeScheduler();
   // Limit will only trigger after the page has a body.
+  scheduler()->OnNavigate(kChildId, kRouteId);
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
   for (int num_non_delayable = 0; num_non_delayable < 10; ++num_non_delayable) {
     base::RunLoop().RunUntilIdle();
diff --git a/content/browser/loader/url_loader_factory_impl_unittest.cc b/content/browser/loader/url_loader_factory_impl_unittest.cc
index 4d38554..9e71d61a 100644
--- a/content/browser/loader/url_loader_factory_impl_unittest.cc
+++ b/content/browser/loader/url_loader_factory_impl_unittest.cc
@@ -22,7 +22,6 @@
 #include "base/run_loop.h"
 #include "content/browser/child_process_security_policy_impl.h"
 #include "content/browser/loader/mojo_async_resource_handler.h"
-#include "content/browser/loader/navigation_resource_throttle.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/loader/resource_message_filter.h"
 #include "content/browser/loader/resource_request_info_impl.h"
@@ -148,7 +147,6 @@
 TEST_P(URLLoaderFactoryImplTest, GetResponse) {
   constexpr int32_t kRoutingId = 81;
   constexpr int32_t kRequestId = 28;
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   mojom::URLLoaderPtr loader;
   base::FilePath root;
   PathService::Get(DIR_TEST_DATA, &root);
@@ -227,7 +225,6 @@
 }
 
 TEST_P(URLLoaderFactoryImplTest, GetFailedResponse) {
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   mojom::URLLoaderPtr loader;
   ResourceRequest request;
   TestURLLoaderClient client;
@@ -257,7 +254,6 @@
 
 // In this case, the loading fails after receiving a response.
 TEST_P(URLLoaderFactoryImplTest, GetFailedResponse2) {
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   mojom::URLLoaderPtr loader;
   ResourceRequest request;
   TestURLLoaderClient client;
@@ -470,7 +466,6 @@
 TEST_P(URLLoaderFactoryImplTest, OnTransferSizeUpdated) {
   constexpr int32_t kRoutingId = 81;
   constexpr int32_t kRequestId = 28;
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   mojom::URLLoaderPtr loader;
   base::FilePath root;
   PathService::Get(DIR_TEST_DATA, &root);
@@ -531,7 +526,6 @@
 TEST_P(URLLoaderFactoryImplTest, CancelFromRenderer) {
   constexpr int32_t kRoutingId = 81;
   constexpr int32_t kRequestId = 28;
-  NavigationResourceThrottle::set_ui_checks_always_succeed_for_testing(true);
   mojom::URLLoaderPtr loader;
   base::FilePath root;
   PathService::Get(DIR_TEST_DATA, &root);
diff --git a/content/browser/locks/lock_manager.cc b/content/browser/locks/lock_manager.cc
index d4d5ea6..d242713 100644
--- a/content/browser/locks/lock_manager.cc
+++ b/content/browser/locks/lock_manager.cc
@@ -89,18 +89,19 @@
   (mode == LockMode::SHARED ? shared : exclusive).insert(name);
 }
 
-void LockManager::CreateService(blink::mojom::LockManagerRequest request) {
+void LockManager::CreateService(blink::mojom::LockManagerRequest request,
+                                const url::Origin& origin) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  bindings_.AddBinding(this, std::move(request));
+  bindings_.AddBinding(this, std::move(request), origin);
 }
 
-void LockManager::RequestLock(const url::Origin& origin,
-                              const std::string& name,
+void LockManager::RequestLock(const std::string& name,
                               LockMode mode,
                               WaitMode wait,
                               blink::mojom::LockRequestPtr request) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
+  const url::Origin& origin = bindings_.dispatch_context();
   if (wait == WaitMode::NO_WAIT && !IsGrantable(origin, name, mode)) {
     request->Failed();
     return;
diff --git a/content/browser/locks/lock_manager.h b/content/browser/locks/lock_manager.h
index 2eec0df..2e5cc7ed 100644
--- a/content/browser/locks/lock_manager.h
+++ b/content/browser/locks/lock_manager.h
@@ -27,12 +27,12 @@
  public:
   LockManager();
 
-  void CreateService(blink::mojom::LockManagerRequest request);
+  void CreateService(blink::mojom::LockManagerRequest request,
+                     const url::Origin& origin);
 
   // Request a lock. When the lock is acquired, |callback| will be invoked with
   // a LockHandle.
-  void RequestLock(const url::Origin& origin,
-                   const std::string& name,
+  void RequestLock(const std::string& name,
                    LockMode mode,
                    WaitMode wait,
                    blink::mojom::LockRequestPtr request) override;
@@ -73,7 +73,7 @@
   // to process outstanding requests within the origin.
   void ProcessRequests(const url::Origin& origin);
 
-  mojo::BindingSet<blink::mojom::LockManager> bindings_;
+  mojo::BindingSet<blink::mojom::LockManager, url::Origin> bindings_;
 
   int64_t next_lock_id = 1;
   std::map<url::Origin, OriginState> origins_;
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
index c3ded36..8714ce6f 100644
--- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/synchronization/waitable_event.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/public/browser/desktop_media_id.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "media/capture/video_capture_types.h"
@@ -107,7 +107,7 @@
   void SetUp() override {
     // The ContextFactory must exist before any Compositors are created.
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
     helper_.reset(new aura::test::AuraTestHelper());
     helper_->SetUp(
         ImageTransportFactory::GetInstance()->GetContextFactory(),
diff --git a/content/browser/network_service_instance.cc b/content/browser/network_service_instance.cc
new file mode 100644
index 0000000..e22e31d
--- /dev/null
+++ b/content/browser/network_service_instance.cc
@@ -0,0 +1,84 @@
+// 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.
+
+#include "content/public/browser/network_service_instance.h"
+
+#include "base/feature_list.h"
+#include "content/browser/network_service_client.h"
+#include "content/network/network_service_impl.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/content_browser_client.h"
+#include "content/public/common/content_features.h"
+#include "content/public/common/service_manager_connection.h"
+#include "content/public/common/service_names.mojom.h"
+#include "services/service_manager/public/cpp/connector.h"
+
+namespace content {
+
+namespace {
+
+mojom::NetworkServicePtr* g_network_service_ptr = nullptr;
+NetworkServiceImpl* g_network_service;
+
+void CreateNetworkServiceOnIO(mojom::NetworkServiceRequest request) {
+  if (g_network_service) {
+    // GetNetworkServiceImpl() was already called and created the object, so
+    // just bind it.
+    g_network_service->Bind(std::move(request));
+    return;
+  }
+
+  g_network_service = new NetworkServiceImpl(
+      nullptr, std::move(request), GetContentClient()->browser()->GetNetLog());
+}
+
+}  // namespace
+
+mojom::NetworkService* GetNetworkService() {
+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+  if (!g_network_service_ptr)
+    g_network_service_ptr = new mojom::NetworkServicePtr;
+  static NetworkServiceClient* g_client;
+  if (!g_network_service_ptr->is_bound() ||
+      g_network_service_ptr->encountered_error()) {
+    if (base::FeatureList::IsEnabled(features::kNetworkService)) {
+      ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
+          mojom::kNetworkServiceName, g_network_service_ptr);
+    } else {
+      DCHECK(!g_network_service_ptr->is_bound());
+      BrowserThread::PostTask(
+          BrowserThread::IO, FROM_HERE,
+          base::BindOnce(CreateNetworkServiceOnIO,
+                         mojo::MakeRequest(g_network_service_ptr)));
+    }
+
+    mojom::NetworkServiceClientPtr client_ptr;
+    delete g_client;  // In case we're recreating the network service.
+    g_client = new NetworkServiceClient(mojo::MakeRequest(&client_ptr));
+    (*g_network_service_ptr)->SetClient(std::move(client_ptr));
+  }
+  return g_network_service_ptr->get();
+}
+
+NetworkService* GetNetworkServiceImpl() {
+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+  DCHECK(!base::FeatureList::IsEnabled(features::kNetworkService));
+  if (!g_network_service) {
+    g_network_service = new NetworkServiceImpl(
+        nullptr, nullptr, GetContentClient()->browser()->GetNetLog());
+  }
+
+  return g_network_service;
+}
+
+void FlushNetworkServiceInstanceForTesting() {
+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
+
+  if (g_network_service_ptr)
+    g_network_service_ptr->FlushForTesting();
+}
+
+}  // namespace content
diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/browser/push_messaging/push_messaging_manager.cc
index f216c7c4..2dc71a60 100644
--- a/content/browser/push_messaging/push_messaging_manager.cc
+++ b/content/browser/push_messaging/push_messaging_manager.cc
@@ -30,7 +30,7 @@
 #include "content/public/common/console_message_level.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/push_messaging_status.mojom.h"
-#include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
+#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h"
 
 namespace content {
 
@@ -198,13 +198,6 @@
       mojom::PushGetRegistrationStatus get_status,
       mojom::PushUnregistrationStatus unsubscribe_status);
 
-  // Public GetPermission methods on UI thread ---------------------------------
-
-  // Called via PostTask from IO thread.
-  void GetPermissionStatusOnUI(GetPermissionStatusCallback callback,
-                               const GURL& requesting_origin,
-                               bool user_visible);
-
   // Public helper methods on UI thread ----------------------------------------
 
   // Called via PostTask from IO thread. |callback| will be run on UI thread.
@@ -976,70 +969,6 @@
                      base::nullopt /* p256dh */, base::nullopt /* auth */));
 }
 
-// GetPermission methods on both IO and UI threads, merged in order of use from
-// PushMessagingManager and Core.
-// -----------------------------------------------------------------------------
-
-void PushMessagingManager::GetPermissionStatus(
-    int64_t service_worker_registration_id,
-    bool user_visible,
-    GetPermissionStatusCallback callback) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  ServiceWorkerRegistration* service_worker_registration =
-      service_worker_context_->GetLiveRegistration(
-          service_worker_registration_id);
-  if (!service_worker_registration) {
-    // Return error: ErrorTypeAbort.
-    std::move(callback).Run(blink::WebPushError::kErrorTypeAbort,
-                            blink::kWebPushPermissionStatusDenied);
-    return;
-  }
-
-  BrowserThread::PostTask(
-      BrowserThread::UI, FROM_HERE,
-      base::BindOnce(&Core::GetPermissionStatusOnUI,
-                     base::Unretained(ui_core_.get()), base::Passed(&callback),
-                     service_worker_registration->pattern().GetOrigin(),
-                     user_visible));
-}
-
-void PushMessagingManager::Core::GetPermissionStatusOnUI(
-    GetPermissionStatusCallback callback,
-    const GURL& requesting_origin,
-    bool user_visible) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  blink::WebPushPermissionStatus permission_status;
-  PushMessagingService* push_service = service();
-  if (push_service) {
-    if (!user_visible && !push_service->SupportNonVisibleMessages()) {
-      BrowserThread::PostTask(
-          BrowserThread::IO, FROM_HERE,
-          // Return error: ErrorTypeNotSupported.
-          base::BindOnce(std::move(callback),
-                         blink::WebPushError::kErrorTypeNotSupported,
-                         blink::kWebPushPermissionStatusDenied));
-      return;
-    }
-    permission_status =
-        push_service->GetPermissionStatus(requesting_origin, user_visible);
-  } else if (is_incognito()) {
-    // Return prompt, so the website can't detect incognito mode.
-    permission_status = blink::kWebPushPermissionStatusPrompt;
-  } else {
-    BrowserThread::PostTask(
-        BrowserThread::IO, FROM_HERE,
-        // Return error: ErrorTypeAbort.
-        base::BindOnce(std::move(callback),
-                       blink::WebPushError::kErrorTypeAbort,
-                       blink::kWebPushPermissionStatusDenied));
-    return;
-  }
-  BrowserThread::PostTask(
-      BrowserThread::IO, FROM_HERE,
-      base::BindOnce(std::move(callback), blink::WebPushError::kErrorTypeNone,
-                     permission_status));
-}
-
 // Helper methods on both IO and UI threads, merged from
 // PushMessagingManager and Core.
 // -----------------------------------------------------------------------------
diff --git a/content/browser/push_messaging/push_messaging_manager.h b/content/browser/push_messaging/push_messaging_manager.h
index bf87d90..33195729 100644
--- a/content/browser/push_messaging/push_messaging_manager.h
+++ b/content/browser/push_messaging/push_messaging_manager.h
@@ -51,9 +51,6 @@
                    UnsubscribeCallback callback) override;
   void GetSubscription(int64_t service_worker_registration_id,
                        GetSubscriptionCallback callback) override;
-  void GetPermissionStatus(int64_t service_worker_registration_id,
-                           bool user_visible,
-                           GetPermissionStatusCallback callback) override;
 
  private:
   struct RegisterData;
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index defddff..94b898df 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -179,6 +179,11 @@
   const bool enable_viz_ = false;
   viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
       nullptr;
+  // The surface for the delegated frame host, rendered into by the renderer
+  // process.
+  viz::LocalSurfaceId delegated_frame_host_surface_id_;
+  // The surface for the ui::Compositor, which will embed
+  // |delegated_frame_host_surface_id_| into its tree.
   viz::LocalSurfaceId compositor_surface_id_;
   viz::ParentLocalSurfaceIdAllocator parent_local_surface_id_allocator_;
 
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index a596fa8..c21fe756 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -343,12 +343,15 @@
 }
 
 void BrowserCompositorMac::WasResized() {
-  GetDelegatedFrameHost()->WasResized();
-
   // In non-viz, the ui::Compositor is resized in sync with frames coming from
   // the renderer. In viz, the ui::Compositor can only resize in sync with the
   // NSView.
-  if (!enable_viz_ || !recyclable_compositor_)
+  if (!enable_viz_) {
+    GetDelegatedFrameHost()->WasResized();
+    return;
+  }
+
+  if (!recyclable_compositor_)
     return;
 
   gfx::Size dip_size;
@@ -363,9 +366,15 @@
   if (pixel_size == old_pixel_size && scale_factor == old_scale_factor)
     return;
 
+  delegated_frame_host_surface_id_ =
+      parent_local_surface_id_allocator_.GenerateId();
   compositor_surface_id_ = parent_local_surface_id_allocator_.GenerateId();
+
+  root_layer_->SetBounds(gfx::Rect(dip_size));
   recyclable_compositor_->compositor()->SetScaleAndSize(
       scale_factor, pixel_size, compositor_surface_id_);
+
+  GetDelegatedFrameHost()->WasResized();
 }
 
 bool BrowserCompositorMac::HasFrameOfSize(const gfx::Size& desired_size) {
@@ -515,7 +524,7 @@
 }
 
 viz::LocalSurfaceId BrowserCompositorMac::GetLocalSurfaceId() const {
-  return compositor_surface_id_;
+  return delegated_frame_host_surface_id_;
 }
 
 std::unique_ptr<CompositorResizeLock>
diff --git a/content/browser/renderer_host/compositor_resize_lock_unittest.cc b/content/browser/renderer_host/compositor_resize_lock_unittest.cc
index 9416bd89..cfd6a3d 100644
--- a/content/browser/renderer_host/compositor_resize_lock_unittest.cc
+++ b/content/browser/renderer_host/compositor_resize_lock_unittest.cc
@@ -7,23 +7,21 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/memory/ptr_util.h"
+#include "base/test/null_task_runner.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "ui/compositor/test/fake_compositor_lock.h"
 
 namespace content {
 namespace {
 
 class FakeCompositorResizeLockClient : public CompositorResizeLockClient,
-                                       public ui::CompositorLockDelegate {
+                                       public ui::CompositorLockManagerClient {
  public:
-  FakeCompositorResizeLockClient() : weak_ptr_factory_(this) {}
-
+  FakeCompositorResizeLockClient()
+      : lock_manager_(new base::NullTaskRunner(), this) {}
   std::unique_ptr<ui::CompositorLock> GetCompositorLock(
       ui::CompositorLockClient* client) override {
     created_ = true;
-    compositor_lock_ =
-        new ui::FakeCompositorLock(client, weak_ptr_factory_.GetWeakPtr());
-    return base::WrapUnique(compositor_lock_);
+    return lock_manager_.GetCompositorLock(client, base::TimeDelta());
   }
 
   // CompositorResizeLockClient implementation.
@@ -33,13 +31,15 @@
     ended_ = true;
   }
 
-  // CompositorLockDelegate implementation.
-  void RemoveCompositorLock(ui::CompositorLock* lock) override {
-    // This is where the ui::Compositor would be physically unlocked.
-    unlocked_ = true;
+  // ui::CompositorLockManagerClient implementation.
+  void OnCompositorLockStateChanged(bool locked) override {
+    if (!locked) {
+      // This is where the ui::Compositor would be physically unlocked.
+      unlocked_ = true;
+    }
   }
 
-  void CauseTimeout() { compositor_lock_->TimeoutLock(); }
+  void CauseTimeout() { lock_manager_.TimeoutLocksForTesting(); }
 
   bool created() const { return created_; }
   bool unlocked() const { return unlocked_; }
@@ -49,8 +49,7 @@
   bool created_ = false;
   bool unlocked_ = false;
   bool ended_ = false;
-  ui::FakeCompositorLock* compositor_lock_ = nullptr;
-  base::WeakPtrFactory<FakeCompositorResizeLockClient> weak_ptr_factory_;
+  ui::CompositorLockManager lock_manager_;
 };
 
 TEST(CompositorResizeLockTest, EndWithoutLock) {
diff --git a/content/browser/renderer_host/input/gesture_event_queue.cc b/content/browser/renderer_host/input/gesture_event_queue.cc
index b4a1227..2dd09215 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.cc
+++ b/content/browser/renderer_host/input/gesture_event_queue.cc
@@ -47,12 +47,12 @@
 
 GestureEventQueue::~GestureEventQueue() { }
 
-void GestureEventQueue::QueueEvent(
+bool GestureEventQueue::QueueEvent(
     const GestureEventWithLatencyInfo& gesture_event) {
   TRACE_EVENT0("input", "GestureEventQueue::QueueEvent");
   if (!ShouldForwardForBounceReduction(gesture_event) ||
       fling_controller_.FilterGestureEvent(gesture_event)) {
-    return;
+    return false;
   }
 
   // fling_controller_ is in charge of handling GFS events from touchpad source
@@ -64,7 +64,7 @@
       gesture_event.event.source_device == blink::kWebGestureDeviceTouchpad) {
     fling_controller_.ProcessGestureFlingStart(gesture_event);
     fling_in_progress_ = true;
-    return;
+    return false;
   }
 
   // If the GestureFlingStart event is processed by the fling_controller_, the
@@ -73,10 +73,11 @@
       fling_controller_.fling_in_progress()) {
     fling_controller_.ProcessGestureFlingCancel(gesture_event);
     fling_in_progress_ = false;
-    return;
+    return false;
   }
 
   QueueAndForwardIfNecessary(gesture_event);
+  return true;
 }
 
 void GestureEventQueue::ProgressFling(base::TimeTicks current_time) {
diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h
index ac7cd2d..db06905 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.h
+++ b/content/browser/renderer_host/input/gesture_event_queue.h
@@ -79,8 +79,8 @@
 
   // Adds a gesture to the queue if it passes the relevant filters. If
   // there are no events currently queued, the event will be forwarded
-  // immediately.
-  void QueueEvent(const GestureEventWithLatencyInfo&);
+  // immediately. Returns false if the event wasn't queued and was filtered.
+  bool QueueEvent(const GestureEventWithLatencyInfo&);
 
   // Indicates that the caller has received an acknowledgement from the renderer
   // with state |ack_result| and event |type|. May send events if the queue is
diff --git a/content/browser/renderer_host/input/input_router_client.h b/content/browser/renderer_host/input/input_router_client.h
index 69a26a1..dfd8960 100644
--- a/content/browser/renderer_host/input/input_router_client.h
+++ b/content/browser/renderer_host/input/input_router_client.h
@@ -35,7 +35,7 @@
       const ui::LatencyInfo& latency_info) = 0;
 
   // Called each time a WebInputEvent IPC is sent.
-  virtual void IncrementInFlightEventCount(blink::WebInputEvent::Type type) = 0;
+  virtual void IncrementInFlightEventCount() = 0;
 
   // Called each time a WebInputEvent ACK IPC is received.
   virtual void DecrementInFlightEventCount(InputEventAckSource ack_source) = 0;
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 95ab2d5..eb6ee90 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -133,8 +133,12 @@
 
   GestureEventWithLatencyInfo gesture_event(original_gesture_event);
 
-  if (touch_action_filter_.FilterGestureEvent(&gesture_event.event))
+  if (touch_action_filter_.FilterGestureEvent(&gesture_event.event)) {
+    disposition_handler_->OnGestureEventAck(gesture_event,
+                                            InputEventAckSource::BROWSER,
+                                            INPUT_EVENT_ACK_STATE_CONSUMED);
     return;
+  }
 
   wheel_event_queue_.OnGestureScrollEvent(gesture_event);
 
@@ -156,7 +160,11 @@
     touch_event_queue_->OnGestureScrollEvent(gesture_event);
   }
 
-  gesture_event_queue_.QueueEvent(gesture_event);
+  if (!gesture_event_queue_.QueueEvent(gesture_event)) {
+    disposition_handler_->OnGestureEventAck(gesture_event,
+                                            InputEventAckSource::BROWSER,
+                                            INPUT_EVENT_ACK_STATE_CONSUMED);
+  }
 }
 
 void InputRouterImpl::SendTouchEvent(
@@ -369,7 +377,6 @@
 void InputRouterImpl::OnMouseWheelEventAck(
     const MouseWheelEventWithLatencyInfo& event,
     InputEventAckSource ack_source,
-
     InputEventAckState ack_result) {
   disposition_handler_->OnWheelEventAck(event, ack_source, ack_result);
 }
@@ -407,7 +414,7 @@
       ScaleEvent(input_event, device_scale_factor_), latency_info);
   if (WebInputEventTraits::ShouldBlockEventStream(
           input_event, wheel_scroll_latching_enabled_)) {
-    client_->IncrementInFlightEventCount(input_event.GetType());
+    client_->IncrementInFlightEventCount();
     client_->GetWidgetInputHandler()->DispatchEvent(std::move(event),
                                                     std::move(callback));
   } else {
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index ce0603f..383f1e2 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -126,9 +126,8 @@
     return input_router_client_.FilterInputEvent(input_event, latency_info);
   }
 
-  void IncrementInFlightEventCount(
-      blink::WebInputEvent::Type event_type) override {
-    input_router_client_.IncrementInFlightEventCount(event_type);
+  void IncrementInFlightEventCount() override {
+    input_router_client_.IncrementInFlightEventCount();
   }
 
   void DecrementInFlightEventCount(InputEventAckSource ack_source) override {
@@ -1080,7 +1079,7 @@
   EXPECT_EQ(1U, GetAndResetDispatchedMessages().size());
   EXPECT_EQ(0U, disposition_handler_->GetAndResetAckCount());
   EXPECT_EQ(1, client_->in_flight_event_count());
-  EXPECT_EQ(WebInputEvent::kGestureScrollUpdate,
+  EXPECT_EQ(WebInputEvent::kGestureTapDown,
             client_->last_in_flight_event_type());
 
   SimulateGestureEvent(WebInputEvent::kGestureScrollUpdate,
@@ -1095,7 +1094,7 @@
   EXPECT_EQ(1U, GetAndResetDispatchedMessages().size());
   EXPECT_EQ(0U, disposition_handler_->GetAndResetAckCount());
   EXPECT_EQ(2, client_->in_flight_event_count());
-  EXPECT_EQ(WebInputEvent::kGestureScrollUpdate,
+  EXPECT_EQ(WebInputEvent::kGestureShowPress,
             client_->last_in_flight_event_type());
 
   SimulateGestureEvent(WebInputEvent::kGestureScrollUpdate,
@@ -1113,7 +1112,7 @@
   EXPECT_EQ(1U, GetAndResetDispatchedMessages().size());
   EXPECT_EQ(0U, disposition_handler_->GetAndResetAckCount());
   EXPECT_EQ(3, client_->in_flight_event_count());
-  EXPECT_EQ(WebInputEvent::kGestureScrollUpdate,
+  EXPECT_EQ(WebInputEvent::kGestureTapCancel,
             client_->last_in_flight_event_type());
 
   // Now ack each ack-respecting event. Should see in-flight event count
@@ -1179,7 +1178,7 @@
   EXPECT_EQ(1U, GetAndResetDispatchedMessages().size());
   EXPECT_EQ(0U, disposition_handler_->GetAndResetAckCount());
   EXPECT_EQ(1, client_->in_flight_event_count());
-  EXPECT_EQ(WebInputEvent::kGesturePinchUpdate,
+  EXPECT_EQ(WebInputEvent::kGestureShowPress,
             client_->last_in_flight_event_type());
 
   SimulateGestureEvent(WebInputEvent::kGestureShowPress,
@@ -1187,7 +1186,7 @@
   EXPECT_EQ(1U, GetAndResetDispatchedMessages().size());
   EXPECT_EQ(0U, disposition_handler_->GetAndResetAckCount());
   EXPECT_EQ(1, client_->in_flight_event_count());
-  EXPECT_EQ(WebInputEvent::kGesturePinchUpdate,
+  EXPECT_EQ(WebInputEvent::kGestureShowPress,
             client_->last_in_flight_event_type());
 
   // Ack the GesturePinchUpdate to release two GestureShowPress ack.
diff --git a/content/browser/renderer_host/input/legacy_input_router_impl.cc b/content/browser/renderer_host/input/legacy_input_router_impl.cc
index e277ce8..b5fa3424 100644
--- a/content/browser/renderer_host/input/legacy_input_router_impl.cc
+++ b/content/browser/renderer_host/input/legacy_input_router_impl.cc
@@ -423,7 +423,7 @@
     // renderer. Consequently, such event types should not affect event time
     // or in-flight event count metrics.
     if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_BLOCKING)
-      client_->IncrementInFlightEventCount(input_event.GetType());
+      client_->IncrementInFlightEventCount();
     return true;
   }
   return false;
diff --git a/content/browser/renderer_host/input/legacy_input_router_impl_perftest.cc b/content/browser/renderer_host/input/legacy_input_router_impl_perftest.cc
index ab588af3..0e3e7b1 100644
--- a/content/browser/renderer_host/input/legacy_input_router_impl_perftest.cc
+++ b/content/browser/renderer_host/input/legacy_input_router_impl_perftest.cc
@@ -91,8 +91,7 @@
       const ui::LatencyInfo& latency_info) override {
     return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
   }
-  void IncrementInFlightEventCount(
-      blink::WebInputEvent::Type event_type) override {}
+  void IncrementInFlightEventCount() override {}
   void DecrementInFlightEventCount(InputEventAckSource ack_source) override {}
   void OnHasTouchEventHandlers(bool has_handlers) override {}
   void DidOverscroll(const ui::DidOverscrollParams& params) override {}
diff --git a/content/browser/renderer_host/input/mock_input_router_client.cc b/content/browser/renderer_host/input/mock_input_router_client.cc
index b3cbf79..203b668 100644
--- a/content/browser/renderer_host/input/mock_input_router_client.cc
+++ b/content/browser/renderer_host/input/mock_input_router_client.cc
@@ -36,9 +36,7 @@
   return filter_state_;
 }
 
-void MockInputRouterClient::IncrementInFlightEventCount(
-    blink::WebInputEvent::Type event_type) {
-  last_in_flight_event_type_ = event_type;
+void MockInputRouterClient::IncrementInFlightEventCount() {
   ++in_flight_event_count_;
 }
 
diff --git a/content/browser/renderer_host/input/mock_input_router_client.h b/content/browser/renderer_host/input/mock_input_router_client.h
index 23b1c30..5ce892b 100644
--- a/content/browser/renderer_host/input/mock_input_router_client.h
+++ b/content/browser/renderer_host/input/mock_input_router_client.h
@@ -26,8 +26,7 @@
   InputEventAckState FilterInputEvent(
       const blink::WebInputEvent& input_event,
       const ui::LatencyInfo& latency_info) override;
-  void IncrementInFlightEventCount(
-      blink::WebInputEvent::Type event_type) override;
+  void IncrementInFlightEventCount() override;
   void DecrementInFlightEventCount(InputEventAckSource ack_source) override;
   void OnHasTouchEventHandlers(bool has_handlers) override;
   void DidOverscroll(const ui::DidOverscrollParams& params) override;
@@ -57,7 +56,7 @@
     return in_flight_event_count_;
   }
   blink::WebInputEvent::Type last_in_flight_event_type() const {
-    return last_in_flight_event_type_;
+    return last_filter_event()->GetType();
   }
   void set_allow_send_event(bool allow) {
     filter_state_ = INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
@@ -69,8 +68,6 @@
  private:
   InputRouter* input_router_;
   int in_flight_event_count_;
-  blink::WebInputEvent::Type last_in_flight_event_type_ =
-      blink::WebInputEvent::kUndefined;
   bool has_touch_handler_;
 
   InputEventAckState filter_state_;
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 0dd00880..db018e66 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -189,10 +189,11 @@
     const MediaStreamDevice& device,
     base::TimeTicks start_time,
     const base::Optional<media::AudioParameters>& input_params,
-    const std::string& matched_output_device_id) {
+    const base::Optional<std::string>& matched_output_device_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(GetDevice(session_id) == devices_.end());
   DCHECK(!input_params || input_params->IsValid());
+  DCHECK(!matched_output_device_id || !matched_output_device_id->empty());
 
   UMA_HISTOGRAM_TIMES("Media.AudioInputDeviceManager.OpenOnDeviceThreadTime",
                       base::TimeTicks::Now() - start_time);
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index 503a261..b9d9d30 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -100,7 +100,7 @@
       const MediaStreamDevice& device,
       base::TimeTicks start_time,
       const base::Optional<media::AudioParameters>& input_params,
-      const std::string& matched_output_device_id);
+      const base::Optional<std::string>& matched_output_device_id);
 
   // Callback called on IO thread with the session_id referencing the closed
   // device.
diff --git a/content/browser/renderer_host/media/audio_output_authorization_handler.cc b/content/browser/renderer_host/media/audio_output_authorization_handler.cc
index d13a2c1..2a22c88 100644
--- a/content/browser/renderer_host/media/audio_output_authorization_handler.cc
+++ b/content/browser/renderer_host/media/audio_output_authorization_handler.cc
@@ -96,7 +96,7 @@
     const MediaStreamDevice* device =
         media_stream_manager_->audio_input_device_manager()
             ->GetOpenedDeviceById(session_id);
-    if (device && !device->matched_output_device_id.empty()) {
+    if (device && device->matched_output_device_id) {
       // We don't need the origin for authorization in this case, but it's used
       // for hashing the device id before sending it back to the renderer.
       BrowserThread::PostTaskAndReplyWithResult(
@@ -105,7 +105,7 @@
                          render_frame_id),
           base::BindOnce(&AudioOutputAuthorizationHandler::HashDeviceId,
                          weak_factory_.GetWeakPtr(), std::move(cb),
-                         device->matched_output_device_id));
+                         *device->matched_output_device_id));
       return;
     }
     // Otherwise, the default device is used.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index d27e842..d7ee1c0 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2549,7 +2549,6 @@
     switches::kDisableAcceleratedVideoDecode,
     switches::kDisableBackgroundTimerThrottling,
     switches::kDisableBreakpad,
-    switches::kDisableBrowserSideNavigation,
     switches::kDisableCompositorUkmForTests,
     switches::kDisablePreferCompositingToLCDText,
     switches::kDisableDatabases,
@@ -2584,7 +2583,6 @@
     switches::kDisableWebGLImageChromium,
     switches::kDomAutomationController,
     switches::kEnableAutomation,
-    switches::kEnableBrowserSideNavigation,
     switches::kEnableDistanceFieldText,
     switches::kEnableExperimentalCanvasFeatures,
     switches::kEnableExperimentalWebPlatformFeatures,
@@ -2764,15 +2762,20 @@
   }
 
 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+#if !BUILDFLAG(ENABLE_MUS)
   // If gpu compositing is not being used, tell the renderer at startup. This
   // is inherently racey, as it may change while the renderer is being launched,
   // but the renderer will hear about the correct state eventually. This
   // optimizes the common case to avoid wasted work.
   // Note: There is no ImageTransportFactory with Mus, but there is also no
-  // software compositing on ChromeOS where Mus is used, so no need to check
-  // this state and forward it.
+  // software compositing on platforms where Mus is used, e.g. ChromeOS, so
+  // no need to check this state and forward it.
   if (ImageTransportFactory::GetInstance()->IsGpuCompositingDisabled())
     renderer_cmd->AppendSwitch(switches::kDisableGpuCompositing);
+#else
+// TODO(tonikitoo): Check if renderer should use software compositing
+// through some mechanism that isn't ImageTransportFactory with mus.
+#endif
 #endif
 
   // Add kWaitForDebugger to let renderer process wait for a debugger.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 4820248c..1506a36 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -353,8 +353,6 @@
       is_focused_(false),
       hung_renderer_delay_(
           base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)),
-      hang_monitor_event_type_(blink::WebInputEvent::kUndefined),
-      last_event_type_(blink::WebInputEvent::kUndefined),
       new_content_rendering_delay_(
           base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)),
       current_content_source_id_(0),
@@ -1045,14 +1043,9 @@
     RestartHangMonitorTimeoutIfNecessary();
 }
 
-void RenderWidgetHostImpl::StartHangMonitorTimeout(
-    base::TimeDelta delay,
-    blink::WebInputEvent::Type event_type) {
+void RenderWidgetHostImpl::StartHangMonitorTimeout(base::TimeDelta delay) {
   if (!hang_monitor_timeout_)
     return;
-  if (!hang_monitor_timeout_->IsRunning())
-    hang_monitor_event_type_ = event_type;
-  last_event_type_ = event_type;
   hang_monitor_timeout_->Start(delay);
 }
 
@@ -2286,11 +2279,10 @@
                : INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
 }
 
-void RenderWidgetHostImpl::IncrementInFlightEventCount(
-    blink::WebInputEvent::Type event_type) {
+void RenderWidgetHostImpl::IncrementInFlightEventCount() {
   ++in_flight_event_count_;
   if (!is_hidden_)
-    StartHangMonitorTimeout(hung_renderer_delay_, event_type);
+    StartHangMonitorTimeout(hung_renderer_delay_);
 }
 
 void RenderWidgetHostImpl::DecrementInFlightEventCount(
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 859dae15..5ada4f00f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -558,12 +558,6 @@
                         const gfx::Range& range);
 
   size_t in_flight_event_count() const { return in_flight_event_count_; }
-  blink::WebInputEvent::Type hang_monitor_event_type() const {
-    return hang_monitor_event_type_;
-  }
-  blink::WebInputEvent::Type last_event_type() const {
-    return last_event_type_;
-  }
 
   bool renderer_initialized() const { return renderer_initialized_; }
 
@@ -749,8 +743,7 @@
   InputEventAckState FilterInputEvent(
       const blink::WebInputEvent& event,
       const ui::LatencyInfo& latency_info) override;
-  void IncrementInFlightEventCount(
-      blink::WebInputEvent::Type event_type) override;
+  void IncrementInFlightEventCount() override;
   void DecrementInFlightEventCount(InputEventAckSource ack_source) override;
   void OnHasTouchEventHandlers(bool has_handlers) override;
   void DidOverscroll(const ui::DidOverscrollParams& params) override;
@@ -785,8 +778,7 @@
   // Starts a hang monitor timeout. If there's already a hang monitor timeout
   // the new one will only fire if it has a shorter delay than the time
   // left on the existing timeouts.
-  void StartHangMonitorTimeout(base::TimeDelta delay,
-                               blink::WebInputEvent::Type event_type);
+  void StartHangMonitorTimeout(base::TimeDelta delay);
 
   // Stops all existing hang monitor timeouts and assumes the renderer is
   // responsive.
@@ -981,12 +973,6 @@
   // This value indicates how long to wait before we consider a renderer hung.
   base::TimeDelta hung_renderer_delay_;
 
-  // Type of the last blocking event that started the hang monitor.
-  blink::WebInputEvent::Type hang_monitor_event_type_;
-
-  // Type of the last blocking event sent to the renderer.
-  blink::WebInputEvent::Type last_event_type_;
-
   // This value indicates how long to wait for a new compositor frame from a
   // renderer process before clearing any previously displayed content.
   base::TimeDelta new_content_rendering_delay_;
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc b/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
index c434118..19fcbc6 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
@@ -145,6 +145,7 @@
   std::map<MockRenderWidgetHostView*, viz::FrameSinkId> frame_sink_id_map_;
 
   RenderWidgetHostInputEventRouter rwhier_;
+  TestBrowserThreadBundle thread_bundle_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouterTest);
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 1d6941a..7f16f2b 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -58,7 +58,7 @@
 #endif
 
 #if defined(USE_AURA) || defined(OS_MACOSX)
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #endif
 
 #if defined(USE_AURA)
@@ -604,7 +604,7 @@
     sink_ = &process_->sink();
 #if defined(USE_AURA) || defined(OS_MACOSX)
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
 #endif
 #if defined(OS_ANDROID)
     ui::SetScreenAndroid();  // calls display::Screen::SetScreenInstance().
@@ -1602,13 +1602,11 @@
 // while one is in progress (see crbug.com/11007).
 TEST_F(RenderWidgetHostTest, DontPostponeHangMonitorTimeout) {
   // Start with a short timeout.
-  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10));
 
   // Immediately try to add a long 30 second timeout.
   EXPECT_FALSE(delegate_->unresponsive_timer_fired());
-  host_->StartHangMonitorTimeout(TimeDelta::FromSeconds(30),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromSeconds(30));
 
   // Wait long enough for first timeout and see if it fired.
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -1622,14 +1620,12 @@
 // and then started again.
 TEST_F(RenderWidgetHostTest, StopAndStartHangMonitorTimeout) {
   // Start with a short timeout, then stop it.
-  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10));
   host_->StopHangMonitorTimeout();
 
   // Start it again to ensure it still works.
   EXPECT_FALSE(delegate_->unresponsive_timer_fired());
-  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10));
 
   // Wait long enough for first timeout and see if it fired.
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -1643,13 +1639,11 @@
 // updated to a shorter duration.
 TEST_F(RenderWidgetHostTest, ShorterDelayHangMonitorTimeout) {
   // Start with a timeout.
-  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(100),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(100));
 
   // Start it again with shorter delay.
   EXPECT_FALSE(delegate_->unresponsive_timer_fired());
-  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(20),
-                                 WebInputEvent::kUndefined);
+  host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(20));
 
   // Wait long enough for the second timeout and see if it fired.
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index a039c77..2f28c3e 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -884,30 +884,6 @@
   return surface_id.frame_sink_id();
 }
 
-void RenderWidgetHostViewAndroid::ProcessMouseEvent(
-    const blink::WebMouseEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardMouseEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAndroid::ProcessMouseWheelEvent(
-    const blink::WebMouseWheelEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardWheelEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAndroid::ProcessTouchEvent(
-    const blink::WebTouchEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardTouchEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAndroid::ProcessGestureEvent(
-    const blink::WebGestureEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardGestureEventWithLatencyInfo(event, latency);
-}
-
 bool RenderWidgetHostViewAndroid::TransformPointToLocalCoordSpace(
     const gfx::PointF& point,
     const viz::SurfaceId& original_surface,
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 62dd3725..94bf0418 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -175,14 +175,6 @@
   viz::FrameSinkId FrameSinkIdAtPoint(viz::SurfaceHittestDelegate* delegate,
                                       const gfx::PointF& point,
                                       gfx::PointF* transformed_point) override;
-  void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
-                              const ui::LatencyInfo& latency) override;
-  void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessGestureEvent(const blink::WebGestureEvent& event,
-                           const ui::LatencyInfo& latency) override;
   bool TransformPointToLocalCoordSpace(const gfx::PointF& point,
                                        const viz::SurfaceId& original_surface,
                                        gfx::PointF* transformed_point) override;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 256b1dcf..5f24ca9 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1681,30 +1681,6 @@
   return id.frame_sink_id();
 }
 
-void RenderWidgetHostViewAura::ProcessMouseEvent(
-    const blink::WebMouseEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardMouseEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAura::ProcessMouseWheelEvent(
-    const blink::WebMouseWheelEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardWheelEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAura::ProcessTouchEvent(
-    const blink::WebTouchEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardTouchEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewAura::ProcessGestureEvent(
-    const blink::WebGestureEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardGestureEventWithLatencyInfo(event, latency);
-}
-
 bool RenderWidgetHostViewAura::TransformPointToLocalCoordSpace(
     const gfx::PointF& point,
     const viz::SurfaceId& original_surface,
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 736f8f3..91fff1b4 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -190,14 +190,6 @@
   viz::FrameSinkId FrameSinkIdAtPoint(viz::SurfaceHittestDelegate* delegate,
                                       const gfx::PointF& point,
                                       gfx::PointF* transformed_point) override;
-  void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
-                              const ui::LatencyInfo& latency) override;
-  void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessGestureEvent(const blink::WebGestureEvent& event,
-                           const ui::LatencyInfo& latency) override;
   bool TransformPointToLocalCoordSpace(const gfx::PointF& point,
                                        const viz::SurfaceId& original_surface,
                                        gfx::PointF* transformed_point) override;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 9a97742..2ec45c37 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -19,6 +19,7 @@
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/test/null_task_runner.h"
 #include "base/test/scoped_feature_list.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "base/threading/thread_task_runner_handle.h"
@@ -40,7 +41,7 @@
 #include "components/viz/test/fake_surface_observer.h"
 #include "content/browser/browser_main_loop.h"
 #include "content/browser/browser_thread_impl.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/browser/frame_host/render_widget_host_view_guest.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/delegated_frame_host.h"
@@ -351,13 +352,14 @@
   size_t processed_touch_event_count_;
 };
 
-class FakeDelegatedFrameHostClientAura : public DelegatedFrameHostClientAura,
-                                         public ui::CompositorLockDelegate {
+class FakeDelegatedFrameHostClientAura
+    : public DelegatedFrameHostClientAura,
+      public ui::CompositorLockManagerClient {
  public:
   explicit FakeDelegatedFrameHostClientAura(
       RenderWidgetHostViewAura* render_widget_host_view)
       : DelegatedFrameHostClientAura(render_widget_host_view),
-        weak_ptr_factory_(this) {}
+        lock_manager_(new base::NullTaskRunner(), this) {}
   ~FakeDelegatedFrameHostClientAura() override = default;
 
   void DisableResizeLock() { can_create_resize_lock_ = false; }
@@ -376,8 +378,7 @@
   std::unique_ptr<ui::CompositorLock> GetCompositorLock(
       ui::CompositorLockClient* client) override {
     resize_locked_ = compositor_locked_ = true;
-    return std::make_unique<ui::CompositorLock>(nullptr,
-                                                weak_ptr_factory_.GetWeakPtr());
+    return lock_manager_.GetCompositorLock(nullptr, base::TimeDelta());
   }
   // CompositorResizeLockClient implemention. Overrides from
   // // DelegatedFrameHostClientAura.
@@ -386,15 +387,17 @@
     DelegatedFrameHostClientAura::CompositorResizeLockEnded();
   }
 
-  // ui::CompositorLockDelegate implemention.
-  void RemoveCompositorLock(ui::CompositorLock*) override {
-    compositor_locked_ = false;
+  // ui::CompositorLockManagerClient implementation.
+  void OnCompositorLockStateChanged(bool locked) override {
+    if (!locked) {
+      compositor_locked_ = false;
+    }
   }
 
   bool can_create_resize_lock_ = true;
   bool resize_locked_ = false;
   bool compositor_locked_ = false;
-  base::WeakPtrFactory<FakeDelegatedFrameHostClientAura> weak_ptr_factory_;
+  ui::CompositorLockManager lock_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeDelegatedFrameHostClientAura);
 };
@@ -615,7 +618,7 @@
   void SetUpEnvironment() {
     mojo_feature_list_.InitAndEnableFeature(features::kMojoInputMessages);
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
     aura_test_helper_.reset(new aura::test::AuraTestHelper());
     aura_test_helper_->SetUp(
         ImageTransportFactory::GetInstance()->GetContextFactory(),
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index df35e5c8..95c399e 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -440,6 +440,36 @@
   return viz::FrameSinkId();
 }
 
+void RenderWidgetHostViewBase::ProcessMouseEvent(
+    const blink::WebMouseEvent& event,
+    const ui::LatencyInfo& latency) {
+  PreProcessMouseEvent(event);
+  auto* host = GetRenderWidgetHostImpl();
+  host->ForwardMouseEventWithLatencyInfo(event, latency);
+}
+
+void RenderWidgetHostViewBase::ProcessMouseWheelEvent(
+    const blink::WebMouseWheelEvent& event,
+    const ui::LatencyInfo& latency) {
+  auto* host = GetRenderWidgetHostImpl();
+  host->ForwardWheelEventWithLatencyInfo(event, latency);
+}
+
+void RenderWidgetHostViewBase::ProcessTouchEvent(
+    const blink::WebTouchEvent& event,
+    const ui::LatencyInfo& latency) {
+  PreProcessTouchEvent(event);
+  auto* host = GetRenderWidgetHostImpl();
+  host->ForwardTouchEventWithLatencyInfo(event, latency);
+}
+
+void RenderWidgetHostViewBase::ProcessGestureEvent(
+    const blink::WebGestureEvent& event,
+    const ui::LatencyInfo& latency) {
+  auto* host = GetRenderWidgetHostImpl();
+  host->ForwardGestureEventWithLatencyInfo(event, latency);
+}
+
 gfx::PointF RenderWidgetHostViewBase::TransformPointToRootCoordSpaceF(
     const gfx::PointF& point) {
   return point;
@@ -551,10 +581,6 @@
 }
 #endif
 
-bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
-  return false;
-}
-
 viz::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
   return viz::SurfaceId();
 }
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index c8d3399..8e25605 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -88,7 +88,6 @@
 class TouchSelectionControllerClientManager;
 class WebContentsAccessibility;
 class WebCursor;
-struct NativeWebKeyboardEvent;
 struct TextInputState;
 
 // Basic implementation shared by concrete RenderWidgetHostView subclasses.
@@ -301,16 +300,18 @@
       viz::SurfaceHittestDelegate* delegate,
       const gfx::PointF& point,
       gfx::PointF* transformed_point);
-  virtual void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event,
-                                    const ui::LatencyInfo& latency) {}
-  virtual void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                                 const ui::LatencyInfo& latency) {}
-  virtual void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
-                                      const ui::LatencyInfo& latency) {}
-  virtual void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                                 const ui::LatencyInfo& latency) {}
+
+  virtual void PreProcessMouseEvent(const blink::WebMouseEvent& event) {}
+  virtual void PreProcessTouchEvent(const blink::WebTouchEvent& event) {}
+
+  void ProcessMouseEvent(const blink::WebMouseEvent& event,
+                         const ui::LatencyInfo& latency);
+  void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
+                              const ui::LatencyInfo& latency);
+  void ProcessTouchEvent(const blink::WebTouchEvent& event,
+                         const ui::LatencyInfo& latency);
   virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
-                                   const ui::LatencyInfo& latency) {}
+                                   const ui::LatencyInfo& latency);
 
   // Transform a point that is in the coordinate space of a Surface that is
   // embedded within the RenderWidgetHostViewBase's Surface to the
@@ -498,7 +499,6 @@
 #endif
 
   // Exposed for testing.
-  virtual bool IsChildFrameForTesting() const;
   virtual viz::SurfaceId SurfaceIdForTesting() const;
 
  protected:
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 89c49185..4a2d0fc5 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -698,38 +698,12 @@
   return viz::LocalSurfaceId();
 }
 
-void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent(
-    const NativeWebKeyboardEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardKeyboardEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewChildFrame::ProcessMouseEvent(
-    const blink::WebMouseEvent& event,
-    const ui::LatencyInfo& latency) {
-  host_->ForwardMouseEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewChildFrame::ProcessMouseWheelEvent(
-    const blink::WebMouseWheelEvent& event,
-    const ui::LatencyInfo& latency) {
-  if (event.delta_x != 0 || event.delta_y != 0 ||
-      event.phase == blink::WebMouseWheelEvent::kPhaseEnded ||
-      event.phase == blink::WebMouseWheelEvent::kPhaseCancelled ||
-      event.momentum_phase == blink::WebMouseWheelEvent::kPhaseEnded ||
-      event.momentum_phase == blink::WebMouseWheelEvent::kPhaseCancelled)
-    host_->ForwardWheelEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewChildFrame::ProcessTouchEvent(
-    const blink::WebTouchEvent& event,
-    const ui::LatencyInfo& latency) {
+void RenderWidgetHostViewChildFrame::PreProcessTouchEvent(
+    const blink::WebTouchEvent& event) {
   if (event.GetType() == blink::WebInputEvent::kTouchStart &&
       frame_connector_ && !frame_connector_->HasFocus()) {
     frame_connector_->FocusRootView();
   }
-
-  host_->ForwardTouchEventWithLatencyInfo(event, latency);
 }
 
 void RenderWidgetHostViewChildFrame::ProcessGestureEvent(
@@ -757,7 +731,7 @@
     return;
   }
 
-  host_->ForwardGestureEventWithLatencyInfo(event, latency);
+  RenderWidgetHostViewBase::ProcessGestureEvent(event, latency);
 }
 
 gfx::PointF RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpaceF(
@@ -1016,10 +990,6 @@
   has_frame_ = false;
 }
 
-bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
-  return true;
-}
-
 viz::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
   return viz::SurfaceId(frame_sink_id_, last_received_local_surface_id_);
 }
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index 1661e26..6fccebd 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -140,14 +140,7 @@
   RenderWidgetHostImpl* GetRenderWidgetHostImpl() const override;
   viz::FrameSinkId GetFrameSinkId() override;
   viz::LocalSurfaceId GetLocalSurfaceId() const override;
-  void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event,
-                            const ui::LatencyInfo& latency) override;
-  void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
-                              const ui::LatencyInfo& latency) override;
-  void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                         const ui::LatencyInfo& latency) override;
+  void PreProcessTouchEvent(const blink::WebTouchEvent& event) override;
   void ProcessGestureEvent(const blink::WebGestureEvent& event,
                            const ui::LatencyInfo& latency) override;
   gfx::PointF TransformPointToRootCoordSpaceF(
@@ -203,7 +196,6 @@
   void OnFrameTokenChanged(uint32_t frame_token) override;
 
   // Exposed for tests.
-  bool IsChildFrameForTesting() const override;
   viz::SurfaceId SurfaceIdForTesting() const override;
   FrameConnectorDelegate* FrameConnectorForTesting() const {
     return frame_connector_;
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/renderer_host/render_widget_host_view_child_frame_unittest.cc
index 5cd8d658d..4a48803 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame_unittest.cc
@@ -18,11 +18,12 @@
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/surface_sequence.h"
 #include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
+#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
 #include "components/viz/service/surfaces/surface.h"
 #include "components/viz/service/surfaces/surface_manager.h"
 #include "components/viz/test/begin_frame_args_test.h"
 #include "components/viz/test/fake_external_begin_frame_source.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/frame_connector_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
@@ -92,7 +93,7 @@
 // ImageTransportFactory doesn't exist on Android.
 #if !defined(OS_ANDROID)
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
 #endif
 
     MockRenderProcessHost* process_host =
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 6cd9fa7..56d4f9d 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -354,6 +354,7 @@
 
   RenderWidgetHostImpl* GetRenderWidgetHostImpl() const override;
   viz::FrameSinkId GetFrameSinkId() override;
+  viz::LocalSurfaceId GetLocalSurfaceId() const override;
   viz::FrameSinkId FrameSinkIdAtPoint(viz::SurfaceHittestDelegate* delegate,
                                       const gfx::PointF& point,
                                       gfx::PointF* transformed_point) override;
@@ -367,14 +368,6 @@
   // consumer, such as PDF or maps, wants to intercept them and implement a
   // custom behavior.
   void SendGesturePinchEvent(blink::WebGestureEvent* event);
-  void ProcessMouseEvent(const blink::WebMouseEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
-                              const ui::LatencyInfo& latency) override;
-  void ProcessTouchEvent(const blink::WebTouchEvent& event,
-                         const ui::LatencyInfo& latency) override;
-  void ProcessGestureEvent(const blink::WebGestureEvent& event,
-                           const ui::LatencyInfo& latency) override;
   bool TransformPointToLocalCoordSpace(const gfx::PointF& point,
                                        const viz::SurfaceId& original_surface,
                                        gfx::PointF* transformed_point) override;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index d279eb1e..0574d766 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1525,6 +1525,11 @@
   return render_widget_host_;
 }
 
+viz::LocalSurfaceId RenderWidgetHostViewMac::GetLocalSurfaceId() const {
+  // Call to the DelegatedFrameHost interface.
+  return browser_compositor_->GetLocalSurfaceId();
+}
+
 viz::FrameSinkId RenderWidgetHostViewMac::GetFrameSinkId() {
   return browser_compositor_->GetDelegatedFrameHost()->GetFrameSinkId();
 }
@@ -1573,29 +1578,6 @@
   render_widget_host_->ForwardGestureEvent(*event);
 }
 
-void RenderWidgetHostViewMac::ProcessMouseEvent(
-    const blink::WebMouseEvent& event,
-    const ui::LatencyInfo& latency) {
-  render_widget_host_->ForwardMouseEventWithLatencyInfo(event, latency);
-}
-void RenderWidgetHostViewMac::ProcessMouseWheelEvent(
-    const blink::WebMouseWheelEvent& event,
-    const ui::LatencyInfo& latency) {
-  render_widget_host_->ForwardWheelEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewMac::ProcessTouchEvent(
-    const blink::WebTouchEvent& event,
-    const ui::LatencyInfo& latency) {
-  render_widget_host_->ForwardTouchEventWithLatencyInfo(event, latency);
-}
-
-void RenderWidgetHostViewMac::ProcessGestureEvent(
-    const blink::WebGestureEvent& event,
-    const ui::LatencyInfo& latency) {
-  render_widget_host_->ForwardGestureEventWithLatencyInfo(event, latency);
-}
-
 bool RenderWidgetHostViewMac::TransformPointToLocalCoordSpace(
     const gfx::PointF& point,
     const viz::SurfaceId& original_surface,
@@ -2453,17 +2435,25 @@
 
 - (void)handleEndGestureWithEvent:(NSEvent*)event {
   [responderDelegate_ endGestureWithEvent:event];
-  gestureBeginEvent_.reset();
 
-  if (!renderWidgetHostView_->render_widget_host_)
-    return;
+  // On macOS 10.11+, the end event has type = NSEventTypeMagnify and phase =
+  // NSEventPhaseEnded. On macOS 10.10 and older, the event has type =
+  // NSEventTypeEndGesture.
+  if ([event type] == NSEventTypeMagnify ||
+      [event type] == NSEventTypeEndGesture) {
+    gestureBeginEvent_.reset();
 
-  if (gestureBeginPinchSent_) {
-    WebGestureEvent endEvent(WebGestureEventBuilder::Build(event, self));
-    endEvent.SetType(WebInputEvent::kGesturePinchEnd);
-    endEvent.source_device = blink::WebGestureDevice::kWebGestureDeviceTouchpad;
-    renderWidgetHostView_->SendGesturePinchEvent(&endEvent);
-    gestureBeginPinchSent_ = NO;
+    if (!renderWidgetHostView_->render_widget_host_)
+      return;
+
+    if (gestureBeginPinchSent_) {
+      WebGestureEvent endEvent(WebGestureEventBuilder::Build(event, self));
+      endEvent.SetType(WebInputEvent::kGesturePinchEnd);
+      endEvent.source_device =
+          blink::WebGestureDevice::kWebGestureDeviceTouchpad;
+      renderWidgetHostView_->SendGesturePinchEvent(&endEvent);
+      gestureBeginPinchSent_ = NO;
+    }
   }
 }
 
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
index 09ad9c3..ca82d54 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
@@ -12,7 +12,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -99,7 +99,7 @@
  protected:
   void SetUp() override {
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
   }
   void TearDown() override { ImageTransportFactory::Terminate(); }
 
@@ -112,7 +112,7 @@
  protected:
   void SetUp() override {
     ImageTransportFactory::SetFactory(
-        std::make_unique<NoTransportImageTransportFactory>());
+        std::make_unique<TestImageTransportFactory>());
   }
   void TearDown() override { ImageTransportFactory::Terminate(); }
 
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index 50b9039..f20025a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -22,7 +22,6 @@
 #include "base/test/simple_test_tick_clock.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "content/browser/browser_thread_impl.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
 #include "content/browser/frame_host/render_widget_host_view_guest.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
@@ -172,17 +171,9 @@
   return event;
 }
 
-NSEventPhase PhaseForEventType(NSEventType type) {
-  if (type == NSEventTypeBeginGesture)
-    return NSEventPhaseBegan;
-  if (type == NSEventTypeEndGesture)
-    return NSEventPhaseEnded;
-  return NSEventPhaseChanged;
-}
-
-id MockGestureEvent(NSEventType type, double magnification) {
+id MockPinchEvent(NSEventPhase phase, double magnification) {
   id event = [OCMockObject mockForClass:[NSEvent class]];
-  NSEventPhase phase = PhaseForEventType(type);
+  NSEventType type = NSEventTypeMagnify;
   NSPoint locationInWindow = NSMakePoint(0, 0);
   CGFloat deltaX = 0;
   CGFloat deltaY = 0;
@@ -1506,15 +1497,15 @@
     return true;
   }
 
-  void SendBeginEvent() {
-    NSEvent* pinchBeginEvent = MockGestureEvent(NSEventTypeBeginGesture, 0);
+  void SendBeginPinchEvent() {
+    NSEvent* pinchBeginEvent = MockPinchEvent(NSEventPhaseBegan, 0);
     if (ShouldSendGestureEvents())
       [rwhv_cocoa_ beginGestureWithEvent:pinchBeginEvent];
     [rwhv_cocoa_ magnifyWithEvent:pinchBeginEvent];
   }
 
-  void SendEndEvent() {
-    NSEvent* pinchEndEvent = MockGestureEvent(NSEventTypeEndGesture, 0);
+  void SendEndPinchEvent() {
+    NSEvent* pinchEndEvent = MockPinchEvent(NSEventPhaseEnded, 0);
     [rwhv_cocoa_ magnifyWithEvent:pinchEndEvent];
     if (ShouldSendGestureEvents())
       [rwhv_cocoa_ endGestureWithEvent:pinchEndEvent];
@@ -1528,12 +1519,12 @@
   // Do a gesture that crosses the threshold.
   {
     NSEvent* pinchUpdateEvents[3] = {
-        MockGestureEvent(NSEventTypeMagnify, 0.25),
-        MockGestureEvent(NSEventTypeMagnify, 0.25),
-        MockGestureEvent(NSEventTypeMagnify, 0.25),
+        MockPinchEvent(NSEventPhaseChanged, 0.25),
+        MockPinchEvent(NSEventPhaseChanged, 0.25),
+        MockPinchEvent(NSEventPhaseChanged, 0.25),
     };
 
-    SendBeginEvent();
+    SendBeginPinchEvent();
     base::RunLoop().RunUntilIdle();
     MockWidgetInputHandler::MessageVector events =
         host_->GetAndResetDispatchedMessages();
@@ -1562,7 +1553,7 @@
     EXPECT_EQ("GesturePinchUpdate", GetMessageNames(events));
     EXPECT_FALSE(ZoomDisabledForPinchUpdateMessage(events));
 
-    SendEndEvent();
+    SendEndPinchEvent();
     base::RunLoop().RunUntilIdle();
     events = host_->GetAndResetDispatchedMessages();
     EXPECT_EQ("GesturePinchEnd", GetMessageNames(events));
@@ -1571,11 +1562,11 @@
   // Do a gesture that doesn't cross the threshold, but happens when we're not
   // at page scale factor one, so it should be sent to the renderer.
   {
-    NSEvent* pinchUpdateEvent = MockGestureEvent(NSEventTypeMagnify, 0.25);
+    NSEvent* pinchUpdateEvent = MockPinchEvent(NSEventPhaseChanged, 0.25);
 
     rwhv_mac_->page_at_minimum_scale_ = false;
 
-    SendBeginEvent();
+    SendBeginPinchEvent();
     base::RunLoop().RunUntilIdle();
     MockWidgetInputHandler::MessageVector events =
         host_->GetAndResetDispatchedMessages();
@@ -1588,7 +1579,7 @@
     EXPECT_EQ("GesturePinchBegin GesturePinchUpdate", GetMessageNames(events));
     EXPECT_FALSE(ZoomDisabledForPinchUpdateMessage(events));
 
-    SendEndEvent();
+    SendEndPinchEvent();
     base::RunLoop().RunUntilIdle();
     events = host_->GetAndResetDispatchedMessages();
     EXPECT_EQ("GesturePinchEnd", GetMessageNames(events));
@@ -1597,11 +1588,11 @@
   // Do a gesture again, after the page scale is no longer at one, and ensure
   // that it is thresholded again.
   {
-    NSEvent* pinchUpdateEvent = MockGestureEvent(NSEventTypeMagnify, 0.25);
+    NSEvent* pinchUpdateEvent = MockPinchEvent(NSEventTypeMagnify, 0.25);
 
     rwhv_mac_->page_at_minimum_scale_ = true;
 
-    SendBeginEvent();
+    SendBeginPinchEvent();
     base::RunLoop().RunUntilIdle();
     MockWidgetInputHandler::MessageVector events =
         host_->GetAndResetDispatchedMessages();
@@ -1618,7 +1609,7 @@
     EXPECT_EQ("GesturePinchBegin GesturePinchUpdate", GetMessageNames(events));
     EXPECT_TRUE(ZoomDisabledForPinchUpdateMessage(events));
 
-    SendEndEvent();
+    SendEndPinchEvent();
     base::RunLoop().RunUntilIdle();
     events = host_->GetAndResetDispatchedMessages();
     EXPECT_EQ("GesturePinchEnd", GetMessageNames(events));
diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
index 2045833..17af3972 100644
--- a/content/browser/renderer_interface_binders.cc
+++ b/content/browser/renderer_interface_binders.cc
@@ -149,7 +149,7 @@
          const url::Origin& origin) {
         static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
             ->GetLockManager()
-            ->CreateService(std::move(request));
+            ->CreateService(std::move(request), origin);
       }));
   parameterized_binder_registry_.AddInterface(
       base::Bind(&CreateDedicatedWorkerHostFactory));
diff --git a/content/browser/sandbox_parameters_mac.h b/content/browser/sandbox_parameters_mac.h
index e87b08e..9ebb16f 100644
--- a/content/browser/sandbox_parameters_mac.h
+++ b/content/browser/sandbox_parameters_mac.h
@@ -18,7 +18,7 @@
 // All of the below functions populate the |client| with the parameters that the
 // sandbox needs to resolve information that cannot be known at build time, such
 // as the user's home directory.
-void SetupRendererSandboxParameters(sandbox::SeatbeltExecClient* client);
+void SetupCommonSandboxParameters(sandbox::SeatbeltExecClient* client);
 
 void SetupUtilitySandboxParameters(sandbox::SeatbeltExecClient* client,
                                    const base::CommandLine& command_line);
diff --git a/content/browser/sandbox_parameters_mac.mm b/content/browser/sandbox_parameters_mac.mm
index 736940c..2adc63a 100644
--- a/content/browser/sandbox_parameters_mac.mm
+++ b/content/browser/sandbox_parameters_mac.mm
@@ -39,6 +39,8 @@
   return std::to_string(final_os_version);
 }
 
+}  // namespace
+
 void SetupCommonSandboxParameters(sandbox::SeatbeltExecClient* client) {
   const base::CommandLine* command_line =
       base::CommandLine::ForCurrentProcess();
@@ -89,12 +91,6 @@
       service_manager::SandboxMac::kSandboxHomedirAsLiteral, homedir));
 }
 
-}  // namespace
-
-void SetupRendererSandboxParameters(sandbox::SeatbeltExecClient* client) {
-  SetupCommonSandboxParameters(client);
-}
-
 void SetupUtilitySandboxParameters(sandbox::SeatbeltExecClient* client,
                                    const base::CommandLine& command_line) {
   SetupCommonSandboxParameters(client);
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index 8559624..dc20985 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -33,6 +33,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/gpu_service_registry.h"
+#include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/utility_process_host_client.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_features.h"
@@ -527,6 +528,10 @@
       out_of_process_services[mojom::kNetworkServiceName] =
           base::ASCIIToUTF16("Network Service");
     }
+  } else {
+    // Create the in-process NetworkService object so that its getter is
+    // available on the IO thread.
+    GetNetworkService();
   }
 
   if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) {
diff --git a/content/browser/service_worker/service_worker_process_manager_unittest.cc b/content/browser/service_worker/service_worker_process_manager_unittest.cc
index 22c428f0..06776ef 100644
--- a/content/browser/service_worker/service_worker_process_manager_unittest.cc
+++ b/content/browser/service_worker/service_worker_process_manager_unittest.cc
@@ -146,105 +146,6 @@
   EXPECT_EQ(host3->GetID(), process_manager_->FindAvailableProcess(pattern_));
 }
 
-// This tests the process host tracking by ServiceWorkerProcessManager
-// which only is done when PlzNavigate is disabled.
-TEST_F(ServiceWorkerProcessManagerTest,
-       AllocateWorkerProcess_FindAvailableProcess_NonPlzNavigate) {
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndDisableFeature(features::kBrowserSideNavigation);
-
-  const int kEmbeddedWorkerId1 = 100;
-  const int kEmbeddedWorkerId2 = 200;
-  const int kEmbeddedWorkerId3 = 300;
-  GURL scope1("http://example.com/scope1");
-  GURL scope2("http://example.com/scope2");
-
-  // Set up mock renderer process hosts.
-  std::unique_ptr<MockRenderProcessHost> host1(CreateRenderProcessHost());
-  std::unique_ptr<MockRenderProcessHost> host2(CreateRenderProcessHost());
-  process_manager_->AddProcessReferenceToPattern(scope1, host1->GetID());
-  process_manager_->AddProcessReferenceToPattern(scope2, host2->GetID());
-  ASSERT_EQ(0u, host1->GetKeepAliveRefCount());
-  ASSERT_EQ(0u, host2->GetKeepAliveRefCount());
-
-  std::map<int, ServiceWorkerProcessManager::ProcessInfo>& instance_info =
-      process_manager_->instance_info_;
-
-  // (1) Allocate a process to a worker.
-  ServiceWorkerProcessManager::AllocatedProcessInfo process_info;
-  ServiceWorkerStatusCode status = process_manager_->AllocateWorkerProcess(
-      kEmbeddedWorkerId1, scope1, script_url_,
-      true /* can_use_existing_process */, &process_info);
-
-  // An existing process should be allocated to the worker.
-  EXPECT_EQ(SERVICE_WORKER_OK, status);
-  EXPECT_EQ(host1->GetID(), process_info.process_id);
-  EXPECT_EQ(ServiceWorkerMetrics::StartSituation::EXISTING_READY_PROCESS,
-            process_info.start_situation);
-  EXPECT_EQ(1u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(0u, host2->GetKeepAliveRefCount());
-  EXPECT_EQ(1u, instance_info.size());
-  std::map<int, ServiceWorkerProcessManager::ProcessInfo>::iterator found =
-      instance_info.find(kEmbeddedWorkerId1);
-  ASSERT_TRUE(found != instance_info.end());
-  EXPECT_EQ(host1->GetID(), found->second.process_id);
-
-  // (2) Allocate a process to another worker whose scope is the same with the
-  // first worker.
-  status = process_manager_->AllocateWorkerProcess(
-      kEmbeddedWorkerId2, scope1, script_url_,
-      true /* can_use_existing_process */, &process_info);
-
-  // The same process should be allocated to the second worker.
-  EXPECT_EQ(SERVICE_WORKER_OK, status);
-  EXPECT_EQ(host1->GetID(), process_info.process_id);
-  EXPECT_EQ(ServiceWorkerMetrics::StartSituation::EXISTING_READY_PROCESS,
-            process_info.start_situation);
-  EXPECT_EQ(2u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(0u, host2->GetKeepAliveRefCount());
-  EXPECT_EQ(2u, instance_info.size());
-  found = instance_info.find(kEmbeddedWorkerId2);
-  ASSERT_TRUE(found != instance_info.end());
-  EXPECT_EQ(host1->GetID(), found->second.process_id);
-
-  // (3) Allocate a process to a third worker whose scope is different from
-  // other workers.
-  status = process_manager_->AllocateWorkerProcess(
-      kEmbeddedWorkerId3, scope2, script_url_,
-      true /* can_use_existing_process */, &process_info);
-
-  // A different existing process should be allocated to the third worker.
-  EXPECT_EQ(SERVICE_WORKER_OK, status);
-  EXPECT_EQ(host2->GetID(), process_info.process_id);
-  EXPECT_EQ(ServiceWorkerMetrics::StartSituation::EXISTING_READY_PROCESS,
-            process_info.start_situation);
-  EXPECT_EQ(2u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(1u, host2->GetKeepAliveRefCount());
-  EXPECT_EQ(3u, instance_info.size());
-  found = instance_info.find(kEmbeddedWorkerId3);
-  ASSERT_TRUE(found != instance_info.end());
-  EXPECT_EQ(host2->GetID(), found->second.process_id);
-
-  // The instance map should be updated by process release.
-  process_manager_->ReleaseWorkerProcess(kEmbeddedWorkerId3);
-  EXPECT_EQ(2u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(0u, host2->GetKeepAliveRefCount());
-  EXPECT_EQ(2u, instance_info.size());
-  EXPECT_TRUE(base::ContainsKey(instance_info, kEmbeddedWorkerId1));
-  EXPECT_TRUE(base::ContainsKey(instance_info, kEmbeddedWorkerId2));
-
-  process_manager_->ReleaseWorkerProcess(kEmbeddedWorkerId1);
-  EXPECT_EQ(1u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(0u, host2->GetKeepAliveRefCount());
-  EXPECT_EQ(1u, instance_info.size());
-  EXPECT_TRUE(base::ContainsKey(instance_info, kEmbeddedWorkerId2));
-
-  process_manager_->ReleaseWorkerProcess(kEmbeddedWorkerId2);
-  EXPECT_EQ(0u, host1->GetKeepAliveRefCount());
-  EXPECT_EQ(0u, host2->GetKeepAliveRefCount());
-  EXPECT_TRUE(instance_info.empty());
-}
-
 TEST_F(ServiceWorkerProcessManagerTest,
        AllocateWorkerProcess_WithProcessReuse) {
   const int kEmbeddedWorkerId = 100;
diff --git a/content/browser/service_worker/service_worker_provider_host_unittest.cc b/content/browser/service_worker/service_worker_provider_host_unittest.cc
index d58c983..95817d7 100644
--- a/content/browser/service_worker/service_worker_provider_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_provider_host_unittest.cc
@@ -496,8 +496,6 @@
 };
 
 TEST_F(ServiceWorkerProviderHostTest, Controller) {
-  base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kEnableBrowserSideNavigation);
   // Create a host.
   std::unique_ptr<ServiceWorkerProviderHost> host =
       ServiceWorkerProviderHost::PreCreateNavigationHost(
@@ -537,8 +535,6 @@
 }
 
 TEST_F(ServiceWorkerProviderHostTest, ActiveIsNotController) {
-  base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kEnableBrowserSideNavigation);
   // Create a host.
   std::unique_ptr<ServiceWorkerProviderHost> host =
       ServiceWorkerProviderHost::PreCreateNavigationHost(
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index c284e46..8cd4f4e 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -365,8 +365,9 @@
       }));
   content::RunThisRunLoop(&run_loop);
   ASSERT_EQ(
-      viz::FrameSinkId(root_view->GetRenderWidgetHost()->GetProcess()->GetID(),
-                       rwhv_child->GetRenderWidgetHost()->GetRoutingID()),
+      viz::FrameSinkId(
+          root_view->GetRenderWidgetHost()->GetProcess()->GetID(),
+          child_node->render_manager()->GetProxyToParent()->GetRoutingID()),
       received_frame_sink_id);
 
   main_frame_monitor.ResetEventReceived();
@@ -12842,4 +12843,95 @@
   EXPECT_NE(third_shell_instance->GetProcess(), bar_process);
 }
 
+// Verify InputTargetClient works within an OOPIF process.
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, HitTestNestedFrames) {
+  GURL main_url(embedded_test_server()->GetURL(
+      "/frame_tree/page_with_positioned_nested_frames.html"));
+  EXPECT_TRUE(NavigateToURL(shell(), main_url));
+
+  FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
+                            ->GetFrameTree()
+                            ->root();
+  ASSERT_EQ(1U, root->child_count());
+
+  EXPECT_EQ(
+      " Site A ------------ proxies for B C\n"
+      "   +--Site B ------- proxies for A C\n"
+      "        +--Site C -- proxies for A B\n"
+      "Where A = http://127.0.0.1/\n"
+      "      B = http://a.com/\n"
+      "      C = http://baz.com/",
+      DepictFrameTree(root));
+
+  FrameTreeNode* child_node = root->child_at(0);
+  FrameTreeNode* grandchild_node = child_node->child_at(0);
+  RenderWidgetHostViewBase* rwhv_child = static_cast<RenderWidgetHostViewBase*>(
+      child_node->current_frame_host()->GetRenderWidgetHost()->GetView());
+  RenderWidgetHostViewBase* rwhv_grandchild =
+      static_cast<RenderWidgetHostViewBase*>(
+          grandchild_node->current_frame_host()
+              ->GetRenderWidgetHost()
+              ->GetView());
+
+  WaitForChildFrameSurfaceReady(grandchild_node->current_frame_host());
+
+  float scale_factor = GetPageScaleFactor(shell());
+  gfx::Rect child_bounds = rwhv_child->GetViewBounds();
+  gfx::Rect nested_child_bounds = rwhv_grandchild->GetViewBounds();
+
+  // Create two points to hit test: One in the child of the main frame, and
+  // one in the frame nested within that. The hit test request is sent to the
+  // child's renderer.
+  gfx::Point point_in_child(1, 1);
+  gfx::Point point_in_nested_child(
+      (nested_child_bounds.x() - child_bounds.x() + 5) * scale_factor,
+      (nested_child_bounds.y() - child_bounds.y() + 5) * scale_factor);
+
+  {
+    base::RunLoop run_loop;
+    viz::FrameSinkId received_frame_sink_id;
+    base::Closure quit_closure =
+        content::GetDeferredQuitTaskForRunLoop(&run_loop);
+    DCHECK_NE(child_node->current_frame_host()->GetInputTargetClient(),
+              nullptr);
+    child_node->current_frame_host()->GetInputTargetClient()->FrameSinkIdAt(
+        point_in_child,
+        base::BindLambdaForTesting([&](const viz::FrameSinkId& id) {
+          received_frame_sink_id = id;
+          quit_closure.Run();
+        }));
+    content::RunThisRunLoop(&run_loop);
+    // |point_in_child| should hit test to |child_node|.
+    ASSERT_EQ(viz::FrameSinkId(
+                  rwhv_child->GetRenderWidgetHost()->GetProcess()->GetID(),
+                  child_node->current_frame_host()->GetRoutingID()),
+              received_frame_sink_id);
+  }
+
+  {
+    base::RunLoop run_loop;
+    viz::FrameSinkId received_frame_sink_id;
+    base::Closure quit_closure =
+        content::GetDeferredQuitTaskForRunLoop(&run_loop);
+    DCHECK_NE(child_node->current_frame_host()->GetInputTargetClient(),
+              nullptr);
+    child_node->current_frame_host()->GetInputTargetClient()->FrameSinkIdAt(
+        point_in_nested_child,
+        base::BindLambdaForTesting([&](const viz::FrameSinkId& id) {
+          received_frame_sink_id = id;
+          quit_closure.Run();
+        }));
+    content::RunThisRunLoop(&run_loop);
+    // |point_in_nested_child| should hit test to |rwhv_grandchild|. We have
+    // to check against the nested child's RenderFrameProxyHost for the parent
+    // frame's SiteInstance.
+    ASSERT_EQ(viz::FrameSinkId(
+                  rwhv_child->GetRenderWidgetHost()->GetProcess()->GetID(),
+                  grandchild_node->render_manager()
+                      ->GetProxyToParent()
+                      ->GetRoutingID()),
+              received_frame_sink_id);
+  }
+}
+
 }  // namespace content
diff --git a/content/browser/site_per_process_mac_browsertest.mm b/content/browser/site_per_process_mac_browsertest.mm
index 54388fe3..ee3f0bed 100644
--- a/content/browser/site_per_process_mac_browsertest.mm
+++ b/content/browser/site_per_process_mac_browsertest.mm
@@ -227,17 +227,12 @@
 
 namespace {
 
-NSEventPhase PhaseForEventType(NSEventType type) {
-  if (type == NSEventTypeBeginGesture)
-    return NSEventPhaseBegan;
-  if (type == NSEventTypeEndGesture)
-    return NSEventPhaseEnded;
-  return NSEventPhaseChanged;
-}
-
-id MockGestureEvent(NSEventType type, double magnification, int x, int y) {
+id MockGestureEvent(NSEventType type,
+                    double magnification,
+                    int x,
+                    int y,
+                    NSEventPhase phase) {
   id event = [OCMockObject mockForClass:[NSEvent class]];
-  NSEventPhase phase = PhaseForEventType(type);
   NSPoint locationInWindow = NSMakePoint(x, y);
   CGFloat deltaX = 0;
   CGFloat deltaY = 0;
@@ -274,21 +269,24 @@
   auto* root_view_mac = static_cast<RenderWidgetHostViewMac*>(root_view);
   RenderWidgetHostViewCocoa* cocoa_view = root_view_mac->cocoa_view();
 
-  NSEvent* pinchBeginEvent = MockGestureEvent(
-      NSEventTypeBeginGesture, 0, gesture_point.x(), gesture_point.y());
+  NSEvent* pinchBeginEvent =
+      MockGestureEvent(NSEventTypeMagnify, 0, gesture_point.x(),
+                       gesture_point.y(), NSEventPhaseBegan);
   if (ShouldSendGestureEvents())
     [cocoa_view beginGestureWithEvent:pinchBeginEvent];
   [cocoa_view magnifyWithEvent:pinchBeginEvent];
   // We don't check the gesture target yet, since on mac the GesturePinchBegin
   // isn't sent until the first PinchUpdate.
 
-  NSEvent* pinchUpdateEvent = MockGestureEvent(
-      NSEventTypeMagnify, 0.25, gesture_point.x(), gesture_point.y());
+  NSEvent* pinchUpdateEvent =
+      MockGestureEvent(NSEventTypeMagnify, 0.25, gesture_point.x(),
+                       gesture_point.y(), NSEventPhaseChanged);
   [cocoa_view magnifyWithEvent:pinchUpdateEvent];
   EXPECT_EQ(expected_target, router_touchpad_gesture_target);
 
-  NSEvent* pinchEndEvent = MockGestureEvent(
-      NSEventTypeEndGesture, 0, gesture_point.x(), gesture_point.y());
+  NSEvent* pinchEndEvent =
+      MockGestureEvent(NSEventTypeMagnify, 0, gesture_point.x(),
+                       gesture_point.y(), NSEventPhaseEnded);
   [cocoa_view magnifyWithEvent:pinchEndEvent];
   if (ShouldSendGestureEvents())
     [cocoa_view endGestureWithEvent:pinchEndEvent];
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 2cfa9ac..f3e1915 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -14,7 +14,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/supports_user_data.h"
 #include "content/browser/devtools/devtools_agent_host_impl.h"
-#include "content/browser/devtools/protocol/security_handler.h"
 #include "content/browser/frame_host/navigation_entry_impl.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/loader/resource_request_info_impl.h"
@@ -336,18 +335,11 @@
       base::Bind(&OnAllowCertificate, base::Owned(handler.release()),
                  ssl_host_state_delegate_);
 
-  DevToolsAgentHostImpl* agent_host = static_cast<DevToolsAgentHostImpl*>(
-      DevToolsAgentHost::GetOrCreateFor(web_contents).get());
-  if (agent_host) {
-    for (auto* security_handler :
-         protocol::SecurityHandler::ForAgentHost(agent_host)) {
-      if (security_handler->NotifyCertificateError(
-              cert_error, request_url,
-              base::Bind(&OnAllowCertificateWithRecordDecision, false,
-                         callback))) {
-        return;
-      }
-    }
+  if (DevToolsAgentHostImpl::HandleCertificateError(
+          web_contents, cert_error, request_url,
+          base::BindRepeating(&OnAllowCertificateWithRecordDecision, false,
+                              callback))) {
+    return;
   }
 
   GetContentClient()->browser()->AllowCertificateError(
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 53ae35d..2253cb71 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -27,12 +27,14 @@
 #include "content/browser/notifications/platform_notification_context_impl.h"
 #include "content/common/dom_storage/dom_storage_types.h"
 #include "content/network/network_context.h"
+#include "content/network/network_service_impl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/dom_storage_context.h"
 #include "content/public/browser/indexed_db_context.h"
 #include "content/public/browser/local_storage_usage_info.h"
+#include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/session_storage_usage_info.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_features.h"
@@ -250,7 +252,7 @@
 // URLRequestContext, when the ContentBrowserClient doesn't provide a
 // NetworkContext itself.
 //
-// Createdd on the UI thread, but must be initialized and destroyed on the IO
+// Created on the UI thread, but must be initialized and destroyed on the IO
 // thread.
 class StoragePartitionImpl::NetworkContextOwner {
  public:
@@ -263,6 +265,7 @@
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
     context_getter_ = std::move(context_getter);
     network_context_ = std::make_unique<NetworkContext>(
+        static_cast<NetworkServiceImpl*>(GetNetworkServiceImpl()),
         std::move(network_context_request),
         context_getter_->GetURLRequestContext());
   }
diff --git a/content/browser/tracing/background_tracing_manager_browsertest.cc b/content/browser/tracing/background_tracing_manager_browsertest.cc
index f364552..96add2b 100644
--- a/content/browser/tracing/background_tracing_manager_browsertest.cc
+++ b/content/browser/tracing/background_tracing_manager_browsertest.cc
@@ -328,8 +328,9 @@
 
 }  // namespace
 
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
 // Flaky on android, chromeos: https://crbug.com/639706
+// Flaky on linux: https://crbug.com/795803
 #define MAYBE_NoWhitelistedArgsStripped DISABLED_NoWhitelistedArgsStripped
 #else
 #define MAYBE_NoWhitelistedArgsStripped NoWhitelistedArgsStripped
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9b9eb483..5fce62a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -109,7 +109,6 @@
 #include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents_binding_set.h"
 #include "content/public/browser/web_contents_delegate.h"
-#include "content/public/browser/web_contents_unresponsive_state.h"
 #include "content/public/common/bindings_policy.h"
 #include "content/public/common/browser_side_navigation_policy.h"
 #include "content/public/common/child_process_host.h"
@@ -393,11 +392,11 @@
 };
 
 // WebContentsImpl::ColorChooser ----------------------------------------------
-class WebContentsImpl::ColorChooser : public mojom::ColorChooser {
+class WebContentsImpl::ColorChooser : public blink::mojom::ColorChooser {
  public:
   ColorChooser(content::ColorChooser* chooser,
-               mojom::ColorChooserRequest request,
-               mojom::ColorChooserClientPtr client)
+               blink::mojom::ColorChooserRequest request,
+               blink::mojom::ColorChooserClientPtr client)
       : chooser_(chooser),
         binding_(this, std::move(request)),
         client_(std::move(client)) {
@@ -421,10 +420,10 @@
   std::unique_ptr<content::ColorChooser> chooser_;
 
   // mojo bindings.
-  mojo::Binding<mojom::ColorChooser> binding_;
+  mojo::Binding<blink::mojom::ColorChooser> binding_;
 
   // mojo renderer client.
-  content::mojom::ColorChooserClientPtr client_;
+  blink::mojom::ColorChooserClientPtr client_;
 };
 
 // WebContentsImpl::WebContentsTreeNode ----------------------------------------
@@ -4213,15 +4212,15 @@
 }
 
 void WebContentsImpl::OnColorChooserFactoryRequest(
-    mojom::ColorChooserFactoryRequest request) {
+    blink::mojom::ColorChooserFactoryRequest request) {
   color_chooser_factory_bindings_.AddBinding(this, std::move(request));
 }
 
 void WebContentsImpl::OpenColorChooser(
-    mojom::ColorChooserRequest chooser_request,
-    mojom::ColorChooserClientPtr client,
+    blink::mojom::ColorChooserRequest chooser_request,
+    blink::mojom::ColorChooserClientPtr client,
     SkColor color,
-    std::vector<mojom::ColorSuggestionPtr> suggestions) {
+    std::vector<blink::mojom::ColorSuggestionPtr> suggestions) {
   content::ColorChooser* new_color_chooser =
       delegate_ ? delegate_->OpenColorChooser(this, color, suggestions)
                 : nullptr;
@@ -5436,15 +5435,8 @@
   if (!GetRenderViewHost() || !GetRenderViewHost()->IsRenderViewLive())
     return;
 
-  if (delegate_) {
-    WebContentsUnresponsiveState unresponsive_state;
-    unresponsive_state.outstanding_ack_count =
-        render_widget_host->in_flight_event_count();
-    unresponsive_state.outstanding_event_type =
-        render_widget_host->hang_monitor_event_type();
-    unresponsive_state.last_event_type = render_widget_host->last_event_type();
-    delegate_->RendererUnresponsive(this, unresponsive_state);
-  }
+  if (delegate_)
+    delegate_->RendererUnresponsive(this);
 }
 
 void WebContentsImpl::RendererResponsive(
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 515e457d3..681b80ad 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -35,7 +35,6 @@
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/wake_lock/wake_lock_context_host.h"
-#include "content/common/color_chooser.mojom.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/color_chooser.h"
 #include "content/public/browser/download_url_parameters.h"
@@ -54,6 +53,7 @@
 #include "ppapi/features/features.h"
 #include "services/device/public/interfaces/wake_lock.mojom.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
+#include "third_party/WebKit/common/color_chooser/color_chooser.mojom.h"
 #include "third_party/WebKit/public/platform/WebDragOperation.h"
 #include "ui/accessibility/ax_modes.h"
 #include "ui/base/page_transition_types.h"
@@ -127,7 +127,7 @@
                                        public RenderViewHostDelegate,
                                        public RenderWidgetHostDelegate,
                                        public RenderFrameHostManager::Delegate,
-                                       public mojom::ColorChooserFactory,
+                                       public blink::mojom::ColorChooserFactory,
                                        public NotificationObserver,
                                        public NavigationControllerDelegate,
                                        public NavigatorDelegate {
@@ -776,14 +776,15 @@
   int GetOuterDelegateFrameTreeNodeId() override;
   RenderWidgetHostImpl* GetFullscreenRenderWidgetHost() const override;
 
-  // content::mojom::ColorChooserFactory ---------------------------------------
+  // blink::mojom::ColorChooserFactory ---------------------------------------
 
-  void OnColorChooserFactoryRequest(mojom::ColorChooserFactoryRequest request);
+  void OnColorChooserFactoryRequest(
+      blink::mojom::ColorChooserFactoryRequest request);
   void OpenColorChooser(
-      mojom::ColorChooserRequest chooser,
-      mojom::ColorChooserClientPtr client,
+      blink::mojom::ColorChooserRequest chooser,
+      blink::mojom::ColorChooserClientPtr client,
       SkColor color,
-      std::vector<mojom::ColorSuggestionPtr> suggestions) override;
+      std::vector<blink::mojom::ColorSuggestionPtr> suggestions) override;
 
   // NotificationObserver ------------------------------------------------------
 
@@ -1587,7 +1588,8 @@
 
   service_manager::BinderRegistry registry_;
 
-  mojo::BindingSet<mojom::ColorChooserFactory> color_chooser_factory_bindings_;
+  mojo::BindingSet<blink::mojom::ColorChooserFactory>
+      color_chooser_factory_bindings_;
 
 #if defined(OS_ANDROID)
   std::unique_ptr<NFCHost> nfc_host_;
diff --git a/content/browser/webauth/attested_credential_data.cc b/content/browser/webauth/attested_credential_data.cc
index ba2d394..4b4651f1 100644
--- a/content/browser/webauth/attested_credential_data.cc
+++ b/content/browser/webauth/attested_credential_data.cc
@@ -21,7 +21,7 @@
   // handle). Length is big endian.
   std::vector<uint8_t> credential_id_length(2, 0);
   std::vector<uint8_t> extracted_length = authenticator_utils::Extract(
-      u2f_data, authenticator_utils::kU2fResponseLengthPos, 1);
+      u2f_data, authenticator_utils::kU2fResponseKeyHandleLengthPos, 1);
 
   // Note that U2F responses only use one byte for length.
   credential_id_length[1] = extracted_length[0];
diff --git a/content/browser/webauth/authenticator_impl.h b/content/browser/webauth/authenticator_impl.h
index 0c6236f..6adbeedd 100644
--- a/content/browser/webauth/authenticator_impl.h
+++ b/content/browser/webauth/authenticator_impl.h
@@ -74,7 +74,7 @@
   std::unique_ptr<CollectedClientData> client_data_;
   std::unique_ptr<base::OneShotTimer> timer_;
   RenderFrameHost* render_frame_host_;
-  service_manager::Connector* connector_;
+  service_manager::Connector* connector_ = nullptr;
   base::WeakPtrFactory<AuthenticatorImpl> weak_factory_;
   DISALLOW_COPY_AND_ASSIGN(AuthenticatorImpl);
 };
diff --git a/content/browser/webauth/authenticator_utils.h b/content/browser/webauth/authenticator_utils.h
index 3a2e963..fc249283 100644
--- a/content/browser/webauth/authenticator_utils.h
+++ b/content/browser/webauth/authenticator_utils.h
@@ -19,8 +19,9 @@
 constexpr char kHashAlgorithm[] = "hashAlgorithm";
 constexpr char kTokenBindingKey[] = "tokenBinding";
 
-// U2FResponse byte positions
-constexpr uint32_t kU2fResponseLengthPos = 66;
+// U2FResponse offsets. The format of a U2F response is defined in
+// https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#registration-response-message-success
+constexpr uint32_t kU2fResponseKeyHandleLengthPos = 66;
 constexpr uint32_t kU2fResponseKeyHandleStartPos = 67;
 
 constexpr char kEs256[] = "ES256";
diff --git a/content/browser/webauth/fido_attestation_statement.cc b/content/browser/webauth/fido_attestation_statement.cc
index 13e88f98..4de0f6e 100644
--- a/content/browser/webauth/fido_attestation_statement.cc
+++ b/content/browser/webauth/fido_attestation_statement.cc
@@ -6,9 +6,9 @@
 
 #include <utility>
 
-#include "base/numerics/safe_conversions.h"
 #include "content/browser/webauth/authenticator_utils.h"
 #include "content/browser/webauth/cbor/cbor_writer.h"
+#include "third_party/boringssl/src/include/openssl/bytestring.h"
 
 namespace content {
 
@@ -22,60 +22,30 @@
 std::unique_ptr<FidoAttestationStatement>
 FidoAttestationStatement::CreateFromU2fRegisterResponse(
     const std::vector<uint8_t>& u2f_data) {
-  std::vector<std::vector<uint8_t>> x509_certificates;
-  std::vector<uint8_t> x509_cert;
+  CBS response, cert;
+  CBS_init(&response, u2f_data.data(), u2f_data.size());
 
-  // Extract the length length of the credential (i.e. of U2FResponse key
-  // handle). Length is big endian and is located at position 66 in the data.
-  // Note that U2F responses only use one byte for length.
-  std::vector<uint8_t> id_length(2, 0);
-  CHECK_GE(u2f_data.size(), authenticator_utils::kU2fResponseLengthPos + 1);
-  id_length[1] = u2f_data[authenticator_utils::kU2fResponseLengthPos];
-  size_t id_end_byte = authenticator_utils::kU2fResponseKeyHandleStartPos +
-                       ((base::strict_cast<uint32_t>(id_length[0]) << 8) |
-                        (base::strict_cast<uint32_t>(id_length[1])));
-
-  // Parse x509 cert to get cert length (which is variable).
-  // TODO: Support responses with multiple certs.
-  int num_bytes = 0;
-  uint32_t cert_length = 0;
-  // The first x509 byte is a tag, so we skip it.
-  size_t first_length_byte =
-      base::strict_cast<size_t>(u2f_data[id_end_byte + 1]);
-
-  // If the first length byte is less than 127, it is the length. If it is
-  // greater than 128, it indicates the number of following bytes that encode
-  // the length.
-  if (first_length_byte > 127) {
-    num_bytes = first_length_byte - 128;
-
-    // x509 cert length, interpreted big-endian.
-    for (int i = 1; i <= num_bytes; i++) {
-      // Account for tag byte and length details byte.
-      cert_length |= base::checked_cast<uint32_t>(u2f_data[id_end_byte + 1 + i]
-                                                  << ((num_bytes - i) * 8));
-    }
-  } else {
-    cert_length = first_length_byte;
+  // The format of |u2f_data| is specified here:
+  // https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#registration-response-message-success
+  uint8_t credential_length;
+  if (!CBS_skip(&response,
+                authenticator_utils::kU2fResponseKeyHandleLengthPos) ||
+      !CBS_get_u8(&response, &credential_length) ||
+      !CBS_skip(&response, credential_length) ||
+      !CBS_get_asn1_element(&response, &cert, CBS_ASN1_SEQUENCE)) {
+    // TODO(https://crbug.com/796581): Handle errors in a more civilized way.
+    CHECK(false) << "Invalid U2F response";
   }
 
-  size_t x509_length = 1 /* tag byte */ + 1 /* first length byte */
-                       + num_bytes /* # bytes of length */ + cert_length;
-
-  authenticator_utils::Append(
-      &x509_cert,
-      authenticator_utils::Extract(u2f_data, id_end_byte, x509_length));
-  x509_certificates.push_back(x509_cert);
+  std::vector<std::vector<uint8_t>> x509_certificates;
+  x509_certificates.emplace_back(CBS_data(&cert),
+                                 CBS_data(&cert) + CBS_len(&cert));
 
   // The remaining bytes are the signature.
-  std::vector<uint8_t> signature;
-  size_t signature_start_byte = id_end_byte + x509_length;
-  authenticator_utils::Append(
-      &signature,
-      authenticator_utils::Extract(u2f_data, signature_start_byte,
-                                   u2f_data.size() - signature_start_byte));
-  return std::make_unique<FidoAttestationStatement>(signature,
-                                                    x509_certificates);
+  const std::vector<uint8_t> signature(
+      CBS_data(&response), CBS_data(&response) + CBS_len(&response));
+  return std::make_unique<FidoAttestationStatement>(
+      std::move(signature), std::move(x509_certificates));
 }
 
 FidoAttestationStatement::FidoAttestationStatement(
diff --git a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
index c9bd416..1a1e0cda 100644
--- a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
+++ b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
@@ -16,6 +16,7 @@
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/content_browser_test_utils.h"
 #include "content/shell/browser/shell.h"
+#include "media/base/media_switches.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 
 #if defined(OS_WIN)
@@ -112,14 +113,17 @@
 // therefore timing dependent and flaky prone. If it becomes flaky, it's
 // probably good enough to change the test to retry deleting after a short
 // sleep.
-// TODO(https://crbug.com/796168): Fails on all platforms. Disabled temporarily.
 IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
-                       DISABLED_CallWithAudioDebugRecordings) {
+                       MAYBE_CallWithAudioDebugRecordings) {
   if (!HasAudioOutputDevices()) {
     LOG(INFO) << "Missing output devices: skipping test...";
     return;
   }
 
+  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+      switches::kAutoplayPolicy,
+      switches::autoplay::kNoUserGestureRequiredPolicy);
+
   bool prev_io_allowed = base::ThreadRestrictions::SetIOAllowed(true);
 
   ASSERT_TRUE(embedded_test_server()->Start());
@@ -249,14 +253,17 @@
 #endif
 
 // Same test as CallWithAudioDebugRecordings, but does two parallel calls.
-// TODO(https://crbug.com/796168): Fails on all platforms. Disabled temporarily.
 IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
-                       DISABLED_TwoCallsWithAudioDebugRecordings) {
+                       MAYBE_TwoCallsWithAudioDebugRecordings) {
   if (!HasAudioOutputDevices()) {
     LOG(INFO) << "Missing output devices: skipping test...";
     return;
   }
 
+  base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+      switches::kAutoplayPolicy,
+      switches::autoplay::kNoUserGestureRequiredPolicy);
+
   bool prev_io_allowed = base::ThreadRestrictions::SetIOAllowed(true);
 
   ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index c922a517..d561e8689 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -412,6 +412,9 @@
 
   WebRuntimeFeatures::EnableRequireCSSExtensionForFile(
       base::FeatureList::IsEnabled(features::kRequireCSSExtensionForFile));
+
+  WebRuntimeFeatures::EnablePictureInPicture(
+      base::FeatureList::IsEnabled(media::kPictureInPicture));
 };
 
 }  // namespace content
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 7cb9abbf..3236d6e 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -47,8 +47,6 @@
     "android/media_metadata_android.h",
     "android/resource_request_body_android.cc",
     "android/resource_request_body_android.h",
-    "android/sync_compositor_messages.cc",
-    "android/sync_compositor_messages.h",
     "android/sync_compositor_statics.cc",
     "android/sync_compositor_statics.h",
     "appcache_interfaces.cc",
@@ -172,6 +170,8 @@
     "input/input_event_struct_traits.h",
     "input/input_param_traits.cc",
     "input/input_param_traits.h",
+    "input/sync_compositor_messages.cc",
+    "input/sync_compositor_messages.h",
     "input/synthetic_gesture_params.cc",
     "input/synthetic_gesture_params.h",
     "input/synthetic_pinch_gesture_params.cc",
@@ -327,6 +327,7 @@
     "//services/service_manager/sandbox",
     "//third_party/WebKit/common:blink_common",
     "//third_party/WebKit/public:blink_headers",
+    "//ui/accessibility",
   ]
   deps = [
     ":features",
@@ -387,7 +388,6 @@
     "//third_party/angle:angle_gpu_info_util",
     "//third_party/boringssl",
     "//third_party/icu",
-    "//ui/accessibility",
     "//ui/base",
     "//ui/base/ime",
     "//ui/display",
@@ -540,7 +540,6 @@
     "child.mojom",
     "child_control.mojom",
     "child_memory_coordinator.mojom",
-    "color_chooser.mojom",
     "devtools.mojom",
     "field_trial_recorder.mojom",
     "file_utilities.mojom",
diff --git a/content/common/DEPS b/content/common/DEPS
index 66c506c..4c5e845 100644
--- a/content/common/DEPS
+++ b/content/common/DEPS
@@ -57,7 +57,6 @@
   "+third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h",
   "+third_party/WebKit/public/platform/modules/presentation/presentation.mojom.h",
   "+third_party/WebKit/public/platform/modules/push_messaging/WebPushError.h",
-  "+third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h",
   "+third_party/WebKit/public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationError.h",
   "+third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h",
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index d2a5ced..73c2ddb 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -133,6 +133,12 @@
 #endif
 #include "media/media_features.h"
 
+#undef CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
+#include "content/common/input/sync_compositor_messages.h"
+#ifndef CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
+#error "Failed to include content/common/input/sync_compositor_messages.h"
+#endif
+
 #if BUILDFLAG(ENABLE_WEBRTC)
 #undef CONTENT_COMMON_P2P_MESSAGES_H_
 #include "content/common/p2p_messages.h"
@@ -142,11 +148,6 @@
 #endif
 
 #if defined(OS_ANDROID)
-#undef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
-#include "content/common/android/sync_compositor_messages.h"
-#ifndef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
-#error "Failed to include content/common/android/sync_compositor_messages.h"
-#endif
 #undef CONTENT_COMMON_GIN_JAVA_BRIDGE_MESSAGES_H_
 #include "content/common/gin_java_bridge_messages.h"
 #ifndef CONTENT_COMMON_GIN_JAVA_BRIDGE_MESSAGES_H_
diff --git a/content/common/cross_site_document_classifier.cc b/content/common/cross_site_document_classifier.cc
index d676d7a9..a9747f1 100644
--- a/content/common/cross_site_document_classifier.cc
+++ b/content/common/cross_site_document_classifier.cc
@@ -228,25 +228,35 @@
 
 CrossSiteDocumentClassifier::Result CrossSiteDocumentClassifier::SniffForJSON(
     base::StringPiece data) {
-  // Currently this function just looks for '{', '"', and ':', in that order.
+  // Currently this function looks for an opening brace ('{'), followed by a
+  // double-quoted string literal, followed by a colon. Importantly, such a
+  // sequence is a Javascript syntax error: although the JSON object syntax is
+  // exactly Javascript's object-initializer syntax, a Javascript object-
+  // initializer expression is not valid as a standalone Javascript statement.
   //
   // TODO(nick): We have to come up with a better way to sniff JSON. The
   // following are known limitations of this function:
-  // https://crbug.com/795467/ Don't allow single quotes.
-  // https://crbug.com/795465/ Fully parse the string literals.
   // https://crbug.com/795470/ Support non-dictionary values (e.g. lists)
   // https://crbug.com/795476/ Support parser-breaker prefixes.
   enum {
     kStartState,
     kLeftBraceState,
     kLeftQuoteState,
+    kEscapeState,
+    kRightQuoteState,
   } state = kStartState;
 
   for (size_t i = 0; i < data.length(); ++i) {
     const char c = data[i];
-    // Whitespace is ignored (outside of string literals)
-    if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
-      continue;
+    if (state != kLeftQuoteState && state != kEscapeState) {
+      // Whitespace is ignored (outside of string literals)
+      if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
+        continue;
+    } else {
+      // Inside string literals, control characters should result in rejection.
+      if ((c >= 0 && c < 32) || c == 127)
+        return kNo;
+    }
 
     switch (state) {
       case kStartState:
@@ -256,14 +266,26 @@
           return kNo;
         break;
       case kLeftBraceState:
-        if (c == '"' || c == '\'')
+        if (c == '"')
           state = kLeftQuoteState;
         else
           return kNo;
         break;
       case kLeftQuoteState:
+        if (c == '"')
+          state = kRightQuoteState;
+        else if (c == '\\')
+          state = kEscapeState;
+        break;
+      case kEscapeState:
+        // Simplification: don't bother rejecting hex escapes.
+        state = kLeftQuoteState;
+        break;
+      case kRightQuoteState:
         if (c == ':')
           return kYes;
+        else
+          return kNo;
         break;
     }
   }
diff --git a/content/common/cross_site_document_classifier_unittest.cc b/content/common/cross_site_document_classifier_unittest.cc
index fcb36f74..b86a3308 100644
--- a/content/common/cross_site_document_classifier_unittest.cc
+++ b/content/common/cross_site_document_classifier_unittest.cc
@@ -154,6 +154,37 @@
             CrossSiteDocumentClassifier::SniffForJSON(non_json_data0));
   EXPECT_EQ(Result::kNo,
             CrossSiteDocumentClassifier::SniffForJSON(non_json_data1));
+
+  EXPECT_EQ(Result::kYes,
+            CrossSiteDocumentClassifier::SniffForJSON(R"({"" : 1})"))
+      << "Empty strings are accepted";
+  EXPECT_EQ(Result::kNo,
+            CrossSiteDocumentClassifier::SniffForJSON(R"({'' : 1})"))
+      << "Single quotes are not accepted";
+  EXPECT_EQ(Result::kYes,
+            CrossSiteDocumentClassifier::SniffForJSON("{\"\\\"\" : 1}"))
+      << "Escaped quotes are recognized";
+  EXPECT_EQ(Result::kYes,
+            CrossSiteDocumentClassifier::SniffForJSON(R"({"\\\u000a" : 1})"))
+      << "Escaped control characters are recognized";
+  EXPECT_EQ(Result::kMaybe,
+            CrossSiteDocumentClassifier::SniffForJSON(R"({"\\\u00)"))
+      << "Incomplete escape results in maybe";
+  EXPECT_EQ(Result::kMaybe, CrossSiteDocumentClassifier::SniffForJSON("{\"\\"))
+      << "Incomplete escape results in maybe";
+  EXPECT_EQ(Result::kMaybe,
+            CrossSiteDocumentClassifier::SniffForJSON("{\"\\\""))
+      << "Incomplete escape results in maybe";
+  EXPECT_EQ(Result::kNo,
+            CrossSiteDocumentClassifier::SniffForJSON("{\"\n\" : true}"))
+      << "Unescaped control characters are rejected";
+  EXPECT_EQ(Result::kNo, CrossSiteDocumentClassifier::SniffForJSON("{}"))
+      << "Empty dictionary is not recognized (since it's valid JS too)";
+  EXPECT_EQ(Result::kNo,
+            CrossSiteDocumentClassifier::SniffForJSON("[true, false, 1, 2]"))
+      << "Lists dictionary are not recognized (since they're valid JS too)";
+  EXPECT_EQ(Result::kNo, CrossSiteDocumentClassifier::SniffForJSON(R"({":"})"))
+      << "A colon character inside a string does not trigger a match";
 }
 
 }  // namespace content
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 0681334..579b9ab 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -257,4 +257,13 @@
   DidSetFramePolicyHeaders(
       blink.mojom.WebSandboxFlags sandbox_flags,
       array<blink.mojom.ParsedFeaturePolicyDeclaration> parsed_header);
+
+  // If a cross-process navigation was started for the initial history load in
+  // this subframe, this tries to cancel it to allow a client redirect to happen
+  // instead.
+  CancelInitialHistoryLoad();
+
+  // Change the encoding name of the page in UI when the page has detected
+  // proper encoding name. Sent for top-level frames.
+  UpdateEncoding(string encoding_name);
 };
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index a315de27..498eb98 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -1154,11 +1154,6 @@
 // Requests that the given URL be opened in the specified manner.
 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params)
 
-// If a cross-process navigation was started for the initial history load in
-// this subframe, this tries to cancel it to allow a client redirect to happen
-// instead.
-IPC_MESSAGE_ROUTED0(FrameHostMsg_CancelInitialHistoryLoad)
-
 // Notifies the browser that a frame finished loading.
 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidFinishLoad,
                     GURL /* validated_url */)
@@ -1218,11 +1213,6 @@
                     base::string16 /* title */,
                     blink::WebTextDirection /* title direction */)
 
-// Change the encoding name of the page in UI when the page has detected
-// proper encoding name. Sent for top-level frames.
-IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
-                    std::string /* new encoding name */)
-
 // Following message is used to communicate the values received by the
 // callback binding the JS to Cpp.
 // An instance of browser that has an automation host listening to it can
diff --git a/content/common/input/OWNERS b/content/common/input/OWNERS
index f8dfd19..5cf2271b 100644
--- a/content/common/input/OWNERS
+++ b/content/common/input/OWNERS
@@ -7,6 +7,11 @@
 per-file *_param_traits*.*=file://ipc/SECURITY_OWNERS
 per-file *_struct_traits*.*=set noparent
 per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS
+per-file *_messages.cc=set noparent
+per-file *_messages.cc=file://ipc/SECURITY_OWNERS
+per-file *_messages*.h=set noparent
+per-file *_messages*.h=file://ipc/SECURITY_OWNERS
+
 
 # TEAM: input-dev@chromium.org
 # COMPONENT: Blink>Input
diff --git a/content/common/android/sync_compositor_messages.cc b/content/common/input/sync_compositor_messages.cc
similarity index 95%
rename from content/common/android/sync_compositor_messages.cc
rename to content/common/input/sync_compositor_messages.cc
index cf2e31b..51de727 100644
--- a/content/common/android/sync_compositor_messages.cc
+++ b/content/common/input/sync_compositor_messages.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 "content/common/android/sync_compositor_messages.h"
+#include "content/common/input/sync_compositor_messages.h"
 
 namespace content {
 
diff --git a/content/common/android/sync_compositor_messages.h b/content/common/input/sync_compositor_messages.h
similarity index 88%
rename from content/common/android/sync_compositor_messages.h
rename to content/common/input/sync_compositor_messages.h
index 0beb97bb..77c534a 100644
--- a/content/common/android/sync_compositor_messages.h
+++ b/content/common/input/sync_compositor_messages.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
-#define CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
+#ifndef CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
+#define CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
 
 #include <stddef.h>
 
@@ -19,8 +19,8 @@
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/scroll_offset.h"
 
-#ifndef INTERNAL_CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
-#define INTERNAL_CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
+#ifndef INTERNAL_CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
+#define INTERNAL_CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
 
 namespace content {
 
@@ -78,7 +78,7 @@
 
 }  // namespace content
 
-#endif  // INTERNAL_CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
+#endif  // INTERNAL_CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
 
 #undef IPC_MESSAGE_EXPORT
 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -116,15 +116,14 @@
 
 // Messages sent from the browser to the renderer.
 // Synchronous IPCs are allowed here to the renderer compositor thread. See
-// design doc https://goo.gl/Tn81FW and crbug.com/526842 for details.
+// design doc https://goo.gl/Tn81FW and https://crbug.com/526842 for details.
 
 IPC_SYNC_MESSAGE_CONTROL1_1(
     SyncCompositorMsg_SynchronizeRendererState,
     std::vector<int> /* routing ids*/,
     std::vector<content::SyncCompositorCommonRendererParams>)
 
-IPC_MESSAGE_ROUTED1(SyncCompositorMsg_ComputeScroll,
-                    base::TimeTicks);
+IPC_MESSAGE_ROUTED1(SyncCompositorMsg_ComputeScroll, base::TimeTicks)
 
 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_DemandDrawHwAsync,
                     content::SyncCompositorDemandDrawHwParams)
@@ -133,14 +132,14 @@
                            content::SyncCompositorDemandDrawHwParams,
                            content::SyncCompositorCommonRendererParams,
                            uint32_t /* layer_tree_frame_sink_id */,
-                           base::Optional<viz::CompositorFrame>);
+                           base::Optional<viz::CompositorFrame>)
 
 IPC_SYNC_MESSAGE_ROUTED1_2(SyncCompositorMsg_SetSharedMemory,
                            content::SyncCompositorSetSharedMemoryParams,
                            bool /* success */,
-                           content::SyncCompositorCommonRendererParams);
+                           content::SyncCompositorCommonRendererParams)
 
-IPC_MESSAGE_ROUTED0(SyncCompositorMsg_ZeroSharedMemory);
+IPC_MESSAGE_ROUTED0(SyncCompositorMsg_ZeroSharedMemory)
 
 IPC_SYNC_MESSAGE_ROUTED1_2(SyncCompositorMsg_DemandDrawSw,
                            content::SyncCompositorDemandDrawSwParams,
@@ -153,24 +152,24 @@
                            content::SyncCompositorCommonRendererParams)
 
 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetMemoryPolicy,
-                    uint32_t /* bytes_limit */);
+                    uint32_t /* bytes_limit */)
 
 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ReclaimResources,
                     uint32_t /* layer_tree_frame_sink_id */,
-                    std::vector<viz::ReturnedResource> /* resources */);
+                    std::vector<viz::ReturnedResource> /* resources */)
 
-IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset);
+IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset)
 
 // -----------------------------------------------------------------------------
 // Messages sent from the renderer to the browser.
 
-IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_LayerTreeFrameSinkCreated);
+IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_LayerTreeFrameSinkCreated)
 
 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState,
                     content::SyncCompositorCommonRendererParams)
 
 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_ReturnFrame,
                     uint32_t /* layer_tree_frame_sink_id */,
-                    base::Optional<viz::CompositorFrame>);
+                    base::Optional<viz::CompositorFrame>)
 
-#endif  // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
+#endif  // CONTENT_COMMON_SYNC_COMPOSITOR_MESSAGES_H_
diff --git a/content/common/push_messaging.mojom b/content/common/push_messaging.mojom
index 7b0b64c..f8759e2 100644
--- a/content/common/push_messaging.mojom
+++ b/content/common/push_messaging.mojom
@@ -26,13 +26,6 @@
   LAST = INVALID_STATE
 };
 
-enum PushPermissionStatus {
-  GRANTED = 0,
-  DENIED = 1,
-  PROMPT = 2,
-  LAST = PROMPT
-};
-
 interface PushMessaging {
   Subscribe(int32 render_frame_id,
             int64 service_worker_registration_id,
@@ -58,12 +51,4 @@
                      PushSubscriptionOptions? options,
                      array<uint8>? p256dh,
                      array<uint8>? auth);
-
-  // We use the value of |error_type| as a flag. If |error_type| == NONE, it
-  // means no error and returns |status|. Else, it means there is an error and
-  // returns |error_type|.
-  GetPermissionStatus(int64 service_worker_registration_id,
-                      bool user_visible)
-                     => (PushErrorType error_type,
-                         PushPermissionStatus status);
 };
diff --git a/content/common/push_messaging.typemap b/content/common/push_messaging.typemap
index c3b94c6..698dc1cb 100644
--- a/content/common/push_messaging.typemap
+++ b/content/common/push_messaging.typemap
@@ -6,7 +6,6 @@
 public_headers = [
   "//content/public/common/push_subscription_options.h",
   "//third_party/WebKit/public/platform/modules/push_messaging/WebPushError.h",
-  "//third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h",
 ]
 traits_headers = [ "//content/common/push_messaging_param_traits.h" ]
 sources = [
@@ -20,6 +19,5 @@
 ]
 type_mappings = [
   "content.mojom.PushErrorType=blink::WebPushError::ErrorType",
-  "content.mojom.PushPermissionStatus=blink::WebPushPermissionStatus",
   "content.mojom.PushSubscriptionOptions=content::PushSubscriptionOptions",
 ]
diff --git a/content/common/push_messaging_param_traits.cc b/content/common/push_messaging_param_traits.cc
index a0b6240..d5ae8f5a 100644
--- a/content/common/push_messaging_param_traits.cc
+++ b/content/common/push_messaging_param_traits.cc
@@ -49,27 +49,6 @@
                       content::mojom::PushErrorType::LAST),
               "PushErrorType enums must match, LAST");
 
-// PushPermissionStatus
-static_assert(blink::WebPushPermissionStatus::kWebPushPermissionStatusGranted ==
-                  static_cast<blink::WebPushPermissionStatus>(
-                      content::mojom::PushPermissionStatus::GRANTED),
-              "PushPermissionStatus enums must match, GRANTED");
-
-static_assert(blink::WebPushPermissionStatus::kWebPushPermissionStatusDenied ==
-                  static_cast<blink::WebPushPermissionStatus>(
-                      content::mojom::PushPermissionStatus::DENIED),
-              "PushPermissionStatus enums must match, DENIED");
-
-static_assert(blink::WebPushPermissionStatus::kWebPushPermissionStatusPrompt ==
-                  static_cast<blink::WebPushPermissionStatus>(
-                      content::mojom::PushPermissionStatus::PROMPT),
-              "PushPermissionStatus enums must match, PROMPT");
-
-static_assert(blink::WebPushPermissionStatus::kWebPushPermissionStatusLast ==
-                  static_cast<blink::WebPushPermissionStatus>(
-                      content::mojom::PushPermissionStatus::LAST),
-              "PushPermissionStatus enums must match, LAST");
-
 // static
 bool StructTraits<content::mojom::PushSubscriptionOptionsDataView,
                   content::PushSubscriptionOptions>::
@@ -109,34 +88,4 @@
   return false;
 }
 
-// static
-content::mojom::PushPermissionStatus EnumTraits<
-    content::mojom::PushPermissionStatus,
-    blink::WebPushPermissionStatus>::ToMojom(blink::WebPushPermissionStatus
-                                                 input) {
-  if (input >=
-          blink::WebPushPermissionStatus::kWebPushPermissionStatusGranted &&
-      input <= blink::WebPushPermissionStatus::kWebPushPermissionStatusLast) {
-    return static_cast<content::mojom::PushPermissionStatus>(input);
-  }
-
-  NOTREACHED();
-  return content::mojom::PushPermissionStatus::DENIED;
-}
-
-// static
-bool EnumTraits<content::mojom::PushPermissionStatus,
-                blink::WebPushPermissionStatus>::
-    FromMojom(content::mojom::PushPermissionStatus input,
-              blink::WebPushPermissionStatus* output) {
-  if (input >= content::mojom::PushPermissionStatus::GRANTED &&
-      input <= content::mojom::PushPermissionStatus::LAST) {
-    *output = static_cast<blink::WebPushPermissionStatus>(input);
-    return true;
-  }
-
-  NOTREACHED();
-  return false;
-}
-
 }  // namespace mojo
diff --git a/content/common/push_messaging_param_traits.h b/content/common/push_messaging_param_traits.h
index 4845efd2..dcf5b0c7 100644
--- a/content/common/push_messaging_param_traits.h
+++ b/content/common/push_messaging_param_traits.h
@@ -36,15 +36,6 @@
                         blink::WebPushError::ErrorType* output);
 };
 
-template <>
-struct EnumTraits<content::mojom::PushPermissionStatus,
-                  blink::WebPushPermissionStatus> {
-  static content::mojom::PushPermissionStatus ToMojom(
-      blink::WebPushPermissionStatus input);
-  static bool FromMojom(content::mojom::PushPermissionStatus input,
-                        blink::WebPushPermissionStatus* output);
-};
-
 }  // namespace mojo
 
 #endif  // CONTENT_COMMON_PUSH_MESSAGING_PARAM_TRAITS_H_
diff --git a/content/network/BUILD.gn b/content/network/BUILD.gn
index d118014..54cbb91 100644
--- a/content/network/BUILD.gn
+++ b/content/network/BUILD.gn
@@ -76,6 +76,7 @@
     "upload_progress_tracker.h",
     "url_loader.cc",
     "url_loader.h",
+    "url_request_context_builder_mojo.cc",
   ]
 
   configs += [ "//content:content_implementation" ]
diff --git a/content/network/DEPS b/content/network/DEPS
index d974885..d668237c 100644
--- a/content/network/DEPS
+++ b/content/network/DEPS
@@ -12,6 +12,7 @@
   "+content/network",
   "+content/public/common/appcache_info.h",
   "+content/public/common/content_client.h",
+  "+content/public/common/content_features.h",
   "+content/public/common/content_switches.h",
   "+content/public/common/network_service.mojom.h",
   "+content/public/common/proxy_config.mojom.h",
diff --git a/content/network/network_context.cc b/content/network/network_context.cc
index d6faf822..b5afdd3d 100644
--- a/content/network/network_context.cc
+++ b/content/network/network_context.cc
@@ -59,8 +59,8 @@
     : network_service_(network_service),
       params_(std::move(params)),
       binding_(this, std::move(request)) {
-  owned_url_request_context_ = MakeURLRequestContext(params_.get());
-  url_request_context_ = owned_url_request_context_.get();
+  url_request_context_owner_ = MakeURLRequestContext(params_.get());
+  url_request_context_ = url_request_context_owner_.url_request_context.get();
   cookie_manager_ =
       std::make_unique<CookieManager>(url_request_context_->cookie_store());
   network_service_->RegisterNetworkContext(this);
@@ -79,21 +79,26 @@
     : network_service_(network_service),
       params_(std::move(params)),
       binding_(this, std::move(request)) {
+  url_request_context_owner_ = ApplyContextParamsToBuilder(
+      builder.get(), params_.get(), network_service->quic_disabled(),
+      network_service->net_log());
+  url_request_context_ = url_request_context_owner_.url_request_context.get();
   network_service_->RegisterNetworkContext(this);
-  ApplyContextParamsToBuilder(builder.get(), params_.get());
-  owned_url_request_context_ = builder->Build();
-  url_request_context_ = owned_url_request_context_.get();
   cookie_manager_ =
       std::make_unique<CookieManager>(url_request_context_->cookie_store());
 }
 
-NetworkContext::NetworkContext(mojom::NetworkContextRequest request,
+NetworkContext::NetworkContext(NetworkServiceImpl* network_service,
+                               mojom::NetworkContextRequest request,
                                net::URLRequestContext* url_request_context)
-    : network_service_(nullptr),
+    : network_service_(network_service),
+      url_request_context_(url_request_context),
       binding_(this, std::move(request)),
       cookie_manager_(std::make_unique<CookieManager>(
           url_request_context->cookie_store())) {
-  url_request_context_ = url_request_context;
+  // May be nullptr in tests.
+  if (network_service_)
+    network_service_->RegisterNetworkContext(this);
 }
 
 NetworkContext::~NetworkContext() {
@@ -167,8 +172,8 @@
 
 NetworkContext::NetworkContext(mojom::NetworkContextParamsPtr params)
     : network_service_(nullptr), params_(std::move(params)), binding_(this) {
-  owned_url_request_context_ = MakeURLRequestContext(params_.get());
-  url_request_context_ = owned_url_request_context_.get();
+  url_request_context_owner_ = MakeURLRequestContext(params_.get());
+  url_request_context_ = url_request_context_owner_.url_request_context.get();
 }
 
 void NetworkContext::OnConnectionError() {
@@ -178,7 +183,7 @@
     delete this;
 }
 
-std::unique_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
+URLRequestContextOwner NetworkContext::MakeURLRequestContext(
     mojom::NetworkContextParams* network_context_params) {
   URLRequestContextBuilderMojo builder;
   const base::CommandLine* command_line =
@@ -248,17 +253,21 @@
       content::IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
           *command_line, nullptr, std::move(cert_verifier)));
 
-  ApplyContextParamsToBuilder(&builder, network_context_params);
-
-  return builder.Build();
+  // |network_service_| may be nullptr in tests.
+  return ApplyContextParamsToBuilder(
+      &builder, network_context_params,
+      network_service_ ? network_service_->quic_disabled() : false,
+      network_service_ ? network_service_->net_log() : nullptr);
 }
 
-void NetworkContext::ApplyContextParamsToBuilder(
+URLRequestContextOwner NetworkContext::ApplyContextParamsToBuilder(
     URLRequestContextBuilderMojo* builder,
-    mojom::NetworkContextParams* network_context_params) {
-  // |network_service_| may be nullptr in tests.
-  if (network_service_)
-    builder->set_net_log(network_service_->net_log());
+    mojom::NetworkContextParams* network_context_params,
+    bool quic_disabled,
+    net::NetLog* net_log) {
+  URLRequestContextOwner url_request_owner;
+  if (net_log)
+    builder->set_net_log(net_log);
 
   builder->set_enable_brotli(network_context_params->enable_brotli);
   if (network_context_params->context_name)
@@ -308,13 +317,14 @@
     pref_service_factory.set_async(true);
     scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
     HttpServerPropertiesPrefDelegate::RegisterPrefs(pref_registry.get());
-    pref_service_ = pref_service_factory.Create(pref_registry.get());
+    url_request_owner.pref_service =
+        pref_service_factory.Create(pref_registry.get());
 
     builder->SetHttpServerProperties(
         std::make_unique<net::HttpServerPropertiesManager>(
             std::make_unique<HttpServerPropertiesPrefDelegate>(
-                pref_service_.get()),
-            network_service_->net_log()));
+                url_request_owner.pref_service.get()),
+            net_log));
   }
 
   builder->set_data_enabled(network_context_params->enable_data_url_support);
@@ -331,7 +341,7 @@
 
   net::HttpNetworkSession::Params session_params;
   bool is_quic_force_disabled = false;
-  if (network_service_ && network_service_->quic_disabled())
+  if (quic_disabled)
     is_quic_force_disabled = true;
 
   network_session_configurator::ParseCommandLineAndFieldTrials(
@@ -348,6 +358,8 @@
                          -> std::unique_ptr<net::HttpTransactionFactory> {
         return std::make_unique<ThrottlingNetworkTransactionFactory>(session);
       }));
+  url_request_owner.url_request_context = builder->Build();
+  return url_request_owner;
 }
 
 void NetworkContext::ClearNetworkingHistorySince(
diff --git a/content/network/network_context.h b/content/network/network_context.h
index 017df8b..a877ede 100644
--- a/content/network/network_context.h
+++ b/content/network/network_context.h
@@ -17,11 +17,10 @@
 #include "content/network/cookie_manager.h"
 #include "content/public/common/network_service.mojom.h"
 #include "content/public/common/url_loader_factory.mojom.h"
+#include "content/public/network/url_request_context_owner.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/strong_binding_set.h"
 
-class PrefService;
-
 namespace net {
 class URLRequestContext;
 class HttpServerPropertiesManager;
@@ -59,10 +58,10 @@
                  std::unique_ptr<URLRequestContextBuilderMojo> builder);
 
   // Creates a NetworkContext that wraps a consumer-provided URLRequestContext
-  // that the NetworkContext does not own. In this case, there is no
-  // NetworkService object.
+  // that the NetworkContext does not own.
   // TODO(mmenke):  Remove this constructor when the network service ships.
-  NetworkContext(mojom::NetworkContextRequest request,
+  NetworkContext(NetworkServiceImpl* network_service,
+                 mojom::NetworkContextRequest request,
                  net::URLRequestContext* url_request_context);
 
   ~NetworkContext() override;
@@ -102,6 +101,14 @@
   void SetNetworkConditions(const std::string& profile_id,
                             mojom::NetworkConditionsPtr conditions) override;
 
+  // Applies the values in |network_context_params| to |builder|, and builds
+  // the URLRequestContext.
+  static URLRequestContextOwner ApplyContextParamsToBuilder(
+      URLRequestContextBuilderMojo* builder,
+      mojom::NetworkContextParams* network_context_params,
+      bool quic_disabled,
+      net::NetLog* net_log);
+
  private:
   // Constructor only used in tests.
   explicit NetworkContext(mojom::NetworkContextParamsPtr params);
@@ -109,22 +116,15 @@
   // On connection errors the NetworkContext destroys itself.
   void OnConnectionError();
 
-  std::unique_ptr<net::URLRequestContext> MakeURLRequestContext(
-      mojom::NetworkContextParams* network_context_params);
-
-  // Applies the values in |network_context_params| to |builder|.
-  void ApplyContextParamsToBuilder(
-      URLRequestContextBuilderMojo* builder,
+  URLRequestContextOwner MakeURLRequestContext(
       mojom::NetworkContextParams* network_context_params);
 
   NetworkServiceImpl* const network_service_;
 
-  // This needs to be destroyed after the URLRequestContext.
-  std::unique_ptr<PrefService> pref_service_;
-
-  // Owning pointer to |url_request_context_|. nullptr when the
-  // NetworkContextImpl doesn't own its own URLRequestContext.
-  std::unique_ptr<net::URLRequestContext> owned_url_request_context_;
+  // Holds owning pointer to |url_request_context_|. Will contain a nullptr for
+  // |url_request_context| when the NetworkContextImpl doesn't own its own
+  // URLRequestContext.
+  URLRequestContextOwner url_request_context_owner_;
 
   net::URLRequestContext* url_request_context_ = nullptr;
 
diff --git a/content/network/network_service_impl.cc b/content/network/network_service_impl.cc
index 4321d869..b631ee46 100644
--- a/content/network/network_service_impl.cc
+++ b/content/network/network_service_impl.cc
@@ -101,9 +101,9 @@
   if (registry_) {
     DCHECK(!request.is_pending());
     registry_->AddInterface<mojom::NetworkService>(
-        base::Bind(&NetworkServiceImpl::Create, base::Unretained(this)));
-  } else {
-    Create(std::move(request));
+        base::BindRepeating(&NetworkServiceImpl::Bind, base::Unretained(this)));
+  } else if (request.is_pending()) {
+    Bind(std::move(request));
   }
 
   network_change_manager_ = std::make_unique<NetworkChangeManager>(
@@ -137,8 +137,8 @@
 
 std::unique_ptr<mojom::NetworkContext>
 NetworkServiceImpl::CreateNetworkContextWithBuilder(
-    content::mojom::NetworkContextRequest request,
-    content::mojom::NetworkContextParamsPtr params,
+    mojom::NetworkContextRequest request,
+    mojom::NetworkContextParamsPtr params,
     std::unique_ptr<URLRequestContextBuilderMojo> builder,
     net::URLRequestContext** url_request_context) {
   std::unique_ptr<NetworkContext> network_context =
@@ -157,6 +157,8 @@
     NetworkContext* network_context) {
   DCHECK_EQ(0u, network_contexts_.count(network_context));
   network_contexts_.insert(network_context);
+  if (quic_disabled_)
+    network_context->DisableQuic();
 }
 
 void NetworkServiceImpl::DeregisterNetworkContext(
@@ -217,7 +219,7 @@
   registry_->BindInterface(interface_name, std::move(interface_pipe));
 }
 
-void NetworkServiceImpl::Create(mojom::NetworkServiceRequest request) {
+void NetworkServiceImpl::Bind(mojom::NetworkServiceRequest request) {
   DCHECK(!binding_.is_bound());
   binding_.Bind(std::move(request));
 }
diff --git a/content/network/network_service_impl.h b/content/network/network_service_impl.h
index 2806b56..3d30f47 100644
--- a/content/network/network_service_impl.h
+++ b/content/network/network_service_impl.h
@@ -22,13 +22,11 @@
 namespace net {
 class NetLog;
 class LoggingNetworkChangeObserver;
-class URLRequestContext;
 }  // namespace net
 
 namespace content {
 
 class NetworkContext;
-class URLRequestContextBuilderMojo;
 
 class CONTENT_EXPORT NetworkServiceImpl : public service_manager::Service,
                                           public NetworkService {
@@ -45,11 +43,15 @@
   ~NetworkServiceImpl() override;
 
   std::unique_ptr<mojom::NetworkContext> CreateNetworkContextWithBuilder(
-      content::mojom::NetworkContextRequest request,
-      content::mojom::NetworkContextParamsPtr params,
+      mojom::NetworkContextRequest request,
+      mojom::NetworkContextParamsPtr params,
       std::unique_ptr<URLRequestContextBuilderMojo> builder,
       net::URLRequestContext** url_request_context) override;
 
+  // Allows late binding if the mojo request wasn't specified in the
+  // constructor.
+  void Bind(mojom::NetworkServiceRequest request);
+
   static std::unique_ptr<NetworkServiceImpl> CreateForTesting();
 
   // These are called by NetworkContexts as they are being created and
@@ -82,8 +84,6 @@
                        const std::string& interface_name,
                        mojo::ScopedMessagePipeHandle interface_pipe) override;
 
-  void Create(mojom::NetworkServiceRequest request);
-
   std::unique_ptr<MojoNetLog> owned_net_log_;
   // TODO(https://crbug.com/767450): Remove this, once Chrome no longer creates
   // its own NetLog.
diff --git a/content/public/network/url_request_context_builder_mojo.cc b/content/network/url_request_context_builder_mojo.cc
similarity index 84%
rename from content/public/network/url_request_context_builder_mojo.cc
rename to content/network/url_request_context_builder_mojo.cc
index ee8e187e..86482e9 100644
--- a/content/public/network/url_request_context_builder_mojo.cc
+++ b/content/network/url_request_context_builder_mojo.cc
@@ -6,7 +6,8 @@
 
 #include "base/logging.h"
 #include "build/build_config.h"
-#include "content/network/proxy_service_mojo.h"  // nogncheck
+#include "content/network/network_context.h"
+#include "content/network/proxy_service_mojo.h"
 #include "net/proxy/proxy_config_service.h"
 #include "net/proxy/proxy_script_fetcher_impl.h"
 
@@ -28,6 +29,14 @@
   mojo_proxy_resolver_factory_ = std::move(mojo_proxy_resolver_factory);
 }
 
+URLRequestContextOwner URLRequestContextBuilderMojo::Create(
+    mojom::NetworkContextParams* params,
+    bool quic_disabled,
+    net::NetLog* net_log) {
+  return NetworkContext::ApplyContextParamsToBuilder(this, params,
+                                                     quic_disabled, net_log);
+}
+
 std::unique_ptr<net::ProxyService>
 URLRequestContextBuilderMojo::CreateProxyService(
     std::unique_ptr<net::ProxyConfigService> proxy_config_service,
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index a1763d7..3bb92932 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -456,10 +456,14 @@
     }
   } else {
 #if defined(OS_MACOSX)
-    // We need to do this after getting |PPP_GetInterface()| (or presumably
-    // doing something nontrivial with the library), else the sandbox
-    // intercedes.
-    CHECK(InitializeSandbox());
+    // TODO(kerrnel): Delete this once the V2 sandbox is default.
+    const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
+    if (!cmdline->HasSwitch(switches::kEnableV2Sandbox)) {
+      // We need to do this after getting |PPP_GetInterface()| (or presumably
+      // doing something nontrivial with the library), else the sandbox
+      // intercedes.
+      CHECK(InitializeSandbox());
+    }
 #endif
 
 #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
index f296241..20186fa 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
@@ -16,6 +16,7 @@
 import org.junit.runner.RunWith;
 
 import org.chromium.base.test.util.CommandLineFlags;
+import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
 import org.chromium.content.browser.JavaBridgeTestCommon.Controller;
 import org.chromium.content.browser.test.ContentJUnit4ClassRunner;
@@ -715,6 +716,7 @@
     @Test
     @SmallTest
     @Feature({"AndroidWebView", "Android-JavaBridge"})
+    @DisabledTest(message = "https://crbug.com/795378")
     public void testReflectPrivateFieldRaisesException() throws Throwable {
         mActivityTestRule.injectObjectAndReload(new Object() {
             public Class<?> myGetClass() {
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
index 28dfd83..82e65c90 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
@@ -20,7 +20,6 @@
 
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.DisabledTest;
 import org.chromium.content.R;
 import org.chromium.content.browser.ContentViewCore;
 import org.chromium.content.browser.test.ContentJUnit4ClassRunner;
@@ -86,7 +85,6 @@
     }
 
     @Test
-    @DisabledTest(message = "crbug.com/710097")
     @LargeTest
     public void testDeleteWordMarkedWithSpellingMarker()
             throws InterruptedException, Throwable, TimeoutException {
@@ -114,11 +112,8 @@
         });
 
         // Add a spelling marker on "hello".
-        // Note: we disable spell checking first to avoid the spell checker immediately clearing
-        // the added marker.
         JavaScriptUtils.executeJavaScriptAndWaitForResult(webContents,
-                "internals.setSpellCheckingEnabled(false);"
-                        + "const div = document.getElementById('div');"
+                "const div = document.getElementById('div');"
                         + "const text = div.firstChild;"
                         + "const range = document.createRange();"
                         + "range.setStart(text, 0);"
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
index 91cfe93..8bbcd474 100644
--- a/content/public/app/mojo/content_browser_manifest.json
+++ b/content/public/app/mojo/content_browser_manifest.json
@@ -124,6 +124,7 @@
           "autofill::mojom::AutofillDriver",
           "autofill::mojom::PasswordManagerDriver",
           "blink::mojom::BackgroundFetchService",
+          "blink::mojom::ColorChooserFactory",
           "blink::mojom::DedicatedWorkerFactory",
           "blink::mojom::LockManager",
           "blink::mojom::GeolocationService",
@@ -141,8 +142,6 @@
           // TODO(beng): figure out how to overlay test interfaces like this.
           "content::mojom::BrowserTarget",
 
-          "content::mojom::ColorChooserFactory",
-
           // InputInjector is only exposed when gpu benchmarking is enabled.
           "content::mojom::InputInjector",
 
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index c05d962..7fb60ea 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -178,7 +178,6 @@
     "navigation_type.h",
     "navigation_ui_data.h",
     "network_quality_observer_factory.h",
-    "network_service_instance.cc",
     "network_service_instance.h",
     "notification_database_data.cc",
     "notification_database_data.h",
@@ -289,8 +288,6 @@
     "web_contents_media_capture_id.h",
     "web_contents_observer.cc",
     "web_contents_observer.h",
-    "web_contents_unresponsive_state.cc",
-    "web_contents_unresponsive_state.h",
     "web_contents_user_data.h",
     "web_contents_view_delegate.cc",
     "web_contents_view_delegate.h",
diff --git a/content/public/browser/browsing_data_remover_delegate.h b/content/public/browser/browsing_data_remover_delegate.h
index eaf0b94..faf7f83 100644
--- a/content/public/browser/browsing_data_remover_delegate.h
+++ b/content/public/browser/browsing_data_remover_delegate.h
@@ -49,7 +49,7 @@
       int remove_mask,
       const BrowsingDataFilterBuilder& filter_builder,
       int origin_type_mask,
-      const base::Closure& callback) = 0;
+      base::OnceClosure callback) = 0;
 };
 
 }  // namespace content
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 5a5e659c..d83ad513 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -621,7 +621,7 @@
   virtual SpeechRecognitionManagerDelegate*
       CreateSpeechRecognitionManagerDelegate();
 
-  // Getters for common objects.
+  // Getter for the net logging object. This can be called on any thread.
   virtual net::NetLog* GetNetLog();
 
   // Called by WebContents to override the WebKit preferences that are used by
diff --git a/content/public/browser/devtools_agent_host.h b/content/public/browser/devtools_agent_host.h
index 6fa1c93..7abfe81b 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -87,7 +87,7 @@
 
   using List = std::vector<scoped_refptr<DevToolsAgentHost>>;
 
-  // Returns all DevToolsAgentHosts content is aware of.
+  // Returns all non-browser target DevToolsAgentHosts content is aware of.
   static List GetOrCreateAll();
 
   // Starts remote debugging.
diff --git a/content/public/browser/gpu_data_manager.h b/content/public/browser/gpu_data_manager.h
index 33483d3..457410c2 100644
--- a/content/public/browser/gpu_data_manager.h
+++ b/content/public/browser/gpu_data_manager.h
@@ -32,11 +32,6 @@
   // This is only called by extensions testing.
   virtual void BlacklistWebGLForTesting() = 0;
 
-  virtual bool IsFeatureBlacklisted(int feature) const = 0;
-  virtual bool IsFeatureEnabled(int feature) const = 0;
-  virtual bool IsWebGLEnabled() const = 0;
-  virtual bool IsWebGL2Enabled() const = 0;
-
   virtual gpu::GPUInfo GetGPUInfo() const = 0;
 
   // This indicator might change because we could collect more GPU info or
diff --git a/content/public/browser/network_service_instance.cc b/content/public/browser/network_service_instance.cc
deleted file mode 100644
index 91d3c6d..0000000
--- a/content/public/browser/network_service_instance.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/browser/network_service_instance.h"
-
-#include "base/feature_list.h"
-#include "content/browser/network_service_client.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/common/content_features.h"
-#include "content/public/common/network_service.mojom.h"
-#include "content/public/common/service_manager_connection.h"
-#include "content/public/common/service_names.mojom.h"
-#include "services/service_manager/public/cpp/connector.h"
-
-namespace content {
-
-static mojom::NetworkServicePtr* g_network_service = nullptr;
-
-mojom::NetworkService* GetNetworkService() {
-  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-  DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
-
-  if (!g_network_service)
-    g_network_service = new mojom::NetworkServicePtr;
-  static NetworkServiceClient* g_client;
-  if (!g_network_service->is_bound() ||
-      g_network_service->encountered_error()) {
-    ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
-        mojom::kNetworkServiceName, g_network_service);
-
-    mojom::NetworkServiceClientPtr client_ptr;
-    delete g_client;  // In case we're recreating the network service.
-    g_client = new NetworkServiceClient(mojo::MakeRequest(&client_ptr));
-    g_network_service->get()->SetClient(std::move(client_ptr));
-  }
-  return g_network_service->get();
-}
-
-void FlushNetworkServiceInstanceForTesting() {
-  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-  DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
-
-  if (g_network_service)
-    g_network_service->FlushForTesting();
-}
-
-}  // namespace content
diff --git a/content/public/browser/network_service_instance.h b/content/public/browser/network_service_instance.h
index fe439ea..c15aba87 100644
--- a/content/public/browser/network_service_instance.h
+++ b/content/public/browser/network_service_instance.h
@@ -8,16 +8,26 @@
 #include "content/common/content_export.h"
 
 namespace content {
+class NetworkService;
 
 namespace mojom {
 class NetworkService;
 }
 
 // Returns a pointer to the NetworkService, creating / re-creating it as needed.
-// Must only be called on the UI thread. Must not be called if the network
-// service is disabled.
+// NetworkService will be running in-process if
+//   1) kNetworkService feature is disabled, or
+//   2) kNetworkService and kNetworkServiceInProcess are enabled
+// Otherwise it runs out of process.
+// This method can only be called on the UI thread.
 CONTENT_EXPORT mojom::NetworkService* GetNetworkService();
 
+// When network service is disabled, returns the in-process NetworkService
+// pointer which is used to ease transition to network service.
+// Must only be called on the IO thread.  Must not be called if the network
+// service is enabled.
+CONTENT_EXPORT NetworkService* GetNetworkServiceImpl();
+
 // Call |FlushForTesting()| on cached |NetworkServicePtr|. For testing only.
 // Must only be called on the UI thread. Must not be called if the network
 // service is disabled.
diff --git a/content/public/browser/push_messaging_service.h b/content/public/browser/push_messaging_service.h
index 70ea159..c8cb5aad 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -11,9 +11,14 @@
 
 #include "base/callback_forward.h"
 #include "content/common/content_export.h"
-#include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 #include "url/gurl.h"
 
+namespace blink {
+namespace mojom {
+enum class PermissionStatus;
+}
+}  // namespace blink
+
 namespace content {
 
 namespace mojom {
@@ -92,13 +97,6 @@
                            const std::string& sender_id,
                            const UnregisterCallback& callback) = 0;
 
-  // Checks the permission status for the |origin|. The |user_visible| boolean
-  // indicates whether the permission status only has to cover push messages
-  // resulting in visible effects to the user.
-  virtual blink::WebPushPermissionStatus GetPermissionStatus(
-      const GURL& origin,
-      bool user_visible) = 0;
-
   // Returns whether subscriptions that do not mandate user visible UI upon
   // receiving a push message are supported. Influences permission request and
   // permission check behaviour.
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 62a674c1..a838373 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -157,7 +157,7 @@
 content::ColorChooser* WebContentsDelegate::OpenColorChooser(
     WebContents* web_contents,
     SkColor color,
-    const std::vector<mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   return nullptr;
 }
 
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 0f7cd74..0ad2e1d 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,10 +18,10 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/bluetooth_chooser.h"
 #include "content/public/browser/invalidate_type.h"
-#include "content/public/common/color_suggestion.mojom.h"
 #include "content/public/common/media_stream_request.h"
 #include "content/public/common/previews_state.h"
 #include "content/public/common/window_container_type.mojom.h"
+#include "third_party/WebKit/common/color_chooser/color_chooser.mojom.h"
 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
 #include "third_party/WebKit/public/platform/WebDragOperation.h"
 #include "third_party/WebKit/public/platform/WebSecurityStyle.h"
@@ -73,7 +73,6 @@
 namespace content {
 
 struct OpenURLParams;
-struct WebContentsUnresponsiveState;
 
 enum class KeyboardEventProcessingResult;
 
@@ -318,9 +317,7 @@
                                   WebContents* new_contents) {}
 
   // Notification that the tab is hung.
-  virtual void RendererUnresponsive(
-      WebContents* source,
-      const WebContentsUnresponsiveState& unresponsive_state) {}
+  virtual void RendererUnresponsive(WebContents* source) {}
 
   // Notification that the tab is no longer hung.
   virtual void RendererResponsive(WebContents* source) {}
@@ -340,7 +337,7 @@
   virtual ColorChooser* OpenColorChooser(
       WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions);
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions);
 
   // Called when a file selection is to be done.
   virtual void RunFileChooser(RenderFrameHost* render_frame_host,
diff --git a/content/public/browser/web_contents_unresponsive_state.cc b/content/public/browser/web_contents_unresponsive_state.cc
deleted file mode 100644
index cc08ef1..0000000
--- a/content/public/browser/web_contents_unresponsive_state.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/browser/web_contents_unresponsive_state.h"
-
-namespace content {
-
-WebContentsUnresponsiveState::WebContentsUnresponsiveState()
-    : outstanding_ack_count(0),
-      last_event_type(blink::WebInputEvent::kUndefined) {}
-
-}  // namespace content
diff --git a/content/public/browser/web_contents_unresponsive_state.h b/content/public/browser/web_contents_unresponsive_state.h
deleted file mode 100644
index 838625a..0000000
--- a/content/public/browser/web_contents_unresponsive_state.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_UNRESPONSIVE_STATE_H_
-#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_UNRESPONSIVE_STATE_H_
-
-#include "content/common/content_export.h"
-#include "third_party/WebKit/public/platform/WebInputEvent.h"
-
-namespace content {
-
-// Contains a variety of information regarding the state
-// at which a renderer was marked as unresponsive. Some of
-// this information may be provided in a crash report.
-struct CONTENT_EXPORT WebContentsUnresponsiveState {
-  WebContentsUnresponsiveState();
-
-  // TODO(dtapuska): Remove these fields once crbug.com/615090 is fixed.
-  // The number of outstanding blocking input events sent to the renderer
-  // that have not be acknowledged.
-  size_t outstanding_ack_count;
-  // The input event type that started the unresponsive state timeout.
-  blink::WebInputEvent::Type outstanding_event_type;
-  // The last blocking input event type sent to the renderer.
-  blink::WebInputEvent::Type last_event_type;
-};
-
-}  // namespace content
-
-#endif  // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_UNRESPONSIVE_STATE_H_
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 8e241fe..f072e2e 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -358,7 +358,6 @@
 
   sources = [
     "appcache_info.mojom",
-    "color_suggestion.mojom",
     "download_stream.mojom",
     "network_service.mojom",
     "network_service_test.mojom",
diff --git a/content/public/common/browser_side_navigation_policy.cc b/content/public/common/browser_side_navigation_policy.cc
index 9e16fac..4fe8c3b 100644
--- a/content/public/common/browser_side_navigation_policy.cc
+++ b/content/public/common/browser_side_navigation_policy.cc
@@ -11,30 +11,7 @@
 namespace content {
 
 bool IsBrowserSideNavigationEnabled() {
-  // First check if the network service is enabled or if PlzNavigate was
-  // manually enabled via the --enable-browser-side-navigation flag. This takes
-  // precedence over other configuration. This ensure that tests that require
-  // PlzNavigate and manually set the command line flag or enable the network
-  // service will still work even if the test suite is ran with
-  // --disable-browser-side-navigation.
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableBrowserSideNavigation) ||
-      base::FeatureList::IsEnabled(features::kNetworkService)) {
-    return true;
-  }
-
-  // Otherwise, disabling PlzNavigate through the command line flag
-  // --disable-browser-side-navigation has priority over the feature being
-  // enabled through the feature list. This ensures that test suites that run
-  // with --disable-browser-side-navigation do run with browser-side navigation
-  // disabled, even if the feature is enabled by default.
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kDisableBrowserSideNavigation)) {
-    return false;
-  }
-
-  // Otherwise, default to the feature list.
-  return base::FeatureList::IsEnabled(features::kBrowserSideNavigation);
+  return true;
 }
 
 // Browser side navigation (aka PlzNavigate) is using blob URLs to deliver
diff --git a/content/public/common/color_suggestion.mojom b/content/public/common/color_suggestion.mojom
deleted file mode 100644
index a7fe420..0000000
--- a/content/public/common/color_suggestion.mojom
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module content.mojom;
-
-struct ColorSuggestion {
-  uint32 color;
-  string label;
-};
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 27e9edb..e87f324 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -47,10 +47,6 @@
 const base::Feature kBrotliEncoding{"brotli-encoding",
                                     base::FEATURE_ENABLED_BY_DEFAULT};
 
-// Enables browser side navigation (aka PlzNavigate). http://crbug.com/368813
-const base::Feature kBrowserSideNavigation{"browser-side-navigation",
-                                           base::FEATURE_ENABLED_BY_DEFAULT};
-
 // Browser side navigation (aka PlzNavigate) is using blob URLs to deliver
 // the body of the main resource to the renderer process. When enabled, the
 // NavigationMojoResponse feature replaces this mechanism by a Mojo DataPipe.
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 271e0109..1b944a3 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -24,7 +24,6 @@
 CONTENT_EXPORT extern const base::Feature kBlockCredentialedSubresources;
 CONTENT_EXPORT extern const base::Feature kDataSaverHoldback;
 CONTENT_EXPORT extern const base::Feature kBrotliEncoding;
-CONTENT_EXPORT extern const base::Feature kBrowserSideNavigation;
 CONTENT_EXPORT extern const base::Feature kNavigationMojoResponse;
 CONTENT_EXPORT extern const base::Feature kCanvas2DImageChromium;
 CONTENT_EXPORT extern const base::Feature kCheckerImaging;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 2bc0c80..d14c528d 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -351,10 +351,6 @@
 // features.
 const char kEnableBlinkFeatures[]           = "enable-blink-features";
 
-// PlzNavigate: Use or not the experimental browser-side navigation path.
-const char kDisableBrowserSideNavigation[] = "disable-browser-side-navigation";
-const char kEnableBrowserSideNavigation[]   = "enable-browser-side-navigation";
-
 // Enable animating of images in the compositor instead of blink.
 const char kEnableCompositorImageAnimations[] =
     "enable-compositor-image-animations";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 147c10b..253727d2 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -41,7 +41,6 @@
     kDisableBackgroundingOccludedWindowsForTesting[];
 CONTENT_EXPORT extern const char kDisableBackgroundTimerThrottling[];
 CONTENT_EXPORT extern const char kDisableBlinkFeatures[];
-CONTENT_EXPORT extern const char kDisableBrowserSideNavigation[];
 CONTENT_EXPORT extern const char kDisableCompositorUkmForTests[];
 CONTENT_EXPORT extern const char kDisableDatabases[];
 CONTENT_EXPORT extern const char kDisableDistanceFieldText[];
@@ -113,7 +112,6 @@
 CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
 CONTENT_EXPORT extern const char kEnableBlinkFeatures[];
 CONTENT_EXPORT extern const char kEnableBackgroundFetchPersistence[];
-CONTENT_EXPORT extern const char kEnableBrowserSideNavigation[];
 CONTENT_EXPORT extern const char kEnableCompositorImageAnimations[];
 CONTENT_EXPORT extern const char kEnableDisplayList2dCanvas[];
 CONTENT_EXPORT extern const char kEnableDistanceFieldText[];
diff --git a/content/public/common/media_stream_request.h b/content/public/common/media_stream_request.h
index 71ce9fc..7915110a 100644
--- a/content/public/common/media_stream_request.h
+++ b/content/public/common/media_stream_request.h
@@ -119,8 +119,7 @@
 
   // The device id of a matched output device if any (otherwise empty).
   // Only applicable to audio devices.
-  // TODO(c.padhi): Change this to base::Optional. http://crbug.com/793255.
-  std::string matched_output_device_id;
+  base::Optional<std::string> matched_output_device_id;
 
   // The device's "friendly" name. Not guaranteed to be unique.
   std::string name;
diff --git a/content/public/network/BUILD.gn b/content/public/network/BUILD.gn
index e1f8552..f4df623 100644
--- a/content/public/network/BUILD.gn
+++ b/content/public/network/BUILD.gn
@@ -24,12 +24,14 @@
     "ignore_errors_cert_verifier.cc",
     "ignore_errors_cert_verifier.h",
     "network_service.h",
-    "url_request_context_builder_mojo.cc",
     "url_request_context_builder_mojo.h",
+    "url_request_context_owner.cc",
+    "url_request_context_owner.h",
   ]
 
   deps = [
     "//base",
+    "//components/prefs",
     "//content:export",
     "//content/common:mojo_bindings",
     "//content/public/common:common_sources",
diff --git a/content/public/network/DEPS b/content/public/network/DEPS
index e2720f757..f0de245 100644
--- a/content/public/network/DEPS
+++ b/content/public/network/DEPS
@@ -1,5 +1,9 @@
 specific_include_rules = {
   ".*\.cc": [
+    # Prefs are used to create an independent file with a persisted key:value
+    # store for networking-related data (Like which servers support QUIC),
+    # rather than to store user preferences.
+    "+components/prefs",
     "+content/network",
     "+services/proxy_resolver/public/interfaces",
   ],
diff --git a/content/public/network/network_service.h b/content/public/network/network_service.h
index bc161ff..b69277c 100644
--- a/content/public/network/network_service.h
+++ b/content/public/network/network_service.h
@@ -40,7 +40,8 @@
   // NetworkService.
   //
   // This method is intended to ease the transition to an out-of-process
-  // NetworkService, and will be removed once that ships.
+  // NetworkService, and will be removed once that ships. It should only be
+  // called if the network service is disabled.
   virtual std::unique_ptr<mojom::NetworkContext>
   CreateNetworkContextWithBuilder(
       mojom::NetworkContextRequest request,
diff --git a/content/public/network/url_request_context_builder_mojo.h b/content/public/network/url_request_context_builder_mojo.h
index 0e6b2a1..1c097516 100644
--- a/content/public/network/url_request_context_builder_mojo.h
+++ b/content/public/network/url_request_context_builder_mojo.h
@@ -10,6 +10,8 @@
 #include "base/macros.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
+#include "content/public/common/network_service.mojom.h"
+#include "content/public/network/url_request_context_owner.h"
 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
 #include "net/url_request/url_request_context_builder.h"
 #include "services/proxy_resolver/public/interfaces/proxy_resolver.mojom.h"
@@ -45,6 +47,17 @@
       proxy_resolver::mojom::ProxyResolverFactoryPtr
           mojo_proxy_resolver_factory);
 
+  // Can be used to create a URLRequestContext from this consumer-configured
+  // URLRequestContextBuilder, which |params| will then be applied to. The
+  // results URLRequestContext will be returned along with other state that it
+  // depends on. The URLRequestContext can be further modified before first use.
+  //
+  // This method is intended to ease the transition to an out-of-process
+  // NetworkService, and will be removed once that ships.
+  URLRequestContextOwner Create(mojom::NetworkContextParams* params,
+                                bool quic_disabled,
+                                net::NetLog* net_log);
+
  private:
   std::unique_ptr<net::ProxyService> CreateProxyService(
       std::unique_ptr<net::ProxyConfigService> proxy_config_service,
diff --git a/content/public/network/url_request_context_owner.cc b/content/public/network/url_request_context_owner.cc
new file mode 100644
index 0000000..62de5cfd
--- /dev/null
+++ b/content/public/network/url_request_context_owner.cc
@@ -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.
+
+#include "content/public/network/url_request_context_owner.h"
+
+#include "components/prefs/pref_service.h"
+#include "net/url_request/url_request_context.h"
+
+namespace content {
+
+URLRequestContextOwner::URLRequestContextOwner() = default;
+
+URLRequestContextOwner::~URLRequestContextOwner() = default;
+
+URLRequestContextOwner::URLRequestContextOwner(URLRequestContextOwner&& other)
+    : pref_service(std::move(other.pref_service)),
+      url_request_context(std::move(other.url_request_context)) {}
+
+URLRequestContextOwner& URLRequestContextOwner::operator=(
+    URLRequestContextOwner&& other) {
+  pref_service = std::move(other.pref_service);
+  url_request_context = std::move(other.url_request_context);
+  return *this;
+}
+
+}  // namespace content
diff --git a/content/public/network/url_request_context_owner.h b/content/public/network/url_request_context_owner.h
new file mode 100644
index 0000000..9c8a3ef
--- /dev/null
+++ b/content/public/network/url_request_context_owner.h
@@ -0,0 +1,35 @@
+// 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 CONTENT_PUBLIC_NETWORK_URL_REQUEST_CONTEXT_OWNER_H_
+#define CONTENT_PUBLIC_NETWORK_URL_REQUEST_CONTEXT_OWNER_H_
+
+#include <memory>
+
+#include "content/common/content_export.h"
+
+class PrefService;
+
+namespace net {
+class URLRequestContext;
+}
+
+namespace content {
+
+// This owns a net::URLRequestContext and other state that's used with it.
+struct CONTENT_EXPORT URLRequestContextOwner {
+  URLRequestContextOwner();
+  ~URLRequestContextOwner();
+  URLRequestContextOwner(URLRequestContextOwner&& other);
+  URLRequestContextOwner& operator=(URLRequestContextOwner&& other);
+
+  // This needs to be destroyed after the URLRequestContext.
+  std::unique_ptr<PrefService> pref_service;
+
+  std::unique_ptr<net::URLRequestContext> url_request_context;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_PUBLIC_NETWORK_URL_REQUEST_CONTEXT_OWNER_H_
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 4f8478b..aa77b86 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -109,9 +109,6 @@
   // The interestingness of layouts is explained in WebMeaningfulLayout.h.
   virtual void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) {}
 
-  // Called when a compositor frame has committed.
-  virtual void DidCommitCompositorFrame() {}
-
   // Notifications when |PerformanceTiming| data becomes available
   virtual void DidChangePerformanceTiming() {}
 
diff --git a/content/public/test/browser_side_navigation_test_utils.cc b/content/public/test/browser_side_navigation_test_utils.cc
index 66390340..07b4c7c 100644
--- a/content/public/test/browser_side_navigation_test_utils.cc
+++ b/content/public/test/browser_side_navigation_test_utils.cc
@@ -67,9 +67,4 @@
   return stream->CreateHandle();
 }
 
-void EnableBrowserSideNavigation() {
-  base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kEnableBrowserSideNavigation);
-}
-
 }  // namespace content
diff --git a/content/public/test/browser_side_navigation_test_utils.h b/content/public/test/browser_side_navigation_test_utils.h
index aec1dc1..ce16522 100644
--- a/content/public/test/browser_side_navigation_test_utils.h
+++ b/content/public/test/browser_side_navigation_test_utils.h
@@ -27,12 +27,6 @@
 // from the IO thread with a TestNavigationURLLoader.
 std::unique_ptr<StreamHandle> MakeEmptyStream();
 
-// If a test needs to run with browser side navigation enabled, call this
-// function before doing any setup. In particular, for tests inheriting from
-// RenderViewHostTestHarness, call this function before calling
-// RenderViewHostTestHarness::SetUp.
-void EnableBrowserSideNavigation();
-
 }  // namespace content
 
 #endif  // CONTENT_PUBLIC_TEST_BROWSER_SIDE_NAVIGATION_TEST_UTILS_H_
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index 3bf562a..d0edbfee 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -346,7 +346,6 @@
     if (!disable_io_checks_)
       base::ThreadRestrictions::SetIOAllowed(old_io_allowed_value);
     TearDownOnMainThread();
-    PostRunTestOnMainThread();
   }
 
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -367,6 +366,8 @@
                                    run_loop.QuitClosure(), trace_file)));
     run_loop.Run();
   }
+
+  PostRunTestOnMainThread();
 }
 
 void BrowserTestBase::CreateTestServer(const base::FilePath& test_server_base) {
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 678af54..611e51e 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -2377,9 +2377,13 @@
   FlushNetworkServiceInstanceForTesting();
 }
 
-int LoadBasicRequest(mojom::NetworkContext* network_context, const GURL& url) {
+int LoadBasicRequest(mojom::NetworkContext* network_context,
+                     const GURL& url,
+                     int process_id,
+                     int render_frame_id) {
   mojom::URLLoaderFactoryPtr url_loader_factory;
-  network_context->CreateURLLoaderFactory(MakeRequest(&url_loader_factory), 0);
+  network_context->CreateURLLoaderFactory(MakeRequest(&url_loader_factory),
+                                          process_id);
   // |url_loader_factory| will receive error notification asynchronously if
   // |network_context| has already encountered error. However it's still false
   // at this point.
@@ -2387,6 +2391,7 @@
 
   auto request = std::make_unique<ResourceRequest>();
   request->url = url;
+  request->render_frame_id = render_frame_id;
 
   content::SimpleURLLoaderTestHelper simple_loader_helper;
   std::unique_ptr<content::SimpleURLLoader> simple_loader =
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 9b63012..3a08b5b 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -1072,7 +1072,10 @@
 void SimulateNetworkServiceCrash();
 
 // Load the given |url| with |network_context| and return the |net::Error| code.
-int LoadBasicRequest(mojom::NetworkContext* network_context, const GURL& url);
+int LoadBasicRequest(mojom::NetworkContext* network_context,
+                     const GURL& url,
+                     int process_id = 0,
+                     int render_frame_id = 0);
 
 }  // namespace content
 
diff --git a/content/public/test/mock_browsing_data_remover_delegate.cc b/content/public/test/mock_browsing_data_remover_delegate.cc
index 4183749..810033d 100644
--- a/content/public/test/mock_browsing_data_remover_delegate.cc
+++ b/content/public/test/mock_browsing_data_remover_delegate.cc
@@ -31,11 +31,11 @@
     int remove_mask,
     const BrowsingDataFilterBuilder& filter_builder,
     int origin_type_mask,
-    const base::Closure& callback) {
+    base::OnceClosure callback) {
   actual_calls_.emplace_back(delete_begin, delete_end, remove_mask,
                              origin_type_mask, filter_builder.Copy(),
                              true /* should_compare_filter */);
-  callback.Run();
+  std::move(callback).Run();
 }
 
 void MockBrowsingDataRemoverDelegate::ExpectCall(
diff --git a/content/public/test/mock_browsing_data_remover_delegate.h b/content/public/test/mock_browsing_data_remover_delegate.h
index ca715006..ca40cd5 100644
--- a/content/public/test/mock_browsing_data_remover_delegate.h
+++ b/content/public/test/mock_browsing_data_remover_delegate.h
@@ -29,7 +29,7 @@
                           int remove_mask,
                           const BrowsingDataFilterBuilder& filter_builder,
                           int origin_type_mask,
-                          const base::Closure& callback) override;
+                          base::OnceClosure callback) override;
 
   // Add an expected call for testing.
   void ExpectCall(const base::Time& delete_begin,
diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc
index ffd8148..b4acef4 100644
--- a/content/public/test/test_renderer_host.cc
+++ b/content/public/test/test_renderer_host.cc
@@ -10,7 +10,7 @@
 #include "base/run_loop.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
-#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "content/browser/compositor/test/test_image_transport_factory.h"
 #include "content/browser/frame_host/navigation_entry_impl.h"
 #include "content/browser/renderer_host/render_view_host_factory.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -145,7 +145,7 @@
     message_loop_ = std::make_unique<base::MessageLoop>();
 #if !defined(OS_ANDROID)
   ImageTransportFactory::SetFactory(
-      std::make_unique<NoTransportImageTransportFactory>());
+      std::make_unique<TestImageTransportFactory>());
 #else
   if (!screen_)
     screen_.reset(ui::CreateDummyScreenAndroid());
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index a64a0cc..40741ec3 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -411,8 +411,6 @@
     "renderer_main_platform_delegate_win.cc",
     "renderer_webapplicationcachehost_impl.cc",
     "renderer_webapplicationcachehost_impl.h",
-    "renderer_webcolorchooser_impl.cc",
-    "renderer_webcolorchooser_impl.h",
     "renderer_webcookiejar_impl.cc",
     "renderer_webcookiejar_impl.h",
     "resizing_mode_selector.cc",
diff --git a/content/renderer/android/synchronous_compositor_filter.cc b/content/renderer/android/synchronous_compositor_filter.cc
index 79b9de0..0cd30fb 100644
--- a/content/renderer/android/synchronous_compositor_filter.cc
+++ b/content/renderer/android/synchronous_compositor_filter.cc
@@ -10,7 +10,7 @@
 #include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "content/common/android/sync_compositor_messages.h"
+#include "content/common/input/sync_compositor_messages.h"
 #include "content/common/input_messages.h"
 #include "content/renderer/android/synchronous_compositor_proxy.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/content/renderer/android/synchronous_compositor_proxy.cc b/content/renderer/android/synchronous_compositor_proxy.cc
index 331d51f..2242dd4e 100644
--- a/content/renderer/android/synchronous_compositor_proxy.cc
+++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -8,8 +8,8 @@
 #include "base/command_line.h"
 #include "base/memory/shared_memory.h"
 #include "cc/ipc/cc_param_traits.h"
-#include "content/common/android/sync_compositor_messages.h"
 #include "content/common/android/sync_compositor_statics.h"
+#include "content/common/input/sync_compositor_messages.h"
 #include "content/public/common/content_switches.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_sender.h"
diff --git a/content/renderer/android/synchronous_layer_tree_frame_sink.cc b/content/renderer/android/synchronous_layer_tree_frame_sink.cc
index ec01c52..f5065bf5 100644
--- a/content/renderer/android/synchronous_layer_tree_frame_sink.cc
+++ b/content/renderer/android/synchronous_layer_tree_frame_sink.cc
@@ -27,7 +27,7 @@
 #include "components/viz/service/display/texture_deleter.h"
 #include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
 #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
-#include "content/common/android/sync_compositor_messages.h"
+#include "content/common/input/sync_compositor_messages.h"
 #include "content/common/view_messages.h"
 #include "content/renderer/android/synchronous_compositor_filter.h"
 #include "content/renderer/android/synchronous_compositor_registry.h"
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index e317eae..19e2c163 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -231,9 +231,6 @@
       new BrowserPluginHostMsg_Detach(browser_plugin_instance_id_));
 }
 
-void BrowserPlugin::DidCommitCompositorFrame() {
-}
-
 #if defined(USE_AURA)
 void BrowserPlugin::CreateMusWindowAndEmbed(
     const base::UnguessableToken& embed_token) {
@@ -394,9 +391,7 @@
 }
 
 float BrowserPlugin::GetDeviceScaleFactor() const {
-  return RenderFrameImpl::FromWebFrame(Container()->GetDocument().GetFrame())
-      ->GetRenderWidget()
-      ->GetOriginalDeviceScaleFactor();
+  return embedding_render_widget_->GetOriginalDeviceScaleFactor();
 }
 
 void BrowserPlugin::UpdateInternalInstanceId() {
@@ -460,15 +455,21 @@
   compositing_helper_.reset(ChildFrameCompositingHelper::CreateForBrowserPlugin(
       weak_ptr_factory_.GetWeakPtr()));
 
-  RenderWidget* render_widget =
+  embedding_render_widget_ =
       RenderFrameImpl::FromWebFrame(container_->GetDocument().GetFrame())
           ->GetRenderWidget();
-  pending_resize_params_.screen_info = render_widget->screen_info();
+  pending_resize_params_.screen_info = embedding_render_widget_->screen_info();
+  embedding_render_widget_->RegisterBrowserPlugin(this);
 
   return true;
 }
 
 void BrowserPlugin::Destroy() {
+  if (embedding_render_widget_) {
+    embedding_render_widget_->UnregisterBrowserPlugin(this);
+    embedding_render_widget_ = nullptr;
+  }
+
   if (container_) {
     // The BrowserPlugin's WebPluginContainer is deleted immediately after this
     // call returns, so let's not keep a reference to it around.
@@ -526,10 +527,7 @@
   // We will use the local root's RenderWidget to convert coordinates to Window.
   // If this local root belongs to an OOPIF, on the browser side we will have to
   // consider the displacement of the child frame in root window.
-  RenderWidget* render_widget =
-      RenderFrameImpl::FromWebFrame(Container()->GetDocument().GetFrame())
-          ->GetRenderWidget();
-  render_widget->ConvertViewportToWindow(&rect_in_css);
+  embedding_render_widget_->ConvertViewportToWindow(&rect_in_css);
   gfx::Rect frame_rect = rect_in_css;
 
   if (!ready_) {
@@ -539,7 +537,7 @@
   }
 
   pending_resize_params_.frame_rect = frame_rect;
-  pending_resize_params_.screen_info = render_widget->screen_info();
+  pending_resize_params_.screen_info = embedding_render_widget_->screen_info();
   WasResized();
 }
 
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index eb9abce..7480991 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -88,10 +88,6 @@
   // currently attached to, if any.
   void Detach();
 
-  // Notify the plugin about a compositor commit so that frame ACKs could be
-  // sent, if needed.
-  void DidCommitCompositorFrame();
-
   void WasResized();
 
   // Returns whether a message should be forwarded to BrowserPlugin.
@@ -278,6 +274,9 @@
 
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 
+  // Pointer to the RenderWidget that embeds this plugin.
+  RenderWidget* embedding_render_widget_ = nullptr;
+
   // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
   // get called after BrowserPlugin has been destroyed.
   base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
diff --git a/content/renderer/browser_plugin/browser_plugin_manager.cc b/content/renderer/browser_plugin/browser_plugin_manager.cc
index 00f0332..4d20c24 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager.cc
+++ b/content/renderer/browser_plugin/browser_plugin_manager.cc
@@ -9,7 +9,6 @@
 #include "content/common/browser_plugin/browser_plugin_constants.h"
 #include "content/common/browser_plugin/browser_plugin_messages.h"
 #include "content/common/frame_messages.h"
-#include "content/public/common/screen_info.h"
 #include "content/public/renderer/browser_plugin_delegate.h"
 #include "content/renderer/browser_plugin/browser_plugin.h"
 #include "content/renderer/render_thread_impl.h"
@@ -57,14 +56,6 @@
   }
 }
 
-void BrowserPluginManager::ScreenInfoChanged(const ScreenInfo& screen_info) {
-  base::IDMap<BrowserPlugin*>::iterator iter(&instances_);
-  while (!iter.IsAtEnd()) {
-    iter.GetCurrentValue()->ScreenInfoChanged(screen_info);
-    iter.Advance();
-  }
-}
-
 void BrowserPluginManager::Attach(int browser_plugin_instance_id) {
   BrowserPlugin* plugin = GetBrowserPlugin(browser_plugin_instance_id);
   if (plugin)
@@ -83,18 +74,6 @@
   return new BrowserPlugin(render_frame, delegate);
 }
 
-void BrowserPluginManager::DidCommitCompositorFrame(
-    int render_frame_routing_id) {
-  base::IDMap<BrowserPlugin*>::iterator iter(&instances_);
-  while (!iter.IsAtEnd()) {
-    if (iter.GetCurrentValue()->render_frame_routing_id() ==
-        render_frame_routing_id) {
-      iter.GetCurrentValue()->DidCommitCompositorFrame();
-    }
-    iter.Advance();
-  }
-}
-
 bool BrowserPluginManager::OnControlMessageReceived(
     const IPC::Message& message) {
   if (!BrowserPlugin::ShouldForwardToBrowserPlugin(message))
diff --git a/content/renderer/browser_plugin/browser_plugin_manager.h b/content/renderer/browser_plugin/browser_plugin_manager.h
index bdd39fab..0159f8f 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager.h
+++ b/content/renderer/browser_plugin/browser_plugin_manager.h
@@ -16,7 +16,6 @@
 class BrowserPlugin;
 class BrowserPluginDelegate;
 class RenderFrame;
-struct ScreenInfo;
 
 // BrowserPluginManager manages the routing of messages to the appropriate
 // BrowserPlugin object based on its instance ID. There is one BrowserPlugin
@@ -50,13 +49,10 @@
 
   void UpdateFocusState();
 
-  void ScreenInfoChanged(const ScreenInfo& screen_info);
-
   // Returns a new instance ID to be used by BrowserPlugin. Instance IDs are
   // unique per process.
   int GetNextInstanceID();
 
-  void DidCommitCompositorFrame(int render_frame_routing_id);
   bool Send(IPC::Message* msg);
 
   // RenderThreadObserver override.
diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
index 37bd1f5..751e6d6 100644
--- a/content/renderer/devtools/devtools_agent.cc
+++ b/content/renderer/devtools/devtools_agent.cc
@@ -260,10 +260,7 @@
 }
 
 void DevToolsAgent::InspectElement(int session_id, const gfx::Point& point) {
-  blink::WebFloatRect point_rect(point.x(), point.y(), 0, 0);
-  frame_->GetRenderWidget()->ConvertWindowToViewport(&point_rect);
-  GetWebAgent()->InspectElementAt(session_id,
-                                  WebPoint(point_rect.x, point_rect.y));
+  GetWebAgent()->InspectElementAt(session_id, WebPoint(point.x(), point.y()));
 }
 
 void DevToolsAgent::OnRequestNewWindowCompleted(int session_id, bool success) {
diff --git a/content/renderer/loader/web_url_loader_impl_unittest.cc b/content/renderer/loader/web_url_loader_impl_unittest.cc
index 56f2b34..f59565e79 100644
--- a/content/renderer/loader/web_url_loader_impl_unittest.cc
+++ b/content/renderer/loader/web_url_loader_impl_unittest.cc
@@ -639,8 +639,6 @@
   RequestExtraData* extra_data = new RequestExtraData();
   extra_data->set_stream_override(std::move(stream_override));
   request.SetExtraData(extra_data);
-  base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kEnableBrowserSideNavigation);
 
   client()->loader()->LoadAsynchronously(request, client());
 
diff --git a/content/renderer/media/user_media_client_impl_unittest.cc b/content/renderer/media/user_media_client_impl_unittest.cc
index 5b3560de6..99f15ea 100644
--- a/content/renderer/media/user_media_client_impl_unittest.cc
+++ b/content/renderer/media/user_media_client_impl_unittest.cc
@@ -1396,7 +1396,7 @@
       RequestLocalAudioTrackWithAssociatedSink(true);
   MediaStreamAudioSource* source =
       MediaStreamAudioSource::From(web_track.Source());
-  EXPECT_FALSE(source->device().matched_output_device_id.empty());
+  EXPECT_TRUE(source->device().matched_output_device_id);
 }
 
 TEST_F(UserMediaClientImplTest,
@@ -1406,7 +1406,7 @@
       RequestLocalAudioTrackWithAssociatedSink(false);
   MediaStreamAudioSource* source =
       MediaStreamAudioSource::From(web_track.Source());
-  EXPECT_TRUE(source->device().matched_output_device_id.empty());
+  EXPECT_FALSE(source->device().matched_output_device_id);
 }
 
 }  // namespace content
diff --git a/content/renderer/media/user_media_processor.cc b/content/renderer/media/user_media_processor.cc
index 17babe2..85485d3 100644
--- a/content/renderer/media/user_media_processor.cc
+++ b/content/renderer/media/user_media_processor.cc
@@ -834,7 +834,7 @@
     // kMediaStreamRenderToAssociatedSink, the output device id must
     // be removed.
     for (auto& device : overridden_audio_devices)
-      device.matched_output_device_id.clear();
+      device.matched_output_device_id.reset();
   }
 
   for (size_t i = 0; i < overridden_audio_devices.size(); ++i) {
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index 1b2a2ab..ffdc31d 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -139,7 +139,7 @@
       media::VideoPixelFormat pixel_format;
       if (buffer->type() == webrtc::VideoFrameBuffer::Type::kI444) {
         yuv_buffer = buffer->GetI444();
-        pixel_format = media::PIXEL_FORMAT_YV24;
+        pixel_format = media::PIXEL_FORMAT_I444;
       } else {
         yuv_buffer = buffer->ToI420();
         pixel_format = media::PIXEL_FORMAT_YV12;
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index 634dd31..26aba61 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -425,7 +425,7 @@
     return 0;
 
   const MediaStreamDevice& device = capturers_.back()->device();
-  if (device.session_id <= 0 || device.matched_output_device_id.empty())
+  if (device.session_id <= 0 || !device.matched_output_device_id)
     return 0;
 
   return device.session_id;
diff --git a/content/renderer/pepper/pepper_video_encoder_host.cc b/content/renderer/pepper/pepper_video_encoder_host.cc
index 9b4e44ac..8212afd 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.cc
+++ b/content/renderer/pepper/pepper_video_encoder_host.cc
@@ -21,12 +21,6 @@
 #include "content/renderer/render_thread_impl.h"
 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
-#include "media/base/bind_to_current_loop.h"
-#include "media/base/video_frame.h"
-#include "media/gpu/gpu_video_accelerator_util.h"
-#include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h"
-#include "media/video/gpu_video_accelerator_factories.h"
-#include "media/video/video_encode_accelerator.h"
 #include "ppapi/c/pp_codecs.h"
 #include "ppapi/c/pp_errors.h"
 #include "ppapi/c/pp_graphics_3d.h"
@@ -153,31 +147,16 @@
 }
 
 PP_VideoProfileDescription PP_FromVideoEncodeAcceleratorSupportedProfile(
-    media::VideoEncodeAccelerator::SupportedProfile profile,
-    PP_Bool hardware_accelerated) {
+    media::VideoEncodeAccelerator::SupportedProfile profile) {
   PP_VideoProfileDescription pp_profile;
   pp_profile.profile = PP_FromMediaVideoProfile(profile.profile);
   pp_profile.max_resolution = PP_FromGfxSize(profile.max_resolution);
   pp_profile.max_framerate_numerator = profile.max_framerate_numerator;
   pp_profile.max_framerate_denominator = profile.max_framerate_denominator;
-  pp_profile.hardware_accelerated = hardware_accelerated;
+  pp_profile.hardware_accelerated = PP_FALSE;
   return pp_profile;
 }
 
-bool PP_HardwareAccelerationCompatibleVideo(bool accelerated,
-                                            PP_HardwareAcceleration requested) {
-  switch (requested) {
-    case PP_HARDWAREACCELERATION_ONLY:
-      return accelerated;
-    case PP_HARDWAREACCELERATION_NONE:
-      return !accelerated;
-    case PP_HARDWAREACCELERATION_WITHFALLBACK:
-      return true;
-    // No default case, to catch unhandled PP_HardwareAcceleration values.
-  }
-  return false;
-}
-
 }  // namespace
 
 PepperVideoEncoderHost::ShmBuffer::ShmBuffer(
@@ -187,8 +166,7 @@
   DCHECK(this->shm);
 }
 
-PepperVideoEncoderHost::ShmBuffer::~ShmBuffer() {
-}
+PepperVideoEncoderHost::ShmBuffer::~ShmBuffer() {}
 
 media::BitstreamBuffer PepperVideoEncoderHost::ShmBuffer::ToBitstreamBuffer() {
   return media::BitstreamBuffer(id, shm->handle(), shm->mapped_size());
@@ -200,12 +178,12 @@
     : ResourceHost(host->GetPpapiHost(), instance, resource),
       renderer_ppapi_host_(host),
       buffer_manager_(this),
+      encoder_(new VideoEncoderShim(this)),
       initialized_(false),
       encoder_last_error_(PP_ERROR_FAILED),
       frame_count_(0),
       media_input_format_(media::PIXEL_FORMAT_UNKNOWN),
-      weak_ptr_factory_(this) {
-}
+      weak_ptr_factory_(this) {}
 
 PepperVideoEncoderHost::~PepperVideoEncoderHost() {
   Close();
@@ -285,38 +263,18 @@
   if (input_size.IsEmpty())
     return PP_ERROR_BADARGUMENT;
 
-  if (!IsInitializationValid(input_visible_size, output_profile, acceleration))
+  if (acceleration == PP_HARDWAREACCELERATION_ONLY)
     return PP_ERROR_NOTSUPPORTED;
 
-  int32_t error = PP_ERROR_NOTSUPPORTED;
   initialize_reply_context_ = context->MakeReplyMessageContext();
-
-  if (acceleration != PP_HARDWAREACCELERATION_NONE) {
-    if (InitializeHardware(media_input_format_, input_size, media_profile,
-                           initial_bitrate))
-      return PP_OK_COMPLETIONPENDING;
-
-    if (acceleration == PP_HARDWAREACCELERATION_ONLY)
-      error = PP_ERROR_FAILED;
-  }
-
-#if defined(OS_ANDROID)
-  initialize_reply_context_ = ppapi::host::ReplyMessageContext();
-  Close();
-  return error;
-#else
-  if (acceleration != PP_HARDWAREACCELERATION_ONLY) {
-    encoder_.reset(new VideoEncoderShim(this));
-    if (encoder_->Initialize(media_input_format_, input_size, media_profile,
-                             initial_bitrate, this))
-      return PP_OK_COMPLETIONPENDING;
-    error = PP_ERROR_FAILED;
+  if (encoder_->Initialize(media_input_format_, input_size, media_profile,
+                           initial_bitrate, this)) {
+    return PP_OK_COMPLETIONPENDING;
   }
 
   initialize_reply_context_ = ppapi::host::ReplyMessageContext();
   Close();
-  return error;
-#endif
+  return PP_ERROR_FAILED;
 }
 
 int32_t PepperVideoEncoderHost::OnHostMsgGetVideoFrames(
@@ -467,100 +425,14 @@
 void PepperVideoEncoderHost::GetSupportedProfiles(
     std::vector<PP_VideoProfileDescription>* pp_profiles) {
   DCHECK(RenderThreadImpl::current());
+  DCHECK(encoder_);
 
-  media::VideoEncodeAccelerator::SupportedProfiles profiles;
-
-  if (EnsureGpuChannel()) {
-    profiles = media::GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles(
-        command_buffer_->channel()
-            ->gpu_info()
-            .video_encode_accelerator_supported_profiles);
-    for (media::VideoEncodeAccelerator::SupportedProfile profile : profiles) {
-      if (profile.profile == media::VP9PROFILE_PROFILE1 ||
-          profile.profile == media::VP9PROFILE_PROFILE2 ||
-          profile.profile == media::VP9PROFILE_PROFILE3) {
-        continue;
-      }
-      pp_profiles->push_back(
-          PP_FromVideoEncodeAcceleratorSupportedProfile(profile, PP_TRUE));
-    }
-  }
-
-#if !defined(OS_ANDROID)
-  VideoEncoderShim software_encoder(this);
-  profiles = software_encoder.GetSupportedProfiles();
-  for (media::VideoEncodeAccelerator::SupportedProfile profile : profiles) {
+  const media::VideoEncodeAccelerator::SupportedProfiles media_profiles =
+      encoder_->GetSupportedProfiles();
+  for (const auto& media_profile : media_profiles) {
     pp_profiles->push_back(
-        PP_FromVideoEncodeAcceleratorSupportedProfile(profile, PP_FALSE));
+        PP_FromVideoEncodeAcceleratorSupportedProfile(media_profile));
   }
-#endif
-}
-
-bool PepperVideoEncoderHost::IsInitializationValid(
-    const PP_Size& input_size,
-    PP_VideoProfile output_profile,
-    PP_HardwareAcceleration acceleration) {
-  DCHECK(RenderThreadImpl::current());
-
-  std::vector<PP_VideoProfileDescription> profiles;
-  GetSupportedProfiles(&profiles);
-
-  for (const PP_VideoProfileDescription& profile : profiles) {
-    if (output_profile == profile.profile &&
-        input_size.width <= profile.max_resolution.width &&
-        input_size.height <= profile.max_resolution.height &&
-        PP_HardwareAccelerationCompatibleVideo(
-            profile.hardware_accelerated == PP_TRUE, acceleration))
-      return true;
-  }
-
-  return false;
-}
-
-bool PepperVideoEncoderHost::EnsureGpuChannel() {
-  DCHECK(RenderThreadImpl::current());
-
-  if (command_buffer_)
-    return true;
-
-  // There is no guarantee that we have a 3D context to work with. So
-  // we create a dummy command buffer to communicate with the gpu process.
-  scoped_refptr<gpu::GpuChannelHost> channel =
-      RenderThreadImpl::current()->EstablishGpuChannelSync();
-  if (!channel)
-    return false;
-
-  command_buffer_ = std::make_unique<gpu::CommandBufferProxyImpl>(
-      std::move(channel),
-      RenderThreadImpl::current()->GetGpuMemoryBufferManager(),
-      kGpuStreamIdDefault, base::ThreadTaskRunnerHandle::Get());
-  auto result = command_buffer_->Initialize(
-      gpu::kNullSurfaceHandle, nullptr, kGpuStreamPriorityDefault,
-      gpu::gles2::ContextCreationAttribHelper(), GURL::EmptyGURL());
-  if (result != gpu::ContextResult::kSuccess) {
-    Close();
-    return false;
-  }
-
-  command_buffer_->SetGpuControlClient(this);
-
-  return true;
-}
-
-bool PepperVideoEncoderHost::InitializeHardware(
-    media::VideoPixelFormat input_format,
-    const gfx::Size& input_visible_size,
-    media::VideoCodecProfile output_profile,
-    uint32_t initial_bitrate) {
-  DCHECK(RenderThreadImpl::current());
-
-  if (!EnsureGpuChannel())
-    return false;
-
-  encoder_.reset(
-      new media::GpuVideoEncodeAcceleratorHost(command_buffer_.get()));
-  return encoder_->Initialize(input_format, input_visible_size, output_profile,
-                              initial_bitrate, this);
 }
 
 void PepperVideoEncoderHost::Close() {
diff --git a/content/renderer/pepper/pepper_video_encoder_host.h b/content/renderer/pepper/pepper_video_encoder_host.h
index dbbaee5..4e1e12c 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.h
+++ b/content/renderer/pepper/pepper_video_encoder_host.h
@@ -14,8 +14,8 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "content/common/content_export.h"
+#include "content/renderer/pepper/video_encoder_shim.h"
 #include "gpu/command_buffer/client/gpu_control_client.h"
-#include "media/video/video_encode_accelerator.h"
 #include "ppapi/c/pp_codecs.h"
 #include "ppapi/c/ppb_video_frame.h"
 #include "ppapi/host/host_message_context.h"
@@ -30,11 +30,10 @@
 namespace content {
 
 class RendererPpapiHost;
-class VideoEncoderShim;
 
 class CONTENT_EXPORT PepperVideoEncoderHost
     : public ppapi::host::ResourceHost,
-      public media::VideoEncodeAccelerator::Client,
+      public VideoEncoderShim::Client,
       public ppapi::MediaStreamBufferManager::Delegate,
       public gpu::GpuControlClient {
  public:
@@ -60,7 +59,7 @@
     bool in_use;
   };
 
-  // media::VideoEncodeAccelerator implementation.
+  // VideoEncoderShim implementation.
   void RequireBitstreamBuffers(unsigned int input_count,
                                const gfx::Size& input_coded_size,
                                size_t output_buffer_size) override;
@@ -135,7 +134,7 @@
 
   std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
 
-  std::unique_ptr<media::VideoEncodeAccelerator> encoder_;
+  std::unique_ptr<VideoEncoderShim> encoder_;
 
   // Whether the encoder has been successfully initialized.
   bool initialized_;
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index 91b36b8..d0310969 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -416,11 +416,11 @@
         uv_height_divisor_ = 2;
         uv_width_divisor_ = 2;
         break;
-      case media::PIXEL_FORMAT_I422:  // 422
+      case media::PIXEL_FORMAT_I422:
         uv_width_divisor_ = 2;
         uv_height_divisor_ = 1;
         break;
-      case media::PIXEL_FORMAT_YV24:  // 444
+      case media::PIXEL_FORMAT_I444:
         uv_width_divisor_ = 1;
         uv_height_divisor_ = 1;
         break;
diff --git a/content/renderer/push_messaging/push_messaging_client.h b/content/renderer/push_messaging/push_messaging_client.h
index 331ef4da..2740780 100644
--- a/content/renderer/push_messaging/push_messaging_client.h
+++ b/content/renderer/push_messaging/push_messaging_client.h
@@ -16,7 +16,6 @@
 #include "content/public/renderer/render_frame_observer.h"
 #include "third_party/WebKit/public/platform/modules/manifest/manifest.mojom.h"
 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h"
-#include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 
 class GURL;
 
diff --git a/content/renderer/push_messaging/push_provider.cc b/content/renderer/push_messaging/push_provider.cc
index d562990b..a7f1c3b9 100644
--- a/content/renderer/push_messaging/push_provider.cc
+++ b/content/renderer/push_messaging/push_provider.cc
@@ -301,42 +301,4 @@
   }
 }
 
-void PushProvider::GetPermissionStatus(
-    blink::WebServiceWorkerRegistration* service_worker_registration,
-    const blink::WebPushSubscriptionOptions& options,
-    std::unique_ptr<blink::WebPushPermissionStatusCallbacks> callbacks) {
-  DCHECK(service_worker_registration);
-  DCHECK(callbacks);
-
-  int64_t service_worker_registration_id =
-      GetServiceWorkerRegistrationId(service_worker_registration);
-
-  push_messaging_manager_->GetPermissionStatus(
-      service_worker_registration_id, options.user_visible_only,
-      // Safe to use base::Unretained because |push_messaging_manager_ |is owned
-      // by |this|.
-      base::BindOnce(&PushProvider::DidGetPermissionStatus,
-                     base::Unretained(this), base::Passed(&callbacks)));
-}
-
-void PushProvider::DidGetPermissionStatus(
-    std::unique_ptr<blink::WebPushPermissionStatusCallbacks> callbacks,
-    blink::WebPushError::ErrorType error_type,
-    blink::WebPushPermissionStatus status) {
-  DCHECK(callbacks);
-  // ErrorTypeNone indicates success.
-  if (error_type == blink::WebPushError::kErrorTypeNone) {
-    callbacks->OnSuccess(status);
-  } else {
-    std::string error_message;
-    if (error_type == blink::WebPushError::kErrorTypeNotSupported) {
-      error_message =
-          "Push subscriptions that don't enable userVisibleOnly are not "
-          "supported.";
-    }
-    callbacks->OnError(blink::WebPushError(
-        error_type, blink::WebString::FromUTF8(error_message)));
-  }
-}
-
 }  // namespace content
diff --git a/content/renderer/push_messaging/push_provider.h b/content/renderer/push_messaging/push_provider.h
index 08a75cc..d8fb5bcc 100644
--- a/content/renderer/push_messaging/push_provider.h
+++ b/content/renderer/push_messaging/push_provider.h
@@ -60,11 +60,6 @@
   void GetSubscription(
       blink::WebServiceWorkerRegistration* service_worker_registration,
       std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks) override;
-  void GetPermissionStatus(
-      blink::WebServiceWorkerRegistration* service_worker_registration,
-      const blink::WebPushSubscriptionOptions& options,
-      std::unique_ptr<blink::WebPushPermissionStatusCallbacks> callbacks)
-      override;
 
  private:
   explicit PushProvider(const scoped_refptr<base::SingleThreadTaskRunner>&
@@ -94,11 +89,6 @@
       const base::Optional<std::vector<uint8_t>>& p256dh,
       const base::Optional<std::vector<uint8_t>>& auth);
 
-  void DidGetPermissionStatus(
-      std::unique_ptr<blink::WebPushPermissionStatusCallbacks> callbacks,
-      blink::WebPushError::ErrorType error_type,
-      blink::WebPushPermissionStatus status);
-
   mojom::PushMessagingPtr push_messaging_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(PushProvider);
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index cbc1a644..1ea6e43 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -137,7 +137,6 @@
 #include "content/renderer/render_widget_fullscreen_pepper.h"
 #include "content/renderer/renderer_blink_platform_impl.h"
 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
-#include "content/renderer/renderer_webcolorchooser_impl.h"
 #include "content/renderer/savable_resources.h"
 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
 #include "content/renderer/service_worker/service_worker_handle_reference.h"
@@ -192,7 +191,6 @@
 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h"
 #include "third_party/WebKit/public/web/WebAutofillClient.h"
-#include "third_party/WebKit/public/web/WebColorSuggestion.h"
 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
 #include "third_party/WebKit/public/web/WebContextFeatures.h"
 #include "third_party/WebKit/public/web/WebDocument.h"
@@ -2758,13 +2756,6 @@
     observer.DidMeaningfulLayout(layout_type);
 }
 
-void RenderFrameImpl::DidCommitCompositorFrame() {
-  if (BrowserPluginManager::Get())
-    BrowserPluginManager::Get()->DidCommitCompositorFrame(GetRoutingID());
-  for (auto& observer : observers_)
-    observer.DidCommitCompositorFrame();
-}
-
 void RenderFrameImpl::DidCommitAndDrawCompositorFrame() {
 #if BUILDFLAG(ENABLE_PLUGINS)
   // Notify all instances that we painted.  The same caveats apply as for
@@ -4529,23 +4520,6 @@
   return did_execute_command;
 }
 
-blink::WebColorChooser* RenderFrameImpl::CreateColorChooser(
-    blink::WebColorChooserClient* client,
-    const blink::WebColor& initial_color,
-    const blink::WebVector<blink::WebColorSuggestion>& suggestions) {
-  RendererWebColorChooserImpl* color_chooser =
-      new RendererWebColorChooserImpl(this, client);
-  std::vector<mojom::ColorSuggestionPtr> color_suggestions;
-  color_suggestions.reserve(suggestions.size());
-  for (const auto& suggestion : suggestions) {
-    color_suggestions.emplace_back(base::in_place, suggestion.color,
-                                   suggestion.label.Utf8());
-  }
-  color_chooser->Open(static_cast<SkColor>(initial_color),
-                      std::move(color_suggestions));
-  return color_chooser;
-}
-
 void RenderFrameImpl::RunModalAlertDialog(const blink::WebString& message) {
   RunJavaScriptDialog(JAVASCRIPT_DIALOG_TYPE_ALERT, message.Utf16(),
                       base::string16(), frame_->GetDocument().Url(), nullptr);
@@ -5701,7 +5675,7 @@
         // document loader, causing the history load to be ignored in
         // NavigateInternal, and this IPC will try to cancel any cross-process
         // history load.
-        Send(new FrameHostMsg_CancelInitialHistoryLoad(routing_id_));
+        GetFrameHost()->CancelInitialHistoryLoad();
       }
     }
   }
@@ -6588,7 +6562,7 @@
                                      const std::string& encoding_name) {
   // Only update main frame's encoding_name.
   if (!frame->Parent())
-    Send(new FrameHostMsg_UpdateEncoding(routing_id_, encoding_name));
+    GetFrameHost()->UpdateEncoding(encoding_name);
 }
 
 void RenderFrameImpl::SyncSelectionIfRequired() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 1dc023e..ab19f4f7 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -277,10 +277,6 @@
   // See RenderFrameObserver::DidMeaningfulLayout declaration for details.
   void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type);
 
-  // Out-of-process child frames receive a signal from RenderWidgetCompositor
-  // when a compositor frame has committed.
-  void DidCommitCompositorFrame();
-
   // Draw commands have been issued by RenderWidgetCompositor.
   void DidCommitAndDrawCompositorFrame();
 
@@ -656,10 +652,6 @@
   void AbortClientNavigation() override;
   void DidChangeSelection(bool is_empty_selection) override;
   bool HandleCurrentKeyboardEvent() override;
-  blink::WebColorChooser* CreateColorChooser(
-      blink::WebColorChooserClient* client,
-      const blink::WebColor& initial_color,
-      const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
   void RunModalAlertDialog(const blink::WebString& message) override;
   bool RunModalConfirmDialog(const blink::WebString& message) override;
   bool RunModalPromptDialog(const blink::WebString& message,
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 86c1d0c..1e1ae2cd 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -257,9 +257,6 @@
   }
 }
 
-void RenderFrameProxy::DidCommitCompositorFrame() {
-}
-
 void RenderFrameProxy::OnScreenInfoChanged(const ScreenInfo& screen_info) {
   pending_resize_params_.screen_info = screen_info;
   WasResized();
diff --git a/content/renderer/render_frame_proxy.h b/content/renderer/render_frame_proxy.h
index 8f77e06..f811dfcd 100644
--- a/content/renderer/render_frame_proxy.h
+++ b/content/renderer/render_frame_proxy.h
@@ -121,10 +121,6 @@
   // when a compositor frame will begin.
   void WillBeginCompositorFrame();
 
-  // Out-of-process child frames receive a signal from RenderWidgetCompositor
-  // when a compositor frame has committed.
-  void DidCommitCompositorFrame();
-
   // Out-of-process child frames receive a signal from RenderWidget when the
   // ScreenInfo has changed.
   void OnScreenInfoChanged(const ScreenInfo& screen_info);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 9c74c9f..d9165ad1 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -131,7 +131,6 @@
 #include "third_party/WebKit/public/public_features.h"
 #include "third_party/WebKit/public/web/WebAXObject.h"
 #include "third_party/WebKit/public/web/WebAutofillClient.h"
-#include "third_party/WebKit/public/web/WebColorSuggestion.h"
 #include "third_party/WebKit/public/web/WebDOMEvent.h"
 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h"
 #include "third_party/WebKit/public/web/WebDateTimeChooserCompletion.h"
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 6a5a08d..6f9369b 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -45,7 +45,7 @@
 #include "content/public/common/service_names.mojom.h"
 #include "content/public/common/use_zoom_for_dsf_policy.h"
 #include "content/public/renderer/content_renderer_client.h"
-#include "content/renderer/browser_plugin/browser_plugin_manager.h"
+#include "content/renderer/browser_plugin/browser_plugin.h"
 #include "content/renderer/cursor_utils.h"
 #include "content/renderer/devtools/render_widget_screen_metrics_emulator.h"
 #include "content/renderer/drop_data_builder.h"
@@ -627,9 +627,9 @@
     for (auto& observer : render_frame_proxies_)
       observer.OnScreenInfoChanged(screen_info);
 
-    // Notify all BrowserPlugins of the updated ScreenInfo.
-    if (BrowserPluginManager::Get())
-      BrowserPluginManager::Get()->ScreenInfoChanged(screen_info);
+    // Notify all embedded BrowserPlugins of the updated ScreenInfo.
+    for (auto& observer : browser_plugins_)
+      observer.ScreenInfoChanged(screen_info);
   }
 
   AutoResizeCompositor(local_surface_id);
@@ -1016,12 +1016,7 @@
   DidInitiatePaint();
 }
 
-void RenderWidget::DidCommitCompositorFrame() {
-  for (auto& observer : render_frames_)
-    observer.DidCommitCompositorFrame();
-  for (auto& observer : render_frame_proxies_)
-    observer.DidCommitCompositorFrame();
-}
+void RenderWidget::DidCommitCompositorFrame() {}
 
 void RenderWidget::DidCompletePageScaleAnimation() {}
 
@@ -1388,9 +1383,9 @@
     for (auto& observer : render_frame_proxies_)
       observer.OnScreenInfoChanged(params.screen_info);
 
-    // Notify all BrowserPlugins of the updated ScreenInfo.
-    if (BrowserPluginManager::Get())
-      BrowserPluginManager::Get()->ScreenInfoChanged(params.screen_info);
+    // Notify all embedded BrowserPlugins of the updated ScreenInfo.
+    for (auto& observer : browser_plugins_)
+      observer.ScreenInfoChanged(params.screen_info);
   }
 
   // If a resize ack is requested and it isn't set-up, then no more resizes will
@@ -2469,6 +2464,14 @@
   render_frames_.RemoveObserver(frame);
 }
 
+void RenderWidget::RegisterBrowserPlugin(BrowserPlugin* browser_plugin) {
+  browser_plugins_.AddObserver(browser_plugin);
+}
+
+void RenderWidget::UnregisterBrowserPlugin(BrowserPlugin* browser_plugin) {
+  browser_plugins_.RemoveObserver(browser_plugin);
+}
+
 void RenderWidget::OnWaitNextFrameForTests(int routing_id) {
   QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id),
                MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 3753bcc..65073b5 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -100,6 +100,7 @@
 }
 
 namespace content {
+class BrowserPlugin;
 class CompositorDependencies;
 class ExternalPopupMenu;
 class FrameSwapMessageQueue;
@@ -231,6 +232,11 @@
   void RegisterRenderFrame(RenderFrameImpl* frame);
   void UnregisterRenderFrame(RenderFrameImpl* frame);
 
+  // BrowserPlugins embedded by this RenderWidget register themselves here.
+  // These plugins need to be notified about changes to ScreenInfo.
+  void RegisterBrowserPlugin(BrowserPlugin* browser_plugin);
+  void UnregisterBrowserPlugin(BrowserPlugin* browser_plugin);
+
   // IPC::Listener
   bool OnMessageReceived(const IPC::Message& msg) override;
 
@@ -826,6 +832,8 @@
   // visibility state for example.
   base::ObserverList<RenderFrameImpl> render_frames_;
 
+  base::ObserverList<BrowserPlugin> browser_plugins_;
+
   bool has_host_context_menu_location_;
   gfx::Point host_context_menu_location_;
 
diff --git a/content/renderer/renderer_webcolorchooser_impl.cc b/content/renderer/renderer_webcolorchooser_impl.cc
deleted file mode 100644
index c5128fa..0000000
--- a/content/renderer/renderer_webcolorchooser_impl.cc
+++ /dev/null
@@ -1,51 +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.
-
-#include "content/renderer/renderer_webcolorchooser_impl.h"
-
-#include "content/public/renderer/render_frame.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
-
-namespace content {
-
-RendererWebColorChooserImpl::RendererWebColorChooserImpl(
-    RenderFrame* render_frame,
-    blink::WebColorChooserClient* blink_client)
-    : RenderFrameObserver(render_frame),
-      blink_client_(blink_client),
-      mojo_client_binding_(this) {
-  render_frame->GetRemoteInterfaces()->GetInterface(&color_chooser_factory_);
-}
-
-RendererWebColorChooserImpl::~RendererWebColorChooserImpl() {
-}
-
-void RendererWebColorChooserImpl::SetSelectedColor(blink::WebColor color) {
-  color_chooser_->SetSelectedColor(color);
-}
-
-void RendererWebColorChooserImpl::EndChooser() {
-  color_chooser_.reset();
-}
-
-void RendererWebColorChooserImpl::Open(
-    SkColor initial_color,
-    std::vector<mojom::ColorSuggestionPtr> suggestions) {
-  content::mojom::ColorChooserClientPtr mojo_client;
-  mojo_client_binding_.Bind(mojo::MakeRequest(&mojo_client));
-  mojo_client_binding_.set_connection_error_handler(base::BindOnce(
-      [](blink::WebColorChooserClient* blink_client) {
-        blink_client->DidEndChooser();
-      },
-      base::Unretained(blink_client_)));
-  color_chooser_factory_->OpenColorChooser(
-      mojo::MakeRequest(&color_chooser_), std::move(mojo_client), initial_color,
-      std::move(suggestions));
-}
-
-void RendererWebColorChooserImpl::DidChooseColor(SkColor color) {
-  blink_client_->DidChooseColor(static_cast<blink::WebColor>(color));
-}
-
-}  // namespace content
diff --git a/content/renderer/renderer_webcolorchooser_impl.h b/content/renderer/renderer_webcolorchooser_impl.h
deleted file mode 100644
index 240c08c4..0000000
--- a/content/renderer/renderer_webcolorchooser_impl.h
+++ /dev/null
@@ -1,56 +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 CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
-#define CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
-
-#include <vector>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "content/common/color_chooser.mojom.h"
-#include "content/public/renderer/render_frame_observer.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "third_party/WebKit/public/web/WebColorChooser.h"
-#include "third_party/WebKit/public/web/WebColorChooserClient.h"
-#include "third_party/skia/include/core/SkColor.h"
-
-namespace content {
-
-class RendererWebColorChooserImpl : public blink::WebColorChooser,
-                                    public mojom::ColorChooserClient,
-                                    public RenderFrameObserver {
- public:
-  explicit RendererWebColorChooserImpl(RenderFrame* render_frame,
-                                       blink::WebColorChooserClient*);
-  ~RendererWebColorChooserImpl() override;
-
-  // blink::WebColorChooser implementation:
-  void SetSelectedColor(const blink::WebColor) override;
-  void EndChooser() override;
-
-  void Open(SkColor initial_color,
-            std::vector<mojom::ColorSuggestionPtr> suggestions);
-
- private:
-  // RenderFrameObserver implementation:
-  // Don't destroy the RendererWebColorChooserImpl when the RenderFrame goes
-  // away. RendererWebColorChooserImpl is owned by
-  // blink::ColorChooserUIController.
-  void OnDestruct() override {}
-
-  // content::mojom::ColorChooserClient
-  void DidChooseColor(SkColor color) override;
-
-  blink::WebColorChooserClient* blink_client_;
-  mojom::ColorChooserFactoryPtr color_chooser_factory_;
-  mojom::ColorChooserPtr color_chooser_;
-  mojo::Binding<mojom::ColorChooserClient> mojo_client_binding_;
-
-  DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl);
-};
-
-}  // namespace content
-
-#endif  // CONTENT_RENDERER_RENDERER_WEBCOLORCHOOSER_IMPL_H_
diff --git a/content/renderer/service_worker/service_worker_context_client_unittest.cc b/content/renderer/service_worker/service_worker_context_client_unittest.cc
index bba4a7f..655c246 100644
--- a/content/renderer/service_worker/service_worker_context_client_unittest.cc
+++ b/content/renderer/service_worker/service_worker_context_client_unittest.cc
@@ -226,8 +226,7 @@
   }
 
   void EnableServicification() {
-    feature_list_.InitWithFeatures(
-        {features::kBrowserSideNavigation, features::kNetworkService}, {});
+    feature_list_.InitWithFeatures({features::kNetworkService}, {});
     ASSERT_TRUE(ServiceWorkerUtils::IsServicificationEnabled());
   }
 
diff --git a/content/renderer/service_worker/service_worker_timeout_timer_unittest.cc b/content/renderer/service_worker/service_worker_timeout_timer_unittest.cc
index 4951f0c6..3871e79 100644
--- a/content/renderer/service_worker/service_worker_timeout_timer_unittest.cc
+++ b/content/renderer/service_worker/service_worker_timeout_timer_unittest.cc
@@ -58,8 +58,7 @@
   }
 
   void EnableServicification() {
-    feature_list_.InitWithFeatures(
-        {features::kBrowserSideNavigation, features::kNetworkService}, {});
+    feature_list_.InitWithFeatures({features::kNetworkService}, {});
     ASSERT_TRUE(ServiceWorkerUtils::IsServicificationEnabled());
   }
 
diff --git a/content/shell/browser/layout_test/layout_test_message_filter.cc b/content/shell/browser/layout_test/layout_test_message_filter.cc
index bd9146e..cfd543a 100644
--- a/content/shell/browser/layout_test/layout_test_message_filter.cc
+++ b/content/shell/browser/layout_test/layout_test_message_filter.cc
@@ -187,6 +187,10 @@
     type = PermissionType::BACKGROUND_SYNC;
   } else if (name == "accessibility-events") {
     type = PermissionType::ACCESSIBILITY_EVENTS;
+  } else if (name == "clipboard-read") {
+    type = PermissionType::CLIPBOARD_READ;
+  } else if (name == "clipboard-write") {
+    type = PermissionType::CLIPBOARD_WRITE;
   } else {
     NOTREACHED();
     type = PermissionType::NOTIFICATIONS;
diff --git a/content/shell/browser/layout_test/layout_test_push_messaging_service.cc b/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
index a15e671..84669321 100644
--- a/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
+++ b/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
@@ -41,21 +41,6 @@
 static_assert(sizeof(kAuthentication) == 12,
               "The fake authentication key must be at least 12 bytes in size.");
 
-blink::WebPushPermissionStatus ToWebPushPermissionStatus(
-    blink::mojom::PermissionStatus status) {
-  switch (status) {
-    case blink::mojom::PermissionStatus::GRANTED:
-      return blink::kWebPushPermissionStatusGranted;
-    case blink::mojom::PermissionStatus::DENIED:
-      return blink::kWebPushPermissionStatusDenied;
-    case blink::mojom::PermissionStatus::ASK:
-      return blink::kWebPushPermissionStatusPrompt;
-  }
-
-  NOTREACHED();
-  return blink::kWebPushPermissionStatusLast;
-}
-
 }  // anonymous namespace
 
 LayoutTestPushMessagingService::LayoutTestPushMessagingService()
@@ -87,8 +72,18 @@
     int64_t service_worker_registration_id,
     const PushSubscriptionOptions& options,
     const RegisterCallback& callback) {
-  if (GetPermissionStatus(requesting_origin, options.user_visible_only) ==
-      blink::kWebPushPermissionStatusGranted) {
+  blink::mojom::PermissionStatus permission_status =
+      LayoutTestContentBrowserClient::Get()
+          ->browser_context()
+          ->GetPermissionManager()
+          ->GetPermissionStatus(PermissionType::NOTIFICATIONS,
+                                requesting_origin, requesting_origin);
+
+  // The `userVisibleOnly` option is still required when subscribing.
+  if (!options.user_visible_only)
+    permission_status = blink::mojom::PermissionStatus::DENIED;
+
+  if (permission_status == blink::mojom::PermissionStatus::GRANTED) {
     std::vector<uint8_t> p256dh(
         kTestP256Key, kTestP256Key + arraysize(kTestP256Key));
     std::vector<uint8_t> auth(
@@ -118,16 +113,6 @@
   callback.Run(true /* is_valid */, p256dh, auth);
 }
 
-blink::WebPushPermissionStatus
-LayoutTestPushMessagingService::GetPermissionStatus(const GURL& origin,
-                                                    bool user_visible) {
-  return ToWebPushPermissionStatus(
-      LayoutTestContentBrowserClient::Get()
-          ->browser_context()
-          ->GetPermissionManager()
-          ->GetPermissionStatus(PermissionType::NOTIFICATIONS, origin, origin));
-}
-
 bool LayoutTestPushMessagingService::SupportNonVisibleMessages() {
   return false;
 }
diff --git a/content/shell/browser/layout_test/layout_test_push_messaging_service.h b/content/shell/browser/layout_test/layout_test_push_messaging_service.h
index 5b61b17d..55fcba4 100644
--- a/content/shell/browser/layout_test/layout_test_push_messaging_service.h
+++ b/content/shell/browser/layout_test/layout_test_push_messaging_service.h
@@ -12,7 +12,6 @@
 
 #include "base/macros.h"
 #include "content/public/browser/push_messaging_service.h"
-#include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 
 namespace content {
 
@@ -41,9 +40,6 @@
                            const std::string& sender_id,
                            const std::string& subscription_id,
                            const SubscriptionInfoCallback& callback) override;
-  blink::WebPushPermissionStatus GetPermissionStatus(const GURL& origin,
-                                                     bool user_visible)
-      override;
   bool SupportNonVisibleMessages() override;
   void Unsubscribe(mojom::PushUnregistrationReason reason,
                    const GURL& requesting_origin,
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index 392fe05f..65121298 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -489,9 +489,7 @@
   return switches::IsRunLayoutTestSwitchPresent();
 }
 
-void Shell::RendererUnresponsive(
-    WebContents* source,
-    const WebContentsUnresponsiveState& unresponsive_state) {
+void Shell::RendererUnresponsive(WebContents* source) {
   if (switches::IsRunLayoutTestSwitchPresent())
     BlinkTestController::Get()->RendererUnresponsive();
 }
diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h
index 1e160b5..92d30bb11 100644
--- a/content/shell/browser/shell.h
+++ b/content/shell/browser/shell.h
@@ -162,9 +162,7 @@
                               const base::string16& message,
                               int32_t line_no,
                               const base::string16& source_id) override;
-  void RendererUnresponsive(
-      WebContents* source,
-      const WebContentsUnresponsiveState& unresponsive_state) override;
+  void RendererUnresponsive(WebContents* source) override;
   void ActivateContents(WebContents* contents) override;
   bool ShouldAllowRunningInsecureContent(content::WebContents* web_contents,
                                          bool allowed_per_prefs,
diff --git a/content/shell/test_runner/BUILD.gn b/content/shell/test_runner/BUILD.gn
index f09442ea..e319dda 100644
--- a/content/shell/test_runner/BUILD.gn
+++ b/content/shell/test_runner/BUILD.gn
@@ -30,8 +30,6 @@
     "layout_dump.h",
     "layout_test_runtime_flags.cc",
     "layout_test_runtime_flags.h",
-    "mock_color_chooser.cc",
-    "mock_color_chooser.h",
     "mock_content_settings_client.cc",
     "mock_content_settings_client.h",
     "mock_credential_manager_client.cc",
diff --git a/content/shell/test_runner/mock_color_chooser.cc b/content/shell/test_runner/mock_color_chooser.cc
deleted file mode 100644
index 092e9db..0000000
--- a/content/shell/test_runner/mock_color_chooser.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/shell/test_runner/mock_color_chooser.h"
-
-#include "base/bind.h"
-#include "content/shell/test_runner/test_runner.h"
-#include "content/shell/test_runner/web_test_delegate.h"
-
-namespace test_runner {
-
-MockColorChooser::MockColorChooser(blink::WebColorChooserClient* client,
-                                   WebTestDelegate* delegate,
-                                   TestRunner* test_runner)
-    : client_(client),
-      delegate_(delegate),
-      test_runner_(test_runner),
-      weak_factory_(this) {
-  test_runner_->DidOpenChooser();
-}
-
-MockColorChooser::~MockColorChooser() {
-  test_runner_->DidCloseChooser();
-}
-
-void MockColorChooser::SetSelectedColor(const blink::WebColor color) {}
-
-void MockColorChooser::EndChooser() {
-  delegate_->PostDelayedTask(base::Bind(&MockColorChooser::InvokeDidEndChooser,
-                                        weak_factory_.GetWeakPtr()),
-                             0);
-}
-
-void MockColorChooser::InvokeDidEndChooser() {
-  client_->DidEndChooser();
-}
-
-}  // namespace test_runner
diff --git a/content/shell/test_runner/mock_color_chooser.h b/content/shell/test_runner/mock_color_chooser.h
deleted file mode 100644
index 72ffea4..0000000
--- a/content/shell/test_runner/mock_color_chooser.h
+++ /dev/null
@@ -1,47 +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 CONTENT_SHELL_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
-#define CONTENT_SHELL_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "third_party/WebKit/public/web/WebColorChooser.h"
-#include "third_party/WebKit/public/web/WebColorChooserClient.h"
-
-namespace test_runner {
-
-class TestRunner;
-class WebTestDelegate;
-
-class MockColorChooser : public blink::WebColorChooser {
- public:
-  // Caller has to guarantee that |client| and |delegate| are alive
-  // until |WebColorChooserClient::didEndChooser| is called.
-  // Caller has to guarantee that |test_runner| lives longer
-  // than MockColorChooser.
-  MockColorChooser(blink::WebColorChooserClient* client,
-                   WebTestDelegate* delegate,
-                   TestRunner* test_runner);
-  ~MockColorChooser() override;
-
-  // blink::WebColorChooser implementation.
-  void SetSelectedColor(const blink::WebColor color) override;
-  void EndChooser() override;
-
-  void InvokeDidEndChooser();
-
- private:
-  blink::WebColorChooserClient* client_;
-  WebTestDelegate* delegate_;
-  TestRunner* test_runner_;
-
-  base::WeakPtrFactory<MockColorChooser> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
-};
-
-}  // namespace test_runner
-
-#endif  // CONTENT_SHELL_TEST_RUNNER_MOCK_COLOR_CHOOSER_H_
diff --git a/content/shell/test_runner/test_runner.cc b/content/shell/test_runner/test_runner.cc
index db806d79..9c5b4e9 100644
--- a/content/shell/test_runner/test_runner.cc
+++ b/content/shell/test_runner/test_runner.cc
@@ -2362,15 +2362,6 @@
   mock_screen_orientation_client_->SetDisabled(true);
 }
 
-void TestRunner::DidOpenChooser() {
-  chooser_count_++;
-}
-
-void TestRunner::DidCloseChooser() {
-  chooser_count_--;
-  DCHECK_LE(0, chooser_count_);
-}
-
 void TestRunner::SetPopupBlockingEnabled(bool block_popups) {
   delegate_->SetPopupBlockingEnabled(block_popups);
 }
diff --git a/content/shell/test_runner/test_runner.h b/content/shell/test_runner/test_runner.h
index a83723f2..5dcb20b8 100644
--- a/content/shell/test_runner/test_runner.h
+++ b/content/shell/test_runner/test_runner.h
@@ -160,10 +160,6 @@
 
   midi::mojom::Result midiAccessorResult();
 
-  // Methods used by MockColorChooser:
-  void DidOpenChooser();
-  void DidCloseChooser();
-
   bool ShouldDumpConsoleMessages() const;
   bool ShouldDumpJavaScriptDialogs() const;
 
diff --git a/content/shell/test_runner/web_frame_test_client.cc b/content/shell/test_runner/web_frame_test_client.cc
index e8e79ee..14f025d 100644
--- a/content/shell/test_runner/web_frame_test_client.cc
+++ b/content/shell/test_runner/web_frame_test_client.cc
@@ -13,7 +13,6 @@
 #include "content/public/test/test_runner_support.h"
 #include "content/shell/test_runner/accessibility_controller.h"
 #include "content/shell/test_runner/event_sender.h"
-#include "content/shell/test_runner/mock_color_chooser.h"
 #include "content/shell/test_runner/mock_screen_orientation_client.h"
 #include "content/shell/test_runner/test_common.h"
 #include "content/shell/test_runner/test_interfaces.h"
@@ -180,14 +179,6 @@
 
 WebFrameTestClient::~WebFrameTestClient() {}
 
-blink::WebColorChooser* WebFrameTestClient::CreateColorChooser(
-    blink::WebColorChooserClient* client,
-    const blink::WebColor& color,
-    const blink::WebVector<blink::WebColorSuggestion>& suggestions) {
-  // This instance is deleted by WebCore::ColorInputType
-  return new MockColorChooser(client, delegate_, test_runner());
-}
-
 void WebFrameTestClient::RunModalAlertDialog(const blink::WebString& message) {
   if (!test_runner()->ShouldDumpJavaScriptDialogs())
     return;
diff --git a/content/shell/test_runner/web_frame_test_client.h b/content/shell/test_runner/web_frame_test_client.h
index f0b1eac..6b9fa42 100644
--- a/content/shell/test_runner/web_frame_test_client.h
+++ b/content/shell/test_runner/web_frame_test_client.h
@@ -33,10 +33,6 @@
   ~WebFrameTestClient() override;
 
   // WebFrameClient overrides needed by WebFrameTestProxy.
-  blink::WebColorChooser* CreateColorChooser(
-      blink::WebColorChooserClient* client,
-      const blink::WebColor& initial_color,
-      const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
   void RunModalAlertDialog(const blink::WebString& message) override;
   bool RunModalConfirmDialog(const blink::WebString& message) override;
   bool RunModalPromptDialog(const blink::WebString& message,
diff --git a/content/shell/test_runner/web_frame_test_proxy.h b/content/shell/test_runner/web_frame_test_proxy.h
index 4a82dd8a..f5d5ba1 100644
--- a/content/shell/test_runner/web_frame_test_proxy.h
+++ b/content/shell/test_runner/web_frame_test_proxy.h
@@ -168,14 +168,6 @@
     Base::DidChangeSelection(is_selection_empty);
   }
 
-  blink::WebColorChooser* CreateColorChooser(
-      blink::WebColorChooserClient* client,
-      const blink::WebColor& initial_color,
-      const blink::WebVector<blink::WebColorSuggestion>& suggestions) override {
-    return test_client()->CreateColorChooser(client, initial_color,
-                                             suggestions);
-  }
-
   blink::WebEffectiveConnectionType GetEffectiveConnectionType() override {
     if (test_client()->GetEffectiveConnectionType() !=
         blink::WebEffectiveConnectionType::kTypeUnknown) {
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index b341260..6eef3245 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -436,8 +436,8 @@
     ]
 
     sources += [
-      "../browser/compositor/test/no_transport_image_transport_factory.cc",
-      "../browser/compositor/test/no_transport_image_transport_factory.h",
+      "../browser/compositor/test/test_image_transport_factory.cc",
+      "../browser/compositor/test/test_image_transport_factory.h",
     ]
   }
 
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py
index 717c682..6c2b1a70 100755
--- a/content/test/gpu/generate_buildbot_json.py
+++ b/content/test/gpu/generate_buildbot_json.py
@@ -1680,6 +1680,7 @@
       {
         'names': [
           'Win10 Release (Intel HD 630)',
+          'Win10 Release Swarmed (Intel HD 630)',
         ],
       },
     ],
diff --git a/content/test/gpu/gpu_tests/pixel_expectations.py b/content/test/gpu/gpu_tests/pixel_expectations.py
index 2af9b843..068d38e 100644
--- a/content/test/gpu/gpu_tests/pixel_expectations.py
+++ b/content/test/gpu/gpu_tests/pixel_expectations.py
@@ -96,3 +96,6 @@
     # Failing on NVIDIA Shield TV; not sure why yet.
     self.Fail('Pixel_WebGL_PremultipliedAlpha_False',
               ['android', 'nvidia'], bug=791733)
+
+    # Flaky on Win7
+    self.Flaky('Pixel_2DCanvasWebGL', ['win'], bug=796289)
diff --git a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
index 037797b2..48c800a97 100644
--- a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
@@ -172,19 +172,32 @@
         ['win', 'nvidia', 'opengl'], bug=709874)
     self.Flaky('conformance2/rendering/attrib-type-match.html',
         ['win', 'nvidia', 'opengl'], bug=782254)
+    self.Flaky('conformance2/textures/canvas_sub_rectangle/' +
+        'tex-2d-r11f_g11f_b10f-rgb-float.html',
+        ['win', 'nvidia', 'opengl'], bug=795030)
     self.Fail('conformance2/textures/canvas_sub_rectangle/' +
-        'tex-2d-rg16f-rg-half_float.html',
-        ['win', 'nvidia', 'opengl'], bug=784849)
+        'tex-2d-r16f-red-float.html',
+        ['win', 'nvidia', 'opengl'], bug=786716)
     self.Fail('conformance2/textures/canvas_sub_rectangle/' +
         'tex-2d-r8-red-unsigned_byte.html',
         ['win', 'nvidia', 'opengl'], bug=784849)
     self.Fail('conformance2/textures/canvas_sub_rectangle/' +
-        'tex-2d-r16f-red-float.html',
-        ['win', 'nvidia', 'opengl'], bug=786716)
+        'tex-2d-rg16f-rg-half_float.html',
+        ['win', 'nvidia', 'opengl'], bug=784849)
+    self.Flaky('conformance2/textures/canvas_sub_rectangle/' +
+        'tex-2d-rg32f-rg-float.html',
+        ['win', 'nvidia', 'opengl'], bug=795030)
+    self.Flaky('conformance2/textures/webgl_canvas/' +
+        'tex-3d-rgba32f-rgba-float.html',
+        ['win', 'nvidia', 'opengl'], bug=795030)
     self.Fail('conformance2/rendering/instanced-rendering-bug.html',
         ['win', 'nvidia', 'opengl'], bug=791289)
     self.Fail('conformance2/rendering/canvas-resizing-with-pbo-bound.html',
         ['win', 'nvidia', 'opengl'], bug=794613)
+    self.Flaky('deqp/functional/gles3/shadercommonfunction.html',
+        ['win', 'nvidia', 'opengl'], bug=795030)
+    self.Flaky('deqp/functional/gles3/shaderpackingfunction.html',
+        ['win', 'nvidia', 'opengl'], bug=795030)
 
     # Win / AMD
     self.Fail('conformance2/rendering/blitframebuffer-stencil-only.html',
@@ -323,11 +336,6 @@
     self.Fail('conformance/renderbuffers/framebuffer-state-restoration.html',
         ['passthrough', 'opengl', 'intel'], bug=602688)
 
-    # Passthrough command decoder / Win / OpenGL / NVIDIA
-    self.Fail('conformance2/textures/canvas_sub_rectangle/' +
-        'tex-2d-rg32f-rg-float.html',
-        ['win', 'passthrough', 'opengl', 'nvidia'], bug=794340)
-
     # Passthrough command decoder / Linux / OpenGL / NVIDIA
     self.Fail('conformance/textures/image_bitmap_from_video/' +
         'tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html',
diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc
index 762c7ec..ec055d31 100644
--- a/content/test/test_render_frame.cc
+++ b/content/test/test_render_frame.cc
@@ -95,6 +95,10 @@
       blink::WebSandboxFlags sandbox_flags,
       const blink::ParsedFeaturePolicy& parsed_header) override {}
 
+  void CancelInitialHistoryLoad() override {}
+
+  void UpdateEncoding(const std::string& encoding_name) override {}
+
  private:
   std::unique_ptr<FrameHostMsg_DidCommitProvisionalLoad_Params>
       last_commit_params_;
diff --git a/device/gamepad/gamepad_service_unittest.cc b/device/gamepad/gamepad_service_unittest.cc
index 7325f6c..b8d9b9d 100644
--- a/device/gamepad/gamepad_service_unittest.cc
+++ b/device/gamepad/gamepad_service_unittest.cc
@@ -236,7 +236,8 @@
   EXPECT_EQ(0, GetDisconnectedCounter());
 }
 
-TEST_F(GamepadServiceTest, SecondConsumerGestureTest) {
+// Flaky, see https://crbug.com/795170
+TEST_F(GamepadServiceTest, DISABLED_SecondConsumerGestureTest) {
   WaitForData();
   EXPECT_EQ(0, GetConnectedCounter());
   EXPECT_EQ(0, GetDisconnectedCounter());
diff --git a/device/usb/BUILD.gn b/device/usb/BUILD.gn
index 8f580cfa..44ab15169 100644
--- a/device/usb/BUILD.gn
+++ b/device/usb/BUILD.gn
@@ -97,7 +97,15 @@
   }
 
   if (is_win) {
-    libs = [ "setupapi.lib" ]
+    sources += [
+      "scoped_winusb_handle.cc",
+      "scoped_winusb_handle.h",
+    ]
+
+    libs = [
+      "setupapi.lib",
+      "winusb.lib",
+    ]
   }
 
   if (is_android || is_chromeos || is_linux) {
diff --git a/device/usb/scoped_winusb_handle.cc b/device/usb/scoped_winusb_handle.cc
new file mode 100644
index 0000000..f574cb3
--- /dev/null
+++ b/device/usb/scoped_winusb_handle.cc
@@ -0,0 +1,16 @@
+// 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.
+
+#include "device/usb/scoped_winusb_handle.h"
+
+#include <windows.h>
+#include <winusb.h>
+
+namespace device {
+
+bool WinUsbHandleTraits::CloseHandle(Handle handle) {
+  return WinUsb_Free(handle) == TRUE;
+}
+
+}  // namespace device
diff --git a/device/usb/scoped_winusb_handle.h b/device/usb/scoped_winusb_handle.h
new file mode 100644
index 0000000..d8ee211
--- /dev/null
+++ b/device/usb/scoped_winusb_handle.h
@@ -0,0 +1,38 @@
+// 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 DEVICE_USB_SCOPED_WINUSB_HANDLE_H_
+#define DEVICE_USB_SCOPED_WINUSB_HANDLE_H_
+
+#include "base/win/scoped_handle.h"
+
+extern "C" {
+typedef void* WINUSB_INTERFACE_HANDLE;
+}
+
+namespace device {
+
+class WinUsbHandleTraits {
+ public:
+  using Handle = WINUSB_INTERFACE_HANDLE;
+
+  static bool CloseHandle(Handle handle);
+
+  static bool IsHandleValid(Handle handle) {
+    return handle != nullptr && handle != INVALID_HANDLE_VALUE;
+  }
+
+  static Handle NullHandle() { return nullptr; }
+
+ private:
+  DISALLOW_IMPLICIT_CONSTRUCTORS(WinUsbHandleTraits);
+};
+
+using ScopedWinUsbHandle =
+    base::win::GenericScopedHandle<WinUsbHandleTraits,
+                                   base::win::DummyVerifierTraits>;
+
+}  // namespace device
+
+#endif  // DEVICE_USB_SCOPED_WINUSB_HANDLE_H_
\ No newline at end of file
diff --git a/device/usb/usb_device_handle_win.cc b/device/usb/usb_device_handle_win.cc
index 187a361..a5babcd 100644
--- a/device/usb/usb_device_handle_win.cc
+++ b/device/usb/usb_device_handle_win.cc
@@ -9,6 +9,12 @@
 #include <winioctl.h>
 #include <winusb.h>
 
+#include <algorithm>
+#include <memory>
+#include <numeric>
+#include <utility>
+#include <vector>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
@@ -28,6 +34,57 @@
 
 namespace device {
 
+namespace {
+
+uint8_t BuildRequestFlags(UsbTransferDirection direction,
+                          UsbControlTransferType request_type,
+                          UsbControlTransferRecipient recipient) {
+  uint8_t flags = 0;
+
+  switch (direction) {
+    case UsbTransferDirection::OUTBOUND:
+      flags |= BMREQUEST_HOST_TO_DEVICE << 7;
+      break;
+    case UsbTransferDirection::INBOUND:
+      flags |= BMREQUEST_DEVICE_TO_HOST << 7;
+      break;
+  }
+
+  switch (request_type) {
+    case UsbControlTransferType::STANDARD:
+      flags |= BMREQUEST_STANDARD << 5;
+      break;
+    case UsbControlTransferType::CLASS:
+      flags |= BMREQUEST_CLASS << 5;
+      break;
+    case UsbControlTransferType::VENDOR:
+      flags |= BMREQUEST_VENDOR << 5;
+      break;
+    case UsbControlTransferType::RESERVED:
+      flags |= 4 << 5;  // Not defined by usbspec.h.
+      break;
+  }
+
+  switch (recipient) {
+    case UsbControlTransferRecipient::DEVICE:
+      flags |= BMREQUEST_TO_DEVICE;
+      break;
+    case UsbControlTransferRecipient::INTERFACE:
+      flags |= BMREQUEST_TO_INTERFACE;
+      break;
+    case UsbControlTransferRecipient::ENDPOINT:
+      flags |= BMREQUEST_TO_ENDPOINT;
+      break;
+    case UsbControlTransferRecipient::OTHER:
+      flags |= BMREQUEST_TO_OTHER;
+      break;
+  }
+
+  return flags;
+}
+
+}  // namespace
+
 // Encapsulates waiting for the completion of an overlapped event.
 class UsbDeviceHandleWin::Request : public base::win::ObjectWatcher::Delegate {
  public:
@@ -83,6 +140,10 @@
   DISALLOW_COPY_AND_ASSIGN(Request);
 };
 
+UsbDeviceHandleWin::Interface::Interface() = default;
+
+UsbDeviceHandleWin::Interface::~Interface() = default;
+
 scoped_refptr<UsbDevice> UsbDeviceHandleWin::GetDevice() const {
   return device_;
 }
@@ -106,19 +167,35 @@
 void UsbDeviceHandleWin::SetConfiguration(int configuration_value,
                                           ResultCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  if (!device_) {
-    std::move(callback).Run(false);
-    return;
-  }
+  // Setting device configuration is not supported on Windows.
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
 }
 
 void UsbDeviceHandleWin::ClaimInterface(int interface_number,
                                         ResultCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
   if (!device_) {
-    std::move(callback).Run(false);
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
     return;
   }
+
+  auto interface_it = interfaces_.find(interface_number);
+  if (interface_it == interfaces_.end()) {
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
+    return;
+  }
+  Interface* interface = &interface_it->second;
+
+  if (!OpenInterfaceHandle(interface)) {
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
+    return;
+  }
+
+  interface->claimed = true;
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true));
 }
 
 void UsbDeviceHandleWin::ReleaseInterface(int interface_number,
@@ -129,6 +206,21 @@
                            base::BindOnce(std::move(callback), false));
     return;
   }
+
+  auto interface_it = interfaces_.find(interface_number);
+  if (interface_it == interfaces_.end()) {
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
+    return;
+  }
+  Interface* interface = &interface_it->second;
+
+  if (interface->handle.IsValid()) {
+    interface->handle.Close();
+    interface->alternate_setting = 0;
+  }
+
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true));
 }
 
 void UsbDeviceHandleWin::SetInterfaceAlternateSetting(int interface_number,
@@ -136,25 +228,31 @@
                                                       ResultCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
   if (!device_) {
-    std::move(callback).Run(false);
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
     return;
   }
+
+  // TODO: Unimplemented.
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
 }
 
 void UsbDeviceHandleWin::ResetDevice(ResultCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  if (!device_) {
-    std::move(callback).Run(false);
-    return;
-  }
+  // Resetting the device is not supported on Windows.
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
 }
 
 void UsbDeviceHandleWin::ClearHalt(uint8_t endpoint, ResultCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
   if (!device_) {
-    std::move(callback).Run(false);
+    task_runner_->PostTask(FROM_HERE,
+                           base::BindOnce(std::move(callback), false));
     return;
   }
+
+  // TODO: Unimplemented.
+  task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false));
 }
 
 void UsbDeviceHandleWin::ControlTransfer(
@@ -231,10 +329,31 @@
     return;
   }
 
-  // Regular control transfers unimplemented.
-  task_runner_->PostTask(
-      FROM_HERE, base::BindOnce(std::move(callback),
-                                UsbTransferStatus::TRANSFER_ERROR, nullptr, 0));
+  // Submit a normal control transfer.
+  WINUSB_INTERFACE_HANDLE handle =
+      GetInterfaceForControlTransfer(recipient, index);
+  if (handle == INVALID_HANDLE_VALUE) {
+    USB_LOG(ERROR) << "Interface handle not available for control transfer.";
+    task_runner_->PostTask(
+        FROM_HERE,
+        base::BindOnce(std::move(callback), UsbTransferStatus::TRANSFER_ERROR,
+                       nullptr, 0));
+    return;
+  }
+
+  WINUSB_SETUP_PACKET setup = {0};
+  setup.RequestType = BuildRequestFlags(direction, request_type, recipient);
+  setup.Request = request;
+  setup.Value = value;
+  setup.Index = index;
+  setup.Length = buffer->size();
+
+  Request* control_request = MakeRequest(handle);
+  control_request->MaybeStartWatching(
+      WinUsb_ControlTransfer(handle, setup, buffer->front(), buffer->size(),
+                             nullptr, control_request->overlapped()),
+      base::BindOnce(&UsbDeviceHandleWin::TransferComplete,
+                     weak_factory_.GetWeakPtr(), std::move(callback), buffer));
 }
 
 void UsbDeviceHandleWin::IsochronousTransferIn(
@@ -243,6 +362,9 @@
     unsigned int timeout,
     IsochronousTransferCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
+  // Isochronous is not yet supported on Windows.
+  ReportIsochronousError(packet_lengths, std::move(callback),
+                         UsbTransferStatus::TRANSFER_ERROR);
 }
 
 void UsbDeviceHandleWin::IsochronousTransferOut(
@@ -252,6 +374,9 @@
     unsigned int timeout,
     IsochronousTransferCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
+  // Isochronous is not yet supported on Windows.
+  ReportIsochronousError(packet_lengths, std::move(callback),
+                         UsbTransferStatus::TRANSFER_ERROR);
 }
 
 void UsbDeviceHandleWin::GenericTransfer(
@@ -260,17 +385,53 @@
     scoped_refptr<base::RefCountedBytes> buffer,
     unsigned int timeout,
     TransferCallback callback) {
-  // This one must be callable from any thread.
+  if (task_runner_->BelongsToCurrentThread()) {
+    GenericTransferInternal(direction, endpoint_number, std::move(buffer),
+                            timeout, std::move(callback), task_runner_);
+  } else {
+    task_runner_->PostTask(
+        FROM_HERE,
+        base::BindOnce(&UsbDeviceHandleWin::GenericTransferInternal, this,
+                       direction, endpoint_number, std::move(buffer), timeout,
+                       std::move(callback),
+                       base::ThreadTaskRunnerHandle::Get()));
+  }
 }
 
 const UsbInterfaceDescriptor* UsbDeviceHandleWin::FindInterfaceByEndpoint(
     uint8_t endpoint_address) {
   DCHECK(thread_checker_.CalledOnValidThread());
+  auto it = endpoints_.find(endpoint_address);
+  if (it != endpoints_.end())
+    return it->second.interface;
   return nullptr;
 }
 
 UsbDeviceHandleWin::UsbDeviceHandleWin(
     scoped_refptr<UsbDeviceWin> device,
+    bool composite,
+    scoped_refptr<base::SequencedTaskRunner> blocking_task_runner)
+    : device_(std::move(device)),
+      task_runner_(base::ThreadTaskRunnerHandle::Get()),
+      blocking_task_runner_(std::move(blocking_task_runner)),
+      weak_factory_(this) {
+  DCHECK(!composite);
+  // Windows only supports configuration 1, which therefore must be active.
+  DCHECK(device_->active_configuration());
+
+  for (const auto& interface : device_->active_configuration()->interfaces) {
+    if (interface.alternate_setting != 0)
+      continue;
+
+    Interface& interface_info = interfaces_[interface.interface_number];
+    interface_info.interface_number = interface.interface_number;
+    interface_info.first_interface = interface.first_interface;
+    RegisterEndpoints(interface);
+  }
+}
+
+UsbDeviceHandleWin::UsbDeviceHandleWin(
+    scoped_refptr<UsbDeviceWin> device,
     base::win::ScopedHandle handle,
     scoped_refptr<base::SequencedTaskRunner> blocking_task_runner)
     : device_(std::move(device)),
@@ -281,6 +442,94 @@
 
 UsbDeviceHandleWin::~UsbDeviceHandleWin() {}
 
+bool UsbDeviceHandleWin::OpenInterfaceHandle(Interface* interface) {
+  if (interface->handle.IsValid())
+    return true;
+
+  WINUSB_INTERFACE_HANDLE handle;
+  if (interface->first_interface == interface->interface_number) {
+    if (!function_handle_.IsValid()) {
+      function_handle_.Set(CreateFileA(
+          device_->device_path().c_str(), GENERIC_READ | GENERIC_WRITE,
+          FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING,
+          FILE_FLAG_OVERLAPPED, nullptr));
+      if (!function_handle_.IsValid()) {
+        USB_PLOG(ERROR) << "Failed to open " << device_->device_path();
+        return false;
+      }
+    }
+
+    if (!WinUsb_Initialize(function_handle_.Get(), &handle)) {
+      USB_PLOG(ERROR) << "Failed to initialize WinUSB handle";
+      return false;
+    }
+  } else {
+    auto first_interface_it = interfaces_.find(interface->first_interface);
+    DCHECK(first_interface_it != interfaces_.end());
+    Interface* first_interface = &first_interface_it->second;
+
+    if (!OpenInterfaceHandle(first_interface))
+      return false;
+
+    int index = interface->interface_number - interface->first_interface - 1;
+    if (!WinUsb_GetAssociatedInterface(first_interface->handle.Get(), index,
+                                       &handle)) {
+      USB_PLOG(ERROR) << "Failed to get associated interface " << index
+                      << " from interface "
+                      << static_cast<int>(interface->first_interface);
+      return false;
+    }
+  }
+
+  interface->handle.Set(handle);
+  return interface->handle.IsValid();
+}
+
+void UsbDeviceHandleWin::RegisterEndpoints(
+    const UsbInterfaceDescriptor& interface) {
+  for (const auto& endpoint : interface.endpoints) {
+    Endpoint& endpoint_info = endpoints_[endpoint.address];
+    endpoint_info.interface = &interface;
+    endpoint_info.type = endpoint.transfer_type;
+  }
+}
+
+void UsbDeviceHandleWin::UnregisterEndpoints(
+    const UsbInterfaceDescriptor& interface) {
+  for (const auto& endpoint : interface.endpoints)
+    endpoints_.erase(endpoint.address);
+}
+
+WINUSB_INTERFACE_HANDLE UsbDeviceHandleWin::GetInterfaceForControlTransfer(
+    UsbControlTransferRecipient recipient,
+    uint16_t index) {
+  if (recipient == UsbControlTransferRecipient::ENDPOINT) {
+    auto endpoint_it = endpoints_.find(index & 0xff);
+    if (endpoint_it == endpoints_.end())
+      return INVALID_HANDLE_VALUE;
+
+    // "Fall through" to the interface case.
+    recipient = UsbControlTransferRecipient::INTERFACE;
+    index = endpoint_it->second.interface->interface_number;
+  }
+
+  Interface* interface;
+  if (recipient == UsbControlTransferRecipient::INTERFACE) {
+    auto interface_it = interfaces_.find(index & 0xff);
+    if (interface_it == interfaces_.end())
+      return INVALID_HANDLE_VALUE;
+
+    interface = &interface_it->second;
+  } else {
+    // TODO: To support composite devices a particular function handle must be
+    // chosen, probably arbitrarily.
+    interface = &interfaces_[0];
+  }
+
+  OpenInterfaceHandle(interface);
+  return interface->handle.Get();
+}
+
 UsbDeviceHandleWin::Request* UsbDeviceHandleWin::MakeRequest(HANDLE handle) {
   auto request = std::make_unique<Request>(hub_handle_.Get());
   Request* request_ptr = request.get();
@@ -350,4 +599,88 @@
                           bytes_transferred);
 }
 
+void UsbDeviceHandleWin::TransferComplete(
+    TransferCallback callback,
+    scoped_refptr<base::RefCountedBytes> buffer,
+    Request* request_ptr,
+    DWORD win32_result,
+    size_t bytes_transferred) {
+  std::unique_ptr<Request> request = UnlinkRequest(request_ptr);
+
+  if (win32_result != ERROR_SUCCESS) {
+    SetLastError(win32_result);
+    USB_PLOG(ERROR) << "Transfer failed";
+    std::move(callback).Run(UsbTransferStatus::TRANSFER_ERROR, nullptr, 0);
+    return;
+  }
+
+  std::move(callback).Run(UsbTransferStatus::COMPLETED, std::move(buffer),
+                          bytes_transferred);
+}
+
+void UsbDeviceHandleWin::GenericTransferInternal(
+    UsbTransferDirection direction,
+    uint8_t endpoint_number,
+    scoped_refptr<base::RefCountedBytes> buffer,
+    unsigned int timeout,
+    TransferCallback callback,
+    scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  uint8_t endpoint_address = endpoint_number;
+  if (direction == UsbTransferDirection::INBOUND)
+    endpoint_address |= 0x80;
+
+  auto endpoint_it = endpoints_.find(endpoint_address);
+  if (endpoint_it == endpoints_.end()) {
+    callback_task_runner->PostTask(
+        FROM_HERE,
+        base::BindOnce(std::move(callback), UsbTransferStatus::TRANSFER_ERROR,
+                       nullptr, 0));
+    return;
+  }
+
+  auto interface_it =
+      interfaces_.find(endpoint_it->second.interface->interface_number);
+  DCHECK(interface_it != interfaces_.end());
+  Interface* interface = &interface_it->second;
+  if (!interface->claimed) {
+    callback_task_runner->PostTask(
+        FROM_HERE,
+        base::BindOnce(std::move(callback), UsbTransferStatus::TRANSFER_ERROR,
+                       nullptr, 0));
+    return;
+  }
+
+  DCHECK(interface->handle.IsValid());
+  Request* request = MakeRequest(interface->handle.Get());
+  BOOL result;
+  if (direction == UsbTransferDirection::INBOUND) {
+    result = WinUsb_ReadPipe(interface->handle.Get(), endpoint_address,
+                             buffer->front(), buffer->size(), nullptr,
+                             request->overlapped());
+  } else {
+    result = WinUsb_WritePipe(interface->handle.Get(), endpoint_address,
+                              buffer->front(), buffer->size(), nullptr,
+                              request->overlapped());
+  }
+  request->MaybeStartWatching(
+      result, base::BindOnce(&UsbDeviceHandleWin::TransferComplete,
+                             weak_factory_.GetWeakPtr(), std::move(callback),
+                             std::move(buffer)));
+}
+
+void UsbDeviceHandleWin::ReportIsochronousError(
+    const std::vector<uint32_t>& packet_lengths,
+    IsochronousTransferCallback callback,
+    UsbTransferStatus status) {
+  std::vector<IsochronousPacket> packets(packet_lengths.size());
+  for (size_t i = 0; i < packet_lengths.size(); ++i) {
+    packets[i].length = packet_lengths[i];
+    packets[i].transferred_length = 0;
+    packets[i].status = status;
+  }
+  task_runner_->PostTask(FROM_HERE,
+                         base::BindOnce(std::move(callback), nullptr, packets));
+}
+
 }  // namespace device
diff --git a/device/usb/usb_device_handle_win.h b/device/usb/usb_device_handle_win.h
index 78340b67e..75ccbd0 100644
--- a/device/usb/usb_device_handle_win.h
+++ b/device/usb/usb_device_handle_win.h
@@ -5,7 +5,7 @@
 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_
 #define DEVICE_USB_USB_DEVICE_HANDLE_WIN_H_
 
-#include <unordered_map>
+#include <map>
 #include <vector>
 
 #include "base/callback.h"
@@ -14,6 +14,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/win/scoped_handle.h"
+#include "device/usb/scoped_winusb_handle.h"
 #include "device/usb/usb_device_handle.h"
 
 namespace base {
@@ -73,6 +74,12 @@
  protected:
   friend class UsbDeviceWin;
 
+  // Constructor used to build a connection to the device.
+  UsbDeviceHandleWin(
+      scoped_refptr<UsbDeviceWin> device,
+      bool composite,
+      scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
+
   // Constructor used to build a connection to the device's parent hub.
   UsbDeviceHandleWin(
       scoped_refptr<UsbDeviceWin> device,
@@ -84,6 +91,36 @@
  private:
   class Request;
 
+  struct Interface {
+    Interface();
+    ~Interface();
+
+    uint8_t interface_number;
+    uint8_t first_interface;
+    ScopedWinUsbHandle handle;
+    bool claimed = false;
+    uint8_t alternate_setting = 0;
+
+    DISALLOW_COPY_AND_ASSIGN(Interface);
+  };
+
+  struct Endpoint {
+    const UsbInterfaceDescriptor* interface;
+    UsbTransferType type;
+  };
+
+  bool OpenInterfaceHandle(Interface* interface);
+  void RegisterEndpoints(const UsbInterfaceDescriptor& interface);
+  void UnregisterEndpoints(const UsbInterfaceDescriptor& interface);
+  WINUSB_INTERFACE_HANDLE GetInterfaceForControlTransfer(
+      UsbControlTransferRecipient recipient,
+      uint16_t index);
+  void SetInterfaceAlternateSettingBlocking(uint8_t interface_number,
+                                            uint8_t alternate_setting,
+                                            const ResultCallback& callback);
+  void SetInterfaceAlternateSettingComplete(uint8_t interface_number,
+                                            uint8_t alternate_setting,
+                                            const ResultCallback& callback);
   Request* MakeRequest(HANDLE handle);
   std::unique_ptr<Request> UnlinkRequest(Request* request);
   void GotNodeConnectionInformation(TransferCallback callback,
@@ -99,15 +136,36 @@
       Request* request_ptr,
       DWORD win32_result,
       size_t bytes_transferred);
+  void TransferComplete(TransferCallback callback,
+                        scoped_refptr<base::RefCountedBytes> buffer,
+                        Request* request_ptr,
+                        DWORD win32_result,
+                        size_t bytes_transferred);
+  void GenericTransferInternal(
+      UsbTransferDirection direction,
+      uint8_t endpoint_number,
+      scoped_refptr<base::RefCountedBytes> buffer,
+      unsigned int timeout,
+      TransferCallback callback,
+      scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner);
+  void ReportIsochronousError(const std::vector<uint32_t>& packet_lengths,
+                              IsochronousTransferCallback callback,
+                              UsbTransferStatus status);
 
   base::ThreadChecker thread_checker_;
 
   scoped_refptr<UsbDeviceWin> device_;
 
-  // |hub_handle_| must outlive |requests_| because individual Request objects
-  // hold on to the handle for the purpose of calling GetOverlappedResult().
+  // |hub_handle_| or all the handles for claimed interfaces in |interfaces_|
+  // must outlive their associated |requests_| because individual Request
+  // objects hold on to the raw handles for the purpose of calling
+  // GetOverlappedResult().
   base::win::ScopedHandle hub_handle_;
-  std::unordered_map<Request*, std::unique_ptr<Request>> requests_;
+  base::win::ScopedHandle function_handle_;
+
+  std::map<uint8_t, Interface> interfaces_;
+  std::map<uint8_t, Endpoint> endpoints_;
+  std::map<Request*, std::unique_ptr<Request>> requests_;
 
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
diff --git a/device/usb/usb_device_win.cc b/device/usb/usb_device_win.cc
index 3752f31..0d86f9c 100644
--- a/device/usb/usb_device_win.cc
+++ b/device/usb/usb_device_win.cc
@@ -8,12 +8,18 @@
 #include "base/memory/ptr_util.h"
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
+#include "base/strings/string_util.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "components/device_event_log/device_event_log.h"
 #include "device/usb/usb_device_handle_win.h"
+#include "device/usb/webusb_descriptors.h"
 
 namespace device {
 
+namespace {
+const uint16_t kUsbVersion2_1 = 0x0210;
+}  // namespace
+
 UsbDeviceWin::UsbDeviceWin(
     const std::string& device_path,
     const std::string& hub_path,
@@ -31,8 +37,16 @@
 
 void UsbDeviceWin::Open(OpenCallback callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
+
+  scoped_refptr<UsbDeviceHandle> device_handle;
+  if (base::EqualsCaseInsensitiveASCII(driver_name_, "winusb"))
+    device_handle = new UsbDeviceHandleWin(this, false, blocking_task_runner_);
+  // TODO: Support composite devices.
+  // else if (base::EqualsCaseInsensitiveASCII(driver_name_, "usbccgp"))
+  //  device_handle = new UsbDeviceHandleWin(this, true, blocking_task_runner_);
+
   task_runner_->PostTask(FROM_HERE,
-                         base::BindOnce(std::move(callback), nullptr));
+                         base::BindOnce(std::move(callback), device_handle));
 }
 
 void UsbDeviceWin::ReadDescriptors(base::OnceCallback<void(bool)> callback) {
@@ -69,6 +83,9 @@
 
   descriptor_ = *descriptor;
 
+  // WinUSB only supports the configuration 1.
+  ActiveConfigurationChanged(1);
+
   auto string_map = std::make_unique<std::map<uint8_t, base::string16>>();
   if (descriptor_.i_manufacturer)
     (*string_map)[descriptor_.i_manufacturer] = base::string16();
@@ -97,6 +114,37 @@
   if (descriptor_.i_serial_number)
     serial_number_ = (*string_map)[descriptor_.i_serial_number];
 
+  if (usb_version() >= kUsbVersion2_1) {
+    Open(base::BindOnce(&UsbDeviceWin::OnOpenedToReadWebUsbDescriptors, this,
+                        std::move(callback)));
+  } else {
+    std::move(callback).Run(true);
+  }
+}
+
+void UsbDeviceWin::OnOpenedToReadWebUsbDescriptors(
+    base::OnceCallback<void(bool)> callback,
+    scoped_refptr<UsbDeviceHandle> device_handle) {
+  if (!device_handle) {
+    USB_LOG(ERROR) << "Failed to open device to read WebUSB descriptors.";
+    // Failure to read WebUSB descriptors is not fatal.
+    std::move(callback).Run(true);
+    return;
+  }
+
+  ReadWebUsbDescriptors(
+      device_handle,
+      base::BindRepeating(&UsbDeviceWin::OnReadWebUsbDescriptors, this,
+                          base::Passed(&callback), device_handle));
+}
+
+void UsbDeviceWin::OnReadWebUsbDescriptors(
+    base::OnceCallback<void(bool)> callback,
+    scoped_refptr<UsbDeviceHandle> device_handle,
+    const GURL& landing_page) {
+  webusb_landing_page_ = landing_page;
+
+  device_handle->Close();
   std::move(callback).Run(true);
 }
 
diff --git a/device/usb/usb_device_win.h b/device/usb/usb_device_win.h
index 1bfc1282..597166f 100644
--- a/device/usb/usb_device_win.h
+++ b/device/usb/usb_device_win.h
@@ -46,7 +46,6 @@
   void ReadDescriptors(base::OnceCallback<void(bool)> callback);
 
  private:
-  void OpenOnBlockingThread(OpenCallback callback);
   void OnReadDescriptors(base::OnceCallback<void(bool)> callback,
                          scoped_refptr<UsbDeviceHandle> device_handle,
                          std::unique_ptr<UsbDeviceDescriptor> descriptor);
@@ -54,6 +53,12 @@
       base::OnceCallback<void(bool)> callback,
       scoped_refptr<UsbDeviceHandle> device_handle,
       std::unique_ptr<std::map<uint8_t, base::string16>> string_map);
+  void OnOpenedToReadWebUsbDescriptors(
+      base::OnceCallback<void(bool)> callback,
+      scoped_refptr<UsbDeviceHandle> device_handle);
+  void OnReadWebUsbDescriptors(base::OnceCallback<void(bool)> callback,
+                               scoped_refptr<UsbDeviceHandle> device_handle,
+                               const GURL& landing_page);
 
  private:
   base::ThreadChecker thread_checker_;
diff --git a/docs/README.md b/docs/README.md
index dc5b5826..3f09e6cc 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -255,6 +255,9 @@
     strings using Chrome for iOS.
 *   [Running iOS test suites locally](ios/testing.md)
 
+### Misc Chrome-OS-Specific Docs
+*   [Chrome Logging on Chrome OS](chrome_os_logging.md)
+
 ### Media
 *   [Audio Focus Handling](media/audio_focus.md) - How multiple MediaSession
     audio streams interact
@@ -310,7 +313,7 @@
     directories are determined on all platforms.
 
 ### Probably Obsolete
-*   [Old ChromeOS build instructions](old_chromeos_build_instructions.md)
+*   [Old Chrome OS build instructions](old_chromeos_build_instructions.md)
 *   [TPM Quick Reference](tpm_quick_ref.md) - Trusted Platform Module notes.
 *   [System Hardening Features](system_hardening_features.md) - A list of
     current and planned Chrome OS security features.
diff --git a/docs/chrome_os_logging.md b/docs/chrome_os_logging.md
new file mode 100644
index 0000000..b04d593c0
--- /dev/null
+++ b/docs/chrome_os_logging.md
@@ -0,0 +1,40 @@
+# Chrome Logging on Chrome OS
+
+## Locations
+
+Messages written via the logging macros in [base/logging.h] end up in different
+locations depending on Chrome's state:
+
+* `/var/log/ui/ui.LATEST` contains data written to stdout and stderr by Chrome
+  (and technically also [session_manager]). This generally comprises messages
+  that are written very early in Chrome's startup process, before logging has
+  been initialized.
+* `/var/log/chrome/chrome` contains messages that are written before a user has
+  logged in.
+* `/home/chronos/user/log/chrome` contains messages that are written while a
+  user is logged in. Note that this path is within the user's encrypted home
+  directory and is only accessible while the user is logged in.
+
+All of the above files are actually symlinks. Older log files can be found
+alongside them in the same directories.
+
+Also notable is `/var/log/messages`. This file contains general syslog messages,
+but it also includes messages written by `session_manager` that may be useful in
+determining when or why Chrome started or stopped.
+
+## Severity
+
+By default, only messages logged at severity `WARNING` or higher are written to
+disk. More concretely, `LOG(INFO)` messages are discarded.
+
+## Verbose Logging
+
+When actively debugging issues, Chrome's `--vmodule` flag is sometimes used to
+temporarily log messages at lower severities for particular modules. See the
+[Passing Chrome flags from session_manager] document for more details, and
+specifically the `/etc/chrome_dev.conf` mechanism that can be used to
+change flags on development devices.
+
+[base/logging.h]: ../base/logging.h
+[session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/
+[Passing Chrome flags from session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/docs/flags.md
diff --git a/docs/testing/layout_tests.md b/docs/testing/layout_tests.md
index 4f0eec4..97e19e8 100644
--- a/docs/testing/layout_tests.md
+++ b/docs/testing/layout_tests.md
@@ -155,7 +155,6 @@
 | `--no-pixel-tests`          | Disable the pixel-to-pixel PNG comparisons and image checksums for tests that don't call `testRunner.dumpAsText()` |
 | `--reset-results`           |	Overwrite the current baselines (`-expected.{png|txt|wav}` files) with actual results, or create new baselines if there are no existing baselines. |
 | `--renderer-startup-dialog` | Bring up a modal dialog before running the test, useful for attaching a debugger. |
-| `--fully-parallel`          | Run tests in parallel using as many child processes as the system has cores. |
 | `--driver-logging`          | Print C++ logs (LOG(WARNING), etc).  |
 
 ## Success and Failure
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index a8d3d8b..616e67d 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -869,7 +869,7 @@
 content::ColorChooser* AppWindow::OpenColorChooser(
     WebContents* web_contents,
     SkColor initial_color,
-    const std::vector<content::mojom::ColorSuggestionPtr>& suggestions) {
+    const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
   return app_delegate_->ShowColorChooser(web_contents, initial_color);
 }
 
diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h
index f554ec21f..bd48cf06 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -399,7 +399,7 @@
   content::ColorChooser* OpenColorChooser(
       content::WebContents* web_contents,
       SkColor color,
-      const std::vector<content::mojom::ColorSuggestionPtr>& suggestions)
+      const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions)
       override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const content::FileChooserParams& params) override;
diff --git a/extensions/browser/content_hash_fetcher.cc b/extensions/browser/content_hash_fetcher.cc
index 15369e9..c6f1a44 100644
--- a/extensions/browser/content_hash_fetcher.cc
+++ b/extensions/browser/content_hash_fetcher.cc
@@ -477,7 +477,7 @@
 void ContentHashFetcher::DoFetch(const Extension* extension, bool force) {
   DCHECK(extension);
 
-  IdAndVersion key(extension->id(), extension->version()->GetString());
+  IdAndVersion key(extension->id(), extension->version().GetString());
   JobMap::iterator found = jobs_.find(key);
   if (found != jobs_.end()) {
     if (!force || found->second->force()) {
@@ -495,9 +495,8 @@
   // hammering the server when we aren't successful in getting them.
   // crbug.com/373397
 
-  DCHECK(extension->version());
   GURL url =
-      delegate_->GetSignatureFetchUrl(extension->id(), *extension->version());
+      delegate_->GetSignatureFetchUrl(extension->id(), extension->version());
   ContentHashFetcherJob* job =
       new ContentHashFetcherJob(context_getter_, delegate_->GetPublicKey(),
                                 extension->id(), extension->path(), url, force,
@@ -514,7 +513,7 @@
 
 void ContentHashFetcher::ExtensionUnloaded(const Extension* extension) {
   CHECK(extension);
-  IdAndVersion key(extension->id(), extension->version()->GetString());
+  IdAndVersion key(extension->id(), extension->version().GetString());
   JobMap::iterator found = jobs_.find(key);
   if (found != jobs_.end()) {
     found->second->Cancel();
diff --git a/extensions/browser/content_hash_fetcher_unittest.cc b/extensions/browser/content_hash_fetcher_unittest.cc
index edbc0a60..5b30334 100644
--- a/extensions/browser/content_hash_fetcher_unittest.cc
+++ b/extensions/browser/content_hash_fetcher_unittest.cc
@@ -203,7 +203,7 @@
   MockDelegate delegate;
   ContentHashFetcherWaiter waiter;
   GURL fetch_url =
-      delegate.GetSignatureFetchUrl(extension->id(), *extension->version());
+      delegate.GetSignatureFetchUrl(extension->id(), extension->version());
 
   RegisterInterception(fetch_url,
                        test_dir_base.AppendASCII("verified_contents.json"));
@@ -241,7 +241,7 @@
   MockDelegate delegate;
   ContentHashFetcherWaiter waiter;
   GURL fetch_url =
-      delegate.GetSignatureFetchUrl(extension->id(), *extension->version());
+      delegate.GetSignatureFetchUrl(extension->id(), extension->version());
 
   RegisterInterception(fetch_url,
                        test_dir_base.AppendASCII("verified_contents.json"));
diff --git a/extensions/browser/content_verifier.cc b/extensions/browser/content_verifier.cc
index 760b9d1..cdba07cb 100644
--- a/extensions/browser/content_verifier.cc
+++ b/extensions/browser/content_verifier.cc
@@ -180,9 +180,8 @@
     }
 
     std::unique_ptr<ContentVerifierIOData::ExtensionData> data(
-        new ContentVerifierIOData::ExtensionData(
-            std::move(image_paths),
-            extension->version() ? *extension->version() : base::Version()));
+        new ContentVerifierIOData::ExtensionData(std::move(image_paths),
+                                                 extension->version()));
     content::BrowserThread::PostTask(content::BrowserThread::IO,
                                      FROM_HERE,
                                      base::Bind(&ContentVerifierIOData::AddData,
diff --git a/extensions/browser/content_verify_job_unittest.cc b/extensions/browser/content_verify_job_unittest.cc
index f606bab2..df4458a 100644
--- a/extensions/browser/content_verify_job_unittest.cc
+++ b/extensions/browser/content_verify_job_unittest.cc
@@ -27,7 +27,7 @@
     const Extension& extension,
     const base::FilePath& extension_resource_path) {
   return base::MakeRefCounted<ContentHashReader>(
-      extension.id(), *extension.version(), extension.path(),
+      extension.id(), extension.version(), extension.path(),
       extension_resource_path,
       ContentVerifierKey(kWebstoreSignaturesPublicKey,
                          kWebstoreSignaturesPublicKeySize));
diff --git a/extensions/browser/extension_registrar.cc b/extensions/browser/extension_registrar.cc
index a8c211a..5339096 100644
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -229,16 +229,6 @@
   registry_->AddTerminated(extension);
   registry_->RemoveEnabled(extension_id);
   DeactivateExtension(extension.get(), UnloadedExtensionReason::TERMINATE);
-
-  // TODO(michaelpg): It's unclear why this notification is sent now, because
-  // this extension isn't being "removed". The notification isn't needed when an
-  // extension is disabled, for example. Furthermore, it will be sent again if
-  // this extension is disabled, then (actually) removed.
-  // See crbug.com/708230.
-  content::NotificationService::current()->Notify(
-      extensions::NOTIFICATION_EXTENSION_REMOVED,
-      content::Source<content::BrowserContext>(browser_context_),
-      content::Details<const Extension>(extension.get()));
 }
 
 void ExtensionRegistrar::UntrackTerminatedExtension(
diff --git a/extensions/browser/extension_registrar_unittest.cc b/extensions/browser/extension_registrar_unittest.cc
index 83ba8a9..6d38cbc9 100644
--- a/extensions/browser/extension_registrar_unittest.cc
+++ b/extensions/browser/extension_registrar_unittest.cc
@@ -281,12 +281,6 @@
     registrar_->TerminateExtension(extension_->id());
     ExpectInSet(ExtensionRegistry::TERMINATED);
     EXPECT_FALSE(IsExtensionReady());
-
-    // TODO(michaelpg): This notification may not be necessary, but we need to
-    // clear the notification tracker here. See crbug.com/708230.
-    EXPECT_TRUE(notification_tracker_.Check1AndReset(
-        extensions::NOTIFICATION_EXTENSION_REMOVED));
-
     VerifyMock();
   }
 
diff --git a/extensions/browser/extension_registry.cc b/extensions/browser/extension_registry.cc
index 4b0eed78e..a7f9e0da 100644
--- a/extensions/browser/extension_registry.cc
+++ b/extensions/browser/extension_registry.cc
@@ -46,7 +46,7 @@
                      ExtensionRegistry::BLACKLISTED |
                      ExtensionRegistry::BLOCKED;
   const Extension* registry_extension = GetExtensionById(id, include_mask);
-  return registry_extension ? *registry_extension->version() : base::Version();
+  return registry_extension ? registry_extension->version() : base::Version();
 }
 
 void ExtensionRegistry::AddObserver(ExtensionRegistryObserver* observer) {
diff --git a/extensions/browser/extension_system.h b/extensions/browser/extension_system.h
index 8ee7df7..4b087fd 100644
--- a/extensions/browser/extension_system.h
+++ b/extensions/browser/extension_system.h
@@ -57,8 +57,12 @@
 
   // Initializes extensions machinery.
   // Component extensions are always enabled, external and user extensions are
-  // controlled by |extensions_enabled|.
+  // controlled (for both incognito and non-incognito profiles) by the
+  // |extensions_enabled| flag passed to non-incognito initialization.
+  // These calls should occur after the profile IO data is initialized,
+  // as extensions initialization depends on that.
   virtual void InitForRegularProfile(bool extensions_enabled) = 0;
+  virtual void InitForIncognitoProfile() = 0;
 
   // The ExtensionService is created at startup. ExtensionService is only
   // defined in Chrome.
diff --git a/extensions/browser/extension_web_contents_observer.cc b/extensions/browser/extension_web_contents_observer.cc
index d8cedbce..3f0310d 100644
--- a/extensions/browser/extension_web_contents_observer.cc
+++ b/extensions/browser/extension_web_contents_observer.cc
@@ -150,7 +150,7 @@
   if (pm->IsRenderFrameHostRegistered(render_frame_host)) {
     if (!frame_extension)
       pm->UnregisterRenderFrameHost(render_frame_host);
-  } else if (frame_extension) {
+  } else if (frame_extension && render_frame_host->IsRenderFrameLive()) {
     pm->RegisterRenderFrameHost(web_contents(), render_frame_host,
                                 frame_extension);
   }
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 82d3d5e..f159279 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -683,9 +683,7 @@
       webview::kEventResponsive, std::move(args)));
 }
 
-void WebViewGuest::RendererUnresponsive(
-    WebContents* source,
-    const content::WebContentsUnresponsiveState& unresponsive_state) {
+void WebViewGuest::RendererUnresponsive(WebContents* source) {
   auto args = std::make_unique<base::DictionaryValue>();
   args->SetInteger(webview::kProcessId,
                    web_contents()->GetMainFrame()->GetProcess()->GetID());
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index 08125f3..7b74fade4 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -212,9 +212,7 @@
   bool PreHandleGestureEvent(content::WebContents* source,
                              const blink::WebGestureEvent& event) final;
   void RendererResponsive(content::WebContents* source) final;
-  void RendererUnresponsive(
-      content::WebContents* source,
-      const content::WebContentsUnresponsiveState& unresponsive_state) final;
+  void RendererUnresponsive(content::WebContents* source) final;
   void RequestMediaAccessPermission(
       content::WebContents* source,
       const content::MediaStreamRequest& request,
diff --git a/extensions/browser/mock_extension_system.cc b/extensions/browser/mock_extension_system.cc
index 3feaad3..7912ebf 100644
--- a/extensions/browser/mock_extension_system.cc
+++ b/extensions/browser/mock_extension_system.cc
@@ -16,8 +16,9 @@
 MockExtensionSystem::~MockExtensionSystem() {
 }
 
-void MockExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
-}
+void MockExtensionSystem::InitForRegularProfile(bool extensions_enabled) {}
+
+void MockExtensionSystem::InitForIncognitoProfile() {}
 
 ExtensionService* MockExtensionSystem::extension_service() {
   return nullptr;
diff --git a/extensions/browser/mock_extension_system.h b/extensions/browser/mock_extension_system.h
index 3c583d21..e4ca560 100644
--- a/extensions/browser/mock_extension_system.h
+++ b/extensions/browser/mock_extension_system.h
@@ -30,6 +30,7 @@
 
   // ExtensionSystem overrides:
   void InitForRegularProfile(bool extensions_enabled) override;
+  void InitForIncognitoProfile() override;
   ExtensionService* extension_service() override;
   RuntimeData* runtime_data() override;
   ManagementPolicy* management_policy() override;
diff --git a/extensions/browser/path_util.cc b/extensions/browser/path_util.cc
index d5784a99..787a787e 100644
--- a/extensions/browser/path_util.cc
+++ b/extensions/browser/path_util.cc
@@ -4,9 +4,16 @@
 
 #include "extensions/browser/path_util.h"
 
+#include "base/bind.h"
+#include "base/files/file_util.h"
 #include "base/path_service.h"
 #include "base/strings/sys_string_conversions.h"
+#include "base/task_runner_util.h"
+#include "base/threading/sequenced_task_runner_handle.h"
 #include "build/build_config.h"
+#include "extensions/browser/extension_file_task_runner.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/text/bytes_formatting.h"
 
 #if defined(OS_MACOSX)
 #include <CoreFoundation/CoreFoundation.h>
@@ -40,6 +47,20 @@
 
 const base::FilePath::CharType kHomeShortcut[] = FILE_PATH_LITERAL("~");
 
+void OnDirectorySizeCalculated(
+    int message_id,
+    base::OnceCallback<void(const base::string16&)> callback,
+    int64_t size_in_bytes) {
+  const int one_mebibyte_in_bytes = 1024 * 1024;
+  base::string16 response =
+      size_in_bytes < one_mebibyte_in_bytes
+          ? l10n_util::GetStringUTF16(message_id)
+          : ui::FormatBytesWithUnits(size_in_bytes, ui::DATA_UNITS_MEBIBYTE,
+                                     true);
+
+  std::move(callback).Run(response);
+}
+
 }  // namespace
 
 base::FilePath PrettifyPath(const base::FilePath& source_path) {
@@ -83,5 +104,16 @@
 #endif  // defined(OS_MACOSX)
 }
 
+void CalculateAndFormatExtensionDirectorySize(
+    const base::FilePath& extension_path,
+    int message_id,
+    base::OnceCallback<void(const base::string16&)> callback) {
+  base::PostTaskAndReplyWithResult(
+      GetExtensionFileTaskRunner().get(), FROM_HERE,
+      base::BindOnce(&base::ComputeDirectorySize, extension_path),
+      base::BindOnce(&OnDirectorySizeCalculated, message_id,
+                     std::move(callback)));
+}
+
 }  // namespace path_util
 }  // namespace extensions
diff --git a/extensions/browser/path_util.h b/extensions/browser/path_util.h
index 37631eca..ad622d9 100644
--- a/extensions/browser/path_util.h
+++ b/extensions/browser/path_util.h
@@ -17,6 +17,15 @@
 // replace the home directory component with "~".
 base::FilePath PrettifyPath(const base::FilePath& source_path);
 
+// Calculates the size of the directory containing an extension, and formats it
+// to a localized string that can be placed directly in the UI. |message_id| is
+// the ID of the string to use when the size is less than 1 MB, basically
+// IDS_APPLICATION_INFO_SIZE_SMALL_LABEL.
+void CalculateAndFormatExtensionDirectorySize(
+    const base::FilePath& extension_path,
+    int message_id,
+    base::OnceCallback<void(const base::string16&)> callback);
+
 }  // namespace path_util
 }  // namespace extensions
 
diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
index 5b8dc5e..fec28715 100644
--- a/extensions/browser/process_manager.cc
+++ b/extensions/browser/process_manager.cc
@@ -267,6 +267,7 @@
     content::WebContents* web_contents,
     content::RenderFrameHost* render_frame_host,
     const Extension* extension) {
+  DCHECK(render_frame_host->IsRenderFrameLive());
   ExtensionRenderFrameData* data = &all_extension_frames_[render_frame_host];
   data->view_type = GetViewType(web_contents);
 
diff --git a/extensions/browser/uninstall_ping_sender.cc b/extensions/browser/uninstall_ping_sender.cc
index 003cf137b..6b224dd7 100644
--- a/extensions/browser/uninstall_ping_sender.cc
+++ b/extensions/browser/uninstall_ping_sender.cc
@@ -24,9 +24,7 @@
     UninstallReason reason) {
   if (filter_.Run(extension, reason) == SEND_PING) {
     UpdateService* updater = UpdateService::Get(browser_context);
-    base::Version version =
-        extension->version() ? *extension->version() : base::Version("0");
-    updater->SendUninstallPing(extension->id(), version, reason);
+    updater->SendUninstallPing(extension->id(), extension->version(), reason);
   }
 }
 
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc
index 2981147..be25a77 100644
--- a/extensions/browser/updater/extension_downloader.cc
+++ b/extensions/browser/updater/extension_downloader.cc
@@ -238,7 +238,7 @@
     extra.update_url_data = delegate_->GetUpdateUrlData(extension.id());
 
   return AddExtensionData(
-      extension.id(), *extension.version(), extension.GetType(),
+      extension.id(), extension.version(), extension.GetType(),
       ManifestURL::GetUpdateURL(&extension), extra, request_id, fetch_priority);
 }
 
diff --git a/extensions/browser/updater/update_data_provider.cc b/extensions/browser/updater/update_data_provider.cc
index eb0e1a7..d930ab57 100644
--- a/extensions/browser/updater/update_data_provider.cc
+++ b/extensions/browser/updater/update_data_provider.cc
@@ -50,7 +50,7 @@
     info->pk_hash.resize(crypto::kSHA256Length, 0);
     crypto::SHA256HashString(pubkey_bytes, info->pk_hash.data(),
                              info->pk_hash.size());
-    info->version = *extension->version();
+    info->version = extension->version();
     info->allows_background_download = false;
     info->requires_network_encryption = true;
     info->installer = base::MakeRefCounted<ExtensionInstaller>(
diff --git a/extensions/browser/updater/update_service_unittest.cc b/extensions/browser/updater/update_service_unittest.cc
index ede45cc..29ffd9a1 100644
--- a/extensions/browser/updater/update_service_unittest.cc
+++ b/extensions/browser/updater/update_service_unittest.cc
@@ -237,7 +237,7 @@
   ASSERT_NE(nullptr, data);
   ASSERT_EQ(1u, data->size());
 
-  ASSERT_EQ(data->at(0).version, *extension1->version());
+  ASSERT_EQ(data->at(0).version, extension1->version());
   update_client::CrxInstaller* installer = data->at(0).installer.get();
   ASSERT_NE(installer, nullptr);
 
@@ -344,11 +344,11 @@
     ASSERT_EQ(2u, pings.size()) << reason;
 
     EXPECT_EQ(extension2->id(), pings[0].id) << reason;
-    EXPECT_EQ(*extension2->version(), pings[0].version) << reason;
+    EXPECT_EQ(extension2->version(), pings[0].version) << reason;
     EXPECT_EQ(reason, pings[0].reason) << reason;
 
     EXPECT_EQ(extension3->id(), pings[1].id) << reason;
-    EXPECT_EQ(*extension3->version(), pings[1].version) << reason;
+    EXPECT_EQ(extension3->version(), pings[1].version) << reason;
     EXPECT_EQ(reason, pings[1].reason) << reason;
 
     pings.clear();
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 1b57c23..c50ecb3 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -397,7 +397,7 @@
 }
 
 const std::string Extension::VersionString() const {
-  return version()->GetString();
+  return version_.GetString();
 }
 
 const std::string Extension::GetVersionForDisplay() const {
@@ -581,8 +581,8 @@
     *error = base::ASCIIToUTF16(errors::kInvalidVersion);
     return false;
   }
-  version_.reset(new base::Version(version_str));
-  if (!version_->IsValid() || version_->components().size() > 4) {
+  version_ = base::Version(version_str);
+  if (!version_.IsValid() || version_.components().size() > 4) {
     *error = base::ASCIIToUTF16(errors::kInvalidVersion);
     return false;
   }
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 45dbf6af..3909f65a 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -15,6 +15,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/thread_checker.h"
+#include "base/version.h"
 #include "extensions/common/extension_id.h"
 #include "extensions/common/extension_resource.h"
 #include "extensions/common/hashed_extension_id.h"
@@ -246,7 +247,7 @@
   Manifest::Location location() const;
   const ExtensionId& id() const;
   const HashedExtensionId& hashed_id() const;
-  const base::Version* version() const { return version_.get(); }
+  const base::Version& version() const { return version_; }
   const std::string& version_name() const { return version_name_; }
   const std::string VersionString() const;
   const std::string GetVersionForDisplay() const;
@@ -406,7 +407,7 @@
   GURL extension_url_;
 
   // The extension's version.
-  std::unique_ptr<base::Version> version_;
+  base::Version version_;
 
   // The extension's user visible version name.
   std::string version_name_;
diff --git a/extensions/common/extension_builder_unittest.cc b/extensions/common/extension_builder_unittest.cc
index 00cac2a..4883d09 100644
--- a/extensions/common/extension_builder_unittest.cc
+++ b/extensions/common/extension_builder_unittest.cc
@@ -113,7 +113,7 @@
   EXPECT_EQ("some name", extension->name());
   EXPECT_EQ(2, extension->manifest_version());
   EXPECT_EQ("some description", extension->description());
-  EXPECT_EQ("0.1", extension->version()->GetString());
+  EXPECT_EQ("0.1", extension->version().GetString());
 }
 
 TEST(ExtensionBuilderTest, MergeManifestOverridesValues) {
@@ -124,7 +124,7 @@
             .Build();
     // MergeManifest() should have overwritten the default 0.1 value for
     // version.
-    EXPECT_EQ("52.0.9", extension->version()->GetString());
+    EXPECT_EQ("52.0.9", extension->version().GetString());
   }
 
   {
@@ -138,7 +138,7 @@
             .SetManifest(manifest.Build())
             .MergeManifest(DictionaryBuilder().Set("version", "42.1").Build())
             .Build();
-    EXPECT_EQ("42.1", extension->version()->GetString());
+    EXPECT_EQ("42.1", extension->version().GetString());
   }
 }
 
diff --git a/extensions/shell/browser/default_shell_browser_main_delegate.cc b/extensions/shell/browser/default_shell_browser_main_delegate.cc
index f3e1fcf3..a08bcc0 100644
--- a/extensions/shell/browser/default_shell_browser_main_delegate.cc
+++ b/extensions/shell/browser/default_shell_browser_main_delegate.cc
@@ -92,7 +92,7 @@
     content::BrowserContext* browser_context) {
   ShellExtensionSystem* extension_system =
       static_cast<ShellExtensionSystem*>(ExtensionSystem::Get(browser_context));
-  extension_system->Init();
+  extension_system->FinishInitialization();
 
   LoadExtensionsFromCommandLine(extension_system);
   LoadAppsFromCommandLine(extension_system, browser_context);
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc
index 03315a7..e1d43e1d 100644
--- a/extensions/shell/browser/shell_browser_main_parts.cc
+++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -313,7 +313,7 @@
   DCHECK(browser_context_);
   extension_system_ = static_cast<ShellExtensionSystem*>(
       ExtensionSystem::Get(browser_context_.get()));
-  extension_system_->InitForRegularProfile(true);
+  extension_system_->InitForRegularProfile(true /* extensions_enabled */);
 }
 
 }  // namespace extensions
diff --git a/extensions/shell/browser/shell_extension_system.cc b/extensions/shell/browser/shell_extension_system.cc
index 56a5a81..2e7dec1 100644
--- a/extensions/shell/browser/shell_extension_system.cc
+++ b/extensions/shell/browser/shell_extension_system.cc
@@ -93,7 +93,7 @@
   return LoadExtension(app_dir);
 }
 
-void ShellExtensionSystem::Init() {
+void ShellExtensionSystem::FinishInitialization() {
   // Inform the rest of the extensions system to start.
   ready_.Signal();
   content::NotificationService::current()->Notify(
@@ -125,6 +125,10 @@
   app_sorting_.reset(new NullAppSorting);
 }
 
+void ShellExtensionSystem::InitForIncognitoProfile() {
+  NOTREACHED();
+}
+
 ExtensionService* ShellExtensionSystem::extension_service() {
   return nullptr;
 }
diff --git a/extensions/shell/browser/shell_extension_system.h b/extensions/shell/browser/shell_extension_system.h
index d13eed1a..93af9583 100644
--- a/extensions/shell/browser/shell_extension_system.h
+++ b/extensions/shell/browser/shell_extension_system.h
@@ -43,8 +43,8 @@
   // than other extensions. Use LaunchApp() to actually launch the loaded app.
   const Extension* LoadApp(const base::FilePath& app_dir);
 
-  // Initializes the extension system.
-  void Init();
+  // Finish initialization for the shell extension system.
+  void FinishInitialization();
 
   // Launch the app with id |extension_id|.
   void LaunchApp(const std::string& extension_id);
@@ -54,6 +54,7 @@
 
   // ExtensionSystem implementation:
   void InitForRegularProfile(bool extensions_enabled) override;
+  void InitForIncognitoProfile() override;
   ExtensionService* extension_service() override;
   RuntimeData* runtime_data() override;
   ManagementPolicy* management_policy() override;
diff --git a/extensions/shell/test/shell_test.cc b/extensions/shell/test/shell_test.cc
index ccfaed9..848bab30 100644
--- a/extensions/shell/test/shell_test.cc
+++ b/extensions/shell/test/shell_test.cc
@@ -52,7 +52,7 @@
 
   extension_system_ = static_cast<ShellExtensionSystem*>(
       ExtensionSystem::Get(browser_context_));
-  extension_system_->Init();
+  extension_system_->FinishInitialization();
   DCHECK(base::MessageLoopForUI::IsCurrent());
   base::RunLoop().RunUntilIdle();
 }
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
index 82edcb4..53cb543f 100644
--- a/gin/BUILD.gn
+++ b/gin/BUILD.gn
@@ -23,6 +23,8 @@
     "function_template.cc",
     "function_template.h",
     "gin_export.h",
+    "gin_features.cc",
+    "gin_features.h",
     "handle.h",
     "interceptor.cc",
     "interceptor.h",
diff --git a/gin/gin_features.cc b/gin/gin_features.cc
new file mode 100644
index 0000000..1dc57340
--- /dev/null
+++ b/gin/gin_features.cc
@@ -0,0 +1,13 @@
+// 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.
+
+#include "gin/gin_features.h"
+
+namespace features {
+
+// Enables extra masking and integrity checking in V8.
+const base::Feature kV8ExtraMasking{"V8ExtraMasking",
+                                    base::FEATURE_DISABLED_BY_DEFAULT};
+
+}  // namespace features
diff --git a/gin/gin_features.h b/gin/gin_features.h
new file mode 100644
index 0000000..f779d6ec
--- /dev/null
+++ b/gin/gin_features.h
@@ -0,0 +1,17 @@
+// 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 GIN_FEATURES_H_
+#define GIN_FEATURES_H_
+
+#include "base/feature_list.h"
+#include "gin/gin_export.h"
+
+namespace features {
+
+GIN_EXPORT extern const base::Feature kV8ExtraMasking;
+
+}  // namespace features
+
+#endif  // GIN_FEATURES_H_
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 03353be..292f4cb 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -25,6 +25,7 @@
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "gin/gin_features.h"
 
 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
 #if defined(OS_ANDROID)
@@ -231,6 +232,14 @@
 
   v8::V8::InitializePlatform(V8Platform::Get());
 
+  if (base::FeatureList::IsEnabled(features::kV8ExtraMasking)) {
+    static const char extra_masking[] = "--extra-masking";
+    v8::V8::SetFlagsFromString(extra_masking, sizeof(extra_masking) - 1);
+  } else {
+    static const char no_extra_masking[] = "--no-extra-masking";
+    v8::V8::SetFlagsFromString(no_extra_masking, sizeof(no_extra_masking) - 1);
+  }
+
   if (IsolateHolder::kStrictMode == mode) {
     static const char use_strict[] = "--use_strict";
     v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1);
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index e2dbfb3..4124ef5 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -6224,7 +6224,7 @@
   gpu_control_->EnsureWorkVisible();
 
   // Copy the data over after setting the data to ensure alignment.
-  SyncToken sync_token_data(gpu_control_->GetNamespaceID(), 0,
+  SyncToken sync_token_data(gpu_control_->GetNamespaceID(),
                             gpu_control_->GetCommandBufferID(), fence_sync);
   sync_token_data.SetVerifyFlush();
   memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
@@ -6242,7 +6242,7 @@
   helper_->CommandBufferHelper::OrderingBarrier();
 
   // Copy the data over after setting the data to ensure alignment.
-  SyncToken sync_token_data(gpu_control_->GetNamespaceID(), 0,
+  SyncToken sync_token_data(gpu_control_->GetNamespaceID(),
                             gpu_control_->GetCommandBufferID(), fence_sync);
   memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
 }
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index 664ed66f0..ab43bd7a 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -4163,7 +4163,7 @@
 
   // Unverified sync token should produce INVALID_OPERATION.
   ClearCommands();
-  gpu::SyncToken unverified_sync_token(CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken unverified_sync_token(CommandBufferNamespace::GPU_IO,
                                        gpu::CommandBufferId(), 0);
   EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(unverified_sync_token))
       .WillOnce(Return(false));
diff --git a/gpu/command_buffer/common/sync_token.cc b/gpu/command_buffer/common/sync_token.cc
index b9bba8f..2ed75f2 100644
--- a/gpu/command_buffer/common/sync_token.cc
+++ b/gpu/command_buffer/common/sync_token.cc
@@ -9,16 +9,13 @@
 SyncToken::SyncToken()
     : verified_flush_(false),
       namespace_id_(CommandBufferNamespace::INVALID),
-      extra_data_field_(0),
       release_count_(0) {}
 
 SyncToken::SyncToken(CommandBufferNamespace namespace_id,
-                     int32_t extra_data_field,
                      CommandBufferId command_buffer_id,
                      uint64_t release_count)
     : verified_flush_(false),
       namespace_id_(namespace_id),
-      extra_data_field_(extra_data_field),
       command_buffer_id_(command_buffer_id),
       release_count_(release_count) {}
 
diff --git a/gpu/command_buffer/common/sync_token.h b/gpu/command_buffer/common/sync_token.h
index 990f0c9..a8aa0c6 100644
--- a/gpu/command_buffer/common/sync_token.h
+++ b/gpu/command_buffer/common/sync_token.h
@@ -29,18 +29,15 @@
   SyncToken();
 
   SyncToken(CommandBufferNamespace namespace_id,
-            int32_t extra_data_field,
             CommandBufferId command_buffer_id,
             uint64_t release_count);
 
   SyncToken(const SyncToken& other);
 
   void Set(CommandBufferNamespace namespace_id,
-           int32_t extra_data_field,
            CommandBufferId command_buffer_id,
            uint64_t release_count) {
     namespace_id_ = namespace_id;
-    extra_data_field_ = extra_data_field;
     command_buffer_id_ = command_buffer_id;
     release_count_ = release_count;
   }
@@ -48,7 +45,6 @@
   void Clear() {
     verified_flush_ = false;
     namespace_id_ = CommandBufferNamespace::INVALID;
-    extra_data_field_ = 0;
     command_buffer_id_ = CommandBufferId();
     release_count_ = 0;
   }
@@ -72,12 +68,6 @@
   CommandBufferId command_buffer_id() const { return command_buffer_id_; }
   uint64_t release_count() const { return release_count_; }
 
-  // This extra data field can be used by command buffers to add extra
-  // information to identify unverified sync tokens. The current purpose
-  // of this field is only for unverified sync tokens which only exist within
-  // the same process so this information will not survive cross-process IPCs.
-  int32_t extra_data_field() const { return extra_data_field_; }
-
   bool operator<(const SyncToken& other) const {
     return std::tie(namespace_id_, command_buffer_id_, release_count_) <
            std::tie(other.namespace_id_, other.command_buffer_id_,
@@ -87,7 +77,6 @@
   bool operator==(const SyncToken& other) const {
     return verified_flush_ == other.verified_flush() &&
            namespace_id_ == other.namespace_id() &&
-           extra_data_field_ == other.extra_data_field() &&
            command_buffer_id_ == other.command_buffer_id() &&
            release_count_ == other.release_count();
   }
@@ -97,7 +86,6 @@
  private:
   bool verified_flush_;
   CommandBufferNamespace namespace_id_;
-  int32_t extra_data_field_;
   CommandBufferId command_buffer_id_;
   uint64_t release_count_;
 };
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index d859aec..cb6a1147 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16517,7 +16517,7 @@
   const uint64_t release = c.release_count();
 
   gpu::SyncToken sync_token;
-  sync_token.Set(namespace_id, 0, command_buffer_id, release);
+  sync_token.Set(namespace_id, command_buffer_id, release);
   return client_->OnWaitSyncToken(sync_token) ? error::kDeferCommandUntilLater
                                               : error::kNoError;
 }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
index 1cd4847..41da9d2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -4103,7 +4103,7 @@
     CommandBufferNamespace namespace_id,
     CommandBufferId command_buffer_id,
     GLuint64 release_count) {
-  SyncToken sync_token(namespace_id, 0, command_buffer_id, release_count);
+  SyncToken sync_token(namespace_id, command_buffer_id, release_count);
   return client_->OnWaitSyncToken(sync_token) ? error::kDeferCommandUntilLater
                                               : error::kNoError;
 }
diff --git a/gpu/command_buffer/service/mailbox_manager_unittest.cc b/gpu/command_buffer/service/mailbox_manager_unittest.cc
index 2f5d755e..fd655203 100644
--- a/gpu/command_buffer/service/mailbox_manager_unittest.cc
+++ b/gpu/command_buffer/service/mailbox_manager_unittest.cc
@@ -21,7 +21,6 @@
 using namespace ::testing;
 
 static const SyncToken g_sync_token(gpu::CommandBufferNamespace::GPU_IO,
-                                    0,
                                     gpu::CommandBufferId::FromUnsafeValue(123),
                                     0);
 
diff --git a/gpu/command_buffer/service/raster_decoder.cc b/gpu/command_buffer/service/raster_decoder.cc
index 9c3d2287..204aeb04 100644
--- a/gpu/command_buffer/service/raster_decoder.cc
+++ b/gpu/command_buffer/service/raster_decoder.cc
@@ -605,7 +605,7 @@
   const uint64_t release = c.release_count();
 
   gpu::SyncToken sync_token;
-  sync_token.Set(namespace_id, 0, command_buffer_id, release);
+  sync_token.Set(namespace_id, command_buffer_id, release);
   return client_->OnWaitSyncToken(sync_token) ? error::kDeferCommandUntilLater
                                               : error::kNoError;
 }
diff --git a/gpu/command_buffer/service/scheduler_unittest.cc b/gpu/command_buffer/service/scheduler_unittest.cc
index 2fa05c0f..f77d657 100644
--- a/gpu/command_buffer/service/scheduler_unittest.cc
+++ b/gpu/command_buffer/service/scheduler_unittest.cc
@@ -137,8 +137,8 @@
 
     uint64_t release = release_sync + 1;
     sync_tokens_.emplace(std::make_pair(
-        release_sync, SyncToken(kNamespaceId, 0,
-                                info_it->second.command_buffer_id, release)));
+        release_sync,
+        SyncToken(kNamespaceId, info_it->second.command_buffer_id, release)));
   }
 
   void ScheduleTask(int sequence_key, int wait_sync, int release_sync) {
@@ -380,7 +380,7 @@
                       std::vector<SyncToken>()));
 
   bool ran2 = false;
-  SyncToken sync_token(namespace_id, 0, command_buffer_id, release);
+  SyncToken sync_token(namespace_id, command_buffer_id, release);
   SequenceId sequence_id2 =
       scheduler()->CreateSequence(SchedulingPriority::kHigh);
   scheduler()->ScheduleTask(Scheduler::Task(
@@ -414,7 +414,7 @@
           namespace_id, command_buffer_id2, sequence_id2);
 
   uint64_t release = 1;
-  SyncToken sync_token(namespace_id, 0, command_buffer_id2, release);
+  SyncToken sync_token(namespace_id, command_buffer_id2, release);
 
   bool ran1, ran2 = false;
 
@@ -535,8 +535,8 @@
   EXPECT_EQ(SchedulingPriority::kNormal, seq2->current_priority());
   EXPECT_EQ(SchedulingPriority::kHigh, seq3->current_priority());
 
-  SyncToken sync_token1(namespace_id, 0, command_buffer_id1, 1);
-  SyncToken sync_token2(namespace_id, 0, command_buffer_id2, 1);
+  SyncToken sync_token1(namespace_id, command_buffer_id1, 1);
+  SyncToken sync_token2(namespace_id, command_buffer_id2, 1);
 
   // Wait priorities propagate.
   seq2->AddWaitFence(sync_token1, 1, seq_id1, seq1);
@@ -593,8 +593,8 @@
   Scheduler::Sequence* seq2 = scheduler()->GetSequence(seq_id2);
   Scheduler::Sequence* seq3 = scheduler()->GetSequence(seq_id3);
 
-  SyncToken sync_token1(namespace_id, 0, command_buffer_id1, 1);
-  SyncToken sync_token2(namespace_id, 0, command_buffer_id2, 1);
+  SyncToken sync_token1(namespace_id, command_buffer_id1, 1);
+  SyncToken sync_token2(namespace_id, command_buffer_id2, 1);
 
   // Wait priorities propagate.
   seq2->AddWaitFence(sync_token1, 1, seq_id1, seq1);
@@ -643,8 +643,8 @@
   Scheduler::Sequence* seq2 = scheduler()->GetSequence(seq_id2);
   Scheduler::Sequence* seq3 = scheduler()->GetSequence(seq_id3);
 
-  SyncToken sync_token1(namespace_id, 0, command_buffer_id1, 1);
-  SyncToken sync_token2(namespace_id, 0, command_buffer_id2, 2);
+  SyncToken sync_token1(namespace_id, command_buffer_id1, 1);
+  SyncToken sync_token2(namespace_id, command_buffer_id2, 2);
 
   // Wait on same fence multiple times.
   seq2->AddWaitFence(sync_token1, 1, seq_id1, seq1);
@@ -704,10 +704,10 @@
   EXPECT_EQ(SchedulingPriority::kLow, seq2->current_priority());
   EXPECT_EQ(SchedulingPriority::kNormal, seq3->current_priority());
 
-  SyncToken sync_token_seq2_1(namespace_id, 0, command_buffer_id2, 1);
-  SyncToken sync_token_seq2_2(namespace_id, 0, command_buffer_id2, 2);
-  SyncToken sync_token_seq2_3(namespace_id, 0, command_buffer_id2, 3);
-  SyncToken sync_token_seq3_1(namespace_id, 0, command_buffer_id3, 1);
+  SyncToken sync_token_seq2_1(namespace_id, command_buffer_id2, 1);
+  SyncToken sync_token_seq2_2(namespace_id, command_buffer_id2, 2);
+  SyncToken sync_token_seq2_3(namespace_id, command_buffer_id2, 3);
+  SyncToken sync_token_seq3_1(namespace_id, command_buffer_id3, 1);
 
   seq3->AddWaitFence(sync_token_seq2_1, 1, seq_id2, seq2);
   EXPECT_EQ(SchedulingPriority::kHigh, seq1->current_priority());
diff --git a/gpu/command_buffer/service/sync_point_manager_unittest.cc b/gpu/command_buffer/service/sync_point_manager_unittest.cc
index fa32147..a72c48a 100644
--- a/gpu/command_buffer/service/sync_point_manager_unittest.cc
+++ b/gpu/command_buffer/service/sync_point_manager_unittest.cc
@@ -104,7 +104,7 @@
   CommandBufferId kBufferId = CommandBufferId::FromUnsafeValue(0x123);
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kBufferId, release_count);
 
   // Can't wait for sync token before client is registered.
   EXPECT_TRUE(sync_point_manager_->IsSyncTokenReleased(sync_token));
@@ -133,10 +133,10 @@
                           kCmdBufferId2);
 
   uint64_t release_count = 1;
-  SyncToken sync_token1(kNamespaceId, 0, kCmdBufferId1, release_count);
+  SyncToken sync_token1(kNamespaceId, kCmdBufferId1, release_count);
   stream1.AllocateOrderNum();
 
-  SyncToken sync_token2(kNamespaceId, 0, kCmdBufferId2, release_count);
+  SyncToken sync_token2(kNamespaceId, kCmdBufferId2, release_count);
   stream2.AllocateOrderNum();
 
   EXPECT_FALSE(sync_point_manager_->IsSyncTokenReleased(sync_token1));
@@ -164,7 +164,7 @@
   wait_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   wait_stream.BeginProcessing();
   int test_num = 10;
@@ -195,7 +195,7 @@
   wait_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kWaitCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kWaitCmdBufferId, release_count);
 
   wait_stream.BeginProcessing();
   int test_num = 10;
@@ -222,7 +222,7 @@
   release_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   wait_stream.BeginProcessing();
   int test_num = 10;
@@ -249,7 +249,7 @@
   release_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   // Order number was higher but it was actually released.
   release_stream.BeginProcessing();
@@ -281,7 +281,7 @@
   wait_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   wait_stream.BeginProcessing();
 
@@ -318,7 +318,7 @@
   wait_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   wait_stream.BeginProcessing();
   int test_num = 10;
@@ -358,7 +358,7 @@
   wait_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   EXPECT_FALSE(sync_point_manager_->IsSyncTokenReleased(sync_token));
   // Have wait with order [3] to wait on release.
@@ -416,7 +416,7 @@
   release_stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kReleaseCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kReleaseCmdBufferId, release_count);
 
   // Have wait with order [3] to wait on release order [1] or [2].
   wait_stream.BeginProcessing();
@@ -468,7 +468,7 @@
   stream.AllocateOrderNum();
 
   uint64_t release_count = 1;
-  SyncToken sync_token(kNamespaceId, 0, kCmdBufferId, release_count);
+  SyncToken sync_token(kNamespaceId, kCmdBufferId, release_count);
 
   int test_num = 10;
   bool valid_wait = sync_point_manager_->Wait(
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
index 94d39587..628a17d 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -1543,6 +1543,24 @@
       "features": [
         "gpu_rasterization"
       ]
+    },
+    {
+      "id": 151,
+      "description": "Rendering artifacts on older macOS releases and Intel GPUs",
+      "cr_bugs": [794819],
+      "os": {
+        "type": "macosx",
+        "version": {
+          "op": "<=",
+          "value": "10.11"
+        }
+      },
+      "vendor_id": "0x8086",
+      "multi_gpu_category": "any",
+      "features": [
+        "accelerated_2d_canvas",
+        "gpu_rasterization"
+      ]
     }
   ]
 }
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc
index cabfd25..04d5687 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -497,7 +497,7 @@
   Send(new GpuCommandBufferMsg_CreateImage(route_id_, params));
 
   if (image_fence_sync) {
-    gpu::SyncToken sync_token(GetNamespaceID(), 0, GetCommandBufferID(),
+    gpu::SyncToken sync_token(GetNamespaceID(), GetCommandBufferID(),
                               image_fence_sync);
 
     // Force a synchronous IPC to validate sync token.
diff --git a/gpu/ipc/client/gpu_context_tests.h b/gpu/ipc/client/gpu_context_tests.h
index 3d08dd2..1118afd 100644
--- a/gpu/ipc/client/gpu_context_tests.h
+++ b/gpu/ipc/client/gpu_context_tests.h
@@ -81,7 +81,7 @@
 
   // Signalling something that doesn't exist should run the callback
   // immediately.
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(1297824234),
                             9123743439);
   TestSignalSyncToken(sync_token);
diff --git a/gpu/ipc/common/gpu_command_buffer_traits.cc b/gpu/ipc/common/gpu_command_buffer_traits.cc
index f6f3686..5f58b24 100644
--- a/gpu/ipc/common/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/common/gpu_command_buffer_traits.cc
@@ -57,7 +57,7 @@
     return false;
   }
 
-  p->Set(namespace_id, 0, command_buffer_id, release_count);
+  p->Set(namespace_id, command_buffer_id, release_count);
   if (p->HasData()) {
     if (!verified_flush)
       return false;
diff --git a/gpu/ipc/common/struct_traits_unittest.cc b/gpu/ipc/common/struct_traits_unittest.cc
index 6fe3a2c..ddf0a794 100644
--- a/gpu/ipc/common/struct_traits_unittest.cc
+++ b/gpu/ipc/common/struct_traits_unittest.cc
@@ -326,12 +326,10 @@
   mailbox.SetName(mailbox_name);
 
   const gpu::CommandBufferNamespace namespace_id = gpu::IN_PROCESS;
-  const int32_t extra_data_field = 0xbeefbeef;
   const gpu::CommandBufferId command_buffer_id(
       gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef));
   const uint64_t release_count = 0xdeadbeefdeadL;
-  gpu::SyncToken sync_token(namespace_id, extra_data_field, command_buffer_id,
-                            release_count);
+  gpu::SyncToken sync_token(namespace_id, command_buffer_id, release_count);
   sync_token.SetVerifyFlush();
 
   const uint32_t texture_target = 1337;
@@ -350,18 +348,15 @@
 
 TEST_F(StructTraitsTest, SyncToken) {
   const gpu::CommandBufferNamespace namespace_id = gpu::IN_PROCESS;
-  const int32_t extra_data_field = 0xbeefbeef;
   const gpu::CommandBufferId command_buffer_id(
       gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef));
   const uint64_t release_count = 0xdeadbeefdead;
-  gpu::SyncToken input(namespace_id, extra_data_field, command_buffer_id,
-                       release_count);
+  gpu::SyncToken input(namespace_id, command_buffer_id, release_count);
   input.SetVerifyFlush();
   mojom::TraitsTestServicePtr proxy = GetTraitsTestProxy();
   gpu::SyncToken output;
   proxy->EchoSyncToken(input, &output);
   EXPECT_EQ(namespace_id, output.namespace_id());
-  EXPECT_EQ(extra_data_field, output.extra_data_field());
   EXPECT_EQ(command_buffer_id, output.command_buffer_id());
   EXPECT_EQ(release_count, output.release_count());
   EXPECT_TRUE(output.verified_flush());
diff --git a/gpu/ipc/common/sync_token.mojom b/gpu/ipc/common/sync_token.mojom
index 81bd5f01..7c957007 100644
--- a/gpu/ipc/common/sync_token.mojom
+++ b/gpu/ipc/common/sync_token.mojom
@@ -20,7 +20,6 @@
 struct SyncToken {
   bool verified_flush;
   CommandBufferNamespace namespace_id;
-  int32 extra_data_field;
   uint64 command_buffer_id;
   uint64 release_count;
 };
diff --git a/gpu/ipc/common/sync_token_struct_traits.h b/gpu/ipc/common/sync_token_struct_traits.h
index 05f20721..d3b6c87 100644
--- a/gpu/ipc/common/sync_token_struct_traits.h
+++ b/gpu/ipc/common/sync_token_struct_traits.h
@@ -23,10 +23,6 @@
         token.namespace_id());
   }
 
-  static int32_t extra_data_field(const gpu::SyncToken& token) {
-    return token.extra_data_field();
-  }
-
   static uint64_t command_buffer_id(const gpu::SyncToken& token) {
     return token.command_buffer_id().GetUnsafeValue();
   }
@@ -38,7 +34,6 @@
   static bool Read(gpu::mojom::SyncTokenDataView data, gpu::SyncToken* out) {
     *out = gpu::SyncToken(
         static_cast<gpu::CommandBufferNamespace>(data.namespace_id()),
-        data.extra_data_field(),
         gpu::CommandBufferId::FromUnsafeValue(data.command_buffer_id()),
         data.release_count());
     if (out->HasData()) {
diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index ba565b1..9ec3e8a 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -768,7 +768,7 @@
 
   if (fence_sync) {
     flushed_fence_sync_release_ = fence_sync;
-    SyncToken sync_token(GetNamespaceID(), 0, GetCommandBufferID(), fence_sync);
+    SyncToken sync_token(GetNamespaceID(), GetCommandBufferID(), fence_sync);
     sync_token.SetVerifyFlush();
     gpu_memory_buffer_manager_->SetDestructionSyncToken(gpu_memory_buffer,
                                                         sync_token);
@@ -864,7 +864,7 @@
 }
 
 void InProcessCommandBuffer::OnFenceSyncRelease(uint64_t release) {
-  SyncToken sync_token(GetNamespaceID(), 0, GetCommandBufferID(), release);
+  SyncToken sync_token(GetNamespaceID(), GetCommandBufferID(), release);
 
   gles2::MailboxManager* mailbox_manager =
       decoder_->GetContextGroup()->mailbox_manager();
diff --git a/gpu/ipc/service/command_buffer_stub.cc b/gpu/ipc/service/command_buffer_stub.cc
index 196f40e..27187c2 100644
--- a/gpu/ipc/service/command_buffer_stub.cc
+++ b/gpu/ipc/service/command_buffer_stub.cc
@@ -762,7 +762,7 @@
 }
 
 void CommandBufferStub::OnFenceSyncRelease(uint64_t release) {
-  SyncToken sync_token(CommandBufferNamespace::GPU_IO, 0, command_buffer_id_,
+  SyncToken sync_token(CommandBufferNamespace::GPU_IO, command_buffer_id_,
                        release);
   gles2::MailboxManager* mailbox_manager = context_group_->mailbox_manager();
   if (mailbox_manager->UsesSync() && MakeCurrent())
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc
index f4dd49e..0df3457 100644
--- a/gpu/ipc/service/direct_composition_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -9,6 +9,7 @@
 #include <dxgi1_6.h>
 
 #include "base/containers/circular_deque.h"
+#include "base/debug/alias.h"
 #include "base/feature_list.h"
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_functions.h"
@@ -112,6 +113,13 @@
     return false;
   }
 
+  Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device;
+  if (FAILED(d3d11_device.CopyTo(video_device.GetAddressOf()))) {
+    DLOG(ERROR) << "Failing to create overlay swapchain because couldn't "
+                   "retrieve video device from D3D11 device.";
+    return false;
+  }
+
   Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device;
   d3d11_device.CopyTo(dxgi_device.GetAddressOf());
   Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter;
@@ -304,16 +312,21 @@
 };
 
 bool DCLayerTree::Initialize(HWND window) {
-  d3d11_device_.CopyTo(video_device_.GetAddressOf());
+  HRESULT hr = d3d11_device_.CopyTo(video_device_.GetAddressOf());
+  if (FAILED(hr))
+    return false;
+
   Microsoft::WRL::ComPtr<ID3D11DeviceContext> context;
   d3d11_device_->GetImmediateContext(context.GetAddressOf());
-  context.CopyTo(video_context_.GetAddressOf());
+  hr = context.CopyTo(video_context_.GetAddressOf());
+  if (FAILED(hr))
+    return false;
 
   Microsoft::WRL::ComPtr<IDCompositionDesktopDevice> desktop_device;
   dcomp_device_.CopyTo(desktop_device.GetAddressOf());
 
-  HRESULT hr = desktop_device->CreateTargetForHwnd(
-      window, TRUE, dcomp_target_.GetAddressOf());
+  hr = desktop_device->CreateTargetForHwnd(window, TRUE,
+                                           dcomp_target_.GetAddressOf());
   if (FAILED(hr))
     return false;
 
@@ -370,10 +383,12 @@
     DCLayerTree* surface,
     Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device)
     : surface_(surface), d3d11_device_(d3d11_device) {
-  d3d11_device_.CopyTo(video_device_.GetAddressOf());
+  HRESULT hr = d3d11_device_.CopyTo(video_device_.GetAddressOf());
+  CHECK(SUCCEEDED(hr));
   Microsoft::WRL::ComPtr<ID3D11DeviceContext> context;
   d3d11_device_->GetImmediateContext(context.GetAddressOf());
-  context.CopyTo(video_context_.GetAddressOf());
+  hr = context.CopyTo(video_context_.GetAddressOf());
+  CHECK(SUCCEEDED(hr));
   HMODULE dcomp = ::GetModuleHandleA("dcomp.dll");
   CHECK(dcomp);
   create_surface_handle_function_ =
@@ -803,8 +818,11 @@
       DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO | DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO;
 
   HANDLE handle;
-  create_surface_handle_function_(COMPOSITIONOBJECT_ALL_ACCESS, nullptr,
-                                  &handle);
+  HRESULT hr = create_surface_handle_function_(COMPOSITIONOBJECT_ALL_ACCESS,
+                                               nullptr, &handle);
+  // TODO(crbug/792806): Remove Alias and CHECK after issue is fixed.
+  base::debug::Alias(&hr);
+  CHECK(SUCCEEDED(hr));
   swap_chain_handle_.Set(handle);
 
   if (is_yuy2_swapchain_ != yuy2) {
@@ -818,7 +836,6 @@
   is_yuy2_swapchain_ = false;
   // The composition surface handle isn't actually used, but
   // CreateSwapChainForComposition can't create YUY2 swapchains.
-  HRESULT hr = E_FAIL;
   if (yuy2) {
     hr = media_factory->CreateSwapChainForCompositionSurfaceHandle(
         d3d11_device_.Get(), swap_chain_handle_.Get(), &desc, nullptr,
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc b/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc
index 5341ece..3427cbfb 100644
--- a/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc
@@ -55,12 +55,9 @@
   AHardwareBuffer* buffer = handle.handle.GetMemoryObject();
   DCHECK(buffer);
 
-  EGLint attribs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_FALSE, EGL_NONE};
-
-  scoped_refptr<gl::GLImageEGL> image(new gl::GLImageAHardwareBuffer(size));
-  EGLClientBuffer client_buffer = eglGetNativeClientBufferANDROID(buffer);
-  if (!image->Initialize(EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
-                         client_buffer, attribs)) {
+  scoped_refptr<gl::GLImageAHardwareBuffer> image(
+      new gl::GLImageAHardwareBuffer(size));
+  if (!image->Initialize(buffer, /* preserved */ false)) {
     DLOG(ERROR) << "Failed to create GLImage " << size.ToString();
     image = nullptr;
   }
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc
index 137467e..571c074 100644
--- a/headless/lib/browser/headless_browser_context_impl.cc
+++ b/headless/lib/browser/headless_browser_context_impl.cc
@@ -280,7 +280,7 @@
               content::BrowserThread::IO),
           protocol_handlers, context_options_->TakeProtocolHandlers(),
           std::move(request_interceptors), context_options_.get(),
-          browser_->browser_main_parts()->net_log(), this));
+          browser_->net_log(), this));
   resource_context_->set_url_request_context_getter(url_request_context_getter);
   return url_request_context_getter.get();
 }
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
index 88bede9..86fc0a33 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -20,6 +20,7 @@
 #include "headless/app/headless_shell_switches.h"
 #include "headless/lib/browser/headless_browser_context_impl.h"
 #include "headless/lib/browser/headless_browser_main_parts.h"
+#include "headless/lib/browser/headless_net_log.h"
 #include "headless/lib/browser/headless_web_contents_impl.h"
 #include "headless/lib/headless_content_main_delegate.h"
 #include "headless/public/internal/headless_devtools_client_impl.h"
@@ -138,6 +139,18 @@
   browser_main_parts_ = browser_main_parts;
 }
 
+void HeadlessBrowserImpl::PreMainMessageLoopRun() {
+  const base::CommandLine* command_line =
+      base::CommandLine::ForCurrentProcess();
+  if (command_line->HasSwitch(::switches::kLogNetLog)) {
+    base::FilePath log_path =
+        command_line->GetSwitchValuePath(::switches::kLogNetLog);
+    net_log_.reset(new HeadlessNetLog(log_path));
+  } else {
+    net_log_.reset(new net::NetLog());
+  }
+}
+
 void HeadlessBrowserImpl::RunOnStartCallback() {
 #if defined(USE_NSS_CERTS)
   content::BrowserThread::PostTask(
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h
index 7f4ec64dc..1366f83 100644
--- a/headless/lib/browser/headless_browser_impl.h
+++ b/headless/lib/browser/headless_browser_impl.h
@@ -20,6 +20,10 @@
 #include "headless/public/headless_export.h"
 #include "headless/public/util/moveable_auto_lock.h"
 
+namespace net {
+class NetLog;
+}  // namespace net
+
 namespace ui {
 class Compositor;
 }  // namespace ui
@@ -65,9 +69,11 @@
   void set_browser_main_parts(HeadlessBrowserMainParts* browser_main_parts);
   HeadlessBrowserMainParts* browser_main_parts() const;
 
+  void PreMainMessageLoopRun();
   void RunOnStartCallback();
 
   HeadlessBrowser::Options* options() { return &options_; }
+  net::NetLog* net_log() const { return net_log_.get(); }
 
   HeadlessBrowserContext* CreateBrowserContext(
       HeadlessBrowserContext::Builder* builder);
@@ -98,6 +104,7 @@
  protected:
   base::Callback<void(HeadlessBrowser*)> on_start_callback_;
   HeadlessBrowser::Options options_;
+  std::unique_ptr<net::NetLog> net_log_;
   HeadlessBrowserMainParts* browser_main_parts_;  // Not owned.
 
   mutable base::Lock browser_contexts_lock_;  // Protects |browser_contexts_|
diff --git a/headless/lib/browser/headless_browser_main_parts.cc b/headless/lib/browser/headless_browser_main_parts.cc
index da66fb7..d3a767e 100644
--- a/headless/lib/browser/headless_browser_main_parts.cc
+++ b/headless/lib/browser/headless_browser_main_parts.cc
@@ -4,12 +4,9 @@
 
 #include "headless/lib/browser/headless_browser_main_parts.h"
 
-#include "base/command_line.h"
-#include "content/public/common/content_switches.h"
 #include "headless/lib/browser/headless_browser_context_impl.h"
 #include "headless/lib/browser/headless_browser_impl.h"
 #include "headless/lib/browser/headless_devtools.h"
-#include "headless/lib/browser/headless_net_log.h"
 #include "headless/lib/browser/headless_screen.h"
 
 namespace headless {
@@ -21,15 +18,7 @@
 HeadlessBrowserMainParts::~HeadlessBrowserMainParts() = default;
 
 void HeadlessBrowserMainParts::PreMainMessageLoopRun() {
-  const base::CommandLine* command_line =
-      base::CommandLine::ForCurrentProcess();
-  if (command_line->HasSwitch(switches::kLogNetLog)) {
-    base::FilePath log_path =
-        command_line->GetSwitchValuePath(switches::kLogNetLog);
-    net_log_.reset(new HeadlessNetLog(log_path));
-  } else {
-    net_log_.reset(new net::NetLog());
-  }
+  browser_->PreMainMessageLoopRun();
 
   if (browser_->options()->DevtoolsServerEnabled()) {
     StartLocalDevToolsHttpHandler(browser_->options());
diff --git a/headless/lib/browser/headless_browser_main_parts.h b/headless/lib/browser/headless_browser_main_parts.h
index 78ee270..1a8a1c8 100644
--- a/headless/lib/browser/headless_browser_main_parts.h
+++ b/headless/lib/browser/headless_browser_main_parts.h
@@ -11,10 +11,6 @@
 #include "content/public/browser/browser_main_parts.h"
 #include "headless/public/headless_browser.h"
 
-namespace net {
-class NetLog;
-}  // namespace net
-
 namespace headless {
 
 class HeadlessBrowserImpl;
@@ -31,13 +27,10 @@
   void PreMainMessageLoopStart() override;
 #endif
 
-  net::NetLog* net_log() const { return net_log_.get(); }
-
  private:
   HeadlessBrowserImpl* browser_;  // Not owned.
 
   bool devtools_http_handler_started_;
-  std::unique_ptr<net::NetLog> net_log_;
 
   DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts);
 };
diff --git a/headless/lib/browser/headless_content_browser_client.cc b/headless/lib/browser/headless_content_browser_client.cc
index 36b6a3b..87ee8f0 100644
--- a/headless/lib/browser/headless_content_browser_client.cc
+++ b/headless/lib/browser/headless_content_browser_client.cc
@@ -319,7 +319,7 @@
 }
 
 net::NetLog* HeadlessContentBrowserClient::GetNetLog() {
-  return browser_->browser_main_parts()->net_log();
+  return browser_->net_log();
 }
 
 bool HeadlessContentBrowserClient::AllowGetCookie(
diff --git a/ios/build/bots/chromium.mac/ios-device-xcode-clang.json b/ios/build/bots/chromium.mac/ios-device-xcode-clang.json
index 7b4a376c..07f5c2c 100644
--- a/ios/build/bots/chromium.mac/ios-device-xcode-clang.json
+++ b/ios/build/bots/chromium.mac/ios-device-xcode-clang.json
@@ -3,7 +3,7 @@
     "Builder for 32-bit devices.",
     "Build is performed with gn+ninja."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[ \"arm64\" ]",
     "goma_dir=\"$(goma_dir)\"",
diff --git a/ios/build/bots/chromium.mac/ios-device.json b/ios/build/bots/chromium.mac/ios-device.json
index c1ebd09..16801ae 100644
--- a/ios/build/bots/chromium.mac/ios-device.json
+++ b/ios/build/bots/chromium.mac/ios-device.json
@@ -4,7 +4,7 @@
     "Build is performed with gn+ninja.",
     "If modified, please change chromium.fyi/ios-device-goma-canary-clobber.json too."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[ \"arm64\" ]",
     "goma_dir=\"$(goma_dir)\"",
diff --git a/ios/build/bots/chromium.mac/ios-simulator-cronet.json b/ios/build/bots/chromium.mac/ios-simulator-cronet.json
index 72b0962..6f8f7a9 100644
--- a/ios/build/bots/chromium.mac/ios-simulator-cronet.json
+++ b/ios/build/bots/chromium.mac/ios-simulator-cronet.json
@@ -2,7 +2,7 @@
   "comments": [
     "Cronet tests 64-bit iOS 11.0 simulators."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[\"x86\"]",
     "disable_brotli_filter=false",
@@ -19,25 +19,22 @@
     "use_platform_icu_alternatives=true"
   ],
   "configuration": "Debug",
-  "sdk": "iphonesimulator11.0",
+  "sdk": "iphonesimulator11.2",
   "tests": [
     {
       "app": "cronet_unittests_ios",
       "device type": "iPhone 5s",
-      "os": "9.3",
-      "xcode version": "9.0"
+      "os": "9.3"
     },
     {
       "app": "cronet_test",
       "device type": "iPhone 5s",
-      "os": "9.3",
-      "xcode version": "9.0"
+      "os": "9.3"
     },
     {
       "app": "cronet_test",
       "device type": "iPad Air 2",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     }
   ]
 }
diff --git a/ios/build/bots/chromium.mac/ios-simulator-full-configs.json b/ios/build/bots/chromium.mac/ios-simulator-full-configs.json
index 89ed84e..796d1c94 100644
--- a/ios/build/bots/chromium.mac/ios-simulator-full-configs.json
+++ b/ios/build/bots/chromium.mac/ios-simulator-full-configs.json
@@ -3,7 +3,7 @@
     "Runs tests on 64-bit iOS 10 and 11  tests on iPad, iPhone,",
     "@3x, and @2x on main waterfall ios-simulator-full-configs."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[\"x86\"]",
     "goma_dir=\"$(goma_dir)\"",
@@ -17,49 +17,42 @@
     "all"
   ],
   "configuration": "Debug",
-  "sdk": "iphonesimulator11.0",
+  "sdk": "iphonesimulator11.2",
   "tests": [
     {
       "include": "eg_tests.json",
       "device type": "iPhone 6s Plus",
-      "os": "10.0",
-      "xcode version": "9.0"
+      "os": "10.0"
     },
     {
       "include": "eg_tests.json",
       "device type": "iPhone 7",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "eg_tests.json",
       "device type": "iPad Air 2",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "eg_tests.json",
       "device type": "iPad Air 2",
-      "os": "10.0",
-      "xcode version": "9.0"
+      "os": "10.0"
     },
     {
       "include": "eg_tests.json",
       "device type": "iPhone X",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "eg_cq_tests.json",
       "device type": "iPad Air 2",
-      "os": "10.0",
-      "xcode version": "9.0"
+      "os": "10.0"
     },
     {
       "include": "eg_cq_tests.json",
       "device type": "iPhone X",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     }
   ]
 }
diff --git a/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json b/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
index b7ce7429..aaca4c1c 100644
--- a/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
+++ b/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
@@ -1,9 +1,9 @@
 {
   "comments": [
-    "Tests for 64-bit iOS 11.0 simulators.",
+    "Tests for 64-bit iOS 11.2 simulators.",
     "Build is performed with gn+ninja."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[\"x86\"]",
     "goma_dir=\"$(goma_dir)\"",
@@ -22,7 +22,7 @@
     "all"
   ],
   "configuration": "Debug",
-  "sdk": "iphonesimulator11.0",
+  "sdk": "iphonesimulator11.2",
   "tests": [
   ]
 }
diff --git a/ios/build/bots/chromium.mac/ios-simulator.json b/ios/build/bots/chromium.mac/ios-simulator.json
index 8a348ba8..0ae3ed3 100644
--- a/ios/build/bots/chromium.mac/ios-simulator.json
+++ b/ios/build/bots/chromium.mac/ios-simulator.json
@@ -1,9 +1,10 @@
 {
   "comments": [
     "Runs tests on 64-bit iOS 10 and 11 tests",
-    "on iPad, iPhone, @3x, and @2x on main and CQ ios-simulator."
+    "on iPad, iPhone, @3x, and @2x on main and CQ ios-simulator.",
+    "Note: Xcode 9.2 requires Mac OS 10.12.6 or higher, hence 'host os'."
   ],
-  "xcode version": "9.0",
+  "xcode build version": "9C40b",
   "gn_args": [
     "additional_target_cpus=[\"x86\"]",
     "goma_dir=\"$(goma_dir)\"",
@@ -17,49 +18,42 @@
     "all"
   ],
   "configuration": "Debug",
-  "sdk": "iphonesimulator11.0",
+  "sdk": "iphonesimulator11.2",
   "tests": [
     {
       "include": "screen_size_dependent_tests.json",
       "device type": "iPhone 6s Plus",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "screen_size_dependent_tests.json",
       "device type": "iPhone 6s",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "common_tests.json",
       "device type": "iPhone 6s",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "screen_size_dependent_tests.json",
       "device type": "iPad Air 2",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     },
     {
       "include": "screen_size_dependent_tests.json",
       "device type": "iPad Air 2",
-      "os": "10.0",
-      "xcode version": "9.0"
+      "os": "10.0"
     },
     {
       "include": "common_tests.json",
       "device type": "iPad Air 2",
-      "os": "10.0",
-      "xcode version": "9.0"
+      "os": "10.0"
     },
     {
       "include": "eg_cq_tests.json",
       "device type": "iPhone 6s",
-      "os": "11.0",
-      "xcode version": "9.0"
+      "os": "11.2"
     }
   ]
 }
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm
index ebefb77..cf33438 100644
--- a/ios/chrome/app/main_controller.mm
+++ b/ios/chrome/app/main_controller.mm
@@ -2066,7 +2066,6 @@
 - (void)closeSettingsAnimated:(BOOL)animated
                    completion:(ProceduralBlock)completion {
   DCHECK(_settingsNavigationController);
-  [_settingsNavigationController settingsWillBeDismissed];
   UIViewController* presentingViewController =
       [_settingsNavigationController presentingViewController];
   DCHECK(presentingViewController);
diff --git a/ios/chrome/app/spotlight/BUILD.gn b/ios/chrome/app/spotlight/BUILD.gn
index 721505b..a5a2c55 100644
--- a/ios/chrome/app/spotlight/BUILD.gn
+++ b/ios/chrome/app/spotlight/BUILD.gn
@@ -29,11 +29,11 @@
     "//ios/chrome/app/strings",
     "//ios/chrome/browser",
     "//ios/chrome/browser/bookmarks",
-    "//ios/chrome/browser/content_suggestions",
     "//ios/chrome/browser/favicon",
     "//ios/chrome/browser/history",
     "//ios/chrome/browser/suggestions",
     "//ios/chrome/browser/sync",
+    "//ios/chrome/browser/ui/content_suggestions",
     "//ios/chrome/common/app_group",
     "//ios/public/provider/chrome/browser",
     "//ios/public/provider/chrome/browser/spotlight",
diff --git a/ios/chrome/app/spotlight/topsites_spotlight_manager.mm b/ios/chrome/app/spotlight/topsites_spotlight_manager.mm
index 36a7288..5b2df68 100644
--- a/ios/chrome/app/spotlight/topsites_spotlight_manager.mm
+++ b/ios/chrome/app/spotlight/topsites_spotlight_manager.mm
@@ -15,12 +15,12 @@
 #include "components/history/core/browser/top_sites_observer.h"
 #include "components/suggestions/suggestions_service.h"
 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h"
 #include "ios/chrome/browser/history/top_sites_factory.h"
 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h"
 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
 #include "ios/chrome/browser/sync/sync_observer_bridge.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
diff --git a/ios/chrome/browser/BUILD.gn b/ios/chrome/browser/BUILD.gn
index 9bf0ec57..bcb9abc8 100644
--- a/ios/chrome/browser/BUILD.gn
+++ b/ios/chrome/browser/BUILD.gn
@@ -39,8 +39,6 @@
     "chrome_browser_provider_observer_bridge.mm",
     "chrome_constants.cc",
     "chrome_constants.h",
-    "chrome_coordinator.h",
-    "chrome_coordinator.mm",
     "chrome_root_coordinator.h",
     "chrome_root_coordinator.mm",
     "chrome_switches.cc",
@@ -124,6 +122,7 @@
     "//ios/chrome/browser/ssl:features",
     "//ios/chrome/browser/sync/glue",
     "//ios/chrome/browser/ui/activity_services:features",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/external_search:features",
     "//ios/chrome/browser/ui/fullscreen",
     "//ios/chrome/browser/ui/history:history_base_feature",
diff --git a/ios/chrome/browser/about_flags.mm b/ios/chrome/browser/about_flags.mm
index 59235a83..aebbe8e 100644
--- a/ios/chrome/browser/about_flags.mm
+++ b/ios/chrome/browser/about_flags.mm
@@ -21,6 +21,7 @@
 #include "base/strings/sys_string_conversions.h"
 #include "base/sys_info.h"
 #include "base/task_scheduler/switches.h"
+#include "components/autofill/core/common/autofill_features.h"
 #include "components/dom_distiller/core/dom_distiller_switches.h"
 #include "components/feature_engagement/public/feature_constants.h"
 #include "components/feature_engagement/public/feature_list.h"
@@ -109,10 +110,6 @@
 //
 // When adding a new choice, add it to the end of the list.
 const flags_ui::FeatureEntry kFeatureEntries[] = {
-    {"contextual-search", flag_descriptions::kContextualSearch,
-     flag_descriptions::kContextualSearchDescription, flags_ui::kOsIos,
-     ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
-                               switches::kDisableContextualSearch)},
     {"browser-task-scheduler", flag_descriptions::kBrowserTaskScheduler,
      flag_descriptions::kBrowserTaskSchedulerDescription, flags_ui::kOsIos,
      ENABLE_DISABLE_VALUE_TYPE(switches::kEnableBrowserTaskScheduler,
@@ -202,7 +199,12 @@
     {"wk-http-system-cookie-store",
      flag_descriptions::kWKHTTPSystemCookieStoreName,
      flag_descriptions::kWKHTTPSystemCookieStoreName, flags_ui::kOsIos,
-     FEATURE_VALUE_TYPE(web::features::kWKHTTPSystemCookieStore)}};
+     FEATURE_VALUE_TYPE(web::features::kWKHTTPSystemCookieStore)},
+    {"show-autofill-type-predictions",
+     flag_descriptions::kShowAutofillTypePredictionsName,
+     flag_descriptions::kShowAutofillTypePredictionsDescription,
+     flags_ui::kOsIos,
+     FEATURE_VALUE_TYPE(autofill::features::kAutofillShowTypePredictions)}};
 
 // Add all switches from experimental flags to |command_line|.
 void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
diff --git a/ios/chrome/browser/autofill/autofill_controller.mm b/ios/chrome/browser/autofill/autofill_controller.mm
index 0c0e696..14935d7 100644
--- a/ios/chrome/browser/autofill/autofill_controller.mm
+++ b/ios/chrome/browser/autofill/autofill_controller.mm
@@ -192,9 +192,7 @@
 
 - (void)sendAutofillTypePredictionsToRenderer:
     (const std::vector<autofill::FormStructure*>&)forms {
-  NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
-  if ([standardDefaults boolForKey:@"ShowAutofillTypePredictions"])
-    [_autofillAgent renderAutofillTypePredictions:forms];
+  [_autofillAgent renderAutofillTypePredictions:forms];
 }
 
 @end
diff --git a/ios/chrome/browser/chrome_root_coordinator.h b/ios/chrome/browser/chrome_root_coordinator.h
index aafe02d1..eee54b7c 100644
--- a/ios/chrome/browser/chrome_root_coordinator.h
+++ b/ios/chrome/browser/chrome_root_coordinator.h
@@ -7,7 +7,7 @@
 
 #import <UIKit/UIKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 // A coordinator specialization for the case where the coordinator is
 // creating and managing the root view controller for a UIWindow.
diff --git a/ios/chrome/browser/chrome_switches.cc b/ios/chrome/browser/chrome_switches.cc
index c90abab..1ccc5280 100644
--- a/ios/chrome/browser/chrome_switches.cc
+++ b/ios/chrome/browser/chrome_switches.cc
@@ -12,9 +12,6 @@
 // all work out.
 // -----------------------------------------------------------------------------
 
-// Disables Contextual Search.
-const char kDisableContextualSearch[] = "disable-contextual-search";
-
 // Disable showing available password credentials in the keyboard accessory
 // view when focused on form fields.
 const char kDisableIOSPasswordSuggestions[] =
@@ -24,9 +21,6 @@
 const char kDisableThirdPartyKeyboardWorkaround[] =
     "disable-third-party-keyboard-workaround";
 
-// Enables Contextual Search.
-const char kEnableContextualSearch[] = "enable-contextual-search";
-
 // Enables support for Handoff from Chrome on iOS to the default browser of
 // other Apple devices.
 const char kEnableIOSHandoffToOtherDevices[] =
diff --git a/ios/chrome/browser/chrome_switches.h b/ios/chrome/browser/chrome_switches.h
index 45a5f6e..b365fbf 100644
--- a/ios/chrome/browser/chrome_switches.h
+++ b/ios/chrome/browser/chrome_switches.h
@@ -9,12 +9,10 @@
 
 namespace switches {
 
-extern const char kDisableContextualSearch[];
 extern const char kDisableIOSPasswordSuggestions[];
 extern const char kDisableNTPFavicons[];
 extern const char kDisableThirdPartyKeyboardWorkaround[];
 
-extern const char kEnableContextualSearch[];
 extern const char kEnableIOSHandoffToOtherDevices[];
 extern const char kEnableNTPFavicons[];
 extern const char kEnableSpotlightActions[];
diff --git a/ios/chrome/browser/content_suggestions/BUILD.gn b/ios/chrome/browser/content_suggestions/BUILD.gn
deleted file mode 100644
index a2a274d..0000000
--- a/ios/chrome/browser/content_suggestions/BUILD.gn
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 2017 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-source_set("content_suggestions") {
-  configs += [ "//build/config/compiler:enable_arc" ]
-  sources = [
-    "content_suggestions_alert_factory.h",
-    "content_suggestions_alert_factory.mm",
-    "content_suggestions_category_wrapper.h",
-    "content_suggestions_category_wrapper.mm",
-    "content_suggestions_coordinator.h",
-    "content_suggestions_coordinator.mm",
-    "content_suggestions_favicon_mediator.h",
-    "content_suggestions_favicon_mediator.mm",
-    "content_suggestions_header_view_controller.h",
-    "content_suggestions_header_view_controller.mm",
-    "content_suggestions_mediator.h",
-    "content_suggestions_mediator.mm",
-    "content_suggestions_metrics_recorder.h",
-    "content_suggestions_metrics_recorder.mm",
-    "content_suggestions_service_bridge_observer.h",
-    "content_suggestions_service_bridge_observer.mm",
-    "mediator_util.h",
-    "mediator_util.mm",
-    "ntp_home_mediator.h",
-    "ntp_home_mediator.mm",
-    "ntp_home_metrics.h",
-    "ntp_home_metrics.mm",
-  ]
-  deps = [
-    "//base",
-    "//components/favicon/core",
-    "//components/ntp_snippets",
-    "//components/ntp_tiles",
-    "//components/reading_list/core",
-    "//components/strings",
-    "//ios/chrome/app/strings",
-    "//ios/chrome/browser",
-    "//ios/chrome/browser/browser_state",
-    "//ios/chrome/browser/favicon",
-    "//ios/chrome/browser/metrics:metrics_internal",
-    "//ios/chrome/browser/ntp_snippets",
-    "//ios/chrome/browser/ntp_tiles",
-    "//ios/chrome/browser/reading_list",
-    "//ios/chrome/browser/search_engines",
-    "//ios/chrome/browser/tabs",
-    "//ios/chrome/browser/ui",
-    "//ios/chrome/browser/ui:notifications",
-    "//ios/chrome/browser/ui/alert_coordinator",
-    "//ios/chrome/browser/ui/collection_view/cells",
-    "//ios/chrome/browser/ui/commands",
-    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
-    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
-    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
-    "//ios/chrome/browser/ui/content_suggestions/cells",
-    "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
-    "//ios/chrome/browser/ui/content_suggestions/identifier",
-    "//ios/chrome/browser/ui/favicon",
-    "//ios/chrome/browser/ui/favicon:favicon_ui",
-    "//ios/chrome/browser/ui/ntp",
-    "//ios/chrome/browser/ui/ntp:ntp_header",
-    "//ios/chrome/browser/ui/ntp:ntp_internal",
-    "//ios/chrome/browser/ui/overscroll_actions",
-    "//ios/chrome/browser/ui/reading_list",
-    "//ios/chrome/browser/ui/toolbar",
-    "//ios/chrome/browser/ui/toolbar:toolbar_ui",
-    "//ios/chrome/browser/ui/toolbar/clean:toolbar_ui",
-    "//ios/chrome/browser/web_state_list",
-    "//ios/chrome/common/app_group",
-    "//ios/public/provider/chrome/browser",
-    "//ios/public/provider/chrome/browser/images",
-    "//ios/public/provider/chrome/browser/ui",
-    "//ios/public/provider/chrome/browser/voice",
-    "//ios/web",
-    "//ui/base",
-    "//ui/strings",
-  ]
-}
-
-source_set("unit_tests") {
-  testonly = true
-  sources = [
-    "content_suggestions_category_wrapper_unittest.mm",
-    "ntp_home_mediator_unittest.mm",
-  ]
-  deps = [
-    ":content_suggestions",
-    "//components/ntp_snippets",
-    "//ios/chrome/browser",
-    "//ios/chrome/browser/browser_state:test_support",
-    "//ios/chrome/browser/ntp_snippets",
-    "//ios/chrome/browser/search_engines",
-    "//ios/chrome/browser/ui",
-    "//ios/chrome/browser/ui:notifications",
-    "//ios/chrome/browser/ui/collection_view",
-    "//ios/chrome/browser/ui/commands",
-    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
-    "//ios/chrome/browser/ui/content_suggestions/cells",
-    "//ios/chrome/browser/ui/toolbar/test",
-    "//ios/chrome/browser/web_state_list",
-    "//ios/chrome/browser/web_state_list:test_support",
-    "//ios/public/provider/chrome/browser/ui",
-    "//ios/web/public/test",
-    "//ios/web/public/test/fakes",
-    "//testing/gtest",
-    "//third_party/ocmock",
-  ]
-  configs += [ "//build/config/compiler:enable_arc" ]
-}
diff --git a/ios/chrome/browser/content_suggestions/OWNERS b/ios/chrome/browser/content_suggestions/OWNERS
deleted file mode 100644
index f192143..0000000
--- a/ios/chrome/browser/content_suggestions/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-gambard@chromium.org
-
-# TEAM: ios-directory-owners@chromium.org
-# OS: iOS
diff --git a/ios/chrome/browser/crash_report/crash_keys.cc b/ios/chrome/browser/crash_report/crash_keys.cc
index 9294980..c532e1e 100644
--- a/ios/chrome/browser/crash_report/crash_keys.cc
+++ b/ios/chrome/browser/crash_report/crash_keys.cc
@@ -11,13 +11,5 @@
 #include "components/crash/core/common/crash_keys.h"
 
 size_t RegisterChromeIOSCrashKeys() {
-  // The following keys may be chunked by the underlying crash logging system,
-  // but ultimately constitute a single key-value pair.
-  base::debug::CrashKey fixed_keys[] = {
-      {crash_keys::kNumVariations, crash_keys::kSmallSize},
-      {crash_keys::kVariations, crash_keys::kHugeSize},
-  };
-
-  return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
-                                    crash_keys::kChunkMaxLength);
+  return 0;
 }
diff --git a/ios/chrome/browser/ios_chrome_flag_descriptions.cc b/ios/chrome/browser/ios_chrome_flag_descriptions.cc
index c9114c6..a2d9890d 100644
--- a/ios/chrome/browser/ios_chrome_flag_descriptions.cc
+++ b/ios/chrome/browser/ios_chrome_flag_descriptions.cc
@@ -117,6 +117,11 @@
     "When enabled, uses new Download Manager UI and ios/web Download API as "
     "backend.";
 
+const char kShowAutofillTypePredictionsName[] = "Show Autofill predictions";
+const char kShowAutofillTypePredictionsDescription[] =
+    "Annotates web forms with Autofill field type predictions as placeholder "
+    "text.";
+
 const char kTabSwitcherPresentsBVCName[] = "TabSwitcher Presents BVC";
 const char kTabSwitcherPresentsBVCDescription[] =
     "When enabled, the tab switcher will present the BVC, so that when the "
diff --git a/ios/chrome/browser/ios_chrome_flag_descriptions.h b/ios/chrome/browser/ios_chrome_flag_descriptions.h
index 4469c59..3554ac2a 100644
--- a/ios/chrome/browser/ios_chrome_flag_descriptions.h
+++ b/ios/chrome/browser/ios_chrome_flag_descriptions.h
@@ -109,6 +109,11 @@
 extern const char kNewFileDownloadName[];
 extern const char kNewFileDownloadDescription[];
 
+// Title and description for the flag to enable annotating web forms with
+// Autofill field type predictions as placeholder.
+extern const char kShowAutofillTypePredictionsName[];
+extern const char kShowAutofillTypePredictionsDescription[];
+
 // Title and description for the flag to enable the TabSwitcher to present the
 // BVC.
 extern const char kTabSwitcherPresentsBVCName[];
diff --git a/ios/chrome/browser/ui/BUILD.gn b/ios/chrome/browser/ui/BUILD.gn
index aab5ca1..e6f798301 100644
--- a/ios/chrome/browser/ui/BUILD.gn
+++ b/ios/chrome/browser/ui/BUILD.gn
@@ -275,7 +275,6 @@
     "//ios/chrome/browser",
     "//ios/chrome/browser/bookmarks",
     "//ios/chrome/browser/browser_state",
-    "//ios/chrome/browser/content_suggestions",
     "//ios/chrome/browser/download",
     "//ios/chrome/browser/favicon",
     "//ios/chrome/browser/feature_engagement",
@@ -308,6 +307,7 @@
     "//ios/chrome/browser/ui/bubble",
     "//ios/chrome/browser/ui/colors",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/content_suggestions",
     "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
     "//ios/chrome/browser/ui/context_menu",
     "//ios/chrome/browser/ui/dialogs:dialogs_internal",
diff --git a/ios/chrome/browser/ui/activity_services/BUILD.gn b/ios/chrome/browser/ui/activity_services/BUILD.gn
index 9746f894..d4823bc4 100644
--- a/ios/chrome/browser/ui/activity_services/BUILD.gn
+++ b/ios/chrome/browser/ui/activity_services/BUILD.gn
@@ -70,6 +70,7 @@
     "//ios/chrome/browser/tabs",
     "//ios/chrome/browser/ui/activity_services/requirements",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//url",
   ]
 }
diff --git a/ios/chrome/browser/ui/activity_services/activity_service_legacy_coordinator.h b/ios/chrome/browser/ui/activity_services/activity_service_legacy_coordinator.h
index dbf8540..1a409cb 100644
--- a/ios/chrome/browser/ui/activity_services/activity_service_legacy_coordinator.h
+++ b/ios/chrome/browser/ui/activity_services/activity_service_legacy_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_SERVICE_LEGACY_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_SERVICE_LEGACY_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 @protocol ActivityServicePositioner;
 @protocol ActivityServicePresentation;
diff --git a/ios/chrome/browser/ui/alert_coordinator/BUILD.gn b/ios/chrome/browser/ui/alert_coordinator/BUILD.gn
index f252434..c66a8158 100644
--- a/ios/chrome/browser/ui/alert_coordinator/BUILD.gn
+++ b/ios/chrome/browser/ui/alert_coordinator/BUILD.gn
@@ -19,6 +19,7 @@
     "//components/strings",
     "//ios/chrome/browser",
     "//ios/chrome/browser/browser_state",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/web",
     "//ui/base",
     "//ui/strings",
@@ -60,6 +61,7 @@
     "//components/strings",
     "//ios/chrome/browser",
     "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/material_components",
     "//ios/third_party/material_components_ios",
     "//ios/third_party/material_roboto_font_loader_ios",
diff --git a/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h b/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
index 40399a4..442ea16e 100644
--- a/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
+++ b/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 
 #include "base/ios/block_types.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 // A coordinator specialization for the case where the coordinator is creating
 // and managing a modal alert to be displayed to the user.
diff --git a/ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.h b/ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.h
index c677835..c367709c 100644
--- a/ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.h
+++ b/ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.h
@@ -6,7 +6,7 @@
 #define IOS_CHROME_BROWSER_UI_ALERT_COORDINATOR_LOADING_ALERT_COORDINATOR_H_
 
 #include "base/ios/block_types.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 // Coordinator displaying an activity indicator with a title and a cancel
 // button.
diff --git a/ios/chrome/browser/ui/alert_coordinator/repost_form_coordinator.h b/ios/chrome/browser/ui/alert_coordinator/repost_form_coordinator.h
index ead9ec9..25d5e822 100644
--- a/ios/chrome/browser/ui/alert_coordinator/repost_form_coordinator.h
+++ b/ios/chrome/browser/ui/alert_coordinator/repost_form_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 
 #import "base/ios/block_types.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/web/public/web_state/web_state.h"
 
 // Creates and manages a repost form dialog that has Continue and Cancel
diff --git a/ios/chrome/browser/ui/authentication/authentication_flow_performer.mm b/ios/chrome/browser/ui/authentication/authentication_flow_performer.mm
index da08f6a..d3358bb 100644
--- a/ios/chrome/browser/ui/authentication/authentication_flow_performer.mm
+++ b/ios/chrome/browser/ui/authentication/authentication_flow_performer.mm
@@ -92,7 +92,6 @@
   [_alertCoordinator executeCancelHandler];
   [_alertCoordinator stop];
   if (_navigationController) {
-    [_navigationController settingsWillBeDismissed];
     _navigationController = nil;
     [[_delegate presentingViewController] dismissViewControllerAnimated:NO
                                                              completion:nil];
@@ -409,7 +408,6 @@
     strongSelf->_navigationController = nil;
     [[strongSelf delegate] didChooseClearDataPolicy:shouldClearData];
   };
-  [_navigationController settingsWillBeDismissed];
   [[_delegate presentingViewController] dismissViewControllerAnimated:YES
                                                            completion:block];
 }
@@ -427,7 +425,6 @@
     strongSelf->_navigationController = nil;
     [[strongSelf delegate] didChooseCancel];
   };
-  [_navigationController settingsWillBeDismissed];
   [[_delegate presentingViewController] dismissViewControllerAnimated:YES
                                                            completion:block];
 }
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
index 5cc6a5e1e..36f4ed2 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
@@ -1097,7 +1097,7 @@
 - (void)setupNavigationBar {
   self.navigationController.navigationBarHidden = YES;
   self.appBar = [[MDCAppBar alloc] init];
-  [self addChildViewController:_appBar.headerViewController];
+  [self addChildViewController:self.appBar.headerViewController];
   ConfigureAppBarWithCardStyle(self.appBar);
   // Set the header view's tracking scroll view.
   self.appBar.headerViewController.headerView.trackingScrollView =
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 636f572..7c9819f6 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -205,6 +205,7 @@
 #import "ios/chrome/browser/ui/translate/language_selection_coordinator.h"
 #include "ios/chrome/browser/ui/ui_util.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
+#import "ios/chrome/browser/ui/util/named_guide.h"
 #import "ios/chrome/browser/ui/util/pasteboard_util.h"
 #import "ios/chrome/browser/ui/voice/text_to_speech_player.h"
 #include "ios/chrome/browser/upgrade/upgrade_center.h"
@@ -1954,7 +1955,8 @@
   _toolbarCoordinator = [[LegacyToolbarCoordinator alloc]
           initWithBaseViewController:self
       toolsMenuConfigurationProvider:self
-                          dispatcher:self.dispatcher];
+                          dispatcher:self.dispatcher
+                        browserState:_browserState];
 
   _sideSwipeController.toolbarInteractionHandler = _toolbarCoordinator;
 
@@ -2068,6 +2070,17 @@
   _sadTabCoordinator.baseViewController = self;
   _sadTabCoordinator.dispatcher = self.dispatcher;
 
+  // If there are any existing SadTabHelpers in |_model|, update the helpers
+  // delegate with the new |_sadTabCoordinator|.
+  for (NSUInteger i = 0; i < _model.count; i++) {
+    SadTabTabHelper* sadTabHelper =
+        SadTabTabHelper::FromWebState([_model tabAtIndex:i].webState);
+    DCHECK(sadTabHelper);
+    if (sadTabHelper) {
+      sadTabHelper->SetDelegate(_sadTabCoordinator);
+    }
+  }
+
   _pageInfoCoordinator =
       [[PageInfoLegacyCoordinator alloc] initWithBaseViewController:self];
   _pageInfoCoordinator.browserState = _browserState;
@@ -2120,10 +2133,13 @@
   if (initialLayout)
     [self.view insertSubview:infoBarContainerView aboveSubview:_contentArea];
 
-  // Place the toolbar controller above the infobar container.
-  if (initialLayout)
+  // Place the toolbar controller above the infobar container and adds the
+  // omnibox layout guide.
+  if (initialLayout) {
     [[self view] insertSubview:_toolbarCoordinator.toolbarViewController.view
                   aboveSubview:infoBarContainerView];
+    AddNamedGuide(kOmniboxGuide, self.view);
+  }
   minY += CGRectGetHeight(toolbarFrame);
   if (initialLayout)
     [_toolbarCoordinator.toolbarViewController
diff --git a/ios/chrome/browser/ui/browser_view_controller_unittest.mm b/ios/chrome/browser/ui/browser_view_controller_unittest.mm
index 324b13d..9e1ef24 100644
--- a/ios/chrome/browser/ui/browser_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/browser_view_controller_unittest.mm
@@ -7,7 +7,6 @@
 
 #include <memory>
 
-#include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/memory/ptr_util.h"
@@ -24,7 +23,6 @@
 #include "ios/chrome/browser/bookmarks/bookmark_new_generation_features.h"
 #import "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
 #include "ios/chrome/browser/chrome_paths.h"
-#include "ios/chrome/browser/chrome_switches.h"
 #include "ios/chrome/browser/chrome_url_constants.h"
 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h"
 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
@@ -211,13 +209,6 @@
  protected:
   void SetUp() override {
     BlockCleanupTest::SetUp();
-    // Disable Contextual Search on the command line.
-    if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
-            switches::kDisableContextualSearch)) {
-      base::CommandLine::ForCurrentProcess()->AppendSwitch(
-          switches::kDisableContextualSearch);
-    }
-
     // Set up a TestChromeBrowserState instance.
     TestChromeBrowserState::Builder test_cbs_builder;
     test_cbs_builder.AddTestingFactory(
diff --git a/ios/chrome/browser/ui/content_suggestions/BUILD.gn b/ios/chrome/browser/ui/content_suggestions/BUILD.gn
index a46fe7a..3f3af15 100644
--- a/ios/chrome/browser/ui/content_suggestions/BUILD.gn
+++ b/ios/chrome/browser/ui/content_suggestions/BUILD.gn
@@ -2,6 +2,83 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+source_set("content_suggestions") {
+  sources = [
+    "content_suggestions_alert_factory.h",
+    "content_suggestions_alert_factory.mm",
+    "content_suggestions_category_wrapper.h",
+    "content_suggestions_category_wrapper.mm",
+    "content_suggestions_coordinator.h",
+    "content_suggestions_coordinator.mm",
+    "content_suggestions_favicon_mediator.h",
+    "content_suggestions_favicon_mediator.mm",
+    "content_suggestions_header_view_controller.h",
+    "content_suggestions_header_view_controller.mm",
+    "content_suggestions_mediator.h",
+    "content_suggestions_mediator.mm",
+    "content_suggestions_metrics_recorder.h",
+    "content_suggestions_metrics_recorder.mm",
+    "content_suggestions_service_bridge_observer.h",
+    "content_suggestions_service_bridge_observer.mm",
+    "mediator_util.h",
+    "mediator_util.mm",
+    "ntp_home_mediator.h",
+    "ntp_home_mediator.mm",
+    "ntp_home_metrics.h",
+    "ntp_home_metrics.mm",
+  ]
+  deps = [
+    "//base",
+    "//components/favicon/core",
+    "//components/ntp_snippets",
+    "//components/ntp_tiles",
+    "//components/reading_list/core",
+    "//components/strings",
+    "//ios/chrome/app/strings",
+    "//ios/chrome/browser",
+    "//ios/chrome/browser/browser_state",
+    "//ios/chrome/browser/favicon",
+    "//ios/chrome/browser/metrics:metrics_internal",
+    "//ios/chrome/browser/ntp_snippets",
+    "//ios/chrome/browser/ntp_tiles",
+    "//ios/chrome/browser/reading_list",
+    "//ios/chrome/browser/search_engines",
+    "//ios/chrome/browser/tabs",
+    "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui:notifications",
+    "//ios/chrome/browser/ui/alert_coordinator",
+    "//ios/chrome/browser/ui/collection_view/cells",
+    "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
+    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
+    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
+    "//ios/chrome/browser/ui/content_suggestions/cells",
+    "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
+    "//ios/chrome/browser/ui/content_suggestions/identifier",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
+    "//ios/chrome/browser/ui/favicon",
+    "//ios/chrome/browser/ui/favicon:favicon_ui",
+    "//ios/chrome/browser/ui/ntp",
+    "//ios/chrome/browser/ui/ntp:ntp_header",
+    "//ios/chrome/browser/ui/ntp:ntp_internal",
+    "//ios/chrome/browser/ui/overscroll_actions",
+    "//ios/chrome/browser/ui/reading_list",
+    "//ios/chrome/browser/ui/toolbar",
+    "//ios/chrome/browser/ui/toolbar:toolbar_ui",
+    "//ios/chrome/browser/ui/toolbar/clean:toolbar_ui",
+    "//ios/chrome/browser/web_state_list",
+    "//ios/chrome/common/app_group",
+    "//ios/public/provider/chrome/browser",
+    "//ios/public/provider/chrome/browser/images",
+    "//ios/public/provider/chrome/browser/ui",
+    "//ios/public/provider/chrome/browser/voice",
+    "//ios/web",
+    "//ui/base",
+    "//ui/strings",
+  ]
+  configs += [ "//build/config/compiler:enable_arc" ]
+}
+
 source_set("content_suggestions_ui") {
   sources = [
     "content_suggestions_collection_controlling.h",
@@ -84,20 +161,42 @@
 source_set("unit_tests") {
   testonly = true
   sources = [
+    "content_suggestions_category_wrapper_unittest.mm",
     "content_suggestions_collection_updater_unittest.mm",
     "content_suggestions_collection_utils_unittest.mm",
     "content_suggestions_header_synchronizer_unittest.mm",
+    "ntp_home_mediator_unittest.mm",
   ]
   deps = [
+    ":content_suggestions",
     ":content_suggestions_ui",
     ":content_suggestions_ui_util",
     "//base",
+    "//components/ntp_snippets",
+    "//ios/chrome/browser",
+    "//ios/chrome/browser/browser_state:test_support",
+    "//ios/chrome/browser/ntp_snippets",
+    "//ios/chrome/browser/search_engines",
     "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui:notifications",
     "//ios/chrome/browser/ui/collection_view",
+    "//ios/chrome/browser/ui/collection_view",
+    "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
+    "//ios/chrome/browser/ui/content_suggestions/cells",
     "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
     "//ios/chrome/browser/ui/content_suggestions/identifier",
+    "//ios/chrome/browser/ui/toolbar/test",
+    "//ios/chrome/browser/web_state_list",
+    "//ios/chrome/browser/web_state_list:test_support",
     "//ios/chrome/test/base",
+    "//ios/public/provider/chrome/browser/ui",
+    "//ios/web/public/test",
+    "//ios/web/public/test/fakes",
     "//testing/gtest",
+    "//testing/gtest",
+    "//third_party/ocmock",
     "//third_party/ocmock",
   ]
   configs += [ "//build/config/compiler:enable_arc" ]
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.h
similarity index 87%
rename from ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.h
index c9798ade..211d890 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
 
 #import <UIKit/UIKit.h>
 
@@ -40,4 +40,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ALERT_FACTORY_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.mm
similarity index 98%
rename from ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.mm
index 206a0f98..2d2fca4 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.h"
 
 #import "ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_gesture_commands.h"
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h
similarity index 74%
rename from ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h
index c7e052b..25fc31a 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
 
 #import <Foundation/Foundation.h>
 
@@ -25,4 +25,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_CATEGORY_WRAPPER_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.mm
similarity index 94%
rename from ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.mm
index 22678c8..43c9272 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h"
 
 #include "base/mac/foundation_util.h"
 
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper_unittest.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper_unittest.mm
similarity index 96%
rename from ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper_unittest.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper_unittest.mm
index 6ae8a72..1d9adba 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper_unittest.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper_unittest.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h"
 
 #include "components/ntp_snippets/category.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_coordinator.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h
similarity index 83%
rename from ios/chrome/browser/content_suggestions/content_suggestions_coordinator.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h
index 701d60d..57245ce 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_coordinator.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h"
 
 namespace ios {
@@ -47,4 +47,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_COORDINATOR_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_coordinator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
similarity index 95%
rename from ios/chrome/browser/content_suggestions/content_suggestions_coordinator.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
index 6f9ebde6..526a8ab 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_coordinator.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
@@ -2,18 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_coordinator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h"
 
 #include "base/mac/foundation_util.h"
 #include "components/ntp_snippets/content_suggestions_service.h"
 #include "components/ntp_snippets/remote/remote_suggestions_scheduler.h"
 #include "components/ntp_tiles/most_visited_sites.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h"
-#import "ios/chrome/browser/content_suggestions/ntp_home_mediator.h"
-#import "ios/chrome/browser/content_suggestions/ntp_home_metrics.h"
 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_cache_factory.h"
 #include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h"
 #include "ios/chrome/browser/favicon/large_icon_cache.h"
@@ -26,9 +21,14 @@
 #import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_synchronizer.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller_audience.h"
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h"
 #import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h"
 #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h"
 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h"
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h
index 378101f8..a2c2396 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h
@@ -8,6 +8,7 @@
 @class CollectionViewItem;
 @class ContentSuggestionIdentifier;
 @class ContentSuggestionsSectionInformation;
+@protocol SuggestedContent;
 
 // Data sink for the ContentSuggestions. It will be notified when new data needs
 // to be pulled.
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h
similarity index 89%
rename from ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h
index 32239bc..b40d3dc 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
 
 #import <UIKit/UIKit.h>
 
@@ -60,4 +60,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_MEDIATOR_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.mm
similarity index 98%
rename from ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.mm
index c2226c3d..df94192 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h"
 
 #include "base/mac/bind_objc_block.h"
 #include "components/favicon/core/large_icon_service.h"
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h
similarity index 90%
rename from ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h
index 24cc57f..81fc054b 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
 
 #import <UIKit/UIKit.h>
 
@@ -64,4 +64,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_HEADER_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.mm
similarity index 99%
rename from ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.mm
index 33261294..ea3d283 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h"
 
 #include "base/logging.h"
 #include "base/mac/foundation_util.h"
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h
similarity index 85%
rename from ios/chrome/browser/content_suggestions/content_suggestions_mediator.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h
index f60d97fc..10f86ce9 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h
@@ -2,16 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
 
 #import <UIKit/UIKit.h>
 
 #include <memory>
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_source.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h"
 
 namespace favicon {
 class LargeIconService;
@@ -78,4 +78,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
similarity index 97%
rename from ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
index bf19030f..c91b267 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h"
 
 #include "base/mac/bind_objc_block.h"
 #include "base/mac/foundation_util.h"
@@ -16,21 +16,21 @@
 #include "components/ntp_tiles/most_visited_sites.h"
 #include "components/ntp_tiles/ntp_tile.h"
 #include "ios/chrome/browser/application_context.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_favicon_mediator.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h"
-#import "ios/chrome/browser/content_suggestions/mediator_util.h"
 #include "ios/chrome/browser/ntp_tiles/most_visited_sites_observer_bridge.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_learn_more_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_whats_new_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_mediator.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_provider.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.h"
 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h"
+#import "ios/chrome/browser/ui/content_suggestions/mediator_util.h"
 #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h"
 #include "ios/chrome/browser/ui/ntp/ntp_tile_saver.h"
 #include "ios/chrome/common/app_group/app_group_constants.h"
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h
similarity index 88%
rename from ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h
index 62ec5015..c6c29ac 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
 
 #import <UIKit/UIKit.h>
 
@@ -47,4 +47,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_METRICS_RECORDER_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.mm
similarity index 95%
rename from ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.mm
index aea4d52..f40d73f1 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.mm
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h"
 
 #include "base/mac/foundation_util.h"
 #include "components/ntp_snippets/content_suggestions_metrics.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h"
 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h"
 
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.h
similarity index 91%
rename from ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.h
index f574a1f..f6bdd64 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
 
 #include "components/ntp_snippets/content_suggestions_service.h"
 
@@ -66,4 +66,4 @@
   DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceBridge);
 };
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_SERVICE_BRIDGE_OBSERVER_H_
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.mm
similarity index 94%
rename from ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.mm
index ad55dde8..bd03022 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/content_suggestions_service_bridge_observer.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_service_bridge_observer.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
diff --git a/ios/chrome/browser/content_suggestions/mediator_util.h b/ios/chrome/browser/ui/content_suggestions/mediator_util.h
similarity index 93%
rename from ios/chrome/browser/content_suggestions/mediator_util.h
rename to ios/chrome/browser/ui/content_suggestions/mediator_util.h
index 3eb04dd..9e1db226 100644
--- a/ios/chrome/browser/content_suggestions/mediator_util.h
+++ b/ios/chrome/browser/ui/content_suggestions/mediator_util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
 
 #include "base/bind.h"
 #include "base/optional.h"
@@ -76,4 +76,4 @@
 
 content_suggestions::StatusCode ConvertStatusCode(ntp_snippets::Status status);
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_MEDIATOR_UTIL_H_
diff --git a/ios/chrome/browser/content_suggestions/mediator_util.mm b/ios/chrome/browser/ui/content_suggestions/mediator_util.mm
similarity index 97%
rename from ios/chrome/browser/content_suggestions/mediator_util.mm
rename to ios/chrome/browser/ui/content_suggestions/mediator_util.mm
index 19f07e1ad..fb6aba1 100644
--- a/ios/chrome/browser/content_suggestions/mediator_util.mm
+++ b/ios/chrome/browser/ui/content_suggestions/mediator_util.mm
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/mediator_util.h"
+#import "ios/chrome/browser/ui/content_suggestions/mediator_util.h"
 
 #include "base/strings/sys_string_conversions.h"
 #include "components/ntp_snippets/category.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.h"
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_category_wrapper.h"
 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
 #include "ios/chrome/grit/ios_strings.h"
 #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/content_suggestions/ntp_home_mediator.h b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h
similarity index 92%
rename from ios/chrome/browser/content_suggestions/ntp_home_mediator.h
rename to ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h
index fde2c5c..124474a 100644
--- a/ios/chrome/browser/content_suggestions/ntp_home_mediator.h
+++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
 
 #import <UIKit/UIKit.h>
 
@@ -74,4 +74,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_MEDIATOR_H_
diff --git a/ios/chrome/browser/content_suggestions/ntp_home_mediator.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm
similarity index 97%
rename from ios/chrome/browser/content_suggestions/ntp_home_mediator.mm
rename to ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm
index ed10108..684e62a1 100644
--- a/ios/chrome/browser/content_suggestions/ntp_home_mediator.mm
+++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/ntp_home_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h"
 
 #include "base/mac/foundation_util.h"
 #include "base/metrics/user_metrics.h"
@@ -10,10 +10,6 @@
 #include "components/ntp_snippets/content_suggestions_service.h"
 #include "components/strings/grit/components_strings.h"
 #include "ios/chrome/browser/chrome_url_constants.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_alert_factory.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_metrics_recorder.h"
-#import "ios/chrome/browser/content_suggestions/ntp_home_metrics.h"
 #import "ios/chrome/browser/metrics/new_tab_page_uma.h"
 #import "ios/chrome/browser/search_engines/search_engine_observer_bridge.h"
 #import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h"
@@ -23,9 +19,13 @@
 #import "ios/chrome/browser/ui/commands/snackbar_commands.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h"
 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_alert_factory.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_recorder.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h"
 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller_audience.h"
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_consumer.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h"
 #import "ios/chrome/browser/ui/favicon/favicon_attributes.h"
 #import "ios/chrome/browser/ui/location_bar_notification_names.h"
 #include "ios/chrome/browser/ui/ntp/metrics.h"
diff --git a/ios/chrome/browser/content_suggestions/ntp_home_mediator_unittest.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator_unittest.mm
similarity index 99%
rename from ios/chrome/browser/content_suggestions/ntp_home_mediator_unittest.mm
rename to ios/chrome/browser/ui/content_suggestions/ntp_home_mediator_unittest.mm
index 56f9f74..9d1fd69 100644
--- a/ios/chrome/browser/content_suggestions/ntp_home_mediator_unittest.mm
+++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator_unittest.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/ntp_home_mediator.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h"
 
 #include "base/memory/ptr_util.h"
 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
diff --git a/ios/chrome/browser/content_suggestions/ntp_home_metrics.h b/ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h
similarity index 80%
rename from ios/chrome/browser/content_suggestions/ntp_home_metrics.h
rename to ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h
index 0cd7b4bd..815d7e79 100644
--- a/ios/chrome/browser/content_suggestions/ntp_home_metrics.h
+++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
-#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
 
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
 
@@ -31,4 +31,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
+#endif  // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_NTP_HOME_METRICS_H_
diff --git a/ios/chrome/browser/content_suggestions/ntp_home_metrics.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.mm
similarity index 93%
rename from ios/chrome/browser/content_suggestions/ntp_home_metrics.mm
rename to ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.mm
index 964250f..8c81661 100644
--- a/ios/chrome/browser/content_suggestions/ntp_home_metrics.mm
+++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/content_suggestions/ntp_home_metrics.h"
+#import "ios/chrome/browser/ui/content_suggestions/ntp_home_metrics.h"
 
 #include "base/metrics/histogram_macros.h"
 
diff --git a/ios/chrome/browser/ui/context_menu/BUILD.gn b/ios/chrome/browser/ui/context_menu/BUILD.gn
index 51f8f8eb..a033b2f 100644
--- a/ios/chrome/browser/ui/context_menu/BUILD.gn
+++ b/ios/chrome/browser/ui/context_menu/BUILD.gn
@@ -12,6 +12,7 @@
     "//base",
     "//ios/chrome/browser",
     "//ios/chrome/browser/ui/alert_coordinator",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/web",
     "//ui/base",
     "//ui/strings",
diff --git a/ios/chrome/browser/ui/context_menu/context_menu_coordinator.h b/ios/chrome/browser/ui/context_menu/context_menu_coordinator.h
index 7659e4ad..efdb558 100644
--- a/ios/chrome/browser/ui/context_menu/context_menu_coordinator.h
+++ b/ios/chrome/browser/ui/context_menu/context_menu_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 
 #include "base/ios/block_types.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 namespace web {
 struct ContextMenuParams;
diff --git a/ios/chrome/browser/ui/contextual_search/BUILD.gn b/ios/chrome/browser/ui/contextual_search/BUILD.gn
index 74f1176..03a44e3 100644
--- a/ios/chrome/browser/ui/contextual_search/BUILD.gn
+++ b/ios/chrome/browser/ui/contextual_search/BUILD.gn
@@ -20,6 +20,14 @@
   ]
 }
 
+source_set("switches") {
+  configs += [ "//build/config/compiler:enable_arc" ]
+  sources = [
+    "switches.cc",
+    "switches.h",
+  ]
+}
+
 source_set("contextual_search") {
   configs += [ "//build/config/compiler:enable_arc" ]
   sources = [
@@ -43,6 +51,7 @@
   ]
   deps = [
     ":injected_js",
+    ":switches",
     "//base",
     "//components/google/core/browser",
     "//components/prefs",
@@ -99,6 +108,7 @@
   deps = [
     ":contextual_search",
     ":resources_unit_tests",
+    ":switches",
     ":test_support",
     "//base",
     "//base/test:test_support",
diff --git a/ios/chrome/browser/ui/contextual_search/switches.cc b/ios/chrome/browser/ui/contextual_search/switches.cc
new file mode 100644
index 0000000..28b702b1
--- /dev/null
+++ b/ios/chrome/browser/ui/contextual_search/switches.cc
@@ -0,0 +1,17 @@
+// 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.
+
+#include "ios/chrome/browser/ui/contextual_search/switches.h"
+
+namespace contextual_search {
+namespace switches {
+
+// Disables Contextual Search.
+const char kDisableContextualSearch[] = "disable-contextual-search";
+
+// Enables Contextual Search.
+const char kEnableContextualSearch[] = "enable-contextual-search";
+
+}  // namespace switches
+}  // namespace contextual_search
diff --git a/ios/chrome/browser/ui/contextual_search/switches.h b/ios/chrome/browser/ui/contextual_search/switches.h
new file mode 100644
index 0000000..572c9ad
--- /dev/null
+++ b/ios/chrome/browser/ui/contextual_search/switches.h
@@ -0,0 +1,17 @@
+// 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_CONTEXTUAL_SEARCH_SWITCHES_H_
+#define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_SWITCHES_H_
+
+namespace contextual_search {
+namespace switches {
+
+extern const char kDisableContextualSearch[];
+extern const char kEnableContextualSearch[];
+
+}  // namespace switches
+}  // namespace contextual_search
+
+#endif  // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_SWITCHES_H_
diff --git a/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator.mm b/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator.mm
index 0fd872d9..ff831bb 100644
--- a/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator.mm
+++ b/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator.mm
@@ -13,12 +13,12 @@
 #include "components/search_engines/template_url_service.h"
 #include "ios/chrome/app/tests_hook.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#include "ios/chrome/browser/chrome_switches.h"
 #include "ios/chrome/browser/pref_names.h"
 #import "ios/chrome/browser/prefs/pref_observer_bridge.h"
 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
 #include "ios/chrome/browser/sync/sync_setup_service.h"
 #include "ios/chrome/browser/sync/sync_setup_service_factory.h"
+#include "ios/chrome/browser/ui/contextual_search/switches.h"
 #include "net/base/network_change_notifier.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -66,19 +66,21 @@
 @synthesize observing = _observing;
 
 + (BOOL)isTouchToSearchAvailableOnDevice {
-  // By default the feature is not available. If the enable flag
-  // (switches::kEnableContextualSearch) is flipped, then it is available.
-  // The disable switch (switches::kDisableContextualSearch) is also supported,
-  // although it is only useful when Finch experiments are also supported.
+  // By default the feature is not available.
+  // - If the enable flag (contextual_search::switches::kEnableContextualSearch)
+  //   is flipped, then it is available.
+  // - A disable switch (contextual_search::switches::kDisableContextualSearch)
+  //   is also supported, although it is only useful when Finch experiments are
+  //   also supported.
 
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kDisableContextualSearch)) {
+          contextual_search::switches::kDisableContextualSearch)) {
     // If both enable and disable flags are present, disable wins.
     return NO;
   }
 
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableContextualSearch)) {
+          contextual_search::switches::kEnableContextualSearch)) {
     // Even if the command line flag is flipped, don't enable the feature if
     // test hooks disable it.
     return !tests_hook::DisableContextualSearch();
diff --git a/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator_unittest.mm b/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator_unittest.mm
index 2e4055d7..59dab1f 100644
--- a/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator_unittest.mm
+++ b/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator_unittest.mm
@@ -19,13 +19,13 @@
 #include "components/search_engines/template_url_data.h"
 #include "components/search_engines/template_url_service.h"
 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
-#include "ios/chrome/browser/chrome_switches.h"
 #include "ios/chrome/browser/pref_names.h"
 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.h"
 #include "ios/chrome/browser/sync/sync_setup_service_factory.h"
 #include "ios/chrome/browser/sync/sync_setup_service_mock.h"
+#include "ios/chrome/browser/ui/contextual_search/switches.h"
 #import "ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator+testing.h"
 #include "ios/web/public/test/test_web_thread_bundle.h"
 #include "net/base/network_change_notifier.h"
@@ -545,11 +545,11 @@
     base::CommandLine::ForCurrentProcess()->InitFromArgv(0, NULL);
     if (test.set_disable) {
       base::CommandLine::ForCurrentProcess()->AppendSwitch(
-          switches::kDisableContextualSearch);
+          contextual_search::switches::kDisableContextualSearch);
     }
     if (test.set_enable) {
       base::CommandLine::ForCurrentProcess()->AppendSwitch(
-          switches::kEnableContextualSearch);
+          contextual_search::switches::kEnableContextualSearch);
     }
     EXPECT_EQ(
         [TouchToSearchPermissionsMediator isTouchToSearchAvailableOnDevice],
diff --git a/ios/chrome/browser/ui/coordinators/BUILD.gn b/ios/chrome/browser/ui/coordinators/BUILD.gn
index 85e4cfa..93cb01e 100644
--- a/ios/chrome/browser/ui/coordinators/BUILD.gn
+++ b/ios/chrome/browser/ui/coordinators/BUILD.gn
@@ -19,6 +19,19 @@
   ]
 }
 
+source_set("chrome_coordinators") {
+  sources = [
+    "chrome_coordinator.h",
+    "chrome_coordinator.mm",
+  ]
+
+  configs += [ "//build/config/compiler:enable_arc" ]
+
+  deps = [
+    "//base",
+  ]
+}
+
 source_set("test_support") {
   testonly = true
   sources = [
diff --git a/ios/chrome/browser/chrome_coordinator.h b/ios/chrome/browser/ui/coordinators/chrome_coordinator.h
similarity index 91%
rename from ios/chrome/browser/chrome_coordinator.h
rename to ios/chrome/browser/ui/coordinators/chrome_coordinator.h
index a598a0e..5888098 100644
--- a/ios/chrome/browser/chrome_coordinator.h
+++ b/ios/chrome/browser/ui/coordinators/chrome_coordinator.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_CHROME_BROWSER_CHROME_COORDINATOR_H_
-#define IOS_CHROME_BROWSER_CHROME_COORDINATOR_H_
+#ifndef IOS_CHROME_BROWSER_UI_COORDINATORS_CHROME_COORDINATOR_H_
+#define IOS_CHROME_BROWSER_UI_COORDINATORS_CHROME_COORDINATOR_H_
 
 #import <UIKit/UIKit.h>
 
@@ -59,4 +59,4 @@
 
 @end
 
-#endif  // IOS_CHROME_BROWSER_CHROME_COORDINATOR_H_
+#endif  // IOS_CHROME_BROWSER_UI_COORDINATORS_CHROME_COORDINATOR_H_
diff --git a/ios/chrome/browser/chrome_coordinator.mm b/ios/chrome/browser/ui/coordinators/chrome_coordinator.mm
similarity index 95%
rename from ios/chrome/browser/chrome_coordinator.mm
rename to ios/chrome/browser/ui/coordinators/chrome_coordinator.mm
index 5abe419e..d81275d 100644
--- a/ios/chrome/browser/chrome_coordinator.mm
+++ b/ios/chrome/browser/ui/coordinators/chrome_coordinator.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 #include "base/logging.h"
 
diff --git a/ios/chrome/browser/ui/download/BUILD.gn b/ios/chrome/browser/ui/download/BUILD.gn
index c5748dc..567423a8 100644
--- a/ios/chrome/browser/ui/download/BUILD.gn
+++ b/ios/chrome/browser/ui/download/BUILD.gn
@@ -27,6 +27,7 @@
     "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/alert_coordinator",
     "//ios/chrome/browser/ui/colors",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/web:web_internal",
     "//ios/third_party/material_components_ios",
     "//ios/third_party/material_roboto_font_loader_ios",
diff --git a/ios/chrome/browser/ui/download/pass_kit_coordinator.h b/ios/chrome/browser/ui/download/pass_kit_coordinator.h
index 08b5e86..c2fbd340 100644
--- a/ios/chrome/browser/ui/download/pass_kit_coordinator.h
+++ b/ios/chrome/browser/ui/download/pass_kit_coordinator.h
@@ -7,8 +7,8 @@
 
 #import <PassKit/PassKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
 #import "ios/chrome/browser/download/pass_kit_tab_helper_delegate.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 namespace web {
 class WebState;
diff --git a/ios/chrome/browser/ui/elements/BUILD.gn b/ios/chrome/browser/ui/elements/BUILD.gn
index b5028df..3b2a5c4 100644
--- a/ios/chrome/browser/ui/elements/BUILD.gn
+++ b/ios/chrome/browser/ui/elements/BUILD.gn
@@ -16,6 +16,7 @@
   deps = [
     "//base",
     "//ios/chrome/browser",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
   ]
 }
 
@@ -49,6 +50,7 @@
     "//base",
     "//ios/chrome/browser",
     "//ios/chrome/browser/ui",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/material_components",
     "//ios/third_party/material_components_ios",
   ]
diff --git a/ios/chrome/browser/ui/elements/activity_overlay_coordinator.h b/ios/chrome/browser/ui/elements/activity_overlay_coordinator.h
index 2d4c049..c0b0e32 100644
--- a/ios/chrome/browser/ui/elements/activity_overlay_coordinator.h
+++ b/ios/chrome/browser/ui/elements/activity_overlay_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_ELEMENTS_ACTIVITY_OVERLAY_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_ELEMENTS_ACTIVITY_OVERLAY_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 // Coordinator for displaying an activity indicator overlay over the current
 // context.
diff --git a/ios/chrome/browser/ui/elements/selector_coordinator.h b/ios/chrome/browser/ui/elements/selector_coordinator.h
index 2aa61bcf..7bdadec7 100644
--- a/ios/chrome/browser/ui/elements/selector_coordinator.h
+++ b/ios/chrome/browser/ui/elements/selector_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_ELEMENTS_SELECTOR_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_ELEMENTS_SELECTOR_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 @class SelectorCoordinator;
 
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.mm
index df787a3..f01f89c 100644
--- a/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.mm
+++ b/ios/chrome/browser/ui/fullscreen/fullscreen_mediator.mm
@@ -67,8 +67,7 @@
   animator_ = [[FullscreenScrollEndAnimator alloc]
       initWithStartProgress:model_->progress()];
   [animator_ addCompletion:^(UIViewAnimatingPosition finalPosition) {
-    DCHECK(finalPosition == UIViewAnimatingPositionEnd ||
-           finalPosition == UIViewAnimatingPositionCurrent);
+    DCHECK_EQ(finalPosition, UIViewAnimatingPositionEnd);
     model_->AnimationEndedWithProgress(
         [animator_ progressForAnimatingPosition:finalPosition]);
     animator_ = nil;
@@ -84,14 +83,7 @@
     return;
 
   DCHECK_EQ(animator_.state, UIViewAnimatingStateActive);
-  [animator_ stopAnimation:NO];
-
-  // Property animators throw exceptions if they are deallocated in the
-  // UIViewAnimatingStateStopped state.  Since the cleanup occurring in the
-  // animator's completion block occurs before |-finishAnimationAtPosition:|
-  // resets the state to UIViewAnimatingStateInactive, the animator is retained
-  // here so that it can be deallocated when reset to inactive.
-  FullscreenScrollEndAnimator* animator = animator_;
-  [animator_ finishAnimationAtPosition:UIViewAnimatingPositionCurrent];
-  animator = nil;
+  model_->AnimationEndedWithProgress(animator_.currentProgress);
+  [animator_ stopAnimation:YES];
+  animator_ = nil;
 }
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_model.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_model.mm
index 7380e6f..fd64dea 100644
--- a/ios/chrome/browser/ui/fullscreen/fullscreen_model.mm
+++ b/ios/chrome/browser/ui/fullscreen/fullscreen_model.mm
@@ -65,6 +65,8 @@
 }
 
 void FullscreenModel::SetToolbarHeight(CGFloat toolbar_height) {
+  if (AreCGFloatsEqual(toolbar_height_, toolbar_height))
+    return;
   DCHECK_GE(toolbar_height, 0.0);
   toolbar_height_ = toolbar_height;
   ResetForNavigation();
diff --git a/ios/chrome/browser/ui/history_popup/BUILD.gn b/ios/chrome/browser/ui/history_popup/BUILD.gn
index 74ebde2..431164a 100644
--- a/ios/chrome/browser/ui/history_popup/BUILD.gn
+++ b/ios/chrome/browser/ui/history_popup/BUILD.gn
@@ -38,6 +38,7 @@
     "//ios/chrome/browser",
     "//ios/chrome/browser/tabs",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/history_popup/requirements",
   ]
 }
diff --git a/ios/chrome/browser/ui/history_popup/tab_history_legacy_coordinator.h b/ios/chrome/browser/ui/history_popup/tab_history_legacy_coordinator.h
index 788abcb..9e133d7 100644
--- a/ios/chrome/browser/ui/history_popup/tab_history_legacy_coordinator.h
+++ b/ios/chrome/browser/ui/history_popup/tab_history_legacy_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_LEGACY_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_LEGACY_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 @class CommandDispatcher;
 @protocol PopupMenuDelegate;
diff --git a/ios/chrome/browser/ui/main/main_feature_flags.cc b/ios/chrome/browser/ui/main/main_feature_flags.cc
index 56e8b55..27b8826 100644
--- a/ios/chrome/browser/ui/main/main_feature_flags.cc
+++ b/ios/chrome/browser/ui/main/main_feature_flags.cc
@@ -5,7 +5,7 @@
 #include "ios/chrome/browser/ui/main/main_feature_flags.h"
 
 const base::Feature kTabSwitcherPresentsBVC{"TabSwitcherPresentsBVC",
-                                            base::FEATURE_DISABLED_BY_DEFAULT};
+                                            base::FEATURE_ENABLED_BY_DEFAULT};
 
 bool TabSwitcherPresentsBVCEnabled() {
   return base::FeatureList::IsEnabled(kTabSwitcherPresentsBVC);
diff --git a/ios/chrome/browser/ui/main/main_presenting_view_controller.mm b/ios/chrome/browser/ui/main/main_presenting_view_controller.mm
index 07d0bbe..9133cd9 100644
--- a/ios/chrome/browser/ui/main/main_presenting_view_controller.mm
+++ b/ios/chrome/browser/ui/main/main_presenting_view_controller.mm
@@ -137,6 +137,11 @@
       [self.tabSwitcher removeFromParentViewController];
     }
 
+    // Reset the background color of the container view.  The tab switcher does
+    // not draw anything below the status bar, so those pixels fall through to
+    // display the container's background.
+    self.view.backgroundColor = [UIColor clearColor];
+
     // Add the new tab switcher as a child VC.
     [self addChildViewController:tabSwitcher];
     tabSwitcher.view.translatesAutoresizingMaskIntoConstraints = NO;
diff --git a/ios/chrome/browser/ui/main_content/web_scroll_view_main_content_ui_forwarder.mm b/ios/chrome/browser/ui/main_content/web_scroll_view_main_content_ui_forwarder.mm
index 5ec6ab8..a5b554a5 100644
--- a/ios/chrome/browser/ui/main_content/web_scroll_view_main_content_ui_forwarder.mm
+++ b/ios/chrome/browser/ui/main_content/web_scroll_view_main_content_ui_forwarder.mm
@@ -28,6 +28,8 @@
 @property(nonatomic, readonly, strong) MainContentUIStateUpdater* updater;
 // The WebStateList whose active WebState's scroll state is being forwaded.
 @property(nonatomic, readonly) WebStateList* webStateList;
+// The WebStateList's active WebState.
+@property(nonatomic, assign) web::WebState* webState;
 // The scroll view proxy whose scroll events are forwarded to |updater|.
 @property(nonatomic, readonly, strong) CRWWebViewScrollViewProxy* proxy;
 @end
@@ -35,6 +37,7 @@
 @implementation WebScrollViewMainContentUIForwarder
 @synthesize updater = _updater;
 @synthesize webStateList = _webStateList;
+@synthesize webState = _webState;
 @synthesize proxy = _proxy;
 
 - (instancetype)initWithUpdater:(MainContentUIStateUpdater*)updater
@@ -48,6 +51,7 @@
     _webStateList->AddObserver(_bridge.get());
     web::WebState* activeWebState = webStateList->GetActiveWebState();
     if (activeWebState) {
+      _webState = activeWebState;
       _proxy = activeWebState->GetWebViewProxy().scrollViewProxy;
       [_proxy addObserver:self];
     }
@@ -58,11 +62,20 @@
 - (void)dealloc {
   // |-disconnect| must be called before deallocation.
   DCHECK(!_bridge);
+  DCHECK(!_webState);
   DCHECK(!_proxy);
 }
 
 #pragma mark Accessors
 
+- (void)setWebState:(web::WebState*)webState {
+  if (_webState == webState)
+    return;
+  _webState = webState;
+  self.proxy =
+      _webState ? _webState->GetWebViewProxy().scrollViewProxy : nullptr;
+}
+
 - (void)setProxy:(CRWWebViewScrollViewProxy*)proxy {
   if (_proxy == proxy)
     return;
@@ -76,7 +89,7 @@
 - (void)disconnect {
   self.webStateList->RemoveObserver(_bridge.get());
   _bridge = nullptr;
-  self.proxy = nil;
+  self.webState = nullptr;
 }
 
 #pragma mark CRWWebViewScrollViewObserver
@@ -113,7 +126,7 @@
           withWebState:(web::WebState*)newWebState
                atIndex:(int)atIndex {
   if (newWebState == webStateList->GetActiveWebState())
-    self.proxy = newWebState->GetWebViewProxy().scrollViewProxy;
+    self.webState = newWebState;
 }
 
 - (void)webStateList:(WebStateList*)webStateList
@@ -121,7 +134,7 @@
                 oldWebState:(web::WebState*)oldWebState
                     atIndex:(int)atIndex
                  userAction:(BOOL)userAction {
-  self.proxy = newWebState->GetWebViewProxy().scrollViewProxy;
+  self.webState = newWebState;
 }
 
 @end
diff --git a/ios/chrome/browser/ui/material_components/BUILD.gn b/ios/chrome/browser/ui/material_components/BUILD.gn
index 905795b..1b04959d 100644
--- a/ios/chrome/browser/ui/material_components/BUILD.gn
+++ b/ios/chrome/browser/ui/material_components/BUILD.gn
@@ -12,6 +12,7 @@
     "utils.mm",
   ]
   deps = [
+    "//base",
     "//ios/chrome/browser/ui/colors",
     "//ios/third_party/material_components_ios",
   ]
diff --git a/ios/chrome/browser/ui/material_components/utils.mm b/ios/chrome/browser/ui/material_components/utils.mm
index 7d64d0c..e3ae8936 100644
--- a/ios/chrome/browser/ui/material_components/utils.mm
+++ b/ios/chrome/browser/ui/material_components/utils.mm
@@ -6,15 +6,34 @@
 
 #import <UIKit/UIKit.h>
 
+#include "base/mac/foundation_util.h"
 #import "ios/third_party/material_components_ios/src/components/AppBar/src/MaterialAppBar.h"
 #import "ios/third_party/material_components_ios/src/components/FlexibleHeader/src/MaterialFlexibleHeader.h"
 #import "ios/third_party/material_components_ios/src/components/NavigationBar/src/MaterialNavigationBar.h"
 #import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
+#import "ios/third_party/material_components_ios/src/components/ShadowLayer/src/MaterialShadowLayer.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
 #endif
 
+// Customize the length and opacity of AppBar's shadow.
+void CustomizeAppBarShadow(MDCAppBar* appBar) {
+  // Adjust the length of the shadow using a customized intensityBlock.
+  MDCFlexibleHeaderShadowIntensityChangeBlock intensityBlock = ^(
+      CALayer* _Nonnull shadowLayer, CGFloat intensity) {
+    // elevation = 10.26 makes the shadow 12pt tall like the bottom toolbar's.
+    CGFloat elevation = 10.26f * intensity;
+    [base::mac::ObjCCast<MDCShadowLayer>(shadowLayer) setElevation:elevation];
+  };
+  // Adjust the opacity of the shadow on the customized shadow layer.
+  MDCShadowLayer* shadowLayer = [MDCShadowLayer layer];
+  shadowLayer.opacity = 0.4f;
+  // Apply the customized shadow layer on the headerView of appBar.
+  [appBar.headerViewController.headerView setShadowLayer:shadowLayer
+                                 intensityDidChangeBlock:intensityBlock];
+}
+
 void ConfigureAppBarWithCardStyle(MDCAppBar* appBar) {
   appBar.headerViewController.headerView.canOverExtend = NO;
   appBar.headerViewController.headerView.shiftBehavior =
@@ -23,4 +42,6 @@
       [[MDCPalette greyPalette] tint200];
   appBar.navigationBar.tintColor = [[MDCPalette greyPalette] tint900];
   appBar.navigationBar.titleAlignment = MDCNavigationBarTitleAlignmentLeading;
+
+  CustomizeAppBarShadow(appBar);
 }
diff --git a/ios/chrome/browser/ui/ntp/BUILD.gn b/ios/chrome/browser/ui/ntp/BUILD.gn
index a45eafe..d111720 100644
--- a/ios/chrome/browser/ui/ntp/BUILD.gn
+++ b/ios/chrome/browser/ui/ntp/BUILD.gn
@@ -61,7 +61,6 @@
     "//ios/chrome/app/strings",
     "//ios/chrome/browser",
     "//ios/chrome/browser/browser_state",
-    "//ios/chrome/browser/content_suggestions",
     "//ios/chrome/browser/search_engines",
     "//ios/chrome/browser/sync",
     "//ios/chrome/browser/tabs",
@@ -69,6 +68,7 @@
     "//ios/chrome/browser/ui:notifications",
     "//ios/chrome/browser/ui/bookmarks",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/content_suggestions",
     "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
     "//ios/chrome/browser/ui/ntp/recent_tabs",
     "//ios/chrome/browser/ui/toolbar",
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_controller.mm b/ios/chrome/browser/ui/ntp/new_tab_page_controller.mm
index 2d8da09..b2f9f7c 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_controller.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_controller.mm
@@ -15,8 +15,6 @@
 #include "components/strings/grit/components_strings.h"
 #include "components/sync_sessions/synced_session.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_coordinator.h"
-#import "ios/chrome/browser/content_suggestions/content_suggestions_header_view_controller.h"
 #include "ios/chrome/browser/experimental_flags.h"
 #include "ios/chrome/browser/pref_names.h"
 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
@@ -26,6 +24,8 @@
 #import "ios/chrome/browser/ui/bookmarks/bookmark_controller_factory.h"
 #import "ios/chrome/browser/ui/bookmarks/bookmark_home_tablet_ntp_controller.h"
 #import "ios/chrome/browser/ui/commands/browser_commands.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_view_controller.h"
 #import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h"
 #import "ios/chrome/browser/ui/ntp/incognito_view_controller.h"
 #import "ios/chrome/browser/ui/ntp/modal_ntp.h"
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn b/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
index b33f877..c0871a5 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn
@@ -36,6 +36,7 @@
     "//ios/chrome/browser/ui/authentication:authentication_ui",
     "//ios/chrome/browser/ui/commands",
     "//ios/chrome/browser/ui/context_menu",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/keyboard",
     "//ios/chrome/browser/ui/ntp",
     "//ios/chrome/browser/ui/ntp/recent_tabs/views",
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h
index c279153..e04a566 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_HANDSET_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_HANDSET_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 namespace ios {
 class ChromeBrowserState;
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h
index c5f81d75e..5360cbc 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h
@@ -7,7 +7,7 @@
 
 #import <UIKit/UIKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h"
 
 namespace ios {
diff --git a/ios/chrome/browser/ui/omnibox/BUILD.gn b/ios/chrome/browser/ui/omnibox/BUILD.gn
index cec0995..cc4ef11 100644
--- a/ios/chrome/browser/ui/omnibox/BUILD.gn
+++ b/ios/chrome/browser/ui/omnibox/BUILD.gn
@@ -100,6 +100,7 @@
     "//ios/chrome/browser/ui/toolbar/clean:toolbar_components_ui",
     "//ios/chrome/browser/ui/toolbar/public",
     "//ios/chrome/browser/ui/toolbar/public:toolbar_base_feature",
+    "//ios/chrome/browser/ui/util",
     "//ios/chrome/common",
     "//ios/public/provider/chrome/browser",
     "//ios/third_party/material_components_ios",
diff --git a/ios/chrome/browser/ui/omnibox/autocomplete_result_consumer.h b/ios/chrome/browser/ui/omnibox/autocomplete_result_consumer.h
index bcd60bb..c1141ac3 100644
--- a/ios/chrome/browser/ui/omnibox/autocomplete_result_consumer.h
+++ b/ios/chrome/browser/ui/omnibox/autocomplete_result_consumer.h
@@ -34,6 +34,8 @@
 // CALayer animations to fade the OmniboxPopupRows in.
 - (void)updateMatches:(NSArray<id<AutocompleteSuggestion>>*)result
         withAnimation:(BOOL)animation;
+// Sets the text alignment of the popup content.
+- (void)setTextAlignment:(NSTextAlignment)alignment;
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_OMNIBOX_AUTOCOMPLETE_RESULT_CONSUMER_H_
diff --git a/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h b/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h
index 50ee39c..5afff52 100644
--- a/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h
+++ b/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h
@@ -29,11 +29,11 @@
 @class PageInfoBridge;
 class OmniboxViewIOS;
 @class OmniboxClearButtonBridge;
+@class OmniboxPopupCoordinator;
 @protocol OmniboxPopupPositioner;
 @class LocationBarView;
 class ScopedFullscreenDisabler;
 class ToolbarModel;
-class OmniboxPopupViewIOS;
 
 // Concrete implementation of the LocationBarController interface.
 class LocationBarControllerImpl : public LocationBarController,
@@ -45,8 +45,8 @@
                             id<BrowserCommands> dispatcher);
   ~LocationBarControllerImpl() override;
 
-  // Creates a popup view and wires it to |edit_view_|.
-  std::unique_ptr<OmniboxPopupViewIOS> CreatePopupView(
+  // Creates a popup coordinator and wires it to |edit_view_|.
+  OmniboxPopupCoordinator* CreatePopupCoordinator(
       id<OmniboxPopupPositioner> positioner);
 
   // OmniboxEditController implementation
diff --git a/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.mm b/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.mm
index 9896db1..d2703a8b 100644
--- a/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.mm
+++ b/ios/chrome/browser/ui/omnibox/location_bar_controller_impl.mm
@@ -27,6 +27,7 @@
 #import "ios/chrome/browser/ui/omnibox/location_bar_view.h"
 #include "ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h"
+#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h"
 #include "ios/chrome/browser/ui/ui_util.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
 #include "ios/chrome/grit/ios_strings.h"
@@ -166,17 +167,21 @@
 
 LocationBarControllerImpl::~LocationBarControllerImpl() {}
 
-std::unique_ptr<OmniboxPopupViewIOS> LocationBarControllerImpl::CreatePopupView(
+OmniboxPopupCoordinator* LocationBarControllerImpl::CreatePopupCoordinator(
     id<OmniboxPopupPositioner> positioner) {
   std::unique_ptr<OmniboxPopupViewIOS> popup_view =
-      base::MakeUnique<OmniboxPopupViewIOS>(edit_view_->browser_state(),
-                                            edit_view_->model(),
-                                            edit_view_.get(), positioner);
+      base::MakeUnique<OmniboxPopupViewIOS>(edit_view_->model(),
+                                            edit_view_.get());
 
   edit_view_->model()->set_popup_model(popup_view->model());
   edit_view_->SetPopupProvider(popup_view.get());
 
-  return popup_view;
+  OmniboxPopupCoordinator* coordinator =
+      [[OmniboxPopupCoordinator alloc] initWithPopupView:std::move(popup_view)];
+  coordinator.browserState = browser_state_;
+  coordinator.positioner = positioner;
+
+  return coordinator;
 }
 
 void LocationBarControllerImpl::HideKeyboardAndEndEditing() {
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h b/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h
index 61aa7520..46a12e2 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h
@@ -11,6 +11,8 @@
 #import "ios/chrome/browser/ui/omnibox/autocomplete_result_consumer.h"
 #import "ios/chrome/browser/ui/omnibox/image_retriever.h"
 
+@class OmniboxPopupPresenter;
+
 namespace image_fetcher {
 class IOSImageDataFetcherWrapper;
 }  // namespace
@@ -36,8 +38,19 @@
 - (void)updateMatches:(const AutocompleteResult&)result
         withAnimation:(BOOL)animated;
 
+// Sets the text alignment of the popup content.
+- (void)setTextAlignment:(NSTextAlignment)alignment;
+
+// Updates the popup with the |results|.
+- (void)updateWithResults:(const AutocompleteResult&)results;
+
 @property(nonatomic, weak) id<AutocompleteResultConsumer> consumer;
 @property(nonatomic, assign, getter=isIncognito) BOOL incognito;
+// Whether the popup is open.
+@property(nonatomic, assign, getter=isOpen) BOOL open;
+// Presenter for the popup, handling the positioning and the presentation
+// animations.
+@property(nonatomic, strong) OmniboxPopupPresenter* presenter;
 
 @end
 
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.mm
index 6c1f568..cb66a6c6a 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.mm
@@ -11,6 +11,7 @@
 #include "components/omnibox/browser/autocomplete_match.h"
 #include "components/omnibox/browser/autocomplete_result.h"
 #import "ios/chrome/browser/ui/omnibox/autocomplete_match_formatter.h"
+#import "ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -26,6 +27,8 @@
 }
 @synthesize consumer = _consumer;
 @synthesize incognito = _incognito;
+@synthesize open = _open;
+@synthesize presenter = _presenter;
 
 - (instancetype)initWithFetcher:
                     (std::unique_ptr<image_fetcher::IOSImageDataFetcherWrapper>)
@@ -36,6 +39,7 @@
     DCHECK(delegate);
     _delegate = delegate;
     _imageFetcher = std::move(imageFetcher);
+    _open = NO;
   }
   return self;
 }
@@ -66,6 +70,29 @@
   return wrappedMatches;
 }
 
+- (void)updateWithResults:(const AutocompleteResult&)result {
+  if (!self.open && !result.empty()) {
+    // The popup is not currently open and there are results to display. Update
+    // and animate the cells
+    [self updateMatches:result withAnimation:YES];
+  } else {
+    // The popup is already displayed or there are no results to display. Update
+    // the cells without animating.
+    [self updateMatches:result withAnimation:NO];
+  }
+  self.open = !result.empty();
+
+  if (self.open) {
+    [self.presenter updateHeightAndAnimateAppearanceIfNecessary];
+  } else {
+    [self.presenter animateCollapse];
+  }
+}
+
+- (void)setTextAlignment:(NSTextAlignment)alignment {
+  [self.consumer setTextAlignment:alignment];
+}
+
 #pragma mark - AutocompleteResultConsumerDelegate
 
 - (void)autocompleteResultConsumer:(id<AutocompleteResultConsumer>)sender
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h b/ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h
index 0a31a3c..eee5ae7 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h
@@ -13,11 +13,6 @@
 // adding the popup as a sibling either above or below this view.
 - (UIView*)popupAnchorView;
 
-// Returns the popup's frame, in the coordinate system of the view returned by
-// |popupView|'s superview.  If |height| is too large for the screen, the frame
-// may be shortened.
-- (CGRect)popupFrame:(CGFloat)height;
-
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_POSITIONER_H_
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h b/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h
index dd91aaf1..af6a9f6 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h
@@ -14,10 +14,6 @@
 - (instancetype)initWithPopupPositioner:(id<OmniboxPopupPositioner>)positioner
                     popupViewController:(UITableViewController*)viewController;
 
-@property(nonatomic, weak) id<OmniboxPopupPositioner> positioner;
-@property(nonatomic, weak) UITableViewController* viewController;
-@property(nonatomic, strong) UIView* popupContainerView;
-
 // Updates appearance depending on the content size of the presented view
 // controller by changing the visible height of the popup. When the popup was
 // not previously shown, it will appear with "expansion" animation.
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.mm
index 1a0d4bca..f095725 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.mm
@@ -5,8 +5,11 @@
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h"
 
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h"
+#import "ios/chrome/browser/ui/toolbar/public/toolbar_controller_base_feature.h"
+#import "ios/chrome/browser/ui/toolbar/public/web_toolbar_controller_constants.h"
 #include "ios/chrome/browser/ui/ui_util.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
+#import "ios/chrome/browser/ui/util/named_guide.h"
 #include "ios/chrome/grit/ios_theme_resources.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -22,10 +25,23 @@
 }
 }  // namespace
 
+@interface OmniboxPopupPresenter ()
+// Constraint for the height of the popup.
+@property(nonatomic, strong) NSLayoutConstraint* heightConstraint;
+// Constraint for the bottom anchor of the popup.
+@property(nonatomic, strong) NSLayoutConstraint* bottomConstraint;
+
+@property(nonatomic, weak) id<OmniboxPopupPositioner> positioner;
+@property(nonatomic, weak) UITableViewController* viewController;
+@property(nonatomic, strong) UIView* popupContainerView;
+@end
+
 @implementation OmniboxPopupPresenter
 @synthesize viewController = _viewController;
 @synthesize positioner = _positioner;
 @synthesize popupContainerView = _popupContainerView;
+@synthesize heightConstraint = _heightConstraint;
+@synthesize bottomConstraint = _bottomConstraint;
 
 - (instancetype)initWithPopupPositioner:(id<OmniboxPopupPositioner>)positioner
                     popupViewController:(UITableViewController*)viewController {
@@ -39,6 +55,11 @@
     } else {
       _popupContainerView = [OmniboxPopupPresenter newBackgroundViewIPhone];
     }
+    _popupContainerView.translatesAutoresizingMaskIntoConstraints = NO;
+
+    _heightConstraint =
+        [_popupContainerView.heightAnchor constraintEqualToConstant:0];
+    _heightConstraint.active = YES;
 
     CGRect popupControllerFrame = viewController.view.frame;
     popupControllerFrame.origin = CGPointZero;
@@ -49,90 +70,119 @@
 }
 
 - (void)updateHeightAndAnimateAppearanceIfNecessary {
-  UIView* view = self.popupContainerView;
-  // Show |result.size| on iPad.  Since iPhone can dismiss keyboard, set
-  // height to frame height.
-  CGFloat height = [[self.viewController tableView] contentSize].height;
-  UIEdgeInsets insets = [[self.viewController tableView] contentInset];
-  // Note the calculation |insets.top * 2| is correct, it should not be
-  // insets.top + insets.bottom. |insets.bottom| will be larger than
-  // |insets.top| when the keyboard is visible, but |parentHeight| should stay
-  // the same.
-  CGFloat parentHeight = height + insets.top * 2 + ShadowHeight();
+  UIView* popup = self.popupContainerView;
   UIView* siblingView = [self.positioner popupAnchorView];
+  BOOL newlyAdded = ([popup superview] == nil);
+
   if (IsIPadIdiom()) {
-    [[siblingView superview] insertSubview:view aboveSubview:siblingView];
+    [[siblingView superview] insertSubview:popup aboveSubview:siblingView];
   } else {
-    [view setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
-                              UIViewAutoresizingFlexibleHeight];
-    [[siblingView superview] insertSubview:view belowSubview:siblingView];
+    [[siblingView superview] insertSubview:popup belowSubview:siblingView];
   }
 
-  CGFloat currentHeight = view.layer.bounds.size.height;
-  if (currentHeight == 0)
-    [self animateAppearance:parentHeight];
-  else
-    [view setFrame:[self.positioner popupFrame:parentHeight]];
+  if (newlyAdded) {
+    [self initialLayout];
+  }
 
+  CGFloat currentHeight = popup.bounds.size.height;
+  if (IsIPadIdiom()) {
+    // Show |result.size| on iPad.
+    CGFloat height = [[self.viewController tableView] contentSize].height;
+    UIEdgeInsets insets = [[self.viewController tableView] contentInset];
+    // Note the calculation |insets.top * 2| is correct, it should not be
+    // insets.top + insets.bottom. |insets.bottom| will be larger than
+    // |insets.top| when the keyboard is visible, but |parentHeight| should stay
+    // the same.
+    CGFloat iPadHeight = height + insets.top * 2 + ShadowHeight();
+    self.heightConstraint.constant = iPadHeight;
+  } else {
+    self.heightConstraint.active = NO;
+    self.bottomConstraint.active = YES;
+  }
+
+  if (currentHeight == 0) {
+    // Animate if it expanding.
+    [UIView animateWithDuration:kExpandAnimationDuration
+                          delay:0
+                        options:UIViewAnimationOptionCurveEaseInOut
+                     animations:^{
+                       [[popup superview] layoutIfNeeded];
+                     }
+                     completion:nil];
+  }
+
+  // Set the size the table view.
   CGRect popupControllerFrame = self.viewController.view.frame;
-  popupControllerFrame.size.height = view.frame.size.height - ShadowHeight();
+  popupControllerFrame.size.height = popup.frame.size.height - ShadowHeight();
   self.viewController.view.frame = popupControllerFrame;
 }
 
-- (void)animateAppearance:(CGFloat)parentHeight {
-  CGRect popupFrame = [self.positioner popupFrame:parentHeight];
-  CALayer* popupLayer = self.popupContainerView.layer;
-  CGRect bounds = popupLayer.bounds;
-  bounds.size.height = popupFrame.size.height;
-  popupLayer.bounds = bounds;
-
-  CGRect frame = self.popupContainerView.frame;
-  frame.size.width = popupFrame.size.width;
-  frame.origin.y = popupFrame.origin.y;
-  self.popupContainerView.frame = frame;
-
-  CABasicAnimation* growHeight =
-      [CABasicAnimation animationWithKeyPath:@"bounds.size.height"];
-  growHeight.fromValue = @0;
-  growHeight.toValue = [NSNumber numberWithFloat:popupFrame.size.height];
-  growHeight.duration = kExpandAnimationDuration;
-  growHeight.timingFunction =
-      [CAMediaTimingFunction functionWithControlPoints:0.4:0:0.2:1];
-  [popupLayer addAnimation:growHeight forKey:@"growHeight"];
-}
-
 - (void)animateCollapse {
-  CALayer* popupLayer = self.popupContainerView.layer;
-  CGRect bounds = popupLayer.bounds;
-  CGFloat currentHeight = bounds.size.height;
-  bounds.size.height = 0;
-  popupLayer.bounds = bounds;
-
   UIView* retainedPopupView = self.popupContainerView;
-  [CATransaction begin];
-  [CATransaction setCompletionBlock:^{
-    [retainedPopupView removeFromSuperview];
-  }];
-  CABasicAnimation* shrinkHeight =
-      [CABasicAnimation animationWithKeyPath:@"bounds.size.height"];
-  shrinkHeight.fromValue = [NSNumber numberWithFloat:currentHeight];
-  shrinkHeight.toValue = @0;
-  shrinkHeight.duration = kCollapseAnimationDuration;
-  shrinkHeight.timingFunction =
-      [CAMediaTimingFunction functionWithControlPoints:0.4:0:1:1];
-  [popupLayer addAnimation:shrinkHeight forKey:@"shrinkHeight"];
-  [CATransaction commit];
+  self.heightConstraint.constant = 0;
+  if (!IsIPadIdiom()) {
+    self.bottomConstraint.active = NO;
+    self.heightConstraint.active = YES;
+  }
+  [UIView animateWithDuration:kCollapseAnimationDuration
+      delay:0
+      options:UIViewAnimationOptionCurveEaseInOut
+      animations:^{
+        [[self.popupContainerView superview] layoutIfNeeded];
+      }
+      completion:^(BOOL) {
+        [retainedPopupView removeFromSuperview];
+      }];
 }
 
+#pragma mark - Private
+
+// Layouts the popup when it is just added to the view hierarchy.
+- (void)initialLayout {
+  UIView* popup = self.popupContainerView;
+  // Creates the constraints if the view is newly added to the view hierarchy.
+  // On iPad the height of the popup is fixed.
+  self.heightConstraint.constant = 0;
+
+  // This constraint will only be activated on iPhone as the popup is taking
+  // the full height.
+  self.bottomConstraint = [popup.bottomAnchor
+      constraintEqualToAnchor:[popup superview].bottomAnchor];
+
+  // Position the top anchor of the popup relatively to the layout guide
+  // positioned on the omnibox.
+  UILayoutGuide* topLayout = FindNamedGuide(kOmniboxGuide, popup);
+  NSLayoutConstraint* topConstraint =
+      [popup.topAnchor constraintEqualToAnchor:topLayout.bottomAnchor];
+  if (IsIPadIdiom()) {
+    if (base::FeatureList::IsEnabled(kCleanToolbar)) {
+      topConstraint.constant = kiPadOmniboxPopupVerticalOffset;
+    } else {
+      // On the old toolbar, the layout guide is positioned on the toolbar
+      // instead of on the omnibox. The popup is positioned between the bottom
+      // of the toolbar and the bottom of the omnibox. Adding the opposite of
+      // the constant positions it correctly.
+      topConstraint.constant = -kiPadOmniboxPopupVerticalOffset;
+    }
+  }
+
+  [NSLayoutConstraint activateConstraints:@[
+    [popup.leadingAnchor constraintEqualToAnchor:popup.superview.leadingAnchor],
+    [popup.trailingAnchor
+        constraintEqualToAnchor:popup.superview.trailingAnchor],
+    topConstraint,
+  ]];
+
+  [popup layoutIfNeeded];
+  [[popup superview] layoutIfNeeded];
+}
+
+#pragma mark - Background creation
+
 + (UIView*)newBackgroundViewIpad {
   UIView* view = [[UIView alloc] init];
   [view setClipsToBounds:YES];
 
-  // Adjust popupView_'s anchor point and height so that it animates down
-  // from the top when it appears.
-  view.layer.anchorPoint = CGPointMake(0.5, 0);
-
-  [view setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
   UIImageView* shadowView = [[UIImageView alloc]
       initWithImage:NativeImage(IDR_IOS_TOOLBAR_SHADOW_FULL_BLEED)];
   [shadowView setUserInteractionEnabled:NO];
@@ -162,10 +212,6 @@
 + (UIView*)newBackgroundViewIPhone {
   UIView* view = [[UIView alloc] init];
 
-  // Adjust popupView_'s anchor point and height so that it animates down
-  // from the top when it appears.
-  view.layer.anchorPoint = CGPointMake(0.5, 0);
-
   // Add a white background to prevent seeing the logo scroll through the
   // omnibox.
   UIView* whiteBackground = [[UIView alloc] initWithFrame:CGRectZero];
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h
index 017937fc..6b7260e 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h
@@ -26,9 +26,6 @@
 - (instancetype)initWithNibName:(NSString*)nibNameOrNil
                          bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE;
 
-// Set text alignment for popup cells.
-- (void)setTextAlignment:(NSTextAlignment)alignment;
-
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h
index bf0ea5f..3c1b9d80 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h
@@ -17,25 +17,18 @@
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h"
 
 class OmniboxEditModel;
-@class OmniboxPopupCoordinator;
+@class OmniboxPopupMediator;
 class OmniboxPopupModel;
 class OmniboxPopupViewSuggestionsDelegate;
-@protocol OmniboxPopupPositioner;
 struct AutocompleteMatch;
 
-namespace ios {
-class ChromeBrowserState;
-}  // namespace ios
-
 // iOS implementation of AutocompletePopupView.
 class OmniboxPopupViewIOS : public OmniboxPopupView,
                             public OmniboxPopupMediatorDelegate,
                             public OmniboxPopupProvider {
  public:
-  OmniboxPopupViewIOS(ios::ChromeBrowserState* browser_state,
-                      OmniboxEditModel* edit_model,
-                      OmniboxPopupViewSuggestionsDelegate* delegate,
-                      id<OmniboxPopupPositioner> positioner);
+  OmniboxPopupViewIOS(OmniboxEditModel* edit_model,
+                      OmniboxPopupViewSuggestionsDelegate* delegate);
   ~OmniboxPopupViewIOS() override;
 
   // Popup model used for this.
@@ -64,10 +57,14 @@
   void OnMatchSelectedForDeletion(const AutocompleteMatch& match) override;
   void OnScroll() override;
 
+  void SetMediator(OmniboxPopupMediator* mediator) {
+    mediator_.reset(mediator);
+  }
+
  private:
   std::unique_ptr<OmniboxPopupModel> model_;
   OmniboxPopupViewSuggestionsDelegate* delegate_;  // weak
-  base::scoped_nsobject<OmniboxPopupCoordinator> coordinator_;
+  base::scoped_nsobject<OmniboxPopupMediator> mediator_;
 };
 
 #endif  // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_POPUP_VIEW_IOS_H_
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
index 3975947..30d2db55 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
@@ -20,11 +20,8 @@
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #import "ios/chrome/browser/experimental_flags.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h"
-#import "ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h"
-#import "ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h"
 #include "ios/chrome/browser/ui/omnibox/omnibox_popup_view_suggestions_delegate.h"
 #include "ios/chrome/browser/ui/omnibox/omnibox_util.h"
-#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h"
 #include "ios/chrome/browser/ui/ui_util.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
 #include "ios/chrome/grit/ios_theme_resources.h"
@@ -39,23 +36,11 @@
 using base::UserMetricsAction;
 
 OmniboxPopupViewIOS::OmniboxPopupViewIOS(
-    ios::ChromeBrowserState* browser_state,
     OmniboxEditModel* edit_model,
-    OmniboxPopupViewSuggestionsDelegate* delegate,
-    id<OmniboxPopupPositioner> positioner)
+    OmniboxPopupViewSuggestionsDelegate* delegate)
     : model_(new OmniboxPopupModel(this, edit_model)), delegate_(delegate) {
   DCHECK(delegate);
-  DCHECK(browser_state);
   DCHECK(edit_model);
-
-  // TODO(crbug.com/788640): The coordinator should own the OmniboxPopupViewIOS,
-  // not the other way around.
-  coordinator_.reset([[OmniboxPopupCoordinator alloc] init]);
-  [coordinator_ setBrowserState:browser_state];
-  [coordinator_ setMediatorDelegate:this];
-  [coordinator_ setPositioner:positioner];
-
-  [coordinator_ start];
 }
 
 OmniboxPopupViewIOS::~OmniboxPopupViewIOS() {
@@ -76,8 +61,8 @@
 void OmniboxPopupViewIOS::UpdatePopupAppearance() {
   const AutocompleteResult& result = model_->result();
 
-  [coordinator_ updateWithResults:result];
-  if ([coordinator_ isOpen]) {
+  [mediator_ updateWithResults:result];
+  if ([mediator_ isOpen]) {
     UpdateEditViewIcon();
   }
 
@@ -89,7 +74,7 @@
 }
 
 bool OmniboxPopupViewIOS::IsOpen() const {
-  return [coordinator_ isOpen];
+  return [mediator_ isOpen];
 }
 
 OmniboxPopupModel* OmniboxPopupViewIOS::model() const {
@@ -99,11 +84,11 @@
 #pragma mark - OmniboxPopupProvider
 
 bool OmniboxPopupViewIOS::IsPopupOpen() {
-  return [coordinator_ isOpen];
+  return [mediator_ isOpen];
 }
 
 void OmniboxPopupViewIOS::SetTextAlignment(NSTextAlignment alignment) {
-  [coordinator_ setTextAlignment:alignment];
+  [mediator_ setTextAlignment:alignment];
 }
 
 #pragma mark - OmniboxPopupViewControllerDelegate
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h
index 818460bd..12005ee 100644
--- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h
+++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h
@@ -7,9 +7,10 @@
 
 #import <UIKit/UIKit.h>
 
-class AutocompleteResult;
-class OmniboxPopupMediatorDelegate;
+#include <memory>
+
 @protocol OmniboxPopupPositioner;
+class OmniboxPopupViewIOS;
 
 namespace ios {
 class ChromeBrowserState;
@@ -17,20 +18,18 @@
 
 // Coordinator for the Omnibox Popup.
 @interface OmniboxPopupCoordinator : NSObject
+
+- (instancetype)initWithPopupView:
+    (std::unique_ptr<OmniboxPopupViewIOS>)popupView NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+
 // BrowserState.
 @property(nonatomic, assign) ios::ChromeBrowserState* browserState;
 // Positioner for the popup.
 @property(nonatomic, weak) id<OmniboxPopupPositioner> positioner;
-// Delegate for the popup mediator.
-@property(nonatomic, assign) OmniboxPopupMediatorDelegate* mediatorDelegate;
-// Whether the popup is open.
-@property(nonatomic, assign, getter=isOpen) BOOL open;
 
 - (void)start;
-// Updates the popup with the |results|.
-- (void)updateWithResults:(const AutocompleteResult&)results;
-// Sets the text alignment of the popup content.
-- (void)setTextAlignment:(NSTextAlignment)alignment;
+- (void)stop;
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_OMNIBOX_POPUP_OMNIBOX_POPUP_COORDINATOR_H_
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.mm
index 205c10b..8e9a0b8 100644
--- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.mm
+++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.mm
@@ -10,16 +10,18 @@
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_mediator.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_view_controller.h"
+#include "ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
 #endif
 
-@interface OmniboxPopupCoordinator ()
+@interface OmniboxPopupCoordinator () {
+  std::unique_ptr<OmniboxPopupViewIOS> _popupView;
+}
 
 @property(nonatomic, strong) OmniboxPopupViewController* popupViewController;
 @property(nonatomic, strong) OmniboxPopupMediator* mediator;
-@property(nonatomic, strong) OmniboxPopupPresenter* presenter;
 
 @end
 
@@ -27,57 +29,45 @@
 
 @synthesize browserState = _browserState;
 @synthesize mediator = _mediator;
-@synthesize mediatorDelegate = _mediatorDelegate;
-@synthesize open = _open;
 @synthesize popupViewController = _popupViewController;
 @synthesize positioner = _positioner;
-@synthesize presenter = _presenter;
 
 #pragma mark - Public
 
+- (instancetype)initWithPopupView:
+    (std::unique_ptr<OmniboxPopupViewIOS>)popupView {
+  self = [super init];
+  if (self) {
+    _popupView = std::move(popupView);
+  }
+  return self;
+}
+
 - (void)start {
-  self.open = NO;
   std::unique_ptr<image_fetcher::IOSImageDataFetcherWrapper> imageFetcher =
       std::make_unique<image_fetcher::IOSImageDataFetcherWrapper>(
           self.browserState->GetRequestContext());
 
   self.mediator =
       [[OmniboxPopupMediator alloc] initWithFetcher:std::move(imageFetcher)
-                                           delegate:self.mediatorDelegate];
+                                           delegate:_popupView.get()];
   self.popupViewController = [[OmniboxPopupViewController alloc] init];
-  self.popupViewController.incognito = self.browserState->IsOffTheRecord();
 
   self.mediator.incognito = self.browserState->IsOffTheRecord();
   self.mediator.consumer = self.popupViewController;
-  self.popupViewController.imageRetriever = self.mediator;
-  self.popupViewController.delegate = self.mediator;
-
-  self.presenter = [[OmniboxPopupPresenter alloc]
+  self.mediator.presenter = [[OmniboxPopupPresenter alloc]
       initWithPopupPositioner:self.positioner
           popupViewController:self.popupViewController];
+
+  self.popupViewController.imageRetriever = self.mediator;
+  self.popupViewController.delegate = self.mediator;
+  self.popupViewController.incognito = self.browserState->IsOffTheRecord();
+
+  _popupView->SetMediator(self.mediator);
 }
 
-- (void)updateWithResults:(const AutocompleteResult&)result {
-  if (!self.open && !result.empty()) {
-    // The popup is not currently open and there are results to display. Update
-    // and animate the cells
-    [self.mediator updateMatches:result withAnimation:YES];
-  } else {
-    // The popup is already displayed or there are no results to display. Update
-    // the cells without animating.
-    [self.mediator updateMatches:result withAnimation:NO];
-  }
-  self.open = !result.empty();
-
-  if (self.open) {
-    [self.presenter updateHeightAndAnimateAppearanceIfNecessary];
-  } else {
-    [self.presenter animateCollapse];
-  }
-}
-
-- (void)setTextAlignment:(NSTextAlignment)alignment {
-  [self.popupViewController setTextAlignment:alignment];
+- (void)stop {
+  _popupView.reset();
 }
 
 @end
diff --git a/ios/chrome/browser/ui/page_info/BUILD.gn b/ios/chrome/browser/ui/page_info/BUILD.gn
index d2365a0f..c3a0666 100644
--- a/ios/chrome/browser/ui/page_info/BUILD.gn
+++ b/ios/chrome/browser/ui/page_info/BUILD.gn
@@ -49,6 +49,7 @@
     "//ios/chrome/browser/tabs",
     "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/page_info/requirements",
     "//ios/web",
     "//ios/web/public",
diff --git a/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h b/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h
index fee9fcf..e0a92920 100644
--- a/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h
+++ b/ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_LEGACY_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_LEGACY_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 @class CommandDispatcher;
 @protocol PageInfoPresentation;
diff --git a/ios/chrome/browser/ui/payments/BUILD.gn b/ios/chrome/browser/ui/payments/BUILD.gn
index 1f65af67..822e1b23 100644
--- a/ios/chrome/browser/ui/payments/BUILD.gn
+++ b/ios/chrome/browser/ui/payments/BUILD.gn
@@ -85,6 +85,7 @@
     "//ios/chrome/browser/ui/collection_view/cells",
     "//ios/chrome/browser/ui/colors",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/icons",
     "//ios/chrome/browser/ui/payments/cells",
     "//ios/chrome/browser/ui/toolbar",
diff --git a/ios/chrome/browser/ui/payments/address_edit_coordinator.h b/ios/chrome/browser/ui/payments/address_edit_coordinator.h
index f1be088e..f3ba197c 100644
--- a/ios/chrome/browser/ui/payments/address_edit_coordinator.h
+++ b/ios/chrome/browser/ui/payments/address_edit_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/country_selection_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h"
 
diff --git a/ios/chrome/browser/ui/payments/billing_address_selection_coordinator.h b/ios/chrome/browser/ui/payments/billing_address_selection_coordinator.h
index f20e9024..9aa9a07 100644
--- a/ios/chrome/browser/ui/payments/billing_address_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/billing_address_selection_coordinator.h
@@ -7,7 +7,7 @@
 
 #import <UIKit/UIKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/address_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.h"
 
diff --git a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h
index 5983ceb..4690219 100644
--- a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h
+++ b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_EDIT_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_EDIT_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h"
 
 namespace autofill {
diff --git a/ios/chrome/browser/ui/payments/contact_info_selection_coordinator.h b/ios/chrome/browser/ui/payments/contact_info_selection_coordinator.h
index 9cc9a62..c9042e5 100644
--- a/ios/chrome/browser/ui/payments/contact_info_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/contact_info_selection_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.h"
 
diff --git a/ios/chrome/browser/ui/payments/country_selection_coordinator.h b/ios/chrome/browser/ui/payments/country_selection_coordinator.h
index 97b22d8..9cd828b9 100644
--- a/ios/chrome/browser/ui/payments/country_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/country_selection_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_picker_view_controller.h"
 
 @class CountrySelectionCoordinator;
diff --git a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.h b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.h
index 4933c75..3a9a3fb 100644
--- a/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.h
+++ b/ios/chrome/browser/ui/payments/credit_card_edit_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/address_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/billing_address_selection_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h"
diff --git a/ios/chrome/browser/ui/payments/payment_items_display_coordinator.h b/ios/chrome/browser/ui/payments/payment_items_display_coordinator.h
index b597ad36..7c870510 100644
--- a/ios/chrome/browser/ui/payments/payment_items_display_coordinator.h
+++ b/ios/chrome/browser/ui/payments/payment_items_display_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_items_display_view_controller.h"
 
 namespace payments {
diff --git a/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.h b/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.h
index 764e846..0151502 100644
--- a/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/credit_card_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.h"
 
diff --git a/ios/chrome/browser/ui/payments/payment_request_coordinator.h b/ios/chrome/browser/ui/payments/payment_request_coordinator.h
index f7bcfe4b..99626942 100644
--- a/ios/chrome/browser/ui/payments/payment_request_coordinator.h
+++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.h
@@ -10,7 +10,7 @@
 #include "base/ios/block_types.h"
 #include "base/strings/string16.h"
 #include "components/autofill/core/browser/payments/full_card_request.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/address_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/contact_info_selection_coordinator.h"
diff --git a/ios/chrome/browser/ui/payments/payment_request_error_coordinator.h b/ios/chrome/browser/ui/payments/payment_request_error_coordinator.h
index d041de9..b61875e 100644
--- a/ios/chrome/browser/ui/payments/payment_request_error_coordinator.h
+++ b/ios/chrome/browser/ui/payments/payment_request_error_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 
 #include "base/ios/block_types.h"
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_error_view_controller.h"
 
 @class PaymentRequestErrorCoordinator;
diff --git a/ios/chrome/browser/ui/payments/shipping_address_selection_coordinator.h b/ios/chrome/browser/ui/payments/shipping_address_selection_coordinator.h
index 01cb6f0..bb7c90d1 100644
--- a/ios/chrome/browser/ui/payments/shipping_address_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/shipping_address_selection_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/address_edit_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.h"
 
diff --git a/ios/chrome/browser/ui/payments/shipping_option_selection_coordinator.h b/ios/chrome/browser/ui/payments/shipping_option_selection_coordinator.h
index 54035519..8962363 100644
--- a/ios/chrome/browser/ui/payments/shipping_option_selection_coordinator.h
+++ b/ios/chrome/browser/ui/payments/shipping_option_selection_coordinator.h
@@ -8,7 +8,7 @@
 #import <UIKit/UIKit.h>
 #include <vector>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.h"
 
 namespace payments {
diff --git a/ios/chrome/browser/ui/qr_scanner/BUILD.gn b/ios/chrome/browser/ui/qr_scanner/BUILD.gn
index 5de39b0..33344a8 100644
--- a/ios/chrome/browser/ui/qr_scanner/BUILD.gn
+++ b/ios/chrome/browser/ui/qr_scanner/BUILD.gn
@@ -48,6 +48,7 @@
     "//ios/chrome/browser/browser_state",
     "//ios/chrome/browser/tabs",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/qr_scanner/requirements",
   ]
 }
diff --git a/ios/chrome/browser/ui/qr_scanner/qr_scanner_legacy_coordinator.h b/ios/chrome/browser/ui/qr_scanner/qr_scanner_legacy_coordinator.h
index 93b44b2..c1c6b706 100644
--- a/ios/chrome/browser/ui/qr_scanner/qr_scanner_legacy_coordinator.h
+++ b/ios/chrome/browser/ui/qr_scanner/qr_scanner_legacy_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_LEGACY_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_QR_SCANNER_QR_SCANNER_LEGACY_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 
 @class CommandDispatcher;
 @protocol QRScannerPresenting;
diff --git a/ios/chrome/browser/ui/reading_list/BUILD.gn b/ios/chrome/browser/ui/reading_list/BUILD.gn
index 1bc1c02..8c748ec 100644
--- a/ios/chrome/browser/ui/reading_list/BUILD.gn
+++ b/ios/chrome/browser/ui/reading_list/BUILD.gn
@@ -38,6 +38,7 @@
     "//ios/chrome/browser/tabs",
     "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/alert_coordinator",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/favicon",
     "//ios/chrome/browser/ui/favicon:favicon_ui",
     "//ios/chrome/browser/ui/side_swipe",
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_coordinator.h b/ios/chrome/browser/ui/reading_list/reading_list_coordinator.h
index 5a1f151..52e2eb65 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_coordinator.h
+++ b/ios/chrome/browser/ui/reading_list/reading_list_coordinator.h
@@ -5,7 +5,7 @@
 #ifndef IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_READING_LIST_READING_LIST_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/reading_list/reading_list_collection_view_controller.h"
 
 namespace ios {
diff --git a/ios/chrome/browser/ui/settings/settings_collection_view_controller.mm b/ios/chrome/browser/ui/settings/settings_collection_view_controller.mm
index 1579436..e9bbd8bf 100644
--- a/ios/chrome/browser/ui/settings/settings_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/settings_collection_view_controller.mm
@@ -111,7 +111,6 @@
   ItemTypeMemoryDebugging,
   ItemTypeViewSource,
   ItemTypeLogJavascript,
-  ItemTypeShowAutofillTypePredictions,
   ItemTypeCellCatalog,
   ItemTypeArticlesForYou,
 };
@@ -119,7 +118,6 @@
 #if CHROMIUM_BUILD && !defined(NDEBUG)
 NSString* kDevViewSourceKey = @"DevViewSource";
 NSString* kLogJavascriptKey = @"LogJavascript";
-NSString* kShowAutofillTypePredictionsKey = @"ShowAutofillTypePredictions";
 #endif  // CHROMIUM_BUILD && !defined(NDEBUG)
 
 #pragma mark - SigninObserverBridge Class
@@ -425,8 +423,6 @@
       toSectionWithIdentifier:SectionIdentifierDebug];
   [model addItem:[self logJavascriptConsoleSwitchItem]
       toSectionWithIdentifier:SectionIdentifierDebug];
-  [model addItem:[self showAutofillTypePredictionsSwitchItem]
-      toSectionWithIdentifier:SectionIdentifierDebug];
   [model addItem:[self materialCatalogDetailItem]
       toSectionWithIdentifier:SectionIdentifierDebug];
 #endif  // CHROMIUM_BUILD && !defined(NDEBUG)
@@ -594,12 +590,6 @@
                   withDefaultsKey:kLogJavascriptKey];
 }
 
-- (CollectionViewSwitchItem*)showAutofillTypePredictionsSwitchItem {
-  return [self switchItemWithType:ItemTypeShowAutofillTypePredictions
-                            title:@"Show Autofill type predictions"
-                  withDefaultsKey:kShowAutofillTypePredictionsKey];
-}
-
 - (CollectionViewDetailItem*)materialCatalogDetailItem {
   return [self detailItemWithType:ItemTypeCellCatalog
                              text:@"Cell Catalog"
@@ -728,18 +718,6 @@
 #endif  // CHROMIUM_BUILD && !defined(NDEBUG)
       break;
     }
-    case ItemTypeShowAutofillTypePredictions: {
-#if CHROMIUM_BUILD && !defined(NDEBUG)
-      CollectionViewSwitchCell* switchCell =
-          base::mac::ObjCCastStrict<CollectionViewSwitchCell>(cell);
-      [switchCell.switchView addTarget:self
-                                action:@selector(showAutoFillSwitchToggled:)
-                      forControlEvents:UIControlEventValueChanged];
-#else
-      NOTREACHED();
-#endif  // CHROMIUM_BUILD && !defined(NDEBUG)
-      break;
-    }
     default:
       break;
   }
@@ -813,7 +791,6 @@
     case ItemTypeMemoryDebugging:
     case ItemTypeViewSource:
     case ItemTypeLogJavascript:
-    case ItemTypeShowAutofillTypePredictions:
       // Taps on these don't do anything. They have a switch as accessory view
       // and only the switch is tappable.
       break;
@@ -860,7 +837,6 @@
   switch (type) {
     case ItemTypeLogJavascript:
     case ItemTypeMemoryDebugging:
-    case ItemTypeShowAutofillTypePredictions:
     case ItemTypeSigninPromo:
     case ItemTypeViewSource:
       return YES;
@@ -927,21 +903,6 @@
   switchItem.on = newSwitchValue;
   [self setBooleanNSUserDefaultsValue:newSwitchValue forKey:kLogJavascriptKey];
 }
-
-- (void)showAutoFillSwitchToggled:(UISwitch*)sender {
-  NSIndexPath* switchPath = [self.collectionViewModel
-      indexPathForItemType:ItemTypeShowAutofillTypePredictions
-         sectionIdentifier:SectionIdentifierDebug];
-
-  CollectionViewSwitchItem* switchItem =
-      base::mac::ObjCCastStrict<CollectionViewSwitchItem>(
-          [self.collectionViewModel itemAtIndexPath:switchPath]);
-
-  BOOL newSwitchValue = sender.isOn;
-  switchItem.on = newSwitchValue;
-  [self setBooleanNSUserDefaultsValue:newSwitchValue
-                               forKey:kShowAutofillTypePredictionsKey];
-}
 #endif  // CHROMIUM_BUILD && !defined(NDEBUG)
 
 #pragma mark Private methods
diff --git a/ios/chrome/browser/ui/settings/settings_navigation_controller.h b/ios/chrome/browser/ui/settings/settings_navigation_controller.h
index d94a178..7c62279 100644
--- a/ios/chrome/browser/ui/settings/settings_navigation_controller.h
+++ b/ios/chrome/browser/ui/settings/settings_navigation_controller.h
@@ -41,7 +41,8 @@
 
 // Controller to modify user settings.
 @interface SettingsNavigationController
-    : UINavigationController<ApplicationSettingsCommands>
+    : UINavigationController<ApplicationSettingsCommands,
+                             SettingsControllerProtocol>
 
 // Whether sync changes should be committed when the settings are being
 // dismissed. Defaults to YES.
@@ -138,10 +139,6 @@
 // Returns the current main browser state.
 - (ios::ChromeBrowserState*)mainBrowserState;
 
-// Notifies this |SettingsNavigationController| that it will be dismissed such
-// that it has a possibility to do necessary clean up.
-- (void)settingsWillBeDismissed;
-
 // Closes this |SettingsNavigationController| by asking its delegate.
 - (void)closeSettings;
 
diff --git a/ios/chrome/browser/ui/settings/settings_navigation_controller.mm b/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
index 50518ea7..f5d216a 100644
--- a/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
+++ b/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
@@ -312,6 +312,13 @@
   return self;
 }
 
+- (void)viewWillDisappear:(BOOL)animated {
+  [super viewWillDisappear:animated];
+  if (self.isBeingDismissed) {
+    [self settingsWillBeDismissed];
+  }
+}
+
 - (void)settingsWillBeDismissed {
   // Notify all controllers that settings are about to be dismissed.
   for (UIViewController* controller in [self viewControllers]) {
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
index f1b0249..2ca8b1b 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
@@ -24,6 +24,8 @@
 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
 #import "ios/chrome/browser/tabs/tab.h"
 #import "ios/chrome/browser/tabs/tab_model.h"
+#import "ios/chrome/browser/ui/authentication/signin_promo_view_consumer.h"
+#import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h"
 #include "ios/chrome/browser/ui/commands/application_commands.h"
 #include "ios/chrome/browser/ui/commands/browser_commands.h"
 #import "ios/chrome/browser/ui/commands/command_dispatcher.h"
@@ -95,6 +97,7 @@
 }  // namespace
 
 @interface TabSwitcherController ()<SigninPresenter,
+                                    SigninPromoViewConsumer,
                                     SyncPresenter,
                                     TabSwitcherModelDelegate,
                                     TabSwitcherViewDelegate,
@@ -120,6 +123,8 @@
   TabSwitcherModel* _tabSwitcherModel;
   // Stores the current sign-in panel type.
   TabSwitcherSignInPanelsType _signInPanelType;
+  // Stores the sign-in panel overlay view.
+  TabSwitcherPanelOverlayView* _signInPanelOverlayView;
   // Cache for the panel's cells.
   TabSwitcherCache* _cache;
   // Stores the background color of the window when the tab switcher was
@@ -131,6 +136,8 @@
   BOOL _shouldAddPromoPanelHeaderCell;
   // Handles command dispatching.
   CommandDispatcher* _dispatcher;
+  // Sign-in promo view mediator for the "Other Devices" tab.
+  SigninPromoViewMediator* _signinPromoViewMediator;
 }
 
 // Updates the window background color to the tab switcher's background color.
@@ -1027,6 +1034,10 @@
         [_tabSwitcherView currentPanelIndex] != kSignInPromoPanelIndex;
     [_tabSwitcherView removePanelViewAtIndex:kSignInPromoPanelIndex
                             updateScrollView:updateScrollView];
+    _signinPromoViewMediator.consumer = nil;
+    [_signinPromoViewMediator signinPromoViewRemoved];
+    _signinPromoViewMediator = nil;
+    _signInPanelOverlayView = nil;
   } else {
     _shouldAddPromoPanelHeaderCell = YES;
   }
@@ -1035,6 +1046,7 @@
 
 - (void)addPromoPanelForSignInPanelType:(TabSwitcherSignInPanelsType)panelType {
   _signInPanelType = panelType;
+  DCHECK_EQ(nil, _signInPanelOverlayView);
   if (panelType != TabSwitcherSignInPanelsType::NO_PANEL) {
     TabSwitcherPanelOverlayView* panelView =
         [[TabSwitcherPanelOverlayView alloc]
@@ -1042,6 +1054,16 @@
              browserState:_browserState
                 presenter:self /* id<SigninPresenter, SyncPresenter> */
                dispatcher:self.dispatcher];
+    _signInPanelOverlayView = panelView;
+    if (panelType == TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_OUT) {
+      _signinPromoViewMediator = [[SigninPromoViewMediator alloc]
+          initWithBrowserState:_browserState
+                   accessPoint:signin_metrics::AccessPoint::
+                                   ACCESS_POINT_TAB_SWITCHER
+                     presenter:self];
+      _signinPromoViewMediator.consumer = self;
+      panelView.signinPromoViewMediator = _signinPromoViewMediator;
+    }
     [panelView setOverlayType:PanelOverlayTypeFromSignInPanelsType(panelType)];
     [_tabSwitcherView addPanelView:panelView atIndex:kSignInPromoPanelIndex];
   }
@@ -1060,6 +1082,10 @@
   }
 }
 
+- (BOOL)isSigninInProgress {
+  return _signinPromoViewMediator.signinInProgress;
+}
+
 #pragma mark - TabSwitcherHeaderViewDelegate
 
 - (void)tabSwitcherHeaderViewDismiss:(TabSwitcherHeaderView*)view {
@@ -1276,4 +1302,19 @@
   [self.dispatcher showSignin:command baseViewController:self];
 }
 
+#pragma mark - SigninPromoViewConsumer
+
+- (void)configureSigninPromoWithConfigurator:
+            (SigninPromoViewConfigurator*)configurator
+                             identityChanged:(BOOL)identityChanged {
+  DCHECK(nil != _signInPanelOverlayView);
+  [_signInPanelOverlayView
+      configureSigninPromoWithConfigurator:configurator
+                           identityChanged:identityChanged];
+}
+
+- (void)signinDidFinish {
+  [_tabSwitcherModel syncedSessionsChanged];
+}
+
 @end
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller_egtest.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller_egtest.mm
index 902646b..c7af661 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller_egtest.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller_egtest.mm
@@ -380,6 +380,20 @@
   [SigninEarlGreyUtils
       checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState
                           closeButton:NO];
+
+  // Tap the secondary button.
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(
+                                   chrome_test_util::PrimarySignInButton(),
+                                   grey_sufficientlyVisible(), nil)]
+      performAction:grey_tap()];
+  // Tap the UNDO button.
+  [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"UNDO")]
+      performAction:grey_tap()];
+  // Check the sign-in promo view with warm state.
+  [SigninEarlGreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState
+                          closeButton:NO];
 }
 
 // Tests to reload the other devices tab after sign-in.
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h
index ced60da8..ce364c3 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h
@@ -52,6 +52,8 @@
 // Called to retrieve the size of the item at the |index| in |session|.
 - (CGSize)sizeForItemAtIndex:(NSUInteger)index
                    inSession:(TabSwitcherSessionType)session;
+// Returns YES if sign-in from Other Devices is in progress.
+- (BOOL)isSigninInProgress;
 @end
 
 // This class serves as a bridge between Chrome-level data (CLD), and what is
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm
index 3daeb79..964739d 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm
@@ -211,25 +211,18 @@
 }
 
 - (TabSwitcherSignInPanelsType)signInPanelType {
-  TabSwitcherSignInPanelsType panelType = TabSwitcherSignInPanelsType::NO_PANEL;
-  if (![self isSignedIn]) {
-    panelType = TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_OUT;
+  if (![self isSignedIn] || [_delegate isSigninInProgress])
+    return TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_OUT;
+  if (![self isSyncTabsEnabled])
+    return TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_IN_SYNC_OFF;
+  if (_syncedSessions->GetSessionCount() != 0)
+    return TabSwitcherSignInPanelsType::NO_PANEL;
+  if ([self isFirstSyncCycleCompleted]) {
+    return TabSwitcherSignInPanelsType::
+        PANEL_USER_SIGNED_IN_SYNC_ON_NO_SESSIONS;
   } else {
-    if (![self isSyncTabsEnabled]) {
-      panelType = TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_IN_SYNC_OFF;
-    } else {
-      if (_syncedSessions->GetSessionCount() == 0) {
-        if ([self isFirstSyncCycleCompleted]) {
-          panelType = TabSwitcherSignInPanelsType::
-              PANEL_USER_SIGNED_IN_SYNC_ON_NO_SESSIONS;
-        } else {
-          panelType = TabSwitcherSignInPanelsType::
-              PANEL_USER_SIGNED_IN_SYNC_IN_PROGRESS;
-        }
-      }
-    }
+    return TabSwitcherSignInPanelsType::PANEL_USER_SIGNED_IN_SYNC_IN_PROGRESS;
   }
-  return panelType;
 }
 
 - (void)syncedSessionsChanged {
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm
index fddb578..18c6bca 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm
@@ -90,10 +90,17 @@
 - (void)signInPanelChangedTo:(TabSwitcherSignInPanelsType)panelType {
   NOTREACHED();
 }
+
 - (CGSize)sizeForItemAtIndex:(NSUInteger)index
                    inSession:(TabSwitcherSessionType)session {
   return CGSizeZero;
 }
+
+- (BOOL)isSigninInProgress {
+  NOTREACHED();
+  return NO;
+}
+
 @end
 
 namespace {
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.h
index 6ea09e80..257b3737 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.h
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.h
@@ -10,6 +10,8 @@
 @protocol ApplicationCommands;
 @protocol BrowserCommands;
 @protocol SigninPresenter;
+@class SigninPromoViewConfigurator;
+@class SigninPromoViewMediator;
 @protocol SyncPresenter;
 
 namespace ios {
@@ -38,6 +40,7 @@
     presenter;
 @property(nonatomic, readonly, weak) id<ApplicationCommands, BrowserCommands>
     dispatcher;
+@property(nonatomic) SigninPromoViewMediator* signinPromoViewMediator;
 
 - (instancetype)initWithFrame:(CGRect)frame
                  browserState:(ios::ChromeBrowserState*)browserState
@@ -50,6 +53,11 @@
 // Should be called when the tab switcher was hidden.
 - (void)wasHidden;
 
+// Called when the sign-in promo view should be reloaded.
+- (void)configureSigninPromoWithConfigurator:
+            (SigninPromoViewConfigurator*)configurator
+                             identityChanged:(BOOL)identityChanged;
+
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_PANEL_OVERLAY_VIEW_H_
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.mm
index bf4ceac..f63608e 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.mm
@@ -11,7 +11,6 @@
 #include "ios/chrome/browser/experimental_flags.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view_configurator.h"
-#import "ios/chrome/browser/ui/authentication/signin_promo_view_consumer.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h"
 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
 #import "ios/chrome/browser/ui/commands/application_commands.h"
@@ -60,7 +59,7 @@
 const CGFloat kSubtitleMinimunLineHeight = 24.0;
 }
 
-@interface TabSwitcherPanelOverlayView ()<SigninPromoViewConsumer>
+@interface TabSwitcherPanelOverlayView ()
 
 // Updates the texts of labels and button according to the current
 // |overlayType|.
@@ -81,7 +80,6 @@
   MDCButton* _floatingButton;
   MDCActivityIndicator* _activityIndicator;
   std::string _recordedMetricString;
-  SigninPromoViewMediator* _signinPromoViewMediator;
   // |_signinPromoView| should only be shown when |overlayType| is set to
   // |OVERLAY_PANEL_USER_SIGNED_OUT|.
   SigninPromoView* _signinPromoView;
@@ -90,6 +88,7 @@
 @synthesize overlayType = _overlayType;
 @synthesize presenter = _presenter;
 @synthesize dispatcher = _dispatcher;
+@synthesize signinPromoViewMediator = _signinPromoViewMediator;
 
 - (instancetype)initWithFrame:(CGRect)frame
                  browserState:(ios::ChromeBrowserState*)browserState
@@ -192,10 +191,6 @@
   return self;
 }
 
-- (void)dealloc {
-  [_signinPromoViewMediator signinPromoViewRemoved];
-}
-
 - (void)layoutSubviews {
   [super layoutSubviews];
   CGRect containerFrame = [_container frame];
@@ -217,9 +212,6 @@
     _container.hidden = NO;
     [_signinPromoView removeFromSuperview];
     _signinPromoView = nil;
-    _signinPromoViewMediator.consumer = nil;
-    [_signinPromoViewMediator signinPromoViewRemoved];
-    _signinPromoViewMediator = nil;
     [self updateText];
     [self updateButtonTarget];
   }
@@ -233,14 +225,21 @@
   [_signinPromoViewMediator signinPromoViewHidden];
 }
 
+- (void)configureSigninPromoWithConfigurator:
+            (SigninPromoViewConfigurator*)configurator
+                             identityChanged:(BOOL)identityChanged {
+  DCHECK(_signinPromoView);
+  DCHECK(_signinPromoViewMediator);
+  [configurator configureSigninPromoView:_signinPromoView];
+}
+
 #pragma mark - Private
 
 // Creates the sign-in view and its mediator if it doesn't exist.
 - (void)createSigninPromoViewIfNeeded {
-  if (_signinPromoView) {
-    DCHECK(_signinPromoViewMediator);
+  DCHECK(_signinPromoViewMediator);
+  if (_signinPromoView)
     return;
-  }
   _signinPromoView = [[SigninPromoView alloc] initWithFrame:CGRectZero];
   _signinPromoView.translatesAutoresizingMaskIntoConstraints = NO;
   _signinPromoView.textLabel.text =
@@ -259,13 +258,7 @@
       constraintEqualToAnchor:self.centerYAnchor
                      constant:kContainerOriginYOffset]
       .active = YES;
-  _signinPromoViewMediator = [[SigninPromoViewMediator alloc]
-      initWithBrowserState:_browserState
-               accessPoint:signin_metrics::AccessPoint::
-                               ACCESS_POINT_TAB_SWITCHER
-                 presenter:self.presenter /* id<SigninPresenter> */];
   _signinPromoView.delegate = _signinPromoViewMediator;
-  _signinPromoViewMediator.consumer = self;
   [[_signinPromoViewMediator createConfigurator]
       configureSigninPromoView:_signinPromoView];
 }
@@ -494,14 +487,4 @@
   base::RecordAction(base::UserMetricsAction(_recordedMetricString.c_str()));
 }
 
-#pragma mark - SigninPromoViewConsumer
-
-- (void)configureSigninPromoWithConfigurator:
-            (SigninPromoViewConfigurator*)configurator
-                             identityChanged:(BOOL)identityChanged {
-  DCHECK(_signinPromoView);
-  DCHECK(_signinPromoViewMediator);
-  [configurator configureSigninPromoView:_signinPromoView];
-}
-
 @end
diff --git a/ios/chrome/browser/ui/tabs/BUILD.gn b/ios/chrome/browser/ui/tabs/BUILD.gn
index 556886c..eebbcf0 100644
--- a/ios/chrome/browser/ui/tabs/BUILD.gn
+++ b/ios/chrome/browser/ui/tabs/BUILD.gn
@@ -69,6 +69,7 @@
     "//ios/chrome/browser/browser_state",
     "//ios/chrome/browser/ui/bubble",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/tabs/requirements",
   ]
 }
diff --git a/ios/chrome/browser/ui/tabs/tab_strip_legacy_coordinator.h b/ios/chrome/browser/ui/tabs/tab_strip_legacy_coordinator.h
index d0e10e4..6861f6b0 100644
--- a/ios/chrome/browser/ui/tabs/tab_strip_legacy_coordinator.h
+++ b/ios/chrome/browser/ui/tabs/tab_strip_legacy_coordinator.h
@@ -7,8 +7,8 @@
 
 #import <UIKit/UIKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/bubble/bubble_view_anchor_point_provider.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/tabs/requirements/tab_strip_highlighting.h"
 
 @protocol ApplicationCommands;
diff --git a/ios/chrome/browser/ui/toolbar/BUILD.gn b/ios/chrome/browser/ui/toolbar/BUILD.gn
index f98186e..5d8a0b2 100644
--- a/ios/chrome/browser/ui/toolbar/BUILD.gn
+++ b/ios/chrome/browser/ui/toolbar/BUILD.gn
@@ -69,6 +69,7 @@
     "//ios/chrome/browser/ui/bubble",
     "//ios/chrome/browser/ui/colors",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/fancy_ui",
     "//ios/chrome/browser/ui/fullscreen",
     "//ios/chrome/browser/ui/fullscreen:new_fullscreen",
@@ -79,6 +80,7 @@
     "//ios/chrome/browser/ui/ntp",
     "//ios/chrome/browser/ui/ntp:modal_ntp",
     "//ios/chrome/browser/ui/omnibox",
+    "//ios/chrome/browser/ui/omnibox/popup",
     "//ios/chrome/browser/ui/popup_menu",
     "//ios/chrome/browser/ui/qr_scanner/requirements",
     "//ios/chrome/browser/ui/toolbar/clean:toolbar",
diff --git a/ios/chrome/browser/ui/toolbar/clean/BUILD.gn b/ios/chrome/browser/ui/toolbar/clean/BUILD.gn
index 356dec9a..9f75bdd6 100644
--- a/ios/chrome/browser/ui/toolbar/clean/BUILD.gn
+++ b/ios/chrome/browser/ui/toolbar/clean/BUILD.gn
@@ -39,6 +39,7 @@
     "//ios/chrome/browser/ui/history_popup/requirements",
     "//ios/chrome/browser/ui/omnibox",
     "//ios/chrome/browser/ui/omnibox:omnibox_internal",
+    "//ios/chrome/browser/ui/omnibox/popup",
     "//ios/chrome/browser/ui/qr_scanner/requirements",
     "//ios/chrome/browser/ui/toolbar/keyboard_assist",
     "//ios/chrome/browser/ui/toolbar/public",
@@ -76,6 +77,7 @@
     "//ios/chrome/browser/ui/fullscreen:new_fullscreen_ui",
     "//ios/chrome/browser/ui/history_popup/requirements",
     "//ios/chrome/browser/ui/toolbar/public",
+    "//ios/chrome/browser/ui/util",
     "//ios/chrome/browser/ui/voice",
     "//ios/chrome/common",
     "//ios/third_party/material_components_ios",
diff --git a/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.h b/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.h
index 2025ed11..5a78180 100644
--- a/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.h
+++ b/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.h
@@ -60,8 +60,8 @@
 
 // TODO(crbug.com/785253): Move this to the LocationBarCoordinator once it is
 // created.
-// Updates the visibility of the omnibox text.
-- (void)updateOmniboxState;
+// Updates the visibility of the Omnibox text and Toolbar buttons.
+- (void)updateToolbarState;
 // Updates the toolbar so it is in a state where a snapshot for |webState| can
 // be taken.
 - (void)updateToolbarForSideSwipeSnapshot:(web::WebState*)webState;
diff --git a/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.mm b/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.mm
index ef0dbd20..8555bd3 100644
--- a/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.mm
+++ b/ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator.mm
@@ -31,8 +31,8 @@
 #include "ios/chrome/browser/ui/omnibox/location_bar_delegate.h"
 #include "ios/chrome/browser/ui/omnibox/location_bar_view.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_positioner.h"
-#include "ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h"
 #import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h"
+#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h"
 #import "ios/chrome/browser/ui/toolbar/clean/toolbar_button_factory.h"
 #import "ios/chrome/browser/ui/toolbar/clean/toolbar_button_updater.h"
 #import "ios/chrome/browser/ui/toolbar/clean/toolbar_coordinator_delegate.h"
@@ -64,7 +64,6 @@
 
 @interface ToolbarCoordinator ()<LocationBarDelegate, OmniboxPopupPositioner> {
   std::unique_ptr<LocationBarControllerImpl> _locationBar;
-  std::unique_ptr<OmniboxPopupViewIOS> _popupView;
   // Observer that updates |toolbarViewController| for fullscreen events.
   std::unique_ptr<FullscreenControllerObserver> _fullscreenObserver;
 }
@@ -84,7 +83,8 @@
 // Button observer for the ToolsMenu button.
 @property(nonatomic, strong)
     ToolsMenuButtonObserverBridge* toolsMenuButtonObserverBridge;
-
+// Coordinator for the omnibox popup.
+@property(nonatomic, strong) OmniboxPopupCoordinator* omniboxPopupCoordinator;
 @end
 
 @implementation ToolbarCoordinator
@@ -95,6 +95,7 @@
 @synthesize keyboardDelegate = _keyboardDelegate;
 @synthesize locationBarView = _locationBarView;
 @synthesize mediator = _mediator;
+@synthesize omniboxPopupCoordinator = _omniboxPopupCoordinator;
 @synthesize started = _started;
 @synthesize toolbarViewController = _toolbarViewController;
 @synthesize toolsMenuButtonObserverBridge = _toolsMenuButtonObserverBridge;
@@ -173,7 +174,8 @@
   ConfigureAssistiveKeyboardViews(self.locationBarView.textField, kDotComTLD,
                                   self.keyboardDelegate);
 
-  _popupView = _locationBar->CreatePopupView(self);
+  self.omniboxPopupCoordinator = _locationBar->CreatePopupCoordinator(self);
+  [self.omniboxPopupCoordinator start];
   // End of TODO(crbug.com/785253):.
 
   ToolbarStyle style = isIncognito ? INCOGNITO : NORMAL;
@@ -219,7 +221,7 @@
   self.started = NO;
   [self.mediator disconnect];
   // The popup has to be destroyed before the location bar.
-  _popupView.reset();
+  [self.omniboxPopupCoordinator stop];
   _locationBar.reset();
   self.locationBarView = nil;
   [self stopObservingTTSNotifications];
@@ -249,9 +251,11 @@
 }
 
 - (void)updateToolbarState {
-  // TODO(crbug.com/784911): This function should probably triggers something in
-  // the mediator. Investigate how to handle it.
+  // Updates the omnibox.
   [self updateOmniboxState];
+  // Updates the toolbar buttons.
+  if ([self getWebState])
+    [self.mediator updateConsumerForWebState:[self getWebState]];
 }
 
 - (void)updateToolbarForSideSwipeSnapshot:(web::WebState*)webState {
@@ -325,29 +329,6 @@
   return self.toolbarViewController.view;
 }
 
-- (CGRect)popupFrame:(CGFloat)height {
-  UIView* parent = [[self popupAnchorView] superview];
-  CGRect frame = [parent bounds];
-
-  if (IsIPadIdiom()) {
-    // For iPad, the omnibox is displayed between the location bar and the
-    // bottom of the toolbar.
-    CGRect fieldFrame = [parent convertRect:[_locationBarView bounds]
-                                   fromView:_locationBarView];
-    CGFloat maxY = CGRectGetMaxY(fieldFrame);
-    frame.origin.y = maxY + kiPadOmniboxPopupVerticalOffset;
-    frame.size.height = height;
-  } else {
-    // For iPhone place the popup just below the toolbar.
-    CGRect fieldFrame =
-        [parent convertRect:[self.toolbarViewController.view bounds]
-                   fromView:self.toolbarViewController.view];
-    frame.origin.y = CGRectGetMaxY(fieldFrame);
-    frame.size.height = CGRectGetMaxY([parent bounds]) - frame.origin.y;
-  }
-  return frame;
-}
-
 #pragma mark - LocationBarDelegate
 
 - (void)loadGURLFromLocationBar:(const GURL&)url
diff --git a/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm b/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
index c168c31..d968c08 100644
--- a/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
+++ b/ios/chrome/browser/ui/toolbar/clean/toolbar_view_controller.mm
@@ -26,6 +26,7 @@
 #import "ios/chrome/browser/ui/toolbar/public/web_toolbar_controller_constants.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
 #import "ios/chrome/browser/ui/util/constraints_ui_util.h"
+#import "ios/chrome/browser/ui/util/named_guide.h"
 #import "ios/chrome/common/material_timing.h"
 #include "ios/chrome/grit/ios_theme_resources.h"
 #import "ios/third_party/material_components_ios/src/components/ProgressView/src/MaterialProgressView.h"
@@ -823,6 +824,11 @@
   [viewController didMoveToParentViewController:self];
 }
 
+- (void)didMoveToParentViewController:(UIViewController*)parent {
+  UILayoutGuide* omniboxPopupGuide = FindNamedGuide(kOmniboxGuide, self.view);
+  AddSameConstraints(self.locationBarContainer, omniboxPopupGuide);
+}
+
 #pragma mark - Trait Collection Changes
 
 - (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection {
diff --git a/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.h b/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.h
index 1efd1b2..b5e2f2f 100644
--- a/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.h
+++ b/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.h
@@ -7,8 +7,8 @@
 
 #import <UIKit/UIKit.h>
 
-#import "ios/chrome/browser/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/bubble/bubble_view_anchor_point_provider.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/fullscreen/fullscreen_ui_element.h"
 #import "ios/chrome/browser/ui/ntp/incognito_view_controller_delegate.h"
 #import "ios/chrome/browser/ui/side_swipe/side_swipe_toolbar_interacting.h"
@@ -60,7 +60,16 @@
 - (instancetype)initWithBaseViewController:(UIViewController*)viewController
             toolsMenuConfigurationProvider:
                 (id<ToolsMenuConfigurationProvider>)configurationProvider
-                                dispatcher:(CommandDispatcher*)dispatcher;
+                                dispatcher:(CommandDispatcher*)dispatcher
+                              browserState:
+                                  (ios::ChromeBrowserState*)browserState
+    NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithBaseViewController:(UIViewController*)viewController
+    NS_UNAVAILABLE;
+- (instancetype)initWithBaseViewController:(UIViewController*)viewController
+                              browserState:
+                                  (ios::ChromeBrowserState*)browserState
+    NS_UNAVAILABLE;
 
 // Returns the different protocols and superclass now implemented by the
 - (id<VoiceSearchControllerDelegate>)voiceSearchDelegate;
diff --git a/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.mm b/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.mm
index ed03a0b..5a23614 100644
--- a/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.mm
+++ b/ios/chrome/browser/ui/toolbar/legacy_toolbar_coordinator.mm
@@ -40,8 +40,12 @@
 - (instancetype)initWithBaseViewController:(UIViewController*)viewController
             toolsMenuConfigurationProvider:
                 (id<ToolsMenuConfigurationProvider>)configurationProvider
-                                dispatcher:(CommandDispatcher*)dispatcher {
-  if (self = [super initWithBaseViewController:viewController]) {
+                                dispatcher:(CommandDispatcher*)dispatcher
+                              browserState:
+                                  (ios::ChromeBrowserState*)browserState {
+  if (self = [super initWithBaseViewController:viewController
+                                  browserState:browserState]) {
+    DCHECK(browserState);
     _toolsMenuCoordinator = [[ToolsMenuCoordinator alloc]
         initWithBaseViewController:viewController];
     _toolsMenuCoordinator.dispatcher = dispatcher;
@@ -64,22 +68,13 @@
 }
 
 - (void)start {
-  if (base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen)) {
-    _fullscreenUpdater =
-        base::MakeUnique<FullscreenUIUpdater>(self.toolbarController);
-    FullscreenControllerFactory::GetInstance()
-        ->GetForBrowserState(self.tabModel.browserState)
-        ->AddObserver(_fullscreenUpdater.get());
-  }
+  if (base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen))
+    [self startObservingFullscreen];
 }
 
 - (void)stop {
-  if (base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen)) {
-    FullscreenControllerFactory::GetInstance()
-        ->GetForBrowserState(self.tabModel.browserState)
-        ->RemoveObserver(_fullscreenUpdater.get());
-    _fullscreenUpdater = nullptr;
-  }
+  if (base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen))
+    [self stopObservingFullscreen];
   self.toolbarController = nil;
 }
 
@@ -141,6 +136,8 @@
 - (void)browserStateDestroyed {
   [self.toolbarController setBackgroundAlpha:1.0];
   [self.toolbarController browserStateDestroyed];
+  if (base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen))
+    [self stopObservingFullscreen];
 }
 
 - (void)updateToolbarState {
@@ -303,4 +300,38 @@
   [self cancelOmniboxEdit];
 }
 
+#pragma mark - Fullscreen helpers
+
+// Creates a FullscreenUIUpdater for the toolbar controller and adds it as a
+// FullscreenControllerObserver.
+- (void)startObservingFullscreen {
+  DCHECK(base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen));
+  if (_fullscreenUpdater)
+    return;
+  if (!self.browserState)
+    return;
+  FullscreenController* fullscreenController =
+      FullscreenControllerFactory::GetInstance()->GetForBrowserState(
+          self.browserState);
+  DCHECK(fullscreenController);
+  _fullscreenUpdater =
+      base::MakeUnique<FullscreenUIUpdater>(self.toolbarController);
+  fullscreenController->AddObserver(_fullscreenUpdater.get());
+}
+
+// Removes the FullscreenUIUpdater as a FullscreenControllerObserver.
+- (void)stopObservingFullscreen {
+  DCHECK(base::FeatureList::IsEnabled(fullscreen::features::kNewFullscreen));
+  if (!_fullscreenUpdater)
+    return;
+  if (!self.browserState)
+    return;
+  FullscreenController* fullscreenController =
+      FullscreenControllerFactory::GetInstance()->GetForBrowserState(
+          self.browserState);
+  DCHECK(fullscreenController);
+  fullscreenController->RemoveObserver(_fullscreenUpdater.get());
+  _fullscreenUpdater = nullptr;
+}
+
 @end
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_adapter.mm b/ios/chrome/browser/ui/toolbar/toolbar_adapter.mm
index 1df24e7..4caa045 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_adapter.mm
+++ b/ios/chrome/browser/ui/toolbar/toolbar_adapter.mm
@@ -60,7 +60,7 @@
 }
 
 - (void)updateToolbarState {
-  [self.toolbarCoordinator updateOmniboxState];
+  [self.toolbarCoordinator updateToolbarState];
 }
 
 - (void)showPrerenderingAnimation {
diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
index dbd6e91..6bb297b 100644
--- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
+++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
@@ -50,8 +50,10 @@
 #include "ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h"
 #include "ios/chrome/browser/ui/omnibox/location_bar_delegate.h"
 #include "ios/chrome/browser/ui/omnibox/location_bar_view.h"
+#import "ios/chrome/browser/ui/omnibox/omnibox_popup_presenter.h"
 #include "ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.h"
 #include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h"
+#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_coordinator.h"
 #import "ios/chrome/browser/ui/popup_menu/popup_menu_view.h"
 #import "ios/chrome/browser/ui/reversed_animation.h"
 #include "ios/chrome/browser/ui/rtl_geometry.h"
@@ -71,6 +73,7 @@
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
 #import "ios/chrome/browser/ui/url_loader.h"
 #import "ios/chrome/browser/ui/util/constraints_ui_util.h"
+#import "ios/chrome/browser/ui/util/named_guide.h"
 #import "ios/chrome/browser/ui/voice/text_to_speech_player.h"
 #import "ios/chrome/browser/ui/voice/voice_search_notification_names.h"
 #import "ios/chrome/common/material_timing.h"
@@ -125,7 +128,7 @@
   UIView* _clippingView;
 
   std::unique_ptr<LocationBarControllerImpl> _locationBar;
-  std::unique_ptr<OmniboxPopupViewIOS> _popupView;
+  OmniboxPopupCoordinator* _omniboxPopupCoordinator;
   BOOL _initialLayoutComplete;
   // If |YES|, toolbar is incognito.
   BOOL _incognito;
@@ -490,7 +493,8 @@
   [_webToolbar setFrame:[self specificControlsArea]];
   _locationBar = base::MakeUnique<LocationBarControllerImpl>(
       _locationBarView, _browserState, self, self.dispatcher);
-  _popupView = _locationBar->CreatePopupView(self);
+  _omniboxPopupCoordinator = _locationBar->CreatePopupCoordinator(self);
+  [_omniboxPopupCoordinator start];
 
   // Create the determinate progress bar (phone only).
   if (idiom == IPHONE_IDIOM) {
@@ -562,6 +566,14 @@
 - (void)start {
 }
 
+- (void)didMoveToParentViewController:(UIViewController*)parent {
+  UILayoutGuide* omniboxPopupGuide = FindNamedGuide(kOmniboxGuide, self.view);
+  // The layout guide should be positioned with the same constraints as the
+  // location bar, but it doesn't work due to conflict between autolayout and
+  // autoresizing mask. Position it on the view instead.
+  AddSameConstraints(self.view, omniboxPopupGuide);
+}
+
 #pragma mark -
 #pragma mark Acessors
 
@@ -583,7 +595,7 @@
 - (void)browserStateDestroyed {
   // The location bar has a browser state reference, so must be destroyed at
   // this point. The popup has to be destroyed before the location bar.
-  _popupView.reset();
+  [_omniboxPopupCoordinator stop];
   _locationBar.reset();
   _browserState = nullptr;
 }
@@ -963,38 +975,6 @@
   return self.view;
 }
 
-- (CGRect)popupFrame:(CGFloat)height {
-  UIView* parent = [[self popupAnchorView] superview];
-  CGRect frame = [parent bounds];
-
-  // Set tablet popup width to the same width and origin of omnibox.
-  if (IsIPadIdiom()) {
-    // For iPad, the omnibox visually extends to include the voice search button
-    // on the right. Start with the field's frame in |parent|'s coordinate
-    // system.
-    CGRect fieldFrame = [parent convertRect:[_locationBarView bounds]
-                                   fromView:_locationBarView];
-
-    // Now create a new frame that's below the field, stretching the full width
-    // of |parent|, minus an inset on each side.
-    CGFloat maxY = CGRectGetMaxY(fieldFrame);
-
-    // The popup extends to the full width of the screen.
-    frame.origin.x = 0;
-    frame.size.width = self.view.frame.size.width;
-
-    frame.origin.y = maxY + kiPadOmniboxPopupVerticalOffset;
-    frame.size.height = height;
-  } else {
-    // For iPhone place the popup just below the toolbar.
-    CGRect fieldFrame =
-        [parent convertRect:[_webToolbar bounds] fromView:_webToolbar];
-    frame.origin.y = CGRectGetMaxY(fieldFrame);
-    frame.size.height = CGRectGetMaxY([parent bounds]) - frame.origin.y;
-  }
-  return frame;
-}
-
 #pragma mark -
 #pragma mark ToolbarViewDelegate methods.
 
@@ -1910,16 +1890,6 @@
   }
 }
 
-- (void)viewDidLayoutSubviews {
-  [super viewDidLayoutSubviews];
-
-  // The popup positions itself as a static frame below the web toolbar.  This
-  // will no longer be necessary post omnibox popup boxing.
-  if (_popupView) {
-    _popupView->UpdatePopupAppearance();
-  }
-}
-
 @end
 
 #pragma mark - Testing only.
diff --git a/ios/chrome/browser/ui/tools_menu/BUILD.gn b/ios/chrome/browser/ui/tools_menu/BUILD.gn
index 937ea92..f6e9ea4b 100644
--- a/ios/chrome/browser/ui/tools_menu/BUILD.gn
+++ b/ios/chrome/browser/ui/tools_menu/BUILD.gn
@@ -33,6 +33,7 @@
     "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/colors",
     "//ios/chrome/browser/ui/commands",
+    "//ios/chrome/browser/ui/coordinators:chrome_coordinators",
     "//ios/chrome/browser/ui/popup_menu",
     "//ios/chrome/browser/ui/reading_list",
     "//ios/chrome/browser/ui/reading_list:reading_list_ui",
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_coordinator.h b/ios/chrome/browser/ui/tools_menu/tools_menu_coordinator.h
index c1104520..71a10bd9 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_coordinator.h
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_coordinator.h
@@ -5,8 +5,8 @@
 #ifndef IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_COORDINATOR_H_
 #define IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_COORDINATOR_H_
 
-#import "ios/chrome/browser/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/commands/command_dispatcher.h"
+#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
 #import "ios/chrome/browser/ui/popup_menu/popup_menu_controller.h"
 #import "ios/chrome/browser/ui/tools_menu/public/tools_menu_presentation_state_provider.h"
 #import "ios/chrome/browser/ui/tools_menu/tools_menu_configuration.h"
diff --git a/ios/chrome/browser/ui/util/constraints_ui_util.h b/ios/chrome/browser/ui/util/constraints_ui_util.h
index d743a83..d22a2e5 100644
--- a/ios/chrome/browser/ui/util/constraints_ui_util.h
+++ b/ios/chrome/browser/ui/util/constraints_ui_util.h
@@ -97,6 +97,9 @@
 // trailing, top and bottom anchors.
 void AddSameConstraints(UIView* view1, UIView* view2);
 
+// Adds constraints such as the |layoutGuide| matches the |view|.
+void AddSameConstraints(UIView* view, UILayoutGuide* layoutGuide);
+
 // Adds constraints to make |innerView| leading, trailing, top and bottom
 // anchors equals to |outerView| safe area (or view bounds) anchors.
 void PinToSafeArea(UIView* innerView, UIView* outerView);
diff --git a/ios/chrome/browser/ui/util/constraints_ui_util.mm b/ios/chrome/browser/ui/util/constraints_ui_util.mm
index dfd0e7bd..9e55eed 100644
--- a/ios/chrome/browser/ui/util/constraints_ui_util.mm
+++ b/ios/chrome/browser/ui/util/constraints_ui_util.mm
@@ -133,6 +133,15 @@
   ]];
 }
 
+void AddSameConstraints(UIView* view, UILayoutGuide* layoutGuide) {
+  [NSLayoutConstraint activateConstraints:@[
+    [view.leadingAnchor constraintEqualToAnchor:layoutGuide.leadingAnchor],
+    [view.trailingAnchor constraintEqualToAnchor:layoutGuide.trailingAnchor],
+    [view.topAnchor constraintEqualToAnchor:layoutGuide.topAnchor],
+    [view.bottomAnchor constraintEqualToAnchor:layoutGuide.bottomAnchor]
+  ]];
+}
+
 void PinToSafeArea(UIView* innerView, UIView* outerView) {
   if (@available(iOS 11.0, *)) {
     [NSLayoutConstraint activateConstraints:@[
diff --git a/ios/chrome/browser/web/BUILD.gn b/ios/chrome/browser/web/BUILD.gn
index ab57228..265248fb8 100644
--- a/ios/chrome/browser/web/BUILD.gn
+++ b/ios/chrome/browser/web/BUILD.gn
@@ -130,10 +130,10 @@
     "error_page_content.mm",
     "error_page_generator.h",
     "error_page_generator.mm",
-    "external_app_launcher.h",
-    "external_app_launcher.mm",
     "external_app_launcher_tab_helper.h",
     "external_app_launcher_tab_helper.mm",
+    "external_app_launcher_util.h",
+    "external_app_launcher_util.mm",
     "external_app_launching_state.h",
     "external_app_launching_state.mm",
     "external_apps_launch_policy_decider.h",
@@ -216,7 +216,7 @@
     "blocked_popup_tab_helper_unittest.mm",
     "chrome_web_client_unittest.mm",
     "error_page_generator_unittest.mm",
-    "external_app_launcher_unittest.mm",
+    "external_app_launcher_util_unittest.mm",
     "external_app_launching_state_unittest.mm",
     "external_apps_launch_policy_decider_unittest.mm",
   ]
diff --git a/ios/chrome/browser/web/external_app_launcher.h b/ios/chrome/browser/web/external_app_launcher.h
deleted file mode 100644
index e00454d..0000000
--- a/ios/chrome/browser/web/external_app_launcher.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 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 IOS_CHROME_BROWSER_WEB_EXTERNAL_APP_LAUNCHER_H_
-#define IOS_CHROME_BROWSER_WEB_EXTERNAL_APP_LAUNCHER_H_
-
-#import <UIKit/UIKit.h>
-
-class GURL;
-
-// A customized external app launcher that optionally shows a modal
-// confirmation dialog before switching context to an external application.
-@interface ExternalAppLauncher : NSObject
-
-// Requests to open URL in an external application.
-// The method checks if the application for |gURL| has been opened repeatedly
-// by the |sourcePageURL| page in a short time frame, in that case a prompt will
-// appear to the user with an option to block the application from launching.
-// Then the method also checks for user interaction and for schemes that require
-// special handling (eg. facetime, mailto) and may present the user with a
-// confirmation dialog to open the application.
-// If there is no such application available or it's not possible to open the
-// application the method returns NO.
-- (BOOL)requestToOpenURL:(const GURL&)gURL
-           sourcePageURL:(const GURL&)sourcePageURL
-             linkClicked:(BOOL)linkClicked;
-
-@end
-
-#endif  // IOS_CHROME_BROWSER_WEB_EXTERNAL_APP_LAUNCHER_H_
diff --git a/ios/chrome/browser/web/external_app_launcher.mm b/ios/chrome/browser/web/external_app_launcher.mm
deleted file mode 100644
index 52f5964..0000000
--- a/ios/chrome/browser/web/external_app_launcher.mm
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright 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.
-
-#import "ios/chrome/browser/web/external_app_launcher.h"
-
-#include "base/feature_list.h"
-#include "base/ios/ios_util.h"
-#include "base/logging.h"
-#include "base/mac/foundation_util.h"
-#include "base/metrics/histogram_macros.h"
-#include "base/strings/sys_string_conversions.h"
-#include "components/strings/grit/components_strings.h"
-#import "ios/chrome/browser/open_url_util.h"
-#import "ios/chrome/browser/ui/external_app/open_mail_handler_view_controller.h"
-#import "ios/chrome/browser/web/external_apps_launch_policy_decider.h"
-#import "ios/chrome/browser/web/mailto_handler.h"
-#import "ios/chrome/browser/web/mailto_handler_manager.h"
-#include "ios/chrome/grit/ios_strings.h"
-#include "ios/third_party/material_components_ios/src/components/BottomSheet/src/MDCBottomSheetController.h"
-#import "net/base/mac/url_conversions.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "url/gurl.h"
-#include "url/url_constants.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-namespace {
-
-// Returns a set of NSStrings that are URL schemes for iTunes Stores.
-NSSet<NSString*>* ITMSSchemes() {
-  static NSSet<NSString*>* schemes;
-  static dispatch_once_t once;
-  dispatch_once(&once, ^{
-    schemes = [NSSet<NSString*>
-        setWithObjects:@"itms", @"itmss", @"itms-apps", @"itms-appss",
-                       // There's no evidence that itms-bookss is actually
-                       // supported, but over-inclusion costs less than
-                       // under-inclusion.
-                       @"itms-books", @"itms-bookss", nil];
-  });
-  return schemes;
-}
-
-bool UrlHasAppStoreScheme(const GURL& gURL) {
-  std::string scheme = gURL.scheme();
-  return [ITMSSchemes() containsObject:base::SysUTF8ToNSString(scheme)];
-}
-
-// Returns whether gURL has the scheme of a URL that initiates a call.
-bool UrlHasPhoneCallScheme(const GURL& gURL) {
-  return gURL.SchemeIs("tel") || gURL.SchemeIs("facetime") ||
-         gURL.SchemeIs("facetime-audio");
-}
-
-// Returns a string to be used as the label for the prompt's action button.
-NSString* PromptActionString(NSString* scheme) {
-  if ([scheme isEqualToString:@"facetime"])
-    return l10n_util::GetNSString(IDS_IOS_FACETIME_BUTTON);
-  else if ([scheme isEqualToString:@"tel"] ||
-           [scheme isEqualToString:@"facetime-audio"])
-    return l10n_util::GetNSString(IDS_IOS_PHONE_CALL_BUTTON);
-  NOTREACHED();
-  return @"";
-}
-
-// Launches the mail client app represented by |handler| and records metrics.
-void LaunchMailClientApp(const GURL& URL, MailtoHandler* handler) {
-  NSString* launchURL = [handler rewriteMailtoURL:URL];
-  UMA_HISTOGRAM_BOOLEAN("IOS.MailtoURLRewritten", launchURL != nil);
-  NSURL* URLToOpen = [launchURL length] ? [NSURL URLWithString:launchURL]
-                                        : net::NSURLWithGURL(URL);
-  if (@available(iOS 10, *)) {
-    [[UIApplication sharedApplication] openURL:URLToOpen
-                                       options:@{}
-                             completionHandler:nil];
-  }
-#if !defined(__IPHONE_10_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
-  else {
-    [[UIApplication sharedApplication] openURL:URLToOpen];
-  }
-#endif
-}
-
-}  // namespace
-
-@interface ExternalAppLauncher ()
-// Returns the Phone/FaceTime call argument from |URL|.
-+ (NSString*)formatCallArgument:(NSURL*)URL;
-
-// Returns whether there is a prompt shown by |requestToOpenURL| or not.
-@property(nonatomic, getter=isPromptActive) BOOL promptActive;
-// Used to check for repeated launches and provide policy for launching apps.
-@property(nonatomic, strong) ExternalAppsLaunchPolicyDecider* policyDecider;
-
-// Shows a prompt in Material Design for the user to choose which mail client
-// app to use to handle a mailto:// URL.
-- (void)promptForMailClientWithURL:(const GURL&)URL
-              mailtoHandlerManager:(MailtoHandlerManager*)manager;
-// Presents an alert controller with |prompt| and |openLabel| as button label
-// on the root view controller before launching an external app identified by
-// |URL|.
-- (void)openExternalAppWithURL:(NSURL*)URL
-                        prompt:(NSString*)prompt
-                     openLabel:(NSString*)openLabel;
-
-// Opens URL in an external application if possible (optionally after
-// confirming via dialog in case that user didn't interact using
-// |linkClicked| or if the external application is face time) or returns NO
-// if there is no such application available.
-- (BOOL)openURL:(const GURL&)gURL linkClicked:(BOOL)linkClicked;
-// Presents an alert controller on the root view controller with |prompt| as
-// body text, |accept label| and |reject label| as button labels, and
-// a non null |responseHandler| that takes a boolean to handle user response.
-- (void)showExternalAppLauncherPrompt:(NSString*)prompt
-                          acceptLabel:(NSString*)acceptLabel
-                          rejectLabel:(NSString*)rejectLabel
-                      responseHandler:(void (^_Nonnull)(BOOL))responseHandler;
-@end
-
-@implementation ExternalAppLauncher
-
-@synthesize promptActive = _promptActive;
-@synthesize policyDecider = _policyDecider;
-
-+ (NSString*)formatCallArgument:(NSURL*)URL {
-  NSCharacterSet* charSet =
-      [NSCharacterSet characterSetWithCharactersInString:@"/"];
-  NSString* scheme = [NSString stringWithFormat:@"%@:", [URL scheme]];
-  NSString* URLString = [URL absoluteString];
-  if ([URLString length] <= [scheme length])
-    return URLString;
-  NSString* prompt = [[[[URL absoluteString] substringFromIndex:[scheme length]]
-      stringByTrimmingCharactersInSet:charSet] stringByRemovingPercentEncoding];
-  // Returns original URL string if there's nothing interesting to display
-  // other than the scheme itself.
-  if (![prompt length])
-    return URLString;
-  return prompt;
-}
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    _policyDecider = [[ExternalAppsLaunchPolicyDecider alloc] init];
-  }
-  return self;
-}
-
-- (void)promptForMailClientWithURL:(const GURL&)URL
-              mailtoHandlerManager:(MailtoHandlerManager*)manager {
-  GURL copiedURLToOpen = URL;
-  OpenMailHandlerViewController* mailHandlerChooser =
-      [[OpenMailHandlerViewController alloc]
-          initWithManager:manager
-          selectedHandler:^(MailtoHandler* _Nonnull handler) {
-            LaunchMailClientApp(copiedURLToOpen, handler);
-          }];
-  MDCBottomSheetController* bottomSheet = [[MDCBottomSheetController alloc]
-      initWithContentViewController:mailHandlerChooser];
-  [[[[UIApplication sharedApplication] keyWindow] rootViewController]
-      presentViewController:bottomSheet
-                   animated:YES
-                 completion:nil];
-}
-
-- (void)showExternalAppLauncherPrompt:(NSString*)prompt
-                          acceptLabel:(NSString*)acceptLabel
-                          rejectLabel:(NSString*)rejectLabel
-                      responseHandler:(void (^_Nonnull)(BOOL))responseHandler {
-  UIAlertController* alertController =
-      [UIAlertController alertControllerWithTitle:nil
-                                          message:prompt
-                                   preferredStyle:UIAlertControllerStyleAlert];
-  UIAlertAction* acceptAction =
-      [UIAlertAction actionWithTitle:acceptLabel
-                               style:UIAlertActionStyleDefault
-                             handler:^(UIAlertAction* action) {
-                               responseHandler(YES);
-                             }];
-  UIAlertAction* rejectAction =
-      [UIAlertAction actionWithTitle:rejectLabel
-                               style:UIAlertActionStyleCancel
-                             handler:^(UIAlertAction* action) {
-                               responseHandler(NO);
-                             }];
-  [alertController addAction:rejectAction];
-  [alertController addAction:acceptAction];
-
-  [[[[UIApplication sharedApplication] keyWindow] rootViewController]
-      presentViewController:alertController
-                   animated:YES
-                 completion:nil];
-}
-
-- (void)openExternalAppWithURL:(NSURL*)URL
-                        prompt:(NSString*)prompt
-                     openLabel:(NSString*)openLabel {
-  [self showExternalAppLauncherPrompt:prompt
-                          acceptLabel:openLabel
-                          rejectLabel:l10n_util::GetNSString(IDS_CANCEL)
-                      responseHandler:^(BOOL accept) {
-                        if (accept)
-                          OpenUrlWithCompletionHandler(URL, nil);
-                        UMA_HISTOGRAM_BOOLEAN("Tab.ExternalApplicationOpened",
-                                              accept);
-                      }];
-}
-
-- (BOOL)requestToOpenURL:(const GURL&)gURL
-           sourcePageURL:(const GURL&)sourcePageURL
-             linkClicked:(BOOL)linkClicked {
-  if (!gURL.is_valid() || !gURL.has_scheme())
-    return NO;
-
-  // Don't open external application if chrome is not active.
-  if ([[UIApplication sharedApplication] applicationState] !=
-      UIApplicationStateActive) {
-    return NO;
-  }
-
-  // Don't try to open external application if a prompt is already active.
-  if (_promptActive)
-    return NO;
-
-  [_policyDecider didRequestLaunchExternalAppURL:gURL
-                               fromSourcePageURL:sourcePageURL];
-  ExternalAppLaunchPolicy policy =
-      [_policyDecider launchPolicyForURL:gURL fromSourcePageURL:sourcePageURL];
-  switch (policy) {
-    case ExternalAppLaunchPolicyBlock: {
-      return NO;
-    }
-    case ExternalAppLaunchPolicyAllow: {
-      return [self openURL:gURL linkClicked:linkClicked];
-    }
-    case ExternalAppLaunchPolicyPrompt: {
-      __weak ExternalAppLauncher* weakSelf = self;
-      GURL appURL = gURL;
-      GURL sourceURL = sourcePageURL;
-      _promptActive = YES;
-      NSString* promptBody =
-          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP);
-      NSString* allowLabel =
-          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP_ALLOW);
-      NSString* blockLabel =
-          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP_BLOCK);
-
-      [self
-          showExternalAppLauncherPrompt:promptBody
-                            acceptLabel:allowLabel
-                            rejectLabel:blockLabel
-                        responseHandler:^(BOOL allowed) {
-                          ExternalAppLauncher* strongSelf = weakSelf;
-                          if (!strongSelf)
-                            return;
-                          if (allowed) {
-                            // By confirming that user want to launch the
-                            // application, there is no need to check for
-                            // |linkClicked|.
-                            [strongSelf openURL:appURL linkClicked:YES];
-                          } else {
-                            // TODO(crbug.com/674649): Once non modal
-                            // dialogs are implemented, update this to
-                            // always prompt instead of blocking the app.
-                            [strongSelf.policyDecider
-                                blockLaunchingAppURL:appURL
-                                   fromSourcePageURL:sourceURL];
-                          }
-                          UMA_HISTOGRAM_BOOLEAN(
-                              "IOS.RepeatedExternalAppPromptResponse", allowed);
-                          strongSelf.promptActive = NO;
-                        }];
-      return YES;
-    }
-  }
-}
-
-- (BOOL)openURL:(const GURL&)gURL linkClicked:(BOOL)linkClicked {
-  // Don't open external application if chrome is not active.
-  if ([[UIApplication sharedApplication] applicationState] !=
-      UIApplicationStateActive) {
-    return NO;
-  }
-
-  NSURL* URL = net::NSURLWithGURL(gURL);
-  if (base::ios::IsRunningOnOrLater(10, 3, 0)) {
-    if (UrlHasAppStoreScheme(gURL)) {
-      NSString* prompt = l10n_util::GetNSString(IDS_IOS_OPEN_IN_ANOTHER_APP);
-      NSString* openLabel =
-          l10n_util::GetNSString(IDS_IOS_APP_LAUNCHER_OPEN_APP_BUTTON_LABEL);
-      [self openExternalAppWithURL:URL prompt:prompt openLabel:openLabel];
-      return YES;
-    }
-  } else {
-    // Prior to iOS 10.3, iOS does not prompt user when facetime: and
-    // facetime-audio: URL schemes are opened, so Chrome needs to present an
-    // alert before placing a phone call.
-    if (UrlHasPhoneCallScheme(gURL)) {
-      [self openExternalAppWithURL:URL
-                            prompt:[[self class] formatCallArgument:URL]
-                         openLabel:PromptActionString([URL scheme])];
-      return YES;
-    }
-    // Prior to iOS 10.3, Chrome prompts user with an alert before opening
-    // App Store when user did not tap on any links and an iTunes app URL is
-    // opened. This maintains parity with Safari in pre-10.3 environment.
-    if (!linkClicked && UrlHasAppStoreScheme(gURL)) {
-      NSString* prompt = l10n_util::GetNSString(IDS_IOS_OPEN_IN_ANOTHER_APP);
-      NSString* openLabel =
-          l10n_util::GetNSString(IDS_IOS_APP_LAUNCHER_OPEN_APP_BUTTON_LABEL);
-      [self openExternalAppWithURL:URL prompt:prompt openLabel:openLabel];
-      return YES;
-    }
-  }
-
-  // Replaces |URL| with a rewritten URL if it is of mailto: scheme.
-  if (gURL.SchemeIs(url::kMailToScheme)) {
-    MailtoHandlerManager* manager =
-        [MailtoHandlerManager mailtoHandlerManagerWithStandardHandlers];
-    NSString* handlerID = [manager defaultHandlerID];
-    if (!handlerID) {
-      [self promptForMailClientWithURL:gURL mailtoHandlerManager:manager];
-      return YES;
-    }
-    MailtoHandler* handler = [manager defaultHandlerByID:handlerID];
-    LaunchMailClientApp(gURL, handler);
-    return YES;
-  }
-
-  // If the following call returns YES, an external application is about to be
-  // launched and Chrome will go into the background now.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-  // TODO(crbug.com/774736): This call still needs to be
-  // updated. It's heavily nested so some refactoring is needed.
-  return [[UIApplication sharedApplication] openURL:URL];
-#pragma clang diagnostic pop
-}
-
-@end
diff --git a/ios/chrome/browser/web/external_app_launcher_tab_helper.h b/ios/chrome/browser/web/external_app_launcher_tab_helper.h
index 8531091..a08b3ca 100644
--- a/ios/chrome/browser/web/external_app_launcher_tab_helper.h
+++ b/ios/chrome/browser/web/external_app_launcher_tab_helper.h
@@ -8,33 +8,48 @@
 #include "base/macros.h"
 #import "ios/web/public/web_state/web_state_user_data.h"
 
-@class ExternalAppLauncher;
+@class ExternalAppsLaunchPolicyDecider;
 class GURL;
 
-// Handles the UI behaviors when opening a URL in an external application.
+// A customized external app launcher that optionally shows a modal
+// confirmation dialog before switching context to an external application.
 class ExternalAppLauncherTabHelper
     : public web::WebStateUserData<ExternalAppLauncherTabHelper> {
  public:
   ~ExternalAppLauncherTabHelper() override;
 
   // Requests to open URL in an external application.
-  // Returns NO if |url| is invalid, or the application for |url| is not
-  // available, or it is not possible to open the application for |url|.
-  // If the application for |url| has been opened repeatedly by
-  // |source_page_url| page in a short time frame, the user will be prompted
-  // with an option to block the application from launching.
-  // The user may be prompted with a confirmation dialog to open the application
-  // for certain schemes (e.g., facetime and mailto). |link_clicked| indicates
-  // whether the user tapped on the link element.
-  BOOL RequestToOpenUrl(const GURL& url,
+  // The method checks if the application for |url| has been opened repeatedly
+  // by the |source_page_url| page in a short time frame, in that case a prompt
+  // will appear to the user with an option to block the application from
+  // launching. Then the method also checks for user interaction and for schemes
+  // that require special handling (eg. facetime, mailto) and may present the
+  // user with a confirmation dialog to open the application. If there is no
+  // such application available or it's not possible to open the application the
+  // method returns NO.
+  bool RequestToOpenUrl(const GURL& url,
                         const GURL& source_page_url,
-                        BOOL link_clicked);
+                        bool link_clicked);
 
  private:
   friend class web::WebStateUserData<ExternalAppLauncherTabHelper>;
   explicit ExternalAppLauncherTabHelper(web::WebState* web_state);
 
-  ExternalAppLauncher* launcher_;
+  // Handles launching an external app for |url| when there are repeated
+  // attempts by |source_page_url|. |allowed| indicates whether the user has
+  // explicitly allowed the external app to launch.
+  void HandleRepeatedAttemptsToLaunch(const GURL& url,
+                                      const GURL& source_page_url,
+                                      bool allowed);
+
+  // Used to check for repeated launches and provide policy for launching apps.
+  ExternalAppsLaunchPolicyDecider* policy_decider_ = nil;
+
+  // Returns whether there is a prompt shown by |RequestToOpenUrl| or not.
+  bool is_prompt_active_ = false;
+
+  // Must be last member to ensure it is destroyed last.
+  base::WeakPtrFactory<ExternalAppLauncherTabHelper> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ExternalAppLauncherTabHelper);
 };
diff --git a/ios/chrome/browser/web/external_app_launcher_tab_helper.mm b/ios/chrome/browser/web/external_app_launcher_tab_helper.mm
index 0296a051..8468811 100644
--- a/ios/chrome/browser/web/external_app_launcher_tab_helper.mm
+++ b/ios/chrome/browser/web/external_app_launcher_tab_helper.mm
@@ -4,8 +4,22 @@
 
 #import "ios/chrome/browser/web/external_app_launcher_tab_helper.h"
 
-#import "ios/chrome/browser/web/external_app_launcher.h"
+#include "base/callback.h"
+#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
+#include "components/strings/grit/components_strings.h"
+#import "ios/chrome/browser/open_url_util.h"
+#import "ios/chrome/browser/ui/external_app/open_mail_handler_view_controller.h"
+#import "ios/chrome/browser/web/external_app_launcher_util.h"
+#import "ios/chrome/browser/web/external_apps_launch_policy_decider.h"
+#import "ios/chrome/browser/web/mailto_handler.h"
+#import "ios/chrome/browser/web/mailto_handler_manager.h"
+#include "ios/chrome/grit/ios_strings.h"
+#include "ios/third_party/material_components_ios/src/components/BottomSheet/src/MDCBottomSheetController.h"
+#import "net/base/mac/url_conversions.h"
+#include "ui/base/l10n/l10n_util.h"
 #include "url/gurl.h"
+#include "url/url_constants.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -13,17 +27,236 @@
 
 DEFINE_WEB_STATE_USER_DATA_KEY(ExternalAppLauncherTabHelper);
 
-ExternalAppLauncherTabHelper::ExternalAppLauncherTabHelper(
-    web::WebState* web_state) {
-  launcher_ = [[ExternalAppLauncher alloc] init];
+namespace {
+
+// Launches the mail client app represented by |handler| and records metrics.
+void LaunchMailClientApp(const GURL& url, MailtoHandler* handler) {
+  NSString* launch_url = [handler rewriteMailtoURL:url];
+  UMA_HISTOGRAM_BOOLEAN("IOS.MailtoURLRewritten", launch_url != nil);
+  NSURL* url_to_open = launch_url.length ? [NSURL URLWithString:launch_url]
+                                         : net::NSURLWithGURL(url);
+  if (@available(iOS 10, *)) {
+    [[UIApplication sharedApplication] openURL:url_to_open
+                                       options:@{}
+                             completionHandler:nil];
+  }
+#if !defined(__IPHONE_10_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
+  else {
+    [[UIApplication sharedApplication] openURL:url_to_open];
+  }
+#endif
 }
 
+// Shows a prompt for the user to choose which mail client app to use to handle
+// a mailto:// URL.
+void PromptForMailClientWithUrl(const GURL& url,
+                                MailtoHandlerManager* manager) {
+  GURL copied_url_to_open = url;
+  OpenMailHandlerViewController* mail_handler_chooser =
+      [[OpenMailHandlerViewController alloc]
+          initWithManager:manager
+          selectedHandler:^(MailtoHandler* _Nonnull handler) {
+            LaunchMailClientApp(copied_url_to_open, handler);
+          }];
+  MDCBottomSheetController* bottom_sheet = [[MDCBottomSheetController alloc]
+      initWithContentViewController:mail_handler_chooser];
+  [[[[UIApplication sharedApplication] keyWindow] rootViewController]
+      presentViewController:bottom_sheet
+                   animated:YES
+                 completion:nil];
+}
+
+// Presents an alert controller on the root view controller with |prompt| as
+// body text, |accept label| and |reject label| as button labels, and
+// a non null |responseHandler| that takes a boolean to handle user response.
+void ShowExternalAppLauncherPrompt(NSString* prompt,
+                                   NSString* accept_label,
+                                   NSString* reject_label,
+                                   base::OnceCallback<void(bool)> callback) {
+  __block base::OnceCallback<void(bool)> block_callback = std::move(callback);
+  UIAlertController* alert_controller =
+      [UIAlertController alertControllerWithTitle:nil
+                                          message:prompt
+                                   preferredStyle:UIAlertControllerStyleAlert];
+  UIAlertAction* accept_action =
+      [UIAlertAction actionWithTitle:accept_label
+                               style:UIAlertActionStyleDefault
+                             handler:^(UIAlertAction* action) {
+                               std::move(block_callback).Run(true);
+                             }];
+  UIAlertAction* reject_action =
+      [UIAlertAction actionWithTitle:reject_label
+                               style:UIAlertActionStyleCancel
+                             handler:^(UIAlertAction* action) {
+                               std::move(block_callback).Run(false);
+                             }];
+  [alert_controller addAction:reject_action];
+  [alert_controller addAction:accept_action];
+
+  [[[[UIApplication sharedApplication] keyWindow] rootViewController]
+      presentViewController:alert_controller
+                   animated:YES
+                 completion:nil];
+}
+
+// Launches external app identified by |url| if |accept| is true.
+void LaunchExternalApp(NSURL* url, bool accept) {
+  UMA_HISTOGRAM_BOOLEAN("Tab.ExternalApplicationOpened", accept);
+  if (accept)
+    OpenUrlWithCompletionHandler(url, nil);
+}
+
+// Presents an alert controller with |prompt| and |open_label| as button label
+// on the root view controller before launching an external app identified by
+// |url|.
+void OpenExternalAppWithUrl(NSURL* url,
+                            NSString* prompt,
+                            NSString* open_label) {
+  ShowExternalAppLauncherPrompt(
+      prompt, /*accept_label=*/open_label,
+      /*reject_label=*/l10n_util::GetNSString(IDS_CANCEL),
+      base::BindOnce(&LaunchExternalApp, url));
+}
+
+// Opens URL in an external application if possible (optionally after
+// confirming via dialog in case that user didn't interact using
+// |link_clicked| or if the external application is face time) or returns NO
+// if there is no such application available.
+bool OpenUrl(const GURL& gurl, bool link_clicked) {
+  // Don't open external application if chrome is not active.
+  if ([[UIApplication sharedApplication] applicationState] !=
+      UIApplicationStateActive) {
+    return NO;
+  }
+
+  NSURL* url = net::NSURLWithGURL(gurl);
+  if (@available(iOS 10.3, *)) {
+    if (UrlHasAppStoreScheme(gurl)) {
+      NSString* prompt = l10n_util::GetNSString(IDS_IOS_OPEN_IN_ANOTHER_APP);
+      NSString* open_label =
+          l10n_util::GetNSString(IDS_IOS_APP_LAUNCHER_OPEN_APP_BUTTON_LABEL);
+      OpenExternalAppWithUrl(url, prompt, open_label);
+      return true;
+    }
+  } else {
+    // Prior to iOS 10.3, iOS does not prompt user when facetime: and
+    // facetime-audio: URL schemes are opened, so Chrome needs to present an
+    // alert before placing a phone call.
+    if (UrlHasPhoneCallScheme(gurl)) {
+      OpenExternalAppWithUrl(
+          url, /*prompt=*/GetFormattedAbsoluteUrlWithSchemeRemoved(url),
+          /*open_label=*/GetPromptActionString(url.scheme));
+      return true;
+    }
+    // Prior to iOS 10.3, Chrome prompts user with an alert before opening
+    // App Store when user did not tap on any links and an iTunes app URL is
+    // opened. This maintains parity with Safari in pre-10.3 environment.
+    if (!link_clicked && UrlHasAppStoreScheme(gurl)) {
+      NSString* prompt = l10n_util::GetNSString(IDS_IOS_OPEN_IN_ANOTHER_APP);
+      NSString* open_label =
+          l10n_util::GetNSString(IDS_IOS_APP_LAUNCHER_OPEN_APP_BUTTON_LABEL);
+      OpenExternalAppWithUrl(url, prompt, open_label);
+      return true;
+    }
+  }
+
+  // Replaces |url| with a rewritten URL if it is of mailto: scheme.
+  if (gurl.SchemeIs(url::kMailToScheme)) {
+    MailtoHandlerManager* manager =
+        [MailtoHandlerManager mailtoHandlerManagerWithStandardHandlers];
+    NSString* handler_id = manager.defaultHandlerID;
+    if (!handler_id) {
+      PromptForMailClientWithUrl(gurl, manager);
+      return true;
+    }
+    MailtoHandler* handler = [manager defaultHandlerByID:handler_id];
+    LaunchMailClientApp(gurl, handler);
+    return true;
+  }
+
+// If the following call returns YES, an external application is about to be
+// launched and Chrome will go into the background now.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+  // TODO(crbug.com/774736): This call still needs to be
+  // updated. It's heavily nested so some refactoring is needed.
+  return [[UIApplication sharedApplication] openURL:url];
+#pragma clang diagnostic pop
+}
+
+}  // namespace
+
+ExternalAppLauncherTabHelper::ExternalAppLauncherTabHelper(
+    web::WebState* web_state)
+    : policy_decider_([[ExternalAppsLaunchPolicyDecider alloc] init]),
+      weak_factory_(this) {}
+
 ExternalAppLauncherTabHelper::~ExternalAppLauncherTabHelper() = default;
 
-BOOL ExternalAppLauncherTabHelper::RequestToOpenUrl(const GURL& url,
+void ExternalAppLauncherTabHelper::HandleRepeatedAttemptsToLaunch(
+    const GURL& url,
+    const GURL& source_page_url,
+    bool allowed) {
+  if (allowed) {
+    // By confirming that user wants to launch the
+    // application, there is no need to check for
+    // |link_clicked|.
+    OpenUrl(url, /*link_clicked=*/true);
+  } else {
+    // TODO(crbug.com/674649): Once non modal
+    // dialogs are implemented, update this to
+    // always prompt instead of blocking the app.
+    [policy_decider_ blockLaunchingAppURL:url
+                        fromSourcePageURL:source_page_url];
+  }
+  UMA_HISTOGRAM_BOOLEAN("IOS.RepeatedExternalAppPromptResponse", allowed);
+  is_prompt_active_ = false;
+}
+
+bool ExternalAppLauncherTabHelper::RequestToOpenUrl(const GURL& url,
                                                     const GURL& source_page_url,
-                                                    BOOL link_clicked) {
-  return [launcher_ requestToOpenURL:url
-                       sourcePageURL:source_page_url
-                         linkClicked:link_clicked];
+                                                    bool link_clicked) {
+  if (!url.is_valid() || !url.has_scheme())
+    return false;
+
+  // Don't open external application if chrome is not active.
+  if ([[UIApplication sharedApplication] applicationState] !=
+      UIApplicationStateActive) {
+    return false;
+  }
+
+  // Don't try to open external application if a prompt is already active.
+  if (is_prompt_active_)
+    return false;
+
+  [policy_decider_ didRequestLaunchExternalAppURL:url
+                                fromSourcePageURL:source_page_url];
+  ExternalAppLaunchPolicy policy =
+      [policy_decider_ launchPolicyForURL:url
+                        fromSourcePageURL:source_page_url];
+  switch (policy) {
+    case ExternalAppLaunchPolicyBlock: {
+      return false;
+    }
+    case ExternalAppLaunchPolicyAllow: {
+      return OpenUrl(url, link_clicked);
+    }
+    case ExternalAppLaunchPolicyPrompt: {
+      is_prompt_active_ = true;
+      NSString* prompt_body =
+          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP);
+      NSString* allow_label =
+          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP_ALLOW);
+      NSString* block_label =
+          l10n_util::GetNSString(IDS_IOS_OPEN_REPEATEDLY_ANOTHER_APP_BLOCK);
+
+      base::OnceCallback<void(bool)> callback = base::BindOnce(
+          &ExternalAppLauncherTabHelper::HandleRepeatedAttemptsToLaunch,
+          weak_factory_.GetWeakPtr(), url, source_page_url);
+
+      ShowExternalAppLauncherPrompt(prompt_body, allow_label, block_label,
+                                    std::move(callback));
+      return true;
+    }
+  }
 }
diff --git a/ios/chrome/browser/web/external_app_launcher_unittest.mm b/ios/chrome/browser/web/external_app_launcher_unittest.mm
deleted file mode 100644
index 4ecf9c5..0000000
--- a/ios/chrome/browser/web/external_app_launcher_unittest.mm
+++ /dev/null
@@ -1,59 +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 "ios/chrome/browser/web/external_app_launcher.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/gtest_mac.h"
-#include "testing/platform_test.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-@interface ExternalAppLauncher (Private)
-// Returns the Phone/FaceTime call argument from |url|.
-// Made available for unit testing.
-+ (NSString*)formatCallArgument:(NSURL*)url;
-@end
-
-namespace {
-
-using ExternalAppLauncherTest = PlatformTest;
-
-TEST_F(ExternalAppLauncherTest, TestBadFormatCallArgument) {
-  EXPECT_NSEQ(@"garbage:",
-              [ExternalAppLauncher
-                  formatCallArgument:[NSURL URLWithString:@"garbage:"]]);
-  EXPECT_NSEQ(@"malformed:////",
-              [ExternalAppLauncher
-                  formatCallArgument:[NSURL URLWithString:@"malformed:////"]]);
-}
-
-TEST_F(ExternalAppLauncherTest, TestFormatCallArgument) {
-  EXPECT_NSEQ(
-      @"+1234",
-      [ExternalAppLauncher
-          formatCallArgument:[NSURL URLWithString:@"facetime://+1234"]]);
-  EXPECT_NSEQ(
-      @"+abcd",
-      [ExternalAppLauncher
-          formatCallArgument:[NSURL URLWithString:@"facetime-audio://+abcd"]]);
-  EXPECT_NSEQ(
-      @"+1-650-555-1212",
-      [ExternalAppLauncher
-          formatCallArgument:[NSURL URLWithString:@"tel://+1-650-555-1212"]]);
-  EXPECT_NSEQ(@"75009",
-              [ExternalAppLauncher
-                  formatCallArgument:[NSURL URLWithString:@"garbage:75009"]]);
-}
-
-TEST_F(ExternalAppLauncherTest, TestURLEscapedArgument) {
-  EXPECT_NSEQ(@"+1 650 555 1212",
-              [ExternalAppLauncher
-                  formatCallArgument:
-                      [NSURL URLWithString:@"tel://+1%20650%20555%201212"]]);
-}
-
-}  // namespace
diff --git a/ios/chrome/browser/web/external_app_launcher_util.h b/ios/chrome/browser/web/external_app_launcher_util.h
new file mode 100644
index 0000000..ad7adb4
--- /dev/null
+++ b/ios/chrome/browser/web/external_app_launcher_util.h
@@ -0,0 +1,28 @@
+// 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_WEB_EXTERNAL_APP_LAUNCHER_UTIL_H_
+#define IOS_CHROME_BROWSER_WEB_EXTERNAL_APP_LAUNCHER_UTIL_H_
+
+#import <Foundation/Foundation.h>
+
+class GURL;
+
+// Returns a formatted string that removes the url scheme (e.g., "tel://") and
+// percent encoding from the absolute string of |url|.
+NSString* GetFormattedAbsoluteUrlWithSchemeRemoved(NSURL* url);
+
+// Returns a set of NSStrings that are URL schemes for iTunes Stores.
+NSSet<NSString*>* GetItmsSchemes();
+
+// Returns whether |url| has an app store scheme.
+bool UrlHasAppStoreScheme(const GURL& url);
+
+// Returns whether |url| has the scheme of a URL that initiates a call.
+bool UrlHasPhoneCallScheme(const GURL& url);
+
+// Returns a string to be used as the label for the prompt's action button.
+NSString* GetPromptActionString(NSString* scheme);
+
+#endif  // IOS_CHROME_BROWSER_WEB_EXTERNAL_APP_LAUNCHER_UTIL_H_
diff --git a/ios/chrome/browser/web/external_app_launcher_util.mm b/ios/chrome/browser/web/external_app_launcher_util.mm
new file mode 100644
index 0000000..814615e
--- /dev/null
+++ b/ios/chrome/browser/web/external_app_launcher_util.mm
@@ -0,0 +1,66 @@
+// 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/web/external_app_launcher_util.h"
+
+#include "base/strings/sys_string_conversions.h"
+#include "ios/chrome/grit/ios_strings.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "url/gurl.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+NSString* GetFormattedAbsoluteUrlWithSchemeRemoved(NSURL* url) {
+  NSCharacterSet* char_set =
+      [NSCharacterSet characterSetWithCharactersInString:@"/"];
+  NSString* scheme = [NSString stringWithFormat:@"%@:", url.scheme];
+  NSString* url_string = url.absoluteString;
+  if (url_string.length <= scheme.length)
+    return url_string;
+  NSString* prompt = [[[url.absoluteString substringFromIndex:scheme.length]
+      stringByTrimmingCharactersInSet:char_set]
+      stringByRemovingPercentEncoding];
+  // Returns original URL string if there's nothing interesting to display
+  // other than the scheme itself.
+  if (!prompt.length)
+    return url_string;
+  return prompt;
+}
+
+NSSet<NSString*>* GetItmsSchemes() {
+  static NSSet<NSString*>* schemes;
+  static dispatch_once_t once;
+  dispatch_once(&once, ^{
+    schemes = [NSSet<NSString*>
+        setWithObjects:@"itms", @"itmss", @"itms-apps", @"itms-appss",
+                       // There's no evidence that itms-bookss is actually
+                       // supported, but over-inclusion costs less than
+                       // under-inclusion.
+                       @"itms-books", @"itms-bookss", nil];
+  });
+  return schemes;
+}
+
+bool UrlHasAppStoreScheme(const GURL& url) {
+  return
+      [GetItmsSchemes() containsObject:base::SysUTF8ToNSString(url.scheme())];
+}
+
+bool UrlHasPhoneCallScheme(const GURL& url) {
+  return url.SchemeIs("tel") || url.SchemeIs("facetime") ||
+         url.SchemeIs("facetime-audio");
+}
+
+NSString* GetPromptActionString(NSString* scheme) {
+  if ([scheme isEqualToString:@"facetime"])
+    return l10n_util::GetNSString(IDS_IOS_FACETIME_BUTTON);
+  else if ([scheme isEqualToString:@"tel"] ||
+           [scheme isEqualToString:@"facetime-audio"]) {
+    return l10n_util::GetNSString(IDS_IOS_PHONE_CALL_BUTTON);
+  }
+  NOTREACHED();
+  return @"";
+}
diff --git a/ios/chrome/browser/web/external_app_launcher_util_unittest.mm b/ios/chrome/browser/web/external_app_launcher_util_unittest.mm
new file mode 100644
index 0000000..329fcd0e
--- /dev/null
+++ b/ios/chrome/browser/web/external_app_launcher_util_unittest.mm
@@ -0,0 +1,40 @@
+// 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 "ios/chrome/browser/web/external_app_launcher_util.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
+#include "testing/platform_test.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+using ExternalAppLauncherUtilTest = PlatformTest;
+
+// A URL with a malformed scheme should return the original URL string.
+TEST_F(ExternalAppLauncherUtilTest, TestMalformedScheme) {
+  EXPECT_NSEQ(@"malformed:////", GetFormattedAbsoluteUrlWithSchemeRemoved(
+                                     [NSURL URLWithString:@"malformed:////"]));
+}
+
+// A URL with a properly formed scheme should return the string following the
+// scheme.
+TEST_F(ExternalAppLauncherUtilTest, TestProperlyFormedExternalUrl) {
+  EXPECT_NSEQ(@"+1234", GetFormattedAbsoluteUrlWithSchemeRemoved(
+                            [NSURL URLWithString:@"facetime://+1234"]));
+  EXPECT_NSEQ(@"+abcd", GetFormattedAbsoluteUrlWithSchemeRemoved(
+                            [NSURL URLWithString:@"facetime-audio://+abcd"]));
+  EXPECT_NSEQ(@"+1-650-555-1212",
+              GetFormattedAbsoluteUrlWithSchemeRemoved(
+                  [NSURL URLWithString:@"tel://+1-650-555-1212"]));
+}
+
+// Percent encoding should be removed from a properly formed URL string.
+TEST_F(ExternalAppLauncherUtilTest, TestRemovingPercentEncoding) {
+  EXPECT_NSEQ(@"+1 650 555 1212",
+              GetFormattedAbsoluteUrlWithSchemeRemoved(
+                  [NSURL URLWithString:@"tel://+1%20650%20555%201212"]));
+}
diff --git a/ios/chrome/browser/web/visible_url_egtest.mm b/ios/chrome/browser/web/visible_url_egtest.mm
index 218cfa6..a8a1873 100644
--- a/ios/chrome/browser/web/visible_url_egtest.mm
+++ b/ios/chrome/browser/web/visible_url_egtest.mm
@@ -187,6 +187,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Tap the back button in the toolbar and verify that URL2 (committed URL) is
@@ -207,6 +208,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
   [self setServerPaused:YES];
 
   // Tap the forward button in the toolbar and verify that URL1 (committed URL)
@@ -237,6 +239,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Re-enable synchronization here to synchronize EarlGrey LongPress and Tap
@@ -283,6 +286,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Tap the back button, stop pending navigation and reload.
@@ -321,6 +325,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Tap the back button on the page and verify that URL2 (committed URL) is
@@ -340,6 +345,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
   [self setServerPaused:YES];
 
   // Tap the forward button on the page and verify that URL1 (committed URL)
@@ -370,6 +376,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Tap the go negative delta button on the page and verify that URL2
@@ -390,6 +397,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
   [self setServerPaused:YES];
 
   // Tap go positive delta button on the page and verify that URL1 (committed
@@ -422,6 +430,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Start reloading the page.
@@ -466,6 +475,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Start renderer initiated navigation.
@@ -503,6 +513,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
   [self setServerPaused:YES];
 
   // Tap the back button in the toolbar and verify that URL2 (committed URL) is
@@ -541,6 +552,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage3];
   [self setServerPaused:YES];
 
   // Tap the back button twice in the toolbar and verify that URL3 (committed
@@ -606,6 +618,7 @@
   // Purge web view caches and pause the server to make sure that tests can
   // verify omnibox state before server starts responding.
   GREYAssert(PurgeCachedWebViewPages(), @"Pages were not purged");
+  [ChromeEarlGrey waitForWebViewContainingText:kTestPage3];
   [self setServerPaused:YES];
 
   // Tap the back button twice on the page and verify that URL3 (committed URL)
diff --git a/ios/chrome/test/BUILD.gn b/ios/chrome/test/BUILD.gn
index 10a0916..f8edd04 100644
--- a/ios/chrome/test/BUILD.gn
+++ b/ios/chrome/test/BUILD.gn
@@ -138,7 +138,6 @@
     "//ios/chrome/browser/autofill:unit_tests",
     "//ios/chrome/browser/browser_state:unit_tests",
     "//ios/chrome/browser/browsing_data:unit_tests",
-    "//ios/chrome/browser/content_suggestions:unit_tests",
     "//ios/chrome/browser/crash_report:unit_tests",
     "//ios/chrome/browser/device_sharing:unit_tests",
     "//ios/chrome/browser/download:unit_tests",
diff --git a/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm b/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
index 82c13cb..b60d626 100644
--- a/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
+++ b/ios/web/web_state/js/crw_js_post_request_loader_unittest.mm
@@ -36,15 +36,7 @@
      "  };"
      "};";
 
-// Tests that the POST request is correctly executed through XMLHttpRequest.
-// TODO(crbug.com/592034): This test is flaky on device.
-#if TARGET_IPHONE_SIMULATOR
-#define MAYBE_LoadsCorrectHTML LoadsCorrectHTML
-#else
-#define MAYBE_LoadsCorrectHTML DISABLED_LoadsCorrectHTML
-#endif
-
-TEST_F(CRWJSPOSTRequestLoaderTest, MAYBE_LoadsCorrectHTML) {
+TEST_F(CRWJSPOSTRequestLoaderTest, LoadsCorrectHTML) {
   // Set up necessary objects.
   CRWJSPOSTRequestLoader* loader = [[CRWJSPOSTRequestLoader alloc] init];
   WKWebView* web_view = web::BuildWKWebView(CGRectZero, GetBrowserState());
diff --git a/ios/web_view/test/BUILD.gn b/ios/web_view/test/BUILD.gn
index 5711518..95ff045e 100644
--- a/ios/web_view/test/BUILD.gn
+++ b/ios/web_view/test/BUILD.gn
@@ -16,6 +16,7 @@
 test("ios_web_view_inttests") {
   testonly = true
   sources = [
+    "web_view_autofill_inttest.mm",
     "web_view_int_test.h",
     "web_view_int_test.mm",
     "web_view_kvo_inttest.mm",
@@ -31,6 +32,7 @@
     "//net",
     "//net:test_support",
     "//testing/gtest",
+    "//third_party/ocmock",
   ]
 
   bundle_deps = [ "//ios/web_view:web_view+bundle" ]
diff --git a/ios/web_view/test/web_view_autofill_inttest.mm b/ios/web_view/test/web_view_autofill_inttest.mm
new file mode 100644
index 0000000..16ace30
--- /dev/null
+++ b/ios/web_view/test/web_view_autofill_inttest.mm
@@ -0,0 +1,103 @@
+// 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 <ChromeWebView/ChromeWebView.h>
+#import <Foundation/Foundation.h>
+
+#include "base/strings/stringprintf.h"
+#include "base/strings/sys_string_conversions.h"
+#import "ios/testing/wait_util.h"
+#import "ios/web_view/test/web_view_int_test.h"
+#import "ios/web_view/test/web_view_test_util.h"
+#import "net/base/mac/url_conversions.h"
+#include "testing/gtest_mac.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
+#include "url/gurl.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ios_web_view {
+
+namespace {
+NSString* const kTestFormName = @"FormName";
+NSString* const kTestFieldName = @"FieldName";
+NSString* const kTestFieldValue = @"FieldValue";
+NSString* const kTestFormHtml =
+    [NSString stringWithFormat:
+                  @"<form name='%@'>"
+                   "<input type='text' name='%@' value='%@'/>"
+                   "<input type='submit'/>"
+                   "</form>",
+                  kTestFormName,
+                  kTestFieldName,
+                  kTestFieldValue];
+}  // namespace
+
+// Tests autofill features in CWVWebViews.
+class WebViewAutofillTest : public WebViewIntTest {
+ protected:
+  void SetUp() override {
+    WebViewIntTest::SetUp();
+
+    std::string html = base::SysNSStringToUTF8(kTestFormHtml);
+    GURL url = GetUrlForPageWithHtmlBody(html);
+    ASSERT_TRUE(test::LoadUrl(web_view_, net::NSURLWithGURL(url)));
+  }
+};
+
+// Tests that CWVAutofillControllerDelegate receives callbacks.
+TEST_F(WebViewAutofillTest, TestDelegateCallbacks) {
+  CWVAutofillController* autofill_controller = [web_view_ autofillController];
+  id delegate = OCMProtocolMock(@protocol(CWVAutofillControllerDelegate));
+  autofill_controller.delegate = delegate;
+
+  [[delegate expect] autofillController:autofill_controller
+                didFocusOnFieldWithName:kTestFieldName
+                               formName:kTestFormName
+                                  value:kTestFieldValue];
+  test::EvaluateJavaScript(web_view_,
+                           @"var event = new Event('focus');"
+                            "document.forms[0][0].dispatchEvent(event);",
+                           nil);
+  [delegate verify];
+
+  [[delegate expect] autofillController:autofill_controller
+                 didBlurOnFieldWithName:kTestFieldName
+                               formName:kTestFormName
+                                  value:kTestFieldValue];
+  test::EvaluateJavaScript(web_view_,
+                           @"var event = new Event('blur');"
+                            "document.forms[0][0].dispatchEvent(event);",
+                           nil);
+  [delegate verify];
+
+  [[delegate expect] autofillController:autofill_controller
+                didInputInFieldWithName:kTestFieldName
+                               formName:kTestFormName
+                                  value:kTestFieldValue];
+  // The 'input' event listener defined in form.js is only called during the
+  // bubbling phase.
+  test::EvaluateJavaScript(web_view_,
+                           @"var event = new Event('input', {'bubbles': true});"
+                            "document.forms[0][0].dispatchEvent(event);",
+                           nil);
+  [delegate verify];
+
+  [[delegate expect] autofillController:autofill_controller
+                  didSubmitFormWithName:kTestFormName
+                          userInitiated:NO
+                            isMainFrame:YES];
+  // The 'submit' event listener defined in form.js is only called during the
+  // bubbling phase.
+  test::EvaluateJavaScript(
+      web_view_,
+      @"var event = new Event('submit', {'bubbles': true});"
+       "document.forms[0].dispatchEvent(event);",
+      nil);
+  [delegate verify];
+}
+
+}  // namespace ios_web_view
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 1260fdcb..1db15f7 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -17,6 +17,7 @@
   header = "media_features.h"
 
   flags = [
+    "ALTERNATE_CDM_STORAGE_ID_KEY=$alternate_cdm_storage_id_key",
     "ENABLE_AC3_EAC3_AUDIO_DEMUXING=$enable_ac3_eac3_audio_demuxing",
     "ENABLE_CBCS_ENCRYPTION_SCHEME=$enable_cbcs_encryption_scheme",
     "ENABLE_CDM_HOST_VERIFICATION=$enable_cdm_host_verification",
diff --git a/media/audio/OWNERS b/media/audio/OWNERS
index 9bb0552..1aab83d 100644
--- a/media/audio/OWNERS
+++ b/media/audio/OWNERS
@@ -6,7 +6,7 @@
 henrika@chromium.org
 
 # Mirroring (and related glue) OWNERS.
-justinlin@chromium.org
 miu@chromium.org
+xjz@chromium.org
 
 # COMPONENT: Blink>Media>Audio
diff --git a/media/audio/alive_checker_unittest.cc b/media/audio/alive_checker_unittest.cc
index 9ed3343..426e7346 100644
--- a/media/audio/alive_checker_unittest.cc
+++ b/media/audio/alive_checker_unittest.cc
@@ -289,7 +289,9 @@
 
 // Start the checker, notify that the client is alive several times, then
 // run until detection. Repeat once.
-TEST_F(AliveCheckerTest, NotifyThenDetectDead) {
+// TODO(crbug.com/789804): Fix the test not to be flaky, e.g. by switching to
+// using a mocked clock, and re-enable it.
+TEST_F(AliveCheckerTest, DISABLED_NotifyThenDetectDead) {
   CreateAliveChecker(false, false);
 
   StartAliveChecker();
@@ -335,7 +337,9 @@
 // send alive notifications, and run until it detects dead. Start it again and
 // notify that the client is alive several times. Suspend and verify that it
 // doesn't detect dead. Resume and run until detected dead.
-TEST_F(AliveCheckerTest, SuspendResume_StartBeforeSuspend) {
+// TODO(crbug.com/789804): Fix the test not to be flaky, e.g. by switching to
+// using a mocked clock, and re-enable it.
+TEST_F(AliveCheckerTest, DISABLED_SuspendResume_StartBeforeSuspend) {
   CreateAliveChecker(false, true);
   ASSERT_TRUE(mock_power_observer_helper_);
 
diff --git a/media/audio/audio_system.h b/media/audio/audio_system.h
index aa44af4..b6d7315 100644
--- a/media/audio/audio_system.h
+++ b/media/audio/audio_system.h
@@ -29,16 +29,20 @@
   // of the device.
   // TODO(olka,tommi): fix all AudioManager implementations to always report
   // when a device is not found, instead of returning sub parameter values.
+  // Non-empty optional matched output device id is guaranteed to be a non-empty
+  // std::string. If optional matched output device id is empty, it means there
+  // is no associated output device.
   using OnAudioParamsCallback =
       base::OnceCallback<void(const base::Optional<AudioParameters>&)>;
+  using OnDeviceIdCallback =
+      base::OnceCallback<void(const base::Optional<std::string>&)>;
   using OnInputDeviceInfoCallback =
       base::OnceCallback<void(const base::Optional<AudioParameters>&,
-                              const std::string&)>;
+                              const base::Optional<std::string>&)>;
 
   using OnBoolCallback = base::OnceCallback<void(bool)>;
   using OnDeviceDescriptionsCallback =
       base::OnceCallback<void(AudioDeviceDescriptions)>;
-  using OnDeviceIdCallback = base::OnceCallback<void(const std::string&)>;
 
   // The global AudioManager instance must be created prior to that.
   static std::unique_ptr<AudioSystem> CreateInstance();
@@ -62,14 +66,15 @@
       bool for_input,
       OnDeviceDescriptionsCallback on_descriptions_cb) = 0;
 
-  // Replies with an empty string if there is no associated output device found.
+  // Replies with an empty optional if there is no associated output device
+  // found and a non-empty string otherwise.
   virtual void GetAssociatedOutputDeviceID(
       const std::string& input_device_id,
       OnDeviceIdCallback on_device_id_cb) = 0;
 
-  // Replies with audio parameters for the specified input device and audio
-  // parameters and device ID of the associated output device, if any (otherwise
-  // the associated output device ID is an empty string).
+  // Replies with audio parameters for the specified input device and
+  // device ID of the associated output device, if any (otherwise
+  // the associated output device ID is an empty optional).
   virtual void GetInputDeviceInfo(
       const std::string& input_device_id,
       OnInputDeviceInfoCallback on_input_device_info_cb) = 0;
diff --git a/media/audio/audio_system_helper.cc b/media/audio/audio_system_helper.cc
index de297b6..e1a74172 100644
--- a/media/audio/audio_system_helper.cc
+++ b/media/audio/audio_system_helper.cc
@@ -80,8 +80,11 @@
     const std::string& input_device_id,
     AudioSystem::OnDeviceIdCallback on_device_id_cb) {
   DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
+  const std::string associated_output_device_id =
+      audio_manager_->GetAssociatedOutputDeviceID(input_device_id);
   std::move(on_device_id_cb)
-      .Run(audio_manager_->GetAssociatedOutputDeviceID(input_device_id));
+      .Run(associated_output_device_id.empty() ? base::Optional<std::string>()
+                                               : associated_output_device_id);
 }
 
 void AudioSystemHelper::GetInputDeviceInfo(
@@ -90,10 +93,10 @@
   DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
   const std::string associated_output_device_id =
       audio_manager_->GetAssociatedOutputDeviceID(input_device_id);
-
   std::move(on_input_device_info_cb)
       .Run(ComputeInputParameters(input_device_id),
-           associated_output_device_id);
+           associated_output_device_id.empty() ? base::Optional<std::string>()
+                                               : associated_output_device_id);
 }
 
 base::Optional<AudioParameters> AudioSystemHelper::ComputeInputParameters(
diff --git a/media/audio/audio_system_test_util.cc b/media/audio/audio_system_test_util.cc
index 4f57c50..3e1c6e3d 100644
--- a/media/audio/audio_system_test_util.cc
+++ b/media/audio/audio_system_test_util.cc
@@ -49,7 +49,7 @@
     const base::Location& location,
     base::OnceClosure on_cb_received,
     const base::Optional<AudioParameters>& expected_input,
-    const std::string& expected_associated_device_id) {
+    const base::Optional<std::string>& expected_associated_device_id) {
   return base::BindOnce(&AudioSystemCallbackExpectations::OnInputDeviceInfo,
                         base::Unretained(this), location.ToString(),
                         std::move(on_cb_received), expected_input,
@@ -60,7 +60,7 @@
 AudioSystemCallbackExpectations::GetDeviceIdCallback(
     const base::Location& location,
     base::OnceClosure on_cb_received,
-    const std::string& expected_id) {
+    const base::Optional<std::string>& expected_id) {
   return base::BindOnce(&AudioSystemCallbackExpectations::OnDeviceId,
                         base::Unretained(this), location.ToString(),
                         std::move(on_cb_received), expected_id);
@@ -106,10 +106,11 @@
     const std::string& from_here,
     base::OnceClosure on_cb_received,
     const base::Optional<AudioParameters>& expected_input,
-    const std::string& expected_associated_device_id,
+    const base::Optional<std::string>& expected_associated_device_id,
     const base::Optional<AudioParameters>& input,
-    const std::string& associated_device_id) {
+    const base::Optional<std::string>& associated_device_id) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_) << from_here;
+  EXPECT_TRUE(!input || input->IsValid());
   if (expected_input) {
     EXPECT_TRUE(input) << from_here;
     EXPECT_EQ(expected_input->AsHumanReadableString(),
@@ -118,17 +119,29 @@
   } else {
     EXPECT_FALSE(input) << from_here;
   }
-  EXPECT_EQ(expected_associated_device_id, associated_device_id) << from_here;
+  EXPECT_TRUE(!associated_device_id || !associated_device_id->empty());
+  if (expected_associated_device_id) {
+    EXPECT_TRUE(associated_device_id) << from_here;
+    EXPECT_EQ(expected_associated_device_id, associated_device_id) << from_here;
+  } else {
+    EXPECT_FALSE(associated_device_id) << from_here;
+  }
   std::move(on_cb_received).Run();
 }
 
 void AudioSystemCallbackExpectations::OnDeviceId(
     const std::string& from_here,
     base::OnceClosure on_cb_received,
-    const std::string& expected_id,
-    const std::string& result_id) {
+    const base::Optional<std::string>& expected_id,
+    const base::Optional<std::string>& result_id) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_) << from_here;
-  EXPECT_EQ(expected_id, result_id) << from_here;
+  EXPECT_TRUE(!result_id || !result_id->empty());
+  if (expected_id) {
+    EXPECT_TRUE(result_id) << from_here;
+    EXPECT_EQ(expected_id, result_id) << from_here;
+  } else {
+    EXPECT_FALSE(result_id) << from_here;
+  }
   std::move(on_cb_received).Run();
 }
 
diff --git a/media/audio/audio_system_test_util.h b/media/audio/audio_system_test_util.h
index 6966f1f1..26aaf62 100644
--- a/media/audio/audio_system_test_util.h
+++ b/media/audio/audio_system_test_util.h
@@ -47,12 +47,12 @@
       const base::Location& location,
       base::OnceClosure on_cb_received,
       const base::Optional<AudioParameters>& expected_input,
-      const std::string& expected_associated_device_id);
+      const base::Optional<std::string>& expected_associated_device_id);
 
   AudioSystem::OnDeviceIdCallback GetDeviceIdCallback(
       const base::Location& location,
       base::OnceClosure on_cb_received,
-      const std::string& expected_id);
+      const base::Optional<std::string>& expected_id);
 
  private:
   // Methods to verify correctness of received data.
@@ -76,14 +76,14 @@
       const std::string& from_here,
       base::OnceClosure on_cb_received,
       const base::Optional<AudioParameters>& expected_input,
-      const std::string& expected_associated_device_id,
+      const base::Optional<std::string>& expected_associated_device_id,
       const base::Optional<AudioParameters>& input,
-      const std::string& associated_device_id);
+      const base::Optional<std::string>& associated_device_id);
 
   void OnDeviceId(const std::string& from_here,
                   base::OnceClosure on_cb_received,
-                  const std::string& expected_id,
-                  const std::string& result_id);
+                  const base::Optional<std::string>& expected_id,
+                  const base::Optional<std::string>& result_id);
 
   THREAD_CHECKER(thread_checker_);
   DISALLOW_COPY_AND_ASSIGN(AudioSystemCallbackExpectations);
@@ -319,9 +319,10 @@
 TYPED_TEST_P(AudioSystemTestTemplate, GetInputDeviceInfoNoAssociation) {
   base::RunLoop wait_loop;
   this->audio_system()->GetInputDeviceInfo(
-      "non-default-device-id", this->expectations_.GetInputDeviceInfoCallback(
-                                   FROM_HERE, wait_loop.QuitClosure(),
-                                   this->input_params_, std::string()));
+      "non-default-device-id",
+      this->expectations_.GetInputDeviceInfoCallback(
+          FROM_HERE, wait_loop.QuitClosure(), this->input_params_,
+          base::Optional<std::string>()));
   wait_loop.Run();
 }
 
diff --git a/media/audio/mac/audio_auhal_mac.cc b/media/audio/mac/audio_auhal_mac.cc
index 4cff091..278aa7364 100644
--- a/media/audio/mac/audio_auhal_mac.cc
+++ b/media/audio/mac/audio_auhal_mac.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 #include <cstddef>
 #include <string>
+#include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
@@ -441,14 +442,6 @@
   if (!local_audio_unit->is_valid())
     return false;
 
-  // Enable output as appropriate.
-  UInt32 enable_io = 1;
-  OSStatus result = AudioUnitSetProperty(
-      local_audio_unit->audio_unit(), kAudioOutputUnitProperty_EnableIO,
-      kAudioUnitScope_Output, AUElement::OUTPUT, &enable_io, sizeof(enable_io));
-  if (result != noErr)
-    return false;
-
   if (!SetStreamFormat(params_.channels(), params_.sample_rate(),
                        local_audio_unit->audio_unit(), &output_format_)) {
     return false;
@@ -466,7 +459,7 @@
   AURenderCallbackStruct callback;
   callback.inputProc = InputProc;
   callback.inputProcRefCon = this;
-  result = AudioUnitSetProperty(
+  OSStatus result = AudioUnitSetProperty(
       local_audio_unit->audio_unit(), kAudioUnitProperty_SetRenderCallback,
       kAudioUnitScope_Input, AUElement::OUTPUT, &callback, sizeof(callback));
   if (result != noErr)
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index a35a02e..b09620b0 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -337,6 +337,27 @@
   return true;
 }
 
+// Returns the channel count from the |audio_unit|'s stream format for input
+// scope / input element or output scope / output element.
+static bool GetAudioUnitStreamFormatChannelCount(AudioUnit audio_unit,
+                                                 AUElement element,
+                                                 int* channels) {
+  AudioStreamBasicDescription stream_format;
+  UInt32 size = sizeof(stream_format);
+  OSStatus result =
+      AudioUnitGetProperty(audio_unit, kAudioUnitProperty_StreamFormat,
+                           element == AUElement::OUTPUT ? kAudioUnitScope_Output
+                                                        : kAudioUnitScope_Input,
+                           element, &stream_format, &size);
+  if (result != noErr) {
+    OSSTATUS_DLOG(ERROR, result) << "Failed to get AudioUnit stream format.";
+    return false;
+  }
+
+  *channels = stream_format.mChannelsPerFrame;
+  return true;
+}
+
 // Returns the channel layout for |device| as provided by the AudioUnit attached
 // to that device matching |element|. Returns true if the count could be pulled
 // from the AudioUnit successfully, false otherwise.
@@ -346,6 +367,27 @@
   DCHECK(AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
   CHECK(channels);
 
+  // For input, get the channel count directly from the AudioUnit's stream
+  // format.
+  // TODO(https://crbug.com/796163): Find out if we can use channel layout on
+  // input element, or confirm that we can't.
+  if (element == AUElement::INPUT) {
+    ScopedAudioUnit au(device, element);
+    if (!au.is_valid())
+      return false;
+
+    if (!GetAudioUnitStreamFormatChannelCount(au.audio_unit(), element,
+                                              channels)) {
+      return false;
+    }
+
+    DVLOG(1) << "Input channels: " << *channels;
+    return true;
+  }
+
+  // For output, use the channel layout to determine channel count.
+  DCHECK(element == AUElement::OUTPUT);
+
   // If the device has more channels than possible for layouts to express, use
   // the total count of channels on the device; as of this writing, macOS will
   // only return up to 8 channels in any layout. To allow WebAudio to work with
@@ -442,8 +484,7 @@
     }
   }
 
-  DVLOG(1) << (element == AUElement::OUTPUT ? "Output" : "Input")
-           << " channels: " << *channels;
+  DVLOG(1) << "Output channels: " << *channels;
   return true;
 }
 
diff --git a/media/audio/mac/scoped_audio_unit.cc b/media/audio/mac/scoped_audio_unit.cc
index 3f0cdb3..e063346 100644
--- a/media/audio/mac/scoped_audio_unit.cc
+++ b/media/audio/mac/scoped_audio_unit.cc
@@ -33,16 +33,39 @@
     return;
   }
 
-  result = AudioUnitSetProperty(
-      audio_unit, kAudioOutputUnitProperty_CurrentDevice,
-      kAudioUnitScope_Global, element, &device, sizeof(AudioDeviceID));
-  if (result == noErr) {
-    audio_unit_ = audio_unit;
+  const UInt32 enable_input_io = element == AUElement::INPUT ? 1 : 0;
+  result = AudioUnitSetProperty(audio_unit, kAudioOutputUnitProperty_EnableIO,
+                                kAudioUnitScope_Input, AUElement::INPUT,
+                                &enable_input_io, sizeof(enable_input_io));
+  if (result != noErr) {
+    OSSTATUS_DLOG(ERROR, result)
+        << "Failed to set input enable IO for audio unit.";
+    DestroyAudioUnit(audio_unit);
     return;
   }
-  OSSTATUS_DLOG(ERROR, result)
-      << "Failed to set current device for audio unit.";
-  DestroyAudioUnit(audio_unit);
+
+  const UInt32 enable_output_io = !enable_input_io;
+  result = AudioUnitSetProperty(audio_unit, kAudioOutputUnitProperty_EnableIO,
+                                kAudioUnitScope_Output, AUElement::OUTPUT,
+                                &enable_output_io, sizeof(enable_output_io));
+  if (result != noErr) {
+    OSSTATUS_DLOG(ERROR, result)
+        << "Failed to set output enable IO for audio unit.";
+    DestroyAudioUnit(audio_unit);
+    return;
+  }
+
+  result = AudioUnitSetProperty(
+      audio_unit, kAudioOutputUnitProperty_CurrentDevice,
+      kAudioUnitScope_Global, 0, &device, sizeof(AudioDeviceID));
+  if (result != noErr) {
+    OSSTATUS_DLOG(ERROR, result)
+        << "Failed to set current device for audio unit.";
+    DestroyAudioUnit(audio_unit);
+    return;
+  }
+
+  audio_unit_ = audio_unit;
 }
 
 ScopedAudioUnit::~ScopedAudioUnit() {
diff --git a/media/base/mac/video_frame_mac_unittests.cc b/media/base/mac/video_frame_mac_unittests.cc
index bdef2f1b..c1ebafea 100644
--- a/media/base/mac/video_frame_mac_unittests.cc
+++ b/media/base/mac/video_frame_mac_unittests.cc
@@ -69,7 +69,7 @@
       {PIXEL_FORMAT_YV12, 0},
       {PIXEL_FORMAT_I422, 0},
       {PIXEL_FORMAT_YV12A, 0},
-      {PIXEL_FORMAT_YV24, 0},
+      {PIXEL_FORMAT_I444, 0},
   };
 
   gfx::Size size(kWidth, kHeight);
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index 77d0be28..3d3c6fa 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -185,6 +185,10 @@
 const base::Feature kOverlayFullscreenVideo{"overlay-fullscreen-video",
                                             base::FEATURE_ENABLED_BY_DEFAULT};
 
+// Enable Picture in Picture.
+const base::Feature kPictureInPicture{"PictureInPicture",
+                                      base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Let videos be resumed via remote controls (for example, the notification)
 // when in background.
 const base::Feature kResumeBackgroundVideo {
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 0586dfe..80cb0a2 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -121,6 +121,7 @@
 MEDIA_EXPORT extern const base::Feature kNewRemotePlaybackPipeline;
 MEDIA_EXPORT extern const base::Feature kOverflowIconsForMediaControls;
 MEDIA_EXPORT extern const base::Feature kOverlayFullscreenVideo;
+MEDIA_EXPORT extern const base::Feature kPictureInPicture;
 MEDIA_EXPORT extern const base::Feature kPreloadMediaEngagementData;
 MEDIA_EXPORT extern const base::Feature kResumeBackgroundVideo;
 MEDIA_EXPORT extern const base::Feature kSpecCompliantCanPlayThrough;
diff --git a/media/base/sinc_resampler.h b/media/base/sinc_resampler.h
index afbd2abc..b87c5b6 100644
--- a/media/base/sinc_resampler.h
+++ b/media/base/sinc_resampler.h
@@ -85,7 +85,9 @@
 
  private:
   FRIEND_TEST_ALL_PREFIXES(SincResamplerTest, Convolve);
-  FRIEND_TEST_ALL_PREFIXES(SincResamplerPerfTest, Convolve);
+  FRIEND_TEST_ALL_PREFIXES(SincResamplerPerfTest, Convolve_unoptimized_aligned);
+  FRIEND_TEST_ALL_PREFIXES(SincResamplerPerfTest, Convolve_optimized_aligned);
+  FRIEND_TEST_ALL_PREFIXES(SincResamplerPerfTest, Convolve_optimized_unaligned);
 
   void InitializeKernel();
   void UpdateRegions(bool second_load);
diff --git a/media/base/sinc_resampler_perftest.cc b/media/base/sinc_resampler_perftest.cc
index 9cb7f4f..14a2e9d2 100644
--- a/media/base/sinc_resampler_perftest.cc
+++ b/media/base/sinc_resampler_perftest.cc
@@ -29,16 +29,17 @@
 #endif
 
 static void RunConvolveBenchmark(
-    SincResampler* resampler,
     float (*convolve_fn)(const float*, const float*, const float*, double),
     bool aligned,
     const std::string& trace_name) {
+  SincResampler resampler(kSampleRateRatio, SincResampler::kDefaultRequestSize,
+                          base::BindRepeating(&DoNothing));
+
   base::TimeTicks start = base::TimeTicks::Now();
   for (int i = 0; i < kBenchmarkIterations; ++i) {
-    convolve_fn(resampler->get_kernel_for_testing() + (aligned ? 0 : 1),
-                resampler->get_kernel_for_testing(),
-                resampler->get_kernel_for_testing(),
-                kKernelInterpolationFactor);
+    convolve_fn(resampler.get_kernel_for_testing() + (aligned ? 0 : 1),
+                resampler.get_kernel_for_testing(),
+                resampler.get_kernel_for_testing(), kKernelInterpolationFactor);
   }
   double total_time_milliseconds =
       (base::TimeTicks::Now() - start).InMillisecondsF();
@@ -52,22 +53,21 @@
 
 // Benchmark for the various Convolve() methods.  Make sure to build with
 // branding=Chrome so that DCHECKs are compiled out when benchmarking.
-TEST(SincResamplerPerfTest, Convolve) {
-  SincResampler resampler(kSampleRateRatio,
-                          SincResampler::kDefaultRequestSize,
-                          base::Bind(&DoNothing));
-
-  RunConvolveBenchmark(
-      &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned");
+TEST(SincResamplerPerfTest, Convolve_unoptimized_aligned) {
+  RunConvolveBenchmark(SincResampler::Convolve_C, true, "unoptimized_aligned");
+}
 
 #if defined(CONVOLVE_FUNC)
-  RunConvolveBenchmark(
-      &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned");
-  RunConvolveBenchmark(
-      &resampler, SincResampler::CONVOLVE_FUNC, false, "optimized_unaligned");
-#endif
+TEST(SincResamplerPerfTest, Convolve_optimized_aligned) {
+  RunConvolveBenchmark(SincResampler::CONVOLVE_FUNC, true, "optimized_aligned");
 }
 
+TEST(SincResamplerPerfTest, Convolve_optimized_unaligned) {
+  RunConvolveBenchmark(SincResampler::CONVOLVE_FUNC, false,
+                       "optimized_unaligned");
+}
+#endif
+
 #undef CONVOLVE_FUNC
 
 } // namespace media
diff --git a/media/base/vector_math_perftest.cc b/media/base/vector_math_perftest.cc
index 59b259d..de5e6ee9 100644
--- a/media/base/vector_math_perftest.cc
+++ b/media/base/vector_math_perftest.cc
@@ -93,67 +93,85 @@
 #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON
 #endif
 
-// Benchmark for each optimized vector_math::FMAC() method.
-TEST_F(VectorMathPerfTest, FMAC) {
-  // Benchmark FMAC_C().
+// Benchmarks for each optimized vector_math::FMAC() method.
+// Benchmark FMAC_C().
+TEST_F(VectorMathPerfTest, FMAC_unoptimized) {
   RunBenchmark(
       vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized");
+}
+
 #if defined(FMAC_FUNC)
-  // Benchmark FMAC_FUNC() with unaligned size.
+// Benchmark FMAC_FUNC() with unaligned size.
+TEST_F(VectorMathPerfTest, FMAC_optimized_unaligned) {
   ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment /
                                  sizeof(float)), 0U);
   RunBenchmark(
       vector_math::FMAC_FUNC, false, "vector_math_fmac", "optimized_unaligned");
-  // Benchmark FMAC_FUNC() with aligned size.
+}
+
+// Benchmark FMAC_FUNC() with aligned size.
+TEST_F(VectorMathPerfTest, FMAC_optimized_aligned) {
   ASSERT_EQ(kVectorSize % (vector_math::kRequiredAlignment / sizeof(float)),
             0U);
   RunBenchmark(
       vector_math::FMAC_FUNC, true, "vector_math_fmac", "optimized_aligned");
-#endif
 }
+#endif
 
-// Benchmark for each optimized vector_math::FMUL() method.
-TEST_F(VectorMathPerfTest, FMUL) {
-  // Benchmark FMUL_C().
+// Benchmarks for each optimized vector_math::FMUL() method.
+// Benchmark FMUL_C().
+TEST_F(VectorMathPerfTest, FMUL_unoptimized) {
   RunBenchmark(
       vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized");
+}
+
 #if defined(FMUL_FUNC)
-  // Benchmark FMUL_FUNC() with unaligned size.
+// Benchmark FMUL_FUNC() with unaligned size.
+TEST_F(VectorMathPerfTest, FMUL_optimized_unaligned) {
   ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment /
                                  sizeof(float)), 0U);
   RunBenchmark(
       vector_math::FMUL_FUNC, false, "vector_math_fmul", "optimized_unaligned");
-  // Benchmark FMUL_FUNC() with aligned size.
+}
+
+// Benchmark FMUL_FUNC() with aligned size.
+TEST_F(VectorMathPerfTest, FMUL_optimized_aligned) {
   ASSERT_EQ(kVectorSize % (vector_math::kRequiredAlignment / sizeof(float)),
             0U);
   RunBenchmark(
       vector_math::FMUL_FUNC, true, "vector_math_fmul", "optimized_aligned");
-#endif
 }
+#endif
 
-// Benchmark for each optimized vector_math::EWMAAndMaxPower() method.
-TEST_F(VectorMathPerfTest, EWMAAndMaxPower) {
-  // Benchmark EWMAAndMaxPower_C().
+// Benchmarks for each optimized vector_math::EWMAAndMaxPower() method.
+// Benchmark EWMAAndMaxPower_C().
+TEST_F(VectorMathPerfTest, EWMAAndMaxPower_unoptimized) {
   RunBenchmark(vector_math::EWMAAndMaxPower_C,
                kVectorSize,
                "vector_math_ewma_and_max_power",
                "unoptimized");
+}
+
 #if defined(EWMAAndMaxPower_FUNC)
-  // Benchmark EWMAAndMaxPower_FUNC() with unaligned size.
+// Benchmark EWMAAndMaxPower_FUNC() with unaligned size.
+TEST_F(VectorMathPerfTest, EWMAAndMaxPower_optimized_unaligned) {
   ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment /
                                  sizeof(float)), 0U);
   RunBenchmark(vector_math::EWMAAndMaxPower_FUNC,
                kVectorSize - 1,
                "vector_math_ewma_and_max_power",
                "optimized_unaligned");
-  // Benchmark EWMAAndMaxPower_FUNC() with aligned size.
+}
+
+// Benchmark EWMAAndMaxPower_FUNC() with aligned size.
+TEST_F(VectorMathPerfTest, EWMAAndMaxPower_optimized_aligned) {
   ASSERT_EQ(kVectorSize % (vector_math::kRequiredAlignment / sizeof(float)),
             0U);
   RunBenchmark(vector_math::EWMAAndMaxPower_FUNC,
                kVectorSize,
                "vector_math_ewma_and_max_power",
                "optimized_aligned");
-#endif
 }
+#endif
 
 } // namespace media
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 67ec5fa8..c53f31b 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -110,7 +110,6 @@
     case PIXEL_FORMAT_XRGB:
     case PIXEL_FORMAT_RGB24:
     case PIXEL_FORMAT_RGB32:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_Y16:
       return false;
     case PIXEL_FORMAT_NV12:
@@ -121,7 +120,7 @@
     case PIXEL_FORMAT_YUY2:
     case PIXEL_FORMAT_YV12:
     case PIXEL_FORMAT_I422:
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
     case PIXEL_FORMAT_YUV420P9:
     case PIXEL_FORMAT_YUV422P9:
     case PIXEL_FORMAT_YUV444P9:
@@ -376,7 +375,7 @@
   if (cv_format == kCVPixelFormatType_420YpCbCr8Planar) {
     format = PIXEL_FORMAT_I420;
   } else if (cv_format == kCVPixelFormatType_444YpCbCr8) {
-    format = PIXEL_FORMAT_YV24;
+    format = PIXEL_FORMAT_I444;
   } else if (cv_format == '420v') {
     // TODO(jfroy): Use kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange when the
     // minimum OS X and iOS SDKs permits it.
@@ -517,7 +516,6 @@
     case PIXEL_FORMAT_RGB24:
     case PIXEL_FORMAT_RGB32:
     case PIXEL_FORMAT_MJPEG:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_Y16:
       return 1;
     case PIXEL_FORMAT_NV12:
@@ -527,7 +525,7 @@
     case PIXEL_FORMAT_I420:
     case PIXEL_FORMAT_YV12:
     case PIXEL_FORMAT_I422:
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
     case PIXEL_FORMAT_YUV420P9:
     case PIXEL_FORMAT_YUV422P9:
     case PIXEL_FORMAT_YUV444P9:
@@ -837,7 +835,7 @@
     case media::PIXEL_FORMAT_YV12:
     case media::PIXEL_FORMAT_I422:
     case media::PIXEL_FORMAT_YV12A:
-    case media::PIXEL_FORMAT_YV24:
+    case media::PIXEL_FORMAT_I444:
     case media::PIXEL_FORMAT_NV12:
     case media::PIXEL_FORMAT_NV21:
     case media::PIXEL_FORMAT_UYVY:
@@ -848,7 +846,6 @@
     case media::PIXEL_FORMAT_RGB32:
     case media::PIXEL_FORMAT_MJPEG:
     case media::PIXEL_FORMAT_MT21:
-    case media::PIXEL_FORMAT_Y8:
       return 8;
     case media::PIXEL_FORMAT_YUV420P9:
     case media::PIXEL_FORMAT_YUV422P9:
@@ -1093,7 +1090,7 @@
     case kUPlane:  // and kUVPlane:
     case kVPlane:
       switch (format) {
-        case PIXEL_FORMAT_YV24:
+        case PIXEL_FORMAT_I444:
         case PIXEL_FORMAT_YUV444P9:
         case PIXEL_FORMAT_YUV444P10:
         case PIXEL_FORMAT_YUV444P12:
@@ -1125,7 +1122,6 @@
         case PIXEL_FORMAT_RGB24:
         case PIXEL_FORMAT_RGB32:
         case PIXEL_FORMAT_MJPEG:
-        case PIXEL_FORMAT_Y8:
           break;
       }
   }
@@ -1167,8 +1163,7 @@
     case PIXEL_FORMAT_I420:
     case PIXEL_FORMAT_I422:
     case PIXEL_FORMAT_YV12A:
-    case PIXEL_FORMAT_YV24:
-    case PIXEL_FORMAT_Y8:
+    case PIXEL_FORMAT_I444:
       return 1;
     case PIXEL_FORMAT_MJPEG:
       return 0;
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 03cc8a1..1e6b1102 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -300,7 +300,7 @@
 // Verify the gpu::MailboxHolder::ReleaseCallback is called when VideoFrame is
 // destroyed with the default release sync point.
 TEST(VideoFrame, TextureNoLongerNeededCallbackIsCalled) {
-  gpu::SyncToken called_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken called_sync_token(gpu::CommandBufferNamespace::GPU_IO,
                                    gpu::CommandBufferId::FromUnsafeValue(1), 1);
 
   {
@@ -355,10 +355,10 @@
     mailbox[i].name[0] = 50 + 1;
   }
 
-  gpu::SyncToken sync_token(kNamespace, 0, kCommandBufferId, 7);
+  gpu::SyncToken sync_token(kNamespace, kCommandBufferId, 7);
   sync_token.SetVerifyFlush();
   uint32_t target = 9;
-  gpu::SyncToken release_sync_token(kNamespace, 0, kCommandBufferId, 111);
+  gpu::SyncToken release_sync_token(kNamespace, kCommandBufferId, 111);
   release_sync_token.SetVerifyFlush();
 
   gpu::SyncToken called_sync_token;
@@ -409,7 +409,7 @@
 
   // Next try a format with no sub-sampling for UV.
   EXPECT_TRUE(VideoFrame::IsValidConfig(
-      PIXEL_FORMAT_YV24, VideoFrame::STORAGE_OWNED_MEMORY, odd_size,
+      PIXEL_FORMAT_I444, VideoFrame::STORAGE_OWNED_MEMORY, odd_size,
       gfx::Rect(odd_size), odd_size));
 }
 
@@ -430,7 +430,7 @@
   EXPECT_EQ(678, frame->coded_size().width());
 
   // Next create a frame that does not sub-sample UV.
-  frame = VideoFrame::CreateFrame(PIXEL_FORMAT_YV24, odd_size,
+  frame = VideoFrame::CreateFrame(PIXEL_FORMAT_I444, odd_size,
                                   gfx::Rect(odd_size), odd_size, kTimestamp);
   ASSERT_TRUE(frame.get());
   // No sub-sampling for YV24 will mean odd width can remain odd since any pixel
@@ -441,56 +441,61 @@
 
 TEST(VideoFrame, AllocationSize_OddSize) {
   const gfx::Size size(3, 5);
+
   for (unsigned int i = 1u; i <= PIXEL_FORMAT_MAX; ++i) {
     const VideoPixelFormat format = static_cast<VideoPixelFormat>(i);
-    const size_t allocation_size = VideoFrame::AllocationSize(format, size);
     switch (format) {
       case PIXEL_FORMAT_YUV444P9:
       case PIXEL_FORMAT_YUV444P10:
       case PIXEL_FORMAT_YUV444P12:
-        EXPECT_EQ(144u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(144u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_YUV422P9:
       case PIXEL_FORMAT_YUV422P10:
       case PIXEL_FORMAT_YUV422P12:
-        EXPECT_EQ(96u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(96u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
-      case PIXEL_FORMAT_YV24:
+      case PIXEL_FORMAT_I444:
       case PIXEL_FORMAT_YUV420P9:
       case PIXEL_FORMAT_YUV420P10:
       case PIXEL_FORMAT_YUV420P12:
-        EXPECT_EQ(72u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(72u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_UYVY:
       case PIXEL_FORMAT_YUY2:
       case PIXEL_FORMAT_I422:
-        EXPECT_EQ(48u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(48u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_YV12:
       case PIXEL_FORMAT_I420:
       case PIXEL_FORMAT_NV12:
       case PIXEL_FORMAT_NV21:
       case PIXEL_FORMAT_MT21:
-        EXPECT_EQ(36u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(36u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_ARGB:
       case PIXEL_FORMAT_XRGB:
       case PIXEL_FORMAT_YV12A:
       case PIXEL_FORMAT_RGB32:
-        EXPECT_EQ(60u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(60u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_RGB24:
-        EXPECT_EQ(45u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(45u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_Y16:
-        EXPECT_EQ(30u, allocation_size) << VideoPixelFormatToString(format);
-        break;
-      case PIXEL_FORMAT_Y8:
-        EXPECT_EQ(15u, allocation_size) << VideoPixelFormatToString(format);
+        EXPECT_EQ(30u, VideoFrame::AllocationSize(format, size))
+            << VideoPixelFormatToString(format);
         break;
       case PIXEL_FORMAT_MJPEG:
       case PIXEL_FORMAT_UNKNOWN:
-        break;
+        continue;
     }
   }
 }
diff --git a/media/base/video_types.cc b/media/base/video_types.cc
index f7f772a..b7762fa1 100644
--- a/media/base/video_types.cc
+++ b/media/base/video_types.cc
@@ -20,8 +20,8 @@
       return "PIXEL_FORMAT_I422";
     case PIXEL_FORMAT_YV12A:
       return "PIXEL_FORMAT_YV12A";
-    case PIXEL_FORMAT_YV24:
-      return "PIXEL_FORMAT_YV24";
+    case PIXEL_FORMAT_I444:
+      return "PIXEL_FORMAT_I444";
     case PIXEL_FORMAT_NV12:
       return "PIXEL_FORMAT_NV12";
     case PIXEL_FORMAT_NV21:
@@ -60,8 +60,6 @@
       return "PIXEL_FORMAT_YUV422P12";
     case PIXEL_FORMAT_YUV444P12:
       return "PIXEL_FORMAT_YUV444P12";
-    case PIXEL_FORMAT_Y8:
-      return "PIXEL_FORMAT_Y8";
     case PIXEL_FORMAT_Y16:
       return "PIXEL_FORMAT_Y16";
   }
@@ -75,7 +73,7 @@
     case PIXEL_FORMAT_I420:
     case PIXEL_FORMAT_I422:
     case PIXEL_FORMAT_YV12A:
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
     case PIXEL_FORMAT_NV12:
     case PIXEL_FORMAT_NV21:
     case PIXEL_FORMAT_MT21:
@@ -98,7 +96,6 @@
     case PIXEL_FORMAT_RGB24:
     case PIXEL_FORMAT_RGB32:
     case PIXEL_FORMAT_MJPEG:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_Y16:
       return false;
   }
@@ -111,7 +108,7 @@
     case PIXEL_FORMAT_I420:
     case PIXEL_FORMAT_YV12:
     case PIXEL_FORMAT_I422:
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
     case PIXEL_FORMAT_NV12:
     case PIXEL_FORMAT_NV21:
     case PIXEL_FORMAT_UYVY:
@@ -129,7 +126,6 @@
     case PIXEL_FORMAT_YUV420P12:
     case PIXEL_FORMAT_YUV422P12:
     case PIXEL_FORMAT_YUV444P12:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_Y16:
       return true;
     case PIXEL_FORMAT_YV12A:
diff --git a/media/base/video_types.h b/media/base/video_types.h
index c4a755d..8a28a998 100644
--- a/media/base/video_types.h
+++ b/media/base/video_types.h
@@ -25,9 +25,9 @@
   // don't actually want to use this. See http://crbug.com/784627.
   PIXEL_FORMAT_YV12 = 2,  // 12bpp YVU planar 1x1 Y, 2x2 VU samples.
 
-  PIXEL_FORMAT_I422 = 3,   // 16bpp YVU planar 1x1 Y, 2x1 UV samples.
+  PIXEL_FORMAT_I422 = 3,   // 16bpp YUV planar 1x1 Y, 2x1 UV samples.
   PIXEL_FORMAT_YV12A = 4,  // 20bpp YUVA planar 1x1 Y, 2x2 UV, 1x1 A samples.
-  PIXEL_FORMAT_YV24 = 5,   // 24bpp YUV planar, no subsampling.
+  PIXEL_FORMAT_I444 = 5,   // 24bpp YUV planar, no subsampling.
   PIXEL_FORMAT_NV12 =
       6,  // 12bpp with Y plane followed by a 2x2 interleaved UV plane.
   PIXEL_FORMAT_NV21 =
@@ -63,7 +63,7 @@
   PIXEL_FORMAT_YUV422P12 = 23,
   PIXEL_FORMAT_YUV444P12 = 24,
 
-  PIXEL_FORMAT_Y8 = 25,   // single 8bpp plane.
+  /* PIXEL_FORMAT_Y8 = 25, Deprecated */
   PIXEL_FORMAT_Y16 = 26,  // single 16bpp plane.
 
   // Please update UMA histogram enumeration when adding new formats here.
diff --git a/media/cdm/BUILD.gn b/media/cdm/BUILD.gn
index 2d0a927..f35272f 100644
--- a/media/cdm/BUILD.gn
+++ b/media/cdm/BUILD.gn
@@ -70,8 +70,6 @@
       "cdm_allocator.h",
       "cdm_auxiliary_helper.cc",
       "cdm_auxiliary_helper.h",
-      "cdm_file_adapter.cc",
-      "cdm_file_adapter.h",
       "cdm_helpers.cc",
       "cdm_helpers.h",
       "cdm_module.cc",
diff --git a/media/cdm/ppapi/BUILD.gn b/media/cdm/ppapi/BUILD.gn
index 3c06e2c..9ae0dc3d 100644
--- a/media/cdm/ppapi/BUILD.gn
+++ b/media/cdm/ppapi/BUILD.gn
@@ -13,13 +13,15 @@
   sources = [
     "cdm_file_io_test.cc",
     "cdm_file_io_test.h",
-    "external_clear_key/cdm_video_decoder.cc",
-    "external_clear_key/cdm_video_decoder.h",
-    "external_clear_key/clear_key_cdm.cc",
-    "external_clear_key/clear_key_cdm.h",
-    "external_clear_key/clear_key_cdm_common.h",
-    "external_clear_key/clear_key_persistent_session_cdm.cc",
-    "external_clear_key/clear_key_persistent_session_cdm.h",
+    "clear_key_cdm/cdm_file_adapter.cc",
+    "clear_key_cdm/cdm_file_adapter.h",
+    "clear_key_cdm/cdm_host_proxy.h",
+    "clear_key_cdm/cdm_video_decoder.cc",
+    "clear_key_cdm/cdm_video_decoder.h",
+    "clear_key_cdm/clear_key_cdm.cc",
+    "clear_key_cdm/clear_key_cdm.h",
+    "clear_key_cdm/clear_key_persistent_session_cdm.cc",
+    "clear_key_cdm/clear_key_persistent_session_cdm.h",
   ]
 
   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
@@ -38,10 +40,10 @@
 
   if (media_use_ffmpeg) {
     sources += [
-      "external_clear_key/ffmpeg_cdm_audio_decoder.cc",
-      "external_clear_key/ffmpeg_cdm_audio_decoder.h",
-      "external_clear_key/ffmpeg_cdm_video_decoder.cc",
-      "external_clear_key/ffmpeg_cdm_video_decoder.h",
+      "clear_key_cdm/ffmpeg_cdm_audio_decoder.cc",
+      "clear_key_cdm/ffmpeg_cdm_audio_decoder.h",
+      "clear_key_cdm/ffmpeg_cdm_video_decoder.cc",
+      "clear_key_cdm/ffmpeg_cdm_video_decoder.h",
     ]
     defines += [ "CLEAR_KEY_CDM_USE_FFMPEG_DECODER" ]
     deps += [ "//third_party/ffmpeg" ]
@@ -56,7 +58,7 @@
   visibility = [ ":*" ]
   sources = [
     "clearkeycdmadapter.ver",
-    "external_clear_key/BRANDING",
+    "clear_key_cdm/BRANDING",
   ]
   output = "$target_gen_dir/clearkeycdmadapter_version.rc"
 }
diff --git a/media/cdm/ppapi/external_clear_key/BRANDING b/media/cdm/ppapi/clear_key_cdm/BRANDING
similarity index 100%
rename from media/cdm/ppapi/external_clear_key/BRANDING
rename to media/cdm/ppapi/clear_key_cdm/BRANDING
diff --git a/media/cdm/ppapi/clear_key_cdm/README.md b/media/cdm/ppapi/clear_key_cdm/README.md
new file mode 100644
index 0000000..6aab074d
--- /dev/null
+++ b/media/cdm/ppapi/clear_key_cdm/README.md
@@ -0,0 +1,11 @@
+# Clear Key CDM
+
+This folder contains a library CDM implemenation that implements the
+cdm::ContentDecryptionModule interface to support **External Clear Key** key
+system ("org.chromium.externalclearkey" and variants), which is a superset of
+the Clear Key key system.
+
+Clear Key CDM is developed to test the library CDM path. It implements the basic
+functionality of Clear Key key system, as well as additional features like
+persistent license support. It also performs various unit tests based on the
+key system suffix (e.g. "org.chromium.externalclearkey.storageidtest").
diff --git a/media/cdm/cdm_file_adapter.cc b/media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.cc
similarity index 89%
rename from media/cdm/cdm_file_adapter.cc
rename to media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.cc
index d3f97f1..20cc8e5 100644
--- a/media/cdm/cdm_file_adapter.cc
+++ b/media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "media/cdm/cdm_file_adapter.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.h"
 
 #include <memory>
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
 
 namespace media {
 
@@ -29,8 +30,8 @@
 
 }  // namespace
 
-CdmFileAdapter::CdmFileAdapter(cdm::ContentDecryptionModule_9::Host* host) {
-  file_io_ = host->CreateFileIO(this);
+CdmFileAdapter::CdmFileAdapter(CdmHostProxy* cdm_host_proxy) {
+  file_io_ = cdm_host_proxy->CreateFileIO(this);
 }
 
 CdmFileAdapter::~CdmFileAdapter() {
diff --git a/media/cdm/cdm_file_adapter.h b/media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.h
similarity index 86%
rename from media/cdm/cdm_file_adapter.h
rename to media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.h
index 6cd9365..c09cd5ae 100644
--- a/media/cdm/cdm_file_adapter.h
+++ b/media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_CDM_FILE_ADAPTER_H_
-#define MEDIA_CDM_CDM_FILE_ADAPTER_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_FILE_ADAPTER_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_FILE_ADAPTER_H_
 
 #include <stdint.h>
 
@@ -13,13 +13,14 @@
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "media/base/media_export.h"
 #include "media/cdm/api/content_decryption_module.h"
 
 namespace media {
 
+class CdmHostProxy;
+
 // This class provides the ability to read and write a file using cdm::FileIO.
-class MEDIA_EXPORT CdmFileAdapter : public cdm::FileIOClient {
+class CdmFileAdapter : public cdm::FileIOClient {
  public:
   enum class Status { kSuccess, kInUse, kError };
   using FileOpenedCB = base::OnceCallback<void(Status status)>;
@@ -27,7 +28,7 @@
       base::OnceCallback<void(bool success, const std::vector<uint8_t>& data)>;
   using WriteCB = base::OnceCallback<void(bool success)>;
 
-  explicit CdmFileAdapter(cdm::ContentDecryptionModule_9::Host* host);
+  explicit CdmFileAdapter(CdmHostProxy* cdm_host_proxy);
   ~CdmFileAdapter() override;
 
   // Open the file with |name|. |open_cb| will be called when the file is
@@ -64,4 +65,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_CDM_FILE_ADAPTER_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_FILE_ADAPTER_H_
diff --git a/media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h b/media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h
new file mode 100644
index 0000000..bd729d3
--- /dev/null
+++ b/media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h
@@ -0,0 +1,23 @@
+// 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 MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_HOST_PROXY_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_HOST_PROXY_H_
+
+#include "media/cdm/api/content_decryption_module.h"
+
+namespace media {
+
+// An interface to proxy calls to the CDM Host.
+class CdmHostProxy {
+ public:
+  virtual ~CdmHostProxy() = default;
+
+  virtual cdm::Buffer* Allocate(uint32_t capacity) = 0;
+  virtual cdm::FileIO* CreateFileIO(cdm::FileIOClient* client) = 0;
+};
+
+}  // namespace media
+
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_HOST_PROXY_H_
diff --git a/media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.cc b/media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.cc
new file mode 100644
index 0000000..9c7f60c
--- /dev/null
+++ b/media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.cc
@@ -0,0 +1,44 @@
+// Copyright 2013 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 "media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h"
+
+#if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
+#include "media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h"
+#endif
+
+#if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
+#include "media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.h"
+#endif
+
+namespace media {
+
+std::unique_ptr<CdmVideoDecoder> CreateVideoDecoder(
+    CdmHostProxy* cdm_host_proxy,
+    const cdm::VideoDecoderConfig& config) {
+  std::unique_ptr<CdmVideoDecoder> video_decoder;
+
+#if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
+  if (config.codec == cdm::VideoDecoderConfig::kCodecVp8 ||
+      config.codec == cdm::VideoDecoderConfig::kCodecVp9) {
+    video_decoder.reset(new LibvpxCdmVideoDecoder(cdm_host_proxy));
+
+    if (!video_decoder->Initialize(config))
+      video_decoder.reset();
+
+    return video_decoder;
+  }
+#endif
+
+#if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
+  video_decoder.reset(new FFmpegCdmVideoDecoder(cdm_host_proxy));
+
+  if (!video_decoder->Initialize(config))
+    video_decoder.reset();
+#endif
+
+  return video_decoder;
+}
+
+}  // namespace media
diff --git a/media/cdm/ppapi/external_clear_key/cdm_video_decoder.h b/media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h
similarity index 83%
rename from media/cdm/ppapi/external_clear_key/cdm_video_decoder.h
rename to media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h
index 9ba5648c..e14a6f1a 100644
--- a/media/cdm/ppapi/external_clear_key/cdm_video_decoder.h
+++ b/media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h
@@ -2,18 +2,19 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CDM_VIDEO_DECODER_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CDM_VIDEO_DECODER_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_VIDEO_DECODER_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_VIDEO_DECODER_H_
 
 #include <stdint.h>
 
 #include <memory>
 
 #include "media/cdm/api/content_decryption_module.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
 
 namespace media {
 
+class CdmHostProxy;
+
 class CdmVideoDecoder {
  public:
   virtual ~CdmVideoDecoder() {}
@@ -39,9 +40,9 @@
 // of |config.codec|. Returns a scoped_ptr containing a non-null initialized
 // CdmVideoDecoder pointer upon success.
 std::unique_ptr<CdmVideoDecoder> CreateVideoDecoder(
-    ClearKeyCdmHost* host,
+    CdmHostProxy* cdm_host_proxy,
     const cdm::VideoDecoderConfig& config);
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CDM_VIDEO_DECODER_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CDM_VIDEO_DECODER_H_
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/clear_key_cdm/clear_key_cdm.cc
similarity index 87%
rename from media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
rename to media/cdm/ppapi/clear_key_cdm/clear_key_cdm.cc
index 78ac868..41f759f 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
+++ b/media/cdm/ppapi/clear_key_cdm/clear_key_cdm.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 "media/cdm/ppapi/external_clear_key/clear_key_cdm.h"
+#include "media/cdm/ppapi/clear_key_cdm/clear_key_cdm.h"
 
 #include <algorithm>
 #include <cstring>
@@ -24,20 +24,16 @@
 #include "media/cdm/api/content_decryption_module_ext.h"
 #include "media/cdm/json_web_key.h"
 #include "media/cdm/ppapi/cdm_file_io_test.h"
-#include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h"
 #include "media/media_features.h"
 
-#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-const int64_t kNoTimestamp = INT64_MIN;
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
-
 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
 #include "base/at_exit.h"
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "media/base/media.h"
-#include "media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h"
-#include "media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h"
 
 // Include FFmpeg avformat.h for av_register_all().
 extern "C" {
@@ -268,11 +264,12 @@
     return nullptr;
   }
 
-  if (cdm_interface_version != media::ClearKeyCdmInterface::kVersion)
+  using CdmInterface = cdm::ContentDecryptionModule;
+  if (cdm_interface_version != CdmInterface::kVersion)
     return nullptr;
 
-  media::ClearKeyCdmHost* host = static_cast<media::ClearKeyCdmHost*>(
-      get_cdm_host_func(media::ClearKeyCdmHost::kVersion, user_data));
+  using Host = CdmInterface::Host;
+  Host* host = static_cast<Host*>(get_cdm_host_func(Host::kVersion, user_data));
   if (!host)
     return nullptr;
 
@@ -339,15 +336,15 @@
 
 namespace media {
 
-ClearKeyCdm::ClearKeyCdm(ClearKeyCdmHost* host, const std::string& key_system)
-    : cdm_(new ClearKeyPersistentSessionCdm(
-          host,
+ClearKeyCdm::ClearKeyCdm(Host* host, const std::string& key_system)
+    : host_(host),
+      cdm_(new ClearKeyPersistentSessionCdm(
+          this,
           base::Bind(&ClearKeyCdm::OnSessionMessage, base::Unretained(this)),
           base::Bind(&ClearKeyCdm::OnSessionClosed, base::Unretained(this)),
           base::Bind(&ClearKeyCdm::OnSessionKeysChange, base::Unretained(this)),
           base::Bind(&ClearKeyCdm::OnSessionExpirationUpdate,
                      base::Unretained(this)))),
-      host_(host),
       key_system_(key_system),
       allow_persistent_state_(false),
       timer_delay_ms_(kInitialTimerDelayMs),
@@ -356,14 +353,6 @@
       is_running_platform_verification_test_(false),
       is_running_storage_id_test_(false) {
   DCHECK(g_is_cdm_module_initialized);
-
-#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  channel_count_ = 0;
-  bits_per_channel_ = 0;
-  samples_per_second_ = 0;
-  output_timestamp_base_in_microseconds_ = kNoTimestamp;
-  total_samples_generated_ = 0;
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
 }
 
 ClearKeyCdm::~ClearKeyCdm() = default;
@@ -591,17 +580,12 @@
 
 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
   if (!audio_decoder_)
-    audio_decoder_.reset(new media::FFmpegCdmAudioDecoder(host_));
+    audio_decoder_.reset(new media::FFmpegCdmAudioDecoder(this));
 
   if (!audio_decoder_->Initialize(audio_decoder_config))
     return cdm::kInitializationError;
 
   return cdm::kSuccess;
-#elif defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  channel_count_ = audio_decoder_config.channel_count;
-  bits_per_channel_ = audio_decoder_config.bits_per_channel;
-  samples_per_second_ = audio_decoder_config.samples_per_second;
-  return cdm::kSuccess;
 #else
   NOTIMPLEMENTED();
   return cdm::kSessionError;
@@ -619,7 +603,7 @@
   }
 
   // Any uninitialized decoder will be replaced.
-  video_decoder_ = CreateVideoDecoder(host_, video_decoder_config);
+  video_decoder_ = CreateVideoDecoder(this, video_decoder_config);
   if (!video_decoder_)
     return cdm::kInitializationError;
 
@@ -639,11 +623,6 @@
     default:
       NOTREACHED() << "ResetDecoder(): invalid cdm::StreamType";
   }
-#elif defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  if (decoder_type == cdm::kStreamTypeAudio) {
-    output_timestamp_base_in_microseconds_ = kNoTimestamp;
-    total_samples_generated_ = 0;
-  }
 #endif  // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
 }
 
@@ -656,9 +635,6 @@
     case cdm::kStreamTypeAudio:
 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
       audio_decoder_->Deinitialize();
-#elif defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-      output_timestamp_base_in_microseconds_ = kNoTimestamp;
-      total_samples_generated_ = 0;
 #endif
       break;
     default:
@@ -720,16 +696,9 @@
   }
 
   return audio_decoder_->DecodeBuffer(data, size, timestamp, audio_frames);
-#elif defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  int64_t timestamp_in_microseconds = kNoTimestamp;
-  if (!buffer->end_of_stream()) {
-    timestamp_in_microseconds = buffer->GetTimestamp().InMicroseconds();
-    DCHECK(timestamp_in_microseconds != kNoTimestamp);
-  }
-  return GenerateFakeAudioFrames(timestamp_in_microseconds, audio_frames);
 #else
   return cdm::kSuccess;
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
+#endif  // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
 }
 
 void ClearKeyCdm::Destroy() {
@@ -853,6 +822,14 @@
 #endif
 }
 
+cdm::Buffer* ClearKeyCdm::Allocate(uint32_t capacity) {
+  return host_->Allocate(capacity);
+}
+
+cdm::FileIO* ClearKeyCdm::CreateFileIO(cdm::FileIOClient* client) {
+  return host_->CreateFileIO(client);
+}
+
 void ClearKeyCdm::OnSessionMessage(const std::string& session_id,
                                    CdmMessageType message_type,
                                    const std::vector<uint8_t>& message) {
@@ -918,67 +895,6 @@
                          error_message.length());
 }
 
-#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-int64_t ClearKeyCdm::CurrentTimeStampInMicroseconds() const {
-  return output_timestamp_base_in_microseconds_ +
-         base::Time::kMicrosecondsPerSecond * total_samples_generated_ /
-             samples_per_second_;
-}
-
-int ClearKeyCdm::GenerateFakeAudioFramesFromDuration(
-    int64_t duration_in_microseconds,
-    cdm::AudioFrames* audio_frames) const {
-  int64_t samples_to_generate = static_cast<double>(samples_per_second_) *
-                                    duration_in_microseconds /
-                                    base::Time::kMicrosecondsPerSecond +
-                                0.5;
-  if (samples_to_generate <= 0)
-    return 0;
-
-  int64_t bytes_per_sample = channel_count_ * bits_per_channel_ / 8;
-  // |frame_size| must be a multiple of |bytes_per_sample|.
-  int64_t frame_size = bytes_per_sample * samples_to_generate;
-
-  int64_t timestamp = CurrentTimeStampInMicroseconds();
-
-  const int kHeaderSize = sizeof(timestamp) + sizeof(frame_size);
-  audio_frames->SetFrameBuffer(host_->Allocate(kHeaderSize + frame_size));
-  uint8_t* data = audio_frames->FrameBuffer()->Data();
-
-  memcpy(data, &timestamp, sizeof(timestamp));
-  data += sizeof(timestamp);
-  memcpy(data, &frame_size, sizeof(frame_size));
-  data += sizeof(frame_size);
-  // You won't hear anything because we have all zeros here. But the video
-  // should play just fine!
-  memset(data, 0, frame_size);
-
-  audio_frames->FrameBuffer()->SetSize(kHeaderSize + frame_size);
-
-  return samples_to_generate;
-}
-
-cdm::Status ClearKeyCdm::GenerateFakeAudioFrames(
-    int64_t timestamp_in_microseconds,
-    cdm::AudioFrames* audio_frames) {
-  if (timestamp_in_microseconds == kNoTimestamp)
-    return cdm::kNeedMoreData;
-
-  // Return kNeedMoreData for the first frame because duration is unknown.
-  if (output_timestamp_base_in_microseconds_ == kNoTimestamp) {
-    output_timestamp_base_in_microseconds_ = timestamp_in_microseconds;
-    return cdm::kNeedMoreData;
-  }
-
-  int samples_generated = GenerateFakeAudioFramesFromDuration(
-      timestamp_in_microseconds - CurrentTimeStampInMicroseconds(),
-      audio_frames);
-  total_samples_generated_ += samples_generated;
-
-  return samples_generated == 0 ? cdm::kNeedMoreData : cdm::kSuccess;
-}
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
-
 void ClearKeyCdm::OnUnitTestComplete(bool success) {
   std::string message = GetUnitTestResultMessage(success);
   host_->OnSessionMessage(last_session_id_.data(), last_session_id_.length(),
@@ -988,7 +904,7 @@
 
 void ClearKeyCdm::StartFileIOTest() {
   file_io_test_runner_.reset(new FileIOTestRunner(
-      base::Bind(&ClearKeyCdmHost::CreateFileIO, base::Unretained(host_))));
+      base::Bind(&Host::CreateFileIO, base::Unretained(host_))));
   file_io_test_runner_->RunAllTests(
       base::Bind(&ClearKeyCdm::OnFileIOTestComplete, base::Unretained(this)));
 }
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.h b/media/cdm/ppapi/clear_key_cdm/clear_key_cdm.h
similarity index 80%
rename from media/cdm/ppapi/external_clear_key/clear_key_cdm.h
rename to media/cdm/ppapi/clear_key_cdm/clear_key_cdm.h
index 59e8603..cb3d9ee9 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.h
+++ b/media/cdm/ppapi/clear_key_cdm/clear_key_cdm.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_CDM_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_CDM_H_
 
 #include <stdint.h>
 
@@ -17,28 +17,25 @@
 #include "base/synchronization/lock.h"
 #include "media/base/cdm_key_information.h"
 #include "media/base/cdm_promise.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.h"
-
-// Enable this to use the fake decoder for testing.
-// TODO(tomfinegan): Move fake audio decoder into a separate class.
-#if 0
-#define CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
-#endif
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
+#include "media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.h"
 
 namespace media {
+
 class CdmVideoDecoder;
 class DecoderBuffer;
 class FFmpegCdmAudioDecoder;
 class FileIOTestRunner;
 
 // Clear key implementation of the cdm::ContentDecryptionModule interface.
-class ClearKeyCdm : public ClearKeyCdmInterface {
+class ClearKeyCdm : public cdm::ContentDecryptionModule, public CdmHostProxy {
  public:
+  using Host = cdm::ContentDecryptionModule::Host;
+
   ClearKeyCdm(Host* host, const std::string& key_system);
   ~ClearKeyCdm() override;
 
-  // ClearKeyCdmInterface implementation.
+  // cdm::ContentDecryptionModule implementation.
   void Initialize(bool allow_distinctive_identifier,
                   bool allow_persistent_state) override;
   void GetStatusForPolicy(uint32_t promise_id,
@@ -89,6 +86,10 @@
                    const uint8_t* storage_id,
                    uint32_t storage_id_size) override;
 
+  // CdmHostProxy implementation.
+  cdm::Buffer* Allocate(uint32_t capacity) override;
+  cdm::FileIO* CreateFileIO(cdm::FileIOClient* client) override;
+
  private:
   // ContentDecryptionModule callbacks.
   void OnSessionMessage(const std::string& session_id,
@@ -128,20 +129,6 @@
       const cdm::InputBuffer& encrypted_buffer,
       scoped_refptr<DecoderBuffer>* decrypted_buffer);
 
-#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  int64_t CurrentTimeStampInMicroseconds() const;
-
-  // Generates fake video frames with |duration_in_microseconds|.
-  // Returns the number of samples generated in the |audio_frames|.
-  int GenerateFakeAudioFramesFromDuration(int64_t duration_in_microseconds,
-                                          cdm::AudioFrames* audio_frames) const;
-
-  // Generates fake video frames given |input_timestamp|.
-  // Returns cdm::kSuccess if any audio frame is successfully generated.
-  cdm::Status GenerateFakeAudioFrames(int64_t timestamp_in_microseconds,
-                                      cdm::AudioFrames* audio_frames);
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
-
   void OnUnitTestComplete(bool success);
 
   void StartFileIOTest();
@@ -154,10 +141,9 @@
   void VerifyCdmHostTest();
   void StartStorageIdTest();
 
+  Host* const host_;
   scoped_refptr<ContentDecryptionModule> cdm_;
 
-  ClearKeyCdmHost* host_;
-
   const std::string key_system_;
   bool allow_persistent_state_;
 
@@ -171,14 +157,6 @@
   // from running.
   bool renewal_timer_set_;
 
-#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
-  int channel_count_;
-  int bits_per_channel_;
-  int samples_per_second_;
-  int64_t output_timestamp_base_in_microseconds_;
-  int total_samples_generated_;
-#endif  // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
-
 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
   std::unique_ptr<FFmpegCdmAudioDecoder> audio_decoder_;
 #endif  // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
@@ -196,4 +174,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_CDM_H_
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.cc b/media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.cc
similarity index 96%
rename from media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.cc
rename to media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.cc
index 65cdc95..f63894c 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.cc
+++ b/media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.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 "media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.h"
+#include "media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.h"
 
 #include "base/bind.h"
 #include "base/callback.h"
@@ -87,12 +87,14 @@
 }  // namespace
 
 ClearKeyPersistentSessionCdm::ClearKeyPersistentSessionCdm(
-    ClearKeyCdmHost* host,
+    CdmHostProxy* cdm_host_proxy,
     const SessionMessageCB& session_message_cb,
     const SessionClosedCB& session_closed_cb,
     const SessionKeysChangeCB& session_keys_change_cb,
     const SessionExpirationUpdateCB& session_expiration_update_cb)
-    : host_(host), session_closed_cb_(session_closed_cb), weak_factory_(this) {
+    : cdm_host_proxy_(cdm_host_proxy),
+      session_closed_cb_(session_closed_cb),
+      weak_factory_(this) {
   cdm_ = base::MakeRefCounted<AesDecryptor>(
       session_message_cb,
       base::Bind(&ClearKeyPersistentSessionCdm::OnSessionClosed,
@@ -133,7 +135,7 @@
   DCHECK_EQ(CdmSessionType::PERSISTENT_LICENSE_SESSION, session_type);
 
   // Load the saved state for |session_id| and then create the session.
-  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(host_));
+  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(cdm_host_proxy_));
   CdmFileAdapter* file_ref = file.get();
   file_ref->Open(
       session_id,
@@ -229,7 +231,7 @@
   }
 
   // Persistent session has been updated, so save the current state.
-  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(host_));
+  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(cdm_host_proxy_));
   CdmFileAdapter* file_ref = file.get();
   file_ref->Open(
       session_id,
@@ -295,7 +297,7 @@
   }
 
   // Remove the saved state for |session_id| first.
-  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(host_));
+  std::unique_ptr<CdmFileAdapter> file(new CdmFileAdapter(cdm_host_proxy_));
   CdmFileAdapter* file_ref = file.get();
   file_ref->Open(
       session_id,
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.h b/media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.h
similarity index 92%
rename from media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.h
rename to media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.h
index 2eeed47..1e1d194 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_persistent_session_cdm.h
+++ b/media/cdm/ppapi/clear_key_cdm/clear_key_persistent_session_cdm.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
 
 #include <stdint.h>
 
@@ -17,8 +17,8 @@
 #include "base/memory/weak_ptr.h"
 #include "media/base/content_decryption_module.h"
 #include "media/cdm/aes_decryptor.h"
-#include "media/cdm/cdm_file_adapter.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_file_adapter.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
 
 namespace media {
 
@@ -28,7 +28,7 @@
 class ClearKeyPersistentSessionCdm : public ContentDecryptionModule {
  public:
   ClearKeyPersistentSessionCdm(
-      ClearKeyCdmHost* host,
+      CdmHostProxy* cdm_host_proxy,
       const SessionMessageCB& session_message_cb,
       const SessionClosedCB& session_closed_cb,
       const SessionKeysChangeCB& session_keys_change_cb,
@@ -100,7 +100,7 @@
   void OnSessionClosed(const std::string& session_id);
 
   scoped_refptr<AesDecryptor> cdm_;
-  ClearKeyCdmHost* host_;
+  CdmHostProxy* const cdm_host_proxy_;
 
   // Callbacks for firing session events. Other events aren't intercepted.
   SessionClosedCB session_closed_cb_;
@@ -116,4 +116,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_CLEAR_KEY_PERSISTENT_SESSION_CDM_H_
diff --git a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
similarity index 96%
rename from media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
rename to media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
index 0884a59c..59037bf 100644
--- a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc
+++ b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.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 "media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.h"
 
 #include <stddef.h>
 
@@ -17,6 +17,7 @@
 #include "media/base/data_buffer.h"
 #include "media/base/limits.h"
 #include "media/base/timestamp_constants.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
 #include "media/ffmpeg/ffmpeg_common.h"
 #include "media/ffmpeg/ffmpeg_decoding_loop.h"
 
@@ -128,9 +129,9 @@
   }
 }
 
-FFmpegCdmAudioDecoder::FFmpegCdmAudioDecoder(ClearKeyCdmHost* host)
+FFmpegCdmAudioDecoder::FFmpegCdmAudioDecoder(CdmHostProxy* cdm_host_proxy)
     : is_initialized_(false),
-      host_(host),
+      cdm_host_proxy_(cdm_host_proxy),
       samples_per_second_(0),
       channels_(0),
       av_sample_format_(0),
@@ -270,7 +271,7 @@
     return cdm::kNeedMoreData;
 
   const size_t allocation_size = total_size + 2 * sizeof(int64_t);
-  decoded_frames->SetFrameBuffer(host_->Allocate(allocation_size));
+  decoded_frames->SetFrameBuffer(cdm_host_proxy_->Allocate(allocation_size));
   if (!decoded_frames->FrameBuffer()) {
     LOG(ERROR) << "DecodeBuffer() ClearKeyCdmHost::Allocate failed.";
     return cdm::kDecodeError;
diff --git a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.h
similarity index 86%
rename from media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h
rename to media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.h
index 635567f..da288192 100644
--- a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h
+++ b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_audio_decoder.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_AUDIO_DECODER_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_AUDIO_DECODER_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_AUDIO_DECODER_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_AUDIO_DECODER_H_
 
 #include <stdint.h>
 
@@ -13,25 +13,25 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/time/time.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
+#include "media/cdm/api/content_decryption_module.h"
 #include "media/ffmpeg/ffmpeg_deleters.h"
 
 struct AVCodecContext;
 struct AVFrame;
 
 namespace media {
-class AudioTimestampHelper;
-class FFmpegDecodingLoop;
-}
 
-namespace media {
+class AudioTimestampHelper;
+class CdmHostProxy;
+class FFmpegDecodingLoop;
+
 // TODO(xhwang): This class is partially cloned from FFmpegAudioDecoder. When
 // FFmpegAudioDecoder is updated, it's a pain to keep this class in sync with
 // FFmpegAudioDecoder. We need a long term sustainable solution for this. See
 // http://crbug.com/169203
 class FFmpegCdmAudioDecoder {
  public:
-  explicit FFmpegCdmAudioDecoder(ClearKeyCdmHost* host);
+  explicit FFmpegCdmAudioDecoder(CdmHostProxy* cdm_host_proxy);
   ~FFmpegCdmAudioDecoder();
   bool Initialize(const cdm::AudioDecoderConfig& config);
   void Deinitialize();
@@ -63,7 +63,7 @@
 
   bool is_initialized_;
 
-  ClearKeyCdmHost* const host_;
+  CdmHostProxy* const cdm_host_proxy_;
 
   // FFmpeg structures owned by this object.
   std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
@@ -86,4 +86,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_AUDIO_DECODER_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_AUDIO_DECODER_H_
diff --git a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.cc
similarity index 96%
rename from media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc
rename to media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.cc
index 99d99c4..4e6cdf7 100644
--- a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc
+++ b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.cc
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h"
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
 #include "base/logging.h"
 #include "media/base/limits.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
 #include "media/ffmpeg/ffmpeg_common.h"
 #include "media/ffmpeg/ffmpeg_decoding_loop.h"
 
@@ -128,10 +129,8 @@
   }
 }
 
-FFmpegCdmVideoDecoder::FFmpegCdmVideoDecoder(ClearKeyCdmHost* host)
-    : is_initialized_(false),
-      host_(host) {
-}
+FFmpegCdmVideoDecoder::FFmpegCdmVideoDecoder(CdmHostProxy* cdm_host_proxy)
+    : is_initialized_(false), cdm_host_proxy_(cdm_host_proxy) {}
 
 FFmpegCdmVideoDecoder::~FFmpegCdmVideoDecoder() {
   ReleaseFFmpegResources();
@@ -269,7 +268,7 @@
   const int space_required = y_size + (uv_size * 2);
 
   DCHECK(!cdm_video_frame->FrameBuffer());
-  cdm_video_frame->SetFrameBuffer(host_->Allocate(space_required));
+  cdm_video_frame->SetFrameBuffer(cdm_host_proxy_->Allocate(space_required));
   if (!cdm_video_frame->FrameBuffer()) {
     LOG(ERROR) << "CopyAvFrameTo() ClearKeyCdmHost::Allocate failed.";
     return false;
diff --git a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h
similarity index 80%
rename from media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h
rename to media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h
index 31e375839..9b70ee4 100644
--- a/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h
+++ b/media/cdm/ppapi/clear_key_cdm/ffmpeg_cdm_video_decoder.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_VIDEO_DECODER_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_VIDEO_DECODER_H_
 
 #include <stdint.h>
 
@@ -12,19 +12,20 @@
 #include "base/compiler_specific.h"
 #include "base/containers/circular_deque.h"
 #include "base/macros.h"
-#include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
-#include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h"
 #include "media/ffmpeg/ffmpeg_deleters.h"
 
 struct AVCodecContext;
 struct AVFrame;
 
 namespace media {
+
+class CdmHostProxy;
 class FFmpegDecodingLoop;
 
 class FFmpegCdmVideoDecoder : public CdmVideoDecoder {
  public:
-  explicit FFmpegCdmVideoDecoder(ClearKeyCdmHost* host);
+  explicit FFmpegCdmVideoDecoder(CdmHostProxy* cdm_host_proxy);
   ~FFmpegCdmVideoDecoder() override;
 
   // CdmVideoDecoder implementation.
@@ -57,7 +58,7 @@
 
   bool is_initialized_;
 
-  ClearKeyCdmHost* const host_;
+  CdmHostProxy* const cdm_host_proxy_;
 
   base::circular_deque<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>
       pending_frames_;
@@ -67,4 +68,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FFMPEG_CDM_VIDEO_DECODER_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_FFMPEG_CDM_VIDEO_DECODER_H_
diff --git a/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc b/media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.cc
similarity index 94%
rename from media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc
rename to media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.cc
index 2ff6bc4a..d816dfe0 100644
--- a/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc
+++ b/media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.cc
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.h"
 
 #include "base/logging.h"
 #include "media/base/limits.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_host_proxy.h"
 
 // Include libvpx header files.
 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide
@@ -25,12 +26,11 @@
 
 static const int kDecodeThreads = 2;
 
-LibvpxCdmVideoDecoder::LibvpxCdmVideoDecoder(CdmHost* host)
+LibvpxCdmVideoDecoder::LibvpxCdmVideoDecoder(CdmHostProxy* cdm_host_proxy)
     : is_initialized_(false),
-      host_(host),
+      cdm_host_proxy_(cdm_host_proxy),
       vpx_codec_(NULL),
-      vpx_image_(NULL) {
-}
+      vpx_image_(NULL) {}
 
 LibvpxCdmVideoDecoder::~LibvpxCdmVideoDecoder() {
   Deinitialize();
@@ -151,7 +151,7 @@
   const int space_required = y_size + u_size + v_size;
 
   DCHECK(!cdm_video_frame->FrameBuffer());
-  cdm_video_frame->SetFrameBuffer(host_->Allocate(space_required));
+  cdm_video_frame->SetFrameBuffer(cdm_host_proxy_->Allocate(space_required));
   if (!cdm_video_frame->FrameBuffer()) {
     LOG(ERROR) << "CopyVpxImageTo() CdmHost::Allocate failed.";
     return false;
diff --git a/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h b/media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.h
similarity index 79%
rename from media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h
rename to media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.h
index a9d54e1..e680e20 100644
--- a/media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h
+++ b/media/cdm/ppapi/clear_key_cdm/libvpx_cdm_video_decoder.h
@@ -2,24 +2,26 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_LIBVPX_CDM_VIDEO_DECODER_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_LIBVPX_CDM_VIDEO_DECODER_H_
+#ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_LIBVPX_CDM_VIDEO_DECODER_H_
+#define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_LIBVPX_CDM_VIDEO_DECODER_H_
 
 #include <stdint.h>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "media/cdm/api/content_decryption_module.h"
-#include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
+#include "media/cdm/ppapi/clear_key_cdm/cdm_video_decoder.h"
 
 struct vpx_codec_ctx;
 struct vpx_image;
 
 namespace media {
 
+class CdmHostProxy;
+
 class LibvpxCdmVideoDecoder : public CdmVideoDecoder {
  public:
-  explicit LibvpxCdmVideoDecoder(CdmHost* host);
+  explicit LibvpxCdmVideoDecoder(CdmHostProxy* cdm_host_proxy);
   ~LibvpxCdmVideoDecoder() override;
 
   // CdmVideoDecoder implementation.
@@ -44,7 +46,7 @@
 
   bool is_initialized_;
 
-  CdmHost* const host_;
+  CdmHostProxy* const cdm_host_proxy_;
 
   vpx_codec_ctx* vpx_codec_;
   vpx_image* vpx_image_;
@@ -54,4 +56,4 @@
 
 }  // namespace media
 
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_LIBVPX_CDM_VIDEO_DECODER_H_
+#endif  // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_LIBVPX_CDM_VIDEO_DECODER_H_
diff --git a/media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc b/media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc
deleted file mode 100644
index ade64566..0000000
--- a/media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2013 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 "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
-
-#if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
-#include "media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h"
-#endif
-
-#if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
-#include "media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h"
-#endif
-
-#if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
-#include "media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h"
-#endif
-
-namespace media {
-
-std::unique_ptr<CdmVideoDecoder> CreateVideoDecoder(
-    ClearKeyCdmHost* host,
-    const cdm::VideoDecoderConfig& config) {
-  std::unique_ptr<CdmVideoDecoder> video_decoder;
-#if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
-  video_decoder.reset(new FakeCdmVideoDecoder(host));
-
-  if (!video_decoder->Initialize(config))
-    video_decoder.reset();
-#else
-
-#if defined(CLEAR_KEY_CDM_USE_LIBVPX_DECODER)
-  if (config.codec == cdm::VideoDecoderConfig::kCodecVp8 ||
-      config.codec == cdm::VideoDecoderConfig::kCodecVp9) {
-    video_decoder.reset(new LibvpxCdmVideoDecoder(host));
-
-    if (!video_decoder->Initialize(config))
-      video_decoder.reset();
-
-    return video_decoder;
-  }
-#endif
-
-#if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
-  video_decoder.reset(new FFmpegCdmVideoDecoder(host));
-
-  if (!video_decoder->Initialize(config))
-    video_decoder.reset();
-#endif
-
-#endif  // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
-
-  return video_decoder;
-}
-
-}  // namespace media
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h b/media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h
deleted file mode 100644
index 699745f..0000000
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 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 MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_COMMON_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_COMMON_H_
-
-#include "media/cdm/api/content_decryption_module.h"
-
-namespace media {
-
-// Aliases for the version of the interfaces that this CDM implements.
-typedef cdm::ContentDecryptionModule_9 ClearKeyCdmInterface;
-typedef ClearKeyCdmInterface::Host ClearKeyCdmHost;
-
-}  // namespace media
-
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_COMMON_H_
diff --git a/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc b/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc
deleted file mode 100644
index 4c0d870..0000000
--- a/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2013 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 "media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h"
-
-#include "base/logging.h"
-
-namespace media {
-
-FakeCdmVideoDecoder::FakeCdmVideoDecoder(cdm::Host* host)
-    : is_initialized_(false),
-      host_(host) {
-}
-
-FakeCdmVideoDecoder::~FakeCdmVideoDecoder() {
-  Deinitialize();
-}
-
-bool FakeCdmVideoDecoder::Initialize(const cdm::VideoDecoderConfig& config) {
-  DVLOG(1) << "Initialize()";
-
-  video_size_ = config.coded_size;
-  is_initialized_ = true;
-  return true;
-}
-
-void FakeCdmVideoDecoder::Deinitialize() {
-  DVLOG(1) << "Deinitialize()";
-  is_initialized_ = false;
-}
-
-void FakeCdmVideoDecoder::Reset() {
-  DVLOG(1) << "Reset()";
-}
-
-// Creates a YV12 video frame.
-cdm::Status FakeCdmVideoDecoder::DecodeFrame(const uint8_t* compressed_frame,
-                                             int32_t compressed_frame_size,
-                                             int64_t timestamp,
-                                             cdm::VideoFrame* decoded_frame) {
-  DVLOG(1) << "DecodeFrame()";
-
-  // The fake decoder does not buffer any frames internally. So if the input is
-  // empty (EOS), just return kNeedMoreData.
-  if (!decoded_frame)
-    return cdm::kNeedMoreData;
-
-  // Choose non-zero alignment and padding on purpose for testing.
-  const int kAlignment = 8;
-  const int kPadding = 16;
-  const int kPlanePadding = 128;
-
-  int width = video_size_.width;
-  int height = video_size_.height;
-  DCHECK_EQ(width % 2, 0);
-  DCHECK_EQ(height % 2, 0);
-
-  int y_stride = (width + kAlignment - 1) / kAlignment * kAlignment + kPadding;
-  int uv_stride =
-      (width / 2 + kAlignment - 1) / kAlignment * kAlignment + kPadding;
-  int y_rows = height;
-  int uv_rows = height / 2;
-  int y_offset = 0;
-  int v_offset = y_stride * y_rows + kPlanePadding;
-  int u_offset = v_offset + uv_stride * uv_rows + kPlanePadding;
-  int frame_size = u_offset + uv_stride * uv_rows + kPlanePadding;
-
-  decoded_frame->SetFrameBuffer(host_->Allocate(frame_size));
-  decoded_frame->FrameBuffer()->SetSize(frame_size);
-
-  decoded_frame->SetFormat(cdm::kYv12);
-  decoded_frame->SetSize(video_size_);
-  decoded_frame->SetPlaneOffset(cdm::VideoFrame::kYPlane, y_offset);
-  decoded_frame->SetPlaneOffset(cdm::VideoFrame::kVPlane, v_offset);
-  decoded_frame->SetPlaneOffset(cdm::VideoFrame::kUPlane, u_offset);
-  decoded_frame->SetStride(cdm::VideoFrame::kYPlane, y_stride);
-  decoded_frame->SetStride(cdm::VideoFrame::kVPlane, uv_stride);
-  decoded_frame->SetStride(cdm::VideoFrame::kUPlane, uv_stride);
-  decoded_frame->SetTimestamp(timestamp);
-
-  static unsigned char color = 0;
-  color += 10;
-
-  memset(reinterpret_cast<void*>(decoded_frame->FrameBuffer()->Data()),
-         color, frame_size);
-
-  return cdm::kSuccess;
-}
-
-}  // namespace media
diff --git a/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h b/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h
deleted file mode 100644
index 3495f5d..0000000
--- a/media/cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 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 MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_
-#define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_
-
-#include <stdint.h>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "media/cdm/api/content_decryption_module.h"
-#include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
-
-namespace media {
-
-class FakeCdmVideoDecoder : public CdmVideoDecoder {
- public:
-  explicit FakeCdmVideoDecoder(cdm::Host* host);
-  ~FakeCdmVideoDecoder() override;
-
-  // CdmVideoDecoder implementation.
-  bool Initialize(const cdm::VideoDecoderConfig& config) override;
-  void Deinitialize() override;
-  void Reset() override;
-  cdm::Status DecodeFrame(const uint8_t* compressed_frame,
-                          int32_t compressed_frame_size,
-                          int64_t timestamp,
-                          cdm::VideoFrame* decoded_frame) override;
-  bool is_initialized() const override { return is_initialized_; }
-
- private:
-  bool is_initialized_;
-  cdm::Size video_size_;
-
-  cdm::Host* const host_;
-
-  DISALLOW_COPY_AND_ASSIGN(FakeCdmVideoDecoder);
-};
-
-}  // namespace media
-
-#endif  // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 82b593bc..25285c52 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -515,7 +515,7 @@
   }
 
   // Pad out |coded_size| for subsampled YUV formats.
-  if (format != PIXEL_FORMAT_YV24 && format != PIXEL_FORMAT_UNKNOWN) {
+  if (format != PIXEL_FORMAT_I444 && format != PIXEL_FORMAT_UNKNOWN) {
     coded_size.set_width((coded_size.width() + 1) / 2 * 2);
     if (format != PIXEL_FORMAT_I422)
       coded_size.set_height((coded_size.height() + 1) / 2 * 2);
@@ -690,7 +690,7 @@
   switch (pixel_format) {
     case AV_PIX_FMT_YUV444P:
     case AV_PIX_FMT_YUVJ444P:
-      return PIXEL_FORMAT_YV24;
+      return PIXEL_FORMAT_I444;
 
     // TODO(dalecurtis): This is incorrect; see http://crbug.com/784627. This
     // should actually be PIXEL_FORMAT_I420.
@@ -743,7 +743,7 @@
       return AV_PIX_FMT_YUV422P;
     case PIXEL_FORMAT_YV12A:
       return AV_PIX_FMT_YUVA420P;
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
       return AV_PIX_FMT_YUV444P;
     case PIXEL_FORMAT_YUV420P9:
       return AV_PIX_FMT_YUV420P9LE;
diff --git a/media/filters/aom_video_decoder.cc b/media/filters/aom_video_decoder.cc
index 765f5c8..ad813a5 100644
--- a/media/filters/aom_video_decoder.cc
+++ b/media/filters/aom_video_decoder.cc
@@ -54,7 +54,7 @@
     case AOM_IMG_FMT_I422:
       return PIXEL_FORMAT_I422;
     case AOM_IMG_FMT_I444:
-      return PIXEL_FORMAT_YV24;
+      return PIXEL_FORMAT_I444;
 
     case AOM_IMG_FMT_I42016:
       switch (img->bit_depth) {
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 3958608c..0dd68944 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -134,7 +134,7 @@
   if (format == PIXEL_FORMAT_UNKNOWN)
     return AVERROR(EINVAL);
   DCHECK(format == PIXEL_FORMAT_YV12 || format == PIXEL_FORMAT_I422 ||
-         format == PIXEL_FORMAT_YV24 || format == PIXEL_FORMAT_YUV420P9 ||
+         format == PIXEL_FORMAT_I444 || format == PIXEL_FORMAT_YUV420P9 ||
          format == PIXEL_FORMAT_YUV420P10 || format == PIXEL_FORMAT_YUV422P9 ||
          format == PIXEL_FORMAT_YUV422P10 || format == PIXEL_FORMAT_YUV444P9 ||
          format == PIXEL_FORMAT_YUV444P10 || format == PIXEL_FORMAT_YUV420P12 ||
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 567a581..fddbefe6 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -241,7 +241,7 @@
       (config.codec() == kCodecVP8 && config.format() == PIXEL_FORMAT_YV12A) ||
       (config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV12) ||
       (config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV12A) ||
-      (config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_YV24));
+      (config.codec() == kCodecVP9 && config.format() == PIXEL_FORMAT_I444));
 
 #if !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
   // When FFmpegVideoDecoder is available it handles VP8 that doesn't have
@@ -510,7 +510,7 @@
       break;
 
     case VPX_IMG_FMT_I444:
-      codec_format = PIXEL_FORMAT_YV24;
+      codec_format = PIXEL_FORMAT_I444;
       break;
 
     case VPX_IMG_FMT_I42016:
diff --git a/media/filters/vpx_video_decoder_fuzzertest.cc b/media/filters/vpx_video_decoder_fuzzertest.cc
index 082b3c6..d0fe8c01 100644
--- a/media/filters/vpx_video_decoder_fuzzertest.cc
+++ b/media/filters/vpx_video_decoder_fuzzertest.cc
@@ -73,7 +73,7 @@
         pixel_format = PIXEL_FORMAT_YV12A;
         break;
       case 2:
-        pixel_format = PIXEL_FORMAT_YV24;
+        pixel_format = PIXEL_FORMAT_I444;
         break;
       default:
         return 0;
diff --git a/media/media_options.gni b/media/media_options.gni
index 0c95074..b261ac1 100644
--- a/media/media_options.gni
+++ b/media/media_options.gni
@@ -166,6 +166,12 @@
   # branding, but may be overridden by other embedders.
   enable_cdm_storage_id = enable_library_cdms && is_chrome_branded &&
                           (is_win || is_mac || is_chromeos)
+
+  # If |enable_cdm_storage_id| is set, then an implementation specific key
+  # must also be provided. It can be provided by defining CDM_STORAGE_ID_KEY
+  # (which takes precedence), or by setting |alternate_cdm_storage_id_key|.
+  # The key must be a string of at least 32 characters.
+  alternate_cdm_storage_id_key = ""
 }
 
 # This feature can only be enabled when using Mojo media. Furthermore, the
diff --git a/media/remoting/proto_enum_utils.cc b/media/remoting/proto_enum_utils.cc
index 9ebf2b3..0eb93d5 100644
--- a/media/remoting/proto_enum_utils.cc
+++ b/media/remoting/proto_enum_utils.cc
@@ -329,7 +329,7 @@
     CASE_RETURN_OTHER(PIXEL_FORMAT_YV12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_I422);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YV12A);
-    CASE_RETURN_OTHER(PIXEL_FORMAT_YV24);
+    CASE_RETURN_OTHER(PIXEL_FORMAT_I444);
     CASE_RETURN_OTHER(PIXEL_FORMAT_NV12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_NV21);
     CASE_RETURN_OTHER(PIXEL_FORMAT_UYVY);
@@ -349,8 +349,10 @@
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV420P12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV422P12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV444P12);
-    CASE_RETURN_OTHER(PIXEL_FORMAT_Y8);
-    CASE_RETURN_OTHER(PIXEL_FORMAT_Y16);
+    // PIXEL_FORMAT_Y8 is deprecated .
+    case pb::VideoDecoderConfig_Format_PIXEL_FORMAT_Y8:
+      return base::nullopt;
+   CASE_RETURN_OTHER(PIXEL_FORMAT_Y16);
   }
   return base::nullopt;  // Not a 'default' to ensure compile-time checks.
 }
@@ -365,7 +367,7 @@
     CASE_RETURN_OTHER(PIXEL_FORMAT_YV12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_I422);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YV12A);
-    CASE_RETURN_OTHER(PIXEL_FORMAT_YV24);
+    CASE_RETURN_OTHER(PIXEL_FORMAT_I444);
     CASE_RETURN_OTHER(PIXEL_FORMAT_NV12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_NV21);
     CASE_RETURN_OTHER(PIXEL_FORMAT_UYVY);
@@ -385,7 +387,6 @@
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV420P12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV422P12);
     CASE_RETURN_OTHER(PIXEL_FORMAT_YUV444P12);
-    CASE_RETURN_OTHER(PIXEL_FORMAT_Y8);
     CASE_RETURN_OTHER(PIXEL_FORMAT_Y16);
   }
   return base::nullopt;  // Not a 'default' to ensure compile-time checks.
diff --git a/media/remoting/rpc.proto b/media/remoting/rpc.proto
index 44afdfa..4baecb3 100644
--- a/media/remoting/rpc.proto
+++ b/media/remoting/rpc.proto
@@ -194,7 +194,7 @@
     PIXEL_FORMAT_YV12 = 2;
     PIXEL_FORMAT_I422 = 3;
     PIXEL_FORMAT_YV12A = 4;
-    PIXEL_FORMAT_YV24 = 5;
+    PIXEL_FORMAT_I444 = 5;
     PIXEL_FORMAT_NV12 = 6;
     PIXEL_FORMAT_NV21 = 7;
     PIXEL_FORMAT_UYVY = 8;
@@ -214,7 +214,7 @@
     PIXEL_FORMAT_YUV420P12 = 22;
     PIXEL_FORMAT_YUV422P12 = 23;
     PIXEL_FORMAT_YUV444P12 = 24;
-    PIXEL_FORMAT_Y8 = 25;
+    PIXEL_FORMAT_Y8 = 25 [deprecated = true];
     PIXEL_FORMAT_Y16 = 26;
   };
 
diff --git a/media/renderers/paint_canvas_video_renderer.cc b/media/renderers/paint_canvas_video_renderer.cc
index 298170ee..8a6afd0 100644
--- a/media/renderers/paint_canvas_video_renderer.cc
+++ b/media/renderers/paint_canvas_video_renderer.cc
@@ -517,17 +517,17 @@
 
     case PIXEL_FORMAT_YUV444P12:
       shift = 4;
-      format = PIXEL_FORMAT_YV24;
+      format = PIXEL_FORMAT_I444;
       break;
 
     case PIXEL_FORMAT_YUV444P10:
       shift = 2;
-      format = PIXEL_FORMAT_YV24;
+      format = PIXEL_FORMAT_I444;
       break;
 
     case PIXEL_FORMAT_YUV444P9:
       shift = 1;
-      format = PIXEL_FORMAT_YV24;
+      format = PIXEL_FORMAT_I444;
       break;
 
     default:
@@ -759,7 +759,7 @@
           1);  // 1 = enable RGB premultiplication by Alpha.
       break;
 
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
       LIBYUV_I444_TO_ARGB(video_frame->visible_data(VideoFrame::kYPlane),
                           video_frame->stride(VideoFrame::kYPlane),
                           video_frame->visible_data(VideoFrame::kUPlane),
@@ -804,9 +804,9 @@
     case PIXEL_FORMAT_RGB32:
     case PIXEL_FORMAT_MJPEG:
     case PIXEL_FORMAT_MT21:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_UNKNOWN:
-      NOTREACHED() << "Only YUV formats and Y16 are supported.";
+      NOTREACHED() << "Only YUV formats and Y16 are supported, got: "
+                   << media::VideoPixelFormatToString(video_frame->format());
   }
 }
 
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index 49adba3..56fb2d54 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -2572,7 +2572,7 @@
   ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-P444.webm"));
   Play();
   ASSERT_TRUE(WaitUntilOnEnded());
-  EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV24);
+  EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_I444);
 }
 
 // Verify that frames of VP9 video in the BT.709 color space have the YV12HD
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc
index 5ac55c07..1dc71a0 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -437,7 +437,7 @@
     // Unsupported cases.
     case PIXEL_FORMAT_YV12A:
     case PIXEL_FORMAT_I422:
-    case PIXEL_FORMAT_YV24:
+    case PIXEL_FORMAT_I444:
     case PIXEL_FORMAT_NV12:
     case PIXEL_FORMAT_NV21:
     case PIXEL_FORMAT_UYVY:
@@ -457,7 +457,6 @@
     case PIXEL_FORMAT_YUV420P12:
     case PIXEL_FORMAT_YUV422P12:
     case PIXEL_FORMAT_YUV444P12:
-    case PIXEL_FORMAT_Y8:
     case PIXEL_FORMAT_Y16:
     case PIXEL_FORMAT_UNKNOWN:
       frame_ready_cb.Run(video_frame);
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 f5e47f8c..b8198bfa 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
@@ -27,7 +27,7 @@
 
   void GenSyncTokenCHROMIUM(GLbyte* sync_token) override {
     gpu::SyncToken sync_token_data;
-    sync_token_data.Set(gpu::CommandBufferNamespace::GPU_IO, 0,
+    sync_token_data.Set(gpu::CommandBufferNamespace::GPU_IO,
                         gpu::CommandBufferId(), next_fence_sync_++);
     sync_token_data.SetVerifyFlush();
     memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
@@ -35,7 +35,7 @@
 
   void GenUnverifiedSyncTokenCHROMIUM(GLbyte* sync_token) override {
     gpu::SyncToken sync_token_data;
-    sync_token_data.Set(gpu::CommandBufferNamespace::GPU_IO, 0,
+    sync_token_data.Set(gpu::CommandBufferNamespace::GPU_IO,
                         gpu::CommandBufferId(), next_fence_sync_++);
     memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
   }
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 35cacac..fc79f68 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -2302,7 +2302,9 @@
     "server/web_socket_encoder.cc",
     "server/web_socket_encoder.h",
   ]
-  configs += [ "//build/config/compiler:wexit_time_destructors" ]
+  configs += [
+    "//build/config/compiler:wexit_time_destructors",
+  ]
   deps = [
     ":net",
     "//base",
@@ -2476,19 +2478,11 @@
     "data/ssl/certificates/prime256v1-ecdsa-ee-by-prime256v1-ecdsa-intermediate.pem",
     "data/ssl/certificates/prime256v1-ecdsa-intermediate.pem",
     "data/ssl/certificates/punycodetest.pem",
-    "data/ssl/certificates/quic-cert.key",
     "data/ssl/certificates/quic-chain.pem",
+    "data/ssl/certificates/quic-leaf-cert.key",
+    "data/ssl/certificates/quic-leaf-cert.key.pkcs8.pem",
+    "data/ssl/certificates/quic-leaf-cert.key.sct",
     "data/ssl/certificates/quic-root.pem",
-    "data/ssl/certificates/quic_chain.crt",
-    "data/ssl/certificates/quic_root.crt",
-    "data/ssl/certificates/quic_test.example.com.crt",
-    "data/ssl/certificates/quic_test.example.com.key",
-    "data/ssl/certificates/quic_test.example.com.key.pkcs8",
-    "data/ssl/certificates/quic_test.example.com.key.pkcs8.pem",
-    "data/ssl/certificates/quic_test.example.com.key.sct",
-    "data/ssl/certificates/quic_test_ecc.example.com.crt",
-    "data/ssl/certificates/quic_test_ecc.example.com.key",
-    "data/ssl/certificates/quic_test_ecc.example.com.sct",
     "data/ssl/certificates/redundant-server-chain.pem",
     "data/ssl/certificates/redundant-validated-chain-root.pem",
     "data/ssl/certificates/redundant-validated-chain.pem",
@@ -2654,7 +2648,9 @@
     "url_request/url_request_test_util.h",
   ]
 
-  configs += [ "//build/config:precompiled_headers" ]
+  configs += [
+    "//build/config:precompiled_headers",
+  ]
 
   public_deps = [
     ":traffic_annotation",
@@ -2761,7 +2757,6 @@
 
     configs += [
       "//build/config/compiler:wexit_time_destructors",
-      "//tools/v8_context_snapshot:use_v8_context_snapshot",
       "//v8:external_startup_data",
     ]
 
@@ -2772,7 +2767,6 @@
     deps = [
       "//base",
       "//gin",
-      "//tools/v8_context_snapshot",
       "//url",
       "//v8",
     ]
@@ -5302,7 +5296,9 @@
   ]
   net_unfiltered_sources = []
 
-  configs += [ "//build/config:precompiled_headers" ]
+  configs += [
+    "//build/config:precompiled_headers",
+  ]
   defines = []
 
   deps = [
diff --git a/net/data/ssl/certificates/README b/net/data/ssl/certificates/README
index bb2e779..0940ae9 100644
--- a/net/data/ssl/certificates/README
+++ b/net/data/ssl/certificates/README
@@ -114,17 +114,17 @@
   NSS certificate nickname for a user certificate. This certificate's Subject
   field doesn't have a common name.
 
-- quic_test_ecc.example.com.crt
-- quic_test.example.com.crt
-- quic_root.crt
-     These certificates are used by the ProofVerifier's unit tests of QUIC.
-
 ===== From net/data/ssl/scripts/generate-quic-chain.sh
-- quic-cert.key
-- quic-chain.pem

+- quic-chain.pem
+- quic-leaf-cert.key
+- quic-leaf-cert.key.pkcs8.pem
 - quic-root.pem
      These certificates are used by integration tests that use QUIC.
 
+- quic-leaf-cert.key.sct
+     This isn't generated and just contains a simple text file (the contents
+     don't actually matter, just the presence of the file).
+
 ===== From net/data/ssl/scripts/generate-test-certs.sh
 - expired_cert.pem
 - ok_cert.pem
diff --git a/net/data/ssl/certificates/quic-cert.key b/net/data/ssl/certificates/quic-leaf-cert.key
similarity index 100%
rename from net/data/ssl/certificates/quic-cert.key
rename to net/data/ssl/certificates/quic-leaf-cert.key
Binary files differ
diff --git a/net/data/ssl/certificates/quic-leaf-cert.key.pkcs8.pem b/net/data/ssl/certificates/quic-leaf-cert.key.pkcs8.pem
new file mode 100644
index 0000000..00983fc3
--- /dev/null
+++ b/net/data/ssl/certificates/quic-leaf-cert.key.pkcs8.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCyVm9+1LS2TuMV
+jorpRgYVY0xtOjJnxxSkF/y3BJj7tRGukxwgcxXNs7zuYYKOy7h4ym3mV3PzRW4e
+wyddr15SbRJHRHI9fYrBR1AZSiGkCLTMLpyiKs4bh4KuOiOw3dI+ZP7OpjU0kwf4
+iG7IvrILX5yWDnkcoyvJI1qKHx4X4qnUPEkiKUP6Y1U8cmJK0XJarnWoFGfrWIjO
+EQy/CWfyu8iAPkrwNa3S3EOjL9rGOxxudnAxc8wzW0823POPn6YHbWHgZm8sdr2F
+o4vQis7EvJfg7eEp36Fiua3YDxr4rkT+piiVxMzftfdtRq7vm69zUB2f8Meg7zdL
+E3OWJJUPAgMBAAECggEAWhFzcB/nQOfoonuCRrxZ2DV1ZPjueiE+mH2Q4bINvZo+
+WufrXawiB+jN86sFsC7NdRvvk1T5t5SKQDkZyaQHRCPYBmxYMhwUlvb4Sj15bgoD
+ndewvepWe+rdoja0zd/KDj8dvaqN1oankOr+4J4G992LDPI0UrVKKOSVFosOvMqh
+zAJy19KGzfSzBU40xnWk4MEq7ZPksdeMFN5Dv+C4lFCmd/ddTFQ7EcqeSRqv2JCC
+fAH9wF6GFUXfYqU7h3CTt686kxhbgle4U5rzr126ByZjysAKv5OnNOEDlNi8D5og
+SX/vjuek8eL3Ypmho1Wch+f3w315gs8KWQjx0lcv+QKBgQDlvCRPat/qu0v/hsE7
+iopkV5I3AghzfNXzaHFrwgkXFXu+pArTk3r22aY3strAXfiYp7Blz10+LUrZyvB6
+0wa//Mk3nZ67BcViy1HykJJd6hHXYXxqih8Ig0JQJrD12iEwo3RUZ/G+L4EVOcG/
+kS/C8sUbp3j6mqxJe18xgvCF0wKBgQDGugDL8xfzuqTT3XPhCTmUL1nAO3Xv0vRb
+Vuzx0bFeGvAPHWFAb2FtEkXc4pDCPb+73q9ByBwukVB0nPpiaPzlJHGMocBANxh6
+tvO/XMcfmQmhQ+2yXgXEb7/RamULdjn7dlE+0l8kvCI37LYB/lPq2cdA1vnugxkB
+55fls4GCVQKBgQC35snyQQ2KK/CEVmzsqtRpyqgjHJ+DQ1VJijvxFNyN/AaY71wz
+TgXLASPLxoLSJudP3Dya40oy8bLPcWLcD32BxmuU97oO4GnH0haBZDWmtC8gCMu9
+xV9eQyScYLybsceL1ezTfHnJ0uE0Co4MOb7QAeLDZmazxYlRMU9cpQLBPQKBgQCT
+yYwCIHy1kx41OUGOH3AklbonTZD9k2KJ8vEvPQSsuVfBxdWnN626kZZHGG8TJRzL
+uGWZhBoBP6wXrQ4/1VgNiLaxITF6D/8yc5B9xZ+IDiWtOnkw5t9fIMQEFx2iEoA4
+U9tD3utGxGqmMHGCtgLuaprVy4n/KJuWYQcDmiU8KQKBgQClNWD+p5caD82Z4QB5
+Y/lTbjmmF4nLHlwfLpWI+nJ76kvFMnLYgJY8oZgBwBZsEkQG8so/nejBFsYvIDeR
+5W7cQVJ+ED8GCF9O4H77U0R8rpuL4z61ni4rXHc9+rABaHBHJ1aF8h3SlceHVdow
+FBU427jUeVKBN9UnFo4wrogjMA==
+-----END PRIVATE KEY-----
diff --git a/net/data/ssl/certificates/quic_test.example.com.key.sct b/net/data/ssl/certificates/quic-leaf-cert.key.sct
similarity index 100%
rename from net/data/ssl/certificates/quic_test.example.com.key.sct
rename to net/data/ssl/certificates/quic-leaf-cert.key.sct
Binary files differ
diff --git a/net/data/ssl/certificates/quic_chain.crt b/net/data/ssl/certificates/quic_chain.crt
deleted file mode 100644
index 57a8f342..0000000
--- a/net/data/ssl/certificates/quic_chain.crt
+++ /dev/null
@@ -1,226 +0,0 @@
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 3 (0x3)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Intermediate CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=Leaf certificate
-        Subject Public Key Info:
-            Public Key Algorithm: rsaEncryption
-                Public-Key: (2048 bit)
-                Modulus:
-                    00:d5:ca:19:79:8e:a9:ab:46:f0:4e:b7:58:6d:b3:
-                    a3:9a:68:10:52:af:f0:00:94:ae:34:bd:b4:50:1f:
-                    a3:26:a4:9e:1c:90:37:5b:3d:e8:d7:3b:bc:93:fb:
-                    00:fb:c7:49:54:9b:f1:d0:9a:f2:51:84:7b:59:8b:
-                    bd:66:f3:ae:92:5a:b9:63:8c:64:a7:d0:9e:e3:0c:
-                    50:d2:cf:93:9d:e9:4a:11:57:93:c1:de:af:7b:5a:
-                    44:1d:0a:8c:22:a6:1d:c6:ad:e9:8f:16:8d:4e:91:
-                    f1:d3:f1:f3:82:fe:f6:55:dc:72:f1:11:07:75:ec:
-                    bb:e9:3a:35:87:43:81:5e:dc:43:4a:b7:7c:a1:1a:
-                    d5:d2:c1:40:39:69:7d:89:ad:64:1b:31:34:a8:ea:
-                    9e:5e:26:fc:71:d2:c6:6b:e5:c2:73:30:3f:59:a7:
-                    35:8d:a9:a5:e9:3d:43:41:bd:54:f2:2a:e1:15:0c:
-                    35:30:6b:8b:f2:77:ca:5c:07:8f:58:f4:54:77:5e:
-                    af:ce:b1:c1:2b:a7:bb:c0:e9:7d:ef:1a:d7:03:ee:
-                    8f:67:ad:c6:e6:1d:a9:e7:91:3f:41:e7:d6:86:20:
-                    8c:53:b3:d8:79:09:e2:4b:15:5a:d8:92:3b:62:4f:
-                    68:e4:cb:d0:a4:4e:b6:7d:3e:5f:b0:24:ea:62:61:
-                    cf:7b
-                Exponent: 65537 (0x10001)
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Digital Signature, Key Encipherment
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:FALSE
-            X509v3 Subject Alternative Name: 
-                DNS:test.example.com
-    Signature Algorithm: sha1WithRSAEncryption
-         58:c3:dc:e3:4d:ec:76:c6:62:99:ba:ba:6d:da:e4:2f:ec:00:
-         f8:fb:2a:e3:f6:a4:bc:37:c9:53:0f:73:2e:a6:79:8f:6b:ef:
-         87:16:56:7b:9e:6d:ac:1a:ec:8b:49:71:7d:f2:11:11:a4:0d:
-         5e:6e:be:93:6b:fe:cb:44:1b:4e:99:2a:d2:eb:d8:91:80:d7:
-         c8:87:fd:c8:fa:cf:c2:68:06:07:2d:60:ae:56:c4:3c:49:4d:
-         e3:05:3f:1b:15:a8:a9:ea:85:d8:af:d3:f5:be:b5:71:28:23:
-         8d:04:f1:c6:e1:fb:0c:1b:ac:5a:2d:e0:7f:fb:4e:79:47:29:
-         b3:9c:27:09:7d:3c:84:0b:59:0a:03:c5:86:a9:aa:90:49:89:
-         0b:bc:8e:0e:2e:b1:67:ed:99:be:37:ee:75:7f:a9:fa:62:95:
-         44:02:1c:99:26:fa:a7:17:61:d2:ec:e1:ca:42:2b:69:97:8f:
-         71:dc:1b:41:7b:91:a8:d6:b2:82:05:ef:d0:0b:3c:46:a3:9d:
-         7c:06:81:da:de:b6:54:ad:97:bd:c2:03:02:ff:1b:64:17:25:
-         4a:4c:9b:85:c1:bb:6f:26:3a:b5:ba:9b:2d:17:b9:bd:36:b1:
-         43:48:29:f7:da:88:8d:ce:f0:ac:7f:03:a7:93:e1:e9:c1:58:
-         15:b3:30:22
------BEGIN CERTIFICATE-----
-MIIDIjCCAgygAwIBAgIBAzALBgkqhkiG9w0BAQUwLDEQMA4GA1UEChMHQWNtZSBD
-bzEYMBYGA1UEAxMPSW50ZXJtZWRpYXRlIENBMB4XDTEzMDEwMTEwMDAwMFoXDTIz
-MTIzMTEwMDAwMFowLTEQMA4GA1UEChMHQWNtZSBDbzEZMBcGA1UEAxMQTGVhZiBj
-ZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXKGXmO
-qatG8E63WG2zo5poEFKv8ACUrjS9tFAfoyaknhyQN1s96Nc7vJP7APvHSVSb8dCa
-8lGEe1mLvWbzrpJauWOMZKfQnuMMUNLPk53pShFXk8Her3taRB0KjCKmHcat6Y8W
-jU6R8dPx84L+9lXccvERB3Xsu+k6NYdDgV7cQ0q3fKEa1dLBQDlpfYmtZBsxNKjq
-nl4m/HHSxmvlwnMwP1mnNY2ppek9Q0G9VPIq4RUMNTBri/J3ylwHj1j0VHder86x
-wSunu8Dpfe8a1wPuj2etxuYdqeeRP0Hn1oYgjFOz2HkJ4ksVWtiSO2JPaOTL0KRO
-tn0+X7Ak6mJhz3sCAwEAAaNSMFAwDgYDVR0PAQH/BAQDAgCgMBMGA1UdJQQMMAoG
-CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwGwYDVR0RBBQwEoIQdGVzdC5leGFtcGxl
-LmNvbTALBgkqhkiG9w0BAQUDggEBAFjD3ONN7HbGYpm6um3a5C/sAPj7KuP2pLw3
-yVMPcy6meY9r74cWVnuebawa7ItJcX3yERGkDV5uvpNr/stEG06ZKtLr2JGA18iH
-/cj6z8JoBgctYK5WxDxJTeMFPxsVqKnqhdiv0/W+tXEoI40E8cbh+wwbrFot4H/7
-TnlHKbOcJwl9PIQLWQoDxYapqpBJiQu8jg4usWftmb437nV/qfpilUQCHJkm+qcX
-YdLs4cpCK2mXj3HcG0F7kajWsoIF79ALPEajnXwGgdretlStl73CAwL/G2QXJUpM
-m4XBu28mOrW6my0Xub02sUNIKffaiI3O8Kx/A6eT4enBWBWzMCI=
------END CERTIFICATE-----
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 2 (0x2)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Root CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=Intermediate CA
-        Subject Public Key Info:
-            Public Key Algorithm: rsaEncryption
-                Public-Key: (2048 bit)
-                Modulus:
-                    00:cd:35:50:e7:0a:68:80:e5:2b:f0:01:2b:93:11:
-                    0c:50:f7:23:e1:d8:d2:ed:48:9a:ea:3b:64:9f:82:
-                    fa:e4:ad:23:96:a8:a1:9b:31:d1:d6:4a:b2:79:f1:
-                    c1:80:03:18:41:54:a5:30:3a:82:bd:57:10:9c:fd:
-                    5d:34:fd:19:d3:21:1b:cb:06:e7:66:40:e1:27:89:
-                    98:82:2d:d7:2e:0d:5c:05:9a:74:0d:45:de:32:5e:
-                    78:4e:81:b4:c8:60:97:f0:8b:2a:8c:e0:57:f6:b9:
-                    db:5a:53:64:1d:27:e0:93:47:d9:93:ee:ac:f6:7b:
-                    e7:d2:97:b1:a6:85:37:75:ff:aa:f7:8f:ae:92:4e:
-                    30:0b:56:54:fd:32:f9:9d:3c:d8:2e:95:f5:64:17:
-                    ff:26:d2:65:e2:b1:78:6c:83:5d:67:a4:d8:ae:89:
-                    6b:6e:b3:4b:35:a5:b1:03:3c:20:97:79:ed:0b:f8:
-                    de:25:a1:3a:50:70:40:ae:9e:04:75:a2:6a:2f:15:
-                    84:5b:08:c3:e0:55:4e:47:db:bc:79:25:b0:2e:58:
-                    0d:bc:aa:a6:f2:ee:cd:e6:b8:02:8c:5b:00:b3:3d:
-                    44:d0:a6:bf:b3:e7:2e:9d:46:70:de:45:d1:bd:79:
-                    bd:c0:f2:47:0b:71:28:60:91:c2:98:73:15:2d:b4:
-                    b1:f3
-                Exponent: 65537 (0x10001)
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Certificate Sign
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:TRUE
-    Signature Algorithm: sha1WithRSAEncryption
-         b5:66:2c:a1:f8:76:8a:3b:6c:06:2d:d5:1e:4b:25:5c:b8:6d:
-         ee:0e:7e:09:a4:43:58:65:93:e9:da:6c:42:2e:5d:74:3f:79:
-         61:4d:e5:72:45:d7:2d:fd:73:8e:e2:98:fe:8e:4a:e4:11:6e:
-         94:5c:d9:84:c9:cb:a1:1c:fa:95:d9:15:c1:87:72:98:2e:63:
-         df:67:4d:04:1f:da:d7:29:66:ec:20:ea:b6:5d:71:dd:bc:5a:
-         16:55:87:8f:51:9f:40:05:00:3b:21:ee:74:bc:3b:11:9a:10:
-         ba:b4:e8:5e:6e:90:c3:22:ca:da:92:f8:fb:8e:73:fd:69:91:
-         13:48:11:01:58:ae:f4:b2:8c:38:56:f0:a5:3b:2a:64:5c:25:
-         9a:bb:fd:94:27:34:af:b4:21:4c:08:23:3c:fb:3f:08:6f:07:
-         b8:05:9d:85:1d:73:0e:f0:83:f4:3c:9b:cc:aa:fd:3d:fa:82:
-         a4:dd:01:10:9d:10:2c:c4:47:64:ca:b4:b5:6e:be:59:d1:d2:
-         a1:6a:b5:d3:08:23:49:fc:4f:d4:f3:a5:63:b5:e1:34:19:9d:
-         8c:33:0f:8e:47:01:9a:eb:2a:eb:cb:f4:1a:0c:ee:8e:68:d3:
-         c1:8e:fd:4b:93:ff:40:8c:3a:11:2b:62:a3:c1:a7:13:bd:26:
-         37:c5:85:c5
------BEGIN CERTIFICATE-----
-MIIC/zCCAemgAwIBAgIBAjALBgkqhkiG9w0BAQUwJDEQMA4GA1UEChMHQWNtZSBD
-bzEQMA4GA1UEAxMHUm9vdCBDQTAeFw0xMzAxMDExMDAwMDBaFw0yMzEyMzExMDAw
-MDBaMCwxEDAOBgNVBAoTB0FjbWUgQ28xGDAWBgNVBAMTD0ludGVybWVkaWF0ZSBD
-QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM01UOcKaIDlK/ABK5MR
-DFD3I+HY0u1Imuo7ZJ+C+uStI5aooZsx0dZKsnnxwYADGEFUpTA6gr1XEJz9XTT9
-GdMhG8sG52ZA4SeJmIIt1y4NXAWadA1F3jJeeE6BtMhgl/CLKozgV/a521pTZB0n
-4JNH2ZPurPZ759KXsaaFN3X/qvePrpJOMAtWVP0y+Z082C6V9WQX/ybSZeKxeGyD
-XWek2K6Ja26zSzWlsQM8IJd57Qv43iWhOlBwQK6eBHWiai8VhFsIw+BVTkfbvHkl
-sC5YDbyqpvLuzea4AoxbALM9RNCmv7PnLp1GcN5F0b15vcDyRwtxKGCRwphzFS20
-sfMCAwEAAaM4MDYwDgYDVR0PAQH/BAQDAgAEMBMGA1UdJQQMMAoGCCsGAQUFBwMB
-MA8GA1UdEwEB/wQFMAMBAf8wCwYJKoZIhvcNAQEFA4IBAQC1Ziyh+HaKO2wGLdUe
-SyVcuG3uDn4JpENYZZPp2mxCLl10P3lhTeVyRdct/XOO4pj+jkrkEW6UXNmEycuh
-HPqV2RXBh3KYLmPfZ00EH9rXKWbsIOq2XXHdvFoWVYePUZ9ABQA7Ie50vDsRmhC6
-tOhebpDDIsrakvj7jnP9aZETSBEBWK70sow4VvClOypkXCWau/2UJzSvtCFMCCM8
-+z8Ibwe4BZ2FHXMO8IP0PJvMqv09+oKk3QEQnRAsxEdkyrS1br5Z0dKharXTCCNJ
-/E/U86VjteE0GZ2MMw+ORwGa6yrry/QaDO6OaNPBjv1Lk/9AjDoRK2KjwacTvSY3
-xYXF
------END CERTIFICATE-----
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 1 (0x1)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Root CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=Root CA
-        Subject Public Key Info:
-            Public Key Algorithm: rsaEncryption
-                Public-Key: (2048 bit)
-                Modulus:
-                    00:e4:2b:91:c7:7d:ab:32:b7:38:e1:38:ae:c8:b9:
-                    0b:15:1c:64:76:47:84:5d:cb:e7:e7:0c:30:77:84:
-                    6a:8e:75:95:42:b2:78:c8:88:10:ac:98:47:97:38:
-                    d1:3a:7f:86:0d:20:f1:1d:70:84:a2:9d:ed:1a:28:
-                    af:5e:43:dd:31:a3:bb:b8:5c:c4:83:79:b8:83:9a:
-                    e7:a9:63:04:59:93:b6:26:67:2d:dd:e6:2d:bb:e4:
-                    13:eb:d5:17:0b:de:63:46:76:6f:10:05:40:b0:16:
-                    fc:ea:f4:97:1c:d6:dc:fe:37:72:d5:40:df:e3:b4:
-                    d5:ac:cf:c9:ae:7c:21:49:01:1e:7e:d4:c1:e1:2a:
-                    11:01:b4:70:3a:31:3d:9a:33:b7:7f:20:f2:8b:e7:
-                    54:8e:06:f2:4b:5f:f0:e2:b9:8f:64:1f:50:bd:b3:
-                    a5:ac:69:44:42:6c:12:e9:11:9d:74:b4:49:77:e3:
-                    0f:8b:9c:94:53:17:0c:23:ba:61:fa:70:3d:93:8d:
-                    ad:5f:dd:4f:32:84:5b:07:50:e4:58:c7:00:45:82:
-                    1f:21:14:4c:bf:43:92:76:fb:24:09:33:df:58:8d:
-                    be:87:ee:b5:54:e4:d3:32:f6:b1:2d:69:74:86:ad:
-                    1f:57:7e:9b:05:11:74:b5:c4:68:ac:9a:80:74:7a:
-                    34:89
-                Exponent: 65537 (0x10001)
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Certificate Sign
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:TRUE
-    Signature Algorithm: sha1WithRSAEncryption
-         96:cd:db:46:6e:5b:de:fa:f1:d3:1c:e0:fe:47:67:2a:59:d5:
-         f8:c4:0b:25:14:0b:06:8d:82:67:f4:a9:36:e8:53:bc:eb:40:
-         51:05:8a:42:09:e7:48:a3:7c:42:6d:c1:37:06:49:cf:58:87:
-         d0:0e:c7:9e:4b:0e:34:72:f8:65:65:b2:c4:68:ca:a3:14:e9:
-         11:5c:da:78:4e:74:80:43:dc:b8:b6:ce:a8:0c:a2:8f:52:59:
-         89:e0:5a:01:e5:e9:b8:4b:31:91:25:bf:7d:e1:7c:86:e9:36:
-         c1:5b:10:e5:2c:cc:6f:99:c4:66:79:30:41:1f:0b:f9:4b:ea:
-         1e:8a:45:73:3c:79:21:20:c8:80:c4:f4:e9:4f:85:69:7c:2e:
-         61:80:3a:4f:5b:92:be:97:12:75:9e:43:09:01:b6:b3:a1:c1:
-         5f:2d:86:be:d1:6c:55:ee:27:f8:bf:3a:bc:fb:b2:42:8a:6f:
-         51:a0:d3:46:54:f6:1e:73:42:2a:95:5e:eb:bc:40:6b:71:bf:
-         90:94:62:f4:90:17:82:e5:1e:33:db:f4:50:11:e5:55:10:09:
-         6a:11:a9:1e:d4:07:60:58:f7:16:b1:bd:8b:29:f6:3d:61:ad:
-         73:da:ae:e3:e4:6e:59:46:7f:c0:fb:fa:be:6d:7c:31:94:86:
-         2e:b3:29:7b
------BEGIN CERTIFICATE-----
-MIIC9zCCAeGgAwIBAgIBATALBgkqhkiG9w0BAQUwJDEQMA4GA1UEChMHQWNtZSBD
-bzEQMA4GA1UEAxMHUm9vdCBDQTAeFw0xMzAxMDExMDAwMDBaFw0yMzEyMzExMDAw
-MDBaMCQxEDAOBgNVBAoTB0FjbWUgQ28xEDAOBgNVBAMTB1Jvb3QgQ0EwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkK5HHfasytzjhOK7IuQsVHGR2R4Rd
-y+fnDDB3hGqOdZVCsnjIiBCsmEeXONE6f4YNIPEdcISine0aKK9eQ90xo7u4XMSD
-ebiDmuepYwRZk7YmZy3d5i275BPr1RcL3mNGdm8QBUCwFvzq9Jcc1tz+N3LVQN/j
-tNWsz8mufCFJAR5+1MHhKhEBtHA6MT2aM7d/IPKL51SOBvJLX/DiuY9kH1C9s6Ws
-aURCbBLpEZ10tEl34w+LnJRTFwwjumH6cD2Tja1f3U8yhFsHUORYxwBFgh8hFEy/
-Q5J2+yQJM99Yjb6H7rVU5NMy9rEtaXSGrR9XfpsFEXS1xGismoB0ejSJAgMBAAGj
-ODA2MA4GA1UdDwEB/wQEAwIABDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHRMB
-Af8EBTADAQH/MAsGCSqGSIb3DQEBBQOCAQEAls3bRm5b3vrx0xzg/kdnKlnV+MQL
-JRQLBo2CZ/SpNuhTvOtAUQWKQgnnSKN8Qm3BNwZJz1iH0A7HnksONHL4ZWWyxGjK
-oxTpEVzaeE50gEPcuLbOqAyij1JZieBaAeXpuEsxkSW/feF8huk2wVsQ5SzMb5nE
-ZnkwQR8L+UvqHopFczx5ISDIgMT06U+FaXwuYYA6T1uSvpcSdZ5DCQG2s6HBXy2G
-vtFsVe4n+L86vPuyQopvUaDTRlT2HnNCKpVe67xAa3G/kJRi9JAXguUeM9v0UBHl
-VRAJahGpHtQHYFj3FrG9iyn2PWGtc9qu4+RuWUZ/wPv6vm18MZSGLrMpew==
------END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/quic_root.crt b/net/data/ssl/certificates/quic_root.crt
deleted file mode 100644
index 730bfcd6..0000000
--- a/net/data/ssl/certificates/quic_root.crt
+++ /dev/null
@@ -1,74 +0,0 @@
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 1 (0x1)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Root CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=Root CA
-        Subject Public Key Info:
-            Public Key Algorithm: rsaEncryption
-                Public-Key: (2048 bit)
-                Modulus:
-                    00:e4:2b:91:c7:7d:ab:32:b7:38:e1:38:ae:c8:b9:
-                    0b:15:1c:64:76:47:84:5d:cb:e7:e7:0c:30:77:84:
-                    6a:8e:75:95:42:b2:78:c8:88:10:ac:98:47:97:38:
-                    d1:3a:7f:86:0d:20:f1:1d:70:84:a2:9d:ed:1a:28:
-                    af:5e:43:dd:31:a3:bb:b8:5c:c4:83:79:b8:83:9a:
-                    e7:a9:63:04:59:93:b6:26:67:2d:dd:e6:2d:bb:e4:
-                    13:eb:d5:17:0b:de:63:46:76:6f:10:05:40:b0:16:
-                    fc:ea:f4:97:1c:d6:dc:fe:37:72:d5:40:df:e3:b4:
-                    d5:ac:cf:c9:ae:7c:21:49:01:1e:7e:d4:c1:e1:2a:
-                    11:01:b4:70:3a:31:3d:9a:33:b7:7f:20:f2:8b:e7:
-                    54:8e:06:f2:4b:5f:f0:e2:b9:8f:64:1f:50:bd:b3:
-                    a5:ac:69:44:42:6c:12:e9:11:9d:74:b4:49:77:e3:
-                    0f:8b:9c:94:53:17:0c:23:ba:61:fa:70:3d:93:8d:
-                    ad:5f:dd:4f:32:84:5b:07:50:e4:58:c7:00:45:82:
-                    1f:21:14:4c:bf:43:92:76:fb:24:09:33:df:58:8d:
-                    be:87:ee:b5:54:e4:d3:32:f6:b1:2d:69:74:86:ad:
-                    1f:57:7e:9b:05:11:74:b5:c4:68:ac:9a:80:74:7a:
-                    34:89
-                Exponent: 65537 (0x10001)
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Certificate Sign
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:TRUE
-    Signature Algorithm: sha1WithRSAEncryption
-         96:cd:db:46:6e:5b:de:fa:f1:d3:1c:e0:fe:47:67:2a:59:d5:
-         f8:c4:0b:25:14:0b:06:8d:82:67:f4:a9:36:e8:53:bc:eb:40:
-         51:05:8a:42:09:e7:48:a3:7c:42:6d:c1:37:06:49:cf:58:87:
-         d0:0e:c7:9e:4b:0e:34:72:f8:65:65:b2:c4:68:ca:a3:14:e9:
-         11:5c:da:78:4e:74:80:43:dc:b8:b6:ce:a8:0c:a2:8f:52:59:
-         89:e0:5a:01:e5:e9:b8:4b:31:91:25:bf:7d:e1:7c:86:e9:36:
-         c1:5b:10:e5:2c:cc:6f:99:c4:66:79:30:41:1f:0b:f9:4b:ea:
-         1e:8a:45:73:3c:79:21:20:c8:80:c4:f4:e9:4f:85:69:7c:2e:
-         61:80:3a:4f:5b:92:be:97:12:75:9e:43:09:01:b6:b3:a1:c1:
-         5f:2d:86:be:d1:6c:55:ee:27:f8:bf:3a:bc:fb:b2:42:8a:6f:
-         51:a0:d3:46:54:f6:1e:73:42:2a:95:5e:eb:bc:40:6b:71:bf:
-         90:94:62:f4:90:17:82:e5:1e:33:db:f4:50:11:e5:55:10:09:
-         6a:11:a9:1e:d4:07:60:58:f7:16:b1:bd:8b:29:f6:3d:61:ad:
-         73:da:ae:e3:e4:6e:59:46:7f:c0:fb:fa:be:6d:7c:31:94:86:
-         2e:b3:29:7b
------BEGIN CERTIFICATE-----
-MIIC9zCCAeGgAwIBAgIBATALBgkqhkiG9w0BAQUwJDEQMA4GA1UEChMHQWNtZSBD
-bzEQMA4GA1UEAxMHUm9vdCBDQTAeFw0xMzAxMDExMDAwMDBaFw0yMzEyMzExMDAw
-MDBaMCQxEDAOBgNVBAoTB0FjbWUgQ28xEDAOBgNVBAMTB1Jvb3QgQ0EwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkK5HHfasytzjhOK7IuQsVHGR2R4Rd
-y+fnDDB3hGqOdZVCsnjIiBCsmEeXONE6f4YNIPEdcISine0aKK9eQ90xo7u4XMSD
-ebiDmuepYwRZk7YmZy3d5i275BPr1RcL3mNGdm8QBUCwFvzq9Jcc1tz+N3LVQN/j
-tNWsz8mufCFJAR5+1MHhKhEBtHA6MT2aM7d/IPKL51SOBvJLX/DiuY9kH1C9s6Ws
-aURCbBLpEZ10tEl34w+LnJRTFwwjumH6cD2Tja1f3U8yhFsHUORYxwBFgh8hFEy/
-Q5J2+yQJM99Yjb6H7rVU5NMy9rEtaXSGrR9XfpsFEXS1xGismoB0ejSJAgMBAAGj
-ODA2MA4GA1UdDwEB/wQEAwIABDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHRMB
-Af8EBTADAQH/MAsGCSqGSIb3DQEBBQOCAQEAls3bRm5b3vrx0xzg/kdnKlnV+MQL
-JRQLBo2CZ/SpNuhTvOtAUQWKQgnnSKN8Qm3BNwZJz1iH0A7HnksONHL4ZWWyxGjK
-oxTpEVzaeE50gEPcuLbOqAyij1JZieBaAeXpuEsxkSW/feF8huk2wVsQ5SzMb5nE
-ZnkwQR8L+UvqHopFczx5ISDIgMT06U+FaXwuYYA6T1uSvpcSdZ5DCQG2s6HBXy2G
-vtFsVe4n+L86vPuyQopvUaDTRlT2HnNCKpVe67xAa3G/kJRi9JAXguUeM9v0UBHl
-VRAJahGpHtQHYFj3FrG9iyn2PWGtc9qu4+RuWUZ/wPv6vm18MZSGLrMpew==
------END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/quic_test.example.com.crt b/net/data/ssl/certificates/quic_test.example.com.crt
deleted file mode 100644
index b812338..0000000
--- a/net/data/ssl/certificates/quic_test.example.com.crt
+++ /dev/null
@@ -1,77 +0,0 @@
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 3 (0x3)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Intermediate CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=Leaf certificate
-        Subject Public Key Info:
-            Public Key Algorithm: rsaEncryption
-                Public-Key: (2048 bit)
-                Modulus:
-                    00:d5:ca:19:79:8e:a9:ab:46:f0:4e:b7:58:6d:b3:
-                    a3:9a:68:10:52:af:f0:00:94:ae:34:bd:b4:50:1f:
-                    a3:26:a4:9e:1c:90:37:5b:3d:e8:d7:3b:bc:93:fb:
-                    00:fb:c7:49:54:9b:f1:d0:9a:f2:51:84:7b:59:8b:
-                    bd:66:f3:ae:92:5a:b9:63:8c:64:a7:d0:9e:e3:0c:
-                    50:d2:cf:93:9d:e9:4a:11:57:93:c1:de:af:7b:5a:
-                    44:1d:0a:8c:22:a6:1d:c6:ad:e9:8f:16:8d:4e:91:
-                    f1:d3:f1:f3:82:fe:f6:55:dc:72:f1:11:07:75:ec:
-                    bb:e9:3a:35:87:43:81:5e:dc:43:4a:b7:7c:a1:1a:
-                    d5:d2:c1:40:39:69:7d:89:ad:64:1b:31:34:a8:ea:
-                    9e:5e:26:fc:71:d2:c6:6b:e5:c2:73:30:3f:59:a7:
-                    35:8d:a9:a5:e9:3d:43:41:bd:54:f2:2a:e1:15:0c:
-                    35:30:6b:8b:f2:77:ca:5c:07:8f:58:f4:54:77:5e:
-                    af:ce:b1:c1:2b:a7:bb:c0:e9:7d:ef:1a:d7:03:ee:
-                    8f:67:ad:c6:e6:1d:a9:e7:91:3f:41:e7:d6:86:20:
-                    8c:53:b3:d8:79:09:e2:4b:15:5a:d8:92:3b:62:4f:
-                    68:e4:cb:d0:a4:4e:b6:7d:3e:5f:b0:24:ea:62:61:
-                    cf:7b
-                Exponent: 65537 (0x10001)
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Digital Signature, Key Encipherment
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:FALSE
-            X509v3 Subject Alternative Name: 
-                DNS:test.example.com
-    Signature Algorithm: sha1WithRSAEncryption
-         58:c3:dc:e3:4d:ec:76:c6:62:99:ba:ba:6d:da:e4:2f:ec:00:
-         f8:fb:2a:e3:f6:a4:bc:37:c9:53:0f:73:2e:a6:79:8f:6b:ef:
-         87:16:56:7b:9e:6d:ac:1a:ec:8b:49:71:7d:f2:11:11:a4:0d:
-         5e:6e:be:93:6b:fe:cb:44:1b:4e:99:2a:d2:eb:d8:91:80:d7:
-         c8:87:fd:c8:fa:cf:c2:68:06:07:2d:60:ae:56:c4:3c:49:4d:
-         e3:05:3f:1b:15:a8:a9:ea:85:d8:af:d3:f5:be:b5:71:28:23:
-         8d:04:f1:c6:e1:fb:0c:1b:ac:5a:2d:e0:7f:fb:4e:79:47:29:
-         b3:9c:27:09:7d:3c:84:0b:59:0a:03:c5:86:a9:aa:90:49:89:
-         0b:bc:8e:0e:2e:b1:67:ed:99:be:37:ee:75:7f:a9:fa:62:95:
-         44:02:1c:99:26:fa:a7:17:61:d2:ec:e1:ca:42:2b:69:97:8f:
-         71:dc:1b:41:7b:91:a8:d6:b2:82:05:ef:d0:0b:3c:46:a3:9d:
-         7c:06:81:da:de:b6:54:ad:97:bd:c2:03:02:ff:1b:64:17:25:
-         4a:4c:9b:85:c1:bb:6f:26:3a:b5:ba:9b:2d:17:b9:bd:36:b1:
-         43:48:29:f7:da:88:8d:ce:f0:ac:7f:03:a7:93:e1:e9:c1:58:
-         15:b3:30:22
------BEGIN CERTIFICATE-----
-MIIDIjCCAgygAwIBAgIBAzALBgkqhkiG9w0BAQUwLDEQMA4GA1UEChMHQWNtZSBD
-bzEYMBYGA1UEAxMPSW50ZXJtZWRpYXRlIENBMB4XDTEzMDEwMTEwMDAwMFoXDTIz
-MTIzMTEwMDAwMFowLTEQMA4GA1UEChMHQWNtZSBDbzEZMBcGA1UEAxMQTGVhZiBj
-ZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXKGXmO
-qatG8E63WG2zo5poEFKv8ACUrjS9tFAfoyaknhyQN1s96Nc7vJP7APvHSVSb8dCa
-8lGEe1mLvWbzrpJauWOMZKfQnuMMUNLPk53pShFXk8Her3taRB0KjCKmHcat6Y8W
-jU6R8dPx84L+9lXccvERB3Xsu+k6NYdDgV7cQ0q3fKEa1dLBQDlpfYmtZBsxNKjq
-nl4m/HHSxmvlwnMwP1mnNY2ppek9Q0G9VPIq4RUMNTBri/J3ylwHj1j0VHder86x
-wSunu8Dpfe8a1wPuj2etxuYdqeeRP0Hn1oYgjFOz2HkJ4ksVWtiSO2JPaOTL0KRO
-tn0+X7Ak6mJhz3sCAwEAAaNSMFAwDgYDVR0PAQH/BAQDAgCgMBMGA1UdJQQMMAoG
-CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwGwYDVR0RBBQwEoIQdGVzdC5leGFtcGxl
-LmNvbTALBgkqhkiG9w0BAQUDggEBAFjD3ONN7HbGYpm6um3a5C/sAPj7KuP2pLw3
-yVMPcy6meY9r74cWVnuebawa7ItJcX3yERGkDV5uvpNr/stEG06ZKtLr2JGA18iH
-/cj6z8JoBgctYK5WxDxJTeMFPxsVqKnqhdiv0/W+tXEoI40E8cbh+wwbrFot4H/7
-TnlHKbOcJwl9PIQLWQoDxYapqpBJiQu8jg4usWftmb437nV/qfpilUQCHJkm+qcX
-YdLs4cpCK2mXj3HcG0F7kajWsoIF79ALPEajnXwGgdretlStl73CAwL/G2QXJUpM
-m4XBu28mOrW6my0Xub02sUNIKffaiI3O8Kx/A6eT4enBWBWzMCI=
------END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/quic_test.example.com.key b/net/data/ssl/certificates/quic_test.example.com.key
deleted file mode 100644
index 9449ec67..0000000
--- a/net/data/ssl/certificates/quic_test.example.com.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEA1coZeY6pq0bwTrdYbbOjmmgQUq/wAJSuNL20UB+jJqSeHJA3
-Wz3o1zu8k/sA+8dJVJvx0JryUYR7WYu9ZvOuklq5Y4xkp9Ce4wxQ0s+TnelKEVeT
-wd6ve1pEHQqMIqYdxq3pjxaNTpHx0/Hzgv72Vdxy8REHdey76To1h0OBXtxDSrd8
-oRrV0sFAOWl9ia1kGzE0qOqeXib8cdLGa+XCczA/Wac1jaml6T1DQb1U8irhFQw1
-MGuL8nfKXAePWPRUd16vzrHBK6e7wOl97xrXA+6PZ63G5h2p55E/QefWhiCMU7PY
-eQniSxVa2JI7Yk9o5MvQpE62fT5fsCTqYmHPewIDAQABAoIBABIwh8pX4Qe5mWiZ
-IOT0i87vW7QtU/Y4sDm8ikLm7jKzfuBfRNZ2hgEKDBlrGcJSSmLwgbqF9GgLJZOQ
-2CSSRyAcp/lYUJgWn+4hdh75mk2tM6gWE3RDRhrwqyrtYs7v40isM1sBSDSPJkwq
-IdXba4oSn5TzJfdalQJa+YLws2kmnKL2cHvHJudazeV3JScfqOkjjYT1HZVFiech
-KQOJo1d3guvyLzzqDJq/BkUvaAQepJu8oXGhq0lApXPit5aRRft4Fw+ewAbU9t7r
-KzRp7YusZ1EQ2A5vn1F9o/JGRERL42BqwjRqfhHnK084Y4GhbpMrMkV0ae5i7xhK
-npKHXIECgYEA5tW5imZhPtBWSSA1w+MTIoqXPrK3eirmgmHSeYtMbfcUwuSiQOXk
-pqEJ9PoVmvNOuQPdbR4kfLuPUJecT+qEMPJAN3aWZYmSUi/6O1fml6DDvf0dx/LW
-4mZ9Mu3DGGmK+zxplwv4IkkOWIu6hPsioyoMd+QxhIk2o7eBViev7IkCgYEA7Rip
-T8k/5PFxs99OasNlu3fJxRbEeJEiZaW21gcK36LosNITgEQs3r2Q6us0hsfUCvEr
-+QAjNOk6zsUlTbJYymshStBPh3OTf2zYwg8SXfuAoFDYTNk2uML2alvBRkIKYSVV
-J2Lv2GoYxE1oTIgBDj3Jv4+xPZPx0AYmYsa6AuMCgYAd8wbirQva8X7wd+xh4Plf
-lumuqdNiV2SW8Ag12tvsvI0GCFIA55L2B5jaHwRkmULSgGzfNnT3dgJPK4yNVdkW
-3Kd2Sr2SqPnCDhWCU5JIhARBhzCw+5Hjx/ZggDa62R6+IAV3IodsM1xYIrDthgPl
-dZQujf3au07KiQmP2xBZOQKBgQDACJ5xwgXfT/ORBYgFDxgh2+bvm/4rzRl4DN1m
-wrN66P7g4HXtCMry6cUrkK+tjsJeznGYLxVU8Kax/Jm3MYGbCWQgrVIM2n6X0bhK
-jVyKBH9s2a4nqDMbOMXO5VxIpIq1nkA3M3oh5eUDcdLNUcbRGxiB8EdVIbPUknaa
-wGy+kwKBgQDE90KVnTzZQ6D20pAAvYaFCGkWUvKzf/C7NZcGH+UcWok3BCrkNiGK
-YTEbEs6h26Q8S7Vm7FiRnfVQEW4HPFuQ8wpnYrYFJbfRbGsG8agxju25Kg+EBJGU
-uu83oQ8zNiK/LMtNEGcQotXSVxAUdg1AoS5p1UX9cgmM9MZhkkbJIw==
------END RSA PRIVATE KEY-----
diff --git a/net/data/ssl/certificates/quic_test.example.com.key.pkcs8 b/net/data/ssl/certificates/quic_test.example.com.key.pkcs8
deleted file mode 100644
index 5f341e5..0000000
--- a/net/data/ssl/certificates/quic_test.example.com.key.pkcs8
+++ /dev/null
Binary files differ
diff --git a/net/data/ssl/certificates/quic_test.example.com.key.pkcs8.pem b/net/data/ssl/certificates/quic_test.example.com.key.pkcs8.pem
deleted file mode 100644
index e52b455f..0000000
--- a/net/data/ssl/certificates/quic_test.example.com.key.pkcs8.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVyhl5jqmrRvBO
-t1hts6OaaBBSr/AAlK40vbRQH6MmpJ4ckDdbPejXO7yT+wD7x0lUm/HQmvJRhHtZ
-i71m866SWrljjGSn0J7jDFDSz5Od6UoRV5PB3q97WkQdCowiph3GremPFo1OkfHT
-8fOC/vZV3HLxEQd17LvpOjWHQ4Fe3ENKt3yhGtXSwUA5aX2JrWQbMTSo6p5eJvxx
-0sZr5cJzMD9ZpzWNqaXpPUNBvVTyKuEVDDUwa4vyd8pcB49Y9FR3Xq/OscErp7vA
-6X3vGtcD7o9nrcbmHannkT9B59aGIIxTs9h5CeJLFVrYkjtiT2jky9CkTrZ9Pl+w
-JOpiYc97AgMBAAECggEAEjCHylfhB7mZaJkg5PSLzu9btC1T9jiwObyKQubuMrN+
-4F9E1naGAQoMGWsZwlJKYvCBuoX0aAslk5DYJJJHIByn+VhQmBaf7iF2HvmaTa0z
-qBYTdENGGvCrKu1izu/jSKwzWwFINI8mTCoh1dtrihKflPMl91qVAlr5gvCzaSac
-ovZwe8cm51rN5XclJx+o6SONhPUdlUWJ5yEpA4mjV3eC6/IvPOoMmr8GRS9oBB6k
-m7yhcaGrSUClc+K3lpFF+3gXD57ABtT23usrNGnti6xnURDYDm+fUX2j8kZEREvj
-YGrCNGp+EecrTzhjgaFukysyRXRp7mLvGEqekodcgQKBgQDm1bmKZmE+0FZJIDXD
-4xMiipc+srd6KuaCYdJ5i0xt9xTC5KJA5eSmoQn0+hWa8065A91tHiR8u49Ql5xP
-6oQw8kA3dpZliZJSL/o7V+aXoMO9/R3H8tbiZn0y7cMYaYr7PGmXC/giSQ5Yi7qE
-+yKjKgx35DGEiTajt4FWJ6/siQKBgQDtGKlPyT/k8XGz305qw2W7d8nFFsR4kSJl
-pbbWBwrfouiw0hOARCzevZDq6zSGx9QK8Sv5ACM06TrOxSVNsljKayFK0E+Hc5N/
-bNjCDxJd+4CgUNhM2Ta4wvZqW8FGQgphJVUnYu/YahjETWhMiAEOPcm/j7E9k/HQ
-BiZixroC4wKBgB3zBuKtC9rxfvB37GHg+V+W6a6p02JXZJbwCDXa2+y8jQYIUgDn
-kvYHmNofBGSZQtKAbN82dPd2Ak8rjI1V2Rbcp3ZKvZKo+cIOFYJTkkiEBEGHMLD7
-kePH9mCANrrZHr4gBXcih2wzXFgisO2GA+V1lC6N/dq7TsqJCY/bEFk5AoGBAMAI
-nnHCBd9P85EFiAUPGCHb5u+b/ivNGXgM3WbCs3ro/uDgde0IyvLpxSuQr62Owl7O
-cZgvFVTwprH8mbcxgZsJZCCtUgzafpfRuEqNXIoEf2zZrieoMxs4xc7lXEikirWe
-QDczeiHl5QNx0s1RxtEbGIHwR1Uhs9SSdprAbL6TAoGBAMT3QpWdPNlDoPbSkAC9
-hoUIaRZS8rN/8Ls1lwYf5RxaiTcEKuQ2IYphMRsSzqHbpDxLtWbsWJGd9VARbgc8
-W5DzCmditgUlt9FsawbxqDGO7bkqD4QEkZS67zehDzM2Ir8sy00QZxCi1dJXEBR2
-DUChLmnVRf1yCYz0xmGSRskj
------END PRIVATE KEY-----
diff --git a/net/data/ssl/certificates/quic_test_ecc.example.com.crt b/net/data/ssl/certificates/quic_test_ecc.example.com.crt
deleted file mode 100644
index ff8a18de..0000000
--- a/net/data/ssl/certificates/quic_test_ecc.example.com.crt
+++ /dev/null
@@ -1,60 +0,0 @@
-Certificate:
-    Data:
-        Version: 3 (0x2)
-        Serial Number: 4 (0x4)
-    Signature Algorithm: sha1WithRSAEncryption
-        Issuer: O=Acme Co, CN=Intermediate CA
-        Validity
-            Not Before: Jan  1 10:00:00 2013 GMT
-            Not After : Dec 31 10:00:00 2023 GMT
-        Subject: O=Acme Co, CN=ECDSA Leaf certificate
-        Subject Public Key Info:
-            Public Key Algorithm: id-ecPublicKey
-                Public-Key: (256 bit)
-                pub: 
-                    04:05:26:22:0e:77:27:83:00:d0:6b:c0:86:af:f4:
-                    f9:99:a8:28:a2:ed:5c:c7:5a:dc:29:72:79:4b:ef:
-                    e8:85:aa:3a:9b:84:3d:e3:21:b3:6b:0a:79:52:89:
-                    ce:bf:f1:a5:42:8b:ad:5e:34:66:5c:e5:e3:6d:aa:
-                    d0:8f:b3:ff:d8
-                ASN1 OID: prime256v1
-        X509v3 extensions:
-            X509v3 Key Usage: critical
-                Digital Signature
-            X509v3 Extended Key Usage: 
-                TLS Web Server Authentication
-            X509v3 Basic Constraints: critical
-                CA:FALSE
-            X509v3 Subject Alternative Name: 
-                DNS:test.example.com
-    Signature Algorithm: sha1WithRSAEncryption
-         40:cb:4b:4f:63:13:8a:4e:b9:76:f6:01:82:f1:29:6d:64:d5:
-         ab:87:2f:5f:4f:e9:97:f7:0d:1c:95:f1:c1:7e:9e:26:c1:f8:
-         b5:6c:5c:7d:7a:54:95:96:0c:ad:72:27:e5:47:2d:13:11:0e:
-         56:d7:37:0e:9b:ea:1e:93:dc:78:e4:12:3b:bd:d5:21:44:92:
-         cb:bf:f1:36:f5:67:3a:85:92:78:da:1b:c6:01:04:4e:6d:a7:
-         1b:0e:3b:96:59:a2:da:96:db:8e:97:be:dc:f0:7e:54:3b:12:
-         3a:e9:44:a0:56:e4:a5:9f:f4:58:7a:22:b9:85:be:b7:ad:51:
-         05:95:70:ba:d0:69:11:f1:2d:47:32:98:bf:e8:1c:9d:f9:19:
-         29:f8:17:72:30:bb:3d:4a:d7:f5:cc:50:55:14:a9:6b:37:e7:
-         08:f2:b6:87:4d:d8:3d:fb:eb:0d:45:3b:bc:3c:c1:92:2d:69:
-         17:39:4b:b4:ff:04:21:ec:cc:74:ff:37:b4:6d:6f:b1:5d:89:
-         9c:32:ee:99:60:52:87:15:8f:b7:50:ba:2d:f5:fd:11:f1:f8:
-         38:94:b6:db:7f:cb:fa:2f:d1:41:26:cc:fa:ec:4d:49:ed:d8:
-         a8:8a:13:e7:14:32:6a:c6:6a:66:c9:5b:81:92:ca:cf:b4:7c:
-         c8:91:cc:a8
------BEGIN CERTIFICATE-----
-MIICXTCCAUegAwIBAgIBBDALBgkqhkiG9w0BAQUwLDEQMA4GA1UEChMHQWNtZSBD
-bzEYMBYGA1UEAxMPSW50ZXJtZWRpYXRlIENBMB4XDTEzMDEwMTEwMDAwMFoXDTIz
-MTIzMTEwMDAwMFowMzEQMA4GA1UEChMHQWNtZSBDbzEfMB0GA1UEAxMWRUNEU0Eg
-TGVhZiBjZXJ0aWZpY2F0ZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAUmIg53
-J4MA0GvAhq/0+ZmoKKLtXMda3ClyeUvv6IWqOpuEPeMhs2sKeVKJzr/xpUKLrV40
-Zlzl422q0I+z/9ijUjBQMA4GA1UdDwEB/wQEAwIAgDATBgNVHSUEDDAKBggrBgEF
-BQcDATAMBgNVHRMBAf8EAjAAMBsGA1UdEQQUMBKCEHRlc3QuZXhhbXBsZS5jb20w
-CwYJKoZIhvcNAQEFA4IBAQBAy0tPYxOKTrl29gGC8SltZNWrhy9fT+mX9w0clfHB
-fp4mwfi1bFx9elSVlgytciflRy0TEQ5W1zcOm+oek9x45BI7vdUhRJLLv/E29Wc6
-hZJ42hvGAQRObacbDjuWWaLaltuOl77c8H5UOxI66USgVuSln/RYeiK5hb63rVEF
-lXC60GkR8S1HMpi/6Byd+Rkp+BdyMLs9Stf1zFBVFKlrN+cI8raHTdg9++sNRTu8
-PMGSLWkXOUu0/wQh7Mx0/ze0bW+xXYmcMu6ZYFKHFY+3ULot9f0R8fg4lLbbf8v6
-L9FBJsz67E1J7dioihPnFDJqxmpmyVuBksrPtHzIkcyo
------END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/quic_test_ecc.example.com.key b/net/data/ssl/certificates/quic_test_ecc.example.com.key
deleted file mode 100644
index 0e2f2763..0000000
--- a/net/data/ssl/certificates/quic_test_ecc.example.com.key
+++ /dev/null
@@ -1,5 +0,0 @@
------BEGIN EC PRIVATE KEY-----
-MHcCAQEEIPqnEQNfDLijySw1wwD3RNPQvgPyAPvaZarw327ZM2lwoAoGCCqGSM49
-AwEHoUQDQgAEBSYiDncngwDQa8CGr/T5magoou1cx1rcKXJ5S+/ohao6m4Q94yGz
-awp5UonOv/GlQoutXjRmXOXjbarQj7P/2A==
------END EC PRIVATE KEY-----
diff --git a/net/data/ssl/certificates/quic_test_ecc.example.com.sct b/net/data/ssl/certificates/quic_test_ecc.example.com.sct
deleted file mode 100644
index 3758265..0000000
--- a/net/data/ssl/certificates/quic_test_ecc.example.com.sct
+++ /dev/null
Binary files differ
diff --git a/net/data/ssl/scripts/generate-quic-chain.sh b/net/data/ssl/scripts/generate-quic-chain.sh
index 84c0bb4c..7d83dc4 100755
--- a/net/data/ssl/scripts/generate-quic-chain.sh
+++ b/net/data/ssl/scripts/generate-quic-chain.sh
@@ -91,6 +91,7 @@
     -extensions user_cert

 

 # Copy to the file names that are actually checked in.

-try openssl pkcs8 -topk8 -inform pem -outform der -in out/quic-test-cert.key -out ../certificates/quic-cert.key -nocrypt

+try openssl pkcs8 -topk8 -inform pem -outform der -in out/quic-test-cert.key -out ../certificates/quic-leaf-cert.key -nocrypt

 try cat out/quic-test-cert.pem out/quic-test-intermediate.pem > ../certificates/quic-chain.pem

 try cp out/quic-test-root.pem ../certificates/quic-root.pem

+try openssl pkcs8 -nocrypt -inform der -outform pem -in ../certificates/quic-leaf-cert.key -out ../certificates/quic-leaf-cert.key.pkcs8.pem

diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index b10e408..4a4dabb 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -86,6 +86,16 @@
   ServerNetworkStats server_network_stats;
 };
 
+QuicServerId QuicServerIdFromString(const std::string& str) {
+  GURL url(str);
+  if (!url.is_valid()) {
+    return QuicServerId();
+  }
+  return QuicServerId(HostPortPair::FromURL(url), url.path_piece() == "/private"
+                                                      ? PRIVACY_MODE_ENABLED
+                                                      : PRIVACY_MODE_DISABLED);
+}
+
 }  // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -928,9 +938,8 @@
        it.Advance()) {
     // Get quic_server_id.
     const std::string& quic_server_id_str = it.key();
-    QuicServerId quic_server_id;
-    QuicHostnameUtils::StringToQuicServerId(quic_server_id_str,
-                                            &quic_server_id);
+
+    QuicServerId quic_server_id = QuicServerIdFromString(quic_server_id_str);
     if (quic_server_id.host().empty()) {
       DVLOG(1) << "Malformed http_server_properties for quic server: "
                << quic_server_id_str;
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index 91dafc0..40f3e03 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -374,10 +374,7 @@
 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
         gin::V8Initializer::LoadV8Snapshot();
         gin::V8Initializer::LoadV8Natives();
-#ifdef USE_V8_CONTEXT_SNAPSHOT
-        gin::V8Initializer::LoadV8ContextSnapshot();
-#endif  // USE_V8_CONTEXT_SNAPSHOT
-#endif  // V8_USE_EXTERNAL_STARTUP_DATA
+#endif
 
         // The performance of the proxy resolver is limited by DNS resolution,
         // and not V8, so tune down V8 to use as little memory as possible.
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
index 6695479..696efbb 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
@@ -127,7 +127,7 @@
   }
 
   scoped_refptr<X509Certificate> GetTestServerCertificate() {
-    static const char kTestCert[] = "quic_test.example.com.crt";
+    static const char kTestCert[] = "quic-chain.pem";
     return ImportCertFromFile(GetTestCertsDirectory(), kTestCert);
   }
 
@@ -143,9 +143,9 @@
   std::string GetTestSignature() {
     ProofSourceChromium source;
     source.Initialize(
-        GetTestCertsDirectory().AppendASCII("quic_test.example.com.crt"),
-        GetTestCertsDirectory().AppendASCII("quic_test.example.com.key.pkcs8"),
-        GetTestCertsDirectory().AppendASCII("quic_test.example.com.key.sct"));
+        GetTestCertsDirectory().AppendASCII("quic-chain.pem"),
+        GetTestCertsDirectory().AppendASCII("quic-leaf-cert.key"),
+        base::FilePath());
     std::string signature;
     source.GetProof(QuicSocketAddress(), kTestHostname, kTestConfig,
                     QUIC_VERSION_35, kTestChloHash,
diff --git a/net/quic/chromium/crypto_test_utils_chromium.cc b/net/quic/chromium/crypto_test_utils_chromium.cc
index 238822c8..4ced45f 100644
--- a/net/quic/chromium/crypto_test_utils_chromium.cc
+++ b/net/quic/chromium/crypto_test_utils_chromium.cc
@@ -82,9 +82,9 @@
   std::unique_ptr<ProofSourceChromium> source(new ProofSourceChromium());
   base::FilePath certs_dir = GetTestCertsDirectory();
   CHECK(source->Initialize(
-      certs_dir.AppendASCII("quic_chain.crt"),
-      certs_dir.AppendASCII("quic_test.example.com.key.pkcs8"),
-      certs_dir.AppendASCII("quic_test.example.com.key.sct")));
+      certs_dir.AppendASCII("quic-chain.pem"),
+      certs_dir.AppendASCII("quic-leaf-cert.key"),
+      certs_dir.AppendASCII("quic-leaf-cert.key.sct")));
   return std::move(source);
 }
 
@@ -93,17 +93,13 @@
   std::unique_ptr<MockCertVerifier> cert_verifier(new MockCertVerifier());
   net::CertVerifyResult verify_result;
   verify_result.verified_cert =
-      ImportCertFromFile(GetTestCertsDirectory(), "quic_test.example.com.crt");
-  cert_verifier->AddResultForCertAndHost(verify_result.verified_cert.get(),
-                                         "test.example.com", verify_result, OK);
-  verify_result.verified_cert = ImportCertFromFile(
-      GetTestCertsDirectory(), "quic_test_ecc.example.com.crt");
+      ImportCertFromFile(GetTestCertsDirectory(), "quic-chain.pem");
   cert_verifier->AddResultForCertAndHost(verify_result.verified_cert.get(),
                                          "test.example.com", verify_result, OK);
   return std::make_unique<TestProofVerifierChromium>(
       std::move(cert_verifier), std::make_unique<TransportSecurityState>(),
       std::make_unique<MultiLogCTVerifier>(),
-      std::make_unique<CTPolicyEnforcer>(), "quic_root.crt");
+      std::make_unique<CTPolicyEnforcer>(), "quic-root.pem");
 }
 
 ProofVerifyContext* ProofVerifyContextForTesting() {
diff --git a/net/quic/chromium/quic_end_to_end_unittest.cc b/net/quic/chromium/quic_end_to_end_unittest.cc
index 97a8147..0d04152 100644
--- a/net/quic/chromium/quic_end_to_end_unittest.cc
+++ b/net/quic/chromium/quic_end_to_end_unittest.cc
@@ -132,12 +132,7 @@
 
     CertVerifyResult verify_result;
     verify_result.verified_cert = ImportCertFromFile(
-        GetTestCertsDirectory(), "quic_test.example.com.crt");
-    cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
-                                           "test.example.com", verify_result,
-                                           OK);
-    verify_result.verified_cert = ImportCertFromFile(
-        GetTestCertsDirectory(), "quic_test_ecc.example.com.crt");
+        GetTestCertsDirectory(), "quic-chain.pem");
     cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
                                            "test.example.com", verify_result,
                                            OK);
diff --git a/net/quic/core/quic_server_id.h b/net/quic/core/quic_server_id.h
index 880afd2..d7cb609b 100644
--- a/net/quic/core/quic_server_id.h
+++ b/net/quic/core/quic_server_id.h
@@ -5,8 +5,7 @@
 #ifndef NET_QUIC_CORE_QUIC_SERVER_ID_H_
 #define NET_QUIC_CORE_QUIC_SERVER_ID_H_
 
-#include <stdint.h>
-
+#include <cstdint>
 #include <string>
 
 #include "net/base/host_port_pair.h"
diff --git a/net/quic/core/quic_server_id_test.cc b/net/quic/core/quic_server_id_test.cc
index abf05a3..22dd95b2 100644
--- a/net/quic/core/quic_server_id_test.cc
+++ b/net/quic/core/quic_server_id_test.cc
@@ -26,6 +26,16 @@
   EXPECT_EQ("https://google.com:10/private", private_server_id_str);
 }
 
+TEST_F(QuicServerIdTest, HostPortPair) {
+  HostPortPair google_host_port_pair("google.com", 10);
+
+  QuicServerId google_server_id(google_host_port_pair, PRIVACY_MODE_DISABLED);
+  EXPECT_TRUE(google_host_port_pair.Equals(google_server_id.host_port_pair()));
+
+  QuicServerId private_server_id(google_host_port_pair, PRIVACY_MODE_ENABLED);
+  EXPECT_TRUE(google_host_port_pair.Equals(private_server_id.host_port_pair()));
+}
+
 TEST_F(QuicServerIdTest, LessThan) {
   QuicServerId a_10_https(HostPortPair("a.com", 10), PRIVACY_MODE_DISABLED);
   QuicServerId a_11_https(HostPortPair("a.com", 11), PRIVACY_MODE_DISABLED);
diff --git a/net/quic/core/quic_utils.cc b/net/quic/core/quic_utils.cc
index 1fb7800..109f376 100644
--- a/net/quic/core/quic_utils.cc
+++ b/net/quic/core/quic_utils.cc
@@ -6,10 +6,7 @@
 
 #include <algorithm>
 #include <cstdint>
-#include <vector>
 
-#include "base/containers/adapters.h"
-#include "base/logging.h"
 #include "net/quic/core/quic_constants.h"
 #include "net/quic/platform/api/quic_aligned.h"
 #include "net/quic/platform/api/quic_bug_tracker.h"
@@ -239,9 +236,9 @@
   // generally, the iov_offset is not 0, input iov consists of 2K buffers and
   // the output buffer is ~1.4K.
   if (copy_len == iov_available && iovnum + 1 < iov_count) {
+    char* next_base = static_cast<char*>(iov[iovnum + 1].iov_base);
     // Prefetch 2 cachelines worth of data to get the prefetcher started; leave
     // it to the hardware prefetcher after that.
-    char* next_base = static_cast<char*>(iov[iovnum + 1].iov_base);
     QuicPrefetchT0(next_base);
     if (iov[iovnum + 1].iov_len >= 64) {
       QuicPrefetchT0(next_base + QUIC_CACHELINE_SIZE);
diff --git a/net/quic/platform/api/quic_hostname_utils.cc b/net/quic/platform/api/quic_hostname_utils.cc
index 2f5e65d..c7bbf27 100644
--- a/net/quic/platform/api/quic_hostname_utils.cc
+++ b/net/quic/platform/api/quic_hostname_utils.cc
@@ -18,10 +18,4 @@
   return QuicHostnameUtilsImpl::NormalizeHostname(hostname);
 }
 
-// static
-void QuicHostnameUtils::StringToQuicServerId(const string& str,
-                                             QuicServerId* out) {
-  QuicHostnameUtilsImpl::StringToQuicServerId(str, out);
-}
-
 }  // namespace net
diff --git a/net/quic/platform/api/quic_hostname_utils.h b/net/quic/platform/api/quic_hostname_utils.h
index 9c46d68..382d93a 100644
--- a/net/quic/platform/api/quic_hostname_utils.h
+++ b/net/quic/platform/api/quic_hostname_utils.h
@@ -12,8 +12,6 @@
 
 namespace net {
 
-class QuicServerId;
-
 class QUIC_EXPORT_PRIVATE QuicHostnameUtils {
  public:
   // Returns true if the sni is valid, false otherwise.
@@ -26,10 +24,6 @@
   // WARNING: mutates |hostname| in place and returns |hostname|.
   static char* NormalizeHostname(char* hostname);
 
-  // Creates a QuicServerId from a string formatted in same manner as
-  // QuicServerId::ToString().
-  static void StringToQuicServerId(const std::string& str, QuicServerId* out);
-
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicHostnameUtils);
 };
diff --git a/net/quic/platform/impl/quic_hostname_utils_impl.cc b/net/quic/platform/impl/quic_hostname_utils_impl.cc
index 040a724c..750b3d4 100644
--- a/net/quic/platform/impl/quic_hostname_utils_impl.cc
+++ b/net/quic/platform/impl/quic_hostname_utils_impl.cc
@@ -48,17 +48,4 @@
   return hostname;
 }
 
-// static
-void QuicHostnameUtilsImpl::StringToQuicServerId(const string& str,
-                                                 QuicServerId* out) {
-  GURL url(str);
-  if (!url.is_valid()) {
-    *out = QuicServerId();
-    return;
-  }
-  *out = QuicServerId(HostPortPair::FromURL(url), url.path_piece() == "/private"
-                                                      ? PRIVACY_MODE_ENABLED
-                                                      : PRIVACY_MODE_DISABLED);
-}
-
 }  // namespace net
diff --git a/net/quic/platform/impl/quic_hostname_utils_impl.h b/net/quic/platform/impl/quic_hostname_utils_impl.h
index 57c6747..3883a63 100644
--- a/net/quic/platform/impl/quic_hostname_utils_impl.h
+++ b/net/quic/platform/impl/quic_hostname_utils_impl.h
@@ -6,7 +6,6 @@
 #define NET_QUIC_PLATFORM_IMPL_QUIC_HOSTNAME_UTILS_IMPL_H_
 
 #include "base/macros.h"
-#include "net/quic/core/quic_server_id.h"
 #include "net/quic/platform/api/quic_export.h"
 #include "net/quic/platform/api/quic_string_piece.h"
 
@@ -24,10 +23,6 @@
   // WARNING: mutates |hostname| in place and returns |hostname|.
   static char* NormalizeHostname(char* hostname);
 
-  // Creates a QuicServerId from a string formatted in same manner as
-  // QuicServerId::ToString().
-  static void StringToQuicServerId(const std::string& str, QuicServerId* out);
-
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicHostnameUtilsImpl);
 };
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 368f713..4d9aa6d 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -945,7 +945,7 @@
 
   switch (ssl_config_.tls13_variant) {
     case kTLS13VariantDraft22:
-      SSL_set_tls13_variant(ssl_.get(), tls13_draft22);
+      SSL_set_tls13_variant(ssl_.get(), tls13_default);
       break;
     case kTLS13VariantExperiment2:
       SSL_set_tls13_variant(ssl_.get(), tls13_experiment2);
diff --git a/net/url_request/url_request_quic_perftest.cc b/net/url_request/url_request_quic_perftest.cc
index 3006f15..614ef64 100644
--- a/net/url_request/url_request_quic_perftest.cc
+++ b/net/url_request/url_request_quic_perftest.cc
@@ -155,7 +155,7 @@
 
     CertVerifyResult verify_result;
     verify_result.verified_cert = ImportCertFromFile(
-        GetTestCertsDirectory(), "quic_test.example.com.crt");
+        GetTestCertsDirectory(), "quic-chain.pem");
     cert_verifier_.AddResultForCert(verify_result.verified_cert.get(),
                                     verify_result, OK);
   }
diff --git a/net/url_request/url_request_quic_unittest.cc b/net/url_request/url_request_quic_unittest.cc
index 62a30c5..615aad9 100644
--- a/net/url_request/url_request_quic_unittest.cc
+++ b/net/url_request/url_request_quic_unittest.cc
@@ -35,8 +35,7 @@
 
 namespace {
 
-// This must match the certificate used (quic_test.example.com.crt and
-// quic_test.example.com.key.pkcs8).
+// This must match the certificate used (quic-chain.pem and quic-leaf-cert.key).
 const char kTestServerHost[] = "test.example.com";
 // Used as a simple response from the server.
 const char kHelloPath[] = "/hello.txt";
@@ -52,12 +51,7 @@
         new HttpNetworkSession::Params);
     CertVerifyResult verify_result;
     verify_result.verified_cert = ImportCertFromFile(
-        GetTestCertsDirectory(), "quic_test.example.com.crt");
-    cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
-                                           "test.example.com", verify_result,
-                                           OK);
-    verify_result.verified_cert = ImportCertFromFile(
-        GetTestCertsDirectory(), "quic_test_ecc.example.com.crt");
+        GetTestCertsDirectory(), "quic-chain.pem");
     cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
                                            "test.example.com", verify_result,
                                            OK);
@@ -152,9 +146,9 @@
         new net::ProofSourceChromium());
     base::FilePath directory = GetTestCertsDirectory();
     CHECK(proof_source->Initialize(
-        directory.Append(FILE_PATH_LITERAL("quic_test.example.com.crt")),
-        directory.Append(FILE_PATH_LITERAL("quic_test.example.com.key.pkcs8")),
-        directory.Append(FILE_PATH_LITERAL("quic_test.example.com.key.sct"))));
+        directory.Append(FILE_PATH_LITERAL("quic-chain.pem")),
+        directory.Append(FILE_PATH_LITERAL("quic-leaf-cert.key")),
+        base::FilePath()));
     server_.reset(new QuicSimpleServer(
         test::crypto_test_utils::ProofSourceForTesting(), config,
         net::QuicCryptoServerConfig::ConfigOptions(), AllSupportedVersions(),
diff --git a/remoting/webapp/base/js/client_plugin_impl.js b/remoting/webapp/base/js/client_plugin_impl.js
index 9058145..cba6b268 100644
--- a/remoting/webapp/base/js/client_plugin_impl.js
+++ b/remoting/webapp/base/js/client_plugin_impl.js
@@ -457,16 +457,6 @@
   this.plugin_.postMessage(JSON.stringify(
       { method: 'delegateLargeCursors', data: {} }));
 
-  // Enable stuck modifier detection for Linux, but not for the public app.
-  // TODO(jamiewalch): Revert this once crbug.com/787523 is fixed.
-  this.plugin_.postMessage(JSON.stringify({
-    method: 'enableStuckModifierKeyDetection',
-    data: {
-      'enable': remoting.platformIsLinux() &&
-          chrome.runtime.id != 'gbchcmhmhahfdphkhkmpfmihenigjmpp'
-    }
-  }));
-
   this.credentials_ = credentialsProvider;
   this.useAsyncPinDialog_();
   this.plugin_.postMessage(JSON.stringify({
diff --git a/services/device/public/cpp/BUILD.gn b/services/device/public/cpp/BUILD.gn
index e9ebe27..22453cbe 100644
--- a/services/device/public/cpp/BUILD.gn
+++ b/services/device/public/cpp/BUILD.gn
@@ -4,14 +4,17 @@
 
 import("//build/config/features.gni")
 
-source_set("device_features") {
+component("device_features") {
   public = [
     "device_features.h",
   ]
   sources = [
     "device_features.cc",
+    "device_features_export.h",
   ]
   public_deps = [
     "//base",
   ]
+
+  defines = [ "DEVICE_FEATURES_IMPLEMENTATION" ]
 }
diff --git a/services/device/public/cpp/device_features.h b/services/device/public/cpp/device_features.h
index 44f9d38..68ab4b4 100644
--- a/services/device/public/cpp/device_features.h
+++ b/services/device/public/cpp/device_features.h
@@ -9,13 +9,14 @@
 #define SERVICES_DEVICE_PUBLIC_CPP_DEVICE_FEATURES_H_
 
 #include "base/feature_list.h"
+#include "services/device/public/cpp/device_features_export.h"
 
 namespace features {
 
 // The features should be documented alongside the definition of their values
 // in the .cc file.
-extern const base::Feature kGenericSensor;
-extern const base::Feature kGenericSensorExtraClasses;
+DEVICE_FEATURES_EXPORT extern const base::Feature kGenericSensor;
+DEVICE_FEATURES_EXPORT extern const base::Feature kGenericSensorExtraClasses;
 
 }  // namespace features
 
diff --git a/services/device/public/cpp/device_features_export.h b/services/device/public/cpp/device_features_export.h
new file mode 100644
index 0000000..f922073
--- /dev/null
+++ b/services/device/public/cpp/device_features_export.h
@@ -0,0 +1,34 @@
+// 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 SERVICES_DEVICE_PUBLIC_CPP_DEVICE_FEATURES_EXPORT_H_
+#define SERVICES_DEVICE_PUBLIC_CPP_DEVICE_FEATURES_EXPORT_H_
+
+#if defined(COMPONENT_BUILD)
+
+#if defined(WIN32)
+
+#if defined(DEVICE_FEATURES_IMPLEMENTATION)
+#define DEVICE_FEATURES_EXPORT __declspec(dllexport)
+#else
+#define DEVICE_FEATURES_EXPORT __declspec(dllimport)
+#endif
+
+#else  // !defined(WIN32)
+
+#if defined(DEVICE_FEATURES_IMPLEMENTATION)
+#define DEVICE_FEATURES_EXPORT __attribute__((visibility("default")))
+#else
+#define DEVICE_FEATURES_EXPORT
+#endif
+
+#endif
+
+#else  // !defined(COMPONENT_BUILD)
+
+#define DEVICE_FEATURES_EXPORT
+
+#endif
+
+#endif  // SERVICES_DEVICE_PUBLIC_CPP_DEVICE_FEATURES_EXPORT_H_
diff --git a/services/identity/public/cpp/identity_manager.cc b/services/identity/public/cpp/identity_manager.cc
index 53d2d17..b756418 100644
--- a/services/identity/public/cpp/identity_manager.cc
+++ b/services/identity/public/cpp/identity_manager.cc
@@ -3,12 +3,15 @@
 // found in the LICENSE file.
 
 #include "services/identity/public/cpp/identity_manager.h"
+#include "base/memory/ptr_util.h"
 #include "base/threading/sequenced_task_runner_handle.h"
+#include "components/signin/core/browser/profile_oauth2_token_service.h"
 
 namespace identity {
 
-IdentityManager::IdentityManager(SigninManagerBase* signin_manager)
-    : signin_manager_(signin_manager) {
+IdentityManager::IdentityManager(SigninManagerBase* signin_manager,
+                                 ProfileOAuth2TokenService* token_service)
+    : signin_manager_(signin_manager), token_service_(token_service) {
 #if defined(OS_CHROMEOS)
   // On ChromeOS, the authenticated account is set very early in startup and
   // never changed. No client should be accessing the IdentityManager before the
@@ -27,6 +30,16 @@
   return primary_account_info_;
 }
 
+std::unique_ptr<PrimaryAccountAccessTokenFetcher>
+IdentityManager::CreateAccessTokenFetcherForPrimaryAccount(
+    const std::string& oauth_consumer_name,
+    const OAuth2TokenService::ScopeSet& scopes,
+    PrimaryAccountAccessTokenFetcher::TokenCallback callback) {
+  return base::MakeUnique<PrimaryAccountAccessTokenFetcher>(
+      oauth_consumer_name, signin_manager_, token_service_, scopes,
+      std::move(callback));
+}
+
 void IdentityManager::AddObserver(Observer* observer) {
   observer_list_.AddObserver(observer);
 }
diff --git a/services/identity/public/cpp/identity_manager.h b/services/identity/public/cpp/identity_manager.h
index 86a07fe3..429623b 100644
--- a/services/identity/public/cpp/identity_manager.h
+++ b/services/identity/public/cpp/identity_manager.h
@@ -8,6 +8,9 @@
 #include "base/observer_list.h"
 #include "components/signin/core/browser/account_info.h"
 #include "components/signin/core/browser/signin_manager_base.h"
+#include "services/identity/public/cpp/primary_account_access_token_fetcher.h"
+
+class ProfileOAuth2TokenService;
 
 namespace identity {
 
@@ -34,13 +37,21 @@
     virtual ~Observer() {}
   };
 
-  explicit IdentityManager(SigninManagerBase* signin_manager);
+  IdentityManager(SigninManagerBase* signin_manager,
+                  ProfileOAuth2TokenService* token_service);
   ~IdentityManager() override;
 
   // Provides access to the latest cached information of the user's primary
   // account.
   AccountInfo GetPrimaryAccountInfo();
 
+  // Creates a PrimaryAccountAccessTokenFetcher given the passed-in information.
+  std::unique_ptr<PrimaryAccountAccessTokenFetcher>
+  CreateAccessTokenFetcherForPrimaryAccount(
+      const std::string& oauth_consumer_name,
+      const OAuth2TokenService::ScopeSet& scopes,
+      PrimaryAccountAccessTokenFetcher::TokenCallback callback);
+
   // Methods to register or remove observers.
   void AddObserver(Observer* observer);
   void RemoveObserver(Observer* observer);
@@ -60,11 +71,12 @@
   // receiving this call asynchronously from the Identity Service.
   void HandleGoogleSignedOut(const AccountInfo& account_info);
 
-  // Backing SigninManagerBase. NOTE: We strive to limit synchronous access to
-  // this class in the IdentityManager implementation, as all such synchronous
-  // access will become impossible when IdentityManager is backed by the
-  // Identity Service.
+  // Backing signin classes. NOTE: We strive to limit synchronous access to
+  // these classes in the IdentityManager implementation, as all such
+  // synchronous access will become impossible when IdentityManager is backed by
+  // the Identity Service.
   SigninManagerBase* signin_manager_;
+  ProfileOAuth2TokenService* token_service_;
 
   // The latest (cached) value of the primary account.
   AccountInfo primary_account_info_;
diff --git a/services/identity/public/cpp/identity_manager_unittest.cc b/services/identity/public/cpp/identity_manager_unittest.cc
index 4aea7e7..a6f47a03 100644
--- a/services/identity/public/cpp/identity_manager_unittest.cc
+++ b/services/identity/public/cpp/identity_manager_unittest.cc
@@ -97,7 +97,8 @@
 
     signin_manager()->SetAuthenticatedAccountInfo(kTestGaiaId, kTestEmail);
 
-    identity_manager_.reset(new IdentityManager(&signin_manager_));
+    identity_manager_.reset(
+        new IdentityManager(&signin_manager_, &token_service_));
     identity_manager_observer_.reset(
         new TestIdentityManagerObserver(identity_manager_.get()));
   }
@@ -187,4 +188,15 @@
 }
 #endif  // !defined(OS_CHROMEOS)
 
+TEST_F(IdentityManagerTest, CreateAccessTokenFetcherForPrimaryAccount) {
+  std::set<std::string> scopes{"scope"};
+  PrimaryAccountAccessTokenFetcher::TokenCallback callback =
+      base::BindOnce([](const GoogleServiceAuthError& error,
+                        const std::string& access_token) {});
+  std::unique_ptr<PrimaryAccountAccessTokenFetcher> token_fetcher =
+      identity_manager()->CreateAccessTokenFetcherForPrimaryAccount(
+          "dummy_consumer", scopes, std::move(callback));
+  EXPECT_TRUE(token_fetcher);
+}
+
 }  // namespace identity
diff --git a/services/network/public/cpp/cors_error_status.h b/services/network/public/cpp/cors_error_status.h
index 529d885..cf8930b 100644
--- a/services/network/public/cpp/cors_error_status.h
+++ b/services/network/public/cpp/cors_error_status.h
@@ -28,6 +28,7 @@
   ~CORSErrorStatus();
 
   bool operator==(const CORSErrorStatus& rhs) const;
+  bool operator!=(const CORSErrorStatus& rhs) const { return !(*this == rhs); }
 
   network::mojom::CORSError cors_error;
 
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
index f58f638..bd3b6db 100644
--- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
+++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
@@ -85,36 +85,39 @@
 }
 
 void CoordinatorImpl::RequestGlobalMemoryDump(
-    mojom::GlobalRequestArgsPtr args_in,
+    MemoryDumpType dump_type,
+    MemoryDumpLevelOfDetail level_of_detail,
     const RequestGlobalMemoryDumpCallback& callback) {
   // This merely strips out the |dump_guid| argument.
-  auto callback_adapter = [](const RequestGlobalMemoryDumpCallback& callback,
-                             bool success, uint64_t,
-                             mojom::GlobalMemoryDumpPtr global_memory_dump) {
+  auto adapter = [](const RequestGlobalMemoryDumpCallback& callback,
+                    bool success, uint64_t,
+                    mojom::GlobalMemoryDumpPtr global_memory_dump) {
     callback.Run(success, std::move(global_memory_dump));
   };
-  RequestGlobalMemoryDumpInternal(*args_in, false,
-                                  base::Bind(callback_adapter, callback));
+
+  QueuedRequest::Args args(dump_type, level_of_detail, false /* addToTrace */);
+  RequestGlobalMemoryDumpInternal(args, base::BindRepeating(adapter, callback));
 }
 
 void CoordinatorImpl::RequestGlobalMemoryDumpAndAppendToTrace(
-    mojom::GlobalRequestArgsPtr args_in,
+    MemoryDumpType dump_type,
+    MemoryDumpLevelOfDetail level_of_detail,
     const RequestGlobalMemoryDumpAndAppendToTraceCallback& callback) {
   // This merely strips out the |dump_ptr| argument.
-  auto callback_adapter =
+  auto adapter =
       [](const RequestGlobalMemoryDumpAndAppendToTraceCallback& callback,
          bool success, uint64_t dump_guid,
          mojom::GlobalMemoryDumpPtr) { callback.Run(success, dump_guid); };
-  RequestGlobalMemoryDumpInternal(*args_in, true,
-                                  base::Bind(callback_adapter, callback));
+
+  QueuedRequest::Args args(dump_type, level_of_detail, true /* addToTrace */);
+  RequestGlobalMemoryDumpInternal(args, base::BindRepeating(adapter, callback));
 }
 
 void CoordinatorImpl::GetVmRegionsForHeapProfiler(
     const GetVmRegionsForHeapProfilerCallback& callback) {
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
+  RequestGlobalMemoryDump(
       MemoryDumpType::EXPLICITLY_TRIGGERED,
-      MemoryDumpLevelOfDetail::VM_REGIONS_ONLY_FOR_HEAP_PROFILER));
-  RequestGlobalMemoryDump(std::move(args), callback);
+      MemoryDumpLevelOfDetail::VM_REGIONS_ONLY_FOR_HEAP_PROFILER, callback);
 }
 
 void CoordinatorImpl::RegisterClientProcess(
@@ -157,8 +160,7 @@
 }
 
 void CoordinatorImpl::RequestGlobalMemoryDumpInternal(
-    const mojom::GlobalRequestArgs& args_in,
-    bool add_to_trace,
+    const QueuedRequest::Args& args,
     const RequestGlobalMemoryDumpInternalCallback& callback) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
@@ -167,11 +169,6 @@
 
   bool another_dump_is_queued = !queued_memory_dump_requests_.empty();
 
-  base::trace_event::MemoryDumpRequestArgs args;
-  args.dump_guid = ++next_dump_id_;
-  args.dump_type = args_in.dump_type;
-  args.level_of_detail = args_in.level_of_detail;
-
   // If this is a periodic or peak memory dump request and there already is
   // another request in the queue with the same level of detail, there's no
   // point in enqueuing this request.
@@ -194,7 +191,7 @@
     }
   }
 
-  queued_memory_dump_requests_.emplace_back(args, callback, add_to_trace);
+  queued_memory_dump_requests_.emplace_back(args, ++next_dump_id_, callback);
 
   // If another dump is already in queued, this dump will automatically be
   // scheduled when the other dump finishes.
@@ -212,7 +209,7 @@
 
   // Only consider the current request timed out if we fired off this
   // delayed callback in association with this request.
-  if (!request || request->args.dump_guid != dump_guid)
+  if (!request || request->dump_guid != dump_guid)
     return;
 
   // Fail all remaining dumps being waited upon and clear the vector.
@@ -249,7 +246,7 @@
   base::SequencedTaskRunnerHandle::Get()->PostDelayedTask(
       FROM_HERE,
       base::BindOnce(&CoordinatorImpl::OnQueuedRequestTimedOut,
-                     base::Unretained(this), request->args.dump_guid),
+                     base::Unretained(this), request->dump_guid),
       client_process_timeout_);
 
   // Run the callback in case there are no client processes registered.
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
index 218c2db..584a4df7 100644
--- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
+++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
@@ -52,10 +52,12 @@
   void RegisterClientProcess(mojom::ClientProcessPtr,
                              mojom::ProcessType) override;
   void UnregisterClientProcess(mojom::ClientProcess*);
-  void RequestGlobalMemoryDump(mojom::GlobalRequestArgsPtr,
+  void RequestGlobalMemoryDump(base::trace_event::MemoryDumpType,
+                               base::trace_event::MemoryDumpLevelOfDetail,
                                const RequestGlobalMemoryDumpCallback&) override;
   void RequestGlobalMemoryDumpAndAppendToTrace(
-      mojom::GlobalRequestArgsPtr,
+      base::trace_event::MemoryDumpType,
+      base::trace_event::MemoryDumpLevelOfDetail,
       const RequestGlobalMemoryDumpAndAppendToTraceCallback&) override;
   void GetVmRegionsForHeapProfiler(
       const GetVmRegionsForHeapProfilerCallback&) override;
@@ -89,8 +91,7 @@
   };
 
   void RequestGlobalMemoryDumpInternal(
-      const mojom::GlobalRequestArgs& args,
-      bool add_to_trace,
+      const QueuedRequest::Args& args,
       const RequestGlobalMemoryDumpInternalCallback& callback);
 
   // Callback of RequestChromeMemoryDump.
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc b/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
index 9cd7999..4e52eae 100644
--- a/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
+++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
@@ -125,16 +125,22 @@
                                         process_type);
   }
 
-  void RequestGlobalMemoryDump(mojom::GlobalRequestArgsPtr args,
+  void RequestGlobalMemoryDump(RequestGlobalMemoryDumpCallback callback) {
+    RequestGlobalMemoryDump(MemoryDumpType::SUMMARY_ONLY,
+                            MemoryDumpLevelOfDetail::BACKGROUND, callback);
+  }
+
+  void RequestGlobalMemoryDump(MemoryDumpType dump_type,
+                               MemoryDumpLevelOfDetail level_of_detail,
                                RequestGlobalMemoryDumpCallback callback) {
-    coordinator_->RequestGlobalMemoryDump(std::move(args), callback);
+    coordinator_->RequestGlobalMemoryDump(dump_type, level_of_detail, callback);
   }
 
   void RequestGlobalMemoryDumpAndAppendToTrace(
-      mojom::GlobalRequestArgsPtr args,
       RequestGlobalMemoryDumpAndAppendToTraceCallback callback) {
-    coordinator_->RequestGlobalMemoryDumpAndAppendToTrace(std::move(args),
-                                                          callback);
+    coordinator_->RequestGlobalMemoryDumpAndAppendToTrace(
+        MemoryDumpType::EXPLICITLY_TRIGGERED, MemoryDumpLevelOfDetail::DETAILED,
+        callback);
   }
 
   void GetVmRegionsForHeapProfiler(
@@ -279,12 +285,9 @@
 
 // Tests that the global dump is acked even in absence of clients.
 TEST_F(CoordinatorImplTest, NoClients) {
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      MemoryDumpType::SUMMARY_ONLY, MemoryDumpLevelOfDetail::DETAILED));
-
   MockGlobalMemoryDumpCallback callback;
   EXPECT_CALL(callback, OnCall(true, NotNull()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
 }
 
 // Nominal behavior: several clients contributing to the global dump.
@@ -298,24 +301,16 @@
   EXPECT_CALL(client_process_1, RequestChromeMemoryDump(_, _)).Times(1);
   EXPECT_CALL(client_process_2, RequestChromeMemoryDump(_, _)).Times(1);
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   MockGlobalMemoryDumpCallback callback;
   EXPECT_CALL(callback, OnCall(true, NotNull()))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
 TEST_F(CoordinatorImplTest, MissingChromeDump) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   NiceMock<MockClientProcess> client_process(this, 1,
                                              mojom::ProcessType::BROWSER);
 
@@ -335,17 +330,13 @@
       OnCall(true, Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
                                  IsEmpty()))))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
 TEST_F(CoordinatorImplTest, MissingOsDump) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   NiceMock<MockClientProcess> client_process(this, 1,
                                              mojom::ProcessType::BROWSER);
 
@@ -363,17 +354,13 @@
       OnCall(true, Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
                                  IsEmpty()))))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
 TEST_F(CoordinatorImplTest, TimeOutStuckChild) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   // |stuck_callback| should be destroyed after |client_process| or mojo
   // will complain about the callback being destoyed before the binding.
   MockClientProcess::RequestChromeMemoryDumpCallback stuck_callback;
@@ -396,17 +383,13 @@
                                   IsEmpty()))))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
   ReduceCoordinatorClientProcessTimeout();
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
 TEST_F(CoordinatorImplTest, TimeOutStuckChildMultiProcess) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   static constexpr base::ProcessId kBrowserPid = 1;
   static constexpr base::ProcessId kRendererPid = 2;
 
@@ -422,10 +405,9 @@
 // On Linux, all memory dumps come from the browser client. On all other
 // platforms, they are expected to come from each individual client.
 #if defined(OS_LINUX)
-  EXPECT_CALL(
-      browser_client,
-      RequestOSMemoryDump(
-          true, AllOf(Contains(kBrowserPid), Contains(kRendererPid)), _))
+  EXPECT_CALL(browser_client,
+              RequestOSMemoryDump(
+                  _, AllOf(Contains(kBrowserPid), Contains(kRendererPid)), _))
       .WillOnce(Invoke(
           [](bool want_mmaps, const std::vector<base::ProcessId>& pids,
              const MockClientProcess::RequestOSMemoryDumpCallback& callback) {
@@ -471,7 +453,7 @@
             run_loop.Quit();
           }));
   ReduceCoordinatorClientProcessTimeout();
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
@@ -480,10 +462,6 @@
 TEST_F(CoordinatorImplTest, ClientCrashDuringGlobalDump) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   auto client_process_1 = std::make_unique<NiceMock<MockClientProcess>>(
       this, 1, mojom::ProcessType::BROWSER);
   auto client_process_2 = std::make_unique<NiceMock<MockClientProcess>>(this);
@@ -516,7 +494,7 @@
   MockGlobalMemoryDumpCallback callback;
   EXPECT_CALL(callback, OnCall(false, NotNull()))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
@@ -525,10 +503,6 @@
 TEST_F(CoordinatorImplTest, SingleClientCrashDuringGlobalDump) {
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   auto client_process = std::make_unique<NiceMock<MockClientProcess>>(
       this, 1, mojom::ProcessType::BROWSER);
 
@@ -547,7 +521,7 @@
   MockGlobalMemoryDumpCallback callback;
   EXPECT_CALL(callback, OnCall(false, NotNull()))
       .WillOnce(RunClosure(run_loop.QuitClosure()));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
@@ -689,10 +663,7 @@
         run_loop.Quit();
       }));
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::SUMMARY_ONLY,
-      MemoryDumpLevelOfDetail::BACKGROUND));
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(callback.Get());
   run_loop.Run();
 }
 
@@ -791,10 +762,6 @@
 
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::EXPLICITLY_TRIGGERED,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   NiceMock<MockClientProcess> client_process(this, 1,
                                              mojom::ProcessType::BROWSER);
 
@@ -818,7 +785,8 @@
   TraceLog::GetInstance()->SetEnabled(
       TraceConfig(MemoryDumpManager::kTraceCategory, ""),
       TraceLog::RECORDING_MODE);
-  RequestGlobalMemoryDump(std::move(args), callback.Get());
+  RequestGlobalMemoryDump(MemoryDumpType::EXPLICITLY_TRIGGERED,
+                          MemoryDumpLevelOfDetail::DETAILED, callback.Get());
   run_loop.Run();
   TraceLog::GetInstance()->SetDisabled();
 
@@ -836,10 +804,6 @@
 
   base::RunLoop run_loop;
 
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      base::trace_event::MemoryDumpType::EXPLICITLY_TRIGGERED,
-      MemoryDumpLevelOfDetail::DETAILED));
-
   NiceMock<MockClientProcess> client_process(this, 1,
                                              mojom::ProcessType::BROWSER);
 
@@ -860,7 +824,7 @@
   TraceLog::GetInstance()->SetEnabled(
       TraceConfig(MemoryDumpManager::kTraceCategory, ""),
       TraceLog::RECORDING_MODE);
-  RequestGlobalMemoryDumpAndAppendToTrace(std::move(args), callback.Get());
+  RequestGlobalMemoryDumpAndAppendToTrace(callback.Get());
   run_loop.Run();
   TraceLog::GetInstance()->SetDisabled();
 
diff --git a/services/resource_coordinator/memory_instrumentation/queued_request.cc b/services/resource_coordinator/memory_instrumentation/queued_request.cc
index 1c2a35f9..a6f8271d 100644
--- a/services/resource_coordinator/memory_instrumentation/queued_request.cc
+++ b/services/resource_coordinator/memory_instrumentation/queued_request.cc
@@ -6,17 +6,33 @@
 
 namespace memory_instrumentation {
 
+QueuedRequest::Args::Args(MemoryDumpType dump_type,
+                          MemoryDumpLevelOfDetail level_of_detail,
+                          bool add_to_trace)
+    : dump_type(dump_type),
+      level_of_detail(level_of_detail),
+      add_to_trace(add_to_trace) {}
+QueuedRequest::Args::~Args() {}
+
 QueuedRequest::Response::Response() {}
 QueuedRequest::Response::~Response() {}
 
 QueuedRequest::QueuedRequest(
-    const base::trace_event::MemoryDumpRequestArgs& args,
-    const RequestGlobalMemoryDumpInternalCallback& callback,
-    bool add_to_trace)
-    : args(args), callback(callback), add_to_trace(add_to_trace) {}
+    const Args& args,
+    const uint64_t dump_guid,
+    const RequestGlobalMemoryDumpInternalCallback& callback)
+    : args(args), dump_guid(dump_guid), callback(callback) {}
 
 QueuedRequest::~QueuedRequest() {}
 
+base::trace_event::MemoryDumpRequestArgs QueuedRequest::GetRequestArgs() {
+  base::trace_event::MemoryDumpRequestArgs request_args;
+  request_args.dump_guid = dump_guid;
+  request_args.dump_type = args.dump_type;
+  request_args.level_of_detail = args.level_of_detail;
+  return request_args;
+}
+
 QueuedRequest::PendingResponse::PendingResponse(
     const mojom::ClientProcess* client,
     Type type)
diff --git a/services/resource_coordinator/memory_instrumentation/queued_request.h b/services/resource_coordinator/memory_instrumentation/queued_request.h
index 9b36782..5cb9f36c 100644
--- a/services/resource_coordinator/memory_instrumentation/queued_request.h
+++ b/services/resource_coordinator/memory_instrumentation/queued_request.h
@@ -14,6 +14,9 @@
 #include "services/resource_coordinator/public/cpp/memory_instrumentation/coordinator.h"
 #include "services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom.h"
 
+using base::trace_event::MemoryDumpLevelOfDetail;
+using base::trace_event::MemoryDumpType;
+
 namespace memory_instrumentation {
 
 // Holds data for pending requests enqueued via RequestGlobalMemoryDump().
@@ -24,6 +27,17 @@
   using RequestGlobalMemoryDumpInternalCallback = base::Callback<
       void(bool, uint64_t, memory_instrumentation::mojom::GlobalMemoryDumpPtr)>;
 
+  struct Args {
+    Args(MemoryDumpType dump_type,
+         MemoryDumpLevelOfDetail level_of_detail,
+         bool add_to_trace);
+    ~Args();
+
+    const MemoryDumpType dump_type;
+    const MemoryDumpLevelOfDetail level_of_detail;
+    const bool add_to_trace;
+  };
+
   struct PendingResponse {
     enum Type {
       kChromeDump,
@@ -47,11 +61,13 @@
     OSMemDumpMap os_dumps;
   };
 
-  QueuedRequest(const base::trace_event::MemoryDumpRequestArgs& args,
-                const RequestGlobalMemoryDumpInternalCallback& callback,
-                bool add_to_trace);
+  QueuedRequest(const Args& args,
+                const uint64_t dump_guid,
+                const RequestGlobalMemoryDumpInternalCallback& callback);
   ~QueuedRequest();
 
+  base::trace_event::MemoryDumpRequestArgs GetRequestArgs();
+
   bool wants_mmaps() const {
     return args.level_of_detail == base::trace_event::MemoryDumpLevelOfDetail::
                                        VM_REGIONS_ONLY_FOR_HEAP_PROFILER ||
@@ -70,9 +86,9 @@
     return args.dump_type == base::trace_event::MemoryDumpType::SUMMARY_ONLY;
   }
 
-  const base::trace_event::MemoryDumpRequestArgs args;
+  const Args args;
+  const uint64_t dump_guid;
   const RequestGlobalMemoryDumpInternalCallback callback;
-  const bool add_to_trace;
 
   // When a dump, requested via RequestGlobalMemoryDump(), is in progress this
   // set contains a |PendingResponse| for each |RequestChromeMemoryDump| and
diff --git a/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc b/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
index e67ca37..d8a8de35 100644
--- a/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
+++ b/services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
@@ -219,7 +219,7 @@
 
   TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(
       base::trace_event::MemoryDumpManager::kTraceCategory, "GlobalMemoryDump",
-      TRACE_ID_LOCAL(request->args.dump_guid), "dump_type",
+      TRACE_ID_LOCAL(request->dump_guid), "dump_type",
       base::trace_event::MemoryDumpTypeToString(request->args.dump_type),
       "level_of_detail",
       base::trace_event::MemoryDumpLevelOfDetailToString(
@@ -240,7 +240,7 @@
     // processes' vm regions, which are retrieved via RequestOSMemoryDump().
     if (request->wants_chrome_dumps()) {
       request->pending_responses.insert({client, ResponseType::kChromeDump});
-      client->RequestChromeMemoryDump(request->args,
+      client->RequestChromeMemoryDump(request->GetRequestArgs(),
                                       base::Bind(chrome_callback, client));
     }
 
@@ -371,17 +371,18 @@
     }
 
     // Trace the OS and Chrome dumps if they exist.
-    if (request->add_to_trace) {
+    if (request->args.add_to_trace) {
       if (raw_os_dump) {
         bool trace_os_success = tracing_observer->AddOsDumpToTraceIfEnabled(
-            request->args, pid, os_dump.get(), &raw_os_dump->memory_maps);
+            request->GetRequestArgs(), pid, os_dump.get(),
+            &raw_os_dump->memory_maps);
         if (!trace_os_success)
           request->failed_memory_dump_count++;
       }
 
       if (raw_chrome_dump) {
         bool trace_chrome_success = AddChromeMemoryDumpToTrace(
-            request->args, pid, *raw_chrome_dump, *global_graph,
+            request->GetRequestArgs(), pid, *raw_chrome_dump, *global_graph,
             pid_to_process_type, tracing_observer);
         if (!trace_chrome_success)
           request->failed_memory_dump_count++;
@@ -419,7 +420,7 @@
 
   const auto& callback = request->callback;
   const bool global_success = request->failed_memory_dump_count == 0;
-  callback.Run(global_success, request->args.dump_guid, std::move(global_dump));
+  callback.Run(global_success, request->dump_guid, std::move(global_dump));
   UMA_HISTOGRAM_MEDIUM_TIMES("Memory.Experimental.Debug.GlobalDumpDuration",
                              base::Time::Now() - request->start_time);
   UMA_HISTOGRAM_COUNTS_1000(
@@ -427,11 +428,11 @@
       request->failed_memory_dump_count);
 
   char guid_str[20];
-  sprintf(guid_str, "0x%" PRIx64, request->args.dump_guid);
+  sprintf(guid_str, "0x%" PRIx64, request->dump_guid);
   TRACE_EVENT_NESTABLE_ASYNC_END2(
       base::trace_event::MemoryDumpManager::kTraceCategory, "GlobalMemoryDump",
-      TRACE_ID_LOCAL(request->args.dump_guid), "dump_guid",
-      TRACE_STR_COPY(guid_str), "success", global_success);
+      TRACE_ID_LOCAL(request->dump_guid), "dump_guid", TRACE_STR_COPY(guid_str),
+      "success", global_success);
 }
 
 bool QueuedRequestDispatcher::AddChromeMemoryDumpToTrace(
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
index b8912c7..98764e8e 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
@@ -113,10 +113,8 @@
     return;
   }
 
-  mojom::GlobalRequestArgsPtr args(
-      mojom::GlobalRequestArgs::New(dump_type, level_of_detail));
   coordinator_->RequestGlobalMemoryDumpAndAppendToTrace(
-      std::move(args),
+      dump_type, level_of_detail,
       mojom::Coordinator::RequestGlobalMemoryDumpAndAppendToTraceCallback());
 }
 
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
index d4ca8e2..0867f5a 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
@@ -47,9 +47,9 @@
 void MemoryInstrumentation::RequestGlobalDump(
     RequestGlobalDumpCallback callback) {
   const auto& coordinator = GetCoordinatorBindingForCurrentThread();
-  mojom::GlobalRequestArgsPtr args(mojom::GlobalRequestArgs::New(
-      MemoryDumpType::SUMMARY_ONLY, MemoryDumpLevelOfDetail::BACKGROUND));
-  coordinator->RequestGlobalMemoryDump(std::move(args), callback);
+  coordinator->RequestGlobalMemoryDump(MemoryDumpType::SUMMARY_ONLY,
+                                       MemoryDumpLevelOfDetail::BACKGROUND,
+                                       callback);
 }
 
 void MemoryInstrumentation::RequestGlobalDumpAndAppendToTrace(
@@ -57,10 +57,8 @@
     MemoryDumpLevelOfDetail level_of_detail,
     RequestGlobalMemoryDumpAndAppendToTraceCallback callback) {
   const auto& coordinator = GetCoordinatorBindingForCurrentThread();
-  mojom::GlobalRequestArgsPtr args(
-      mojom::GlobalRequestArgs::New(dump_type, level_of_detail));
-  coordinator->RequestGlobalMemoryDumpAndAppendToTrace(std::move(args),
-                                                       callback);
+  coordinator->RequestGlobalMemoryDumpAndAppendToTrace(
+      dump_type, level_of_detail, callback);
 }
 
 void MemoryInstrumentation::GetVmRegionsForHeapProfiler(
diff --git a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
index 9185f282..a3193ae1 100644
--- a/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
+++ b/services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
@@ -115,11 +115,13 @@
   void RegisterClientProcess(mojom::ClientProcessPtr,
                              mojom::ProcessType) override {}
 
-  void RequestGlobalMemoryDump(mojom::GlobalRequestArgsPtr args,
+  void RequestGlobalMemoryDump(MemoryDumpType dump_type,
+                               MemoryDumpLevelOfDetail level_of_detail,
                                const RequestGlobalMemoryDumpCallback&) override;
 
   void RequestGlobalMemoryDumpAndAppendToTrace(
-      mojom::GlobalRequestArgsPtr args,
+      MemoryDumpType dump_type,
+      MemoryDumpLevelOfDetail level_of_detail,
       const RequestGlobalMemoryDumpAndAppendToTraceCallback&) override;
 
   void GetVmRegionsForHeapProfiler(
@@ -239,16 +241,18 @@
 };
 
 void MockCoordinator::RequestGlobalMemoryDump(
-    mojom::GlobalRequestArgsPtr args,
+    MemoryDumpType dump_type,
+    MemoryDumpLevelOfDetail level_of_detail,
     const RequestGlobalMemoryDumpCallback& callback) {
-  client_->RequestChromeDump(args->dump_type, args->level_of_detail);
+  client_->RequestChromeDump(dump_type, level_of_detail);
   callback.Run(true, mojom::GlobalMemoryDumpPtr());
 }
 
 void MockCoordinator::RequestGlobalMemoryDumpAndAppendToTrace(
-    mojom::GlobalRequestArgsPtr args,
+    MemoryDumpType dump_type,
+    MemoryDumpLevelOfDetail level_of_detail,
     const RequestGlobalMemoryDumpAndAppendToTraceCallback& callback) {
-  client_->RequestChromeDump(args->dump_type, args->level_of_detail);
+  client_->RequestChromeDump(dump_type, level_of_detail);
   callback.Run(1, true);
 }
 
diff --git a/services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom b/services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom
index 188b4aa0..d7070bf 100644
--- a/services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom
+++ b/services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom
@@ -144,11 +144,6 @@
 
 // These structs are public:
 
-struct GlobalRequestArgs {
-  DumpType dump_type;
-  LevelOfDetail level_of_detail;
-};
-
 struct OSMemDump {
   uint32 resident_set_kb = 0;
 
@@ -234,12 +229,13 @@
 
   // Broadcasts a dump request to all registered client processes and returns a
   // summarized dump back (if args.dump_type == SUMMARY_ONLY).
-  RequestGlobalMemoryDump(GlobalRequestArgs args) =>
+  RequestGlobalMemoryDump(DumpType dump_type, LevelOfDetail level_of_detail) =>
       (bool success, GlobalMemoryDump? global_memory_dump);
 
   // Broadcasts a dump request to all registered client processes and injects the
   // dump in the trace buffer (if tracing is enabled).
-  RequestGlobalMemoryDumpAndAppendToTrace(GlobalRequestArgs args) =>
+  RequestGlobalMemoryDumpAndAppendToTrace(DumpType dump_type,
+                                          LevelOfDetail level_of_detail) =>
       (bool success, uint64 dump_id);
 
   // Broadcasts a RequestOSMemoryDump-only request for all registered client
diff --git a/services/service_manager/sandbox/mac/BUILD.gn b/services/service_manager/sandbox/mac/BUILD.gn
index c1701de7..7a7b814 100644
--- a/services/service_manager/sandbox/mac/BUILD.gn
+++ b/services/service_manager/sandbox/mac/BUILD.gn
@@ -11,6 +11,7 @@
     "gpu.sb",
     "nacl_loader.sb",
     "ppapi.sb",
+    "ppapi_v2.sb",
     "renderer.sb",
     "renderer_v2.sb",
     "utility.sb",
diff --git a/services/service_manager/sandbox/mac/common_v2.sb b/services/service_manager/sandbox/mac/common_v2.sb
index ecc5076..d33adf3 100644
--- a/services/service_manager/sandbox/mac/common_v2.sb
+++ b/services/service_manager/sandbox/mac/common_v2.sb
@@ -43,6 +43,25 @@
 (define (user-homedir-path subpath)
   (string-append (param homedir-as-literal) subpath))
 
+; A function that specific profiles (i.e. renderer) can call to allow
+; font rendering.
+(define (allow-font-access)
+  (begin
+    (allow file-read-data
+      (subpath "/Library/Fonts")
+      (subpath "/System/Library/Fonts")
+      (subpath (user-homedir-path "/Library/Fonts")))
+    (allow mach-lookup
+      (global-name "com.apple.fonts")
+      ; crbug.com/756145, crbug.com/786615
+      (global-name "com.apple.FontObjectsServer"))
+    (if (< os-version 1012)
+      (allow mach-lookup (global-name "com.apple.FontServer")))
+    ; To allow accessing downloaded and other hidden fonts in
+    ; /System/Library/Asssets/com_apple_MobileAsset_Font*.
+    ; (https://crbug.com/662686)
+    (allow file-read* (extension "com.apple.app-sandbox.read"))))
+
 ; Allow logging for all processes.
 (allow file-write*
   (require-all
@@ -99,7 +118,11 @@
 
 ; Reads from /Library.
 (allow file-read-data
-  (path "/Library/Preferences/.GlobalPreferences.plist")
+  (path "/Library/Preferences/.GlobalPreferences.plist"))
+
+; Reads from /System.
+(allow file-read-data
+  (path "/System/Library/CoreServices/checkfixlist")
   (path "/System/Library/CoreServices/SystemVersion.plist"))
 
 ; Reads from /usr.
diff --git a/services/service_manager/sandbox/mac/ppapi_v2.sb b/services/service_manager/sandbox/mac/ppapi_v2.sb
new file mode 100644
index 0000000..4328eff
--- /dev/null
+++ b/services/service_manager/sandbox/mac/ppapi_v2.sb
@@ -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.
+
+; --- The contents of common.sb implicitly included here. ---
+
+; Needed for Fonts.
+(allow-font-access)
+
+; IOKit
+(allow iokit-open
+  (iokit-registry-entry-class "IOSurfaceRootUserClient"))
+
+; Reads from home dir.
+(allow file-read-data
+  (path (user-homedir-path "/Library/Preferences/com.apple.universalaccess.plist")))
+
+; Reads from /System.
+(allow file-read-data
+  (subpath "/System/Library/CoreServices/SystemAppearance.bundle")
+  (path "/System/Library/Colors/System.clr/System.clr"))
diff --git a/services/service_manager/sandbox/mac/renderer_v2.sb b/services/service_manager/sandbox/mac/renderer_v2.sb
index 6fb66b7..7a33757 100644
--- a/services/service_manager/sandbox/mac/renderer_v2.sb
+++ b/services/service_manager/sandbox/mac/renderer_v2.sb
@@ -11,8 +11,7 @@
 ; Reads from the home directory.
 (allow file-read-data
   (path (user-homedir-path "/.CFUserTextEncoding"))
-  (path (user-homedir-path "/Library/Preferences/com.apple.universalaccess.plist"))
-  (subpath (user-homedir-path "/Library/Fonts")))
+  (path (user-homedir-path "/Library/Preferences/com.apple.universalaccess.plist")))
 
 ; Reads of /dev devices.
 (allow file-read-data
@@ -24,19 +23,17 @@
     (path "/dev/null")
     (vnode-type CHARACTER-DEVICE)))
 
-; Reads from /Library.
-(allow file-read-data (subpath "/Library/Fonts"))
+; Needed for Fonts.
+(allow-font-access)
 
 ; Reads from /System.
 (allow file-read-data
-  (path "/System/Library/CoreServices/checkfixlist")
   (path "/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/AppExceptions.bundle/Exceptions.plist")
   (path "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist")
   (path "/System/Library/Preferences/Logging/Subsystems/com.apple.SkyLight.plist")
   (subpath "/System/Library/ColorSync/Profiles")
   (subpath "/System/Library/CoreServices/SystemAppearance.bundle")
   (subpath "/System/Library/CoreServices/SystemVersion.bundle")
-  (subpath "/System/Library/Fonts")
   (subpath "/System/Library/LinguisticData"))
 
 ; IOKit
@@ -55,20 +52,7 @@
 (allow mach-lookup
   ; crbug.com/792257
   (global-name "com.apple.distributed_notifications@Uv3")
-  (global-name "com.apple.fonts")
-  ; crbug.com/756145, crbug.com/786615
-  (global-name "com.apple.FontObjectsServer")
   (global-name "com.apple.lsd.mapdb")
   ; crbug.com/792217
   (global-name "com.apple.system.notification_center")
   (global-name "com.apple.windowserver.active"))
-
-; MacOS dropped FontServer to replace it with the (XPC based) com.apple.fonts,
-; but 10.9 through 10.11 use FontServer.
-(if (< os-version 1012)
-  (allow mach-lookup (global-name "com.apple.FontServer")))
-
-; To allow accessing downloaded and other hidden fonts in
-; /System/Library/Asssets/com_apple_MobileAsset_Font*.
-; (https://crbug.com/662686)
-(allow file-read* (extension "com.apple.app-sandbox.read"))
diff --git a/services/ui/public/cpp/tests/gpu_unittest.cc b/services/ui/public/cpp/tests/gpu_unittest.cc
index f470bb1..26bb946c 100644
--- a/services/ui/public/cpp/tests/gpu_unittest.cc
+++ b/services/ui/public/cpp/tests/gpu_unittest.cc
@@ -9,6 +9,7 @@
 #include "base/run_loop.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/test/scoped_task_environment.h"
+#include "build/build_config.h"
 #include "gpu/config/gpu_feature_info.h"
 #include "gpu/config/gpu_info.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
@@ -36,8 +37,12 @@
       const EstablishGpuChannelCallback& callback) override {
     constexpr int client_id = 1;
     mojo::ScopedMessagePipeHandle handle;
-    if (request_will_succeed_)
-      handle = std::move(mojo::MessagePipe().handle0);
+    if (request_will_succeed_) {
+      mojo::MessagePipe message_pipe;
+      handle = std::move(message_pipe.handle0);
+      gpu_channel_handle_ = std::move(message_pipe.handle1);
+    }
+
     callback.Run(client_id, std::move(handle), gpu::GPUInfo(),
                  gpu::GpuFeatureInfo());
   }
@@ -62,6 +67,9 @@
   bool request_will_succeed_ = true;
   mojo::BindingSet<mojom::Gpu> bindings_;
 
+  // Closing this handle will result in GpuChannelHost being lost.
+  mojo::ScopedMessagePipeHandle gpu_channel_handle_;
+
   DISALLOW_COPY_AND_ASSIGN(TestGpuImpl);
 };
 
diff --git a/services/ui/public/interfaces/arc.mojom b/services/ui/public/interfaces/arc.mojom
index 4bb599c3..12af2d90 100644
--- a/services/ui/public/interfaces/arc.mojom
+++ b/services/ui/public/interfaces/arc.mojom
@@ -6,14 +6,9 @@
 
 import "components/arc/common/protected_buffer_manager.mojom";
 import "components/arc/common/video_decode_accelerator.mojom";
-import "components/arc/common/video_decode_accelerator_deprecated.mojom";
 import "components/arc/common/video_encode_accelerator.mojom";
 
 interface Arc {
-  // Create a new VideoDecodeAcceleratorDepreacted and binds it to |vda|.
-  CreateVideoDecodeAcceleratorDeprecated(
-      arc.mojom.VideoDecodeAcceleratorDeprecated& vda);
-
   // Create a new VideoDecodeAccelerator and binds it to |vda|.
   CreateVideoDecodeAccelerator(arc.mojom.VideoDecodeAccelerator& vda);
 
diff --git a/services/ui/ws/arc_client.cc b/services/ui/ws/arc_client.cc
index a4b0d8dd..a758246 100644
--- a/services/ui/ws/arc_client.cc
+++ b/services/ui/ws/arc_client.cc
@@ -15,12 +15,6 @@
 ArcClient::~ArcClient() {}
 
 // mojom::Arc overrides:
-void ArcClient::CreateVideoDecodeAcceleratorDeprecated(
-    arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
-  gpu_service_->CreateArcVideoDecodeAcceleratorDeprecated(
-      std::move(vda_request));
-}
-
 void ArcClient::CreateVideoDecodeAccelerator(
     arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
   gpu_service_->CreateArcVideoDecodeAccelerator(std::move(vda_request));
diff --git a/services/ui/ws/arc_client.h b/services/ui/ws/arc_client.h
index b3142783..56e3fe6 100644
--- a/services/ui/ws/arc_client.h
+++ b/services/ui/ws/arc_client.h
@@ -25,9 +25,6 @@
 
  private:
   // mojom::Arc overrides:
-  void CreateVideoDecodeAcceleratorDeprecated(
-      arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) override;
-
   void CreateVideoDecodeAccelerator(
       arc::mojom::VideoDecodeAcceleratorRequest vda_request) override;
 
diff --git a/services/ui/ws/test_gpu_host.cc b/services/ui/ws/test_gpu_host.cc
index 32e5dad4..add5be0 100644
--- a/services/ui/ws/test_gpu_host.cc
+++ b/services/ui/ws/test_gpu_host.cc
@@ -14,7 +14,10 @@
 void TestGpuHost::CreateFrameSinkManager(
     viz::mojom::FrameSinkManagerParamsPtr params) {
   frame_sink_manager_ = std::make_unique<viz::TestFrameSinkManagerImpl>();
-  frame_sink_manager_->BindRequest(std::move(params->frame_sink_manager));
+  viz::mojom::FrameSinkManagerClientPtr client(
+      std::move(params->frame_sink_manager_client));
+  frame_sink_manager_->BindRequest(std::move(params->frame_sink_manager),
+                                   std::move(client));
 }
 
 }  // namespace ws
diff --git a/services/viz/privileged/interfaces/gl/gpu_service.mojom b/services/viz/privileged/interfaces/gl/gpu_service.mojom
index 1fbad7f..528698ed 100644
--- a/services/viz/privileged/interfaces/gl/gpu_service.mojom
+++ b/services/viz/privileged/interfaces/gl/gpu_service.mojom
@@ -6,7 +6,6 @@
 
 import "components/arc/common/protected_buffer_manager.mojom";
 import "components/arc/common/video_decode_accelerator.mojom";
-import "components/arc/common/video_decode_accelerator_deprecated.mojom";
 import "components/arc/common/video_encode_accelerator.mojom";
 import "gpu/ipc/common/gpu_info.mojom";
 import "gpu/ipc/common/memory_stats.mojom";
@@ -29,10 +28,6 @@
   // If no channel can be identified, do nothing.
   CloseChannel(int32 client_id);
 
-  // Create a new ARC VideoDecodeAcceleratorDeprecated and binds it to |vda|.
-  CreateArcVideoDecodeAcceleratorDeprecated(
-      arc.mojom.VideoDecodeAcceleratorDeprecated& vda);
-
   // Create a new ARC VideoDecodeAccelerator and binds it to |vda|.
   CreateArcVideoDecodeAccelerator(arc.mojom.VideoDecodeAccelerator& vda);
 
diff --git a/services/viz/public/cpp/compositing/struct_traits_unittest.cc b/services/viz/public/cpp/compositing/struct_traits_unittest.cc
index c442cea8..8bb84dd 100644
--- a/services/viz/public/cpp/compositing/struct_traits_unittest.cc
+++ b/services/viz/public/cpp/compositing/struct_traits_unittest.cc
@@ -607,12 +607,11 @@
 TEST_F(StructTraitsTest, ReturnedResource) {
   const RenderPassId id = 1337u;
   const gpu::CommandBufferNamespace command_buffer_namespace = gpu::IN_PROCESS;
-  const int32_t extra_data_field = 0xbeefbeef;
   const gpu::CommandBufferId command_buffer_id(
       gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef));
   const uint64_t release_count = 0xdeadbeefdead;
-  gpu::SyncToken sync_token(command_buffer_namespace, extra_data_field,
-                            command_buffer_id, release_count);
+  gpu::SyncToken sync_token(command_buffer_namespace, command_buffer_id,
+                            release_count);
   sync_token.SetVerifyFlush();
   const int count = 1234;
   const bool lost = true;
@@ -1085,7 +1084,6 @@
   const int8_t mailbox_name[GL_MAILBOX_SIZE_CHROMIUM] = {
       0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2};
   const gpu::CommandBufferNamespace command_buffer_namespace = gpu::IN_PROCESS;
-  const int32_t extra_data_field = 0xbeefbeef;
   const gpu::CommandBufferId command_buffer_id(
       gpu::CommandBufferId::FromUnsafeValue(0xdeadbeef));
   const uint64_t release_count = 0xdeadbeefdeadL;
@@ -1097,9 +1095,8 @@
 
   gpu::MailboxHolder mailbox_holder;
   mailbox_holder.mailbox.SetName(mailbox_name);
-  mailbox_holder.sync_token =
-      gpu::SyncToken(command_buffer_namespace, extra_data_field,
-                     command_buffer_id, release_count);
+  mailbox_holder.sync_token = gpu::SyncToken(command_buffer_namespace,
+                                             command_buffer_id, release_count);
   mailbox_holder.sync_token.SetVerifyFlush();
   mailbox_holder.texture_target = texture_target;
   TransferableResource input;
@@ -1243,7 +1240,7 @@
       gfx::ColorSpace::CreateDisplayP3D65();
   const int8_t mailbox_name[GL_MAILBOX_SIZE_CHROMIUM] = {
       0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 3};
-  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
+  gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
                             gpu::CommandBufferId::FromUnsafeValue(0x123),
                             71234838);
   sync_token.SetVerifyFlush();
diff --git a/services/viz/public/interfaces/hit_test/input_target_client.mojom b/services/viz/public/interfaces/hit_test/input_target_client.mojom
index dadabbce..68f5bb40 100644
--- a/services/viz/public/interfaces/hit_test/input_target_client.mojom
+++ b/services/viz/public/interfaces/hit_test/input_target_client.mojom
@@ -7,5 +7,18 @@
 interface InputTargetClient {
 
   // Returns the FrameSinkId of the frame that the given point belongs to.
+  // When switches::IsMusHostingViz() is true this is the FrameSinkId for the
+  // target frame. Otherwise, FrameSinkId can be:
+  // a) the ProcessID/RoutingID of a RenderFrameImpl containing the point,
+  //    which is not necessarily a root frame; or
+  // b) the ProcessID/RoutingID of a RenderFrameProxy corresponding to an
+  //    OOPIF. This can be translated to the actual OOPIF's FrameSinkId
+  //    in the browser process by obtaining the current_frame_host() off
+  //    of the RenderFrameHostManager that owns the identified
+  //    RenderFrameProxyHost.
+  // TODO(kenrb, fsamuel): It isn't clear that this will work for the
+  // IsMusHostingViz() case because not all frames correspond to a window.
+  // Should the implementation be changed to guarantee that it returns the
+  // FrameSinkId for either the local frame root or an OOPIF?
   FrameSinkIdAt(gfx.mojom.Point point) => (FrameSinkId id);
 };
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 12496078..8217e3c 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -232,10 +232,6 @@
 #define SK_SUPPORT_LEGACY_ADOBE_XYZ
 #endif
 
-#ifndef SK_LEGACY_HIGH_QUALITY_SCALING_CLAMP
-#define SK_LEGACY_HIGH_QUALITY_SCALING_CLAMP
-#endif
-
 // remove after rebaselining svg layout tests
 #ifndef SK_SUPPORT_LEGACY_SVG_ARC_TO
 #define SK_SUPPORT_LEGACY_SVG_ARC_TO
@@ -245,6 +241,10 @@
 #define SK_SUPPORT_LEGACY_DASH_CULL_PATH
 #endif
 
+#ifndef SK_SUPPORT_LEGACY_SERIALPROCS_REF
+#define SK_SUPPORT_LEGACY_SERIALPROCS_REF
+#endif
+
 ///////////////////////// Imported from BUILD.gn and skia_common.gypi
 
 /* In some places Skia can use static initializers for global initialization,
diff --git a/testing/android/empty_apk/AndroidManifest.xml b/testing/android/empty_apk/AndroidManifest.xml
index 610dcdd..cc5ee70 100644
--- a/testing/android/empty_apk/AndroidManifest.xml
+++ b/testing/android/empty_apk/AndroidManifest.xml
@@ -5,4 +5,5 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="{{package}}">
+  <application></application>
 </manifest>
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json
index a94b92f1..d62cc53 100644
--- a/testing/buildbot/chromium.android.json
+++ b/testing/buildbot/chromium.android.json
@@ -4945,7 +4945,7 @@
               "name": "shard #${SHARD_INDEX} logcats"
             }
           ],
-          "shards": 2
+          "shards": 3
         },
         "test": "net_unittests"
       },
@@ -6423,7 +6423,7 @@
               "name": "shard #${SHARD_INDEX} logcats"
             }
           ],
-          "shards": 2
+          "shards": 3
         },
         "test": "net_unittests"
       },
@@ -7857,7 +7857,7 @@
               "name": "shard #${SHARD_INDEX} logcats"
             }
           ],
-          "shards": 2
+          "shards": 3
         },
         "test": "net_unittests"
       },
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json
index b68284d..ad76419 100644
--- a/testing/buildbot/chromium.gpu.fyi.json
+++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -13806,26 +13806,6 @@
         },
         "test": "video_decode_accelerator_unittest",
         "use_xvfb": false
-      },
-      {
-        "args": [
-          "--use-angle=gl",
-          "--use-test-data-path",
-          "--test_video_data=test-25fps.h264:320:240:250:258:::1"
-        ],
-        "name": "video_decode_accelerator_gl_unittest",
-        "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "gpu": "8086:5912",
-              "os": "Windows-10",
-              "pool": "Chrome-GPU"
-            }
-          ]
-        },
-        "test": "video_decode_accelerator_unittest",
-        "use_xvfb": false
       }
     ],
     "isolated_scripts": [
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json
index 9804750..97188f39 100644
--- a/testing/buildbot/chromium.linux.json
+++ b/testing/buildbot/chromium.linux.json
@@ -571,6 +571,18 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter"
+        ],
+        "name": "network_service_browser_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 5
+        },
+        "test": "browser_tests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.browser_tests.filter"
         ],
@@ -663,6 +675,17 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter"
+        ],
+        "name": "network_service_content_browsertests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "content_browsertests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.content_browsertests.filter"
         ],
@@ -1276,6 +1299,18 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter"
+        ],
+        "name": "network_service_browser_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 5
+        },
+        "test": "browser_tests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.browser_tests.filter"
         ],
@@ -1368,6 +1403,17 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter"
+        ],
+        "name": "network_service_content_browsertests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "content_browsertests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.content_browsertests.filter"
         ],
@@ -1895,6 +1941,18 @@
         "test": "browser_tests"
       },
       {
+        "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter"
+        ],
+        "name": "network_service_browser_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 5
+        },
+        "test": "browser_tests"
+      },
+      {
         "swarming": {
           "can_use_on_swarming_builders": true
         },
@@ -1950,6 +2008,17 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter"
+        ],
+        "name": "network_service_content_browsertests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "content_browsertests"
+      },
+      {
+        "args": [
           "--enable-viz",
           "--test-launcher-filter-file=../../testing/buildbot/filters/viz.content_browsertests.filter"
         ],
diff --git a/testing/buildbot/chromium.perf.json b/testing/buildbot/chromium.perf.json
index 219e69d..69307f7 100644
--- a/testing/buildbot/chromium.perf.json
+++ b/testing/buildbot/chromium.perf.json
@@ -5932,6 +5932,26 @@
         }
       },
       {
+        "args": [],
+        "isolate_name": "media_perftests",
+        "name": "media_perftests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "id": "build74-b1--device7",
+              "os": "Android",
+              "pool": "Chrome-perf"
+            }
+          ],
+          "expiration": 36000,
+          "hard_timeout": 10800,
+          "ignore_task_failure": false,
+          "io_timeout": 600,
+          "upload_test_results": true
+        }
+      },
+      {
         "args": [
           "memory.long_running_idle_gmail_background_tbmv2",
           "-v",
diff --git a/testing/buildbot/chromium.sandbox.json b/testing/buildbot/chromium.sandbox.json
index 6714234..64a8dec 100644
--- a/testing/buildbot/chromium.sandbox.json
+++ b/testing/buildbot/chromium.sandbox.json
@@ -90,6 +90,18 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter"
+        ],
+        "name": "network_service_browser_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 5
+        },
+        "test": "browser_tests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.browser_tests.filter"
         ],
@@ -162,6 +174,17 @@
       },
       {
         "args": [
+          "--enable-features=NetworkService",
+          "--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter"
+        ],
+        "name": "network_service_content_browsertests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "content_browsertests"
+      },
+      {
+        "args": [
           "--site-per-process",
           "--test-launcher-filter-file=../../testing/buildbot/filters/site-per-process.content_browsertests.filter"
         ],
diff --git a/testing/buildbot/chromium.swarm.json b/testing/buildbot/chromium.swarm.json
index ad735403..bb33efe 100644
--- a/testing/buildbot/chromium.swarm.json
+++ b/testing/buildbot/chromium.swarm.json
@@ -207,44 +207,79 @@
     "gtest_tests": [
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "2"
+            }
+          ]
         },
         "test": "base_unittests"
       },
       {
         "swarming": {
           "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "8"
+            }
+          ],
           "shards": 2
         },
         "test": "browser_tests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "8"
+            }
+          ]
         },
         "test": "content_browsertests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "2"
+            }
+          ]
         },
         "test": "content_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "8"
+            }
+          ]
         },
         "test": "interactive_ui_tests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "8"
+            }
+          ]
         },
         "test": "net_unittests"
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "2"
+            }
+          ]
         },
         "test": "unit_tests"
       }
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
index 412062b4..fcd5cbf9 100644
--- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -845,6 +845,11 @@
 -PPAPINaClPNaClNonSfiTest.FileRef2
 -PPAPINaClPNaClNonSfiTest.URLLoader1
 
+# Disabled for first phase of extension system shift; will be re-enabled in
+# https://chromium-review.googlesource.com/c/chromium/src/+/776017.
+-ExtensionApiTest.CookiesEventsSpanning
+-ExtensionApiTest.CookiesEvents
+
 # Prevent tests from making real network requests.
 # https://crbug.com/793899
 -ExtensionApiTest.DoNotOpenUninstallUrlForBlacklistedExtensions
diff --git a/testing/buildbot/filters/viz.browser_tests.filter b/testing/buildbot/filters/viz.browser_tests.filter
index 7acff7c..f44cf05 100644
--- a/testing/buildbot/filters/viz.browser_tests.filter
+++ b/testing/buildbot/filters/viz.browser_tests.filter
@@ -1,21 +1,71 @@
+# FrameWatcher::WaitFrames Doesn't Work in Viz crbug.com/785013
+-WebViewTests/WebViewFocusTest.TouchFocusesEmbedder/0
+
+# HostFrameSinkManager::CreateRootCompositorFrameSink Crash crbug.com/796575
+-ForceMaximizeOnFirstRunTest.*TwoRuns
+-ForceMaximizePolicyFalseTest.GeneralFirstRun
+-ShelfAppBrowserTest.LaunchAppFromDisplayWithoutFocus0
+-ShelfAppBrowserTest.LaunchAppFromDisplayWithoutFocus1
+
+# PictureLayerTilingSet::ComputeSkewport crash crbug.com/796594
+-LoginFeedbackTest.Basic
+
+# Tab Capture is still in development: crbug.com/754864
+-CastStreamingApiTestWithPixelOutput.EndToEnd
+-ChromeScreenshotGrabberBrowserTest.TakeScreenshot
+-TabCaptureApiPixelTest.EndToEndThroughWebRTC
+-TabCaptureApiPixelTest.EndToEndWithoutRemoting
+-TabCaptureApiPixelTest.OffscreenTabEndToEnd
+-TabCaptureApiPixelTest.OffscreenTabEvilTests
+
+# WaitForChildFrameSurfaceReady crashes crbug.com/787945
+-WebViewTests/WebViewTest.InterstitialPageFocusedWidget/1
+-WebViewTests/WebViewTest.ReloadAfterCrash/1
+
+# WebViewBrowserTest::ScrollWaiter Doesn't Work in Viz crbug.com/796336
+-WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/0
+-WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/1
+-WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/2
+-WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/3
+
+# FrameSinkManagerImpl::RegisterFrameSinkHierarchy Crash crbug.com/796344
+# Linux and Windows failures
+-WebViewTests/WebViewTest.Shim_TestAssignSrcAfterCrash/0
+-WebViewTests/WebViewTest.Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView/0
+-WebViewTests/WebViewTest.Shim_TestReloadAfterTerminate/0
+-WebViewTests/WebViewTest.Shim_TestTerminateAfterExit/0
+
+# Windows only failures
+-ExtensionApiTabTest.TabsOnUpdated
+
+# Need Software compositing fallback: crbug.com/730660
+# Linux and Windows failures
+-CloudPrintPolicyTest.NormalPassedFlag
+-HostedAppTest.*
+-NativeBindingsApiTest.SimpleEndToEndTest
+-PDFExtensionClipboardTest.CombinedShiftArrowPresses
+-PDFExtensionClipboardTest.IndividualShiftLeftArrowPresses
+-PDFExtensionTest.ContextMenuCoordinates
+-PluginPowerSaverBrowserTest.*
+-PolicyMakeDefaultBrowserTest.MakeDefaultDisabled
+-PopupTrackerBrowserTest.ControlClick_HasTracker
+-PopupTrackerBrowserTest.ShiftClick_HasTracker
+-SuperfishSSLUITest.SuperfishInterstitial/0
+-SuperfishSSLUITest.SuperfishInterstitialDisabled/0
+-ThumbnailTest.ShouldCaptureOnNavigatingAwayExplicitWait
+-ThumbnailTest.ShouldCaptureOnNavigatingAwaySlowPageLoad
+-ThumbnailTest.ShouldContainProperContentIfCapturedOnNavigatingAway
+-ThumbnailTest.ShouldContainProperContentIfCapturedOnTabSwitch
+
+# Windows only failures
 -AllForms/FormStructureBrowserTest.DataDrivenHeuristics/118
--AppApiTest.AppProcessBackgroundInstances
--AppApiTest.ClientRedirectToAppFromExtension
--AppApiTest.NavigateIntoAppProcess
--AppApiTest.OpenWebPopupFromWebIframe
--AppApiTest.ReloadIntoAppProcess
--AppApiTest.ReloadIntoAppProcessWithJavaScript
--AppApiTest.SameBrowsingInstanceAfterSwap
--AppApiTest.ServerRedirectToAppFromExtension
+-AppApiTest.*
 -BlockedAppApiTest.OpenAppFromIframe
 -BookmarkBrowsertest.HideStarOnNonbookmarkedInterstitial
 -BrowserActionApiTest.BrowserActionOpenPopupOnPopup
 -BrowserTest.SadTabCancelsDialogs
 -BrowserTest.ShouldShowLocationBar
--CaptivePortalBrowserTest.InterstitialTimerNavigateAwayWhileLoading
--CaptivePortalBrowserTest.InterstitialTimerNavigateWhileLoading_EndWithCaptivePortalInterstitial
--CaptivePortalBrowserTest.InterstitialTimerNavigateWhileLoading_EndWithSSLInterstitial
--CaptivePortalBrowserTest.InterstitialTimerReloadWhileLoading
+-CaptivePortalBrowserTest.*
 -CastStreamingApiTestWithPixelOutput.EndToEnd
 -CertificateReportingServiceBrowserTest.Delayed_Reset/0
 -CertificateReportingServiceBrowserTest.DisableSafebrowsing/0
@@ -35,10 +85,9 @@
 -ContextMenuBrowserTest.OpenLinkInProfile
 -CrossOriginXHR.AllURLs
 -CrossOriginXHR.ContentScript
--DevToolsAutoOpenerTest.TestAutoOpenForTabs
 -DidChangeVisibleSecurityStateTest.DidChangeVisibleSecurityStateObserver
 -DomainReliabilityBrowserTest.UploadAtShutdown
--ErrorPageTest.DNSError_GoBack2AndForward
+-DownloadTest.DownloadCrossDomainReferrerPolicy
 -ExecuteScriptApiTest.ExecuteScriptBadEncoding
 -ExecuteScriptApiTest.ExecuteScriptBasic
 -ExecuteScriptApiTest.ExecuteScriptByFrameId
@@ -49,19 +98,14 @@
 -ExecuteScriptApiTest.RemovedFrames
 -ExtensionApiNewTabTest.Tabs
 -ExtensionApiTabTest.TabConnect
--ExtensionApiTabTest.TabHighlight
--ExtensionApiTabTest.Tabs2
--ExtensionApiTabTest.TabsOnUpdated
 -ExtensionBrowserTest.PromptToReEnableExtensionsOnNavigation
 -ExtensionTabsTest.GetAllWindows
 -ExtensionTabsTest.GetAllWindowsAllTypes
--ForceMaximizePolicyFalseTest.GeneralFirstRun
 -GeolocationBrowserTest.CancelPermissionForFrame
 -GeolocationBrowserTest.IFramesWithCachedPosition
 -GeolocationBrowserTest.IFramesWithFreshPosition
 -GeolocationBrowserTest.NoPromptBeforeStart
 -HostedAppProcessModelTest.IframeNavigationsInsideHostedApp/0
--HostedAppTest.*
 -IncognitoApiTest.IncognitoYesScript
 -IsolatedAppTest.CookieIsolation
 -IsolatedAppTest.CrossProcessClientRedirect
@@ -71,7 +115,6 @@
 -JavaScriptBindings/MessagingApiTest.MessagingInterstitial/0
 -JavaScriptBindings/MessagingApiTest.MessagingNoBackground/0
 -LocalNTPTest.EmbeddedSearchAPIExposesStaticFunctions
--LoginFeedbackTest.Basic
 -LoginPromptBrowserTest.ShouldNotProceedExistingInterstitial
 -LoginPromptBrowserTest.ShouldReplaceExistingInterstitialWhenNavigated
 -MediaRouterUIBrowserTest.OpenDialogFromAppMenu
@@ -80,30 +123,17 @@
 -NativeBindings/MessagingApiTest.Messaging/0
 -NativeBindings/MessagingApiTest.MessagingInterstitial/0
 -NativeBindings/MessagingApiTest.MessagingNoBackground/0
--NativeBindingsApiTest.SimpleEndToEndTest
 -OmniboxApiTest.OnInputEntered
--PDFExtensionClipboardTest.CombinedShiftArrowPresses
--PDFExtensionClipboardTest.IndividualShiftLeftArrowPresses
--PDFExtensionTest.ContextMenuCoordinates
--PageLoadMetricsBrowserTest.DocumentWriteAsync
--PageLoadMetricsBrowserTest.DocumentWriteBlock
--PageLoadMetricsBrowserTest.DocumentWriteReload
--PageLoadMetricsBrowserTest.UseCounterFeaturesInIframes
+-PageLoadMetricsBrowserTest.*
 -PasswordManagerBrowserTestBase.SlowPageFill
+-PaymentRequestModifiersTest.ModifierAppliedIfApplicableSelectedInstrumentWithCreditSupportedType
 -PlatformAppBrowserTest.Isolation
--PluginPowerSaverBrowserTest.*
--PolicyMakeDefaultBrowserTest.MakeDefaultDisabled
 -PolicyTest.CertificateTransparencyEnforcementDisabledForUrls
 -PolicyTest.SSLErrorOverridingAllowed
 -PolicyTest.SSLErrorOverridingDisallowed
 -PolicyTest.SafeBrowsingExtendedReportingOptInAllowed
--PopupTrackerBrowserTest.ControlClick_HasTracker
--PopupTrackerBrowserTest.ShiftClick_HasTracker
 -PredictorBrowserTest.CrossSiteRedirectPredictionWithNoPathDifferentHostName
--ProcessManagementTest.ProcessOverflow
 -ProcessManagerBrowserTest.HostedAppAlerts
--ProcessMemoryMetricsEmitterTest.FetchDuringTrace
--ProcessMemoryMetricsEmitterTest.ForegroundAndBackgroundPages
 -ProfileBrowserTest.SendHPKPReport
 -ProfileBrowserTest.SendHPKPReportServerHangs
 -ReferrerPolicyTest.ContextMenuRedirect
@@ -130,52 +160,26 @@
 -ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.BackgroundPageIsWokenIfAsleep/0
 -ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.FetchArbitraryPaths/0
 -ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.ServiceWorkerSuspensionOnExtensionUnload/0
--ShelfAppBrowserTest.LaunchAppFromDisplayWithoutFocus0
--ShelfAppBrowserTest.LaunchAppFromDisplayWithoutFocus1
--SmartSessionRestoreTest.*CorrectLoadingOrder
 -SubresourceFilterPopupBrowserTest.BlockOpenURLFromTab
 -SuperfishSSLUITest.NoSuperfishRecorded/0
--SuperfishSSLUITest.SuperfishInterstitial/0
--SuperfishSSLUITest.SuperfishInterstitialDisabled/0
 -SuperfishSSLUITest.SuperfishRecorded/0
 -SupervisedUserNavigationThrottleTest.DontBlockSubFrame
--TabCaptureApiPixelTest.EndToEndThroughWebRTC
--TabCaptureApiPixelTest.EndToEndWithoutRemoting
--TabCaptureApiPixelTest.OffscreenTabEndToEnd
--TabCaptureApiPixelTest.OffscreenTabEvilTests
 -TaskManagerBrowserTest.NoticeHostedAppTabAfterReload
 -TaskManagerBrowserTest.NoticeHostedAppTabBeforeReload
 -TaskManagerBrowserTest.NoticeHostedAppTabChanges
 -TaskManagerViewTest.SelectionConsistency
 -TemplateURLScraperTest.ScrapeWithOnSubmit
--ThumbnailTest.ShouldCaptureOnNavigatingAwayExplicitWait
--ThumbnailTest.ShouldCaptureOnNavigatingAwaySlowPageLoad
--ThumbnailTest.ShouldContainProperContentIfCapturedOnNavigatingAway
--ThumbnailTest.ShouldContainProperContentIfCapturedOnTabSwitch
 -TranslateLanguageBrowserTest.TranslateAndRevert
 -WebBluetoothPolicyTest.Block
 -WebBluetoothTest.BlocklistShouldBlock
 -WebBluetoothTest.KillSwitchShouldBlock
 -WebBluetoothTest.WebBluetoothAfterCrash
--WebSocketBrowserTest.SSLConnectionLimit
 -WebSocketBrowserTest.SecureWebSocketSplitRecords
 -WebSocketBrowserTest.WebSocketAppliesHSTS
--WebSocketBrowserTest.WebSocketBasicAuthInHTTPSURL
 -WebUsbTest.AddRemoveDevice
 -WebUsbTest.AddRemoveDeviceEphemeral
 -WebUsbTest.RequestAndGetDevices
--WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/0
--WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/1
--WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/2
--WebViewScrollBubbling/WebViewGuestScrollTouchTest.TestGuestGestureScrollsBubble/3
--WebViewTests/WebViewFocusTest.TouchFocusesEmbedder/0
 -WebViewTests/WebViewTest.CookieIsolation/0
 -WebViewTests/WebViewTest.CookieIsolation/1
 -WebViewTests/WebViewTest.DOMStorageIsolation/0
 -WebViewTests/WebViewTest.DOMStorageIsolation/1
--WebViewTests/WebViewTest.InterstitialPageFocusedWidget/1
--WebViewTests/WebViewTest.ReloadAfterCrash/1
--WebViewTests/WebViewTest.Shim_TestAssignSrcAfterCrash/0
--WebViewTests/WebViewTest.Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView/0
--WebViewTests/WebViewTest.Shim_TestReloadAfterTerminate/0
--WebViewTests/WebViewTest.Shim_TestTerminateAfterExit/0
diff --git a/testing/buildbot/filters/viz.content_browsertests.filter b/testing/buildbot/filters/viz.content_browsertests.filter
index 1705e83..f9d917f5 100644
--- a/testing/buildbot/filters/viz.content_browsertests.filter
+++ b/testing/buildbot/filters/viz.content_browsertests.filter
@@ -58,6 +58,7 @@
 -SitePerProcessBrowserTest.SurfaceHitTestTest
 -SitePerProcessBrowserTest.TwoSubframesCreatePopupMenuWidgetsSimultaneously
 -SitePerProcessBrowserTest.ViewBoundsInNestedFrameTest
+-SitePerProcessBrowserTest.HitTestNestedFrames
 
 # Copy Surface timing out http://crbug.com/785257
 -GLAndSoftwareCompositing/CompositingRenderWidgetHostViewBrowserTest.*
diff --git a/testing/buildbot/filters/viz.content_unittests.filter b/testing/buildbot/filters/viz.content_unittests.filter
index 84be21af..e23e36f 100644
--- a/testing/buildbot/filters/viz.content_unittests.filter
+++ b/testing/buildbot/filters/viz.content_unittests.filter
@@ -25,3 +25,8 @@
 -RenderWidgetHostViewChildFrameTest.FrameEviction
 -RenderWidgetHostViewChildFrameTest.SwapCompositorFrame
 -RenderWidgetHostViewGuestSurfaceTest.TestGuestSurface
+
+# TODO(crbug.com/601869): Reflector needs to be rewritten for viz.
+-ReflectorImplTest.CheckInvertedOutputSurface
+-ReflectorImplTest.CheckNormalOutputSurface
+-WebContentsAudioInputStreamTest.MirroringOneStreamAfterTargetChange
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index c69ff89..1f98df4 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -1022,6 +1022,7 @@
       "media_perftests",
       "--single-process-tests",
       "--test-launcher-retry-limit=0",
+      "--isolated-script-test-filter=*::-*_unoptimized::*_unaligned::*unoptimized_aligned",
     ],
   },
   "load_library_perf_tests": {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl
index f3b1e77..6fd1f8a3 100644
--- a/testing/buildbot/test_suite_exceptions.pyl
+++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -2754,19 +2754,16 @@
       'KitKat Tablet Tester': {
         'swarming': {
           'hard_timeout': 1800,
-          'shards': 2,
         },
       },
       'Lollipop Phone Tester': {
         'swarming': {
           'hard_timeout': 1800,
-          'shards': 2,
         },
       },
       'Lollipop Tablet Tester': {
         'swarming': {
           'hard_timeout': 1800,
-          'shards': 2,
         },
       },
       'Marshmallow 64 bit Tester': {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl
index 5498aa6..f07f4a0 100644
--- a/testing/buildbot/test_suites.pyl
+++ b/testing/buildbot/test_suites.pyl
@@ -562,6 +562,72 @@
     'net_unittests': {},
     'unit_tests': {},
   },
+  'chromium_swarm_linux_gtests': {
+    'base_unittests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '2',
+          },
+        ],
+      },
+    },
+    'browser_tests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '8',
+          },
+        ],
+        'shards': 2,
+      },
+    },
+    'content_browsertests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '8',
+          },
+        ],
+      },
+    },
+    'content_unittests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '2',
+          },
+        ],
+      },
+    },
+    'interactive_ui_tests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '8',
+          },
+        ],
+      },
+    },
+    'net_unittests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '8',
+          },
+        ],
+      },
+    },
+    'unit_tests': {
+      'swarming': {
+        'dimension_sets': [
+          {
+            'cores': '2',
+          },
+        ],
+      },
+    },
+  },
 
   'client_v8_chromium_gtests': {
     'app_shell_unittests': {},
@@ -999,26 +1065,6 @@
     },
   },
 
-  'mojo_linux_gtests': {
-    'network_service_browser_tests': {
-      'args': [
-        '--enable-features=NetworkService',
-        '--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter',
-      ],
-      'swarming': {
-        'shards': 5,
-      },
-      'test': 'browser_tests',
-    },
-    'network_service_content_browsertests': {
-      'args': [
-        '--enable-features=NetworkService',
-        '--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter',
-      ],
-      'test': 'content_browsertests',
-    },
-  },
-
   'mojo_linux_isolated_scripts': {
     'webkit_layout_tests': {
       'args': [
@@ -1121,6 +1167,26 @@
     },
   },
 
+  'network_service_gtests': {
+    'network_service_browser_tests': {
+      'args': [
+        '--enable-features=NetworkService',
+        '--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_browser_tests.filter',
+      ],
+      'swarming': {
+        'shards': 5,
+      },
+      'test': 'browser_tests',
+    },
+    'network_service_content_browsertests': {
+      'args': [
+        '--enable-features=NetworkService',
+        '--test-launcher-filter-file=../../testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter',
+      ],
+      'test': 'content_browsertests',
+    },
+  },
+
   'linux_chromeos_rel_specific_gtests': {
     'angle_unittests': {},
     'chromevox_tests': {},
@@ -1835,6 +1901,7 @@
     'linux_flavor_specific_chromium_gtests',
     'linux_incl_clang_specific_chromium_gtests',
     'linux_specific_chromium_gtests',
+    'network_service_gtests',
     'non_android_chromium_gtests',
     'non_android_and_cast_chromium_gtests',
     'non_android_and_cast_and_chromeos_and_clang_android_mac_win_chromium_gtests',
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl
index 7ac90d9..83bc74e 100644
--- a/testing/buildbot/waterfalls.pyl
+++ b/testing/buildbot/waterfalls.pyl
@@ -1129,7 +1129,7 @@
       },
       'Mojo Linux': {
         'test_suites': {
-          'gtest_tests': 'mojo_linux_gtests',
+          'gtest_tests': 'network_service_gtests',
           'isolated_scripts': 'mojo_linux_isolated_scripts',
         },
       },
@@ -1610,7 +1610,7 @@
       },
       'Linux Swarm': {
         'test_suites': {
-           'gtest_tests': 'chromium_swarm_desktop_gtests',
+           'gtest_tests': 'chromium_swarm_linux_gtests',
         },
       },
       'Mac Swarm': {
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index e696338..2f3a233 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -142,27 +142,6 @@
             ]
         }
     ],
-    "AndroidInProductHelpContextualSearchOptIn": [
-        {
-            "platforms": [
-                "android"
-            ],
-            "experiments": [
-                {
-                    "name": "Tracking",
-                    "params": {
-                        "availability": ">=14",
-                        "event_trigger": "name:contextual_search_opt_in_iph_trigger;comparator:==0;window:90;storage:680",
-                        "event_used": "name:contextual_search_opt_in;comparator:any;window:90;storage:680",
-                        "session_rate": "<0"
-                    },
-                    "enable_features": [
-                        "IPH_ContextualSearchOptIn"
-                    ]
-                }
-            ]
-        }
-    ],
     "AndroidInProductHelpContextualSearchPromotePanelOpen": [
         {
             "platforms": [
@@ -170,12 +149,14 @@
             ],
             "experiments": [
                 {
-                    "name": "Tracking",
+                    "name": "PromotePanelOpeningExperiment2",
                     "params": {
                         "availability": ">=30",
+                        "event_1": "name:contextual_search_promote_panel_open_iph_trigger;comparator:<2;window:680;storage:680",
+                        "event_2": "name:contextual_search_panel_opened;comparator:<3;window:90;storage:90",
                         "event_trigger": "name:contextual_search_promote_panel_open_iph_trigger;comparator:==0;window:90;storage:680",
-                        "event_used": "name:contextual_search_panel_opened_for_entity;comparator:==0;window:30;storage:680",
-                        "session_rate": "<0"
+                        "event_used": "name:contextual_search_panel_opened_for_entity;comparator:==0;window:90;storage:90",
+                        "session_rate": "<1"
                     },
                     "enable_features": [
                         "IPH_ContextualSearchPromotePanelOpen"
@@ -191,13 +172,14 @@
             ],
             "experiments": [
                 {
-                    "name": "Tracking",
+                    "name": "PromoteTapExperiment2",
                     "params": {
                         "availability": ">=30",
-                        "event_1": "name:contextual_search_panel_opened;comparator:>=2;window:90;storage:680",
+                        "event_1": "name:contextual_search_panel_opened;comparator:>=2;window:90;storage:90",
+                        "event_2": "name:contextual_search_promote_tap_iph_trigger;comparator:<2;window:680;storage:680",
                         "event_trigger": "name:contextual_search_promote_tap_iph_trigger;comparator:==0;window:90;storage:680",
-                        "event_used": "name:contextual_search_panel_opened_after_tap;comparator:==0;window:30;storage:680",
-                        "session_rate": "<0"
+                        "event_used": "name:contextual_search_panel_opened_after_tap;comparator:==0;window:30;storage:90",
+                        "session_rate": "<1"
                     },
                     "enable_features": [
                         "IPH_ContextualSearchPromoteTap"
@@ -213,13 +195,15 @@
             ],
             "experiments": [
                 {
-                    "name": "Tracking",
+                    "name": "WebSearchExperiment2",
                     "params": {
                         "availability": ">=30",
-                        "event_1": "name:web_search_performed;comparator:>=2;window:90;storage:680",
+                        "event_1": "name:web_search_performed;comparator:>=1;window:90;storage:90",
+                        "event_2": "name:contextual_search_web_search_iph_trigger;comparator:<2;window:680;storage:680",
+                        "event_3": "name:contextual_search_panel_opened;comparator:>0;window:680;storage:680",
                         "event_trigger": "name:contextual_search_web_search_iph_trigger;comparator:==0;window:90;storage:680",
-                        "event_used": "name:contextual_search_panel_opened;comparator:==0;window:30;storage:680",
-                        "session_rate": "<0"
+                        "event_used": "name:contextual_search_panel_opened;comparator:==0;window:30;storage:90",
+                        "session_rate": "<1"
                     },
                     "enable_features": [
                         "IPH_ContextualSearchWebSearch"
@@ -949,7 +933,8 @@
                 {
                     "name": "Expected",
                     "params": {
-                        "contextual-search-ranker-model-url": "https://www.gstatic.com/chrome/intelligence/assist/ranker/models/contextual_search/test_ranker_model_20171109_short_words_v2.pb.bin"
+                        "contextual-search-ranker-model-url": "https://www.gstatic.com/chrome/intelligence/assist/ranker/models/contextual_search/test_ranker_model_20171109_short_words_v2.pb.bin",
+                        "enable_bar_overlap_suppression": "true"
                     },
                     "enable_features": [
                         "ContextualSearchMlTapSuppression",
@@ -2696,25 +2681,6 @@
             ]
         }
     ],
-    "PreconnectMore": [
-        {
-            "platforms": [
-                "android",
-                "chromeos",
-                "linux",
-                "mac",
-                "win"
-            ],
-            "experiments": [
-                {
-                    "name": "Enabled",
-                    "enable_features": [
-                        "PreconnectMore"
-                    ]
-                }
-            ]
-        }
-    ],
     "PreviewsClientLoFi": [
         {
             "platforms": [
@@ -3669,12 +3635,15 @@
                 {
                     "name": "Enabled",
                     "params": {
-                        "MaxBDPKbits1": "10",
-                        "MaxBDPKbits2": "5000",
-                        "MaxDelayableRequests1": "10",
-                        "MaxDelayableRequests2": "6",
-                        "MaxEffectiveConnectionType": "3G",
-                        "NonDelayableWeight": "2.0"
+                        "EffectiveConnectionType1": "Slow-2G",
+                        "EffectiveConnectionType2": "2G",
+                        "EffectiveConnectionType3": "3G",
+                        "MaxDelayableRequests1": "8",
+                        "MaxDelayableRequests2": "8",
+                        "MaxDelayableRequests3": "14",
+                        "NonDelayableWeight1": "2.0",
+                        "NonDelayableWeight2": "2.0",
+                        "NonDelayableWeight3": "2.0"
                     },
                     "enable_features": [
                         "ThrottleDelayable"
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index a2abf4a..d9d78c4 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -28,6 +28,10 @@
 # Non-interoperable behavior not worth to fix.
 crbug.com/591099 fast/text/apply-start-width-after-skipped-text.html [ Skip ]
 
+# Slow when run with LayoutNG
+crbug.com/591099 external/wpt/css/css-color/color-resolving-hsl.html [ Timeout ]
+
+
 # New passes
 crbug.com/626703 external/wpt/css/css-ui/text-overflow-021.html [ Failure ]
 crbug.com/492664 external/wpt/css/css-writing-modes/inline-block-alignment-003.xht [ Pass ]
@@ -546,10 +550,6 @@
 crbug.com/591099 crypto/subtle/hmac/cloneKey.html [ Timeout ]
 crbug.com/591099 crypto/subtle/pbkdf2/cloneKey.html [ Timeout ]
 crbug.com/591099 crypto/subtle/rsassa-pkcs1-v1_5/cloneKey.html [ Timeout ]
-crbug.com/591099 css-parser/color3_hsl.html [ Timeout ]
-crbug.com/591099 css-parser/color3_hsla_1.html [ Timeout ]
-crbug.com/591099 css-parser/color3_hsla_2.html [ Timeout ]
-crbug.com/591099 css-parser/color3_keywords.html [ Timeout ]
 crbug.com/591099 css1/basic/comments.html [ Failure ]
 crbug.com/591099 css1/basic/containment.html [ Failure ]
 crbug.com/591099 css1/basic/contextual_selectors.html [ Failure ]
@@ -2570,8 +2570,6 @@
 crbug.com/591099 external/wpt/css/css-multicol/multicol-basic-007.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-multicol/multicol-basic-008.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-multicol/multicol-break-000.xht [ Failure ]
-crbug.com/591099 external/wpt/css/css-multicol/multicol-break-001.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-multicol/multicol-clip-001.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-multicol/multicol-clip-002.xht [ Failure ]
 crbug.com/591099 external/wpt/css/css-multicol/multicol-collapsing-001.xht [ Failure ]
@@ -5631,6 +5629,8 @@
 crbug.com/591099 fast/multicol/break-after-always-bottom-margin.html [ Failure ]
 crbug.com/591099 fast/multicol/break-after-empty-set-crash.html [ Crash ]
 crbug.com/591099 fast/multicol/break-before-first-line-in-first-child.html [ Failure ]
+crbug.com/591099 fast/multicol/break-in-scrollable.html [ Failure ]
+crbug.com/591099 fast/multicol/break-properties.html [ Failure ]
 crbug.com/591099 fast/multicol/caret-range-anonymous-block-rtl.html [ Failure ]
 crbug.com/591099 fast/multicol/caret-range-anonymous-block.html [ Failure ]
 crbug.com/591099 fast/multicol/caret-range-outside-columns-rtl.html [ Failure ]
@@ -5643,7 +5643,6 @@
 crbug.com/591099 fast/multicol/client-rects-rtl.html [ Failure ]
 crbug.com/591099 fast/multicol/client-rects.html [ Failure ]
 crbug.com/591099 fast/multicol/clone-block-children-inline-mismatch-crash.html [ Crash ]
-crbug.com/591099 fast/multicol/column-break-with-balancing.html [ Failure ]
 crbug.com/591099 fast/multicol/column-count-with-rules.html [ Failure ]
 crbug.com/591099 fast/multicol/column-rules.html [ Failure ]
 crbug.com/591099 fast/multicol/columns-shorthand-parsing.html [ Failure ]
@@ -5842,7 +5841,6 @@
 crbug.com/591099 fast/multicol/newmulticol/spanner-inside-child-crash.html [ Crash ]
 crbug.com/591099 fast/multicol/newmulticol/table-cell.html [ Failure ]
 crbug.com/591099 fast/multicol/newmulticol/unresolvable-percent-max-height-2.html [ Failure ]
-crbug.com/591099 fast/multicol/one-column-with-break.html [ Failure ]
 crbug.com/591099 fast/multicol/orphaned-line-at-exact-top-of-column.html [ Failure ]
 crbug.com/591099 fast/multicol/orphans-relayout.html [ Failure ]
 crbug.com/591099 fast/multicol/out-of-flow/abspos-auto-left-right.html [ Pass ]
@@ -6838,10 +6836,10 @@
 crbug.com/591099 fragmentation/auto-scrollbar-shrink-to-fit.html [ Failure ]
 crbug.com/591099 fragmentation/avoid-break-inside-first-child-nested.html [ Failure ]
 crbug.com/591099 fragmentation/avoid-break-inside-first-child.html [ Failure ]
-crbug.com/591099 fragmentation/become-fragmented-same-widths.html [ Failure ]
 crbug.com/591099 fragmentation/block-after-float-first-child.html [ Failure ]
 crbug.com/591099 fragmentation/block-with-float-and-1-orphaned-line.html [ Failure ]
 crbug.com/591099 fragmentation/border-spacing-break-before-unbreakable-row.html [ Failure ]
+crbug.com/591099 fragmentation/break-before-first-child.html [ Failure ]
 crbug.com/591099 fragmentation/break-in-first-table-row-only.html [ Failure ]
 crbug.com/591099 fragmentation/break-in-second-table-section.html [ Failure ]
 crbug.com/591099 fragmentation/break-in-tbody-after-caption.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls b/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
index 7cfeca8..b8f9cc8 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
@@ -1,5 +1,4 @@
 crbug.com/417782 compositing/iframes/become-composited-nested-iframes.html [ Failure ]
-crbug.com/417782 compositing/iframes/iframe-composited-scrolling.html [ Pass Failure ] # Sometimes the iframe is not composited.
 crbug.com/417782 compositing/overflow/border-radius-composited-subframe.html [ Failure ] # Extra ChildContainmentLayer?
 crbug.com/417782 compositing/squashing/squash-above-fixed-1.html [ Failure ]
 crbug.com/417782 compositing/squashing/squash-above-fixed-3.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/MSANExpectations b/third_party/WebKit/LayoutTests/MSANExpectations
index 118e0b9..f1cc71a8 100644
--- a/third_party/WebKit/LayoutTests/MSANExpectations
+++ b/third_party/WebKit/LayoutTests/MSANExpectations
@@ -67,3 +67,15 @@
 crbug.com/729136 [ Linux ] webaudio/mixing.html [ Timeout ]
 
 crbug.com/739365 [ Linux ] virtual/layout_ng/fast/block/float/assert-when-moving-float.html [ Skip ]
+
+# Tests timing out on WebKit Linux Trusty MSAN
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/console-timeline.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidations.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidator-invalidations.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Pass Timeout ]
+crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint.js [ Pass Timeout ]
diff --git a/third_party/WebKit/LayoutTests/NeverFixTests b/third_party/WebKit/LayoutTests/NeverFixTests
index 8718927..c52aae4 100644
--- a/third_party/WebKit/LayoutTests/NeverFixTests
+++ b/third_party/WebKit/LayoutTests/NeverFixTests
@@ -384,6 +384,11 @@
 external/wpt/battery-status/battery-charging-manual.https.html [ WontFix ]
 external/wpt/battery-status/battery-plugging-in-manual.https.html [ WontFix ]
 external/wpt/battery-status/battery-unplugging-manual.https.html [ WontFix ]
+external/wpt/clipboard-apis/async-navigator-clipboard-basics.https.html [ WontFix ]
+external/wpt/clipboard-apis/async-write-dttext-read-dttext-manual.https.html [ WontFix ]
+external/wpt/clipboard-apis/async-write-dttext-read-text-manual.https.html [ WontFix ]
+external/wpt/clipboard-apis/async-write-text-read-dttext-manual.https.html [ WontFix ]
+external/wpt/clipboard-apis/async-write-text-read-text-manual.https.html [ WontFix ]
 external/wpt/console/console-count-logging-manual.html [ WontFix ]
 external/wpt/css/CSS2/linebox/inline-formatting-context-010b.xht [ WontFix ]
 external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-008.xht [ WontFix ]
@@ -1817,6 +1822,9 @@
 external/wpt/css/css-color/t422-rgba-onscreen-multiple-boxes-c.xht [ WontFix ]
 external/wpt/css/css-color/t425-hsla-onscreen-multiple-boxes-c.xht [ WontFix ]
 
+# Percentages are rounded incorrectly in rgb
+external/wpt/css/css-color/color-resolving.html [ WontFix ]
+
 # https://github.com/w3c/web-platform-tests/issues/8547
 external/wpt/css/mediaqueries/device-aspect-ratio-001.html [ WontFix ]
 external/wpt/css/mediaqueries/device-aspect-ratio-005.html [ WontFix ]
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests
index 082f069..eba5a299 100644
--- a/third_party/WebKit/LayoutTests/SlowTests
+++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -123,6 +123,7 @@
 crbug.com/451577 [ Win10 ] http/tests/devtools/extensions/extensions-sidebar.js [ Slow ]
 crbug.com/451577 [ Mac ] http/tests/devtools/layers/layer-canvas-log.js [ Slow ]
 crbug.com/451577 [ Mac ] http/tests/devtools/network/network-domain-filter.js [ Slow ]
+crbug.com/789111 virtual/pwa-full-code-cache/http/tests/devtools/service-workers/service-worker-v8-cache.js [ Slow ]
 
 # Random slow tests
 crbug.com/763197 [ Linux Mac ] virtual/gpu-rasterization/images/color-profile-border-radius.html [ Slow ]
@@ -136,9 +137,6 @@
 # This test is intentionally SLOW as we're waiting for a connection timeout.
 crbug.com/73609 http/tests/media/video-play-stall.html [ Slow ]
 
-# This has been Slow in Debug since added in r164270.
-crbug.com/330389 [ Debug ] css-parser/color3_hsl.html [ Slow ]
-
 # Many of the virtual animations tests are slow.
 crbug.com/311482 virtual/threaded/animations/prefixed/keyframes-unprefixed-03.html [ Slow ]
 crbug.com/243871 virtual/threaded/fast/scroll-behavior/ [ Slow ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 87413f7e..50c8833 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -97,7 +97,6 @@
 crbug.com/771643 virtual/spv175/paint/pagination/pagination-change-clip-crash.html [ Failure ]
 
 # spv175+root-layer-scrolls failures. They also fail with root-layer-scrolls without enable-slimming-paint-v175.
-crbug.com/417782 virtual/spv175/compositing/iframes/iframe-composited-scrolling.html [ Failure Pass ]
 crbug.com/417782 virtual/spv175/compositing/overflow/border-radius-composited-subframe.html [ Failure ]
 crbug.com/417782 virtual/spv175/paint/invalidation/window-resize/window-resize-vertical-writing-mode.html [ Crash ]
 
@@ -1619,9 +1618,12 @@
 crbug.com/736319 [ Linux Mac ] external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-006a.html [ Failure Pass ]
 crbug.com/736319 [ Linux Mac ] external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-007.html [ Failure Pass ]
 
-crbug.com/752449 external/wpt/css/css-fonts/matching/fixed-stretch-style-over-weight.html [ Failure ]
-crbug.com/752449 external/wpt/css/css-fonts/matching/stretch-distance-over-weight-distance.html [ Failure ]
-crbug.com/752449 external/wpt/css/css-fonts/matching/style-ranges-over-weight-direction.html [ Failure ]
+crbug.com/752449 [ Mac10.12 ] external/wpt/css/css-fonts/matching/fixed-stretch-style-over-weight.html [ Failure ]
+crbug.com/752449 [ Mac10.12 ] external/wpt/css/css-fonts/matching/stretch-distance-over-weight-distance.html [ Failure ]
+crbug.com/752449 [ Mac10.12 ] external/wpt/css/css-fonts/matching/style-ranges-over-weight-direction.html [ Failure ]
+crbug.com/796619 [ Win10 ] external/wpt/css/css-fonts/matching/fixed-stretch-style-over-weight.html [ Failure ]
+crbug.com/796619 [ Win10 ] external/wpt/css/css-fonts/matching/stretch-distance-over-weight-distance.html [ Failure ]
+crbug.com/796619 [ Win10 ] external/wpt/css/css-fonts/matching/style-ranges-over-weight-direction.html [ Failure ]
 
 # These need a rebaseline due crbug.com/504745 on Windows when they are activated again.
 crbug.com/521124 crbug.com/410145 [ Win7 ] fast/css/font-weight-1.html [ Pass Failure ]
@@ -1996,18 +1998,17 @@
 crbug.com/626703 external/wpt/css/css-grid/alignment/grid-gutters-010.html [ Failure ]
 crbug.com/626703 external/wpt/css/css-writing-modes/table-cell-001.html [ Failure ]
 crbug.com/626703 external/wpt/css/css-writing-modes/table-cell-002.html [ Failure ]
-crbug.com/626703 [ Linux Win ] external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp.html [ Timeout ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-fonts/font-synthesis-01.html [ Failure ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-fonts/font-synthesis-02.html [ Failure ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-fonts/font-synthesis-03.html [ Failure ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-fonts/font-synthesis-04.html [ Failure ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-fonts/font-synthesis-05.html [ Failure ]
-crbug.com/626703 [ Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/requestidlecallback/idlharness.html [ Timeout ]
-crbug.com/626703 [ Android Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/acid/acid2/reftest.html [ Failure ]
-crbug.com/626703 [ Android Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/acid/acid3/test.html [ Failure ]
-crbug.com/626703 [ Android Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-ui/cursor-auto-006.html [ Skip ]
-crbug.com/626703 [ Android Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/css/css-ui/cursor-auto-007.html [ Skip ]
-crbug.com/626703 [ Android Linux Mac10.10 Mac10.11 Mac10.12 Retina Win ] external/wpt/requestidlecallback/callback-timeout-when-busy.html [ Timeout ]
+crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-01.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-02.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-03.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-04.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-05.html [ Failure ]
+crbug.com/626703 external/wpt/requestidlecallback/idlharness.html [ Timeout ]
+crbug.com/626703 external/wpt/acid/acid2/reftest.html [ Failure ]
+crbug.com/626703 external/wpt/acid/acid3/test.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-ui/cursor-auto-006.html [ Skip ]
+crbug.com/626703 external/wpt/css/css-ui/cursor-auto-007.html [ Skip ]
+crbug.com/626703 external/wpt/requestidlecallback/callback-timeout-when-busy.html [ Timeout ]
 crbug.com/626703 [ Android Linux Mac ] external/wpt/html/semantics/embedded-content/the-object-element/object-events.html [ Timeout ]
 crbug.com/626703 [ Android Win ] external/wpt/css/css-fonts/font-kerning-02.html [ Failure ]
 crbug.com/626703 external/wpt/2dcontext/building-paths/canvas_complexshapes_arcto_001.htm [ Failure ]
@@ -2575,7 +2576,6 @@
 crbug.com/664450 http/tests/devtools/console/console-on-animation-worklet.js [ Skip ]
 
 # Fail when run with --enable-wptserve due to data: URLs treated as cross-origin: (crbug.com/508730)
-crbug.com/508730 external/wpt/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html [ Failure ]
 crbug.com/508730 crbug.com/472300 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html [ Failure ]
 crbug.com/508730 crbug.com/472300 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime.html [ Failure ]
 crbug.com/508730 crbug.com/472300 external/wpt/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id.html [ Failure ]
@@ -3159,6 +3159,7 @@
 crbug.com/736056 [ Mac ] external/wpt/encoding/legacy-mb-japanese [ Timeout Pass ]
 crbug.com/736056 [ Mac Win7 ] external/wpt/encoding/legacy-mb-korean [ Timeout Pass ]
 crbug.com/736056 [ Mac ] external/wpt/encoding/legacy-mb-tchinese [ Timeout Pass ]
+crbug.com/736056 external/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp.html [ Timeout ]
 crbug.com/736056 external/wpt/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html [ Timeout Pass ]
 
 # Known issue: module script errors are not derteministic
@@ -3489,19 +3490,8 @@
 crbug.com/669329 http/tests/devtools/tracing/timeline-js/timeline-runtime-stats.js [ Pass Failure Crash ]
 crbug.com/669329 virtual/threaded/http/tests/devtools/tracing/timeline-js/timeline-runtime-stats.js [ Pass Failure Crash ]
 
-# Tests timing out on WebKit Linux Trusty MSAN
-crbug.com/760543 [ Linux Release ] http/tests/devtools/profiler/heap-snapshot-inspect-dom-wrapper.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/console-timeline.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidations.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidator-invalidations.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Pass Timeout ]
-crbug.com/760543 [ Linux Release ] http/tests/devtools/tracing/timeline-paint/timeline-paint.js [ Pass Timeout ]
+crbug.com/760543 http/tests/devtools/profiler/heap-snapshot-inspect-dom-wrapper.js [ Pass Timeout ]
+crbug.com/760543 http/tests/devtools/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.js [ Pass Timeout ]
 
 crbug.com/769347 [ Mac ] fast/dom/inert/inert-node-is-uneditable.html [ Failure ]
 
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
new file mode 100644
index 0000000..d5d1bfb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
@@ -0,0 +1,12 @@
+Tests navigator.clipboard.readText() permission failure.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS PermissionsHelper.setPermission is defined.
+PASS navigator.clipboard is non-null.
+PASS clipboard.readText() fail (as expected).
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html
new file mode 100644
index 0000000..c089a3a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="../http/tests/resources/permissions-helper.js"></script>
+</head>
+<body>
+<script>
+description("Tests navigator.clipboard.readText() permission failure.");
+
+shouldBeDefined("PermissionsHelper.setPermission");
+
+function successCallback(access) {
+  testFailed(
+    "clipboard.readText() does not fail (even though it really should have).");
+  finishJSTest();
+}
+
+function errorCallback(error) {
+  testPassed("clipboard.readText() fail (as expected).");
+  finishJSTest();
+}
+
+window.jsTestIsAsync = true;
+
+PermissionsHelper.setPermission('clipboard-read', 'denied').then(function() {
+  shouldBeNonNull("navigator.clipboard");
+  navigator.clipboard.readText().then(successCallback, errorCallback);
+});
+
+
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
new file mode 100644
index 0000000..7751372
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
@@ -0,0 +1,12 @@
+Tests navigator.clipboard.readText() permission success.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS PermissionsHelper.setPermission is defined.
+PASS navigator.clipboard is non-null.
+PASS clipboard.readText() success (as expected).
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html
new file mode 100644
index 0000000..6f2ada9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="../http/tests/resources/permissions-helper.js"></script>
+</head>
+<body>
+<script>
+description("Tests navigator.clipboard.readText() permission success.");
+
+shouldBeDefined("PermissionsHelper.setPermission");
+
+function successCallback(access) {
+  testPassed("clipboard.readText() success (as expected).");
+  finishJSTest();
+}
+
+function errorCallback(error) {
+  testFailed(
+    "clipboard.readText() does not fail (even though we hoped it would).");
+  finishJSTest();
+}
+
+window.jsTestIsAsync = true;
+
+PermissionsHelper.setPermission('clipboard-read', 'granted').then(function() {
+  shouldBeNonNull("navigator.clipboard");
+  navigator.clipboard.readText().then(successCallback, errorCallback);
+});
+
+
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
new file mode 100644
index 0000000..15877da5e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
@@ -0,0 +1,12 @@
+Tests navigator.clipboard.writeText() permission failure.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS PermissionsHelper.setPermission is defined.
+PASS navigator.clipboard is non-null.
+PASS clipboard.writeText() fail (as expected).
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html
new file mode 100644
index 0000000..3abd9b74
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="../http/tests/resources/permissions-helper.js"></script>
+</head>
+<body>
+<script>
+description("Tests navigator.clipboard.writeText() permission failure.");
+
+shouldBeDefined("PermissionsHelper.setPermission");
+
+function successCallback(access) {
+  testFailed(
+    "clipboard.writeText() does not fail (even though it really should have).");
+  finishJSTest();
+}
+
+function errorCallback(error) {
+  testPassed("clipboard.writeText() fail (as expected).");
+  finishJSTest();
+}
+
+window.jsTestIsAsync = true;
+
+PermissionsHelper.setPermission('clipboard-write', 'denied').then(function() {
+  shouldBeNonNull("navigator.clipboard");
+  navigator.clipboard.writeText("xyz").then(successCallback, errorCallback);
+});
+
+
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
new file mode 100644
index 0000000..fbeb5e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
@@ -0,0 +1,12 @@
+Tests navigator.clipboard.writeText() permission success.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS PermissionsHelper.setPermission is defined.
+PASS navigator.clipboard is non-null.
+PASS clipboard.writeText() success (as expected).
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html
new file mode 100644
index 0000000..b0716bc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<script src="../http/tests/resources/permissions-helper.js"></script>
+</head>
+<body>
+<script>
+description("Tests navigator.clipboard.writeText() permission success.");
+
+shouldBeDefined("PermissionsHelper.setPermission");
+
+function successCallback(access) {
+  testPassed("clipboard.writeText() success (as expected).");
+  finishJSTest();
+}
+
+function errorCallback(error) {
+  testFailed(
+    "clipboard.writeText() does not fail (even though we hoped it would).");
+  finishJSTest();
+}
+
+window.jsTestIsAsync = true;
+
+PermissionsHelper.setPermission('clipboard-write', 'granted').then(function() {
+  shouldBeNonNull("navigator.clipboard");
+  navigator.clipboard.writeText("xyz").then(successCallback, errorCallback);
+});
+
+
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3-expected.txt b/third_party/WebKit/LayoutTests/css-parser/color3-expected.txt
deleted file mode 100644
index cd3dd23d..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3-expected.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-CONSOLE WARNING: line 3: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
-Color test for resources/css-parsing-tests/color3.json
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS colorTest.parseColor("") is "parse error"
-PASS colorTest.parseColor(" /* hey */\n") is "parse error"
-FAIL colorTest.parseColor("4") should be parse error. Was rgb(0, 0, 4).
-PASS colorTest.parseColor("top") is "parse error"
-PASS colorTest.parseColor("/**/transparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("transparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor(" transparent\n") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("TransParent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("currentColor") is "currentColor"
-PASS colorTest.parseColor("CURRENTcolor") is "currentColor"
-PASS colorTest.parseColor("current-Color") is "parse error"
-PASS colorTest.parseColor("black") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("white") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("fuchsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("cyan") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("CyAn") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("#") is "parse error"
-PASS colorTest.parseColor("#f") is "parse error"
-PASS colorTest.parseColor("#ff") is "parse error"
-PASS colorTest.parseColor("#fff") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("#ffg") is "parse error"
-PASS colorTest.parseColor("#ffff") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("#fffg") is "parse error"
-PASS colorTest.parseColor("#fffff") is "parse error"
-PASS colorTest.parseColor("#ffffff") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("#fffffg") is "parse error"
-PASS colorTest.parseColor("#fffffff") is "parse error"
-PASS colorTest.parseColor("#ffffffff") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("#fffffffg") is "parse error"
-PASS colorTest.parseColor("#fffffffff") is "parse error"
-PASS colorTest.parseColor("#FFCc99") is "rgb(255, 204, 153)"
-PASS colorTest.parseColor("#369") is "rgb(51, 102, 153)"
-PASS colorTest.parseColor("rgb(00, 51, 102)") is "rgb(0, 51, 102)"
-PASS colorTest.parseColor("r\\gb(00, 51, 102)") is "rgb(0, 51, 102)"
-PASS colorTest.parseColor("r\\67 b(00, 51, 102)") is "rgb(0, 51, 102)"
-PASS colorTest.parseColor("RGB(153, 204, 255)") is "rgb(153, 204, 255)"
-PASS colorTest.parseColor("rgB(0, 0, 0)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("rgB(0, 51, 255)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgb(0,51,255)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgb(0	,  51 ,255)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgb(/* R */0, /* G */51, /* B */255)") is "rgb(0, 51, 255)"
-FAIL colorTest.parseColor("rgb(-51, 306, 0)") should be rgb(-51, 306, 0). Was rgb(0, 255, 0).
-FAIL colorTest.parseColor("rgb(42%, 3%, 50%)") should be rgb(107, 7, 127). Was rgb(107, 7, 128).
-PASS colorTest.parseColor("RGB(100%, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("rgB(0%, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("rgB(10%, 20%, 30%)") is "rgb(25, 51, 76)"
-PASS colorTest.parseColor("rgb(10%,20%,30%)") is "rgb(25, 51, 76)"
-PASS colorTest.parseColor("rgb(10%	,  20% ,30%)") is "rgb(25, 51, 76)"
-PASS colorTest.parseColor("rgb(/* R */ 10%, /* G */ 20%, /* B */ 30%)") is "rgb(25, 51, 76)"
-FAIL colorTest.parseColor("rgb(-12%, 110%, 1400%)") should be rgb(-31, 280, 3570). Was rgb(0, 255, 255).
-PASS colorTest.parseColor("rgb(10%, 50%, 0)") is "parse error"
-PASS colorTest.parseColor("rgb(255, 50%, 0%)") is "parse error"
-PASS colorTest.parseColor("rgb(0, 0 0)") is "parse error"
-PASS colorTest.parseColor("rgb(0, 0, 0deg)") is "parse error"
-PASS colorTest.parseColor("rgb(0, 0, light)") is "parse error"
-PASS colorTest.parseColor("rgb()") is "parse error"
-PASS colorTest.parseColor("rgb(0)") is "parse error"
-PASS colorTest.parseColor("rgb(0, 0)") is "parse error"
-FAIL colorTest.parseColor("rgb(0, 0, 0, 0)") should be parse error. Was rgba(0, 0, 0, 0).
-PASS colorTest.parseColor("rgb(0%)") is "parse error"
-PASS colorTest.parseColor("rgb(0%, 0%)") is "parse error"
-FAIL colorTest.parseColor("rgb(0%, 0%, 0%, 0%)") should be parse error. Was rgba(0, 0, 0, 0).
-FAIL colorTest.parseColor("rgb(0%, 0%, 0%, 0)") should be parse error. Was rgba(0, 0, 0, 0).
-PASS colorTest.parseColor("rgba(0, 0, 0, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("rgba(204, 0, 102, 0.3)") is "rgba(204, 0, 102, 0.3)"
-PASS colorTest.parseColor("RGBA(255, 255, 255, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("rgBA(0, 51, 255, 1)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0, 51, 255, 1.1)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0, 51, 255, 37)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0, 51, 255, 0.42)") is "rgba(0, 51, 255, 0.42)"
-PASS colorTest.parseColor("rgba(0, 51, 255, 0)") is "rgba(0, 51, 255, 0)"
-PASS colorTest.parseColor("rgba(0, 51, 255, -0.1)") is "rgba(0, 51, 255, 0)"
-PASS colorTest.parseColor("rgba(0, 51, 255, -139)") is "rgba(0, 51, 255, 0)"
-FAIL colorTest.parseColor("rgba(42%, 3%, 50%, 0.3)") should be rgba(107, 7, 127, 0.3). Was rgba(107, 7, 128, 0.3).
-PASS colorTest.parseColor("RGBA(100%, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("rgBA(0%, 20%, 100%, 1)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, 1.1)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, 37)") is "rgb(0, 51, 255)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, 0.42)") is "rgba(0, 51, 255, 0.42)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, 0)") is "rgba(0, 51, 255, 0)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, -0.1)") is "rgba(0, 51, 255, 0)"
-PASS colorTest.parseColor("rgba(0%, 20%, 100%, -139)") is "rgba(0, 51, 255, 0)"
-FAIL colorTest.parseColor("rgba(255, 255, 255, 0%)") should be parse error. Was rgba(255, 255, 255, 0).
-PASS colorTest.parseColor("rgba(10%, 50%, 0, 1)") is "parse error"
-PASS colorTest.parseColor("rgba(255, 50%, 0%, 1)") is "parse error"
-PASS colorTest.parseColor("rgba(0, 0, 0 0)") is "parse error"
-PASS colorTest.parseColor("rgba(0, 0, 0, 0deg)") is "parse error"
-PASS colorTest.parseColor("rgba(0, 0, 0, light)") is "parse error"
-PASS colorTest.parseColor("rgba()") is "parse error"
-PASS colorTest.parseColor("rgba(0)") is "parse error"
-FAIL colorTest.parseColor("rgba(0, 0, 0)") should be parse error. Was rgb(0, 0, 0).
-PASS colorTest.parseColor("rgba(0, 0, 0, 0, 0)") is "parse error"
-PASS colorTest.parseColor("rgba(0%)") is "parse error"
-PASS colorTest.parseColor("rgba(0%, 0%)") is "parse error"
-FAIL colorTest.parseColor("rgba(0%, 0%, 0%)") should be parse error. Was rgb(0, 0, 0).
-FAIL colorTest.parseColor("rgba(0%, 0%, 0%, 0%)") should be parse error. Was rgba(0, 0, 0, 0).
-PASS colorTest.parseColor("rgba(0%, 0%, 0%, 0%, 0%)") is "parse error"
-PASS colorTest.parseColor("HSL(0, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsL(0, 100%, 50%)") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 100%, 37.5%)") is "rgb(191, 191, 0)"
-PASS colorTest.parseColor("hsl(780, 100%, 37.5%)") is "rgb(191, 191, 0)"
-PASS colorTest.parseColor("hsl(-300, 100%, 37.5%)") is "rgb(191, 191, 0)"
-FAIL colorTest.parseColor("hsl(300, 50%, 50%)") should be rgb(191, 63, 191). Was rgb(191, 64, 191).
-PASS colorTest.parseColor("hsl(10, 50%, 0)") is "parse error"
-PASS colorTest.parseColor("hsl(50%, 50%, 0%)") is "parse error"
-PASS colorTest.parseColor("hsl(0, 0% 0%)") is "parse error"
-FAIL colorTest.parseColor("hsl(30deg, 100%, 100%)") should be parse error. Was rgb(255, 255, 255).
-PASS colorTest.parseColor("hsl(0, 0%, light)") is "parse error"
-PASS colorTest.parseColor("hsl()") is "parse error"
-PASS colorTest.parseColor("hsl(0)") is "parse error"
-PASS colorTest.parseColor("hsl(0, 0%)") is "parse error"
-FAIL colorTest.parseColor("hsl(0, 0%, 0%, 0%)") should be parse error. Was rgba(0, 0, 0, 0).
-PASS colorTest.parseColor("HSLA(-300, 100%, 37.5%, 1)") is "rgb(191, 191, 0)"
-PASS colorTest.parseColor("hsLA(-300, 100%, 37.5%, 12)") is "rgb(191, 191, 0)"
-PASS colorTest.parseColor("hsla(-300, 100%, 37.5%, 0.2)") is "rgba(191, 191, 0, 0.2)"
-PASS colorTest.parseColor("hsla(-300, 100%, 37.5%, 0)") is "rgba(191, 191, 0, 0)"
-PASS colorTest.parseColor("hsla(-300, 100%, 37.5%, -3)") is "rgba(191, 191, 0, 0)"
-PASS colorTest.parseColor("hsla(10, 50%, 0, 1)") is "parse error"
-PASS colorTest.parseColor("hsla(50%, 50%, 0%, 1)") is "parse error"
-PASS colorTest.parseColor("hsla(0, 0% 0%, 1)") is "parse error"
-FAIL colorTest.parseColor("hsla(30deg, 100%, 100%, 1)") should be parse error. Was rgb(255, 255, 255).
-PASS colorTest.parseColor("hsla(0, 0%, light, 1)") is "parse error"
-PASS colorTest.parseColor("hsla()") is "parse error"
-PASS colorTest.parseColor("hsla(0)") is "parse error"
-PASS colorTest.parseColor("hsla(0, 0%)") is "parse error"
-FAIL colorTest.parseColor("hsla(0, 0%, 0%, 50%)") should be parse error. Was rgba(0, 0, 0, 0.5).
-PASS colorTest.parseColor("hsla(0, 0%, 0%, 1, 0%)") is "parse error"
-PASS colorTest.parseColor("cmyk(0, 0, 0, 0)") is "parse error"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3.html b/third_party/WebKit/LayoutTests/css-parser/color3.html
deleted file mode 100644
index e303621..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../resources/js-test.js"></script>
-<script src="resources/color-test.js"></script>
-<script>
-var test = new ColorTest("resources/css-parsing-tests/color3.json");
-test.run();
-</script>
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsl-expected.txt b/third_party/WebKit/LayoutTests/css-parser/color3_hsl-expected.txt
deleted file mode 100644
index c3aeb2b..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsl-expected.txt
+++ /dev/null
@@ -1,982 +0,0 @@
-CONSOLE WARNING: line 3: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
-Color test for resources/css-parsing-tests/color3_hsl.json
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS colorTest.parseColor("hsl(0, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 0%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 12.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 25%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 37.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 50%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 62.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 75%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 87.5%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(0, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(30, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(60, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(90, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(120, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(150, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(180, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(210, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(240, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(270, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(300, 100%, 0%)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsl(330, 100%, 0%)") is "rgb(0, 0, 0)"
-FAIL colorTest.parseColor("hsl(0, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(30, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(60, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(90, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(120, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(150, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(180, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(210, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(240, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(270, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(300, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(330, 0%, 12.5%)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsl(0, 12.5%, 12.5%)") should be rgb(35, 27, 27). Was rgb(36, 28, 28).
-FAIL colorTest.parseColor("hsl(30, 12.5%, 12.5%)") should be rgb(35, 31, 27). Was rgb(36, 32, 28).
-FAIL colorTest.parseColor("hsl(60, 12.5%, 12.5%)") should be rgb(35, 35, 27). Was rgb(36, 36, 28).
-FAIL colorTest.parseColor("hsl(90, 12.5%, 12.5%)") should be rgb(31, 35, 27). Was rgb(32, 36, 28).
-FAIL colorTest.parseColor("hsl(120, 12.5%, 12.5%)") should be rgb(27, 35, 27). Was rgb(28, 36, 28).
-FAIL colorTest.parseColor("hsl(150, 12.5%, 12.5%)") should be rgb(27, 35, 31). Was rgb(28, 36, 32).
-FAIL colorTest.parseColor("hsl(180, 12.5%, 12.5%)") should be rgb(27, 35, 35). Was rgb(28, 36, 36).
-FAIL colorTest.parseColor("hsl(210, 12.5%, 12.5%)") should be rgb(27, 31, 35). Was rgb(28, 32, 36).
-FAIL colorTest.parseColor("hsl(240, 12.5%, 12.5%)") should be rgb(27, 27, 35). Was rgb(28, 28, 36).
-FAIL colorTest.parseColor("hsl(270, 12.5%, 12.5%)") should be rgb(31, 27, 35). Was rgb(32, 28, 36).
-FAIL colorTest.parseColor("hsl(300, 12.5%, 12.5%)") should be rgb(35, 27, 35). Was rgb(36, 28, 36).
-FAIL colorTest.parseColor("hsl(330, 12.5%, 12.5%)") should be rgb(35, 27, 31). Was rgb(36, 28, 32).
-FAIL colorTest.parseColor("hsl(0, 25%, 12.5%)") should be rgb(39, 23, 23). Was rgb(40, 24, 24).
-FAIL colorTest.parseColor("hsl(30, 25%, 12.5%)") should be rgb(39, 31, 23). Was rgb(40, 32, 24).
-FAIL colorTest.parseColor("hsl(60, 25%, 12.5%)") should be rgb(39, 39, 23). Was rgb(40, 40, 24).
-FAIL colorTest.parseColor("hsl(90, 25%, 12.5%)") should be rgb(31, 39, 23). Was rgb(32, 40, 24).
-FAIL colorTest.parseColor("hsl(120, 25%, 12.5%)") should be rgb(23, 39, 23). Was rgb(24, 40, 24).
-FAIL colorTest.parseColor("hsl(150, 25%, 12.5%)") should be rgb(23, 39, 31). Was rgb(24, 40, 32).
-FAIL colorTest.parseColor("hsl(180, 25%, 12.5%)") should be rgb(23, 39, 39). Was rgb(24, 40, 40).
-FAIL colorTest.parseColor("hsl(210, 25%, 12.5%)") should be rgb(23, 31, 39). Was rgb(24, 32, 40).
-FAIL colorTest.parseColor("hsl(240, 25%, 12.5%)") should be rgb(23, 23, 39). Was rgb(24, 24, 40).
-FAIL colorTest.parseColor("hsl(270, 25%, 12.5%)") should be rgb(31, 23, 39). Was rgb(32, 24, 40).
-FAIL colorTest.parseColor("hsl(300, 25%, 12.5%)") should be rgb(39, 23, 39). Was rgb(40, 24, 40).
-FAIL colorTest.parseColor("hsl(330, 25%, 12.5%)") should be rgb(39, 23, 31). Was rgb(40, 24, 32).
-FAIL colorTest.parseColor("hsl(0, 37.5%, 12.5%)") should be rgb(43, 19, 19). Was rgb(44, 20, 20).
-FAIL colorTest.parseColor("hsl(30, 37.5%, 12.5%)") should be rgb(43, 31, 19). Was rgb(44, 32, 20).
-FAIL colorTest.parseColor("hsl(60, 37.5%, 12.5%)") should be rgb(43, 43, 19). Was rgb(44, 44, 20).
-FAIL colorTest.parseColor("hsl(90, 37.5%, 12.5%)") should be rgb(31, 43, 19). Was rgb(32, 44, 20).
-FAIL colorTest.parseColor("hsl(120, 37.5%, 12.5%)") should be rgb(19, 43, 19). Was rgb(20, 44, 20).
-FAIL colorTest.parseColor("hsl(150, 37.5%, 12.5%)") should be rgb(19, 43, 31). Was rgb(20, 44, 32).
-FAIL colorTest.parseColor("hsl(180, 37.5%, 12.5%)") should be rgb(19, 43, 43). Was rgb(20, 44, 44).
-FAIL colorTest.parseColor("hsl(210, 37.5%, 12.5%)") should be rgb(19, 31, 43). Was rgb(20, 32, 44).
-FAIL colorTest.parseColor("hsl(240, 37.5%, 12.5%)") should be rgb(19, 19, 43). Was rgb(20, 20, 44).
-FAIL colorTest.parseColor("hsl(270, 37.5%, 12.5%)") should be rgb(31, 19, 43). Was rgb(32, 20, 44).
-FAIL colorTest.parseColor("hsl(300, 37.5%, 12.5%)") should be rgb(43, 19, 43). Was rgb(44, 20, 44).
-FAIL colorTest.parseColor("hsl(330, 37.5%, 12.5%)") should be rgb(43, 19, 31). Was rgb(44, 20, 32).
-FAIL colorTest.parseColor("hsl(0, 50%, 12.5%)") should be rgb(47, 15, 15). Was rgb(48, 16, 16).
-FAIL colorTest.parseColor("hsl(30, 50%, 12.5%)") should be rgb(47, 31, 15). Was rgb(48, 32, 16).
-FAIL colorTest.parseColor("hsl(60, 50%, 12.5%)") should be rgb(47, 47, 15). Was rgb(48, 48, 16).
-FAIL colorTest.parseColor("hsl(90, 50%, 12.5%)") should be rgb(31, 47, 15). Was rgb(32, 48, 16).
-FAIL colorTest.parseColor("hsl(120, 50%, 12.5%)") should be rgb(15, 47, 15). Was rgb(16, 48, 16).
-FAIL colorTest.parseColor("hsl(150, 50%, 12.5%)") should be rgb(15, 47, 31). Was rgb(16, 48, 32).
-FAIL colorTest.parseColor("hsl(180, 50%, 12.5%)") should be rgb(15, 47, 47). Was rgb(16, 48, 48).
-FAIL colorTest.parseColor("hsl(210, 50%, 12.5%)") should be rgb(15, 31, 47). Was rgb(16, 32, 48).
-FAIL colorTest.parseColor("hsl(240, 50%, 12.5%)") should be rgb(15, 15, 47). Was rgb(16, 16, 48).
-FAIL colorTest.parseColor("hsl(270, 50%, 12.5%)") should be rgb(31, 15, 47). Was rgb(32, 16, 48).
-FAIL colorTest.parseColor("hsl(300, 50%, 12.5%)") should be rgb(47, 15, 47). Was rgb(48, 16, 48).
-FAIL colorTest.parseColor("hsl(330, 50%, 12.5%)") should be rgb(47, 15, 31). Was rgb(48, 16, 32).
-FAIL colorTest.parseColor("hsl(0, 62.5%, 12.5%)") should be rgb(51, 11, 11). Was rgb(52, 12, 12).
-FAIL colorTest.parseColor("hsl(30, 62.5%, 12.5%)") should be rgb(51, 31, 11). Was rgb(52, 32, 12).
-FAIL colorTest.parseColor("hsl(60, 62.5%, 12.5%)") should be rgb(51, 51, 11). Was rgb(52, 52, 12).
-FAIL colorTest.parseColor("hsl(90, 62.5%, 12.5%)") should be rgb(31, 51, 11). Was rgb(32, 52, 12).
-FAIL colorTest.parseColor("hsl(120, 62.5%, 12.5%)") should be rgb(11, 51, 11). Was rgb(12, 52, 12).
-FAIL colorTest.parseColor("hsl(150, 62.5%, 12.5%)") should be rgb(11, 51, 31). Was rgb(12, 52, 32).
-FAIL colorTest.parseColor("hsl(180, 62.5%, 12.5%)") should be rgb(11, 51, 51). Was rgb(12, 52, 52).
-FAIL colorTest.parseColor("hsl(210, 62.5%, 12.5%)") should be rgb(11, 31, 51). Was rgb(12, 32, 52).
-FAIL colorTest.parseColor("hsl(240, 62.5%, 12.5%)") should be rgb(11, 11, 51). Was rgb(12, 12, 52).
-FAIL colorTest.parseColor("hsl(270, 62.5%, 12.5%)") should be rgb(31, 11, 51). Was rgb(32, 12, 52).
-FAIL colorTest.parseColor("hsl(300, 62.5%, 12.5%)") should be rgb(51, 11, 51). Was rgb(52, 12, 52).
-FAIL colorTest.parseColor("hsl(330, 62.5%, 12.5%)") should be rgb(51, 11, 31). Was rgb(52, 12, 32).
-FAIL colorTest.parseColor("hsl(0, 75%, 12.5%)") should be rgb(55, 7, 7). Was rgb(56, 8, 8).
-FAIL colorTest.parseColor("hsl(30, 75%, 12.5%)") should be rgb(55, 31, 7). Was rgb(56, 32, 8).
-FAIL colorTest.parseColor("hsl(60, 75%, 12.5%)") should be rgb(55, 55, 7). Was rgb(56, 56, 8).
-FAIL colorTest.parseColor("hsl(90, 75%, 12.5%)") should be rgb(31, 55, 7). Was rgb(32, 56, 8).
-FAIL colorTest.parseColor("hsl(120, 75%, 12.5%)") should be rgb(7, 55, 7). Was rgb(8, 56, 8).
-FAIL colorTest.parseColor("hsl(150, 75%, 12.5%)") should be rgb(7, 55, 31). Was rgb(8, 56, 32).
-FAIL colorTest.parseColor("hsl(180, 75%, 12.5%)") should be rgb(7, 55, 55). Was rgb(8, 56, 56).
-FAIL colorTest.parseColor("hsl(210, 75%, 12.5%)") should be rgb(7, 31, 55). Was rgb(8, 32, 56).
-FAIL colorTest.parseColor("hsl(240, 75%, 12.5%)") should be rgb(7, 7, 55). Was rgb(8, 8, 56).
-FAIL colorTest.parseColor("hsl(270, 75%, 12.5%)") should be rgb(31, 7, 55). Was rgb(32, 8, 56).
-FAIL colorTest.parseColor("hsl(300, 75%, 12.5%)") should be rgb(55, 7, 55). Was rgb(56, 8, 56).
-FAIL colorTest.parseColor("hsl(330, 75%, 12.5%)") should be rgb(55, 7, 31). Was rgb(56, 8, 32).
-FAIL colorTest.parseColor("hsl(0, 87.5%, 12.5%)") should be rgb(59, 3, 3). Was rgb(60, 4, 4).
-FAIL colorTest.parseColor("hsl(30, 87.5%, 12.5%)") should be rgb(59, 31, 3). Was rgb(60, 32, 4).
-FAIL colorTest.parseColor("hsl(60, 87.5%, 12.5%)") should be rgb(59, 59, 3). Was rgb(60, 60, 4).
-FAIL colorTest.parseColor("hsl(90, 87.5%, 12.5%)") should be rgb(31, 59, 3). Was rgb(32, 60, 4).
-FAIL colorTest.parseColor("hsl(120, 87.5%, 12.5%)") should be rgb(3, 59, 3). Was rgb(4, 60, 4).
-FAIL colorTest.parseColor("hsl(150, 87.5%, 12.5%)") should be rgb(3, 59, 31). Was rgb(4, 60, 32).
-FAIL colorTest.parseColor("hsl(180, 87.5%, 12.5%)") should be rgb(3, 59, 59). Was rgb(4, 60, 60).
-FAIL colorTest.parseColor("hsl(210, 87.5%, 12.5%)") should be rgb(3, 31, 59). Was rgb(4, 32, 60).
-FAIL colorTest.parseColor("hsl(240, 87.5%, 12.5%)") should be rgb(3, 3, 59). Was rgb(4, 4, 60).
-FAIL colorTest.parseColor("hsl(270, 87.5%, 12.5%)") should be rgb(31, 3, 59). Was rgb(32, 4, 60).
-FAIL colorTest.parseColor("hsl(300, 87.5%, 12.5%)") should be rgb(59, 3, 59). Was rgb(60, 4, 60).
-FAIL colorTest.parseColor("hsl(330, 87.5%, 12.5%)") should be rgb(59, 3, 31). Was rgb(60, 4, 32).
-FAIL colorTest.parseColor("hsl(0, 100%, 12.5%)") should be rgb(63, 0, 0). Was rgb(64, 0, 0).
-FAIL colorTest.parseColor("hsl(30, 100%, 12.5%)") should be rgb(63, 31, 0). Was rgb(64, 32, 0).
-FAIL colorTest.parseColor("hsl(60, 100%, 12.5%)") should be rgb(63, 63, 0). Was rgb(64, 64, 0).
-FAIL colorTest.parseColor("hsl(90, 100%, 12.5%)") should be rgb(31, 63, 0). Was rgb(32, 64, 0).
-FAIL colorTest.parseColor("hsl(120, 100%, 12.5%)") should be rgb(0, 63, 0). Was rgb(0, 64, 0).
-FAIL colorTest.parseColor("hsl(150, 100%, 12.5%)") should be rgb(0, 63, 31). Was rgb(0, 64, 32).
-FAIL colorTest.parseColor("hsl(180, 100%, 12.5%)") should be rgb(0, 63, 63). Was rgb(0, 64, 64).
-FAIL colorTest.parseColor("hsl(210, 100%, 12.5%)") should be rgb(0, 31, 63). Was rgb(0, 32, 64).
-FAIL colorTest.parseColor("hsl(240, 100%, 12.5%)") should be rgb(0, 0, 63). Was rgb(0, 0, 64).
-FAIL colorTest.parseColor("hsl(270, 100%, 12.5%)") should be rgb(31, 0, 63). Was rgb(32, 0, 64).
-FAIL colorTest.parseColor("hsl(300, 100%, 12.5%)") should be rgb(63, 0, 63). Was rgb(64, 0, 64).
-FAIL colorTest.parseColor("hsl(330, 100%, 12.5%)") should be rgb(63, 0, 31). Was rgb(64, 0, 32).
-FAIL colorTest.parseColor("hsl(0, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(30, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(60, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(90, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(120, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(150, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(180, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(210, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(240, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(270, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(300, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(330, 0%, 25%)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsl(0, 12.5%, 25%)") should be rgb(71, 55, 55). Was rgb(72, 56, 56).
-FAIL colorTest.parseColor("hsl(30, 12.5%, 25%)") should be rgb(71, 63, 55). Was rgb(72, 64, 56).
-FAIL colorTest.parseColor("hsl(60, 12.5%, 25%)") should be rgb(71, 71, 55). Was rgb(72, 72, 56).
-FAIL colorTest.parseColor("hsl(90, 12.5%, 25%)") should be rgb(63, 71, 55). Was rgb(64, 72, 56).
-FAIL colorTest.parseColor("hsl(120, 12.5%, 25%)") should be rgb(55, 71, 55). Was rgb(56, 72, 56).
-FAIL colorTest.parseColor("hsl(150, 12.5%, 25%)") should be rgb(55, 71, 63). Was rgb(56, 72, 64).
-FAIL colorTest.parseColor("hsl(180, 12.5%, 25%)") should be rgb(55, 71, 71). Was rgb(56, 72, 72).
-FAIL colorTest.parseColor("hsl(210, 12.5%, 25%)") should be rgb(55, 63, 71). Was rgb(56, 64, 72).
-FAIL colorTest.parseColor("hsl(240, 12.5%, 25%)") should be rgb(55, 55, 71). Was rgb(56, 56, 72).
-FAIL colorTest.parseColor("hsl(270, 12.5%, 25%)") should be rgb(63, 55, 71). Was rgb(64, 56, 72).
-FAIL colorTest.parseColor("hsl(300, 12.5%, 25%)") should be rgb(71, 55, 71). Was rgb(72, 56, 72).
-FAIL colorTest.parseColor("hsl(330, 12.5%, 25%)") should be rgb(71, 55, 63). Was rgb(72, 56, 64).
-FAIL colorTest.parseColor("hsl(0, 25%, 25%)") should be rgb(79, 47, 47). Was rgb(80, 48, 48).
-FAIL colorTest.parseColor("hsl(30, 25%, 25%)") should be rgb(79, 63, 47). Was rgb(80, 64, 48).
-FAIL colorTest.parseColor("hsl(60, 25%, 25%)") should be rgb(79, 79, 47). Was rgb(80, 80, 48).
-FAIL colorTest.parseColor("hsl(90, 25%, 25%)") should be rgb(63, 79, 47). Was rgb(64, 80, 48).
-FAIL colorTest.parseColor("hsl(120, 25%, 25%)") should be rgb(47, 79, 47). Was rgb(48, 80, 48).
-FAIL colorTest.parseColor("hsl(150, 25%, 25%)") should be rgb(47, 79, 63). Was rgb(48, 80, 64).
-FAIL colorTest.parseColor("hsl(180, 25%, 25%)") should be rgb(47, 79, 79). Was rgb(48, 80, 80).
-FAIL colorTest.parseColor("hsl(210, 25%, 25%)") should be rgb(47, 63, 79). Was rgb(48, 64, 80).
-FAIL colorTest.parseColor("hsl(240, 25%, 25%)") should be rgb(47, 47, 79). Was rgb(48, 48, 80).
-FAIL colorTest.parseColor("hsl(270, 25%, 25%)") should be rgb(63, 47, 79). Was rgb(64, 48, 80).
-FAIL colorTest.parseColor("hsl(300, 25%, 25%)") should be rgb(79, 47, 79). Was rgb(80, 48, 80).
-FAIL colorTest.parseColor("hsl(330, 25%, 25%)") should be rgb(79, 47, 63). Was rgb(80, 48, 64).
-FAIL colorTest.parseColor("hsl(0, 37.5%, 25%)") should be rgb(87, 39, 39). Was rgb(88, 40, 40).
-FAIL colorTest.parseColor("hsl(30, 37.5%, 25%)") should be rgb(87, 63, 39). Was rgb(88, 64, 40).
-FAIL colorTest.parseColor("hsl(60, 37.5%, 25%)") should be rgb(87, 87, 39). Was rgb(88, 88, 40).
-FAIL colorTest.parseColor("hsl(90, 37.5%, 25%)") should be rgb(63, 87, 39). Was rgb(64, 88, 40).
-FAIL colorTest.parseColor("hsl(120, 37.5%, 25%)") should be rgb(39, 87, 39). Was rgb(40, 88, 40).
-FAIL colorTest.parseColor("hsl(150, 37.5%, 25%)") should be rgb(39, 87, 63). Was rgb(40, 88, 64).
-FAIL colorTest.parseColor("hsl(180, 37.5%, 25%)") should be rgb(39, 87, 87). Was rgb(40, 88, 88).
-FAIL colorTest.parseColor("hsl(210, 37.5%, 25%)") should be rgb(39, 63, 87). Was rgb(40, 64, 88).
-FAIL colorTest.parseColor("hsl(240, 37.5%, 25%)") should be rgb(39, 39, 87). Was rgb(40, 40, 88).
-FAIL colorTest.parseColor("hsl(270, 37.5%, 25%)") should be rgb(63, 39, 87). Was rgb(64, 40, 88).
-FAIL colorTest.parseColor("hsl(300, 37.5%, 25%)") should be rgb(87, 39, 87). Was rgb(88, 40, 88).
-FAIL colorTest.parseColor("hsl(330, 37.5%, 25%)") should be rgb(87, 39, 63). Was rgb(88, 40, 64).
-FAIL colorTest.parseColor("hsl(0, 50%, 25%)") should be rgb(95, 31, 31). Was rgb(96, 32, 32).
-FAIL colorTest.parseColor("hsl(30, 50%, 25%)") should be rgb(95, 63, 31). Was rgb(96, 64, 32).
-FAIL colorTest.parseColor("hsl(60, 50%, 25%)") should be rgb(95, 95, 31). Was rgb(96, 96, 32).
-FAIL colorTest.parseColor("hsl(90, 50%, 25%)") should be rgb(63, 95, 31). Was rgb(64, 96, 32).
-FAIL colorTest.parseColor("hsl(120, 50%, 25%)") should be rgb(31, 95, 31). Was rgb(32, 96, 32).
-FAIL colorTest.parseColor("hsl(150, 50%, 25%)") should be rgb(31, 95, 63). Was rgb(32, 96, 64).
-FAIL colorTest.parseColor("hsl(180, 50%, 25%)") should be rgb(31, 95, 95). Was rgb(32, 96, 96).
-FAIL colorTest.parseColor("hsl(210, 50%, 25%)") should be rgb(31, 63, 95). Was rgb(32, 64, 96).
-FAIL colorTest.parseColor("hsl(240, 50%, 25%)") should be rgb(31, 31, 95). Was rgb(32, 32, 96).
-FAIL colorTest.parseColor("hsl(270, 50%, 25%)") should be rgb(63, 31, 95). Was rgb(64, 32, 96).
-FAIL colorTest.parseColor("hsl(300, 50%, 25%)") should be rgb(95, 31, 95). Was rgb(96, 32, 96).
-FAIL colorTest.parseColor("hsl(330, 50%, 25%)") should be rgb(95, 31, 63). Was rgb(96, 32, 64).
-FAIL colorTest.parseColor("hsl(0, 62.5%, 25%)") should be rgb(103, 23, 23). Was rgb(104, 24, 24).
-FAIL colorTest.parseColor("hsl(30, 62.5%, 25%)") should be rgb(103, 63, 23). Was rgb(104, 64, 24).
-FAIL colorTest.parseColor("hsl(60, 62.5%, 25%)") should be rgb(103, 103, 23). Was rgb(104, 104, 24).
-FAIL colorTest.parseColor("hsl(90, 62.5%, 25%)") should be rgb(63, 103, 23). Was rgb(64, 104, 24).
-FAIL colorTest.parseColor("hsl(120, 62.5%, 25%)") should be rgb(23, 103, 23). Was rgb(24, 104, 24).
-FAIL colorTest.parseColor("hsl(150, 62.5%, 25%)") should be rgb(23, 103, 63). Was rgb(24, 104, 64).
-FAIL colorTest.parseColor("hsl(180, 62.5%, 25%)") should be rgb(23, 103, 103). Was rgb(24, 104, 104).
-FAIL colorTest.parseColor("hsl(210, 62.5%, 25%)") should be rgb(23, 63, 103). Was rgb(24, 64, 104).
-FAIL colorTest.parseColor("hsl(240, 62.5%, 25%)") should be rgb(23, 23, 103). Was rgb(24, 24, 104).
-FAIL colorTest.parseColor("hsl(270, 62.5%, 25%)") should be rgb(63, 23, 103). Was rgb(64, 24, 104).
-FAIL colorTest.parseColor("hsl(300, 62.5%, 25%)") should be rgb(103, 23, 103). Was rgb(104, 24, 104).
-FAIL colorTest.parseColor("hsl(330, 62.5%, 25%)") should be rgb(103, 23, 63). Was rgb(104, 24, 64).
-FAIL colorTest.parseColor("hsl(0, 75%, 25%)") should be rgb(111, 15, 15). Was rgb(112, 16, 16).
-FAIL colorTest.parseColor("hsl(30, 75%, 25%)") should be rgb(111, 63, 15). Was rgb(112, 64, 16).
-FAIL colorTest.parseColor("hsl(60, 75%, 25%)") should be rgb(111, 111, 15). Was rgb(112, 112, 16).
-FAIL colorTest.parseColor("hsl(90, 75%, 25%)") should be rgb(63, 111, 15). Was rgb(64, 112, 16).
-FAIL colorTest.parseColor("hsl(120, 75%, 25%)") should be rgb(15, 111, 15). Was rgb(16, 112, 16).
-FAIL colorTest.parseColor("hsl(150, 75%, 25%)") should be rgb(15, 111, 63). Was rgb(16, 112, 64).
-FAIL colorTest.parseColor("hsl(180, 75%, 25%)") should be rgb(15, 111, 111). Was rgb(16, 112, 112).
-FAIL colorTest.parseColor("hsl(210, 75%, 25%)") should be rgb(15, 63, 111). Was rgb(16, 64, 112).
-FAIL colorTest.parseColor("hsl(240, 75%, 25%)") should be rgb(15, 15, 111). Was rgb(16, 16, 112).
-FAIL colorTest.parseColor("hsl(270, 75%, 25%)") should be rgb(63, 15, 111). Was rgb(64, 16, 112).
-FAIL colorTest.parseColor("hsl(300, 75%, 25%)") should be rgb(111, 15, 111). Was rgb(112, 16, 112).
-FAIL colorTest.parseColor("hsl(330, 75%, 25%)") should be rgb(111, 15, 63). Was rgb(112, 16, 64).
-FAIL colorTest.parseColor("hsl(0, 87.5%, 25%)") should be rgb(119, 7, 7). Was rgb(120, 8, 8).
-FAIL colorTest.parseColor("hsl(30, 87.5%, 25%)") should be rgb(119, 63, 7). Was rgb(120, 64, 8).
-FAIL colorTest.parseColor("hsl(60, 87.5%, 25%)") should be rgb(119, 119, 7). Was rgb(120, 120, 8).
-FAIL colorTest.parseColor("hsl(90, 87.5%, 25%)") should be rgb(63, 119, 7). Was rgb(64, 120, 8).
-FAIL colorTest.parseColor("hsl(120, 87.5%, 25%)") should be rgb(7, 119, 7). Was rgb(8, 120, 8).
-FAIL colorTest.parseColor("hsl(150, 87.5%, 25%)") should be rgb(7, 119, 63). Was rgb(8, 120, 64).
-FAIL colorTest.parseColor("hsl(180, 87.5%, 25%)") should be rgb(7, 119, 119). Was rgb(8, 120, 120).
-FAIL colorTest.parseColor("hsl(210, 87.5%, 25%)") should be rgb(7, 63, 119). Was rgb(8, 64, 120).
-FAIL colorTest.parseColor("hsl(240, 87.5%, 25%)") should be rgb(7, 7, 119). Was rgb(8, 8, 120).
-FAIL colorTest.parseColor("hsl(270, 87.5%, 25%)") should be rgb(63, 7, 119). Was rgb(64, 8, 120).
-FAIL colorTest.parseColor("hsl(300, 87.5%, 25%)") should be rgb(119, 7, 119). Was rgb(120, 8, 120).
-FAIL colorTest.parseColor("hsl(330, 87.5%, 25%)") should be rgb(119, 7, 63). Was rgb(120, 8, 64).
-FAIL colorTest.parseColor("hsl(0, 100%, 25%)") should be rgb(127, 0, 0). Was rgb(128, 0, 0).
-FAIL colorTest.parseColor("hsl(30, 100%, 25%)") should be rgb(127, 63, 0). Was rgb(128, 64, 0).
-FAIL colorTest.parseColor("hsl(60, 100%, 25%)") should be rgb(127, 127, 0). Was rgb(128, 128, 0).
-FAIL colorTest.parseColor("hsl(90, 100%, 25%)") should be rgb(63, 127, 0). Was rgb(64, 128, 0).
-FAIL colorTest.parseColor("hsl(120, 100%, 25%)") should be rgb(0, 127, 0). Was rgb(0, 128, 0).
-FAIL colorTest.parseColor("hsl(150, 100%, 25%)") should be rgb(0, 127, 63). Was rgb(0, 128, 64).
-FAIL colorTest.parseColor("hsl(180, 100%, 25%)") should be rgb(0, 127, 127). Was rgb(0, 128, 128).
-FAIL colorTest.parseColor("hsl(210, 100%, 25%)") should be rgb(0, 63, 127). Was rgb(0, 64, 128).
-FAIL colorTest.parseColor("hsl(240, 100%, 25%)") should be rgb(0, 0, 127). Was rgb(0, 0, 128).
-FAIL colorTest.parseColor("hsl(270, 100%, 25%)") should be rgb(63, 0, 127). Was rgb(64, 0, 128).
-FAIL colorTest.parseColor("hsl(300, 100%, 25%)") should be rgb(127, 0, 127). Was rgb(128, 0, 128).
-FAIL colorTest.parseColor("hsl(330, 100%, 25%)") should be rgb(127, 0, 63). Was rgb(128, 0, 64).
-FAIL colorTest.parseColor("hsl(0, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(30, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(60, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(90, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(120, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(150, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(180, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(210, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(240, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(270, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(300, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(330, 0%, 37.5%)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsl(0, 12.5%, 37.5%)") should be rgb(107, 83, 83). Was rgb(108, 84, 84).
-FAIL colorTest.parseColor("hsl(30, 12.5%, 37.5%)") should be rgb(107, 95, 83). Was rgb(108, 96, 84).
-FAIL colorTest.parseColor("hsl(60, 12.5%, 37.5%)") should be rgb(107, 107, 83). Was rgb(108, 108, 84).
-FAIL colorTest.parseColor("hsl(90, 12.5%, 37.5%)") should be rgb(95, 107, 83). Was rgb(96, 108, 84).
-FAIL colorTest.parseColor("hsl(120, 12.5%, 37.5%)") should be rgb(83, 107, 83). Was rgb(84, 108, 84).
-FAIL colorTest.parseColor("hsl(150, 12.5%, 37.5%)") should be rgb(83, 107, 95). Was rgb(84, 108, 96).
-FAIL colorTest.parseColor("hsl(180, 12.5%, 37.5%)") should be rgb(83, 107, 107). Was rgb(84, 108, 108).
-FAIL colorTest.parseColor("hsl(210, 12.5%, 37.5%)") should be rgb(83, 95, 107). Was rgb(84, 96, 108).
-FAIL colorTest.parseColor("hsl(240, 12.5%, 37.5%)") should be rgb(83, 83, 107). Was rgb(84, 84, 108).
-FAIL colorTest.parseColor("hsl(270, 12.5%, 37.5%)") should be rgb(95, 83, 107). Was rgb(96, 84, 108).
-FAIL colorTest.parseColor("hsl(300, 12.5%, 37.5%)") should be rgb(107, 83, 107). Was rgb(108, 84, 108).
-FAIL colorTest.parseColor("hsl(330, 12.5%, 37.5%)") should be rgb(107, 83, 95). Was rgb(108, 84, 96).
-FAIL colorTest.parseColor("hsl(0, 25%, 37.5%)") should be rgb(119, 71, 71). Was rgb(120, 72, 72).
-FAIL colorTest.parseColor("hsl(30, 25%, 37.5%)") should be rgb(119, 95, 71). Was rgb(120, 96, 72).
-FAIL colorTest.parseColor("hsl(60, 25%, 37.5%)") should be rgb(119, 119, 71). Was rgb(120, 120, 72).
-FAIL colorTest.parseColor("hsl(90, 25%, 37.5%)") should be rgb(95, 119, 71). Was rgb(96, 120, 72).
-FAIL colorTest.parseColor("hsl(120, 25%, 37.5%)") should be rgb(71, 119, 71). Was rgb(72, 120, 72).
-FAIL colorTest.parseColor("hsl(150, 25%, 37.5%)") should be rgb(71, 119, 95). Was rgb(72, 120, 96).
-FAIL colorTest.parseColor("hsl(180, 25%, 37.5%)") should be rgb(71, 119, 119). Was rgb(72, 120, 120).
-FAIL colorTest.parseColor("hsl(210, 25%, 37.5%)") should be rgb(71, 95, 119). Was rgb(72, 96, 120).
-FAIL colorTest.parseColor("hsl(240, 25%, 37.5%)") should be rgb(71, 71, 119). Was rgb(72, 72, 120).
-FAIL colorTest.parseColor("hsl(270, 25%, 37.5%)") should be rgb(95, 71, 119). Was rgb(96, 72, 120).
-FAIL colorTest.parseColor("hsl(300, 25%, 37.5%)") should be rgb(119, 71, 119). Was rgb(120, 72, 120).
-FAIL colorTest.parseColor("hsl(330, 25%, 37.5%)") should be rgb(119, 71, 95). Was rgb(120, 72, 96).
-FAIL colorTest.parseColor("hsl(0, 37.5%, 37.5%)") should be rgb(131, 59, 59). Was rgb(131, 60, 60).
-FAIL colorTest.parseColor("hsl(30, 37.5%, 37.5%)") should be rgb(131, 95, 59). Was rgb(131, 96, 60).
-FAIL colorTest.parseColor("hsl(60, 37.5%, 37.5%)") should be rgb(131, 131, 59). Was rgb(131, 131, 60).
-FAIL colorTest.parseColor("hsl(90, 37.5%, 37.5%)") should be rgb(95, 131, 59). Was rgb(96, 131, 60).
-FAIL colorTest.parseColor("hsl(120, 37.5%, 37.5%)") should be rgb(59, 131, 59). Was rgb(60, 131, 60).
-FAIL colorTest.parseColor("hsl(150, 37.5%, 37.5%)") should be rgb(59, 131, 95). Was rgb(60, 131, 96).
-FAIL colorTest.parseColor("hsl(180, 37.5%, 37.5%)") should be rgb(59, 131, 131). Was rgb(60, 131, 131).
-FAIL colorTest.parseColor("hsl(210, 37.5%, 37.5%)") should be rgb(59, 95, 131). Was rgb(60, 96, 131).
-FAIL colorTest.parseColor("hsl(240, 37.5%, 37.5%)") should be rgb(59, 59, 131). Was rgb(60, 60, 131).
-FAIL colorTest.parseColor("hsl(270, 37.5%, 37.5%)") should be rgb(95, 59, 131). Was rgb(96, 60, 131).
-FAIL colorTest.parseColor("hsl(300, 37.5%, 37.5%)") should be rgb(131, 59, 131). Was rgb(131, 60, 131).
-FAIL colorTest.parseColor("hsl(330, 37.5%, 37.5%)") should be rgb(131, 59, 95). Was rgb(131, 60, 96).
-FAIL colorTest.parseColor("hsl(0, 50%, 37.5%)") should be rgb(143, 47, 47). Was rgb(143, 48, 48).
-FAIL colorTest.parseColor("hsl(30, 50%, 37.5%)") should be rgb(143, 95, 47). Was rgb(143, 96, 48).
-FAIL colorTest.parseColor("hsl(60, 50%, 37.5%)") should be rgb(143, 143, 47). Was rgb(143, 143, 48).
-FAIL colorTest.parseColor("hsl(90, 50%, 37.5%)") should be rgb(95, 143, 47). Was rgb(96, 143, 48).
-FAIL colorTest.parseColor("hsl(120, 50%, 37.5%)") should be rgb(47, 143, 47). Was rgb(48, 143, 48).
-FAIL colorTest.parseColor("hsl(150, 50%, 37.5%)") should be rgb(47, 143, 95). Was rgb(48, 143, 96).
-FAIL colorTest.parseColor("hsl(180, 50%, 37.5%)") should be rgb(47, 143, 143). Was rgb(48, 143, 143).
-FAIL colorTest.parseColor("hsl(210, 50%, 37.5%)") should be rgb(47, 95, 143). Was rgb(48, 96, 143).
-FAIL colorTest.parseColor("hsl(240, 50%, 37.5%)") should be rgb(47, 47, 143). Was rgb(48, 48, 143).
-FAIL colorTest.parseColor("hsl(270, 50%, 37.5%)") should be rgb(95, 47, 143). Was rgb(96, 48, 143).
-FAIL colorTest.parseColor("hsl(300, 50%, 37.5%)") should be rgb(143, 47, 143). Was rgb(143, 48, 143).
-FAIL colorTest.parseColor("hsl(330, 50%, 37.5%)") should be rgb(143, 47, 95). Was rgb(143, 48, 96).
-FAIL colorTest.parseColor("hsl(0, 62.5%, 37.5%)") should be rgb(155, 35, 35). Was rgb(155, 36, 36).
-FAIL colorTest.parseColor("hsl(30, 62.5%, 37.5%)") should be rgb(155, 95, 35). Was rgb(155, 96, 36).
-FAIL colorTest.parseColor("hsl(60, 62.5%, 37.5%)") should be rgb(155, 155, 35). Was rgb(155, 155, 36).
-FAIL colorTest.parseColor("hsl(90, 62.5%, 37.5%)") should be rgb(95, 155, 35). Was rgb(96, 155, 36).
-FAIL colorTest.parseColor("hsl(120, 62.5%, 37.5%)") should be rgb(35, 155, 35). Was rgb(36, 155, 36).
-FAIL colorTest.parseColor("hsl(150, 62.5%, 37.5%)") should be rgb(35, 155, 95). Was rgb(36, 155, 96).
-FAIL colorTest.parseColor("hsl(180, 62.5%, 37.5%)") should be rgb(35, 155, 155). Was rgb(36, 155, 155).
-FAIL colorTest.parseColor("hsl(210, 62.5%, 37.5%)") should be rgb(35, 95, 155). Was rgb(36, 96, 155).
-FAIL colorTest.parseColor("hsl(240, 62.5%, 37.5%)") should be rgb(35, 35, 155). Was rgb(36, 36, 155).
-FAIL colorTest.parseColor("hsl(270, 62.5%, 37.5%)") should be rgb(95, 35, 155). Was rgb(96, 36, 155).
-FAIL colorTest.parseColor("hsl(300, 62.5%, 37.5%)") should be rgb(155, 35, 155). Was rgb(155, 36, 155).
-FAIL colorTest.parseColor("hsl(330, 62.5%, 37.5%)") should be rgb(155, 35, 95). Was rgb(155, 36, 96).
-FAIL colorTest.parseColor("hsl(0, 75%, 37.5%)") should be rgb(167, 23, 23). Was rgb(167, 24, 24).
-FAIL colorTest.parseColor("hsl(30, 75%, 37.5%)") should be rgb(167, 95, 23). Was rgb(167, 96, 24).
-FAIL colorTest.parseColor("hsl(60, 75%, 37.5%)") should be rgb(167, 167, 23). Was rgb(167, 167, 24).
-FAIL colorTest.parseColor("hsl(90, 75%, 37.5%)") should be rgb(95, 167, 23). Was rgb(96, 167, 24).
-FAIL colorTest.parseColor("hsl(120, 75%, 37.5%)") should be rgb(23, 167, 23). Was rgb(24, 167, 24).
-FAIL colorTest.parseColor("hsl(150, 75%, 37.5%)") should be rgb(23, 167, 95). Was rgb(24, 167, 96).
-FAIL colorTest.parseColor("hsl(180, 75%, 37.5%)") should be rgb(23, 167, 167). Was rgb(24, 167, 167).
-FAIL colorTest.parseColor("hsl(210, 75%, 37.5%)") should be rgb(23, 95, 167). Was rgb(24, 96, 167).
-FAIL colorTest.parseColor("hsl(240, 75%, 37.5%)") should be rgb(23, 23, 167). Was rgb(24, 24, 167).
-FAIL colorTest.parseColor("hsl(270, 75%, 37.5%)") should be rgb(95, 23, 167). Was rgb(96, 24, 167).
-FAIL colorTest.parseColor("hsl(300, 75%, 37.5%)") should be rgb(167, 23, 167). Was rgb(167, 24, 167).
-FAIL colorTest.parseColor("hsl(330, 75%, 37.5%)") should be rgb(167, 23, 95). Was rgb(167, 24, 96).
-FAIL colorTest.parseColor("hsl(0, 87.5%, 37.5%)") should be rgb(179, 11, 11). Was rgb(179, 12, 12).
-FAIL colorTest.parseColor("hsl(30, 87.5%, 37.5%)") should be rgb(179, 95, 11). Was rgb(179, 96, 12).
-FAIL colorTest.parseColor("hsl(60, 87.5%, 37.5%)") should be rgb(179, 179, 11). Was rgb(179, 179, 12).
-FAIL colorTest.parseColor("hsl(90, 87.5%, 37.5%)") should be rgb(95, 179, 11). Was rgb(96, 179, 12).
-FAIL colorTest.parseColor("hsl(120, 87.5%, 37.5%)") should be rgb(11, 179, 11). Was rgb(12, 179, 12).
-FAIL colorTest.parseColor("hsl(150, 87.5%, 37.5%)") should be rgb(11, 179, 95). Was rgb(12, 179, 96).
-FAIL colorTest.parseColor("hsl(180, 87.5%, 37.5%)") should be rgb(11, 179, 179). Was rgb(12, 179, 179).
-FAIL colorTest.parseColor("hsl(210, 87.5%, 37.5%)") should be rgb(11, 95, 179). Was rgb(12, 96, 179).
-FAIL colorTest.parseColor("hsl(240, 87.5%, 37.5%)") should be rgb(11, 11, 179). Was rgb(12, 12, 179).
-FAIL colorTest.parseColor("hsl(270, 87.5%, 37.5%)") should be rgb(95, 11, 179). Was rgb(96, 12, 179).
-FAIL colorTest.parseColor("hsl(300, 87.5%, 37.5%)") should be rgb(179, 11, 179). Was rgb(179, 12, 179).
-FAIL colorTest.parseColor("hsl(330, 87.5%, 37.5%)") should be rgb(179, 11, 95). Was rgb(179, 12, 96).
-PASS colorTest.parseColor("hsl(0, 100%, 37.5%)") is "rgb(191, 0, 0)"
-FAIL colorTest.parseColor("hsl(30, 100%, 37.5%)") should be rgb(191, 95, 0). Was rgb(191, 96, 0).
-PASS colorTest.parseColor("hsl(60, 100%, 37.5%)") is "rgb(191, 191, 0)"
-FAIL colorTest.parseColor("hsl(90, 100%, 37.5%)") should be rgb(95, 191, 0). Was rgb(96, 191, 0).
-PASS colorTest.parseColor("hsl(120, 100%, 37.5%)") is "rgb(0, 191, 0)"
-FAIL colorTest.parseColor("hsl(150, 100%, 37.5%)") should be rgb(0, 191, 95). Was rgb(0, 191, 96).
-PASS colorTest.parseColor("hsl(180, 100%, 37.5%)") is "rgb(0, 191, 191)"
-FAIL colorTest.parseColor("hsl(210, 100%, 37.5%)") should be rgb(0, 95, 191). Was rgb(0, 96, 191).
-PASS colorTest.parseColor("hsl(240, 100%, 37.5%)") is "rgb(0, 0, 191)"
-FAIL colorTest.parseColor("hsl(270, 100%, 37.5%)") should be rgb(95, 0, 191). Was rgb(96, 0, 191).
-PASS colorTest.parseColor("hsl(300, 100%, 37.5%)") is "rgb(191, 0, 191)"
-FAIL colorTest.parseColor("hsl(330, 100%, 37.5%)") should be rgb(191, 0, 95). Was rgb(191, 0, 96).
-FAIL colorTest.parseColor("hsl(0, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(30, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(60, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(90, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(120, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(150, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(180, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(210, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(240, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(270, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(300, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(330, 0%, 50%)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsl(0, 12.5%, 50%)") should be rgb(143, 111, 111). Was rgb(143, 112, 112).
-FAIL colorTest.parseColor("hsl(30, 12.5%, 50%)") should be rgb(143, 127, 111). Was rgb(143, 128, 112).
-FAIL colorTest.parseColor("hsl(60, 12.5%, 50%)") should be rgb(143, 143, 111). Was rgb(143, 143, 112).
-FAIL colorTest.parseColor("hsl(90, 12.5%, 50%)") should be rgb(127, 143, 111). Was rgb(128, 143, 112).
-FAIL colorTest.parseColor("hsl(120, 12.5%, 50%)") should be rgb(111, 143, 111). Was rgb(112, 143, 112).
-FAIL colorTest.parseColor("hsl(150, 12.5%, 50%)") should be rgb(111, 143, 127). Was rgb(112, 143, 128).
-FAIL colorTest.parseColor("hsl(180, 12.5%, 50%)") should be rgb(111, 143, 143). Was rgb(112, 143, 143).
-FAIL colorTest.parseColor("hsl(210, 12.5%, 50%)") should be rgb(111, 127, 143). Was rgb(112, 128, 143).
-FAIL colorTest.parseColor("hsl(240, 12.5%, 50%)") should be rgb(111, 111, 143). Was rgb(112, 112, 143).
-FAIL colorTest.parseColor("hsl(270, 12.5%, 50%)") should be rgb(127, 111, 143). Was rgb(128, 112, 143).
-FAIL colorTest.parseColor("hsl(300, 12.5%, 50%)") should be rgb(143, 111, 143). Was rgb(143, 112, 143).
-FAIL colorTest.parseColor("hsl(330, 12.5%, 50%)") should be rgb(143, 111, 127). Was rgb(143, 112, 128).
-FAIL colorTest.parseColor("hsl(0, 25%, 50%)") should be rgb(159, 95, 95). Was rgb(159, 96, 96).
-FAIL colorTest.parseColor("hsl(30, 25%, 50%)") should be rgb(159, 127, 95). Was rgb(159, 128, 96).
-FAIL colorTest.parseColor("hsl(60, 25%, 50%)") should be rgb(159, 159, 95). Was rgb(159, 159, 96).
-FAIL colorTest.parseColor("hsl(90, 25%, 50%)") should be rgb(127, 159, 95). Was rgb(128, 159, 96).
-FAIL colorTest.parseColor("hsl(120, 25%, 50%)") should be rgb(95, 159, 95). Was rgb(96, 159, 96).
-FAIL colorTest.parseColor("hsl(150, 25%, 50%)") should be rgb(95, 159, 127). Was rgb(96, 159, 128).
-FAIL colorTest.parseColor("hsl(180, 25%, 50%)") should be rgb(95, 159, 159). Was rgb(96, 159, 159).
-FAIL colorTest.parseColor("hsl(210, 25%, 50%)") should be rgb(95, 127, 159). Was rgb(96, 128, 159).
-FAIL colorTest.parseColor("hsl(240, 25%, 50%)") should be rgb(95, 95, 159). Was rgb(96, 96, 159).
-FAIL colorTest.parseColor("hsl(270, 25%, 50%)") should be rgb(127, 95, 159). Was rgb(128, 96, 159).
-FAIL colorTest.parseColor("hsl(300, 25%, 50%)") should be rgb(159, 95, 159). Was rgb(159, 96, 159).
-FAIL colorTest.parseColor("hsl(330, 25%, 50%)") should be rgb(159, 95, 127). Was rgb(159, 96, 128).
-FAIL colorTest.parseColor("hsl(0, 37.5%, 50%)") should be rgb(175, 79, 79). Was rgb(175, 80, 80).
-FAIL colorTest.parseColor("hsl(30, 37.5%, 50%)") should be rgb(175, 127, 79). Was rgb(175, 128, 80).
-FAIL colorTest.parseColor("hsl(60, 37.5%, 50%)") should be rgb(175, 175, 79). Was rgb(175, 175, 80).
-FAIL colorTest.parseColor("hsl(90, 37.5%, 50%)") should be rgb(127, 175, 79). Was rgb(128, 175, 80).
-FAIL colorTest.parseColor("hsl(120, 37.5%, 50%)") should be rgb(79, 175, 79). Was rgb(80, 175, 80).
-FAIL colorTest.parseColor("hsl(150, 37.5%, 50%)") should be rgb(79, 175, 127). Was rgb(80, 175, 128).
-FAIL colorTest.parseColor("hsl(180, 37.5%, 50%)") should be rgb(79, 175, 175). Was rgb(80, 175, 175).
-FAIL colorTest.parseColor("hsl(210, 37.5%, 50%)") should be rgb(79, 127, 175). Was rgb(80, 128, 175).
-FAIL colorTest.parseColor("hsl(240, 37.5%, 50%)") should be rgb(79, 79, 175). Was rgb(80, 80, 175).
-FAIL colorTest.parseColor("hsl(270, 37.5%, 50%)") should be rgb(127, 79, 175). Was rgb(128, 80, 175).
-FAIL colorTest.parseColor("hsl(300, 37.5%, 50%)") should be rgb(175, 79, 175). Was rgb(175, 80, 175).
-FAIL colorTest.parseColor("hsl(330, 37.5%, 50%)") should be rgb(175, 79, 127). Was rgb(175, 80, 128).
-FAIL colorTest.parseColor("hsl(0, 50%, 50%)") should be rgb(191, 63, 63). Was rgb(191, 64, 64).
-FAIL colorTest.parseColor("hsl(30, 50%, 50%)") should be rgb(191, 127, 63). Was rgb(191, 128, 64).
-FAIL colorTest.parseColor("hsl(60, 50%, 50%)") should be rgb(191, 191, 63). Was rgb(191, 191, 64).
-FAIL colorTest.parseColor("hsl(90, 50%, 50%)") should be rgb(127, 191, 63). Was rgb(128, 191, 64).
-FAIL colorTest.parseColor("hsl(120, 50%, 50%)") should be rgb(63, 191, 63). Was rgb(64, 191, 64).
-FAIL colorTest.parseColor("hsl(150, 50%, 50%)") should be rgb(63, 191, 127). Was rgb(64, 191, 128).
-FAIL colorTest.parseColor("hsl(180, 50%, 50%)") should be rgb(63, 191, 191). Was rgb(64, 191, 191).
-FAIL colorTest.parseColor("hsl(210, 50%, 50%)") should be rgb(63, 127, 191). Was rgb(64, 128, 191).
-FAIL colorTest.parseColor("hsl(240, 50%, 50%)") should be rgb(63, 63, 191). Was rgb(64, 64, 191).
-FAIL colorTest.parseColor("hsl(270, 50%, 50%)") should be rgb(127, 63, 191). Was rgb(128, 64, 191).
-FAIL colorTest.parseColor("hsl(300, 50%, 50%)") should be rgb(191, 63, 191). Was rgb(191, 64, 191).
-FAIL colorTest.parseColor("hsl(330, 50%, 50%)") should be rgb(191, 63, 127). Was rgb(191, 64, 128).
-FAIL colorTest.parseColor("hsl(0, 62.5%, 50%)") should be rgb(207, 47, 47). Was rgb(207, 48, 48).
-FAIL colorTest.parseColor("hsl(30, 62.5%, 50%)") should be rgb(207, 127, 47). Was rgb(207, 128, 48).
-FAIL colorTest.parseColor("hsl(60, 62.5%, 50%)") should be rgb(207, 207, 47). Was rgb(207, 207, 48).
-FAIL colorTest.parseColor("hsl(90, 62.5%, 50%)") should be rgb(127, 207, 47). Was rgb(128, 207, 48).
-FAIL colorTest.parseColor("hsl(120, 62.5%, 50%)") should be rgb(47, 207, 47). Was rgb(48, 207, 48).
-FAIL colorTest.parseColor("hsl(150, 62.5%, 50%)") should be rgb(47, 207, 127). Was rgb(48, 207, 128).
-FAIL colorTest.parseColor("hsl(180, 62.5%, 50%)") should be rgb(47, 207, 207). Was rgb(48, 207, 207).
-FAIL colorTest.parseColor("hsl(210, 62.5%, 50%)") should be rgb(47, 127, 207). Was rgb(48, 128, 207).
-FAIL colorTest.parseColor("hsl(240, 62.5%, 50%)") should be rgb(47, 47, 207). Was rgb(48, 48, 207).
-FAIL colorTest.parseColor("hsl(270, 62.5%, 50%)") should be rgb(127, 47, 207). Was rgb(128, 48, 207).
-FAIL colorTest.parseColor("hsl(300, 62.5%, 50%)") should be rgb(207, 47, 207). Was rgb(207, 48, 207).
-FAIL colorTest.parseColor("hsl(330, 62.5%, 50%)") should be rgb(207, 47, 127). Was rgb(207, 48, 128).
-FAIL colorTest.parseColor("hsl(0, 75%, 50%)") should be rgb(223, 31, 31). Was rgb(223, 32, 32).
-FAIL colorTest.parseColor("hsl(30, 75%, 50%)") should be rgb(223, 127, 31). Was rgb(223, 128, 32).
-FAIL colorTest.parseColor("hsl(60, 75%, 50%)") should be rgb(223, 223, 31). Was rgb(223, 223, 32).
-FAIL colorTest.parseColor("hsl(90, 75%, 50%)") should be rgb(127, 223, 31). Was rgb(128, 223, 32).
-FAIL colorTest.parseColor("hsl(120, 75%, 50%)") should be rgb(31, 223, 31). Was rgb(32, 223, 32).
-FAIL colorTest.parseColor("hsl(150, 75%, 50%)") should be rgb(31, 223, 127). Was rgb(32, 223, 128).
-FAIL colorTest.parseColor("hsl(180, 75%, 50%)") should be rgb(31, 223, 223). Was rgb(32, 223, 223).
-FAIL colorTest.parseColor("hsl(210, 75%, 50%)") should be rgb(31, 127, 223). Was rgb(32, 128, 223).
-FAIL colorTest.parseColor("hsl(240, 75%, 50%)") should be rgb(31, 31, 223). Was rgb(32, 32, 223).
-FAIL colorTest.parseColor("hsl(270, 75%, 50%)") should be rgb(127, 31, 223). Was rgb(128, 32, 223).
-FAIL colorTest.parseColor("hsl(300, 75%, 50%)") should be rgb(223, 31, 223). Was rgb(223, 32, 223).
-FAIL colorTest.parseColor("hsl(330, 75%, 50%)") should be rgb(223, 31, 127). Was rgb(223, 32, 128).
-FAIL colorTest.parseColor("hsl(0, 87.5%, 50%)") should be rgb(239, 15, 15). Was rgb(239, 16, 16).
-FAIL colorTest.parseColor("hsl(30, 87.5%, 50%)") should be rgb(239, 127, 15). Was rgb(239, 128, 16).
-FAIL colorTest.parseColor("hsl(60, 87.5%, 50%)") should be rgb(239, 239, 15). Was rgb(239, 239, 16).
-FAIL colorTest.parseColor("hsl(90, 87.5%, 50%)") should be rgb(127, 239, 15). Was rgb(128, 239, 16).
-FAIL colorTest.parseColor("hsl(120, 87.5%, 50%)") should be rgb(15, 239, 15). Was rgb(16, 239, 16).
-FAIL colorTest.parseColor("hsl(150, 87.5%, 50%)") should be rgb(15, 239, 127). Was rgb(16, 239, 128).
-FAIL colorTest.parseColor("hsl(180, 87.5%, 50%)") should be rgb(15, 239, 239). Was rgb(16, 239, 239).
-FAIL colorTest.parseColor("hsl(210, 87.5%, 50%)") should be rgb(15, 127, 239). Was rgb(16, 128, 239).
-FAIL colorTest.parseColor("hsl(240, 87.5%, 50%)") should be rgb(15, 15, 239). Was rgb(16, 16, 239).
-FAIL colorTest.parseColor("hsl(270, 87.5%, 50%)") should be rgb(127, 15, 239). Was rgb(128, 16, 239).
-FAIL colorTest.parseColor("hsl(300, 87.5%, 50%)") should be rgb(239, 15, 239). Was rgb(239, 16, 239).
-FAIL colorTest.parseColor("hsl(330, 87.5%, 50%)") should be rgb(239, 15, 127). Was rgb(239, 16, 128).
-PASS colorTest.parseColor("hsl(0, 100%, 50%)") is "rgb(255, 0, 0)"
-FAIL colorTest.parseColor("hsl(30, 100%, 50%)") should be rgb(255, 127, 0). Was rgb(255, 128, 0).
-PASS colorTest.parseColor("hsl(60, 100%, 50%)") is "rgb(255, 255, 0)"
-FAIL colorTest.parseColor("hsl(90, 100%, 50%)") should be rgb(127, 255, 0). Was rgb(128, 255, 0).
-PASS colorTest.parseColor("hsl(120, 100%, 50%)") is "rgb(0, 255, 0)"
-FAIL colorTest.parseColor("hsl(150, 100%, 50%)") should be rgb(0, 255, 127). Was rgb(0, 255, 128).
-PASS colorTest.parseColor("hsl(180, 100%, 50%)") is "rgb(0, 255, 255)"
-FAIL colorTest.parseColor("hsl(210, 100%, 50%)") should be rgb(0, 127, 255). Was rgb(0, 128, 255).
-PASS colorTest.parseColor("hsl(240, 100%, 50%)") is "rgb(0, 0, 255)"
-FAIL colorTest.parseColor("hsl(270, 100%, 50%)") should be rgb(127, 0, 255). Was rgb(128, 0, 255).
-PASS colorTest.parseColor("hsl(300, 100%, 50%)") is "rgb(255, 0, 255)"
-FAIL colorTest.parseColor("hsl(330, 100%, 50%)") should be rgb(255, 0, 127). Was rgb(255, 0, 128).
-PASS colorTest.parseColor("hsl(0, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(30, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(60, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(90, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(120, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(150, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(180, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(210, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(240, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(270, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(300, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(330, 0%, 62.5%)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsl(0, 12.5%, 62.5%)") is "rgb(171, 147, 147)"
-PASS colorTest.parseColor("hsl(30, 12.5%, 62.5%)") is "rgb(171, 159, 147)"
-PASS colorTest.parseColor("hsl(60, 12.5%, 62.5%)") is "rgb(171, 171, 147)"
-PASS colorTest.parseColor("hsl(90, 12.5%, 62.5%)") is "rgb(159, 171, 147)"
-PASS colorTest.parseColor("hsl(120, 12.5%, 62.5%)") is "rgb(147, 171, 147)"
-PASS colorTest.parseColor("hsl(150, 12.5%, 62.5%)") is "rgb(147, 171, 159)"
-PASS colorTest.parseColor("hsl(180, 12.5%, 62.5%)") is "rgb(147, 171, 171)"
-PASS colorTest.parseColor("hsl(210, 12.5%, 62.5%)") is "rgb(147, 159, 171)"
-PASS colorTest.parseColor("hsl(240, 12.5%, 62.5%)") is "rgb(147, 147, 171)"
-PASS colorTest.parseColor("hsl(270, 12.5%, 62.5%)") is "rgb(159, 147, 171)"
-PASS colorTest.parseColor("hsl(300, 12.5%, 62.5%)") is "rgb(171, 147, 171)"
-PASS colorTest.parseColor("hsl(330, 12.5%, 62.5%)") is "rgb(171, 147, 159)"
-PASS colorTest.parseColor("hsl(0, 25%, 62.5%)") is "rgb(183, 135, 135)"
-PASS colorTest.parseColor("hsl(30, 25%, 62.5%)") is "rgb(183, 159, 135)"
-PASS colorTest.parseColor("hsl(60, 25%, 62.5%)") is "rgb(183, 183, 135)"
-PASS colorTest.parseColor("hsl(90, 25%, 62.5%)") is "rgb(159, 183, 135)"
-PASS colorTest.parseColor("hsl(120, 25%, 62.5%)") is "rgb(135, 183, 135)"
-PASS colorTest.parseColor("hsl(150, 25%, 62.5%)") is "rgb(135, 183, 159)"
-PASS colorTest.parseColor("hsl(180, 25%, 62.5%)") is "rgb(135, 183, 183)"
-PASS colorTest.parseColor("hsl(210, 25%, 62.5%)") is "rgb(135, 159, 183)"
-PASS colorTest.parseColor("hsl(240, 25%, 62.5%)") is "rgb(135, 135, 183)"
-PASS colorTest.parseColor("hsl(270, 25%, 62.5%)") is "rgb(159, 135, 183)"
-PASS colorTest.parseColor("hsl(300, 25%, 62.5%)") is "rgb(183, 135, 183)"
-PASS colorTest.parseColor("hsl(330, 25%, 62.5%)") is "rgb(183, 135, 159)"
-FAIL colorTest.parseColor("hsl(0, 37.5%, 62.5%)") should be rgb(195, 123, 123). Was rgb(195, 124, 124).
-FAIL colorTest.parseColor("hsl(30, 37.5%, 62.5%)") should be rgb(195, 159, 123). Was rgb(195, 159, 124).
-FAIL colorTest.parseColor("hsl(60, 37.5%, 62.5%)") should be rgb(195, 195, 123). Was rgb(195, 195, 124).
-FAIL colorTest.parseColor("hsl(90, 37.5%, 62.5%)") should be rgb(159, 195, 123). Was rgb(159, 195, 124).
-FAIL colorTest.parseColor("hsl(120, 37.5%, 62.5%)") should be rgb(123, 195, 123). Was rgb(124, 195, 124).
-FAIL colorTest.parseColor("hsl(150, 37.5%, 62.5%)") should be rgb(123, 195, 159). Was rgb(124, 195, 159).
-FAIL colorTest.parseColor("hsl(180, 37.5%, 62.5%)") should be rgb(123, 195, 195). Was rgb(124, 195, 195).
-FAIL colorTest.parseColor("hsl(210, 37.5%, 62.5%)") should be rgb(123, 159, 195). Was rgb(124, 159, 195).
-FAIL colorTest.parseColor("hsl(240, 37.5%, 62.5%)") should be rgb(123, 123, 195). Was rgb(124, 124, 195).
-FAIL colorTest.parseColor("hsl(270, 37.5%, 62.5%)") should be rgb(159, 123, 195). Was rgb(159, 124, 195).
-FAIL colorTest.parseColor("hsl(300, 37.5%, 62.5%)") should be rgb(195, 123, 195). Was rgb(195, 124, 195).
-FAIL colorTest.parseColor("hsl(330, 37.5%, 62.5%)") should be rgb(195, 123, 159). Was rgb(195, 124, 159).
-FAIL colorTest.parseColor("hsl(0, 50%, 62.5%)") should be rgb(207, 111, 111). Was rgb(207, 112, 112).
-FAIL colorTest.parseColor("hsl(30, 50%, 62.5%)") should be rgb(207, 159, 111). Was rgb(207, 159, 112).
-FAIL colorTest.parseColor("hsl(60, 50%, 62.5%)") should be rgb(207, 207, 111). Was rgb(207, 207, 112).
-FAIL colorTest.parseColor("hsl(90, 50%, 62.5%)") should be rgb(159, 207, 111). Was rgb(159, 207, 112).
-FAIL colorTest.parseColor("hsl(120, 50%, 62.5%)") should be rgb(111, 207, 111). Was rgb(112, 207, 112).
-FAIL colorTest.parseColor("hsl(150, 50%, 62.5%)") should be rgb(111, 207, 159). Was rgb(112, 207, 159).
-FAIL colorTest.parseColor("hsl(180, 50%, 62.5%)") should be rgb(111, 207, 207). Was rgb(112, 207, 207).
-FAIL colorTest.parseColor("hsl(210, 50%, 62.5%)") should be rgb(111, 159, 207). Was rgb(112, 159, 207).
-FAIL colorTest.parseColor("hsl(240, 50%, 62.5%)") should be rgb(111, 111, 207). Was rgb(112, 112, 207).
-FAIL colorTest.parseColor("hsl(270, 50%, 62.5%)") should be rgb(159, 111, 207). Was rgb(159, 112, 207).
-FAIL colorTest.parseColor("hsl(300, 50%, 62.5%)") should be rgb(207, 111, 207). Was rgb(207, 112, 207).
-FAIL colorTest.parseColor("hsl(330, 50%, 62.5%)") should be rgb(207, 111, 159). Was rgb(207, 112, 159).
-FAIL colorTest.parseColor("hsl(0, 62.5%, 62.5%)") should be rgb(219, 99, 99). Was rgb(219, 100, 100).
-FAIL colorTest.parseColor("hsl(30, 62.5%, 62.5%)") should be rgb(219, 159, 99). Was rgb(219, 159, 100).
-FAIL colorTest.parseColor("hsl(60, 62.5%, 62.5%)") should be rgb(219, 219, 99). Was rgb(219, 219, 100).
-FAIL colorTest.parseColor("hsl(90, 62.5%, 62.5%)") should be rgb(159, 219, 99). Was rgb(159, 219, 100).
-FAIL colorTest.parseColor("hsl(120, 62.5%, 62.5%)") should be rgb(99, 219, 99). Was rgb(100, 219, 100).
-FAIL colorTest.parseColor("hsl(150, 62.5%, 62.5%)") should be rgb(99, 219, 159). Was rgb(100, 219, 159).
-FAIL colorTest.parseColor("hsl(180, 62.5%, 62.5%)") should be rgb(99, 219, 219). Was rgb(100, 219, 219).
-FAIL colorTest.parseColor("hsl(210, 62.5%, 62.5%)") should be rgb(99, 159, 219). Was rgb(100, 159, 219).
-FAIL colorTest.parseColor("hsl(240, 62.5%, 62.5%)") should be rgb(99, 99, 219). Was rgb(100, 100, 219).
-FAIL colorTest.parseColor("hsl(270, 62.5%, 62.5%)") should be rgb(159, 99, 219). Was rgb(159, 100, 219).
-FAIL colorTest.parseColor("hsl(300, 62.5%, 62.5%)") should be rgb(219, 99, 219). Was rgb(219, 100, 219).
-FAIL colorTest.parseColor("hsl(330, 62.5%, 62.5%)") should be rgb(219, 99, 159). Was rgb(219, 100, 159).
-FAIL colorTest.parseColor("hsl(0, 75%, 62.5%)") should be rgb(231, 87, 87). Was rgb(231, 88, 88).
-FAIL colorTest.parseColor("hsl(30, 75%, 62.5%)") should be rgb(231, 159, 87). Was rgb(231, 159, 88).
-FAIL colorTest.parseColor("hsl(60, 75%, 62.5%)") should be rgb(231, 231, 87). Was rgb(231, 231, 88).
-FAIL colorTest.parseColor("hsl(90, 75%, 62.5%)") should be rgb(159, 231, 87). Was rgb(159, 231, 88).
-FAIL colorTest.parseColor("hsl(120, 75%, 62.5%)") should be rgb(87, 231, 87). Was rgb(88, 231, 88).
-FAIL colorTest.parseColor("hsl(150, 75%, 62.5%)") should be rgb(87, 231, 159). Was rgb(88, 231, 159).
-FAIL colorTest.parseColor("hsl(180, 75%, 62.5%)") should be rgb(87, 231, 231). Was rgb(88, 231, 231).
-FAIL colorTest.parseColor("hsl(210, 75%, 62.5%)") should be rgb(87, 159, 231). Was rgb(88, 159, 231).
-FAIL colorTest.parseColor("hsl(240, 75%, 62.5%)") should be rgb(87, 87, 231). Was rgb(88, 88, 231).
-FAIL colorTest.parseColor("hsl(270, 75%, 62.5%)") should be rgb(159, 87, 231). Was rgb(159, 88, 231).
-FAIL colorTest.parseColor("hsl(300, 75%, 62.5%)") should be rgb(231, 87, 231). Was rgb(231, 88, 231).
-FAIL colorTest.parseColor("hsl(330, 75%, 62.5%)") should be rgb(231, 87, 159). Was rgb(231, 88, 159).
-FAIL colorTest.parseColor("hsl(0, 87.5%, 62.5%)") should be rgb(243, 75, 75). Was rgb(243, 76, 76).
-FAIL colorTest.parseColor("hsl(30, 87.5%, 62.5%)") should be rgb(243, 159, 75). Was rgb(243, 159, 76).
-FAIL colorTest.parseColor("hsl(60, 87.5%, 62.5%)") should be rgb(243, 243, 75). Was rgb(243, 243, 76).
-FAIL colorTest.parseColor("hsl(90, 87.5%, 62.5%)") should be rgb(159, 243, 75). Was rgb(159, 243, 76).
-FAIL colorTest.parseColor("hsl(120, 87.5%, 62.5%)") should be rgb(75, 243, 75). Was rgb(76, 243, 76).
-FAIL colorTest.parseColor("hsl(150, 87.5%, 62.5%)") should be rgb(75, 243, 159). Was rgb(76, 243, 159).
-FAIL colorTest.parseColor("hsl(180, 87.5%, 62.5%)") should be rgb(75, 243, 243). Was rgb(76, 243, 243).
-FAIL colorTest.parseColor("hsl(210, 87.5%, 62.5%)") should be rgb(75, 159, 243). Was rgb(76, 159, 243).
-FAIL colorTest.parseColor("hsl(240, 87.5%, 62.5%)") should be rgb(75, 75, 243). Was rgb(76, 76, 243).
-FAIL colorTest.parseColor("hsl(270, 87.5%, 62.5%)") should be rgb(159, 75, 243). Was rgb(159, 76, 243).
-FAIL colorTest.parseColor("hsl(300, 87.5%, 62.5%)") should be rgb(243, 75, 243). Was rgb(243, 76, 243).
-FAIL colorTest.parseColor("hsl(330, 87.5%, 62.5%)") should be rgb(243, 75, 159). Was rgb(243, 76, 159).
-FAIL colorTest.parseColor("hsl(0, 100%, 62.5%)") should be rgb(255, 63, 63). Was rgb(255, 64, 64).
-FAIL colorTest.parseColor("hsl(30, 100%, 62.5%)") should be rgb(255, 159, 63). Was rgb(255, 159, 64).
-FAIL colorTest.parseColor("hsl(60, 100%, 62.5%)") should be rgb(255, 255, 63). Was rgb(255, 255, 64).
-FAIL colorTest.parseColor("hsl(90, 100%, 62.5%)") should be rgb(159, 255, 63). Was rgb(159, 255, 64).
-FAIL colorTest.parseColor("hsl(120, 100%, 62.5%)") should be rgb(63, 255, 63). Was rgb(64, 255, 64).
-FAIL colorTest.parseColor("hsl(150, 100%, 62.5%)") should be rgb(63, 255, 159). Was rgb(64, 255, 159).
-FAIL colorTest.parseColor("hsl(180, 100%, 62.5%)") should be rgb(63, 255, 255). Was rgb(64, 255, 255).
-FAIL colorTest.parseColor("hsl(210, 100%, 62.5%)") should be rgb(63, 159, 255). Was rgb(64, 159, 255).
-FAIL colorTest.parseColor("hsl(240, 100%, 62.5%)") should be rgb(63, 63, 255). Was rgb(64, 64, 255).
-FAIL colorTest.parseColor("hsl(270, 100%, 62.5%)") should be rgb(159, 63, 255). Was rgb(159, 64, 255).
-FAIL colorTest.parseColor("hsl(300, 100%, 62.5%)") should be rgb(255, 63, 255). Was rgb(255, 64, 255).
-FAIL colorTest.parseColor("hsl(330, 100%, 62.5%)") should be rgb(255, 63, 159). Was rgb(255, 64, 159).
-PASS colorTest.parseColor("hsl(0, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(30, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(60, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(90, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(120, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(150, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(180, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(210, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(240, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(270, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(300, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(330, 0%, 75%)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsl(0, 12.5%, 75%)") is "rgb(199, 183, 183)"
-PASS colorTest.parseColor("hsl(30, 12.5%, 75%)") is "rgb(199, 191, 183)"
-PASS colorTest.parseColor("hsl(60, 12.5%, 75%)") is "rgb(199, 199, 183)"
-PASS colorTest.parseColor("hsl(90, 12.5%, 75%)") is "rgb(191, 199, 183)"
-PASS colorTest.parseColor("hsl(120, 12.5%, 75%)") is "rgb(183, 199, 183)"
-PASS colorTest.parseColor("hsl(150, 12.5%, 75%)") is "rgb(183, 199, 191)"
-PASS colorTest.parseColor("hsl(180, 12.5%, 75%)") is "rgb(183, 199, 199)"
-PASS colorTest.parseColor("hsl(210, 12.5%, 75%)") is "rgb(183, 191, 199)"
-PASS colorTest.parseColor("hsl(240, 12.5%, 75%)") is "rgb(183, 183, 199)"
-PASS colorTest.parseColor("hsl(270, 12.5%, 75%)") is "rgb(191, 183, 199)"
-PASS colorTest.parseColor("hsl(300, 12.5%, 75%)") is "rgb(199, 183, 199)"
-PASS colorTest.parseColor("hsl(330, 12.5%, 75%)") is "rgb(199, 183, 191)"
-PASS colorTest.parseColor("hsl(0, 25%, 75%)") is "rgb(207, 175, 175)"
-PASS colorTest.parseColor("hsl(30, 25%, 75%)") is "rgb(207, 191, 175)"
-PASS colorTest.parseColor("hsl(60, 25%, 75%)") is "rgb(207, 207, 175)"
-PASS colorTest.parseColor("hsl(90, 25%, 75%)") is "rgb(191, 207, 175)"
-PASS colorTest.parseColor("hsl(120, 25%, 75%)") is "rgb(175, 207, 175)"
-PASS colorTest.parseColor("hsl(150, 25%, 75%)") is "rgb(175, 207, 191)"
-PASS colorTest.parseColor("hsl(180, 25%, 75%)") is "rgb(175, 207, 207)"
-PASS colorTest.parseColor("hsl(210, 25%, 75%)") is "rgb(175, 191, 207)"
-PASS colorTest.parseColor("hsl(240, 25%, 75%)") is "rgb(175, 175, 207)"
-PASS colorTest.parseColor("hsl(270, 25%, 75%)") is "rgb(191, 175, 207)"
-PASS colorTest.parseColor("hsl(300, 25%, 75%)") is "rgb(207, 175, 207)"
-PASS colorTest.parseColor("hsl(330, 25%, 75%)") is "rgb(207, 175, 191)"
-PASS colorTest.parseColor("hsl(0, 37.5%, 75%)") is "rgb(215, 167, 167)"
-PASS colorTest.parseColor("hsl(30, 37.5%, 75%)") is "rgb(215, 191, 167)"
-PASS colorTest.parseColor("hsl(60, 37.5%, 75%)") is "rgb(215, 215, 167)"
-PASS colorTest.parseColor("hsl(90, 37.5%, 75%)") is "rgb(191, 215, 167)"
-PASS colorTest.parseColor("hsl(120, 37.5%, 75%)") is "rgb(167, 215, 167)"
-PASS colorTest.parseColor("hsl(150, 37.5%, 75%)") is "rgb(167, 215, 191)"
-PASS colorTest.parseColor("hsl(180, 37.5%, 75%)") is "rgb(167, 215, 215)"
-PASS colorTest.parseColor("hsl(210, 37.5%, 75%)") is "rgb(167, 191, 215)"
-PASS colorTest.parseColor("hsl(240, 37.5%, 75%)") is "rgb(167, 167, 215)"
-PASS colorTest.parseColor("hsl(270, 37.5%, 75%)") is "rgb(191, 167, 215)"
-PASS colorTest.parseColor("hsl(300, 37.5%, 75%)") is "rgb(215, 167, 215)"
-PASS colorTest.parseColor("hsl(330, 37.5%, 75%)") is "rgb(215, 167, 191)"
-PASS colorTest.parseColor("hsl(0, 50%, 75%)") is "rgb(223, 159, 159)"
-PASS colorTest.parseColor("hsl(30, 50%, 75%)") is "rgb(223, 191, 159)"
-PASS colorTest.parseColor("hsl(60, 50%, 75%)") is "rgb(223, 223, 159)"
-PASS colorTest.parseColor("hsl(90, 50%, 75%)") is "rgb(191, 223, 159)"
-PASS colorTest.parseColor("hsl(120, 50%, 75%)") is "rgb(159, 223, 159)"
-PASS colorTest.parseColor("hsl(150, 50%, 75%)") is "rgb(159, 223, 191)"
-PASS colorTest.parseColor("hsl(180, 50%, 75%)") is "rgb(159, 223, 223)"
-PASS colorTest.parseColor("hsl(210, 50%, 75%)") is "rgb(159, 191, 223)"
-PASS colorTest.parseColor("hsl(240, 50%, 75%)") is "rgb(159, 159, 223)"
-PASS colorTest.parseColor("hsl(270, 50%, 75%)") is "rgb(191, 159, 223)"
-PASS colorTest.parseColor("hsl(300, 50%, 75%)") is "rgb(223, 159, 223)"
-PASS colorTest.parseColor("hsl(330, 50%, 75%)") is "rgb(223, 159, 191)"
-PASS colorTest.parseColor("hsl(0, 62.5%, 75%)") is "rgb(231, 151, 151)"
-PASS colorTest.parseColor("hsl(30, 62.5%, 75%)") is "rgb(231, 191, 151)"
-PASS colorTest.parseColor("hsl(60, 62.5%, 75%)") is "rgb(231, 231, 151)"
-PASS colorTest.parseColor("hsl(90, 62.5%, 75%)") is "rgb(191, 231, 151)"
-PASS colorTest.parseColor("hsl(120, 62.5%, 75%)") is "rgb(151, 231, 151)"
-PASS colorTest.parseColor("hsl(150, 62.5%, 75%)") is "rgb(151, 231, 191)"
-PASS colorTest.parseColor("hsl(180, 62.5%, 75%)") is "rgb(151, 231, 231)"
-PASS colorTest.parseColor("hsl(210, 62.5%, 75%)") is "rgb(151, 191, 231)"
-PASS colorTest.parseColor("hsl(240, 62.5%, 75%)") is "rgb(151, 151, 231)"
-PASS colorTest.parseColor("hsl(270, 62.5%, 75%)") is "rgb(191, 151, 231)"
-PASS colorTest.parseColor("hsl(300, 62.5%, 75%)") is "rgb(231, 151, 231)"
-PASS colorTest.parseColor("hsl(330, 62.5%, 75%)") is "rgb(231, 151, 191)"
-PASS colorTest.parseColor("hsl(0, 75%, 75%)") is "rgb(239, 143, 143)"
-PASS colorTest.parseColor("hsl(30, 75%, 75%)") is "rgb(239, 191, 143)"
-PASS colorTest.parseColor("hsl(60, 75%, 75%)") is "rgb(239, 239, 143)"
-PASS colorTest.parseColor("hsl(90, 75%, 75%)") is "rgb(191, 239, 143)"
-PASS colorTest.parseColor("hsl(120, 75%, 75%)") is "rgb(143, 239, 143)"
-PASS colorTest.parseColor("hsl(150, 75%, 75%)") is "rgb(143, 239, 191)"
-PASS colorTest.parseColor("hsl(180, 75%, 75%)") is "rgb(143, 239, 239)"
-PASS colorTest.parseColor("hsl(210, 75%, 75%)") is "rgb(143, 191, 239)"
-PASS colorTest.parseColor("hsl(240, 75%, 75%)") is "rgb(143, 143, 239)"
-PASS colorTest.parseColor("hsl(270, 75%, 75%)") is "rgb(191, 143, 239)"
-PASS colorTest.parseColor("hsl(300, 75%, 75%)") is "rgb(239, 143, 239)"
-PASS colorTest.parseColor("hsl(330, 75%, 75%)") is "rgb(239, 143, 191)"
-PASS colorTest.parseColor("hsl(0, 87.5%, 75%)") is "rgb(247, 135, 135)"
-PASS colorTest.parseColor("hsl(30, 87.5%, 75%)") is "rgb(247, 191, 135)"
-PASS colorTest.parseColor("hsl(60, 87.5%, 75%)") is "rgb(247, 247, 135)"
-PASS colorTest.parseColor("hsl(90, 87.5%, 75%)") is "rgb(191, 247, 135)"
-PASS colorTest.parseColor("hsl(120, 87.5%, 75%)") is "rgb(135, 247, 135)"
-PASS colorTest.parseColor("hsl(150, 87.5%, 75%)") is "rgb(135, 247, 191)"
-PASS colorTest.parseColor("hsl(180, 87.5%, 75%)") is "rgb(135, 247, 247)"
-PASS colorTest.parseColor("hsl(210, 87.5%, 75%)") is "rgb(135, 191, 247)"
-PASS colorTest.parseColor("hsl(240, 87.5%, 75%)") is "rgb(135, 135, 247)"
-PASS colorTest.parseColor("hsl(270, 87.5%, 75%)") is "rgb(191, 135, 247)"
-PASS colorTest.parseColor("hsl(300, 87.5%, 75%)") is "rgb(247, 135, 247)"
-PASS colorTest.parseColor("hsl(330, 87.5%, 75%)") is "rgb(247, 135, 191)"
-FAIL colorTest.parseColor("hsl(0, 100%, 75%)") should be rgb(255, 127, 127). Was rgb(255, 128, 128).
-FAIL colorTest.parseColor("hsl(30, 100%, 75%)") should be rgb(255, 191, 127). Was rgb(255, 191, 128).
-FAIL colorTest.parseColor("hsl(60, 100%, 75%)") should be rgb(255, 255, 127). Was rgb(255, 255, 128).
-FAIL colorTest.parseColor("hsl(90, 100%, 75%)") should be rgb(191, 255, 127). Was rgb(191, 255, 128).
-FAIL colorTest.parseColor("hsl(120, 100%, 75%)") should be rgb(127, 255, 127). Was rgb(128, 255, 128).
-FAIL colorTest.parseColor("hsl(150, 100%, 75%)") should be rgb(127, 255, 191). Was rgb(128, 255, 191).
-FAIL colorTest.parseColor("hsl(180, 100%, 75%)") should be rgb(127, 255, 255). Was rgb(128, 255, 255).
-FAIL colorTest.parseColor("hsl(210, 100%, 75%)") should be rgb(127, 191, 255). Was rgb(128, 191, 255).
-FAIL colorTest.parseColor("hsl(240, 100%, 75%)") should be rgb(127, 127, 255). Was rgb(128, 128, 255).
-FAIL colorTest.parseColor("hsl(270, 100%, 75%)") should be rgb(191, 127, 255). Was rgb(191, 128, 255).
-FAIL colorTest.parseColor("hsl(300, 100%, 75%)") should be rgb(255, 127, 255). Was rgb(255, 128, 255).
-FAIL colorTest.parseColor("hsl(330, 100%, 75%)") should be rgb(255, 127, 191). Was rgb(255, 128, 191).
-PASS colorTest.parseColor("hsl(0, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(30, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(60, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(90, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(120, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(150, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(180, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(210, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(240, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(270, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(300, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(330, 0%, 87.5%)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsl(0, 12.5%, 87.5%)") is "rgb(227, 219, 219)"
-PASS colorTest.parseColor("hsl(30, 12.5%, 87.5%)") is "rgb(227, 223, 219)"
-PASS colorTest.parseColor("hsl(60, 12.5%, 87.5%)") is "rgb(227, 227, 219)"
-PASS colorTest.parseColor("hsl(90, 12.5%, 87.5%)") is "rgb(223, 227, 219)"
-PASS colorTest.parseColor("hsl(120, 12.5%, 87.5%)") is "rgb(219, 227, 219)"
-PASS colorTest.parseColor("hsl(150, 12.5%, 87.5%)") is "rgb(219, 227, 223)"
-PASS colorTest.parseColor("hsl(180, 12.5%, 87.5%)") is "rgb(219, 227, 227)"
-PASS colorTest.parseColor("hsl(210, 12.5%, 87.5%)") is "rgb(219, 223, 227)"
-PASS colorTest.parseColor("hsl(240, 12.5%, 87.5%)") is "rgb(219, 219, 227)"
-PASS colorTest.parseColor("hsl(270, 12.5%, 87.5%)") is "rgb(223, 219, 227)"
-PASS colorTest.parseColor("hsl(300, 12.5%, 87.5%)") is "rgb(227, 219, 227)"
-PASS colorTest.parseColor("hsl(330, 12.5%, 87.5%)") is "rgb(227, 219, 223)"
-PASS colorTest.parseColor("hsl(0, 25%, 87.5%)") is "rgb(231, 215, 215)"
-PASS colorTest.parseColor("hsl(30, 25%, 87.5%)") is "rgb(231, 223, 215)"
-PASS colorTest.parseColor("hsl(60, 25%, 87.5%)") is "rgb(231, 231, 215)"
-PASS colorTest.parseColor("hsl(90, 25%, 87.5%)") is "rgb(223, 231, 215)"
-PASS colorTest.parseColor("hsl(120, 25%, 87.5%)") is "rgb(215, 231, 215)"
-PASS colorTest.parseColor("hsl(150, 25%, 87.5%)") is "rgb(215, 231, 223)"
-PASS colorTest.parseColor("hsl(180, 25%, 87.5%)") is "rgb(215, 231, 231)"
-PASS colorTest.parseColor("hsl(210, 25%, 87.5%)") is "rgb(215, 223, 231)"
-PASS colorTest.parseColor("hsl(240, 25%, 87.5%)") is "rgb(215, 215, 231)"
-PASS colorTest.parseColor("hsl(270, 25%, 87.5%)") is "rgb(223, 215, 231)"
-PASS colorTest.parseColor("hsl(300, 25%, 87.5%)") is "rgb(231, 215, 231)"
-PASS colorTest.parseColor("hsl(330, 25%, 87.5%)") is "rgb(231, 215, 223)"
-PASS colorTest.parseColor("hsl(0, 37.5%, 87.5%)") is "rgb(235, 211, 211)"
-PASS colorTest.parseColor("hsl(30, 37.5%, 87.5%)") is "rgb(235, 223, 211)"
-PASS colorTest.parseColor("hsl(60, 37.5%, 87.5%)") is "rgb(235, 235, 211)"
-PASS colorTest.parseColor("hsl(90, 37.5%, 87.5%)") is "rgb(223, 235, 211)"
-PASS colorTest.parseColor("hsl(120, 37.5%, 87.5%)") is "rgb(211, 235, 211)"
-PASS colorTest.parseColor("hsl(150, 37.5%, 87.5%)") is "rgb(211, 235, 223)"
-PASS colorTest.parseColor("hsl(180, 37.5%, 87.5%)") is "rgb(211, 235, 235)"
-PASS colorTest.parseColor("hsl(210, 37.5%, 87.5%)") is "rgb(211, 223, 235)"
-PASS colorTest.parseColor("hsl(240, 37.5%, 87.5%)") is "rgb(211, 211, 235)"
-PASS colorTest.parseColor("hsl(270, 37.5%, 87.5%)") is "rgb(223, 211, 235)"
-PASS colorTest.parseColor("hsl(300, 37.5%, 87.5%)") is "rgb(235, 211, 235)"
-PASS colorTest.parseColor("hsl(330, 37.5%, 87.5%)") is "rgb(235, 211, 223)"
-PASS colorTest.parseColor("hsl(0, 50%, 87.5%)") is "rgb(239, 207, 207)"
-PASS colorTest.parseColor("hsl(30, 50%, 87.5%)") is "rgb(239, 223, 207)"
-PASS colorTest.parseColor("hsl(60, 50%, 87.5%)") is "rgb(239, 239, 207)"
-PASS colorTest.parseColor("hsl(90, 50%, 87.5%)") is "rgb(223, 239, 207)"
-PASS colorTest.parseColor("hsl(120, 50%, 87.5%)") is "rgb(207, 239, 207)"
-PASS colorTest.parseColor("hsl(150, 50%, 87.5%)") is "rgb(207, 239, 223)"
-PASS colorTest.parseColor("hsl(180, 50%, 87.5%)") is "rgb(207, 239, 239)"
-PASS colorTest.parseColor("hsl(210, 50%, 87.5%)") is "rgb(207, 223, 239)"
-PASS colorTest.parseColor("hsl(240, 50%, 87.5%)") is "rgb(207, 207, 239)"
-PASS colorTest.parseColor("hsl(270, 50%, 87.5%)") is "rgb(223, 207, 239)"
-PASS colorTest.parseColor("hsl(300, 50%, 87.5%)") is "rgb(239, 207, 239)"
-PASS colorTest.parseColor("hsl(330, 50%, 87.5%)") is "rgb(239, 207, 223)"
-PASS colorTest.parseColor("hsl(0, 62.5%, 87.5%)") is "rgb(243, 203, 203)"
-PASS colorTest.parseColor("hsl(30, 62.5%, 87.5%)") is "rgb(243, 223, 203)"
-PASS colorTest.parseColor("hsl(60, 62.5%, 87.5%)") is "rgb(243, 243, 203)"
-PASS colorTest.parseColor("hsl(90, 62.5%, 87.5%)") is "rgb(223, 243, 203)"
-PASS colorTest.parseColor("hsl(120, 62.5%, 87.5%)") is "rgb(203, 243, 203)"
-PASS colorTest.parseColor("hsl(150, 62.5%, 87.5%)") is "rgb(203, 243, 223)"
-PASS colorTest.parseColor("hsl(180, 62.5%, 87.5%)") is "rgb(203, 243, 243)"
-PASS colorTest.parseColor("hsl(210, 62.5%, 87.5%)") is "rgb(203, 223, 243)"
-PASS colorTest.parseColor("hsl(240, 62.5%, 87.5%)") is "rgb(203, 203, 243)"
-PASS colorTest.parseColor("hsl(270, 62.5%, 87.5%)") is "rgb(223, 203, 243)"
-PASS colorTest.parseColor("hsl(300, 62.5%, 87.5%)") is "rgb(243, 203, 243)"
-PASS colorTest.parseColor("hsl(330, 62.5%, 87.5%)") is "rgb(243, 203, 223)"
-PASS colorTest.parseColor("hsl(0, 75%, 87.5%)") is "rgb(247, 199, 199)"
-PASS colorTest.parseColor("hsl(30, 75%, 87.5%)") is "rgb(247, 223, 199)"
-PASS colorTest.parseColor("hsl(60, 75%, 87.5%)") is "rgb(247, 247, 199)"
-PASS colorTest.parseColor("hsl(90, 75%, 87.5%)") is "rgb(223, 247, 199)"
-PASS colorTest.parseColor("hsl(120, 75%, 87.5%)") is "rgb(199, 247, 199)"
-PASS colorTest.parseColor("hsl(150, 75%, 87.5%)") is "rgb(199, 247, 223)"
-PASS colorTest.parseColor("hsl(180, 75%, 87.5%)") is "rgb(199, 247, 247)"
-PASS colorTest.parseColor("hsl(210, 75%, 87.5%)") is "rgb(199, 223, 247)"
-PASS colorTest.parseColor("hsl(240, 75%, 87.5%)") is "rgb(199, 199, 247)"
-PASS colorTest.parseColor("hsl(270, 75%, 87.5%)") is "rgb(223, 199, 247)"
-PASS colorTest.parseColor("hsl(300, 75%, 87.5%)") is "rgb(247, 199, 247)"
-PASS colorTest.parseColor("hsl(330, 75%, 87.5%)") is "rgb(247, 199, 223)"
-PASS colorTest.parseColor("hsl(0, 87.5%, 87.5%)") is "rgb(251, 195, 195)"
-PASS colorTest.parseColor("hsl(30, 87.5%, 87.5%)") is "rgb(251, 223, 195)"
-PASS colorTest.parseColor("hsl(60, 87.5%, 87.5%)") is "rgb(251, 251, 195)"
-PASS colorTest.parseColor("hsl(90, 87.5%, 87.5%)") is "rgb(223, 251, 195)"
-PASS colorTest.parseColor("hsl(120, 87.5%, 87.5%)") is "rgb(195, 251, 195)"
-PASS colorTest.parseColor("hsl(150, 87.5%, 87.5%)") is "rgb(195, 251, 223)"
-PASS colorTest.parseColor("hsl(180, 87.5%, 87.5%)") is "rgb(195, 251, 251)"
-PASS colorTest.parseColor("hsl(210, 87.5%, 87.5%)") is "rgb(195, 223, 251)"
-PASS colorTest.parseColor("hsl(240, 87.5%, 87.5%)") is "rgb(195, 195, 251)"
-PASS colorTest.parseColor("hsl(270, 87.5%, 87.5%)") is "rgb(223, 195, 251)"
-PASS colorTest.parseColor("hsl(300, 87.5%, 87.5%)") is "rgb(251, 195, 251)"
-PASS colorTest.parseColor("hsl(330, 87.5%, 87.5%)") is "rgb(251, 195, 223)"
-PASS colorTest.parseColor("hsl(0, 100%, 87.5%)") is "rgb(255, 191, 191)"
-PASS colorTest.parseColor("hsl(30, 100%, 87.5%)") is "rgb(255, 223, 191)"
-PASS colorTest.parseColor("hsl(60, 100%, 87.5%)") is "rgb(255, 255, 191)"
-PASS colorTest.parseColor("hsl(90, 100%, 87.5%)") is "rgb(223, 255, 191)"
-PASS colorTest.parseColor("hsl(120, 100%, 87.5%)") is "rgb(191, 255, 191)"
-PASS colorTest.parseColor("hsl(150, 100%, 87.5%)") is "rgb(191, 255, 223)"
-PASS colorTest.parseColor("hsl(180, 100%, 87.5%)") is "rgb(191, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 100%, 87.5%)") is "rgb(191, 223, 255)"
-PASS colorTest.parseColor("hsl(240, 100%, 87.5%)") is "rgb(191, 191, 255)"
-PASS colorTest.parseColor("hsl(270, 100%, 87.5%)") is "rgb(223, 191, 255)"
-PASS colorTest.parseColor("hsl(300, 100%, 87.5%)") is "rgb(255, 191, 255)"
-PASS colorTest.parseColor("hsl(330, 100%, 87.5%)") is "rgb(255, 191, 223)"
-PASS colorTest.parseColor("hsl(0, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 0%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 12.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 25%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 37.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 50%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 62.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 75%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 87.5%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(0, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(30, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(60, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(90, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(120, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(150, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(180, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(210, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(240, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(270, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(300, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsl(330, 100%, 100%)") is "rgb(255, 255, 255)"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsl.html b/third_party/WebKit/LayoutTests/css-parser/color3_hsl.html
deleted file mode 100644
index cf8fa1e..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsl.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../resources/js-test.js"></script>
-<script src="resources/color-test.js"></script>
-<script>
-var test = new ColorTest("resources/css-parsing-tests/color3_hsl.json");
-test.run();
-</script>
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1-expected.txt b/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1-expected.txt
deleted file mode 100644
index a1a542ff..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1-expected.txt
+++ /dev/null
@@ -1,1462 +0,0 @@
-CONSOLE WARNING: line 3: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
-Color test for resources/css-parsing-tests/color3_hsla_1.json
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS colorTest.parseColor("hsla(0, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 50%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 75%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 100%, 0%, 1)") is "rgb(0, 0, 0)"
-FAIL colorTest.parseColor("hsla(0, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(30, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(60, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(90, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(120, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(150, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(180, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(210, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(240, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(270, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(300, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(330, 0%, 12.5%, 1)") should be rgb(31, 31, 31). Was rgb(32, 32, 32).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 12.5%, 1)") should be rgb(35, 27, 27). Was rgb(36, 28, 28).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 12.5%, 1)") should be rgb(35, 31, 27). Was rgb(36, 32, 28).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 12.5%, 1)") should be rgb(35, 35, 27). Was rgb(36, 36, 28).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 12.5%, 1)") should be rgb(31, 35, 27). Was rgb(32, 36, 28).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 12.5%, 1)") should be rgb(27, 35, 27). Was rgb(28, 36, 28).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 12.5%, 1)") should be rgb(27, 35, 31). Was rgb(28, 36, 32).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 12.5%, 1)") should be rgb(27, 35, 35). Was rgb(28, 36, 36).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 12.5%, 1)") should be rgb(27, 31, 35). Was rgb(28, 32, 36).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 12.5%, 1)") should be rgb(27, 27, 35). Was rgb(28, 28, 36).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 12.5%, 1)") should be rgb(31, 27, 35). Was rgb(32, 28, 36).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 12.5%, 1)") should be rgb(35, 27, 35). Was rgb(36, 28, 36).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 12.5%, 1)") should be rgb(35, 27, 31). Was rgb(36, 28, 32).
-FAIL colorTest.parseColor("hsla(0, 25%, 12.5%, 1)") should be rgb(39, 23, 23). Was rgb(40, 24, 24).
-FAIL colorTest.parseColor("hsla(30, 25%, 12.5%, 1)") should be rgb(39, 31, 23). Was rgb(40, 32, 24).
-FAIL colorTest.parseColor("hsla(60, 25%, 12.5%, 1)") should be rgb(39, 39, 23). Was rgb(40, 40, 24).
-FAIL colorTest.parseColor("hsla(90, 25%, 12.5%, 1)") should be rgb(31, 39, 23). Was rgb(32, 40, 24).
-FAIL colorTest.parseColor("hsla(120, 25%, 12.5%, 1)") should be rgb(23, 39, 23). Was rgb(24, 40, 24).
-FAIL colorTest.parseColor("hsla(150, 25%, 12.5%, 1)") should be rgb(23, 39, 31). Was rgb(24, 40, 32).
-FAIL colorTest.parseColor("hsla(180, 25%, 12.5%, 1)") should be rgb(23, 39, 39). Was rgb(24, 40, 40).
-FAIL colorTest.parseColor("hsla(210, 25%, 12.5%, 1)") should be rgb(23, 31, 39). Was rgb(24, 32, 40).
-FAIL colorTest.parseColor("hsla(240, 25%, 12.5%, 1)") should be rgb(23, 23, 39). Was rgb(24, 24, 40).
-FAIL colorTest.parseColor("hsla(270, 25%, 12.5%, 1)") should be rgb(31, 23, 39). Was rgb(32, 24, 40).
-FAIL colorTest.parseColor("hsla(300, 25%, 12.5%, 1)") should be rgb(39, 23, 39). Was rgb(40, 24, 40).
-FAIL colorTest.parseColor("hsla(330, 25%, 12.5%, 1)") should be rgb(39, 23, 31). Was rgb(40, 24, 32).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 12.5%, 1)") should be rgb(43, 19, 19). Was rgb(44, 20, 20).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 12.5%, 1)") should be rgb(43, 31, 19). Was rgb(44, 32, 20).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 12.5%, 1)") should be rgb(43, 43, 19). Was rgb(44, 44, 20).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 12.5%, 1)") should be rgb(31, 43, 19). Was rgb(32, 44, 20).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 12.5%, 1)") should be rgb(19, 43, 19). Was rgb(20, 44, 20).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 12.5%, 1)") should be rgb(19, 43, 31). Was rgb(20, 44, 32).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 12.5%, 1)") should be rgb(19, 43, 43). Was rgb(20, 44, 44).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 12.5%, 1)") should be rgb(19, 31, 43). Was rgb(20, 32, 44).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 12.5%, 1)") should be rgb(19, 19, 43). Was rgb(20, 20, 44).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 12.5%, 1)") should be rgb(31, 19, 43). Was rgb(32, 20, 44).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 12.5%, 1)") should be rgb(43, 19, 43). Was rgb(44, 20, 44).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 12.5%, 1)") should be rgb(43, 19, 31). Was rgb(44, 20, 32).
-FAIL colorTest.parseColor("hsla(0, 50%, 12.5%, 1)") should be rgb(47, 15, 15). Was rgb(48, 16, 16).
-FAIL colorTest.parseColor("hsla(30, 50%, 12.5%, 1)") should be rgb(47, 31, 15). Was rgb(48, 32, 16).
-FAIL colorTest.parseColor("hsla(60, 50%, 12.5%, 1)") should be rgb(47, 47, 15). Was rgb(48, 48, 16).
-FAIL colorTest.parseColor("hsla(90, 50%, 12.5%, 1)") should be rgb(31, 47, 15). Was rgb(32, 48, 16).
-FAIL colorTest.parseColor("hsla(120, 50%, 12.5%, 1)") should be rgb(15, 47, 15). Was rgb(16, 48, 16).
-FAIL colorTest.parseColor("hsla(150, 50%, 12.5%, 1)") should be rgb(15, 47, 31). Was rgb(16, 48, 32).
-FAIL colorTest.parseColor("hsla(180, 50%, 12.5%, 1)") should be rgb(15, 47, 47). Was rgb(16, 48, 48).
-FAIL colorTest.parseColor("hsla(210, 50%, 12.5%, 1)") should be rgb(15, 31, 47). Was rgb(16, 32, 48).
-FAIL colorTest.parseColor("hsla(240, 50%, 12.5%, 1)") should be rgb(15, 15, 47). Was rgb(16, 16, 48).
-FAIL colorTest.parseColor("hsla(270, 50%, 12.5%, 1)") should be rgb(31, 15, 47). Was rgb(32, 16, 48).
-FAIL colorTest.parseColor("hsla(300, 50%, 12.5%, 1)") should be rgb(47, 15, 47). Was rgb(48, 16, 48).
-FAIL colorTest.parseColor("hsla(330, 50%, 12.5%, 1)") should be rgb(47, 15, 31). Was rgb(48, 16, 32).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 12.5%, 1)") should be rgb(51, 11, 11). Was rgb(52, 12, 12).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 12.5%, 1)") should be rgb(51, 31, 11). Was rgb(52, 32, 12).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 12.5%, 1)") should be rgb(51, 51, 11). Was rgb(52, 52, 12).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 12.5%, 1)") should be rgb(31, 51, 11). Was rgb(32, 52, 12).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 12.5%, 1)") should be rgb(11, 51, 11). Was rgb(12, 52, 12).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 12.5%, 1)") should be rgb(11, 51, 31). Was rgb(12, 52, 32).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 12.5%, 1)") should be rgb(11, 51, 51). Was rgb(12, 52, 52).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 12.5%, 1)") should be rgb(11, 31, 51). Was rgb(12, 32, 52).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 12.5%, 1)") should be rgb(11, 11, 51). Was rgb(12, 12, 52).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 12.5%, 1)") should be rgb(31, 11, 51). Was rgb(32, 12, 52).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 12.5%, 1)") should be rgb(51, 11, 51). Was rgb(52, 12, 52).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 12.5%, 1)") should be rgb(51, 11, 31). Was rgb(52, 12, 32).
-FAIL colorTest.parseColor("hsla(0, 75%, 12.5%, 1)") should be rgb(55, 7, 7). Was rgb(56, 8, 8).
-FAIL colorTest.parseColor("hsla(30, 75%, 12.5%, 1)") should be rgb(55, 31, 7). Was rgb(56, 32, 8).
-FAIL colorTest.parseColor("hsla(60, 75%, 12.5%, 1)") should be rgb(55, 55, 7). Was rgb(56, 56, 8).
-FAIL colorTest.parseColor("hsla(90, 75%, 12.5%, 1)") should be rgb(31, 55, 7). Was rgb(32, 56, 8).
-FAIL colorTest.parseColor("hsla(120, 75%, 12.5%, 1)") should be rgb(7, 55, 7). Was rgb(8, 56, 8).
-FAIL colorTest.parseColor("hsla(150, 75%, 12.5%, 1)") should be rgb(7, 55, 31). Was rgb(8, 56, 32).
-FAIL colorTest.parseColor("hsla(180, 75%, 12.5%, 1)") should be rgb(7, 55, 55). Was rgb(8, 56, 56).
-FAIL colorTest.parseColor("hsla(210, 75%, 12.5%, 1)") should be rgb(7, 31, 55). Was rgb(8, 32, 56).
-FAIL colorTest.parseColor("hsla(240, 75%, 12.5%, 1)") should be rgb(7, 7, 55). Was rgb(8, 8, 56).
-FAIL colorTest.parseColor("hsla(270, 75%, 12.5%, 1)") should be rgb(31, 7, 55). Was rgb(32, 8, 56).
-FAIL colorTest.parseColor("hsla(300, 75%, 12.5%, 1)") should be rgb(55, 7, 55). Was rgb(56, 8, 56).
-FAIL colorTest.parseColor("hsla(330, 75%, 12.5%, 1)") should be rgb(55, 7, 31). Was rgb(56, 8, 32).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 12.5%, 1)") should be rgb(59, 3, 3). Was rgb(60, 4, 4).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 12.5%, 1)") should be rgb(59, 31, 3). Was rgb(60, 32, 4).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 12.5%, 1)") should be rgb(59, 59, 3). Was rgb(60, 60, 4).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 12.5%, 1)") should be rgb(31, 59, 3). Was rgb(32, 60, 4).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 12.5%, 1)") should be rgb(3, 59, 3). Was rgb(4, 60, 4).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 12.5%, 1)") should be rgb(3, 59, 31). Was rgb(4, 60, 32).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 12.5%, 1)") should be rgb(3, 59, 59). Was rgb(4, 60, 60).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 12.5%, 1)") should be rgb(3, 31, 59). Was rgb(4, 32, 60).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 12.5%, 1)") should be rgb(3, 3, 59). Was rgb(4, 4, 60).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 12.5%, 1)") should be rgb(31, 3, 59). Was rgb(32, 4, 60).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 12.5%, 1)") should be rgb(59, 3, 59). Was rgb(60, 4, 60).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 12.5%, 1)") should be rgb(59, 3, 31). Was rgb(60, 4, 32).
-FAIL colorTest.parseColor("hsla(0, 100%, 12.5%, 1)") should be rgb(63, 0, 0). Was rgb(64, 0, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 12.5%, 1)") should be rgb(63, 31, 0). Was rgb(64, 32, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 12.5%, 1)") should be rgb(63, 63, 0). Was rgb(64, 64, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 12.5%, 1)") should be rgb(31, 63, 0). Was rgb(32, 64, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 12.5%, 1)") should be rgb(0, 63, 0). Was rgb(0, 64, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 12.5%, 1)") should be rgb(0, 63, 31). Was rgb(0, 64, 32).
-FAIL colorTest.parseColor("hsla(180, 100%, 12.5%, 1)") should be rgb(0, 63, 63). Was rgb(0, 64, 64).
-FAIL colorTest.parseColor("hsla(210, 100%, 12.5%, 1)") should be rgb(0, 31, 63). Was rgb(0, 32, 64).
-FAIL colorTest.parseColor("hsla(240, 100%, 12.5%, 1)") should be rgb(0, 0, 63). Was rgb(0, 0, 64).
-FAIL colorTest.parseColor("hsla(270, 100%, 12.5%, 1)") should be rgb(31, 0, 63). Was rgb(32, 0, 64).
-FAIL colorTest.parseColor("hsla(300, 100%, 12.5%, 1)") should be rgb(63, 0, 63). Was rgb(64, 0, 64).
-FAIL colorTest.parseColor("hsla(330, 100%, 12.5%, 1)") should be rgb(63, 0, 31). Was rgb(64, 0, 32).
-FAIL colorTest.parseColor("hsla(0, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(30, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(60, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(90, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(120, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(150, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(180, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(210, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(240, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(270, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(300, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(330, 0%, 25%, 1)") should be rgb(63, 63, 63). Was rgb(64, 64, 64).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 25%, 1)") should be rgb(71, 55, 55). Was rgb(72, 56, 56).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 25%, 1)") should be rgb(71, 63, 55). Was rgb(72, 64, 56).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 25%, 1)") should be rgb(71, 71, 55). Was rgb(72, 72, 56).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 25%, 1)") should be rgb(63, 71, 55). Was rgb(64, 72, 56).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 25%, 1)") should be rgb(55, 71, 55). Was rgb(56, 72, 56).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 25%, 1)") should be rgb(55, 71, 63). Was rgb(56, 72, 64).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 25%, 1)") should be rgb(55, 71, 71). Was rgb(56, 72, 72).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 25%, 1)") should be rgb(55, 63, 71). Was rgb(56, 64, 72).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 25%, 1)") should be rgb(55, 55, 71). Was rgb(56, 56, 72).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 25%, 1)") should be rgb(63, 55, 71). Was rgb(64, 56, 72).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 25%, 1)") should be rgb(71, 55, 71). Was rgb(72, 56, 72).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 25%, 1)") should be rgb(71, 55, 63). Was rgb(72, 56, 64).
-FAIL colorTest.parseColor("hsla(0, 25%, 25%, 1)") should be rgb(79, 47, 47). Was rgb(80, 48, 48).
-FAIL colorTest.parseColor("hsla(30, 25%, 25%, 1)") should be rgb(79, 63, 47). Was rgb(80, 64, 48).
-FAIL colorTest.parseColor("hsla(60, 25%, 25%, 1)") should be rgb(79, 79, 47). Was rgb(80, 80, 48).
-FAIL colorTest.parseColor("hsla(90, 25%, 25%, 1)") should be rgb(63, 79, 47). Was rgb(64, 80, 48).
-FAIL colorTest.parseColor("hsla(120, 25%, 25%, 1)") should be rgb(47, 79, 47). Was rgb(48, 80, 48).
-FAIL colorTest.parseColor("hsla(150, 25%, 25%, 1)") should be rgb(47, 79, 63). Was rgb(48, 80, 64).
-FAIL colorTest.parseColor("hsla(180, 25%, 25%, 1)") should be rgb(47, 79, 79). Was rgb(48, 80, 80).
-FAIL colorTest.parseColor("hsla(210, 25%, 25%, 1)") should be rgb(47, 63, 79). Was rgb(48, 64, 80).
-FAIL colorTest.parseColor("hsla(240, 25%, 25%, 1)") should be rgb(47, 47, 79). Was rgb(48, 48, 80).
-FAIL colorTest.parseColor("hsla(270, 25%, 25%, 1)") should be rgb(63, 47, 79). Was rgb(64, 48, 80).
-FAIL colorTest.parseColor("hsla(300, 25%, 25%, 1)") should be rgb(79, 47, 79). Was rgb(80, 48, 80).
-FAIL colorTest.parseColor("hsla(330, 25%, 25%, 1)") should be rgb(79, 47, 63). Was rgb(80, 48, 64).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 25%, 1)") should be rgb(87, 39, 39). Was rgb(88, 40, 40).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 25%, 1)") should be rgb(87, 63, 39). Was rgb(88, 64, 40).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 25%, 1)") should be rgb(87, 87, 39). Was rgb(88, 88, 40).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 25%, 1)") should be rgb(63, 87, 39). Was rgb(64, 88, 40).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 25%, 1)") should be rgb(39, 87, 39). Was rgb(40, 88, 40).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 25%, 1)") should be rgb(39, 87, 63). Was rgb(40, 88, 64).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 25%, 1)") should be rgb(39, 87, 87). Was rgb(40, 88, 88).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 25%, 1)") should be rgb(39, 63, 87). Was rgb(40, 64, 88).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 25%, 1)") should be rgb(39, 39, 87). Was rgb(40, 40, 88).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 25%, 1)") should be rgb(63, 39, 87). Was rgb(64, 40, 88).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 25%, 1)") should be rgb(87, 39, 87). Was rgb(88, 40, 88).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 25%, 1)") should be rgb(87, 39, 63). Was rgb(88, 40, 64).
-FAIL colorTest.parseColor("hsla(0, 50%, 25%, 1)") should be rgb(95, 31, 31). Was rgb(96, 32, 32).
-FAIL colorTest.parseColor("hsla(30, 50%, 25%, 1)") should be rgb(95, 63, 31). Was rgb(96, 64, 32).
-FAIL colorTest.parseColor("hsla(60, 50%, 25%, 1)") should be rgb(95, 95, 31). Was rgb(96, 96, 32).
-FAIL colorTest.parseColor("hsla(90, 50%, 25%, 1)") should be rgb(63, 95, 31). Was rgb(64, 96, 32).
-FAIL colorTest.parseColor("hsla(120, 50%, 25%, 1)") should be rgb(31, 95, 31). Was rgb(32, 96, 32).
-FAIL colorTest.parseColor("hsla(150, 50%, 25%, 1)") should be rgb(31, 95, 63). Was rgb(32, 96, 64).
-FAIL colorTest.parseColor("hsla(180, 50%, 25%, 1)") should be rgb(31, 95, 95). Was rgb(32, 96, 96).
-FAIL colorTest.parseColor("hsla(210, 50%, 25%, 1)") should be rgb(31, 63, 95). Was rgb(32, 64, 96).
-FAIL colorTest.parseColor("hsla(240, 50%, 25%, 1)") should be rgb(31, 31, 95). Was rgb(32, 32, 96).
-FAIL colorTest.parseColor("hsla(270, 50%, 25%, 1)") should be rgb(63, 31, 95). Was rgb(64, 32, 96).
-FAIL colorTest.parseColor("hsla(300, 50%, 25%, 1)") should be rgb(95, 31, 95). Was rgb(96, 32, 96).
-FAIL colorTest.parseColor("hsla(330, 50%, 25%, 1)") should be rgb(95, 31, 63). Was rgb(96, 32, 64).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 25%, 1)") should be rgb(103, 23, 23). Was rgb(104, 24, 24).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 25%, 1)") should be rgb(103, 63, 23). Was rgb(104, 64, 24).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 25%, 1)") should be rgb(103, 103, 23). Was rgb(104, 104, 24).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 25%, 1)") should be rgb(63, 103, 23). Was rgb(64, 104, 24).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 25%, 1)") should be rgb(23, 103, 23). Was rgb(24, 104, 24).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 25%, 1)") should be rgb(23, 103, 63). Was rgb(24, 104, 64).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 25%, 1)") should be rgb(23, 103, 103). Was rgb(24, 104, 104).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 25%, 1)") should be rgb(23, 63, 103). Was rgb(24, 64, 104).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 25%, 1)") should be rgb(23, 23, 103). Was rgb(24, 24, 104).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 25%, 1)") should be rgb(63, 23, 103). Was rgb(64, 24, 104).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 25%, 1)") should be rgb(103, 23, 103). Was rgb(104, 24, 104).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 25%, 1)") should be rgb(103, 23, 63). Was rgb(104, 24, 64).
-FAIL colorTest.parseColor("hsla(0, 75%, 25%, 1)") should be rgb(111, 15, 15). Was rgb(112, 16, 16).
-FAIL colorTest.parseColor("hsla(30, 75%, 25%, 1)") should be rgb(111, 63, 15). Was rgb(112, 64, 16).
-FAIL colorTest.parseColor("hsla(60, 75%, 25%, 1)") should be rgb(111, 111, 15). Was rgb(112, 112, 16).
-FAIL colorTest.parseColor("hsla(90, 75%, 25%, 1)") should be rgb(63, 111, 15). Was rgb(64, 112, 16).
-FAIL colorTest.parseColor("hsla(120, 75%, 25%, 1)") should be rgb(15, 111, 15). Was rgb(16, 112, 16).
-FAIL colorTest.parseColor("hsla(150, 75%, 25%, 1)") should be rgb(15, 111, 63). Was rgb(16, 112, 64).
-FAIL colorTest.parseColor("hsla(180, 75%, 25%, 1)") should be rgb(15, 111, 111). Was rgb(16, 112, 112).
-FAIL colorTest.parseColor("hsla(210, 75%, 25%, 1)") should be rgb(15, 63, 111). Was rgb(16, 64, 112).
-FAIL colorTest.parseColor("hsla(240, 75%, 25%, 1)") should be rgb(15, 15, 111). Was rgb(16, 16, 112).
-FAIL colorTest.parseColor("hsla(270, 75%, 25%, 1)") should be rgb(63, 15, 111). Was rgb(64, 16, 112).
-FAIL colorTest.parseColor("hsla(300, 75%, 25%, 1)") should be rgb(111, 15, 111). Was rgb(112, 16, 112).
-FAIL colorTest.parseColor("hsla(330, 75%, 25%, 1)") should be rgb(111, 15, 63). Was rgb(112, 16, 64).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 25%, 1)") should be rgb(119, 7, 7). Was rgb(120, 8, 8).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 25%, 1)") should be rgb(119, 63, 7). Was rgb(120, 64, 8).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 25%, 1)") should be rgb(119, 119, 7). Was rgb(120, 120, 8).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 25%, 1)") should be rgb(63, 119, 7). Was rgb(64, 120, 8).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 25%, 1)") should be rgb(7, 119, 7). Was rgb(8, 120, 8).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 25%, 1)") should be rgb(7, 119, 63). Was rgb(8, 120, 64).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 25%, 1)") should be rgb(7, 119, 119). Was rgb(8, 120, 120).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 25%, 1)") should be rgb(7, 63, 119). Was rgb(8, 64, 120).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 25%, 1)") should be rgb(7, 7, 119). Was rgb(8, 8, 120).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 25%, 1)") should be rgb(63, 7, 119). Was rgb(64, 8, 120).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 25%, 1)") should be rgb(119, 7, 119). Was rgb(120, 8, 120).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 25%, 1)") should be rgb(119, 7, 63). Was rgb(120, 8, 64).
-FAIL colorTest.parseColor("hsla(0, 100%, 25%, 1)") should be rgb(127, 0, 0). Was rgb(128, 0, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 25%, 1)") should be rgb(127, 63, 0). Was rgb(128, 64, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 25%, 1)") should be rgb(127, 127, 0). Was rgb(128, 128, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 25%, 1)") should be rgb(63, 127, 0). Was rgb(64, 128, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 25%, 1)") should be rgb(0, 127, 0). Was rgb(0, 128, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 25%, 1)") should be rgb(0, 127, 63). Was rgb(0, 128, 64).
-FAIL colorTest.parseColor("hsla(180, 100%, 25%, 1)") should be rgb(0, 127, 127). Was rgb(0, 128, 128).
-FAIL colorTest.parseColor("hsla(210, 100%, 25%, 1)") should be rgb(0, 63, 127). Was rgb(0, 64, 128).
-FAIL colorTest.parseColor("hsla(240, 100%, 25%, 1)") should be rgb(0, 0, 127). Was rgb(0, 0, 128).
-FAIL colorTest.parseColor("hsla(270, 100%, 25%, 1)") should be rgb(63, 0, 127). Was rgb(64, 0, 128).
-FAIL colorTest.parseColor("hsla(300, 100%, 25%, 1)") should be rgb(127, 0, 127). Was rgb(128, 0, 128).
-FAIL colorTest.parseColor("hsla(330, 100%, 25%, 1)") should be rgb(127, 0, 63). Was rgb(128, 0, 64).
-FAIL colorTest.parseColor("hsla(0, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(30, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(60, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(90, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(120, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(150, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(180, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(210, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(240, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(270, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(300, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(330, 0%, 37.5%, 1)") should be rgb(95, 95, 95). Was rgb(96, 96, 96).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 37.5%, 1)") should be rgb(107, 83, 83). Was rgb(108, 84, 84).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 37.5%, 1)") should be rgb(107, 95, 83). Was rgb(108, 96, 84).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 37.5%, 1)") should be rgb(107, 107, 83). Was rgb(108, 108, 84).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 37.5%, 1)") should be rgb(95, 107, 83). Was rgb(96, 108, 84).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 37.5%, 1)") should be rgb(83, 107, 83). Was rgb(84, 108, 84).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 37.5%, 1)") should be rgb(83, 107, 95). Was rgb(84, 108, 96).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 37.5%, 1)") should be rgb(83, 107, 107). Was rgb(84, 108, 108).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 37.5%, 1)") should be rgb(83, 95, 107). Was rgb(84, 96, 108).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 37.5%, 1)") should be rgb(83, 83, 107). Was rgb(84, 84, 108).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 37.5%, 1)") should be rgb(95, 83, 107). Was rgb(96, 84, 108).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 37.5%, 1)") should be rgb(107, 83, 107). Was rgb(108, 84, 108).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 37.5%, 1)") should be rgb(107, 83, 95). Was rgb(108, 84, 96).
-FAIL colorTest.parseColor("hsla(0, 25%, 37.5%, 1)") should be rgb(119, 71, 71). Was rgb(120, 72, 72).
-FAIL colorTest.parseColor("hsla(30, 25%, 37.5%, 1)") should be rgb(119, 95, 71). Was rgb(120, 96, 72).
-FAIL colorTest.parseColor("hsla(60, 25%, 37.5%, 1)") should be rgb(119, 119, 71). Was rgb(120, 120, 72).
-FAIL colorTest.parseColor("hsla(90, 25%, 37.5%, 1)") should be rgb(95, 119, 71). Was rgb(96, 120, 72).
-FAIL colorTest.parseColor("hsla(120, 25%, 37.5%, 1)") should be rgb(71, 119, 71). Was rgb(72, 120, 72).
-FAIL colorTest.parseColor("hsla(150, 25%, 37.5%, 1)") should be rgb(71, 119, 95). Was rgb(72, 120, 96).
-FAIL colorTest.parseColor("hsla(180, 25%, 37.5%, 1)") should be rgb(71, 119, 119). Was rgb(72, 120, 120).
-FAIL colorTest.parseColor("hsla(210, 25%, 37.5%, 1)") should be rgb(71, 95, 119). Was rgb(72, 96, 120).
-FAIL colorTest.parseColor("hsla(240, 25%, 37.5%, 1)") should be rgb(71, 71, 119). Was rgb(72, 72, 120).
-FAIL colorTest.parseColor("hsla(270, 25%, 37.5%, 1)") should be rgb(95, 71, 119). Was rgb(96, 72, 120).
-FAIL colorTest.parseColor("hsla(300, 25%, 37.5%, 1)") should be rgb(119, 71, 119). Was rgb(120, 72, 120).
-FAIL colorTest.parseColor("hsla(330, 25%, 37.5%, 1)") should be rgb(119, 71, 95). Was rgb(120, 72, 96).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 37.5%, 1)") should be rgb(131, 59, 59). Was rgb(131, 60, 60).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 37.5%, 1)") should be rgb(131, 95, 59). Was rgb(131, 96, 60).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 37.5%, 1)") should be rgb(131, 131, 59). Was rgb(131, 131, 60).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 37.5%, 1)") should be rgb(95, 131, 59). Was rgb(96, 131, 60).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 37.5%, 1)") should be rgb(59, 131, 59). Was rgb(60, 131, 60).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 37.5%, 1)") should be rgb(59, 131, 95). Was rgb(60, 131, 96).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 37.5%, 1)") should be rgb(59, 131, 131). Was rgb(60, 131, 131).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 37.5%, 1)") should be rgb(59, 95, 131). Was rgb(60, 96, 131).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 37.5%, 1)") should be rgb(59, 59, 131). Was rgb(60, 60, 131).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 37.5%, 1)") should be rgb(95, 59, 131). Was rgb(96, 60, 131).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 37.5%, 1)") should be rgb(131, 59, 131). Was rgb(131, 60, 131).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 37.5%, 1)") should be rgb(131, 59, 95). Was rgb(131, 60, 96).
-FAIL colorTest.parseColor("hsla(0, 50%, 37.5%, 1)") should be rgb(143, 47, 47). Was rgb(143, 48, 48).
-FAIL colorTest.parseColor("hsla(30, 50%, 37.5%, 1)") should be rgb(143, 95, 47). Was rgb(143, 96, 48).
-FAIL colorTest.parseColor("hsla(60, 50%, 37.5%, 1)") should be rgb(143, 143, 47). Was rgb(143, 143, 48).
-FAIL colorTest.parseColor("hsla(90, 50%, 37.5%, 1)") should be rgb(95, 143, 47). Was rgb(96, 143, 48).
-FAIL colorTest.parseColor("hsla(120, 50%, 37.5%, 1)") should be rgb(47, 143, 47). Was rgb(48, 143, 48).
-FAIL colorTest.parseColor("hsla(150, 50%, 37.5%, 1)") should be rgb(47, 143, 95). Was rgb(48, 143, 96).
-FAIL colorTest.parseColor("hsla(180, 50%, 37.5%, 1)") should be rgb(47, 143, 143). Was rgb(48, 143, 143).
-FAIL colorTest.parseColor("hsla(210, 50%, 37.5%, 1)") should be rgb(47, 95, 143). Was rgb(48, 96, 143).
-FAIL colorTest.parseColor("hsla(240, 50%, 37.5%, 1)") should be rgb(47, 47, 143). Was rgb(48, 48, 143).
-FAIL colorTest.parseColor("hsla(270, 50%, 37.5%, 1)") should be rgb(95, 47, 143). Was rgb(96, 48, 143).
-FAIL colorTest.parseColor("hsla(300, 50%, 37.5%, 1)") should be rgb(143, 47, 143). Was rgb(143, 48, 143).
-FAIL colorTest.parseColor("hsla(330, 50%, 37.5%, 1)") should be rgb(143, 47, 95). Was rgb(143, 48, 96).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 37.5%, 1)") should be rgb(155, 35, 35). Was rgb(155, 36, 36).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 37.5%, 1)") should be rgb(155, 95, 35). Was rgb(155, 96, 36).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 37.5%, 1)") should be rgb(155, 155, 35). Was rgb(155, 155, 36).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 37.5%, 1)") should be rgb(95, 155, 35). Was rgb(96, 155, 36).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 37.5%, 1)") should be rgb(35, 155, 35). Was rgb(36, 155, 36).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 37.5%, 1)") should be rgb(35, 155, 95). Was rgb(36, 155, 96).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 37.5%, 1)") should be rgb(35, 155, 155). Was rgb(36, 155, 155).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 37.5%, 1)") should be rgb(35, 95, 155). Was rgb(36, 96, 155).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 37.5%, 1)") should be rgb(35, 35, 155). Was rgb(36, 36, 155).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 37.5%, 1)") should be rgb(95, 35, 155). Was rgb(96, 36, 155).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 37.5%, 1)") should be rgb(155, 35, 155). Was rgb(155, 36, 155).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 37.5%, 1)") should be rgb(155, 35, 95). Was rgb(155, 36, 96).
-FAIL colorTest.parseColor("hsla(0, 75%, 37.5%, 1)") should be rgb(167, 23, 23). Was rgb(167, 24, 24).
-FAIL colorTest.parseColor("hsla(30, 75%, 37.5%, 1)") should be rgb(167, 95, 23). Was rgb(167, 96, 24).
-FAIL colorTest.parseColor("hsla(60, 75%, 37.5%, 1)") should be rgb(167, 167, 23). Was rgb(167, 167, 24).
-FAIL colorTest.parseColor("hsla(90, 75%, 37.5%, 1)") should be rgb(95, 167, 23). Was rgb(96, 167, 24).
-FAIL colorTest.parseColor("hsla(120, 75%, 37.5%, 1)") should be rgb(23, 167, 23). Was rgb(24, 167, 24).
-FAIL colorTest.parseColor("hsla(150, 75%, 37.5%, 1)") should be rgb(23, 167, 95). Was rgb(24, 167, 96).
-FAIL colorTest.parseColor("hsla(180, 75%, 37.5%, 1)") should be rgb(23, 167, 167). Was rgb(24, 167, 167).
-FAIL colorTest.parseColor("hsla(210, 75%, 37.5%, 1)") should be rgb(23, 95, 167). Was rgb(24, 96, 167).
-FAIL colorTest.parseColor("hsla(240, 75%, 37.5%, 1)") should be rgb(23, 23, 167). Was rgb(24, 24, 167).
-FAIL colorTest.parseColor("hsla(270, 75%, 37.5%, 1)") should be rgb(95, 23, 167). Was rgb(96, 24, 167).
-FAIL colorTest.parseColor("hsla(300, 75%, 37.5%, 1)") should be rgb(167, 23, 167). Was rgb(167, 24, 167).
-FAIL colorTest.parseColor("hsla(330, 75%, 37.5%, 1)") should be rgb(167, 23, 95). Was rgb(167, 24, 96).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 37.5%, 1)") should be rgb(179, 11, 11). Was rgb(179, 12, 12).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 37.5%, 1)") should be rgb(179, 95, 11). Was rgb(179, 96, 12).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 37.5%, 1)") should be rgb(179, 179, 11). Was rgb(179, 179, 12).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 37.5%, 1)") should be rgb(95, 179, 11). Was rgb(96, 179, 12).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 37.5%, 1)") should be rgb(11, 179, 11). Was rgb(12, 179, 12).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 37.5%, 1)") should be rgb(11, 179, 95). Was rgb(12, 179, 96).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 37.5%, 1)") should be rgb(11, 179, 179). Was rgb(12, 179, 179).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 37.5%, 1)") should be rgb(11, 95, 179). Was rgb(12, 96, 179).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 37.5%, 1)") should be rgb(11, 11, 179). Was rgb(12, 12, 179).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 37.5%, 1)") should be rgb(95, 11, 179). Was rgb(96, 12, 179).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 37.5%, 1)") should be rgb(179, 11, 179). Was rgb(179, 12, 179).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 37.5%, 1)") should be rgb(179, 11, 95). Was rgb(179, 12, 96).
-PASS colorTest.parseColor("hsla(0, 100%, 37.5%, 1)") is "rgb(191, 0, 0)"
-FAIL colorTest.parseColor("hsla(30, 100%, 37.5%, 1)") should be rgb(191, 95, 0). Was rgb(191, 96, 0).
-PASS colorTest.parseColor("hsla(60, 100%, 37.5%, 1)") is "rgb(191, 191, 0)"
-FAIL colorTest.parseColor("hsla(90, 100%, 37.5%, 1)") should be rgb(95, 191, 0). Was rgb(96, 191, 0).
-PASS colorTest.parseColor("hsla(120, 100%, 37.5%, 1)") is "rgb(0, 191, 0)"
-FAIL colorTest.parseColor("hsla(150, 100%, 37.5%, 1)") should be rgb(0, 191, 95). Was rgb(0, 191, 96).
-PASS colorTest.parseColor("hsla(180, 100%, 37.5%, 1)") is "rgb(0, 191, 191)"
-FAIL colorTest.parseColor("hsla(210, 100%, 37.5%, 1)") should be rgb(0, 95, 191). Was rgb(0, 96, 191).
-PASS colorTest.parseColor("hsla(240, 100%, 37.5%, 1)") is "rgb(0, 0, 191)"
-FAIL colorTest.parseColor("hsla(270, 100%, 37.5%, 1)") should be rgb(95, 0, 191). Was rgb(96, 0, 191).
-PASS colorTest.parseColor("hsla(300, 100%, 37.5%, 1)") is "rgb(191, 0, 191)"
-FAIL colorTest.parseColor("hsla(330, 100%, 37.5%, 1)") should be rgb(191, 0, 95). Was rgb(191, 0, 96).
-FAIL colorTest.parseColor("hsla(0, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(30, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(60, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(90, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(120, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(150, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(180, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(210, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(240, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(270, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(300, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(330, 0%, 50%, 1)") should be rgb(127, 127, 127). Was rgb(128, 128, 128).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 50%, 1)") should be rgb(143, 111, 111). Was rgb(143, 112, 112).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 50%, 1)") should be rgb(143, 127, 111). Was rgb(143, 128, 112).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 50%, 1)") should be rgb(143, 143, 111). Was rgb(143, 143, 112).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 50%, 1)") should be rgb(127, 143, 111). Was rgb(128, 143, 112).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 50%, 1)") should be rgb(111, 143, 111). Was rgb(112, 143, 112).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 50%, 1)") should be rgb(111, 143, 127). Was rgb(112, 143, 128).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 50%, 1)") should be rgb(111, 143, 143). Was rgb(112, 143, 143).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 50%, 1)") should be rgb(111, 127, 143). Was rgb(112, 128, 143).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 50%, 1)") should be rgb(111, 111, 143). Was rgb(112, 112, 143).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 50%, 1)") should be rgb(127, 111, 143). Was rgb(128, 112, 143).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 50%, 1)") should be rgb(143, 111, 143). Was rgb(143, 112, 143).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 50%, 1)") should be rgb(143, 111, 127). Was rgb(143, 112, 128).
-FAIL colorTest.parseColor("hsla(0, 25%, 50%, 1)") should be rgb(159, 95, 95). Was rgb(159, 96, 96).
-FAIL colorTest.parseColor("hsla(30, 25%, 50%, 1)") should be rgb(159, 127, 95). Was rgb(159, 128, 96).
-FAIL colorTest.parseColor("hsla(60, 25%, 50%, 1)") should be rgb(159, 159, 95). Was rgb(159, 159, 96).
-FAIL colorTest.parseColor("hsla(90, 25%, 50%, 1)") should be rgb(127, 159, 95). Was rgb(128, 159, 96).
-FAIL colorTest.parseColor("hsla(120, 25%, 50%, 1)") should be rgb(95, 159, 95). Was rgb(96, 159, 96).
-FAIL colorTest.parseColor("hsla(150, 25%, 50%, 1)") should be rgb(95, 159, 127). Was rgb(96, 159, 128).
-FAIL colorTest.parseColor("hsla(180, 25%, 50%, 1)") should be rgb(95, 159, 159). Was rgb(96, 159, 159).
-FAIL colorTest.parseColor("hsla(210, 25%, 50%, 1)") should be rgb(95, 127, 159). Was rgb(96, 128, 159).
-FAIL colorTest.parseColor("hsla(240, 25%, 50%, 1)") should be rgb(95, 95, 159). Was rgb(96, 96, 159).
-FAIL colorTest.parseColor("hsla(270, 25%, 50%, 1)") should be rgb(127, 95, 159). Was rgb(128, 96, 159).
-FAIL colorTest.parseColor("hsla(300, 25%, 50%, 1)") should be rgb(159, 95, 159). Was rgb(159, 96, 159).
-FAIL colorTest.parseColor("hsla(330, 25%, 50%, 1)") should be rgb(159, 95, 127). Was rgb(159, 96, 128).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 50%, 1)") should be rgb(175, 79, 79). Was rgb(175, 80, 80).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 50%, 1)") should be rgb(175, 127, 79). Was rgb(175, 128, 80).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 50%, 1)") should be rgb(175, 175, 79). Was rgb(175, 175, 80).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 50%, 1)") should be rgb(127, 175, 79). Was rgb(128, 175, 80).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 50%, 1)") should be rgb(79, 175, 79). Was rgb(80, 175, 80).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 50%, 1)") should be rgb(79, 175, 127). Was rgb(80, 175, 128).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 50%, 1)") should be rgb(79, 175, 175). Was rgb(80, 175, 175).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 50%, 1)") should be rgb(79, 127, 175). Was rgb(80, 128, 175).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 50%, 1)") should be rgb(79, 79, 175). Was rgb(80, 80, 175).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 50%, 1)") should be rgb(127, 79, 175). Was rgb(128, 80, 175).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 50%, 1)") should be rgb(175, 79, 175). Was rgb(175, 80, 175).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 50%, 1)") should be rgb(175, 79, 127). Was rgb(175, 80, 128).
-FAIL colorTest.parseColor("hsla(0, 50%, 50%, 1)") should be rgb(191, 63, 63). Was rgb(191, 64, 64).
-FAIL colorTest.parseColor("hsla(30, 50%, 50%, 1)") should be rgb(191, 127, 63). Was rgb(191, 128, 64).
-FAIL colorTest.parseColor("hsla(60, 50%, 50%, 1)") should be rgb(191, 191, 63). Was rgb(191, 191, 64).
-FAIL colorTest.parseColor("hsla(90, 50%, 50%, 1)") should be rgb(127, 191, 63). Was rgb(128, 191, 64).
-FAIL colorTest.parseColor("hsla(120, 50%, 50%, 1)") should be rgb(63, 191, 63). Was rgb(64, 191, 64).
-FAIL colorTest.parseColor("hsla(150, 50%, 50%, 1)") should be rgb(63, 191, 127). Was rgb(64, 191, 128).
-FAIL colorTest.parseColor("hsla(180, 50%, 50%, 1)") should be rgb(63, 191, 191). Was rgb(64, 191, 191).
-FAIL colorTest.parseColor("hsla(210, 50%, 50%, 1)") should be rgb(63, 127, 191). Was rgb(64, 128, 191).
-FAIL colorTest.parseColor("hsla(240, 50%, 50%, 1)") should be rgb(63, 63, 191). Was rgb(64, 64, 191).
-FAIL colorTest.parseColor("hsla(270, 50%, 50%, 1)") should be rgb(127, 63, 191). Was rgb(128, 64, 191).
-FAIL colorTest.parseColor("hsla(300, 50%, 50%, 1)") should be rgb(191, 63, 191). Was rgb(191, 64, 191).
-FAIL colorTest.parseColor("hsla(330, 50%, 50%, 1)") should be rgb(191, 63, 127). Was rgb(191, 64, 128).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 50%, 1)") should be rgb(207, 47, 47). Was rgb(207, 48, 48).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 50%, 1)") should be rgb(207, 127, 47). Was rgb(207, 128, 48).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 50%, 1)") should be rgb(207, 207, 47). Was rgb(207, 207, 48).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 50%, 1)") should be rgb(127, 207, 47). Was rgb(128, 207, 48).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 50%, 1)") should be rgb(47, 207, 47). Was rgb(48, 207, 48).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 50%, 1)") should be rgb(47, 207, 127). Was rgb(48, 207, 128).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 50%, 1)") should be rgb(47, 207, 207). Was rgb(48, 207, 207).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 50%, 1)") should be rgb(47, 127, 207). Was rgb(48, 128, 207).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 50%, 1)") should be rgb(47, 47, 207). Was rgb(48, 48, 207).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 50%, 1)") should be rgb(127, 47, 207). Was rgb(128, 48, 207).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 50%, 1)") should be rgb(207, 47, 207). Was rgb(207, 48, 207).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 50%, 1)") should be rgb(207, 47, 127). Was rgb(207, 48, 128).
-FAIL colorTest.parseColor("hsla(0, 75%, 50%, 1)") should be rgb(223, 31, 31). Was rgb(223, 32, 32).
-FAIL colorTest.parseColor("hsla(30, 75%, 50%, 1)") should be rgb(223, 127, 31). Was rgb(223, 128, 32).
-FAIL colorTest.parseColor("hsla(60, 75%, 50%, 1)") should be rgb(223, 223, 31). Was rgb(223, 223, 32).
-FAIL colorTest.parseColor("hsla(90, 75%, 50%, 1)") should be rgb(127, 223, 31). Was rgb(128, 223, 32).
-FAIL colorTest.parseColor("hsla(120, 75%, 50%, 1)") should be rgb(31, 223, 31). Was rgb(32, 223, 32).
-FAIL colorTest.parseColor("hsla(150, 75%, 50%, 1)") should be rgb(31, 223, 127). Was rgb(32, 223, 128).
-FAIL colorTest.parseColor("hsla(180, 75%, 50%, 1)") should be rgb(31, 223, 223). Was rgb(32, 223, 223).
-FAIL colorTest.parseColor("hsla(210, 75%, 50%, 1)") should be rgb(31, 127, 223). Was rgb(32, 128, 223).
-FAIL colorTest.parseColor("hsla(240, 75%, 50%, 1)") should be rgb(31, 31, 223). Was rgb(32, 32, 223).
-FAIL colorTest.parseColor("hsla(270, 75%, 50%, 1)") should be rgb(127, 31, 223). Was rgb(128, 32, 223).
-FAIL colorTest.parseColor("hsla(300, 75%, 50%, 1)") should be rgb(223, 31, 223). Was rgb(223, 32, 223).
-FAIL colorTest.parseColor("hsla(330, 75%, 50%, 1)") should be rgb(223, 31, 127). Was rgb(223, 32, 128).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 50%, 1)") should be rgb(239, 15, 15). Was rgb(239, 16, 16).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 50%, 1)") should be rgb(239, 127, 15). Was rgb(239, 128, 16).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 50%, 1)") should be rgb(239, 239, 15). Was rgb(239, 239, 16).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 50%, 1)") should be rgb(127, 239, 15). Was rgb(128, 239, 16).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 50%, 1)") should be rgb(15, 239, 15). Was rgb(16, 239, 16).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 50%, 1)") should be rgb(15, 239, 127). Was rgb(16, 239, 128).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 50%, 1)") should be rgb(15, 239, 239). Was rgb(16, 239, 239).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 50%, 1)") should be rgb(15, 127, 239). Was rgb(16, 128, 239).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 50%, 1)") should be rgb(15, 15, 239). Was rgb(16, 16, 239).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 50%, 1)") should be rgb(127, 15, 239). Was rgb(128, 16, 239).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 50%, 1)") should be rgb(239, 15, 239). Was rgb(239, 16, 239).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 50%, 1)") should be rgb(239, 15, 127). Was rgb(239, 16, 128).
-PASS colorTest.parseColor("hsla(0, 100%, 50%, 1)") is "rgb(255, 0, 0)"
-FAIL colorTest.parseColor("hsla(30, 100%, 50%, 1)") should be rgb(255, 127, 0). Was rgb(255, 128, 0).
-PASS colorTest.parseColor("hsla(60, 100%, 50%, 1)") is "rgb(255, 255, 0)"
-FAIL colorTest.parseColor("hsla(90, 100%, 50%, 1)") should be rgb(127, 255, 0). Was rgb(128, 255, 0).
-PASS colorTest.parseColor("hsla(120, 100%, 50%, 1)") is "rgb(0, 255, 0)"
-FAIL colorTest.parseColor("hsla(150, 100%, 50%, 1)") should be rgb(0, 255, 127). Was rgb(0, 255, 128).
-PASS colorTest.parseColor("hsla(180, 100%, 50%, 1)") is "rgb(0, 255, 255)"
-FAIL colorTest.parseColor("hsla(210, 100%, 50%, 1)") should be rgb(0, 127, 255). Was rgb(0, 128, 255).
-PASS colorTest.parseColor("hsla(240, 100%, 50%, 1)") is "rgb(0, 0, 255)"
-FAIL colorTest.parseColor("hsla(270, 100%, 50%, 1)") should be rgb(127, 0, 255). Was rgb(128, 0, 255).
-PASS colorTest.parseColor("hsla(300, 100%, 50%, 1)") is "rgb(255, 0, 255)"
-FAIL colorTest.parseColor("hsla(330, 100%, 50%, 1)") should be rgb(255, 0, 127). Was rgb(255, 0, 128).
-PASS colorTest.parseColor("hsla(0, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(30, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(60, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(90, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(120, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(150, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(180, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(210, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(240, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(270, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(300, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(330, 0%, 62.5%, 1)") is "rgb(159, 159, 159)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 62.5%, 1)") is "rgb(171, 147, 147)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 62.5%, 1)") is "rgb(171, 159, 147)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 62.5%, 1)") is "rgb(171, 171, 147)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 62.5%, 1)") is "rgb(159, 171, 147)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 62.5%, 1)") is "rgb(147, 171, 147)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 62.5%, 1)") is "rgb(147, 171, 159)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 62.5%, 1)") is "rgb(147, 171, 171)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 62.5%, 1)") is "rgb(147, 159, 171)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 62.5%, 1)") is "rgb(147, 147, 171)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 62.5%, 1)") is "rgb(159, 147, 171)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 62.5%, 1)") is "rgb(171, 147, 171)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 62.5%, 1)") is "rgb(171, 147, 159)"
-PASS colorTest.parseColor("hsla(0, 25%, 62.5%, 1)") is "rgb(183, 135, 135)"
-PASS colorTest.parseColor("hsla(30, 25%, 62.5%, 1)") is "rgb(183, 159, 135)"
-PASS colorTest.parseColor("hsla(60, 25%, 62.5%, 1)") is "rgb(183, 183, 135)"
-PASS colorTest.parseColor("hsla(90, 25%, 62.5%, 1)") is "rgb(159, 183, 135)"
-PASS colorTest.parseColor("hsla(120, 25%, 62.5%, 1)") is "rgb(135, 183, 135)"
-PASS colorTest.parseColor("hsla(150, 25%, 62.5%, 1)") is "rgb(135, 183, 159)"
-PASS colorTest.parseColor("hsla(180, 25%, 62.5%, 1)") is "rgb(135, 183, 183)"
-PASS colorTest.parseColor("hsla(210, 25%, 62.5%, 1)") is "rgb(135, 159, 183)"
-PASS colorTest.parseColor("hsla(240, 25%, 62.5%, 1)") is "rgb(135, 135, 183)"
-PASS colorTest.parseColor("hsla(270, 25%, 62.5%, 1)") is "rgb(159, 135, 183)"
-PASS colorTest.parseColor("hsla(300, 25%, 62.5%, 1)") is "rgb(183, 135, 183)"
-PASS colorTest.parseColor("hsla(330, 25%, 62.5%, 1)") is "rgb(183, 135, 159)"
-FAIL colorTest.parseColor("hsla(0, 37.5%, 62.5%, 1)") should be rgb(195, 123, 123). Was rgb(195, 124, 124).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 62.5%, 1)") should be rgb(195, 159, 123). Was rgb(195, 159, 124).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 62.5%, 1)") should be rgb(195, 195, 123). Was rgb(195, 195, 124).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 62.5%, 1)") should be rgb(159, 195, 123). Was rgb(159, 195, 124).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 62.5%, 1)") should be rgb(123, 195, 123). Was rgb(124, 195, 124).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 62.5%, 1)") should be rgb(123, 195, 159). Was rgb(124, 195, 159).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 62.5%, 1)") should be rgb(123, 195, 195). Was rgb(124, 195, 195).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 62.5%, 1)") should be rgb(123, 159, 195). Was rgb(124, 159, 195).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 62.5%, 1)") should be rgb(123, 123, 195). Was rgb(124, 124, 195).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 62.5%, 1)") should be rgb(159, 123, 195). Was rgb(159, 124, 195).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 62.5%, 1)") should be rgb(195, 123, 195). Was rgb(195, 124, 195).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 62.5%, 1)") should be rgb(195, 123, 159). Was rgb(195, 124, 159).
-FAIL colorTest.parseColor("hsla(0, 50%, 62.5%, 1)") should be rgb(207, 111, 111). Was rgb(207, 112, 112).
-FAIL colorTest.parseColor("hsla(30, 50%, 62.5%, 1)") should be rgb(207, 159, 111). Was rgb(207, 159, 112).
-FAIL colorTest.parseColor("hsla(60, 50%, 62.5%, 1)") should be rgb(207, 207, 111). Was rgb(207, 207, 112).
-FAIL colorTest.parseColor("hsla(90, 50%, 62.5%, 1)") should be rgb(159, 207, 111). Was rgb(159, 207, 112).
-FAIL colorTest.parseColor("hsla(120, 50%, 62.5%, 1)") should be rgb(111, 207, 111). Was rgb(112, 207, 112).
-FAIL colorTest.parseColor("hsla(150, 50%, 62.5%, 1)") should be rgb(111, 207, 159). Was rgb(112, 207, 159).
-FAIL colorTest.parseColor("hsla(180, 50%, 62.5%, 1)") should be rgb(111, 207, 207). Was rgb(112, 207, 207).
-FAIL colorTest.parseColor("hsla(210, 50%, 62.5%, 1)") should be rgb(111, 159, 207). Was rgb(112, 159, 207).
-FAIL colorTest.parseColor("hsla(240, 50%, 62.5%, 1)") should be rgb(111, 111, 207). Was rgb(112, 112, 207).
-FAIL colorTest.parseColor("hsla(270, 50%, 62.5%, 1)") should be rgb(159, 111, 207). Was rgb(159, 112, 207).
-FAIL colorTest.parseColor("hsla(300, 50%, 62.5%, 1)") should be rgb(207, 111, 207). Was rgb(207, 112, 207).
-FAIL colorTest.parseColor("hsla(330, 50%, 62.5%, 1)") should be rgb(207, 111, 159). Was rgb(207, 112, 159).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 62.5%, 1)") should be rgb(219, 99, 99). Was rgb(219, 100, 100).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 62.5%, 1)") should be rgb(219, 159, 99). Was rgb(219, 159, 100).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 62.5%, 1)") should be rgb(219, 219, 99). Was rgb(219, 219, 100).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 62.5%, 1)") should be rgb(159, 219, 99). Was rgb(159, 219, 100).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 62.5%, 1)") should be rgb(99, 219, 99). Was rgb(100, 219, 100).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 62.5%, 1)") should be rgb(99, 219, 159). Was rgb(100, 219, 159).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 62.5%, 1)") should be rgb(99, 219, 219). Was rgb(100, 219, 219).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 62.5%, 1)") should be rgb(99, 159, 219). Was rgb(100, 159, 219).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 62.5%, 1)") should be rgb(99, 99, 219). Was rgb(100, 100, 219).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 62.5%, 1)") should be rgb(159, 99, 219). Was rgb(159, 100, 219).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 62.5%, 1)") should be rgb(219, 99, 219). Was rgb(219, 100, 219).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 62.5%, 1)") should be rgb(219, 99, 159). Was rgb(219, 100, 159).
-FAIL colorTest.parseColor("hsla(0, 75%, 62.5%, 1)") should be rgb(231, 87, 87). Was rgb(231, 88, 88).
-FAIL colorTest.parseColor("hsla(30, 75%, 62.5%, 1)") should be rgb(231, 159, 87). Was rgb(231, 159, 88).
-FAIL colorTest.parseColor("hsla(60, 75%, 62.5%, 1)") should be rgb(231, 231, 87). Was rgb(231, 231, 88).
-FAIL colorTest.parseColor("hsla(90, 75%, 62.5%, 1)") should be rgb(159, 231, 87). Was rgb(159, 231, 88).
-FAIL colorTest.parseColor("hsla(120, 75%, 62.5%, 1)") should be rgb(87, 231, 87). Was rgb(88, 231, 88).
-FAIL colorTest.parseColor("hsla(150, 75%, 62.5%, 1)") should be rgb(87, 231, 159). Was rgb(88, 231, 159).
-FAIL colorTest.parseColor("hsla(180, 75%, 62.5%, 1)") should be rgb(87, 231, 231). Was rgb(88, 231, 231).
-FAIL colorTest.parseColor("hsla(210, 75%, 62.5%, 1)") should be rgb(87, 159, 231). Was rgb(88, 159, 231).
-FAIL colorTest.parseColor("hsla(240, 75%, 62.5%, 1)") should be rgb(87, 87, 231). Was rgb(88, 88, 231).
-FAIL colorTest.parseColor("hsla(270, 75%, 62.5%, 1)") should be rgb(159, 87, 231). Was rgb(159, 88, 231).
-FAIL colorTest.parseColor("hsla(300, 75%, 62.5%, 1)") should be rgb(231, 87, 231). Was rgb(231, 88, 231).
-FAIL colorTest.parseColor("hsla(330, 75%, 62.5%, 1)") should be rgb(231, 87, 159). Was rgb(231, 88, 159).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 62.5%, 1)") should be rgb(243, 75, 75). Was rgb(243, 76, 76).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 62.5%, 1)") should be rgb(243, 159, 75). Was rgb(243, 159, 76).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 62.5%, 1)") should be rgb(243, 243, 75). Was rgb(243, 243, 76).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 62.5%, 1)") should be rgb(159, 243, 75). Was rgb(159, 243, 76).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 62.5%, 1)") should be rgb(75, 243, 75). Was rgb(76, 243, 76).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 62.5%, 1)") should be rgb(75, 243, 159). Was rgb(76, 243, 159).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 62.5%, 1)") should be rgb(75, 243, 243). Was rgb(76, 243, 243).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 62.5%, 1)") should be rgb(75, 159, 243). Was rgb(76, 159, 243).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 62.5%, 1)") should be rgb(75, 75, 243). Was rgb(76, 76, 243).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 62.5%, 1)") should be rgb(159, 75, 243). Was rgb(159, 76, 243).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 62.5%, 1)") should be rgb(243, 75, 243). Was rgb(243, 76, 243).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 62.5%, 1)") should be rgb(243, 75, 159). Was rgb(243, 76, 159).
-FAIL colorTest.parseColor("hsla(0, 100%, 62.5%, 1)") should be rgb(255, 63, 63). Was rgb(255, 64, 64).
-FAIL colorTest.parseColor("hsla(30, 100%, 62.5%, 1)") should be rgb(255, 159, 63). Was rgb(255, 159, 64).
-FAIL colorTest.parseColor("hsla(60, 100%, 62.5%, 1)") should be rgb(255, 255, 63). Was rgb(255, 255, 64).
-FAIL colorTest.parseColor("hsla(90, 100%, 62.5%, 1)") should be rgb(159, 255, 63). Was rgb(159, 255, 64).
-FAIL colorTest.parseColor("hsla(120, 100%, 62.5%, 1)") should be rgb(63, 255, 63). Was rgb(64, 255, 64).
-FAIL colorTest.parseColor("hsla(150, 100%, 62.5%, 1)") should be rgb(63, 255, 159). Was rgb(64, 255, 159).
-FAIL colorTest.parseColor("hsla(180, 100%, 62.5%, 1)") should be rgb(63, 255, 255). Was rgb(64, 255, 255).
-FAIL colorTest.parseColor("hsla(210, 100%, 62.5%, 1)") should be rgb(63, 159, 255). Was rgb(64, 159, 255).
-FAIL colorTest.parseColor("hsla(240, 100%, 62.5%, 1)") should be rgb(63, 63, 255). Was rgb(64, 64, 255).
-FAIL colorTest.parseColor("hsla(270, 100%, 62.5%, 1)") should be rgb(159, 63, 255). Was rgb(159, 64, 255).
-FAIL colorTest.parseColor("hsla(300, 100%, 62.5%, 1)") should be rgb(255, 63, 255). Was rgb(255, 64, 255).
-FAIL colorTest.parseColor("hsla(330, 100%, 62.5%, 1)") should be rgb(255, 63, 159). Was rgb(255, 64, 159).
-PASS colorTest.parseColor("hsla(0, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(30, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(60, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(90, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(120, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(150, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(180, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(210, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(240, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(270, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(300, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(330, 0%, 75%, 1)") is "rgb(191, 191, 191)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 75%, 1)") is "rgb(199, 183, 183)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 75%, 1)") is "rgb(199, 191, 183)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 75%, 1)") is "rgb(199, 199, 183)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 75%, 1)") is "rgb(191, 199, 183)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 75%, 1)") is "rgb(183, 199, 183)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 75%, 1)") is "rgb(183, 199, 191)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 75%, 1)") is "rgb(183, 199, 199)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 75%, 1)") is "rgb(183, 191, 199)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 75%, 1)") is "rgb(183, 183, 199)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 75%, 1)") is "rgb(191, 183, 199)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 75%, 1)") is "rgb(199, 183, 199)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 75%, 1)") is "rgb(199, 183, 191)"
-PASS colorTest.parseColor("hsla(0, 25%, 75%, 1)") is "rgb(207, 175, 175)"
-PASS colorTest.parseColor("hsla(30, 25%, 75%, 1)") is "rgb(207, 191, 175)"
-PASS colorTest.parseColor("hsla(60, 25%, 75%, 1)") is "rgb(207, 207, 175)"
-PASS colorTest.parseColor("hsla(90, 25%, 75%, 1)") is "rgb(191, 207, 175)"
-PASS colorTest.parseColor("hsla(120, 25%, 75%, 1)") is "rgb(175, 207, 175)"
-PASS colorTest.parseColor("hsla(150, 25%, 75%, 1)") is "rgb(175, 207, 191)"
-PASS colorTest.parseColor("hsla(180, 25%, 75%, 1)") is "rgb(175, 207, 207)"
-PASS colorTest.parseColor("hsla(210, 25%, 75%, 1)") is "rgb(175, 191, 207)"
-PASS colorTest.parseColor("hsla(240, 25%, 75%, 1)") is "rgb(175, 175, 207)"
-PASS colorTest.parseColor("hsla(270, 25%, 75%, 1)") is "rgb(191, 175, 207)"
-PASS colorTest.parseColor("hsla(300, 25%, 75%, 1)") is "rgb(207, 175, 207)"
-PASS colorTest.parseColor("hsla(330, 25%, 75%, 1)") is "rgb(207, 175, 191)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 75%, 1)") is "rgb(215, 167, 167)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 75%, 1)") is "rgb(215, 191, 167)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 75%, 1)") is "rgb(215, 215, 167)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 75%, 1)") is "rgb(191, 215, 167)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 75%, 1)") is "rgb(167, 215, 167)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 75%, 1)") is "rgb(167, 215, 191)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 75%, 1)") is "rgb(167, 215, 215)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 75%, 1)") is "rgb(167, 191, 215)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 75%, 1)") is "rgb(167, 167, 215)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 75%, 1)") is "rgb(191, 167, 215)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 75%, 1)") is "rgb(215, 167, 215)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 75%, 1)") is "rgb(215, 167, 191)"
-PASS colorTest.parseColor("hsla(0, 50%, 75%, 1)") is "rgb(223, 159, 159)"
-PASS colorTest.parseColor("hsla(30, 50%, 75%, 1)") is "rgb(223, 191, 159)"
-PASS colorTest.parseColor("hsla(60, 50%, 75%, 1)") is "rgb(223, 223, 159)"
-PASS colorTest.parseColor("hsla(90, 50%, 75%, 1)") is "rgb(191, 223, 159)"
-PASS colorTest.parseColor("hsla(120, 50%, 75%, 1)") is "rgb(159, 223, 159)"
-PASS colorTest.parseColor("hsla(150, 50%, 75%, 1)") is "rgb(159, 223, 191)"
-PASS colorTest.parseColor("hsla(180, 50%, 75%, 1)") is "rgb(159, 223, 223)"
-PASS colorTest.parseColor("hsla(210, 50%, 75%, 1)") is "rgb(159, 191, 223)"
-PASS colorTest.parseColor("hsla(240, 50%, 75%, 1)") is "rgb(159, 159, 223)"
-PASS colorTest.parseColor("hsla(270, 50%, 75%, 1)") is "rgb(191, 159, 223)"
-PASS colorTest.parseColor("hsla(300, 50%, 75%, 1)") is "rgb(223, 159, 223)"
-PASS colorTest.parseColor("hsla(330, 50%, 75%, 1)") is "rgb(223, 159, 191)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 75%, 1)") is "rgb(231, 151, 151)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 75%, 1)") is "rgb(231, 191, 151)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 75%, 1)") is "rgb(231, 231, 151)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 75%, 1)") is "rgb(191, 231, 151)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 75%, 1)") is "rgb(151, 231, 151)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 75%, 1)") is "rgb(151, 231, 191)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 75%, 1)") is "rgb(151, 231, 231)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 75%, 1)") is "rgb(151, 191, 231)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 75%, 1)") is "rgb(151, 151, 231)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 75%, 1)") is "rgb(191, 151, 231)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 75%, 1)") is "rgb(231, 151, 231)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 75%, 1)") is "rgb(231, 151, 191)"
-PASS colorTest.parseColor("hsla(0, 75%, 75%, 1)") is "rgb(239, 143, 143)"
-PASS colorTest.parseColor("hsla(30, 75%, 75%, 1)") is "rgb(239, 191, 143)"
-PASS colorTest.parseColor("hsla(60, 75%, 75%, 1)") is "rgb(239, 239, 143)"
-PASS colorTest.parseColor("hsla(90, 75%, 75%, 1)") is "rgb(191, 239, 143)"
-PASS colorTest.parseColor("hsla(120, 75%, 75%, 1)") is "rgb(143, 239, 143)"
-PASS colorTest.parseColor("hsla(150, 75%, 75%, 1)") is "rgb(143, 239, 191)"
-PASS colorTest.parseColor("hsla(180, 75%, 75%, 1)") is "rgb(143, 239, 239)"
-PASS colorTest.parseColor("hsla(210, 75%, 75%, 1)") is "rgb(143, 191, 239)"
-PASS colorTest.parseColor("hsla(240, 75%, 75%, 1)") is "rgb(143, 143, 239)"
-PASS colorTest.parseColor("hsla(270, 75%, 75%, 1)") is "rgb(191, 143, 239)"
-PASS colorTest.parseColor("hsla(300, 75%, 75%, 1)") is "rgb(239, 143, 239)"
-PASS colorTest.parseColor("hsla(330, 75%, 75%, 1)") is "rgb(239, 143, 191)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 75%, 1)") is "rgb(247, 135, 135)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 75%, 1)") is "rgb(247, 191, 135)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 75%, 1)") is "rgb(247, 247, 135)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 75%, 1)") is "rgb(191, 247, 135)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 75%, 1)") is "rgb(135, 247, 135)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 75%, 1)") is "rgb(135, 247, 191)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 75%, 1)") is "rgb(135, 247, 247)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 75%, 1)") is "rgb(135, 191, 247)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 75%, 1)") is "rgb(135, 135, 247)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 75%, 1)") is "rgb(191, 135, 247)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 75%, 1)") is "rgb(247, 135, 247)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 75%, 1)") is "rgb(247, 135, 191)"
-FAIL colorTest.parseColor("hsla(0, 100%, 75%, 1)") should be rgb(255, 127, 127). Was rgb(255, 128, 128).
-FAIL colorTest.parseColor("hsla(30, 100%, 75%, 1)") should be rgb(255, 191, 127). Was rgb(255, 191, 128).
-FAIL colorTest.parseColor("hsla(60, 100%, 75%, 1)") should be rgb(255, 255, 127). Was rgb(255, 255, 128).
-FAIL colorTest.parseColor("hsla(90, 100%, 75%, 1)") should be rgb(191, 255, 127). Was rgb(191, 255, 128).
-FAIL colorTest.parseColor("hsla(120, 100%, 75%, 1)") should be rgb(127, 255, 127). Was rgb(128, 255, 128).
-FAIL colorTest.parseColor("hsla(150, 100%, 75%, 1)") should be rgb(127, 255, 191). Was rgb(128, 255, 191).
-FAIL colorTest.parseColor("hsla(180, 100%, 75%, 1)") should be rgb(127, 255, 255). Was rgb(128, 255, 255).
-FAIL colorTest.parseColor("hsla(210, 100%, 75%, 1)") should be rgb(127, 191, 255). Was rgb(128, 191, 255).
-FAIL colorTest.parseColor("hsla(240, 100%, 75%, 1)") should be rgb(127, 127, 255). Was rgb(128, 128, 255).
-FAIL colorTest.parseColor("hsla(270, 100%, 75%, 1)") should be rgb(191, 127, 255). Was rgb(191, 128, 255).
-FAIL colorTest.parseColor("hsla(300, 100%, 75%, 1)") should be rgb(255, 127, 255). Was rgb(255, 128, 255).
-FAIL colorTest.parseColor("hsla(330, 100%, 75%, 1)") should be rgb(255, 127, 191). Was rgb(255, 128, 191).
-PASS colorTest.parseColor("hsla(0, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(30, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(60, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(90, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(120, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(150, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(180, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(210, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(240, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(270, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(300, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(330, 0%, 87.5%, 1)") is "rgb(223, 223, 223)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 87.5%, 1)") is "rgb(227, 219, 219)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 87.5%, 1)") is "rgb(227, 223, 219)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 87.5%, 1)") is "rgb(227, 227, 219)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 87.5%, 1)") is "rgb(223, 227, 219)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 87.5%, 1)") is "rgb(219, 227, 219)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 87.5%, 1)") is "rgb(219, 227, 223)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 87.5%, 1)") is "rgb(219, 227, 227)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 87.5%, 1)") is "rgb(219, 223, 227)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 87.5%, 1)") is "rgb(219, 219, 227)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 87.5%, 1)") is "rgb(223, 219, 227)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 87.5%, 1)") is "rgb(227, 219, 227)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 87.5%, 1)") is "rgb(227, 219, 223)"
-PASS colorTest.parseColor("hsla(0, 25%, 87.5%, 1)") is "rgb(231, 215, 215)"
-PASS colorTest.parseColor("hsla(30, 25%, 87.5%, 1)") is "rgb(231, 223, 215)"
-PASS colorTest.parseColor("hsla(60, 25%, 87.5%, 1)") is "rgb(231, 231, 215)"
-PASS colorTest.parseColor("hsla(90, 25%, 87.5%, 1)") is "rgb(223, 231, 215)"
-PASS colorTest.parseColor("hsla(120, 25%, 87.5%, 1)") is "rgb(215, 231, 215)"
-PASS colorTest.parseColor("hsla(150, 25%, 87.5%, 1)") is "rgb(215, 231, 223)"
-PASS colorTest.parseColor("hsla(180, 25%, 87.5%, 1)") is "rgb(215, 231, 231)"
-PASS colorTest.parseColor("hsla(210, 25%, 87.5%, 1)") is "rgb(215, 223, 231)"
-PASS colorTest.parseColor("hsla(240, 25%, 87.5%, 1)") is "rgb(215, 215, 231)"
-PASS colorTest.parseColor("hsla(270, 25%, 87.5%, 1)") is "rgb(223, 215, 231)"
-PASS colorTest.parseColor("hsla(300, 25%, 87.5%, 1)") is "rgb(231, 215, 231)"
-PASS colorTest.parseColor("hsla(330, 25%, 87.5%, 1)") is "rgb(231, 215, 223)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 87.5%, 1)") is "rgb(235, 211, 211)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 87.5%, 1)") is "rgb(235, 223, 211)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 87.5%, 1)") is "rgb(235, 235, 211)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 87.5%, 1)") is "rgb(223, 235, 211)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 87.5%, 1)") is "rgb(211, 235, 211)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 87.5%, 1)") is "rgb(211, 235, 223)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 87.5%, 1)") is "rgb(211, 235, 235)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 87.5%, 1)") is "rgb(211, 223, 235)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 87.5%, 1)") is "rgb(211, 211, 235)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 87.5%, 1)") is "rgb(223, 211, 235)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 87.5%, 1)") is "rgb(235, 211, 235)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 87.5%, 1)") is "rgb(235, 211, 223)"
-PASS colorTest.parseColor("hsla(0, 50%, 87.5%, 1)") is "rgb(239, 207, 207)"
-PASS colorTest.parseColor("hsla(30, 50%, 87.5%, 1)") is "rgb(239, 223, 207)"
-PASS colorTest.parseColor("hsla(60, 50%, 87.5%, 1)") is "rgb(239, 239, 207)"
-PASS colorTest.parseColor("hsla(90, 50%, 87.5%, 1)") is "rgb(223, 239, 207)"
-PASS colorTest.parseColor("hsla(120, 50%, 87.5%, 1)") is "rgb(207, 239, 207)"
-PASS colorTest.parseColor("hsla(150, 50%, 87.5%, 1)") is "rgb(207, 239, 223)"
-PASS colorTest.parseColor("hsla(180, 50%, 87.5%, 1)") is "rgb(207, 239, 239)"
-PASS colorTest.parseColor("hsla(210, 50%, 87.5%, 1)") is "rgb(207, 223, 239)"
-PASS colorTest.parseColor("hsla(240, 50%, 87.5%, 1)") is "rgb(207, 207, 239)"
-PASS colorTest.parseColor("hsla(270, 50%, 87.5%, 1)") is "rgb(223, 207, 239)"
-PASS colorTest.parseColor("hsla(300, 50%, 87.5%, 1)") is "rgb(239, 207, 239)"
-PASS colorTest.parseColor("hsla(330, 50%, 87.5%, 1)") is "rgb(239, 207, 223)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 87.5%, 1)") is "rgb(243, 203, 203)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 87.5%, 1)") is "rgb(243, 223, 203)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 87.5%, 1)") is "rgb(243, 243, 203)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 87.5%, 1)") is "rgb(223, 243, 203)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 87.5%, 1)") is "rgb(203, 243, 203)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 87.5%, 1)") is "rgb(203, 243, 223)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 87.5%, 1)") is "rgb(203, 243, 243)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 87.5%, 1)") is "rgb(203, 223, 243)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 87.5%, 1)") is "rgb(203, 203, 243)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 87.5%, 1)") is "rgb(223, 203, 243)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 87.5%, 1)") is "rgb(243, 203, 243)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 87.5%, 1)") is "rgb(243, 203, 223)"
-PASS colorTest.parseColor("hsla(0, 75%, 87.5%, 1)") is "rgb(247, 199, 199)"
-PASS colorTest.parseColor("hsla(30, 75%, 87.5%, 1)") is "rgb(247, 223, 199)"
-PASS colorTest.parseColor("hsla(60, 75%, 87.5%, 1)") is "rgb(247, 247, 199)"
-PASS colorTest.parseColor("hsla(90, 75%, 87.5%, 1)") is "rgb(223, 247, 199)"
-PASS colorTest.parseColor("hsla(120, 75%, 87.5%, 1)") is "rgb(199, 247, 199)"
-PASS colorTest.parseColor("hsla(150, 75%, 87.5%, 1)") is "rgb(199, 247, 223)"
-PASS colorTest.parseColor("hsla(180, 75%, 87.5%, 1)") is "rgb(199, 247, 247)"
-PASS colorTest.parseColor("hsla(210, 75%, 87.5%, 1)") is "rgb(199, 223, 247)"
-PASS colorTest.parseColor("hsla(240, 75%, 87.5%, 1)") is "rgb(199, 199, 247)"
-PASS colorTest.parseColor("hsla(270, 75%, 87.5%, 1)") is "rgb(223, 199, 247)"
-PASS colorTest.parseColor("hsla(300, 75%, 87.5%, 1)") is "rgb(247, 199, 247)"
-PASS colorTest.parseColor("hsla(330, 75%, 87.5%, 1)") is "rgb(247, 199, 223)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 87.5%, 1)") is "rgb(251, 195, 195)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 87.5%, 1)") is "rgb(251, 223, 195)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 87.5%, 1)") is "rgb(251, 251, 195)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 87.5%, 1)") is "rgb(223, 251, 195)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 87.5%, 1)") is "rgb(195, 251, 195)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 87.5%, 1)") is "rgb(195, 251, 223)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 87.5%, 1)") is "rgb(195, 251, 251)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 87.5%, 1)") is "rgb(195, 223, 251)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 87.5%, 1)") is "rgb(195, 195, 251)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 87.5%, 1)") is "rgb(223, 195, 251)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 87.5%, 1)") is "rgb(251, 195, 251)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 87.5%, 1)") is "rgb(251, 195, 223)"
-PASS colorTest.parseColor("hsla(0, 100%, 87.5%, 1)") is "rgb(255, 191, 191)"
-PASS colorTest.parseColor("hsla(30, 100%, 87.5%, 1)") is "rgb(255, 223, 191)"
-PASS colorTest.parseColor("hsla(60, 100%, 87.5%, 1)") is "rgb(255, 255, 191)"
-PASS colorTest.parseColor("hsla(90, 100%, 87.5%, 1)") is "rgb(223, 255, 191)"
-PASS colorTest.parseColor("hsla(120, 100%, 87.5%, 1)") is "rgb(191, 255, 191)"
-PASS colorTest.parseColor("hsla(150, 100%, 87.5%, 1)") is "rgb(191, 255, 223)"
-PASS colorTest.parseColor("hsla(180, 100%, 87.5%, 1)") is "rgb(191, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 100%, 87.5%, 1)") is "rgb(191, 223, 255)"
-PASS colorTest.parseColor("hsla(240, 100%, 87.5%, 1)") is "rgb(191, 191, 255)"
-PASS colorTest.parseColor("hsla(270, 100%, 87.5%, 1)") is "rgb(223, 191, 255)"
-PASS colorTest.parseColor("hsla(300, 100%, 87.5%, 1)") is "rgb(255, 191, 255)"
-PASS colorTest.parseColor("hsla(330, 100%, 87.5%, 1)") is "rgb(255, 191, 223)"
-PASS colorTest.parseColor("hsla(0, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 0%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 25%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 50%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 75%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(30, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(60, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(90, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(120, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(150, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(180, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(210, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(240, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(270, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(300, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(330, 100%, 100%, 1)") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hsla(0, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 0%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 25%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 50%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 75%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(0, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(30, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(60, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(90, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(120, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(150, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(180, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(210, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(240, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(270, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(300, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-PASS colorTest.parseColor("hsla(330, 100%, 0%, 0.2)") is "rgba(0, 0, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(0, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(30, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(60, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(90, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(120, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(150, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(210, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(240, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(270, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(300, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(330, 0%, 12.5%, 0.2)") should be rgba(31, 31, 31, 0.2). Was rgba(32, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 12.5%, 0.2)") should be rgba(35, 27, 27, 0.2). Was rgba(36, 28, 28, 0.2).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 12.5%, 0.2)") should be rgba(35, 31, 27, 0.2). Was rgba(36, 32, 28, 0.2).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 12.5%, 0.2)") should be rgba(35, 35, 27, 0.2). Was rgba(36, 36, 28, 0.2).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 12.5%, 0.2)") should be rgba(31, 35, 27, 0.2). Was rgba(32, 36, 28, 0.2).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 12.5%, 0.2)") should be rgba(27, 35, 27, 0.2). Was rgba(28, 36, 28, 0.2).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 12.5%, 0.2)") should be rgba(27, 35, 31, 0.2). Was rgba(28, 36, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 12.5%, 0.2)") should be rgba(27, 35, 35, 0.2). Was rgba(28, 36, 36, 0.2).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 12.5%, 0.2)") should be rgba(27, 31, 35, 0.2). Was rgba(28, 32, 36, 0.2).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 12.5%, 0.2)") should be rgba(27, 27, 35, 0.2). Was rgba(28, 28, 36, 0.2).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 12.5%, 0.2)") should be rgba(31, 27, 35, 0.2). Was rgba(32, 28, 36, 0.2).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 12.5%, 0.2)") should be rgba(35, 27, 35, 0.2). Was rgba(36, 28, 36, 0.2).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 12.5%, 0.2)") should be rgba(35, 27, 31, 0.2). Was rgba(36, 28, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 25%, 12.5%, 0.2)") should be rgba(39, 23, 23, 0.2). Was rgba(40, 24, 24, 0.2).
-FAIL colorTest.parseColor("hsla(30, 25%, 12.5%, 0.2)") should be rgba(39, 31, 23, 0.2). Was rgba(40, 32, 24, 0.2).
-FAIL colorTest.parseColor("hsla(60, 25%, 12.5%, 0.2)") should be rgba(39, 39, 23, 0.2). Was rgba(40, 40, 24, 0.2).
-FAIL colorTest.parseColor("hsla(90, 25%, 12.5%, 0.2)") should be rgba(31, 39, 23, 0.2). Was rgba(32, 40, 24, 0.2).
-FAIL colorTest.parseColor("hsla(120, 25%, 12.5%, 0.2)") should be rgba(23, 39, 23, 0.2). Was rgba(24, 40, 24, 0.2).
-FAIL colorTest.parseColor("hsla(150, 25%, 12.5%, 0.2)") should be rgba(23, 39, 31, 0.2). Was rgba(24, 40, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 25%, 12.5%, 0.2)") should be rgba(23, 39, 39, 0.2). Was rgba(24, 40, 40, 0.2).
-FAIL colorTest.parseColor("hsla(210, 25%, 12.5%, 0.2)") should be rgba(23, 31, 39, 0.2). Was rgba(24, 32, 40, 0.2).
-FAIL colorTest.parseColor("hsla(240, 25%, 12.5%, 0.2)") should be rgba(23, 23, 39, 0.2). Was rgba(24, 24, 40, 0.2).
-FAIL colorTest.parseColor("hsla(270, 25%, 12.5%, 0.2)") should be rgba(31, 23, 39, 0.2). Was rgba(32, 24, 40, 0.2).
-FAIL colorTest.parseColor("hsla(300, 25%, 12.5%, 0.2)") should be rgba(39, 23, 39, 0.2). Was rgba(40, 24, 40, 0.2).
-FAIL colorTest.parseColor("hsla(330, 25%, 12.5%, 0.2)") should be rgba(39, 23, 31, 0.2). Was rgba(40, 24, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 12.5%, 0.2)") should be rgba(43, 19, 19, 0.2). Was rgba(44, 20, 20, 0.2).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 12.5%, 0.2)") should be rgba(43, 31, 19, 0.2). Was rgba(44, 32, 20, 0.2).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 12.5%, 0.2)") should be rgba(43, 43, 19, 0.2). Was rgba(44, 44, 20, 0.2).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 12.5%, 0.2)") should be rgba(31, 43, 19, 0.2). Was rgba(32, 44, 20, 0.2).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 12.5%, 0.2)") should be rgba(19, 43, 19, 0.2). Was rgba(20, 44, 20, 0.2).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 12.5%, 0.2)") should be rgba(19, 43, 31, 0.2). Was rgba(20, 44, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 12.5%, 0.2)") should be rgba(19, 43, 43, 0.2). Was rgba(20, 44, 44, 0.2).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 12.5%, 0.2)") should be rgba(19, 31, 43, 0.2). Was rgba(20, 32, 44, 0.2).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 12.5%, 0.2)") should be rgba(19, 19, 43, 0.2). Was rgba(20, 20, 44, 0.2).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 12.5%, 0.2)") should be rgba(31, 19, 43, 0.2). Was rgba(32, 20, 44, 0.2).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 12.5%, 0.2)") should be rgba(43, 19, 43, 0.2). Was rgba(44, 20, 44, 0.2).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 12.5%, 0.2)") should be rgba(43, 19, 31, 0.2). Was rgba(44, 20, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 50%, 12.5%, 0.2)") should be rgba(47, 15, 15, 0.2). Was rgba(48, 16, 16, 0.2).
-FAIL colorTest.parseColor("hsla(30, 50%, 12.5%, 0.2)") should be rgba(47, 31, 15, 0.2). Was rgba(48, 32, 16, 0.2).
-FAIL colorTest.parseColor("hsla(60, 50%, 12.5%, 0.2)") should be rgba(47, 47, 15, 0.2). Was rgba(48, 48, 16, 0.2).
-FAIL colorTest.parseColor("hsla(90, 50%, 12.5%, 0.2)") should be rgba(31, 47, 15, 0.2). Was rgba(32, 48, 16, 0.2).
-FAIL colorTest.parseColor("hsla(120, 50%, 12.5%, 0.2)") should be rgba(15, 47, 15, 0.2). Was rgba(16, 48, 16, 0.2).
-FAIL colorTest.parseColor("hsla(150, 50%, 12.5%, 0.2)") should be rgba(15, 47, 31, 0.2). Was rgba(16, 48, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 50%, 12.5%, 0.2)") should be rgba(15, 47, 47, 0.2). Was rgba(16, 48, 48, 0.2).
-FAIL colorTest.parseColor("hsla(210, 50%, 12.5%, 0.2)") should be rgba(15, 31, 47, 0.2). Was rgba(16, 32, 48, 0.2).
-FAIL colorTest.parseColor("hsla(240, 50%, 12.5%, 0.2)") should be rgba(15, 15, 47, 0.2). Was rgba(16, 16, 48, 0.2).
-FAIL colorTest.parseColor("hsla(270, 50%, 12.5%, 0.2)") should be rgba(31, 15, 47, 0.2). Was rgba(32, 16, 48, 0.2).
-FAIL colorTest.parseColor("hsla(300, 50%, 12.5%, 0.2)") should be rgba(47, 15, 47, 0.2). Was rgba(48, 16, 48, 0.2).
-FAIL colorTest.parseColor("hsla(330, 50%, 12.5%, 0.2)") should be rgba(47, 15, 31, 0.2). Was rgba(48, 16, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 12.5%, 0.2)") should be rgba(51, 11, 11, 0.2). Was rgba(52, 12, 12, 0.2).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 12.5%, 0.2)") should be rgba(51, 31, 11, 0.2). Was rgba(52, 32, 12, 0.2).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 12.5%, 0.2)") should be rgba(51, 51, 11, 0.2). Was rgba(52, 52, 12, 0.2).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 12.5%, 0.2)") should be rgba(31, 51, 11, 0.2). Was rgba(32, 52, 12, 0.2).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 12.5%, 0.2)") should be rgba(11, 51, 11, 0.2). Was rgba(12, 52, 12, 0.2).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 12.5%, 0.2)") should be rgba(11, 51, 31, 0.2). Was rgba(12, 52, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 12.5%, 0.2)") should be rgba(11, 51, 51, 0.2). Was rgba(12, 52, 52, 0.2).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 12.5%, 0.2)") should be rgba(11, 31, 51, 0.2). Was rgba(12, 32, 52, 0.2).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 12.5%, 0.2)") should be rgba(11, 11, 51, 0.2). Was rgba(12, 12, 52, 0.2).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 12.5%, 0.2)") should be rgba(31, 11, 51, 0.2). Was rgba(32, 12, 52, 0.2).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 12.5%, 0.2)") should be rgba(51, 11, 51, 0.2). Was rgba(52, 12, 52, 0.2).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 12.5%, 0.2)") should be rgba(51, 11, 31, 0.2). Was rgba(52, 12, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 75%, 12.5%, 0.2)") should be rgba(55, 7, 7, 0.2). Was rgba(56, 8, 8, 0.2).
-FAIL colorTest.parseColor("hsla(30, 75%, 12.5%, 0.2)") should be rgba(55, 31, 7, 0.2). Was rgba(56, 32, 8, 0.2).
-FAIL colorTest.parseColor("hsla(60, 75%, 12.5%, 0.2)") should be rgba(55, 55, 7, 0.2). Was rgba(56, 56, 8, 0.2).
-FAIL colorTest.parseColor("hsla(90, 75%, 12.5%, 0.2)") should be rgba(31, 55, 7, 0.2). Was rgba(32, 56, 8, 0.2).
-FAIL colorTest.parseColor("hsla(120, 75%, 12.5%, 0.2)") should be rgba(7, 55, 7, 0.2). Was rgba(8, 56, 8, 0.2).
-FAIL colorTest.parseColor("hsla(150, 75%, 12.5%, 0.2)") should be rgba(7, 55, 31, 0.2). Was rgba(8, 56, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 75%, 12.5%, 0.2)") should be rgba(7, 55, 55, 0.2). Was rgba(8, 56, 56, 0.2).
-FAIL colorTest.parseColor("hsla(210, 75%, 12.5%, 0.2)") should be rgba(7, 31, 55, 0.2). Was rgba(8, 32, 56, 0.2).
-FAIL colorTest.parseColor("hsla(240, 75%, 12.5%, 0.2)") should be rgba(7, 7, 55, 0.2). Was rgba(8, 8, 56, 0.2).
-FAIL colorTest.parseColor("hsla(270, 75%, 12.5%, 0.2)") should be rgba(31, 7, 55, 0.2). Was rgba(32, 8, 56, 0.2).
-FAIL colorTest.parseColor("hsla(300, 75%, 12.5%, 0.2)") should be rgba(55, 7, 55, 0.2). Was rgba(56, 8, 56, 0.2).
-FAIL colorTest.parseColor("hsla(330, 75%, 12.5%, 0.2)") should be rgba(55, 7, 31, 0.2). Was rgba(56, 8, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 12.5%, 0.2)") should be rgba(59, 3, 3, 0.2). Was rgba(60, 4, 4, 0.2).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 12.5%, 0.2)") should be rgba(59, 31, 3, 0.2). Was rgba(60, 32, 4, 0.2).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 12.5%, 0.2)") should be rgba(59, 59, 3, 0.2). Was rgba(60, 60, 4, 0.2).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 12.5%, 0.2)") should be rgba(31, 59, 3, 0.2). Was rgba(32, 60, 4, 0.2).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 12.5%, 0.2)") should be rgba(3, 59, 3, 0.2). Was rgba(4, 60, 4, 0.2).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 12.5%, 0.2)") should be rgba(3, 59, 31, 0.2). Was rgba(4, 60, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 12.5%, 0.2)") should be rgba(3, 59, 59, 0.2). Was rgba(4, 60, 60, 0.2).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 12.5%, 0.2)") should be rgba(3, 31, 59, 0.2). Was rgba(4, 32, 60, 0.2).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 12.5%, 0.2)") should be rgba(3, 3, 59, 0.2). Was rgba(4, 4, 60, 0.2).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 12.5%, 0.2)") should be rgba(31, 3, 59, 0.2). Was rgba(32, 4, 60, 0.2).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 12.5%, 0.2)") should be rgba(59, 3, 59, 0.2). Was rgba(60, 4, 60, 0.2).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 12.5%, 0.2)") should be rgba(59, 3, 31, 0.2). Was rgba(60, 4, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 100%, 12.5%, 0.2)") should be rgba(63, 0, 0, 0.2). Was rgba(64, 0, 0, 0.2).
-FAIL colorTest.parseColor("hsla(30, 100%, 12.5%, 0.2)") should be rgba(63, 31, 0, 0.2). Was rgba(64, 32, 0, 0.2).
-FAIL colorTest.parseColor("hsla(60, 100%, 12.5%, 0.2)") should be rgba(63, 63, 0, 0.2). Was rgba(64, 64, 0, 0.2).
-FAIL colorTest.parseColor("hsla(90, 100%, 12.5%, 0.2)") should be rgba(31, 63, 0, 0.2). Was rgba(32, 64, 0, 0.2).
-FAIL colorTest.parseColor("hsla(120, 100%, 12.5%, 0.2)") should be rgba(0, 63, 0, 0.2). Was rgba(0, 64, 0, 0.2).
-FAIL colorTest.parseColor("hsla(150, 100%, 12.5%, 0.2)") should be rgba(0, 63, 31, 0.2). Was rgba(0, 64, 32, 0.2).
-FAIL colorTest.parseColor("hsla(180, 100%, 12.5%, 0.2)") should be rgba(0, 63, 63, 0.2). Was rgba(0, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(210, 100%, 12.5%, 0.2)") should be rgba(0, 31, 63, 0.2). Was rgba(0, 32, 64, 0.2).
-FAIL colorTest.parseColor("hsla(240, 100%, 12.5%, 0.2)") should be rgba(0, 0, 63, 0.2). Was rgba(0, 0, 64, 0.2).
-FAIL colorTest.parseColor("hsla(270, 100%, 12.5%, 0.2)") should be rgba(31, 0, 63, 0.2). Was rgba(32, 0, 64, 0.2).
-FAIL colorTest.parseColor("hsla(300, 100%, 12.5%, 0.2)") should be rgba(63, 0, 63, 0.2). Was rgba(64, 0, 64, 0.2).
-FAIL colorTest.parseColor("hsla(330, 100%, 12.5%, 0.2)") should be rgba(63, 0, 31, 0.2). Was rgba(64, 0, 32, 0.2).
-FAIL colorTest.parseColor("hsla(0, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(30, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(60, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(90, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(120, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(150, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(210, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(240, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(270, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(300, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(330, 0%, 25%, 0.2)") should be rgba(63, 63, 63, 0.2). Was rgba(64, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 25%, 0.2)") should be rgba(71, 55, 55, 0.2). Was rgba(72, 56, 56, 0.2).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 25%, 0.2)") should be rgba(71, 63, 55, 0.2). Was rgba(72, 64, 56, 0.2).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 25%, 0.2)") should be rgba(71, 71, 55, 0.2). Was rgba(72, 72, 56, 0.2).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 25%, 0.2)") should be rgba(63, 71, 55, 0.2). Was rgba(64, 72, 56, 0.2).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 25%, 0.2)") should be rgba(55, 71, 55, 0.2). Was rgba(56, 72, 56, 0.2).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 25%, 0.2)") should be rgba(55, 71, 63, 0.2). Was rgba(56, 72, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 25%, 0.2)") should be rgba(55, 71, 71, 0.2). Was rgba(56, 72, 72, 0.2).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 25%, 0.2)") should be rgba(55, 63, 71, 0.2). Was rgba(56, 64, 72, 0.2).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 25%, 0.2)") should be rgba(55, 55, 71, 0.2). Was rgba(56, 56, 72, 0.2).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 25%, 0.2)") should be rgba(63, 55, 71, 0.2). Was rgba(64, 56, 72, 0.2).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 25%, 0.2)") should be rgba(71, 55, 71, 0.2). Was rgba(72, 56, 72, 0.2).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 25%, 0.2)") should be rgba(71, 55, 63, 0.2). Was rgba(72, 56, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 25%, 25%, 0.2)") should be rgba(79, 47, 47, 0.2). Was rgba(80, 48, 48, 0.2).
-FAIL colorTest.parseColor("hsla(30, 25%, 25%, 0.2)") should be rgba(79, 63, 47, 0.2). Was rgba(80, 64, 48, 0.2).
-FAIL colorTest.parseColor("hsla(60, 25%, 25%, 0.2)") should be rgba(79, 79, 47, 0.2). Was rgba(80, 80, 48, 0.2).
-FAIL colorTest.parseColor("hsla(90, 25%, 25%, 0.2)") should be rgba(63, 79, 47, 0.2). Was rgba(64, 80, 48, 0.2).
-FAIL colorTest.parseColor("hsla(120, 25%, 25%, 0.2)") should be rgba(47, 79, 47, 0.2). Was rgba(48, 80, 48, 0.2).
-FAIL colorTest.parseColor("hsla(150, 25%, 25%, 0.2)") should be rgba(47, 79, 63, 0.2). Was rgba(48, 80, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 25%, 25%, 0.2)") should be rgba(47, 79, 79, 0.2). Was rgba(48, 80, 80, 0.2).
-FAIL colorTest.parseColor("hsla(210, 25%, 25%, 0.2)") should be rgba(47, 63, 79, 0.2). Was rgba(48, 64, 80, 0.2).
-FAIL colorTest.parseColor("hsla(240, 25%, 25%, 0.2)") should be rgba(47, 47, 79, 0.2). Was rgba(48, 48, 80, 0.2).
-FAIL colorTest.parseColor("hsla(270, 25%, 25%, 0.2)") should be rgba(63, 47, 79, 0.2). Was rgba(64, 48, 80, 0.2).
-FAIL colorTest.parseColor("hsla(300, 25%, 25%, 0.2)") should be rgba(79, 47, 79, 0.2). Was rgba(80, 48, 80, 0.2).
-FAIL colorTest.parseColor("hsla(330, 25%, 25%, 0.2)") should be rgba(79, 47, 63, 0.2). Was rgba(80, 48, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 25%, 0.2)") should be rgba(87, 39, 39, 0.2). Was rgba(88, 40, 40, 0.2).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 25%, 0.2)") should be rgba(87, 63, 39, 0.2). Was rgba(88, 64, 40, 0.2).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 25%, 0.2)") should be rgba(87, 87, 39, 0.2). Was rgba(88, 88, 40, 0.2).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 25%, 0.2)") should be rgba(63, 87, 39, 0.2). Was rgba(64, 88, 40, 0.2).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 25%, 0.2)") should be rgba(39, 87, 39, 0.2). Was rgba(40, 88, 40, 0.2).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 25%, 0.2)") should be rgba(39, 87, 63, 0.2). Was rgba(40, 88, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 25%, 0.2)") should be rgba(39, 87, 87, 0.2). Was rgba(40, 88, 88, 0.2).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 25%, 0.2)") should be rgba(39, 63, 87, 0.2). Was rgba(40, 64, 88, 0.2).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 25%, 0.2)") should be rgba(39, 39, 87, 0.2). Was rgba(40, 40, 88, 0.2).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 25%, 0.2)") should be rgba(63, 39, 87, 0.2). Was rgba(64, 40, 88, 0.2).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 25%, 0.2)") should be rgba(87, 39, 87, 0.2). Was rgba(88, 40, 88, 0.2).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 25%, 0.2)") should be rgba(87, 39, 63, 0.2). Was rgba(88, 40, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 50%, 25%, 0.2)") should be rgba(95, 31, 31, 0.2). Was rgba(96, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(30, 50%, 25%, 0.2)") should be rgba(95, 63, 31, 0.2). Was rgba(96, 64, 32, 0.2).
-FAIL colorTest.parseColor("hsla(60, 50%, 25%, 0.2)") should be rgba(95, 95, 31, 0.2). Was rgba(96, 96, 32, 0.2).
-FAIL colorTest.parseColor("hsla(90, 50%, 25%, 0.2)") should be rgba(63, 95, 31, 0.2). Was rgba(64, 96, 32, 0.2).
-FAIL colorTest.parseColor("hsla(120, 50%, 25%, 0.2)") should be rgba(31, 95, 31, 0.2). Was rgba(32, 96, 32, 0.2).
-FAIL colorTest.parseColor("hsla(150, 50%, 25%, 0.2)") should be rgba(31, 95, 63, 0.2). Was rgba(32, 96, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 50%, 25%, 0.2)") should be rgba(31, 95, 95, 0.2). Was rgba(32, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(210, 50%, 25%, 0.2)") should be rgba(31, 63, 95, 0.2). Was rgba(32, 64, 96, 0.2).
-FAIL colorTest.parseColor("hsla(240, 50%, 25%, 0.2)") should be rgba(31, 31, 95, 0.2). Was rgba(32, 32, 96, 0.2).
-FAIL colorTest.parseColor("hsla(270, 50%, 25%, 0.2)") should be rgba(63, 31, 95, 0.2). Was rgba(64, 32, 96, 0.2).
-FAIL colorTest.parseColor("hsla(300, 50%, 25%, 0.2)") should be rgba(95, 31, 95, 0.2). Was rgba(96, 32, 96, 0.2).
-FAIL colorTest.parseColor("hsla(330, 50%, 25%, 0.2)") should be rgba(95, 31, 63, 0.2). Was rgba(96, 32, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 25%, 0.2)") should be rgba(103, 23, 23, 0.2). Was rgba(104, 24, 24, 0.2).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 25%, 0.2)") should be rgba(103, 63, 23, 0.2). Was rgba(104, 64, 24, 0.2).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 25%, 0.2)") should be rgba(103, 103, 23, 0.2). Was rgba(104, 104, 24, 0.2).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 25%, 0.2)") should be rgba(63, 103, 23, 0.2). Was rgba(64, 104, 24, 0.2).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 25%, 0.2)") should be rgba(23, 103, 23, 0.2). Was rgba(24, 104, 24, 0.2).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 25%, 0.2)") should be rgba(23, 103, 63, 0.2). Was rgba(24, 104, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 25%, 0.2)") should be rgba(23, 103, 103, 0.2). Was rgba(24, 104, 104, 0.2).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 25%, 0.2)") should be rgba(23, 63, 103, 0.2). Was rgba(24, 64, 104, 0.2).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 25%, 0.2)") should be rgba(23, 23, 103, 0.2). Was rgba(24, 24, 104, 0.2).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 25%, 0.2)") should be rgba(63, 23, 103, 0.2). Was rgba(64, 24, 104, 0.2).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 25%, 0.2)") should be rgba(103, 23, 103, 0.2). Was rgba(104, 24, 104, 0.2).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 25%, 0.2)") should be rgba(103, 23, 63, 0.2). Was rgba(104, 24, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 75%, 25%, 0.2)") should be rgba(111, 15, 15, 0.2). Was rgba(112, 16, 16, 0.2).
-FAIL colorTest.parseColor("hsla(30, 75%, 25%, 0.2)") should be rgba(111, 63, 15, 0.2). Was rgba(112, 64, 16, 0.2).
-FAIL colorTest.parseColor("hsla(60, 75%, 25%, 0.2)") should be rgba(111, 111, 15, 0.2). Was rgba(112, 112, 16, 0.2).
-FAIL colorTest.parseColor("hsla(90, 75%, 25%, 0.2)") should be rgba(63, 111, 15, 0.2). Was rgba(64, 112, 16, 0.2).
-FAIL colorTest.parseColor("hsla(120, 75%, 25%, 0.2)") should be rgba(15, 111, 15, 0.2). Was rgba(16, 112, 16, 0.2).
-FAIL colorTest.parseColor("hsla(150, 75%, 25%, 0.2)") should be rgba(15, 111, 63, 0.2). Was rgba(16, 112, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 75%, 25%, 0.2)") should be rgba(15, 111, 111, 0.2). Was rgba(16, 112, 112, 0.2).
-FAIL colorTest.parseColor("hsla(210, 75%, 25%, 0.2)") should be rgba(15, 63, 111, 0.2). Was rgba(16, 64, 112, 0.2).
-FAIL colorTest.parseColor("hsla(240, 75%, 25%, 0.2)") should be rgba(15, 15, 111, 0.2). Was rgba(16, 16, 112, 0.2).
-FAIL colorTest.parseColor("hsla(270, 75%, 25%, 0.2)") should be rgba(63, 15, 111, 0.2). Was rgba(64, 16, 112, 0.2).
-FAIL colorTest.parseColor("hsla(300, 75%, 25%, 0.2)") should be rgba(111, 15, 111, 0.2). Was rgba(112, 16, 112, 0.2).
-FAIL colorTest.parseColor("hsla(330, 75%, 25%, 0.2)") should be rgba(111, 15, 63, 0.2). Was rgba(112, 16, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 25%, 0.2)") should be rgba(119, 7, 7, 0.2). Was rgba(120, 8, 8, 0.2).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 25%, 0.2)") should be rgba(119, 63, 7, 0.2). Was rgba(120, 64, 8, 0.2).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 25%, 0.2)") should be rgba(119, 119, 7, 0.2). Was rgba(120, 120, 8, 0.2).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 25%, 0.2)") should be rgba(63, 119, 7, 0.2). Was rgba(64, 120, 8, 0.2).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 25%, 0.2)") should be rgba(7, 119, 7, 0.2). Was rgba(8, 120, 8, 0.2).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 25%, 0.2)") should be rgba(7, 119, 63, 0.2). Was rgba(8, 120, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 25%, 0.2)") should be rgba(7, 119, 119, 0.2). Was rgba(8, 120, 120, 0.2).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 25%, 0.2)") should be rgba(7, 63, 119, 0.2). Was rgba(8, 64, 120, 0.2).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 25%, 0.2)") should be rgba(7, 7, 119, 0.2). Was rgba(8, 8, 120, 0.2).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 25%, 0.2)") should be rgba(63, 7, 119, 0.2). Was rgba(64, 8, 120, 0.2).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 25%, 0.2)") should be rgba(119, 7, 119, 0.2). Was rgba(120, 8, 120, 0.2).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 25%, 0.2)") should be rgba(119, 7, 63, 0.2). Was rgba(120, 8, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 100%, 25%, 0.2)") should be rgba(127, 0, 0, 0.2). Was rgba(128, 0, 0, 0.2).
-FAIL colorTest.parseColor("hsla(30, 100%, 25%, 0.2)") should be rgba(127, 63, 0, 0.2). Was rgba(128, 64, 0, 0.2).
-FAIL colorTest.parseColor("hsla(60, 100%, 25%, 0.2)") should be rgba(127, 127, 0, 0.2). Was rgba(128, 128, 0, 0.2).
-FAIL colorTest.parseColor("hsla(90, 100%, 25%, 0.2)") should be rgba(63, 127, 0, 0.2). Was rgba(64, 128, 0, 0.2).
-FAIL colorTest.parseColor("hsla(120, 100%, 25%, 0.2)") should be rgba(0, 127, 0, 0.2). Was rgba(0, 128, 0, 0.2).
-FAIL colorTest.parseColor("hsla(150, 100%, 25%, 0.2)") should be rgba(0, 127, 63, 0.2). Was rgba(0, 128, 64, 0.2).
-FAIL colorTest.parseColor("hsla(180, 100%, 25%, 0.2)") should be rgba(0, 127, 127, 0.2). Was rgba(0, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(210, 100%, 25%, 0.2)") should be rgba(0, 63, 127, 0.2). Was rgba(0, 64, 128, 0.2).
-FAIL colorTest.parseColor("hsla(240, 100%, 25%, 0.2)") should be rgba(0, 0, 127, 0.2). Was rgba(0, 0, 128, 0.2).
-FAIL colorTest.parseColor("hsla(270, 100%, 25%, 0.2)") should be rgba(63, 0, 127, 0.2). Was rgba(64, 0, 128, 0.2).
-FAIL colorTest.parseColor("hsla(300, 100%, 25%, 0.2)") should be rgba(127, 0, 127, 0.2). Was rgba(128, 0, 128, 0.2).
-FAIL colorTest.parseColor("hsla(330, 100%, 25%, 0.2)") should be rgba(127, 0, 63, 0.2). Was rgba(128, 0, 64, 0.2).
-FAIL colorTest.parseColor("hsla(0, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(30, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(60, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(90, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(120, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(150, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(210, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(240, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(270, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(300, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(330, 0%, 37.5%, 0.2)") should be rgba(95, 95, 95, 0.2). Was rgba(96, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 37.5%, 0.2)") should be rgba(107, 83, 83, 0.2). Was rgba(108, 84, 84, 0.2).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 37.5%, 0.2)") should be rgba(107, 95, 83, 0.2). Was rgba(108, 96, 84, 0.2).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 37.5%, 0.2)") should be rgba(107, 107, 83, 0.2). Was rgba(108, 108, 84, 0.2).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 37.5%, 0.2)") should be rgba(95, 107, 83, 0.2). Was rgba(96, 108, 84, 0.2).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 37.5%, 0.2)") should be rgba(83, 107, 83, 0.2). Was rgba(84, 108, 84, 0.2).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 37.5%, 0.2)") should be rgba(83, 107, 95, 0.2). Was rgba(84, 108, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 37.5%, 0.2)") should be rgba(83, 107, 107, 0.2). Was rgba(84, 108, 108, 0.2).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 37.5%, 0.2)") should be rgba(83, 95, 107, 0.2). Was rgba(84, 96, 108, 0.2).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 37.5%, 0.2)") should be rgba(83, 83, 107, 0.2). Was rgba(84, 84, 108, 0.2).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 37.5%, 0.2)") should be rgba(95, 83, 107, 0.2). Was rgba(96, 84, 108, 0.2).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 37.5%, 0.2)") should be rgba(107, 83, 107, 0.2). Was rgba(108, 84, 108, 0.2).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 37.5%, 0.2)") should be rgba(107, 83, 95, 0.2). Was rgba(108, 84, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 25%, 37.5%, 0.2)") should be rgba(119, 71, 71, 0.2). Was rgba(120, 72, 72, 0.2).
-FAIL colorTest.parseColor("hsla(30, 25%, 37.5%, 0.2)") should be rgba(119, 95, 71, 0.2). Was rgba(120, 96, 72, 0.2).
-FAIL colorTest.parseColor("hsla(60, 25%, 37.5%, 0.2)") should be rgba(119, 119, 71, 0.2). Was rgba(120, 120, 72, 0.2).
-FAIL colorTest.parseColor("hsla(90, 25%, 37.5%, 0.2)") should be rgba(95, 119, 71, 0.2). Was rgba(96, 120, 72, 0.2).
-FAIL colorTest.parseColor("hsla(120, 25%, 37.5%, 0.2)") should be rgba(71, 119, 71, 0.2). Was rgba(72, 120, 72, 0.2).
-FAIL colorTest.parseColor("hsla(150, 25%, 37.5%, 0.2)") should be rgba(71, 119, 95, 0.2). Was rgba(72, 120, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 25%, 37.5%, 0.2)") should be rgba(71, 119, 119, 0.2). Was rgba(72, 120, 120, 0.2).
-FAIL colorTest.parseColor("hsla(210, 25%, 37.5%, 0.2)") should be rgba(71, 95, 119, 0.2). Was rgba(72, 96, 120, 0.2).
-FAIL colorTest.parseColor("hsla(240, 25%, 37.5%, 0.2)") should be rgba(71, 71, 119, 0.2). Was rgba(72, 72, 120, 0.2).
-FAIL colorTest.parseColor("hsla(270, 25%, 37.5%, 0.2)") should be rgba(95, 71, 119, 0.2). Was rgba(96, 72, 120, 0.2).
-FAIL colorTest.parseColor("hsla(300, 25%, 37.5%, 0.2)") should be rgba(119, 71, 119, 0.2). Was rgba(120, 72, 120, 0.2).
-FAIL colorTest.parseColor("hsla(330, 25%, 37.5%, 0.2)") should be rgba(119, 71, 95, 0.2). Was rgba(120, 72, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 37.5%, 0.2)") should be rgba(131, 59, 59, 0.2). Was rgba(131, 60, 60, 0.2).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 37.5%, 0.2)") should be rgba(131, 95, 59, 0.2). Was rgba(131, 96, 60, 0.2).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 37.5%, 0.2)") should be rgba(131, 131, 59, 0.2). Was rgba(131, 131, 60, 0.2).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 37.5%, 0.2)") should be rgba(95, 131, 59, 0.2). Was rgba(96, 131, 60, 0.2).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 37.5%, 0.2)") should be rgba(59, 131, 59, 0.2). Was rgba(60, 131, 60, 0.2).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 37.5%, 0.2)") should be rgba(59, 131, 95, 0.2). Was rgba(60, 131, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 37.5%, 0.2)") should be rgba(59, 131, 131, 0.2). Was rgba(60, 131, 131, 0.2).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 37.5%, 0.2)") should be rgba(59, 95, 131, 0.2). Was rgba(60, 96, 131, 0.2).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 37.5%, 0.2)") should be rgba(59, 59, 131, 0.2). Was rgba(60, 60, 131, 0.2).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 37.5%, 0.2)") should be rgba(95, 59, 131, 0.2). Was rgba(96, 60, 131, 0.2).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 37.5%, 0.2)") should be rgba(131, 59, 131, 0.2). Was rgba(131, 60, 131, 0.2).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 37.5%, 0.2)") should be rgba(131, 59, 95, 0.2). Was rgba(131, 60, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 50%, 37.5%, 0.2)") should be rgba(143, 47, 47, 0.2). Was rgba(143, 48, 48, 0.2).
-FAIL colorTest.parseColor("hsla(30, 50%, 37.5%, 0.2)") should be rgba(143, 95, 47, 0.2). Was rgba(143, 96, 48, 0.2).
-FAIL colorTest.parseColor("hsla(60, 50%, 37.5%, 0.2)") should be rgba(143, 143, 47, 0.2). Was rgba(143, 143, 48, 0.2).
-FAIL colorTest.parseColor("hsla(90, 50%, 37.5%, 0.2)") should be rgba(95, 143, 47, 0.2). Was rgba(96, 143, 48, 0.2).
-FAIL colorTest.parseColor("hsla(120, 50%, 37.5%, 0.2)") should be rgba(47, 143, 47, 0.2). Was rgba(48, 143, 48, 0.2).
-FAIL colorTest.parseColor("hsla(150, 50%, 37.5%, 0.2)") should be rgba(47, 143, 95, 0.2). Was rgba(48, 143, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 50%, 37.5%, 0.2)") should be rgba(47, 143, 143, 0.2). Was rgba(48, 143, 143, 0.2).
-FAIL colorTest.parseColor("hsla(210, 50%, 37.5%, 0.2)") should be rgba(47, 95, 143, 0.2). Was rgba(48, 96, 143, 0.2).
-FAIL colorTest.parseColor("hsla(240, 50%, 37.5%, 0.2)") should be rgba(47, 47, 143, 0.2). Was rgba(48, 48, 143, 0.2).
-FAIL colorTest.parseColor("hsla(270, 50%, 37.5%, 0.2)") should be rgba(95, 47, 143, 0.2). Was rgba(96, 48, 143, 0.2).
-FAIL colorTest.parseColor("hsla(300, 50%, 37.5%, 0.2)") should be rgba(143, 47, 143, 0.2). Was rgba(143, 48, 143, 0.2).
-FAIL colorTest.parseColor("hsla(330, 50%, 37.5%, 0.2)") should be rgba(143, 47, 95, 0.2). Was rgba(143, 48, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 37.5%, 0.2)") should be rgba(155, 35, 35, 0.2). Was rgba(155, 36, 36, 0.2).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 37.5%, 0.2)") should be rgba(155, 95, 35, 0.2). Was rgba(155, 96, 36, 0.2).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 37.5%, 0.2)") should be rgba(155, 155, 35, 0.2). Was rgba(155, 155, 36, 0.2).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 37.5%, 0.2)") should be rgba(95, 155, 35, 0.2). Was rgba(96, 155, 36, 0.2).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 37.5%, 0.2)") should be rgba(35, 155, 35, 0.2). Was rgba(36, 155, 36, 0.2).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 37.5%, 0.2)") should be rgba(35, 155, 95, 0.2). Was rgba(36, 155, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 37.5%, 0.2)") should be rgba(35, 155, 155, 0.2). Was rgba(36, 155, 155, 0.2).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 37.5%, 0.2)") should be rgba(35, 95, 155, 0.2). Was rgba(36, 96, 155, 0.2).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 37.5%, 0.2)") should be rgba(35, 35, 155, 0.2). Was rgba(36, 36, 155, 0.2).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 37.5%, 0.2)") should be rgba(95, 35, 155, 0.2). Was rgba(96, 36, 155, 0.2).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 37.5%, 0.2)") should be rgba(155, 35, 155, 0.2). Was rgba(155, 36, 155, 0.2).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 37.5%, 0.2)") should be rgba(155, 35, 95, 0.2). Was rgba(155, 36, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 75%, 37.5%, 0.2)") should be rgba(167, 23, 23, 0.2). Was rgba(167, 24, 24, 0.2).
-FAIL colorTest.parseColor("hsla(30, 75%, 37.5%, 0.2)") should be rgba(167, 95, 23, 0.2). Was rgba(167, 96, 24, 0.2).
-FAIL colorTest.parseColor("hsla(60, 75%, 37.5%, 0.2)") should be rgba(167, 167, 23, 0.2). Was rgba(167, 167, 24, 0.2).
-FAIL colorTest.parseColor("hsla(90, 75%, 37.5%, 0.2)") should be rgba(95, 167, 23, 0.2). Was rgba(96, 167, 24, 0.2).
-FAIL colorTest.parseColor("hsla(120, 75%, 37.5%, 0.2)") should be rgba(23, 167, 23, 0.2). Was rgba(24, 167, 24, 0.2).
-FAIL colorTest.parseColor("hsla(150, 75%, 37.5%, 0.2)") should be rgba(23, 167, 95, 0.2). Was rgba(24, 167, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 75%, 37.5%, 0.2)") should be rgba(23, 167, 167, 0.2). Was rgba(24, 167, 167, 0.2).
-FAIL colorTest.parseColor("hsla(210, 75%, 37.5%, 0.2)") should be rgba(23, 95, 167, 0.2). Was rgba(24, 96, 167, 0.2).
-FAIL colorTest.parseColor("hsla(240, 75%, 37.5%, 0.2)") should be rgba(23, 23, 167, 0.2). Was rgba(24, 24, 167, 0.2).
-FAIL colorTest.parseColor("hsla(270, 75%, 37.5%, 0.2)") should be rgba(95, 23, 167, 0.2). Was rgba(96, 24, 167, 0.2).
-FAIL colorTest.parseColor("hsla(300, 75%, 37.5%, 0.2)") should be rgba(167, 23, 167, 0.2). Was rgba(167, 24, 167, 0.2).
-FAIL colorTest.parseColor("hsla(330, 75%, 37.5%, 0.2)") should be rgba(167, 23, 95, 0.2). Was rgba(167, 24, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 37.5%, 0.2)") should be rgba(179, 11, 11, 0.2). Was rgba(179, 12, 12, 0.2).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 37.5%, 0.2)") should be rgba(179, 95, 11, 0.2). Was rgba(179, 96, 12, 0.2).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 37.5%, 0.2)") should be rgba(179, 179, 11, 0.2). Was rgba(179, 179, 12, 0.2).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 37.5%, 0.2)") should be rgba(95, 179, 11, 0.2). Was rgba(96, 179, 12, 0.2).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 37.5%, 0.2)") should be rgba(11, 179, 11, 0.2). Was rgba(12, 179, 12, 0.2).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 37.5%, 0.2)") should be rgba(11, 179, 95, 0.2). Was rgba(12, 179, 96, 0.2).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 37.5%, 0.2)") should be rgba(11, 179, 179, 0.2). Was rgba(12, 179, 179, 0.2).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 37.5%, 0.2)") should be rgba(11, 95, 179, 0.2). Was rgba(12, 96, 179, 0.2).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 37.5%, 0.2)") should be rgba(11, 11, 179, 0.2). Was rgba(12, 12, 179, 0.2).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 37.5%, 0.2)") should be rgba(95, 11, 179, 0.2). Was rgba(96, 12, 179, 0.2).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 37.5%, 0.2)") should be rgba(179, 11, 179, 0.2). Was rgba(179, 12, 179, 0.2).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 37.5%, 0.2)") should be rgba(179, 11, 95, 0.2). Was rgba(179, 12, 96, 0.2).
-PASS colorTest.parseColor("hsla(0, 100%, 37.5%, 0.2)") is "rgba(191, 0, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(30, 100%, 37.5%, 0.2)") should be rgba(191, 95, 0, 0.2). Was rgba(191, 96, 0, 0.2).
-PASS colorTest.parseColor("hsla(60, 100%, 37.5%, 0.2)") is "rgba(191, 191, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(90, 100%, 37.5%, 0.2)") should be rgba(95, 191, 0, 0.2). Was rgba(96, 191, 0, 0.2).
-PASS colorTest.parseColor("hsla(120, 100%, 37.5%, 0.2)") is "rgba(0, 191, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(150, 100%, 37.5%, 0.2)") should be rgba(0, 191, 95, 0.2). Was rgba(0, 191, 96, 0.2).
-PASS colorTest.parseColor("hsla(180, 100%, 37.5%, 0.2)") is "rgba(0, 191, 191, 0.2)"
-FAIL colorTest.parseColor("hsla(210, 100%, 37.5%, 0.2)") should be rgba(0, 95, 191, 0.2). Was rgba(0, 96, 191, 0.2).
-PASS colorTest.parseColor("hsla(240, 100%, 37.5%, 0.2)") is "rgba(0, 0, 191, 0.2)"
-FAIL colorTest.parseColor("hsla(270, 100%, 37.5%, 0.2)") should be rgba(95, 0, 191, 0.2). Was rgba(96, 0, 191, 0.2).
-PASS colorTest.parseColor("hsla(300, 100%, 37.5%, 0.2)") is "rgba(191, 0, 191, 0.2)"
-FAIL colorTest.parseColor("hsla(330, 100%, 37.5%, 0.2)") should be rgba(191, 0, 95, 0.2). Was rgba(191, 0, 96, 0.2).
-FAIL colorTest.parseColor("hsla(0, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(30, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(60, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(90, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(120, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(150, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(210, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(240, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(270, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(300, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(330, 0%, 50%, 0.2)") should be rgba(127, 127, 127, 0.2). Was rgba(128, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 50%, 0.2)") should be rgba(143, 111, 111, 0.2). Was rgba(143, 112, 112, 0.2).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 50%, 0.2)") should be rgba(143, 127, 111, 0.2). Was rgba(143, 128, 112, 0.2).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 50%, 0.2)") should be rgba(143, 143, 111, 0.2). Was rgba(143, 143, 112, 0.2).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 50%, 0.2)") should be rgba(127, 143, 111, 0.2). Was rgba(128, 143, 112, 0.2).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 50%, 0.2)") should be rgba(111, 143, 111, 0.2). Was rgba(112, 143, 112, 0.2).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 50%, 0.2)") should be rgba(111, 143, 127, 0.2). Was rgba(112, 143, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 50%, 0.2)") should be rgba(111, 143, 143, 0.2). Was rgba(112, 143, 143, 0.2).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 50%, 0.2)") should be rgba(111, 127, 143, 0.2). Was rgba(112, 128, 143, 0.2).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 50%, 0.2)") should be rgba(111, 111, 143, 0.2). Was rgba(112, 112, 143, 0.2).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 50%, 0.2)") should be rgba(127, 111, 143, 0.2). Was rgba(128, 112, 143, 0.2).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 50%, 0.2)") should be rgba(143, 111, 143, 0.2). Was rgba(143, 112, 143, 0.2).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 50%, 0.2)") should be rgba(143, 111, 127, 0.2). Was rgba(143, 112, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 25%, 50%, 0.2)") should be rgba(159, 95, 95, 0.2). Was rgba(159, 96, 96, 0.2).
-FAIL colorTest.parseColor("hsla(30, 25%, 50%, 0.2)") should be rgba(159, 127, 95, 0.2). Was rgba(159, 128, 96, 0.2).
-FAIL colorTest.parseColor("hsla(60, 25%, 50%, 0.2)") should be rgba(159, 159, 95, 0.2). Was rgba(159, 159, 96, 0.2).
-FAIL colorTest.parseColor("hsla(90, 25%, 50%, 0.2)") should be rgba(127, 159, 95, 0.2). Was rgba(128, 159, 96, 0.2).
-FAIL colorTest.parseColor("hsla(120, 25%, 50%, 0.2)") should be rgba(95, 159, 95, 0.2). Was rgba(96, 159, 96, 0.2).
-FAIL colorTest.parseColor("hsla(150, 25%, 50%, 0.2)") should be rgba(95, 159, 127, 0.2). Was rgba(96, 159, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 25%, 50%, 0.2)") should be rgba(95, 159, 159, 0.2). Was rgba(96, 159, 159, 0.2).
-FAIL colorTest.parseColor("hsla(210, 25%, 50%, 0.2)") should be rgba(95, 127, 159, 0.2). Was rgba(96, 128, 159, 0.2).
-FAIL colorTest.parseColor("hsla(240, 25%, 50%, 0.2)") should be rgba(95, 95, 159, 0.2). Was rgba(96, 96, 159, 0.2).
-FAIL colorTest.parseColor("hsla(270, 25%, 50%, 0.2)") should be rgba(127, 95, 159, 0.2). Was rgba(128, 96, 159, 0.2).
-FAIL colorTest.parseColor("hsla(300, 25%, 50%, 0.2)") should be rgba(159, 95, 159, 0.2). Was rgba(159, 96, 159, 0.2).
-FAIL colorTest.parseColor("hsla(330, 25%, 50%, 0.2)") should be rgba(159, 95, 127, 0.2). Was rgba(159, 96, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 50%, 0.2)") should be rgba(175, 79, 79, 0.2). Was rgba(175, 80, 80, 0.2).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 50%, 0.2)") should be rgba(175, 127, 79, 0.2). Was rgba(175, 128, 80, 0.2).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 50%, 0.2)") should be rgba(175, 175, 79, 0.2). Was rgba(175, 175, 80, 0.2).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 50%, 0.2)") should be rgba(127, 175, 79, 0.2). Was rgba(128, 175, 80, 0.2).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 50%, 0.2)") should be rgba(79, 175, 79, 0.2). Was rgba(80, 175, 80, 0.2).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 50%, 0.2)") should be rgba(79, 175, 127, 0.2). Was rgba(80, 175, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 50%, 0.2)") should be rgba(79, 175, 175, 0.2). Was rgba(80, 175, 175, 0.2).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 50%, 0.2)") should be rgba(79, 127, 175, 0.2). Was rgba(80, 128, 175, 0.2).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 50%, 0.2)") should be rgba(79, 79, 175, 0.2). Was rgba(80, 80, 175, 0.2).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 50%, 0.2)") should be rgba(127, 79, 175, 0.2). Was rgba(128, 80, 175, 0.2).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 50%, 0.2)") should be rgba(175, 79, 175, 0.2). Was rgba(175, 80, 175, 0.2).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 50%, 0.2)") should be rgba(175, 79, 127, 0.2). Was rgba(175, 80, 128, 0.2).
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1.html b/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1.html
deleted file mode 100644
index 7cca568c4..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_1.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../resources/js-test.js"></script>
-<script src="resources/color-test.js"></script>
-<script>
-var test = new ColorTest("resources/css-parsing-tests/color3_hsla_1.json");
-test.run();
-</script>
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2-expected.txt b/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2-expected.txt
deleted file mode 100644
index 150ec62..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2-expected.txt
+++ /dev/null
@@ -1,1474 +0,0 @@
-CONSOLE WARNING: line 3: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
-Color test for resources/css-parsing-tests/color3_hsla_2.json
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL colorTest.parseColor("hsla(0, 50%, 50%, 0.2)") should be rgba(191, 63, 63, 0.2). Was rgba(191, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(30, 50%, 50%, 0.2)") should be rgba(191, 127, 63, 0.2). Was rgba(191, 128, 64, 0.2).
-FAIL colorTest.parseColor("hsla(60, 50%, 50%, 0.2)") should be rgba(191, 191, 63, 0.2). Was rgba(191, 191, 64, 0.2).
-FAIL colorTest.parseColor("hsla(90, 50%, 50%, 0.2)") should be rgba(127, 191, 63, 0.2). Was rgba(128, 191, 64, 0.2).
-FAIL colorTest.parseColor("hsla(120, 50%, 50%, 0.2)") should be rgba(63, 191, 63, 0.2). Was rgba(64, 191, 64, 0.2).
-FAIL colorTest.parseColor("hsla(150, 50%, 50%, 0.2)") should be rgba(63, 191, 127, 0.2). Was rgba(64, 191, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 50%, 50%, 0.2)") should be rgba(63, 191, 191, 0.2). Was rgba(64, 191, 191, 0.2).
-FAIL colorTest.parseColor("hsla(210, 50%, 50%, 0.2)") should be rgba(63, 127, 191, 0.2). Was rgba(64, 128, 191, 0.2).
-FAIL colorTest.parseColor("hsla(240, 50%, 50%, 0.2)") should be rgba(63, 63, 191, 0.2). Was rgba(64, 64, 191, 0.2).
-FAIL colorTest.parseColor("hsla(270, 50%, 50%, 0.2)") should be rgba(127, 63, 191, 0.2). Was rgba(128, 64, 191, 0.2).
-FAIL colorTest.parseColor("hsla(300, 50%, 50%, 0.2)") should be rgba(191, 63, 191, 0.2). Was rgba(191, 64, 191, 0.2).
-FAIL colorTest.parseColor("hsla(330, 50%, 50%, 0.2)") should be rgba(191, 63, 127, 0.2). Was rgba(191, 64, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 50%, 0.2)") should be rgba(207, 47, 47, 0.2). Was rgba(207, 48, 48, 0.2).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 50%, 0.2)") should be rgba(207, 127, 47, 0.2). Was rgba(207, 128, 48, 0.2).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 50%, 0.2)") should be rgba(207, 207, 47, 0.2). Was rgba(207, 207, 48, 0.2).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 50%, 0.2)") should be rgba(127, 207, 47, 0.2). Was rgba(128, 207, 48, 0.2).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 50%, 0.2)") should be rgba(47, 207, 47, 0.2). Was rgba(48, 207, 48, 0.2).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 50%, 0.2)") should be rgba(47, 207, 127, 0.2). Was rgba(48, 207, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 50%, 0.2)") should be rgba(47, 207, 207, 0.2). Was rgba(48, 207, 207, 0.2).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 50%, 0.2)") should be rgba(47, 127, 207, 0.2). Was rgba(48, 128, 207, 0.2).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 50%, 0.2)") should be rgba(47, 47, 207, 0.2). Was rgba(48, 48, 207, 0.2).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 50%, 0.2)") should be rgba(127, 47, 207, 0.2). Was rgba(128, 48, 207, 0.2).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 50%, 0.2)") should be rgba(207, 47, 207, 0.2). Was rgba(207, 48, 207, 0.2).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 50%, 0.2)") should be rgba(207, 47, 127, 0.2). Was rgba(207, 48, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 75%, 50%, 0.2)") should be rgba(223, 31, 31, 0.2). Was rgba(223, 32, 32, 0.2).
-FAIL colorTest.parseColor("hsla(30, 75%, 50%, 0.2)") should be rgba(223, 127, 31, 0.2). Was rgba(223, 128, 32, 0.2).
-FAIL colorTest.parseColor("hsla(60, 75%, 50%, 0.2)") should be rgba(223, 223, 31, 0.2). Was rgba(223, 223, 32, 0.2).
-FAIL colorTest.parseColor("hsla(90, 75%, 50%, 0.2)") should be rgba(127, 223, 31, 0.2). Was rgba(128, 223, 32, 0.2).
-FAIL colorTest.parseColor("hsla(120, 75%, 50%, 0.2)") should be rgba(31, 223, 31, 0.2). Was rgba(32, 223, 32, 0.2).
-FAIL colorTest.parseColor("hsla(150, 75%, 50%, 0.2)") should be rgba(31, 223, 127, 0.2). Was rgba(32, 223, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 75%, 50%, 0.2)") should be rgba(31, 223, 223, 0.2). Was rgba(32, 223, 223, 0.2).
-FAIL colorTest.parseColor("hsla(210, 75%, 50%, 0.2)") should be rgba(31, 127, 223, 0.2). Was rgba(32, 128, 223, 0.2).
-FAIL colorTest.parseColor("hsla(240, 75%, 50%, 0.2)") should be rgba(31, 31, 223, 0.2). Was rgba(32, 32, 223, 0.2).
-FAIL colorTest.parseColor("hsla(270, 75%, 50%, 0.2)") should be rgba(127, 31, 223, 0.2). Was rgba(128, 32, 223, 0.2).
-FAIL colorTest.parseColor("hsla(300, 75%, 50%, 0.2)") should be rgba(223, 31, 223, 0.2). Was rgba(223, 32, 223, 0.2).
-FAIL colorTest.parseColor("hsla(330, 75%, 50%, 0.2)") should be rgba(223, 31, 127, 0.2). Was rgba(223, 32, 128, 0.2).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 50%, 0.2)") should be rgba(239, 15, 15, 0.2). Was rgba(239, 16, 16, 0.2).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 50%, 0.2)") should be rgba(239, 127, 15, 0.2). Was rgba(239, 128, 16, 0.2).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 50%, 0.2)") should be rgba(239, 239, 15, 0.2). Was rgba(239, 239, 16, 0.2).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 50%, 0.2)") should be rgba(127, 239, 15, 0.2). Was rgba(128, 239, 16, 0.2).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 50%, 0.2)") should be rgba(15, 239, 15, 0.2). Was rgba(16, 239, 16, 0.2).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 50%, 0.2)") should be rgba(15, 239, 127, 0.2). Was rgba(16, 239, 128, 0.2).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 50%, 0.2)") should be rgba(15, 239, 239, 0.2). Was rgba(16, 239, 239, 0.2).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 50%, 0.2)") should be rgba(15, 127, 239, 0.2). Was rgba(16, 128, 239, 0.2).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 50%, 0.2)") should be rgba(15, 15, 239, 0.2). Was rgba(16, 16, 239, 0.2).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 50%, 0.2)") should be rgba(127, 15, 239, 0.2). Was rgba(128, 16, 239, 0.2).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 50%, 0.2)") should be rgba(239, 15, 239, 0.2). Was rgba(239, 16, 239, 0.2).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 50%, 0.2)") should be rgba(239, 15, 127, 0.2). Was rgba(239, 16, 128, 0.2).
-PASS colorTest.parseColor("hsla(0, 100%, 50%, 0.2)") is "rgba(255, 0, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(30, 100%, 50%, 0.2)") should be rgba(255, 127, 0, 0.2). Was rgba(255, 128, 0, 0.2).
-PASS colorTest.parseColor("hsla(60, 100%, 50%, 0.2)") is "rgba(255, 255, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(90, 100%, 50%, 0.2)") should be rgba(127, 255, 0, 0.2). Was rgba(128, 255, 0, 0.2).
-PASS colorTest.parseColor("hsla(120, 100%, 50%, 0.2)") is "rgba(0, 255, 0, 0.2)"
-FAIL colorTest.parseColor("hsla(150, 100%, 50%, 0.2)") should be rgba(0, 255, 127, 0.2). Was rgba(0, 255, 128, 0.2).
-PASS colorTest.parseColor("hsla(180, 100%, 50%, 0.2)") is "rgba(0, 255, 255, 0.2)"
-FAIL colorTest.parseColor("hsla(210, 100%, 50%, 0.2)") should be rgba(0, 127, 255, 0.2). Was rgba(0, 128, 255, 0.2).
-PASS colorTest.parseColor("hsla(240, 100%, 50%, 0.2)") is "rgba(0, 0, 255, 0.2)"
-FAIL colorTest.parseColor("hsla(270, 100%, 50%, 0.2)") should be rgba(127, 0, 255, 0.2). Was rgba(128, 0, 255, 0.2).
-PASS colorTest.parseColor("hsla(300, 100%, 50%, 0.2)") is "rgba(255, 0, 255, 0.2)"
-FAIL colorTest.parseColor("hsla(330, 100%, 50%, 0.2)") should be rgba(255, 0, 127, 0.2). Was rgba(255, 0, 128, 0.2).
-PASS colorTest.parseColor("hsla(0, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(30, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(60, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(90, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(120, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(150, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(180, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(210, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(240, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(270, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(300, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(330, 0%, 62.5%, 0.2)") is "rgba(159, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 62.5%, 0.2)") is "rgba(171, 147, 147, 0.2)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 62.5%, 0.2)") is "rgba(171, 159, 147, 0.2)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 62.5%, 0.2)") is "rgba(171, 171, 147, 0.2)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 62.5%, 0.2)") is "rgba(159, 171, 147, 0.2)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 62.5%, 0.2)") is "rgba(147, 171, 147, 0.2)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 62.5%, 0.2)") is "rgba(147, 171, 159, 0.2)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 62.5%, 0.2)") is "rgba(147, 171, 171, 0.2)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 62.5%, 0.2)") is "rgba(147, 159, 171, 0.2)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 62.5%, 0.2)") is "rgba(147, 147, 171, 0.2)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 62.5%, 0.2)") is "rgba(159, 147, 171, 0.2)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 62.5%, 0.2)") is "rgba(171, 147, 171, 0.2)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 62.5%, 0.2)") is "rgba(171, 147, 159, 0.2)"
-PASS colorTest.parseColor("hsla(0, 25%, 62.5%, 0.2)") is "rgba(183, 135, 135, 0.2)"
-PASS colorTest.parseColor("hsla(30, 25%, 62.5%, 0.2)") is "rgba(183, 159, 135, 0.2)"
-PASS colorTest.parseColor("hsla(60, 25%, 62.5%, 0.2)") is "rgba(183, 183, 135, 0.2)"
-PASS colorTest.parseColor("hsla(90, 25%, 62.5%, 0.2)") is "rgba(159, 183, 135, 0.2)"
-PASS colorTest.parseColor("hsla(120, 25%, 62.5%, 0.2)") is "rgba(135, 183, 135, 0.2)"
-PASS colorTest.parseColor("hsla(150, 25%, 62.5%, 0.2)") is "rgba(135, 183, 159, 0.2)"
-PASS colorTest.parseColor("hsla(180, 25%, 62.5%, 0.2)") is "rgba(135, 183, 183, 0.2)"
-PASS colorTest.parseColor("hsla(210, 25%, 62.5%, 0.2)") is "rgba(135, 159, 183, 0.2)"
-PASS colorTest.parseColor("hsla(240, 25%, 62.5%, 0.2)") is "rgba(135, 135, 183, 0.2)"
-PASS colorTest.parseColor("hsla(270, 25%, 62.5%, 0.2)") is "rgba(159, 135, 183, 0.2)"
-PASS colorTest.parseColor("hsla(300, 25%, 62.5%, 0.2)") is "rgba(183, 135, 183, 0.2)"
-PASS colorTest.parseColor("hsla(330, 25%, 62.5%, 0.2)") is "rgba(183, 135, 159, 0.2)"
-FAIL colorTest.parseColor("hsla(0, 37.5%, 62.5%, 0.2)") should be rgba(195, 123, 123, 0.2). Was rgba(195, 124, 124, 0.2).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 62.5%, 0.2)") should be rgba(195, 159, 123, 0.2). Was rgba(195, 159, 124, 0.2).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 62.5%, 0.2)") should be rgba(195, 195, 123, 0.2). Was rgba(195, 195, 124, 0.2).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 62.5%, 0.2)") should be rgba(159, 195, 123, 0.2). Was rgba(159, 195, 124, 0.2).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 62.5%, 0.2)") should be rgba(123, 195, 123, 0.2). Was rgba(124, 195, 124, 0.2).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 62.5%, 0.2)") should be rgba(123, 195, 159, 0.2). Was rgba(124, 195, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 62.5%, 0.2)") should be rgba(123, 195, 195, 0.2). Was rgba(124, 195, 195, 0.2).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 62.5%, 0.2)") should be rgba(123, 159, 195, 0.2). Was rgba(124, 159, 195, 0.2).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 62.5%, 0.2)") should be rgba(123, 123, 195, 0.2). Was rgba(124, 124, 195, 0.2).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 62.5%, 0.2)") should be rgba(159, 123, 195, 0.2). Was rgba(159, 124, 195, 0.2).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 62.5%, 0.2)") should be rgba(195, 123, 195, 0.2). Was rgba(195, 124, 195, 0.2).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 62.5%, 0.2)") should be rgba(195, 123, 159, 0.2). Was rgba(195, 124, 159, 0.2).
-FAIL colorTest.parseColor("hsla(0, 50%, 62.5%, 0.2)") should be rgba(207, 111, 111, 0.2). Was rgba(207, 112, 112, 0.2).
-FAIL colorTest.parseColor("hsla(30, 50%, 62.5%, 0.2)") should be rgba(207, 159, 111, 0.2). Was rgba(207, 159, 112, 0.2).
-FAIL colorTest.parseColor("hsla(60, 50%, 62.5%, 0.2)") should be rgba(207, 207, 111, 0.2). Was rgba(207, 207, 112, 0.2).
-FAIL colorTest.parseColor("hsla(90, 50%, 62.5%, 0.2)") should be rgba(159, 207, 111, 0.2). Was rgba(159, 207, 112, 0.2).
-FAIL colorTest.parseColor("hsla(120, 50%, 62.5%, 0.2)") should be rgba(111, 207, 111, 0.2). Was rgba(112, 207, 112, 0.2).
-FAIL colorTest.parseColor("hsla(150, 50%, 62.5%, 0.2)") should be rgba(111, 207, 159, 0.2). Was rgba(112, 207, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 50%, 62.5%, 0.2)") should be rgba(111, 207, 207, 0.2). Was rgba(112, 207, 207, 0.2).
-FAIL colorTest.parseColor("hsla(210, 50%, 62.5%, 0.2)") should be rgba(111, 159, 207, 0.2). Was rgba(112, 159, 207, 0.2).
-FAIL colorTest.parseColor("hsla(240, 50%, 62.5%, 0.2)") should be rgba(111, 111, 207, 0.2). Was rgba(112, 112, 207, 0.2).
-FAIL colorTest.parseColor("hsla(270, 50%, 62.5%, 0.2)") should be rgba(159, 111, 207, 0.2). Was rgba(159, 112, 207, 0.2).
-FAIL colorTest.parseColor("hsla(300, 50%, 62.5%, 0.2)") should be rgba(207, 111, 207, 0.2). Was rgba(207, 112, 207, 0.2).
-FAIL colorTest.parseColor("hsla(330, 50%, 62.5%, 0.2)") should be rgba(207, 111, 159, 0.2). Was rgba(207, 112, 159, 0.2).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 62.5%, 0.2)") should be rgba(219, 99, 99, 0.2). Was rgba(219, 100, 100, 0.2).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 62.5%, 0.2)") should be rgba(219, 159, 99, 0.2). Was rgba(219, 159, 100, 0.2).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 62.5%, 0.2)") should be rgba(219, 219, 99, 0.2). Was rgba(219, 219, 100, 0.2).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 62.5%, 0.2)") should be rgba(159, 219, 99, 0.2). Was rgba(159, 219, 100, 0.2).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 62.5%, 0.2)") should be rgba(99, 219, 99, 0.2). Was rgba(100, 219, 100, 0.2).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 62.5%, 0.2)") should be rgba(99, 219, 159, 0.2). Was rgba(100, 219, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 62.5%, 0.2)") should be rgba(99, 219, 219, 0.2). Was rgba(100, 219, 219, 0.2).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 62.5%, 0.2)") should be rgba(99, 159, 219, 0.2). Was rgba(100, 159, 219, 0.2).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 62.5%, 0.2)") should be rgba(99, 99, 219, 0.2). Was rgba(100, 100, 219, 0.2).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 62.5%, 0.2)") should be rgba(159, 99, 219, 0.2). Was rgba(159, 100, 219, 0.2).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 62.5%, 0.2)") should be rgba(219, 99, 219, 0.2). Was rgba(219, 100, 219, 0.2).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 62.5%, 0.2)") should be rgba(219, 99, 159, 0.2). Was rgba(219, 100, 159, 0.2).
-FAIL colorTest.parseColor("hsla(0, 75%, 62.5%, 0.2)") should be rgba(231, 87, 87, 0.2). Was rgba(231, 88, 88, 0.2).
-FAIL colorTest.parseColor("hsla(30, 75%, 62.5%, 0.2)") should be rgba(231, 159, 87, 0.2). Was rgba(231, 159, 88, 0.2).
-FAIL colorTest.parseColor("hsla(60, 75%, 62.5%, 0.2)") should be rgba(231, 231, 87, 0.2). Was rgba(231, 231, 88, 0.2).
-FAIL colorTest.parseColor("hsla(90, 75%, 62.5%, 0.2)") should be rgba(159, 231, 87, 0.2). Was rgba(159, 231, 88, 0.2).
-FAIL colorTest.parseColor("hsla(120, 75%, 62.5%, 0.2)") should be rgba(87, 231, 87, 0.2). Was rgba(88, 231, 88, 0.2).
-FAIL colorTest.parseColor("hsla(150, 75%, 62.5%, 0.2)") should be rgba(87, 231, 159, 0.2). Was rgba(88, 231, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 75%, 62.5%, 0.2)") should be rgba(87, 231, 231, 0.2). Was rgba(88, 231, 231, 0.2).
-FAIL colorTest.parseColor("hsla(210, 75%, 62.5%, 0.2)") should be rgba(87, 159, 231, 0.2). Was rgba(88, 159, 231, 0.2).
-FAIL colorTest.parseColor("hsla(240, 75%, 62.5%, 0.2)") should be rgba(87, 87, 231, 0.2). Was rgba(88, 88, 231, 0.2).
-FAIL colorTest.parseColor("hsla(270, 75%, 62.5%, 0.2)") should be rgba(159, 87, 231, 0.2). Was rgba(159, 88, 231, 0.2).
-FAIL colorTest.parseColor("hsla(300, 75%, 62.5%, 0.2)") should be rgba(231, 87, 231, 0.2). Was rgba(231, 88, 231, 0.2).
-FAIL colorTest.parseColor("hsla(330, 75%, 62.5%, 0.2)") should be rgba(231, 87, 159, 0.2). Was rgba(231, 88, 159, 0.2).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 62.5%, 0.2)") should be rgba(243, 75, 75, 0.2). Was rgba(243, 76, 76, 0.2).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 62.5%, 0.2)") should be rgba(243, 159, 75, 0.2). Was rgba(243, 159, 76, 0.2).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 62.5%, 0.2)") should be rgba(243, 243, 75, 0.2). Was rgba(243, 243, 76, 0.2).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 62.5%, 0.2)") should be rgba(159, 243, 75, 0.2). Was rgba(159, 243, 76, 0.2).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 62.5%, 0.2)") should be rgba(75, 243, 75, 0.2). Was rgba(76, 243, 76, 0.2).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 62.5%, 0.2)") should be rgba(75, 243, 159, 0.2). Was rgba(76, 243, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 62.5%, 0.2)") should be rgba(75, 243, 243, 0.2). Was rgba(76, 243, 243, 0.2).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 62.5%, 0.2)") should be rgba(75, 159, 243, 0.2). Was rgba(76, 159, 243, 0.2).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 62.5%, 0.2)") should be rgba(75, 75, 243, 0.2). Was rgba(76, 76, 243, 0.2).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 62.5%, 0.2)") should be rgba(159, 75, 243, 0.2). Was rgba(159, 76, 243, 0.2).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 62.5%, 0.2)") should be rgba(243, 75, 243, 0.2). Was rgba(243, 76, 243, 0.2).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 62.5%, 0.2)") should be rgba(243, 75, 159, 0.2). Was rgba(243, 76, 159, 0.2).
-FAIL colorTest.parseColor("hsla(0, 100%, 62.5%, 0.2)") should be rgba(255, 63, 63, 0.2). Was rgba(255, 64, 64, 0.2).
-FAIL colorTest.parseColor("hsla(30, 100%, 62.5%, 0.2)") should be rgba(255, 159, 63, 0.2). Was rgba(255, 159, 64, 0.2).
-FAIL colorTest.parseColor("hsla(60, 100%, 62.5%, 0.2)") should be rgba(255, 255, 63, 0.2). Was rgba(255, 255, 64, 0.2).
-FAIL colorTest.parseColor("hsla(90, 100%, 62.5%, 0.2)") should be rgba(159, 255, 63, 0.2). Was rgba(159, 255, 64, 0.2).
-FAIL colorTest.parseColor("hsla(120, 100%, 62.5%, 0.2)") should be rgba(63, 255, 63, 0.2). Was rgba(64, 255, 64, 0.2).
-FAIL colorTest.parseColor("hsla(150, 100%, 62.5%, 0.2)") should be rgba(63, 255, 159, 0.2). Was rgba(64, 255, 159, 0.2).
-FAIL colorTest.parseColor("hsla(180, 100%, 62.5%, 0.2)") should be rgba(63, 255, 255, 0.2). Was rgba(64, 255, 255, 0.2).
-FAIL colorTest.parseColor("hsla(210, 100%, 62.5%, 0.2)") should be rgba(63, 159, 255, 0.2). Was rgba(64, 159, 255, 0.2).
-FAIL colorTest.parseColor("hsla(240, 100%, 62.5%, 0.2)") should be rgba(63, 63, 255, 0.2). Was rgba(64, 64, 255, 0.2).
-FAIL colorTest.parseColor("hsla(270, 100%, 62.5%, 0.2)") should be rgba(159, 63, 255, 0.2). Was rgba(159, 64, 255, 0.2).
-FAIL colorTest.parseColor("hsla(300, 100%, 62.5%, 0.2)") should be rgba(255, 63, 255, 0.2). Was rgba(255, 64, 255, 0.2).
-FAIL colorTest.parseColor("hsla(330, 100%, 62.5%, 0.2)") should be rgba(255, 63, 159, 0.2). Was rgba(255, 64, 159, 0.2).
-PASS colorTest.parseColor("hsla(0, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(30, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(60, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(90, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(120, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(150, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(210, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(240, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(270, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(300, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(330, 0%, 75%, 0.2)") is "rgba(191, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 75%, 0.2)") is "rgba(199, 183, 183, 0.2)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 75%, 0.2)") is "rgba(199, 191, 183, 0.2)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 75%, 0.2)") is "rgba(199, 199, 183, 0.2)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 75%, 0.2)") is "rgba(191, 199, 183, 0.2)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 75%, 0.2)") is "rgba(183, 199, 183, 0.2)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 75%, 0.2)") is "rgba(183, 199, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 75%, 0.2)") is "rgba(183, 199, 199, 0.2)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 75%, 0.2)") is "rgba(183, 191, 199, 0.2)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 75%, 0.2)") is "rgba(183, 183, 199, 0.2)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 75%, 0.2)") is "rgba(191, 183, 199, 0.2)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 75%, 0.2)") is "rgba(199, 183, 199, 0.2)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 75%, 0.2)") is "rgba(199, 183, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 25%, 75%, 0.2)") is "rgba(207, 175, 175, 0.2)"
-PASS colorTest.parseColor("hsla(30, 25%, 75%, 0.2)") is "rgba(207, 191, 175, 0.2)"
-PASS colorTest.parseColor("hsla(60, 25%, 75%, 0.2)") is "rgba(207, 207, 175, 0.2)"
-PASS colorTest.parseColor("hsla(90, 25%, 75%, 0.2)") is "rgba(191, 207, 175, 0.2)"
-PASS colorTest.parseColor("hsla(120, 25%, 75%, 0.2)") is "rgba(175, 207, 175, 0.2)"
-PASS colorTest.parseColor("hsla(150, 25%, 75%, 0.2)") is "rgba(175, 207, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 25%, 75%, 0.2)") is "rgba(175, 207, 207, 0.2)"
-PASS colorTest.parseColor("hsla(210, 25%, 75%, 0.2)") is "rgba(175, 191, 207, 0.2)"
-PASS colorTest.parseColor("hsla(240, 25%, 75%, 0.2)") is "rgba(175, 175, 207, 0.2)"
-PASS colorTest.parseColor("hsla(270, 25%, 75%, 0.2)") is "rgba(191, 175, 207, 0.2)"
-PASS colorTest.parseColor("hsla(300, 25%, 75%, 0.2)") is "rgba(207, 175, 207, 0.2)"
-PASS colorTest.parseColor("hsla(330, 25%, 75%, 0.2)") is "rgba(207, 175, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 75%, 0.2)") is "rgba(215, 167, 167, 0.2)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 75%, 0.2)") is "rgba(215, 191, 167, 0.2)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 75%, 0.2)") is "rgba(215, 215, 167, 0.2)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 75%, 0.2)") is "rgba(191, 215, 167, 0.2)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 75%, 0.2)") is "rgba(167, 215, 167, 0.2)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 75%, 0.2)") is "rgba(167, 215, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 75%, 0.2)") is "rgba(167, 215, 215, 0.2)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 75%, 0.2)") is "rgba(167, 191, 215, 0.2)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 75%, 0.2)") is "rgba(167, 167, 215, 0.2)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 75%, 0.2)") is "rgba(191, 167, 215, 0.2)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 75%, 0.2)") is "rgba(215, 167, 215, 0.2)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 75%, 0.2)") is "rgba(215, 167, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 50%, 75%, 0.2)") is "rgba(223, 159, 159, 0.2)"
-PASS colorTest.parseColor("hsla(30, 50%, 75%, 0.2)") is "rgba(223, 191, 159, 0.2)"
-PASS colorTest.parseColor("hsla(60, 50%, 75%, 0.2)") is "rgba(223, 223, 159, 0.2)"
-PASS colorTest.parseColor("hsla(90, 50%, 75%, 0.2)") is "rgba(191, 223, 159, 0.2)"
-PASS colorTest.parseColor("hsla(120, 50%, 75%, 0.2)") is "rgba(159, 223, 159, 0.2)"
-PASS colorTest.parseColor("hsla(150, 50%, 75%, 0.2)") is "rgba(159, 223, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 50%, 75%, 0.2)") is "rgba(159, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(210, 50%, 75%, 0.2)") is "rgba(159, 191, 223, 0.2)"
-PASS colorTest.parseColor("hsla(240, 50%, 75%, 0.2)") is "rgba(159, 159, 223, 0.2)"
-PASS colorTest.parseColor("hsla(270, 50%, 75%, 0.2)") is "rgba(191, 159, 223, 0.2)"
-PASS colorTest.parseColor("hsla(300, 50%, 75%, 0.2)") is "rgba(223, 159, 223, 0.2)"
-PASS colorTest.parseColor("hsla(330, 50%, 75%, 0.2)") is "rgba(223, 159, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 75%, 0.2)") is "rgba(231, 151, 151, 0.2)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 75%, 0.2)") is "rgba(231, 191, 151, 0.2)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 75%, 0.2)") is "rgba(231, 231, 151, 0.2)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 75%, 0.2)") is "rgba(191, 231, 151, 0.2)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 75%, 0.2)") is "rgba(151, 231, 151, 0.2)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 75%, 0.2)") is "rgba(151, 231, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 75%, 0.2)") is "rgba(151, 231, 231, 0.2)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 75%, 0.2)") is "rgba(151, 191, 231, 0.2)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 75%, 0.2)") is "rgba(151, 151, 231, 0.2)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 75%, 0.2)") is "rgba(191, 151, 231, 0.2)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 75%, 0.2)") is "rgba(231, 151, 231, 0.2)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 75%, 0.2)") is "rgba(231, 151, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 75%, 75%, 0.2)") is "rgba(239, 143, 143, 0.2)"
-PASS colorTest.parseColor("hsla(30, 75%, 75%, 0.2)") is "rgba(239, 191, 143, 0.2)"
-PASS colorTest.parseColor("hsla(60, 75%, 75%, 0.2)") is "rgba(239, 239, 143, 0.2)"
-PASS colorTest.parseColor("hsla(90, 75%, 75%, 0.2)") is "rgba(191, 239, 143, 0.2)"
-PASS colorTest.parseColor("hsla(120, 75%, 75%, 0.2)") is "rgba(143, 239, 143, 0.2)"
-PASS colorTest.parseColor("hsla(150, 75%, 75%, 0.2)") is "rgba(143, 239, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 75%, 75%, 0.2)") is "rgba(143, 239, 239, 0.2)"
-PASS colorTest.parseColor("hsla(210, 75%, 75%, 0.2)") is "rgba(143, 191, 239, 0.2)"
-PASS colorTest.parseColor("hsla(240, 75%, 75%, 0.2)") is "rgba(143, 143, 239, 0.2)"
-PASS colorTest.parseColor("hsla(270, 75%, 75%, 0.2)") is "rgba(191, 143, 239, 0.2)"
-PASS colorTest.parseColor("hsla(300, 75%, 75%, 0.2)") is "rgba(239, 143, 239, 0.2)"
-PASS colorTest.parseColor("hsla(330, 75%, 75%, 0.2)") is "rgba(239, 143, 191, 0.2)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 75%, 0.2)") is "rgba(247, 135, 135, 0.2)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 75%, 0.2)") is "rgba(247, 191, 135, 0.2)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 75%, 0.2)") is "rgba(247, 247, 135, 0.2)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 75%, 0.2)") is "rgba(191, 247, 135, 0.2)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 75%, 0.2)") is "rgba(135, 247, 135, 0.2)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 75%, 0.2)") is "rgba(135, 247, 191, 0.2)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 75%, 0.2)") is "rgba(135, 247, 247, 0.2)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 75%, 0.2)") is "rgba(135, 191, 247, 0.2)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 75%, 0.2)") is "rgba(135, 135, 247, 0.2)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 75%, 0.2)") is "rgba(191, 135, 247, 0.2)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 75%, 0.2)") is "rgba(247, 135, 247, 0.2)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 75%, 0.2)") is "rgba(247, 135, 191, 0.2)"
-FAIL colorTest.parseColor("hsla(0, 100%, 75%, 0.2)") should be rgba(255, 127, 127, 0.2). Was rgba(255, 128, 128, 0.2).
-FAIL colorTest.parseColor("hsla(30, 100%, 75%, 0.2)") should be rgba(255, 191, 127, 0.2). Was rgba(255, 191, 128, 0.2).
-FAIL colorTest.parseColor("hsla(60, 100%, 75%, 0.2)") should be rgba(255, 255, 127, 0.2). Was rgba(255, 255, 128, 0.2).
-FAIL colorTest.parseColor("hsla(90, 100%, 75%, 0.2)") should be rgba(191, 255, 127, 0.2). Was rgba(191, 255, 128, 0.2).
-FAIL colorTest.parseColor("hsla(120, 100%, 75%, 0.2)") should be rgba(127, 255, 127, 0.2). Was rgba(128, 255, 128, 0.2).
-FAIL colorTest.parseColor("hsla(150, 100%, 75%, 0.2)") should be rgba(127, 255, 191, 0.2). Was rgba(128, 255, 191, 0.2).
-FAIL colorTest.parseColor("hsla(180, 100%, 75%, 0.2)") should be rgba(127, 255, 255, 0.2). Was rgba(128, 255, 255, 0.2).
-FAIL colorTest.parseColor("hsla(210, 100%, 75%, 0.2)") should be rgba(127, 191, 255, 0.2). Was rgba(128, 191, 255, 0.2).
-FAIL colorTest.parseColor("hsla(240, 100%, 75%, 0.2)") should be rgba(127, 127, 255, 0.2). Was rgba(128, 128, 255, 0.2).
-FAIL colorTest.parseColor("hsla(270, 100%, 75%, 0.2)") should be rgba(191, 127, 255, 0.2). Was rgba(191, 128, 255, 0.2).
-FAIL colorTest.parseColor("hsla(300, 100%, 75%, 0.2)") should be rgba(255, 127, 255, 0.2). Was rgba(255, 128, 255, 0.2).
-FAIL colorTest.parseColor("hsla(330, 100%, 75%, 0.2)") should be rgba(255, 127, 191, 0.2). Was rgba(255, 128, 191, 0.2).
-PASS colorTest.parseColor("hsla(0, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(30, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(60, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(90, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(120, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(150, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(210, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(240, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(270, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(300, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(330, 0%, 87.5%, 0.2)") is "rgba(223, 223, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 87.5%, 0.2)") is "rgba(227, 219, 219, 0.2)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 87.5%, 0.2)") is "rgba(227, 223, 219, 0.2)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 87.5%, 0.2)") is "rgba(227, 227, 219, 0.2)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 87.5%, 0.2)") is "rgba(223, 227, 219, 0.2)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 87.5%, 0.2)") is "rgba(219, 227, 219, 0.2)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 87.5%, 0.2)") is "rgba(219, 227, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 87.5%, 0.2)") is "rgba(219, 227, 227, 0.2)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 87.5%, 0.2)") is "rgba(219, 223, 227, 0.2)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 87.5%, 0.2)") is "rgba(219, 219, 227, 0.2)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 87.5%, 0.2)") is "rgba(223, 219, 227, 0.2)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 87.5%, 0.2)") is "rgba(227, 219, 227, 0.2)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 87.5%, 0.2)") is "rgba(227, 219, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 25%, 87.5%, 0.2)") is "rgba(231, 215, 215, 0.2)"
-PASS colorTest.parseColor("hsla(30, 25%, 87.5%, 0.2)") is "rgba(231, 223, 215, 0.2)"
-PASS colorTest.parseColor("hsla(60, 25%, 87.5%, 0.2)") is "rgba(231, 231, 215, 0.2)"
-PASS colorTest.parseColor("hsla(90, 25%, 87.5%, 0.2)") is "rgba(223, 231, 215, 0.2)"
-PASS colorTest.parseColor("hsla(120, 25%, 87.5%, 0.2)") is "rgba(215, 231, 215, 0.2)"
-PASS colorTest.parseColor("hsla(150, 25%, 87.5%, 0.2)") is "rgba(215, 231, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 25%, 87.5%, 0.2)") is "rgba(215, 231, 231, 0.2)"
-PASS colorTest.parseColor("hsla(210, 25%, 87.5%, 0.2)") is "rgba(215, 223, 231, 0.2)"
-PASS colorTest.parseColor("hsla(240, 25%, 87.5%, 0.2)") is "rgba(215, 215, 231, 0.2)"
-PASS colorTest.parseColor("hsla(270, 25%, 87.5%, 0.2)") is "rgba(223, 215, 231, 0.2)"
-PASS colorTest.parseColor("hsla(300, 25%, 87.5%, 0.2)") is "rgba(231, 215, 231, 0.2)"
-PASS colorTest.parseColor("hsla(330, 25%, 87.5%, 0.2)") is "rgba(231, 215, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 87.5%, 0.2)") is "rgba(235, 211, 211, 0.2)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 87.5%, 0.2)") is "rgba(235, 223, 211, 0.2)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 87.5%, 0.2)") is "rgba(235, 235, 211, 0.2)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 87.5%, 0.2)") is "rgba(223, 235, 211, 0.2)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 87.5%, 0.2)") is "rgba(211, 235, 211, 0.2)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 87.5%, 0.2)") is "rgba(211, 235, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 87.5%, 0.2)") is "rgba(211, 235, 235, 0.2)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 87.5%, 0.2)") is "rgba(211, 223, 235, 0.2)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 87.5%, 0.2)") is "rgba(211, 211, 235, 0.2)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 87.5%, 0.2)") is "rgba(223, 211, 235, 0.2)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 87.5%, 0.2)") is "rgba(235, 211, 235, 0.2)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 87.5%, 0.2)") is "rgba(235, 211, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 50%, 87.5%, 0.2)") is "rgba(239, 207, 207, 0.2)"
-PASS colorTest.parseColor("hsla(30, 50%, 87.5%, 0.2)") is "rgba(239, 223, 207, 0.2)"
-PASS colorTest.parseColor("hsla(60, 50%, 87.5%, 0.2)") is "rgba(239, 239, 207, 0.2)"
-PASS colorTest.parseColor("hsla(90, 50%, 87.5%, 0.2)") is "rgba(223, 239, 207, 0.2)"
-PASS colorTest.parseColor("hsla(120, 50%, 87.5%, 0.2)") is "rgba(207, 239, 207, 0.2)"
-PASS colorTest.parseColor("hsla(150, 50%, 87.5%, 0.2)") is "rgba(207, 239, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 50%, 87.5%, 0.2)") is "rgba(207, 239, 239, 0.2)"
-PASS colorTest.parseColor("hsla(210, 50%, 87.5%, 0.2)") is "rgba(207, 223, 239, 0.2)"
-PASS colorTest.parseColor("hsla(240, 50%, 87.5%, 0.2)") is "rgba(207, 207, 239, 0.2)"
-PASS colorTest.parseColor("hsla(270, 50%, 87.5%, 0.2)") is "rgba(223, 207, 239, 0.2)"
-PASS colorTest.parseColor("hsla(300, 50%, 87.5%, 0.2)") is "rgba(239, 207, 239, 0.2)"
-PASS colorTest.parseColor("hsla(330, 50%, 87.5%, 0.2)") is "rgba(239, 207, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 87.5%, 0.2)") is "rgba(243, 203, 203, 0.2)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 87.5%, 0.2)") is "rgba(243, 223, 203, 0.2)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 87.5%, 0.2)") is "rgba(243, 243, 203, 0.2)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 87.5%, 0.2)") is "rgba(223, 243, 203, 0.2)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 87.5%, 0.2)") is "rgba(203, 243, 203, 0.2)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 87.5%, 0.2)") is "rgba(203, 243, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 87.5%, 0.2)") is "rgba(203, 243, 243, 0.2)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 87.5%, 0.2)") is "rgba(203, 223, 243, 0.2)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 87.5%, 0.2)") is "rgba(203, 203, 243, 0.2)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 87.5%, 0.2)") is "rgba(223, 203, 243, 0.2)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 87.5%, 0.2)") is "rgba(243, 203, 243, 0.2)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 87.5%, 0.2)") is "rgba(243, 203, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 75%, 87.5%, 0.2)") is "rgba(247, 199, 199, 0.2)"
-PASS colorTest.parseColor("hsla(30, 75%, 87.5%, 0.2)") is "rgba(247, 223, 199, 0.2)"
-PASS colorTest.parseColor("hsla(60, 75%, 87.5%, 0.2)") is "rgba(247, 247, 199, 0.2)"
-PASS colorTest.parseColor("hsla(90, 75%, 87.5%, 0.2)") is "rgba(223, 247, 199, 0.2)"
-PASS colorTest.parseColor("hsla(120, 75%, 87.5%, 0.2)") is "rgba(199, 247, 199, 0.2)"
-PASS colorTest.parseColor("hsla(150, 75%, 87.5%, 0.2)") is "rgba(199, 247, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 75%, 87.5%, 0.2)") is "rgba(199, 247, 247, 0.2)"
-PASS colorTest.parseColor("hsla(210, 75%, 87.5%, 0.2)") is "rgba(199, 223, 247, 0.2)"
-PASS colorTest.parseColor("hsla(240, 75%, 87.5%, 0.2)") is "rgba(199, 199, 247, 0.2)"
-PASS colorTest.parseColor("hsla(270, 75%, 87.5%, 0.2)") is "rgba(223, 199, 247, 0.2)"
-PASS colorTest.parseColor("hsla(300, 75%, 87.5%, 0.2)") is "rgba(247, 199, 247, 0.2)"
-PASS colorTest.parseColor("hsla(330, 75%, 87.5%, 0.2)") is "rgba(247, 199, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 87.5%, 0.2)") is "rgba(251, 195, 195, 0.2)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 87.5%, 0.2)") is "rgba(251, 223, 195, 0.2)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 87.5%, 0.2)") is "rgba(251, 251, 195, 0.2)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 87.5%, 0.2)") is "rgba(223, 251, 195, 0.2)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 87.5%, 0.2)") is "rgba(195, 251, 195, 0.2)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 87.5%, 0.2)") is "rgba(195, 251, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 87.5%, 0.2)") is "rgba(195, 251, 251, 0.2)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 87.5%, 0.2)") is "rgba(195, 223, 251, 0.2)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 87.5%, 0.2)") is "rgba(195, 195, 251, 0.2)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 87.5%, 0.2)") is "rgba(223, 195, 251, 0.2)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 87.5%, 0.2)") is "rgba(251, 195, 251, 0.2)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 87.5%, 0.2)") is "rgba(251, 195, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 100%, 87.5%, 0.2)") is "rgba(255, 191, 191, 0.2)"
-PASS colorTest.parseColor("hsla(30, 100%, 87.5%, 0.2)") is "rgba(255, 223, 191, 0.2)"
-PASS colorTest.parseColor("hsla(60, 100%, 87.5%, 0.2)") is "rgba(255, 255, 191, 0.2)"
-PASS colorTest.parseColor("hsla(90, 100%, 87.5%, 0.2)") is "rgba(223, 255, 191, 0.2)"
-PASS colorTest.parseColor("hsla(120, 100%, 87.5%, 0.2)") is "rgba(191, 255, 191, 0.2)"
-PASS colorTest.parseColor("hsla(150, 100%, 87.5%, 0.2)") is "rgba(191, 255, 223, 0.2)"
-PASS colorTest.parseColor("hsla(180, 100%, 87.5%, 0.2)") is "rgba(191, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 100%, 87.5%, 0.2)") is "rgba(191, 223, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 100%, 87.5%, 0.2)") is "rgba(191, 191, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 100%, 87.5%, 0.2)") is "rgba(223, 191, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 100%, 87.5%, 0.2)") is "rgba(255, 191, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 100%, 87.5%, 0.2)") is "rgba(255, 191, 223, 0.2)"
-PASS colorTest.parseColor("hsla(0, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 0%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 25%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 50%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 75%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(30, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(60, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(90, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(120, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(150, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(180, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(210, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(240, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(270, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(300, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(330, 100%, 100%, 0.2)") is "rgba(255, 255, 255, 0.2)"
-PASS colorTest.parseColor("hsla(0, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 50%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 75%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(0, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(30, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(60, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(90, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(120, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(150, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(180, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(210, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(240, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(270, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(300, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("hsla(330, 100%, 0%, 0)") is "rgba(0, 0, 0, 0)"
-FAIL colorTest.parseColor("hsla(0, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(30, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(60, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(90, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(120, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(150, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(210, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(240, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(270, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(300, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(330, 0%, 12.5%, 0)") should be rgba(31, 31, 31, 0). Was rgba(32, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 12.5%, 0)") should be rgba(35, 27, 27, 0). Was rgba(36, 28, 28, 0).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 12.5%, 0)") should be rgba(35, 31, 27, 0). Was rgba(36, 32, 28, 0).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 12.5%, 0)") should be rgba(35, 35, 27, 0). Was rgba(36, 36, 28, 0).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 12.5%, 0)") should be rgba(31, 35, 27, 0). Was rgba(32, 36, 28, 0).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 12.5%, 0)") should be rgba(27, 35, 27, 0). Was rgba(28, 36, 28, 0).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 12.5%, 0)") should be rgba(27, 35, 31, 0). Was rgba(28, 36, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 12.5%, 0)") should be rgba(27, 35, 35, 0). Was rgba(28, 36, 36, 0).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 12.5%, 0)") should be rgba(27, 31, 35, 0). Was rgba(28, 32, 36, 0).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 12.5%, 0)") should be rgba(27, 27, 35, 0). Was rgba(28, 28, 36, 0).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 12.5%, 0)") should be rgba(31, 27, 35, 0). Was rgba(32, 28, 36, 0).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 12.5%, 0)") should be rgba(35, 27, 35, 0). Was rgba(36, 28, 36, 0).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 12.5%, 0)") should be rgba(35, 27, 31, 0). Was rgba(36, 28, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 25%, 12.5%, 0)") should be rgba(39, 23, 23, 0). Was rgba(40, 24, 24, 0).
-FAIL colorTest.parseColor("hsla(30, 25%, 12.5%, 0)") should be rgba(39, 31, 23, 0). Was rgba(40, 32, 24, 0).
-FAIL colorTest.parseColor("hsla(60, 25%, 12.5%, 0)") should be rgba(39, 39, 23, 0). Was rgba(40, 40, 24, 0).
-FAIL colorTest.parseColor("hsla(90, 25%, 12.5%, 0)") should be rgba(31, 39, 23, 0). Was rgba(32, 40, 24, 0).
-FAIL colorTest.parseColor("hsla(120, 25%, 12.5%, 0)") should be rgba(23, 39, 23, 0). Was rgba(24, 40, 24, 0).
-FAIL colorTest.parseColor("hsla(150, 25%, 12.5%, 0)") should be rgba(23, 39, 31, 0). Was rgba(24, 40, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 25%, 12.5%, 0)") should be rgba(23, 39, 39, 0). Was rgba(24, 40, 40, 0).
-FAIL colorTest.parseColor("hsla(210, 25%, 12.5%, 0)") should be rgba(23, 31, 39, 0). Was rgba(24, 32, 40, 0).
-FAIL colorTest.parseColor("hsla(240, 25%, 12.5%, 0)") should be rgba(23, 23, 39, 0). Was rgba(24, 24, 40, 0).
-FAIL colorTest.parseColor("hsla(270, 25%, 12.5%, 0)") should be rgba(31, 23, 39, 0). Was rgba(32, 24, 40, 0).
-FAIL colorTest.parseColor("hsla(300, 25%, 12.5%, 0)") should be rgba(39, 23, 39, 0). Was rgba(40, 24, 40, 0).
-FAIL colorTest.parseColor("hsla(330, 25%, 12.5%, 0)") should be rgba(39, 23, 31, 0). Was rgba(40, 24, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 12.5%, 0)") should be rgba(43, 19, 19, 0). Was rgba(44, 20, 20, 0).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 12.5%, 0)") should be rgba(43, 31, 19, 0). Was rgba(44, 32, 20, 0).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 12.5%, 0)") should be rgba(43, 43, 19, 0). Was rgba(44, 44, 20, 0).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 12.5%, 0)") should be rgba(31, 43, 19, 0). Was rgba(32, 44, 20, 0).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 12.5%, 0)") should be rgba(19, 43, 19, 0). Was rgba(20, 44, 20, 0).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 12.5%, 0)") should be rgba(19, 43, 31, 0). Was rgba(20, 44, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 12.5%, 0)") should be rgba(19, 43, 43, 0). Was rgba(20, 44, 44, 0).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 12.5%, 0)") should be rgba(19, 31, 43, 0). Was rgba(20, 32, 44, 0).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 12.5%, 0)") should be rgba(19, 19, 43, 0). Was rgba(20, 20, 44, 0).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 12.5%, 0)") should be rgba(31, 19, 43, 0). Was rgba(32, 20, 44, 0).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 12.5%, 0)") should be rgba(43, 19, 43, 0). Was rgba(44, 20, 44, 0).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 12.5%, 0)") should be rgba(43, 19, 31, 0). Was rgba(44, 20, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 50%, 12.5%, 0)") should be rgba(47, 15, 15, 0). Was rgba(48, 16, 16, 0).
-FAIL colorTest.parseColor("hsla(30, 50%, 12.5%, 0)") should be rgba(47, 31, 15, 0). Was rgba(48, 32, 16, 0).
-FAIL colorTest.parseColor("hsla(60, 50%, 12.5%, 0)") should be rgba(47, 47, 15, 0). Was rgba(48, 48, 16, 0).
-FAIL colorTest.parseColor("hsla(90, 50%, 12.5%, 0)") should be rgba(31, 47, 15, 0). Was rgba(32, 48, 16, 0).
-FAIL colorTest.parseColor("hsla(120, 50%, 12.5%, 0)") should be rgba(15, 47, 15, 0). Was rgba(16, 48, 16, 0).
-FAIL colorTest.parseColor("hsla(150, 50%, 12.5%, 0)") should be rgba(15, 47, 31, 0). Was rgba(16, 48, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 50%, 12.5%, 0)") should be rgba(15, 47, 47, 0). Was rgba(16, 48, 48, 0).
-FAIL colorTest.parseColor("hsla(210, 50%, 12.5%, 0)") should be rgba(15, 31, 47, 0). Was rgba(16, 32, 48, 0).
-FAIL colorTest.parseColor("hsla(240, 50%, 12.5%, 0)") should be rgba(15, 15, 47, 0). Was rgba(16, 16, 48, 0).
-FAIL colorTest.parseColor("hsla(270, 50%, 12.5%, 0)") should be rgba(31, 15, 47, 0). Was rgba(32, 16, 48, 0).
-FAIL colorTest.parseColor("hsla(300, 50%, 12.5%, 0)") should be rgba(47, 15, 47, 0). Was rgba(48, 16, 48, 0).
-FAIL colorTest.parseColor("hsla(330, 50%, 12.5%, 0)") should be rgba(47, 15, 31, 0). Was rgba(48, 16, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 12.5%, 0)") should be rgba(51, 11, 11, 0). Was rgba(52, 12, 12, 0).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 12.5%, 0)") should be rgba(51, 31, 11, 0). Was rgba(52, 32, 12, 0).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 12.5%, 0)") should be rgba(51, 51, 11, 0). Was rgba(52, 52, 12, 0).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 12.5%, 0)") should be rgba(31, 51, 11, 0). Was rgba(32, 52, 12, 0).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 12.5%, 0)") should be rgba(11, 51, 11, 0). Was rgba(12, 52, 12, 0).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 12.5%, 0)") should be rgba(11, 51, 31, 0). Was rgba(12, 52, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 12.5%, 0)") should be rgba(11, 51, 51, 0). Was rgba(12, 52, 52, 0).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 12.5%, 0)") should be rgba(11, 31, 51, 0). Was rgba(12, 32, 52, 0).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 12.5%, 0)") should be rgba(11, 11, 51, 0). Was rgba(12, 12, 52, 0).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 12.5%, 0)") should be rgba(31, 11, 51, 0). Was rgba(32, 12, 52, 0).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 12.5%, 0)") should be rgba(51, 11, 51, 0). Was rgba(52, 12, 52, 0).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 12.5%, 0)") should be rgba(51, 11, 31, 0). Was rgba(52, 12, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 75%, 12.5%, 0)") should be rgba(55, 7, 7, 0). Was rgba(56, 8, 8, 0).
-FAIL colorTest.parseColor("hsla(30, 75%, 12.5%, 0)") should be rgba(55, 31, 7, 0). Was rgba(56, 32, 8, 0).
-FAIL colorTest.parseColor("hsla(60, 75%, 12.5%, 0)") should be rgba(55, 55, 7, 0). Was rgba(56, 56, 8, 0).
-FAIL colorTest.parseColor("hsla(90, 75%, 12.5%, 0)") should be rgba(31, 55, 7, 0). Was rgba(32, 56, 8, 0).
-FAIL colorTest.parseColor("hsla(120, 75%, 12.5%, 0)") should be rgba(7, 55, 7, 0). Was rgba(8, 56, 8, 0).
-FAIL colorTest.parseColor("hsla(150, 75%, 12.5%, 0)") should be rgba(7, 55, 31, 0). Was rgba(8, 56, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 75%, 12.5%, 0)") should be rgba(7, 55, 55, 0). Was rgba(8, 56, 56, 0).
-FAIL colorTest.parseColor("hsla(210, 75%, 12.5%, 0)") should be rgba(7, 31, 55, 0). Was rgba(8, 32, 56, 0).
-FAIL colorTest.parseColor("hsla(240, 75%, 12.5%, 0)") should be rgba(7, 7, 55, 0). Was rgba(8, 8, 56, 0).
-FAIL colorTest.parseColor("hsla(270, 75%, 12.5%, 0)") should be rgba(31, 7, 55, 0). Was rgba(32, 8, 56, 0).
-FAIL colorTest.parseColor("hsla(300, 75%, 12.5%, 0)") should be rgba(55, 7, 55, 0). Was rgba(56, 8, 56, 0).
-FAIL colorTest.parseColor("hsla(330, 75%, 12.5%, 0)") should be rgba(55, 7, 31, 0). Was rgba(56, 8, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 12.5%, 0)") should be rgba(59, 3, 3, 0). Was rgba(60, 4, 4, 0).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 12.5%, 0)") should be rgba(59, 31, 3, 0). Was rgba(60, 32, 4, 0).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 12.5%, 0)") should be rgba(59, 59, 3, 0). Was rgba(60, 60, 4, 0).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 12.5%, 0)") should be rgba(31, 59, 3, 0). Was rgba(32, 60, 4, 0).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 12.5%, 0)") should be rgba(3, 59, 3, 0). Was rgba(4, 60, 4, 0).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 12.5%, 0)") should be rgba(3, 59, 31, 0). Was rgba(4, 60, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 12.5%, 0)") should be rgba(3, 59, 59, 0). Was rgba(4, 60, 60, 0).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 12.5%, 0)") should be rgba(3, 31, 59, 0). Was rgba(4, 32, 60, 0).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 12.5%, 0)") should be rgba(3, 3, 59, 0). Was rgba(4, 4, 60, 0).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 12.5%, 0)") should be rgba(31, 3, 59, 0). Was rgba(32, 4, 60, 0).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 12.5%, 0)") should be rgba(59, 3, 59, 0). Was rgba(60, 4, 60, 0).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 12.5%, 0)") should be rgba(59, 3, 31, 0). Was rgba(60, 4, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 100%, 12.5%, 0)") should be rgba(63, 0, 0, 0). Was rgba(64, 0, 0, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 12.5%, 0)") should be rgba(63, 31, 0, 0). Was rgba(64, 32, 0, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 12.5%, 0)") should be rgba(63, 63, 0, 0). Was rgba(64, 64, 0, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 12.5%, 0)") should be rgba(31, 63, 0, 0). Was rgba(32, 64, 0, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 12.5%, 0)") should be rgba(0, 63, 0, 0). Was rgba(0, 64, 0, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 12.5%, 0)") should be rgba(0, 63, 31, 0). Was rgba(0, 64, 32, 0).
-FAIL colorTest.parseColor("hsla(180, 100%, 12.5%, 0)") should be rgba(0, 63, 63, 0). Was rgba(0, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(210, 100%, 12.5%, 0)") should be rgba(0, 31, 63, 0). Was rgba(0, 32, 64, 0).
-FAIL colorTest.parseColor("hsla(240, 100%, 12.5%, 0)") should be rgba(0, 0, 63, 0). Was rgba(0, 0, 64, 0).
-FAIL colorTest.parseColor("hsla(270, 100%, 12.5%, 0)") should be rgba(31, 0, 63, 0). Was rgba(32, 0, 64, 0).
-FAIL colorTest.parseColor("hsla(300, 100%, 12.5%, 0)") should be rgba(63, 0, 63, 0). Was rgba(64, 0, 64, 0).
-FAIL colorTest.parseColor("hsla(330, 100%, 12.5%, 0)") should be rgba(63, 0, 31, 0). Was rgba(64, 0, 32, 0).
-FAIL colorTest.parseColor("hsla(0, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(30, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(60, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(90, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(120, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(150, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(210, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(240, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(270, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(300, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(330, 0%, 25%, 0)") should be rgba(63, 63, 63, 0). Was rgba(64, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 25%, 0)") should be rgba(71, 55, 55, 0). Was rgba(72, 56, 56, 0).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 25%, 0)") should be rgba(71, 63, 55, 0). Was rgba(72, 64, 56, 0).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 25%, 0)") should be rgba(71, 71, 55, 0). Was rgba(72, 72, 56, 0).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 25%, 0)") should be rgba(63, 71, 55, 0). Was rgba(64, 72, 56, 0).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 25%, 0)") should be rgba(55, 71, 55, 0). Was rgba(56, 72, 56, 0).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 25%, 0)") should be rgba(55, 71, 63, 0). Was rgba(56, 72, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 25%, 0)") should be rgba(55, 71, 71, 0). Was rgba(56, 72, 72, 0).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 25%, 0)") should be rgba(55, 63, 71, 0). Was rgba(56, 64, 72, 0).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 25%, 0)") should be rgba(55, 55, 71, 0). Was rgba(56, 56, 72, 0).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 25%, 0)") should be rgba(63, 55, 71, 0). Was rgba(64, 56, 72, 0).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 25%, 0)") should be rgba(71, 55, 71, 0). Was rgba(72, 56, 72, 0).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 25%, 0)") should be rgba(71, 55, 63, 0). Was rgba(72, 56, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 25%, 25%, 0)") should be rgba(79, 47, 47, 0). Was rgba(80, 48, 48, 0).
-FAIL colorTest.parseColor("hsla(30, 25%, 25%, 0)") should be rgba(79, 63, 47, 0). Was rgba(80, 64, 48, 0).
-FAIL colorTest.parseColor("hsla(60, 25%, 25%, 0)") should be rgba(79, 79, 47, 0). Was rgba(80, 80, 48, 0).
-FAIL colorTest.parseColor("hsla(90, 25%, 25%, 0)") should be rgba(63, 79, 47, 0). Was rgba(64, 80, 48, 0).
-FAIL colorTest.parseColor("hsla(120, 25%, 25%, 0)") should be rgba(47, 79, 47, 0). Was rgba(48, 80, 48, 0).
-FAIL colorTest.parseColor("hsla(150, 25%, 25%, 0)") should be rgba(47, 79, 63, 0). Was rgba(48, 80, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 25%, 25%, 0)") should be rgba(47, 79, 79, 0). Was rgba(48, 80, 80, 0).
-FAIL colorTest.parseColor("hsla(210, 25%, 25%, 0)") should be rgba(47, 63, 79, 0). Was rgba(48, 64, 80, 0).
-FAIL colorTest.parseColor("hsla(240, 25%, 25%, 0)") should be rgba(47, 47, 79, 0). Was rgba(48, 48, 80, 0).
-FAIL colorTest.parseColor("hsla(270, 25%, 25%, 0)") should be rgba(63, 47, 79, 0). Was rgba(64, 48, 80, 0).
-FAIL colorTest.parseColor("hsla(300, 25%, 25%, 0)") should be rgba(79, 47, 79, 0). Was rgba(80, 48, 80, 0).
-FAIL colorTest.parseColor("hsla(330, 25%, 25%, 0)") should be rgba(79, 47, 63, 0). Was rgba(80, 48, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 25%, 0)") should be rgba(87, 39, 39, 0). Was rgba(88, 40, 40, 0).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 25%, 0)") should be rgba(87, 63, 39, 0). Was rgba(88, 64, 40, 0).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 25%, 0)") should be rgba(87, 87, 39, 0). Was rgba(88, 88, 40, 0).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 25%, 0)") should be rgba(63, 87, 39, 0). Was rgba(64, 88, 40, 0).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 25%, 0)") should be rgba(39, 87, 39, 0). Was rgba(40, 88, 40, 0).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 25%, 0)") should be rgba(39, 87, 63, 0). Was rgba(40, 88, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 25%, 0)") should be rgba(39, 87, 87, 0). Was rgba(40, 88, 88, 0).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 25%, 0)") should be rgba(39, 63, 87, 0). Was rgba(40, 64, 88, 0).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 25%, 0)") should be rgba(39, 39, 87, 0). Was rgba(40, 40, 88, 0).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 25%, 0)") should be rgba(63, 39, 87, 0). Was rgba(64, 40, 88, 0).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 25%, 0)") should be rgba(87, 39, 87, 0). Was rgba(88, 40, 88, 0).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 25%, 0)") should be rgba(87, 39, 63, 0). Was rgba(88, 40, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 50%, 25%, 0)") should be rgba(95, 31, 31, 0). Was rgba(96, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(30, 50%, 25%, 0)") should be rgba(95, 63, 31, 0). Was rgba(96, 64, 32, 0).
-FAIL colorTest.parseColor("hsla(60, 50%, 25%, 0)") should be rgba(95, 95, 31, 0). Was rgba(96, 96, 32, 0).
-FAIL colorTest.parseColor("hsla(90, 50%, 25%, 0)") should be rgba(63, 95, 31, 0). Was rgba(64, 96, 32, 0).
-FAIL colorTest.parseColor("hsla(120, 50%, 25%, 0)") should be rgba(31, 95, 31, 0). Was rgba(32, 96, 32, 0).
-FAIL colorTest.parseColor("hsla(150, 50%, 25%, 0)") should be rgba(31, 95, 63, 0). Was rgba(32, 96, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 50%, 25%, 0)") should be rgba(31, 95, 95, 0). Was rgba(32, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(210, 50%, 25%, 0)") should be rgba(31, 63, 95, 0). Was rgba(32, 64, 96, 0).
-FAIL colorTest.parseColor("hsla(240, 50%, 25%, 0)") should be rgba(31, 31, 95, 0). Was rgba(32, 32, 96, 0).
-FAIL colorTest.parseColor("hsla(270, 50%, 25%, 0)") should be rgba(63, 31, 95, 0). Was rgba(64, 32, 96, 0).
-FAIL colorTest.parseColor("hsla(300, 50%, 25%, 0)") should be rgba(95, 31, 95, 0). Was rgba(96, 32, 96, 0).
-FAIL colorTest.parseColor("hsla(330, 50%, 25%, 0)") should be rgba(95, 31, 63, 0). Was rgba(96, 32, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 25%, 0)") should be rgba(103, 23, 23, 0). Was rgba(104, 24, 24, 0).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 25%, 0)") should be rgba(103, 63, 23, 0). Was rgba(104, 64, 24, 0).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 25%, 0)") should be rgba(103, 103, 23, 0). Was rgba(104, 104, 24, 0).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 25%, 0)") should be rgba(63, 103, 23, 0). Was rgba(64, 104, 24, 0).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 25%, 0)") should be rgba(23, 103, 23, 0). Was rgba(24, 104, 24, 0).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 25%, 0)") should be rgba(23, 103, 63, 0). Was rgba(24, 104, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 25%, 0)") should be rgba(23, 103, 103, 0). Was rgba(24, 104, 104, 0).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 25%, 0)") should be rgba(23, 63, 103, 0). Was rgba(24, 64, 104, 0).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 25%, 0)") should be rgba(23, 23, 103, 0). Was rgba(24, 24, 104, 0).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 25%, 0)") should be rgba(63, 23, 103, 0). Was rgba(64, 24, 104, 0).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 25%, 0)") should be rgba(103, 23, 103, 0). Was rgba(104, 24, 104, 0).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 25%, 0)") should be rgba(103, 23, 63, 0). Was rgba(104, 24, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 75%, 25%, 0)") should be rgba(111, 15, 15, 0). Was rgba(112, 16, 16, 0).
-FAIL colorTest.parseColor("hsla(30, 75%, 25%, 0)") should be rgba(111, 63, 15, 0). Was rgba(112, 64, 16, 0).
-FAIL colorTest.parseColor("hsla(60, 75%, 25%, 0)") should be rgba(111, 111, 15, 0). Was rgba(112, 112, 16, 0).
-FAIL colorTest.parseColor("hsla(90, 75%, 25%, 0)") should be rgba(63, 111, 15, 0). Was rgba(64, 112, 16, 0).
-FAIL colorTest.parseColor("hsla(120, 75%, 25%, 0)") should be rgba(15, 111, 15, 0). Was rgba(16, 112, 16, 0).
-FAIL colorTest.parseColor("hsla(150, 75%, 25%, 0)") should be rgba(15, 111, 63, 0). Was rgba(16, 112, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 75%, 25%, 0)") should be rgba(15, 111, 111, 0). Was rgba(16, 112, 112, 0).
-FAIL colorTest.parseColor("hsla(210, 75%, 25%, 0)") should be rgba(15, 63, 111, 0). Was rgba(16, 64, 112, 0).
-FAIL colorTest.parseColor("hsla(240, 75%, 25%, 0)") should be rgba(15, 15, 111, 0). Was rgba(16, 16, 112, 0).
-FAIL colorTest.parseColor("hsla(270, 75%, 25%, 0)") should be rgba(63, 15, 111, 0). Was rgba(64, 16, 112, 0).
-FAIL colorTest.parseColor("hsla(300, 75%, 25%, 0)") should be rgba(111, 15, 111, 0). Was rgba(112, 16, 112, 0).
-FAIL colorTest.parseColor("hsla(330, 75%, 25%, 0)") should be rgba(111, 15, 63, 0). Was rgba(112, 16, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 25%, 0)") should be rgba(119, 7, 7, 0). Was rgba(120, 8, 8, 0).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 25%, 0)") should be rgba(119, 63, 7, 0). Was rgba(120, 64, 8, 0).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 25%, 0)") should be rgba(119, 119, 7, 0). Was rgba(120, 120, 8, 0).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 25%, 0)") should be rgba(63, 119, 7, 0). Was rgba(64, 120, 8, 0).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 25%, 0)") should be rgba(7, 119, 7, 0). Was rgba(8, 120, 8, 0).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 25%, 0)") should be rgba(7, 119, 63, 0). Was rgba(8, 120, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 25%, 0)") should be rgba(7, 119, 119, 0). Was rgba(8, 120, 120, 0).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 25%, 0)") should be rgba(7, 63, 119, 0). Was rgba(8, 64, 120, 0).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 25%, 0)") should be rgba(7, 7, 119, 0). Was rgba(8, 8, 120, 0).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 25%, 0)") should be rgba(63, 7, 119, 0). Was rgba(64, 8, 120, 0).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 25%, 0)") should be rgba(119, 7, 119, 0). Was rgba(120, 8, 120, 0).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 25%, 0)") should be rgba(119, 7, 63, 0). Was rgba(120, 8, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 100%, 25%, 0)") should be rgba(127, 0, 0, 0). Was rgba(128, 0, 0, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 25%, 0)") should be rgba(127, 63, 0, 0). Was rgba(128, 64, 0, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 25%, 0)") should be rgba(127, 127, 0, 0). Was rgba(128, 128, 0, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 25%, 0)") should be rgba(63, 127, 0, 0). Was rgba(64, 128, 0, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 25%, 0)") should be rgba(0, 127, 0, 0). Was rgba(0, 128, 0, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 25%, 0)") should be rgba(0, 127, 63, 0). Was rgba(0, 128, 64, 0).
-FAIL colorTest.parseColor("hsla(180, 100%, 25%, 0)") should be rgba(0, 127, 127, 0). Was rgba(0, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(210, 100%, 25%, 0)") should be rgba(0, 63, 127, 0). Was rgba(0, 64, 128, 0).
-FAIL colorTest.parseColor("hsla(240, 100%, 25%, 0)") should be rgba(0, 0, 127, 0). Was rgba(0, 0, 128, 0).
-FAIL colorTest.parseColor("hsla(270, 100%, 25%, 0)") should be rgba(63, 0, 127, 0). Was rgba(64, 0, 128, 0).
-FAIL colorTest.parseColor("hsla(300, 100%, 25%, 0)") should be rgba(127, 0, 127, 0). Was rgba(128, 0, 128, 0).
-FAIL colorTest.parseColor("hsla(330, 100%, 25%, 0)") should be rgba(127, 0, 63, 0). Was rgba(128, 0, 64, 0).
-FAIL colorTest.parseColor("hsla(0, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(30, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(60, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(90, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(120, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(150, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(210, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(240, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(270, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(300, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(330, 0%, 37.5%, 0)") should be rgba(95, 95, 95, 0). Was rgba(96, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 37.5%, 0)") should be rgba(107, 83, 83, 0). Was rgba(108, 84, 84, 0).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 37.5%, 0)") should be rgba(107, 95, 83, 0). Was rgba(108, 96, 84, 0).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 37.5%, 0)") should be rgba(107, 107, 83, 0). Was rgba(108, 108, 84, 0).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 37.5%, 0)") should be rgba(95, 107, 83, 0). Was rgba(96, 108, 84, 0).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 37.5%, 0)") should be rgba(83, 107, 83, 0). Was rgba(84, 108, 84, 0).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 37.5%, 0)") should be rgba(83, 107, 95, 0). Was rgba(84, 108, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 37.5%, 0)") should be rgba(83, 107, 107, 0). Was rgba(84, 108, 108, 0).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 37.5%, 0)") should be rgba(83, 95, 107, 0). Was rgba(84, 96, 108, 0).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 37.5%, 0)") should be rgba(83, 83, 107, 0). Was rgba(84, 84, 108, 0).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 37.5%, 0)") should be rgba(95, 83, 107, 0). Was rgba(96, 84, 108, 0).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 37.5%, 0)") should be rgba(107, 83, 107, 0). Was rgba(108, 84, 108, 0).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 37.5%, 0)") should be rgba(107, 83, 95, 0). Was rgba(108, 84, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 25%, 37.5%, 0)") should be rgba(119, 71, 71, 0). Was rgba(120, 72, 72, 0).
-FAIL colorTest.parseColor("hsla(30, 25%, 37.5%, 0)") should be rgba(119, 95, 71, 0). Was rgba(120, 96, 72, 0).
-FAIL colorTest.parseColor("hsla(60, 25%, 37.5%, 0)") should be rgba(119, 119, 71, 0). Was rgba(120, 120, 72, 0).
-FAIL colorTest.parseColor("hsla(90, 25%, 37.5%, 0)") should be rgba(95, 119, 71, 0). Was rgba(96, 120, 72, 0).
-FAIL colorTest.parseColor("hsla(120, 25%, 37.5%, 0)") should be rgba(71, 119, 71, 0). Was rgba(72, 120, 72, 0).
-FAIL colorTest.parseColor("hsla(150, 25%, 37.5%, 0)") should be rgba(71, 119, 95, 0). Was rgba(72, 120, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 25%, 37.5%, 0)") should be rgba(71, 119, 119, 0). Was rgba(72, 120, 120, 0).
-FAIL colorTest.parseColor("hsla(210, 25%, 37.5%, 0)") should be rgba(71, 95, 119, 0). Was rgba(72, 96, 120, 0).
-FAIL colorTest.parseColor("hsla(240, 25%, 37.5%, 0)") should be rgba(71, 71, 119, 0). Was rgba(72, 72, 120, 0).
-FAIL colorTest.parseColor("hsla(270, 25%, 37.5%, 0)") should be rgba(95, 71, 119, 0). Was rgba(96, 72, 120, 0).
-FAIL colorTest.parseColor("hsla(300, 25%, 37.5%, 0)") should be rgba(119, 71, 119, 0). Was rgba(120, 72, 120, 0).
-FAIL colorTest.parseColor("hsla(330, 25%, 37.5%, 0)") should be rgba(119, 71, 95, 0). Was rgba(120, 72, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 37.5%, 0)") should be rgba(131, 59, 59, 0). Was rgba(131, 60, 60, 0).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 37.5%, 0)") should be rgba(131, 95, 59, 0). Was rgba(131, 96, 60, 0).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 37.5%, 0)") should be rgba(131, 131, 59, 0). Was rgba(131, 131, 60, 0).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 37.5%, 0)") should be rgba(95, 131, 59, 0). Was rgba(96, 131, 60, 0).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 37.5%, 0)") should be rgba(59, 131, 59, 0). Was rgba(60, 131, 60, 0).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 37.5%, 0)") should be rgba(59, 131, 95, 0). Was rgba(60, 131, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 37.5%, 0)") should be rgba(59, 131, 131, 0). Was rgba(60, 131, 131, 0).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 37.5%, 0)") should be rgba(59, 95, 131, 0). Was rgba(60, 96, 131, 0).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 37.5%, 0)") should be rgba(59, 59, 131, 0). Was rgba(60, 60, 131, 0).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 37.5%, 0)") should be rgba(95, 59, 131, 0). Was rgba(96, 60, 131, 0).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 37.5%, 0)") should be rgba(131, 59, 131, 0). Was rgba(131, 60, 131, 0).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 37.5%, 0)") should be rgba(131, 59, 95, 0). Was rgba(131, 60, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 50%, 37.5%, 0)") should be rgba(143, 47, 47, 0). Was rgba(143, 48, 48, 0).
-FAIL colorTest.parseColor("hsla(30, 50%, 37.5%, 0)") should be rgba(143, 95, 47, 0). Was rgba(143, 96, 48, 0).
-FAIL colorTest.parseColor("hsla(60, 50%, 37.5%, 0)") should be rgba(143, 143, 47, 0). Was rgba(143, 143, 48, 0).
-FAIL colorTest.parseColor("hsla(90, 50%, 37.5%, 0)") should be rgba(95, 143, 47, 0). Was rgba(96, 143, 48, 0).
-FAIL colorTest.parseColor("hsla(120, 50%, 37.5%, 0)") should be rgba(47, 143, 47, 0). Was rgba(48, 143, 48, 0).
-FAIL colorTest.parseColor("hsla(150, 50%, 37.5%, 0)") should be rgba(47, 143, 95, 0). Was rgba(48, 143, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 50%, 37.5%, 0)") should be rgba(47, 143, 143, 0). Was rgba(48, 143, 143, 0).
-FAIL colorTest.parseColor("hsla(210, 50%, 37.5%, 0)") should be rgba(47, 95, 143, 0). Was rgba(48, 96, 143, 0).
-FAIL colorTest.parseColor("hsla(240, 50%, 37.5%, 0)") should be rgba(47, 47, 143, 0). Was rgba(48, 48, 143, 0).
-FAIL colorTest.parseColor("hsla(270, 50%, 37.5%, 0)") should be rgba(95, 47, 143, 0). Was rgba(96, 48, 143, 0).
-FAIL colorTest.parseColor("hsla(300, 50%, 37.5%, 0)") should be rgba(143, 47, 143, 0). Was rgba(143, 48, 143, 0).
-FAIL colorTest.parseColor("hsla(330, 50%, 37.5%, 0)") should be rgba(143, 47, 95, 0). Was rgba(143, 48, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 37.5%, 0)") should be rgba(155, 35, 35, 0). Was rgba(155, 36, 36, 0).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 37.5%, 0)") should be rgba(155, 95, 35, 0). Was rgba(155, 96, 36, 0).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 37.5%, 0)") should be rgba(155, 155, 35, 0). Was rgba(155, 155, 36, 0).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 37.5%, 0)") should be rgba(95, 155, 35, 0). Was rgba(96, 155, 36, 0).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 37.5%, 0)") should be rgba(35, 155, 35, 0). Was rgba(36, 155, 36, 0).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 37.5%, 0)") should be rgba(35, 155, 95, 0). Was rgba(36, 155, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 37.5%, 0)") should be rgba(35, 155, 155, 0). Was rgba(36, 155, 155, 0).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 37.5%, 0)") should be rgba(35, 95, 155, 0). Was rgba(36, 96, 155, 0).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 37.5%, 0)") should be rgba(35, 35, 155, 0). Was rgba(36, 36, 155, 0).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 37.5%, 0)") should be rgba(95, 35, 155, 0). Was rgba(96, 36, 155, 0).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 37.5%, 0)") should be rgba(155, 35, 155, 0). Was rgba(155, 36, 155, 0).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 37.5%, 0)") should be rgba(155, 35, 95, 0). Was rgba(155, 36, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 75%, 37.5%, 0)") should be rgba(167, 23, 23, 0). Was rgba(167, 24, 24, 0).
-FAIL colorTest.parseColor("hsla(30, 75%, 37.5%, 0)") should be rgba(167, 95, 23, 0). Was rgba(167, 96, 24, 0).
-FAIL colorTest.parseColor("hsla(60, 75%, 37.5%, 0)") should be rgba(167, 167, 23, 0). Was rgba(167, 167, 24, 0).
-FAIL colorTest.parseColor("hsla(90, 75%, 37.5%, 0)") should be rgba(95, 167, 23, 0). Was rgba(96, 167, 24, 0).
-FAIL colorTest.parseColor("hsla(120, 75%, 37.5%, 0)") should be rgba(23, 167, 23, 0). Was rgba(24, 167, 24, 0).
-FAIL colorTest.parseColor("hsla(150, 75%, 37.5%, 0)") should be rgba(23, 167, 95, 0). Was rgba(24, 167, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 75%, 37.5%, 0)") should be rgba(23, 167, 167, 0). Was rgba(24, 167, 167, 0).
-FAIL colorTest.parseColor("hsla(210, 75%, 37.5%, 0)") should be rgba(23, 95, 167, 0). Was rgba(24, 96, 167, 0).
-FAIL colorTest.parseColor("hsla(240, 75%, 37.5%, 0)") should be rgba(23, 23, 167, 0). Was rgba(24, 24, 167, 0).
-FAIL colorTest.parseColor("hsla(270, 75%, 37.5%, 0)") should be rgba(95, 23, 167, 0). Was rgba(96, 24, 167, 0).
-FAIL colorTest.parseColor("hsla(300, 75%, 37.5%, 0)") should be rgba(167, 23, 167, 0). Was rgba(167, 24, 167, 0).
-FAIL colorTest.parseColor("hsla(330, 75%, 37.5%, 0)") should be rgba(167, 23, 95, 0). Was rgba(167, 24, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 37.5%, 0)") should be rgba(179, 11, 11, 0). Was rgba(179, 12, 12, 0).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 37.5%, 0)") should be rgba(179, 95, 11, 0). Was rgba(179, 96, 12, 0).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 37.5%, 0)") should be rgba(179, 179, 11, 0). Was rgba(179, 179, 12, 0).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 37.5%, 0)") should be rgba(95, 179, 11, 0). Was rgba(96, 179, 12, 0).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 37.5%, 0)") should be rgba(11, 179, 11, 0). Was rgba(12, 179, 12, 0).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 37.5%, 0)") should be rgba(11, 179, 95, 0). Was rgba(12, 179, 96, 0).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 37.5%, 0)") should be rgba(11, 179, 179, 0). Was rgba(12, 179, 179, 0).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 37.5%, 0)") should be rgba(11, 95, 179, 0). Was rgba(12, 96, 179, 0).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 37.5%, 0)") should be rgba(11, 11, 179, 0). Was rgba(12, 12, 179, 0).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 37.5%, 0)") should be rgba(95, 11, 179, 0). Was rgba(96, 12, 179, 0).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 37.5%, 0)") should be rgba(179, 11, 179, 0). Was rgba(179, 12, 179, 0).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 37.5%, 0)") should be rgba(179, 11, 95, 0). Was rgba(179, 12, 96, 0).
-PASS colorTest.parseColor("hsla(0, 100%, 37.5%, 0)") is "rgba(191, 0, 0, 0)"
-FAIL colorTest.parseColor("hsla(30, 100%, 37.5%, 0)") should be rgba(191, 95, 0, 0). Was rgba(191, 96, 0, 0).
-PASS colorTest.parseColor("hsla(60, 100%, 37.5%, 0)") is "rgba(191, 191, 0, 0)"
-FAIL colorTest.parseColor("hsla(90, 100%, 37.5%, 0)") should be rgba(95, 191, 0, 0). Was rgba(96, 191, 0, 0).
-PASS colorTest.parseColor("hsla(120, 100%, 37.5%, 0)") is "rgba(0, 191, 0, 0)"
-FAIL colorTest.parseColor("hsla(150, 100%, 37.5%, 0)") should be rgba(0, 191, 95, 0). Was rgba(0, 191, 96, 0).
-PASS colorTest.parseColor("hsla(180, 100%, 37.5%, 0)") is "rgba(0, 191, 191, 0)"
-FAIL colorTest.parseColor("hsla(210, 100%, 37.5%, 0)") should be rgba(0, 95, 191, 0). Was rgba(0, 96, 191, 0).
-PASS colorTest.parseColor("hsla(240, 100%, 37.5%, 0)") is "rgba(0, 0, 191, 0)"
-FAIL colorTest.parseColor("hsla(270, 100%, 37.5%, 0)") should be rgba(95, 0, 191, 0). Was rgba(96, 0, 191, 0).
-PASS colorTest.parseColor("hsla(300, 100%, 37.5%, 0)") is "rgba(191, 0, 191, 0)"
-FAIL colorTest.parseColor("hsla(330, 100%, 37.5%, 0)") should be rgba(191, 0, 95, 0). Was rgba(191, 0, 96, 0).
-FAIL colorTest.parseColor("hsla(0, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(30, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(60, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(90, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(120, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(150, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(210, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(240, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(270, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(300, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(330, 0%, 50%, 0)") should be rgba(127, 127, 127, 0). Was rgba(128, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 12.5%, 50%, 0)") should be rgba(143, 111, 111, 0). Was rgba(143, 112, 112, 0).
-FAIL colorTest.parseColor("hsla(30, 12.5%, 50%, 0)") should be rgba(143, 127, 111, 0). Was rgba(143, 128, 112, 0).
-FAIL colorTest.parseColor("hsla(60, 12.5%, 50%, 0)") should be rgba(143, 143, 111, 0). Was rgba(143, 143, 112, 0).
-FAIL colorTest.parseColor("hsla(90, 12.5%, 50%, 0)") should be rgba(127, 143, 111, 0). Was rgba(128, 143, 112, 0).
-FAIL colorTest.parseColor("hsla(120, 12.5%, 50%, 0)") should be rgba(111, 143, 111, 0). Was rgba(112, 143, 112, 0).
-FAIL colorTest.parseColor("hsla(150, 12.5%, 50%, 0)") should be rgba(111, 143, 127, 0). Was rgba(112, 143, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 12.5%, 50%, 0)") should be rgba(111, 143, 143, 0). Was rgba(112, 143, 143, 0).
-FAIL colorTest.parseColor("hsla(210, 12.5%, 50%, 0)") should be rgba(111, 127, 143, 0). Was rgba(112, 128, 143, 0).
-FAIL colorTest.parseColor("hsla(240, 12.5%, 50%, 0)") should be rgba(111, 111, 143, 0). Was rgba(112, 112, 143, 0).
-FAIL colorTest.parseColor("hsla(270, 12.5%, 50%, 0)") should be rgba(127, 111, 143, 0). Was rgba(128, 112, 143, 0).
-FAIL colorTest.parseColor("hsla(300, 12.5%, 50%, 0)") should be rgba(143, 111, 143, 0). Was rgba(143, 112, 143, 0).
-FAIL colorTest.parseColor("hsla(330, 12.5%, 50%, 0)") should be rgba(143, 111, 127, 0). Was rgba(143, 112, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 25%, 50%, 0)") should be rgba(159, 95, 95, 0). Was rgba(159, 96, 96, 0).
-FAIL colorTest.parseColor("hsla(30, 25%, 50%, 0)") should be rgba(159, 127, 95, 0). Was rgba(159, 128, 96, 0).
-FAIL colorTest.parseColor("hsla(60, 25%, 50%, 0)") should be rgba(159, 159, 95, 0). Was rgba(159, 159, 96, 0).
-FAIL colorTest.parseColor("hsla(90, 25%, 50%, 0)") should be rgba(127, 159, 95, 0). Was rgba(128, 159, 96, 0).
-FAIL colorTest.parseColor("hsla(120, 25%, 50%, 0)") should be rgba(95, 159, 95, 0). Was rgba(96, 159, 96, 0).
-FAIL colorTest.parseColor("hsla(150, 25%, 50%, 0)") should be rgba(95, 159, 127, 0). Was rgba(96, 159, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 25%, 50%, 0)") should be rgba(95, 159, 159, 0). Was rgba(96, 159, 159, 0).
-FAIL colorTest.parseColor("hsla(210, 25%, 50%, 0)") should be rgba(95, 127, 159, 0). Was rgba(96, 128, 159, 0).
-FAIL colorTest.parseColor("hsla(240, 25%, 50%, 0)") should be rgba(95, 95, 159, 0). Was rgba(96, 96, 159, 0).
-FAIL colorTest.parseColor("hsla(270, 25%, 50%, 0)") should be rgba(127, 95, 159, 0). Was rgba(128, 96, 159, 0).
-FAIL colorTest.parseColor("hsla(300, 25%, 50%, 0)") should be rgba(159, 95, 159, 0). Was rgba(159, 96, 159, 0).
-FAIL colorTest.parseColor("hsla(330, 25%, 50%, 0)") should be rgba(159, 95, 127, 0). Was rgba(159, 96, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 37.5%, 50%, 0)") should be rgba(175, 79, 79, 0). Was rgba(175, 80, 80, 0).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 50%, 0)") should be rgba(175, 127, 79, 0). Was rgba(175, 128, 80, 0).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 50%, 0)") should be rgba(175, 175, 79, 0). Was rgba(175, 175, 80, 0).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 50%, 0)") should be rgba(127, 175, 79, 0). Was rgba(128, 175, 80, 0).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 50%, 0)") should be rgba(79, 175, 79, 0). Was rgba(80, 175, 80, 0).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 50%, 0)") should be rgba(79, 175, 127, 0). Was rgba(80, 175, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 50%, 0)") should be rgba(79, 175, 175, 0). Was rgba(80, 175, 175, 0).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 50%, 0)") should be rgba(79, 127, 175, 0). Was rgba(80, 128, 175, 0).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 50%, 0)") should be rgba(79, 79, 175, 0). Was rgba(80, 80, 175, 0).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 50%, 0)") should be rgba(127, 79, 175, 0). Was rgba(128, 80, 175, 0).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 50%, 0)") should be rgba(175, 79, 175, 0). Was rgba(175, 80, 175, 0).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 50%, 0)") should be rgba(175, 79, 127, 0). Was rgba(175, 80, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 50%, 50%, 0)") should be rgba(191, 63, 63, 0). Was rgba(191, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(30, 50%, 50%, 0)") should be rgba(191, 127, 63, 0). Was rgba(191, 128, 64, 0).
-FAIL colorTest.parseColor("hsla(60, 50%, 50%, 0)") should be rgba(191, 191, 63, 0). Was rgba(191, 191, 64, 0).
-FAIL colorTest.parseColor("hsla(90, 50%, 50%, 0)") should be rgba(127, 191, 63, 0). Was rgba(128, 191, 64, 0).
-FAIL colorTest.parseColor("hsla(120, 50%, 50%, 0)") should be rgba(63, 191, 63, 0). Was rgba(64, 191, 64, 0).
-FAIL colorTest.parseColor("hsla(150, 50%, 50%, 0)") should be rgba(63, 191, 127, 0). Was rgba(64, 191, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 50%, 50%, 0)") should be rgba(63, 191, 191, 0). Was rgba(64, 191, 191, 0).
-FAIL colorTest.parseColor("hsla(210, 50%, 50%, 0)") should be rgba(63, 127, 191, 0). Was rgba(64, 128, 191, 0).
-FAIL colorTest.parseColor("hsla(240, 50%, 50%, 0)") should be rgba(63, 63, 191, 0). Was rgba(64, 64, 191, 0).
-FAIL colorTest.parseColor("hsla(270, 50%, 50%, 0)") should be rgba(127, 63, 191, 0). Was rgba(128, 64, 191, 0).
-FAIL colorTest.parseColor("hsla(300, 50%, 50%, 0)") should be rgba(191, 63, 191, 0). Was rgba(191, 64, 191, 0).
-FAIL colorTest.parseColor("hsla(330, 50%, 50%, 0)") should be rgba(191, 63, 127, 0). Was rgba(191, 64, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 50%, 0)") should be rgba(207, 47, 47, 0). Was rgba(207, 48, 48, 0).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 50%, 0)") should be rgba(207, 127, 47, 0). Was rgba(207, 128, 48, 0).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 50%, 0)") should be rgba(207, 207, 47, 0). Was rgba(207, 207, 48, 0).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 50%, 0)") should be rgba(127, 207, 47, 0). Was rgba(128, 207, 48, 0).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 50%, 0)") should be rgba(47, 207, 47, 0). Was rgba(48, 207, 48, 0).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 50%, 0)") should be rgba(47, 207, 127, 0). Was rgba(48, 207, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 50%, 0)") should be rgba(47, 207, 207, 0). Was rgba(48, 207, 207, 0).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 50%, 0)") should be rgba(47, 127, 207, 0). Was rgba(48, 128, 207, 0).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 50%, 0)") should be rgba(47, 47, 207, 0). Was rgba(48, 48, 207, 0).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 50%, 0)") should be rgba(127, 47, 207, 0). Was rgba(128, 48, 207, 0).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 50%, 0)") should be rgba(207, 47, 207, 0). Was rgba(207, 48, 207, 0).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 50%, 0)") should be rgba(207, 47, 127, 0). Was rgba(207, 48, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 75%, 50%, 0)") should be rgba(223, 31, 31, 0). Was rgba(223, 32, 32, 0).
-FAIL colorTest.parseColor("hsla(30, 75%, 50%, 0)") should be rgba(223, 127, 31, 0). Was rgba(223, 128, 32, 0).
-FAIL colorTest.parseColor("hsla(60, 75%, 50%, 0)") should be rgba(223, 223, 31, 0). Was rgba(223, 223, 32, 0).
-FAIL colorTest.parseColor("hsla(90, 75%, 50%, 0)") should be rgba(127, 223, 31, 0). Was rgba(128, 223, 32, 0).
-FAIL colorTest.parseColor("hsla(120, 75%, 50%, 0)") should be rgba(31, 223, 31, 0). Was rgba(32, 223, 32, 0).
-FAIL colorTest.parseColor("hsla(150, 75%, 50%, 0)") should be rgba(31, 223, 127, 0). Was rgba(32, 223, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 75%, 50%, 0)") should be rgba(31, 223, 223, 0). Was rgba(32, 223, 223, 0).
-FAIL colorTest.parseColor("hsla(210, 75%, 50%, 0)") should be rgba(31, 127, 223, 0). Was rgba(32, 128, 223, 0).
-FAIL colorTest.parseColor("hsla(240, 75%, 50%, 0)") should be rgba(31, 31, 223, 0). Was rgba(32, 32, 223, 0).
-FAIL colorTest.parseColor("hsla(270, 75%, 50%, 0)") should be rgba(127, 31, 223, 0). Was rgba(128, 32, 223, 0).
-FAIL colorTest.parseColor("hsla(300, 75%, 50%, 0)") should be rgba(223, 31, 223, 0). Was rgba(223, 32, 223, 0).
-FAIL colorTest.parseColor("hsla(330, 75%, 50%, 0)") should be rgba(223, 31, 127, 0). Was rgba(223, 32, 128, 0).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 50%, 0)") should be rgba(239, 15, 15, 0). Was rgba(239, 16, 16, 0).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 50%, 0)") should be rgba(239, 127, 15, 0). Was rgba(239, 128, 16, 0).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 50%, 0)") should be rgba(239, 239, 15, 0). Was rgba(239, 239, 16, 0).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 50%, 0)") should be rgba(127, 239, 15, 0). Was rgba(128, 239, 16, 0).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 50%, 0)") should be rgba(15, 239, 15, 0). Was rgba(16, 239, 16, 0).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 50%, 0)") should be rgba(15, 239, 127, 0). Was rgba(16, 239, 128, 0).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 50%, 0)") should be rgba(15, 239, 239, 0). Was rgba(16, 239, 239, 0).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 50%, 0)") should be rgba(15, 127, 239, 0). Was rgba(16, 128, 239, 0).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 50%, 0)") should be rgba(15, 15, 239, 0). Was rgba(16, 16, 239, 0).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 50%, 0)") should be rgba(127, 15, 239, 0). Was rgba(128, 16, 239, 0).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 50%, 0)") should be rgba(239, 15, 239, 0). Was rgba(239, 16, 239, 0).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 50%, 0)") should be rgba(239, 15, 127, 0). Was rgba(239, 16, 128, 0).
-PASS colorTest.parseColor("hsla(0, 100%, 50%, 0)") is "rgba(255, 0, 0, 0)"
-FAIL colorTest.parseColor("hsla(30, 100%, 50%, 0)") should be rgba(255, 127, 0, 0). Was rgba(255, 128, 0, 0).
-PASS colorTest.parseColor("hsla(60, 100%, 50%, 0)") is "rgba(255, 255, 0, 0)"
-FAIL colorTest.parseColor("hsla(90, 100%, 50%, 0)") should be rgba(127, 255, 0, 0). Was rgba(128, 255, 0, 0).
-PASS colorTest.parseColor("hsla(120, 100%, 50%, 0)") is "rgba(0, 255, 0, 0)"
-FAIL colorTest.parseColor("hsla(150, 100%, 50%, 0)") should be rgba(0, 255, 127, 0). Was rgba(0, 255, 128, 0).
-PASS colorTest.parseColor("hsla(180, 100%, 50%, 0)") is "rgba(0, 255, 255, 0)"
-FAIL colorTest.parseColor("hsla(210, 100%, 50%, 0)") should be rgba(0, 127, 255, 0). Was rgba(0, 128, 255, 0).
-PASS colorTest.parseColor("hsla(240, 100%, 50%, 0)") is "rgba(0, 0, 255, 0)"
-FAIL colorTest.parseColor("hsla(270, 100%, 50%, 0)") should be rgba(127, 0, 255, 0). Was rgba(128, 0, 255, 0).
-PASS colorTest.parseColor("hsla(300, 100%, 50%, 0)") is "rgba(255, 0, 255, 0)"
-FAIL colorTest.parseColor("hsla(330, 100%, 50%, 0)") should be rgba(255, 0, 127, 0). Was rgba(255, 0, 128, 0).
-PASS colorTest.parseColor("hsla(0, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 62.5%, 0)") is "rgba(159, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 62.5%, 0)") is "rgba(171, 147, 147, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 62.5%, 0)") is "rgba(171, 159, 147, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 62.5%, 0)") is "rgba(171, 171, 147, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 62.5%, 0)") is "rgba(159, 171, 147, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 62.5%, 0)") is "rgba(147, 171, 147, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 62.5%, 0)") is "rgba(147, 171, 159, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 62.5%, 0)") is "rgba(147, 171, 171, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 62.5%, 0)") is "rgba(147, 159, 171, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 62.5%, 0)") is "rgba(147, 147, 171, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 62.5%, 0)") is "rgba(159, 147, 171, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 62.5%, 0)") is "rgba(171, 147, 171, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 62.5%, 0)") is "rgba(171, 147, 159, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 62.5%, 0)") is "rgba(183, 135, 135, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 62.5%, 0)") is "rgba(183, 159, 135, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 62.5%, 0)") is "rgba(183, 183, 135, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 62.5%, 0)") is "rgba(159, 183, 135, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 62.5%, 0)") is "rgba(135, 183, 135, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 62.5%, 0)") is "rgba(135, 183, 159, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 62.5%, 0)") is "rgba(135, 183, 183, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 62.5%, 0)") is "rgba(135, 159, 183, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 62.5%, 0)") is "rgba(135, 135, 183, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 62.5%, 0)") is "rgba(159, 135, 183, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 62.5%, 0)") is "rgba(183, 135, 183, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 62.5%, 0)") is "rgba(183, 135, 159, 0)"
-FAIL colorTest.parseColor("hsla(0, 37.5%, 62.5%, 0)") should be rgba(195, 123, 123, 0). Was rgba(195, 124, 124, 0).
-FAIL colorTest.parseColor("hsla(30, 37.5%, 62.5%, 0)") should be rgba(195, 159, 123, 0). Was rgba(195, 159, 124, 0).
-FAIL colorTest.parseColor("hsla(60, 37.5%, 62.5%, 0)") should be rgba(195, 195, 123, 0). Was rgba(195, 195, 124, 0).
-FAIL colorTest.parseColor("hsla(90, 37.5%, 62.5%, 0)") should be rgba(159, 195, 123, 0). Was rgba(159, 195, 124, 0).
-FAIL colorTest.parseColor("hsla(120, 37.5%, 62.5%, 0)") should be rgba(123, 195, 123, 0). Was rgba(124, 195, 124, 0).
-FAIL colorTest.parseColor("hsla(150, 37.5%, 62.5%, 0)") should be rgba(123, 195, 159, 0). Was rgba(124, 195, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 37.5%, 62.5%, 0)") should be rgba(123, 195, 195, 0). Was rgba(124, 195, 195, 0).
-FAIL colorTest.parseColor("hsla(210, 37.5%, 62.5%, 0)") should be rgba(123, 159, 195, 0). Was rgba(124, 159, 195, 0).
-FAIL colorTest.parseColor("hsla(240, 37.5%, 62.5%, 0)") should be rgba(123, 123, 195, 0). Was rgba(124, 124, 195, 0).
-FAIL colorTest.parseColor("hsla(270, 37.5%, 62.5%, 0)") should be rgba(159, 123, 195, 0). Was rgba(159, 124, 195, 0).
-FAIL colorTest.parseColor("hsla(300, 37.5%, 62.5%, 0)") should be rgba(195, 123, 195, 0). Was rgba(195, 124, 195, 0).
-FAIL colorTest.parseColor("hsla(330, 37.5%, 62.5%, 0)") should be rgba(195, 123, 159, 0). Was rgba(195, 124, 159, 0).
-FAIL colorTest.parseColor("hsla(0, 50%, 62.5%, 0)") should be rgba(207, 111, 111, 0). Was rgba(207, 112, 112, 0).
-FAIL colorTest.parseColor("hsla(30, 50%, 62.5%, 0)") should be rgba(207, 159, 111, 0). Was rgba(207, 159, 112, 0).
-FAIL colorTest.parseColor("hsla(60, 50%, 62.5%, 0)") should be rgba(207, 207, 111, 0). Was rgba(207, 207, 112, 0).
-FAIL colorTest.parseColor("hsla(90, 50%, 62.5%, 0)") should be rgba(159, 207, 111, 0). Was rgba(159, 207, 112, 0).
-FAIL colorTest.parseColor("hsla(120, 50%, 62.5%, 0)") should be rgba(111, 207, 111, 0). Was rgba(112, 207, 112, 0).
-FAIL colorTest.parseColor("hsla(150, 50%, 62.5%, 0)") should be rgba(111, 207, 159, 0). Was rgba(112, 207, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 50%, 62.5%, 0)") should be rgba(111, 207, 207, 0). Was rgba(112, 207, 207, 0).
-FAIL colorTest.parseColor("hsla(210, 50%, 62.5%, 0)") should be rgba(111, 159, 207, 0). Was rgba(112, 159, 207, 0).
-FAIL colorTest.parseColor("hsla(240, 50%, 62.5%, 0)") should be rgba(111, 111, 207, 0). Was rgba(112, 112, 207, 0).
-FAIL colorTest.parseColor("hsla(270, 50%, 62.5%, 0)") should be rgba(159, 111, 207, 0). Was rgba(159, 112, 207, 0).
-FAIL colorTest.parseColor("hsla(300, 50%, 62.5%, 0)") should be rgba(207, 111, 207, 0). Was rgba(207, 112, 207, 0).
-FAIL colorTest.parseColor("hsla(330, 50%, 62.5%, 0)") should be rgba(207, 111, 159, 0). Was rgba(207, 112, 159, 0).
-FAIL colorTest.parseColor("hsla(0, 62.5%, 62.5%, 0)") should be rgba(219, 99, 99, 0). Was rgba(219, 100, 100, 0).
-FAIL colorTest.parseColor("hsla(30, 62.5%, 62.5%, 0)") should be rgba(219, 159, 99, 0). Was rgba(219, 159, 100, 0).
-FAIL colorTest.parseColor("hsla(60, 62.5%, 62.5%, 0)") should be rgba(219, 219, 99, 0). Was rgba(219, 219, 100, 0).
-FAIL colorTest.parseColor("hsla(90, 62.5%, 62.5%, 0)") should be rgba(159, 219, 99, 0). Was rgba(159, 219, 100, 0).
-FAIL colorTest.parseColor("hsla(120, 62.5%, 62.5%, 0)") should be rgba(99, 219, 99, 0). Was rgba(100, 219, 100, 0).
-FAIL colorTest.parseColor("hsla(150, 62.5%, 62.5%, 0)") should be rgba(99, 219, 159, 0). Was rgba(100, 219, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 62.5%, 62.5%, 0)") should be rgba(99, 219, 219, 0). Was rgba(100, 219, 219, 0).
-FAIL colorTest.parseColor("hsla(210, 62.5%, 62.5%, 0)") should be rgba(99, 159, 219, 0). Was rgba(100, 159, 219, 0).
-FAIL colorTest.parseColor("hsla(240, 62.5%, 62.5%, 0)") should be rgba(99, 99, 219, 0). Was rgba(100, 100, 219, 0).
-FAIL colorTest.parseColor("hsla(270, 62.5%, 62.5%, 0)") should be rgba(159, 99, 219, 0). Was rgba(159, 100, 219, 0).
-FAIL colorTest.parseColor("hsla(300, 62.5%, 62.5%, 0)") should be rgba(219, 99, 219, 0). Was rgba(219, 100, 219, 0).
-FAIL colorTest.parseColor("hsla(330, 62.5%, 62.5%, 0)") should be rgba(219, 99, 159, 0). Was rgba(219, 100, 159, 0).
-FAIL colorTest.parseColor("hsla(0, 75%, 62.5%, 0)") should be rgba(231, 87, 87, 0). Was rgba(231, 88, 88, 0).
-FAIL colorTest.parseColor("hsla(30, 75%, 62.5%, 0)") should be rgba(231, 159, 87, 0). Was rgba(231, 159, 88, 0).
-FAIL colorTest.parseColor("hsla(60, 75%, 62.5%, 0)") should be rgba(231, 231, 87, 0). Was rgba(231, 231, 88, 0).
-FAIL colorTest.parseColor("hsla(90, 75%, 62.5%, 0)") should be rgba(159, 231, 87, 0). Was rgba(159, 231, 88, 0).
-FAIL colorTest.parseColor("hsla(120, 75%, 62.5%, 0)") should be rgba(87, 231, 87, 0). Was rgba(88, 231, 88, 0).
-FAIL colorTest.parseColor("hsla(150, 75%, 62.5%, 0)") should be rgba(87, 231, 159, 0). Was rgba(88, 231, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 75%, 62.5%, 0)") should be rgba(87, 231, 231, 0). Was rgba(88, 231, 231, 0).
-FAIL colorTest.parseColor("hsla(210, 75%, 62.5%, 0)") should be rgba(87, 159, 231, 0). Was rgba(88, 159, 231, 0).
-FAIL colorTest.parseColor("hsla(240, 75%, 62.5%, 0)") should be rgba(87, 87, 231, 0). Was rgba(88, 88, 231, 0).
-FAIL colorTest.parseColor("hsla(270, 75%, 62.5%, 0)") should be rgba(159, 87, 231, 0). Was rgba(159, 88, 231, 0).
-FAIL colorTest.parseColor("hsla(300, 75%, 62.5%, 0)") should be rgba(231, 87, 231, 0). Was rgba(231, 88, 231, 0).
-FAIL colorTest.parseColor("hsla(330, 75%, 62.5%, 0)") should be rgba(231, 87, 159, 0). Was rgba(231, 88, 159, 0).
-FAIL colorTest.parseColor("hsla(0, 87.5%, 62.5%, 0)") should be rgba(243, 75, 75, 0). Was rgba(243, 76, 76, 0).
-FAIL colorTest.parseColor("hsla(30, 87.5%, 62.5%, 0)") should be rgba(243, 159, 75, 0). Was rgba(243, 159, 76, 0).
-FAIL colorTest.parseColor("hsla(60, 87.5%, 62.5%, 0)") should be rgba(243, 243, 75, 0). Was rgba(243, 243, 76, 0).
-FAIL colorTest.parseColor("hsla(90, 87.5%, 62.5%, 0)") should be rgba(159, 243, 75, 0). Was rgba(159, 243, 76, 0).
-FAIL colorTest.parseColor("hsla(120, 87.5%, 62.5%, 0)") should be rgba(75, 243, 75, 0). Was rgba(76, 243, 76, 0).
-FAIL colorTest.parseColor("hsla(150, 87.5%, 62.5%, 0)") should be rgba(75, 243, 159, 0). Was rgba(76, 243, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 87.5%, 62.5%, 0)") should be rgba(75, 243, 243, 0). Was rgba(76, 243, 243, 0).
-FAIL colorTest.parseColor("hsla(210, 87.5%, 62.5%, 0)") should be rgba(75, 159, 243, 0). Was rgba(76, 159, 243, 0).
-FAIL colorTest.parseColor("hsla(240, 87.5%, 62.5%, 0)") should be rgba(75, 75, 243, 0). Was rgba(76, 76, 243, 0).
-FAIL colorTest.parseColor("hsla(270, 87.5%, 62.5%, 0)") should be rgba(159, 75, 243, 0). Was rgba(159, 76, 243, 0).
-FAIL colorTest.parseColor("hsla(300, 87.5%, 62.5%, 0)") should be rgba(243, 75, 243, 0). Was rgba(243, 76, 243, 0).
-FAIL colorTest.parseColor("hsla(330, 87.5%, 62.5%, 0)") should be rgba(243, 75, 159, 0). Was rgba(243, 76, 159, 0).
-FAIL colorTest.parseColor("hsla(0, 100%, 62.5%, 0)") should be rgba(255, 63, 63, 0). Was rgba(255, 64, 64, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 62.5%, 0)") should be rgba(255, 159, 63, 0). Was rgba(255, 159, 64, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 62.5%, 0)") should be rgba(255, 255, 63, 0). Was rgba(255, 255, 64, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 62.5%, 0)") should be rgba(159, 255, 63, 0). Was rgba(159, 255, 64, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 62.5%, 0)") should be rgba(63, 255, 63, 0). Was rgba(64, 255, 64, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 62.5%, 0)") should be rgba(63, 255, 159, 0). Was rgba(64, 255, 159, 0).
-FAIL colorTest.parseColor("hsla(180, 100%, 62.5%, 0)") should be rgba(63, 255, 255, 0). Was rgba(64, 255, 255, 0).
-FAIL colorTest.parseColor("hsla(210, 100%, 62.5%, 0)") should be rgba(63, 159, 255, 0). Was rgba(64, 159, 255, 0).
-FAIL colorTest.parseColor("hsla(240, 100%, 62.5%, 0)") should be rgba(63, 63, 255, 0). Was rgba(64, 64, 255, 0).
-FAIL colorTest.parseColor("hsla(270, 100%, 62.5%, 0)") should be rgba(159, 63, 255, 0). Was rgba(159, 64, 255, 0).
-FAIL colorTest.parseColor("hsla(300, 100%, 62.5%, 0)") should be rgba(255, 63, 255, 0). Was rgba(255, 64, 255, 0).
-FAIL colorTest.parseColor("hsla(330, 100%, 62.5%, 0)") should be rgba(255, 63, 159, 0). Was rgba(255, 64, 159, 0).
-PASS colorTest.parseColor("hsla(0, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 75%, 0)") is "rgba(191, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 75%, 0)") is "rgba(199, 183, 183, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 75%, 0)") is "rgba(199, 191, 183, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 75%, 0)") is "rgba(199, 199, 183, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 75%, 0)") is "rgba(191, 199, 183, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 75%, 0)") is "rgba(183, 199, 183, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 75%, 0)") is "rgba(183, 199, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 75%, 0)") is "rgba(183, 199, 199, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 75%, 0)") is "rgba(183, 191, 199, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 75%, 0)") is "rgba(183, 183, 199, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 75%, 0)") is "rgba(191, 183, 199, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 75%, 0)") is "rgba(199, 183, 199, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 75%, 0)") is "rgba(199, 183, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 75%, 0)") is "rgba(207, 175, 175, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 75%, 0)") is "rgba(207, 191, 175, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 75%, 0)") is "rgba(207, 207, 175, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 75%, 0)") is "rgba(191, 207, 175, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 75%, 0)") is "rgba(175, 207, 175, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 75%, 0)") is "rgba(175, 207, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 75%, 0)") is "rgba(175, 207, 207, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 75%, 0)") is "rgba(175, 191, 207, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 75%, 0)") is "rgba(175, 175, 207, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 75%, 0)") is "rgba(191, 175, 207, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 75%, 0)") is "rgba(207, 175, 207, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 75%, 0)") is "rgba(207, 175, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 75%, 0)") is "rgba(215, 167, 167, 0)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 75%, 0)") is "rgba(215, 191, 167, 0)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 75%, 0)") is "rgba(215, 215, 167, 0)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 75%, 0)") is "rgba(191, 215, 167, 0)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 75%, 0)") is "rgba(167, 215, 167, 0)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 75%, 0)") is "rgba(167, 215, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 75%, 0)") is "rgba(167, 215, 215, 0)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 75%, 0)") is "rgba(167, 191, 215, 0)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 75%, 0)") is "rgba(167, 167, 215, 0)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 75%, 0)") is "rgba(191, 167, 215, 0)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 75%, 0)") is "rgba(215, 167, 215, 0)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 75%, 0)") is "rgba(215, 167, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 50%, 75%, 0)") is "rgba(223, 159, 159, 0)"
-PASS colorTest.parseColor("hsla(30, 50%, 75%, 0)") is "rgba(223, 191, 159, 0)"
-PASS colorTest.parseColor("hsla(60, 50%, 75%, 0)") is "rgba(223, 223, 159, 0)"
-PASS colorTest.parseColor("hsla(90, 50%, 75%, 0)") is "rgba(191, 223, 159, 0)"
-PASS colorTest.parseColor("hsla(120, 50%, 75%, 0)") is "rgba(159, 223, 159, 0)"
-PASS colorTest.parseColor("hsla(150, 50%, 75%, 0)") is "rgba(159, 223, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 50%, 75%, 0)") is "rgba(159, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(210, 50%, 75%, 0)") is "rgba(159, 191, 223, 0)"
-PASS colorTest.parseColor("hsla(240, 50%, 75%, 0)") is "rgba(159, 159, 223, 0)"
-PASS colorTest.parseColor("hsla(270, 50%, 75%, 0)") is "rgba(191, 159, 223, 0)"
-PASS colorTest.parseColor("hsla(300, 50%, 75%, 0)") is "rgba(223, 159, 223, 0)"
-PASS colorTest.parseColor("hsla(330, 50%, 75%, 0)") is "rgba(223, 159, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 75%, 0)") is "rgba(231, 151, 151, 0)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 75%, 0)") is "rgba(231, 191, 151, 0)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 75%, 0)") is "rgba(231, 231, 151, 0)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 75%, 0)") is "rgba(191, 231, 151, 0)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 75%, 0)") is "rgba(151, 231, 151, 0)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 75%, 0)") is "rgba(151, 231, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 75%, 0)") is "rgba(151, 231, 231, 0)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 75%, 0)") is "rgba(151, 191, 231, 0)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 75%, 0)") is "rgba(151, 151, 231, 0)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 75%, 0)") is "rgba(191, 151, 231, 0)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 75%, 0)") is "rgba(231, 151, 231, 0)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 75%, 0)") is "rgba(231, 151, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 75%, 75%, 0)") is "rgba(239, 143, 143, 0)"
-PASS colorTest.parseColor("hsla(30, 75%, 75%, 0)") is "rgba(239, 191, 143, 0)"
-PASS colorTest.parseColor("hsla(60, 75%, 75%, 0)") is "rgba(239, 239, 143, 0)"
-PASS colorTest.parseColor("hsla(90, 75%, 75%, 0)") is "rgba(191, 239, 143, 0)"
-PASS colorTest.parseColor("hsla(120, 75%, 75%, 0)") is "rgba(143, 239, 143, 0)"
-PASS colorTest.parseColor("hsla(150, 75%, 75%, 0)") is "rgba(143, 239, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 75%, 75%, 0)") is "rgba(143, 239, 239, 0)"
-PASS colorTest.parseColor("hsla(210, 75%, 75%, 0)") is "rgba(143, 191, 239, 0)"
-PASS colorTest.parseColor("hsla(240, 75%, 75%, 0)") is "rgba(143, 143, 239, 0)"
-PASS colorTest.parseColor("hsla(270, 75%, 75%, 0)") is "rgba(191, 143, 239, 0)"
-PASS colorTest.parseColor("hsla(300, 75%, 75%, 0)") is "rgba(239, 143, 239, 0)"
-PASS colorTest.parseColor("hsla(330, 75%, 75%, 0)") is "rgba(239, 143, 191, 0)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 75%, 0)") is "rgba(247, 135, 135, 0)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 75%, 0)") is "rgba(247, 191, 135, 0)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 75%, 0)") is "rgba(247, 247, 135, 0)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 75%, 0)") is "rgba(191, 247, 135, 0)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 75%, 0)") is "rgba(135, 247, 135, 0)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 75%, 0)") is "rgba(135, 247, 191, 0)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 75%, 0)") is "rgba(135, 247, 247, 0)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 75%, 0)") is "rgba(135, 191, 247, 0)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 75%, 0)") is "rgba(135, 135, 247, 0)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 75%, 0)") is "rgba(191, 135, 247, 0)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 75%, 0)") is "rgba(247, 135, 247, 0)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 75%, 0)") is "rgba(247, 135, 191, 0)"
-FAIL colorTest.parseColor("hsla(0, 100%, 75%, 0)") should be rgba(255, 127, 127, 0). Was rgba(255, 128, 128, 0).
-FAIL colorTest.parseColor("hsla(30, 100%, 75%, 0)") should be rgba(255, 191, 127, 0). Was rgba(255, 191, 128, 0).
-FAIL colorTest.parseColor("hsla(60, 100%, 75%, 0)") should be rgba(255, 255, 127, 0). Was rgba(255, 255, 128, 0).
-FAIL colorTest.parseColor("hsla(90, 100%, 75%, 0)") should be rgba(191, 255, 127, 0). Was rgba(191, 255, 128, 0).
-FAIL colorTest.parseColor("hsla(120, 100%, 75%, 0)") should be rgba(127, 255, 127, 0). Was rgba(128, 255, 128, 0).
-FAIL colorTest.parseColor("hsla(150, 100%, 75%, 0)") should be rgba(127, 255, 191, 0). Was rgba(128, 255, 191, 0).
-FAIL colorTest.parseColor("hsla(180, 100%, 75%, 0)") should be rgba(127, 255, 255, 0). Was rgba(128, 255, 255, 0).
-FAIL colorTest.parseColor("hsla(210, 100%, 75%, 0)") should be rgba(127, 191, 255, 0). Was rgba(128, 191, 255, 0).
-FAIL colorTest.parseColor("hsla(240, 100%, 75%, 0)") should be rgba(127, 127, 255, 0). Was rgba(128, 128, 255, 0).
-FAIL colorTest.parseColor("hsla(270, 100%, 75%, 0)") should be rgba(191, 127, 255, 0). Was rgba(191, 128, 255, 0).
-FAIL colorTest.parseColor("hsla(300, 100%, 75%, 0)") should be rgba(255, 127, 255, 0). Was rgba(255, 128, 255, 0).
-FAIL colorTest.parseColor("hsla(330, 100%, 75%, 0)") should be rgba(255, 127, 191, 0). Was rgba(255, 128, 191, 0).
-PASS colorTest.parseColor("hsla(0, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 87.5%, 0)") is "rgba(223, 223, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 87.5%, 0)") is "rgba(227, 219, 219, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 87.5%, 0)") is "rgba(227, 223, 219, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 87.5%, 0)") is "rgba(227, 227, 219, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 87.5%, 0)") is "rgba(223, 227, 219, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 87.5%, 0)") is "rgba(219, 227, 219, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 87.5%, 0)") is "rgba(219, 227, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 87.5%, 0)") is "rgba(219, 227, 227, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 87.5%, 0)") is "rgba(219, 223, 227, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 87.5%, 0)") is "rgba(219, 219, 227, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 87.5%, 0)") is "rgba(223, 219, 227, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 87.5%, 0)") is "rgba(227, 219, 227, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 87.5%, 0)") is "rgba(227, 219, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 87.5%, 0)") is "rgba(231, 215, 215, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 87.5%, 0)") is "rgba(231, 223, 215, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 87.5%, 0)") is "rgba(231, 231, 215, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 87.5%, 0)") is "rgba(223, 231, 215, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 87.5%, 0)") is "rgba(215, 231, 215, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 87.5%, 0)") is "rgba(215, 231, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 87.5%, 0)") is "rgba(215, 231, 231, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 87.5%, 0)") is "rgba(215, 223, 231, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 87.5%, 0)") is "rgba(215, 215, 231, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 87.5%, 0)") is "rgba(223, 215, 231, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 87.5%, 0)") is "rgba(231, 215, 231, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 87.5%, 0)") is "rgba(231, 215, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 87.5%, 0)") is "rgba(235, 211, 211, 0)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 87.5%, 0)") is "rgba(235, 223, 211, 0)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 87.5%, 0)") is "rgba(235, 235, 211, 0)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 87.5%, 0)") is "rgba(223, 235, 211, 0)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 87.5%, 0)") is "rgba(211, 235, 211, 0)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 87.5%, 0)") is "rgba(211, 235, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 87.5%, 0)") is "rgba(211, 235, 235, 0)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 87.5%, 0)") is "rgba(211, 223, 235, 0)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 87.5%, 0)") is "rgba(211, 211, 235, 0)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 87.5%, 0)") is "rgba(223, 211, 235, 0)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 87.5%, 0)") is "rgba(235, 211, 235, 0)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 87.5%, 0)") is "rgba(235, 211, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 50%, 87.5%, 0)") is "rgba(239, 207, 207, 0)"
-PASS colorTest.parseColor("hsla(30, 50%, 87.5%, 0)") is "rgba(239, 223, 207, 0)"
-PASS colorTest.parseColor("hsla(60, 50%, 87.5%, 0)") is "rgba(239, 239, 207, 0)"
-PASS colorTest.parseColor("hsla(90, 50%, 87.5%, 0)") is "rgba(223, 239, 207, 0)"
-PASS colorTest.parseColor("hsla(120, 50%, 87.5%, 0)") is "rgba(207, 239, 207, 0)"
-PASS colorTest.parseColor("hsla(150, 50%, 87.5%, 0)") is "rgba(207, 239, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 50%, 87.5%, 0)") is "rgba(207, 239, 239, 0)"
-PASS colorTest.parseColor("hsla(210, 50%, 87.5%, 0)") is "rgba(207, 223, 239, 0)"
-PASS colorTest.parseColor("hsla(240, 50%, 87.5%, 0)") is "rgba(207, 207, 239, 0)"
-PASS colorTest.parseColor("hsla(270, 50%, 87.5%, 0)") is "rgba(223, 207, 239, 0)"
-PASS colorTest.parseColor("hsla(300, 50%, 87.5%, 0)") is "rgba(239, 207, 239, 0)"
-PASS colorTest.parseColor("hsla(330, 50%, 87.5%, 0)") is "rgba(239, 207, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 87.5%, 0)") is "rgba(243, 203, 203, 0)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 87.5%, 0)") is "rgba(243, 223, 203, 0)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 87.5%, 0)") is "rgba(243, 243, 203, 0)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 87.5%, 0)") is "rgba(223, 243, 203, 0)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 87.5%, 0)") is "rgba(203, 243, 203, 0)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 87.5%, 0)") is "rgba(203, 243, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 87.5%, 0)") is "rgba(203, 243, 243, 0)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 87.5%, 0)") is "rgba(203, 223, 243, 0)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 87.5%, 0)") is "rgba(203, 203, 243, 0)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 87.5%, 0)") is "rgba(223, 203, 243, 0)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 87.5%, 0)") is "rgba(243, 203, 243, 0)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 87.5%, 0)") is "rgba(243, 203, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 75%, 87.5%, 0)") is "rgba(247, 199, 199, 0)"
-PASS colorTest.parseColor("hsla(30, 75%, 87.5%, 0)") is "rgba(247, 223, 199, 0)"
-PASS colorTest.parseColor("hsla(60, 75%, 87.5%, 0)") is "rgba(247, 247, 199, 0)"
-PASS colorTest.parseColor("hsla(90, 75%, 87.5%, 0)") is "rgba(223, 247, 199, 0)"
-PASS colorTest.parseColor("hsla(120, 75%, 87.5%, 0)") is "rgba(199, 247, 199, 0)"
-PASS colorTest.parseColor("hsla(150, 75%, 87.5%, 0)") is "rgba(199, 247, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 75%, 87.5%, 0)") is "rgba(199, 247, 247, 0)"
-PASS colorTest.parseColor("hsla(210, 75%, 87.5%, 0)") is "rgba(199, 223, 247, 0)"
-PASS colorTest.parseColor("hsla(240, 75%, 87.5%, 0)") is "rgba(199, 199, 247, 0)"
-PASS colorTest.parseColor("hsla(270, 75%, 87.5%, 0)") is "rgba(223, 199, 247, 0)"
-PASS colorTest.parseColor("hsla(300, 75%, 87.5%, 0)") is "rgba(247, 199, 247, 0)"
-PASS colorTest.parseColor("hsla(330, 75%, 87.5%, 0)") is "rgba(247, 199, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 87.5%, 0)") is "rgba(251, 195, 195, 0)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 87.5%, 0)") is "rgba(251, 223, 195, 0)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 87.5%, 0)") is "rgba(251, 251, 195, 0)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 87.5%, 0)") is "rgba(223, 251, 195, 0)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 87.5%, 0)") is "rgba(195, 251, 195, 0)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 87.5%, 0)") is "rgba(195, 251, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 87.5%, 0)") is "rgba(195, 251, 251, 0)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 87.5%, 0)") is "rgba(195, 223, 251, 0)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 87.5%, 0)") is "rgba(195, 195, 251, 0)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 87.5%, 0)") is "rgba(223, 195, 251, 0)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 87.5%, 0)") is "rgba(251, 195, 251, 0)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 87.5%, 0)") is "rgba(251, 195, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 100%, 87.5%, 0)") is "rgba(255, 191, 191, 0)"
-PASS colorTest.parseColor("hsla(30, 100%, 87.5%, 0)") is "rgba(255, 223, 191, 0)"
-PASS colorTest.parseColor("hsla(60, 100%, 87.5%, 0)") is "rgba(255, 255, 191, 0)"
-PASS colorTest.parseColor("hsla(90, 100%, 87.5%, 0)") is "rgba(223, 255, 191, 0)"
-PASS colorTest.parseColor("hsla(120, 100%, 87.5%, 0)") is "rgba(191, 255, 191, 0)"
-PASS colorTest.parseColor("hsla(150, 100%, 87.5%, 0)") is "rgba(191, 255, 223, 0)"
-PASS colorTest.parseColor("hsla(180, 100%, 87.5%, 0)") is "rgba(191, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 100%, 87.5%, 0)") is "rgba(191, 223, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 100%, 87.5%, 0)") is "rgba(191, 191, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 100%, 87.5%, 0)") is "rgba(223, 191, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 100%, 87.5%, 0)") is "rgba(255, 191, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 100%, 87.5%, 0)") is "rgba(255, 191, 223, 0)"
-PASS colorTest.parseColor("hsla(0, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 0%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 12.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 25%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 37.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 50%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 62.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 75%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 87.5%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(0, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(30, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(60, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(90, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(120, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(150, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(180, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(210, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(240, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(270, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(300, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS colorTest.parseColor("hsla(330, 100%, 100%, 0)") is "rgba(255, 255, 255, 0)"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2.html b/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2.html
deleted file mode 100644
index b0663b4..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_hsla_2.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../resources/js-test.js"></script>
-<script src="resources/color-test.js"></script>
-<script>
-var test = new ColorTest("resources/css-parsing-tests/color3_hsla_2.json");
-test.run();
-</script>
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_keywords-expected.txt b/third_party/WebKit/LayoutTests/css-parser/color3_keywords-expected.txt
deleted file mode 100644
index c0e435f9..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_keywords-expected.txt
+++ /dev/null
@@ -1,811 +0,0 @@
-CONSOLE WARNING: line 3: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
-Color test for resources/css-parsing-tests/color3_keywords.json
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS colorTest.parseColor("transparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("Transparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("\\transparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("\\74 ransparent") is "rgba(0, 0, 0, 0)"
-PASS colorTest.parseColor("ransparent") is "parse error"
-PASS colorTest.parseColor("black") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("bLack") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("b\\lack") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("b\\6C ack") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("back") is "parse error"
-PASS colorTest.parseColor("blacK") is "parse error"
-PASS colorTest.parseColor("silver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("siLver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("si\\lver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("si\\6C ver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("siver") is "parse error"
-PASS colorTest.parseColor("gray") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("graY") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gra\\y") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gra\\79 ") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gra") is "parse error"
-PASS colorTest.parseColor("white") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("whitE") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("whit\\65 ") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("whit") is "parse error"
-PASS colorTest.parseColor("maroon") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("marooN") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("maroo\\n") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("maroo\\6E ") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("maroo") is "parse error"
-PASS colorTest.parseColor("red") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("Red") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("\\red") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("\\72 ed") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("ed") is "parse error"
-PASS colorTest.parseColor("purple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("pUrple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("p\\urple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("p\\75 rple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("prple") is "parse error"
-PASS colorTest.parseColor("fuchsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("fUchsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("f\\uchsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("f\\75 chsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("fchsia") is "parse error"
-PASS colorTest.parseColor("green") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("greeN") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("gree\\n") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("gree\\6E ") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("gree") is "parse error"
-PASS colorTest.parseColor("lime") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("liMe") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("li\\me") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("li\\6D e") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("lie") is "parse error"
-PASS colorTest.parseColor("olive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("oLive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("o\\live") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("o\\6C ive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("oive") is "parse error"
-PASS colorTest.parseColor("yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("Yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("\\yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("\\79 ellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("ellow") is "parse error"
-PASS colorTest.parseColor("navy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("nAvy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("n\\61 vy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("nvy") is "parse error"
-PASS colorTest.parseColor("blue") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("blUe") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("bl\\ue") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("bl\\75 e") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("ble") is "parse error"
-PASS colorTest.parseColor("teal") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("teaL") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("tea\\l") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("tea\\6C ") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("tea") is "parse error"
-PASS colorTest.parseColor("aqua") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("Aqua") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("\\61 qua") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("qua") is "parse error"
-PASS colorTest.parseColor("aliceblue") is "rgb(240, 248, 255)"
-PASS colorTest.parseColor("alicebluE") is "rgb(240, 248, 255)"
-PASS colorTest.parseColor("aliceblu\\65 ") is "rgb(240, 248, 255)"
-PASS colorTest.parseColor("aliceblu") is "parse error"
-PASS colorTest.parseColor("antiquewhite") is "rgb(250, 235, 215)"
-PASS colorTest.parseColor("antiquEwhite") is "rgb(250, 235, 215)"
-PASS colorTest.parseColor("antiqu\\65 white") is "rgb(250, 235, 215)"
-PASS colorTest.parseColor("antiquwhite") is "parse error"
-PASS colorTest.parseColor("aqua") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("aquA") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("aqu\\61 ") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("aqu") is "parse error"
-PASS colorTest.parseColor("aquamarine") is "rgb(127, 255, 212)"
-PASS colorTest.parseColor("Aquamarine") is "rgb(127, 255, 212)"
-PASS colorTest.parseColor("\\61 quamarine") is "rgb(127, 255, 212)"
-PASS colorTest.parseColor("quamarine") is "parse error"
-PASS colorTest.parseColor("azure") is "rgb(240, 255, 255)"
-PASS colorTest.parseColor("aZure") is "rgb(240, 255, 255)"
-PASS colorTest.parseColor("a\\zure") is "rgb(240, 255, 255)"
-PASS colorTest.parseColor("a\\7A ure") is "rgb(240, 255, 255)"
-PASS colorTest.parseColor("aure") is "parse error"
-PASS colorTest.parseColor("beige") is "rgb(245, 245, 220)"
-PASS colorTest.parseColor("beIge") is "rgb(245, 245, 220)"
-PASS colorTest.parseColor("be\\ige") is "rgb(245, 245, 220)"
-PASS colorTest.parseColor("be\\69 ge") is "rgb(245, 245, 220)"
-PASS colorTest.parseColor("bege") is "parse error"
-PASS colorTest.parseColor("bisque") is "rgb(255, 228, 196)"
-PASS colorTest.parseColor("bisquE") is "rgb(255, 228, 196)"
-PASS colorTest.parseColor("bisqu\\65 ") is "rgb(255, 228, 196)"
-PASS colorTest.parseColor("bisqu") is "parse error"
-PASS colorTest.parseColor("black") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("blacK") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("blac\\k") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("blac\\6B ") is "rgb(0, 0, 0)"
-PASS colorTest.parseColor("blac") is "parse error"
-PASS colorTest.parseColor("blacK") is "parse error"
-PASS colorTest.parseColor("blanchedalmond") is "rgb(255, 235, 205)"
-PASS colorTest.parseColor("blanchedalmOnd") is "rgb(255, 235, 205)"
-PASS colorTest.parseColor("blanchedalm\\ond") is "rgb(255, 235, 205)"
-PASS colorTest.parseColor("blanchedalm\\6F nd") is "rgb(255, 235, 205)"
-PASS colorTest.parseColor("blanchedalmnd") is "parse error"
-PASS colorTest.parseColor("blue") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("blUe") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("bl\\ue") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("bl\\75 e") is "rgb(0, 0, 255)"
-PASS colorTest.parseColor("ble") is "parse error"
-PASS colorTest.parseColor("blueviolet") is "rgb(138, 43, 226)"
-PASS colorTest.parseColor("bluevioLet") is "rgb(138, 43, 226)"
-PASS colorTest.parseColor("bluevio\\let") is "rgb(138, 43, 226)"
-PASS colorTest.parseColor("bluevio\\6C et") is "rgb(138, 43, 226)"
-PASS colorTest.parseColor("bluevioet") is "parse error"
-PASS colorTest.parseColor("brown") is "rgb(165, 42, 42)"
-PASS colorTest.parseColor("broWn") is "rgb(165, 42, 42)"
-PASS colorTest.parseColor("bro\\wn") is "rgb(165, 42, 42)"
-PASS colorTest.parseColor("bro\\77 n") is "rgb(165, 42, 42)"
-PASS colorTest.parseColor("bron") is "parse error"
-PASS colorTest.parseColor("burlywood") is "rgb(222, 184, 135)"
-PASS colorTest.parseColor("buRlywood") is "rgb(222, 184, 135)"
-PASS colorTest.parseColor("bu\\rlywood") is "rgb(222, 184, 135)"
-PASS colorTest.parseColor("bu\\72 lywood") is "rgb(222, 184, 135)"
-PASS colorTest.parseColor("bulywood") is "parse error"
-PASS colorTest.parseColor("cadetblue") is "rgb(95, 158, 160)"
-PASS colorTest.parseColor("cadEtblue") is "rgb(95, 158, 160)"
-PASS colorTest.parseColor("cad\\65 tblue") is "rgb(95, 158, 160)"
-PASS colorTest.parseColor("cadtblue") is "parse error"
-PASS colorTest.parseColor("chartreuse") is "rgb(127, 255, 0)"
-PASS colorTest.parseColor("cHartreuse") is "rgb(127, 255, 0)"
-PASS colorTest.parseColor("c\\hartreuse") is "rgb(127, 255, 0)"
-PASS colorTest.parseColor("c\\68 artreuse") is "rgb(127, 255, 0)"
-PASS colorTest.parseColor("cartreuse") is "parse error"
-PASS colorTest.parseColor("chocolate") is "rgb(210, 105, 30)"
-PASS colorTest.parseColor("chocoLate") is "rgb(210, 105, 30)"
-PASS colorTest.parseColor("choco\\late") is "rgb(210, 105, 30)"
-PASS colorTest.parseColor("choco\\6C ate") is "rgb(210, 105, 30)"
-PASS colorTest.parseColor("chocoate") is "parse error"
-PASS colorTest.parseColor("coral") is "rgb(255, 127, 80)"
-PASS colorTest.parseColor("corAl") is "rgb(255, 127, 80)"
-PASS colorTest.parseColor("cor\\61 l") is "rgb(255, 127, 80)"
-PASS colorTest.parseColor("corl") is "parse error"
-PASS colorTest.parseColor("cornflowerblue") is "rgb(100, 149, 237)"
-PASS colorTest.parseColor("cornflOwerblue") is "rgb(100, 149, 237)"
-PASS colorTest.parseColor("cornfl\\owerblue") is "rgb(100, 149, 237)"
-PASS colorTest.parseColor("cornfl\\6F werblue") is "rgb(100, 149, 237)"
-PASS colorTest.parseColor("cornflwerblue") is "parse error"
-PASS colorTest.parseColor("cornsilk") is "rgb(255, 248, 220)"
-PASS colorTest.parseColor("corNsilk") is "rgb(255, 248, 220)"
-PASS colorTest.parseColor("cor\\nsilk") is "rgb(255, 248, 220)"
-PASS colorTest.parseColor("cor\\6E silk") is "rgb(255, 248, 220)"
-PASS colorTest.parseColor("corsilk") is "parse error"
-PASS colorTest.parseColor("cornsilK") is "parse error"
-PASS colorTest.parseColor("crimson") is "rgb(220, 20, 60)"
-PASS colorTest.parseColor("cRimson") is "rgb(220, 20, 60)"
-PASS colorTest.parseColor("c\\rimson") is "rgb(220, 20, 60)"
-PASS colorTest.parseColor("c\\72 imson") is "rgb(220, 20, 60)"
-PASS colorTest.parseColor("cimson") is "parse error"
-PASS colorTest.parseColor("cyan") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("cYan") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("c\\yan") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("c\\79 an") is "rgb(0, 255, 255)"
-PASS colorTest.parseColor("can") is "parse error"
-PASS colorTest.parseColor("darkblue") is "rgb(0, 0, 139)"
-PASS colorTest.parseColor("darkblUe") is "rgb(0, 0, 139)"
-PASS colorTest.parseColor("darkbl\\ue") is "rgb(0, 0, 139)"
-PASS colorTest.parseColor("darkbl\\75 e") is "rgb(0, 0, 139)"
-PASS colorTest.parseColor("darkble") is "parse error"
-PASS colorTest.parseColor("darKblue") is "parse error"
-PASS colorTest.parseColor("darkcyan") is "rgb(0, 139, 139)"
-PASS colorTest.parseColor("darkcyaN") is "rgb(0, 139, 139)"
-PASS colorTest.parseColor("darkcya\\n") is "rgb(0, 139, 139)"
-PASS colorTest.parseColor("darkcya\\6E ") is "rgb(0, 139, 139)"
-PASS colorTest.parseColor("darkcya") is "parse error"
-PASS colorTest.parseColor("darKcyan") is "parse error"
-PASS colorTest.parseColor("darkgoldenrod") is "rgb(184, 134, 11)"
-PASS colorTest.parseColor("dArkgoldenrod") is "rgb(184, 134, 11)"
-PASS colorTest.parseColor("d\\61 rkgoldenrod") is "rgb(184, 134, 11)"
-PASS colorTest.parseColor("drkgoldenrod") is "parse error"
-PASS colorTest.parseColor("darKgoldenrod") is "parse error"
-PASS colorTest.parseColor("darkgray") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("dArkgray") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("d\\61 rkgray") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("drkgray") is "parse error"
-PASS colorTest.parseColor("darKgray") is "parse error"
-PASS colorTest.parseColor("darkgreen") is "rgb(0, 100, 0)"
-PASS colorTest.parseColor("darkgrEen") is "rgb(0, 100, 0)"
-PASS colorTest.parseColor("darkgr\\65 en") is "rgb(0, 100, 0)"
-PASS colorTest.parseColor("darkgren") is "parse error"
-PASS colorTest.parseColor("darKgreen") is "parse error"
-PASS colorTest.parseColor("darkgrey") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("darKgrey") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("dar\\kgrey") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("dar\\6B grey") is "rgb(169, 169, 169)"
-PASS colorTest.parseColor("dargrey") is "parse error"
-PASS colorTest.parseColor("darKgrey") is "parse error"
-PASS colorTest.parseColor("darkkhaki") is "rgb(189, 183, 107)"
-PASS colorTest.parseColor("darkkhakI") is "rgb(189, 183, 107)"
-PASS colorTest.parseColor("darkkhak\\i") is "rgb(189, 183, 107)"
-PASS colorTest.parseColor("darkkhak\\69 ") is "rgb(189, 183, 107)"
-PASS colorTest.parseColor("darkkhak") is "parse error"
-PASS colorTest.parseColor("darKKhaKi") is "parse error"
-PASS colorTest.parseColor("darkmagenta") is "rgb(139, 0, 139)"
-PASS colorTest.parseColor("dArkmagenta") is "rgb(139, 0, 139)"
-PASS colorTest.parseColor("d\\61 rkmagenta") is "rgb(139, 0, 139)"
-PASS colorTest.parseColor("drkmagenta") is "parse error"
-PASS colorTest.parseColor("darKmagenta") is "parse error"
-PASS colorTest.parseColor("darkolivegreen") is "rgb(85, 107, 47)"
-PASS colorTest.parseColor("darkOlivegreen") is "rgb(85, 107, 47)"
-PASS colorTest.parseColor("dark\\olivegreen") is "rgb(85, 107, 47)"
-PASS colorTest.parseColor("dark\\6F livegreen") is "rgb(85, 107, 47)"
-PASS colorTest.parseColor("darklivegreen") is "parse error"
-PASS colorTest.parseColor("darKolivegreen") is "parse error"
-PASS colorTest.parseColor("darkorange") is "rgb(255, 140, 0)"
-PASS colorTest.parseColor("darkoraNge") is "rgb(255, 140, 0)"
-PASS colorTest.parseColor("darkora\\nge") is "rgb(255, 140, 0)"
-PASS colorTest.parseColor("darkora\\6E ge") is "rgb(255, 140, 0)"
-PASS colorTest.parseColor("darkorage") is "parse error"
-PASS colorTest.parseColor("darKorange") is "parse error"
-PASS colorTest.parseColor("darkorchid") is "rgb(153, 50, 204)"
-PASS colorTest.parseColor("darkorchId") is "rgb(153, 50, 204)"
-PASS colorTest.parseColor("darkorch\\id") is "rgb(153, 50, 204)"
-PASS colorTest.parseColor("darkorch\\69 d") is "rgb(153, 50, 204)"
-PASS colorTest.parseColor("darkorchd") is "parse error"
-PASS colorTest.parseColor("darKorchid") is "parse error"
-PASS colorTest.parseColor("darkred") is "rgb(139, 0, 0)"
-PASS colorTest.parseColor("Darkred") is "rgb(139, 0, 0)"
-PASS colorTest.parseColor("\\64 arkred") is "rgb(139, 0, 0)"
-PASS colorTest.parseColor("arkred") is "parse error"
-PASS colorTest.parseColor("darKred") is "parse error"
-PASS colorTest.parseColor("darksalmon") is "rgb(233, 150, 122)"
-PASS colorTest.parseColor("Darksalmon") is "rgb(233, 150, 122)"
-PASS colorTest.parseColor("\\64 arksalmon") is "rgb(233, 150, 122)"
-PASS colorTest.parseColor("arksalmon") is "parse error"
-PASS colorTest.parseColor("darKsalmon") is "parse error"
-PASS colorTest.parseColor("darkseagreen") is "rgb(143, 188, 143)"
-PASS colorTest.parseColor("darKseagreen") is "rgb(143, 188, 143)"
-PASS colorTest.parseColor("dar\\kseagreen") is "rgb(143, 188, 143)"
-PASS colorTest.parseColor("dar\\6B seagreen") is "rgb(143, 188, 143)"
-PASS colorTest.parseColor("darseagreen") is "parse error"
-PASS colorTest.parseColor("darKseagreen") is "parse error"
-PASS colorTest.parseColor("darkslateblue") is "rgb(72, 61, 139)"
-PASS colorTest.parseColor("Darkslateblue") is "rgb(72, 61, 139)"
-PASS colorTest.parseColor("\\64 arkslateblue") is "rgb(72, 61, 139)"
-PASS colorTest.parseColor("arkslateblue") is "parse error"
-PASS colorTest.parseColor("darKslateblue") is "parse error"
-PASS colorTest.parseColor("darkslategray") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("dArkslategray") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("d\\61 rkslategray") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("drkslategray") is "parse error"
-PASS colorTest.parseColor("darKslategray") is "parse error"
-PASS colorTest.parseColor("darkslategrey") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("daRkslategrey") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("da\\rkslategrey") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("da\\72 kslategrey") is "rgb(47, 79, 79)"
-PASS colorTest.parseColor("dakslategrey") is "parse error"
-PASS colorTest.parseColor("darKslategrey") is "parse error"
-PASS colorTest.parseColor("darkturquoise") is "rgb(0, 206, 209)"
-PASS colorTest.parseColor("darKturquoise") is "rgb(0, 206, 209)"
-PASS colorTest.parseColor("dar\\kturquoise") is "rgb(0, 206, 209)"
-PASS colorTest.parseColor("dar\\6B turquoise") is "rgb(0, 206, 209)"
-PASS colorTest.parseColor("darturquoise") is "parse error"
-PASS colorTest.parseColor("darKturquoise") is "parse error"
-PASS colorTest.parseColor("darkviolet") is "rgb(148, 0, 211)"
-PASS colorTest.parseColor("darkviOlet") is "rgb(148, 0, 211)"
-PASS colorTest.parseColor("darkvi\\olet") is "rgb(148, 0, 211)"
-PASS colorTest.parseColor("darkvi\\6F let") is "rgb(148, 0, 211)"
-PASS colorTest.parseColor("darkvilet") is "parse error"
-PASS colorTest.parseColor("darKviolet") is "parse error"
-PASS colorTest.parseColor("deeppink") is "rgb(255, 20, 147)"
-PASS colorTest.parseColor("dEeppink") is "rgb(255, 20, 147)"
-PASS colorTest.parseColor("d\\65 eppink") is "rgb(255, 20, 147)"
-PASS colorTest.parseColor("deppink") is "parse error"
-PASS colorTest.parseColor("deeppinK") is "parse error"
-PASS colorTest.parseColor("deepskyblue") is "rgb(0, 191, 255)"
-PASS colorTest.parseColor("deePskyblue") is "rgb(0, 191, 255)"
-PASS colorTest.parseColor("dee\\pskyblue") is "rgb(0, 191, 255)"
-PASS colorTest.parseColor("dee\\70 skyblue") is "rgb(0, 191, 255)"
-PASS colorTest.parseColor("deeskyblue") is "parse error"
-PASS colorTest.parseColor("deepsKyblue") is "parse error"
-PASS colorTest.parseColor("dimgray") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimGray") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dim\\gray") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dim\\67 ray") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimray") is "parse error"
-PASS colorTest.parseColor("dimgrey") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimgRey") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimg\\rey") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimg\\72 ey") is "rgb(105, 105, 105)"
-PASS colorTest.parseColor("dimgey") is "parse error"
-PASS colorTest.parseColor("dodgerblue") is "rgb(30, 144, 255)"
-PASS colorTest.parseColor("dOdgerblue") is "rgb(30, 144, 255)"
-PASS colorTest.parseColor("d\\odgerblue") is "rgb(30, 144, 255)"
-PASS colorTest.parseColor("d\\6F dgerblue") is "rgb(30, 144, 255)"
-PASS colorTest.parseColor("ddgerblue") is "parse error"
-PASS colorTest.parseColor("firebrick") is "rgb(178, 34, 34)"
-PASS colorTest.parseColor("firebricK") is "rgb(178, 34, 34)"
-PASS colorTest.parseColor("firebric\\k") is "rgb(178, 34, 34)"
-PASS colorTest.parseColor("firebric\\6B ") is "rgb(178, 34, 34)"
-PASS colorTest.parseColor("firebric") is "parse error"
-PASS colorTest.parseColor("firebricK") is "parse error"
-PASS colorTest.parseColor("floralwhite") is "rgb(255, 250, 240)"
-PASS colorTest.parseColor("floralwhIte") is "rgb(255, 250, 240)"
-PASS colorTest.parseColor("floralwh\\ite") is "rgb(255, 250, 240)"
-PASS colorTest.parseColor("floralwh\\69 te") is "rgb(255, 250, 240)"
-PASS colorTest.parseColor("floralwhte") is "parse error"
-PASS colorTest.parseColor("forestgreen") is "rgb(34, 139, 34)"
-PASS colorTest.parseColor("forestgreEn") is "rgb(34, 139, 34)"
-PASS colorTest.parseColor("forestgre\\65 n") is "rgb(34, 139, 34)"
-PASS colorTest.parseColor("forestgren") is "parse error"
-PASS colorTest.parseColor("fuchsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("fuChsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("fu\\63 hsia") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("fuhsia") is "parse error"
-PASS colorTest.parseColor("gainsboro") is "rgb(220, 220, 220)"
-PASS colorTest.parseColor("gaiNsboro") is "rgb(220, 220, 220)"
-PASS colorTest.parseColor("gai\\nsboro") is "rgb(220, 220, 220)"
-PASS colorTest.parseColor("gai\\6E sboro") is "rgb(220, 220, 220)"
-PASS colorTest.parseColor("gaisboro") is "parse error"
-PASS colorTest.parseColor("ghostwhite") is "rgb(248, 248, 255)"
-PASS colorTest.parseColor("ghostwhIte") is "rgb(248, 248, 255)"
-PASS colorTest.parseColor("ghostwh\\ite") is "rgb(248, 248, 255)"
-PASS colorTest.parseColor("ghostwh\\69 te") is "rgb(248, 248, 255)"
-PASS colorTest.parseColor("ghostwhte") is "parse error"
-PASS colorTest.parseColor("gold") is "rgb(255, 215, 0)"
-PASS colorTest.parseColor("Gold") is "rgb(255, 215, 0)"
-PASS colorTest.parseColor("\\gold") is "rgb(255, 215, 0)"
-PASS colorTest.parseColor("\\67 old") is "rgb(255, 215, 0)"
-PASS colorTest.parseColor("old") is "parse error"
-PASS colorTest.parseColor("goldenrod") is "rgb(218, 165, 32)"
-PASS colorTest.parseColor("goldenRod") is "rgb(218, 165, 32)"
-PASS colorTest.parseColor("golden\\rod") is "rgb(218, 165, 32)"
-PASS colorTest.parseColor("golden\\72 od") is "rgb(218, 165, 32)"
-PASS colorTest.parseColor("goldenod") is "parse error"
-PASS colorTest.parseColor("gray") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("grAy") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gr\\61 y") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gry") is "parse error"
-PASS colorTest.parseColor("green") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("gReen") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("g\\reen") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("g\\72 een") is "rgb(0, 128, 0)"
-PASS colorTest.parseColor("geen") is "parse error"
-PASS colorTest.parseColor("greenyellow") is "rgb(173, 255, 47)"
-PASS colorTest.parseColor("greenyEllow") is "rgb(173, 255, 47)"
-PASS colorTest.parseColor("greeny\\65 llow") is "rgb(173, 255, 47)"
-PASS colorTest.parseColor("greenyllow") is "parse error"
-PASS colorTest.parseColor("grey") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gRey") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("g\\rey") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("g\\72 ey") is "rgb(128, 128, 128)"
-PASS colorTest.parseColor("gey") is "parse error"
-PASS colorTest.parseColor("honeydew") is "rgb(240, 255, 240)"
-PASS colorTest.parseColor("hoNeydew") is "rgb(240, 255, 240)"
-PASS colorTest.parseColor("ho\\neydew") is "rgb(240, 255, 240)"
-PASS colorTest.parseColor("ho\\6E eydew") is "rgb(240, 255, 240)"
-PASS colorTest.parseColor("hoeydew") is "parse error"
-PASS colorTest.parseColor("hotpink") is "rgb(255, 105, 180)"
-PASS colorTest.parseColor("hotpiNk") is "rgb(255, 105, 180)"
-PASS colorTest.parseColor("hotpi\\nk") is "rgb(255, 105, 180)"
-PASS colorTest.parseColor("hotpi\\6E k") is "rgb(255, 105, 180)"
-PASS colorTest.parseColor("hotpik") is "parse error"
-PASS colorTest.parseColor("hotpinK") is "parse error"
-PASS colorTest.parseColor("indianred") is "rgb(205, 92, 92)"
-PASS colorTest.parseColor("indiAnred") is "rgb(205, 92, 92)"
-PASS colorTest.parseColor("indi\\61 nred") is "rgb(205, 92, 92)"
-PASS colorTest.parseColor("indinred") is "parse error"
-PASS colorTest.parseColor("indigo") is "rgb(75, 0, 130)"
-PASS colorTest.parseColor("indigO") is "rgb(75, 0, 130)"
-PASS colorTest.parseColor("indig\\o") is "rgb(75, 0, 130)"
-PASS colorTest.parseColor("indig\\6F ") is "rgb(75, 0, 130)"
-PASS colorTest.parseColor("indig") is "parse error"
-PASS colorTest.parseColor("ivory") is "rgb(255, 255, 240)"
-PASS colorTest.parseColor("ivoRy") is "rgb(255, 255, 240)"
-PASS colorTest.parseColor("ivo\\ry") is "rgb(255, 255, 240)"
-PASS colorTest.parseColor("ivo\\72 y") is "rgb(255, 255, 240)"
-PASS colorTest.parseColor("ivoy") is "parse error"
-PASS colorTest.parseColor("khaki") is "rgb(240, 230, 140)"
-PASS colorTest.parseColor("khakI") is "rgb(240, 230, 140)"
-PASS colorTest.parseColor("khak\\i") is "rgb(240, 230, 140)"
-PASS colorTest.parseColor("khak\\69 ") is "rgb(240, 230, 140)"
-PASS colorTest.parseColor("khak") is "parse error"
-PASS colorTest.parseColor("KhaKi") is "parse error"
-PASS colorTest.parseColor("lavender") is "rgb(230, 230, 250)"
-PASS colorTest.parseColor("Lavender") is "rgb(230, 230, 250)"
-PASS colorTest.parseColor("\\lavender") is "rgb(230, 230, 250)"
-PASS colorTest.parseColor("\\6C avender") is "rgb(230, 230, 250)"
-PASS colorTest.parseColor("avender") is "parse error"
-PASS colorTest.parseColor("lavenderblush") is "rgb(255, 240, 245)"
-PASS colorTest.parseColor("lavEnderblush") is "rgb(255, 240, 245)"
-PASS colorTest.parseColor("lav\\65 nderblush") is "rgb(255, 240, 245)"
-PASS colorTest.parseColor("lavnderblush") is "parse error"
-PASS colorTest.parseColor("lawngreen") is "rgb(124, 252, 0)"
-PASS colorTest.parseColor("lAwngreen") is "rgb(124, 252, 0)"
-PASS colorTest.parseColor("l\\61 wngreen") is "rgb(124, 252, 0)"
-PASS colorTest.parseColor("lwngreen") is "parse error"
-PASS colorTest.parseColor("lemonchiffon") is "rgb(255, 250, 205)"
-PASS colorTest.parseColor("lemonchiffoN") is "rgb(255, 250, 205)"
-PASS colorTest.parseColor("lemonchiffo\\n") is "rgb(255, 250, 205)"
-PASS colorTest.parseColor("lemonchiffo\\6E ") is "rgb(255, 250, 205)"
-PASS colorTest.parseColor("lemonchiffo") is "parse error"
-PASS colorTest.parseColor("lightblue") is "rgb(173, 216, 230)"
-PASS colorTest.parseColor("ligHtblue") is "rgb(173, 216, 230)"
-PASS colorTest.parseColor("lig\\htblue") is "rgb(173, 216, 230)"
-PASS colorTest.parseColor("lig\\68 tblue") is "rgb(173, 216, 230)"
-PASS colorTest.parseColor("ligtblue") is "parse error"
-PASS colorTest.parseColor("lightcoral") is "rgb(240, 128, 128)"
-PASS colorTest.parseColor("lightCoral") is "rgb(240, 128, 128)"
-PASS colorTest.parseColor("light\\63 oral") is "rgb(240, 128, 128)"
-PASS colorTest.parseColor("lightoral") is "parse error"
-PASS colorTest.parseColor("lightcyan") is "rgb(224, 255, 255)"
-PASS colorTest.parseColor("lightCyan") is "rgb(224, 255, 255)"
-PASS colorTest.parseColor("light\\63 yan") is "rgb(224, 255, 255)"
-PASS colorTest.parseColor("lightyan") is "parse error"
-PASS colorTest.parseColor("lightgoldenrodyellow") is "rgb(250, 250, 210)"
-PASS colorTest.parseColor("lightgoLdenrodyellow") is "rgb(250, 250, 210)"
-PASS colorTest.parseColor("lightgo\\ldenrodyellow") is "rgb(250, 250, 210)"
-PASS colorTest.parseColor("lightgo\\6C denrodyellow") is "rgb(250, 250, 210)"
-PASS colorTest.parseColor("lightgodenrodyellow") is "parse error"
-PASS colorTest.parseColor("lightgray") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("lightgrAy") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("lightgr\\61 y") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("lightgry") is "parse error"
-PASS colorTest.parseColor("lightgreen") is "rgb(144, 238, 144)"
-PASS colorTest.parseColor("lightgreeN") is "rgb(144, 238, 144)"
-PASS colorTest.parseColor("lightgree\\n") is "rgb(144, 238, 144)"
-PASS colorTest.parseColor("lightgree\\6E ") is "rgb(144, 238, 144)"
-PASS colorTest.parseColor("lightgree") is "parse error"
-PASS colorTest.parseColor("lightgrey") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("Lightgrey") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("\\lightgrey") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("\\6C ightgrey") is "rgb(211, 211, 211)"
-PASS colorTest.parseColor("ightgrey") is "parse error"
-PASS colorTest.parseColor("lightpink") is "rgb(255, 182, 193)"
-PASS colorTest.parseColor("lIghtpink") is "rgb(255, 182, 193)"
-PASS colorTest.parseColor("l\\ightpink") is "rgb(255, 182, 193)"
-PASS colorTest.parseColor("l\\69 ghtpink") is "rgb(255, 182, 193)"
-PASS colorTest.parseColor("lghtpink") is "parse error"
-PASS colorTest.parseColor("lightpinK") is "parse error"
-PASS colorTest.parseColor("lightsalmon") is "rgb(255, 160, 122)"
-PASS colorTest.parseColor("lighTsalmon") is "rgb(255, 160, 122)"
-PASS colorTest.parseColor("ligh\\tsalmon") is "rgb(255, 160, 122)"
-PASS colorTest.parseColor("ligh\\74 salmon") is "rgb(255, 160, 122)"
-PASS colorTest.parseColor("lighsalmon") is "parse error"
-PASS colorTest.parseColor("lightseagreen") is "rgb(32, 178, 170)"
-PASS colorTest.parseColor("liGhtseagreen") is "rgb(32, 178, 170)"
-PASS colorTest.parseColor("li\\ghtseagreen") is "rgb(32, 178, 170)"
-PASS colorTest.parseColor("li\\67 htseagreen") is "rgb(32, 178, 170)"
-PASS colorTest.parseColor("lihtseagreen") is "parse error"
-PASS colorTest.parseColor("lightskyblue") is "rgb(135, 206, 250)"
-PASS colorTest.parseColor("lightskyblUe") is "rgb(135, 206, 250)"
-PASS colorTest.parseColor("lightskybl\\ue") is "rgb(135, 206, 250)"
-PASS colorTest.parseColor("lightskybl\\75 e") is "rgb(135, 206, 250)"
-PASS colorTest.parseColor("lightskyble") is "parse error"
-PASS colorTest.parseColor("lightsKyblue") is "parse error"
-PASS colorTest.parseColor("lightslategray") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslategRay") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslateg\\ray") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslateg\\72 ay") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslategay") is "parse error"
-PASS colorTest.parseColor("lightslategrey") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslategrEy") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslategr\\65 y") is "rgb(119, 136, 153)"
-PASS colorTest.parseColor("lightslategry") is "parse error"
-PASS colorTest.parseColor("lightsteelblue") is "rgb(176, 196, 222)"
-PASS colorTest.parseColor("lightsteelbluE") is "rgb(176, 196, 222)"
-PASS colorTest.parseColor("lightsteelblu\\65 ") is "rgb(176, 196, 222)"
-PASS colorTest.parseColor("lightsteelblu") is "parse error"
-PASS colorTest.parseColor("lightyellow") is "rgb(255, 255, 224)"
-PASS colorTest.parseColor("lightyelloW") is "rgb(255, 255, 224)"
-PASS colorTest.parseColor("lightyello\\w") is "rgb(255, 255, 224)"
-PASS colorTest.parseColor("lightyello\\77 ") is "rgb(255, 255, 224)"
-PASS colorTest.parseColor("lightyello") is "parse error"
-PASS colorTest.parseColor("lime") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("limE") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("lim\\65 ") is "rgb(0, 255, 0)"
-PASS colorTest.parseColor("lim") is "parse error"
-PASS colorTest.parseColor("limegreen") is "rgb(50, 205, 50)"
-PASS colorTest.parseColor("lImegreen") is "rgb(50, 205, 50)"
-PASS colorTest.parseColor("l\\imegreen") is "rgb(50, 205, 50)"
-PASS colorTest.parseColor("l\\69 megreen") is "rgb(50, 205, 50)"
-PASS colorTest.parseColor("lmegreen") is "parse error"
-PASS colorTest.parseColor("linen") is "rgb(250, 240, 230)"
-PASS colorTest.parseColor("lInen") is "rgb(250, 240, 230)"
-PASS colorTest.parseColor("l\\inen") is "rgb(250, 240, 230)"
-PASS colorTest.parseColor("l\\69 nen") is "rgb(250, 240, 230)"
-PASS colorTest.parseColor("lnen") is "parse error"
-PASS colorTest.parseColor("magenta") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("mageNta") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("mage\\nta") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("mage\\6E ta") is "rgb(255, 0, 255)"
-PASS colorTest.parseColor("mageta") is "parse error"
-PASS colorTest.parseColor("maroon") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("mAroon") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("m\\61 roon") is "rgb(128, 0, 0)"
-PASS colorTest.parseColor("mroon") is "parse error"
-PASS colorTest.parseColor("mediumaquamarine") is "rgb(102, 205, 170)"
-PASS colorTest.parseColor("mediumaqUamarine") is "rgb(102, 205, 170)"
-PASS colorTest.parseColor("mediumaq\\uamarine") is "rgb(102, 205, 170)"
-PASS colorTest.parseColor("mediumaq\\75 amarine") is "rgb(102, 205, 170)"
-PASS colorTest.parseColor("mediumaqamarine") is "parse error"
-PASS colorTest.parseColor("mediumblue") is "rgb(0, 0, 205)"
-PASS colorTest.parseColor("mediuMblue") is "rgb(0, 0, 205)"
-PASS colorTest.parseColor("mediu\\mblue") is "rgb(0, 0, 205)"
-PASS colorTest.parseColor("mediu\\6D blue") is "rgb(0, 0, 205)"
-PASS colorTest.parseColor("mediublue") is "parse error"
-PASS colorTest.parseColor("mediumorchid") is "rgb(186, 85, 211)"
-PASS colorTest.parseColor("mediumorchId") is "rgb(186, 85, 211)"
-PASS colorTest.parseColor("mediumorch\\id") is "rgb(186, 85, 211)"
-PASS colorTest.parseColor("mediumorch\\69 d") is "rgb(186, 85, 211)"
-PASS colorTest.parseColor("mediumorchd") is "parse error"
-PASS colorTest.parseColor("mediumpurple") is "rgb(147, 112, 219)"
-PASS colorTest.parseColor("mediumpurplE") is "rgb(147, 112, 219)"
-PASS colorTest.parseColor("mediumpurpl\\65 ") is "rgb(147, 112, 219)"
-PASS colorTest.parseColor("mediumpurpl") is "parse error"
-PASS colorTest.parseColor("mediumseagreen") is "rgb(60, 179, 113)"
-PASS colorTest.parseColor("mediumseagReen") is "rgb(60, 179, 113)"
-PASS colorTest.parseColor("mediumseag\\reen") is "rgb(60, 179, 113)"
-PASS colorTest.parseColor("mediumseag\\72 een") is "rgb(60, 179, 113)"
-PASS colorTest.parseColor("mediumseageen") is "parse error"
-PASS colorTest.parseColor("mediumslateblue") is "rgb(123, 104, 238)"
-PASS colorTest.parseColor("mediUmslateblue") is "rgb(123, 104, 238)"
-PASS colorTest.parseColor("medi\\umslateblue") is "rgb(123, 104, 238)"
-PASS colorTest.parseColor("medi\\75 mslateblue") is "rgb(123, 104, 238)"
-PASS colorTest.parseColor("medimslateblue") is "parse error"
-PASS colorTest.parseColor("mediumspringgreen") is "rgb(0, 250, 154)"
-PASS colorTest.parseColor("mediumspRinggreen") is "rgb(0, 250, 154)"
-PASS colorTest.parseColor("mediumsp\\ringgreen") is "rgb(0, 250, 154)"
-PASS colorTest.parseColor("mediumsp\\72 inggreen") is "rgb(0, 250, 154)"
-PASS colorTest.parseColor("mediumspinggreen") is "parse error"
-PASS colorTest.parseColor("mediumturquoise") is "rgb(72, 209, 204)"
-PASS colorTest.parseColor("mediumTurquoise") is "rgb(72, 209, 204)"
-PASS colorTest.parseColor("medium\\turquoise") is "rgb(72, 209, 204)"
-PASS colorTest.parseColor("medium\\74 urquoise") is "rgb(72, 209, 204)"
-PASS colorTest.parseColor("mediumurquoise") is "parse error"
-PASS colorTest.parseColor("mediumvioletred") is "rgb(199, 21, 133)"
-PASS colorTest.parseColor("mediumvIoletred") is "rgb(199, 21, 133)"
-PASS colorTest.parseColor("mediumv\\ioletred") is "rgb(199, 21, 133)"
-PASS colorTest.parseColor("mediumv\\69 oletred") is "rgb(199, 21, 133)"
-PASS colorTest.parseColor("mediumvoletred") is "parse error"
-PASS colorTest.parseColor("midnightblue") is "rgb(25, 25, 112)"
-PASS colorTest.parseColor("midniGhtblue") is "rgb(25, 25, 112)"
-PASS colorTest.parseColor("midni\\ghtblue") is "rgb(25, 25, 112)"
-PASS colorTest.parseColor("midni\\67 htblue") is "rgb(25, 25, 112)"
-PASS colorTest.parseColor("midnihtblue") is "parse error"
-PASS colorTest.parseColor("mintcream") is "rgb(245, 255, 250)"
-PASS colorTest.parseColor("mintcrEam") is "rgb(245, 255, 250)"
-PASS colorTest.parseColor("mintcr\\65 am") is "rgb(245, 255, 250)"
-PASS colorTest.parseColor("mintcram") is "parse error"
-PASS colorTest.parseColor("mistyrose") is "rgb(255, 228, 225)"
-PASS colorTest.parseColor("mistyroSe") is "rgb(255, 228, 225)"
-PASS colorTest.parseColor("mistyro\\se") is "rgb(255, 228, 225)"
-PASS colorTest.parseColor("mistyro\\73 e") is "rgb(255, 228, 225)"
-PASS colorTest.parseColor("mistyroe") is "parse error"
-PASS colorTest.parseColor("moccasin") is "rgb(255, 228, 181)"
-PASS colorTest.parseColor("moccAsin") is "rgb(255, 228, 181)"
-PASS colorTest.parseColor("mocc\\61 sin") is "rgb(255, 228, 181)"
-PASS colorTest.parseColor("moccsin") is "parse error"
-PASS colorTest.parseColor("navajowhite") is "rgb(255, 222, 173)"
-PASS colorTest.parseColor("navajowHite") is "rgb(255, 222, 173)"
-PASS colorTest.parseColor("navajow\\hite") is "rgb(255, 222, 173)"
-PASS colorTest.parseColor("navajow\\68 ite") is "rgb(255, 222, 173)"
-PASS colorTest.parseColor("navajowite") is "parse error"
-PASS colorTest.parseColor("navy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("naVy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("na\\vy") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("na\\76 y") is "rgb(0, 0, 128)"
-PASS colorTest.parseColor("nay") is "parse error"
-PASS colorTest.parseColor("oldlace") is "rgb(253, 245, 230)"
-PASS colorTest.parseColor("Oldlace") is "rgb(253, 245, 230)"
-PASS colorTest.parseColor("\\oldlace") is "rgb(253, 245, 230)"
-PASS colorTest.parseColor("\\6F ldlace") is "rgb(253, 245, 230)"
-PASS colorTest.parseColor("ldlace") is "parse error"
-PASS colorTest.parseColor("olive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("Olive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("\\olive") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("\\6F live") is "rgb(128, 128, 0)"
-PASS colorTest.parseColor("live") is "parse error"
-PASS colorTest.parseColor("olivedrab") is "rgb(107, 142, 35)"
-PASS colorTest.parseColor("olivEdrab") is "rgb(107, 142, 35)"
-PASS colorTest.parseColor("oliv\\65 drab") is "rgb(107, 142, 35)"
-PASS colorTest.parseColor("olivdrab") is "parse error"
-PASS colorTest.parseColor("orange") is "rgb(255, 165, 0)"
-PASS colorTest.parseColor("orAnge") is "rgb(255, 165, 0)"
-PASS colorTest.parseColor("or\\61 nge") is "rgb(255, 165, 0)"
-PASS colorTest.parseColor("ornge") is "parse error"
-PASS colorTest.parseColor("orangered") is "rgb(255, 69, 0)"
-PASS colorTest.parseColor("orangeRed") is "rgb(255, 69, 0)"
-PASS colorTest.parseColor("orange\\red") is "rgb(255, 69, 0)"
-PASS colorTest.parseColor("orange\\72 ed") is "rgb(255, 69, 0)"
-PASS colorTest.parseColor("orangeed") is "parse error"
-PASS colorTest.parseColor("orchid") is "rgb(218, 112, 214)"
-PASS colorTest.parseColor("orchId") is "rgb(218, 112, 214)"
-PASS colorTest.parseColor("orch\\id") is "rgb(218, 112, 214)"
-PASS colorTest.parseColor("orch\\69 d") is "rgb(218, 112, 214)"
-PASS colorTest.parseColor("orchd") is "parse error"
-PASS colorTest.parseColor("palegoldenrod") is "rgb(238, 232, 170)"
-PASS colorTest.parseColor("palegoldEnrod") is "rgb(238, 232, 170)"
-PASS colorTest.parseColor("palegold\\65 nrod") is "rgb(238, 232, 170)"
-PASS colorTest.parseColor("palegoldnrod") is "parse error"
-PASS colorTest.parseColor("palegreen") is "rgb(152, 251, 152)"
-PASS colorTest.parseColor("Palegreen") is "rgb(152, 251, 152)"
-PASS colorTest.parseColor("\\palegreen") is "rgb(152, 251, 152)"
-PASS colorTest.parseColor("\\70 alegreen") is "rgb(152, 251, 152)"
-PASS colorTest.parseColor("alegreen") is "parse error"
-PASS colorTest.parseColor("paleturquoise") is "rgb(175, 238, 238)"
-PASS colorTest.parseColor("paleturquoIse") is "rgb(175, 238, 238)"
-PASS colorTest.parseColor("paleturquo\\ise") is "rgb(175, 238, 238)"
-PASS colorTest.parseColor("paleturquo\\69 se") is "rgb(175, 238, 238)"
-PASS colorTest.parseColor("paleturquose") is "parse error"
-PASS colorTest.parseColor("palevioletred") is "rgb(219, 112, 147)"
-PASS colorTest.parseColor("palevioletrEd") is "rgb(219, 112, 147)"
-PASS colorTest.parseColor("palevioletr\\65 d") is "rgb(219, 112, 147)"
-PASS colorTest.parseColor("palevioletrd") is "parse error"
-PASS colorTest.parseColor("papayawhip") is "rgb(255, 239, 213)"
-PASS colorTest.parseColor("papayawhiP") is "rgb(255, 239, 213)"
-PASS colorTest.parseColor("papayawhi\\p") is "rgb(255, 239, 213)"
-PASS colorTest.parseColor("papayawhi\\70 ") is "rgb(255, 239, 213)"
-PASS colorTest.parseColor("papayawhi") is "parse error"
-PASS colorTest.parseColor("peachpuff") is "rgb(255, 218, 185)"
-PASS colorTest.parseColor("peacHpuff") is "rgb(255, 218, 185)"
-PASS colorTest.parseColor("peac\\hpuff") is "rgb(255, 218, 185)"
-PASS colorTest.parseColor("peac\\68 puff") is "rgb(255, 218, 185)"
-PASS colorTest.parseColor("peacpuff") is "parse error"
-PASS colorTest.parseColor("peru") is "rgb(205, 133, 63)"
-PASS colorTest.parseColor("perU") is "rgb(205, 133, 63)"
-PASS colorTest.parseColor("per\\u") is "rgb(205, 133, 63)"
-PASS colorTest.parseColor("per\\75 ") is "rgb(205, 133, 63)"
-PASS colorTest.parseColor("per") is "parse error"
-PASS colorTest.parseColor("pink") is "rgb(255, 192, 203)"
-PASS colorTest.parseColor("Pink") is "rgb(255, 192, 203)"
-PASS colorTest.parseColor("\\pink") is "rgb(255, 192, 203)"
-PASS colorTest.parseColor("\\70 ink") is "rgb(255, 192, 203)"
-PASS colorTest.parseColor("ink") is "parse error"
-PASS colorTest.parseColor("pinK") is "parse error"
-PASS colorTest.parseColor("plum") is "rgb(221, 160, 221)"
-PASS colorTest.parseColor("pLum") is "rgb(221, 160, 221)"
-PASS colorTest.parseColor("p\\lum") is "rgb(221, 160, 221)"
-PASS colorTest.parseColor("p\\6C um") is "rgb(221, 160, 221)"
-PASS colorTest.parseColor("pum") is "parse error"
-PASS colorTest.parseColor("powderblue") is "rgb(176, 224, 230)"
-PASS colorTest.parseColor("powdErblue") is "rgb(176, 224, 230)"
-PASS colorTest.parseColor("powd\\65 rblue") is "rgb(176, 224, 230)"
-PASS colorTest.parseColor("powdrblue") is "parse error"
-PASS colorTest.parseColor("purple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("purPle") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("pur\\ple") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("pur\\70 le") is "rgb(128, 0, 128)"
-PASS colorTest.parseColor("purle") is "parse error"
-PASS colorTest.parseColor("red") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("rEd") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("r\\65 d") is "rgb(255, 0, 0)"
-PASS colorTest.parseColor("rd") is "parse error"
-PASS colorTest.parseColor("rosybrown") is "rgb(188, 143, 143)"
-PASS colorTest.parseColor("roSybrown") is "rgb(188, 143, 143)"
-PASS colorTest.parseColor("ro\\sybrown") is "rgb(188, 143, 143)"
-PASS colorTest.parseColor("ro\\73 ybrown") is "rgb(188, 143, 143)"
-PASS colorTest.parseColor("roybrown") is "parse error"
-PASS colorTest.parseColor("royalblue") is "rgb(65, 105, 225)"
-PASS colorTest.parseColor("royAlblue") is "rgb(65, 105, 225)"
-PASS colorTest.parseColor("roy\\61 lblue") is "rgb(65, 105, 225)"
-PASS colorTest.parseColor("roylblue") is "parse error"
-PASS colorTest.parseColor("saddlebrown") is "rgb(139, 69, 19)"
-PASS colorTest.parseColor("saddlebRown") is "rgb(139, 69, 19)"
-PASS colorTest.parseColor("saddleb\\rown") is "rgb(139, 69, 19)"
-PASS colorTest.parseColor("saddleb\\72 own") is "rgb(139, 69, 19)"
-PASS colorTest.parseColor("saddlebown") is "parse error"
-PASS colorTest.parseColor("salmon") is "rgb(250, 128, 114)"
-PASS colorTest.parseColor("saLmon") is "rgb(250, 128, 114)"
-PASS colorTest.parseColor("sa\\lmon") is "rgb(250, 128, 114)"
-PASS colorTest.parseColor("sa\\6C mon") is "rgb(250, 128, 114)"
-PASS colorTest.parseColor("samon") is "parse error"
-PASS colorTest.parseColor("sandybrown") is "rgb(244, 164, 96)"
-PASS colorTest.parseColor("sAndybrown") is "rgb(244, 164, 96)"
-PASS colorTest.parseColor("s\\61 ndybrown") is "rgb(244, 164, 96)"
-PASS colorTest.parseColor("sndybrown") is "parse error"
-PASS colorTest.parseColor("seagreen") is "rgb(46, 139, 87)"
-PASS colorTest.parseColor("seagreEn") is "rgb(46, 139, 87)"
-PASS colorTest.parseColor("seagre\\65 n") is "rgb(46, 139, 87)"
-PASS colorTest.parseColor("seagren") is "parse error"
-PASS colorTest.parseColor("seashell") is "rgb(255, 245, 238)"
-PASS colorTest.parseColor("seashelL") is "rgb(255, 245, 238)"
-PASS colorTest.parseColor("seashel\\l") is "rgb(255, 245, 238)"
-PASS colorTest.parseColor("seashel\\6C ") is "rgb(255, 245, 238)"
-PASS colorTest.parseColor("seashel") is "parse error"
-PASS colorTest.parseColor("sienna") is "rgb(160, 82, 45)"
-PASS colorTest.parseColor("Sienna") is "rgb(160, 82, 45)"
-PASS colorTest.parseColor("\\sienna") is "rgb(160, 82, 45)"
-PASS colorTest.parseColor("\\73 ienna") is "rgb(160, 82, 45)"
-PASS colorTest.parseColor("ienna") is "parse error"
-PASS colorTest.parseColor("silver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("sIlver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("s\\ilver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("s\\69 lver") is "rgb(192, 192, 192)"
-PASS colorTest.parseColor("slver") is "parse error"
-PASS colorTest.parseColor("skyblue") is "rgb(135, 206, 235)"
-PASS colorTest.parseColor("skybluE") is "rgb(135, 206, 235)"
-PASS colorTest.parseColor("skyblu\\65 ") is "rgb(135, 206, 235)"
-PASS colorTest.parseColor("skyblu") is "parse error"
-PASS colorTest.parseColor("sKyblue") is "parse error"
-PASS colorTest.parseColor("slateblue") is "rgb(106, 90, 205)"
-PASS colorTest.parseColor("slaTeblue") is "rgb(106, 90, 205)"
-PASS colorTest.parseColor("sla\\teblue") is "rgb(106, 90, 205)"
-PASS colorTest.parseColor("sla\\74 eblue") is "rgb(106, 90, 205)"
-PASS colorTest.parseColor("slaeblue") is "parse error"
-PASS colorTest.parseColor("slategray") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slatEgray") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slat\\65 gray") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slatgray") is "parse error"
-PASS colorTest.parseColor("slategrey") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slateGrey") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slate\\grey") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slate\\67 rey") is "rgb(112, 128, 144)"
-PASS colorTest.parseColor("slaterey") is "parse error"
-PASS colorTest.parseColor("snow") is "rgb(255, 250, 250)"
-PASS colorTest.parseColor("snOw") is "rgb(255, 250, 250)"
-PASS colorTest.parseColor("sn\\ow") is "rgb(255, 250, 250)"
-PASS colorTest.parseColor("sn\\6F w") is "rgb(255, 250, 250)"
-PASS colorTest.parseColor("snw") is "parse error"
-PASS colorTest.parseColor("springgreen") is "rgb(0, 255, 127)"
-PASS colorTest.parseColor("springgrEen") is "rgb(0, 255, 127)"
-PASS colorTest.parseColor("springgr\\65 en") is "rgb(0, 255, 127)"
-PASS colorTest.parseColor("springgren") is "parse error"
-PASS colorTest.parseColor("steelblue") is "rgb(70, 130, 180)"
-PASS colorTest.parseColor("steelbluE") is "rgb(70, 130, 180)"
-PASS colorTest.parseColor("steelblu\\65 ") is "rgb(70, 130, 180)"
-PASS colorTest.parseColor("steelblu") is "parse error"
-PASS colorTest.parseColor("tan") is "rgb(210, 180, 140)"
-PASS colorTest.parseColor("Tan") is "rgb(210, 180, 140)"
-PASS colorTest.parseColor("\\tan") is "rgb(210, 180, 140)"
-PASS colorTest.parseColor("\\74 an") is "rgb(210, 180, 140)"
-PASS colorTest.parseColor("an") is "parse error"
-PASS colorTest.parseColor("teal") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("teAl") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("te\\61 l") is "rgb(0, 128, 128)"
-PASS colorTest.parseColor("tel") is "parse error"
-PASS colorTest.parseColor("thistle") is "rgb(216, 191, 216)"
-PASS colorTest.parseColor("tHistle") is "rgb(216, 191, 216)"
-PASS colorTest.parseColor("t\\histle") is "rgb(216, 191, 216)"
-PASS colorTest.parseColor("t\\68 istle") is "rgb(216, 191, 216)"
-PASS colorTest.parseColor("tistle") is "parse error"
-PASS colorTest.parseColor("tomato") is "rgb(255, 99, 71)"
-PASS colorTest.parseColor("Tomato") is "rgb(255, 99, 71)"
-PASS colorTest.parseColor("\\tomato") is "rgb(255, 99, 71)"
-PASS colorTest.parseColor("\\74 omato") is "rgb(255, 99, 71)"
-PASS colorTest.parseColor("omato") is "parse error"
-PASS colorTest.parseColor("turquoise") is "rgb(64, 224, 208)"
-PASS colorTest.parseColor("turqUoise") is "rgb(64, 224, 208)"
-PASS colorTest.parseColor("turq\\uoise") is "rgb(64, 224, 208)"
-PASS colorTest.parseColor("turq\\75 oise") is "rgb(64, 224, 208)"
-PASS colorTest.parseColor("turqoise") is "parse error"
-PASS colorTest.parseColor("violet") is "rgb(238, 130, 238)"
-PASS colorTest.parseColor("viOlet") is "rgb(238, 130, 238)"
-PASS colorTest.parseColor("vi\\olet") is "rgb(238, 130, 238)"
-PASS colorTest.parseColor("vi\\6F let") is "rgb(238, 130, 238)"
-PASS colorTest.parseColor("vilet") is "parse error"
-PASS colorTest.parseColor("wheat") is "rgb(245, 222, 179)"
-PASS colorTest.parseColor("wheaT") is "rgb(245, 222, 179)"
-PASS colorTest.parseColor("whea\\t") is "rgb(245, 222, 179)"
-PASS colorTest.parseColor("whea\\74 ") is "rgb(245, 222, 179)"
-PASS colorTest.parseColor("whea") is "parse error"
-PASS colorTest.parseColor("white") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("White") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("\\white") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("\\77 hite") is "rgb(255, 255, 255)"
-PASS colorTest.parseColor("hite") is "parse error"
-PASS colorTest.parseColor("whitesmoke") is "rgb(245, 245, 245)"
-PASS colorTest.parseColor("wHitesmoke") is "rgb(245, 245, 245)"
-PASS colorTest.parseColor("w\\hitesmoke") is "rgb(245, 245, 245)"
-PASS colorTest.parseColor("w\\68 itesmoke") is "rgb(245, 245, 245)"
-PASS colorTest.parseColor("witesmoke") is "parse error"
-PASS colorTest.parseColor("whitesmoKe") is "parse error"
-PASS colorTest.parseColor("yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("Yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("\\yellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("\\79 ellow") is "rgb(255, 255, 0)"
-PASS colorTest.parseColor("ellow") is "parse error"
-PASS colorTest.parseColor("yellowgreen") is "rgb(154, 205, 50)"
-PASS colorTest.parseColor("yellowgreEn") is "rgb(154, 205, 50)"
-PASS colorTest.parseColor("yellowgre\\65 n") is "rgb(154, 205, 50)"
-PASS colorTest.parseColor("yellowgren") is "parse error"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/css-parser/color3_keywords.html b/third_party/WebKit/LayoutTests/css-parser/color3_keywords.html
deleted file mode 100644
index 5525c309..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/color3_keywords.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../resources/js-test.js"></script>
-<script src="resources/color-test.js"></script>
-<script>
-var test = new ColorTest("resources/css-parsing-tests/color3_keywords.json", true);
-test.run();
-</script>
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/color-test.js b/third_party/WebKit/LayoutTests/css-parser/resources/color-test.js
deleted file mode 100644
index 941af17..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/color-test.js
+++ /dev/null
@@ -1,66 +0,0 @@
-function loadJson(path) {
-    var xhr = new XMLHttpRequest();
-    xhr.open("GET", path, false);
-    xhr.send(null);
-    return JSON.parse(xhr.responseText);
-}
-
-function ColorTest(testPath, isSingleByte) {
-    this.testData = loadJson(testPath);
-    this.expectedValuesAreFloats = !isSingleByte;
-    this.parentColor = "rgb(45, 23, 27)";
-    description("Color test for " + testPath);
-}
-
-ColorTest.prototype.parseColor = function(cssText) {
-    var failSentinal = "rgb(12, 34, 223)"; // Random value not in our test data.
-    this.testElement.setAttribute('style', "color: " + failSentinal + "; color: " + cssText);
-    var result = window.getComputedStyle(this.testElement, null)['color'];
-    if (result == failSentinal)
-        return "parse error";
-    if (result == this.parentColor)
-        return "currentColor";
-    return result;
-}
-
-ColorTest.prototype.expectedString = function(expectedValue) {
-    if (expectedValue == null)
-        return "parse error"
-    if (expectedValue.length != 4)
-        return expectedValue;
-    var rgbaValues = expectedValue;
-    if (this.expectedValuesAreFloats) {
-        // FIXME: We should not have to Math.floor these values!
-        rgbaValues = rgbaValues.map(function(decimal) { return Math.floor(decimal * 255); });
-    }
-    var rgbString = rgbaValues.slice(0, 3).join(", ");
-    if (expectedValue[3] != 1) {
-        // For whatever reason, the alpha from blink is a float!?
-        return "rgba(" + rgbString + ", " + expectedValue[3] + ")";
-    }
-    return "rgb(" + rgbString + ")";
-}
-
-// Mozilla has something like this built in, this is just a hack.
-function escapeString(string) {
-    return (string + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0').replace(/\n/g, '\\n');
-}
-
-ColorTest.prototype.run = function() {
-    setPrintTestResultsLazily();
-
-    // This is a hack to make getComputedstyle work.
-    this.parentElement = document.createElement("foo");
-    this.testElement = document.createElement("bar");
-    this.parentElement.appendChild(this.testElement);
-    this.parentElement.style.color = this.parentColor;
-    document.documentElement.appendChild(this.parentElement);
-    window.colorTest = this; // Make shouldBe easier to read.
-
-    for (var i = 0; i < this.testData.length; i += 2) {
-        var testCSS = this.testData[i];
-        var expectedColor = this.testData[i + 1];
-        shouldBeEqualToString("colorTest.parseColor(\"" +  escapeString(testCSS) + "\")", this.expectedString(expectedColor));
-    }
-    this.testElement.parentNode.removeChild(this.testElement);
-}
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/An+B.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/An+B.json
deleted file mode 100644
index 3f4e89b2..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/An+B.json
+++ /dev/null
@@ -1,151 +0,0 @@
-[
-
-"", null,
-"  \n", null,
-
-"odd", [2, 1],
-"even", [2, 0],
-"ödd", null,
-"éven", null,
-" /**/\t OdD /**/\n", [2, 1],
-" /**/\t EveN /**/\n", [2, 0],
-
-
-"3", [0, 3],
-"+2 ", [0, 2],
-" -14 ", [0, -14],
-"+ 2 ", null,
-"- 14 ", null,
-"3.1", null,
-
-"3N", [3, 0],
-"+2N ", [2, 0],
-" -14n ", [-14, 0],
-"+ 2N ", null,
-"- 14N ", null,
-"3.1N", null,
-"3 n", null,
-
-"  N", [1, 0],
-" +n", [1, 0],
-" -n", [-1, 0],
-"+ n", null,
-"- n", null,
-
-
-"3N+1", [3, 1],
-"+2n+1 ", [2, 1],
-" -14n+1 ", [-14, 1],
-"+ 2N+1 ", null,
-"- 14n+1 ", null,
-"3.1n+1", null,
-"3 n+1", null,
-
-"  n+1", [1, 1],
-" +N+1", [1, 1],
-" -n+1", [-1, 1],
-"+ N+1", null,
-"- N+1", null,
-
-"3n-1", [3, -1],
-"+2N-1 ", [2, -1],
-" -14n-1 ", [-14, -1],
-"+ 2N-1 ", null,
-"- 14N-1 ", null,
-"3.1n-1", null,
-"3 n-1", null,
-
-"  n-1", [1, -1],
-" +n-1", [1, -1],
-" -n-1", [-1, -1],
-"+ n-1", null,
-"- n-1", null,
-
-
-"3N +1", [3, 1],
-"+2N +1 ", [2, 1],
-" -14n +1 ", [-14, 1],
-"+ 2N +1 ", null,
-"- 14n +1 ", null,
-"3.1N +1", null,
-"3 n +1", null,
-
-"  n +1", [1, 1],
-" +N +1", [1, 1],
-" -n +1", [-1, 1],
-"+ n +1", null,
-"- N +1", null,
-
-"3N -1", [3, -1],
-"+2n -1 ", [2, -1],
-" -14n -1 ", [-14, -1],
-"+ 2n -1 ", null,
-"- 14N -1 ", null,
-"3.1N -1", null,
-"3 N -1", null,
-
-"  N -1", [1, -1],
-" +N -1", [1, -1],
-" -n -1", [-1, -1],
-"+ n -1", null,
-"- n -1", null,
-
-
-"3n+ 1", [3, 1],
-"+2n+ 1 ", [2, 1],
-" -14n+ 1 ", [-14, 1],
-"+ 2n+ 1 ", null,
-"- 14N+ 1 ", null,
-"3.1n+ 1", null,
-"3 N+ 1", null,
-
-"  N+ 1", [1, 1],
-" +N+ 1", [1, 1],
-" -N+ 1", [-1, 1],
-"+ n+ 1", null,
-"- N+ 1", null,
-
-"3n- 1", [3, -1],
-"+2N- 1 ", [2, -1],
-" -14N- 1 ", [-14, -1],
-"+ 2N- 1 ", null,
-"- 14n- 1 ", null,
-"3.1n- 1", null,
-"3 n- 1", null,
-
-"  N- 1", [1, -1],
-" +N- 1", [1, -1],
-" -n- 1", [-1, -1],
-"+ n- 1", null,
-"- N- 1", null,
-
-
-"3N + 1", [3, 1],
-"+2N + 1 ", [2, 1],
-" -14n + 1 ", [-14, 1],
-"+ 2n + 1 ", null,
-"- 14N + 1 ", null,
-"3.1n + 1", null,
-"3 N + 1", null,
-
-"  n + 1", [1, 1],
-" +n + 1", [1, 1],
-" -N + 1", [-1, 1],
-"+ N + 1", null,
-"- N + 1", null,
-
-"3N - 1", [3, -1],
-"+2n - 1 ", [2, -1],
-" -14n - 1 ", [-14, -1],
-"+ 2N - 1 ", null,
-"- 14N - 1 ", null,
-"3.1N - 1", null,
-"3 n - 1", null,
-
-"  N - 1", [1, -1],
-" +n - 1", [1, -1],
-" -n - 1", [-1, -1],
-"+ N - 1", null,
-"- N - 1", null
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/LICENSE b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/LICENSE
deleted file mode 100644
index bfe03af..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/LICENSE
+++ /dev/null
@@ -1,8 +0,0 @@
-Written in 2013 by Simon Sapin.
-
-To the extent possible under law, the author(s) have dedicated all copyright
-and related and neighboring rights to this work to the public domain worldwide.
-This work is distributed without any warranty.
-
-See the CC0 Public Domain Dedication:
-http://creativecommons.org/publicdomain/zero/1.0/
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/README.rst b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/README.rst
deleted file mode 100644
index d54b0d8..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/README.rst
+++ /dev/null
@@ -1,301 +0,0 @@
-CSS parsing tests
-#################
-
-This repository contains implementation-independent test for CSS parsers,
-based on the 2013 draft of the `CSS Syntax Level 3`_ specification.
-
-.. _CSS Syntax Level 3: http://dev.w3.org/csswg/css-syntax-3/
-
-The upstream repository for these tests is at
-https://github.com/SimonSapin/css-parsing-tests
-
-
-Projects using this
-===================
-
-CSS parsers using these tests:
-
-* `tinycss2 <https://github.com/SimonSapin/tinycss2>`_ (Python)
-* `rust-cssparser <https://github.com/mozilla-servo/rust-cssparser>`_
-  (Rust, used in `Servo <https://github.com/mozilla/servo/>`_)
-* `Crass <https://github.com/rgrove/crass/>`_ (Ruby)
-
-
-Importing
-=========
-
-The recommended way to use these tests in an implementation
-is to import them with git-subtree_.
-
-.. _git-subtree: https://github.com/git/git/tree/master/contrib/subtree
-
-To import the first time to a ``./css-parsing-tests`` sub-directory,
-run this from the top-level of a git repository::
-
-    git subtree add -P css-parsing-tests https://github.com/SimonSapin/css-parsing-tests.git master
-
-Later, to merge changes made in the upstream repository, run::
-
-    git subtree pull -P css-parsing-tests https://github.com/SimonSapin/css-parsing-tests.git master
-
-
-Test files
-==========
-
-CSS Syntax specification describes a number of "functions".
-Each ``.json`` file in this repository corresponds to such a function.
-The files are encoded as UTF-8
-and each contain a JSON array with an even number of items,
-where each pair of items is one function input
-associated with the expected result.
-
-``component_value_list.json``
-    Tests `Parse a list of component values
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-list-of-component-values>`_.
-    The Unicode input is represented by a JSON string,
-    the output as an array of `component values`_ as described below.
-
-``component_value_list.json``
-    Tests `Parse a component value
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value>`_.
-    The Unicode input is represented by a JSON string,
-    the output as a `component value`_.
-
-``declaration_list.json``
-    Tests `Parse a list of declarations
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-list-of-declarations>`_.
-    The Unicode input is represented by a JSON string,
-    the output as an array of declarations_ and at-rules_.
-
-``one_declaration.json``
-    Tests `Parse a declaration
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-declaration>`_.
-    The Unicode input is represented by a JSON string,
-    the output as a declaration_.
-
-``one_rule.json``
-    Tests `Parse a rule
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule>`_.
-    The Unicode input is represented by a JSON string,
-    the output as a `qualified rule`_ or at-rule_.
-
-``rule_list.json``
-    Tests `Parse a list of rules
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-list-of-rules>`_.
-    The Unicode input is represented by a JSON string,
-    the output as a list of `qualified rules`_ or at-rules_.
-
-``stylesheet.json``
-    Tests `Parse a stylesheet
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-stylesheet>`_.
-    The Unicode input is represented by a JSON string,
-    the output as a list of `qualified rules`_ or at-rules_.
-
-``stylesheet_bytes.json``
-    Tests `Parse a stylesheet
-    <http://dev.w3.org/csswg/css-syntax-3/#parse-a-stylesheet>`_
-    together with `The input byte stream
-    <http://dev.w3.org/csswg/css-syntax/#input-byte-stream>`_.
-    The input is represented as a JSON object containing:
-
-    * A required ``css_bytes``, the input byte string,
-      represented as a JSON string where code points U+0000 to U+00FF
-      represent bytes of the same value.
-    * An optional ``protocol_encoding``,
-      a protocol encoding label as a JSON string, or null.
-    * An optional ``environment_encoding``,
-      an environment encoding label as a JSON string, or null.
-    * An optional ``comment`` that is ignored.
-
-    The output is represented a list of `qualified rules`_ or at-rules_.
-
-``color3.json``
-    Tests the ``<color>`` syntax `defined in CSS Color Level 3
-    <http://www.w3.org/TR/css3-color/#colorunits>`_.
-    The Unicode input is represented by a JSON string,
-    the output as one of:
-
-    * null if the input is not a valid color in CSS syntax
-    * The string "currentColor" for the currentColor keyword
-    * An array of length 4 for every other values:
-      four (floating point) numbers for the Red, Green, Blue and Alpha channel.
-      Each value is between 0 and 1.
-
-``color3_hsl.json``
-    Same as ``color3.json``.
-    This file is generated by the ``make_color3_hsl.py`` Python script.
-
-``color3_keywords.json``
-    Same as ``color3.json``,
-    except that the values for the Red, Green and Blue channel
-    are between 0 and 255.
-    This file is generated by the ``make_color3_keywords.py`` Python script.
-
-``An+B.json``
-    Tests the `An+B <http://dev.w3.org/csswg/css-syntax/#the-anb-type>`_
-    syntax defined in CSS Syntax Level 3.
-    This `differs <http://dev.w3.org/csswg/css-syntax/#changes>`_ from the
-    `nth grammar rule <http://www.w3.org/TR/css3-selectors/#nth-child-pseudo>`_
-    in Selectors Level 3 only in that
-    ``-`` charecters and digits can be escaped in some cases.
-    The Unicode input is represented by a JSON string,
-    the output as null for invalid syntax,
-    or an array of two integers ``[A, B]``.
-
-
-Result representation
-=====================
-
-AST nodes (the results of parsing) are represented in JSON as follow.
-This representation was chosen to be compact
-(and thus less annoying to write by hand)
-while staying unambiguous.
-For example, the difference between ``@import`` and ``\@import`` is not lost:
-they are represented as ``["at-keyword", "import"]`` and ``["ident", "@import"]``,
-respectively.
-
-
-Rules and declarations
-----------------------
-
-.. _at-rule:
-.. _at-rules:
-.. _qualified rule:
-.. _qualified rules:
-.. _declaration:
-.. _declarations:
-
-
-At-rule
-    An array of length 4: the string ``"at-rule"``,
-    the name (value of the at-keyword) as a string,
-    the prelude as a nested array of `component values`_,
-    and the optional block as a nested array of component value, or null.
-
-Qualified rule
-    An array of length 3: the string ``"qualified rule"``,
-    the prelude as a nested array of `component values`_,
-    and the block as a nested array of component value.
-
-
-Declaration
-    An array of length 4: the string ``"declaration"``, the name as a string,
-    the value as a nested array of `component values`_,
-    and a the important flag as a boolean.
-
-
-.. _component value:
-.. _component values:
-
-Component values
-----------------
-
-<ident>
-    Array of length 2: the string ``"ident"``, and the value as a string.
-
-<at-keyword>
-    Array of length 2: the string ``"at-keyword"``, and the value as a string.
-
-<hash>
-    Array of length 3: the string ``"hash"``, the value as a string,
-    and the type as the string ``"id"`` or ``"unrestricted"``.
-
-<string>
-    Array of length 2: the string ``"string"``, and the value as a string.
-
-<bad-string>
-    Array of length 1: the string ``"bad-string"``.
-
-<url>
-    Array of length 2: the string ``"url"``, and the value as a string.
-
-<bad-url>
-    Array of length 1: the string ``"bad-url"``.
-
-<delim>
-    The value as a one-character string.
-
-<number>
-    Array of length 4: the string ``"number"``, the representation as a string,
-    the value as a number, and the type as the string ``"integer"`` or ``"number"``.
-
-<percentage>
-    Array of length 4: the string ``"percentage"``, the representation as a string,
-    the value as a number, and the type as the string ``"integer"`` or ``"number"``.
-
-<dimension>
-    Array of length 4: the string ``"dimension"``, the representation as a string,
-    the value as a number, the type as the string ``"integer"`` or ``"number"``,
-    and the unit as a string.
-
-<unicode-range>
-    Array of length 3: the string ``"unicode-range"``,
-    followed by the *start* and *end* integers as two numbers.
-
-<include-match>
-    The string ``"~="``.
-
-<dash-match>
-    The string ``"|="``.
-
-<prefix-match>
-    The string ``"^="``.
-
-<suffix-match>
-    The string ``"$="``.
-
-<substring-match>
-    The string ``"*="``.
-
-<column>
-    The string ``"||"``.
-
-<whitespace>
-    The string ``" "`` (a single space.)
-
-<CDO>
-    The string ``"<!--"``.
-
-<CDC>
-    The string ``"-->"``.
-
-<colon>
-    The string ``":"``.
-
-<semicolon>
-    The string ``";"``.
-
-<comma>
-    The string ``","``.
-
-{} block
-    An array of length N+1: the string ``"{}"``
-    followed by the N `component values`_ of the block’s content.
-
-[] block
-    An array of length N+1: the string ``"[]"``
-    followed by the N `component values`_ of the block’s content.
-
-() block
-    An array of length N+1: the string ``"()"``
-    followed by the N `component values`_ of the block’s content.
-
-Function
-    An array of length N+2: the string ``"function"``
-    and the name of the function as a string
-    followed by the N `component values`_ of the function’s arguments.
-
-<bad-string>
-    The array of two strings ``["error", "bad-string"]``.
-
-<bad-url>
-    The array of two strings ``["error", "bad-url"]``.
-
-Unmatched <}>
-    The array of two strings ``["error", "}"]``.
-
-Unmatched <]>
-    The array of two strings ``["error", "]"]``.
-
-Unmatched <)>
-    The array of two strings ``["error", ")"]``.
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/VERSION b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/VERSION
deleted file mode 100644
index bb6326e..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-Imported from:
-https://github.com/SimonSapin/css-parsing-tests/
-
-Version:
-dd699d47d0bb8f021837f966be0528f922138b7c
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3.json
deleted file mode 100644
index bad5079e..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3.json
+++ /dev/null
@@ -1,144 +0,0 @@
-[
-"", null,
-" /* hey */\n", null,
-"4", null,
-"top", null,
-"/**/transparent", [0, 0, 0, 0],
-"transparent", [0, 0, 0, 0],
-" transparent\n", [0, 0, 0, 0],
-"TransParent", [0, 0, 0, 0],
-"currentColor", "currentColor",
-"CURRENTcolor", "currentColor",
-"current-Color", null,
-
-"black", [0, 0, 0, 1],
-"white", [1, 1, 1, 1],
-"fuchsia", [1, 0, 1, 1],
-"cyan", [0, 1, 1, 1],
-"CyAn", [0, 1, 1, 1],
-
-"#", null,
-"#f", null,
-"#ff", null,
-"#fff", [1, 1, 1, 1],
-"#ffg", null,
-"#ffff", [1, 1, 1, 1],
-"#fffg", null,
-"#fffff", null,
-"#ffffff", [1, 1, 1, 1],
-"#fffffg", null,
-"#fffffff", null,
-"#ffffffff", [1, 1, 1, 1],
-"#fffffffg", null,
-"#fffffffff", null,
-
-"#FFCc99", [1, 0.8, 0.6, 1],
-"#369", [0.2, 0.4, 0.6, 1],
-
-"rgb(00, 51, 102)", [0, 0.2, 0.4, 1],
-"r\\gb(00, 51, 102)", [0, 0.2, 0.4, 1],
-"r\\67 b(00, 51, 102)", [0, 0.2, 0.4, 1],
-"RGB(153, 204, 255)", [0.6, 0.8, 1, 1],
-"rgB(0, 0, 0)", [0, 0, 0, 1],
-"rgB(0, 51, 255)", [0, 0.2, 1, 1],
-"rgb(0,51,255)", [0, 0.2, 1, 1],
-"rgb(0\t,  51 ,255)", [0, 0.2, 1, 1],
-"rgb(/* R */0, /* G */51, /* B */255)", [0, 0.2, 1, 1],
-"rgb(-51, 306, 0)", [-0.2, 1.2, 0, 1],
-
-"rgb(42%, 3%, 50%)", [0.42, 0.03, 0.5, 1],
-"RGB(100%, 100%, 100%)", [1, 1, 1, 1],
-"rgB(0%, 0%, 0%)", [0, 0, 0, 1],
-"rgB(10%, 20%, 30%)", [0.1, 0.2, 0.3, 1],
-"rgb(10%,20%,30%)", [0.1, 0.2, 0.3, 1],
-"rgb(10%\t,  20% ,30%)", [0.1, 0.2, 0.3, 1],
-"rgb(/* R */ 10%, /* G */ 20%, /* B */ 30%)", [0.1, 0.2, 0.3, 1],
-"rgb(-12%, 110%, 1400%)", [-0.12, 1.1, 14, 1],
-
-"rgb(10%, 50%, 0)", null,
-"rgb(255, 50%, 0%)", null,
-"rgb(0, 0 0)", null,
-"rgb(0, 0, 0deg)", null,
-"rgb(0, 0, light)", null,
-"rgb()", null,
-"rgb(0)", null,
-"rgb(0, 0)", null,
-"rgb(0, 0, 0, 0)", null,
-"rgb(0%)", null,
-"rgb(0%, 0%)", null,
-"rgb(0%, 0%, 0%, 0%)", null,
-"rgb(0%, 0%, 0%, 0)", null,
-
-"rgba(0, 0, 0, 0)", [0, 0, 0, 0],
-"rgba(204, 0, 102, 0.3)", [0.8, 0, 0.4, 0.3],
-"RGBA(255, 255, 255, 0)", [1, 1, 1, 0],
-"rgBA(0, 51, 255, 1)", [0, 0.2, 1, 1],
-"rgba(0, 51, 255, 1.1)", [0, 0.2, 1, 1],
-"rgba(0, 51, 255, 37)", [0, 0.2, 1, 1],
-"rgba(0, 51, 255, 0.42)", [0, 0.2, 1, 0.42],
-"rgba(0, 51, 255, 0)", [0, 0.2, 1, 0],
-"rgba(0, 51, 255, -0.1)", [0, 0.2, 1, 0],
-"rgba(0, 51, 255, -139)", [0, 0.2, 1, 0],
-
-"rgba(42%, 3%, 50%, 0.3)", [0.42, 0.03, 0.5, 0.3],
-"RGBA(100%, 100%, 100%, 0)", [1, 1, 1, 0],
-"rgBA(0%, 20%, 100%, 1)", [0, 0.2, 1, 1],
-"rgba(0%, 20%, 100%, 1.1)", [0, 0.2, 1, 1],
-"rgba(0%, 20%, 100%, 37)", [0, 0.2, 1, 1],
-"rgba(0%, 20%, 100%, 0.42)", [0, 0.2, 1, 0.42],
-"rgba(0%, 20%, 100%, 0)", [0, 0.2, 1, 0],
-"rgba(0%, 20%, 100%, -0.1)", [0, 0.2, 1, 0],
-"rgba(0%, 20%, 100%, -139)", [0, 0.2, 1, 0],
-
-"rgba(255, 255, 255, 0%)", null,
-"rgba(10%, 50%, 0, 1)", null,
-"rgba(255, 50%, 0%, 1)", null,
-"rgba(0, 0, 0 0)", null,
-"rgba(0, 0, 0, 0deg)", null,
-"rgba(0, 0, 0, light)", null,
-"rgba()", null,
-"rgba(0)", null,
-"rgba(0, 0, 0)", null,
-"rgba(0, 0, 0, 0, 0)", null,
-"rgba(0%)", null,
-"rgba(0%, 0%)", null,
-"rgba(0%, 0%, 0%)", null,
-"rgba(0%, 0%, 0%, 0%)", null,
-"rgba(0%, 0%, 0%, 0%, 0%)", null,
-
-"HSL(0, 0%, 0%)", [0, 0, 0, 1],
-"hsL(0, 100%, 50%)", [1, 0, 0, 1],
-"hsl(60, 100%, 37.5%)", [0.75, 0.75, 0, 1],
-"hsl(780, 100%, 37.5%)", [0.75, 0.75, 0, 1],
-"hsl(-300, 100%, 37.5%)", [0.75, 0.75, 0, 1],
-"hsl(300, 50%, 50%)", [0.75, 0.25, 0.75, 1],
-
-"hsl(10, 50%, 0)", null,
-"hsl(50%, 50%, 0%)", null,
-"hsl(0, 0% 0%)", null,
-"hsl(30deg, 100%, 100%)", null,
-"hsl(0, 0%, light)", null,
-"hsl()", null,
-"hsl(0)", null,
-"hsl(0, 0%)", null,
-"hsl(0, 0%, 0%, 0%)", null,
-
-"HSLA(-300, 100%, 37.5%, 1)", [0.75, 0.75, 0, 1],
-"hsLA(-300, 100%, 37.5%, 12)", [0.75, 0.75, 0, 1],
-"hsla(-300, 100%, 37.5%, 0.2)", [0.75, 0.75, 0, 0.2],
-"hsla(-300, 100%, 37.5%, 0)", [0.75, 0.75, 0, 0],
-"hsla(-300, 100%, 37.5%, -3)", [0.75, 0.75, 0, 0],
-
-"hsla(10, 50%, 0, 1)", null,
-"hsla(50%, 50%, 0%, 1)", null,
-"hsla(0, 0% 0%, 1)", null,
-"hsla(30deg, 100%, 100%, 1)", null,
-"hsla(0, 0%, light, 1)", null,
-"hsla()", null,
-"hsla(0)", null,
-"hsla(0, 0%)", null,
-"hsla(0, 0%, 0%, 50%)", null,
-"hsla(0, 0%, 0%, 1, 0%)", null,
-
-"cmyk(0, 0, 0, 0)", null
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsl.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsl.json
deleted file mode 100644
index 257c267..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsl.json
+++ /dev/null
@@ -1,974 +0,0 @@
-[
-"hsl(0, 0%, 0%)", [0, 0, 0, 1],
-"hsl(30, 0%, 0%)", [0, 0, 0, 1],
-"hsl(60, 0%, 0%)", [0, 0, 0, 1],
-"hsl(90, 0%, 0%)", [0, 0, 0, 1],
-"hsl(120, 0%, 0%)", [0, 0, 0, 1],
-"hsl(150, 0%, 0%)", [0, 0, 0, 1],
-"hsl(180, 0%, 0%)", [0, 0, 0, 1],
-"hsl(210, 0%, 0%)", [0, 0, 0, 1],
-"hsl(240, 0%, 0%)", [0, 0, 0, 1],
-"hsl(270, 0%, 0%)", [0, 0, 0, 1],
-"hsl(300, 0%, 0%)", [0, 0, 0, 1],
-"hsl(330, 0%, 0%)", [0, 0, 0, 1],
-"hsl(0, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(30, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(60, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(90, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(120, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(150, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(180, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(210, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(240, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(270, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(300, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(330, 12.5%, 0%)", [0, 0, 0, 1],
-"hsl(0, 25%, 0%)", [0, 0, 0, 1],
-"hsl(30, 25%, 0%)", [0, 0, 0, 1],
-"hsl(60, 25%, 0%)", [0, 0, 0, 1],
-"hsl(90, 25%, 0%)", [0, 0, 0, 1],
-"hsl(120, 25%, 0%)", [0, 0, 0, 1],
-"hsl(150, 25%, 0%)", [0, 0, 0, 1],
-"hsl(180, 25%, 0%)", [0, 0, 0, 1],
-"hsl(210, 25%, 0%)", [0, 0, 0, 1],
-"hsl(240, 25%, 0%)", [0, 0, 0, 1],
-"hsl(270, 25%, 0%)", [0, 0, 0, 1],
-"hsl(300, 25%, 0%)", [0, 0, 0, 1],
-"hsl(330, 25%, 0%)", [0, 0, 0, 1],
-"hsl(0, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(30, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(60, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(90, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(120, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(150, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(180, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(210, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(240, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(270, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(300, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(330, 37.5%, 0%)", [0, 0, 0, 1],
-"hsl(0, 50%, 0%)", [0, 0, 0, 1],
-"hsl(30, 50%, 0%)", [0, 0, 0, 1],
-"hsl(60, 50%, 0%)", [0, 0, 0, 1],
-"hsl(90, 50%, 0%)", [0, 0, 0, 1],
-"hsl(120, 50%, 0%)", [0, 0, 0, 1],
-"hsl(150, 50%, 0%)", [0, 0, 0, 1],
-"hsl(180, 50%, 0%)", [0, 0, 0, 1],
-"hsl(210, 50%, 0%)", [0, 0, 0, 1],
-"hsl(240, 50%, 0%)", [0, 0, 0, 1],
-"hsl(270, 50%, 0%)", [0, 0, 0, 1],
-"hsl(300, 50%, 0%)", [0, 0, 0, 1],
-"hsl(330, 50%, 0%)", [0, 0, 0, 1],
-"hsl(0, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(30, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(60, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(90, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(120, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(150, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(180, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(210, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(240, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(270, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(300, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(330, 62.5%, 0%)", [0, 0, 0, 1],
-"hsl(0, 75%, 0%)", [0, 0, 0, 1],
-"hsl(30, 75%, 0%)", [0, 0, 0, 1],
-"hsl(60, 75%, 0%)", [0, 0, 0, 1],
-"hsl(90, 75%, 0%)", [0, 0, 0, 1],
-"hsl(120, 75%, 0%)", [0, 0, 0, 1],
-"hsl(150, 75%, 0%)", [0, 0, 0, 1],
-"hsl(180, 75%, 0%)", [0, 0, 0, 1],
-"hsl(210, 75%, 0%)", [0, 0, 0, 1],
-"hsl(240, 75%, 0%)", [0, 0, 0, 1],
-"hsl(270, 75%, 0%)", [0, 0, 0, 1],
-"hsl(300, 75%, 0%)", [0, 0, 0, 1],
-"hsl(330, 75%, 0%)", [0, 0, 0, 1],
-"hsl(0, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(30, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(60, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(90, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(120, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(150, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(180, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(210, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(240, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(270, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(300, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(330, 87.5%, 0%)", [0, 0, 0, 1],
-"hsl(0, 100%, 0%)", [0, 0, 0, 1],
-"hsl(30, 100%, 0%)", [0, 0, 0, 1],
-"hsl(60, 100%, 0%)", [0, 0, 0, 1],
-"hsl(90, 100%, 0%)", [0, 0, 0, 1],
-"hsl(120, 100%, 0%)", [0, 0, 0, 1],
-"hsl(150, 100%, 0%)", [0, 0, 0, 1],
-"hsl(180, 100%, 0%)", [0, 0, 0, 1],
-"hsl(210, 100%, 0%)", [0, 0, 0, 1],
-"hsl(240, 100%, 0%)", [0, 0, 0, 1],
-"hsl(270, 100%, 0%)", [0, 0, 0, 1],
-"hsl(300, 100%, 0%)", [0, 0, 0, 1],
-"hsl(330, 100%, 0%)", [0, 0, 0, 1],
-"hsl(0, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(30, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(60, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(90, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(120, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(150, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(180, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(210, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(240, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(270, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(300, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(330, 0%, 12.5%)", [0.125, 0.125, 0.125, 1],
-"hsl(0, 12.5%, 12.5%)", [0.140625, 0.109375, 0.109375, 1],
-"hsl(30, 12.5%, 12.5%)", [0.140625, 0.125, 0.109375, 1],
-"hsl(60, 12.5%, 12.5%)", [0.140625, 0.140625, 0.109375, 1],
-"hsl(90, 12.5%, 12.5%)", [0.125, 0.140625, 0.109375, 1],
-"hsl(120, 12.5%, 12.5%)", [0.109375, 0.140625, 0.109375, 1],
-"hsl(150, 12.5%, 12.5%)", [0.109375, 0.140625, 0.125, 1],
-"hsl(180, 12.5%, 12.5%)", [0.109375, 0.140625, 0.140625, 1],
-"hsl(210, 12.5%, 12.5%)", [0.109375, 0.125, 0.140625, 1],
-"hsl(240, 12.5%, 12.5%)", [0.109375, 0.109375, 0.140625, 1],
-"hsl(270, 12.5%, 12.5%)", [0.125, 0.109375, 0.140625, 1],
-"hsl(300, 12.5%, 12.5%)", [0.140625, 0.109375, 0.140625, 1],
-"hsl(330, 12.5%, 12.5%)", [0.140625, 0.109375, 0.125, 1],
-"hsl(0, 25%, 12.5%)", [0.15625, 0.09375, 0.09375, 1],
-"hsl(30, 25%, 12.5%)", [0.15625, 0.125, 0.09375, 1],
-"hsl(60, 25%, 12.5%)", [0.15625, 0.15625, 0.09375, 1],
-"hsl(90, 25%, 12.5%)", [0.125, 0.15625, 0.09375, 1],
-"hsl(120, 25%, 12.5%)", [0.09375, 0.15625, 0.09375, 1],
-"hsl(150, 25%, 12.5%)", [0.09375, 0.15625, 0.125, 1],
-"hsl(180, 25%, 12.5%)", [0.09375, 0.15625, 0.15625, 1],
-"hsl(210, 25%, 12.5%)", [0.09375, 0.125, 0.15625, 1],
-"hsl(240, 25%, 12.5%)", [0.09375, 0.09375, 0.15625, 1],
-"hsl(270, 25%, 12.5%)", [0.125, 0.09375, 0.15625, 1],
-"hsl(300, 25%, 12.5%)", [0.15625, 0.09375, 0.15625, 1],
-"hsl(330, 25%, 12.5%)", [0.15625, 0.09375, 0.125, 1],
-"hsl(0, 37.5%, 12.5%)", [0.171875, 0.078125, 0.078125, 1],
-"hsl(30, 37.5%, 12.5%)", [0.171875, 0.125, 0.078125, 1],
-"hsl(60, 37.5%, 12.5%)", [0.171875, 0.171875, 0.078125, 1],
-"hsl(90, 37.5%, 12.5%)", [0.125, 0.171875, 0.078125, 1],
-"hsl(120, 37.5%, 12.5%)", [0.078125, 0.171875, 0.078125, 1],
-"hsl(150, 37.5%, 12.5%)", [0.078125, 0.171875, 0.125, 1],
-"hsl(180, 37.5%, 12.5%)", [0.078125, 0.171875, 0.171875, 1],
-"hsl(210, 37.5%, 12.5%)", [0.078125, 0.125, 0.171875, 1],
-"hsl(240, 37.5%, 12.5%)", [0.078125, 0.078125, 0.171875, 1],
-"hsl(270, 37.5%, 12.5%)", [0.125, 0.078125, 0.171875, 1],
-"hsl(300, 37.5%, 12.5%)", [0.171875, 0.078125, 0.171875, 1],
-"hsl(330, 37.5%, 12.5%)", [0.171875, 0.078125, 0.125, 1],
-"hsl(0, 50%, 12.5%)", [0.1875, 0.0625, 0.0625, 1],
-"hsl(30, 50%, 12.5%)", [0.1875, 0.125, 0.0625, 1],
-"hsl(60, 50%, 12.5%)", [0.1875, 0.1875, 0.0625, 1],
-"hsl(90, 50%, 12.5%)", [0.125, 0.1875, 0.0625, 1],
-"hsl(120, 50%, 12.5%)", [0.0625, 0.1875, 0.0625, 1],
-"hsl(150, 50%, 12.5%)", [0.0625, 0.1875, 0.125, 1],
-"hsl(180, 50%, 12.5%)", [0.0625, 0.1875, 0.1875, 1],
-"hsl(210, 50%, 12.5%)", [0.0625, 0.125, 0.1875, 1],
-"hsl(240, 50%, 12.5%)", [0.0625, 0.0625, 0.1875, 1],
-"hsl(270, 50%, 12.5%)", [0.125, 0.0625, 0.1875, 1],
-"hsl(300, 50%, 12.5%)", [0.1875, 0.0625, 0.1875, 1],
-"hsl(330, 50%, 12.5%)", [0.1875, 0.0625, 0.125, 1],
-"hsl(0, 62.5%, 12.5%)", [0.203125, 0.046875, 0.046875, 1],
-"hsl(30, 62.5%, 12.5%)", [0.203125, 0.125, 0.046875, 1],
-"hsl(60, 62.5%, 12.5%)", [0.203125, 0.203125, 0.046875, 1],
-"hsl(90, 62.5%, 12.5%)", [0.125, 0.203125, 0.046875, 1],
-"hsl(120, 62.5%, 12.5%)", [0.046875, 0.203125, 0.046875, 1],
-"hsl(150, 62.5%, 12.5%)", [0.046875, 0.203125, 0.125, 1],
-"hsl(180, 62.5%, 12.5%)", [0.046875, 0.203125, 0.203125, 1],
-"hsl(210, 62.5%, 12.5%)", [0.046875, 0.125, 0.203125, 1],
-"hsl(240, 62.5%, 12.5%)", [0.046875, 0.046875, 0.203125, 1],
-"hsl(270, 62.5%, 12.5%)", [0.125, 0.046875, 0.203125, 1],
-"hsl(300, 62.5%, 12.5%)", [0.203125, 0.046875, 0.203125, 1],
-"hsl(330, 62.5%, 12.5%)", [0.203125, 0.046875, 0.125, 1],
-"hsl(0, 75%, 12.5%)", [0.21875, 0.03125, 0.03125, 1],
-"hsl(30, 75%, 12.5%)", [0.21875, 0.125, 0.03125, 1],
-"hsl(60, 75%, 12.5%)", [0.21875, 0.21875, 0.03125, 1],
-"hsl(90, 75%, 12.5%)", [0.125, 0.21875, 0.03125, 1],
-"hsl(120, 75%, 12.5%)", [0.03125, 0.21875, 0.03125, 1],
-"hsl(150, 75%, 12.5%)", [0.03125, 0.21875, 0.125, 1],
-"hsl(180, 75%, 12.5%)", [0.03125, 0.21875, 0.21875, 1],
-"hsl(210, 75%, 12.5%)", [0.03125, 0.125, 0.21875, 1],
-"hsl(240, 75%, 12.5%)", [0.03125, 0.03125, 0.21875, 1],
-"hsl(270, 75%, 12.5%)", [0.125, 0.03125, 0.21875, 1],
-"hsl(300, 75%, 12.5%)", [0.21875, 0.03125, 0.21875, 1],
-"hsl(330, 75%, 12.5%)", [0.21875, 0.03125, 0.125, 1],
-"hsl(0, 87.5%, 12.5%)", [0.234375, 0.015625, 0.015625, 1],
-"hsl(30, 87.5%, 12.5%)", [0.234375, 0.125, 0.015625, 1],
-"hsl(60, 87.5%, 12.5%)", [0.234375, 0.234375, 0.015625, 1],
-"hsl(90, 87.5%, 12.5%)", [0.125, 0.234375, 0.015625, 1],
-"hsl(120, 87.5%, 12.5%)", [0.015625, 0.234375, 0.015625, 1],
-"hsl(150, 87.5%, 12.5%)", [0.015625, 0.234375, 0.125, 1],
-"hsl(180, 87.5%, 12.5%)", [0.015625, 0.234375, 0.234375, 1],
-"hsl(210, 87.5%, 12.5%)", [0.015625, 0.125, 0.234375, 1],
-"hsl(240, 87.5%, 12.5%)", [0.015625, 0.015625, 0.234375, 1],
-"hsl(270, 87.5%, 12.5%)", [0.125, 0.015625, 0.234375, 1],
-"hsl(300, 87.5%, 12.5%)", [0.234375, 0.015625, 0.234375, 1],
-"hsl(330, 87.5%, 12.5%)", [0.234375, 0.015625, 0.125, 1],
-"hsl(0, 100%, 12.5%)", [0.25, 0, 0, 1],
-"hsl(30, 100%, 12.5%)", [0.25, 0.125, 0, 1],
-"hsl(60, 100%, 12.5%)", [0.25, 0.25, 0, 1],
-"hsl(90, 100%, 12.5%)", [0.125, 0.25, 0, 1],
-"hsl(120, 100%, 12.5%)", [0, 0.25, 0, 1],
-"hsl(150, 100%, 12.5%)", [0, 0.25, 0.125, 1],
-"hsl(180, 100%, 12.5%)", [0, 0.25, 0.25, 1],
-"hsl(210, 100%, 12.5%)", [0, 0.125, 0.25, 1],
-"hsl(240, 100%, 12.5%)", [0, 0, 0.25, 1],
-"hsl(270, 100%, 12.5%)", [0.125, 0, 0.25, 1],
-"hsl(300, 100%, 12.5%)", [0.25, 0, 0.25, 1],
-"hsl(330, 100%, 12.5%)", [0.25, 0, 0.125, 1],
-"hsl(0, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(30, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(60, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(90, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(120, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(150, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(180, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(210, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(240, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(270, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(300, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(330, 0%, 25%)", [0.25, 0.25, 0.25, 1],
-"hsl(0, 12.5%, 25%)", [0.28125, 0.21875, 0.21875, 1],
-"hsl(30, 12.5%, 25%)", [0.28125, 0.25, 0.21875, 1],
-"hsl(60, 12.5%, 25%)", [0.28125, 0.28125, 0.21875, 1],
-"hsl(90, 12.5%, 25%)", [0.25, 0.28125, 0.21875, 1],
-"hsl(120, 12.5%, 25%)", [0.21875, 0.28125, 0.21875, 1],
-"hsl(150, 12.5%, 25%)", [0.21875, 0.28125, 0.25, 1],
-"hsl(180, 12.5%, 25%)", [0.21875, 0.28125, 0.28125, 1],
-"hsl(210, 12.5%, 25%)", [0.21875, 0.25, 0.28125, 1],
-"hsl(240, 12.5%, 25%)", [0.21875, 0.21875, 0.28125, 1],
-"hsl(270, 12.5%, 25%)", [0.25, 0.21875, 0.28125, 1],
-"hsl(300, 12.5%, 25%)", [0.28125, 0.21875, 0.28125, 1],
-"hsl(330, 12.5%, 25%)", [0.28125, 0.21875, 0.25, 1],
-"hsl(0, 25%, 25%)", [0.3125, 0.1875, 0.1875, 1],
-"hsl(30, 25%, 25%)", [0.3125, 0.25, 0.1875, 1],
-"hsl(60, 25%, 25%)", [0.3125, 0.3125, 0.1875, 1],
-"hsl(90, 25%, 25%)", [0.25, 0.3125, 0.1875, 1],
-"hsl(120, 25%, 25%)", [0.1875, 0.3125, 0.1875, 1],
-"hsl(150, 25%, 25%)", [0.1875, 0.3125, 0.25, 1],
-"hsl(180, 25%, 25%)", [0.1875, 0.3125, 0.3125, 1],
-"hsl(210, 25%, 25%)", [0.1875, 0.25, 0.3125, 1],
-"hsl(240, 25%, 25%)", [0.1875, 0.1875, 0.3125, 1],
-"hsl(270, 25%, 25%)", [0.25, 0.1875, 0.3125, 1],
-"hsl(300, 25%, 25%)", [0.3125, 0.1875, 0.3125, 1],
-"hsl(330, 25%, 25%)", [0.3125, 0.1875, 0.25, 1],
-"hsl(0, 37.5%, 25%)", [0.34375, 0.15625, 0.15625, 1],
-"hsl(30, 37.5%, 25%)", [0.34375, 0.25, 0.15625, 1],
-"hsl(60, 37.5%, 25%)", [0.34375, 0.34375, 0.15625, 1],
-"hsl(90, 37.5%, 25%)", [0.25, 0.34375, 0.15625, 1],
-"hsl(120, 37.5%, 25%)", [0.15625, 0.34375, 0.15625, 1],
-"hsl(150, 37.5%, 25%)", [0.15625, 0.34375, 0.25, 1],
-"hsl(180, 37.5%, 25%)", [0.15625, 0.34375, 0.34375, 1],
-"hsl(210, 37.5%, 25%)", [0.15625, 0.25, 0.34375, 1],
-"hsl(240, 37.5%, 25%)", [0.15625, 0.15625, 0.34375, 1],
-"hsl(270, 37.5%, 25%)", [0.25, 0.15625, 0.34375, 1],
-"hsl(300, 37.5%, 25%)", [0.34375, 0.15625, 0.34375, 1],
-"hsl(330, 37.5%, 25%)", [0.34375, 0.15625, 0.25, 1],
-"hsl(0, 50%, 25%)", [0.375, 0.125, 0.125, 1],
-"hsl(30, 50%, 25%)", [0.375, 0.25, 0.125, 1],
-"hsl(60, 50%, 25%)", [0.375, 0.375, 0.125, 1],
-"hsl(90, 50%, 25%)", [0.25, 0.375, 0.125, 1],
-"hsl(120, 50%, 25%)", [0.125, 0.375, 0.125, 1],
-"hsl(150, 50%, 25%)", [0.125, 0.375, 0.25, 1],
-"hsl(180, 50%, 25%)", [0.125, 0.375, 0.375, 1],
-"hsl(210, 50%, 25%)", [0.125, 0.25, 0.375, 1],
-"hsl(240, 50%, 25%)", [0.125, 0.125, 0.375, 1],
-"hsl(270, 50%, 25%)", [0.25, 0.125, 0.375, 1],
-"hsl(300, 50%, 25%)", [0.375, 0.125, 0.375, 1],
-"hsl(330, 50%, 25%)", [0.375, 0.125, 0.25, 1],
-"hsl(0, 62.5%, 25%)", [0.40625, 0.09375, 0.09375, 1],
-"hsl(30, 62.5%, 25%)", [0.40625, 0.25, 0.09375, 1],
-"hsl(60, 62.5%, 25%)", [0.40625, 0.40625, 0.09375, 1],
-"hsl(90, 62.5%, 25%)", [0.25, 0.40625, 0.09375, 1],
-"hsl(120, 62.5%, 25%)", [0.09375, 0.40625, 0.09375, 1],
-"hsl(150, 62.5%, 25%)", [0.09375, 0.40625, 0.25, 1],
-"hsl(180, 62.5%, 25%)", [0.09375, 0.40625, 0.40625, 1],
-"hsl(210, 62.5%, 25%)", [0.09375, 0.25, 0.40625, 1],
-"hsl(240, 62.5%, 25%)", [0.09375, 0.09375, 0.40625, 1],
-"hsl(270, 62.5%, 25%)", [0.25, 0.09375, 0.40625, 1],
-"hsl(300, 62.5%, 25%)", [0.40625, 0.09375, 0.40625, 1],
-"hsl(330, 62.5%, 25%)", [0.40625, 0.09375, 0.25, 1],
-"hsl(0, 75%, 25%)", [0.4375, 0.0625, 0.0625, 1],
-"hsl(30, 75%, 25%)", [0.4375, 0.25, 0.0625, 1],
-"hsl(60, 75%, 25%)", [0.4375, 0.4375, 0.0625, 1],
-"hsl(90, 75%, 25%)", [0.25, 0.4375, 0.0625, 1],
-"hsl(120, 75%, 25%)", [0.0625, 0.4375, 0.0625, 1],
-"hsl(150, 75%, 25%)", [0.0625, 0.4375, 0.25, 1],
-"hsl(180, 75%, 25%)", [0.0625, 0.4375, 0.4375, 1],
-"hsl(210, 75%, 25%)", [0.0625, 0.25, 0.4375, 1],
-"hsl(240, 75%, 25%)", [0.0625, 0.0625, 0.4375, 1],
-"hsl(270, 75%, 25%)", [0.25, 0.0625, 0.4375, 1],
-"hsl(300, 75%, 25%)", [0.4375, 0.0625, 0.4375, 1],
-"hsl(330, 75%, 25%)", [0.4375, 0.0625, 0.25, 1],
-"hsl(0, 87.5%, 25%)", [0.46875, 0.03125, 0.03125, 1],
-"hsl(30, 87.5%, 25%)", [0.46875, 0.25, 0.03125, 1],
-"hsl(60, 87.5%, 25%)", [0.46875, 0.46875, 0.03125, 1],
-"hsl(90, 87.5%, 25%)", [0.25, 0.46875, 0.03125, 1],
-"hsl(120, 87.5%, 25%)", [0.03125, 0.46875, 0.03125, 1],
-"hsl(150, 87.5%, 25%)", [0.03125, 0.46875, 0.25, 1],
-"hsl(180, 87.5%, 25%)", [0.03125, 0.46875, 0.46875, 1],
-"hsl(210, 87.5%, 25%)", [0.03125, 0.25, 0.46875, 1],
-"hsl(240, 87.5%, 25%)", [0.03125, 0.03125, 0.46875, 1],
-"hsl(270, 87.5%, 25%)", [0.25, 0.03125, 0.46875, 1],
-"hsl(300, 87.5%, 25%)", [0.46875, 0.03125, 0.46875, 1],
-"hsl(330, 87.5%, 25%)", [0.46875, 0.03125, 0.25, 1],
-"hsl(0, 100%, 25%)", [0.5, 0, 0, 1],
-"hsl(30, 100%, 25%)", [0.5, 0.25, 0, 1],
-"hsl(60, 100%, 25%)", [0.5, 0.5, 0, 1],
-"hsl(90, 100%, 25%)", [0.25, 0.5, 0, 1],
-"hsl(120, 100%, 25%)", [0, 0.5, 0, 1],
-"hsl(150, 100%, 25%)", [0, 0.5, 0.25, 1],
-"hsl(180, 100%, 25%)", [0, 0.5, 0.5, 1],
-"hsl(210, 100%, 25%)", [0, 0.25, 0.5, 1],
-"hsl(240, 100%, 25%)", [0, 0, 0.5, 1],
-"hsl(270, 100%, 25%)", [0.25, 0, 0.5, 1],
-"hsl(300, 100%, 25%)", [0.5, 0, 0.5, 1],
-"hsl(330, 100%, 25%)", [0.5, 0, 0.25, 1],
-"hsl(0, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(30, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(60, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(90, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(120, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(150, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(180, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(210, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(240, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(270, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(300, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(330, 0%, 37.5%)", [0.375, 0.375, 0.375, 1],
-"hsl(0, 12.5%, 37.5%)", [0.421875, 0.328125, 0.328125, 1],
-"hsl(30, 12.5%, 37.5%)", [0.421875, 0.375, 0.328125, 1],
-"hsl(60, 12.5%, 37.5%)", [0.421875, 0.421875, 0.328125, 1],
-"hsl(90, 12.5%, 37.5%)", [0.375, 0.421875, 0.328125, 1],
-"hsl(120, 12.5%, 37.5%)", [0.328125, 0.421875, 0.328125, 1],
-"hsl(150, 12.5%, 37.5%)", [0.328125, 0.421875, 0.375, 1],
-"hsl(180, 12.5%, 37.5%)", [0.328125, 0.421875, 0.421875, 1],
-"hsl(210, 12.5%, 37.5%)", [0.328125, 0.375, 0.421875, 1],
-"hsl(240, 12.5%, 37.5%)", [0.328125, 0.328125, 0.421875, 1],
-"hsl(270, 12.5%, 37.5%)", [0.375, 0.328125, 0.421875, 1],
-"hsl(300, 12.5%, 37.5%)", [0.421875, 0.328125, 0.421875, 1],
-"hsl(330, 12.5%, 37.5%)", [0.421875, 0.328125, 0.375, 1],
-"hsl(0, 25%, 37.5%)", [0.46875, 0.28125, 0.28125, 1],
-"hsl(30, 25%, 37.5%)", [0.46875, 0.375, 0.28125, 1],
-"hsl(60, 25%, 37.5%)", [0.46875, 0.46875, 0.28125, 1],
-"hsl(90, 25%, 37.5%)", [0.375, 0.46875, 0.28125, 1],
-"hsl(120, 25%, 37.5%)", [0.28125, 0.46875, 0.28125, 1],
-"hsl(150, 25%, 37.5%)", [0.28125, 0.46875, 0.375, 1],
-"hsl(180, 25%, 37.5%)", [0.28125, 0.46875, 0.46875, 1],
-"hsl(210, 25%, 37.5%)", [0.28125, 0.375, 0.46875, 1],
-"hsl(240, 25%, 37.5%)", [0.28125, 0.28125, 0.46875, 1],
-"hsl(270, 25%, 37.5%)", [0.375, 0.28125, 0.46875, 1],
-"hsl(300, 25%, 37.5%)", [0.46875, 0.28125, 0.46875, 1],
-"hsl(330, 25%, 37.5%)", [0.46875, 0.28125, 0.375, 1],
-"hsl(0, 37.5%, 37.5%)", [0.515625, 0.234375, 0.234375, 1],
-"hsl(30, 37.5%, 37.5%)", [0.515625, 0.375, 0.234375, 1],
-"hsl(60, 37.5%, 37.5%)", [0.515625, 0.515625, 0.234375, 1],
-"hsl(90, 37.5%, 37.5%)", [0.375, 0.515625, 0.234375, 1],
-"hsl(120, 37.5%, 37.5%)", [0.234375, 0.515625, 0.234375, 1],
-"hsl(150, 37.5%, 37.5%)", [0.234375, 0.515625, 0.375, 1],
-"hsl(180, 37.5%, 37.5%)", [0.234375, 0.515625, 0.515625, 1],
-"hsl(210, 37.5%, 37.5%)", [0.234375, 0.375, 0.515625, 1],
-"hsl(240, 37.5%, 37.5%)", [0.234375, 0.234375, 0.515625, 1],
-"hsl(270, 37.5%, 37.5%)", [0.375, 0.234375, 0.515625, 1],
-"hsl(300, 37.5%, 37.5%)", [0.515625, 0.234375, 0.515625, 1],
-"hsl(330, 37.5%, 37.5%)", [0.515625, 0.234375, 0.375, 1],
-"hsl(0, 50%, 37.5%)", [0.5625, 0.1875, 0.1875, 1],
-"hsl(30, 50%, 37.5%)", [0.5625, 0.375, 0.1875, 1],
-"hsl(60, 50%, 37.5%)", [0.5625, 0.5625, 0.1875, 1],
-"hsl(90, 50%, 37.5%)", [0.375, 0.5625, 0.1875, 1],
-"hsl(120, 50%, 37.5%)", [0.1875, 0.5625, 0.1875, 1],
-"hsl(150, 50%, 37.5%)", [0.1875, 0.5625, 0.375, 1],
-"hsl(180, 50%, 37.5%)", [0.1875, 0.5625, 0.5625, 1],
-"hsl(210, 50%, 37.5%)", [0.1875, 0.375, 0.5625, 1],
-"hsl(240, 50%, 37.5%)", [0.1875, 0.1875, 0.5625, 1],
-"hsl(270, 50%, 37.5%)", [0.375, 0.1875, 0.5625, 1],
-"hsl(300, 50%, 37.5%)", [0.5625, 0.1875, 0.5625, 1],
-"hsl(330, 50%, 37.5%)", [0.5625, 0.1875, 0.375, 1],
-"hsl(0, 62.5%, 37.5%)", [0.609375, 0.140625, 0.140625, 1],
-"hsl(30, 62.5%, 37.5%)", [0.609375, 0.375, 0.140625, 1],
-"hsl(60, 62.5%, 37.5%)", [0.609375, 0.609375, 0.140625, 1],
-"hsl(90, 62.5%, 37.5%)", [0.375, 0.609375, 0.140625, 1],
-"hsl(120, 62.5%, 37.5%)", [0.140625, 0.609375, 0.140625, 1],
-"hsl(150, 62.5%, 37.5%)", [0.140625, 0.609375, 0.375, 1],
-"hsl(180, 62.5%, 37.5%)", [0.140625, 0.609375, 0.609375, 1],
-"hsl(210, 62.5%, 37.5%)", [0.140625, 0.375, 0.609375, 1],
-"hsl(240, 62.5%, 37.5%)", [0.140625, 0.140625, 0.609375, 1],
-"hsl(270, 62.5%, 37.5%)", [0.375, 0.140625, 0.609375, 1],
-"hsl(300, 62.5%, 37.5%)", [0.609375, 0.140625, 0.609375, 1],
-"hsl(330, 62.5%, 37.5%)", [0.609375, 0.140625, 0.375, 1],
-"hsl(0, 75%, 37.5%)", [0.65625, 0.09375, 0.09375, 1],
-"hsl(30, 75%, 37.5%)", [0.65625, 0.375, 0.09375, 1],
-"hsl(60, 75%, 37.5%)", [0.65625, 0.65625, 0.09375, 1],
-"hsl(90, 75%, 37.5%)", [0.375, 0.65625, 0.09375, 1],
-"hsl(120, 75%, 37.5%)", [0.09375, 0.65625, 0.09375, 1],
-"hsl(150, 75%, 37.5%)", [0.09375, 0.65625, 0.375, 1],
-"hsl(180, 75%, 37.5%)", [0.09375, 0.65625, 0.65625, 1],
-"hsl(210, 75%, 37.5%)", [0.09375, 0.375, 0.65625, 1],
-"hsl(240, 75%, 37.5%)", [0.09375, 0.09375, 0.65625, 1],
-"hsl(270, 75%, 37.5%)", [0.375, 0.09375, 0.65625, 1],
-"hsl(300, 75%, 37.5%)", [0.65625, 0.09375, 0.65625, 1],
-"hsl(330, 75%, 37.5%)", [0.65625, 0.09375, 0.375, 1],
-"hsl(0, 87.5%, 37.5%)", [0.703125, 0.046875, 0.046875, 1],
-"hsl(30, 87.5%, 37.5%)", [0.703125, 0.375, 0.046875, 1],
-"hsl(60, 87.5%, 37.5%)", [0.703125, 0.703125, 0.046875, 1],
-"hsl(90, 87.5%, 37.5%)", [0.375, 0.703125, 0.046875, 1],
-"hsl(120, 87.5%, 37.5%)", [0.046875, 0.703125, 0.046875, 1],
-"hsl(150, 87.5%, 37.5%)", [0.046875, 0.703125, 0.375, 1],
-"hsl(180, 87.5%, 37.5%)", [0.046875, 0.703125, 0.703125, 1],
-"hsl(210, 87.5%, 37.5%)", [0.046875, 0.375, 0.703125, 1],
-"hsl(240, 87.5%, 37.5%)", [0.046875, 0.046875, 0.703125, 1],
-"hsl(270, 87.5%, 37.5%)", [0.375, 0.046875, 0.703125, 1],
-"hsl(300, 87.5%, 37.5%)", [0.703125, 0.046875, 0.703125, 1],
-"hsl(330, 87.5%, 37.5%)", [0.703125, 0.046875, 0.375, 1],
-"hsl(0, 100%, 37.5%)", [0.75, 0, 0, 1],
-"hsl(30, 100%, 37.5%)", [0.75, 0.375, 0, 1],
-"hsl(60, 100%, 37.5%)", [0.75, 0.75, 0, 1],
-"hsl(90, 100%, 37.5%)", [0.375, 0.75, 0, 1],
-"hsl(120, 100%, 37.5%)", [0, 0.75, 0, 1],
-"hsl(150, 100%, 37.5%)", [0, 0.75, 0.375, 1],
-"hsl(180, 100%, 37.5%)", [0, 0.75, 0.75, 1],
-"hsl(210, 100%, 37.5%)", [0, 0.375, 0.75, 1],
-"hsl(240, 100%, 37.5%)", [0, 0, 0.75, 1],
-"hsl(270, 100%, 37.5%)", [0.375, 0, 0.75, 1],
-"hsl(300, 100%, 37.5%)", [0.75, 0, 0.75, 1],
-"hsl(330, 100%, 37.5%)", [0.75, 0, 0.375, 1],
-"hsl(0, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(30, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(60, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(90, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(120, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(150, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(180, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(210, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(240, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(270, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(300, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(330, 0%, 50%)", [0.5, 0.5, 0.5, 1],
-"hsl(0, 12.5%, 50%)", [0.5625, 0.4375, 0.4375, 1],
-"hsl(30, 12.5%, 50%)", [0.5625, 0.5, 0.4375, 1],
-"hsl(60, 12.5%, 50%)", [0.5625, 0.5625, 0.4375, 1],
-"hsl(90, 12.5%, 50%)", [0.5, 0.5625, 0.4375, 1],
-"hsl(120, 12.5%, 50%)", [0.4375, 0.5625, 0.4375, 1],
-"hsl(150, 12.5%, 50%)", [0.4375, 0.5625, 0.5, 1],
-"hsl(180, 12.5%, 50%)", [0.4375, 0.5625, 0.5625, 1],
-"hsl(210, 12.5%, 50%)", [0.4375, 0.5, 0.5625, 1],
-"hsl(240, 12.5%, 50%)", [0.4375, 0.4375, 0.5625, 1],
-"hsl(270, 12.5%, 50%)", [0.5, 0.4375, 0.5625, 1],
-"hsl(300, 12.5%, 50%)", [0.5625, 0.4375, 0.5625, 1],
-"hsl(330, 12.5%, 50%)", [0.5625, 0.4375, 0.5, 1],
-"hsl(0, 25%, 50%)", [0.625, 0.375, 0.375, 1],
-"hsl(30, 25%, 50%)", [0.625, 0.5, 0.375, 1],
-"hsl(60, 25%, 50%)", [0.625, 0.625, 0.375, 1],
-"hsl(90, 25%, 50%)", [0.5, 0.625, 0.375, 1],
-"hsl(120, 25%, 50%)", [0.375, 0.625, 0.375, 1],
-"hsl(150, 25%, 50%)", [0.375, 0.625, 0.5, 1],
-"hsl(180, 25%, 50%)", [0.375, 0.625, 0.625, 1],
-"hsl(210, 25%, 50%)", [0.375, 0.5, 0.625, 1],
-"hsl(240, 25%, 50%)", [0.375, 0.375, 0.625, 1],
-"hsl(270, 25%, 50%)", [0.5, 0.375, 0.625, 1],
-"hsl(300, 25%, 50%)", [0.625, 0.375, 0.625, 1],
-"hsl(330, 25%, 50%)", [0.625, 0.375, 0.5, 1],
-"hsl(0, 37.5%, 50%)", [0.6875, 0.3125, 0.3125, 1],
-"hsl(30, 37.5%, 50%)", [0.6875, 0.5, 0.3125, 1],
-"hsl(60, 37.5%, 50%)", [0.6875, 0.6875, 0.3125, 1],
-"hsl(90, 37.5%, 50%)", [0.5, 0.6875, 0.3125, 1],
-"hsl(120, 37.5%, 50%)", [0.3125, 0.6875, 0.3125, 1],
-"hsl(150, 37.5%, 50%)", [0.3125, 0.6875, 0.5, 1],
-"hsl(180, 37.5%, 50%)", [0.3125, 0.6875, 0.6875, 1],
-"hsl(210, 37.5%, 50%)", [0.3125, 0.5, 0.6875, 1],
-"hsl(240, 37.5%, 50%)", [0.3125, 0.3125, 0.6875, 1],
-"hsl(270, 37.5%, 50%)", [0.5, 0.3125, 0.6875, 1],
-"hsl(300, 37.5%, 50%)", [0.6875, 0.3125, 0.6875, 1],
-"hsl(330, 37.5%, 50%)", [0.6875, 0.3125, 0.5, 1],
-"hsl(0, 50%, 50%)", [0.75, 0.25, 0.25, 1],
-"hsl(30, 50%, 50%)", [0.75, 0.5, 0.25, 1],
-"hsl(60, 50%, 50%)", [0.75, 0.75, 0.25, 1],
-"hsl(90, 50%, 50%)", [0.5, 0.75, 0.25, 1],
-"hsl(120, 50%, 50%)", [0.25, 0.75, 0.25, 1],
-"hsl(150, 50%, 50%)", [0.25, 0.75, 0.5, 1],
-"hsl(180, 50%, 50%)", [0.25, 0.75, 0.75, 1],
-"hsl(210, 50%, 50%)", [0.25, 0.5, 0.75, 1],
-"hsl(240, 50%, 50%)", [0.25, 0.25, 0.75, 1],
-"hsl(270, 50%, 50%)", [0.5, 0.25, 0.75, 1],
-"hsl(300, 50%, 50%)", [0.75, 0.25, 0.75, 1],
-"hsl(330, 50%, 50%)", [0.75, 0.25, 0.5, 1],
-"hsl(0, 62.5%, 50%)", [0.8125, 0.1875, 0.1875, 1],
-"hsl(30, 62.5%, 50%)", [0.8125, 0.5, 0.1875, 1],
-"hsl(60, 62.5%, 50%)", [0.8125, 0.8125, 0.1875, 1],
-"hsl(90, 62.5%, 50%)", [0.5, 0.8125, 0.1875, 1],
-"hsl(120, 62.5%, 50%)", [0.1875, 0.8125, 0.1875, 1],
-"hsl(150, 62.5%, 50%)", [0.1875, 0.8125, 0.5, 1],
-"hsl(180, 62.5%, 50%)", [0.1875, 0.8125, 0.8125, 1],
-"hsl(210, 62.5%, 50%)", [0.1875, 0.5, 0.8125, 1],
-"hsl(240, 62.5%, 50%)", [0.1875, 0.1875, 0.8125, 1],
-"hsl(270, 62.5%, 50%)", [0.5, 0.1875, 0.8125, 1],
-"hsl(300, 62.5%, 50%)", [0.8125, 0.1875, 0.8125, 1],
-"hsl(330, 62.5%, 50%)", [0.8125, 0.1875, 0.5, 1],
-"hsl(0, 75%, 50%)", [0.875, 0.125, 0.125, 1],
-"hsl(30, 75%, 50%)", [0.875, 0.5, 0.125, 1],
-"hsl(60, 75%, 50%)", [0.875, 0.875, 0.125, 1],
-"hsl(90, 75%, 50%)", [0.5, 0.875, 0.125, 1],
-"hsl(120, 75%, 50%)", [0.125, 0.875, 0.125, 1],
-"hsl(150, 75%, 50%)", [0.125, 0.875, 0.5, 1],
-"hsl(180, 75%, 50%)", [0.125, 0.875, 0.875, 1],
-"hsl(210, 75%, 50%)", [0.125, 0.5, 0.875, 1],
-"hsl(240, 75%, 50%)", [0.125, 0.125, 0.875, 1],
-"hsl(270, 75%, 50%)", [0.5, 0.125, 0.875, 1],
-"hsl(300, 75%, 50%)", [0.875, 0.125, 0.875, 1],
-"hsl(330, 75%, 50%)", [0.875, 0.125, 0.5, 1],
-"hsl(0, 87.5%, 50%)", [0.9375, 0.0625, 0.0625, 1],
-"hsl(30, 87.5%, 50%)", [0.9375, 0.5, 0.0625, 1],
-"hsl(60, 87.5%, 50%)", [0.9375, 0.9375, 0.0625, 1],
-"hsl(90, 87.5%, 50%)", [0.5, 0.9375, 0.0625, 1],
-"hsl(120, 87.5%, 50%)", [0.0625, 0.9375, 0.0625, 1],
-"hsl(150, 87.5%, 50%)", [0.0625, 0.9375, 0.5, 1],
-"hsl(180, 87.5%, 50%)", [0.0625, 0.9375, 0.9375, 1],
-"hsl(210, 87.5%, 50%)", [0.0625, 0.5, 0.9375, 1],
-"hsl(240, 87.5%, 50%)", [0.0625, 0.0625, 0.9375, 1],
-"hsl(270, 87.5%, 50%)", [0.5, 0.0625, 0.9375, 1],
-"hsl(300, 87.5%, 50%)", [0.9375, 0.0625, 0.9375, 1],
-"hsl(330, 87.5%, 50%)", [0.9375, 0.0625, 0.5, 1],
-"hsl(0, 100%, 50%)", [1, 0, 0, 1],
-"hsl(30, 100%, 50%)", [1, 0.5, 0, 1],
-"hsl(60, 100%, 50%)", [1, 1, 0, 1],
-"hsl(90, 100%, 50%)", [0.5, 1, 0, 1],
-"hsl(120, 100%, 50%)", [0, 1, 0, 1],
-"hsl(150, 100%, 50%)", [0, 1, 0.5, 1],
-"hsl(180, 100%, 50%)", [0, 1, 1, 1],
-"hsl(210, 100%, 50%)", [0, 0.5, 1, 1],
-"hsl(240, 100%, 50%)", [0, 0, 1, 1],
-"hsl(270, 100%, 50%)", [0.5, 0, 1, 1],
-"hsl(300, 100%, 50%)", [1, 0, 1, 1],
-"hsl(330, 100%, 50%)", [1, 0, 0.5, 1],
-"hsl(0, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(30, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(60, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(90, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(120, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(150, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(180, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(210, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(240, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(270, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(300, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(330, 0%, 62.5%)", [0.625, 0.625, 0.625, 1],
-"hsl(0, 12.5%, 62.5%)", [0.671875, 0.578125, 0.578125, 1],
-"hsl(30, 12.5%, 62.5%)", [0.671875, 0.625, 0.578125, 1],
-"hsl(60, 12.5%, 62.5%)", [0.671875, 0.671875, 0.578125, 1],
-"hsl(90, 12.5%, 62.5%)", [0.625, 0.671875, 0.578125, 1],
-"hsl(120, 12.5%, 62.5%)", [0.578125, 0.671875, 0.578125, 1],
-"hsl(150, 12.5%, 62.5%)", [0.578125, 0.671875, 0.625, 1],
-"hsl(180, 12.5%, 62.5%)", [0.578125, 0.671875, 0.671875, 1],
-"hsl(210, 12.5%, 62.5%)", [0.578125, 0.625, 0.671875, 1],
-"hsl(240, 12.5%, 62.5%)", [0.578125, 0.578125, 0.671875, 1],
-"hsl(270, 12.5%, 62.5%)", [0.625, 0.578125, 0.671875, 1],
-"hsl(300, 12.5%, 62.5%)", [0.671875, 0.578125, 0.671875, 1],
-"hsl(330, 12.5%, 62.5%)", [0.671875, 0.578125, 0.625, 1],
-"hsl(0, 25%, 62.5%)", [0.71875, 0.53125, 0.53125, 1],
-"hsl(30, 25%, 62.5%)", [0.71875, 0.625, 0.53125, 1],
-"hsl(60, 25%, 62.5%)", [0.71875, 0.71875, 0.53125, 1],
-"hsl(90, 25%, 62.5%)", [0.625, 0.71875, 0.53125, 1],
-"hsl(120, 25%, 62.5%)", [0.53125, 0.71875, 0.53125, 1],
-"hsl(150, 25%, 62.5%)", [0.53125, 0.71875, 0.625, 1],
-"hsl(180, 25%, 62.5%)", [0.53125, 0.71875, 0.71875, 1],
-"hsl(210, 25%, 62.5%)", [0.53125, 0.625, 0.71875, 1],
-"hsl(240, 25%, 62.5%)", [0.53125, 0.53125, 0.71875, 1],
-"hsl(270, 25%, 62.5%)", [0.625, 0.53125, 0.71875, 1],
-"hsl(300, 25%, 62.5%)", [0.71875, 0.53125, 0.71875, 1],
-"hsl(330, 25%, 62.5%)", [0.71875, 0.53125, 0.625, 1],
-"hsl(0, 37.5%, 62.5%)", [0.765625, 0.484375, 0.484375, 1],
-"hsl(30, 37.5%, 62.5%)", [0.765625, 0.625, 0.484375, 1],
-"hsl(60, 37.5%, 62.5%)", [0.765625, 0.765625, 0.484375, 1],
-"hsl(90, 37.5%, 62.5%)", [0.625, 0.765625, 0.484375, 1],
-"hsl(120, 37.5%, 62.5%)", [0.484375, 0.765625, 0.484375, 1],
-"hsl(150, 37.5%, 62.5%)", [0.484375, 0.765625, 0.625, 1],
-"hsl(180, 37.5%, 62.5%)", [0.484375, 0.765625, 0.765625, 1],
-"hsl(210, 37.5%, 62.5%)", [0.484375, 0.625, 0.765625, 1],
-"hsl(240, 37.5%, 62.5%)", [0.484375, 0.484375, 0.765625, 1],
-"hsl(270, 37.5%, 62.5%)", [0.625, 0.484375, 0.765625, 1],
-"hsl(300, 37.5%, 62.5%)", [0.765625, 0.484375, 0.765625, 1],
-"hsl(330, 37.5%, 62.5%)", [0.765625, 0.484375, 0.625, 1],
-"hsl(0, 50%, 62.5%)", [0.8125, 0.4375, 0.4375, 1],
-"hsl(30, 50%, 62.5%)", [0.8125, 0.625, 0.4375, 1],
-"hsl(60, 50%, 62.5%)", [0.8125, 0.8125, 0.4375, 1],
-"hsl(90, 50%, 62.5%)", [0.625, 0.8125, 0.4375, 1],
-"hsl(120, 50%, 62.5%)", [0.4375, 0.8125, 0.4375, 1],
-"hsl(150, 50%, 62.5%)", [0.4375, 0.8125, 0.625, 1],
-"hsl(180, 50%, 62.5%)", [0.4375, 0.8125, 0.8125, 1],
-"hsl(210, 50%, 62.5%)", [0.4375, 0.625, 0.8125, 1],
-"hsl(240, 50%, 62.5%)", [0.4375, 0.4375, 0.8125, 1],
-"hsl(270, 50%, 62.5%)", [0.625, 0.4375, 0.8125, 1],
-"hsl(300, 50%, 62.5%)", [0.8125, 0.4375, 0.8125, 1],
-"hsl(330, 50%, 62.5%)", [0.8125, 0.4375, 0.625, 1],
-"hsl(0, 62.5%, 62.5%)", [0.859375, 0.390625, 0.390625, 1],
-"hsl(30, 62.5%, 62.5%)", [0.859375, 0.625, 0.390625, 1],
-"hsl(60, 62.5%, 62.5%)", [0.859375, 0.859375, 0.390625, 1],
-"hsl(90, 62.5%, 62.5%)", [0.625, 0.859375, 0.390625, 1],
-"hsl(120, 62.5%, 62.5%)", [0.390625, 0.859375, 0.390625, 1],
-"hsl(150, 62.5%, 62.5%)", [0.390625, 0.859375, 0.625, 1],
-"hsl(180, 62.5%, 62.5%)", [0.390625, 0.859375, 0.859375, 1],
-"hsl(210, 62.5%, 62.5%)", [0.390625, 0.625, 0.859375, 1],
-"hsl(240, 62.5%, 62.5%)", [0.390625, 0.390625, 0.859375, 1],
-"hsl(270, 62.5%, 62.5%)", [0.625, 0.390625, 0.859375, 1],
-"hsl(300, 62.5%, 62.5%)", [0.859375, 0.390625, 0.859375, 1],
-"hsl(330, 62.5%, 62.5%)", [0.859375, 0.390625, 0.625, 1],
-"hsl(0, 75%, 62.5%)", [0.90625, 0.34375, 0.34375, 1],
-"hsl(30, 75%, 62.5%)", [0.90625, 0.625, 0.34375, 1],
-"hsl(60, 75%, 62.5%)", [0.90625, 0.90625, 0.34375, 1],
-"hsl(90, 75%, 62.5%)", [0.625, 0.90625, 0.34375, 1],
-"hsl(120, 75%, 62.5%)", [0.34375, 0.90625, 0.34375, 1],
-"hsl(150, 75%, 62.5%)", [0.34375, 0.90625, 0.625, 1],
-"hsl(180, 75%, 62.5%)", [0.34375, 0.90625, 0.90625, 1],
-"hsl(210, 75%, 62.5%)", [0.34375, 0.625, 0.90625, 1],
-"hsl(240, 75%, 62.5%)", [0.34375, 0.34375, 0.90625, 1],
-"hsl(270, 75%, 62.5%)", [0.625, 0.34375, 0.90625, 1],
-"hsl(300, 75%, 62.5%)", [0.90625, 0.34375, 0.90625, 1],
-"hsl(330, 75%, 62.5%)", [0.90625, 0.34375, 0.625, 1],
-"hsl(0, 87.5%, 62.5%)", [0.953125, 0.296875, 0.296875, 1],
-"hsl(30, 87.5%, 62.5%)", [0.953125, 0.625, 0.296875, 1],
-"hsl(60, 87.5%, 62.5%)", [0.953125, 0.953125, 0.296875, 1],
-"hsl(90, 87.5%, 62.5%)", [0.625, 0.953125, 0.296875, 1],
-"hsl(120, 87.5%, 62.5%)", [0.296875, 0.953125, 0.296875, 1],
-"hsl(150, 87.5%, 62.5%)", [0.296875, 0.953125, 0.625, 1],
-"hsl(180, 87.5%, 62.5%)", [0.296875, 0.953125, 0.953125, 1],
-"hsl(210, 87.5%, 62.5%)", [0.296875, 0.625, 0.953125, 1],
-"hsl(240, 87.5%, 62.5%)", [0.296875, 0.296875, 0.953125, 1],
-"hsl(270, 87.5%, 62.5%)", [0.625, 0.296875, 0.953125, 1],
-"hsl(300, 87.5%, 62.5%)", [0.953125, 0.296875, 0.953125, 1],
-"hsl(330, 87.5%, 62.5%)", [0.953125, 0.296875, 0.625, 1],
-"hsl(0, 100%, 62.5%)", [1, 0.25, 0.25, 1],
-"hsl(30, 100%, 62.5%)", [1, 0.625, 0.25, 1],
-"hsl(60, 100%, 62.5%)", [1, 1, 0.25, 1],
-"hsl(90, 100%, 62.5%)", [0.625, 1, 0.25, 1],
-"hsl(120, 100%, 62.5%)", [0.25, 1, 0.25, 1],
-"hsl(150, 100%, 62.5%)", [0.25, 1, 0.625, 1],
-"hsl(180, 100%, 62.5%)", [0.25, 1, 1, 1],
-"hsl(210, 100%, 62.5%)", [0.25, 0.625, 1, 1],
-"hsl(240, 100%, 62.5%)", [0.25, 0.25, 1, 1],
-"hsl(270, 100%, 62.5%)", [0.625, 0.25, 1, 1],
-"hsl(300, 100%, 62.5%)", [1, 0.25, 1, 1],
-"hsl(330, 100%, 62.5%)", [1, 0.25, 0.625, 1],
-"hsl(0, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(30, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(60, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(90, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(120, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(150, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(180, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(210, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(240, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(270, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(300, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(330, 0%, 75%)", [0.75, 0.75, 0.75, 1],
-"hsl(0, 12.5%, 75%)", [0.78125, 0.71875, 0.71875, 1],
-"hsl(30, 12.5%, 75%)", [0.78125, 0.75, 0.71875, 1],
-"hsl(60, 12.5%, 75%)", [0.78125, 0.78125, 0.71875, 1],
-"hsl(90, 12.5%, 75%)", [0.75, 0.78125, 0.71875, 1],
-"hsl(120, 12.5%, 75%)", [0.71875, 0.78125, 0.71875, 1],
-"hsl(150, 12.5%, 75%)", [0.71875, 0.78125, 0.75, 1],
-"hsl(180, 12.5%, 75%)", [0.71875, 0.78125, 0.78125, 1],
-"hsl(210, 12.5%, 75%)", [0.71875, 0.75, 0.78125, 1],
-"hsl(240, 12.5%, 75%)", [0.71875, 0.71875, 0.78125, 1],
-"hsl(270, 12.5%, 75%)", [0.75, 0.71875, 0.78125, 1],
-"hsl(300, 12.5%, 75%)", [0.78125, 0.71875, 0.78125, 1],
-"hsl(330, 12.5%, 75%)", [0.78125, 0.71875, 0.75, 1],
-"hsl(0, 25%, 75%)", [0.8125, 0.6875, 0.6875, 1],
-"hsl(30, 25%, 75%)", [0.8125, 0.75, 0.6875, 1],
-"hsl(60, 25%, 75%)", [0.8125, 0.8125, 0.6875, 1],
-"hsl(90, 25%, 75%)", [0.75, 0.8125, 0.6875, 1],
-"hsl(120, 25%, 75%)", [0.6875, 0.8125, 0.6875, 1],
-"hsl(150, 25%, 75%)", [0.6875, 0.8125, 0.75, 1],
-"hsl(180, 25%, 75%)", [0.6875, 0.8125, 0.8125, 1],
-"hsl(210, 25%, 75%)", [0.6875, 0.75, 0.8125, 1],
-"hsl(240, 25%, 75%)", [0.6875, 0.6875, 0.8125, 1],
-"hsl(270, 25%, 75%)", [0.75, 0.6875, 0.8125, 1],
-"hsl(300, 25%, 75%)", [0.8125, 0.6875, 0.8125, 1],
-"hsl(330, 25%, 75%)", [0.8125, 0.6875, 0.75, 1],
-"hsl(0, 37.5%, 75%)", [0.84375, 0.65625, 0.65625, 1],
-"hsl(30, 37.5%, 75%)", [0.84375, 0.75, 0.65625, 1],
-"hsl(60, 37.5%, 75%)", [0.84375, 0.84375, 0.65625, 1],
-"hsl(90, 37.5%, 75%)", [0.75, 0.84375, 0.65625, 1],
-"hsl(120, 37.5%, 75%)", [0.65625, 0.84375, 0.65625, 1],
-"hsl(150, 37.5%, 75%)", [0.65625, 0.84375, 0.75, 1],
-"hsl(180, 37.5%, 75%)", [0.65625, 0.84375, 0.84375, 1],
-"hsl(210, 37.5%, 75%)", [0.65625, 0.75, 0.84375, 1],
-"hsl(240, 37.5%, 75%)", [0.65625, 0.65625, 0.84375, 1],
-"hsl(270, 37.5%, 75%)", [0.75, 0.65625, 0.84375, 1],
-"hsl(300, 37.5%, 75%)", [0.84375, 0.65625, 0.84375, 1],
-"hsl(330, 37.5%, 75%)", [0.84375, 0.65625, 0.75, 1],
-"hsl(0, 50%, 75%)", [0.875, 0.625, 0.625, 1],
-"hsl(30, 50%, 75%)", [0.875, 0.75, 0.625, 1],
-"hsl(60, 50%, 75%)", [0.875, 0.875, 0.625, 1],
-"hsl(90, 50%, 75%)", [0.75, 0.875, 0.625, 1],
-"hsl(120, 50%, 75%)", [0.625, 0.875, 0.625, 1],
-"hsl(150, 50%, 75%)", [0.625, 0.875, 0.75, 1],
-"hsl(180, 50%, 75%)", [0.625, 0.875, 0.875, 1],
-"hsl(210, 50%, 75%)", [0.625, 0.75, 0.875, 1],
-"hsl(240, 50%, 75%)", [0.625, 0.625, 0.875, 1],
-"hsl(270, 50%, 75%)", [0.75, 0.625, 0.875, 1],
-"hsl(300, 50%, 75%)", [0.875, 0.625, 0.875, 1],
-"hsl(330, 50%, 75%)", [0.875, 0.625, 0.75, 1],
-"hsl(0, 62.5%, 75%)", [0.90625, 0.59375, 0.59375, 1],
-"hsl(30, 62.5%, 75%)", [0.90625, 0.75, 0.59375, 1],
-"hsl(60, 62.5%, 75%)", [0.90625, 0.90625, 0.59375, 1],
-"hsl(90, 62.5%, 75%)", [0.75, 0.90625, 0.59375, 1],
-"hsl(120, 62.5%, 75%)", [0.59375, 0.90625, 0.59375, 1],
-"hsl(150, 62.5%, 75%)", [0.59375, 0.90625, 0.75, 1],
-"hsl(180, 62.5%, 75%)", [0.59375, 0.90625, 0.90625, 1],
-"hsl(210, 62.5%, 75%)", [0.59375, 0.75, 0.90625, 1],
-"hsl(240, 62.5%, 75%)", [0.59375, 0.59375, 0.90625, 1],
-"hsl(270, 62.5%, 75%)", [0.75, 0.59375, 0.90625, 1],
-"hsl(300, 62.5%, 75%)", [0.90625, 0.59375, 0.90625, 1],
-"hsl(330, 62.5%, 75%)", [0.90625, 0.59375, 0.75, 1],
-"hsl(0, 75%, 75%)", [0.9375, 0.5625, 0.5625, 1],
-"hsl(30, 75%, 75%)", [0.9375, 0.75, 0.5625, 1],
-"hsl(60, 75%, 75%)", [0.9375, 0.9375, 0.5625, 1],
-"hsl(90, 75%, 75%)", [0.75, 0.9375, 0.5625, 1],
-"hsl(120, 75%, 75%)", [0.5625, 0.9375, 0.5625, 1],
-"hsl(150, 75%, 75%)", [0.5625, 0.9375, 0.75, 1],
-"hsl(180, 75%, 75%)", [0.5625, 0.9375, 0.9375, 1],
-"hsl(210, 75%, 75%)", [0.5625, 0.75, 0.9375, 1],
-"hsl(240, 75%, 75%)", [0.5625, 0.5625, 0.9375, 1],
-"hsl(270, 75%, 75%)", [0.75, 0.5625, 0.9375, 1],
-"hsl(300, 75%, 75%)", [0.9375, 0.5625, 0.9375, 1],
-"hsl(330, 75%, 75%)", [0.9375, 0.5625, 0.75, 1],
-"hsl(0, 87.5%, 75%)", [0.96875, 0.53125, 0.53125, 1],
-"hsl(30, 87.5%, 75%)", [0.96875, 0.75, 0.53125, 1],
-"hsl(60, 87.5%, 75%)", [0.96875, 0.96875, 0.53125, 1],
-"hsl(90, 87.5%, 75%)", [0.75, 0.96875, 0.53125, 1],
-"hsl(120, 87.5%, 75%)", [0.53125, 0.96875, 0.53125, 1],
-"hsl(150, 87.5%, 75%)", [0.53125, 0.96875, 0.75, 1],
-"hsl(180, 87.5%, 75%)", [0.53125, 0.96875, 0.96875, 1],
-"hsl(210, 87.5%, 75%)", [0.53125, 0.75, 0.96875, 1],
-"hsl(240, 87.5%, 75%)", [0.53125, 0.53125, 0.96875, 1],
-"hsl(270, 87.5%, 75%)", [0.75, 0.53125, 0.96875, 1],
-"hsl(300, 87.5%, 75%)", [0.96875, 0.53125, 0.96875, 1],
-"hsl(330, 87.5%, 75%)", [0.96875, 0.53125, 0.75, 1],
-"hsl(0, 100%, 75%)", [1, 0.5, 0.5, 1],
-"hsl(30, 100%, 75%)", [1, 0.75, 0.5, 1],
-"hsl(60, 100%, 75%)", [1, 1, 0.5, 1],
-"hsl(90, 100%, 75%)", [0.75, 1, 0.5, 1],
-"hsl(120, 100%, 75%)", [0.5, 1, 0.5, 1],
-"hsl(150, 100%, 75%)", [0.5, 1, 0.75, 1],
-"hsl(180, 100%, 75%)", [0.5, 1, 1, 1],
-"hsl(210, 100%, 75%)", [0.5, 0.75, 1, 1],
-"hsl(240, 100%, 75%)", [0.5, 0.5, 1, 1],
-"hsl(270, 100%, 75%)", [0.75, 0.5, 1, 1],
-"hsl(300, 100%, 75%)", [1, 0.5, 1, 1],
-"hsl(330, 100%, 75%)", [1, 0.5, 0.75, 1],
-"hsl(0, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(30, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(60, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(90, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(120, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(150, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(180, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(210, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(240, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(270, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(300, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(330, 0%, 87.5%)", [0.875, 0.875, 0.875, 1],
-"hsl(0, 12.5%, 87.5%)", [0.890625, 0.859375, 0.859375, 1],
-"hsl(30, 12.5%, 87.5%)", [0.890625, 0.875, 0.859375, 1],
-"hsl(60, 12.5%, 87.5%)", [0.890625, 0.890625, 0.859375, 1],
-"hsl(90, 12.5%, 87.5%)", [0.875, 0.890625, 0.859375, 1],
-"hsl(120, 12.5%, 87.5%)", [0.859375, 0.890625, 0.859375, 1],
-"hsl(150, 12.5%, 87.5%)", [0.859375, 0.890625, 0.875, 1],
-"hsl(180, 12.5%, 87.5%)", [0.859375, 0.890625, 0.890625, 1],
-"hsl(210, 12.5%, 87.5%)", [0.859375, 0.875, 0.890625, 1],
-"hsl(240, 12.5%, 87.5%)", [0.859375, 0.859375, 0.890625, 1],
-"hsl(270, 12.5%, 87.5%)", [0.875, 0.859375, 0.890625, 1],
-"hsl(300, 12.5%, 87.5%)", [0.890625, 0.859375, 0.890625, 1],
-"hsl(330, 12.5%, 87.5%)", [0.890625, 0.859375, 0.875, 1],
-"hsl(0, 25%, 87.5%)", [0.90625, 0.84375, 0.84375, 1],
-"hsl(30, 25%, 87.5%)", [0.90625, 0.875, 0.84375, 1],
-"hsl(60, 25%, 87.5%)", [0.90625, 0.90625, 0.84375, 1],
-"hsl(90, 25%, 87.5%)", [0.875, 0.90625, 0.84375, 1],
-"hsl(120, 25%, 87.5%)", [0.84375, 0.90625, 0.84375, 1],
-"hsl(150, 25%, 87.5%)", [0.84375, 0.90625, 0.875, 1],
-"hsl(180, 25%, 87.5%)", [0.84375, 0.90625, 0.90625, 1],
-"hsl(210, 25%, 87.5%)", [0.84375, 0.875, 0.90625, 1],
-"hsl(240, 25%, 87.5%)", [0.84375, 0.84375, 0.90625, 1],
-"hsl(270, 25%, 87.5%)", [0.875, 0.84375, 0.90625, 1],
-"hsl(300, 25%, 87.5%)", [0.90625, 0.84375, 0.90625, 1],
-"hsl(330, 25%, 87.5%)", [0.90625, 0.84375, 0.875, 1],
-"hsl(0, 37.5%, 87.5%)", [0.921875, 0.828125, 0.828125, 1],
-"hsl(30, 37.5%, 87.5%)", [0.921875, 0.875, 0.828125, 1],
-"hsl(60, 37.5%, 87.5%)", [0.921875, 0.921875, 0.828125, 1],
-"hsl(90, 37.5%, 87.5%)", [0.875, 0.921875, 0.828125, 1],
-"hsl(120, 37.5%, 87.5%)", [0.828125, 0.921875, 0.828125, 1],
-"hsl(150, 37.5%, 87.5%)", [0.828125, 0.921875, 0.875, 1],
-"hsl(180, 37.5%, 87.5%)", [0.828125, 0.921875, 0.921875, 1],
-"hsl(210, 37.5%, 87.5%)", [0.828125, 0.875, 0.921875, 1],
-"hsl(240, 37.5%, 87.5%)", [0.828125, 0.828125, 0.921875, 1],
-"hsl(270, 37.5%, 87.5%)", [0.875, 0.828125, 0.921875, 1],
-"hsl(300, 37.5%, 87.5%)", [0.921875, 0.828125, 0.921875, 1],
-"hsl(330, 37.5%, 87.5%)", [0.921875, 0.828125, 0.875, 1],
-"hsl(0, 50%, 87.5%)", [0.9375, 0.8125, 0.8125, 1],
-"hsl(30, 50%, 87.5%)", [0.9375, 0.875, 0.8125, 1],
-"hsl(60, 50%, 87.5%)", [0.9375, 0.9375, 0.8125, 1],
-"hsl(90, 50%, 87.5%)", [0.875, 0.9375, 0.8125, 1],
-"hsl(120, 50%, 87.5%)", [0.8125, 0.9375, 0.8125, 1],
-"hsl(150, 50%, 87.5%)", [0.8125, 0.9375, 0.875, 1],
-"hsl(180, 50%, 87.5%)", [0.8125, 0.9375, 0.9375, 1],
-"hsl(210, 50%, 87.5%)", [0.8125, 0.875, 0.9375, 1],
-"hsl(240, 50%, 87.5%)", [0.8125, 0.8125, 0.9375, 1],
-"hsl(270, 50%, 87.5%)", [0.875, 0.8125, 0.9375, 1],
-"hsl(300, 50%, 87.5%)", [0.9375, 0.8125, 0.9375, 1],
-"hsl(330, 50%, 87.5%)", [0.9375, 0.8125, 0.875, 1],
-"hsl(0, 62.5%, 87.5%)", [0.953125, 0.796875, 0.796875, 1],
-"hsl(30, 62.5%, 87.5%)", [0.953125, 0.875, 0.796875, 1],
-"hsl(60, 62.5%, 87.5%)", [0.953125, 0.953125, 0.796875, 1],
-"hsl(90, 62.5%, 87.5%)", [0.875, 0.953125, 0.796875, 1],
-"hsl(120, 62.5%, 87.5%)", [0.796875, 0.953125, 0.796875, 1],
-"hsl(150, 62.5%, 87.5%)", [0.796875, 0.953125, 0.875, 1],
-"hsl(180, 62.5%, 87.5%)", [0.796875, 0.953125, 0.953125, 1],
-"hsl(210, 62.5%, 87.5%)", [0.796875, 0.875, 0.953125, 1],
-"hsl(240, 62.5%, 87.5%)", [0.796875, 0.796875, 0.953125, 1],
-"hsl(270, 62.5%, 87.5%)", [0.875, 0.796875, 0.953125, 1],
-"hsl(300, 62.5%, 87.5%)", [0.953125, 0.796875, 0.953125, 1],
-"hsl(330, 62.5%, 87.5%)", [0.953125, 0.796875, 0.875, 1],
-"hsl(0, 75%, 87.5%)", [0.96875, 0.78125, 0.78125, 1],
-"hsl(30, 75%, 87.5%)", [0.96875, 0.875, 0.78125, 1],
-"hsl(60, 75%, 87.5%)", [0.96875, 0.96875, 0.78125, 1],
-"hsl(90, 75%, 87.5%)", [0.875, 0.96875, 0.78125, 1],
-"hsl(120, 75%, 87.5%)", [0.78125, 0.96875, 0.78125, 1],
-"hsl(150, 75%, 87.5%)", [0.78125, 0.96875, 0.875, 1],
-"hsl(180, 75%, 87.5%)", [0.78125, 0.96875, 0.96875, 1],
-"hsl(210, 75%, 87.5%)", [0.78125, 0.875, 0.96875, 1],
-"hsl(240, 75%, 87.5%)", [0.78125, 0.78125, 0.96875, 1],
-"hsl(270, 75%, 87.5%)", [0.875, 0.78125, 0.96875, 1],
-"hsl(300, 75%, 87.5%)", [0.96875, 0.78125, 0.96875, 1],
-"hsl(330, 75%, 87.5%)", [0.96875, 0.78125, 0.875, 1],
-"hsl(0, 87.5%, 87.5%)", [0.984375, 0.765625, 0.765625, 1],
-"hsl(30, 87.5%, 87.5%)", [0.984375, 0.875, 0.765625, 1],
-"hsl(60, 87.5%, 87.5%)", [0.984375, 0.984375, 0.765625, 1],
-"hsl(90, 87.5%, 87.5%)", [0.875, 0.984375, 0.765625, 1],
-"hsl(120, 87.5%, 87.5%)", [0.765625, 0.984375, 0.765625, 1],
-"hsl(150, 87.5%, 87.5%)", [0.765625, 0.984375, 0.875, 1],
-"hsl(180, 87.5%, 87.5%)", [0.765625, 0.984375, 0.984375, 1],
-"hsl(210, 87.5%, 87.5%)", [0.765625, 0.875, 0.984375, 1],
-"hsl(240, 87.5%, 87.5%)", [0.765625, 0.765625, 0.984375, 1],
-"hsl(270, 87.5%, 87.5%)", [0.875, 0.765625, 0.984375, 1],
-"hsl(300, 87.5%, 87.5%)", [0.984375, 0.765625, 0.984375, 1],
-"hsl(330, 87.5%, 87.5%)", [0.984375, 0.765625, 0.875, 1],
-"hsl(0, 100%, 87.5%)", [1, 0.75, 0.75, 1],
-"hsl(30, 100%, 87.5%)", [1, 0.875, 0.75, 1],
-"hsl(60, 100%, 87.5%)", [1, 1, 0.75, 1],
-"hsl(90, 100%, 87.5%)", [0.875, 1, 0.75, 1],
-"hsl(120, 100%, 87.5%)", [0.75, 1, 0.75, 1],
-"hsl(150, 100%, 87.5%)", [0.75, 1, 0.875, 1],
-"hsl(180, 100%, 87.5%)", [0.75, 1, 1, 1],
-"hsl(210, 100%, 87.5%)", [0.75, 0.875, 1, 1],
-"hsl(240, 100%, 87.5%)", [0.75, 0.75, 1, 1],
-"hsl(270, 100%, 87.5%)", [0.875, 0.75, 1, 1],
-"hsl(300, 100%, 87.5%)", [1, 0.75, 1, 1],
-"hsl(330, 100%, 87.5%)", [1, 0.75, 0.875, 1],
-"hsl(0, 0%, 100%)", [1, 1, 1, 1],
-"hsl(30, 0%, 100%)", [1, 1, 1, 1],
-"hsl(60, 0%, 100%)", [1, 1, 1, 1],
-"hsl(90, 0%, 100%)", [1, 1, 1, 1],
-"hsl(120, 0%, 100%)", [1, 1, 1, 1],
-"hsl(150, 0%, 100%)", [1, 1, 1, 1],
-"hsl(180, 0%, 100%)", [1, 1, 1, 1],
-"hsl(210, 0%, 100%)", [1, 1, 1, 1],
-"hsl(240, 0%, 100%)", [1, 1, 1, 1],
-"hsl(270, 0%, 100%)", [1, 1, 1, 1],
-"hsl(300, 0%, 100%)", [1, 1, 1, 1],
-"hsl(330, 0%, 100%)", [1, 1, 1, 1],
-"hsl(0, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(30, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(60, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(90, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(120, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(150, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(180, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(210, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(240, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(270, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(300, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(330, 12.5%, 100%)", [1, 1, 1, 1],
-"hsl(0, 25%, 100%)", [1, 1, 1, 1],
-"hsl(30, 25%, 100%)", [1, 1, 1, 1],
-"hsl(60, 25%, 100%)", [1, 1, 1, 1],
-"hsl(90, 25%, 100%)", [1, 1, 1, 1],
-"hsl(120, 25%, 100%)", [1, 1, 1, 1],
-"hsl(150, 25%, 100%)", [1, 1, 1, 1],
-"hsl(180, 25%, 100%)", [1, 1, 1, 1],
-"hsl(210, 25%, 100%)", [1, 1, 1, 1],
-"hsl(240, 25%, 100%)", [1, 1, 1, 1],
-"hsl(270, 25%, 100%)", [1, 1, 1, 1],
-"hsl(300, 25%, 100%)", [1, 1, 1, 1],
-"hsl(330, 25%, 100%)", [1, 1, 1, 1],
-"hsl(0, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(30, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(60, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(90, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(120, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(150, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(180, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(210, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(240, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(270, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(300, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(330, 37.5%, 100%)", [1, 1, 1, 1],
-"hsl(0, 50%, 100%)", [1, 1, 1, 1],
-"hsl(30, 50%, 100%)", [1, 1, 1, 1],
-"hsl(60, 50%, 100%)", [1, 1, 1, 1],
-"hsl(90, 50%, 100%)", [1, 1, 1, 1],
-"hsl(120, 50%, 100%)", [1, 1, 1, 1],
-"hsl(150, 50%, 100%)", [1, 1, 1, 1],
-"hsl(180, 50%, 100%)", [1, 1, 1, 1],
-"hsl(210, 50%, 100%)", [1, 1, 1, 1],
-"hsl(240, 50%, 100%)", [1, 1, 1, 1],
-"hsl(270, 50%, 100%)", [1, 1, 1, 1],
-"hsl(300, 50%, 100%)", [1, 1, 1, 1],
-"hsl(330, 50%, 100%)", [1, 1, 1, 1],
-"hsl(0, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(30, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(60, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(90, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(120, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(150, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(180, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(210, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(240, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(270, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(300, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(330, 62.5%, 100%)", [1, 1, 1, 1],
-"hsl(0, 75%, 100%)", [1, 1, 1, 1],
-"hsl(30, 75%, 100%)", [1, 1, 1, 1],
-"hsl(60, 75%, 100%)", [1, 1, 1, 1],
-"hsl(90, 75%, 100%)", [1, 1, 1, 1],
-"hsl(120, 75%, 100%)", [1, 1, 1, 1],
-"hsl(150, 75%, 100%)", [1, 1, 1, 1],
-"hsl(180, 75%, 100%)", [1, 1, 1, 1],
-"hsl(210, 75%, 100%)", [1, 1, 1, 1],
-"hsl(240, 75%, 100%)", [1, 1, 1, 1],
-"hsl(270, 75%, 100%)", [1, 1, 1, 1],
-"hsl(300, 75%, 100%)", [1, 1, 1, 1],
-"hsl(330, 75%, 100%)", [1, 1, 1, 1],
-"hsl(0, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(30, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(60, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(90, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(120, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(150, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(180, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(210, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(240, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(270, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(300, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(330, 87.5%, 100%)", [1, 1, 1, 1],
-"hsl(0, 100%, 100%)", [1, 1, 1, 1],
-"hsl(30, 100%, 100%)", [1, 1, 1, 1],
-"hsl(60, 100%, 100%)", [1, 1, 1, 1],
-"hsl(90, 100%, 100%)", [1, 1, 1, 1],
-"hsl(120, 100%, 100%)", [1, 1, 1, 1],
-"hsl(150, 100%, 100%)", [1, 1, 1, 1],
-"hsl(180, 100%, 100%)", [1, 1, 1, 1],
-"hsl(210, 100%, 100%)", [1, 1, 1, 1],
-"hsl(240, 100%, 100%)", [1, 1, 1, 1],
-"hsl(270, 100%, 100%)", [1, 1, 1, 1],
-"hsl(300, 100%, 100%)", [1, 1, 1, 1],
-"hsl(330, 100%, 100%)", [1, 1, 1, 1]
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_1.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_1.json
deleted file mode 100644
index 21177c37..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_1.json
+++ /dev/null
@@ -1,1454 +0,0 @@
-[
-"hsla(0, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 0%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 12.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 25%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 37.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 50%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 62.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 75%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 87.5%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(30, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(60, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(90, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(120, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(150, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(180, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(210, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(240, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(270, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(300, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(330, 100%, 0%, 1)", [0, 0, 0, 1],
-"hsla(0, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(30, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(60, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(90, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(120, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(150, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(180, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(210, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(240, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(270, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(300, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(330, 0%, 12.5%, 1)", [0.125, 0.125, 0.125, 1],
-"hsla(0, 12.5%, 12.5%, 1)", [0.140625, 0.109375, 0.109375, 1],
-"hsla(30, 12.5%, 12.5%, 1)", [0.140625, 0.125, 0.109375, 1],
-"hsla(60, 12.5%, 12.5%, 1)", [0.140625, 0.140625, 0.109375, 1],
-"hsla(90, 12.5%, 12.5%, 1)", [0.125, 0.140625, 0.109375, 1],
-"hsla(120, 12.5%, 12.5%, 1)", [0.109375, 0.140625, 0.109375, 1],
-"hsla(150, 12.5%, 12.5%, 1)", [0.109375, 0.140625, 0.125, 1],
-"hsla(180, 12.5%, 12.5%, 1)", [0.109375, 0.140625, 0.140625, 1],
-"hsla(210, 12.5%, 12.5%, 1)", [0.109375, 0.125, 0.140625, 1],
-"hsla(240, 12.5%, 12.5%, 1)", [0.109375, 0.109375, 0.140625, 1],
-"hsla(270, 12.5%, 12.5%, 1)", [0.125, 0.109375, 0.140625, 1],
-"hsla(300, 12.5%, 12.5%, 1)", [0.140625, 0.109375, 0.140625, 1],
-"hsla(330, 12.5%, 12.5%, 1)", [0.140625, 0.109375, 0.125, 1],
-"hsla(0, 25%, 12.5%, 1)", [0.15625, 0.09375, 0.09375, 1],
-"hsla(30, 25%, 12.5%, 1)", [0.15625, 0.125, 0.09375, 1],
-"hsla(60, 25%, 12.5%, 1)", [0.15625, 0.15625, 0.09375, 1],
-"hsla(90, 25%, 12.5%, 1)", [0.125, 0.15625, 0.09375, 1],
-"hsla(120, 25%, 12.5%, 1)", [0.09375, 0.15625, 0.09375, 1],
-"hsla(150, 25%, 12.5%, 1)", [0.09375, 0.15625, 0.125, 1],
-"hsla(180, 25%, 12.5%, 1)", [0.09375, 0.15625, 0.15625, 1],
-"hsla(210, 25%, 12.5%, 1)", [0.09375, 0.125, 0.15625, 1],
-"hsla(240, 25%, 12.5%, 1)", [0.09375, 0.09375, 0.15625, 1],
-"hsla(270, 25%, 12.5%, 1)", [0.125, 0.09375, 0.15625, 1],
-"hsla(300, 25%, 12.5%, 1)", [0.15625, 0.09375, 0.15625, 1],
-"hsla(330, 25%, 12.5%, 1)", [0.15625, 0.09375, 0.125, 1],
-"hsla(0, 37.5%, 12.5%, 1)", [0.171875, 0.078125, 0.078125, 1],
-"hsla(30, 37.5%, 12.5%, 1)", [0.171875, 0.125, 0.078125, 1],
-"hsla(60, 37.5%, 12.5%, 1)", [0.171875, 0.171875, 0.078125, 1],
-"hsla(90, 37.5%, 12.5%, 1)", [0.125, 0.171875, 0.078125, 1],
-"hsla(120, 37.5%, 12.5%, 1)", [0.078125, 0.171875, 0.078125, 1],
-"hsla(150, 37.5%, 12.5%, 1)", [0.078125, 0.171875, 0.125, 1],
-"hsla(180, 37.5%, 12.5%, 1)", [0.078125, 0.171875, 0.171875, 1],
-"hsla(210, 37.5%, 12.5%, 1)", [0.078125, 0.125, 0.171875, 1],
-"hsla(240, 37.5%, 12.5%, 1)", [0.078125, 0.078125, 0.171875, 1],
-"hsla(270, 37.5%, 12.5%, 1)", [0.125, 0.078125, 0.171875, 1],
-"hsla(300, 37.5%, 12.5%, 1)", [0.171875, 0.078125, 0.171875, 1],
-"hsla(330, 37.5%, 12.5%, 1)", [0.171875, 0.078125, 0.125, 1],
-"hsla(0, 50%, 12.5%, 1)", [0.1875, 0.0625, 0.0625, 1],
-"hsla(30, 50%, 12.5%, 1)", [0.1875, 0.125, 0.0625, 1],
-"hsla(60, 50%, 12.5%, 1)", [0.1875, 0.1875, 0.0625, 1],
-"hsla(90, 50%, 12.5%, 1)", [0.125, 0.1875, 0.0625, 1],
-"hsla(120, 50%, 12.5%, 1)", [0.0625, 0.1875, 0.0625, 1],
-"hsla(150, 50%, 12.5%, 1)", [0.0625, 0.1875, 0.125, 1],
-"hsla(180, 50%, 12.5%, 1)", [0.0625, 0.1875, 0.1875, 1],
-"hsla(210, 50%, 12.5%, 1)", [0.0625, 0.125, 0.1875, 1],
-"hsla(240, 50%, 12.5%, 1)", [0.0625, 0.0625, 0.1875, 1],
-"hsla(270, 50%, 12.5%, 1)", [0.125, 0.0625, 0.1875, 1],
-"hsla(300, 50%, 12.5%, 1)", [0.1875, 0.0625, 0.1875, 1],
-"hsla(330, 50%, 12.5%, 1)", [0.1875, 0.0625, 0.125, 1],
-"hsla(0, 62.5%, 12.5%, 1)", [0.203125, 0.046875, 0.046875, 1],
-"hsla(30, 62.5%, 12.5%, 1)", [0.203125, 0.125, 0.046875, 1],
-"hsla(60, 62.5%, 12.5%, 1)", [0.203125, 0.203125, 0.046875, 1],
-"hsla(90, 62.5%, 12.5%, 1)", [0.125, 0.203125, 0.046875, 1],
-"hsla(120, 62.5%, 12.5%, 1)", [0.046875, 0.203125, 0.046875, 1],
-"hsla(150, 62.5%, 12.5%, 1)", [0.046875, 0.203125, 0.125, 1],
-"hsla(180, 62.5%, 12.5%, 1)", [0.046875, 0.203125, 0.203125, 1],
-"hsla(210, 62.5%, 12.5%, 1)", [0.046875, 0.125, 0.203125, 1],
-"hsla(240, 62.5%, 12.5%, 1)", [0.046875, 0.046875, 0.203125, 1],
-"hsla(270, 62.5%, 12.5%, 1)", [0.125, 0.046875, 0.203125, 1],
-"hsla(300, 62.5%, 12.5%, 1)", [0.203125, 0.046875, 0.203125, 1],
-"hsla(330, 62.5%, 12.5%, 1)", [0.203125, 0.046875, 0.125, 1],
-"hsla(0, 75%, 12.5%, 1)", [0.21875, 0.03125, 0.03125, 1],
-"hsla(30, 75%, 12.5%, 1)", [0.21875, 0.125, 0.03125, 1],
-"hsla(60, 75%, 12.5%, 1)", [0.21875, 0.21875, 0.03125, 1],
-"hsla(90, 75%, 12.5%, 1)", [0.125, 0.21875, 0.03125, 1],
-"hsla(120, 75%, 12.5%, 1)", [0.03125, 0.21875, 0.03125, 1],
-"hsla(150, 75%, 12.5%, 1)", [0.03125, 0.21875, 0.125, 1],
-"hsla(180, 75%, 12.5%, 1)", [0.03125, 0.21875, 0.21875, 1],
-"hsla(210, 75%, 12.5%, 1)", [0.03125, 0.125, 0.21875, 1],
-"hsla(240, 75%, 12.5%, 1)", [0.03125, 0.03125, 0.21875, 1],
-"hsla(270, 75%, 12.5%, 1)", [0.125, 0.03125, 0.21875, 1],
-"hsla(300, 75%, 12.5%, 1)", [0.21875, 0.03125, 0.21875, 1],
-"hsla(330, 75%, 12.5%, 1)", [0.21875, 0.03125, 0.125, 1],
-"hsla(0, 87.5%, 12.5%, 1)", [0.234375, 0.015625, 0.015625, 1],
-"hsla(30, 87.5%, 12.5%, 1)", [0.234375, 0.125, 0.015625, 1],
-"hsla(60, 87.5%, 12.5%, 1)", [0.234375, 0.234375, 0.015625, 1],
-"hsla(90, 87.5%, 12.5%, 1)", [0.125, 0.234375, 0.015625, 1],
-"hsla(120, 87.5%, 12.5%, 1)", [0.015625, 0.234375, 0.015625, 1],
-"hsla(150, 87.5%, 12.5%, 1)", [0.015625, 0.234375, 0.125, 1],
-"hsla(180, 87.5%, 12.5%, 1)", [0.015625, 0.234375, 0.234375, 1],
-"hsla(210, 87.5%, 12.5%, 1)", [0.015625, 0.125, 0.234375, 1],
-"hsla(240, 87.5%, 12.5%, 1)", [0.015625, 0.015625, 0.234375, 1],
-"hsla(270, 87.5%, 12.5%, 1)", [0.125, 0.015625, 0.234375, 1],
-"hsla(300, 87.5%, 12.5%, 1)", [0.234375, 0.015625, 0.234375, 1],
-"hsla(330, 87.5%, 12.5%, 1)", [0.234375, 0.015625, 0.125, 1],
-"hsla(0, 100%, 12.5%, 1)", [0.25, 0, 0, 1],
-"hsla(30, 100%, 12.5%, 1)", [0.25, 0.125, 0, 1],
-"hsla(60, 100%, 12.5%, 1)", [0.25, 0.25, 0, 1],
-"hsla(90, 100%, 12.5%, 1)", [0.125, 0.25, 0, 1],
-"hsla(120, 100%, 12.5%, 1)", [0, 0.25, 0, 1],
-"hsla(150, 100%, 12.5%, 1)", [0, 0.25, 0.125, 1],
-"hsla(180, 100%, 12.5%, 1)", [0, 0.25, 0.25, 1],
-"hsla(210, 100%, 12.5%, 1)", [0, 0.125, 0.25, 1],
-"hsla(240, 100%, 12.5%, 1)", [0, 0, 0.25, 1],
-"hsla(270, 100%, 12.5%, 1)", [0.125, 0, 0.25, 1],
-"hsla(300, 100%, 12.5%, 1)", [0.25, 0, 0.25, 1],
-"hsla(330, 100%, 12.5%, 1)", [0.25, 0, 0.125, 1],
-"hsla(0, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(30, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(60, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(90, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(120, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(150, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(180, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(210, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(240, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(270, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(300, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(330, 0%, 25%, 1)", [0.25, 0.25, 0.25, 1],
-"hsla(0, 12.5%, 25%, 1)", [0.28125, 0.21875, 0.21875, 1],
-"hsla(30, 12.5%, 25%, 1)", [0.28125, 0.25, 0.21875, 1],
-"hsla(60, 12.5%, 25%, 1)", [0.28125, 0.28125, 0.21875, 1],
-"hsla(90, 12.5%, 25%, 1)", [0.25, 0.28125, 0.21875, 1],
-"hsla(120, 12.5%, 25%, 1)", [0.21875, 0.28125, 0.21875, 1],
-"hsla(150, 12.5%, 25%, 1)", [0.21875, 0.28125, 0.25, 1],
-"hsla(180, 12.5%, 25%, 1)", [0.21875, 0.28125, 0.28125, 1],
-"hsla(210, 12.5%, 25%, 1)", [0.21875, 0.25, 0.28125, 1],
-"hsla(240, 12.5%, 25%, 1)", [0.21875, 0.21875, 0.28125, 1],
-"hsla(270, 12.5%, 25%, 1)", [0.25, 0.21875, 0.28125, 1],
-"hsla(300, 12.5%, 25%, 1)", [0.28125, 0.21875, 0.28125, 1],
-"hsla(330, 12.5%, 25%, 1)", [0.28125, 0.21875, 0.25, 1],
-"hsla(0, 25%, 25%, 1)", [0.3125, 0.1875, 0.1875, 1],
-"hsla(30, 25%, 25%, 1)", [0.3125, 0.25, 0.1875, 1],
-"hsla(60, 25%, 25%, 1)", [0.3125, 0.3125, 0.1875, 1],
-"hsla(90, 25%, 25%, 1)", [0.25, 0.3125, 0.1875, 1],
-"hsla(120, 25%, 25%, 1)", [0.1875, 0.3125, 0.1875, 1],
-"hsla(150, 25%, 25%, 1)", [0.1875, 0.3125, 0.25, 1],
-"hsla(180, 25%, 25%, 1)", [0.1875, 0.3125, 0.3125, 1],
-"hsla(210, 25%, 25%, 1)", [0.1875, 0.25, 0.3125, 1],
-"hsla(240, 25%, 25%, 1)", [0.1875, 0.1875, 0.3125, 1],
-"hsla(270, 25%, 25%, 1)", [0.25, 0.1875, 0.3125, 1],
-"hsla(300, 25%, 25%, 1)", [0.3125, 0.1875, 0.3125, 1],
-"hsla(330, 25%, 25%, 1)", [0.3125, 0.1875, 0.25, 1],
-"hsla(0, 37.5%, 25%, 1)", [0.34375, 0.15625, 0.15625, 1],
-"hsla(30, 37.5%, 25%, 1)", [0.34375, 0.25, 0.15625, 1],
-"hsla(60, 37.5%, 25%, 1)", [0.34375, 0.34375, 0.15625, 1],
-"hsla(90, 37.5%, 25%, 1)", [0.25, 0.34375, 0.15625, 1],
-"hsla(120, 37.5%, 25%, 1)", [0.15625, 0.34375, 0.15625, 1],
-"hsla(150, 37.5%, 25%, 1)", [0.15625, 0.34375, 0.25, 1],
-"hsla(180, 37.5%, 25%, 1)", [0.15625, 0.34375, 0.34375, 1],
-"hsla(210, 37.5%, 25%, 1)", [0.15625, 0.25, 0.34375, 1],
-"hsla(240, 37.5%, 25%, 1)", [0.15625, 0.15625, 0.34375, 1],
-"hsla(270, 37.5%, 25%, 1)", [0.25, 0.15625, 0.34375, 1],
-"hsla(300, 37.5%, 25%, 1)", [0.34375, 0.15625, 0.34375, 1],
-"hsla(330, 37.5%, 25%, 1)", [0.34375, 0.15625, 0.25, 1],
-"hsla(0, 50%, 25%, 1)", [0.375, 0.125, 0.125, 1],
-"hsla(30, 50%, 25%, 1)", [0.375, 0.25, 0.125, 1],
-"hsla(60, 50%, 25%, 1)", [0.375, 0.375, 0.125, 1],
-"hsla(90, 50%, 25%, 1)", [0.25, 0.375, 0.125, 1],
-"hsla(120, 50%, 25%, 1)", [0.125, 0.375, 0.125, 1],
-"hsla(150, 50%, 25%, 1)", [0.125, 0.375, 0.25, 1],
-"hsla(180, 50%, 25%, 1)", [0.125, 0.375, 0.375, 1],
-"hsla(210, 50%, 25%, 1)", [0.125, 0.25, 0.375, 1],
-"hsla(240, 50%, 25%, 1)", [0.125, 0.125, 0.375, 1],
-"hsla(270, 50%, 25%, 1)", [0.25, 0.125, 0.375, 1],
-"hsla(300, 50%, 25%, 1)", [0.375, 0.125, 0.375, 1],
-"hsla(330, 50%, 25%, 1)", [0.375, 0.125, 0.25, 1],
-"hsla(0, 62.5%, 25%, 1)", [0.40625, 0.09375, 0.09375, 1],
-"hsla(30, 62.5%, 25%, 1)", [0.40625, 0.25, 0.09375, 1],
-"hsla(60, 62.5%, 25%, 1)", [0.40625, 0.40625, 0.09375, 1],
-"hsla(90, 62.5%, 25%, 1)", [0.25, 0.40625, 0.09375, 1],
-"hsla(120, 62.5%, 25%, 1)", [0.09375, 0.40625, 0.09375, 1],
-"hsla(150, 62.5%, 25%, 1)", [0.09375, 0.40625, 0.25, 1],
-"hsla(180, 62.5%, 25%, 1)", [0.09375, 0.40625, 0.40625, 1],
-"hsla(210, 62.5%, 25%, 1)", [0.09375, 0.25, 0.40625, 1],
-"hsla(240, 62.5%, 25%, 1)", [0.09375, 0.09375, 0.40625, 1],
-"hsla(270, 62.5%, 25%, 1)", [0.25, 0.09375, 0.40625, 1],
-"hsla(300, 62.5%, 25%, 1)", [0.40625, 0.09375, 0.40625, 1],
-"hsla(330, 62.5%, 25%, 1)", [0.40625, 0.09375, 0.25, 1],
-"hsla(0, 75%, 25%, 1)", [0.4375, 0.0625, 0.0625, 1],
-"hsla(30, 75%, 25%, 1)", [0.4375, 0.25, 0.0625, 1],
-"hsla(60, 75%, 25%, 1)", [0.4375, 0.4375, 0.0625, 1],
-"hsla(90, 75%, 25%, 1)", [0.25, 0.4375, 0.0625, 1],
-"hsla(120, 75%, 25%, 1)", [0.0625, 0.4375, 0.0625, 1],
-"hsla(150, 75%, 25%, 1)", [0.0625, 0.4375, 0.25, 1],
-"hsla(180, 75%, 25%, 1)", [0.0625, 0.4375, 0.4375, 1],
-"hsla(210, 75%, 25%, 1)", [0.0625, 0.25, 0.4375, 1],
-"hsla(240, 75%, 25%, 1)", [0.0625, 0.0625, 0.4375, 1],
-"hsla(270, 75%, 25%, 1)", [0.25, 0.0625, 0.4375, 1],
-"hsla(300, 75%, 25%, 1)", [0.4375, 0.0625, 0.4375, 1],
-"hsla(330, 75%, 25%, 1)", [0.4375, 0.0625, 0.25, 1],
-"hsla(0, 87.5%, 25%, 1)", [0.46875, 0.03125, 0.03125, 1],
-"hsla(30, 87.5%, 25%, 1)", [0.46875, 0.25, 0.03125, 1],
-"hsla(60, 87.5%, 25%, 1)", [0.46875, 0.46875, 0.03125, 1],
-"hsla(90, 87.5%, 25%, 1)", [0.25, 0.46875, 0.03125, 1],
-"hsla(120, 87.5%, 25%, 1)", [0.03125, 0.46875, 0.03125, 1],
-"hsla(150, 87.5%, 25%, 1)", [0.03125, 0.46875, 0.25, 1],
-"hsla(180, 87.5%, 25%, 1)", [0.03125, 0.46875, 0.46875, 1],
-"hsla(210, 87.5%, 25%, 1)", [0.03125, 0.25, 0.46875, 1],
-"hsla(240, 87.5%, 25%, 1)", [0.03125, 0.03125, 0.46875, 1],
-"hsla(270, 87.5%, 25%, 1)", [0.25, 0.03125, 0.46875, 1],
-"hsla(300, 87.5%, 25%, 1)", [0.46875, 0.03125, 0.46875, 1],
-"hsla(330, 87.5%, 25%, 1)", [0.46875, 0.03125, 0.25, 1],
-"hsla(0, 100%, 25%, 1)", [0.5, 0, 0, 1],
-"hsla(30, 100%, 25%, 1)", [0.5, 0.25, 0, 1],
-"hsla(60, 100%, 25%, 1)", [0.5, 0.5, 0, 1],
-"hsla(90, 100%, 25%, 1)", [0.25, 0.5, 0, 1],
-"hsla(120, 100%, 25%, 1)", [0, 0.5, 0, 1],
-"hsla(150, 100%, 25%, 1)", [0, 0.5, 0.25, 1],
-"hsla(180, 100%, 25%, 1)", [0, 0.5, 0.5, 1],
-"hsla(210, 100%, 25%, 1)", [0, 0.25, 0.5, 1],
-"hsla(240, 100%, 25%, 1)", [0, 0, 0.5, 1],
-"hsla(270, 100%, 25%, 1)", [0.25, 0, 0.5, 1],
-"hsla(300, 100%, 25%, 1)", [0.5, 0, 0.5, 1],
-"hsla(330, 100%, 25%, 1)", [0.5, 0, 0.25, 1],
-"hsla(0, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(30, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(60, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(90, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(120, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(150, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(180, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(210, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(240, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(270, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(300, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(330, 0%, 37.5%, 1)", [0.375, 0.375, 0.375, 1],
-"hsla(0, 12.5%, 37.5%, 1)", [0.421875, 0.328125, 0.328125, 1],
-"hsla(30, 12.5%, 37.5%, 1)", [0.421875, 0.375, 0.328125, 1],
-"hsla(60, 12.5%, 37.5%, 1)", [0.421875, 0.421875, 0.328125, 1],
-"hsla(90, 12.5%, 37.5%, 1)", [0.375, 0.421875, 0.328125, 1],
-"hsla(120, 12.5%, 37.5%, 1)", [0.328125, 0.421875, 0.328125, 1],
-"hsla(150, 12.5%, 37.5%, 1)", [0.328125, 0.421875, 0.375, 1],
-"hsla(180, 12.5%, 37.5%, 1)", [0.328125, 0.421875, 0.421875, 1],
-"hsla(210, 12.5%, 37.5%, 1)", [0.328125, 0.375, 0.421875, 1],
-"hsla(240, 12.5%, 37.5%, 1)", [0.328125, 0.328125, 0.421875, 1],
-"hsla(270, 12.5%, 37.5%, 1)", [0.375, 0.328125, 0.421875, 1],
-"hsla(300, 12.5%, 37.5%, 1)", [0.421875, 0.328125, 0.421875, 1],
-"hsla(330, 12.5%, 37.5%, 1)", [0.421875, 0.328125, 0.375, 1],
-"hsla(0, 25%, 37.5%, 1)", [0.46875, 0.28125, 0.28125, 1],
-"hsla(30, 25%, 37.5%, 1)", [0.46875, 0.375, 0.28125, 1],
-"hsla(60, 25%, 37.5%, 1)", [0.46875, 0.46875, 0.28125, 1],
-"hsla(90, 25%, 37.5%, 1)", [0.375, 0.46875, 0.28125, 1],
-"hsla(120, 25%, 37.5%, 1)", [0.28125, 0.46875, 0.28125, 1],
-"hsla(150, 25%, 37.5%, 1)", [0.28125, 0.46875, 0.375, 1],
-"hsla(180, 25%, 37.5%, 1)", [0.28125, 0.46875, 0.46875, 1],
-"hsla(210, 25%, 37.5%, 1)", [0.28125, 0.375, 0.46875, 1],
-"hsla(240, 25%, 37.5%, 1)", [0.28125, 0.28125, 0.46875, 1],
-"hsla(270, 25%, 37.5%, 1)", [0.375, 0.28125, 0.46875, 1],
-"hsla(300, 25%, 37.5%, 1)", [0.46875, 0.28125, 0.46875, 1],
-"hsla(330, 25%, 37.5%, 1)", [0.46875, 0.28125, 0.375, 1],
-"hsla(0, 37.5%, 37.5%, 1)", [0.515625, 0.234375, 0.234375, 1],
-"hsla(30, 37.5%, 37.5%, 1)", [0.515625, 0.375, 0.234375, 1],
-"hsla(60, 37.5%, 37.5%, 1)", [0.515625, 0.515625, 0.234375, 1],
-"hsla(90, 37.5%, 37.5%, 1)", [0.375, 0.515625, 0.234375, 1],
-"hsla(120, 37.5%, 37.5%, 1)", [0.234375, 0.515625, 0.234375, 1],
-"hsla(150, 37.5%, 37.5%, 1)", [0.234375, 0.515625, 0.375, 1],
-"hsla(180, 37.5%, 37.5%, 1)", [0.234375, 0.515625, 0.515625, 1],
-"hsla(210, 37.5%, 37.5%, 1)", [0.234375, 0.375, 0.515625, 1],
-"hsla(240, 37.5%, 37.5%, 1)", [0.234375, 0.234375, 0.515625, 1],
-"hsla(270, 37.5%, 37.5%, 1)", [0.375, 0.234375, 0.515625, 1],
-"hsla(300, 37.5%, 37.5%, 1)", [0.515625, 0.234375, 0.515625, 1],
-"hsla(330, 37.5%, 37.5%, 1)", [0.515625, 0.234375, 0.375, 1],
-"hsla(0, 50%, 37.5%, 1)", [0.5625, 0.1875, 0.1875, 1],
-"hsla(30, 50%, 37.5%, 1)", [0.5625, 0.375, 0.1875, 1],
-"hsla(60, 50%, 37.5%, 1)", [0.5625, 0.5625, 0.1875, 1],
-"hsla(90, 50%, 37.5%, 1)", [0.375, 0.5625, 0.1875, 1],
-"hsla(120, 50%, 37.5%, 1)", [0.1875, 0.5625, 0.1875, 1],
-"hsla(150, 50%, 37.5%, 1)", [0.1875, 0.5625, 0.375, 1],
-"hsla(180, 50%, 37.5%, 1)", [0.1875, 0.5625, 0.5625, 1],
-"hsla(210, 50%, 37.5%, 1)", [0.1875, 0.375, 0.5625, 1],
-"hsla(240, 50%, 37.5%, 1)", [0.1875, 0.1875, 0.5625, 1],
-"hsla(270, 50%, 37.5%, 1)", [0.375, 0.1875, 0.5625, 1],
-"hsla(300, 50%, 37.5%, 1)", [0.5625, 0.1875, 0.5625, 1],
-"hsla(330, 50%, 37.5%, 1)", [0.5625, 0.1875, 0.375, 1],
-"hsla(0, 62.5%, 37.5%, 1)", [0.609375, 0.140625, 0.140625, 1],
-"hsla(30, 62.5%, 37.5%, 1)", [0.609375, 0.375, 0.140625, 1],
-"hsla(60, 62.5%, 37.5%, 1)", [0.609375, 0.609375, 0.140625, 1],
-"hsla(90, 62.5%, 37.5%, 1)", [0.375, 0.609375, 0.140625, 1],
-"hsla(120, 62.5%, 37.5%, 1)", [0.140625, 0.609375, 0.140625, 1],
-"hsla(150, 62.5%, 37.5%, 1)", [0.140625, 0.609375, 0.375, 1],
-"hsla(180, 62.5%, 37.5%, 1)", [0.140625, 0.609375, 0.609375, 1],
-"hsla(210, 62.5%, 37.5%, 1)", [0.140625, 0.375, 0.609375, 1],
-"hsla(240, 62.5%, 37.5%, 1)", [0.140625, 0.140625, 0.609375, 1],
-"hsla(270, 62.5%, 37.5%, 1)", [0.375, 0.140625, 0.609375, 1],
-"hsla(300, 62.5%, 37.5%, 1)", [0.609375, 0.140625, 0.609375, 1],
-"hsla(330, 62.5%, 37.5%, 1)", [0.609375, 0.140625, 0.375, 1],
-"hsla(0, 75%, 37.5%, 1)", [0.65625, 0.09375, 0.09375, 1],
-"hsla(30, 75%, 37.5%, 1)", [0.65625, 0.375, 0.09375, 1],
-"hsla(60, 75%, 37.5%, 1)", [0.65625, 0.65625, 0.09375, 1],
-"hsla(90, 75%, 37.5%, 1)", [0.375, 0.65625, 0.09375, 1],
-"hsla(120, 75%, 37.5%, 1)", [0.09375, 0.65625, 0.09375, 1],
-"hsla(150, 75%, 37.5%, 1)", [0.09375, 0.65625, 0.375, 1],
-"hsla(180, 75%, 37.5%, 1)", [0.09375, 0.65625, 0.65625, 1],
-"hsla(210, 75%, 37.5%, 1)", [0.09375, 0.375, 0.65625, 1],
-"hsla(240, 75%, 37.5%, 1)", [0.09375, 0.09375, 0.65625, 1],
-"hsla(270, 75%, 37.5%, 1)", [0.375, 0.09375, 0.65625, 1],
-"hsla(300, 75%, 37.5%, 1)", [0.65625, 0.09375, 0.65625, 1],
-"hsla(330, 75%, 37.5%, 1)", [0.65625, 0.09375, 0.375, 1],
-"hsla(0, 87.5%, 37.5%, 1)", [0.703125, 0.046875, 0.046875, 1],
-"hsla(30, 87.5%, 37.5%, 1)", [0.703125, 0.375, 0.046875, 1],
-"hsla(60, 87.5%, 37.5%, 1)", [0.703125, 0.703125, 0.046875, 1],
-"hsla(90, 87.5%, 37.5%, 1)", [0.375, 0.703125, 0.046875, 1],
-"hsla(120, 87.5%, 37.5%, 1)", [0.046875, 0.703125, 0.046875, 1],
-"hsla(150, 87.5%, 37.5%, 1)", [0.046875, 0.703125, 0.375, 1],
-"hsla(180, 87.5%, 37.5%, 1)", [0.046875, 0.703125, 0.703125, 1],
-"hsla(210, 87.5%, 37.5%, 1)", [0.046875, 0.375, 0.703125, 1],
-"hsla(240, 87.5%, 37.5%, 1)", [0.046875, 0.046875, 0.703125, 1],
-"hsla(270, 87.5%, 37.5%, 1)", [0.375, 0.046875, 0.703125, 1],
-"hsla(300, 87.5%, 37.5%, 1)", [0.703125, 0.046875, 0.703125, 1],
-"hsla(330, 87.5%, 37.5%, 1)", [0.703125, 0.046875, 0.375, 1],
-"hsla(0, 100%, 37.5%, 1)", [0.75, 0, 0, 1],
-"hsla(30, 100%, 37.5%, 1)", [0.75, 0.375, 0, 1],
-"hsla(60, 100%, 37.5%, 1)", [0.75, 0.75, 0, 1],
-"hsla(90, 100%, 37.5%, 1)", [0.375, 0.75, 0, 1],
-"hsla(120, 100%, 37.5%, 1)", [0, 0.75, 0, 1],
-"hsla(150, 100%, 37.5%, 1)", [0, 0.75, 0.375, 1],
-"hsla(180, 100%, 37.5%, 1)", [0, 0.75, 0.75, 1],
-"hsla(210, 100%, 37.5%, 1)", [0, 0.375, 0.75, 1],
-"hsla(240, 100%, 37.5%, 1)", [0, 0, 0.75, 1],
-"hsla(270, 100%, 37.5%, 1)", [0.375, 0, 0.75, 1],
-"hsla(300, 100%, 37.5%, 1)", [0.75, 0, 0.75, 1],
-"hsla(330, 100%, 37.5%, 1)", [0.75, 0, 0.375, 1],
-"hsla(0, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(30, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(60, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(90, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(120, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(150, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(180, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(210, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(240, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(270, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(300, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(330, 0%, 50%, 1)", [0.5, 0.5, 0.5, 1],
-"hsla(0, 12.5%, 50%, 1)", [0.5625, 0.4375, 0.4375, 1],
-"hsla(30, 12.5%, 50%, 1)", [0.5625, 0.5, 0.4375, 1],
-"hsla(60, 12.5%, 50%, 1)", [0.5625, 0.5625, 0.4375, 1],
-"hsla(90, 12.5%, 50%, 1)", [0.5, 0.5625, 0.4375, 1],
-"hsla(120, 12.5%, 50%, 1)", [0.4375, 0.5625, 0.4375, 1],
-"hsla(150, 12.5%, 50%, 1)", [0.4375, 0.5625, 0.5, 1],
-"hsla(180, 12.5%, 50%, 1)", [0.4375, 0.5625, 0.5625, 1],
-"hsla(210, 12.5%, 50%, 1)", [0.4375, 0.5, 0.5625, 1],
-"hsla(240, 12.5%, 50%, 1)", [0.4375, 0.4375, 0.5625, 1],
-"hsla(270, 12.5%, 50%, 1)", [0.5, 0.4375, 0.5625, 1],
-"hsla(300, 12.5%, 50%, 1)", [0.5625, 0.4375, 0.5625, 1],
-"hsla(330, 12.5%, 50%, 1)", [0.5625, 0.4375, 0.5, 1],
-"hsla(0, 25%, 50%, 1)", [0.625, 0.375, 0.375, 1],
-"hsla(30, 25%, 50%, 1)", [0.625, 0.5, 0.375, 1],
-"hsla(60, 25%, 50%, 1)", [0.625, 0.625, 0.375, 1],
-"hsla(90, 25%, 50%, 1)", [0.5, 0.625, 0.375, 1],
-"hsla(120, 25%, 50%, 1)", [0.375, 0.625, 0.375, 1],
-"hsla(150, 25%, 50%, 1)", [0.375, 0.625, 0.5, 1],
-"hsla(180, 25%, 50%, 1)", [0.375, 0.625, 0.625, 1],
-"hsla(210, 25%, 50%, 1)", [0.375, 0.5, 0.625, 1],
-"hsla(240, 25%, 50%, 1)", [0.375, 0.375, 0.625, 1],
-"hsla(270, 25%, 50%, 1)", [0.5, 0.375, 0.625, 1],
-"hsla(300, 25%, 50%, 1)", [0.625, 0.375, 0.625, 1],
-"hsla(330, 25%, 50%, 1)", [0.625, 0.375, 0.5, 1],
-"hsla(0, 37.5%, 50%, 1)", [0.6875, 0.3125, 0.3125, 1],
-"hsla(30, 37.5%, 50%, 1)", [0.6875, 0.5, 0.3125, 1],
-"hsla(60, 37.5%, 50%, 1)", [0.6875, 0.6875, 0.3125, 1],
-"hsla(90, 37.5%, 50%, 1)", [0.5, 0.6875, 0.3125, 1],
-"hsla(120, 37.5%, 50%, 1)", [0.3125, 0.6875, 0.3125, 1],
-"hsla(150, 37.5%, 50%, 1)", [0.3125, 0.6875, 0.5, 1],
-"hsla(180, 37.5%, 50%, 1)", [0.3125, 0.6875, 0.6875, 1],
-"hsla(210, 37.5%, 50%, 1)", [0.3125, 0.5, 0.6875, 1],
-"hsla(240, 37.5%, 50%, 1)", [0.3125, 0.3125, 0.6875, 1],
-"hsla(270, 37.5%, 50%, 1)", [0.5, 0.3125, 0.6875, 1],
-"hsla(300, 37.5%, 50%, 1)", [0.6875, 0.3125, 0.6875, 1],
-"hsla(330, 37.5%, 50%, 1)", [0.6875, 0.3125, 0.5, 1],
-"hsla(0, 50%, 50%, 1)", [0.75, 0.25, 0.25, 1],
-"hsla(30, 50%, 50%, 1)", [0.75, 0.5, 0.25, 1],
-"hsla(60, 50%, 50%, 1)", [0.75, 0.75, 0.25, 1],
-"hsla(90, 50%, 50%, 1)", [0.5, 0.75, 0.25, 1],
-"hsla(120, 50%, 50%, 1)", [0.25, 0.75, 0.25, 1],
-"hsla(150, 50%, 50%, 1)", [0.25, 0.75, 0.5, 1],
-"hsla(180, 50%, 50%, 1)", [0.25, 0.75, 0.75, 1],
-"hsla(210, 50%, 50%, 1)", [0.25, 0.5, 0.75, 1],
-"hsla(240, 50%, 50%, 1)", [0.25, 0.25, 0.75, 1],
-"hsla(270, 50%, 50%, 1)", [0.5, 0.25, 0.75, 1],
-"hsla(300, 50%, 50%, 1)", [0.75, 0.25, 0.75, 1],
-"hsla(330, 50%, 50%, 1)", [0.75, 0.25, 0.5, 1],
-"hsla(0, 62.5%, 50%, 1)", [0.8125, 0.1875, 0.1875, 1],
-"hsla(30, 62.5%, 50%, 1)", [0.8125, 0.5, 0.1875, 1],
-"hsla(60, 62.5%, 50%, 1)", [0.8125, 0.8125, 0.1875, 1],
-"hsla(90, 62.5%, 50%, 1)", [0.5, 0.8125, 0.1875, 1],
-"hsla(120, 62.5%, 50%, 1)", [0.1875, 0.8125, 0.1875, 1],
-"hsla(150, 62.5%, 50%, 1)", [0.1875, 0.8125, 0.5, 1],
-"hsla(180, 62.5%, 50%, 1)", [0.1875, 0.8125, 0.8125, 1],
-"hsla(210, 62.5%, 50%, 1)", [0.1875, 0.5, 0.8125, 1],
-"hsla(240, 62.5%, 50%, 1)", [0.1875, 0.1875, 0.8125, 1],
-"hsla(270, 62.5%, 50%, 1)", [0.5, 0.1875, 0.8125, 1],
-"hsla(300, 62.5%, 50%, 1)", [0.8125, 0.1875, 0.8125, 1],
-"hsla(330, 62.5%, 50%, 1)", [0.8125, 0.1875, 0.5, 1],
-"hsla(0, 75%, 50%, 1)", [0.875, 0.125, 0.125, 1],
-"hsla(30, 75%, 50%, 1)", [0.875, 0.5, 0.125, 1],
-"hsla(60, 75%, 50%, 1)", [0.875, 0.875, 0.125, 1],
-"hsla(90, 75%, 50%, 1)", [0.5, 0.875, 0.125, 1],
-"hsla(120, 75%, 50%, 1)", [0.125, 0.875, 0.125, 1],
-"hsla(150, 75%, 50%, 1)", [0.125, 0.875, 0.5, 1],
-"hsla(180, 75%, 50%, 1)", [0.125, 0.875, 0.875, 1],
-"hsla(210, 75%, 50%, 1)", [0.125, 0.5, 0.875, 1],
-"hsla(240, 75%, 50%, 1)", [0.125, 0.125, 0.875, 1],
-"hsla(270, 75%, 50%, 1)", [0.5, 0.125, 0.875, 1],
-"hsla(300, 75%, 50%, 1)", [0.875, 0.125, 0.875, 1],
-"hsla(330, 75%, 50%, 1)", [0.875, 0.125, 0.5, 1],
-"hsla(0, 87.5%, 50%, 1)", [0.9375, 0.0625, 0.0625, 1],
-"hsla(30, 87.5%, 50%, 1)", [0.9375, 0.5, 0.0625, 1],
-"hsla(60, 87.5%, 50%, 1)", [0.9375, 0.9375, 0.0625, 1],
-"hsla(90, 87.5%, 50%, 1)", [0.5, 0.9375, 0.0625, 1],
-"hsla(120, 87.5%, 50%, 1)", [0.0625, 0.9375, 0.0625, 1],
-"hsla(150, 87.5%, 50%, 1)", [0.0625, 0.9375, 0.5, 1],
-"hsla(180, 87.5%, 50%, 1)", [0.0625, 0.9375, 0.9375, 1],
-"hsla(210, 87.5%, 50%, 1)", [0.0625, 0.5, 0.9375, 1],
-"hsla(240, 87.5%, 50%, 1)", [0.0625, 0.0625, 0.9375, 1],
-"hsla(270, 87.5%, 50%, 1)", [0.5, 0.0625, 0.9375, 1],
-"hsla(300, 87.5%, 50%, 1)", [0.9375, 0.0625, 0.9375, 1],
-"hsla(330, 87.5%, 50%, 1)", [0.9375, 0.0625, 0.5, 1],
-"hsla(0, 100%, 50%, 1)", [1, 0, 0, 1],
-"hsla(30, 100%, 50%, 1)", [1, 0.5, 0, 1],
-"hsla(60, 100%, 50%, 1)", [1, 1, 0, 1],
-"hsla(90, 100%, 50%, 1)", [0.5, 1, 0, 1],
-"hsla(120, 100%, 50%, 1)", [0, 1, 0, 1],
-"hsla(150, 100%, 50%, 1)", [0, 1, 0.5, 1],
-"hsla(180, 100%, 50%, 1)", [0, 1, 1, 1],
-"hsla(210, 100%, 50%, 1)", [0, 0.5, 1, 1],
-"hsla(240, 100%, 50%, 1)", [0, 0, 1, 1],
-"hsla(270, 100%, 50%, 1)", [0.5, 0, 1, 1],
-"hsla(300, 100%, 50%, 1)", [1, 0, 1, 1],
-"hsla(330, 100%, 50%, 1)", [1, 0, 0.5, 1],
-"hsla(0, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(30, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(60, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(90, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(120, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(150, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(180, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(210, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(240, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(270, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(300, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(330, 0%, 62.5%, 1)", [0.625, 0.625, 0.625, 1],
-"hsla(0, 12.5%, 62.5%, 1)", [0.671875, 0.578125, 0.578125, 1],
-"hsla(30, 12.5%, 62.5%, 1)", [0.671875, 0.625, 0.578125, 1],
-"hsla(60, 12.5%, 62.5%, 1)", [0.671875, 0.671875, 0.578125, 1],
-"hsla(90, 12.5%, 62.5%, 1)", [0.625, 0.671875, 0.578125, 1],
-"hsla(120, 12.5%, 62.5%, 1)", [0.578125, 0.671875, 0.578125, 1],
-"hsla(150, 12.5%, 62.5%, 1)", [0.578125, 0.671875, 0.625, 1],
-"hsla(180, 12.5%, 62.5%, 1)", [0.578125, 0.671875, 0.671875, 1],
-"hsla(210, 12.5%, 62.5%, 1)", [0.578125, 0.625, 0.671875, 1],
-"hsla(240, 12.5%, 62.5%, 1)", [0.578125, 0.578125, 0.671875, 1],
-"hsla(270, 12.5%, 62.5%, 1)", [0.625, 0.578125, 0.671875, 1],
-"hsla(300, 12.5%, 62.5%, 1)", [0.671875, 0.578125, 0.671875, 1],
-"hsla(330, 12.5%, 62.5%, 1)", [0.671875, 0.578125, 0.625, 1],
-"hsla(0, 25%, 62.5%, 1)", [0.71875, 0.53125, 0.53125, 1],
-"hsla(30, 25%, 62.5%, 1)", [0.71875, 0.625, 0.53125, 1],
-"hsla(60, 25%, 62.5%, 1)", [0.71875, 0.71875, 0.53125, 1],
-"hsla(90, 25%, 62.5%, 1)", [0.625, 0.71875, 0.53125, 1],
-"hsla(120, 25%, 62.5%, 1)", [0.53125, 0.71875, 0.53125, 1],
-"hsla(150, 25%, 62.5%, 1)", [0.53125, 0.71875, 0.625, 1],
-"hsla(180, 25%, 62.5%, 1)", [0.53125, 0.71875, 0.71875, 1],
-"hsla(210, 25%, 62.5%, 1)", [0.53125, 0.625, 0.71875, 1],
-"hsla(240, 25%, 62.5%, 1)", [0.53125, 0.53125, 0.71875, 1],
-"hsla(270, 25%, 62.5%, 1)", [0.625, 0.53125, 0.71875, 1],
-"hsla(300, 25%, 62.5%, 1)", [0.71875, 0.53125, 0.71875, 1],
-"hsla(330, 25%, 62.5%, 1)", [0.71875, 0.53125, 0.625, 1],
-"hsla(0, 37.5%, 62.5%, 1)", [0.765625, 0.484375, 0.484375, 1],
-"hsla(30, 37.5%, 62.5%, 1)", [0.765625, 0.625, 0.484375, 1],
-"hsla(60, 37.5%, 62.5%, 1)", [0.765625, 0.765625, 0.484375, 1],
-"hsla(90, 37.5%, 62.5%, 1)", [0.625, 0.765625, 0.484375, 1],
-"hsla(120, 37.5%, 62.5%, 1)", [0.484375, 0.765625, 0.484375, 1],
-"hsla(150, 37.5%, 62.5%, 1)", [0.484375, 0.765625, 0.625, 1],
-"hsla(180, 37.5%, 62.5%, 1)", [0.484375, 0.765625, 0.765625, 1],
-"hsla(210, 37.5%, 62.5%, 1)", [0.484375, 0.625, 0.765625, 1],
-"hsla(240, 37.5%, 62.5%, 1)", [0.484375, 0.484375, 0.765625, 1],
-"hsla(270, 37.5%, 62.5%, 1)", [0.625, 0.484375, 0.765625, 1],
-"hsla(300, 37.5%, 62.5%, 1)", [0.765625, 0.484375, 0.765625, 1],
-"hsla(330, 37.5%, 62.5%, 1)", [0.765625, 0.484375, 0.625, 1],
-"hsla(0, 50%, 62.5%, 1)", [0.8125, 0.4375, 0.4375, 1],
-"hsla(30, 50%, 62.5%, 1)", [0.8125, 0.625, 0.4375, 1],
-"hsla(60, 50%, 62.5%, 1)", [0.8125, 0.8125, 0.4375, 1],
-"hsla(90, 50%, 62.5%, 1)", [0.625, 0.8125, 0.4375, 1],
-"hsla(120, 50%, 62.5%, 1)", [0.4375, 0.8125, 0.4375, 1],
-"hsla(150, 50%, 62.5%, 1)", [0.4375, 0.8125, 0.625, 1],
-"hsla(180, 50%, 62.5%, 1)", [0.4375, 0.8125, 0.8125, 1],
-"hsla(210, 50%, 62.5%, 1)", [0.4375, 0.625, 0.8125, 1],
-"hsla(240, 50%, 62.5%, 1)", [0.4375, 0.4375, 0.8125, 1],
-"hsla(270, 50%, 62.5%, 1)", [0.625, 0.4375, 0.8125, 1],
-"hsla(300, 50%, 62.5%, 1)", [0.8125, 0.4375, 0.8125, 1],
-"hsla(330, 50%, 62.5%, 1)", [0.8125, 0.4375, 0.625, 1],
-"hsla(0, 62.5%, 62.5%, 1)", [0.859375, 0.390625, 0.390625, 1],
-"hsla(30, 62.5%, 62.5%, 1)", [0.859375, 0.625, 0.390625, 1],
-"hsla(60, 62.5%, 62.5%, 1)", [0.859375, 0.859375, 0.390625, 1],
-"hsla(90, 62.5%, 62.5%, 1)", [0.625, 0.859375, 0.390625, 1],
-"hsla(120, 62.5%, 62.5%, 1)", [0.390625, 0.859375, 0.390625, 1],
-"hsla(150, 62.5%, 62.5%, 1)", [0.390625, 0.859375, 0.625, 1],
-"hsla(180, 62.5%, 62.5%, 1)", [0.390625, 0.859375, 0.859375, 1],
-"hsla(210, 62.5%, 62.5%, 1)", [0.390625, 0.625, 0.859375, 1],
-"hsla(240, 62.5%, 62.5%, 1)", [0.390625, 0.390625, 0.859375, 1],
-"hsla(270, 62.5%, 62.5%, 1)", [0.625, 0.390625, 0.859375, 1],
-"hsla(300, 62.5%, 62.5%, 1)", [0.859375, 0.390625, 0.859375, 1],
-"hsla(330, 62.5%, 62.5%, 1)", [0.859375, 0.390625, 0.625, 1],
-"hsla(0, 75%, 62.5%, 1)", [0.90625, 0.34375, 0.34375, 1],
-"hsla(30, 75%, 62.5%, 1)", [0.90625, 0.625, 0.34375, 1],
-"hsla(60, 75%, 62.5%, 1)", [0.90625, 0.90625, 0.34375, 1],
-"hsla(90, 75%, 62.5%, 1)", [0.625, 0.90625, 0.34375, 1],
-"hsla(120, 75%, 62.5%, 1)", [0.34375, 0.90625, 0.34375, 1],
-"hsla(150, 75%, 62.5%, 1)", [0.34375, 0.90625, 0.625, 1],
-"hsla(180, 75%, 62.5%, 1)", [0.34375, 0.90625, 0.90625, 1],
-"hsla(210, 75%, 62.5%, 1)", [0.34375, 0.625, 0.90625, 1],
-"hsla(240, 75%, 62.5%, 1)", [0.34375, 0.34375, 0.90625, 1],
-"hsla(270, 75%, 62.5%, 1)", [0.625, 0.34375, 0.90625, 1],
-"hsla(300, 75%, 62.5%, 1)", [0.90625, 0.34375, 0.90625, 1],
-"hsla(330, 75%, 62.5%, 1)", [0.90625, 0.34375, 0.625, 1],
-"hsla(0, 87.5%, 62.5%, 1)", [0.953125, 0.296875, 0.296875, 1],
-"hsla(30, 87.5%, 62.5%, 1)", [0.953125, 0.625, 0.296875, 1],
-"hsla(60, 87.5%, 62.5%, 1)", [0.953125, 0.953125, 0.296875, 1],
-"hsla(90, 87.5%, 62.5%, 1)", [0.625, 0.953125, 0.296875, 1],
-"hsla(120, 87.5%, 62.5%, 1)", [0.296875, 0.953125, 0.296875, 1],
-"hsla(150, 87.5%, 62.5%, 1)", [0.296875, 0.953125, 0.625, 1],
-"hsla(180, 87.5%, 62.5%, 1)", [0.296875, 0.953125, 0.953125, 1],
-"hsla(210, 87.5%, 62.5%, 1)", [0.296875, 0.625, 0.953125, 1],
-"hsla(240, 87.5%, 62.5%, 1)", [0.296875, 0.296875, 0.953125, 1],
-"hsla(270, 87.5%, 62.5%, 1)", [0.625, 0.296875, 0.953125, 1],
-"hsla(300, 87.5%, 62.5%, 1)", [0.953125, 0.296875, 0.953125, 1],
-"hsla(330, 87.5%, 62.5%, 1)", [0.953125, 0.296875, 0.625, 1],
-"hsla(0, 100%, 62.5%, 1)", [1, 0.25, 0.25, 1],
-"hsla(30, 100%, 62.5%, 1)", [1, 0.625, 0.25, 1],
-"hsla(60, 100%, 62.5%, 1)", [1, 1, 0.25, 1],
-"hsla(90, 100%, 62.5%, 1)", [0.625, 1, 0.25, 1],
-"hsla(120, 100%, 62.5%, 1)", [0.25, 1, 0.25, 1],
-"hsla(150, 100%, 62.5%, 1)", [0.25, 1, 0.625, 1],
-"hsla(180, 100%, 62.5%, 1)", [0.25, 1, 1, 1],
-"hsla(210, 100%, 62.5%, 1)", [0.25, 0.625, 1, 1],
-"hsla(240, 100%, 62.5%, 1)", [0.25, 0.25, 1, 1],
-"hsla(270, 100%, 62.5%, 1)", [0.625, 0.25, 1, 1],
-"hsla(300, 100%, 62.5%, 1)", [1, 0.25, 1, 1],
-"hsla(330, 100%, 62.5%, 1)", [1, 0.25, 0.625, 1],
-"hsla(0, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(30, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(60, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(90, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(120, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(150, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(180, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(210, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(240, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(270, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(300, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(330, 0%, 75%, 1)", [0.75, 0.75, 0.75, 1],
-"hsla(0, 12.5%, 75%, 1)", [0.78125, 0.71875, 0.71875, 1],
-"hsla(30, 12.5%, 75%, 1)", [0.78125, 0.75, 0.71875, 1],
-"hsla(60, 12.5%, 75%, 1)", [0.78125, 0.78125, 0.71875, 1],
-"hsla(90, 12.5%, 75%, 1)", [0.75, 0.78125, 0.71875, 1],
-"hsla(120, 12.5%, 75%, 1)", [0.71875, 0.78125, 0.71875, 1],
-"hsla(150, 12.5%, 75%, 1)", [0.71875, 0.78125, 0.75, 1],
-"hsla(180, 12.5%, 75%, 1)", [0.71875, 0.78125, 0.78125, 1],
-"hsla(210, 12.5%, 75%, 1)", [0.71875, 0.75, 0.78125, 1],
-"hsla(240, 12.5%, 75%, 1)", [0.71875, 0.71875, 0.78125, 1],
-"hsla(270, 12.5%, 75%, 1)", [0.75, 0.71875, 0.78125, 1],
-"hsla(300, 12.5%, 75%, 1)", [0.78125, 0.71875, 0.78125, 1],
-"hsla(330, 12.5%, 75%, 1)", [0.78125, 0.71875, 0.75, 1],
-"hsla(0, 25%, 75%, 1)", [0.8125, 0.6875, 0.6875, 1],
-"hsla(30, 25%, 75%, 1)", [0.8125, 0.75, 0.6875, 1],
-"hsla(60, 25%, 75%, 1)", [0.8125, 0.8125, 0.6875, 1],
-"hsla(90, 25%, 75%, 1)", [0.75, 0.8125, 0.6875, 1],
-"hsla(120, 25%, 75%, 1)", [0.6875, 0.8125, 0.6875, 1],
-"hsla(150, 25%, 75%, 1)", [0.6875, 0.8125, 0.75, 1],
-"hsla(180, 25%, 75%, 1)", [0.6875, 0.8125, 0.8125, 1],
-"hsla(210, 25%, 75%, 1)", [0.6875, 0.75, 0.8125, 1],
-"hsla(240, 25%, 75%, 1)", [0.6875, 0.6875, 0.8125, 1],
-"hsla(270, 25%, 75%, 1)", [0.75, 0.6875, 0.8125, 1],
-"hsla(300, 25%, 75%, 1)", [0.8125, 0.6875, 0.8125, 1],
-"hsla(330, 25%, 75%, 1)", [0.8125, 0.6875, 0.75, 1],
-"hsla(0, 37.5%, 75%, 1)", [0.84375, 0.65625, 0.65625, 1],
-"hsla(30, 37.5%, 75%, 1)", [0.84375, 0.75, 0.65625, 1],
-"hsla(60, 37.5%, 75%, 1)", [0.84375, 0.84375, 0.65625, 1],
-"hsla(90, 37.5%, 75%, 1)", [0.75, 0.84375, 0.65625, 1],
-"hsla(120, 37.5%, 75%, 1)", [0.65625, 0.84375, 0.65625, 1],
-"hsla(150, 37.5%, 75%, 1)", [0.65625, 0.84375, 0.75, 1],
-"hsla(180, 37.5%, 75%, 1)", [0.65625, 0.84375, 0.84375, 1],
-"hsla(210, 37.5%, 75%, 1)", [0.65625, 0.75, 0.84375, 1],
-"hsla(240, 37.5%, 75%, 1)", [0.65625, 0.65625, 0.84375, 1],
-"hsla(270, 37.5%, 75%, 1)", [0.75, 0.65625, 0.84375, 1],
-"hsla(300, 37.5%, 75%, 1)", [0.84375, 0.65625, 0.84375, 1],
-"hsla(330, 37.5%, 75%, 1)", [0.84375, 0.65625, 0.75, 1],
-"hsla(0, 50%, 75%, 1)", [0.875, 0.625, 0.625, 1],
-"hsla(30, 50%, 75%, 1)", [0.875, 0.75, 0.625, 1],
-"hsla(60, 50%, 75%, 1)", [0.875, 0.875, 0.625, 1],
-"hsla(90, 50%, 75%, 1)", [0.75, 0.875, 0.625, 1],
-"hsla(120, 50%, 75%, 1)", [0.625, 0.875, 0.625, 1],
-"hsla(150, 50%, 75%, 1)", [0.625, 0.875, 0.75, 1],
-"hsla(180, 50%, 75%, 1)", [0.625, 0.875, 0.875, 1],
-"hsla(210, 50%, 75%, 1)", [0.625, 0.75, 0.875, 1],
-"hsla(240, 50%, 75%, 1)", [0.625, 0.625, 0.875, 1],
-"hsla(270, 50%, 75%, 1)", [0.75, 0.625, 0.875, 1],
-"hsla(300, 50%, 75%, 1)", [0.875, 0.625, 0.875, 1],
-"hsla(330, 50%, 75%, 1)", [0.875, 0.625, 0.75, 1],
-"hsla(0, 62.5%, 75%, 1)", [0.90625, 0.59375, 0.59375, 1],
-"hsla(30, 62.5%, 75%, 1)", [0.90625, 0.75, 0.59375, 1],
-"hsla(60, 62.5%, 75%, 1)", [0.90625, 0.90625, 0.59375, 1],
-"hsla(90, 62.5%, 75%, 1)", [0.75, 0.90625, 0.59375, 1],
-"hsla(120, 62.5%, 75%, 1)", [0.59375, 0.90625, 0.59375, 1],
-"hsla(150, 62.5%, 75%, 1)", [0.59375, 0.90625, 0.75, 1],
-"hsla(180, 62.5%, 75%, 1)", [0.59375, 0.90625, 0.90625, 1],
-"hsla(210, 62.5%, 75%, 1)", [0.59375, 0.75, 0.90625, 1],
-"hsla(240, 62.5%, 75%, 1)", [0.59375, 0.59375, 0.90625, 1],
-"hsla(270, 62.5%, 75%, 1)", [0.75, 0.59375, 0.90625, 1],
-"hsla(300, 62.5%, 75%, 1)", [0.90625, 0.59375, 0.90625, 1],
-"hsla(330, 62.5%, 75%, 1)", [0.90625, 0.59375, 0.75, 1],
-"hsla(0, 75%, 75%, 1)", [0.9375, 0.5625, 0.5625, 1],
-"hsla(30, 75%, 75%, 1)", [0.9375, 0.75, 0.5625, 1],
-"hsla(60, 75%, 75%, 1)", [0.9375, 0.9375, 0.5625, 1],
-"hsla(90, 75%, 75%, 1)", [0.75, 0.9375, 0.5625, 1],
-"hsla(120, 75%, 75%, 1)", [0.5625, 0.9375, 0.5625, 1],
-"hsla(150, 75%, 75%, 1)", [0.5625, 0.9375, 0.75, 1],
-"hsla(180, 75%, 75%, 1)", [0.5625, 0.9375, 0.9375, 1],
-"hsla(210, 75%, 75%, 1)", [0.5625, 0.75, 0.9375, 1],
-"hsla(240, 75%, 75%, 1)", [0.5625, 0.5625, 0.9375, 1],
-"hsla(270, 75%, 75%, 1)", [0.75, 0.5625, 0.9375, 1],
-"hsla(300, 75%, 75%, 1)", [0.9375, 0.5625, 0.9375, 1],
-"hsla(330, 75%, 75%, 1)", [0.9375, 0.5625, 0.75, 1],
-"hsla(0, 87.5%, 75%, 1)", [0.96875, 0.53125, 0.53125, 1],
-"hsla(30, 87.5%, 75%, 1)", [0.96875, 0.75, 0.53125, 1],
-"hsla(60, 87.5%, 75%, 1)", [0.96875, 0.96875, 0.53125, 1],
-"hsla(90, 87.5%, 75%, 1)", [0.75, 0.96875, 0.53125, 1],
-"hsla(120, 87.5%, 75%, 1)", [0.53125, 0.96875, 0.53125, 1],
-"hsla(150, 87.5%, 75%, 1)", [0.53125, 0.96875, 0.75, 1],
-"hsla(180, 87.5%, 75%, 1)", [0.53125, 0.96875, 0.96875, 1],
-"hsla(210, 87.5%, 75%, 1)", [0.53125, 0.75, 0.96875, 1],
-"hsla(240, 87.5%, 75%, 1)", [0.53125, 0.53125, 0.96875, 1],
-"hsla(270, 87.5%, 75%, 1)", [0.75, 0.53125, 0.96875, 1],
-"hsla(300, 87.5%, 75%, 1)", [0.96875, 0.53125, 0.96875, 1],
-"hsla(330, 87.5%, 75%, 1)", [0.96875, 0.53125, 0.75, 1],
-"hsla(0, 100%, 75%, 1)", [1, 0.5, 0.5, 1],
-"hsla(30, 100%, 75%, 1)", [1, 0.75, 0.5, 1],
-"hsla(60, 100%, 75%, 1)", [1, 1, 0.5, 1],
-"hsla(90, 100%, 75%, 1)", [0.75, 1, 0.5, 1],
-"hsla(120, 100%, 75%, 1)", [0.5, 1, 0.5, 1],
-"hsla(150, 100%, 75%, 1)", [0.5, 1, 0.75, 1],
-"hsla(180, 100%, 75%, 1)", [0.5, 1, 1, 1],
-"hsla(210, 100%, 75%, 1)", [0.5, 0.75, 1, 1],
-"hsla(240, 100%, 75%, 1)", [0.5, 0.5, 1, 1],
-"hsla(270, 100%, 75%, 1)", [0.75, 0.5, 1, 1],
-"hsla(300, 100%, 75%, 1)", [1, 0.5, 1, 1],
-"hsla(330, 100%, 75%, 1)", [1, 0.5, 0.75, 1],
-"hsla(0, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(30, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(60, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(90, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(120, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(150, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(180, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(210, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(240, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(270, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(300, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(330, 0%, 87.5%, 1)", [0.875, 0.875, 0.875, 1],
-"hsla(0, 12.5%, 87.5%, 1)", [0.890625, 0.859375, 0.859375, 1],
-"hsla(30, 12.5%, 87.5%, 1)", [0.890625, 0.875, 0.859375, 1],
-"hsla(60, 12.5%, 87.5%, 1)", [0.890625, 0.890625, 0.859375, 1],
-"hsla(90, 12.5%, 87.5%, 1)", [0.875, 0.890625, 0.859375, 1],
-"hsla(120, 12.5%, 87.5%, 1)", [0.859375, 0.890625, 0.859375, 1],
-"hsla(150, 12.5%, 87.5%, 1)", [0.859375, 0.890625, 0.875, 1],
-"hsla(180, 12.5%, 87.5%, 1)", [0.859375, 0.890625, 0.890625, 1],
-"hsla(210, 12.5%, 87.5%, 1)", [0.859375, 0.875, 0.890625, 1],
-"hsla(240, 12.5%, 87.5%, 1)", [0.859375, 0.859375, 0.890625, 1],
-"hsla(270, 12.5%, 87.5%, 1)", [0.875, 0.859375, 0.890625, 1],
-"hsla(300, 12.5%, 87.5%, 1)", [0.890625, 0.859375, 0.890625, 1],
-"hsla(330, 12.5%, 87.5%, 1)", [0.890625, 0.859375, 0.875, 1],
-"hsla(0, 25%, 87.5%, 1)", [0.90625, 0.84375, 0.84375, 1],
-"hsla(30, 25%, 87.5%, 1)", [0.90625, 0.875, 0.84375, 1],
-"hsla(60, 25%, 87.5%, 1)", [0.90625, 0.90625, 0.84375, 1],
-"hsla(90, 25%, 87.5%, 1)", [0.875, 0.90625, 0.84375, 1],
-"hsla(120, 25%, 87.5%, 1)", [0.84375, 0.90625, 0.84375, 1],
-"hsla(150, 25%, 87.5%, 1)", [0.84375, 0.90625, 0.875, 1],
-"hsla(180, 25%, 87.5%, 1)", [0.84375, 0.90625, 0.90625, 1],
-"hsla(210, 25%, 87.5%, 1)", [0.84375, 0.875, 0.90625, 1],
-"hsla(240, 25%, 87.5%, 1)", [0.84375, 0.84375, 0.90625, 1],
-"hsla(270, 25%, 87.5%, 1)", [0.875, 0.84375, 0.90625, 1],
-"hsla(300, 25%, 87.5%, 1)", [0.90625, 0.84375, 0.90625, 1],
-"hsla(330, 25%, 87.5%, 1)", [0.90625, 0.84375, 0.875, 1],
-"hsla(0, 37.5%, 87.5%, 1)", [0.921875, 0.828125, 0.828125, 1],
-"hsla(30, 37.5%, 87.5%, 1)", [0.921875, 0.875, 0.828125, 1],
-"hsla(60, 37.5%, 87.5%, 1)", [0.921875, 0.921875, 0.828125, 1],
-"hsla(90, 37.5%, 87.5%, 1)", [0.875, 0.921875, 0.828125, 1],
-"hsla(120, 37.5%, 87.5%, 1)", [0.828125, 0.921875, 0.828125, 1],
-"hsla(150, 37.5%, 87.5%, 1)", [0.828125, 0.921875, 0.875, 1],
-"hsla(180, 37.5%, 87.5%, 1)", [0.828125, 0.921875, 0.921875, 1],
-"hsla(210, 37.5%, 87.5%, 1)", [0.828125, 0.875, 0.921875, 1],
-"hsla(240, 37.5%, 87.5%, 1)", [0.828125, 0.828125, 0.921875, 1],
-"hsla(270, 37.5%, 87.5%, 1)", [0.875, 0.828125, 0.921875, 1],
-"hsla(300, 37.5%, 87.5%, 1)", [0.921875, 0.828125, 0.921875, 1],
-"hsla(330, 37.5%, 87.5%, 1)", [0.921875, 0.828125, 0.875, 1],
-"hsla(0, 50%, 87.5%, 1)", [0.9375, 0.8125, 0.8125, 1],
-"hsla(30, 50%, 87.5%, 1)", [0.9375, 0.875, 0.8125, 1],
-"hsla(60, 50%, 87.5%, 1)", [0.9375, 0.9375, 0.8125, 1],
-"hsla(90, 50%, 87.5%, 1)", [0.875, 0.9375, 0.8125, 1],
-"hsla(120, 50%, 87.5%, 1)", [0.8125, 0.9375, 0.8125, 1],
-"hsla(150, 50%, 87.5%, 1)", [0.8125, 0.9375, 0.875, 1],
-"hsla(180, 50%, 87.5%, 1)", [0.8125, 0.9375, 0.9375, 1],
-"hsla(210, 50%, 87.5%, 1)", [0.8125, 0.875, 0.9375, 1],
-"hsla(240, 50%, 87.5%, 1)", [0.8125, 0.8125, 0.9375, 1],
-"hsla(270, 50%, 87.5%, 1)", [0.875, 0.8125, 0.9375, 1],
-"hsla(300, 50%, 87.5%, 1)", [0.9375, 0.8125, 0.9375, 1],
-"hsla(330, 50%, 87.5%, 1)", [0.9375, 0.8125, 0.875, 1],
-"hsla(0, 62.5%, 87.5%, 1)", [0.953125, 0.796875, 0.796875, 1],
-"hsla(30, 62.5%, 87.5%, 1)", [0.953125, 0.875, 0.796875, 1],
-"hsla(60, 62.5%, 87.5%, 1)", [0.953125, 0.953125, 0.796875, 1],
-"hsla(90, 62.5%, 87.5%, 1)", [0.875, 0.953125, 0.796875, 1],
-"hsla(120, 62.5%, 87.5%, 1)", [0.796875, 0.953125, 0.796875, 1],
-"hsla(150, 62.5%, 87.5%, 1)", [0.796875, 0.953125, 0.875, 1],
-"hsla(180, 62.5%, 87.5%, 1)", [0.796875, 0.953125, 0.953125, 1],
-"hsla(210, 62.5%, 87.5%, 1)", [0.796875, 0.875, 0.953125, 1],
-"hsla(240, 62.5%, 87.5%, 1)", [0.796875, 0.796875, 0.953125, 1],
-"hsla(270, 62.5%, 87.5%, 1)", [0.875, 0.796875, 0.953125, 1],
-"hsla(300, 62.5%, 87.5%, 1)", [0.953125, 0.796875, 0.953125, 1],
-"hsla(330, 62.5%, 87.5%, 1)", [0.953125, 0.796875, 0.875, 1],
-"hsla(0, 75%, 87.5%, 1)", [0.96875, 0.78125, 0.78125, 1],
-"hsla(30, 75%, 87.5%, 1)", [0.96875, 0.875, 0.78125, 1],
-"hsla(60, 75%, 87.5%, 1)", [0.96875, 0.96875, 0.78125, 1],
-"hsla(90, 75%, 87.5%, 1)", [0.875, 0.96875, 0.78125, 1],
-"hsla(120, 75%, 87.5%, 1)", [0.78125, 0.96875, 0.78125, 1],
-"hsla(150, 75%, 87.5%, 1)", [0.78125, 0.96875, 0.875, 1],
-"hsla(180, 75%, 87.5%, 1)", [0.78125, 0.96875, 0.96875, 1],
-"hsla(210, 75%, 87.5%, 1)", [0.78125, 0.875, 0.96875, 1],
-"hsla(240, 75%, 87.5%, 1)", [0.78125, 0.78125, 0.96875, 1],
-"hsla(270, 75%, 87.5%, 1)", [0.875, 0.78125, 0.96875, 1],
-"hsla(300, 75%, 87.5%, 1)", [0.96875, 0.78125, 0.96875, 1],
-"hsla(330, 75%, 87.5%, 1)", [0.96875, 0.78125, 0.875, 1],
-"hsla(0, 87.5%, 87.5%, 1)", [0.984375, 0.765625, 0.765625, 1],
-"hsla(30, 87.5%, 87.5%, 1)", [0.984375, 0.875, 0.765625, 1],
-"hsla(60, 87.5%, 87.5%, 1)", [0.984375, 0.984375, 0.765625, 1],
-"hsla(90, 87.5%, 87.5%, 1)", [0.875, 0.984375, 0.765625, 1],
-"hsla(120, 87.5%, 87.5%, 1)", [0.765625, 0.984375, 0.765625, 1],
-"hsla(150, 87.5%, 87.5%, 1)", [0.765625, 0.984375, 0.875, 1],
-"hsla(180, 87.5%, 87.5%, 1)", [0.765625, 0.984375, 0.984375, 1],
-"hsla(210, 87.5%, 87.5%, 1)", [0.765625, 0.875, 0.984375, 1],
-"hsla(240, 87.5%, 87.5%, 1)", [0.765625, 0.765625, 0.984375, 1],
-"hsla(270, 87.5%, 87.5%, 1)", [0.875, 0.765625, 0.984375, 1],
-"hsla(300, 87.5%, 87.5%, 1)", [0.984375, 0.765625, 0.984375, 1],
-"hsla(330, 87.5%, 87.5%, 1)", [0.984375, 0.765625, 0.875, 1],
-"hsla(0, 100%, 87.5%, 1)", [1, 0.75, 0.75, 1],
-"hsla(30, 100%, 87.5%, 1)", [1, 0.875, 0.75, 1],
-"hsla(60, 100%, 87.5%, 1)", [1, 1, 0.75, 1],
-"hsla(90, 100%, 87.5%, 1)", [0.875, 1, 0.75, 1],
-"hsla(120, 100%, 87.5%, 1)", [0.75, 1, 0.75, 1],
-"hsla(150, 100%, 87.5%, 1)", [0.75, 1, 0.875, 1],
-"hsla(180, 100%, 87.5%, 1)", [0.75, 1, 1, 1],
-"hsla(210, 100%, 87.5%, 1)", [0.75, 0.875, 1, 1],
-"hsla(240, 100%, 87.5%, 1)", [0.75, 0.75, 1, 1],
-"hsla(270, 100%, 87.5%, 1)", [0.875, 0.75, 1, 1],
-"hsla(300, 100%, 87.5%, 1)", [1, 0.75, 1, 1],
-"hsla(330, 100%, 87.5%, 1)", [1, 0.75, 0.875, 1],
-"hsla(0, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 0%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 12.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 25%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 37.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 50%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 62.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 75%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 87.5%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(30, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(60, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(90, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(120, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(150, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(180, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(210, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(240, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(270, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(300, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(330, 100%, 100%, 1)", [1, 1, 1, 1],
-"hsla(0, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 0%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 12.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 25%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 37.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 50%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 62.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 75%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 87.5%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(30, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(60, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(90, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(120, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(150, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(180, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(210, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(240, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(270, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(300, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(330, 100%, 0%, 0.2)", [0, 0, 0, 0.2],
-"hsla(0, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(30, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(60, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(90, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(120, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(150, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(180, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(210, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(240, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(270, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(300, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(330, 0%, 12.5%, 0.2)", [0.125, 0.125, 0.125, 0.2],
-"hsla(0, 12.5%, 12.5%, 0.2)", [0.140625, 0.109375, 0.109375, 0.2],
-"hsla(30, 12.5%, 12.5%, 0.2)", [0.140625, 0.125, 0.109375, 0.2],
-"hsla(60, 12.5%, 12.5%, 0.2)", [0.140625, 0.140625, 0.109375, 0.2],
-"hsla(90, 12.5%, 12.5%, 0.2)", [0.125, 0.140625, 0.109375, 0.2],
-"hsla(120, 12.5%, 12.5%, 0.2)", [0.109375, 0.140625, 0.109375, 0.2],
-"hsla(150, 12.5%, 12.5%, 0.2)", [0.109375, 0.140625, 0.125, 0.2],
-"hsla(180, 12.5%, 12.5%, 0.2)", [0.109375, 0.140625, 0.140625, 0.2],
-"hsla(210, 12.5%, 12.5%, 0.2)", [0.109375, 0.125, 0.140625, 0.2],
-"hsla(240, 12.5%, 12.5%, 0.2)", [0.109375, 0.109375, 0.140625, 0.2],
-"hsla(270, 12.5%, 12.5%, 0.2)", [0.125, 0.109375, 0.140625, 0.2],
-"hsla(300, 12.5%, 12.5%, 0.2)", [0.140625, 0.109375, 0.140625, 0.2],
-"hsla(330, 12.5%, 12.5%, 0.2)", [0.140625, 0.109375, 0.125, 0.2],
-"hsla(0, 25%, 12.5%, 0.2)", [0.15625, 0.09375, 0.09375, 0.2],
-"hsla(30, 25%, 12.5%, 0.2)", [0.15625, 0.125, 0.09375, 0.2],
-"hsla(60, 25%, 12.5%, 0.2)", [0.15625, 0.15625, 0.09375, 0.2],
-"hsla(90, 25%, 12.5%, 0.2)", [0.125, 0.15625, 0.09375, 0.2],
-"hsla(120, 25%, 12.5%, 0.2)", [0.09375, 0.15625, 0.09375, 0.2],
-"hsla(150, 25%, 12.5%, 0.2)", [0.09375, 0.15625, 0.125, 0.2],
-"hsla(180, 25%, 12.5%, 0.2)", [0.09375, 0.15625, 0.15625, 0.2],
-"hsla(210, 25%, 12.5%, 0.2)", [0.09375, 0.125, 0.15625, 0.2],
-"hsla(240, 25%, 12.5%, 0.2)", [0.09375, 0.09375, 0.15625, 0.2],
-"hsla(270, 25%, 12.5%, 0.2)", [0.125, 0.09375, 0.15625, 0.2],
-"hsla(300, 25%, 12.5%, 0.2)", [0.15625, 0.09375, 0.15625, 0.2],
-"hsla(330, 25%, 12.5%, 0.2)", [0.15625, 0.09375, 0.125, 0.2],
-"hsla(0, 37.5%, 12.5%, 0.2)", [0.171875, 0.078125, 0.078125, 0.2],
-"hsla(30, 37.5%, 12.5%, 0.2)", [0.171875, 0.125, 0.078125, 0.2],
-"hsla(60, 37.5%, 12.5%, 0.2)", [0.171875, 0.171875, 0.078125, 0.2],
-"hsla(90, 37.5%, 12.5%, 0.2)", [0.125, 0.171875, 0.078125, 0.2],
-"hsla(120, 37.5%, 12.5%, 0.2)", [0.078125, 0.171875, 0.078125, 0.2],
-"hsla(150, 37.5%, 12.5%, 0.2)", [0.078125, 0.171875, 0.125, 0.2],
-"hsla(180, 37.5%, 12.5%, 0.2)", [0.078125, 0.171875, 0.171875, 0.2],
-"hsla(210, 37.5%, 12.5%, 0.2)", [0.078125, 0.125, 0.171875, 0.2],
-"hsla(240, 37.5%, 12.5%, 0.2)", [0.078125, 0.078125, 0.171875, 0.2],
-"hsla(270, 37.5%, 12.5%, 0.2)", [0.125, 0.078125, 0.171875, 0.2],
-"hsla(300, 37.5%, 12.5%, 0.2)", [0.171875, 0.078125, 0.171875, 0.2],
-"hsla(330, 37.5%, 12.5%, 0.2)", [0.171875, 0.078125, 0.125, 0.2],
-"hsla(0, 50%, 12.5%, 0.2)", [0.1875, 0.0625, 0.0625, 0.2],
-"hsla(30, 50%, 12.5%, 0.2)", [0.1875, 0.125, 0.0625, 0.2],
-"hsla(60, 50%, 12.5%, 0.2)", [0.1875, 0.1875, 0.0625, 0.2],
-"hsla(90, 50%, 12.5%, 0.2)", [0.125, 0.1875, 0.0625, 0.2],
-"hsla(120, 50%, 12.5%, 0.2)", [0.0625, 0.1875, 0.0625, 0.2],
-"hsla(150, 50%, 12.5%, 0.2)", [0.0625, 0.1875, 0.125, 0.2],
-"hsla(180, 50%, 12.5%, 0.2)", [0.0625, 0.1875, 0.1875, 0.2],
-"hsla(210, 50%, 12.5%, 0.2)", [0.0625, 0.125, 0.1875, 0.2],
-"hsla(240, 50%, 12.5%, 0.2)", [0.0625, 0.0625, 0.1875, 0.2],
-"hsla(270, 50%, 12.5%, 0.2)", [0.125, 0.0625, 0.1875, 0.2],
-"hsla(300, 50%, 12.5%, 0.2)", [0.1875, 0.0625, 0.1875, 0.2],
-"hsla(330, 50%, 12.5%, 0.2)", [0.1875, 0.0625, 0.125, 0.2],
-"hsla(0, 62.5%, 12.5%, 0.2)", [0.203125, 0.046875, 0.046875, 0.2],
-"hsla(30, 62.5%, 12.5%, 0.2)", [0.203125, 0.125, 0.046875, 0.2],
-"hsla(60, 62.5%, 12.5%, 0.2)", [0.203125, 0.203125, 0.046875, 0.2],
-"hsla(90, 62.5%, 12.5%, 0.2)", [0.125, 0.203125, 0.046875, 0.2],
-"hsla(120, 62.5%, 12.5%, 0.2)", [0.046875, 0.203125, 0.046875, 0.2],
-"hsla(150, 62.5%, 12.5%, 0.2)", [0.046875, 0.203125, 0.125, 0.2],
-"hsla(180, 62.5%, 12.5%, 0.2)", [0.046875, 0.203125, 0.203125, 0.2],
-"hsla(210, 62.5%, 12.5%, 0.2)", [0.046875, 0.125, 0.203125, 0.2],
-"hsla(240, 62.5%, 12.5%, 0.2)", [0.046875, 0.046875, 0.203125, 0.2],
-"hsla(270, 62.5%, 12.5%, 0.2)", [0.125, 0.046875, 0.203125, 0.2],
-"hsla(300, 62.5%, 12.5%, 0.2)", [0.203125, 0.046875, 0.203125, 0.2],
-"hsla(330, 62.5%, 12.5%, 0.2)", [0.203125, 0.046875, 0.125, 0.2],
-"hsla(0, 75%, 12.5%, 0.2)", [0.21875, 0.03125, 0.03125, 0.2],
-"hsla(30, 75%, 12.5%, 0.2)", [0.21875, 0.125, 0.03125, 0.2],
-"hsla(60, 75%, 12.5%, 0.2)", [0.21875, 0.21875, 0.03125, 0.2],
-"hsla(90, 75%, 12.5%, 0.2)", [0.125, 0.21875, 0.03125, 0.2],
-"hsla(120, 75%, 12.5%, 0.2)", [0.03125, 0.21875, 0.03125, 0.2],
-"hsla(150, 75%, 12.5%, 0.2)", [0.03125, 0.21875, 0.125, 0.2],
-"hsla(180, 75%, 12.5%, 0.2)", [0.03125, 0.21875, 0.21875, 0.2],
-"hsla(210, 75%, 12.5%, 0.2)", [0.03125, 0.125, 0.21875, 0.2],
-"hsla(240, 75%, 12.5%, 0.2)", [0.03125, 0.03125, 0.21875, 0.2],
-"hsla(270, 75%, 12.5%, 0.2)", [0.125, 0.03125, 0.21875, 0.2],
-"hsla(300, 75%, 12.5%, 0.2)", [0.21875, 0.03125, 0.21875, 0.2],
-"hsla(330, 75%, 12.5%, 0.2)", [0.21875, 0.03125, 0.125, 0.2],
-"hsla(0, 87.5%, 12.5%, 0.2)", [0.234375, 0.015625, 0.015625, 0.2],
-"hsla(30, 87.5%, 12.5%, 0.2)", [0.234375, 0.125, 0.015625, 0.2],
-"hsla(60, 87.5%, 12.5%, 0.2)", [0.234375, 0.234375, 0.015625, 0.2],
-"hsla(90, 87.5%, 12.5%, 0.2)", [0.125, 0.234375, 0.015625, 0.2],
-"hsla(120, 87.5%, 12.5%, 0.2)", [0.015625, 0.234375, 0.015625, 0.2],
-"hsla(150, 87.5%, 12.5%, 0.2)", [0.015625, 0.234375, 0.125, 0.2],
-"hsla(180, 87.5%, 12.5%, 0.2)", [0.015625, 0.234375, 0.234375, 0.2],
-"hsla(210, 87.5%, 12.5%, 0.2)", [0.015625, 0.125, 0.234375, 0.2],
-"hsla(240, 87.5%, 12.5%, 0.2)", [0.015625, 0.015625, 0.234375, 0.2],
-"hsla(270, 87.5%, 12.5%, 0.2)", [0.125, 0.015625, 0.234375, 0.2],
-"hsla(300, 87.5%, 12.5%, 0.2)", [0.234375, 0.015625, 0.234375, 0.2],
-"hsla(330, 87.5%, 12.5%, 0.2)", [0.234375, 0.015625, 0.125, 0.2],
-"hsla(0, 100%, 12.5%, 0.2)", [0.25, 0, 0, 0.2],
-"hsla(30, 100%, 12.5%, 0.2)", [0.25, 0.125, 0, 0.2],
-"hsla(60, 100%, 12.5%, 0.2)", [0.25, 0.25, 0, 0.2],
-"hsla(90, 100%, 12.5%, 0.2)", [0.125, 0.25, 0, 0.2],
-"hsla(120, 100%, 12.5%, 0.2)", [0, 0.25, 0, 0.2],
-"hsla(150, 100%, 12.5%, 0.2)", [0, 0.25, 0.125, 0.2],
-"hsla(180, 100%, 12.5%, 0.2)", [0, 0.25, 0.25, 0.2],
-"hsla(210, 100%, 12.5%, 0.2)", [0, 0.125, 0.25, 0.2],
-"hsla(240, 100%, 12.5%, 0.2)", [0, 0, 0.25, 0.2],
-"hsla(270, 100%, 12.5%, 0.2)", [0.125, 0, 0.25, 0.2],
-"hsla(300, 100%, 12.5%, 0.2)", [0.25, 0, 0.25, 0.2],
-"hsla(330, 100%, 12.5%, 0.2)", [0.25, 0, 0.125, 0.2],
-"hsla(0, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(30, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(60, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(90, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(120, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(150, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(180, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(210, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(240, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(270, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(300, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(330, 0%, 25%, 0.2)", [0.25, 0.25, 0.25, 0.2],
-"hsla(0, 12.5%, 25%, 0.2)", [0.28125, 0.21875, 0.21875, 0.2],
-"hsla(30, 12.5%, 25%, 0.2)", [0.28125, 0.25, 0.21875, 0.2],
-"hsla(60, 12.5%, 25%, 0.2)", [0.28125, 0.28125, 0.21875, 0.2],
-"hsla(90, 12.5%, 25%, 0.2)", [0.25, 0.28125, 0.21875, 0.2],
-"hsla(120, 12.5%, 25%, 0.2)", [0.21875, 0.28125, 0.21875, 0.2],
-"hsla(150, 12.5%, 25%, 0.2)", [0.21875, 0.28125, 0.25, 0.2],
-"hsla(180, 12.5%, 25%, 0.2)", [0.21875, 0.28125, 0.28125, 0.2],
-"hsla(210, 12.5%, 25%, 0.2)", [0.21875, 0.25, 0.28125, 0.2],
-"hsla(240, 12.5%, 25%, 0.2)", [0.21875, 0.21875, 0.28125, 0.2],
-"hsla(270, 12.5%, 25%, 0.2)", [0.25, 0.21875, 0.28125, 0.2],
-"hsla(300, 12.5%, 25%, 0.2)", [0.28125, 0.21875, 0.28125, 0.2],
-"hsla(330, 12.5%, 25%, 0.2)", [0.28125, 0.21875, 0.25, 0.2],
-"hsla(0, 25%, 25%, 0.2)", [0.3125, 0.1875, 0.1875, 0.2],
-"hsla(30, 25%, 25%, 0.2)", [0.3125, 0.25, 0.1875, 0.2],
-"hsla(60, 25%, 25%, 0.2)", [0.3125, 0.3125, 0.1875, 0.2],
-"hsla(90, 25%, 25%, 0.2)", [0.25, 0.3125, 0.1875, 0.2],
-"hsla(120, 25%, 25%, 0.2)", [0.1875, 0.3125, 0.1875, 0.2],
-"hsla(150, 25%, 25%, 0.2)", [0.1875, 0.3125, 0.25, 0.2],
-"hsla(180, 25%, 25%, 0.2)", [0.1875, 0.3125, 0.3125, 0.2],
-"hsla(210, 25%, 25%, 0.2)", [0.1875, 0.25, 0.3125, 0.2],
-"hsla(240, 25%, 25%, 0.2)", [0.1875, 0.1875, 0.3125, 0.2],
-"hsla(270, 25%, 25%, 0.2)", [0.25, 0.1875, 0.3125, 0.2],
-"hsla(300, 25%, 25%, 0.2)", [0.3125, 0.1875, 0.3125, 0.2],
-"hsla(330, 25%, 25%, 0.2)", [0.3125, 0.1875, 0.25, 0.2],
-"hsla(0, 37.5%, 25%, 0.2)", [0.34375, 0.15625, 0.15625, 0.2],
-"hsla(30, 37.5%, 25%, 0.2)", [0.34375, 0.25, 0.15625, 0.2],
-"hsla(60, 37.5%, 25%, 0.2)", [0.34375, 0.34375, 0.15625, 0.2],
-"hsla(90, 37.5%, 25%, 0.2)", [0.25, 0.34375, 0.15625, 0.2],
-"hsla(120, 37.5%, 25%, 0.2)", [0.15625, 0.34375, 0.15625, 0.2],
-"hsla(150, 37.5%, 25%, 0.2)", [0.15625, 0.34375, 0.25, 0.2],
-"hsla(180, 37.5%, 25%, 0.2)", [0.15625, 0.34375, 0.34375, 0.2],
-"hsla(210, 37.5%, 25%, 0.2)", [0.15625, 0.25, 0.34375, 0.2],
-"hsla(240, 37.5%, 25%, 0.2)", [0.15625, 0.15625, 0.34375, 0.2],
-"hsla(270, 37.5%, 25%, 0.2)", [0.25, 0.15625, 0.34375, 0.2],
-"hsla(300, 37.5%, 25%, 0.2)", [0.34375, 0.15625, 0.34375, 0.2],
-"hsla(330, 37.5%, 25%, 0.2)", [0.34375, 0.15625, 0.25, 0.2],
-"hsla(0, 50%, 25%, 0.2)", [0.375, 0.125, 0.125, 0.2],
-"hsla(30, 50%, 25%, 0.2)", [0.375, 0.25, 0.125, 0.2],
-"hsla(60, 50%, 25%, 0.2)", [0.375, 0.375, 0.125, 0.2],
-"hsla(90, 50%, 25%, 0.2)", [0.25, 0.375, 0.125, 0.2],
-"hsla(120, 50%, 25%, 0.2)", [0.125, 0.375, 0.125, 0.2],
-"hsla(150, 50%, 25%, 0.2)", [0.125, 0.375, 0.25, 0.2],
-"hsla(180, 50%, 25%, 0.2)", [0.125, 0.375, 0.375, 0.2],
-"hsla(210, 50%, 25%, 0.2)", [0.125, 0.25, 0.375, 0.2],
-"hsla(240, 50%, 25%, 0.2)", [0.125, 0.125, 0.375, 0.2],
-"hsla(270, 50%, 25%, 0.2)", [0.25, 0.125, 0.375, 0.2],
-"hsla(300, 50%, 25%, 0.2)", [0.375, 0.125, 0.375, 0.2],
-"hsla(330, 50%, 25%, 0.2)", [0.375, 0.125, 0.25, 0.2],
-"hsla(0, 62.5%, 25%, 0.2)", [0.40625, 0.09375, 0.09375, 0.2],
-"hsla(30, 62.5%, 25%, 0.2)", [0.40625, 0.25, 0.09375, 0.2],
-"hsla(60, 62.5%, 25%, 0.2)", [0.40625, 0.40625, 0.09375, 0.2],
-"hsla(90, 62.5%, 25%, 0.2)", [0.25, 0.40625, 0.09375, 0.2],
-"hsla(120, 62.5%, 25%, 0.2)", [0.09375, 0.40625, 0.09375, 0.2],
-"hsla(150, 62.5%, 25%, 0.2)", [0.09375, 0.40625, 0.25, 0.2],
-"hsla(180, 62.5%, 25%, 0.2)", [0.09375, 0.40625, 0.40625, 0.2],
-"hsla(210, 62.5%, 25%, 0.2)", [0.09375, 0.25, 0.40625, 0.2],
-"hsla(240, 62.5%, 25%, 0.2)", [0.09375, 0.09375, 0.40625, 0.2],
-"hsla(270, 62.5%, 25%, 0.2)", [0.25, 0.09375, 0.40625, 0.2],
-"hsla(300, 62.5%, 25%, 0.2)", [0.40625, 0.09375, 0.40625, 0.2],
-"hsla(330, 62.5%, 25%, 0.2)", [0.40625, 0.09375, 0.25, 0.2],
-"hsla(0, 75%, 25%, 0.2)", [0.4375, 0.0625, 0.0625, 0.2],
-"hsla(30, 75%, 25%, 0.2)", [0.4375, 0.25, 0.0625, 0.2],
-"hsla(60, 75%, 25%, 0.2)", [0.4375, 0.4375, 0.0625, 0.2],
-"hsla(90, 75%, 25%, 0.2)", [0.25, 0.4375, 0.0625, 0.2],
-"hsla(120, 75%, 25%, 0.2)", [0.0625, 0.4375, 0.0625, 0.2],
-"hsla(150, 75%, 25%, 0.2)", [0.0625, 0.4375, 0.25, 0.2],
-"hsla(180, 75%, 25%, 0.2)", [0.0625, 0.4375, 0.4375, 0.2],
-"hsla(210, 75%, 25%, 0.2)", [0.0625, 0.25, 0.4375, 0.2],
-"hsla(240, 75%, 25%, 0.2)", [0.0625, 0.0625, 0.4375, 0.2],
-"hsla(270, 75%, 25%, 0.2)", [0.25, 0.0625, 0.4375, 0.2],
-"hsla(300, 75%, 25%, 0.2)", [0.4375, 0.0625, 0.4375, 0.2],
-"hsla(330, 75%, 25%, 0.2)", [0.4375, 0.0625, 0.25, 0.2],
-"hsla(0, 87.5%, 25%, 0.2)", [0.46875, 0.03125, 0.03125, 0.2],
-"hsla(30, 87.5%, 25%, 0.2)", [0.46875, 0.25, 0.03125, 0.2],
-"hsla(60, 87.5%, 25%, 0.2)", [0.46875, 0.46875, 0.03125, 0.2],
-"hsla(90, 87.5%, 25%, 0.2)", [0.25, 0.46875, 0.03125, 0.2],
-"hsla(120, 87.5%, 25%, 0.2)", [0.03125, 0.46875, 0.03125, 0.2],
-"hsla(150, 87.5%, 25%, 0.2)", [0.03125, 0.46875, 0.25, 0.2],
-"hsla(180, 87.5%, 25%, 0.2)", [0.03125, 0.46875, 0.46875, 0.2],
-"hsla(210, 87.5%, 25%, 0.2)", [0.03125, 0.25, 0.46875, 0.2],
-"hsla(240, 87.5%, 25%, 0.2)", [0.03125, 0.03125, 0.46875, 0.2],
-"hsla(270, 87.5%, 25%, 0.2)", [0.25, 0.03125, 0.46875, 0.2],
-"hsla(300, 87.5%, 25%, 0.2)", [0.46875, 0.03125, 0.46875, 0.2],
-"hsla(330, 87.5%, 25%, 0.2)", [0.46875, 0.03125, 0.25, 0.2],
-"hsla(0, 100%, 25%, 0.2)", [0.5, 0, 0, 0.2],
-"hsla(30, 100%, 25%, 0.2)", [0.5, 0.25, 0, 0.2],
-"hsla(60, 100%, 25%, 0.2)", [0.5, 0.5, 0, 0.2],
-"hsla(90, 100%, 25%, 0.2)", [0.25, 0.5, 0, 0.2],
-"hsla(120, 100%, 25%, 0.2)", [0, 0.5, 0, 0.2],
-"hsla(150, 100%, 25%, 0.2)", [0, 0.5, 0.25, 0.2],
-"hsla(180, 100%, 25%, 0.2)", [0, 0.5, 0.5, 0.2],
-"hsla(210, 100%, 25%, 0.2)", [0, 0.25, 0.5, 0.2],
-"hsla(240, 100%, 25%, 0.2)", [0, 0, 0.5, 0.2],
-"hsla(270, 100%, 25%, 0.2)", [0.25, 0, 0.5, 0.2],
-"hsla(300, 100%, 25%, 0.2)", [0.5, 0, 0.5, 0.2],
-"hsla(330, 100%, 25%, 0.2)", [0.5, 0, 0.25, 0.2],
-"hsla(0, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(30, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(60, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(90, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(120, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(150, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(180, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(210, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(240, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(270, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(300, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(330, 0%, 37.5%, 0.2)", [0.375, 0.375, 0.375, 0.2],
-"hsla(0, 12.5%, 37.5%, 0.2)", [0.421875, 0.328125, 0.328125, 0.2],
-"hsla(30, 12.5%, 37.5%, 0.2)", [0.421875, 0.375, 0.328125, 0.2],
-"hsla(60, 12.5%, 37.5%, 0.2)", [0.421875, 0.421875, 0.328125, 0.2],
-"hsla(90, 12.5%, 37.5%, 0.2)", [0.375, 0.421875, 0.328125, 0.2],
-"hsla(120, 12.5%, 37.5%, 0.2)", [0.328125, 0.421875, 0.328125, 0.2],
-"hsla(150, 12.5%, 37.5%, 0.2)", [0.328125, 0.421875, 0.375, 0.2],
-"hsla(180, 12.5%, 37.5%, 0.2)", [0.328125, 0.421875, 0.421875, 0.2],
-"hsla(210, 12.5%, 37.5%, 0.2)", [0.328125, 0.375, 0.421875, 0.2],
-"hsla(240, 12.5%, 37.5%, 0.2)", [0.328125, 0.328125, 0.421875, 0.2],
-"hsla(270, 12.5%, 37.5%, 0.2)", [0.375, 0.328125, 0.421875, 0.2],
-"hsla(300, 12.5%, 37.5%, 0.2)", [0.421875, 0.328125, 0.421875, 0.2],
-"hsla(330, 12.5%, 37.5%, 0.2)", [0.421875, 0.328125, 0.375, 0.2],
-"hsla(0, 25%, 37.5%, 0.2)", [0.46875, 0.28125, 0.28125, 0.2],
-"hsla(30, 25%, 37.5%, 0.2)", [0.46875, 0.375, 0.28125, 0.2],
-"hsla(60, 25%, 37.5%, 0.2)", [0.46875, 0.46875, 0.28125, 0.2],
-"hsla(90, 25%, 37.5%, 0.2)", [0.375, 0.46875, 0.28125, 0.2],
-"hsla(120, 25%, 37.5%, 0.2)", [0.28125, 0.46875, 0.28125, 0.2],
-"hsla(150, 25%, 37.5%, 0.2)", [0.28125, 0.46875, 0.375, 0.2],
-"hsla(180, 25%, 37.5%, 0.2)", [0.28125, 0.46875, 0.46875, 0.2],
-"hsla(210, 25%, 37.5%, 0.2)", [0.28125, 0.375, 0.46875, 0.2],
-"hsla(240, 25%, 37.5%, 0.2)", [0.28125, 0.28125, 0.46875, 0.2],
-"hsla(270, 25%, 37.5%, 0.2)", [0.375, 0.28125, 0.46875, 0.2],
-"hsla(300, 25%, 37.5%, 0.2)", [0.46875, 0.28125, 0.46875, 0.2],
-"hsla(330, 25%, 37.5%, 0.2)", [0.46875, 0.28125, 0.375, 0.2],
-"hsla(0, 37.5%, 37.5%, 0.2)", [0.515625, 0.234375, 0.234375, 0.2],
-"hsla(30, 37.5%, 37.5%, 0.2)", [0.515625, 0.375, 0.234375, 0.2],
-"hsla(60, 37.5%, 37.5%, 0.2)", [0.515625, 0.515625, 0.234375, 0.2],
-"hsla(90, 37.5%, 37.5%, 0.2)", [0.375, 0.515625, 0.234375, 0.2],
-"hsla(120, 37.5%, 37.5%, 0.2)", [0.234375, 0.515625, 0.234375, 0.2],
-"hsla(150, 37.5%, 37.5%, 0.2)", [0.234375, 0.515625, 0.375, 0.2],
-"hsla(180, 37.5%, 37.5%, 0.2)", [0.234375, 0.515625, 0.515625, 0.2],
-"hsla(210, 37.5%, 37.5%, 0.2)", [0.234375, 0.375, 0.515625, 0.2],
-"hsla(240, 37.5%, 37.5%, 0.2)", [0.234375, 0.234375, 0.515625, 0.2],
-"hsla(270, 37.5%, 37.5%, 0.2)", [0.375, 0.234375, 0.515625, 0.2],
-"hsla(300, 37.5%, 37.5%, 0.2)", [0.515625, 0.234375, 0.515625, 0.2],
-"hsla(330, 37.5%, 37.5%, 0.2)", [0.515625, 0.234375, 0.375, 0.2],
-"hsla(0, 50%, 37.5%, 0.2)", [0.5625, 0.1875, 0.1875, 0.2],
-"hsla(30, 50%, 37.5%, 0.2)", [0.5625, 0.375, 0.1875, 0.2],
-"hsla(60, 50%, 37.5%, 0.2)", [0.5625, 0.5625, 0.1875, 0.2],
-"hsla(90, 50%, 37.5%, 0.2)", [0.375, 0.5625, 0.1875, 0.2],
-"hsla(120, 50%, 37.5%, 0.2)", [0.1875, 0.5625, 0.1875, 0.2],
-"hsla(150, 50%, 37.5%, 0.2)", [0.1875, 0.5625, 0.375, 0.2],
-"hsla(180, 50%, 37.5%, 0.2)", [0.1875, 0.5625, 0.5625, 0.2],
-"hsla(210, 50%, 37.5%, 0.2)", [0.1875, 0.375, 0.5625, 0.2],
-"hsla(240, 50%, 37.5%, 0.2)", [0.1875, 0.1875, 0.5625, 0.2],
-"hsla(270, 50%, 37.5%, 0.2)", [0.375, 0.1875, 0.5625, 0.2],
-"hsla(300, 50%, 37.5%, 0.2)", [0.5625, 0.1875, 0.5625, 0.2],
-"hsla(330, 50%, 37.5%, 0.2)", [0.5625, 0.1875, 0.375, 0.2],
-"hsla(0, 62.5%, 37.5%, 0.2)", [0.609375, 0.140625, 0.140625, 0.2],
-"hsla(30, 62.5%, 37.5%, 0.2)", [0.609375, 0.375, 0.140625, 0.2],
-"hsla(60, 62.5%, 37.5%, 0.2)", [0.609375, 0.609375, 0.140625, 0.2],
-"hsla(90, 62.5%, 37.5%, 0.2)", [0.375, 0.609375, 0.140625, 0.2],
-"hsla(120, 62.5%, 37.5%, 0.2)", [0.140625, 0.609375, 0.140625, 0.2],
-"hsla(150, 62.5%, 37.5%, 0.2)", [0.140625, 0.609375, 0.375, 0.2],
-"hsla(180, 62.5%, 37.5%, 0.2)", [0.140625, 0.609375, 0.609375, 0.2],
-"hsla(210, 62.5%, 37.5%, 0.2)", [0.140625, 0.375, 0.609375, 0.2],
-"hsla(240, 62.5%, 37.5%, 0.2)", [0.140625, 0.140625, 0.609375, 0.2],
-"hsla(270, 62.5%, 37.5%, 0.2)", [0.375, 0.140625, 0.609375, 0.2],
-"hsla(300, 62.5%, 37.5%, 0.2)", [0.609375, 0.140625, 0.609375, 0.2],
-"hsla(330, 62.5%, 37.5%, 0.2)", [0.609375, 0.140625, 0.375, 0.2],
-"hsla(0, 75%, 37.5%, 0.2)", [0.65625, 0.09375, 0.09375, 0.2],
-"hsla(30, 75%, 37.5%, 0.2)", [0.65625, 0.375, 0.09375, 0.2],
-"hsla(60, 75%, 37.5%, 0.2)", [0.65625, 0.65625, 0.09375, 0.2],
-"hsla(90, 75%, 37.5%, 0.2)", [0.375, 0.65625, 0.09375, 0.2],
-"hsla(120, 75%, 37.5%, 0.2)", [0.09375, 0.65625, 0.09375, 0.2],
-"hsla(150, 75%, 37.5%, 0.2)", [0.09375, 0.65625, 0.375, 0.2],
-"hsla(180, 75%, 37.5%, 0.2)", [0.09375, 0.65625, 0.65625, 0.2],
-"hsla(210, 75%, 37.5%, 0.2)", [0.09375, 0.375, 0.65625, 0.2],
-"hsla(240, 75%, 37.5%, 0.2)", [0.09375, 0.09375, 0.65625, 0.2],
-"hsla(270, 75%, 37.5%, 0.2)", [0.375, 0.09375, 0.65625, 0.2],
-"hsla(300, 75%, 37.5%, 0.2)", [0.65625, 0.09375, 0.65625, 0.2],
-"hsla(330, 75%, 37.5%, 0.2)", [0.65625, 0.09375, 0.375, 0.2],
-"hsla(0, 87.5%, 37.5%, 0.2)", [0.703125, 0.046875, 0.046875, 0.2],
-"hsla(30, 87.5%, 37.5%, 0.2)", [0.703125, 0.375, 0.046875, 0.2],
-"hsla(60, 87.5%, 37.5%, 0.2)", [0.703125, 0.703125, 0.046875, 0.2],
-"hsla(90, 87.5%, 37.5%, 0.2)", [0.375, 0.703125, 0.046875, 0.2],
-"hsla(120, 87.5%, 37.5%, 0.2)", [0.046875, 0.703125, 0.046875, 0.2],
-"hsla(150, 87.5%, 37.5%, 0.2)", [0.046875, 0.703125, 0.375, 0.2],
-"hsla(180, 87.5%, 37.5%, 0.2)", [0.046875, 0.703125, 0.703125, 0.2],
-"hsla(210, 87.5%, 37.5%, 0.2)", [0.046875, 0.375, 0.703125, 0.2],
-"hsla(240, 87.5%, 37.5%, 0.2)", [0.046875, 0.046875, 0.703125, 0.2],
-"hsla(270, 87.5%, 37.5%, 0.2)", [0.375, 0.046875, 0.703125, 0.2],
-"hsla(300, 87.5%, 37.5%, 0.2)", [0.703125, 0.046875, 0.703125, 0.2],
-"hsla(330, 87.5%, 37.5%, 0.2)", [0.703125, 0.046875, 0.375, 0.2],
-"hsla(0, 100%, 37.5%, 0.2)", [0.75, 0, 0, 0.2],
-"hsla(30, 100%, 37.5%, 0.2)", [0.75, 0.375, 0, 0.2],
-"hsla(60, 100%, 37.5%, 0.2)", [0.75, 0.75, 0, 0.2],
-"hsla(90, 100%, 37.5%, 0.2)", [0.375, 0.75, 0, 0.2],
-"hsla(120, 100%, 37.5%, 0.2)", [0, 0.75, 0, 0.2],
-"hsla(150, 100%, 37.5%, 0.2)", [0, 0.75, 0.375, 0.2],
-"hsla(180, 100%, 37.5%, 0.2)", [0, 0.75, 0.75, 0.2],
-"hsla(210, 100%, 37.5%, 0.2)", [0, 0.375, 0.75, 0.2],
-"hsla(240, 100%, 37.5%, 0.2)", [0, 0, 0.75, 0.2],
-"hsla(270, 100%, 37.5%, 0.2)", [0.375, 0, 0.75, 0.2],
-"hsla(300, 100%, 37.5%, 0.2)", [0.75, 0, 0.75, 0.2],
-"hsla(330, 100%, 37.5%, 0.2)", [0.75, 0, 0.375, 0.2],
-"hsla(0, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(30, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(60, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(90, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(120, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(150, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(180, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(210, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(240, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(270, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(300, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(330, 0%, 50%, 0.2)", [0.5, 0.5, 0.5, 0.2],
-"hsla(0, 12.5%, 50%, 0.2)", [0.5625, 0.4375, 0.4375, 0.2],
-"hsla(30, 12.5%, 50%, 0.2)", [0.5625, 0.5, 0.4375, 0.2],
-"hsla(60, 12.5%, 50%, 0.2)", [0.5625, 0.5625, 0.4375, 0.2],
-"hsla(90, 12.5%, 50%, 0.2)", [0.5, 0.5625, 0.4375, 0.2],
-"hsla(120, 12.5%, 50%, 0.2)", [0.4375, 0.5625, 0.4375, 0.2],
-"hsla(150, 12.5%, 50%, 0.2)", [0.4375, 0.5625, 0.5, 0.2],
-"hsla(180, 12.5%, 50%, 0.2)", [0.4375, 0.5625, 0.5625, 0.2],
-"hsla(210, 12.5%, 50%, 0.2)", [0.4375, 0.5, 0.5625, 0.2],
-"hsla(240, 12.5%, 50%, 0.2)", [0.4375, 0.4375, 0.5625, 0.2],
-"hsla(270, 12.5%, 50%, 0.2)", [0.5, 0.4375, 0.5625, 0.2],
-"hsla(300, 12.5%, 50%, 0.2)", [0.5625, 0.4375, 0.5625, 0.2],
-"hsla(330, 12.5%, 50%, 0.2)", [0.5625, 0.4375, 0.5, 0.2],
-"hsla(0, 25%, 50%, 0.2)", [0.625, 0.375, 0.375, 0.2],
-"hsla(30, 25%, 50%, 0.2)", [0.625, 0.5, 0.375, 0.2],
-"hsla(60, 25%, 50%, 0.2)", [0.625, 0.625, 0.375, 0.2],
-"hsla(90, 25%, 50%, 0.2)", [0.5, 0.625, 0.375, 0.2],
-"hsla(120, 25%, 50%, 0.2)", [0.375, 0.625, 0.375, 0.2],
-"hsla(150, 25%, 50%, 0.2)", [0.375, 0.625, 0.5, 0.2],
-"hsla(180, 25%, 50%, 0.2)", [0.375, 0.625, 0.625, 0.2],
-"hsla(210, 25%, 50%, 0.2)", [0.375, 0.5, 0.625, 0.2],
-"hsla(240, 25%, 50%, 0.2)", [0.375, 0.375, 0.625, 0.2],
-"hsla(270, 25%, 50%, 0.2)", [0.5, 0.375, 0.625, 0.2],
-"hsla(300, 25%, 50%, 0.2)", [0.625, 0.375, 0.625, 0.2],
-"hsla(330, 25%, 50%, 0.2)", [0.625, 0.375, 0.5, 0.2],
-"hsla(0, 37.5%, 50%, 0.2)", [0.6875, 0.3125, 0.3125, 0.2],
-"hsla(30, 37.5%, 50%, 0.2)", [0.6875, 0.5, 0.3125, 0.2],
-"hsla(60, 37.5%, 50%, 0.2)", [0.6875, 0.6875, 0.3125, 0.2],
-"hsla(90, 37.5%, 50%, 0.2)", [0.5, 0.6875, 0.3125, 0.2],
-"hsla(120, 37.5%, 50%, 0.2)", [0.3125, 0.6875, 0.3125, 0.2],
-"hsla(150, 37.5%, 50%, 0.2)", [0.3125, 0.6875, 0.5, 0.2],
-"hsla(180, 37.5%, 50%, 0.2)", [0.3125, 0.6875, 0.6875, 0.2],
-"hsla(210, 37.5%, 50%, 0.2)", [0.3125, 0.5, 0.6875, 0.2],
-"hsla(240, 37.5%, 50%, 0.2)", [0.3125, 0.3125, 0.6875, 0.2],
-"hsla(270, 37.5%, 50%, 0.2)", [0.5, 0.3125, 0.6875, 0.2],
-"hsla(300, 37.5%, 50%, 0.2)", [0.6875, 0.3125, 0.6875, 0.2],
-"hsla(330, 37.5%, 50%, 0.2)", [0.6875, 0.3125, 0.5, 0.2]
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_2.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_2.json
deleted file mode 100644
index ad80a75b..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_hsla_2.json
+++ /dev/null
@@ -1,1466 +0,0 @@
-[
-"hsla(0, 50%, 50%, 0.2)", [0.75, 0.25, 0.25, 0.2],
-"hsla(30, 50%, 50%, 0.2)", [0.75, 0.5, 0.25, 0.2],
-"hsla(60, 50%, 50%, 0.2)", [0.75, 0.75, 0.25, 0.2],
-"hsla(90, 50%, 50%, 0.2)", [0.5, 0.75, 0.25, 0.2],
-"hsla(120, 50%, 50%, 0.2)", [0.25, 0.75, 0.25, 0.2],
-"hsla(150, 50%, 50%, 0.2)", [0.25, 0.75, 0.5, 0.2],
-"hsla(180, 50%, 50%, 0.2)", [0.25, 0.75, 0.75, 0.2],
-"hsla(210, 50%, 50%, 0.2)", [0.25, 0.5, 0.75, 0.2],
-"hsla(240, 50%, 50%, 0.2)", [0.25, 0.25, 0.75, 0.2],
-"hsla(270, 50%, 50%, 0.2)", [0.5, 0.25, 0.75, 0.2],
-"hsla(300, 50%, 50%, 0.2)", [0.75, 0.25, 0.75, 0.2],
-"hsla(330, 50%, 50%, 0.2)", [0.75, 0.25, 0.5, 0.2],
-"hsla(0, 62.5%, 50%, 0.2)", [0.8125, 0.1875, 0.1875, 0.2],
-"hsla(30, 62.5%, 50%, 0.2)", [0.8125, 0.5, 0.1875, 0.2],
-"hsla(60, 62.5%, 50%, 0.2)", [0.8125, 0.8125, 0.1875, 0.2],
-"hsla(90, 62.5%, 50%, 0.2)", [0.5, 0.8125, 0.1875, 0.2],
-"hsla(120, 62.5%, 50%, 0.2)", [0.1875, 0.8125, 0.1875, 0.2],
-"hsla(150, 62.5%, 50%, 0.2)", [0.1875, 0.8125, 0.5, 0.2],
-"hsla(180, 62.5%, 50%, 0.2)", [0.1875, 0.8125, 0.8125, 0.2],
-"hsla(210, 62.5%, 50%, 0.2)", [0.1875, 0.5, 0.8125, 0.2],
-"hsla(240, 62.5%, 50%, 0.2)", [0.1875, 0.1875, 0.8125, 0.2],
-"hsla(270, 62.5%, 50%, 0.2)", [0.5, 0.1875, 0.8125, 0.2],
-"hsla(300, 62.5%, 50%, 0.2)", [0.8125, 0.1875, 0.8125, 0.2],
-"hsla(330, 62.5%, 50%, 0.2)", [0.8125, 0.1875, 0.5, 0.2],
-"hsla(0, 75%, 50%, 0.2)", [0.875, 0.125, 0.125, 0.2],
-"hsla(30, 75%, 50%, 0.2)", [0.875, 0.5, 0.125, 0.2],
-"hsla(60, 75%, 50%, 0.2)", [0.875, 0.875, 0.125, 0.2],
-"hsla(90, 75%, 50%, 0.2)", [0.5, 0.875, 0.125, 0.2],
-"hsla(120, 75%, 50%, 0.2)", [0.125, 0.875, 0.125, 0.2],
-"hsla(150, 75%, 50%, 0.2)", [0.125, 0.875, 0.5, 0.2],
-"hsla(180, 75%, 50%, 0.2)", [0.125, 0.875, 0.875, 0.2],
-"hsla(210, 75%, 50%, 0.2)", [0.125, 0.5, 0.875, 0.2],
-"hsla(240, 75%, 50%, 0.2)", [0.125, 0.125, 0.875, 0.2],
-"hsla(270, 75%, 50%, 0.2)", [0.5, 0.125, 0.875, 0.2],
-"hsla(300, 75%, 50%, 0.2)", [0.875, 0.125, 0.875, 0.2],
-"hsla(330, 75%, 50%, 0.2)", [0.875, 0.125, 0.5, 0.2],
-"hsla(0, 87.5%, 50%, 0.2)", [0.9375, 0.0625, 0.0625, 0.2],
-"hsla(30, 87.5%, 50%, 0.2)", [0.9375, 0.5, 0.0625, 0.2],
-"hsla(60, 87.5%, 50%, 0.2)", [0.9375, 0.9375, 0.0625, 0.2],
-"hsla(90, 87.5%, 50%, 0.2)", [0.5, 0.9375, 0.0625, 0.2],
-"hsla(120, 87.5%, 50%, 0.2)", [0.0625, 0.9375, 0.0625, 0.2],
-"hsla(150, 87.5%, 50%, 0.2)", [0.0625, 0.9375, 0.5, 0.2],
-"hsla(180, 87.5%, 50%, 0.2)", [0.0625, 0.9375, 0.9375, 0.2],
-"hsla(210, 87.5%, 50%, 0.2)", [0.0625, 0.5, 0.9375, 0.2],
-"hsla(240, 87.5%, 50%, 0.2)", [0.0625, 0.0625, 0.9375, 0.2],
-"hsla(270, 87.5%, 50%, 0.2)", [0.5, 0.0625, 0.9375, 0.2],
-"hsla(300, 87.5%, 50%, 0.2)", [0.9375, 0.0625, 0.9375, 0.2],
-"hsla(330, 87.5%, 50%, 0.2)", [0.9375, 0.0625, 0.5, 0.2],
-"hsla(0, 100%, 50%, 0.2)", [1, 0, 0, 0.2],
-"hsla(30, 100%, 50%, 0.2)", [1, 0.5, 0, 0.2],
-"hsla(60, 100%, 50%, 0.2)", [1, 1, 0, 0.2],
-"hsla(90, 100%, 50%, 0.2)", [0.5, 1, 0, 0.2],
-"hsla(120, 100%, 50%, 0.2)", [0, 1, 0, 0.2],
-"hsla(150, 100%, 50%, 0.2)", [0, 1, 0.5, 0.2],
-"hsla(180, 100%, 50%, 0.2)", [0, 1, 1, 0.2],
-"hsla(210, 100%, 50%, 0.2)", [0, 0.5, 1, 0.2],
-"hsla(240, 100%, 50%, 0.2)", [0, 0, 1, 0.2],
-"hsla(270, 100%, 50%, 0.2)", [0.5, 0, 1, 0.2],
-"hsla(300, 100%, 50%, 0.2)", [1, 0, 1, 0.2],
-"hsla(330, 100%, 50%, 0.2)", [1, 0, 0.5, 0.2],
-"hsla(0, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(30, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(60, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(90, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(120, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(150, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(180, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(210, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(240, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(270, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(300, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(330, 0%, 62.5%, 0.2)", [0.625, 0.625, 0.625, 0.2],
-"hsla(0, 12.5%, 62.5%, 0.2)", [0.671875, 0.578125, 0.578125, 0.2],
-"hsla(30, 12.5%, 62.5%, 0.2)", [0.671875, 0.625, 0.578125, 0.2],
-"hsla(60, 12.5%, 62.5%, 0.2)", [0.671875, 0.671875, 0.578125, 0.2],
-"hsla(90, 12.5%, 62.5%, 0.2)", [0.625, 0.671875, 0.578125, 0.2],
-"hsla(120, 12.5%, 62.5%, 0.2)", [0.578125, 0.671875, 0.578125, 0.2],
-"hsla(150, 12.5%, 62.5%, 0.2)", [0.578125, 0.671875, 0.625, 0.2],
-"hsla(180, 12.5%, 62.5%, 0.2)", [0.578125, 0.671875, 0.671875, 0.2],
-"hsla(210, 12.5%, 62.5%, 0.2)", [0.578125, 0.625, 0.671875, 0.2],
-"hsla(240, 12.5%, 62.5%, 0.2)", [0.578125, 0.578125, 0.671875, 0.2],
-"hsla(270, 12.5%, 62.5%, 0.2)", [0.625, 0.578125, 0.671875, 0.2],
-"hsla(300, 12.5%, 62.5%, 0.2)", [0.671875, 0.578125, 0.671875, 0.2],
-"hsla(330, 12.5%, 62.5%, 0.2)", [0.671875, 0.578125, 0.625, 0.2],
-"hsla(0, 25%, 62.5%, 0.2)", [0.71875, 0.53125, 0.53125, 0.2],
-"hsla(30, 25%, 62.5%, 0.2)", [0.71875, 0.625, 0.53125, 0.2],
-"hsla(60, 25%, 62.5%, 0.2)", [0.71875, 0.71875, 0.53125, 0.2],
-"hsla(90, 25%, 62.5%, 0.2)", [0.625, 0.71875, 0.53125, 0.2],
-"hsla(120, 25%, 62.5%, 0.2)", [0.53125, 0.71875, 0.53125, 0.2],
-"hsla(150, 25%, 62.5%, 0.2)", [0.53125, 0.71875, 0.625, 0.2],
-"hsla(180, 25%, 62.5%, 0.2)", [0.53125, 0.71875, 0.71875, 0.2],
-"hsla(210, 25%, 62.5%, 0.2)", [0.53125, 0.625, 0.71875, 0.2],
-"hsla(240, 25%, 62.5%, 0.2)", [0.53125, 0.53125, 0.71875, 0.2],
-"hsla(270, 25%, 62.5%, 0.2)", [0.625, 0.53125, 0.71875, 0.2],
-"hsla(300, 25%, 62.5%, 0.2)", [0.71875, 0.53125, 0.71875, 0.2],
-"hsla(330, 25%, 62.5%, 0.2)", [0.71875, 0.53125, 0.625, 0.2],
-"hsla(0, 37.5%, 62.5%, 0.2)", [0.765625, 0.484375, 0.484375, 0.2],
-"hsla(30, 37.5%, 62.5%, 0.2)", [0.765625, 0.625, 0.484375, 0.2],
-"hsla(60, 37.5%, 62.5%, 0.2)", [0.765625, 0.765625, 0.484375, 0.2],
-"hsla(90, 37.5%, 62.5%, 0.2)", [0.625, 0.765625, 0.484375, 0.2],
-"hsla(120, 37.5%, 62.5%, 0.2)", [0.484375, 0.765625, 0.484375, 0.2],
-"hsla(150, 37.5%, 62.5%, 0.2)", [0.484375, 0.765625, 0.625, 0.2],
-"hsla(180, 37.5%, 62.5%, 0.2)", [0.484375, 0.765625, 0.765625, 0.2],
-"hsla(210, 37.5%, 62.5%, 0.2)", [0.484375, 0.625, 0.765625, 0.2],
-"hsla(240, 37.5%, 62.5%, 0.2)", [0.484375, 0.484375, 0.765625, 0.2],
-"hsla(270, 37.5%, 62.5%, 0.2)", [0.625, 0.484375, 0.765625, 0.2],
-"hsla(300, 37.5%, 62.5%, 0.2)", [0.765625, 0.484375, 0.765625, 0.2],
-"hsla(330, 37.5%, 62.5%, 0.2)", [0.765625, 0.484375, 0.625, 0.2],
-"hsla(0, 50%, 62.5%, 0.2)", [0.8125, 0.4375, 0.4375, 0.2],
-"hsla(30, 50%, 62.5%, 0.2)", [0.8125, 0.625, 0.4375, 0.2],
-"hsla(60, 50%, 62.5%, 0.2)", [0.8125, 0.8125, 0.4375, 0.2],
-"hsla(90, 50%, 62.5%, 0.2)", [0.625, 0.8125, 0.4375, 0.2],
-"hsla(120, 50%, 62.5%, 0.2)", [0.4375, 0.8125, 0.4375, 0.2],
-"hsla(150, 50%, 62.5%, 0.2)", [0.4375, 0.8125, 0.625, 0.2],
-"hsla(180, 50%, 62.5%, 0.2)", [0.4375, 0.8125, 0.8125, 0.2],
-"hsla(210, 50%, 62.5%, 0.2)", [0.4375, 0.625, 0.8125, 0.2],
-"hsla(240, 50%, 62.5%, 0.2)", [0.4375, 0.4375, 0.8125, 0.2],
-"hsla(270, 50%, 62.5%, 0.2)", [0.625, 0.4375, 0.8125, 0.2],
-"hsla(300, 50%, 62.5%, 0.2)", [0.8125, 0.4375, 0.8125, 0.2],
-"hsla(330, 50%, 62.5%, 0.2)", [0.8125, 0.4375, 0.625, 0.2],
-"hsla(0, 62.5%, 62.5%, 0.2)", [0.859375, 0.390625, 0.390625, 0.2],
-"hsla(30, 62.5%, 62.5%, 0.2)", [0.859375, 0.625, 0.390625, 0.2],
-"hsla(60, 62.5%, 62.5%, 0.2)", [0.859375, 0.859375, 0.390625, 0.2],
-"hsla(90, 62.5%, 62.5%, 0.2)", [0.625, 0.859375, 0.390625, 0.2],
-"hsla(120, 62.5%, 62.5%, 0.2)", [0.390625, 0.859375, 0.390625, 0.2],
-"hsla(150, 62.5%, 62.5%, 0.2)", [0.390625, 0.859375, 0.625, 0.2],
-"hsla(180, 62.5%, 62.5%, 0.2)", [0.390625, 0.859375, 0.859375, 0.2],
-"hsla(210, 62.5%, 62.5%, 0.2)", [0.390625, 0.625, 0.859375, 0.2],
-"hsla(240, 62.5%, 62.5%, 0.2)", [0.390625, 0.390625, 0.859375, 0.2],
-"hsla(270, 62.5%, 62.5%, 0.2)", [0.625, 0.390625, 0.859375, 0.2],
-"hsla(300, 62.5%, 62.5%, 0.2)", [0.859375, 0.390625, 0.859375, 0.2],
-"hsla(330, 62.5%, 62.5%, 0.2)", [0.859375, 0.390625, 0.625, 0.2],
-"hsla(0, 75%, 62.5%, 0.2)", [0.90625, 0.34375, 0.34375, 0.2],
-"hsla(30, 75%, 62.5%, 0.2)", [0.90625, 0.625, 0.34375, 0.2],
-"hsla(60, 75%, 62.5%, 0.2)", [0.90625, 0.90625, 0.34375, 0.2],
-"hsla(90, 75%, 62.5%, 0.2)", [0.625, 0.90625, 0.34375, 0.2],
-"hsla(120, 75%, 62.5%, 0.2)", [0.34375, 0.90625, 0.34375, 0.2],
-"hsla(150, 75%, 62.5%, 0.2)", [0.34375, 0.90625, 0.625, 0.2],
-"hsla(180, 75%, 62.5%, 0.2)", [0.34375, 0.90625, 0.90625, 0.2],
-"hsla(210, 75%, 62.5%, 0.2)", [0.34375, 0.625, 0.90625, 0.2],
-"hsla(240, 75%, 62.5%, 0.2)", [0.34375, 0.34375, 0.90625, 0.2],
-"hsla(270, 75%, 62.5%, 0.2)", [0.625, 0.34375, 0.90625, 0.2],
-"hsla(300, 75%, 62.5%, 0.2)", [0.90625, 0.34375, 0.90625, 0.2],
-"hsla(330, 75%, 62.5%, 0.2)", [0.90625, 0.34375, 0.625, 0.2],
-"hsla(0, 87.5%, 62.5%, 0.2)", [0.953125, 0.296875, 0.296875, 0.2],
-"hsla(30, 87.5%, 62.5%, 0.2)", [0.953125, 0.625, 0.296875, 0.2],
-"hsla(60, 87.5%, 62.5%, 0.2)", [0.953125, 0.953125, 0.296875, 0.2],
-"hsla(90, 87.5%, 62.5%, 0.2)", [0.625, 0.953125, 0.296875, 0.2],
-"hsla(120, 87.5%, 62.5%, 0.2)", [0.296875, 0.953125, 0.296875, 0.2],
-"hsla(150, 87.5%, 62.5%, 0.2)", [0.296875, 0.953125, 0.625, 0.2],
-"hsla(180, 87.5%, 62.5%, 0.2)", [0.296875, 0.953125, 0.953125, 0.2],
-"hsla(210, 87.5%, 62.5%, 0.2)", [0.296875, 0.625, 0.953125, 0.2],
-"hsla(240, 87.5%, 62.5%, 0.2)", [0.296875, 0.296875, 0.953125, 0.2],
-"hsla(270, 87.5%, 62.5%, 0.2)", [0.625, 0.296875, 0.953125, 0.2],
-"hsla(300, 87.5%, 62.5%, 0.2)", [0.953125, 0.296875, 0.953125, 0.2],
-"hsla(330, 87.5%, 62.5%, 0.2)", [0.953125, 0.296875, 0.625, 0.2],
-"hsla(0, 100%, 62.5%, 0.2)", [1, 0.25, 0.25, 0.2],
-"hsla(30, 100%, 62.5%, 0.2)", [1, 0.625, 0.25, 0.2],
-"hsla(60, 100%, 62.5%, 0.2)", [1, 1, 0.25, 0.2],
-"hsla(90, 100%, 62.5%, 0.2)", [0.625, 1, 0.25, 0.2],
-"hsla(120, 100%, 62.5%, 0.2)", [0.25, 1, 0.25, 0.2],
-"hsla(150, 100%, 62.5%, 0.2)", [0.25, 1, 0.625, 0.2],
-"hsla(180, 100%, 62.5%, 0.2)", [0.25, 1, 1, 0.2],
-"hsla(210, 100%, 62.5%, 0.2)", [0.25, 0.625, 1, 0.2],
-"hsla(240, 100%, 62.5%, 0.2)", [0.25, 0.25, 1, 0.2],
-"hsla(270, 100%, 62.5%, 0.2)", [0.625, 0.25, 1, 0.2],
-"hsla(300, 100%, 62.5%, 0.2)", [1, 0.25, 1, 0.2],
-"hsla(330, 100%, 62.5%, 0.2)", [1, 0.25, 0.625, 0.2],
-"hsla(0, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(30, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(60, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(90, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(120, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(150, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(180, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(210, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(240, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(270, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(300, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(330, 0%, 75%, 0.2)", [0.75, 0.75, 0.75, 0.2],
-"hsla(0, 12.5%, 75%, 0.2)", [0.78125, 0.71875, 0.71875, 0.2],
-"hsla(30, 12.5%, 75%, 0.2)", [0.78125, 0.75, 0.71875, 0.2],
-"hsla(60, 12.5%, 75%, 0.2)", [0.78125, 0.78125, 0.71875, 0.2],
-"hsla(90, 12.5%, 75%, 0.2)", [0.75, 0.78125, 0.71875, 0.2],
-"hsla(120, 12.5%, 75%, 0.2)", [0.71875, 0.78125, 0.71875, 0.2],
-"hsla(150, 12.5%, 75%, 0.2)", [0.71875, 0.78125, 0.75, 0.2],
-"hsla(180, 12.5%, 75%, 0.2)", [0.71875, 0.78125, 0.78125, 0.2],
-"hsla(210, 12.5%, 75%, 0.2)", [0.71875, 0.75, 0.78125, 0.2],
-"hsla(240, 12.5%, 75%, 0.2)", [0.71875, 0.71875, 0.78125, 0.2],
-"hsla(270, 12.5%, 75%, 0.2)", [0.75, 0.71875, 0.78125, 0.2],
-"hsla(300, 12.5%, 75%, 0.2)", [0.78125, 0.71875, 0.78125, 0.2],
-"hsla(330, 12.5%, 75%, 0.2)", [0.78125, 0.71875, 0.75, 0.2],
-"hsla(0, 25%, 75%, 0.2)", [0.8125, 0.6875, 0.6875, 0.2],
-"hsla(30, 25%, 75%, 0.2)", [0.8125, 0.75, 0.6875, 0.2],
-"hsla(60, 25%, 75%, 0.2)", [0.8125, 0.8125, 0.6875, 0.2],
-"hsla(90, 25%, 75%, 0.2)", [0.75, 0.8125, 0.6875, 0.2],
-"hsla(120, 25%, 75%, 0.2)", [0.6875, 0.8125, 0.6875, 0.2],
-"hsla(150, 25%, 75%, 0.2)", [0.6875, 0.8125, 0.75, 0.2],
-"hsla(180, 25%, 75%, 0.2)", [0.6875, 0.8125, 0.8125, 0.2],
-"hsla(210, 25%, 75%, 0.2)", [0.6875, 0.75, 0.8125, 0.2],
-"hsla(240, 25%, 75%, 0.2)", [0.6875, 0.6875, 0.8125, 0.2],
-"hsla(270, 25%, 75%, 0.2)", [0.75, 0.6875, 0.8125, 0.2],
-"hsla(300, 25%, 75%, 0.2)", [0.8125, 0.6875, 0.8125, 0.2],
-"hsla(330, 25%, 75%, 0.2)", [0.8125, 0.6875, 0.75, 0.2],
-"hsla(0, 37.5%, 75%, 0.2)", [0.84375, 0.65625, 0.65625, 0.2],
-"hsla(30, 37.5%, 75%, 0.2)", [0.84375, 0.75, 0.65625, 0.2],
-"hsla(60, 37.5%, 75%, 0.2)", [0.84375, 0.84375, 0.65625, 0.2],
-"hsla(90, 37.5%, 75%, 0.2)", [0.75, 0.84375, 0.65625, 0.2],
-"hsla(120, 37.5%, 75%, 0.2)", [0.65625, 0.84375, 0.65625, 0.2],
-"hsla(150, 37.5%, 75%, 0.2)", [0.65625, 0.84375, 0.75, 0.2],
-"hsla(180, 37.5%, 75%, 0.2)", [0.65625, 0.84375, 0.84375, 0.2],
-"hsla(210, 37.5%, 75%, 0.2)", [0.65625, 0.75, 0.84375, 0.2],
-"hsla(240, 37.5%, 75%, 0.2)", [0.65625, 0.65625, 0.84375, 0.2],
-"hsla(270, 37.5%, 75%, 0.2)", [0.75, 0.65625, 0.84375, 0.2],
-"hsla(300, 37.5%, 75%, 0.2)", [0.84375, 0.65625, 0.84375, 0.2],
-"hsla(330, 37.5%, 75%, 0.2)", [0.84375, 0.65625, 0.75, 0.2],
-"hsla(0, 50%, 75%, 0.2)", [0.875, 0.625, 0.625, 0.2],
-"hsla(30, 50%, 75%, 0.2)", [0.875, 0.75, 0.625, 0.2],
-"hsla(60, 50%, 75%, 0.2)", [0.875, 0.875, 0.625, 0.2],
-"hsla(90, 50%, 75%, 0.2)", [0.75, 0.875, 0.625, 0.2],
-"hsla(120, 50%, 75%, 0.2)", [0.625, 0.875, 0.625, 0.2],
-"hsla(150, 50%, 75%, 0.2)", [0.625, 0.875, 0.75, 0.2],
-"hsla(180, 50%, 75%, 0.2)", [0.625, 0.875, 0.875, 0.2],
-"hsla(210, 50%, 75%, 0.2)", [0.625, 0.75, 0.875, 0.2],
-"hsla(240, 50%, 75%, 0.2)", [0.625, 0.625, 0.875, 0.2],
-"hsla(270, 50%, 75%, 0.2)", [0.75, 0.625, 0.875, 0.2],
-"hsla(300, 50%, 75%, 0.2)", [0.875, 0.625, 0.875, 0.2],
-"hsla(330, 50%, 75%, 0.2)", [0.875, 0.625, 0.75, 0.2],
-"hsla(0, 62.5%, 75%, 0.2)", [0.90625, 0.59375, 0.59375, 0.2],
-"hsla(30, 62.5%, 75%, 0.2)", [0.90625, 0.75, 0.59375, 0.2],
-"hsla(60, 62.5%, 75%, 0.2)", [0.90625, 0.90625, 0.59375, 0.2],
-"hsla(90, 62.5%, 75%, 0.2)", [0.75, 0.90625, 0.59375, 0.2],
-"hsla(120, 62.5%, 75%, 0.2)", [0.59375, 0.90625, 0.59375, 0.2],
-"hsla(150, 62.5%, 75%, 0.2)", [0.59375, 0.90625, 0.75, 0.2],
-"hsla(180, 62.5%, 75%, 0.2)", [0.59375, 0.90625, 0.90625, 0.2],
-"hsla(210, 62.5%, 75%, 0.2)", [0.59375, 0.75, 0.90625, 0.2],
-"hsla(240, 62.5%, 75%, 0.2)", [0.59375, 0.59375, 0.90625, 0.2],
-"hsla(270, 62.5%, 75%, 0.2)", [0.75, 0.59375, 0.90625, 0.2],
-"hsla(300, 62.5%, 75%, 0.2)", [0.90625, 0.59375, 0.90625, 0.2],
-"hsla(330, 62.5%, 75%, 0.2)", [0.90625, 0.59375, 0.75, 0.2],
-"hsla(0, 75%, 75%, 0.2)", [0.9375, 0.5625, 0.5625, 0.2],
-"hsla(30, 75%, 75%, 0.2)", [0.9375, 0.75, 0.5625, 0.2],
-"hsla(60, 75%, 75%, 0.2)", [0.9375, 0.9375, 0.5625, 0.2],
-"hsla(90, 75%, 75%, 0.2)", [0.75, 0.9375, 0.5625, 0.2],
-"hsla(120, 75%, 75%, 0.2)", [0.5625, 0.9375, 0.5625, 0.2],
-"hsla(150, 75%, 75%, 0.2)", [0.5625, 0.9375, 0.75, 0.2],
-"hsla(180, 75%, 75%, 0.2)", [0.5625, 0.9375, 0.9375, 0.2],
-"hsla(210, 75%, 75%, 0.2)", [0.5625, 0.75, 0.9375, 0.2],
-"hsla(240, 75%, 75%, 0.2)", [0.5625, 0.5625, 0.9375, 0.2],
-"hsla(270, 75%, 75%, 0.2)", [0.75, 0.5625, 0.9375, 0.2],
-"hsla(300, 75%, 75%, 0.2)", [0.9375, 0.5625, 0.9375, 0.2],
-"hsla(330, 75%, 75%, 0.2)", [0.9375, 0.5625, 0.75, 0.2],
-"hsla(0, 87.5%, 75%, 0.2)", [0.96875, 0.53125, 0.53125, 0.2],
-"hsla(30, 87.5%, 75%, 0.2)", [0.96875, 0.75, 0.53125, 0.2],
-"hsla(60, 87.5%, 75%, 0.2)", [0.96875, 0.96875, 0.53125, 0.2],
-"hsla(90, 87.5%, 75%, 0.2)", [0.75, 0.96875, 0.53125, 0.2],
-"hsla(120, 87.5%, 75%, 0.2)", [0.53125, 0.96875, 0.53125, 0.2],
-"hsla(150, 87.5%, 75%, 0.2)", [0.53125, 0.96875, 0.75, 0.2],
-"hsla(180, 87.5%, 75%, 0.2)", [0.53125, 0.96875, 0.96875, 0.2],
-"hsla(210, 87.5%, 75%, 0.2)", [0.53125, 0.75, 0.96875, 0.2],
-"hsla(240, 87.5%, 75%, 0.2)", [0.53125, 0.53125, 0.96875, 0.2],
-"hsla(270, 87.5%, 75%, 0.2)", [0.75, 0.53125, 0.96875, 0.2],
-"hsla(300, 87.5%, 75%, 0.2)", [0.96875, 0.53125, 0.96875, 0.2],
-"hsla(330, 87.5%, 75%, 0.2)", [0.96875, 0.53125, 0.75, 0.2],
-"hsla(0, 100%, 75%, 0.2)", [1, 0.5, 0.5, 0.2],
-"hsla(30, 100%, 75%, 0.2)", [1, 0.75, 0.5, 0.2],
-"hsla(60, 100%, 75%, 0.2)", [1, 1, 0.5, 0.2],
-"hsla(90, 100%, 75%, 0.2)", [0.75, 1, 0.5, 0.2],
-"hsla(120, 100%, 75%, 0.2)", [0.5, 1, 0.5, 0.2],
-"hsla(150, 100%, 75%, 0.2)", [0.5, 1, 0.75, 0.2],
-"hsla(180, 100%, 75%, 0.2)", [0.5, 1, 1, 0.2],
-"hsla(210, 100%, 75%, 0.2)", [0.5, 0.75, 1, 0.2],
-"hsla(240, 100%, 75%, 0.2)", [0.5, 0.5, 1, 0.2],
-"hsla(270, 100%, 75%, 0.2)", [0.75, 0.5, 1, 0.2],
-"hsla(300, 100%, 75%, 0.2)", [1, 0.5, 1, 0.2],
-"hsla(330, 100%, 75%, 0.2)", [1, 0.5, 0.75, 0.2],
-"hsla(0, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(30, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(60, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(90, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(120, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(150, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(180, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(210, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(240, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(270, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(300, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(330, 0%, 87.5%, 0.2)", [0.875, 0.875, 0.875, 0.2],
-"hsla(0, 12.5%, 87.5%, 0.2)", [0.890625, 0.859375, 0.859375, 0.2],
-"hsla(30, 12.5%, 87.5%, 0.2)", [0.890625, 0.875, 0.859375, 0.2],
-"hsla(60, 12.5%, 87.5%, 0.2)", [0.890625, 0.890625, 0.859375, 0.2],
-"hsla(90, 12.5%, 87.5%, 0.2)", [0.875, 0.890625, 0.859375, 0.2],
-"hsla(120, 12.5%, 87.5%, 0.2)", [0.859375, 0.890625, 0.859375, 0.2],
-"hsla(150, 12.5%, 87.5%, 0.2)", [0.859375, 0.890625, 0.875, 0.2],
-"hsla(180, 12.5%, 87.5%, 0.2)", [0.859375, 0.890625, 0.890625, 0.2],
-"hsla(210, 12.5%, 87.5%, 0.2)", [0.859375, 0.875, 0.890625, 0.2],
-"hsla(240, 12.5%, 87.5%, 0.2)", [0.859375, 0.859375, 0.890625, 0.2],
-"hsla(270, 12.5%, 87.5%, 0.2)", [0.875, 0.859375, 0.890625, 0.2],
-"hsla(300, 12.5%, 87.5%, 0.2)", [0.890625, 0.859375, 0.890625, 0.2],
-"hsla(330, 12.5%, 87.5%, 0.2)", [0.890625, 0.859375, 0.875, 0.2],
-"hsla(0, 25%, 87.5%, 0.2)", [0.90625, 0.84375, 0.84375, 0.2],
-"hsla(30, 25%, 87.5%, 0.2)", [0.90625, 0.875, 0.84375, 0.2],
-"hsla(60, 25%, 87.5%, 0.2)", [0.90625, 0.90625, 0.84375, 0.2],
-"hsla(90, 25%, 87.5%, 0.2)", [0.875, 0.90625, 0.84375, 0.2],
-"hsla(120, 25%, 87.5%, 0.2)", [0.84375, 0.90625, 0.84375, 0.2],
-"hsla(150, 25%, 87.5%, 0.2)", [0.84375, 0.90625, 0.875, 0.2],
-"hsla(180, 25%, 87.5%, 0.2)", [0.84375, 0.90625, 0.90625, 0.2],
-"hsla(210, 25%, 87.5%, 0.2)", [0.84375, 0.875, 0.90625, 0.2],
-"hsla(240, 25%, 87.5%, 0.2)", [0.84375, 0.84375, 0.90625, 0.2],
-"hsla(270, 25%, 87.5%, 0.2)", [0.875, 0.84375, 0.90625, 0.2],
-"hsla(300, 25%, 87.5%, 0.2)", [0.90625, 0.84375, 0.90625, 0.2],
-"hsla(330, 25%, 87.5%, 0.2)", [0.90625, 0.84375, 0.875, 0.2],
-"hsla(0, 37.5%, 87.5%, 0.2)", [0.921875, 0.828125, 0.828125, 0.2],
-"hsla(30, 37.5%, 87.5%, 0.2)", [0.921875, 0.875, 0.828125, 0.2],
-"hsla(60, 37.5%, 87.5%, 0.2)", [0.921875, 0.921875, 0.828125, 0.2],
-"hsla(90, 37.5%, 87.5%, 0.2)", [0.875, 0.921875, 0.828125, 0.2],
-"hsla(120, 37.5%, 87.5%, 0.2)", [0.828125, 0.921875, 0.828125, 0.2],
-"hsla(150, 37.5%, 87.5%, 0.2)", [0.828125, 0.921875, 0.875, 0.2],
-"hsla(180, 37.5%, 87.5%, 0.2)", [0.828125, 0.921875, 0.921875, 0.2],
-"hsla(210, 37.5%, 87.5%, 0.2)", [0.828125, 0.875, 0.921875, 0.2],
-"hsla(240, 37.5%, 87.5%, 0.2)", [0.828125, 0.828125, 0.921875, 0.2],
-"hsla(270, 37.5%, 87.5%, 0.2)", [0.875, 0.828125, 0.921875, 0.2],
-"hsla(300, 37.5%, 87.5%, 0.2)", [0.921875, 0.828125, 0.921875, 0.2],
-"hsla(330, 37.5%, 87.5%, 0.2)", [0.921875, 0.828125, 0.875, 0.2],
-"hsla(0, 50%, 87.5%, 0.2)", [0.9375, 0.8125, 0.8125, 0.2],
-"hsla(30, 50%, 87.5%, 0.2)", [0.9375, 0.875, 0.8125, 0.2],
-"hsla(60, 50%, 87.5%, 0.2)", [0.9375, 0.9375, 0.8125, 0.2],
-"hsla(90, 50%, 87.5%, 0.2)", [0.875, 0.9375, 0.8125, 0.2],
-"hsla(120, 50%, 87.5%, 0.2)", [0.8125, 0.9375, 0.8125, 0.2],
-"hsla(150, 50%, 87.5%, 0.2)", [0.8125, 0.9375, 0.875, 0.2],
-"hsla(180, 50%, 87.5%, 0.2)", [0.8125, 0.9375, 0.9375, 0.2],
-"hsla(210, 50%, 87.5%, 0.2)", [0.8125, 0.875, 0.9375, 0.2],
-"hsla(240, 50%, 87.5%, 0.2)", [0.8125, 0.8125, 0.9375, 0.2],
-"hsla(270, 50%, 87.5%, 0.2)", [0.875, 0.8125, 0.9375, 0.2],
-"hsla(300, 50%, 87.5%, 0.2)", [0.9375, 0.8125, 0.9375, 0.2],
-"hsla(330, 50%, 87.5%, 0.2)", [0.9375, 0.8125, 0.875, 0.2],
-"hsla(0, 62.5%, 87.5%, 0.2)", [0.953125, 0.796875, 0.796875, 0.2],
-"hsla(30, 62.5%, 87.5%, 0.2)", [0.953125, 0.875, 0.796875, 0.2],
-"hsla(60, 62.5%, 87.5%, 0.2)", [0.953125, 0.953125, 0.796875, 0.2],
-"hsla(90, 62.5%, 87.5%, 0.2)", [0.875, 0.953125, 0.796875, 0.2],
-"hsla(120, 62.5%, 87.5%, 0.2)", [0.796875, 0.953125, 0.796875, 0.2],
-"hsla(150, 62.5%, 87.5%, 0.2)", [0.796875, 0.953125, 0.875, 0.2],
-"hsla(180, 62.5%, 87.5%, 0.2)", [0.796875, 0.953125, 0.953125, 0.2],
-"hsla(210, 62.5%, 87.5%, 0.2)", [0.796875, 0.875, 0.953125, 0.2],
-"hsla(240, 62.5%, 87.5%, 0.2)", [0.796875, 0.796875, 0.953125, 0.2],
-"hsla(270, 62.5%, 87.5%, 0.2)", [0.875, 0.796875, 0.953125, 0.2],
-"hsla(300, 62.5%, 87.5%, 0.2)", [0.953125, 0.796875, 0.953125, 0.2],
-"hsla(330, 62.5%, 87.5%, 0.2)", [0.953125, 0.796875, 0.875, 0.2],
-"hsla(0, 75%, 87.5%, 0.2)", [0.96875, 0.78125, 0.78125, 0.2],
-"hsla(30, 75%, 87.5%, 0.2)", [0.96875, 0.875, 0.78125, 0.2],
-"hsla(60, 75%, 87.5%, 0.2)", [0.96875, 0.96875, 0.78125, 0.2],
-"hsla(90, 75%, 87.5%, 0.2)", [0.875, 0.96875, 0.78125, 0.2],
-"hsla(120, 75%, 87.5%, 0.2)", [0.78125, 0.96875, 0.78125, 0.2],
-"hsla(150, 75%, 87.5%, 0.2)", [0.78125, 0.96875, 0.875, 0.2],
-"hsla(180, 75%, 87.5%, 0.2)", [0.78125, 0.96875, 0.96875, 0.2],
-"hsla(210, 75%, 87.5%, 0.2)", [0.78125, 0.875, 0.96875, 0.2],
-"hsla(240, 75%, 87.5%, 0.2)", [0.78125, 0.78125, 0.96875, 0.2],
-"hsla(270, 75%, 87.5%, 0.2)", [0.875, 0.78125, 0.96875, 0.2],
-"hsla(300, 75%, 87.5%, 0.2)", [0.96875, 0.78125, 0.96875, 0.2],
-"hsla(330, 75%, 87.5%, 0.2)", [0.96875, 0.78125, 0.875, 0.2],
-"hsla(0, 87.5%, 87.5%, 0.2)", [0.984375, 0.765625, 0.765625, 0.2],
-"hsla(30, 87.5%, 87.5%, 0.2)", [0.984375, 0.875, 0.765625, 0.2],
-"hsla(60, 87.5%, 87.5%, 0.2)", [0.984375, 0.984375, 0.765625, 0.2],
-"hsla(90, 87.5%, 87.5%, 0.2)", [0.875, 0.984375, 0.765625, 0.2],
-"hsla(120, 87.5%, 87.5%, 0.2)", [0.765625, 0.984375, 0.765625, 0.2],
-"hsla(150, 87.5%, 87.5%, 0.2)", [0.765625, 0.984375, 0.875, 0.2],
-"hsla(180, 87.5%, 87.5%, 0.2)", [0.765625, 0.984375, 0.984375, 0.2],
-"hsla(210, 87.5%, 87.5%, 0.2)", [0.765625, 0.875, 0.984375, 0.2],
-"hsla(240, 87.5%, 87.5%, 0.2)", [0.765625, 0.765625, 0.984375, 0.2],
-"hsla(270, 87.5%, 87.5%, 0.2)", [0.875, 0.765625, 0.984375, 0.2],
-"hsla(300, 87.5%, 87.5%, 0.2)", [0.984375, 0.765625, 0.984375, 0.2],
-"hsla(330, 87.5%, 87.5%, 0.2)", [0.984375, 0.765625, 0.875, 0.2],
-"hsla(0, 100%, 87.5%, 0.2)", [1, 0.75, 0.75, 0.2],
-"hsla(30, 100%, 87.5%, 0.2)", [1, 0.875, 0.75, 0.2],
-"hsla(60, 100%, 87.5%, 0.2)", [1, 1, 0.75, 0.2],
-"hsla(90, 100%, 87.5%, 0.2)", [0.875, 1, 0.75, 0.2],
-"hsla(120, 100%, 87.5%, 0.2)", [0.75, 1, 0.75, 0.2],
-"hsla(150, 100%, 87.5%, 0.2)", [0.75, 1, 0.875, 0.2],
-"hsla(180, 100%, 87.5%, 0.2)", [0.75, 1, 1, 0.2],
-"hsla(210, 100%, 87.5%, 0.2)", [0.75, 0.875, 1, 0.2],
-"hsla(240, 100%, 87.5%, 0.2)", [0.75, 0.75, 1, 0.2],
-"hsla(270, 100%, 87.5%, 0.2)", [0.875, 0.75, 1, 0.2],
-"hsla(300, 100%, 87.5%, 0.2)", [1, 0.75, 1, 0.2],
-"hsla(330, 100%, 87.5%, 0.2)", [1, 0.75, 0.875, 0.2],
-"hsla(0, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 0%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 12.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 25%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 37.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 50%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 62.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 75%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 87.5%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(30, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(60, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(90, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(120, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(150, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(180, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(210, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(240, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(270, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(300, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(330, 100%, 100%, 0.2)", [1, 1, 1, 0.2],
-"hsla(0, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 0%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 12.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 25%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 37.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 50%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 62.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 75%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 87.5%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(30, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(60, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(90, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(120, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(150, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(180, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(210, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(240, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(270, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(300, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(330, 100%, 0%, 0)", [0, 0, 0, 0],
-"hsla(0, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(30, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(60, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(90, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(120, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(150, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(180, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(210, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(240, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(270, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(300, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(330, 0%, 12.5%, 0)", [0.125, 0.125, 0.125, 0],
-"hsla(0, 12.5%, 12.5%, 0)", [0.140625, 0.109375, 0.109375, 0],
-"hsla(30, 12.5%, 12.5%, 0)", [0.140625, 0.125, 0.109375, 0],
-"hsla(60, 12.5%, 12.5%, 0)", [0.140625, 0.140625, 0.109375, 0],
-"hsla(90, 12.5%, 12.5%, 0)", [0.125, 0.140625, 0.109375, 0],
-"hsla(120, 12.5%, 12.5%, 0)", [0.109375, 0.140625, 0.109375, 0],
-"hsla(150, 12.5%, 12.5%, 0)", [0.109375, 0.140625, 0.125, 0],
-"hsla(180, 12.5%, 12.5%, 0)", [0.109375, 0.140625, 0.140625, 0],
-"hsla(210, 12.5%, 12.5%, 0)", [0.109375, 0.125, 0.140625, 0],
-"hsla(240, 12.5%, 12.5%, 0)", [0.109375, 0.109375, 0.140625, 0],
-"hsla(270, 12.5%, 12.5%, 0)", [0.125, 0.109375, 0.140625, 0],
-"hsla(300, 12.5%, 12.5%, 0)", [0.140625, 0.109375, 0.140625, 0],
-"hsla(330, 12.5%, 12.5%, 0)", [0.140625, 0.109375, 0.125, 0],
-"hsla(0, 25%, 12.5%, 0)", [0.15625, 0.09375, 0.09375, 0],
-"hsla(30, 25%, 12.5%, 0)", [0.15625, 0.125, 0.09375, 0],
-"hsla(60, 25%, 12.5%, 0)", [0.15625, 0.15625, 0.09375, 0],
-"hsla(90, 25%, 12.5%, 0)", [0.125, 0.15625, 0.09375, 0],
-"hsla(120, 25%, 12.5%, 0)", [0.09375, 0.15625, 0.09375, 0],
-"hsla(150, 25%, 12.5%, 0)", [0.09375, 0.15625, 0.125, 0],
-"hsla(180, 25%, 12.5%, 0)", [0.09375, 0.15625, 0.15625, 0],
-"hsla(210, 25%, 12.5%, 0)", [0.09375, 0.125, 0.15625, 0],
-"hsla(240, 25%, 12.5%, 0)", [0.09375, 0.09375, 0.15625, 0],
-"hsla(270, 25%, 12.5%, 0)", [0.125, 0.09375, 0.15625, 0],
-"hsla(300, 25%, 12.5%, 0)", [0.15625, 0.09375, 0.15625, 0],
-"hsla(330, 25%, 12.5%, 0)", [0.15625, 0.09375, 0.125, 0],
-"hsla(0, 37.5%, 12.5%, 0)", [0.171875, 0.078125, 0.078125, 0],
-"hsla(30, 37.5%, 12.5%, 0)", [0.171875, 0.125, 0.078125, 0],
-"hsla(60, 37.5%, 12.5%, 0)", [0.171875, 0.171875, 0.078125, 0],
-"hsla(90, 37.5%, 12.5%, 0)", [0.125, 0.171875, 0.078125, 0],
-"hsla(120, 37.5%, 12.5%, 0)", [0.078125, 0.171875, 0.078125, 0],
-"hsla(150, 37.5%, 12.5%, 0)", [0.078125, 0.171875, 0.125, 0],
-"hsla(180, 37.5%, 12.5%, 0)", [0.078125, 0.171875, 0.171875, 0],
-"hsla(210, 37.5%, 12.5%, 0)", [0.078125, 0.125, 0.171875, 0],
-"hsla(240, 37.5%, 12.5%, 0)", [0.078125, 0.078125, 0.171875, 0],
-"hsla(270, 37.5%, 12.5%, 0)", [0.125, 0.078125, 0.171875, 0],
-"hsla(300, 37.5%, 12.5%, 0)", [0.171875, 0.078125, 0.171875, 0],
-"hsla(330, 37.5%, 12.5%, 0)", [0.171875, 0.078125, 0.125, 0],
-"hsla(0, 50%, 12.5%, 0)", [0.1875, 0.0625, 0.0625, 0],
-"hsla(30, 50%, 12.5%, 0)", [0.1875, 0.125, 0.0625, 0],
-"hsla(60, 50%, 12.5%, 0)", [0.1875, 0.1875, 0.0625, 0],
-"hsla(90, 50%, 12.5%, 0)", [0.125, 0.1875, 0.0625, 0],
-"hsla(120, 50%, 12.5%, 0)", [0.0625, 0.1875, 0.0625, 0],
-"hsla(150, 50%, 12.5%, 0)", [0.0625, 0.1875, 0.125, 0],
-"hsla(180, 50%, 12.5%, 0)", [0.0625, 0.1875, 0.1875, 0],
-"hsla(210, 50%, 12.5%, 0)", [0.0625, 0.125, 0.1875, 0],
-"hsla(240, 50%, 12.5%, 0)", [0.0625, 0.0625, 0.1875, 0],
-"hsla(270, 50%, 12.5%, 0)", [0.125, 0.0625, 0.1875, 0],
-"hsla(300, 50%, 12.5%, 0)", [0.1875, 0.0625, 0.1875, 0],
-"hsla(330, 50%, 12.5%, 0)", [0.1875, 0.0625, 0.125, 0],
-"hsla(0, 62.5%, 12.5%, 0)", [0.203125, 0.046875, 0.046875, 0],
-"hsla(30, 62.5%, 12.5%, 0)", [0.203125, 0.125, 0.046875, 0],
-"hsla(60, 62.5%, 12.5%, 0)", [0.203125, 0.203125, 0.046875, 0],
-"hsla(90, 62.5%, 12.5%, 0)", [0.125, 0.203125, 0.046875, 0],
-"hsla(120, 62.5%, 12.5%, 0)", [0.046875, 0.203125, 0.046875, 0],
-"hsla(150, 62.5%, 12.5%, 0)", [0.046875, 0.203125, 0.125, 0],
-"hsla(180, 62.5%, 12.5%, 0)", [0.046875, 0.203125, 0.203125, 0],
-"hsla(210, 62.5%, 12.5%, 0)", [0.046875, 0.125, 0.203125, 0],
-"hsla(240, 62.5%, 12.5%, 0)", [0.046875, 0.046875, 0.203125, 0],
-"hsla(270, 62.5%, 12.5%, 0)", [0.125, 0.046875, 0.203125, 0],
-"hsla(300, 62.5%, 12.5%, 0)", [0.203125, 0.046875, 0.203125, 0],
-"hsla(330, 62.5%, 12.5%, 0)", [0.203125, 0.046875, 0.125, 0],
-"hsla(0, 75%, 12.5%, 0)", [0.21875, 0.03125, 0.03125, 0],
-"hsla(30, 75%, 12.5%, 0)", [0.21875, 0.125, 0.03125, 0],
-"hsla(60, 75%, 12.5%, 0)", [0.21875, 0.21875, 0.03125, 0],
-"hsla(90, 75%, 12.5%, 0)", [0.125, 0.21875, 0.03125, 0],
-"hsla(120, 75%, 12.5%, 0)", [0.03125, 0.21875, 0.03125, 0],
-"hsla(150, 75%, 12.5%, 0)", [0.03125, 0.21875, 0.125, 0],
-"hsla(180, 75%, 12.5%, 0)", [0.03125, 0.21875, 0.21875, 0],
-"hsla(210, 75%, 12.5%, 0)", [0.03125, 0.125, 0.21875, 0],
-"hsla(240, 75%, 12.5%, 0)", [0.03125, 0.03125, 0.21875, 0],
-"hsla(270, 75%, 12.5%, 0)", [0.125, 0.03125, 0.21875, 0],
-"hsla(300, 75%, 12.5%, 0)", [0.21875, 0.03125, 0.21875, 0],
-"hsla(330, 75%, 12.5%, 0)", [0.21875, 0.03125, 0.125, 0],
-"hsla(0, 87.5%, 12.5%, 0)", [0.234375, 0.015625, 0.015625, 0],
-"hsla(30, 87.5%, 12.5%, 0)", [0.234375, 0.125, 0.015625, 0],
-"hsla(60, 87.5%, 12.5%, 0)", [0.234375, 0.234375, 0.015625, 0],
-"hsla(90, 87.5%, 12.5%, 0)", [0.125, 0.234375, 0.015625, 0],
-"hsla(120, 87.5%, 12.5%, 0)", [0.015625, 0.234375, 0.015625, 0],
-"hsla(150, 87.5%, 12.5%, 0)", [0.015625, 0.234375, 0.125, 0],
-"hsla(180, 87.5%, 12.5%, 0)", [0.015625, 0.234375, 0.234375, 0],
-"hsla(210, 87.5%, 12.5%, 0)", [0.015625, 0.125, 0.234375, 0],
-"hsla(240, 87.5%, 12.5%, 0)", [0.015625, 0.015625, 0.234375, 0],
-"hsla(270, 87.5%, 12.5%, 0)", [0.125, 0.015625, 0.234375, 0],
-"hsla(300, 87.5%, 12.5%, 0)", [0.234375, 0.015625, 0.234375, 0],
-"hsla(330, 87.5%, 12.5%, 0)", [0.234375, 0.015625, 0.125, 0],
-"hsla(0, 100%, 12.5%, 0)", [0.25, 0, 0, 0],
-"hsla(30, 100%, 12.5%, 0)", [0.25, 0.125, 0, 0],
-"hsla(60, 100%, 12.5%, 0)", [0.25, 0.25, 0, 0],
-"hsla(90, 100%, 12.5%, 0)", [0.125, 0.25, 0, 0],
-"hsla(120, 100%, 12.5%, 0)", [0, 0.25, 0, 0],
-"hsla(150, 100%, 12.5%, 0)", [0, 0.25, 0.125, 0],
-"hsla(180, 100%, 12.5%, 0)", [0, 0.25, 0.25, 0],
-"hsla(210, 100%, 12.5%, 0)", [0, 0.125, 0.25, 0],
-"hsla(240, 100%, 12.5%, 0)", [0, 0, 0.25, 0],
-"hsla(270, 100%, 12.5%, 0)", [0.125, 0, 0.25, 0],
-"hsla(300, 100%, 12.5%, 0)", [0.25, 0, 0.25, 0],
-"hsla(330, 100%, 12.5%, 0)", [0.25, 0, 0.125, 0],
-"hsla(0, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(30, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(60, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(90, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(120, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(150, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(180, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(210, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(240, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(270, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(300, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(330, 0%, 25%, 0)", [0.25, 0.25, 0.25, 0],
-"hsla(0, 12.5%, 25%, 0)", [0.28125, 0.21875, 0.21875, 0],
-"hsla(30, 12.5%, 25%, 0)", [0.28125, 0.25, 0.21875, 0],
-"hsla(60, 12.5%, 25%, 0)", [0.28125, 0.28125, 0.21875, 0],
-"hsla(90, 12.5%, 25%, 0)", [0.25, 0.28125, 0.21875, 0],
-"hsla(120, 12.5%, 25%, 0)", [0.21875, 0.28125, 0.21875, 0],
-"hsla(150, 12.5%, 25%, 0)", [0.21875, 0.28125, 0.25, 0],
-"hsla(180, 12.5%, 25%, 0)", [0.21875, 0.28125, 0.28125, 0],
-"hsla(210, 12.5%, 25%, 0)", [0.21875, 0.25, 0.28125, 0],
-"hsla(240, 12.5%, 25%, 0)", [0.21875, 0.21875, 0.28125, 0],
-"hsla(270, 12.5%, 25%, 0)", [0.25, 0.21875, 0.28125, 0],
-"hsla(300, 12.5%, 25%, 0)", [0.28125, 0.21875, 0.28125, 0],
-"hsla(330, 12.5%, 25%, 0)", [0.28125, 0.21875, 0.25, 0],
-"hsla(0, 25%, 25%, 0)", [0.3125, 0.1875, 0.1875, 0],
-"hsla(30, 25%, 25%, 0)", [0.3125, 0.25, 0.1875, 0],
-"hsla(60, 25%, 25%, 0)", [0.3125, 0.3125, 0.1875, 0],
-"hsla(90, 25%, 25%, 0)", [0.25, 0.3125, 0.1875, 0],
-"hsla(120, 25%, 25%, 0)", [0.1875, 0.3125, 0.1875, 0],
-"hsla(150, 25%, 25%, 0)", [0.1875, 0.3125, 0.25, 0],
-"hsla(180, 25%, 25%, 0)", [0.1875, 0.3125, 0.3125, 0],
-"hsla(210, 25%, 25%, 0)", [0.1875, 0.25, 0.3125, 0],
-"hsla(240, 25%, 25%, 0)", [0.1875, 0.1875, 0.3125, 0],
-"hsla(270, 25%, 25%, 0)", [0.25, 0.1875, 0.3125, 0],
-"hsla(300, 25%, 25%, 0)", [0.3125, 0.1875, 0.3125, 0],
-"hsla(330, 25%, 25%, 0)", [0.3125, 0.1875, 0.25, 0],
-"hsla(0, 37.5%, 25%, 0)", [0.34375, 0.15625, 0.15625, 0],
-"hsla(30, 37.5%, 25%, 0)", [0.34375, 0.25, 0.15625, 0],
-"hsla(60, 37.5%, 25%, 0)", [0.34375, 0.34375, 0.15625, 0],
-"hsla(90, 37.5%, 25%, 0)", [0.25, 0.34375, 0.15625, 0],
-"hsla(120, 37.5%, 25%, 0)", [0.15625, 0.34375, 0.15625, 0],
-"hsla(150, 37.5%, 25%, 0)", [0.15625, 0.34375, 0.25, 0],
-"hsla(180, 37.5%, 25%, 0)", [0.15625, 0.34375, 0.34375, 0],
-"hsla(210, 37.5%, 25%, 0)", [0.15625, 0.25, 0.34375, 0],
-"hsla(240, 37.5%, 25%, 0)", [0.15625, 0.15625, 0.34375, 0],
-"hsla(270, 37.5%, 25%, 0)", [0.25, 0.15625, 0.34375, 0],
-"hsla(300, 37.5%, 25%, 0)", [0.34375, 0.15625, 0.34375, 0],
-"hsla(330, 37.5%, 25%, 0)", [0.34375, 0.15625, 0.25, 0],
-"hsla(0, 50%, 25%, 0)", [0.375, 0.125, 0.125, 0],
-"hsla(30, 50%, 25%, 0)", [0.375, 0.25, 0.125, 0],
-"hsla(60, 50%, 25%, 0)", [0.375, 0.375, 0.125, 0],
-"hsla(90, 50%, 25%, 0)", [0.25, 0.375, 0.125, 0],
-"hsla(120, 50%, 25%, 0)", [0.125, 0.375, 0.125, 0],
-"hsla(150, 50%, 25%, 0)", [0.125, 0.375, 0.25, 0],
-"hsla(180, 50%, 25%, 0)", [0.125, 0.375, 0.375, 0],
-"hsla(210, 50%, 25%, 0)", [0.125, 0.25, 0.375, 0],
-"hsla(240, 50%, 25%, 0)", [0.125, 0.125, 0.375, 0],
-"hsla(270, 50%, 25%, 0)", [0.25, 0.125, 0.375, 0],
-"hsla(300, 50%, 25%, 0)", [0.375, 0.125, 0.375, 0],
-"hsla(330, 50%, 25%, 0)", [0.375, 0.125, 0.25, 0],
-"hsla(0, 62.5%, 25%, 0)", [0.40625, 0.09375, 0.09375, 0],
-"hsla(30, 62.5%, 25%, 0)", [0.40625, 0.25, 0.09375, 0],
-"hsla(60, 62.5%, 25%, 0)", [0.40625, 0.40625, 0.09375, 0],
-"hsla(90, 62.5%, 25%, 0)", [0.25, 0.40625, 0.09375, 0],
-"hsla(120, 62.5%, 25%, 0)", [0.09375, 0.40625, 0.09375, 0],
-"hsla(150, 62.5%, 25%, 0)", [0.09375, 0.40625, 0.25, 0],
-"hsla(180, 62.5%, 25%, 0)", [0.09375, 0.40625, 0.40625, 0],
-"hsla(210, 62.5%, 25%, 0)", [0.09375, 0.25, 0.40625, 0],
-"hsla(240, 62.5%, 25%, 0)", [0.09375, 0.09375, 0.40625, 0],
-"hsla(270, 62.5%, 25%, 0)", [0.25, 0.09375, 0.40625, 0],
-"hsla(300, 62.5%, 25%, 0)", [0.40625, 0.09375, 0.40625, 0],
-"hsla(330, 62.5%, 25%, 0)", [0.40625, 0.09375, 0.25, 0],
-"hsla(0, 75%, 25%, 0)", [0.4375, 0.0625, 0.0625, 0],
-"hsla(30, 75%, 25%, 0)", [0.4375, 0.25, 0.0625, 0],
-"hsla(60, 75%, 25%, 0)", [0.4375, 0.4375, 0.0625, 0],
-"hsla(90, 75%, 25%, 0)", [0.25, 0.4375, 0.0625, 0],
-"hsla(120, 75%, 25%, 0)", [0.0625, 0.4375, 0.0625, 0],
-"hsla(150, 75%, 25%, 0)", [0.0625, 0.4375, 0.25, 0],
-"hsla(180, 75%, 25%, 0)", [0.0625, 0.4375, 0.4375, 0],
-"hsla(210, 75%, 25%, 0)", [0.0625, 0.25, 0.4375, 0],
-"hsla(240, 75%, 25%, 0)", [0.0625, 0.0625, 0.4375, 0],
-"hsla(270, 75%, 25%, 0)", [0.25, 0.0625, 0.4375, 0],
-"hsla(300, 75%, 25%, 0)", [0.4375, 0.0625, 0.4375, 0],
-"hsla(330, 75%, 25%, 0)", [0.4375, 0.0625, 0.25, 0],
-"hsla(0, 87.5%, 25%, 0)", [0.46875, 0.03125, 0.03125, 0],
-"hsla(30, 87.5%, 25%, 0)", [0.46875, 0.25, 0.03125, 0],
-"hsla(60, 87.5%, 25%, 0)", [0.46875, 0.46875, 0.03125, 0],
-"hsla(90, 87.5%, 25%, 0)", [0.25, 0.46875, 0.03125, 0],
-"hsla(120, 87.5%, 25%, 0)", [0.03125, 0.46875, 0.03125, 0],
-"hsla(150, 87.5%, 25%, 0)", [0.03125, 0.46875, 0.25, 0],
-"hsla(180, 87.5%, 25%, 0)", [0.03125, 0.46875, 0.46875, 0],
-"hsla(210, 87.5%, 25%, 0)", [0.03125, 0.25, 0.46875, 0],
-"hsla(240, 87.5%, 25%, 0)", [0.03125, 0.03125, 0.46875, 0],
-"hsla(270, 87.5%, 25%, 0)", [0.25, 0.03125, 0.46875, 0],
-"hsla(300, 87.5%, 25%, 0)", [0.46875, 0.03125, 0.46875, 0],
-"hsla(330, 87.5%, 25%, 0)", [0.46875, 0.03125, 0.25, 0],
-"hsla(0, 100%, 25%, 0)", [0.5, 0, 0, 0],
-"hsla(30, 100%, 25%, 0)", [0.5, 0.25, 0, 0],
-"hsla(60, 100%, 25%, 0)", [0.5, 0.5, 0, 0],
-"hsla(90, 100%, 25%, 0)", [0.25, 0.5, 0, 0],
-"hsla(120, 100%, 25%, 0)", [0, 0.5, 0, 0],
-"hsla(150, 100%, 25%, 0)", [0, 0.5, 0.25, 0],
-"hsla(180, 100%, 25%, 0)", [0, 0.5, 0.5, 0],
-"hsla(210, 100%, 25%, 0)", [0, 0.25, 0.5, 0],
-"hsla(240, 100%, 25%, 0)", [0, 0, 0.5, 0],
-"hsla(270, 100%, 25%, 0)", [0.25, 0, 0.5, 0],
-"hsla(300, 100%, 25%, 0)", [0.5, 0, 0.5, 0],
-"hsla(330, 100%, 25%, 0)", [0.5, 0, 0.25, 0],
-"hsla(0, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(30, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(60, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(90, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(120, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(150, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(180, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(210, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(240, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(270, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(300, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(330, 0%, 37.5%, 0)", [0.375, 0.375, 0.375, 0],
-"hsla(0, 12.5%, 37.5%, 0)", [0.421875, 0.328125, 0.328125, 0],
-"hsla(30, 12.5%, 37.5%, 0)", [0.421875, 0.375, 0.328125, 0],
-"hsla(60, 12.5%, 37.5%, 0)", [0.421875, 0.421875, 0.328125, 0],
-"hsla(90, 12.5%, 37.5%, 0)", [0.375, 0.421875, 0.328125, 0],
-"hsla(120, 12.5%, 37.5%, 0)", [0.328125, 0.421875, 0.328125, 0],
-"hsla(150, 12.5%, 37.5%, 0)", [0.328125, 0.421875, 0.375, 0],
-"hsla(180, 12.5%, 37.5%, 0)", [0.328125, 0.421875, 0.421875, 0],
-"hsla(210, 12.5%, 37.5%, 0)", [0.328125, 0.375, 0.421875, 0],
-"hsla(240, 12.5%, 37.5%, 0)", [0.328125, 0.328125, 0.421875, 0],
-"hsla(270, 12.5%, 37.5%, 0)", [0.375, 0.328125, 0.421875, 0],
-"hsla(300, 12.5%, 37.5%, 0)", [0.421875, 0.328125, 0.421875, 0],
-"hsla(330, 12.5%, 37.5%, 0)", [0.421875, 0.328125, 0.375, 0],
-"hsla(0, 25%, 37.5%, 0)", [0.46875, 0.28125, 0.28125, 0],
-"hsla(30, 25%, 37.5%, 0)", [0.46875, 0.375, 0.28125, 0],
-"hsla(60, 25%, 37.5%, 0)", [0.46875, 0.46875, 0.28125, 0],
-"hsla(90, 25%, 37.5%, 0)", [0.375, 0.46875, 0.28125, 0],
-"hsla(120, 25%, 37.5%, 0)", [0.28125, 0.46875, 0.28125, 0],
-"hsla(150, 25%, 37.5%, 0)", [0.28125, 0.46875, 0.375, 0],
-"hsla(180, 25%, 37.5%, 0)", [0.28125, 0.46875, 0.46875, 0],
-"hsla(210, 25%, 37.5%, 0)", [0.28125, 0.375, 0.46875, 0],
-"hsla(240, 25%, 37.5%, 0)", [0.28125, 0.28125, 0.46875, 0],
-"hsla(270, 25%, 37.5%, 0)", [0.375, 0.28125, 0.46875, 0],
-"hsla(300, 25%, 37.5%, 0)", [0.46875, 0.28125, 0.46875, 0],
-"hsla(330, 25%, 37.5%, 0)", [0.46875, 0.28125, 0.375, 0],
-"hsla(0, 37.5%, 37.5%, 0)", [0.515625, 0.234375, 0.234375, 0],
-"hsla(30, 37.5%, 37.5%, 0)", [0.515625, 0.375, 0.234375, 0],
-"hsla(60, 37.5%, 37.5%, 0)", [0.515625, 0.515625, 0.234375, 0],
-"hsla(90, 37.5%, 37.5%, 0)", [0.375, 0.515625, 0.234375, 0],
-"hsla(120, 37.5%, 37.5%, 0)", [0.234375, 0.515625, 0.234375, 0],
-"hsla(150, 37.5%, 37.5%, 0)", [0.234375, 0.515625, 0.375, 0],
-"hsla(180, 37.5%, 37.5%, 0)", [0.234375, 0.515625, 0.515625, 0],
-"hsla(210, 37.5%, 37.5%, 0)", [0.234375, 0.375, 0.515625, 0],
-"hsla(240, 37.5%, 37.5%, 0)", [0.234375, 0.234375, 0.515625, 0],
-"hsla(270, 37.5%, 37.5%, 0)", [0.375, 0.234375, 0.515625, 0],
-"hsla(300, 37.5%, 37.5%, 0)", [0.515625, 0.234375, 0.515625, 0],
-"hsla(330, 37.5%, 37.5%, 0)", [0.515625, 0.234375, 0.375, 0],
-"hsla(0, 50%, 37.5%, 0)", [0.5625, 0.1875, 0.1875, 0],
-"hsla(30, 50%, 37.5%, 0)", [0.5625, 0.375, 0.1875, 0],
-"hsla(60, 50%, 37.5%, 0)", [0.5625, 0.5625, 0.1875, 0],
-"hsla(90, 50%, 37.5%, 0)", [0.375, 0.5625, 0.1875, 0],
-"hsla(120, 50%, 37.5%, 0)", [0.1875, 0.5625, 0.1875, 0],
-"hsla(150, 50%, 37.5%, 0)", [0.1875, 0.5625, 0.375, 0],
-"hsla(180, 50%, 37.5%, 0)", [0.1875, 0.5625, 0.5625, 0],
-"hsla(210, 50%, 37.5%, 0)", [0.1875, 0.375, 0.5625, 0],
-"hsla(240, 50%, 37.5%, 0)", [0.1875, 0.1875, 0.5625, 0],
-"hsla(270, 50%, 37.5%, 0)", [0.375, 0.1875, 0.5625, 0],
-"hsla(300, 50%, 37.5%, 0)", [0.5625, 0.1875, 0.5625, 0],
-"hsla(330, 50%, 37.5%, 0)", [0.5625, 0.1875, 0.375, 0],
-"hsla(0, 62.5%, 37.5%, 0)", [0.609375, 0.140625, 0.140625, 0],
-"hsla(30, 62.5%, 37.5%, 0)", [0.609375, 0.375, 0.140625, 0],
-"hsla(60, 62.5%, 37.5%, 0)", [0.609375, 0.609375, 0.140625, 0],
-"hsla(90, 62.5%, 37.5%, 0)", [0.375, 0.609375, 0.140625, 0],
-"hsla(120, 62.5%, 37.5%, 0)", [0.140625, 0.609375, 0.140625, 0],
-"hsla(150, 62.5%, 37.5%, 0)", [0.140625, 0.609375, 0.375, 0],
-"hsla(180, 62.5%, 37.5%, 0)", [0.140625, 0.609375, 0.609375, 0],
-"hsla(210, 62.5%, 37.5%, 0)", [0.140625, 0.375, 0.609375, 0],
-"hsla(240, 62.5%, 37.5%, 0)", [0.140625, 0.140625, 0.609375, 0],
-"hsla(270, 62.5%, 37.5%, 0)", [0.375, 0.140625, 0.609375, 0],
-"hsla(300, 62.5%, 37.5%, 0)", [0.609375, 0.140625, 0.609375, 0],
-"hsla(330, 62.5%, 37.5%, 0)", [0.609375, 0.140625, 0.375, 0],
-"hsla(0, 75%, 37.5%, 0)", [0.65625, 0.09375, 0.09375, 0],
-"hsla(30, 75%, 37.5%, 0)", [0.65625, 0.375, 0.09375, 0],
-"hsla(60, 75%, 37.5%, 0)", [0.65625, 0.65625, 0.09375, 0],
-"hsla(90, 75%, 37.5%, 0)", [0.375, 0.65625, 0.09375, 0],
-"hsla(120, 75%, 37.5%, 0)", [0.09375, 0.65625, 0.09375, 0],
-"hsla(150, 75%, 37.5%, 0)", [0.09375, 0.65625, 0.375, 0],
-"hsla(180, 75%, 37.5%, 0)", [0.09375, 0.65625, 0.65625, 0],
-"hsla(210, 75%, 37.5%, 0)", [0.09375, 0.375, 0.65625, 0],
-"hsla(240, 75%, 37.5%, 0)", [0.09375, 0.09375, 0.65625, 0],
-"hsla(270, 75%, 37.5%, 0)", [0.375, 0.09375, 0.65625, 0],
-"hsla(300, 75%, 37.5%, 0)", [0.65625, 0.09375, 0.65625, 0],
-"hsla(330, 75%, 37.5%, 0)", [0.65625, 0.09375, 0.375, 0],
-"hsla(0, 87.5%, 37.5%, 0)", [0.703125, 0.046875, 0.046875, 0],
-"hsla(30, 87.5%, 37.5%, 0)", [0.703125, 0.375, 0.046875, 0],
-"hsla(60, 87.5%, 37.5%, 0)", [0.703125, 0.703125, 0.046875, 0],
-"hsla(90, 87.5%, 37.5%, 0)", [0.375, 0.703125, 0.046875, 0],
-"hsla(120, 87.5%, 37.5%, 0)", [0.046875, 0.703125, 0.046875, 0],
-"hsla(150, 87.5%, 37.5%, 0)", [0.046875, 0.703125, 0.375, 0],
-"hsla(180, 87.5%, 37.5%, 0)", [0.046875, 0.703125, 0.703125, 0],
-"hsla(210, 87.5%, 37.5%, 0)", [0.046875, 0.375, 0.703125, 0],
-"hsla(240, 87.5%, 37.5%, 0)", [0.046875, 0.046875, 0.703125, 0],
-"hsla(270, 87.5%, 37.5%, 0)", [0.375, 0.046875, 0.703125, 0],
-"hsla(300, 87.5%, 37.5%, 0)", [0.703125, 0.046875, 0.703125, 0],
-"hsla(330, 87.5%, 37.5%, 0)", [0.703125, 0.046875, 0.375, 0],
-"hsla(0, 100%, 37.5%, 0)", [0.75, 0, 0, 0],
-"hsla(30, 100%, 37.5%, 0)", [0.75, 0.375, 0, 0],
-"hsla(60, 100%, 37.5%, 0)", [0.75, 0.75, 0, 0],
-"hsla(90, 100%, 37.5%, 0)", [0.375, 0.75, 0, 0],
-"hsla(120, 100%, 37.5%, 0)", [0, 0.75, 0, 0],
-"hsla(150, 100%, 37.5%, 0)", [0, 0.75, 0.375, 0],
-"hsla(180, 100%, 37.5%, 0)", [0, 0.75, 0.75, 0],
-"hsla(210, 100%, 37.5%, 0)", [0, 0.375, 0.75, 0],
-"hsla(240, 100%, 37.5%, 0)", [0, 0, 0.75, 0],
-"hsla(270, 100%, 37.5%, 0)", [0.375, 0, 0.75, 0],
-"hsla(300, 100%, 37.5%, 0)", [0.75, 0, 0.75, 0],
-"hsla(330, 100%, 37.5%, 0)", [0.75, 0, 0.375, 0],
-"hsla(0, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(30, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(60, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(90, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(120, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(150, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(180, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(210, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(240, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(270, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(300, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(330, 0%, 50%, 0)", [0.5, 0.5, 0.5, 0],
-"hsla(0, 12.5%, 50%, 0)", [0.5625, 0.4375, 0.4375, 0],
-"hsla(30, 12.5%, 50%, 0)", [0.5625, 0.5, 0.4375, 0],
-"hsla(60, 12.5%, 50%, 0)", [0.5625, 0.5625, 0.4375, 0],
-"hsla(90, 12.5%, 50%, 0)", [0.5, 0.5625, 0.4375, 0],
-"hsla(120, 12.5%, 50%, 0)", [0.4375, 0.5625, 0.4375, 0],
-"hsla(150, 12.5%, 50%, 0)", [0.4375, 0.5625, 0.5, 0],
-"hsla(180, 12.5%, 50%, 0)", [0.4375, 0.5625, 0.5625, 0],
-"hsla(210, 12.5%, 50%, 0)", [0.4375, 0.5, 0.5625, 0],
-"hsla(240, 12.5%, 50%, 0)", [0.4375, 0.4375, 0.5625, 0],
-"hsla(270, 12.5%, 50%, 0)", [0.5, 0.4375, 0.5625, 0],
-"hsla(300, 12.5%, 50%, 0)", [0.5625, 0.4375, 0.5625, 0],
-"hsla(330, 12.5%, 50%, 0)", [0.5625, 0.4375, 0.5, 0],
-"hsla(0, 25%, 50%, 0)", [0.625, 0.375, 0.375, 0],
-"hsla(30, 25%, 50%, 0)", [0.625, 0.5, 0.375, 0],
-"hsla(60, 25%, 50%, 0)", [0.625, 0.625, 0.375, 0],
-"hsla(90, 25%, 50%, 0)", [0.5, 0.625, 0.375, 0],
-"hsla(120, 25%, 50%, 0)", [0.375, 0.625, 0.375, 0],
-"hsla(150, 25%, 50%, 0)", [0.375, 0.625, 0.5, 0],
-"hsla(180, 25%, 50%, 0)", [0.375, 0.625, 0.625, 0],
-"hsla(210, 25%, 50%, 0)", [0.375, 0.5, 0.625, 0],
-"hsla(240, 25%, 50%, 0)", [0.375, 0.375, 0.625, 0],
-"hsla(270, 25%, 50%, 0)", [0.5, 0.375, 0.625, 0],
-"hsla(300, 25%, 50%, 0)", [0.625, 0.375, 0.625, 0],
-"hsla(330, 25%, 50%, 0)", [0.625, 0.375, 0.5, 0],
-"hsla(0, 37.5%, 50%, 0)", [0.6875, 0.3125, 0.3125, 0],
-"hsla(30, 37.5%, 50%, 0)", [0.6875, 0.5, 0.3125, 0],
-"hsla(60, 37.5%, 50%, 0)", [0.6875, 0.6875, 0.3125, 0],
-"hsla(90, 37.5%, 50%, 0)", [0.5, 0.6875, 0.3125, 0],
-"hsla(120, 37.5%, 50%, 0)", [0.3125, 0.6875, 0.3125, 0],
-"hsla(150, 37.5%, 50%, 0)", [0.3125, 0.6875, 0.5, 0],
-"hsla(180, 37.5%, 50%, 0)", [0.3125, 0.6875, 0.6875, 0],
-"hsla(210, 37.5%, 50%, 0)", [0.3125, 0.5, 0.6875, 0],
-"hsla(240, 37.5%, 50%, 0)", [0.3125, 0.3125, 0.6875, 0],
-"hsla(270, 37.5%, 50%, 0)", [0.5, 0.3125, 0.6875, 0],
-"hsla(300, 37.5%, 50%, 0)", [0.6875, 0.3125, 0.6875, 0],
-"hsla(330, 37.5%, 50%, 0)", [0.6875, 0.3125, 0.5, 0],
-"hsla(0, 50%, 50%, 0)", [0.75, 0.25, 0.25, 0],
-"hsla(30, 50%, 50%, 0)", [0.75, 0.5, 0.25, 0],
-"hsla(60, 50%, 50%, 0)", [0.75, 0.75, 0.25, 0],
-"hsla(90, 50%, 50%, 0)", [0.5, 0.75, 0.25, 0],
-"hsla(120, 50%, 50%, 0)", [0.25, 0.75, 0.25, 0],
-"hsla(150, 50%, 50%, 0)", [0.25, 0.75, 0.5, 0],
-"hsla(180, 50%, 50%, 0)", [0.25, 0.75, 0.75, 0],
-"hsla(210, 50%, 50%, 0)", [0.25, 0.5, 0.75, 0],
-"hsla(240, 50%, 50%, 0)", [0.25, 0.25, 0.75, 0],
-"hsla(270, 50%, 50%, 0)", [0.5, 0.25, 0.75, 0],
-"hsla(300, 50%, 50%, 0)", [0.75, 0.25, 0.75, 0],
-"hsla(330, 50%, 50%, 0)", [0.75, 0.25, 0.5, 0],
-"hsla(0, 62.5%, 50%, 0)", [0.8125, 0.1875, 0.1875, 0],
-"hsla(30, 62.5%, 50%, 0)", [0.8125, 0.5, 0.1875, 0],
-"hsla(60, 62.5%, 50%, 0)", [0.8125, 0.8125, 0.1875, 0],
-"hsla(90, 62.5%, 50%, 0)", [0.5, 0.8125, 0.1875, 0],
-"hsla(120, 62.5%, 50%, 0)", [0.1875, 0.8125, 0.1875, 0],
-"hsla(150, 62.5%, 50%, 0)", [0.1875, 0.8125, 0.5, 0],
-"hsla(180, 62.5%, 50%, 0)", [0.1875, 0.8125, 0.8125, 0],
-"hsla(210, 62.5%, 50%, 0)", [0.1875, 0.5, 0.8125, 0],
-"hsla(240, 62.5%, 50%, 0)", [0.1875, 0.1875, 0.8125, 0],
-"hsla(270, 62.5%, 50%, 0)", [0.5, 0.1875, 0.8125, 0],
-"hsla(300, 62.5%, 50%, 0)", [0.8125, 0.1875, 0.8125, 0],
-"hsla(330, 62.5%, 50%, 0)", [0.8125, 0.1875, 0.5, 0],
-"hsla(0, 75%, 50%, 0)", [0.875, 0.125, 0.125, 0],
-"hsla(30, 75%, 50%, 0)", [0.875, 0.5, 0.125, 0],
-"hsla(60, 75%, 50%, 0)", [0.875, 0.875, 0.125, 0],
-"hsla(90, 75%, 50%, 0)", [0.5, 0.875, 0.125, 0],
-"hsla(120, 75%, 50%, 0)", [0.125, 0.875, 0.125, 0],
-"hsla(150, 75%, 50%, 0)", [0.125, 0.875, 0.5, 0],
-"hsla(180, 75%, 50%, 0)", [0.125, 0.875, 0.875, 0],
-"hsla(210, 75%, 50%, 0)", [0.125, 0.5, 0.875, 0],
-"hsla(240, 75%, 50%, 0)", [0.125, 0.125, 0.875, 0],
-"hsla(270, 75%, 50%, 0)", [0.5, 0.125, 0.875, 0],
-"hsla(300, 75%, 50%, 0)", [0.875, 0.125, 0.875, 0],
-"hsla(330, 75%, 50%, 0)", [0.875, 0.125, 0.5, 0],
-"hsla(0, 87.5%, 50%, 0)", [0.9375, 0.0625, 0.0625, 0],
-"hsla(30, 87.5%, 50%, 0)", [0.9375, 0.5, 0.0625, 0],
-"hsla(60, 87.5%, 50%, 0)", [0.9375, 0.9375, 0.0625, 0],
-"hsla(90, 87.5%, 50%, 0)", [0.5, 0.9375, 0.0625, 0],
-"hsla(120, 87.5%, 50%, 0)", [0.0625, 0.9375, 0.0625, 0],
-"hsla(150, 87.5%, 50%, 0)", [0.0625, 0.9375, 0.5, 0],
-"hsla(180, 87.5%, 50%, 0)", [0.0625, 0.9375, 0.9375, 0],
-"hsla(210, 87.5%, 50%, 0)", [0.0625, 0.5, 0.9375, 0],
-"hsla(240, 87.5%, 50%, 0)", [0.0625, 0.0625, 0.9375, 0],
-"hsla(270, 87.5%, 50%, 0)", [0.5, 0.0625, 0.9375, 0],
-"hsla(300, 87.5%, 50%, 0)", [0.9375, 0.0625, 0.9375, 0],
-"hsla(330, 87.5%, 50%, 0)", [0.9375, 0.0625, 0.5, 0],
-"hsla(0, 100%, 50%, 0)", [1, 0, 0, 0],
-"hsla(30, 100%, 50%, 0)", [1, 0.5, 0, 0],
-"hsla(60, 100%, 50%, 0)", [1, 1, 0, 0],
-"hsla(90, 100%, 50%, 0)", [0.5, 1, 0, 0],
-"hsla(120, 100%, 50%, 0)", [0, 1, 0, 0],
-"hsla(150, 100%, 50%, 0)", [0, 1, 0.5, 0],
-"hsla(180, 100%, 50%, 0)", [0, 1, 1, 0],
-"hsla(210, 100%, 50%, 0)", [0, 0.5, 1, 0],
-"hsla(240, 100%, 50%, 0)", [0, 0, 1, 0],
-"hsla(270, 100%, 50%, 0)", [0.5, 0, 1, 0],
-"hsla(300, 100%, 50%, 0)", [1, 0, 1, 0],
-"hsla(330, 100%, 50%, 0)", [1, 0, 0.5, 0],
-"hsla(0, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(30, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(60, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(90, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(120, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(150, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(180, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(210, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(240, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(270, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(300, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(330, 0%, 62.5%, 0)", [0.625, 0.625, 0.625, 0],
-"hsla(0, 12.5%, 62.5%, 0)", [0.671875, 0.578125, 0.578125, 0],
-"hsla(30, 12.5%, 62.5%, 0)", [0.671875, 0.625, 0.578125, 0],
-"hsla(60, 12.5%, 62.5%, 0)", [0.671875, 0.671875, 0.578125, 0],
-"hsla(90, 12.5%, 62.5%, 0)", [0.625, 0.671875, 0.578125, 0],
-"hsla(120, 12.5%, 62.5%, 0)", [0.578125, 0.671875, 0.578125, 0],
-"hsla(150, 12.5%, 62.5%, 0)", [0.578125, 0.671875, 0.625, 0],
-"hsla(180, 12.5%, 62.5%, 0)", [0.578125, 0.671875, 0.671875, 0],
-"hsla(210, 12.5%, 62.5%, 0)", [0.578125, 0.625, 0.671875, 0],
-"hsla(240, 12.5%, 62.5%, 0)", [0.578125, 0.578125, 0.671875, 0],
-"hsla(270, 12.5%, 62.5%, 0)", [0.625, 0.578125, 0.671875, 0],
-"hsla(300, 12.5%, 62.5%, 0)", [0.671875, 0.578125, 0.671875, 0],
-"hsla(330, 12.5%, 62.5%, 0)", [0.671875, 0.578125, 0.625, 0],
-"hsla(0, 25%, 62.5%, 0)", [0.71875, 0.53125, 0.53125, 0],
-"hsla(30, 25%, 62.5%, 0)", [0.71875, 0.625, 0.53125, 0],
-"hsla(60, 25%, 62.5%, 0)", [0.71875, 0.71875, 0.53125, 0],
-"hsla(90, 25%, 62.5%, 0)", [0.625, 0.71875, 0.53125, 0],
-"hsla(120, 25%, 62.5%, 0)", [0.53125, 0.71875, 0.53125, 0],
-"hsla(150, 25%, 62.5%, 0)", [0.53125, 0.71875, 0.625, 0],
-"hsla(180, 25%, 62.5%, 0)", [0.53125, 0.71875, 0.71875, 0],
-"hsla(210, 25%, 62.5%, 0)", [0.53125, 0.625, 0.71875, 0],
-"hsla(240, 25%, 62.5%, 0)", [0.53125, 0.53125, 0.71875, 0],
-"hsla(270, 25%, 62.5%, 0)", [0.625, 0.53125, 0.71875, 0],
-"hsla(300, 25%, 62.5%, 0)", [0.71875, 0.53125, 0.71875, 0],
-"hsla(330, 25%, 62.5%, 0)", [0.71875, 0.53125, 0.625, 0],
-"hsla(0, 37.5%, 62.5%, 0)", [0.765625, 0.484375, 0.484375, 0],
-"hsla(30, 37.5%, 62.5%, 0)", [0.765625, 0.625, 0.484375, 0],
-"hsla(60, 37.5%, 62.5%, 0)", [0.765625, 0.765625, 0.484375, 0],
-"hsla(90, 37.5%, 62.5%, 0)", [0.625, 0.765625, 0.484375, 0],
-"hsla(120, 37.5%, 62.5%, 0)", [0.484375, 0.765625, 0.484375, 0],
-"hsla(150, 37.5%, 62.5%, 0)", [0.484375, 0.765625, 0.625, 0],
-"hsla(180, 37.5%, 62.5%, 0)", [0.484375, 0.765625, 0.765625, 0],
-"hsla(210, 37.5%, 62.5%, 0)", [0.484375, 0.625, 0.765625, 0],
-"hsla(240, 37.5%, 62.5%, 0)", [0.484375, 0.484375, 0.765625, 0],
-"hsla(270, 37.5%, 62.5%, 0)", [0.625, 0.484375, 0.765625, 0],
-"hsla(300, 37.5%, 62.5%, 0)", [0.765625, 0.484375, 0.765625, 0],
-"hsla(330, 37.5%, 62.5%, 0)", [0.765625, 0.484375, 0.625, 0],
-"hsla(0, 50%, 62.5%, 0)", [0.8125, 0.4375, 0.4375, 0],
-"hsla(30, 50%, 62.5%, 0)", [0.8125, 0.625, 0.4375, 0],
-"hsla(60, 50%, 62.5%, 0)", [0.8125, 0.8125, 0.4375, 0],
-"hsla(90, 50%, 62.5%, 0)", [0.625, 0.8125, 0.4375, 0],
-"hsla(120, 50%, 62.5%, 0)", [0.4375, 0.8125, 0.4375, 0],
-"hsla(150, 50%, 62.5%, 0)", [0.4375, 0.8125, 0.625, 0],
-"hsla(180, 50%, 62.5%, 0)", [0.4375, 0.8125, 0.8125, 0],
-"hsla(210, 50%, 62.5%, 0)", [0.4375, 0.625, 0.8125, 0],
-"hsla(240, 50%, 62.5%, 0)", [0.4375, 0.4375, 0.8125, 0],
-"hsla(270, 50%, 62.5%, 0)", [0.625, 0.4375, 0.8125, 0],
-"hsla(300, 50%, 62.5%, 0)", [0.8125, 0.4375, 0.8125, 0],
-"hsla(330, 50%, 62.5%, 0)", [0.8125, 0.4375, 0.625, 0],
-"hsla(0, 62.5%, 62.5%, 0)", [0.859375, 0.390625, 0.390625, 0],
-"hsla(30, 62.5%, 62.5%, 0)", [0.859375, 0.625, 0.390625, 0],
-"hsla(60, 62.5%, 62.5%, 0)", [0.859375, 0.859375, 0.390625, 0],
-"hsla(90, 62.5%, 62.5%, 0)", [0.625, 0.859375, 0.390625, 0],
-"hsla(120, 62.5%, 62.5%, 0)", [0.390625, 0.859375, 0.390625, 0],
-"hsla(150, 62.5%, 62.5%, 0)", [0.390625, 0.859375, 0.625, 0],
-"hsla(180, 62.5%, 62.5%, 0)", [0.390625, 0.859375, 0.859375, 0],
-"hsla(210, 62.5%, 62.5%, 0)", [0.390625, 0.625, 0.859375, 0],
-"hsla(240, 62.5%, 62.5%, 0)", [0.390625, 0.390625, 0.859375, 0],
-"hsla(270, 62.5%, 62.5%, 0)", [0.625, 0.390625, 0.859375, 0],
-"hsla(300, 62.5%, 62.5%, 0)", [0.859375, 0.390625, 0.859375, 0],
-"hsla(330, 62.5%, 62.5%, 0)", [0.859375, 0.390625, 0.625, 0],
-"hsla(0, 75%, 62.5%, 0)", [0.90625, 0.34375, 0.34375, 0],
-"hsla(30, 75%, 62.5%, 0)", [0.90625, 0.625, 0.34375, 0],
-"hsla(60, 75%, 62.5%, 0)", [0.90625, 0.90625, 0.34375, 0],
-"hsla(90, 75%, 62.5%, 0)", [0.625, 0.90625, 0.34375, 0],
-"hsla(120, 75%, 62.5%, 0)", [0.34375, 0.90625, 0.34375, 0],
-"hsla(150, 75%, 62.5%, 0)", [0.34375, 0.90625, 0.625, 0],
-"hsla(180, 75%, 62.5%, 0)", [0.34375, 0.90625, 0.90625, 0],
-"hsla(210, 75%, 62.5%, 0)", [0.34375, 0.625, 0.90625, 0],
-"hsla(240, 75%, 62.5%, 0)", [0.34375, 0.34375, 0.90625, 0],
-"hsla(270, 75%, 62.5%, 0)", [0.625, 0.34375, 0.90625, 0],
-"hsla(300, 75%, 62.5%, 0)", [0.90625, 0.34375, 0.90625, 0],
-"hsla(330, 75%, 62.5%, 0)", [0.90625, 0.34375, 0.625, 0],
-"hsla(0, 87.5%, 62.5%, 0)", [0.953125, 0.296875, 0.296875, 0],
-"hsla(30, 87.5%, 62.5%, 0)", [0.953125, 0.625, 0.296875, 0],
-"hsla(60, 87.5%, 62.5%, 0)", [0.953125, 0.953125, 0.296875, 0],
-"hsla(90, 87.5%, 62.5%, 0)", [0.625, 0.953125, 0.296875, 0],
-"hsla(120, 87.5%, 62.5%, 0)", [0.296875, 0.953125, 0.296875, 0],
-"hsla(150, 87.5%, 62.5%, 0)", [0.296875, 0.953125, 0.625, 0],
-"hsla(180, 87.5%, 62.5%, 0)", [0.296875, 0.953125, 0.953125, 0],
-"hsla(210, 87.5%, 62.5%, 0)", [0.296875, 0.625, 0.953125, 0],
-"hsla(240, 87.5%, 62.5%, 0)", [0.296875, 0.296875, 0.953125, 0],
-"hsla(270, 87.5%, 62.5%, 0)", [0.625, 0.296875, 0.953125, 0],
-"hsla(300, 87.5%, 62.5%, 0)", [0.953125, 0.296875, 0.953125, 0],
-"hsla(330, 87.5%, 62.5%, 0)", [0.953125, 0.296875, 0.625, 0],
-"hsla(0, 100%, 62.5%, 0)", [1, 0.25, 0.25, 0],
-"hsla(30, 100%, 62.5%, 0)", [1, 0.625, 0.25, 0],
-"hsla(60, 100%, 62.5%, 0)", [1, 1, 0.25, 0],
-"hsla(90, 100%, 62.5%, 0)", [0.625, 1, 0.25, 0],
-"hsla(120, 100%, 62.5%, 0)", [0.25, 1, 0.25, 0],
-"hsla(150, 100%, 62.5%, 0)", [0.25, 1, 0.625, 0],
-"hsla(180, 100%, 62.5%, 0)", [0.25, 1, 1, 0],
-"hsla(210, 100%, 62.5%, 0)", [0.25, 0.625, 1, 0],
-"hsla(240, 100%, 62.5%, 0)", [0.25, 0.25, 1, 0],
-"hsla(270, 100%, 62.5%, 0)", [0.625, 0.25, 1, 0],
-"hsla(300, 100%, 62.5%, 0)", [1, 0.25, 1, 0],
-"hsla(330, 100%, 62.5%, 0)", [1, 0.25, 0.625, 0],
-"hsla(0, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(30, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(60, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(90, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(120, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(150, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(180, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(210, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(240, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(270, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(300, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(330, 0%, 75%, 0)", [0.75, 0.75, 0.75, 0],
-"hsla(0, 12.5%, 75%, 0)", [0.78125, 0.71875, 0.71875, 0],
-"hsla(30, 12.5%, 75%, 0)", [0.78125, 0.75, 0.71875, 0],
-"hsla(60, 12.5%, 75%, 0)", [0.78125, 0.78125, 0.71875, 0],
-"hsla(90, 12.5%, 75%, 0)", [0.75, 0.78125, 0.71875, 0],
-"hsla(120, 12.5%, 75%, 0)", [0.71875, 0.78125, 0.71875, 0],
-"hsla(150, 12.5%, 75%, 0)", [0.71875, 0.78125, 0.75, 0],
-"hsla(180, 12.5%, 75%, 0)", [0.71875, 0.78125, 0.78125, 0],
-"hsla(210, 12.5%, 75%, 0)", [0.71875, 0.75, 0.78125, 0],
-"hsla(240, 12.5%, 75%, 0)", [0.71875, 0.71875, 0.78125, 0],
-"hsla(270, 12.5%, 75%, 0)", [0.75, 0.71875, 0.78125, 0],
-"hsla(300, 12.5%, 75%, 0)", [0.78125, 0.71875, 0.78125, 0],
-"hsla(330, 12.5%, 75%, 0)", [0.78125, 0.71875, 0.75, 0],
-"hsla(0, 25%, 75%, 0)", [0.8125, 0.6875, 0.6875, 0],
-"hsla(30, 25%, 75%, 0)", [0.8125, 0.75, 0.6875, 0],
-"hsla(60, 25%, 75%, 0)", [0.8125, 0.8125, 0.6875, 0],
-"hsla(90, 25%, 75%, 0)", [0.75, 0.8125, 0.6875, 0],
-"hsla(120, 25%, 75%, 0)", [0.6875, 0.8125, 0.6875, 0],
-"hsla(150, 25%, 75%, 0)", [0.6875, 0.8125, 0.75, 0],
-"hsla(180, 25%, 75%, 0)", [0.6875, 0.8125, 0.8125, 0],
-"hsla(210, 25%, 75%, 0)", [0.6875, 0.75, 0.8125, 0],
-"hsla(240, 25%, 75%, 0)", [0.6875, 0.6875, 0.8125, 0],
-"hsla(270, 25%, 75%, 0)", [0.75, 0.6875, 0.8125, 0],
-"hsla(300, 25%, 75%, 0)", [0.8125, 0.6875, 0.8125, 0],
-"hsla(330, 25%, 75%, 0)", [0.8125, 0.6875, 0.75, 0],
-"hsla(0, 37.5%, 75%, 0)", [0.84375, 0.65625, 0.65625, 0],
-"hsla(30, 37.5%, 75%, 0)", [0.84375, 0.75, 0.65625, 0],
-"hsla(60, 37.5%, 75%, 0)", [0.84375, 0.84375, 0.65625, 0],
-"hsla(90, 37.5%, 75%, 0)", [0.75, 0.84375, 0.65625, 0],
-"hsla(120, 37.5%, 75%, 0)", [0.65625, 0.84375, 0.65625, 0],
-"hsla(150, 37.5%, 75%, 0)", [0.65625, 0.84375, 0.75, 0],
-"hsla(180, 37.5%, 75%, 0)", [0.65625, 0.84375, 0.84375, 0],
-"hsla(210, 37.5%, 75%, 0)", [0.65625, 0.75, 0.84375, 0],
-"hsla(240, 37.5%, 75%, 0)", [0.65625, 0.65625, 0.84375, 0],
-"hsla(270, 37.5%, 75%, 0)", [0.75, 0.65625, 0.84375, 0],
-"hsla(300, 37.5%, 75%, 0)", [0.84375, 0.65625, 0.84375, 0],
-"hsla(330, 37.5%, 75%, 0)", [0.84375, 0.65625, 0.75, 0],
-"hsla(0, 50%, 75%, 0)", [0.875, 0.625, 0.625, 0],
-"hsla(30, 50%, 75%, 0)", [0.875, 0.75, 0.625, 0],
-"hsla(60, 50%, 75%, 0)", [0.875, 0.875, 0.625, 0],
-"hsla(90, 50%, 75%, 0)", [0.75, 0.875, 0.625, 0],
-"hsla(120, 50%, 75%, 0)", [0.625, 0.875, 0.625, 0],
-"hsla(150, 50%, 75%, 0)", [0.625, 0.875, 0.75, 0],
-"hsla(180, 50%, 75%, 0)", [0.625, 0.875, 0.875, 0],
-"hsla(210, 50%, 75%, 0)", [0.625, 0.75, 0.875, 0],
-"hsla(240, 50%, 75%, 0)", [0.625, 0.625, 0.875, 0],
-"hsla(270, 50%, 75%, 0)", [0.75, 0.625, 0.875, 0],
-"hsla(300, 50%, 75%, 0)", [0.875, 0.625, 0.875, 0],
-"hsla(330, 50%, 75%, 0)", [0.875, 0.625, 0.75, 0],
-"hsla(0, 62.5%, 75%, 0)", [0.90625, 0.59375, 0.59375, 0],
-"hsla(30, 62.5%, 75%, 0)", [0.90625, 0.75, 0.59375, 0],
-"hsla(60, 62.5%, 75%, 0)", [0.90625, 0.90625, 0.59375, 0],
-"hsla(90, 62.5%, 75%, 0)", [0.75, 0.90625, 0.59375, 0],
-"hsla(120, 62.5%, 75%, 0)", [0.59375, 0.90625, 0.59375, 0],
-"hsla(150, 62.5%, 75%, 0)", [0.59375, 0.90625, 0.75, 0],
-"hsla(180, 62.5%, 75%, 0)", [0.59375, 0.90625, 0.90625, 0],
-"hsla(210, 62.5%, 75%, 0)", [0.59375, 0.75, 0.90625, 0],
-"hsla(240, 62.5%, 75%, 0)", [0.59375, 0.59375, 0.90625, 0],
-"hsla(270, 62.5%, 75%, 0)", [0.75, 0.59375, 0.90625, 0],
-"hsla(300, 62.5%, 75%, 0)", [0.90625, 0.59375, 0.90625, 0],
-"hsla(330, 62.5%, 75%, 0)", [0.90625, 0.59375, 0.75, 0],
-"hsla(0, 75%, 75%, 0)", [0.9375, 0.5625, 0.5625, 0],
-"hsla(30, 75%, 75%, 0)", [0.9375, 0.75, 0.5625, 0],
-"hsla(60, 75%, 75%, 0)", [0.9375, 0.9375, 0.5625, 0],
-"hsla(90, 75%, 75%, 0)", [0.75, 0.9375, 0.5625, 0],
-"hsla(120, 75%, 75%, 0)", [0.5625, 0.9375, 0.5625, 0],
-"hsla(150, 75%, 75%, 0)", [0.5625, 0.9375, 0.75, 0],
-"hsla(180, 75%, 75%, 0)", [0.5625, 0.9375, 0.9375, 0],
-"hsla(210, 75%, 75%, 0)", [0.5625, 0.75, 0.9375, 0],
-"hsla(240, 75%, 75%, 0)", [0.5625, 0.5625, 0.9375, 0],
-"hsla(270, 75%, 75%, 0)", [0.75, 0.5625, 0.9375, 0],
-"hsla(300, 75%, 75%, 0)", [0.9375, 0.5625, 0.9375, 0],
-"hsla(330, 75%, 75%, 0)", [0.9375, 0.5625, 0.75, 0],
-"hsla(0, 87.5%, 75%, 0)", [0.96875, 0.53125, 0.53125, 0],
-"hsla(30, 87.5%, 75%, 0)", [0.96875, 0.75, 0.53125, 0],
-"hsla(60, 87.5%, 75%, 0)", [0.96875, 0.96875, 0.53125, 0],
-"hsla(90, 87.5%, 75%, 0)", [0.75, 0.96875, 0.53125, 0],
-"hsla(120, 87.5%, 75%, 0)", [0.53125, 0.96875, 0.53125, 0],
-"hsla(150, 87.5%, 75%, 0)", [0.53125, 0.96875, 0.75, 0],
-"hsla(180, 87.5%, 75%, 0)", [0.53125, 0.96875, 0.96875, 0],
-"hsla(210, 87.5%, 75%, 0)", [0.53125, 0.75, 0.96875, 0],
-"hsla(240, 87.5%, 75%, 0)", [0.53125, 0.53125, 0.96875, 0],
-"hsla(270, 87.5%, 75%, 0)", [0.75, 0.53125, 0.96875, 0],
-"hsla(300, 87.5%, 75%, 0)", [0.96875, 0.53125, 0.96875, 0],
-"hsla(330, 87.5%, 75%, 0)", [0.96875, 0.53125, 0.75, 0],
-"hsla(0, 100%, 75%, 0)", [1, 0.5, 0.5, 0],
-"hsla(30, 100%, 75%, 0)", [1, 0.75, 0.5, 0],
-"hsla(60, 100%, 75%, 0)", [1, 1, 0.5, 0],
-"hsla(90, 100%, 75%, 0)", [0.75, 1, 0.5, 0],
-"hsla(120, 100%, 75%, 0)", [0.5, 1, 0.5, 0],
-"hsla(150, 100%, 75%, 0)", [0.5, 1, 0.75, 0],
-"hsla(180, 100%, 75%, 0)", [0.5, 1, 1, 0],
-"hsla(210, 100%, 75%, 0)", [0.5, 0.75, 1, 0],
-"hsla(240, 100%, 75%, 0)", [0.5, 0.5, 1, 0],
-"hsla(270, 100%, 75%, 0)", [0.75, 0.5, 1, 0],
-"hsla(300, 100%, 75%, 0)", [1, 0.5, 1, 0],
-"hsla(330, 100%, 75%, 0)", [1, 0.5, 0.75, 0],
-"hsla(0, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(30, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(60, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(90, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(120, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(150, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(180, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(210, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(240, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(270, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(300, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(330, 0%, 87.5%, 0)", [0.875, 0.875, 0.875, 0],
-"hsla(0, 12.5%, 87.5%, 0)", [0.890625, 0.859375, 0.859375, 0],
-"hsla(30, 12.5%, 87.5%, 0)", [0.890625, 0.875, 0.859375, 0],
-"hsla(60, 12.5%, 87.5%, 0)", [0.890625, 0.890625, 0.859375, 0],
-"hsla(90, 12.5%, 87.5%, 0)", [0.875, 0.890625, 0.859375, 0],
-"hsla(120, 12.5%, 87.5%, 0)", [0.859375, 0.890625, 0.859375, 0],
-"hsla(150, 12.5%, 87.5%, 0)", [0.859375, 0.890625, 0.875, 0],
-"hsla(180, 12.5%, 87.5%, 0)", [0.859375, 0.890625, 0.890625, 0],
-"hsla(210, 12.5%, 87.5%, 0)", [0.859375, 0.875, 0.890625, 0],
-"hsla(240, 12.5%, 87.5%, 0)", [0.859375, 0.859375, 0.890625, 0],
-"hsla(270, 12.5%, 87.5%, 0)", [0.875, 0.859375, 0.890625, 0],
-"hsla(300, 12.5%, 87.5%, 0)", [0.890625, 0.859375, 0.890625, 0],
-"hsla(330, 12.5%, 87.5%, 0)", [0.890625, 0.859375, 0.875, 0],
-"hsla(0, 25%, 87.5%, 0)", [0.90625, 0.84375, 0.84375, 0],
-"hsla(30, 25%, 87.5%, 0)", [0.90625, 0.875, 0.84375, 0],
-"hsla(60, 25%, 87.5%, 0)", [0.90625, 0.90625, 0.84375, 0],
-"hsla(90, 25%, 87.5%, 0)", [0.875, 0.90625, 0.84375, 0],
-"hsla(120, 25%, 87.5%, 0)", [0.84375, 0.90625, 0.84375, 0],
-"hsla(150, 25%, 87.5%, 0)", [0.84375, 0.90625, 0.875, 0],
-"hsla(180, 25%, 87.5%, 0)", [0.84375, 0.90625, 0.90625, 0],
-"hsla(210, 25%, 87.5%, 0)", [0.84375, 0.875, 0.90625, 0],
-"hsla(240, 25%, 87.5%, 0)", [0.84375, 0.84375, 0.90625, 0],
-"hsla(270, 25%, 87.5%, 0)", [0.875, 0.84375, 0.90625, 0],
-"hsla(300, 25%, 87.5%, 0)", [0.90625, 0.84375, 0.90625, 0],
-"hsla(330, 25%, 87.5%, 0)", [0.90625, 0.84375, 0.875, 0],
-"hsla(0, 37.5%, 87.5%, 0)", [0.921875, 0.828125, 0.828125, 0],
-"hsla(30, 37.5%, 87.5%, 0)", [0.921875, 0.875, 0.828125, 0],
-"hsla(60, 37.5%, 87.5%, 0)", [0.921875, 0.921875, 0.828125, 0],
-"hsla(90, 37.5%, 87.5%, 0)", [0.875, 0.921875, 0.828125, 0],
-"hsla(120, 37.5%, 87.5%, 0)", [0.828125, 0.921875, 0.828125, 0],
-"hsla(150, 37.5%, 87.5%, 0)", [0.828125, 0.921875, 0.875, 0],
-"hsla(180, 37.5%, 87.5%, 0)", [0.828125, 0.921875, 0.921875, 0],
-"hsla(210, 37.5%, 87.5%, 0)", [0.828125, 0.875, 0.921875, 0],
-"hsla(240, 37.5%, 87.5%, 0)", [0.828125, 0.828125, 0.921875, 0],
-"hsla(270, 37.5%, 87.5%, 0)", [0.875, 0.828125, 0.921875, 0],
-"hsla(300, 37.5%, 87.5%, 0)", [0.921875, 0.828125, 0.921875, 0],
-"hsla(330, 37.5%, 87.5%, 0)", [0.921875, 0.828125, 0.875, 0],
-"hsla(0, 50%, 87.5%, 0)", [0.9375, 0.8125, 0.8125, 0],
-"hsla(30, 50%, 87.5%, 0)", [0.9375, 0.875, 0.8125, 0],
-"hsla(60, 50%, 87.5%, 0)", [0.9375, 0.9375, 0.8125, 0],
-"hsla(90, 50%, 87.5%, 0)", [0.875, 0.9375, 0.8125, 0],
-"hsla(120, 50%, 87.5%, 0)", [0.8125, 0.9375, 0.8125, 0],
-"hsla(150, 50%, 87.5%, 0)", [0.8125, 0.9375, 0.875, 0],
-"hsla(180, 50%, 87.5%, 0)", [0.8125, 0.9375, 0.9375, 0],
-"hsla(210, 50%, 87.5%, 0)", [0.8125, 0.875, 0.9375, 0],
-"hsla(240, 50%, 87.5%, 0)", [0.8125, 0.8125, 0.9375, 0],
-"hsla(270, 50%, 87.5%, 0)", [0.875, 0.8125, 0.9375, 0],
-"hsla(300, 50%, 87.5%, 0)", [0.9375, 0.8125, 0.9375, 0],
-"hsla(330, 50%, 87.5%, 0)", [0.9375, 0.8125, 0.875, 0],
-"hsla(0, 62.5%, 87.5%, 0)", [0.953125, 0.796875, 0.796875, 0],
-"hsla(30, 62.5%, 87.5%, 0)", [0.953125, 0.875, 0.796875, 0],
-"hsla(60, 62.5%, 87.5%, 0)", [0.953125, 0.953125, 0.796875, 0],
-"hsla(90, 62.5%, 87.5%, 0)", [0.875, 0.953125, 0.796875, 0],
-"hsla(120, 62.5%, 87.5%, 0)", [0.796875, 0.953125, 0.796875, 0],
-"hsla(150, 62.5%, 87.5%, 0)", [0.796875, 0.953125, 0.875, 0],
-"hsla(180, 62.5%, 87.5%, 0)", [0.796875, 0.953125, 0.953125, 0],
-"hsla(210, 62.5%, 87.5%, 0)", [0.796875, 0.875, 0.953125, 0],
-"hsla(240, 62.5%, 87.5%, 0)", [0.796875, 0.796875, 0.953125, 0],
-"hsla(270, 62.5%, 87.5%, 0)", [0.875, 0.796875, 0.953125, 0],
-"hsla(300, 62.5%, 87.5%, 0)", [0.953125, 0.796875, 0.953125, 0],
-"hsla(330, 62.5%, 87.5%, 0)", [0.953125, 0.796875, 0.875, 0],
-"hsla(0, 75%, 87.5%, 0)", [0.96875, 0.78125, 0.78125, 0],
-"hsla(30, 75%, 87.5%, 0)", [0.96875, 0.875, 0.78125, 0],
-"hsla(60, 75%, 87.5%, 0)", [0.96875, 0.96875, 0.78125, 0],
-"hsla(90, 75%, 87.5%, 0)", [0.875, 0.96875, 0.78125, 0],
-"hsla(120, 75%, 87.5%, 0)", [0.78125, 0.96875, 0.78125, 0],
-"hsla(150, 75%, 87.5%, 0)", [0.78125, 0.96875, 0.875, 0],
-"hsla(180, 75%, 87.5%, 0)", [0.78125, 0.96875, 0.96875, 0],
-"hsla(210, 75%, 87.5%, 0)", [0.78125, 0.875, 0.96875, 0],
-"hsla(240, 75%, 87.5%, 0)", [0.78125, 0.78125, 0.96875, 0],
-"hsla(270, 75%, 87.5%, 0)", [0.875, 0.78125, 0.96875, 0],
-"hsla(300, 75%, 87.5%, 0)", [0.96875, 0.78125, 0.96875, 0],
-"hsla(330, 75%, 87.5%, 0)", [0.96875, 0.78125, 0.875, 0],
-"hsla(0, 87.5%, 87.5%, 0)", [0.984375, 0.765625, 0.765625, 0],
-"hsla(30, 87.5%, 87.5%, 0)", [0.984375, 0.875, 0.765625, 0],
-"hsla(60, 87.5%, 87.5%, 0)", [0.984375, 0.984375, 0.765625, 0],
-"hsla(90, 87.5%, 87.5%, 0)", [0.875, 0.984375, 0.765625, 0],
-"hsla(120, 87.5%, 87.5%, 0)", [0.765625, 0.984375, 0.765625, 0],
-"hsla(150, 87.5%, 87.5%, 0)", [0.765625, 0.984375, 0.875, 0],
-"hsla(180, 87.5%, 87.5%, 0)", [0.765625, 0.984375, 0.984375, 0],
-"hsla(210, 87.5%, 87.5%, 0)", [0.765625, 0.875, 0.984375, 0],
-"hsla(240, 87.5%, 87.5%, 0)", [0.765625, 0.765625, 0.984375, 0],
-"hsla(270, 87.5%, 87.5%, 0)", [0.875, 0.765625, 0.984375, 0],
-"hsla(300, 87.5%, 87.5%, 0)", [0.984375, 0.765625, 0.984375, 0],
-"hsla(330, 87.5%, 87.5%, 0)", [0.984375, 0.765625, 0.875, 0],
-"hsla(0, 100%, 87.5%, 0)", [1, 0.75, 0.75, 0],
-"hsla(30, 100%, 87.5%, 0)", [1, 0.875, 0.75, 0],
-"hsla(60, 100%, 87.5%, 0)", [1, 1, 0.75, 0],
-"hsla(90, 100%, 87.5%, 0)", [0.875, 1, 0.75, 0],
-"hsla(120, 100%, 87.5%, 0)", [0.75, 1, 0.75, 0],
-"hsla(150, 100%, 87.5%, 0)", [0.75, 1, 0.875, 0],
-"hsla(180, 100%, 87.5%, 0)", [0.75, 1, 1, 0],
-"hsla(210, 100%, 87.5%, 0)", [0.75, 0.875, 1, 0],
-"hsla(240, 100%, 87.5%, 0)", [0.75, 0.75, 1, 0],
-"hsla(270, 100%, 87.5%, 0)", [0.875, 0.75, 1, 0],
-"hsla(300, 100%, 87.5%, 0)", [1, 0.75, 1, 0],
-"hsla(330, 100%, 87.5%, 0)", [1, 0.75, 0.875, 0],
-"hsla(0, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 0%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 12.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 25%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 37.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 50%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 62.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 75%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 87.5%, 100%, 0)", [1, 1, 1, 0],
-"hsla(0, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(30, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(60, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(90, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(120, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(150, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(180, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(210, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(240, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(270, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(300, 100%, 100%, 0)", [1, 1, 1, 0],
-"hsla(330, 100%, 100%, 0)", [1, 1, 1, 0]
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_keywords.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_keywords.json
deleted file mode 100644
index 903ae02..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/color3_keywords.json
+++ /dev/null
@@ -1,803 +0,0 @@
-[
-"transparent", [0, 0, 0, 0],
-"Transparent", [0, 0, 0, 0],
-"\\transparent", [0, 0, 0, 0],
-"\\74 ransparent", [0, 0, 0, 0],
-"ransparent", null,
-"black", [0, 0, 0, 1],
-"bLack", [0, 0, 0, 1],
-"b\\lack", [0, 0, 0, 1],
-"b\\6C ack", [0, 0, 0, 1],
-"back", null,
-"blacK", null,
-"silver", [192, 192, 192, 1],
-"siLver", [192, 192, 192, 1],
-"si\\lver", [192, 192, 192, 1],
-"si\\6C ver", [192, 192, 192, 1],
-"siver", null,
-"gray", [128, 128, 128, 1],
-"graY", [128, 128, 128, 1],
-"gra\\y", [128, 128, 128, 1],
-"gra\\79 ", [128, 128, 128, 1],
-"gra", null,
-"white", [255, 255, 255, 1],
-"whitE", [255, 255, 255, 1],
-"whit\\65 ", [255, 255, 255, 1],
-"whit", null,
-"maroon", [128, 0, 0, 1],
-"marooN", [128, 0, 0, 1],
-"maroo\\n", [128, 0, 0, 1],
-"maroo\\6E ", [128, 0, 0, 1],
-"maroo", null,
-"red", [255, 0, 0, 1],
-"Red", [255, 0, 0, 1],
-"\\red", [255, 0, 0, 1],
-"\\72 ed", [255, 0, 0, 1],
-"ed", null,
-"purple", [128, 0, 128, 1],
-"pUrple", [128, 0, 128, 1],
-"p\\urple", [128, 0, 128, 1],
-"p\\75 rple", [128, 0, 128, 1],
-"prple", null,
-"fuchsia", [255, 0, 255, 1],
-"fUchsia", [255, 0, 255, 1],
-"f\\uchsia", [255, 0, 255, 1],
-"f\\75 chsia", [255, 0, 255, 1],
-"fchsia", null,
-"green", [0, 128, 0, 1],
-"greeN", [0, 128, 0, 1],
-"gree\\n", [0, 128, 0, 1],
-"gree\\6E ", [0, 128, 0, 1],
-"gree", null,
-"lime", [0, 255, 0, 1],
-"liMe", [0, 255, 0, 1],
-"li\\me", [0, 255, 0, 1],
-"li\\6D e", [0, 255, 0, 1],
-"lie", null,
-"olive", [128, 128, 0, 1],
-"oLive", [128, 128, 0, 1],
-"o\\live", [128, 128, 0, 1],
-"o\\6C ive", [128, 128, 0, 1],
-"oive", null,
-"yellow", [255, 255, 0, 1],
-"Yellow", [255, 255, 0, 1],
-"\\yellow", [255, 255, 0, 1],
-"\\79 ellow", [255, 255, 0, 1],
-"ellow", null,
-"navy", [0, 0, 128, 1],
-"nAvy", [0, 0, 128, 1],
-"n\\61 vy", [0, 0, 128, 1],
-"nvy", null,
-"blue", [0, 0, 255, 1],
-"blUe", [0, 0, 255, 1],
-"bl\\ue", [0, 0, 255, 1],
-"bl\\75 e", [0, 0, 255, 1],
-"ble", null,
-"teal", [0, 128, 128, 1],
-"teaL", [0, 128, 128, 1],
-"tea\\l", [0, 128, 128, 1],
-"tea\\6C ", [0, 128, 128, 1],
-"tea", null,
-"aqua", [0, 255, 255, 1],
-"Aqua", [0, 255, 255, 1],
-"\\61 qua", [0, 255, 255, 1],
-"qua", null,
-"aliceblue", [240, 248, 255, 1],
-"alicebluE", [240, 248, 255, 1],
-"aliceblu\\65 ", [240, 248, 255, 1],
-"aliceblu", null,
-"antiquewhite", [250, 235, 215, 1],
-"antiquEwhite", [250, 235, 215, 1],
-"antiqu\\65 white", [250, 235, 215, 1],
-"antiquwhite", null,
-"aqua", [0, 255, 255, 1],
-"aquA", [0, 255, 255, 1],
-"aqu\\61 ", [0, 255, 255, 1],
-"aqu", null,
-"aquamarine", [127, 255, 212, 1],
-"Aquamarine", [127, 255, 212, 1],
-"\\61 quamarine", [127, 255, 212, 1],
-"quamarine", null,
-"azure", [240, 255, 255, 1],
-"aZure", [240, 255, 255, 1],
-"a\\zure", [240, 255, 255, 1],
-"a\\7A ure", [240, 255, 255, 1],
-"aure", null,
-"beige", [245, 245, 220, 1],
-"beIge", [245, 245, 220, 1],
-"be\\ige", [245, 245, 220, 1],
-"be\\69 ge", [245, 245, 220, 1],
-"bege", null,
-"bisque", [255, 228, 196, 1],
-"bisquE", [255, 228, 196, 1],
-"bisqu\\65 ", [255, 228, 196, 1],
-"bisqu", null,
-"black", [0, 0, 0, 1],
-"blacK", [0, 0, 0, 1],
-"blac\\k", [0, 0, 0, 1],
-"blac\\6B ", [0, 0, 0, 1],
-"blac", null,
-"blacK", null,
-"blanchedalmond", [255, 235, 205, 1],
-"blanchedalmOnd", [255, 235, 205, 1],
-"blanchedalm\\ond", [255, 235, 205, 1],
-"blanchedalm\\6F nd", [255, 235, 205, 1],
-"blanchedalmnd", null,
-"blue", [0, 0, 255, 1],
-"blUe", [0, 0, 255, 1],
-"bl\\ue", [0, 0, 255, 1],
-"bl\\75 e", [0, 0, 255, 1],
-"ble", null,
-"blueviolet", [138, 43, 226, 1],
-"bluevioLet", [138, 43, 226, 1],
-"bluevio\\let", [138, 43, 226, 1],
-"bluevio\\6C et", [138, 43, 226, 1],
-"bluevioet", null,
-"brown", [165, 42, 42, 1],
-"broWn", [165, 42, 42, 1],
-"bro\\wn", [165, 42, 42, 1],
-"bro\\77 n", [165, 42, 42, 1],
-"bron", null,
-"burlywood", [222, 184, 135, 1],
-"buRlywood", [222, 184, 135, 1],
-"bu\\rlywood", [222, 184, 135, 1],
-"bu\\72 lywood", [222, 184, 135, 1],
-"bulywood", null,
-"cadetblue", [95, 158, 160, 1],
-"cadEtblue", [95, 158, 160, 1],
-"cad\\65 tblue", [95, 158, 160, 1],
-"cadtblue", null,
-"chartreuse", [127, 255, 0, 1],
-"cHartreuse", [127, 255, 0, 1],
-"c\\hartreuse", [127, 255, 0, 1],
-"c\\68 artreuse", [127, 255, 0, 1],
-"cartreuse", null,
-"chocolate", [210, 105, 30, 1],
-"chocoLate", [210, 105, 30, 1],
-"choco\\late", [210, 105, 30, 1],
-"choco\\6C ate", [210, 105, 30, 1],
-"chocoate", null,
-"coral", [255, 127, 80, 1],
-"corAl", [255, 127, 80, 1],
-"cor\\61 l", [255, 127, 80, 1],
-"corl", null,
-"cornflowerblue", [100, 149, 237, 1],
-"cornflOwerblue", [100, 149, 237, 1],
-"cornfl\\owerblue", [100, 149, 237, 1],
-"cornfl\\6F werblue", [100, 149, 237, 1],
-"cornflwerblue", null,
-"cornsilk", [255, 248, 220, 1],
-"corNsilk", [255, 248, 220, 1],
-"cor\\nsilk", [255, 248, 220, 1],
-"cor\\6E silk", [255, 248, 220, 1],
-"corsilk", null,
-"cornsilK", null,
-"crimson", [220, 20, 60, 1],
-"cRimson", [220, 20, 60, 1],
-"c\\rimson", [220, 20, 60, 1],
-"c\\72 imson", [220, 20, 60, 1],
-"cimson", null,
-"cyan", [0, 255, 255, 1],
-"cYan", [0, 255, 255, 1],
-"c\\yan", [0, 255, 255, 1],
-"c\\79 an", [0, 255, 255, 1],
-"can", null,
-"darkblue", [0, 0, 139, 1],
-"darkblUe", [0, 0, 139, 1],
-"darkbl\\ue", [0, 0, 139, 1],
-"darkbl\\75 e", [0, 0, 139, 1],
-"darkble", null,
-"darKblue", null,
-"darkcyan", [0, 139, 139, 1],
-"darkcyaN", [0, 139, 139, 1],
-"darkcya\\n", [0, 139, 139, 1],
-"darkcya\\6E ", [0, 139, 139, 1],
-"darkcya", null,
-"darKcyan", null,
-"darkgoldenrod", [184, 134, 11, 1],
-"dArkgoldenrod", [184, 134, 11, 1],
-"d\\61 rkgoldenrod", [184, 134, 11, 1],
-"drkgoldenrod", null,
-"darKgoldenrod", null,
-"darkgray", [169, 169, 169, 1],
-"dArkgray", [169, 169, 169, 1],
-"d\\61 rkgray", [169, 169, 169, 1],
-"drkgray", null,
-"darKgray", null,
-"darkgreen", [0, 100, 0, 1],
-"darkgrEen", [0, 100, 0, 1],
-"darkgr\\65 en", [0, 100, 0, 1],
-"darkgren", null,
-"darKgreen", null,
-"darkgrey", [169, 169, 169, 1],
-"darKgrey", [169, 169, 169, 1],
-"dar\\kgrey", [169, 169, 169, 1],
-"dar\\6B grey", [169, 169, 169, 1],
-"dargrey", null,
-"darKgrey", null,
-"darkkhaki", [189, 183, 107, 1],
-"darkkhakI", [189, 183, 107, 1],
-"darkkhak\\i", [189, 183, 107, 1],
-"darkkhak\\69 ", [189, 183, 107, 1],
-"darkkhak", null,
-"darKKhaKi", null,
-"darkmagenta", [139, 0, 139, 1],
-"dArkmagenta", [139, 0, 139, 1],
-"d\\61 rkmagenta", [139, 0, 139, 1],
-"drkmagenta", null,
-"darKmagenta", null,
-"darkolivegreen", [85, 107, 47, 1],
-"darkOlivegreen", [85, 107, 47, 1],
-"dark\\olivegreen", [85, 107, 47, 1],
-"dark\\6F livegreen", [85, 107, 47, 1],
-"darklivegreen", null,
-"darKolivegreen", null,
-"darkorange", [255, 140, 0, 1],
-"darkoraNge", [255, 140, 0, 1],
-"darkora\\nge", [255, 140, 0, 1],
-"darkora\\6E ge", [255, 140, 0, 1],
-"darkorage", null,
-"darKorange", null,
-"darkorchid", [153, 50, 204, 1],
-"darkorchId", [153, 50, 204, 1],
-"darkorch\\id", [153, 50, 204, 1],
-"darkorch\\69 d", [153, 50, 204, 1],
-"darkorchd", null,
-"darKorchid", null,
-"darkred", [139, 0, 0, 1],
-"Darkred", [139, 0, 0, 1],
-"\\64 arkred", [139, 0, 0, 1],
-"arkred", null,
-"darKred", null,
-"darksalmon", [233, 150, 122, 1],
-"Darksalmon", [233, 150, 122, 1],
-"\\64 arksalmon", [233, 150, 122, 1],
-"arksalmon", null,
-"darKsalmon", null,
-"darkseagreen", [143, 188, 143, 1],
-"darKseagreen", [143, 188, 143, 1],
-"dar\\kseagreen", [143, 188, 143, 1],
-"dar\\6B seagreen", [143, 188, 143, 1],
-"darseagreen", null,
-"darKseagreen", null,
-"darkslateblue", [72, 61, 139, 1],
-"Darkslateblue", [72, 61, 139, 1],
-"\\64 arkslateblue", [72, 61, 139, 1],
-"arkslateblue", null,
-"darKslateblue", null,
-"darkslategray", [47, 79, 79, 1],
-"dArkslategray", [47, 79, 79, 1],
-"d\\61 rkslategray", [47, 79, 79, 1],
-"drkslategray", null,
-"darKslategray", null,
-"darkslategrey", [47, 79, 79, 1],
-"daRkslategrey", [47, 79, 79, 1],
-"da\\rkslategrey", [47, 79, 79, 1],
-"da\\72 kslategrey", [47, 79, 79, 1],
-"dakslategrey", null,
-"darKslategrey", null,
-"darkturquoise", [0, 206, 209, 1],
-"darKturquoise", [0, 206, 209, 1],
-"dar\\kturquoise", [0, 206, 209, 1],
-"dar\\6B turquoise", [0, 206, 209, 1],
-"darturquoise", null,
-"darKturquoise", null,
-"darkviolet", [148, 0, 211, 1],
-"darkviOlet", [148, 0, 211, 1],
-"darkvi\\olet", [148, 0, 211, 1],
-"darkvi\\6F let", [148, 0, 211, 1],
-"darkvilet", null,
-"darKviolet", null,
-"deeppink", [255, 20, 147, 1],
-"dEeppink", [255, 20, 147, 1],
-"d\\65 eppink", [255, 20, 147, 1],
-"deppink", null,
-"deeppinK", null,
-"deepskyblue", [0, 191, 255, 1],
-"deePskyblue", [0, 191, 255, 1],
-"dee\\pskyblue", [0, 191, 255, 1],
-"dee\\70 skyblue", [0, 191, 255, 1],
-"deeskyblue", null,
-"deepsKyblue", null,
-"dimgray", [105, 105, 105, 1],
-"dimGray", [105, 105, 105, 1],
-"dim\\gray", [105, 105, 105, 1],
-"dim\\67 ray", [105, 105, 105, 1],
-"dimray", null,
-"dimgrey", [105, 105, 105, 1],
-"dimgRey", [105, 105, 105, 1],
-"dimg\\rey", [105, 105, 105, 1],
-"dimg\\72 ey", [105, 105, 105, 1],
-"dimgey", null,
-"dodgerblue", [30, 144, 255, 1],
-"dOdgerblue", [30, 144, 255, 1],
-"d\\odgerblue", [30, 144, 255, 1],
-"d\\6F dgerblue", [30, 144, 255, 1],
-"ddgerblue", null,
-"firebrick", [178, 34, 34, 1],
-"firebricK", [178, 34, 34, 1],
-"firebric\\k", [178, 34, 34, 1],
-"firebric\\6B ", [178, 34, 34, 1],
-"firebric", null,
-"firebricK", null,
-"floralwhite", [255, 250, 240, 1],
-"floralwhIte", [255, 250, 240, 1],
-"floralwh\\ite", [255, 250, 240, 1],
-"floralwh\\69 te", [255, 250, 240, 1],
-"floralwhte", null,
-"forestgreen", [34, 139, 34, 1],
-"forestgreEn", [34, 139, 34, 1],
-"forestgre\\65 n", [34, 139, 34, 1],
-"forestgren", null,
-"fuchsia", [255, 0, 255, 1],
-"fuChsia", [255, 0, 255, 1],
-"fu\\63 hsia", [255, 0, 255, 1],
-"fuhsia", null,
-"gainsboro", [220, 220, 220, 1],
-"gaiNsboro", [220, 220, 220, 1],
-"gai\\nsboro", [220, 220, 220, 1],
-"gai\\6E sboro", [220, 220, 220, 1],
-"gaisboro", null,
-"ghostwhite", [248, 248, 255, 1],
-"ghostwhIte", [248, 248, 255, 1],
-"ghostwh\\ite", [248, 248, 255, 1],
-"ghostwh\\69 te", [248, 248, 255, 1],
-"ghostwhte", null,
-"gold", [255, 215, 0, 1],
-"Gold", [255, 215, 0, 1],
-"\\gold", [255, 215, 0, 1],
-"\\67 old", [255, 215, 0, 1],
-"old", null,
-"goldenrod", [218, 165, 32, 1],
-"goldenRod", [218, 165, 32, 1],
-"golden\\rod", [218, 165, 32, 1],
-"golden\\72 od", [218, 165, 32, 1],
-"goldenod", null,
-"gray", [128, 128, 128, 1],
-"grAy", [128, 128, 128, 1],
-"gr\\61 y", [128, 128, 128, 1],
-"gry", null,
-"green", [0, 128, 0, 1],
-"gReen", [0, 128, 0, 1],
-"g\\reen", [0, 128, 0, 1],
-"g\\72 een", [0, 128, 0, 1],
-"geen", null,
-"greenyellow", [173, 255, 47, 1],
-"greenyEllow", [173, 255, 47, 1],
-"greeny\\65 llow", [173, 255, 47, 1],
-"greenyllow", null,
-"grey", [128, 128, 128, 1],
-"gRey", [128, 128, 128, 1],
-"g\\rey", [128, 128, 128, 1],
-"g\\72 ey", [128, 128, 128, 1],
-"gey", null,
-"honeydew", [240, 255, 240, 1],
-"hoNeydew", [240, 255, 240, 1],
-"ho\\neydew", [240, 255, 240, 1],
-"ho\\6E eydew", [240, 255, 240, 1],
-"hoeydew", null,
-"hotpink", [255, 105, 180, 1],
-"hotpiNk", [255, 105, 180, 1],
-"hotpi\\nk", [255, 105, 180, 1],
-"hotpi\\6E k", [255, 105, 180, 1],
-"hotpik", null,
-"hotpinK", null,
-"indianred", [205, 92, 92, 1],
-"indiAnred", [205, 92, 92, 1],
-"indi\\61 nred", [205, 92, 92, 1],
-"indinred", null,
-"indigo", [75, 0, 130, 1],
-"indigO", [75, 0, 130, 1],
-"indig\\o", [75, 0, 130, 1],
-"indig\\6F ", [75, 0, 130, 1],
-"indig", null,
-"ivory", [255, 255, 240, 1],
-"ivoRy", [255, 255, 240, 1],
-"ivo\\ry", [255, 255, 240, 1],
-"ivo\\72 y", [255, 255, 240, 1],
-"ivoy", null,
-"khaki", [240, 230, 140, 1],
-"khakI", [240, 230, 140, 1],
-"khak\\i", [240, 230, 140, 1],
-"khak\\69 ", [240, 230, 140, 1],
-"khak", null,
-"KhaKi", null,
-"lavender", [230, 230, 250, 1],
-"Lavender", [230, 230, 250, 1],
-"\\lavender", [230, 230, 250, 1],
-"\\6C avender", [230, 230, 250, 1],
-"avender", null,
-"lavenderblush", [255, 240, 245, 1],
-"lavEnderblush", [255, 240, 245, 1],
-"lav\\65 nderblush", [255, 240, 245, 1],
-"lavnderblush", null,
-"lawngreen", [124, 252, 0, 1],
-"lAwngreen", [124, 252, 0, 1],
-"l\\61 wngreen", [124, 252, 0, 1],
-"lwngreen", null,
-"lemonchiffon", [255, 250, 205, 1],
-"lemonchiffoN", [255, 250, 205, 1],
-"lemonchiffo\\n", [255, 250, 205, 1],
-"lemonchiffo\\6E ", [255, 250, 205, 1],
-"lemonchiffo", null,
-"lightblue", [173, 216, 230, 1],
-"ligHtblue", [173, 216, 230, 1],
-"lig\\htblue", [173, 216, 230, 1],
-"lig\\68 tblue", [173, 216, 230, 1],
-"ligtblue", null,
-"lightcoral", [240, 128, 128, 1],
-"lightCoral", [240, 128, 128, 1],
-"light\\63 oral", [240, 128, 128, 1],
-"lightoral", null,
-"lightcyan", [224, 255, 255, 1],
-"lightCyan", [224, 255, 255, 1],
-"light\\63 yan", [224, 255, 255, 1],
-"lightyan", null,
-"lightgoldenrodyellow", [250, 250, 210, 1],
-"lightgoLdenrodyellow", [250, 250, 210, 1],
-"lightgo\\ldenrodyellow", [250, 250, 210, 1],
-"lightgo\\6C denrodyellow", [250, 250, 210, 1],
-"lightgodenrodyellow", null,
-"lightgray", [211, 211, 211, 1],
-"lightgrAy", [211, 211, 211, 1],
-"lightgr\\61 y", [211, 211, 211, 1],
-"lightgry", null,
-"lightgreen", [144, 238, 144, 1],
-"lightgreeN", [144, 238, 144, 1],
-"lightgree\\n", [144, 238, 144, 1],
-"lightgree\\6E ", [144, 238, 144, 1],
-"lightgree", null,
-"lightgrey", [211, 211, 211, 1],
-"Lightgrey", [211, 211, 211, 1],
-"\\lightgrey", [211, 211, 211, 1],
-"\\6C ightgrey", [211, 211, 211, 1],
-"ightgrey", null,
-"lightpink", [255, 182, 193, 1],
-"lIghtpink", [255, 182, 193, 1],
-"l\\ightpink", [255, 182, 193, 1],
-"l\\69 ghtpink", [255, 182, 193, 1],
-"lghtpink", null,
-"lightpinK", null,
-"lightsalmon", [255, 160, 122, 1],
-"lighTsalmon", [255, 160, 122, 1],
-"ligh\\tsalmon", [255, 160, 122, 1],
-"ligh\\74 salmon", [255, 160, 122, 1],
-"lighsalmon", null,
-"lightseagreen", [32, 178, 170, 1],
-"liGhtseagreen", [32, 178, 170, 1],
-"li\\ghtseagreen", [32, 178, 170, 1],
-"li\\67 htseagreen", [32, 178, 170, 1],
-"lihtseagreen", null,
-"lightskyblue", [135, 206, 250, 1],
-"lightskyblUe", [135, 206, 250, 1],
-"lightskybl\\ue", [135, 206, 250, 1],
-"lightskybl\\75 e", [135, 206, 250, 1],
-"lightskyble", null,
-"lightsKyblue", null,
-"lightslategray", [119, 136, 153, 1],
-"lightslategRay", [119, 136, 153, 1],
-"lightslateg\\ray", [119, 136, 153, 1],
-"lightslateg\\72 ay", [119, 136, 153, 1],
-"lightslategay", null,
-"lightslategrey", [119, 136, 153, 1],
-"lightslategrEy", [119, 136, 153, 1],
-"lightslategr\\65 y", [119, 136, 153, 1],
-"lightslategry", null,
-"lightsteelblue", [176, 196, 222, 1],
-"lightsteelbluE", [176, 196, 222, 1],
-"lightsteelblu\\65 ", [176, 196, 222, 1],
-"lightsteelblu", null,
-"lightyellow", [255, 255, 224, 1],
-"lightyelloW", [255, 255, 224, 1],
-"lightyello\\w", [255, 255, 224, 1],
-"lightyello\\77 ", [255, 255, 224, 1],
-"lightyello", null,
-"lime", [0, 255, 0, 1],
-"limE", [0, 255, 0, 1],
-"lim\\65 ", [0, 255, 0, 1],
-"lim", null,
-"limegreen", [50, 205, 50, 1],
-"lImegreen", [50, 205, 50, 1],
-"l\\imegreen", [50, 205, 50, 1],
-"l\\69 megreen", [50, 205, 50, 1],
-"lmegreen", null,
-"linen", [250, 240, 230, 1],
-"lInen", [250, 240, 230, 1],
-"l\\inen", [250, 240, 230, 1],
-"l\\69 nen", [250, 240, 230, 1],
-"lnen", null,
-"magenta", [255, 0, 255, 1],
-"mageNta", [255, 0, 255, 1],
-"mage\\nta", [255, 0, 255, 1],
-"mage\\6E ta", [255, 0, 255, 1],
-"mageta", null,
-"maroon", [128, 0, 0, 1],
-"mAroon", [128, 0, 0, 1],
-"m\\61 roon", [128, 0, 0, 1],
-"mroon", null,
-"mediumaquamarine", [102, 205, 170, 1],
-"mediumaqUamarine", [102, 205, 170, 1],
-"mediumaq\\uamarine", [102, 205, 170, 1],
-"mediumaq\\75 amarine", [102, 205, 170, 1],
-"mediumaqamarine", null,
-"mediumblue", [0, 0, 205, 1],
-"mediuMblue", [0, 0, 205, 1],
-"mediu\\mblue", [0, 0, 205, 1],
-"mediu\\6D blue", [0, 0, 205, 1],
-"mediublue", null,
-"mediumorchid", [186, 85, 211, 1],
-"mediumorchId", [186, 85, 211, 1],
-"mediumorch\\id", [186, 85, 211, 1],
-"mediumorch\\69 d", [186, 85, 211, 1],
-"mediumorchd", null,
-"mediumpurple", [147, 112, 219, 1],
-"mediumpurplE", [147, 112, 219, 1],
-"mediumpurpl\\65 ", [147, 112, 219, 1],
-"mediumpurpl", null,
-"mediumseagreen", [60, 179, 113, 1],
-"mediumseagReen", [60, 179, 113, 1],
-"mediumseag\\reen", [60, 179, 113, 1],
-"mediumseag\\72 een", [60, 179, 113, 1],
-"mediumseageen", null,
-"mediumslateblue", [123, 104, 238, 1],
-"mediUmslateblue", [123, 104, 238, 1],
-"medi\\umslateblue", [123, 104, 238, 1],
-"medi\\75 mslateblue", [123, 104, 238, 1],
-"medimslateblue", null,
-"mediumspringgreen", [0, 250, 154, 1],
-"mediumspRinggreen", [0, 250, 154, 1],
-"mediumsp\\ringgreen", [0, 250, 154, 1],
-"mediumsp\\72 inggreen", [0, 250, 154, 1],
-"mediumspinggreen", null,
-"mediumturquoise", [72, 209, 204, 1],
-"mediumTurquoise", [72, 209, 204, 1],
-"medium\\turquoise", [72, 209, 204, 1],
-"medium\\74 urquoise", [72, 209, 204, 1],
-"mediumurquoise", null,
-"mediumvioletred", [199, 21, 133, 1],
-"mediumvIoletred", [199, 21, 133, 1],
-"mediumv\\ioletred", [199, 21, 133, 1],
-"mediumv\\69 oletred", [199, 21, 133, 1],
-"mediumvoletred", null,
-"midnightblue", [25, 25, 112, 1],
-"midniGhtblue", [25, 25, 112, 1],
-"midni\\ghtblue", [25, 25, 112, 1],
-"midni\\67 htblue", [25, 25, 112, 1],
-"midnihtblue", null,
-"mintcream", [245, 255, 250, 1],
-"mintcrEam", [245, 255, 250, 1],
-"mintcr\\65 am", [245, 255, 250, 1],
-"mintcram", null,
-"mistyrose", [255, 228, 225, 1],
-"mistyroSe", [255, 228, 225, 1],
-"mistyro\\se", [255, 228, 225, 1],
-"mistyro\\73 e", [255, 228, 225, 1],
-"mistyroe", null,
-"moccasin", [255, 228, 181, 1],
-"moccAsin", [255, 228, 181, 1],
-"mocc\\61 sin", [255, 228, 181, 1],
-"moccsin", null,
-"navajowhite", [255, 222, 173, 1],
-"navajowHite", [255, 222, 173, 1],
-"navajow\\hite", [255, 222, 173, 1],
-"navajow\\68 ite", [255, 222, 173, 1],
-"navajowite", null,
-"navy", [0, 0, 128, 1],
-"naVy", [0, 0, 128, 1],
-"na\\vy", [0, 0, 128, 1],
-"na\\76 y", [0, 0, 128, 1],
-"nay", null,
-"oldlace", [253, 245, 230, 1],
-"Oldlace", [253, 245, 230, 1],
-"\\oldlace", [253, 245, 230, 1],
-"\\6F ldlace", [253, 245, 230, 1],
-"ldlace", null,
-"olive", [128, 128, 0, 1],
-"Olive", [128, 128, 0, 1],
-"\\olive", [128, 128, 0, 1],
-"\\6F live", [128, 128, 0, 1],
-"live", null,
-"olivedrab", [107, 142, 35, 1],
-"olivEdrab", [107, 142, 35, 1],
-"oliv\\65 drab", [107, 142, 35, 1],
-"olivdrab", null,
-"orange", [255, 165, 0, 1],
-"orAnge", [255, 165, 0, 1],
-"or\\61 nge", [255, 165, 0, 1],
-"ornge", null,
-"orangered", [255, 69, 0, 1],
-"orangeRed", [255, 69, 0, 1],
-"orange\\red", [255, 69, 0, 1],
-"orange\\72 ed", [255, 69, 0, 1],
-"orangeed", null,
-"orchid", [218, 112, 214, 1],
-"orchId", [218, 112, 214, 1],
-"orch\\id", [218, 112, 214, 1],
-"orch\\69 d", [218, 112, 214, 1],
-"orchd", null,
-"palegoldenrod", [238, 232, 170, 1],
-"palegoldEnrod", [238, 232, 170, 1],
-"palegold\\65 nrod", [238, 232, 170, 1],
-"palegoldnrod", null,
-"palegreen", [152, 251, 152, 1],
-"Palegreen", [152, 251, 152, 1],
-"\\palegreen", [152, 251, 152, 1],
-"\\70 alegreen", [152, 251, 152, 1],
-"alegreen", null,
-"paleturquoise", [175, 238, 238, 1],
-"paleturquoIse", [175, 238, 238, 1],
-"paleturquo\\ise", [175, 238, 238, 1],
-"paleturquo\\69 se", [175, 238, 238, 1],
-"paleturquose", null,
-"palevioletred", [219, 112, 147, 1],
-"palevioletrEd", [219, 112, 147, 1],
-"palevioletr\\65 d", [219, 112, 147, 1],
-"palevioletrd", null,
-"papayawhip", [255, 239, 213, 1],
-"papayawhiP", [255, 239, 213, 1],
-"papayawhi\\p", [255, 239, 213, 1],
-"papayawhi\\70 ", [255, 239, 213, 1],
-"papayawhi", null,
-"peachpuff", [255, 218, 185, 1],
-"peacHpuff", [255, 218, 185, 1],
-"peac\\hpuff", [255, 218, 185, 1],
-"peac\\68 puff", [255, 218, 185, 1],
-"peacpuff", null,
-"peru", [205, 133, 63, 1],
-"perU", [205, 133, 63, 1],
-"per\\u", [205, 133, 63, 1],
-"per\\75 ", [205, 133, 63, 1],
-"per", null,
-"pink", [255, 192, 203, 1],
-"Pink", [255, 192, 203, 1],
-"\\pink", [255, 192, 203, 1],
-"\\70 ink", [255, 192, 203, 1],
-"ink", null,
-"pinK", null,
-"plum", [221, 160, 221, 1],
-"pLum", [221, 160, 221, 1],
-"p\\lum", [221, 160, 221, 1],
-"p\\6C um", [221, 160, 221, 1],
-"pum", null,
-"powderblue", [176, 224, 230, 1],
-"powdErblue", [176, 224, 230, 1],
-"powd\\65 rblue", [176, 224, 230, 1],
-"powdrblue", null,
-"purple", [128, 0, 128, 1],
-"purPle", [128, 0, 128, 1],
-"pur\\ple", [128, 0, 128, 1],
-"pur\\70 le", [128, 0, 128, 1],
-"purle", null,
-"red", [255, 0, 0, 1],
-"rEd", [255, 0, 0, 1],
-"r\\65 d", [255, 0, 0, 1],
-"rd", null,
-"rosybrown", [188, 143, 143, 1],
-"roSybrown", [188, 143, 143, 1],
-"ro\\sybrown", [188, 143, 143, 1],
-"ro\\73 ybrown", [188, 143, 143, 1],
-"roybrown", null,
-"royalblue", [65, 105, 225, 1],
-"royAlblue", [65, 105, 225, 1],
-"roy\\61 lblue", [65, 105, 225, 1],
-"roylblue", null,
-"saddlebrown", [139, 69, 19, 1],
-"saddlebRown", [139, 69, 19, 1],
-"saddleb\\rown", [139, 69, 19, 1],
-"saddleb\\72 own", [139, 69, 19, 1],
-"saddlebown", null,
-"salmon", [250, 128, 114, 1],
-"saLmon", [250, 128, 114, 1],
-"sa\\lmon", [250, 128, 114, 1],
-"sa\\6C mon", [250, 128, 114, 1],
-"samon", null,
-"sandybrown", [244, 164, 96, 1],
-"sAndybrown", [244, 164, 96, 1],
-"s\\61 ndybrown", [244, 164, 96, 1],
-"sndybrown", null,
-"seagreen", [46, 139, 87, 1],
-"seagreEn", [46, 139, 87, 1],
-"seagre\\65 n", [46, 139, 87, 1],
-"seagren", null,
-"seashell", [255, 245, 238, 1],
-"seashelL", [255, 245, 238, 1],
-"seashel\\l", [255, 245, 238, 1],
-"seashel\\6C ", [255, 245, 238, 1],
-"seashel", null,
-"sienna", [160, 82, 45, 1],
-"Sienna", [160, 82, 45, 1],
-"\\sienna", [160, 82, 45, 1],
-"\\73 ienna", [160, 82, 45, 1],
-"ienna", null,
-"silver", [192, 192, 192, 1],
-"sIlver", [192, 192, 192, 1],
-"s\\ilver", [192, 192, 192, 1],
-"s\\69 lver", [192, 192, 192, 1],
-"slver", null,
-"skyblue", [135, 206, 235, 1],
-"skybluE", [135, 206, 235, 1],
-"skyblu\\65 ", [135, 206, 235, 1],
-"skyblu", null,
-"sKyblue", null,
-"slateblue", [106, 90, 205, 1],
-"slaTeblue", [106, 90, 205, 1],
-"sla\\teblue", [106, 90, 205, 1],
-"sla\\74 eblue", [106, 90, 205, 1],
-"slaeblue", null,
-"slategray", [112, 128, 144, 1],
-"slatEgray", [112, 128, 144, 1],
-"slat\\65 gray", [112, 128, 144, 1],
-"slatgray", null,
-"slategrey", [112, 128, 144, 1],
-"slateGrey", [112, 128, 144, 1],
-"slate\\grey", [112, 128, 144, 1],
-"slate\\67 rey", [112, 128, 144, 1],
-"slaterey", null,
-"snow", [255, 250, 250, 1],
-"snOw", [255, 250, 250, 1],
-"sn\\ow", [255, 250, 250, 1],
-"sn\\6F w", [255, 250, 250, 1],
-"snw", null,
-"springgreen", [0, 255, 127, 1],
-"springgrEen", [0, 255, 127, 1],
-"springgr\\65 en", [0, 255, 127, 1],
-"springgren", null,
-"steelblue", [70, 130, 180, 1],
-"steelbluE", [70, 130, 180, 1],
-"steelblu\\65 ", [70, 130, 180, 1],
-"steelblu", null,
-"tan", [210, 180, 140, 1],
-"Tan", [210, 180, 140, 1],
-"\\tan", [210, 180, 140, 1],
-"\\74 an", [210, 180, 140, 1],
-"an", null,
-"teal", [0, 128, 128, 1],
-"teAl", [0, 128, 128, 1],
-"te\\61 l", [0, 128, 128, 1],
-"tel", null,
-"thistle", [216, 191, 216, 1],
-"tHistle", [216, 191, 216, 1],
-"t\\histle", [216, 191, 216, 1],
-"t\\68 istle", [216, 191, 216, 1],
-"tistle", null,
-"tomato", [255, 99, 71, 1],
-"Tomato", [255, 99, 71, 1],
-"\\tomato", [255, 99, 71, 1],
-"\\74 omato", [255, 99, 71, 1],
-"omato", null,
-"turquoise", [64, 224, 208, 1],
-"turqUoise", [64, 224, 208, 1],
-"turq\\uoise", [64, 224, 208, 1],
-"turq\\75 oise", [64, 224, 208, 1],
-"turqoise", null,
-"violet", [238, 130, 238, 1],
-"viOlet", [238, 130, 238, 1],
-"vi\\olet", [238, 130, 238, 1],
-"vi\\6F let", [238, 130, 238, 1],
-"vilet", null,
-"wheat", [245, 222, 179, 1],
-"wheaT", [245, 222, 179, 1],
-"whea\\t", [245, 222, 179, 1],
-"whea\\74 ", [245, 222, 179, 1],
-"whea", null,
-"white", [255, 255, 255, 1],
-"White", [255, 255, 255, 1],
-"\\white", [255, 255, 255, 1],
-"\\77 hite", [255, 255, 255, 1],
-"hite", null,
-"whitesmoke", [245, 245, 245, 1],
-"wHitesmoke", [245, 245, 245, 1],
-"w\\hitesmoke", [245, 245, 245, 1],
-"w\\68 itesmoke", [245, 245, 245, 1],
-"witesmoke", null,
-"whitesmoKe", null,
-"yellow", [255, 255, 0, 1],
-"Yellow", [255, 255, 0, 1],
-"\\yellow", [255, 255, 0, 1],
-"\\79 ellow", [255, 255, 0, 1],
-"ellow", null,
-"yellowgreen", [154, 205, 50, 1],
-"yellowgreEn", [154, 205, 50, 1],
-"yellowgre\\65 n", [154, 205, 50, 1],
-"yellowgren", null
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/component_value_list.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/component_value_list.json
deleted file mode 100644
index 01c9cbb..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/component_value_list.json
+++ /dev/null
@@ -1,424 +0,0 @@
-[
-
-"", [],
-
-"/*/*///** /* **/*//* ", [
-	"/", "*", "/"
-],
-
-"red", [
-	["ident", "red"]
-],
-
-"  \t\t\r\n\nRed ", [
-	" ", ["ident", "Red"], " "
-],
-
-"red/* CDC */-->", [
-	["ident", "red"], "-->"
-],
-
-"red-->/* Not CDC */", [
-	["ident", "red--"], ">"
-],
-
-"red0 -red --red -\\-red\\ blue 0red -0red \u0000red _Red .red rêd r\\êd \u007F\u0080\u0081", [
-	["ident", "red0"], " ",
-	["ident", "-red"], " ",
-	"-", ["ident", "-red"], " ",
-	["ident", "--red blue"], " ",
-	["dimension", "0", 0, "integer", "red"], " ",
-	["dimension", "-0", 0, "integer", "red"], " ",
-	["ident", "\uFFFDred"], " ",
-	["ident", "_Red"], " ",
-	".", ["ident", "red"], " ",
-	["ident", "rêd"], " ",
-	["ident", "rêd"], " ",
-	"\u007F", ["ident", "\u0080\u0081"]
-],
-
-"\\30red \\00030 red \\30\r\nred \\0000000red \\1100000red \\red \\r ed \\.red \\ red \\\nred \\376\\37 6\\000376\\0000376\\", [
-	["ident", "0red"], " ",
-	["ident", "0red"], " ",
-	["ident", "0red"], " ",
-	["ident", "\uFFFD0red"], " ",
-	["ident", "\uFFFD0red"], " ",
-	["ident", "red"], " ",
-	["ident", "r"], " ", ["ident", "ed"], " ",
-	["ident", ".red"], " ",
-	["ident", " red"], " ",
-	"\\", " ", ["ident", "red"], " ",
-	["ident", "Ͷ76Ͷ76\uFFFD"]
-],
-
-"rgba0() -rgba() --rgba() -\\-rgba() 0rgba() -0rgba() _rgba() .rgba() rgbâ() \\30rgba() rgba () @rgba() #rgba()", [
-	["function", "rgba0"], " ",
-	["function", "-rgba"], " ",
-	"-", ["function", "-rgba"], " ",
-	["function", "--rgba"], " ",
-	["dimension", "0", 0, "integer", "rgba"], ["()"], " ",
-	["dimension", "-0", 0, "integer", "rgba"], ["()"], " ",
-	["function", "_rgba"], " ",
-	".", ["function", "rgba"], " ",
-	["function", "rgbâ"], " ",
-	["function", "0rgba"], " ",
-	["ident", "rgba"], " ", ["()"], " ",
-	["at-keyword", "rgba"], ["()"], " ",
-	["hash", "rgba", "id"], ["()"]
-],
-
-"@media0 @-Media @--media @-\\-media @0media @-0media @_media @.media @medİa @\\30 media\\", [
-	["at-keyword", "media0"], " ",
-	["at-keyword", "-Media"], " ",
-	"@", "-", ["ident", "-media"], " ",
-	["at-keyword", "--media"], " ",
-	"@", ["dimension", "0", 0, "integer", "media"], " ",
-	"@", ["dimension", "-0", 0, "integer", "media"], " ",
-	["at-keyword", "_media"], " ",
-	"@", ".", ["ident", "media"], " ",
-	["at-keyword", "medİa"], " ",
-	["at-keyword", "0media\uFFFD"]
-],
-
-"#red0 #-Red #--red #-\\-red #0red #-0red #_Red #.red #rêd #\\.red\\", [
-	["hash", "red0", "id"], " ",
-	["hash", "-Red", "id"], " ",
-	["hash", "--red", "unrestricted"], " ",
-	["hash", "--red", "id"], " ",
-	["hash", "0red", "unrestricted"], " ",
-	["hash", "-0red", "unrestricted"], " ",
-	["hash", "_Red", "id"], " ",
-	"#", ".", ["ident", "red"], " ",
-	["hash", "rêd", "id"], " ",
-	["hash", ".red\uFFFD", "id"]
-],
-
-"p[example=\"\\\nfoo(int x) {\\\n   this.x = x;\\\n}\\\n\"]", [
-	["ident", "p"], ["[]",
-		["ident", "example"], "=", ["string", "foo(int x) {   this.x = x;}"]
-	]
-],
-
-"'' 'Lorem \"îpsum\"' 'a\\\nb' 'a\nb 'eof", [
-	["string", ""], " ",
-	["string", "Lorem \"îpsum\""], " ",
-	["string", "ab"], " ",
-	["error", "bad-string"], " ", ["ident", "b"], " ",
-	["string", "eof"]
-],
-
-"\"\" \"Lorem 'îpsum'\" \"a\\\nb\" \"a\nb \"eof", [
-	["string", ""], " ",
-	["string", "Lorem 'îpsum'"], " ",
-	["string", "ab"], " ",
-	["error", "bad-string"], " ", ["ident", "b"], " ",
-	["string", "eof"]
-],
-
-"\"Lo\\rem \\130 ps\\u m\" '\\376\\37 6\\000376\\0000376\\", [
-	["string", "Lorem İpsu m"], " ",
-	["string", "Ͷ76Ͷ76"]
-],
-
-"url( '') url('Lorem \"îpsum\"'\n) url('a\\\nb' ) url('a\nb' \\){ ) url('eof", [
-	["url", ""], " ",
-	["url", "Lorem \"îpsum\""], " ",
-	["url", "ab"], " ",
-	["error", "bad-url"], " ",
-	["url", "eof"]
-],
-
-"url(", [
-	["url", ""]
-],
-
-"url( \t", [
-	["url", ""]
-],
-
-"url(\"\") url(\"Lorem 'îpsum'\"\n) url(\"a\\\nb\" ) url(\"a\nb\" \\){ ) url(\"eof", [
-	["url", ""], " ",
-	["url", "Lorem 'îpsum'"], " ",
-	["url", "ab"], " ",
-	["error", "bad-url"], " ",
-	["url", "eof"]
-],
-
-"url(\"Lo\\rem \\130 ps\\u m\") url('\\376\\37 6\\000376\\0000376\\", [
-	["url", "Lorem İpsu m"], " ",
-	["url", "Ͷ76Ͷ76"]
-],
-
-"URL(foo) Url(foo) ûrl(foo) url (foo) url\\ (foo) url(\t 'foo' ", [
-	["url", "foo"], " ",
-	["url", "foo"], " ",
-	["function", "ûrl", ["ident", "foo"]], " ",
-	["ident", "url"], " ", ["()", ["ident", "foo"]], " ",
-	["function", "url ", ["ident", "foo"]], " ",
-	["url", "foo"]
-],
-
-"url('a' b) url('c' d)", [["error", "bad-url"], " ", ["error", "bad-url"]],
-
-"url('a\nb') url('c\n", [["error", "bad-url"], " ", ["error", "bad-url"]],
-
-"url() url( \t) url(\n Foô\\030\n!\n) url(\na\nb\n) url(a\\ b) url(a(b) url(a\\(b) url(a'b) url(a\\'b) url(a\"b) url(a\\\"b) url(a\nb) url(a\\\nb) url(a\\a b) url(a\\", [
-	["url", ""], " ",
-	["url", ""], " ",
-	["url", "Foô0!"], " ",
-	["error", "bad-url"], " ",
-	["url", "a b"], " ",
-	["error", "bad-url"], " ",
-	["url", "a(b"], " ",
-	["error", "bad-url"], " ",
-	["url", "a'b"], " ",
-	["error", "bad-url"], " ",
-	["url", "a\"b"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["url", "a\nb"], " ",
-	["url", "a\uFFFD"]
-],
-
-"url(\u0000!#$%&*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0080\u0081\u009e\u009f\u00a0\u00a1\u00a2", [
-	["url", "\uFFFD!#$%&*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0080\u0081\u009e\u009f\u00a0¡¢"]
-],
-
-"url(\u0001) url(\u0002) url(\u0003) url(\u0004) url(\u0005) url(\u0006) url(\u0007) url(\u0008) url(\u000b) url(\u000e) url(\u000f) url(\u0010) url(\u0011) url(\u0012) url(\u0013) url(\u0014) url(\u0015) url(\u0016) url(\u0017) url(\u0018) url(\u0019) url(\u001a) url(\u001b) url(\u001c) url(\u001d) url(\u001e) url(\u001f) url(\u007f)", [
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"], " ",
-	["error", "bad-url"]
-],
-
-"12 +34 -45 .67 +.89 -.01 2.3 +45.0 -0.67", [
-	["number", "12", 12, "integer"], " ",
-	["number", "+34", 34, "integer"], " ",
-	["number", "-45", -45, "integer"], " ",
-	["number", ".67", 0.67, "number"], " ",
-	["number", "+.89", 0.89, "number"], " ",
-	["number", "-.01", -0.01, "number"], " ",
-	["number", "2.3", 2.3, "number"], " ",
-	["number", "+45.0", 45, "number"], " ",
-	["number", "-0.67", -0.67, "number"]
-],
-
-"12e2 +34e+1 -45E-0 .68e+3 +.79e-1 -.01E2 2.3E+1 +45.0e6 -0.67e0", [
-	["number", "12e2", 1200, "number"], " ",
-	["number", "+34e+1", 340, "number"], " ",
-	["number", "-45E-0", -45, "number"], " ",
-	["number", ".68e+3", 680, "number"], " ",
-	["number", "+.79e-1", 0.079, "number"], " ",
-	["number", "-.01E2", -1, "number"], " ",
-	["number", "2.3E+1", 23, "number"], " ",
-	["number", "+45.0e6", 45000000, "number"], " ",
-	["number", "-0.67e0", -0.67, "number"]
-],
-
-"3. /* Decimal point must have following digits */", [
-	["number", "3", 3, "integer"], ".", " "
-],
-
-"3\\65-2 /* Scientific notation E can not be escaped */", [
-	["dimension", "3", 3, "integer", "e-2"], " "
-],
-
-"3e-2.1 /* Integer exponents only */", [
-	["number", "3e-2", 0.03, "number"],
-	["number", ".1", 0.1, "number"], " "
-],
-
-"12% +34% -45% .67% +.89% -.01% 2.3% +45.0% -0.67%", [
-	["percentage", "12", 12, "integer"], " ",
-	["percentage", "+34", 34, "integer"], " ",
-	["percentage", "-45", -45, "integer"], " ",
-	["percentage", ".67", 0.67, "number"], " ",
-	["percentage", "+.89", 0.89, "number"], " ",
-	["percentage", "-.01", -0.01, "number"], " ",
-	["percentage", "2.3", 2.3, "number"], " ",
-	["percentage", "+45.0", 45, "number"], " ",
-	["percentage", "-0.67", -0.67, "number"]
-],
-
-"12e2% +34e+1% -45E-0% .68e+3% +.79e-1% -.01E2% 2.3E+1% +45.0e6% -0.67e0%", [
-	["percentage", "12e2", 1200, "number"], " ",
-	["percentage", "+34e+1", 340, "number"], " ",
-	["percentage", "-45E-0", -45, "number"], " ",
-	["percentage", ".68e+3", 680, "number"], " ",
-	["percentage", "+.79e-1", 0.079, "number"], " ",
-	["percentage", "-.01E2", -1, "number"], " ",
-	["percentage", "2.3E+1", 23, "number"], " ",
-	["percentage", "+45.0e6", 45000000, "number"], " ",
-	["percentage", "-0.67e0", -0.67, "number"]
-],
-
-"12\\% /* Percent sign can not be escaped */", [
-	["dimension", "12", 12, "integer", "%"], " "
-],
-
-"12px +34px -45px .67px +.89px -.01px 2.3px +45.0px -0.67px", [
-	["dimension", "12", 12, "integer", "px"], " ",
-	["dimension", "+34", 34, "integer", "px"], " ",
-	["dimension", "-45", -45, "integer", "px"], " ",
-	["dimension", ".67", 0.67, "number", "px"], " ",
-	["dimension", "+.89", 0.89, "number", "px"], " ",
-	["dimension", "-.01", -0.01, "number", "px"], " ",
-	["dimension", "2.3", 2.3, "number", "px"], " ",
-	["dimension", "+45.0", 45, "number", "px"], " ",
-	["dimension", "-0.67", -0.67, "number", "px"]
-],
-
-"12e2px +34e+1px -45E-0px .68e+3px +.79e-1px -.01E2px 2.3E+1px +45.0e6px -0.67e0px", [
-	["dimension", "12e2", 1200, "number", "px"], " ",
-	["dimension", "+34e+1", 340, "number", "px"], " ",
-	["dimension", "-45E-0", -45, "number", "px"], " ",
-	["dimension", ".68e+3", 680, "number", "px"], " ",
-	["dimension", "+.79e-1", 0.079, "number", "px"], " ",
-	["dimension", "-.01E2", -1, "number", "px"], " ",
-	["dimension", "2.3E+1", 23, "number", "px"], " ",
-	["dimension", "+45.0e6", 45000000, "number", "px"], " ",
-	["dimension", "-0.67e0", -0.67, "number", "px"]
-],
-
-"12red0 12.0-red 12--red 12-\\-red 120red 12-0red 12\u0000red 12_Red 12.red 12rêd", [
-	["dimension", "12", 12, "integer", "red0"], " ",
-	["dimension", "12.0", 12, "number", "-red"], " ",
-	["number", "12", 12, "integer"], "-", ["ident", "-red"], " ",
-	["dimension", "12", 12, "integer", "--red"], " ",
-	["dimension", "120", 120, "integer", "red"], " ",
-	["number", "12", 12, "integer"], ["dimension", "-0", 0, "integer", "red"], " ",
-	["dimension", "12", 12, "integer", "\uFFFDred"], " ",
-	["dimension", "12", 12, "integer", "_Red"], " ",
-	["number", "12", 12, "integer"], ".", ["ident", "red"], " ",
-	["dimension", "12", 12, "integer", "rêd"]
-],
-
-"u+1 U+10 U+100 U+1000 U+10000 U+100000 U+1000000", [
-    ["unicode-range", 1, 1], " ",
-    ["unicode-range", 16, 16], " ",
-    ["unicode-range", 256, 256], " ",
-    ["unicode-range", 4096, 4096], " ",
-    ["unicode-range", 65536, 65536], " ",
-    ["unicode-range", 1048576, 1048576], " ",
-    ["unicode-range", 1048576, 1048576], ["number", "0", 0, "integer"]
-],
-
-"u+? u+1? U+10? U+100? U+1000? U+10000? U+100000?", [
-    ["unicode-range", 0, 15], " ",
-    ["unicode-range", 16, 31], " ",
-    ["unicode-range", 256, 271], " ",
-    ["unicode-range", 4096, 4111], " ",
-    ["unicode-range", 65536, 65551], " ",
-    ["unicode-range", 1048576, 1048591], " ",
-    ["unicode-range", 1048576, 1048576], "?"
-],
-
-"u+?? U+1?? U+10?? U+100?? U+1000?? U+10000??", [
-    ["unicode-range", 0, 255], " ",
-    ["unicode-range", 256, 511], " ",
-    ["unicode-range", 4096, 4351], " ",
-    ["unicode-range", 65536, 65791], " ",
-    ["unicode-range", 1048576, 1048831], " ",
-    ["unicode-range", 1048576, 1048591], "?"
-],
-
-"u+??? U+1??? U+10??? U+100??? U+1000???", [
-    ["unicode-range", 0, 4095], " ",
-    ["unicode-range", 4096, 8191], " ",
-    ["unicode-range", 65536, 69631], " ",
-    ["unicode-range", 1048576, 1052671], " ",
-    ["unicode-range", 1048576, 1048831], "?"
-],
-
-"u+???? U+1???? U+10???? U+100????", [
-    ["unicode-range", 0, 65535], " ",
-    ["unicode-range", 65536, 131071], " ",
-    ["unicode-range", 1048576, 1114111], " ",
-    ["unicode-range", 1048576, 1052671], "?"
-],
-
-"u+????? U+1????? U+10?????", [
-    ["unicode-range", 0, 1048575], " ",
-    ["unicode-range", 1048576, 2097151], " ",
-    ["unicode-range", 1048576, 1114111], "?"
-],
-
-"u+?????? U+1??????", [
-    ["unicode-range", 0, 16777215], " ",
-    ["unicode-range", 1048576, 2097151], "?"
-],
-
-"u+1-2 U+100000-2 U+1000000-2 U+10-200000", [
-    ["unicode-range", 1, 2], " ",
-    ["unicode-range", 1048576, 2], " ",
-    ["unicode-range", 1048576, 1048576], ["number", "0", 0, "integer"],
-        ["number", "-2", -2, "integer"], " ",
-    ["unicode-range", 16, 2097152]
-],
-
-"ù+12 Ü+12 u +12 U+ 12 U+12 - 20 U+1?2 U+1?-50", [
-    ["ident", "ù"], ["number", "+12", 12, "integer"], " ",
-    ["ident", "Ü"], ["number", "+12", 12, "integer"], " ",
-    ["ident", "u"], " ", ["number", "+12", 12, "integer"], " ",
-    ["ident", "U"], "+", " ", ["number", "12", 12, "integer"], " ",
-    ["unicode-range", 18, 18], " ", "-", " ", ["number", "20", 20, "integer"], " ",
-    ["unicode-range", 16, 31], ["number", "2", 2, "integer"], " ",
-    ["unicode-range", 16, 31], ["number", "-50", -50, "integer"]
-],
-
-"~=|=^=$=*=||<!------> |/**/| ~/**/=", [
-	"~=", "|=", "^=", "$=", "*=", "||", "<!--", "-", "-", "-->",
-	" ", "|", "|", " ", "~", "="
-],
-
-"a:not([href^=http\\:],  [href ^=\t'https\\:'\n]) { color: rgba(0%, 100%, 50%); }", [
-	["ident", "a"], ":", ["function", "not",
-		["[]",
-			["ident", "href"], "^=", ["ident", "http:"]
-		], ",", " ", ["[]",
-			["ident", "href"], " ", "^=", " ", ["string", "https:"], " "
-		]
-	], " ", ["{}",
-		" ", ["ident", "color"], ":", " ", ["function", "rgba",
-			["percentage", "0", 0, "integer"], ",", " ",
-			["percentage", "100", 100, "integer"], ",", " ",
-			["percentage", "50", 50, "integer"]
-		], ";", " "
-	]
-],
-
-"@media print { (foo]{bar) }baz", [
-	["at-keyword", "media"], " ", ["ident", "print"], " ", ["{}",
-		" ", ["()",
-			["ident", "foo"], ["error", "]"], ["{}",
-				["ident", "bar"], ["error", ")"], " "
-			], ["ident", "baz"]
-		]
-	]
-]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/declaration_list.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/declaration_list.json
deleted file mode 100644
index 4866c70..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/declaration_list.json
+++ /dev/null
@@ -1,29 +0,0 @@
-[
-
-"", [],
-";; /**/ ; ;", [],
-"a:b; c:d 42!important;\n", [
-    ["declaration", "a", [["ident", "b"]], false],
-    ["declaration", "c", [["ident", "d"], " ", ["number", "42", 42, "integer"]], true]
-],
-
-"@import 'foo.css'; a:b; @import 'bar.css'", [
-    ["at-rule", "import", [" ", ["string", "foo.css"]], null],
-    ["declaration", "a", [["ident", "b"]], false],
-    ["at-rule", "import", [" ", ["string", "bar.css"]], null]
-],
-
-"@media screen { div{;}} a:b;; @media print{div{", [
-    ["at-rule", "media", [" ", ["ident", "screen"], " "], [" ", ["ident", "div"], ["{}", ";"]]],
-    ["declaration", "a", [["ident", "b"]], false],
-    ["at-rule", "media", [" ", ["ident", "print"]], [["ident", "div"], ["{}"]]]
-],
-
-"@ media screen { div{;}} a:b;; @media print{div{", [
-    ["error", "invalid"],
-    ["at-rule", "media", [" ", ["ident", "print"]], [["ident", "div"], ["{}"]]]
-],
-
-"", []
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_hsl.py b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_hsl.py
deleted file mode 100644
index 95eccca..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_hsl.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import colorsys  # It turns out Python already does HSL -> RGB!
-trim = lambda s: s if not s.endswith('.0') else s[:-2]
-print('[')
-print(',\n'.join(
-    '"hsl%s(%s, %s%%, %s%%%s)", [%s, %s, %s, %s]' % (
-        ('a' if a is not None else '', h, trim(str(s/10.)), trim(str(l/10.)),
-         ', %s' % a if a is not None else '')
-        + tuple(trim(str(round(v, 10)))
-                for v in colorsys.hls_to_rgb(h/360., l/1000., s/1000.))
-        + (a if a is not None else 1,)
-    )
-    for a in [None, 1, .2, 0]
-    for l in range(0, 1001, 125)
-    for s in range(0, 1001, 125)
-    for h in range(0, 360, 30)
-))
-print(']')
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_keywords.py b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_keywords.py
deleted file mode 100644
index 34fdb93..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/make_color3_keywords.py
+++ /dev/null
@@ -1,191 +0,0 @@
-all_keywords = [
-    ('transparent', (0, 0, 0, 0)),
-
-    ('black', (0, 0, 0, 1)),
-    ('silver', (192, 192, 192, 1)),
-    ('gray', (128, 128, 128, 1)),
-    ('white', (255, 255, 255, 1)),
-    ('maroon', (128, 0, 0, 1)),
-    ('red', (255, 0, 0, 1)),
-    ('purple', (128, 0, 128, 1)),
-    ('fuchsia', (255, 0, 255, 1)),
-    ('green', (0, 128, 0, 1)),
-    ('lime', (0, 255, 0, 1)),
-    ('olive', (128, 128, 0, 1)),
-    ('yellow', (255, 255, 0, 1)),
-    ('navy', (0, 0, 128, 1)),
-    ('blue', (0, 0, 255, 1)),
-    ('teal', (0, 128, 128, 1)),
-    ('aqua', (0, 255, 255, 1)),
-
-    ('aliceblue', (240, 248, 255, 1)),
-    ('antiquewhite', (250, 235, 215, 1)),
-    ('aqua', (0, 255, 255, 1)),
-    ('aquamarine', (127, 255, 212, 1)),
-    ('azure', (240, 255, 255, 1)),
-    ('beige', (245, 245, 220, 1)),
-    ('bisque', (255, 228, 196, 1)),
-    ('black', (0, 0, 0, 1)),
-    ('blanchedalmond', (255, 235, 205, 1)),
-    ('blue', (0, 0, 255, 1)),
-    ('blueviolet', (138, 43, 226, 1)),
-    ('brown', (165, 42, 42, 1)),
-    ('burlywood', (222, 184, 135, 1)),
-    ('cadetblue', (95, 158, 160, 1)),
-    ('chartreuse', (127, 255, 0, 1)),
-    ('chocolate', (210, 105, 30, 1)),
-    ('coral', (255, 127, 80, 1)),
-    ('cornflowerblue', (100, 149, 237, 1)),
-    ('cornsilk', (255, 248, 220, 1)),
-    ('crimson', (220, 20, 60, 1)),
-    ('cyan', (0, 255, 255, 1)),
-    ('darkblue', (0, 0, 139, 1)),
-    ('darkcyan', (0, 139, 139, 1)),
-    ('darkgoldenrod', (184, 134, 11, 1)),
-    ('darkgray', (169, 169, 169, 1)),
-    ('darkgreen', (0, 100, 0, 1)),
-    ('darkgrey', (169, 169, 169, 1)),
-    ('darkkhaki', (189, 183, 107, 1)),
-    ('darkmagenta', (139, 0, 139, 1)),
-    ('darkolivegreen', (85, 107, 47, 1)),
-    ('darkorange', (255, 140, 0, 1)),
-    ('darkorchid', (153, 50, 204, 1)),
-    ('darkred', (139, 0, 0, 1)),
-    ('darksalmon', (233, 150, 122, 1)),
-    ('darkseagreen', (143, 188, 143, 1)),
-    ('darkslateblue', (72, 61, 139, 1)),
-    ('darkslategray', (47, 79, 79, 1)),
-    ('darkslategrey', (47, 79, 79, 1)),
-    ('darkturquoise', (0, 206, 209, 1)),
-    ('darkviolet', (148, 0, 211, 1)),
-    ('deeppink', (255, 20, 147, 1)),
-    ('deepskyblue', (0, 191, 255, 1)),
-    ('dimgray', (105, 105, 105, 1)),
-    ('dimgrey', (105, 105, 105, 1)),
-    ('dodgerblue', (30, 144, 255, 1)),
-    ('firebrick', (178, 34, 34, 1)),
-    ('floralwhite', (255, 250, 240, 1)),
-    ('forestgreen', (34, 139, 34, 1)),
-    ('fuchsia', (255, 0, 255, 1)),
-    ('gainsboro', (220, 220, 220, 1)),
-    ('ghostwhite', (248, 248, 255, 1)),
-    ('gold', (255, 215, 0, 1)),
-    ('goldenrod', (218, 165, 32, 1)),
-    ('gray', (128, 128, 128, 1)),
-    ('green', (0, 128, 0, 1)),
-    ('greenyellow', (173, 255, 47, 1)),
-    ('grey', (128, 128, 128, 1)),
-    ('honeydew', (240, 255, 240, 1)),
-    ('hotpink', (255, 105, 180, 1)),
-    ('indianred', (205, 92, 92, 1)),
-    ('indigo', (75, 0, 130, 1)),
-    ('ivory', (255, 255, 240, 1)),
-    ('khaki', (240, 230, 140, 1)),
-    ('lavender', (230, 230, 250, 1)),
-    ('lavenderblush', (255, 240, 245, 1)),
-    ('lawngreen', (124, 252, 0, 1)),
-    ('lemonchiffon', (255, 250, 205, 1)),
-    ('lightblue', (173, 216, 230, 1)),
-    ('lightcoral', (240, 128, 128, 1)),
-    ('lightcyan', (224, 255, 255, 1)),
-    ('lightgoldenrodyellow', (250, 250, 210, 1)),
-    ('lightgray', (211, 211, 211, 1)),
-    ('lightgreen', (144, 238, 144, 1)),
-    ('lightgrey', (211, 211, 211, 1)),
-    ('lightpink', (255, 182, 193, 1)),
-    ('lightsalmon', (255, 160, 122, 1)),
-    ('lightseagreen', (32, 178, 170, 1)),
-    ('lightskyblue', (135, 206, 250, 1)),
-    ('lightslategray', (119, 136, 153, 1)),
-    ('lightslategrey', (119, 136, 153, 1)),
-    ('lightsteelblue', (176, 196, 222, 1)),
-    ('lightyellow', (255, 255, 224, 1)),
-    ('lime', (0, 255, 0, 1)),
-    ('limegreen', (50, 205, 50, 1)),
-    ('linen', (250, 240, 230, 1)),
-    ('magenta', (255, 0, 255, 1)),
-    ('maroon', (128, 0, 0, 1)),
-    ('mediumaquamarine', (102, 205, 170, 1)),
-    ('mediumblue', (0, 0, 205, 1)),
-    ('mediumorchid', (186, 85, 211, 1)),
-    ('mediumpurple', (147, 112, 219, 1)),
-    ('mediumseagreen', (60, 179, 113, 1)),
-    ('mediumslateblue', (123, 104, 238, 1)),
-    ('mediumspringgreen', (0, 250, 154, 1)),
-    ('mediumturquoise', (72, 209, 204, 1)),
-    ('mediumvioletred', (199, 21, 133, 1)),
-    ('midnightblue', (25, 25, 112, 1)),
-    ('mintcream', (245, 255, 250, 1)),
-    ('mistyrose', (255, 228, 225, 1)),
-    ('moccasin', (255, 228, 181, 1)),
-    ('navajowhite', (255, 222, 173, 1)),
-    ('navy', (0, 0, 128, 1)),
-    ('oldlace', (253, 245, 230, 1)),
-    ('olive', (128, 128, 0, 1)),
-    ('olivedrab', (107, 142, 35, 1)),
-    ('orange', (255, 165, 0, 1)),
-    ('orangered', (255, 69, 0, 1)),
-    ('orchid', (218, 112, 214, 1)),
-    ('palegoldenrod', (238, 232, 170, 1)),
-    ('palegreen', (152, 251, 152, 1)),
-    ('paleturquoise', (175, 238, 238, 1)),
-    ('palevioletred', (219, 112, 147, 1)),
-    ('papayawhip', (255, 239, 213, 1)),
-    ('peachpuff', (255, 218, 185, 1)),
-    ('peru', (205, 133, 63, 1)),
-    ('pink', (255, 192, 203, 1)),
-    ('plum', (221, 160, 221, 1)),
-    ('powderblue', (176, 224, 230, 1)),
-    ('purple', (128, 0, 128, 1)),
-    ('red', (255, 0, 0, 1)),
-    ('rosybrown', (188, 143, 143, 1)),
-    ('royalblue', (65, 105, 225, 1)),
-    ('saddlebrown', (139, 69, 19, 1)),
-    ('salmon', (250, 128, 114, 1)),
-    ('sandybrown', (244, 164, 96, 1)),
-    ('seagreen', (46, 139, 87, 1)),
-    ('seashell', (255, 245, 238, 1)),
-    ('sienna', (160, 82, 45, 1)),
-    ('silver', (192, 192, 192, 1)),
-    ('skyblue', (135, 206, 235, 1)),
-    ('slateblue', (106, 90, 205, 1)),
-    ('slategray', (112, 128, 144, 1)),
-    ('slategrey', (112, 128, 144, 1)),
-    ('snow', (255, 250, 250, 1)),
-    ('springgreen', (0, 255, 127, 1)),
-    ('steelblue', (70, 130, 180, 1)),
-    ('tan', (210, 180, 140, 1)),
-    ('teal', (0, 128, 128, 1)),
-    ('thistle', (216, 191, 216, 1)),
-    ('tomato', (255, 99, 71, 1)),
-    ('turquoise', (64, 224, 208, 1)),
-    ('violet', (238, 130, 238, 1)),
-    ('wheat', (245, 222, 179, 1)),
-    ('white', (255, 255, 255, 1)),
-    ('whitesmoke', (245, 245, 245, 1)),
-    ('yellow', (255, 255, 0, 1)),
-    ('yellowgreen', (154, 205, 50, 1)),
-]
-
-
-def replace(s, i, r):
-    i %= len(s)
-    return s[:i] + r(s[i]) + s[i + 1:]
-
-print('[')
-print(',\n'.join(
-    '"%s", %s' % (css, list(rgba) if valid else 'null')
-    for i, (keyword, rgba) in enumerate(all_keywords)
-    for css, valid, run in [
-        (keyword, True, True),
-        (replace(keyword, i, str.upper), True, True),
-        (replace(keyword, i, lambda c: r'\\' + c), True,
-            keyword[i % len(keyword)] not in 'abcdef'),
-        (replace(keyword, i, lambda c: r'\\%X ' % ord(c)), True, True),
-        (replace(keyword, i, lambda c: ''), False, True),
-        # Kelving sign: u'K'.lower() == u'k', but should not match in CSS
-        (keyword.replace('k', u'K'), False, 'k' in keyword)
-    ]
-    if run
-))
-print(']')
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_component_value.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_component_value.json
deleted file mode 100644
index b6c8a38..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_component_value.json
+++ /dev/null
@@ -1,27 +0,0 @@
-[
-
-"", ["error", "empty"],
-" ", ["error", "empty"],
-"/**/", ["error", "empty"],
-"  /**/\t/* a */\n\n", ["error", "empty"],
-
-".", ".",
-"a", ["ident", "a"],
-"/**/ 4px", ["dimension", "4", 4, "integer", "px"],
-"rgba(100%, 0%, 50%, .5)", ["function", "rgba",
-    ["percentage", "100", 100, "integer"], ",", " ",
-    ["percentage", "0", 0, "integer"], ",", " ",
-    ["percentage", "50", 50, "integer"], ",", " ",
-    ["number", ".5", 0.5, "number"]
-],
-
-" /**/ { foo: bar; @baz [)", ["{}",
-    " ", ["ident", "foo"], ":", " ", ["ident", "bar"], ";", " ",
-    ["at-keyword", "baz"], " ", ["[]",
-        ["error", ")"]
-    ]
-],
-
-".foo", ["error", "extra-input"]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_declaration.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_declaration.json
deleted file mode 100644
index 00e08ab..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_declaration.json
+++ /dev/null
@@ -1,42 +0,0 @@
-[
-
-"", ["error", "empty"],
-"  /**/\n", ["error", "empty"],
-" ;", ["error", "invalid"],
-"foo", ["error", "invalid"],
-"@foo:", ["error", "invalid"],
-"#foo:", ["error", "invalid"],
-".foo:", ["error", "invalid"],
-"foo*:", ["error", "invalid"],
-"foo.. 9000", ["error", "invalid"],
-"foo:", ["declaration", "foo", [], false],
-"foo :", ["declaration", "foo", [], false],
-"\n/**/ foo: ", ["declaration", "foo", [" "], false],
-"foo:;", ["declaration", "foo", [], false],
-" /**/ foo /**/ :", ["declaration", "foo", [], false],
-"foo:;bar:;", ["error", "extra-input"],
-
-"foo: 9000  !Important", ["declaration", "foo", [
-    " ", ["number", "9000", 9000, "integer"], " "
-], true],
-"foo: 9000  ! /**/\t IMPORTant /**/\f", ["declaration", "foo", [
-    " ", ["number", "9000", 9000, "integer"], " "
-], true],
-
-"foo: 9000  /* Dotted capital I */!İmportant", ["error", "invalid"],
-"foo: 9000  !important!", ["error", "invalid"],
-
-"foo: 9000  important", ["declaration", "foo", [
-    " ", ["number", "9000", 9000, "integer"], " ", ["ident", "important"]
-], false],
-"foo:important", ["declaration", "foo", [
-    ["ident", "important"]
-], false],
-
-"foo: 9000 @bar{ !important", ["declaration", "foo", [
-    " ", ["number", "9000", 9000, "integer"], " ", ["at-keyword", "bar"], ["{}",
-        " ", "!", ["ident", "important"]
-    ]
-], false]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_rule.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_rule.json
deleted file mode 100644
index b7be5fa..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/one_rule.json
+++ /dev/null
@@ -1,36 +0,0 @@
-[
-
-"", ["error", "empty"],
-"foo", ["error", "invalid"],
-"foo 4", ["error", "invalid"],
-
-"@foo", ["at-rule", "foo", [], null],
-
-"@foo bar; \t/* comment */", ["at-rule", "foo", [" ", ["ident", "bar"]], null],
-" /**/ @foo bar{[(4", ["at-rule", "foo",
-    [" ", ["ident", "bar"]],
-    [["[]", ["()", ["number", "4", 4, "integer"]]]]
-],
-
-"@foo { bar", ["at-rule", "foo", [" "], [" ", ["ident", "bar"]]],
-"@foo [ bar", ["at-rule", "foo", [" ", ["[]", " ", ["ident", "bar"]]], null],
-
-" /**/ div > p { color: #aaa;  } /**/ ", ["qualified rule",
-    [["ident", "div"], " ", ">", " ", ["ident", "p"], " "],
-    [" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], ";", " "]
-],
-
-" /**/ { color: #aaa  ", ["qualified rule",
-    [],
-    [" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], " "]
-],
-
-" /* CDO/CDC are not special */ <!-- --> {", ["qualified rule",
-    ["<!--", " ", "-->", " "], []
-],
-
-"div { color: #aaa; } p{}", ["error", "extra-input"],
-"div {} -->", ["error", "extra-input"],
-"{}a", ["error", "extra-input"]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/rule_list.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/rule_list.json
deleted file mode 100644
index 4edeb14..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/rule_list.json
+++ /dev/null
@@ -1,48 +0,0 @@
-[
-
-"", [],
-"foo", [["error", "invalid"]],
-"foo 4", [["error", "invalid"]],
-
-"@foo", [["at-rule", "foo", [], null]],
-
-"@foo bar; \t/* comment */", [["at-rule", "foo", [" ", ["ident", "bar"]], null]],
-
-" /**/ @foo bar{[(4", [["at-rule", "foo",
-    [" ", ["ident", "bar"]],
-    [["[]", ["()", ["number", "4", 4, "integer"]]]]
-]],
-
-"@foo { bar", [["at-rule", "foo", [" "], [" ", ["ident", "bar"]]]],
-"@foo [ bar", [["at-rule", "foo", [" ", ["[]", " ", ["ident", "bar"]]], null]],
-
-" /**/ div > p { color: #aaa;  } /**/ ", [["qualified rule",
-    [["ident", "div"], " ", ">", " ", ["ident", "p"], " "],
-    [" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], ";", " "]
-]],
-
-" /**/ { color: #aaa  ", [["qualified rule",
-    [],
-    [" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], " "]
-]],
-
-" /* CDO/CDC are not special */ <!-- --> {", [["qualified rule",
-    ["<!--", " ", "-->", " "], []
-]],
-
-"div { color: #aaa; } p{}", [
-    ["qualified rule", [["ident", "div"], " "],
-        [" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], ";", " "]
-    ],
-    ["qualified rule", [["ident", "p"]], []]
-],
-
-"div {} -->", [
-    ["qualified rule", [["ident", "div"], " "], []],
-    ["error", "invalid"]
-],
-
-"{}a", [["qualified rule", [], []], ["error", "invalid"]],
-"{}@a", [["qualified rule", [], []], ["at-rule", "a", [], null]]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet.json
deleted file mode 100644
index 6806d92f..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet.json
+++ /dev/null
@@ -1,44 +0,0 @@
-[
-
-"", [],
-"foo", [["error", "invalid"]],
-"foo 4", [["error", "invalid"]],
-
-"@foo", [["at-rule", "foo", [], null]],
-
-"@foo bar; \t/* comment */", [["at-rule", "foo", [" ", ["ident", "bar"]], null]],
-
-" /**/ @foo bar{[(4", [["at-rule", "foo",
-	[" ", ["ident", "bar"]],
-	[["[]", ["()", ["number", "4", 4, "integer"]]]]
-]],
-
-"@foo { bar", [["at-rule", "foo", [" "], [" ", ["ident", "bar"]]]],
-"@foo [ bar", [["at-rule", "foo", [" ", ["[]", " ", ["ident", "bar"]]], null]],
-
-" /**/ div > p { color: #aaa;  } /**/ ", [["qualified rule",
-	[["ident", "div"], " ", ">", " ", ["ident", "p"], " "],
-	[" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], ";", " "]
-]],
-
-" /**/ { color: #aaa  ", [["qualified rule",
-	[],
-	[" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], " "]
-]],
-
-" /* CDO/CDC are ignored between rules */ <!-- --> {", [["qualified rule", [], []]],
-" <!-- --> a<!---->{", [["qualified rule", [["ident", "a"], "<!--", "-->"], []]],
-
-"div { color: #aaa; } p{}", [
-	["qualified rule", [["ident", "div"], " "],
-		[" ", ["ident", "color"], ":", " ", ["hash", "aaa", "id"], ";", " "]
-	],
-	["qualified rule", [["ident", "p"]], []]
-],
-
-"div {} -->", [["qualified rule", [["ident", "div"], " "], []]],
-
-"{}a", [["qualified rule", [], []], ["error", "invalid"]],
-"{}@a", [["qualified rule", [], []], ["at-rule", "a", [], null]]
-
-]
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet_bytes.json b/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet_bytes.json
deleted file mode 100644
index 8b2c512..0000000
--- a/third_party/WebKit/LayoutTests/css-parser/resources/css-parsing-tests/stylesheet_bytes.json
+++ /dev/null
@@ -1,126 +0,0 @@
-[
-
-{"css_bytes": ""},
-[[], "utf-8"],
-
-{"css_bytes": "@\u00C3\u00A9",
- "protocol_encoding": null, "environment_encoding": null},
-[[["at-rule", "é", [], null]], "utf-8"],
-
-{"css_bytes": "@\u00C3\u00A9"},
-[[["at-rule", "é", [], null]], "utf-8"],
-
-{"css_bytes": "@\u0000\u00E9\u0000",
- "comment": "Untagged UTF-16, parsed as UTF-8"},
-[[["at-rule", "���", [], null]], "utf-8"],
-
-{"css_bytes": "\u00FF\u00FE@\u0000\u00E9\u0000",
- "comment": "UTF-16 with a BOM"},
-[[["at-rule", "é", [], null]], "utf-16le"],
-
-{"css_bytes": "\u00FE\u00FF\u0000@\u0000\u00E9"},
-[[["at-rule", "é", [], null]], "utf-16be"],
-
-{"css_bytes": "@\u00E9"},
-[[["at-rule", "�", [], null]], "utf-8"],
-
-
-{"css_bytes": "@\u00E9", "protocol_encoding": "ISO-8859-2"},
-[[["at-rule", "é", [], null]], "iso-8859-2"],
-
-{"css_bytes": "@\u00E9", "protocol_encoding": "ISO-8859-5"},
-[[["at-rule", "щ", [], null]], "iso-8859-5"],
-
-{"css_bytes": "@\u00C3\u00A9", "protocol_encoding": "ISO-8859-2"},
-[[["at-rule", "Ä‚Š", [], null]], "iso-8859-2"],
-
-{"css_bytes": "\u00EF\u00BB\u00BF @\u00C3\u00A9",
- "protocol_encoding": "ISO-8859-2",
- "comment": "BOM takes precedence over protocol"},
-[[["at-rule", "é", [], null]], "utf-8"],
-
-
-{"css_bytes": "@charset \"ISO-8859-5\"; @\u00E9"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "щ", [], null]],
- "iso-8859-5"],
-
-{"css_bytes": "@Charset \"ISO-8859-5\"; @\u00E9",
- "comment": "@charset has to match an exact byte pattern"},
-[[["at-rule", "Charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "�", [], null]],
- "utf-8"],
-
-{"css_bytes": "@charset  \"ISO-8859-5\"; @\u00E9",
- "comment": "@charset has to match an exact byte pattern"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "�", [], null]],
- "utf-8"],
-
-{"css_bytes": "@charset 'ISO-8859-5'; @\u00E9",
- "comment": "@charset has to match an exact byte pattern"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "�", [], null]],
- "utf-8"],
-
-
-{"css_bytes": "@\u0000c\u0000h\u0000a\u0000r\u0000s\u0000e\u0000t\u0000 \u0000\"\u0000U\u0000T\u0000F\u0000-\u00001\u00006\u0000L\u0000E\u0000\"\u0000;\u0000@\u0000\u00e9\u0000",
- "comment": "@charset has to be ASCII-compatible itself"},
-[[["at-rule", "�c�h�a�r�s�e�t�",
-   [" ", ["ident", "�"], ["string", "�U�T�F�-�1�6�L�E�"], ["ident", "�"]], null],
-  ["error", "invalid"]],
- "utf-8"],
-
-{"css_bytes": "@charset \"UTF-16LE\"; @\u00C3\u00A9",
- "comment": "@charset can only specify ASCII-compatible encodings"},
-[[["at-rule", "charset", [" ", ["string", "UTF-16LE"]], null],
-  ["at-rule", "é", [], null]],
- "utf-8"],
-
-
-{"css_bytes": "\u00EF\u00BB\u00BF @charset \"ISO-8859-5\"; @\u00E9",
- "comment": "BOM takes precedence over @charset"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "�", [], null]],
- "utf-8"],
-
-{"css_bytes": "\u00EF\u00BB\u00BF @charset \"ISO-8859-5\"; @\u00C3\u00A9",
- "comment": "BOM takes precedence over @charset"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "é", [], null]],
- "utf-8"],
-
-{"css_bytes": "@charset \"ISO-8859-5\"; @\u00E9",
- "protocol_encoding": " Iso-8859-2",
- "comment": "Protocol takes precedence over @charset"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "é", [], null]],
- "iso-8859-2"],
-
-
-{"css_bytes": "@\u00E9", "environment_encoding": "ISO-8859-2"},
-[[["at-rule", "é", [], null]], "iso-8859-2"],
-
-{"css_bytes": "@\u00E9", "environment_encoding": "ISO-8859-5"},
-[[["at-rule", "щ", [], null]], "iso-8859-5"],
-
-{"css_bytes": "@charset \"ISO-8859-5\"; @\u00E9",
- "environment_encoding": "ISO-8859-2",
- "comment": "@character takes precedence over environment"},
-[[["at-rule", "charset", [" ", ["string", "ISO-8859-5"]], null],
-  ["at-rule", "щ", [], null]],
- "iso-8859-5"],
-
-{"css_bytes": "@\u00E9",
- "protocol_encoding": "ISO-8859-2",
- "environment_encoding": "ISO-8859-5",
- "comment": "protocol takes precedence over environment"},
-[[["at-rule", "é", [], null]], "iso-8859-2"],
-
-{"css_bytes": "\u00EF\u00BB\u00BF @\u00C3\u00A9",
- "environment_encoding": "ISO-8859-5",
- "comment": "BOM takes precedence over environment"},
-[[["at-rule", "é", [], null]], "utf-8"]
-
-
-]
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-disabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-disabled-by-feature-policy.https-expected.txt
index 3570fd11..cfcbdbf 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-disabled-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-disabled-by-feature-policy.https-expected.txt
@@ -1,9 +1,9 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: GravitySensor is not defined
-FAIL Accelerometer: Feature-Policy header accelerometer 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
+PASS Accelerometer: Feature-Policy header accelerometer 'none' disallows the top-level document.
 PASS Accelerometer: Feature-Policy header accelerometer 'none' disallows same-origin iframes.
 PASS Accelerometer: Feature-Policy header accelerometer 'none' disallows cross-origin iframes.
-FAIL LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
+PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows the top-level document.
 PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows same-origin iframes.
 PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows cross-origin iframes.
 Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
index 7ebcc76..6647e64 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
@@ -1,8 +1,8 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: GravitySensor is not defined
-FAIL Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-origin relocation assert_true: 'new Accelerometer()' expected true got false
+PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-origin relocation
 PASS Accelerometer: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation
-FAIL LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin relocation assert_true: 'new LinearAccelerationSensor()' expected true got false
+PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin relocation
 PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https-expected.txt
index 6f36eb7d..7a276b03 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https-expected.txt
@@ -1,8 +1,8 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: GravitySensor is not defined
-FAIL Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-origin iframe assert_true: 'new Accelerometer()' expected true got false
-FAIL Accelerometer: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe assert_true: 'new Accelerometer()' expected true got false
-FAIL LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin iframe assert_true: 'new LinearAccelerationSensor()' expected true got false
-FAIL LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe assert_true: 'new LinearAccelerationSensor()' expected true got false
+PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-origin iframe
+PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe
+PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin iframe
+PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy.https-expected.txt
index 05fb6ef..e4db6df 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-by-feature-policy.https-expected.txt
@@ -1,10 +1,10 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: GravitySensor is not defined
 PASS Accelerometer: Feature-Policy header accelerometer * allows the top-level document.
-FAIL Accelerometer: Feature-Policy header accelerometer * allows same-origin iframes. assert_true: 'new Accelerometer()' expected true got false
-FAIL Accelerometer: Feature-Policy header accelerometer * allows cross-origin iframes. assert_true: 'new Accelerometer()' expected true got false
+PASS Accelerometer: Feature-Policy header accelerometer * allows same-origin iframes.
+PASS Accelerometer: Feature-Policy header accelerometer * allows cross-origin iframes.
 PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows the top-level document.
-FAIL LinearAccelerationSensor: Feature-Policy header accelerometer * allows same-origin iframes. assert_true: 'new LinearAccelerationSensor()' expected true got false
-FAIL LinearAccelerationSensor: Feature-Policy header accelerometer * allows cross-origin iframes. assert_true: 'new LinearAccelerationSensor()' expected true got false
+PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows same-origin iframes.
+PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows cross-origin iframes.
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
index 4812ed6..b196236 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
@@ -1,10 +1,10 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: GravitySensor is not defined
 PASS Accelerometer: Feature-Policy header accelerometer 'self' allows the top-level document.
-FAIL Accelerometer: Feature-Policy header accelerometer 'self' allows same-origin iframes. assert_true: 'new Accelerometer()' expected true got false
+PASS Accelerometer: Feature-Policy header accelerometer 'self' allows same-origin iframes.
 PASS Accelerometer: Feature-Policy header accelerometer 'self' disallows cross-origin iframes.
 PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' allows the top-level document.
-FAIL LinearAccelerationSensor: Feature-Policy header accelerometer 'self' allows same-origin iframes. assert_true: 'new LinearAccelerationSensor()' expected true got false
+PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' allows same-origin iframes.
 PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' disallows cross-origin iframes.
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-hsl.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-hsl.html
new file mode 100644
index 0000000..4670c61
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-hsl.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Color 4: Resolving HSL color values</title>
+<link rel="author" title="Chris Nardi" href="mailto:csnardi1@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-color-values">
+<meta name="assert" content="Tests if HSL color values are resolved properly">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="parent" style="color: rgb(45, 23, 27)">
+    <div id="inner"></div>
+</div>
+
+<script>
+    function color_test(color, expected, reason) {
+        test(function() {
+            var element = document.getElementById('inner');
+            // Random value not in our test data.
+            fail_value = "rgb(12, 34, 223)"
+            element.style.color = "black";
+            element.style.cssText = "color: " + fail_value + "; color: " + color;
+
+            if (expected === null)
+                assert_equals(getComputedStyle(element).color, fail_value);
+            else
+                assert_equals(getComputedStyle(element).color, expected);
+        }, `${reason}: ${color}`);
+    }
+
+    function expected_value(rgb_channels) {
+        if (rgb_channels === null)
+            return null;
+        else if (rgb_channels.length === 3 || rgb_channels[3] == 1)
+            return "rgb(" + rgb_channels.slice(0, 3).join(", ") + ")";
+        else
+            return "rgba(" + rgb_channels.join(", ") + ")";
+    }
+
+    // Taken mostly from https://drafts.csswg.org/css-color/#hsl-to-rgb
+    function hslToRgb(hue, sat, light) {
+      if (light <= .5) {
+        var t2 = light * (sat + 1);
+      } else {
+        var t2 = light + sat - (light * sat);
+      }
+      var t1 = light * 2 - t2;
+      var r = Math.min(Math.max(Math.round(hueToRgb(t1, t2, hue + 2) * 255), 0), 255);
+      var g = Math.min(Math.max(Math.round(hueToRgb(t1, t2, hue) * 255), 0), 255);
+      var b = Math.min(Math.max(Math.round(hueToRgb(t1, t2, hue - 2) * 255), 0), 255);
+      return [r,g,b];
+    }
+
+    function hueToRgb(t1, t2, hue) {
+      if (hue < 0) hue += 6;
+      if (hue >= 6) hue -= 6;
+
+      if (hue < 1) return (t2 - t1) * hue + t1;
+      else if (hue < 3) return t2;
+      else if (hue < 4) return (t2 - t1) * (4 - hue) + t1;
+      else return t1;
+    }
+
+    // Test HSL parsing
+    for (var hue of [0, 30, 60, 90, 120, 180, 210, 240, 270, 300, 330, 360]) {
+        for (var sat of [0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1]) {
+            for (var light of [0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1]) {
+                for (var alpha of [undefined, 0, 0.2, 1]) {
+                    rgb_channels = hslToRgb(hue / 60, sat, light);
+                    hsl_color = "hsl(" + hue + ", " + sat * 100 + "%, " + light * 100 + "%)";
+                    if (alpha !== undefined) {
+                        rgb_channels[3] = alpha;
+                        hsl_color = "hsla(" + hue + ", " + sat * 100 + "%, " + light * 100 + "%, " + alpha + ")";
+                    }
+                    color_test(hsl_color, expected_value(rgb_channels), "HSL/HSLA value should parse and round correctly");
+                }
+            }
+        }
+    }
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-keywords.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-keywords.html
new file mode 100644
index 0000000..5cbdcbe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving-keywords.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Color 4: Resolving keyword color values</title>
+<link rel="author" title="Chris Nardi" href="mailto:csnardi1@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-color-values">
+<meta name="assert" content="Tests if keyword color values are resolved properly">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="parent" style="color: rgb(45, 23, 27)">
+    <div id="inner"></div>
+</div>
+
+<script>
+    function color_test(color, expected, reason) {
+        test(function() {
+            var element = document.getElementById('inner');
+            // Random value not in our test data.
+            fail_value = "rgb(12, 34, 223)"
+            element.style.color = "black";
+            element.style.cssText = "color: " + fail_value + "; color: " + color;
+
+            if (expected === null)
+                assert_equals(getComputedStyle(element).color, fail_value);
+            else
+                assert_equals(getComputedStyle(element).color, expected);
+        }, `${reason}: ${color}`);
+    }
+
+    function expected_value(rgb_channels) {
+        if (rgb_channels === null)
+            return null;
+        else if (rgb_channels.length === 3 || rgb_channels[3] == 1)
+            return "rgb(" + rgb_channels.slice(0, 3).join(", ") + ")";
+        else
+            return "rgba(" + rgb_channels.join(", ") + ")";
+    }
+
+    keywords = [
+        ['transparent', [0, 0, 0, 0]],
+        ['aliceblue', [240, 248, 255, 1]],
+        ['antiquewhite', [250, 235, 215, 1]],
+        ['aqua', [0, 255, 255, 1]],
+        ['aquamarine', [127, 255, 212, 1]],
+        ['azure', [240, 255, 255, 1]],
+        ['beige', [245, 245, 220, 1]],
+        ['bisque', [255, 228, 196, 1]],
+        ['black', [0, 0, 0, 1]],
+        ['blanchedalmond', [255, 235, 205, 1]],
+        ['blue', [0, 0, 255, 1]],
+        ['blueviolet', [138, 43, 226, 1]],
+        ['brown', [165, 42, 42, 1]],
+        ['burlywood', [222, 184, 135, 1]],
+        ['cadetblue', [95, 158, 160, 1]],
+        ['chartreuse', [127, 255, 0, 1]],
+        ['chocolate', [210, 105, 30, 1]],
+        ['coral', [255, 127, 80, 1]],
+        ['cornflowerblue', [100, 149, 237, 1]],
+        ['cornsilk', [255, 248, 220, 1]],
+        ['crimson', [220, 20, 60, 1]],
+        ['cyan', [0, 255, 255, 1]],
+        ['darkblue', [0, 0, 139, 1]],
+        ['darkcyan', [0, 139, 139, 1]],
+        ['darkgoldenrod', [184, 134, 11, 1]],
+        ['darkgray', [169, 169, 169, 1]],
+        ['darkgreen', [0, 100, 0, 1]],
+        ['darkgrey', [169, 169, 169, 1]],
+        ['darkkhaki', [189, 183, 107, 1]],
+        ['darkmagenta', [139, 0, 139, 1]],
+        ['darkolivegreen', [85, 107, 47, 1]],
+        ['darkorange', [255, 140, 0, 1]],
+        ['darkorchid', [153, 50, 204, 1]],
+        ['darkred', [139, 0, 0, 1]],
+        ['darksalmon', [233, 150, 122, 1]],
+        ['darkseagreen', [143, 188, 143, 1]],
+        ['darkslateblue', [72, 61, 139, 1]],
+        ['darkslategray', [47, 79, 79, 1]],
+        ['darkslategrey', [47, 79, 79, 1]],
+        ['darkturquoise', [0, 206, 209, 1]],
+        ['darkviolet', [148, 0, 211, 1]],
+        ['deeppink', [255, 20, 147, 1]],
+        ['deepskyblue', [0, 191, 255, 1]],
+        ['dimgray', [105, 105, 105, 1]],
+        ['dimgrey', [105, 105, 105, 1]],
+        ['dodgerblue', [30, 144, 255, 1]],
+        ['firebrick', [178, 34, 34, 1]],
+        ['floralwhite', [255, 250, 240, 1]],
+        ['forestgreen', [34, 139, 34, 1]],
+        ['fuchsia', [255, 0, 255, 1]],
+        ['gainsboro', [220, 220, 220, 1]],
+        ['ghostwhite', [248, 248, 255, 1]],
+        ['gold', [255, 215, 0, 1]],
+        ['goldenrod', [218, 165, 32, 1]],
+        ['gray', [128, 128, 128, 1]],
+        ['green', [0, 128, 0, 1]],
+        ['greenyellow', [173, 255, 47, 1]],
+        ['grey', [128, 128, 128, 1]],
+        ['honeydew', [240, 255, 240, 1]],
+        ['hotpink', [255, 105, 180, 1]],
+        ['indianred', [205, 92, 92, 1]],
+        ['indigo', [75, 0, 130, 1]],
+        ['ivory', [255, 255, 240, 1]],
+        ['khaki', [240, 230, 140, 1]],
+        ['lavender', [230, 230, 250, 1]],
+        ['lavenderblush', [255, 240, 245, 1]],
+        ['lawngreen', [124, 252, 0, 1]],
+        ['lemonchiffon', [255, 250, 205, 1]],
+        ['lightblue', [173, 216, 230, 1]],
+        ['lightcoral', [240, 128, 128, 1]],
+        ['lightcyan', [224, 255, 255, 1]],
+        ['lightgoldenrodyellow', [250, 250, 210, 1]],
+        ['lightgray', [211, 211, 211, 1]],
+        ['lightgreen', [144, 238, 144, 1]],
+        ['lightgrey', [211, 211, 211, 1]],
+        ['lightpink', [255, 182, 193, 1]],
+        ['lightsalmon', [255, 160, 122, 1]],
+        ['lightseagreen', [32, 178, 170, 1]],
+        ['lightskyblue', [135, 206, 250, 1]],
+        ['lightslategray', [119, 136, 153, 1]],
+        ['lightslategrey', [119, 136, 153, 1]],
+        ['lightsteelblue', [176, 196, 222, 1]],
+        ['lightyellow', [255, 255, 224, 1]],
+        ['lime', [0, 255, 0, 1]],
+        ['limegreen', [50, 205, 50, 1]],
+        ['linen', [250, 240, 230, 1]],
+        ['magenta', [255, 0, 255, 1]],
+        ['maroon', [128, 0, 0, 1]],
+        ['mediumaquamarine', [102, 205, 170, 1]],
+        ['mediumblue', [0, 0, 205, 1]],
+        ['mediumorchid', [186, 85, 211, 1]],
+        ['mediumpurple', [147, 112, 219, 1]],
+        ['mediumseagreen', [60, 179, 113, 1]],
+        ['mediumslateblue', [123, 104, 238, 1]],
+        ['mediumspringgreen', [0, 250, 154, 1]],
+        ['mediumturquoise', [72, 209, 204, 1]],
+        ['mediumvioletred', [199, 21, 133, 1]],
+        ['midnightblue', [25, 25, 112, 1]],
+        ['mintcream', [245, 255, 250, 1]],
+        ['mistyrose', [255, 228, 225, 1]],
+        ['moccasin', [255, 228, 181, 1]],
+        ['navajowhite', [255, 222, 173, 1]],
+        ['navy', [0, 0, 128, 1]],
+        ['oldlace', [253, 245, 230, 1]],
+        ['olive', [128, 128, 0, 1]],
+        ['olivedrab', [107, 142, 35, 1]],
+        ['orange', [255, 165, 0, 1]],
+        ['orangered', [255, 69, 0, 1]],
+        ['orchid', [218, 112, 214, 1]],
+        ['palegoldenrod', [238, 232, 170, 1]],
+        ['palegreen', [152, 251, 152, 1]],
+        ['paleturquoise', [175, 238, 238, 1]],
+        ['palevioletred', [219, 112, 147, 1]],
+        ['papayawhip', [255, 239, 213, 1]],
+        ['peachpuff', [255, 218, 185, 1]],
+        ['peru', [205, 133, 63, 1]],
+        ['pink', [255, 192, 203, 1]],
+        ['plum', [221, 160, 221, 1]],
+        ['powderblue', [176, 224, 230, 1]],
+        ['purple', [128, 0, 128, 1]],
+        ['red', [255, 0, 0, 1]],
+        ['rosybrown', [188, 143, 143, 1]],
+        ['royalblue', [65, 105, 225, 1]],
+        ['saddlebrown', [139, 69, 19, 1]],
+        ['salmon', [250, 128, 114, 1]],
+        ['sandybrown', [244, 164, 96, 1]],
+        ['seagreen', [46, 139, 87, 1]],
+        ['seashell', [255, 245, 238, 1]],
+        ['sienna', [160, 82, 45, 1]],
+        ['silver', [192, 192, 192, 1]],
+        ['skyblue', [135, 206, 235, 1]],
+        ['slateblue', [106, 90, 205, 1]],
+        ['slategray', [112, 128, 144, 1]],
+        ['slategrey', [112, 128, 144, 1]],
+        ['snow', [255, 250, 250, 1]],
+        ['springgreen', [0, 255, 127, 1]],
+        ['steelblue', [70, 130, 180, 1]],
+        ['tan', [210, 180, 140, 1]],
+        ['teal', [0, 128, 128, 1]],
+        ['thistle', [216, 191, 216, 1]],
+        ['tomato', [255, 99, 71, 1]],
+        ['turquoise', [64, 224, 208, 1]],
+        ['violet', [238, 130, 238, 1]],
+        ['wheat', [245, 222, 179, 1]],
+        ['white', [255, 255, 255, 1]],
+        ['whitesmoke', [245, 245, 245, 1]],
+        ['yellow', [255, 255, 0, 1]],
+        ['yellowgreen', [154, 205, 50, 1]],
+    ]
+
+    for (var value in keywords) {
+        items_to_test = keywords[value];
+        keyword = items_to_test[0];
+        expected = expected_value(items_to_test[1]);
+        letter = value % keyword.length;
+        replacement = keyword;
+
+        color_test(keyword, expected, "Keyword should parse properly");
+        color_test(keyword.toUpperCase(), expected, "Keywords should be case-insensitive");
+        replacement[letter] = "\\" + keyword.codePointAt(letter);
+        color_test(replacement, expected, "Code point should parse");
+        color_test(keyword.slice(0, letter) + keyword.slice(letter + 1, keyword.length), null, "Partial keywords shouldn't parse");
+        if (keyword.indexOf('k') !== -1)
+            color_test(keyword.replace('k', 'K'), null, "Unicode modification shouldn't parse");
+    }
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving.html
new file mode 100644
index 0000000..b3d1c74
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/color-resolving.html
@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Color 4: Resolving color values</title>
+<link rel="author" title="Chris Nardi" href="mailto:csnardi1@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-color-values">
+<meta name="assert" content="Tests if color values are resolved properly">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="parent" style="color: rgb(45, 23, 27)">
+    <div id="inner"></div>
+</div>
+
+<script>
+    function color_test(color, expected, reason) {
+        test(function() {
+            var element = document.getElementById('inner');
+            // Random value not in our test data.
+            fail_value = "rgb(12, 34, 223)"
+            element.style.color = "black";
+            element.style.cssText = "color: " + fail_value + "; color: " + color;
+
+            if (expected === null)
+                assert_equals(getComputedStyle(element).color, fail_value);
+            else
+                assert_equals(getComputedStyle(element).color, expected);
+        }, `${reason}: ${color}`);
+    }
+
+    function expected_value(rgb_channels) {
+        if (rgb_channels === null)
+            return null;
+        else if (rgb_channels.length === 3 || rgb_channels[3] == 1)
+            return "rgb(" + rgb_channels.slice(0, 3).join(", ") + ")";
+        else
+            return "rgba(" + rgb_channels.join(", ") + ")";
+    }
+
+    tests = [
+        // Keyword tests
+        ["", null, "Should not parse invalid keyword"],
+        [" /* hey */\n", null, "Should not parse invalid keyword"],
+        ["4", null, "Should not parse invalid keyword"],
+        ["top", null, "Should not parse invalid keyword"],
+        ["/**/transparent", [0, 0, 0, 0], "Should parse to completely transparent"],
+        ["transparent", [0, 0, 0, 0], "Should parse to completely transparent"],
+        [" transparent\n", [0, 0, 0, 0], "Should parse to completely transparent"],
+        ["TransParent", [0, 0, 0, 0], "Should parse to completely transparent"],
+        ["currentColor", [45, 23, 27], "Should be same as parent color"],
+        ["CURRENTcolor", [45, 23, 27], "Should be same as parent color"],
+        ["current-Color", null, "Should not parse invalid keyword"],
+        ["black", [0, 0, 0, 1], "Should parse as correct value"],
+        ["white", [255, 255, 255, 1], "Should parse as correct value"],
+        ["fuchsia", [255, 0, 255, 1], "Should parse as correct value"],
+        ["cyan", [0, 255, 255, 1], "Should parse as correct value"],
+        ["CyAn", [0, 255, 255, 1], "Should parse as cyan"],
+
+        // Hex tests
+        ["#", null, "Should not parse invalid hex"],
+        ["#f", null, "Should not parse invalid hex"],
+        ["#ff", null, "Should not parse invalid hex"],
+        ["#fff", [255, 255, 255, 1], "Valid 3-digit hex"],
+        ["#ffg", null, "Should not parse invalid hex"],
+        ["#ffff", [255, 255, 255, 1], "Valid 4-digit hex"],
+        ["#fffg", null, "Should not parse invalid hex"],
+        ["#fffff", null, "Should not parse invalid hex"],
+        ["#ffffff", [255, 255, 255, 1], "Valid 6-digit hex"],
+        ["#fffffg", null, "Should not parse invalid hex"],
+        ["#fffffff", null, "Should not parse invalid hex"],
+        ["#ffffffff", [255, 255, 255, 1], "Valid 8-digit hex"],
+        ["#fffffffg", null, "Should not parse invalid hex"],
+        ["#fffffffff", null, "Should not parse invalid hex"],
+        ["#FFCc99", [255, 204, 153, 1], "Valid 6-digit hex"],
+        ["#369", [51, 102, 153, 1], "Valid 3-digit hex"],
+
+        // RGB tests
+        ["rgb(00, 51, 102)", [0, 51, 102, 1], "Valid numbers should be parsed"],
+        ["r\\gb(00, 51, 102)", [0, 51, 102, 1], "Correct escape sequences should still parse"],
+        ["r\\67 b(00, 51, 102)", [0, 51, 102, 1], "Correct escape sequences should still parse"],
+        ["RGB(153, 204, 255)", [153, 204, 255, 1], "Capitalization should not affect parsing"],
+        ["rgB(0, 0, 0)", [0, 0, 0, 1], "Capitalization should not affect parsing"],
+        ["rgB(0, 51, 255)", [0, 51, 255, 1], "Capitalization should not affect parsing"],
+        ["rgb(0,51,255)", [0, 51, 255, 1], "Lack of whitespace should not affect parsing"],
+        ["rgb(0\t,  51 ,255)", [0, 51, 255, 1], "Whitespace should not affect parsing"],
+        ["rgb(/* R */0, /* G */51, /* B */255)", [0, 51, 255, 1], "Comments should be allowed within function"],
+        ["rgb(-51, 306, 0)", [0, 255, 0, 1], "Invalid values should be clamped to 0 and 255 respectively"],
+        ["rgb(42%, 3%, 50%)", [107, 8, 128, 1], "Valid percentages should be parsed"],
+        ["RGB(100%, 100%, 100%)", [255, 255, 255, 1], "Capitalization should not affect parsing"],
+        ["rgB(0%, 0%, 0%)", [0, 0, 0, 1], "Capitalization should not affect parsing"],
+        ["rgB(10%, 20%, 30%)", [26, 51, 77, 1], "Capitalization should not affect parsing"],
+        ["rgb(10%,20%,30%)", [26, 51, 77, 1], "Whitespace should not affect parsing"],
+        ["rgb(10%\t,  20% ,30%)", [26, 51, 77, 1], "Whitespace should not affect parsing"],
+        ["rgb(/* R */ 10%, /* G */ 20%, /* B */ 30%)", [26, 51, 77, 1], "Comments should not affect parsing"],
+        ["rgb(-12%, 110%, 1400%)", [0, 255, 255, 1], "Invalid values should be clamped to 0 and 255 respectively"],
+        ["rgb(10%, 50%, 0)", null, "Values must be all numbers or all percentages"],
+        ["rgb(255, 50%, 0%)", null, "Values must be all numbers or all percentages"],
+        ["rgb(0, 0 0)", null, "Comma optional syntax requires no commas at all"],
+        ["rgb(0, 0, 0deg)", null, "Angles are not accepted in the rgb function"],
+        ["rgb(0, 0, light)", null, "Keywords are not accepted in the rgb function"],
+        ["rgb()", null, "The rgb function requires 3 or 4 arguments"],
+        ["rgb(0)", null, "The rgb function requires 3 or 4 arguments"],
+        ["rgb(0, 0)", null, "The rgb function requires 3 or 4 arguments"],
+        ["rgb(0%)", null, "The rgb function requires 3 or 4 arguments"],
+        ["rgb(0%, 0%)", null, "The rgb function requires 3 or 4 arguments"],
+        ["rgb(0, 0, 0, 0)", [0, 0, 0, 0], "RGB and RGBA are synonyms"],
+        ["rgb(0%, 0%, 0%, 0%)", [0, 0, 0, 0], "RGB and RGBA are synonyms"],
+        ["rgb(0%, 0%, 0%, 0)", [0, 0, 0, 0], "RGB and RGBA are synonyms"],
+        ["rgba(0, 0, 0, 0)", [0, 0, 0, 0], "Valid numbers should be parsed"],
+        ["rgba(204, 0, 102, 0.3)", [204, 0, 102, 0.3], "Valid numbers should be parsed"],
+        ["RGBA(255, 255, 255, 0)", [255, 255, 255, 0], "Capitalization should not affect parsing"],
+        ["rgBA(0, 51, 255, 1)", [0, 51, 255, 1], "Capitalization should not affect parsing"],
+        ["rgba(0, 51, 255, 1.1)", [0, 51, 255, 1], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0, 51, 255, 37)", [0, 51, 255, 1], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0, 51, 255, 0.42)", [0, 51, 255, 0.42], "Valid numbers should be parsed"],
+        ["rgba(0, 51, 255, 0)", [0, 51, 255, 0], "Valid numbers should be parsed"],
+        ["rgba(0, 51, 255, -0.1)", [0, 51, 255, 0], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0, 51, 255, -139)", [0, 51, 255, 0], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["RGBA(100%, 100%, 100%, 0)", [255, 255, 255, 0], "Capitalization should not affect parsing"],
+        ["rgba(42%, 3%, 50%, 0.3)", [107, 8, 128, 0.3], "Valid percentages should be parsed"],
+        ["rgBA(0%, 20%, 100%, 1)", [0, 51, 255, 1], "Capitalization should not affect parsing"],
+        ["rgba(0%, 20%, 100%, 1.1)", [0, 51, 255, 1], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0%, 20%, 100%, 37)", [0, 51, 255, 1], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0%, 20%, 100%, 0.42)", [0, 51, 255, 0.42], "Valid percentages should be parsed"],
+        ["rgba(0%, 20%, 100%, 0)", [0, 51, 255, 0], "Valid percentages should be parsed"],
+        ["rgba(0%, 20%, 100%, -0.1)", [0, 51, 255, 0], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(0%, 20%, 100%, -139)", [0, 51, 255, 0], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["rgba(255, 255, 255, 0%)", [255, 255, 255, 0], "Percent alpha values are accepted in rgb/rgba"],
+        ["rgba(0%, 0%, 0%, 0%)", [0, 0, 0, 0], "Percent alpha values are accepted in rgb/rgba"],
+        ["rgba(0%, 0%, 0%)", [0, 0, 0, 1], "RGB and RGBA are synonyms"],
+        ["rgba(0, 0, 0)", [0, 0, 0, 1], "RGB and RGBA are synonyms"],
+        ["rgba(10%, 50%, 0, 1)", null, "Values must be all numbers or all percentages"],
+        ["rgba(255, 50%, 0%, 1)", null, "Values must be all numbers or all percentages"],
+        ["rgba(0, 0, 0 0)", null, "Comma optional syntax requires no commas at all"],
+        ["rgba(0, 0, 0, 0deg)", null, "Angles are not accepted in the rgb function"],
+        ["rgba(0, 0, 0, light)", null, "Keywords are not accepted in the rgb function"],
+        ["rgba()", null, "The rgba function requires 3 or 4 arguments"],
+        ["rgba(0)", null, "The rgba function requires 3 or 4 arguments"],
+        ["rgba(0, 0, 0, 0, 0)", null, "The rgba function requires 3 or 4 arguments"],
+        ["rgba(0%)", null, "The rgba function requires 3 or 4 arguments"],
+        ["rgba(0%, 0%)", null, "The rgba function requires 3 or 4 arguments"],
+        ["rgba(0%, 0%, 0%, 0%, 0%)", null, "The rgba function requires 3 or 4 arguments"],
+
+        // HSL tests
+        ["HSL(0, 0%, 0%)", [0, 0, 0, 1], "Capitalization should not affect parsing"],
+        ["hsL(0, 100%, 50%)", [255, 0, 0, 1], "Capitalization should not affect parsing"],
+        ["hsl(60, 100%, 37.5%)", [191, 191, 0, 1], "Valid numbers should be parsed"],
+        ["hsl(780, 100%, 37.5%)", [191, 191, 0, 1], "Angles are represented as a part of a circle and wrap around"],
+        ["hsl(-300, 100%, 37.5%)", [191, 191, 0, 1], "Angles are represented as a part of a circle and wrap around"],
+        ["hsl(300, 50%, 50%)", [191, 64, 191, 1], "Valid numbers should be parsed"],
+        ["hsl(30deg, 100%, 100%)", [255, 255, 255, 1], "Angles are accepted in HSL/HSLA"],
+        ["hsl(0, 0%, 0%, 0%)", [0, 0, 0, 0], "HSL and HSLA are synonyms"],
+        ["hsl(10, 50%, 0)", null, "The second and third parameters of hsl/hsla must be a percent"],
+        ["hsl(50%, 50%, 0%)", null, "The first parameter of hsl/hsla must be a number or angle"],
+        ["hsl(0, 0% 0%)", null, "Comma optional syntax requires no commas at all"],
+        ["hsl(0, 0%, light)", null, "Keywords are not accepted in the hsl function"],
+        ["hsl()", null, "The hsl function requires 3 or 4 arguments"],
+        ["hsl(0)", null, "The hsl function requires 3 or 4 arguments"],
+        ["hsl(0, 0%)", null, "The hsl function requires 3 or 4 arguments"],
+        ["HSLA(-300, 100%, 37.5%, 1)", [191, 191, 0, 1], "Angles are represented as a part of a circle and wrap around"],
+        ["hsLA(-300, 100%, 37.5%, 12)", [191, 191, 0, 1], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["hsla(-300, 100%, 37.5%, 0.2)", [191, 191, 0, 0.2], "Angles are represented as a part of a circle and wrap around"],
+        ["hsla(-300, 100%, 37.5%, 0)", [191, 191, 0, 0], "Angles are represented as a part of a circle and wrap around"],
+        ["hsla(-300, 100%, 37.5%, -3)", [191, 191, 0, 0], "Invalid alpha values should be clamped to 0 and 1 respectively"],
+        ["hsla(0, 0%, 0%, 50%)", [0, 0, 0, 0.5], "Percent alpha values are accepted in hsl/hsla"],
+        ["hsla(30deg, 100%, 100%, 1)", [255, 255, 255, 1], "Angles are accepted in HSL/HSLA"],
+        ["hsla(10, 50%, 0, 1)", null, "The second and third parameters of hsl/hsla must be a percent"],
+        ["hsla(50%, 50%, 0%, 1)", null, "The first parameter of hsl/hsla must be a number or angle"],
+        ["hsla(0, 0% 0%, 1)", null, "Comma optional syntax requires no commas at all"],
+        ["hsla(0, 0%, light, 1)", null, "Keywords are not accepted in the hsla function"],
+        ["hsla()", null, "The hsla function requires 3 or 4 arguments"],
+        ["hsla(0)", null, "The hsla function requires 3 or 4 arguments"],
+        ["hsla(0, 0%)", null, "The hsla function requires 3 or 4 arguments"],
+        ["hsla(0, 0%, 0%, 1, 0%)", null, "The hsla function requires 3 or 4 arguments"]
+    ]
+
+    for (var value in tests) {
+        items_to_test = tests[value];
+        color_test(items_to_test[0], expected_value(items_to_test[1]), items_to_test[2]);
+    }
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-disabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-disabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index 1e978ee1..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-disabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-FAIL Gyroscope: Feature-Policy header gyroscope 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
-PASS Gyroscope: Feature-Policy header gyroscope 'none' disallows same-origin iframes.
-PASS Gyroscope: Feature-Policy header gyroscope 'none' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
deleted file mode 100644
index 1c33e24..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL Gyroscope: Feature-Policy allow='gyroscope' attribute allows same-origin relocation assert_true: 'new Gyroscope()' expected true got false
-PASS Gyroscope: Feature-Policy allow='gyroscope' attribute disallows cross-origin relocation
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https-expected.txt
deleted file mode 100644
index 56e8581..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL Gyroscope: Feature-Policy allow='gyroscope' attribute allows same-origin iframe assert_true: 'new Gyroscope()' expected true got false
-FAIL Gyroscope: Feature-Policy allow='gyroscope' attribute allows cross-origin iframe assert_true: 'new Gyroscope()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index 24115cd..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS Gyroscope: Feature-Policy header gyroscope * allows the top-level document.
-FAIL Gyroscope: Feature-Policy header gyroscope * allows same-origin iframes. assert_true: 'new Gyroscope()' expected true got false
-FAIL Gyroscope: Feature-Policy header gyroscope * allows cross-origin iframes. assert_true: 'new Gyroscope()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https-expected.txt
deleted file mode 100644
index c5f2cc3..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS Gyroscope: Feature-Policy header gyroscope 'self' allows the top-level document.
-FAIL Gyroscope: Feature-Policy header gyroscope 'self' allows same-origin iframes. assert_true: 'new Gyroscope()' expected true got false
-PASS Gyroscope: Feature-Policy header gyroscope 'self' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt
index c1cecdd..f3d7dc5 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt
@@ -1,5 +1,5 @@
 This is a testharness.js-based test.
-Found 7041 tests; 6729 PASS, 312 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 7041 tests; 6731 PASS, 310 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS form.title: 32 tests
 PASS form.lang: 32 tests
 PASS form.dir: 62 tests
@@ -229,9 +229,7 @@
 PASS input.placeholder: 32 tests
 PASS input.readOnly: 33 tests
 PASS input.required: 33 tests
-PASS input.size: 57 tests
-NOTRUN test
-NOTRUN test
+PASS input.size: 59 tests
 PASS input.src: 38 tests
 PASS input.step: 32 tests
 PASS input.type: 256 tests
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/usvstring-reflection.html b/third_party/WebKit/LayoutTests/external/wpt/html/dom/usvstring-reflection.html
index 04942e01..88feced 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/usvstring-reflection.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/usvstring-reflection.html
@@ -18,6 +18,11 @@
 }, "window.open : unpaired surrogate codepoint should be replaced with U+FFFD");
 
 test(() => {
+  var w = document.open("about:blank#\uD800", "", "");
+  assert_equals(w.location.hash, '#%EF%BF%BD');
+}, "document.open : unpaired surrogate codepoint should be replaced with U+FFFD");
+
+test(() => {
   var element = document.createElement("a");
   element.ping = '\uD989';
   assert_equals(element.ping, '\uFFFD');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-label-element/labelable-elements-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-label-element/labelable-elements-expected.txt
deleted file mode 100644
index 3c6aa0c..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-label-element/labelable-elements-expected.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-This is a testharness.js-based test.
-PASS Check if the output element is a labelable element
-PASS Check if the output element can access 'labels'
-PASS Check if the progress element is a labelable element
-PASS Check if the progress element can access 'labels'
-PASS Check if the select element is a labelable element
-PASS Check if the select element can access 'labels'
-PASS Check if the textarea element is a labelable form-element
-PASS Check if the textarea element can access 'labels'
-PASS Check if the button element is a labelable element
-PASS Check if the button element can access 'labels'
-PASS Check if the hidden input element is not a labelable element.
-FAIL Check if the hidden input element has null 'labels' assert_equals: .labels NodeList should contain the input after the input type is changed from 'hidden' to 'checkbox' expected 1 but got 0
-PASS Check if the input element in radio state is a labelable element
-PASS Check if the input element in radio state can access 'labels'
-PASS Check if the keygen element is not a labelable element
-PASS Check if the keygen element can access 'labels'
-PASS Check if the meter element is a labelable element
-PASS Check if the meter element can access 'labels'
-PASS Check if the fieldset element is not a labelable element
-PASS Check if the fieldset element can access 'labels'
-PASS Check if the label element is not a labelable element
-PASS Check if the label element can access 'labels'
-PASS Check if the object element is not a labelable element
-PASS Check if the object element can access 'labels'
-PASS Check if the img element is not a labelable element
-PASS Check if the img element can access 'labels'
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-disabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-disabled-by-feature-policy.https-expected.txt
index 8029bb3fa..62553057 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-disabled-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-disabled-by-feature-policy.https-expected.txt
@@ -1,6 +1,6 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: UncalibratedMagnetometer is not defined
-FAIL Magnetometer: Feature-Policy header magnetometer 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
+PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows the top-level document.
 PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows same-origin iframes.
 PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows cross-origin iframes.
 Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
index a39566d..e948ee0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
@@ -1,6 +1,6 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: UncalibratedMagnetometer is not defined
-FAIL Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin relocation assert_true: 'new Magnetometer()' expected true got false
+PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin relocation
 PASS Magnetometer: Feature-Policy allow='magnetometer' attribute disallows cross-origin relocation
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https-expected.txt
index 337947ec..8bf806c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https-expected.txt
@@ -1,6 +1,6 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: UncalibratedMagnetometer is not defined
-FAIL Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin iframe assert_true: 'new Magnetometer()' expected true got false
-FAIL Magnetometer: Feature-Policy allow='magnetometer' attribute allows cross-origin iframe assert_true: 'new Magnetometer()' expected true got false
+PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin iframe
+PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows cross-origin iframe
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy.https-expected.txt
index f43bb5e..5613fb0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-by-feature-policy.https-expected.txt
@@ -1,7 +1,7 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: UncalibratedMagnetometer is not defined
 PASS Magnetometer: Feature-Policy header magnetometer * allows the top-level document.
-FAIL Magnetometer: Feature-Policy header magnetometer * allows same-origin iframes. assert_true: 'new Magnetometer()' expected true got false
-FAIL Magnetometer: Feature-Policy header magnetometer * allows cross-origin iframes. assert_true: 'new Magnetometer()' expected true got false
+PASS Magnetometer: Feature-Policy header magnetometer * allows same-origin iframes.
+PASS Magnetometer: Feature-Policy header magnetometer * allows cross-origin iframes.
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
index 4427b7d..67c6a69 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https-expected.txt
@@ -1,7 +1,7 @@
 This is a testharness.js-based test.
 Harness Error. harness_status.status = 1 , harness_status.message = Uncaught ReferenceError: UncalibratedMagnetometer is not defined
 PASS Magnetometer: Feature-Policy header magnetometer 'self' allows the top-level document.
-FAIL Magnetometer: Feature-Policy header magnetometer 'self' allows same-origin iframes. assert_true: 'new Magnetometer()' expected true got false
+PASS Magnetometer: Feature-Policy header magnetometer 'self' allows same-origin iframes.
 PASS Magnetometer: Feature-Policy header magnetometer 'self' disallows cross-origin iframes.
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index ca23a2e..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-FAIL AbsoluteOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none';magnetometer 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
-PASS AbsoluteOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none';magnetometer 'none' disallows same-origin iframes.
-PASS AbsoluteOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none';magnetometer 'none' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
deleted file mode 100644
index c06fd27..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL AbsoluteOrientationSensor: Feature-Policy allow='accelerometer gyroscope magnetometer' attribute allows same-origin relocation assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-PASS AbsoluteOrientationSensor: Feature-Policy allow='accelerometer gyroscope magnetometer' attribute disallows cross-origin relocation
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt
deleted file mode 100644
index 9a41e23..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL AbsoluteOrientationSensor: Feature-Policy allow='accelerometer gyroscope magnetometer' attribute allows same-origin iframe assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-FAIL AbsoluteOrientationSensor: Feature-Policy allow='accelerometer gyroscope magnetometer' attribute allows cross-origin iframe assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index 85f6de7a..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS AbsoluteOrientationSensor: Feature-Policy header accelerometer *;gyroscope *;magnetometer * allows the top-level document.
-FAIL AbsoluteOrientationSensor: Feature-Policy header accelerometer *;gyroscope *;magnetometer * allows same-origin iframes. assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-FAIL AbsoluteOrientationSensor: Feature-Policy header accelerometer *;gyroscope *;magnetometer * allows cross-origin iframes. assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt
deleted file mode 100644
index 03362e0..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS AbsoluteOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self';magnetometer 'self' allows the top-level document.
-FAIL AbsoluteOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self';magnetometer 'self' allows same-origin iframes. assert_true: 'new AbsoluteOrientationSensor()' expected true got false
-PASS AbsoluteOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self';magnetometer 'self' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index 8eedb35..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-FAIL RelativeOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none' disallows the top-level document. assert_throws: function "() => {new sensorType()}" did not throw
-PASS RelativeOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none' disallows same-origin iframes.
-PASS RelativeOrientationSensor: Feature-Policy header accelerometer 'none';gyroscope 'none' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
deleted file mode 100644
index 24e74839..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL RelativeOrientationSensor: Feature-Policy allow='accelerometer gyroscope' attribute allows same-origin relocation assert_true: 'new RelativeOrientationSensor()' expected true got false
-PASS RelativeOrientationSensor: Feature-Policy allow='accelerometer gyroscope' attribute disallows cross-origin relocation
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt
deleted file mode 100644
index 6fcfb78..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL RelativeOrientationSensor: Feature-Policy allow='accelerometer gyroscope' attribute allows same-origin iframe assert_true: 'new RelativeOrientationSensor()' expected true got false
-FAIL RelativeOrientationSensor: Feature-Policy allow='accelerometer gyroscope' attribute allows cross-origin iframe assert_true: 'new RelativeOrientationSensor()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https-expected.txt
deleted file mode 100644
index 2c876ab..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS RelativeOrientationSensor: Feature-Policy header accelerometer *;gyroscope * allows the top-level document.
-FAIL RelativeOrientationSensor: Feature-Policy header accelerometer *;gyroscope * allows same-origin iframes. assert_true: 'new RelativeOrientationSensor()' expected true got false
-FAIL RelativeOrientationSensor: Feature-Policy header accelerometer *;gyroscope * allows cross-origin iframes. assert_true: 'new RelativeOrientationSensor()' expected true got false
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt
deleted file mode 100644
index ce8b47f..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-PASS RelativeOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self' allows the top-level document.
-FAIL RelativeOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self' allows same-origin iframes. assert_true: 'new RelativeOrientationSensor()' expected true got false
-PASS RelativeOrientationSensor: Feature-Policy header accelerometer 'self';gyroscope 'self' disallows cross-origin iframes.
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/OWNERS b/third_party/WebKit/LayoutTests/external/wpt/webxr/OWNERS
new file mode 100644
index 0000000..dffd2c95
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/OWNERS
@@ -0,0 +1 @@
+file://third_party/WebKit/Source/modules/xr/OWNERS
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_check.html b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_check.html
new file mode 100644
index 0000000..2d8e5b38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_check.html
@@ -0,0 +1,17 @@
+<script src=webxr_util.js></script>
+<script>
+'use strict';
+let definedObjects = [];
+let undefinedObjects = [];
+
+forEachWebxrObject((obj, name) => {
+    if(obj == undefined) {
+        undefinedObjects.push(name);
+    } else {
+        definedObjects.push(name);
+    }
+});
+
+window.parent.postMessage({ undefinedObjects, definedObjects}, '*');
+
+</script>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js
new file mode 100644
index 0000000..a663b2d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js
@@ -0,0 +1,27 @@
+// This functions calls a callback with each API object as specified
+// by https://immersive-web.github.io/webxr/spec/latest/, allowing
+// checks to be made on all ojects.
+// Arguements:
+//      callback: A callback function with two arguements, the first
+//                being the API object, the second being the name of
+//                that API object.
+function forEachWebxrObject(callback) {
+  callback(window.navigator.xr, 'navigator.xr');
+  callback(window.XRDevice, 'XRDevice');
+  callback(window.XRSession, 'XRSession');
+  callback(window.XRSessionCreationOptions, 'XRSessionCreationOptions');
+  callback(window.XRFrameRequestCallback, 'XRFrameRequestCallback');
+  callback(window.XRPresentationFrame, 'XRPresentationFrame');
+  callback(window.XRView, 'XRView');
+  callback(window.XRViewport, 'XRViewport');
+  callback(window.XRDevicePose, 'XRDevicePose');
+  callback(window.XRLayer, 'XRLayer');
+  callback(window.XRWebGLLayer, 'XRWebGLLayer');
+  callback(window.XRWebGLLayerInit, 'XRWebGLLayerInit');
+  callback(window.XRCoordinateSystem, 'XRCoordinateSystem');
+  callback(window.XRFrameOfReference, 'XRFrameOfReference');
+  callback(window.XRStageBounds, 'XRStageBounds');
+  callback(window.XRStageBoundsPoint, 'XRStageBoundsPoint');
+  callback(window.XRSessionEvent, 'XRSessionEvent');
+  callback(window.XRCoordinateSystemEvent, 'XRCoordinateSystemEvent');
+}
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/webxr_availability.http.sub.html b/third_party/WebKit/LayoutTests/external/wpt/webxr/webxr_availability.http.sub.html
new file mode 100644
index 0000000..515b2ad1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/webxr_availability.http.sub.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<body>
+  <script src=/resources/testharness.js></script>
+  <script src=/resources/testharnessreport.js></script>
+  <script src=/webxr/resources/webxr_util.js></script>
+  <script>
+    'use strict';
+
+    var same_origin_src = '/webxr/resources/';
+    var cross_origin_https_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
+      same_origin_src;
+
+    test(t => {
+      forEachWebxrObject((obj, name) => {
+        assert_equals(obj, undefined, name + ' was defined in insecure context.');
+      });
+    }, 'Test webxr not available in insecure context');
+
+    async_test(t => {
+      let frame = document.createElement('iframe');
+      frame.src = cross_origin_https_src + 'webxr_check.html';
+
+      window.addEventListener('message', t.step_func(function handler(evt) {
+          if (evt.source === frame.contentWindow) {
+            document.body.removeChild(frame);
+            window.removeEventListener('message', handler);
+
+            assert_equals(evt.data.definedObjects.length, 0,
+              "Some objects were defined in insecure context: " +
+              evt.data.definedObjects.toString());
+            t.done();
+          }
+      }));
+
+      document.body.appendChild(frame);
+    }, 'Test webxr not available in secure context in insecure context');
+
+  </script>
+</body>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Document/document-open-usvstring.html b/third_party/WebKit/LayoutTests/fast/dom/Document/document-open-usvstring.html
deleted file mode 100644
index 1c23696..0000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Document/document-open-usvstring.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<title>document.open test for USVString url</title>
-<script src="../../../resources/testharness.js"></script>
-<script src="../../../resources/testharnessreport.js"></script>
-<body>
-<script>
-test(function() {
-    // USVString is equivalent to DOMString except for not allowing unpaired surrogate codepoints.
-    // U+D800 to U+DFFF code point values are reserved as high and low surrogates, so no UTF forms, including UTF-16, can encode these code points.
-    // Unpaired surrogate codepoints present in USVString are converted by the browser to Unicode 'replacement character' U+FFFD.
-    w = document.open("data:text/html,<span>\ud801 is an unpaired surrogate codepoint</span>", "", "");
-    // w should be a window object in case of url as USVString type, otherwise in case of DOMString type
-    // javascript execution stops after throwing syntax error "Unable to open a window with invalid URL".
-    assert_equals(typeof(w), 'object', 'w should be a window object');
-}, "unpaired surrogate codepoint should be replaced with U+FFFD");
-</script>
-</body>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content-expected.txt
index 9bbf83e..a5e53dc2 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content-expected.txt
@@ -1,15 +1,15 @@
-PASS testRunner.isChooserShown() is false
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is false
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
+PASS mockColorChooser.isChooserShown() is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content.html
index c0aa4199..a064324 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/input-color-in-content.html
@@ -2,6 +2,9 @@
 <html>
 <body>
 <script src="../../../resources/js-test.js"></script>
+<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
+<script src="file:///gen/third_party/WebKit/common/color_chooser/color_chooser.mojom.js"></script>
+<script src="../../forms/color/mock-colorchooser.js"></script>
 <div id="host" tabindex="1">
   <input id="target" type="color" value="#000000">
 </div>
@@ -11,29 +14,22 @@
 shadow.innerHTML = "<content></content>";
 jsTestIsAsync = true;
 
-function waitUntilShown(then)
-{
-    if (!testRunner.isChooserShown())
-        return window.setTimeout(function() { waitUntilShown(then); }, 0);
-    then();
-}
-
 function ensureOpeningFor(count, then)
 {
-    shouldBeTrue("testRunner.isChooserShown()");
+    shouldBeTrue("mockColorChooser.isChooserShown()");
     if (count)
         return window.setTimeout(function() { ensureOpeningFor(count -1, then); }, 0);
     then();
 }
 
 if (window.eventSender) {
-   shouldBeFalse("testRunner.isChooserShown()");
+   shouldBeFalse("mockColorChooser.isChooserShown()");
    eventSender.dragMode = false;
    eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.offsetHeight / 2);
    eventSender.mouseDown();
    eventSender.mouseUp();
 
-   waitUntilShown(function() {
+   waitUntilChooserShown(function() {
       testRunner.setWindowIsKey(false); // This triggers a style recalc.
       ensureOpeningFor(10, finishJSTest); // Try several times to ensure nothing wrong happens asynchronously.
    });
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html b/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
index 9ac4520..5aac8ea 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
@@ -1,6 +1,9 @@
 <!DOCTYPE html>
 <script src="../../../resources/testharness.js"></script>
 <script src="../../../resources/testharnessreport.js"></script>
+<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
+<script src="file:///gen/third_party/WebKit/common/color_chooser/color_chooser.mojom.js"></script>
+<script src="../../forms/color/mock-colorchooser.js"></script>
 <input id="colorPick" type="color" />
 <label for="colorPick" id="labelPick">Pick a color</label>
 <script>
@@ -8,7 +11,7 @@
     assert_true(window.eventSender !== null);
 }, "window.eventSender is required for the test to run");
 
-test (function() {
+async_test (t => {
     var colorPicker = document.getElementById("colorPick");
     colorPicker.style.display = "none";
     var labelPick = document.getElementById("labelPick");
@@ -17,6 +20,6 @@
     eventSender.mouseMoveTo(x, y);
     eventSender.mouseDown();
     eventSender.mouseUp();
-    assert_true(testRunner.isChooserShown());
+    waitUntilChooserShown(() => { t.done(); });
 }, "Tests click on label for color picker with display none should show chooser");
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-expected.txt
index 32084f64..43e5eeed 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-expected.txt
@@ -1,5 +1,3 @@
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly-expected.txt b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly-expected.txt
index 32084f64..43e5eeed 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly-expected.txt
@@ -1,5 +1,3 @@
-PASS testRunner.isChooserShown() is true
-PASS testRunner.isChooserShown() is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly.html b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly.html
index 0aa0ad9..9010d13a 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown-readonly.html
@@ -3,32 +3,27 @@
 <body>
 <script src="../../../resources/js-test.js"></script>
 <script src="../resources/common.js"></script>
+<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
+<script src="file:///gen/third_party/WebKit/common/color_chooser/color_chooser.mojom.js"></script>
+<script src="../../forms/color/mock-colorchooser.js"></script>
 <div id="host" tabindex="1">
   <input id="target" type="color" value="#000000" readonly>
 </div>
 <script>
 
 if (window.eventSender) {
-   window.jsTestIsAsync = true
+  window.jsTestIsAsync = true
 
-   clickElement(target);
-   shouldBeTrue("testRunner.isChooserShown()");
+  clickElement(target);
+  waitUntilChooserShown(() => {
+    target.style.display = "none";
 
-   target.style.display = "none";
-
-   var nwait = 5;
-   function testClosed()
-   {
-        nwait--;
-        if (0 < nwait)
-            return window.setTimeout(testClosed, 0);
-        // Let an Oilpan GC finalize the popup controller and bring about closure of color chooser.
-        gc();
-        shouldBeFalse("testRunner.isChooserShown()");
-        finishJSTest();
-   }
-
-   window.setTimeout(testClosed, 0);
+    window.setTimeout(() => {
+      // Let an Oilpan GC finalize the popup controller and bring about closure of color chooser.
+      gc();
+      waitUntilChooserClosed(finishJSTest);
+    }, 0);
+  });
 }
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown.html b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown.html
index fbc35d4..a0c5f1a4 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/input-color-chooser-shown.html
@@ -3,32 +3,27 @@
 <body>
 <script src="../../../resources/js-test.js"></script>
 <script src="../resources/common.js"></script>
+<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
+<script src="file:///gen/third_party/WebKit/common/color_chooser/color_chooser.mojom.js"></script>
+<script src="../../forms/color/mock-colorchooser.js"></script>
 <div id="host" tabindex="1">
   <input id="target" type="color" value="#000000">
 </div>
 <script>
 
 if (window.eventSender) {
-   window.jsTestIsAsync = true
+  window.jsTestIsAsync = true
 
-   clickElement(target);
-   shouldBeTrue("testRunner.isChooserShown()");
+  clickElement(target);
+  waitUntilChooserShown(() => {
+    target.style.display = "none";
 
-   target.style.display = "none";
-
-   var nwait = 5;
-   function testClosed()
-   {
-        nwait--;
-        if (0 < nwait)
-            return window.setTimeout(testClosed, 0);
-        // Let an Oilpan GC finalize the popup controller and bring about closure of color chooser.
-        gc();
-        shouldBeFalse("testRunner.isChooserShown()");
-        finishJSTest();
-   }
-
-   window.setTimeout(testClosed, 0);
+    window.setTimeout(() => {
+      // Let an Oilpan GC finalize the popup controller and bring about closure of color chooser.
+      gc();
+      waitUntilChooserClosed(finishJSTest);
+    }, 0);
+  });
 }
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/mock-colorchooser.js b/third_party/WebKit/LayoutTests/fast/forms/color/mock-colorchooser.js
new file mode 100644
index 0000000..06cf734
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/mock-colorchooser.js
@@ -0,0 +1,40 @@
+'use strict';
+
+class MockColorChooser {
+  constructor() {
+    this.bindingSet_ = new mojo.BindingSet(blink.mojom.ColorChooserFactory);
+    this.interceptor_ = new MojoInterfaceInterceptor(
+        blink.mojom.ColorChooserFactory.name);
+    this.interceptor_.oninterfacerequest =
+        e => this.bindingSet_.addBinding(this, e.handle);
+    this.interceptor_.start();
+
+    this.bindingSet_.setConnectionErrorHandler(() => {
+      this.count_--;
+    });
+    this.count_ = 0;
+  }
+
+  openColorChooser(chooser, client, color, suggestions) {
+    this.count_++;
+  }
+
+  isChooserShown() {
+    return this.count_ > 0;
+  }
+}
+
+let mockColorChooser = new MockColorChooser();
+
+function waitUntilChooserShown(then) {
+  if (!mockColorChooser.isChooserShown())
+    return setTimeout(() => { waitUntilChooserShown(then); }, 0);
+  if (then)
+    then();
+}
+function waitUntilChooserClosed(then) {
+  if (mockColorChooser.isChooserShown())
+    return setTimeout(() => { waitUntilChooserClosed(then); }, 0);
+  if (then)
+    then();
+}
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-store-basics.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-store-basics.html
index 0288db7..a7b8f9e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-store-basics.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-store-basics.html
@@ -4,19 +4,23 @@
 <script src="../resources/testharnessreport.js"></script>
 <script>
 
-var local = new PasswordCredential({
-    id: 'id',
-    password: 'pencil',
-    name: 'name',
-    iconURL: 'https://example.com/icon.png'
-});
+function CreatePasswordCredentialWithIconURL(url) {
+  return new PasswordCredential({
+      id: 'id',
+      password: 'pencil',
+      name: 'name',
+      iconURL: url
+  });
+}
 
-var federated = new FederatedCredential({
-    id: 'id',
-    provider: 'https://federation.test/',
-    name: 'name',
-    iconURL: 'https://example.test/icon.png'
-});
+function CreateFederatedCredentialWithIconURL(url) {
+  return new FederatedCredential({
+      id: 'id',
+      provider: 'https://federation.test/',
+      name: 'name',
+      iconURL: url
+  });
+}
 
 promise_test((t) => {
   return promise_rejects(t, new TypeError(), navigator.credentials.store());
@@ -28,32 +32,69 @@
 }, "navigator.credential.store([string]) should reject.");
 
 promise_test(() => {
+  let local = CreatePasswordCredentialWithIconURL("https://foo/icon.png");
   return navigator.credentials.store(local);
 }, "navigator.credential.store([PasswordCredential]) should succeed.");
 
 promise_test(() => {
+  let federated = CreateFederatedCredentialWithIconURL("https://foo/icon.png");
   return navigator.credentials.store(federated);
 }, "navigator.credentials.store([FederatedCredential]) should succeed.");
 
-promise_test((t) => {
-  var federated_insecure = new FederatedCredential({
-      id: 'id',
-      provider: 'https://federation.test/',
-      name: 'name',
-      iconURL: 'http://example.test/icon.png'
-  });
-  return promise_rejects(t, "SecurityError",
-      navigator.credentials.store(federated_insecure));
-}, "navigator.credentials.store([FederatedCredential]) with insecure |iconURL| should reject.");
+const A_PRIORI_AUTHENTICATED_URLS = [
+  'https://foo/icon.png',
+  'wss://foo/icon.png',
+  'file:///etc/shadow',
+  'data:image/png;base64,',
+  'about:blank',
+  'about:srcdoc',
+  'http://127.0.0.123/icon.png',
+  'http://[::1]/icon.png',
+  'filesystem:https://foo/icon.png',
+  'filesystem:file:///etc/shadow',
+  'blob:https://foo/blob-id',
+  'blob:file:///blob-id',
+];
 
-promise_test((t) => {
-  var local_insecure = new PasswordCredential({
-      id: 'id',
-      password: 'pencil',
-      name: 'name',
-      iconURL: 'http://example.test/icon.png'
-  });
-  return promise_rejects(t, "SecurityError",
-      navigator.credentials.store(local_insecure));
-}, "navigator.credentials.store([PasswordCredential]) with insecure |iconURL| should reject.");
+const NON_A_PRIORI_AUTHENTICATED_URLS = [
+  'http://foo:443/icon.png',
+  'https-so://foo/icon.png',
+  'http-so://foo/icon.png',
+  'javascript:alert()',
+  'ws://foo/icon.png',
+  'ftp://foo/icon.png',
+  'gopher://foo/icon.png',
+  'http://128.0.0.0/icon.png',
+  'http://[::2]/icon.png',
+  'http:///icon.png',
+  'filesystem:http://foo/icon.png',
+  'blob:http://foo/blob-id',
+  'blob:null/blob-id',
+];
+
+for (let url of A_PRIORI_AUTHENTICATED_URLS) {
+  promise_test(() => {
+    let local = CreatePasswordCredentialWithIconURL(url);
+    return navigator.credentials.store(local);
+  }, "navigator.credential.store([PasswordCredential]) with |iconURL| " + url + " should succeed.");
+
+  promise_test(() => {
+    let federated = CreateFederatedCredentialWithIconURL(url);
+    return navigator.credentials.store(federated);
+  }, "navigator.credentials.store([FederatedCredential]) with |iconURL| " + url + " should succeed.");
+}
+
+for (let url of NON_A_PRIORI_AUTHENTICATED_URLS) {
+  promise_test((t) => {
+    let local = CreatePasswordCredentialWithIconURL(url);
+    return promise_rejects(t, "SecurityError",
+        navigator.credentials.store(local));
+  }, "navigator.credentials.store([PasswordCredential]) with insecure |iconURL| " + url + " should reject.");
+
+  promise_test((t) => {
+    let federated = CreateFederatedCredentialWithIconURL(url);
+    return promise_rejects(t, "SecurityError",
+        navigator.credentials.store(federated));
+  }, "navigator.credentials.store([FederatedCredential]) with insecure |iconURL| " + url + " should reject.");
+}
 </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll-expected.txt
new file mode 100644
index 0000000..8327684
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll-expected.txt
@@ -0,0 +1,22 @@
+Tests that console preserves scroll position when switching away.
+
+Message count: 100
+Console scrollTop: 10
+
+Running: testSwitchToAnotherPanel
+Panel sources was opened.
+Panel console was opened.
+Console scrollTop: 10
+
+Running: testClickLinkToRevealAnotherPanel
+Panel sources was opened.
+Panel console was opened.
+Console scrollTop: 10
+
+Running: testConsolePanelToDrawer
+Drawer panel set to console-view
+Panel sources was opened.
+Console scrollTop: 10
+Panel console was opened.
+Console scrollTop: 10
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll.js b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll.js
new file mode 100644
index 0000000..c7fdbc58
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-preserve-scroll.js
@@ -0,0 +1,70 @@
+// 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.
+
+(async function() {
+  TestRunner.addResult(`Tests that console preserves scroll position when switching away.\n`);
+  await TestRunner.loadModule('console_test_runner');
+  await TestRunner.showPanel('console');
+  // Do not use ConsoleTestRunner.fixConsoleViewportDimensions because fixing the height will affect
+  // tests that may cause scrolling while the console moves into/out of the drawer.
+  UI.inspectorView.element.style.maxHeight = '600px';
+  await ConsoleTestRunner.waitUntilConsoleEditorLoaded();
+  await TestRunner.evaluateInPagePromise(`
+    for (var i = 0; i < 100; i++)
+      console.log('foo' + i);
+  `);
+  await ConsoleTestRunner.waitForConsoleMessagesPromise(100);
+
+  var consoleView = Console.ConsoleView.instance();
+  var viewport = consoleView._viewport;
+  viewport.setStickToBottom(false);
+  // Avoid flakiness by ensuring that messages in visibleViewMessages are in DOM.
+  viewport.invalidate();
+  viewport.element.scrollTop = 10;
+  dumpScrollTop();
+
+  UI.inspectorView._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, () => {
+    TestRunner.addResult('Panel ' + UI.inspectorView._tabbedPane._currentTab.id + ' was opened.');
+  });
+
+  TestRunner.runTestSuite([
+    async function testSwitchToAnotherPanel(next) {
+      await TestRunner.showPanel('sources');
+      await TestRunner.showPanel('console');
+      dumpScrollTop();
+      next();
+    },
+
+    async function testClickLinkToRevealAnotherPanel(next) {
+      consoleView._visibleViewMessages[0]._element.querySelector('.devtools-link').click();
+      await UI.inspectorView._tabbedPane.once(UI.TabbedPane.Events.TabSelected);
+      await TestRunner.showPanel('console');
+      dumpScrollTop();
+      next();
+    },
+
+    async function testConsolePanelToDrawer(next) {
+      await showDrawerPromise();
+      TestRunner.addResult('Drawer panel set to ' + UI.inspectorView._drawerTabbedPane._currentTab.id);
+      await TestRunner.showPanel('sources');
+      dumpScrollTop();
+      await TestRunner.showPanel('console');
+      dumpScrollTop();
+      next();
+    }
+  ]);
+
+  function dumpScrollTop() {
+    TestRunner.addResult(`Console scrollTop: ${viewport.element.scrollTop}`);
+  }
+
+  async function showDrawerPromise() {
+    // Restoring scroll positions may occur during materialization, which is
+    // done asynchronously for TabbedPane contents.
+    return new Promise((resolve, reject) => {
+      UI.inspectorView._showDrawer(true);
+      TestRunner.addSniffer(UI.ViewManager._ContainerWidget.prototype, '_wasShownForTest', resolve);
+    });
+  }
+})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy/policy_iframes.php b/third_party/WebKit/LayoutTests/http/tests/feature-policy/policy_iframes.php
new file mode 100644
index 0000000..b2471da3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy/policy_iframes.php
@@ -0,0 +1,177 @@
+<?php
+// 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.
+
+// This test tests that the JavaScript exposure of feature policy in iframes
+// works via the following methods:
+//     allowsFeature(feature)
+//         -- if |feature| is allowed on the src origin of the iframe.
+//     allowsFeature(feature, origin)
+//         -- if |feature| is allowed on the given origin in the iframe.
+//     allowedFeatures()
+//         -- a list of features that are enabled on the src origin of the
+//            iframe.
+//     getAllowlistForFeatureForFeature(feature)
+//         -- a list of explicitly named origins where the given feature is
+//            enabled, or
+//            ['*'] if the feature is enabled on all origins.
+
+Header("Feature-Policy: fullscreen *; payment 'self'; midi 'none'; camera 'self' http://www.example.com https://www.example.net http://localhost:8000");
+?>
+
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<iframe id="f1" src="../resources/dummy.html"></iframe>
+<iframe id="f2" src="http://localhost:8000/../resources/dummy.html"></iframe>
+<script>
+var local_iframe_policy = document.getElementById("f1").policy;
+var remote_iframe_policy = document.getElementById("f2").policy;
+var local_src = "http://127.0.0.1:8000";
+var remote_src = "http://localhost:8000";
+// Tests for policy.allowsFeature().
+// fullscreen should be allowed in both iframes on any origin.
+test(function() {
+  assert_true(local_iframe_policy.allowsFeature("fullscreen"));
+  assert_true(local_iframe_policy.allowsFeature("fullscreen", local_src));
+  assert_false(local_iframe_policy.allowsFeature("fullscreen", remote_src));
+  assert_true(remote_iframe_policy.allowsFeature("fullscreen"));
+  assert_true(remote_iframe_policy.allowsFeature("fullscreen", remote_src));
+  assert_false(remote_iframe_policy.allowsFeature("fullscreen", local_src));
+  assert_false(local_iframe_policy.allowsFeature("fullscreen", "http://www.example.com"));
+  assert_false(remote_iframe_policy.allowsFeature("fullscreen", "http://www.example.com"));
+}, 'Test policy.allowsFeature() on fullscreen');
+
+// Camera should be allowed in both iframes on src origin but no
+test(function() {
+  assert_true(local_iframe_policy.allowsFeature("camera"));
+  assert_true(local_iframe_policy.allowsFeature("camera", local_src));
+  assert_false(local_iframe_policy.allowsFeature("camera", remote_src));
+  assert_true(remote_iframe_policy.allowsFeature("camera"));
+  assert_true(remote_iframe_policy.allowsFeature("camera", remote_src));
+  assert_false(remote_iframe_policy.allowsFeature("camera", local_src));
+  assert_false(local_iframe_policy.allowsFeature("camera", "http://www.example.com"));
+  assert_false(remote_iframe_policy.allowsFeature("camera", "http://www.example.com"));
+}, 'Test policy.allowsFeature() on camera');
+// payment should only be allowed in the local iframe on src origin:
+test(function() {
+  assert_true(local_iframe_policy.allowsFeature("payment"));
+  assert_true(local_iframe_policy.allowsFeature("payment", local_src));
+  assert_false(local_iframe_policy.allowsFeature("payment", remote_src));
+  assert_false(remote_iframe_policy.allowsFeature("payment"));
+  assert_false(remote_iframe_policy.allowsFeature("payment", local_src));
+  assert_false(remote_iframe_policy.allowsFeature("payment", remote_src));
+}, 'Test policy.allowsFeature() on locally allowed feature payment');
+// badfeature and midi should be disallowed in both iframes:
+for (var feature of ["badfeature", "midi"]) {
+  test(function() {
+    assert_false(local_iframe_policy.allowsFeature(feature));
+    assert_false(local_iframe_policy.allowsFeature(feature, local_src));
+    assert_false(local_iframe_policy.allowsFeature(feature, remote_src));
+    assert_false(remote_iframe_policy.allowsFeature(feature));
+    assert_false(remote_iframe_policy.allowsFeature(feature, local_src));
+    assert_false(remote_iframe_policy.allowsFeature(feature, remote_src));
+  }, 'Test policy.allowsFeature() on disallowed feature ' + feature);
+}
+
+// Tests for policy.allowedFeatures().
+var allowed_local_iframe_features = local_iframe_policy.allowedFeatures();
+var allowed_remote_iframe_features = remote_iframe_policy.allowedFeatures();
+for (var feature of ["fullscreen", "camera"]) {
+  test(function() {
+    assert_true(allowed_local_iframe_features.includes(feature));
+    assert_true(allowed_remote_iframe_features.includes(feature));
+  }, 'Test policy.allowedFeatures() include feature ' + feature);
+}
+for (var feature of ["badfeature", "midi"]) {
+  test(function() {
+    assert_false(allowed_local_iframe_features.includes(feature));
+    assert_false(allowed_remote_iframe_features.includes(feature));
+  }, 'Test policy.allowedFeatures() does not include disallowed feature ' +
+    feature);
+}
+for (var feature of ["payment", "geolocation"]) {
+test(function() {
+  assert_true(allowed_local_iframe_features.includes(feature));
+  assert_false(allowed_remote_iframe_features.includes(feature));
+}, 'Test policy.allowedFeatures() locally include feature ' + feature +
+  '  but not remotely ');
+}
+
+// Tests for policy.getAllowlistForFeature().
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("fullscreen"), [local_src]);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("fullscreen"), [remote_src]);
+}, 'policy.getAllowlistForFeature(): fullscreen is allowed in both iframes');
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("payment"), [local_src]);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("payment"), []);
+}, 'policy.getAllowlistForFeature(): payment is allowed only in local iframe');
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("geolocation"), [local_src]);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("geolocation"), []);
+}, 'policy.getAllowlistForFeature(): geolocation is allowed only in local iframe');
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("midi"), []);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("midi"), []);
+}, 'policy.getAllowlistForFeature(): midi is disallowed in both iframe');
+
+// Dynamically update iframes policy.
+document.getElementById("f1").allow = "fullscreen 'none'; payment 'src'; midi 'src'; geolocation 'none'; camera 'src' 'self' https://www.example.com https://www.example.net";
+document.getElementById("f2").allow = "fullscreen 'none'; payment 'src'; midi 'src'; geolocation 'none'; camera 'src' 'self' https://www.example.com https://www.example.net";
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("fullscreen"), []);
+  assert_array_equals(
+    document.getElementById("f1").policy.getAllowlistForFeature("fullscreen"),
+    []);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("fullscreen"), []);
+  assert_array_equals(
+    document.getElementById("f2").policy.getAllowlistForFeature("fullscreen"),
+    []);
+}, 'Dynamically redefine allow: fullscreen is disallowed in both iframes');
+
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("payment"), [local_src]);
+  assert_array_equals(
+    document.getElementById("f1").policy.getAllowlistForFeature("payment"),
+    [local_src]);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("payment"), [remote_src]);
+  assert_array_equals(
+    document.getElementById("f2").policy.getAllowlistForFeature("payment"),
+    [remote_src]);
+}, 'Dynamically redefine allow: payment is allowed in both iframes');
+
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("geolocation"), []);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("geolocation"), []);
+}, 'Dynamically redefine allow: geolocation is disallowed in both iframes');
+
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("camera"), [local_src]);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("camera"), [remote_src]);
+}, 'Dynamically redefine allow: camera is allowed in both iframes');
+
+test(function() {
+  assert_array_equals(
+    local_iframe_policy.getAllowlistForFeature("midi"), []);
+  assert_array_equals(
+    remote_iframe_policy.getAllowlistForFeature("midi"), []);
+}, 'Dynamically redefine allow: midi is disallowed in both iframe');
+</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/get-subscription-in-document.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/get-subscription-in-document.html
index 484d0e97..6ceee5b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/get-subscription-in-document.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/get-subscription-in-document.html
@@ -33,7 +33,7 @@
         .then(function(pushSubscription) {
             assert_equals(pushSubscription, null,
                           "pushSubscription should be null if there is no active push registration.")
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(pushSubscription) {
             previousPushSubscription = pushSubscription;
@@ -51,7 +51,7 @@
         .then(function(pushSubscription) {
             assert_equals(pushSubscription, null,
                           "pushSubscription should be null after unsubscribing.")
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(pushSubscription) {
             assert_not_equals(pushSubscription, null,
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/permission-state-exception-in-service-worker.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/permission-state-exception-in-service-worker.html
index fcead4e..eee0800 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/permission-state-exception-in-service-worker.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/permission-state-exception-in-service-worker.html
@@ -22,7 +22,7 @@
     PermissionsHelper.setPermission('push-messaging', 'prompt')
         .then(() => getActiveServiceWorkerWithMessagePort(test, script, scope))
         .then(workerInfo => {
-            workerInfo.port.postMessage({command: 'permissionState'});
+            workerInfo.port.postMessage({command: 'permissionState', options: {}});
             workerInfo.port.addEventListener('message', event => {
                 assert_equals(
                     event.data.errorMessage,
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/push-subscription-stringification.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/push-subscription-stringification.html
index 351f123..048f319 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/push-subscription-stringification.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/push-subscription-stringification.html
@@ -28,7 +28,7 @@
             // If running manually, grant permission when prompted.
             if (window.testRunner)
                 testRunner.setPermission('push-messaging', 'granted', location.origin, location.origin);
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(pushSubscription) {
             var reflectedObject = JSON.parse(JSON.stringify(pushSubscription));
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/instrumentation-service-worker.js b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/instrumentation-service-worker.js
index f635b2c..79a6730 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/instrumentation-service-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/instrumentation-service-worker.js
@@ -13,7 +13,7 @@
     port.onmessage = function(event) {
         if (typeof event.data != 'object' || !event.data.command)
             return;
-        var options = event.data.options || {}
+        var options = event.data.options || { userVisibleOnly: true };
         switch (event.data.command) {
             case 'permissionState':
                 self.registration.pushManager.permissionState(options).then(function(permissionStatus) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/test-helpers.js b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/test-helpers.js
index 01a820e..68ca001 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/test-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/resources/test-helpers.js
@@ -9,7 +9,7 @@
     // 1. Call subscribe in document context. The manifest details are stored
     // in the service worker storage for later use in a service worker context
     // where there is no manifest.
-    registration.pushManager.subscribe().then(function(subscription) {
+    registration.pushManager.subscribe({ userVisibleOnly: true }).then(function(subscription) {
       // 2. Call unsubscribe so we can subscribe again later inside a
       // service worker.
       return subscription.unsubscribe();
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-encryption-public-key.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-encryption-public-key.html
index b85e3e8..b2619948 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-encryption-public-key.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-encryption-public-key.html
@@ -40,7 +40,7 @@
                         if (window.testRunner)
                             testRunner.setPermission('push-messaging', 'granted', location.origin, location.origin);
 
-                        return swRegistration.pushManager.subscribe();
+                        return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
                     })
                     .then(function(pushSubscription) {
                         assert_own_property(PushSubscription.prototype, 'getKey');
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-default-in-service-worker.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-default-in-service-worker.html
index e576e3b..6a71416c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-default-in-service-worker.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-default-in-service-worker.html
@@ -27,7 +27,7 @@
 
             // 1. Call subscribe in document context. The manifest details are stored in the service
             // worker storage for later use in a service worker context where there is no manifest.
-            return registration.pushManager.subscribe();
+            return registration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(subscription) {
             assert_true(subscription instanceof window.PushSubscription);
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-document.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-document.html
index 5c2b29d..4d05970e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-document.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-document.html
@@ -22,7 +22,7 @@
             // If running manually, deny permission when prompted.
             if (window.testRunner)
                 testRunner.setPermission('push-messaging', 'denied', location.origin, location.origin);
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(pushSubscription) {
             assert_unreached('Subscription must not succeed after permission is denied.');
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-service-worker.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-service-worker.html
index 03a67ae..bdc5324 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-service-worker.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-failure-permission-denied-in-service-worker.html
@@ -27,7 +27,7 @@
 
             // 1. Call subscribe in document context. The manifest details are stored in the service
             // worker storage for later use in a service worker context where there is no manifest.
-            return registration.pushManager.subscribe();
+            return registration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(subscription) {
             assert_true(subscription instanceof window.PushSubscription);
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html
index e0a9e4e..9c64e1f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-document.html
@@ -22,7 +22,7 @@
             // If running manually, grant permission when prompted.
             if (window.testRunner)
                 testRunner.setPermission('push-messaging', 'granted', location.origin, location.origin);
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(pushSubscription) {
             assert_idl_attribute(pushSubscription, 'endpoint');
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-service-worker.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-service-worker.html
index dc17ac4..5e750538 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-service-worker.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/subscribe-success-in-service-worker.html
@@ -27,7 +27,7 @@
 
             // 1. Call subscribe in document context. The manifest details are stored in the service
             // worker storage for later use in a service worker context where there is no manifest.
-            return registration.pushManager.subscribe();
+            return registration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(subscription) {
             assert_true(subscription instanceof window.PushSubscription);
diff --git a/third_party/WebKit/LayoutTests/http/tests/push_messaging/unsubscribe-in-document.html b/third_party/WebKit/LayoutTests/http/tests/push_messaging/unsubscribe-in-document.html
index 63fd3fa..02917de 100644
--- a/third_party/WebKit/LayoutTests/http/tests/push_messaging/unsubscribe-in-document.html
+++ b/third_party/WebKit/LayoutTests/http/tests/push_messaging/unsubscribe-in-document.html
@@ -23,7 +23,7 @@
             // If running manually, grant permission when prompted.
             if (window.testRunner)
                 testRunner.setPermission('push-messaging', 'granted', location.origin, location.origin);
-            return swRegistration.pushManager.subscribe();
+            return swRegistration.pushManager.subscribe({ userVisibleOnly: true });
         })
         .then(function(subscription) {
             pushSubscription = subscription;
diff --git a/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js b/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
index 286ff12..1e18f50e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
+++ b/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
@@ -27,6 +27,10 @@
         return {name: "background-sync"};
       case "accessibility-events":
         return {name: "accessibility-events"};
+      case "clipboard-read":
+        return {name: "clipboard-read"};
+      case "clipboard-write":
+        return {name: "clipboard-write"};
       default:
         throw "Invalid permission name provided";
     }
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent-expected.txt
index f0b01964..2ad2a30d 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent-expected.txt
@@ -192,13 +192,13 @@
     touchPoints : [
         [0] : {
             id : <number>
-            x : 120
-            y : 130
+            x : 25
+            y : 36
         }
         [1] : {
             id : <number>
-            x : 200
-            y : 100
+            x : 101
+            y : 202
         }
     ]
     type : touchMove
@@ -207,8 +207,8 @@
 type: touchmove
 ----Touches----
 id: 0
-pageX: 120
-pageY: 130
+pageX: 25
+pageY: 36
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
@@ -224,15 +224,15 @@
 type: touchmove
 ----Touches----
 id: 0
-pageX: 120
-pageY: 130
+pageX: 25
+pageY: 36
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
 force: 1
 id: 1
-pageX: 200
-pageY: 100
+pageX: 101
+pageY: 202
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
@@ -243,8 +243,8 @@
     touchPoints : [
         [0] : {
             id : <number>
-            x : 200
-            y : 300
+            x : 103
+            y : 203
         }
     ]
     type : touchMove
@@ -253,15 +253,15 @@
 type: touchmove
 ----Touches----
 id: 0
-pageX: 120
-pageY: 130
+pageX: 25
+pageY: 36
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
 force: 1
 id: 1
-pageX: 200
-pageY: 300
+pageX: 103
+pageY: 203
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
@@ -270,8 +270,8 @@
 type: touchend
 ----Touches----
 id: 0
-pageX: 200
-pageY: 300
+pageX: 103
+pageY: 203
 radiusX: 1
 radiusY: 1
 rotationAngle: 0
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.js b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.js
index d10081b5..db88a92 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchTouchEvent.js
@@ -114,20 +114,20 @@
   await dispatchEvent({
     type: 'touchMove',
     touchPoints: [{
-      x: 120,
-      y: 130,
+      x: 25,
+      y: 36,
       id: 0
     }, {
-      x: 200,
-      y: 100,
+      x: 101,
+      y: 202,
       id: 1
     }]
   });
   await dispatchEvent({
     type: 'touchMove',
     touchPoints: [{
-      x: 200,
-      y: 300,
+      x: 103,
+      y: 203,
       id: 1
     }]
   });
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed-expected.txt b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed-expected.txt
index 89eaaa7..2a8450e 100644
--- a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed-expected.txt
+++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed-expected.txt
@@ -19,7 +19,7 @@
 PASS internals.needsLayoutCount() is 3
 Verifying non-fast regions have been updated
 PASS nonFastScrollableRects.length is 1
-PASS rectToString(nonFastScrollableRects[0]) is "[100, 0, 222, 222]"
+PASS rectToString(nonFastScrollableRects[0]) is "[110, 10, 222, 222]"
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed.html b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed.html
index 9f6a5a3b..3379980e 100644
--- a/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed.html
+++ b/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-transform-changed.html
@@ -66,9 +66,11 @@
     debug("Verifying layout still hasn't been triggered");
     shouldBe("internals.needsLayoutCount()", "3");
     debug("Verifying non-fast regions have been updated");
+    // Note: querying non-fast regions forces layout, so the expectation
+    // reflects the change to body element padding.
     nonFastScrollableRects = internals.nonFastScrollableRects(document);
     shouldBe('nonFastScrollableRects.length', '1');
-    shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[100, 0, 222, 222]');
+    shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[110, 10, 222, 222]');
 
     setTimeout(function() {
       // Add green overlays to help visualize the test
diff --git a/third_party/WebKit/LayoutTests/sensor/accelerometer.html b/third_party/WebKit/LayoutTests/sensor/accelerometer.html
index 466dfdbf..3a98f15 100644
--- a/third_party/WebKit/LayoutTests/sensor/accelerometer.html
+++ b/third_party/WebKit/LayoutTests/sensor/accelerometer.html
@@ -26,10 +26,12 @@
 
 runGenericSensorTests(Accelerometer,
                       update_sensor_reading,
-                      verify_sensor_reading);
+                      verify_sensor_reading,
+                      ['accelerometer']);
 
 runGenericSensorTests(LinearAccelerationSensor,
                       update_sensor_reading,
-                      verify_sensor_reading);
+                      verify_sensor_reading,
+                      ['accelerometer']);
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
index 9c9414b98..2be9ec91 100644
--- a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
@@ -24,5 +24,8 @@
   return illuminance === kDefaultReadingValue && timestamp !== null;
 }
 
-runGenericSensorTests(AmbientLightSensor, update_sensor_reading, verify_sensor_reading);
+runGenericSensorTests(AmbientLightSensor,
+                      update_sensor_reading,
+                      verify_sensor_reading,
+                      ['ambient-light-sensor']);
 </script>
diff --git a/third_party/WebKit/LayoutTests/sensor/gyroscope.html b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
index be4f433..a480755 100644
--- a/third_party/WebKit/LayoutTests/sensor/gyroscope.html
+++ b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
@@ -24,6 +24,6 @@
   return [x, y, z].every((r, i) => r === kDefaultReading[i]) && timestamp !== null;
 }
 
-runGenericSensorTests(Gyroscope, update_sensor_reading, verify_sensor_reading);
+runGenericSensorTests(Gyroscope, update_sensor_reading, verify_sensor_reading, ['gyroscope']);
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/sensor/magnetometer.html b/third_party/WebKit/LayoutTests/sensor/magnetometer.html
index 049d684..308d83f 100644
--- a/third_party/WebKit/LayoutTests/sensor/magnetometer.html
+++ b/third_party/WebKit/LayoutTests/sensor/magnetometer.html
@@ -24,5 +24,5 @@
   return [x, y, z].every((r, i) => r === kDefaultReading[i]) && timestamp !== null;
 }
 
-runGenericSensorTests(Magnetometer, update_sensor_reading, verify_sensor_reading);
+runGenericSensorTests(Magnetometer, update_sensor_reading, verify_sensor_reading, ['magnetometer']);
 </script>
diff --git a/third_party/WebKit/LayoutTests/sensor/orientation-sensor.html b/third_party/WebKit/LayoutTests/sensor/orientation-sensor.html
index 36c1c2b3..17eac1ce 100644
--- a/third_party/WebKit/LayoutTests/sensor/orientation-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/orientation-sensor.html
@@ -99,13 +99,19 @@
   return mockSensor.removeConfigurationCalled();
 }
 
-runGenericSensorTests(AbsoluteOrientationSensor, update_sensor_reading, verify_sensor_reading);
+runGenericSensorTests(AbsoluteOrientationSensor,
+                      update_sensor_reading,
+                      verify_sensor_reading,
+                      ['accelerometer', 'gyroscope', 'magnetometer']);
 
 sensor_test(sensor => {
   return checkPopulateMatrix(sensor, AbsoluteOrientationSensor);
 }, 'Test AbsoluteOrientationSensor.populateMatrix() method works correctly.');
 
-runGenericSensorTests(RelativeOrientationSensor, update_sensor_reading, verify_sensor_reading);
+runGenericSensorTests(RelativeOrientationSensor,
+                      update_sensor_reading,
+                      verify_sensor_reading,
+                      ['accelerometer', 'gyroscope']);
 
 sensor_test(sensor => {
   return checkPopulateMatrix(sensor, RelativeOrientationSensor);
diff --git a/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js b/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js
index d87c3cb..0207cd32 100644
--- a/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js
+++ b/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js
@@ -4,7 +4,7 @@
 // a called by the test to provide the mock values for sensor. |verifyReading|
 // is called so that the value read in JavaScript are the values expected (the ones
 // sent by |updateReading|).
-function runGenericSensorTests(sensorType, updateReading, verifyReading) {
+function runGenericSensorTests(sensorType, updateReading, verifyReading, featurePolicies) {
   sensor_test(sensor => {
     sensor.mockSensorProvider.setGetSensorShouldFail(true);
     let sensorObject = new sensorType;
@@ -360,6 +360,7 @@
   promise_test(() => {
     return new Promise((resolve,reject) => {
       let iframe = document.createElement('iframe');
+      iframe.allow = featurePolicies.join(' \'none\'; ') + ' \'none\';';
       iframe.srcdoc = '<script>' +
                       '  window.onmessage = message => {' +
                       '    if (message.data === "LOADED") {' +
@@ -382,7 +383,35 @@
         }
       }
     });
-  }, `${sensorType.name}: Test that sensor cannot be constructed within iframe.`);
+  }, `${sensorType.name}: Test that sensor cannot be constructed within iframe disallowed to use feature policy.`);
+
+  promise_test(() => {
+    return new Promise((resolve,reject) => {
+      let iframe = document.createElement('iframe');
+      iframe.allow = featurePolicies.join(';') + ';';
+      iframe.srcdoc = '<script>' +
+                      '  window.onmessage = message => {' +
+                      '    if (message.data === "LOADED") {' +
+                      '      try {' +
+                      '        new ' + sensorType.name + '();' +
+                      '        parent.postMessage("PASS", "*");' +
+                      '      } catch (e) {' +
+                      '        parent.postMessage("FAIL", "*");' +
+                      '      }' +
+                      '    }' +
+                      '   };' +
+                      '<\/script>';
+      iframe.onload = () => iframe.contentWindow.postMessage('LOADED', '*');
+      document.body.appendChild(iframe);
+      window.onmessage = message => {
+        if (message.data == 'PASS') {
+          resolve();
+        } else if (message.data == 'FAIL') {
+          reject();
+        }
+      }
+    });
+  }, `${sensorType.name}: Test that sensor can be constructed within an iframe allowed to use feature policy.`);
 
   sensor_test(async sensor => {
     let sensorObject = new sensorType();
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html b/third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html
index 3f44cf4c..d7c8a0ea 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html
@@ -13,16 +13,6 @@
 }, "toString should return perspective(<CSSNumericValue.cssString()>)");
 
 test(() => {
-  // Obtained by doing $0.style.transform = perspective(10px);
-  // getComputedStyle($0).transform
-  let expectedMatrix = new DOMMatrixReadOnly(
-      [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.1, 0, 0, 0, 1]);
-  let transformValue = new CSSTransformValue([new CSSPerspective(CSS.px(10))]);
-  assert_matrix_approx_equals(
-      transformValue.toMatrix(), expectedMatrix, EPSILON);
-}, "toMatrix when used in a CSSTransformValue produces correct matrix");
-
-test(() => {
   let transformValue = new CSSTransformValue([new CSSPerspective(CSS.em(10))]);
   assert_throws(new TypeError(), () => {
     transformValue.toMatrix();
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html b/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
index 56bd0b7..8c4ed25 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
@@ -125,15 +125,6 @@
   assert_equals(rotation.toString(), 'rotate(10deg)');
 }, "x, y, and z components are not included in toString when is2D is true");
 
-for (let params of testParams) {
-  let input = params.input;
-  test(() => {
-    var transformValue = new CSSTransformValue([input]);
-    var result = transformValue.toMatrix();
-    assert_matrix_approx_equals(result, params.asMatrix, EPSILON);
-  }, "toMatrix works for " + params.cssText + " in a CSSTransformValue");
-}
-
 test(() => {
   // Obtained by doing the following in a console:
   // $0.style.transform = 'rotate3d(1, 2, 3, 10rad)';
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssScale.html b/third_party/WebKit/LayoutTests/typedcssom/cssScale.html
index a036aab..d3f6d34 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssScale.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssScale.html
@@ -84,19 +84,4 @@
   assert_throws(new TypeError(), () => { new CSSScale(NaN, NaN, NaN); });
 }, "Invalid input throws an exception.");
 
-for (let params of testParams) {
-  test(() => {
-    var input = params.input;
-    var transformValue = new CSSTransformValue([input]);
-    var inputAsMatrix = transformValue.toMatrix();
-    assert_equals(inputAsMatrix.is2D, input.is2D);
-
-    var expectedMatrix = input.is2D ?
-        new DOMMatrixReadOnly([input.x, 0, 0, input.y, 0, 0]) :
-        new DOMMatrixReadOnly(
-          [input.x, 0, 0, 0, 0, input.y, 0, 0, 0, 0, input.z, 0, 0, 0, 0, 1]);
-    assert_matrix_approx_equals(inputAsMatrix, expectedMatrix, EPSILON);
-  }, "asMatrix is constructed correctly for " + params.cssText);
-}
-
 </script>
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html b/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
index 9b28c732..d224db4 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssSkew.html
@@ -63,18 +63,4 @@
   }, "toString is correct for " + params.cssText);
 }
 
-for (let params of testParams) {
-  test(() => {
-    var input = params.input;
-    var transformValue = new CSSTransformValue([input]);
-    var inputAsMatrix = transformValue.toMatrix();
-    assert_true(inputAsMatrix.is2D);
-
-    var tanAx = tanUnitValue(input.ax);
-    var tanAy = tanUnitValue(input.ay);
-    var expectedMatrix = new DOMMatrixReadOnly([1, tanAy, tanAx, 1, 0, 0]);
-    assert_matrix_approx_equals(inputAsMatrix, expectedMatrix, EPSILON);
-  }, "asMatrix is constructed correctly for " + params.cssText);
-}
-
 </script>
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssTransformValue.html b/third_party/WebKit/LayoutTests/typedcssom/cssTransformValue.html
deleted file mode 100644
index b0287b84..0000000
--- a/third_party/WebKit/LayoutTests/typedcssom/cssTransformValue.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="resources/comparisons.js"></script>
-
-<script>
-var EPSILON = 1e-6; // float epsilon
-
-test(function() {
-  var transformArray = [
-    new CSSScale(2, 2),
-    new CSSMatrixComponent(new DOMMatrixReadOnly([1, 1, 1, 1, 1, 1])),
-    new CSSScale(5, 6)
-  ];
-  var transformValue = new CSSTransformValue(transformArray);
-  assert_true(transformValue.is2D);
-}, "is2D is true for transformValues containing only 2D components");
-
-test(function() {
-  var transformArray = [
-    new CSSScale(2, 2),
-    new CSSMatrixComponent(new DOMMatrixReadOnly(
-        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])),
-    new CSSScale(5, 6)
-  ];
-  var transformValue = new CSSTransformValue(transformArray);
-  assert_false(transformValue.is2D);
-}, "is2D is false for transformValues containing both 2D and 3D components");
-
-test(function() {
-  var transformArray = [
-    new CSSScale(2, 2),
-    new CSSMatrixComponent(new DOMMatrixReadOnly([1, 1, 1, 1, 1, 1])),
-    new CSSScale(5, 6)
-  ];
-  var transformValue = new CSSTransformValue(transformArray);
-
-  var newTransformArray = [...transformValue];
-  assert_true(newTransformArray.length == 3);
-  assert_equals(newTransformArray[0].constructor.name, CSSScale.name);
-  assert_equals(newTransformArray[1].constructor.name, CSSMatrixComponent.name);
-  assert_equals(newTransformArray[2].constructor.name, CSSScale.name);
-}, "Can iterate through transformComponent members");
-
-test(function() {
-  var transformArray = [new CSSScale(2,2)];
-  var transformValue = new CSSTransformValue(transformArray);
-
-  var expectedMatrix = new DOMMatrix();
-  expectedMatrix.scaleSelf(2, 2);
-
-  assert_matrix_approx_equals(
-      transformValue.toMatrix(), expectedMatrix, EPSILON);
-}, "toMatrix() returns DOMMatrix Object - single CSSTransformComponent");
-
-test(function() {
-  var transformMatrix = new DOMMatrixReadOnly([1,1,1,1,1,1]);
-  var transformArray = [
-    new CSSScale(2,2),
-    new CSSMatrixComponent(transformMatrix),
-    new CSSScale(5,6)
-  ];
-  var transformValue = new CSSTransformValue(transformArray);
-
-  var expectedMatrix = new DOMMatrix();
-  expectedMatrix.scaleSelf(2, 2);
-  expectedMatrix.multiplySelf(transformMatrix);
-  expectedMatrix.scaleSelf(5, 6);
-
-  assert_matrix_approx_equals(
-      transformValue.toMatrix(), expectedMatrix, EPSILON);
-},  "toMatrix() returns DOMMatrix Object - multiple CSSTransformComponents");
-
-</script>
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html b/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
index 656b227d..9eb5720 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
@@ -68,14 +68,6 @@
 }, "Invalid number of arguments to constructor throws an exception.");
 
 test(() => {
-  let expectedMatrix = (new DOMMatrixReadOnly()).translate(1, 2, 3);
-  let transformValue = new CSSTransformValue(
-      [new CSSTranslation(CSS.px(1), CSS.px(2), CSS.px(3))]);
-  assert_matrix_approx_equals(
-      transformValue.toMatrix(), expectedMatrix, EPSILON);
-}, "toMatrix when used in a CSSTransformValue produces correct matrix");
-
-test(() => {
   let transformValue = new CSSTransformValue(
       [new CSSTranslation(CSS.em(1), CSS.px(2), CSS.px(3))]);
   assert_throws(new TypeError(), () => {
diff --git a/third_party/WebKit/LayoutTests/typedcssom/resources/testhelper.js b/third_party/WebKit/LayoutTests/typedcssom/resources/testhelper.js
index a7742d0..9919946 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/resources/testhelper.js
+++ b/third_party/WebKit/LayoutTests/typedcssom/resources/testhelper.js
@@ -33,6 +33,29 @@
       assert_equals(a.variable, b.variable);
       assert_style_value_equals(a.fallback, b.fallback);
       break;
+    case 'CSSTransformValue':
+      assert_style_value_array_equals(a, b);
+      break;
+    case 'CSSRotation':
+      assert_style_value_equals(a.angle, b.angle);
+      // fallthrough
+    case 'CSSTranslation':
+    case 'CSSScale':
+      assert_style_value_equals(a.x, b.x);
+      assert_style_value_equals(a.y, b.y);
+      assert_style_value_equals(a.z, b.z);
+      assert_style_value_equals(a.is2D, b.is2D);
+      break;
+    case 'CSSSkew':
+      assert_style_value_equals(a.ax, b.ax);
+      assert_style_value_equals(a.ay, b.ay);
+      break;
+    case 'CSSPerspective':
+      assert_style_value_equals(a.length, b.length);
+      break;
+    case 'CSSMatrixComponent':
+      assert_matrix_approx_equals(a.matrix, b.matrix, 1e-6);
+      break;
     default:
       assert_equals(a, b);
       break;
diff --git a/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization-expected.txt b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization-expected.txt
new file mode 100644
index 0000000..d63acc0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization-expected.txt
@@ -0,0 +1,29 @@
+This is a testharness.js-based test.
+FAIL Normalizing a matrix() returns a CSSMatrixComponent assert_equals: expected "CSSTransformValue" but got "CSSStyleValue"
+FAIL Normalizing a matrix3d() returns a CSSMatrixComponent assert_equals: expected "CSSTransformValue" but got "CSSStyleValue"
+PASS Normalizing a translate() with X returns a CSSTranslation
+PASS Normalizing a translate() with X and Y returns a CSSTranslation
+PASS Normalizing a translateX() returns a CSSTranslation
+PASS Normalizing a translateY() returns a CSSTranslation
+PASS Normalizing a translate3d() returns a CSSTranslation
+PASS Normalizing a translateZ() returns a CSSTranslation
+PASS Normalizing a scale() with one argument returns a CSSScale
+PASS Normalizing a scale() with two arguments returns a CSSScale
+PASS Normalizing a scaleX() returns a CSSScale
+PASS Normalizing a scaleY() returns a CSSScale
+PASS Normalizing a scale3d() returns a CSSScale
+PASS Normalizing a scaleZ() returns a CSSScale
+PASS Normalizing a rotate() returns a CSSRotation
+PASS Normalizing a rotate3d() returns a CSSRotation
+PASS Normalizing a rotateX() returns a CSSRotation
+PASS Normalizing a rotateY() returns a CSSRotation
+PASS Normalizing a rotateZ() returns a CSSRotation
+PASS Normalizing a skew() with only X returns a CSSSkew
+PASS Normalizing a skew() with X and Y returns a CSSSkew
+PASS Normalizing a skewX() returns a CSSSkew
+PASS Normalizing a skewY() returns a CSSSkew
+PASS Normalizing a perspective() returns a CSSPerspective
+PASS Normalizing a <transform-list> returns a CSSTransformValue containing all the transforms
+PASS Normalizing transforms with calc values contains CSSMathValues
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization.html b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization.html
new file mode 100644
index 0000000..9d66899
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-normalization/transformvalue-normalization.html
@@ -0,0 +1,174 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Transform normalization tests</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#transformvalue-normalization">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../resources/comparisons.js"></script>
+<script src="../resources/testhelper.js"></script>
+<script>
+'use strict';
+
+function test_transform_normalization(cssText, expected) {
+  assert_style_value_equals(CSSStyleValue.parse('transform', cssText), expected);
+  assert_style_value_equals(
+      newDivWithStyle('transform: ' + cssText).attributeStyleMap.get('transform'),
+      expected);
+}
+
+test(() => {
+  test_transform_normalization('matrix(1, 2, 3, 4, 5, 6)',
+      new CSSTransformValue([
+        new CSSMatrixComponent(new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]))
+      ]));
+}, 'Normalizing a matrix() returns a CSSMatrixComponent');
+
+test(() => {
+  test_transform_normalization(
+      'matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)',
+      new CSSTransformValue([
+        new CSSMatrixComponent(new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]))
+      ]));
+}, 'Normalizing a matrix3d() returns a CSSMatrixComponent');
+
+const gTestCases = [
+  {
+    cssText: 'translate(1px)',
+    expected: new CSSTranslation(CSS.px(1), CSS.px(0)),
+    desc: 'translate() with X'
+  },
+  {
+    cssText: 'translate(1%, 1px)',
+    expected: new CSSTranslation(CSS.percent(1), CSS.px(1)),
+    desc: 'translate() with X and Y'
+  },
+  {
+    cssText: 'translateX(1%)',
+    expected: new CSSTranslation(CSS.percent(1), CSS.px(0)),
+    desc: 'translateX()'
+  },
+  {
+    cssText: 'translateY(1px)',
+    expected: new CSSTranslation(CSS.px(0), CSS.px(1)),
+    desc: 'translateY()'
+  },
+  {
+    cssText: 'translate3d(1px, 2%, 3px)',
+    expected: new CSSTranslation(CSS.px(1), CSS.percent(2), CSS.px(3)),
+    desc: 'translate3d()'
+  },
+  {
+    cssText: 'translateZ(1px)',
+    expected: new CSSTranslation(CSS.px(0), CSS.px(0), CSS.px(1)),
+    desc: 'translateZ()'
+  },
+  {
+    cssText: 'scale(2)',
+    expected: new CSSScale(CSS.number(2), CSS.number(2)),
+    desc: 'scale() with one argument'
+  },
+  {
+    cssText: 'scale(2, 3)',
+    expected: new CSSScale(CSS.number(2), CSS.number(3)),
+    desc: 'scale() with two arguments'
+  },
+  {
+    cssText: 'scaleX(2)',
+    expected: new CSSScale(CSS.number(2), CSS.number(1)),
+    desc: 'scaleX()'
+  },
+  {
+    cssText: 'scaleY(2)',
+    expected: new CSSScale(CSS.number(1), CSS.number(2)),
+    desc: 'scaleY()'
+  },
+  {
+    cssText: 'scale3d(1, 2, 3)',
+    expected: new CSSScale(CSS.number(1), CSS.number(2), CSS.number(3)),
+    desc: 'scale3d()'
+  },
+  {
+    cssText: 'scaleZ(2)',
+    expected: new CSSScale(CSS.number(1), CSS.number(1), CSS.number(2)),
+    desc: 'scaleZ()'
+  },
+  {
+    cssText: 'rotate(90deg)',
+    expected: new CSSRotation(CSS.deg(90)),
+    desc: 'rotate()'
+  },
+  {
+    cssText: 'rotate3d(1, 2, 3, 90deg)',
+    expected: new CSSRotation(CSS.number(1), CSS.number(2), CSS.number(3), CSS.deg(90)),
+    desc: 'rotate3d()'
+  },
+  {
+    cssText: 'rotateX(90deg)',
+    expected: new CSSRotation(CSS.number(1), CSS.number(0), CSS.number(0), CSS.deg(90)),
+    desc: 'rotateX()'
+  },
+  {
+    cssText: 'rotateY(90deg)',
+    expected: new CSSRotation(CSS.number(0), CSS.number(1), CSS.number(0), CSS.deg(90)),
+    desc: 'rotateY()'
+  },
+  {
+    cssText: 'rotateZ(90deg)',
+    expected: new CSSRotation(CSS.number(0), CSS.number(0), CSS.number(1), CSS.deg(90)),
+    desc: 'rotateZ()'
+  },
+  {
+    cssText: 'skew(90deg)',
+    expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
+    desc: 'skew() with only X'
+  },
+  {
+    cssText: 'skew(90deg, 45deg)',
+    expected: new CSSSkew(CSS.deg(90), CSS.deg(45)),
+    desc: 'skew() with X and Y'
+  },
+  {
+    cssText: 'skewX(90deg)',
+    expected: new CSSSkew(CSS.deg(90), CSS.deg(0)),
+    desc: 'skewX()'
+  },
+  {
+    cssText: 'skewY(90deg)',
+    expected: new CSSSkew(CSS.deg(0), CSS.deg(90)),
+    desc: 'skewY()'
+  },
+  {
+    cssText: 'perspective(1px)',
+    expected: new CSSPerspective(CSS.px(1)),
+    desc: 'perspective()'
+  },
+];
+
+for (const {cssText, expected, desc} of gTestCases) {
+  test(() => {
+    test_transform_normalization(cssText, new CSSTransformValue([expected]));
+  }, 'Normalizing a ' + desc + ' returns a ' + expected.constructor.name);
+}
+
+test(() => {
+  test_transform_normalization(
+      'translate(1px) rotateX(90deg) perspective(1px) skew(90deg) scale3d(1, 2, 3)',
+      new CSSTransformValue([
+        new CSSTranslation(CSS.px(1), CSS.px(0)),
+        new CSSRotation(CSS.number(1), CSS.number(0), CSS.number(0), CSS.deg(90)),
+        new CSSPerspective(CSS.px(1)),
+        new CSSSkew(CSS.deg(90), CSS.deg(0)),
+        new CSSScale(CSS.number(1), CSS.number(2), CSS.number(3)),
+      ]));
+}, 'Normalizing a <transform-list> returns a CSSTransformValue containing all the transforms');
+
+test(() => {
+  test_transform_normalization(
+      'translate(calc(1px + 1em)) perspective(calc(1px + 1em))',
+      new CSSTransformValue([
+        new CSSTranslation(new CSSMathSum(CSS.px(1), CSS.em(1)), CSS.px(0)),
+        new CSSPerspective(new CSSMathSum(CSS.px(1), CSS.em(1))),
+      ]));
+}, 'Normalizing transforms with calc values contains CSSMathValues');
+
+</script>
diff --git a/third_party/WebKit/LayoutTests/typedcssom/stylevalue-subclasses/cssTransformValue.html b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-subclasses/cssTransformValue.html
new file mode 100644
index 0000000..5f360ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/stylevalue-subclasses/cssTransformValue.html
@@ -0,0 +1,140 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSSTransformValue tests</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#transformvalue-objects">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../resources/testhelper.js"></script>
+<script src="../resources/comparisons.js"></script>
+<script>
+'use strict';
+
+const EPSILON = 1e-6;
+
+test(() => {
+  assert_throws(new TypeError(), () => new CSSTransformValue());
+  assert_throws(new TypeError(), () => new CSSTransformValue([]));
+}, 'Constructing a CSSTransformValue with no components throws TypeError');
+
+test(() => {
+  const values = [
+    new CSSScale(1, 1),
+    new CSSTranslation(CSS.px(1), CSS.px(1)),
+    new CSSRotation(CSS.deg(90))
+  ];
+
+  const transform = new CSSTransformValue(values);
+  assert_style_value_array_equals(transform, values);
+}, 'CSSTransformValue can be constructed with multiple transforms');
+
+test(() => {
+  const transform = new CSSTransformValue([
+    new CSSScale(1, 1),
+    new CSSTranslation(CSS.px(1), CSS.px(1), CSS.px(1)),
+    new CSSScale(1, 1)
+  ]);
+  assert_equals(transform.is2D, false);
+}, 'CSSTransformValue.is2D is false when given mix of 2D and 3D transforms');
+
+test(() => {
+  const transform = new CSSTransformValue([
+    new CSSScale(1, 1),
+    new CSSTranslation(CSS.px(1), CSS.px(1)),
+    new CSSScale(1, 1)
+  ]);
+  assert_equals(transform.is2D, true);
+}, 'CSSTransformValue.is2D is true when given only 2D transforms');
+
+test(() => {
+  let transform = new CSSTransformValue([new CSSScale(1, 2)]);
+  assert_throws(new TypeError(), () => transform.is2D = false);
+  assert_equals(transform.is2D, true);
+}, 'CSSTransformValue.is2D is readonly');
+
+test(() => {
+  const transform = new CSSTransformValue([
+    new CSSTranslation(CSS.px(1), CSS.px(2), CSS.px(3))
+  ]);
+  const expectedMatrix = (new DOMMatrixReadOnly()).translate(1, 2, 3);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, 1e-8);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSTranslation');
+
+test(() => {
+  const transform = new CSSTransformValue([
+    new CSSRotation(CSS.number(1), CSS.number(2), CSS.number(3), CSS.deg(90))
+  ]);
+  const expectedMatrix = (new DOMMatrixReadOnly()).rotateAxisAngle(1, 2, 3, 90);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, EPSILON);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSRotation');
+
+test(() => {
+  const transform = new CSSTransformValue([
+      new CSSScale(CSS.number(1), CSS.number(2), CSS.number(3))
+  ]);
+  const expectedMatrix = (new DOMMatrixReadOnly()).scale(1, 2, 3);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, EPSILON);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSScale');
+
+test(() => {
+  const alpha = 10;
+  const beta = 20;
+  const transform = new CSSTransformValue([
+      new CSSSkew(CSS.rad(alpha), CSS.rad(beta))
+  ]);
+  const expectedMatrix = new DOMMatrixReadOnly(
+        [1, Math.tan(beta), 0, 0, Math.tan(alpha), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, EPSILON);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSSkew');
+
+test(() => {
+  const length = 10;
+  const transform = new CSSTransformValue([
+      new CSSPerspective(CSS.px(length))
+  ]);
+  const expectedMatrix = new DOMMatrixReadOnly(
+        [1, 0, 0, 0,
+         0, 1, 0, 0,
+         0, 0, 1, -1/length,
+         0, 0, 0, 1]);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, EPSILON);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSPerspective');
+
+test(() => {
+  const matrix = new DOMMatrixReadOnly(
+          [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
+  const transform = new CSSTransformValue([
+      new CSSMatrixComponent(matrix)
+  ]);
+  assert_matrix_approx_equals(transform.toMatrix(), matrix, EPSILON);
+}, 'CSSTransformValue.toMatrix returns correct matrix for CSSMatrixComponent');
+
+test(() => {
+  const transformMatrix = new DOMMatrixReadOnly([1, 1, 1, 1, 1, 1]);
+  const transformArray = [
+    new CSSScale(2, 2),
+    new CSSMatrixComponent(transformMatrix),
+    new CSSScale(5, 6)
+  ];
+
+  let expectedMatrix = new DOMMatrix();
+  expectedMatrix.scaleSelf(2, 2);
+  expectedMatrix.multiplySelf(transformMatrix);
+  expectedMatrix.scaleSelf(5, 6);
+
+  const transform = new CSSTransformValue(transformArray);
+  assert_matrix_approx_equals(transform.toMatrix(), expectedMatrix, EPSILON);
+}, 'CSSTransformValue.toMatrix multiplies its component matrices');
+
+test(() => {
+  const transformArray = [
+    new CSSScale(2, 2),
+    new CSSMatrixComponent(new DOMMatrixReadOnly([1, 1, 1, 1, 1, 1])),
+    new CSSScale(5, 6)
+  ];
+
+  const transformValue = new CSSTransformValue(transformArray);
+
+  const newTransformArray = [...transformValue];
+  assert_style_value_array_equals([...transformValue], transformArray);
+}, 'Can iterate through CSSTransformValue components');
+</script>
diff --git a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
index 9ca5887..0e91038 100644
--- a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
@@ -585,6 +585,7 @@
     property marginHeight
     property marginWidth
     property name
+    property policy
     property referrerPolicy
     property sandbox
     property scrolling
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index 3366fe8..581fcae 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -2776,6 +2776,7 @@
     getter marginHeight
     getter marginWidth
     getter name
+    getter policy
     getter referrerPolicy
     getter sandbox
     getter scrolling
diff --git a/third_party/WebKit/Source/bindings/core/v8/ActivityLoggerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ActivityLoggerTest.cpp
index 63c1dfb..1f8a067 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ActivityLoggerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ActivityLoggerTest.cpp
@@ -22,7 +22,7 @@
 
 class TestActivityLogger : public V8DOMActivityLogger {
  public:
-  ~TestActivityLogger() override {}
+  ~TestActivityLogger() override = default;
 
   void LogGetter(const String& api_name) override {
     logged_activities_.push_back(api_name);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp b/third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp
index cc631c6..068a4093 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp
@@ -30,11 +30,7 @@
 
 namespace blink {
 
-ArrayValue& ArrayValue::operator=(const ArrayValue& other) {
-  array_ = other.array_;
-  isolate_ = other.isolate_;
-  return *this;
-}
+ArrayValue& ArrayValue::operator=(const ArrayValue& other) = default;
 
 bool ArrayValue::IsUndefinedOrNull() const {
   return blink::IsUndefinedOrNull(array_);
diff --git a/third_party/WebKit/Source/bindings/core/v8/BindingSecurityTest.cpp b/third_party/WebKit/Source/bindings/core/v8/BindingSecurityTest.cpp
index d7a2f7b2..3b76585 100644
--- a/third_party/WebKit/Source/bindings/core/v8/BindingSecurityTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/BindingSecurityTest.cpp
@@ -26,7 +26,7 @@
  public:
   enum class OriginDisposition { CrossOrigin, SameOrigin };
 
-  BindingSecurityCounterTest() {}
+  BindingSecurityCounterTest() = default;
 
   void LoadWindowAndAccessProperty(OriginDisposition which_origin,
                                    const String& property) {
diff --git a/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h b/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h
index a6408e3..21b5cbca 100644
--- a/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h
+++ b/third_party/WebKit/Source/bindings/core/v8/IDLDictionaryBase.h
@@ -19,8 +19,8 @@
   DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
 
  public:
-  IDLDictionaryBase() {}
-  virtual ~IDLDictionaryBase() {}
+  IDLDictionaryBase() = default;
+  virtual ~IDLDictionaryBase() = default;
 
   virtual v8::Local<v8::Value> ToV8Impl(v8::Local<v8::Object> creation_context,
                                         v8::Isolate*) const;
diff --git a/third_party/WebKit/Source/bindings/core/v8/Iterable.h b/third_party/WebKit/Source/bindings/core/v8/Iterable.h
index 1725eef5..277c084d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/Iterable.h
+++ b/third_party/WebKit/Source/bindings/core/v8/Iterable.h
@@ -95,7 +95,7 @@
 
   class IterationSource : public GarbageCollectedFinalized<IterationSource> {
    public:
-    virtual ~IterationSource() {}
+    virtual ~IterationSource() = default;
 
     // If end of iteration has been reached or an exception thrown: return
     // false.  Otherwise: set |key| and |value| and return true.
diff --git a/third_party/WebKit/Source/bindings/core/v8/ReferrerScriptInfo.h b/third_party/WebKit/Source/bindings/core/v8/ReferrerScriptInfo.h
index 65e3f3e7..da41358b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ReferrerScriptInfo.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ReferrerScriptInfo.h
@@ -19,16 +19,17 @@
 
 // ReferrerScriptInfo carries a copy of "referencing script's" info referenced
 // in HTML Spec: "HostImportModuleDynamically" algorithm.
-// https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md#hostimportmoduledynamicallyreferencingscriptormodule-specifier-promisecapability
+// https://html.spec.whatwg.org/multipage/webappapis.html#hostimportmoduledynamically(referencingscriptormodule,-specifier,-promisecapability)
 class CORE_EXPORT ReferrerScriptInfo {
  public:
-  ReferrerScriptInfo() {}
+  ReferrerScriptInfo() = default;
   ReferrerScriptInfo(network::mojom::FetchCredentialsMode credentials_mode,
                      const String& nonce,
                      ParserDisposition parser_state)
       : credentials_mode_(credentials_mode),
         nonce_(nonce),
         parser_state_(parser_state) {}
+
   static ReferrerScriptInfo FromScriptFetchOptions(
       const ScriptFetchOptions& options) {
     return ReferrerScriptInfo(options.CredentialsMode(), options.Nonce(),
@@ -53,14 +54,15 @@
 
  private:
   // Spec: "referencing script's credentials mode"
-  // The default value is "omit", from Step 5 of [HIMD].
-  // [HIMD]
-  // https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md#hostimportmoduledynamicallyreferencingscriptormodule-specifier-promisecapability
+  // The default value is "omit" per:
+  // https://html.spec.whatwg.org/multipage/webappapis.html#default-classic-script-fetch-options
   network::mojom::FetchCredentialsMode credentials_mode_ =
       network::mojom::FetchCredentialsMode::kOmit;
   // Spec: "referencing script's cryptographic nonce"
   String nonce_;
   // Spec: "referencing script's parser state"
+  // The default value is "not-parser-inserted" per:
+  // https://html.spec.whatwg.org/multipage/webappapis.html#default-classic-script-fetch-options
   ParserDisposition parser_state_ = kNotParserInserted;
 };
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
index ff8533a5..bd6b8b95 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
@@ -186,9 +186,9 @@
   AccessControlStatus cors_status_;
 };
 
-RejectedPromises::RejectedPromises() {}
+RejectedPromises::RejectedPromises() = default;
 
-RejectedPromises::~RejectedPromises() {}
+RejectedPromises::~RejectedPromises() = default;
 
 void RejectedPromises::RejectedWithNoHandler(
     ScriptState* script_state,
diff --git a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp
index 4cf1cdb4..45375ca 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp
@@ -51,7 +51,7 @@
   DCHECK(root_);
 }
 
-RetainedDOMInfo::~RetainedDOMInfo() {}
+RetainedDOMInfo::~RetainedDOMInfo() = default;
 
 void RetainedDOMInfo::Dispose() {
   delete this;
@@ -97,7 +97,7 @@
     : number_of_objects_with_pending_activity_(
           number_of_objects_with_pending_activity) {}
 
-PausableObjectsInfo::~PausableObjectsInfo() {}
+PausableObjectsInfo::~PausableObjectsInfo() = default;
 
 void PausableObjectsInfo::Dispose() {
   delete this;
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
index 367ba1df..9bba7c2 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
@@ -53,7 +53,7 @@
 class CORE_EXPORT ScriptFunction
     : public GarbageCollectedFinalized<ScriptFunction> {
  public:
-  virtual ~ScriptFunction() {}
+  virtual ~ScriptFunction() = default;
   virtual void Trace(blink::Visitor* visitor) {}
 
  protected:
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
index 029d1a97..c8a27f6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
@@ -13,26 +13,7 @@
 
 namespace blink {
 
-const char* ScriptModuleStateToString(ScriptModuleState state) {
-  switch (state) {
-    case ScriptModuleState::kUninstantiated:
-      return "uninstantiated";
-    case ScriptModuleState::kInstantiating:
-      return "instantinating";
-    case ScriptModuleState::kInstantiated:
-      return "instantiated";
-    case ScriptModuleState::kEvaluating:
-      return "evaluating";
-    case ScriptModuleState::kEvaluated:
-      return "evaluated";
-    case ScriptModuleState::kErrored:
-      return "errored";
-  }
-  NOTREACHED();
-  return "";
-}
-
-ScriptModule::ScriptModule() {}
+ScriptModule::ScriptModule() = default;
 
 ScriptModule::ScriptModule(v8::Isolate* isolate, v8::Local<v8::Module> module)
     : module_(SharedPersistent<v8::Module>::Create(module, isolate)),
@@ -40,7 +21,7 @@
   DCHECK(!module_->IsEmpty());
 }
 
-ScriptModule::~ScriptModule() {}
+ScriptModule::~ScriptModule() = default;
 
 ScriptModule ScriptModule::Compile(v8::Isolate* isolate,
                                    const String& source,
@@ -146,25 +127,9 @@
   return ret;
 }
 
-ScriptModuleState ScriptModule::Status(ScriptState* script_state) {
-  DCHECK(!IsNull());
-
-  v8::Local<v8::Module> module = module_->NewLocal(script_state->GetIsolate());
-  return module->GetStatus();
-}
-
-v8::Local<v8::Value> ScriptModule::ErrorCompletion(ScriptState* script_state) {
-  DCHECK(!IsNull());
-  DCHECK_EQ(ScriptModuleState::kErrored, Status(script_state));
-
-  v8::Local<v8::Module> module = module_->NewLocal(script_state->GetIsolate());
-  return module->GetException();
-}
-
 v8::Local<v8::Value> ScriptModule::V8Namespace(v8::Isolate* isolate) {
   DCHECK(!IsNull());
   v8::Local<v8::Module> module = module_->NewLocal(isolate);
-  DCHECK_EQ(ScriptModuleState::kEvaluated, module->GetStatus());
   return module->GetModuleNamespace();
 }
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
index a997228..7d147c1 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
@@ -22,12 +22,6 @@
 
 class ExceptionState;
 
-// Correspond to TC39 ModuleRecord.[[Status]]
-// TODO(kouhei): Add URL after https://github.com/tc39/ecma262/pull/916 is
-// merged.
-using ScriptModuleState = v8::Module::Status;
-const char* ScriptModuleStateToString(ScriptModuleState);
-
 // ScriptModule wraps a handle to a v8::Module for use in core.
 //
 // Using ScriptModules needs a ScriptState and its scope to operate in. You
@@ -62,11 +56,6 @@
 
   Vector<String> ModuleRequests(ScriptState*);
   Vector<TextPosition> ModuleRequestPositions(ScriptState*);
-  ScriptModuleState Status(ScriptState*);
-
-  // Returns record's [[ErrorCompletion]] field's [[Value]].
-  // Should only be used via ModulatorImpl::GetError()
-  v8::Local<v8::Value> ErrorCompletion(ScriptState*);
 
   inline bool operator==(const blink::ScriptModule& other) const;
   bool operator!=(const blink::ScriptModule& other) const {
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
index d4a0a01..c815f19c 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
@@ -22,8 +22,8 @@
 
 class TestScriptModuleResolver final : public ScriptModuleResolver {
  public:
-  TestScriptModuleResolver() {}
-  virtual ~TestScriptModuleResolver() {}
+  TestScriptModuleResolver() = default;
+  virtual ~TestScriptModuleResolver() = default;
 
   size_t ResolveCount() const { return specifiers_.size(); }
   const Vector<String>& Specifiers() const { return specifiers_; }
@@ -55,7 +55,7 @@
 class ScriptModuleTestModulator final : public DummyModulator {
  public:
   ScriptModuleTestModulator();
-  virtual ~ScriptModuleTestModulator() {}
+  virtual ~ScriptModuleTestModulator() = default;
 
   void Trace(blink::Visitor*);
 
@@ -88,8 +88,6 @@
       ScriptFetchOptions(), kSharableCrossOrigin,
       TextPosition::MinimumPosition(), ASSERT_NO_EXCEPTION);
   ASSERT_FALSE(module.IsNull());
-  EXPECT_EQ(ScriptModuleState::kUninstantiated,
-            module.Status(scope.GetScriptState()));
 }
 
 TEST(ScriptModuleTest, compileFail) {
@@ -210,12 +208,6 @@
   ASSERT_FALSE(module.IsNull());
   ScriptValue exception = module.Instantiate(scope.GetScriptState());
   ASSERT_TRUE(exception.IsEmpty());
-  EXPECT_EQ(ScriptModuleState::kInstantiated,
-            module_a.Status(scope.GetScriptState()));
-  EXPECT_EQ(ScriptModuleState::kInstantiated,
-            module_b.Status(scope.GetScriptState()));
-  EXPECT_EQ(ScriptModuleState::kInstantiated,
-            module.Status(scope.GetScriptState()));
 
   ASSERT_EQ(2u, resolver->ResolveCount());
   EXPECT_EQ("a", resolver->Specifiers()[0]);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperty.h b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperty.h
index ab741c7..136312fe 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperty.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperty.h
@@ -56,7 +56,7 @@
   template <typename PassHolderType>
   ScriptPromiseProperty(ExecutionContext*, PassHolderType, Name);
 
-  ~ScriptPromiseProperty() override {}
+  ~ScriptPromiseProperty() override = default;
 
   template <typename PassResolvedType>
   void Resolve(PassResolvedType);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
index 54d2f07..e5f1d97 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.cpp
@@ -73,7 +73,7 @@
       start_position_(TextPosition::MinimumPosition()),
       source_location_type_(ScriptSourceLocationType::kExternalFile) {}
 
-ScriptSourceCode::~ScriptSourceCode() {}
+ScriptSourceCode::~ScriptSourceCode() = default;
 
 void ScriptSourceCode::Trace(blink::Visitor* visitor) {
   visitor->Trace(cache_handler_);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
index 32b2f32..46597e213 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
@@ -185,7 +185,7 @@
         queue_lead_position_(0),
         queue_tail_position_(0) {}
 
-  virtual ~SourceStream() override {}
+  ~SourceStream() override = default;
 
   // Called by V8 on a background thread. Should block until we can return
   // some data.
@@ -523,7 +523,7 @@
       encoding_(v8::ScriptCompiler::StreamedSource::TWO_BYTE),
       loading_task_runner_(std::move(loading_task_runner)) {}
 
-ScriptStreamer::~ScriptStreamer() {}
+ScriptStreamer::~ScriptStreamer() = default;
 
 void ScriptStreamer::Trace(blink::Visitor* visitor) {
   visitor->Trace(pending_script_);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValue.h b/third_party/WebKit/Source/bindings/core/v8/ScriptValue.h
index f8401e5..2931b8b7 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValue.h
@@ -67,7 +67,7 @@
     return To<T>(isolate, value.V8Value(), exception_state, arguments...);
   }
 
-  ScriptValue() {}
+  ScriptValue() = default;
 
   ScriptValue(ScriptState* script_state, v8::Local<v8::Value> value)
       : script_state_(script_state),
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp
index a5f8cb9..df16753 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp
@@ -244,7 +244,7 @@
       blink::TraceWrapperBase {
  public:
   static HandleContainer* Create() { return new HandleContainer(); }
-  virtual ~HandleContainer() {}
+  virtual ~HandleContainer() = default;
 
   void Trace(blink::Visitor* visitor) {}
   void TraceWrappers(const ScriptWrappableVisitor* visitor) const {
diff --git a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
index 00956d089..c7ae0acf 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
@@ -168,7 +168,7 @@
       stack_trace_(std::move(stack_trace)),
       script_id_(script_id) {}
 
-SourceLocation::~SourceLocation() {}
+SourceLocation::~SourceLocation() = default;
 
 void SourceLocation::ToTracedValue(TracedValue* value, const char* name) const {
   if (!stack_trace_ || stack_trace_->isEmpty())
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8IdleTaskRunner.h b/third_party/WebKit/Source/bindings/core/v8/V8IdleTaskRunner.h
index 82214a0..5b9d05a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8IdleTaskRunner.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8IdleTaskRunner.h
@@ -44,7 +44,7 @@
 
  public:
   V8IdleTaskRunner(WebScheduler* scheduler) : scheduler_(scheduler) {}
-  ~V8IdleTaskRunner() override {}
+  ~V8IdleTaskRunner() override = default;
   void PostIdleTask(v8::IdleTask* task) override {
     DCHECK(RuntimeEnabledFeatures::V8IdleTasksEnabled());
     scheduler_->PostIdleTask(
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.cpp b/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.cpp
index e68a8823..e60e024 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverDelegate.cpp
@@ -20,7 +20,7 @@
     : ContextClient(ExecutionContext::From(script_state)),
       callback_(callback) {}
 
-V8IntersectionObserverDelegate::~V8IntersectionObserverDelegate() {}
+V8IntersectionObserverDelegate::~V8IntersectionObserverDelegate() = default;
 
 void V8IntersectionObserverDelegate::Deliver(
     const HeapVector<Member<IntersectionObserverEntry>>& entries,
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp b/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp
index 9aa14e8..b6b4944 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp
@@ -51,7 +51,7 @@
     filter_.Set(script_state->GetIsolate(), filter.As<v8::Object>());
 }
 
-V8NodeFilterCondition::~V8NodeFilterCondition() {}
+V8NodeFilterCondition::~V8NodeFilterCondition() = default;
 
 void V8NodeFilterCondition::TraceWrappers(
     const ScriptWrappableVisitor* visitor) const {
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
index 32a9e926..3b4c677 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunnerTest.cpp
@@ -23,8 +23,8 @@
 
 class V8ScriptRunnerTest : public ::testing::Test {
  public:
-  V8ScriptRunnerTest() {}
-  ~V8ScriptRunnerTest() override {}
+  V8ScriptRunnerTest() = default;
+  ~V8ScriptRunnerTest() override = default;
 
   void SetUp() override {
     // To trick various layers of caching, increment a counter for each
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp b/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp
index 889b1dd1..15be8fb 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp
@@ -132,7 +132,8 @@
   return V8PerContextData::From(context);
 }
 
-V8V0CustomElementLifecycleCallbacks::~V8V0CustomElementLifecycleCallbacks() {}
+V8V0CustomElementLifecycleCallbacks::~V8V0CustomElementLifecycleCallbacks() =
+    default;
 
 bool V8V0CustomElementLifecycleCallbacks::SetBinding(
     std::unique_ptr<V0CustomElementBinding> binding) {
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValue.h b/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValue.h
index 95e48108..ada23e1 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValue.h
@@ -117,7 +117,7 @@
     };
     STACK_ALLOCATED();
 
-    SerializeOptions() {}
+    SerializeOptions() = default;
     explicit SerializeOptions(StoragePolicy for_storage)
         : for_storage(for_storage) {}
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValueFactory.h b/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValueFactory.h
index f1a553fb..c58f4f75 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValueFactory.h
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValueFactory.h
@@ -53,7 +53,7 @@
 
   // Following methods are expected to be called in
   // SerializedScriptValueFactory{ForModules}.
-  SerializedScriptValueFactory() {}
+  SerializedScriptValueFactory() = default;
 
  private:
   static SerializedScriptValueFactory& Instance() {
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/Transferables.h b/third_party/WebKit/Source/bindings/core/v8/serialization/Transferables.h
index 860f445..727cb29 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/Transferables.h
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/Transferables.h
@@ -26,7 +26,7 @@
   WTF_MAKE_NONCOPYABLE(Transferables);
 
  public:
-  Transferables() {}
+  Transferables() = default;
 
   ArrayBufferArray array_buffers;
   ImageBitmapArray image_bitmaps;
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/UnpackedSerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/serialization/UnpackedSerializedScriptValue.cpp
index 2572b39..2998fd3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/UnpackedSerializedScriptValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/UnpackedSerializedScriptValue.cpp
@@ -42,7 +42,7 @@
   }
 }
 
-UnpackedSerializedScriptValue::~UnpackedSerializedScriptValue() {}
+UnpackedSerializedScriptValue::~UnpackedSerializedScriptValue() = default;
 
 void UnpackedSerializedScriptValue::Trace(blink::Visitor* visitor) {
   visitor->Trace(array_buffers_);
diff --git a/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp b/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
index c8acf82..4e53eff0 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/wasm/WasmResponseExtensions.cpp
@@ -114,7 +114,7 @@
   USING_GARBAGE_COLLECTED_MIXIN(WasmDataLoaderClient);
 
  public:
-  explicit WasmDataLoaderClient() {}
+  explicit WasmDataLoaderClient() = default;
   void DidFetchDataLoadedCustomFormat() override {}
   void DidFetchDataLoadFailed() override { NOTREACHED(); }
 };
diff --git a/third_party/WebKit/Source/controller/DevToolsFrontendImpl.cpp b/third_party/WebKit/Source/controller/DevToolsFrontendImpl.cpp
index e9d31b8..edf31bd2 100644
--- a/third_party/WebKit/Source/controller/DevToolsFrontendImpl.cpp
+++ b/third_party/WebKit/Source/controller/DevToolsFrontendImpl.cpp
@@ -38,7 +38,6 @@
 #include "core/frame/WebLocalFrameImpl.h"
 #include "core/inspector/DevToolsHost.h"
 #include "core/page/Page.h"
-#include "platform/LayoutTestSupport.h"
 
 namespace blink {
 
@@ -71,7 +70,7 @@
     mojom::blink::DevToolsFrontendAssociatedRequest request)
     : Supplement<LocalFrame>(frame), binding_(this, std::move(request)) {}
 
-DevToolsFrontendImpl::~DevToolsFrontendImpl() {}
+DevToolsFrontendImpl::~DevToolsFrontendImpl() = default;
 
 void DevToolsFrontendImpl::DidClearWindowObject() {
   if (host_) {
@@ -120,10 +119,6 @@
     host_->DispatchEmbedderMessage(message);
 }
 
-bool DevToolsFrontendImpl::IsUnderTest() {
-  return LayoutTestSupport::IsRunningLayoutTest();
-}
-
 void DevToolsFrontendImpl::ShowContextMenu(LocalFrame* target_frame,
                                            float x,
                                            float y,
diff --git a/third_party/WebKit/Source/controller/DevToolsFrontendImpl.h b/third_party/WebKit/Source/controller/DevToolsFrontendImpl.h
index 8b68762..c14dcbb 100644
--- a/third_party/WebKit/Source/controller/DevToolsFrontendImpl.h
+++ b/third_party/WebKit/Source/controller/DevToolsFrontendImpl.h
@@ -77,7 +77,6 @@
 
   // InspectorFrontendClient implementation.
   void SendMessageToEmbedder(const String&) override;
-  bool IsUnderTest() override;
   void ShowContextMenu(LocalFrame*,
                        float x,
                        float y,
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn
index bdc3551e..03193db6 100644
--- a/third_party/WebKit/Source/core/BUILD.gn
+++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -207,6 +207,7 @@
     "//third_party/WebKit/Source/core/origin_trials",
     "//third_party/WebKit/Source/core/page",
     "//third_party/WebKit/Source/core/paint",
+    "//third_party/WebKit/Source/core/policy",
     "//third_party/WebKit/Source/core/probe",
     "//third_party/WebKit/Source/core/resize_observer",
     "//third_party/WebKit/Source/core/streams",
@@ -1714,7 +1715,6 @@
     "dom/NodeTest.cpp",
     "dom/NthIndexCacheTest.cpp",
     "dom/PausableObjectTest.cpp",
-    "dom/PolicyTest.cpp",
     "dom/RangeTest.cpp",
     "dom/ScriptModuleResolverImplTest.cpp",
     "dom/ScriptRunnerTest.cpp",
@@ -2001,6 +2001,7 @@
     "paint/compositing/CompositingReasonFinderTest.cpp",
     "paint/compositing/PaintLayerCompositorTest.cpp",
     "paint/ng/ng_text_fragment_painter_test.cc",
+    "policy/PolicyTest.cpp",
     "resize_observer/ResizeObserverTest.cpp",
     "scheduler/ActiveConnectionThrottlingTest.cpp",
     "scheduler/FrameSchedulerTest.cpp",
diff --git a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
index 46dfec2..7829245 100644
--- a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
@@ -165,8 +165,8 @@
       while (fill_layer && (fill_layer->*fill_layer_methods.is_set)()) {
         result.push_back((fill_layer->*fill_layer_methods.get_length)());
         switch ((fill_layer->*fill_layer_methods.get_edge)()) {
-          case kRightEdge:
-          case kBottomEdge:
+          case BackgroundEdgeOrigin::kRight:
+          case BackgroundEdgeOrigin::kBottom:
             result.back() = result.back().SubtractFromOneHundredPercent();
             break;
           default:
diff --git a/third_party/WebKit/Source/core/core_idl_files.gni b/third_party/WebKit/Source/core/core_idl_files.gni
index 236138d..f820344d 100644
--- a/third_party/WebKit/Source/core/core_idl_files.gni
+++ b/third_party/WebKit/Source/core/core_idl_files.gni
@@ -122,7 +122,7 @@
                     "dom/NodeFilter.idl",
                     "dom/NodeIterator.idl",
                     "dom/NodeList.idl",
-                    "dom/Policy.idl",
+                    "policy/Policy.idl",
                     "dom/ProcessingInstruction.idl",
                     "dom/Range.idl",
                     "dom/ShadowRoot.idl",
diff --git a/third_party/WebKit/Source/core/css/CSSContentDistributionValue.cpp b/third_party/WebKit/Source/core/css/CSSContentDistributionValue.cpp
index 7a00fbc..bdb5e2a 100644
--- a/third_party/WebKit/Source/core/css/CSSContentDistributionValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSContentDistributionValue.cpp
@@ -24,7 +24,7 @@
   CSSValueList* list = CSSValueList::CreateSpaceSeparated();
 
   if (distribution_ != CSSValueInvalid)
-    list->Append(*Distribution());
+    list->Append(*CSSIdentifierValue::Create(distribution_));
   if (position_ != CSSValueInvalid) {
     if (position_ == CSSValueFirstBaseline ||
         position_ == CSSValueLastBaseline) {
@@ -33,11 +33,11 @@
       list->Append(*CSSIdentifierValue::Create(preference));
       list->Append(*CSSIdentifierValue::Create(CSSValueBaseline));
     } else {
-      list->Append(*GetPosition());
+      list->Append(*CSSIdentifierValue::Create(position_));
     }
   }
   if (overflow_ != CSSValueInvalid)
-    list->Append(*Overflow());
+    list->Append(*CSSIdentifierValue::Create(overflow_));
 
   return list->CustomCSSText();
 }
diff --git a/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h b/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h
index 03bdff4f..e24fd2c 100644
--- a/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h
+++ b/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h
@@ -21,18 +21,11 @@
   }
   ~CSSContentDistributionValue();
 
-  // TODO(sashab): Make these return CSSValueIDs instead of CSSValues.
-  CSSIdentifierValue* Distribution() const {
-    return CSSIdentifierValue::Create(distribution_);
-  }
+  CSSValueID Distribution() const { return distribution_; }
 
-  CSSIdentifierValue* GetPosition() const {
-    return CSSIdentifierValue::Create(position_);
-  }
+  CSSValueID Position() const { return position_; }
 
-  CSSIdentifierValue* Overflow() const {
-    return CSSIdentifierValue::Create(overflow_);
-  }
+  CSSValueID Overflow() const { return overflow_; }
 
   String CustomCSSText() const;
 
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
index 1a2eac57..ff0fda69 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -522,16 +522,16 @@
 inline CSSIdentifierValue::CSSIdentifierValue(BackgroundEdgeOrigin e)
     : CSSValue(kIdentifierClass) {
   switch (e) {
-    case kTopEdge:
+    case BackgroundEdgeOrigin::kTop:
       value_id_ = CSSValueTop;
       break;
-    case kRightEdge:
+    case BackgroundEdgeOrigin::kRight:
       value_id_ = CSSValueRight;
       break;
-    case kBottomEdge:
+    case BackgroundEdgeOrigin::kBottom:
       value_id_ = CSSValueBottom;
       break;
-    case kLeftEdge:
+    case BackgroundEdgeOrigin::kLeft:
       value_id_ = CSSValueLeft;
       break;
   }
@@ -541,19 +541,19 @@
 inline BackgroundEdgeOrigin CSSIdentifierValue::ConvertTo() const {
   switch (value_id_) {
     case CSSValueTop:
-      return kTopEdge;
+      return BackgroundEdgeOrigin::kTop;
     case CSSValueRight:
-      return kRightEdge;
+      return BackgroundEdgeOrigin::kRight;
     case CSSValueBottom:
-      return kBottomEdge;
+      return BackgroundEdgeOrigin::kBottom;
     case CSSValueLeft:
-      return kLeftEdge;
+      return BackgroundEdgeOrigin::kLeft;
     default:
       break;
   }
 
   NOTREACHED();
-  return kTopEdge;
+  return BackgroundEdgeOrigin::kTop;
 }
 
 template <>
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
index 54e1d8f..0f7ac23 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
@@ -10,6 +10,25 @@
 
 namespace blink {
 
+CSSTransformValue* CSSTransformValue::Create(
+    const HeapVector<Member<CSSTransformComponent>>& transform_components,
+    ExceptionState& exception_state) {
+  CSSTransformValue* value = Create(transform_components);
+  if (!value) {
+    exception_state.ThrowTypeError(
+        "CSSTransformValue must have at least one component");
+    return nullptr;
+  }
+  return value;
+}
+
+CSSTransformValue* CSSTransformValue::Create(
+    const HeapVector<Member<CSSTransformComponent>>& transform_components) {
+  if (transform_components.IsEmpty())
+    return nullptr;
+  return new CSSTransformValue(transform_components);
+}
+
 CSSTransformValue* CSSTransformValue::FromCSSValue(const CSSValue& css_value) {
   if (!css_value.IsValueList()) {
     // TODO(meade): Also need to check the separator here if we care.
@@ -27,12 +46,8 @@
 }
 
 bool CSSTransformValue::is2D() const {
-  for (size_t i = 0; i < transform_components_.size(); i++) {
-    if (!transform_components_[i]->is2D()) {
-      return false;
-    }
-  }
-  return true;
+  return std::all_of(transform_components_.begin(), transform_components_.end(),
+                     [](const auto& component) { return component->is2D(); });
 }
 
 DOMMatrix* CSSTransformValue::toMatrix(ExceptionState& exception_state) const {
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.h b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.h
index 89df855..6d1667c 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.h
@@ -20,12 +20,13 @@
   DEFINE_WRAPPERTYPEINFO();
 
  public:
-  static CSSTransformValue* Create() { return new CSSTransformValue(); }
-
   static CSSTransformValue* Create(
-      const HeapVector<Member<CSSTransformComponent>>& transform_components) {
-    return new CSSTransformValue(transform_components);
-  }
+      const HeapVector<Member<CSSTransformComponent>>& transform_components,
+      ExceptionState&);
+
+  // Blink-internal constructor
+  static CSSTransformValue* Create(
+      const HeapVector<Member<CSSTransformComponent>>& transform_components);
 
   static CSSTransformValue* FromCSSValue(const CSSValue&);
 
@@ -49,7 +50,6 @@
   }
 
  private:
-  CSSTransformValue() = default;
   CSSTransformValue(
       const HeapVector<Member<CSSTransformComponent>>& transform_components)
       : CSSStyleValue(), transform_components_(transform_components) {}
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl
index 05fc996..e39cfda 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl
@@ -3,7 +3,8 @@
 // found in the LICENSE file.
 
 [
-    Constructor(optional sequence<CSSTransformComponent> transforms),
+    Constructor(sequence<CSSTransformComponent> transforms),
+    RaisesException=Constructor,
     Exposed(Window CSSTypedOM, PaintWorklet CSSTypedOM)
 ] interface CSSTransformValue : CSSStyleValue {
     // https://github.com/w3c/css-houdini-drafts/issues/358
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index d3c5454a..05a34406 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -714,15 +714,21 @@
       ComputedStyleInitialValues::InitialContentAlignment();
   const CSSContentDistributionValue& content_value =
       ToCSSContentDistributionValue(value);
-  if (content_value.Distribution()->GetValueID() != CSSValueInvalid)
+  if (content_value.Distribution() != CSSValueInvalid) {
     alignment_data.SetDistribution(
-        content_value.Distribution()->ConvertTo<ContentDistributionType>());
-  if (content_value.GetPosition()->GetValueID() != CSSValueInvalid)
+        CSSIdentifierValue::Create(content_value.Distribution())
+            ->ConvertTo<ContentDistributionType>());
+  }
+  if (content_value.Position() != CSSValueInvalid) {
     alignment_data.SetPosition(
-        content_value.GetPosition()->ConvertTo<ContentPosition>());
-  if (content_value.Overflow()->GetValueID() != CSSValueInvalid)
+        CSSIdentifierValue::Create(content_value.Position())
+            ->ConvertTo<ContentPosition>());
+  }
+  if (content_value.Overflow() != CSSValueInvalid) {
     alignment_data.SetOverflow(
-        content_value.Overflow()->ConvertTo<OverflowAlignment>());
+        CSSIdentifierValue::Create(content_value.Overflow())
+            ->ConvertTo<OverflowAlignment>());
+  }
 
   return alignment_data;
 }
diff --git a/third_party/WebKit/Source/core/dom/BUILD.gn b/third_party/WebKit/Source/core/dom/BUILD.gn
index 5eb1337..50ea0f4 100644
--- a/third_party/WebKit/Source/core/dom/BUILD.gn
+++ b/third_party/WebKit/Source/core/dom/BUILD.gn
@@ -205,8 +205,6 @@
     "PausableObject.h",
     "PendingScript.cpp",
     "PendingScript.h",
-    "Policy.cpp",
-    "Policy.h",
     "PresentationAttributeStyle.cpp",
     "PresentationAttributeStyle.h",
     "ProcessingInstruction.cpp",
diff --git a/third_party/WebKit/Source/core/dom/ClassicScript.h b/third_party/WebKit/Source/core/dom/ClassicScript.h
index 04d8c96c..c47ff4fe 100644
--- a/third_party/WebKit/Source/core/dom/ClassicScript.h
+++ b/third_party/WebKit/Source/core/dom/ClassicScript.h
@@ -33,7 +33,8 @@
   ClassicScript(const ScriptSourceCode& script_source_code,
                 const ScriptFetchOptions& fetch_options,
                 AccessControlStatus access_control_status)
-      : Script(fetch_options),
+      // TODO(kouhei): This should be document.BaseURL() instead.
+      : Script(fetch_options, script_source_code.Url()),
         script_source_code_(script_source_code),
         access_control_status_(access_control_status) {}
 
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 3ce6b91b..e9282cea 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -88,7 +88,6 @@
 #include "core/dom/NodeTraversal.h"
 #include "core/dom/NodeWithIndex.h"
 #include "core/dom/NthIndexCache.h"
-#include "core/dom/Policy.h"
 #include "core/dom/ProcessingInstruction.h"
 #include "core/dom/ScriptRunner.h"
 #include "core/dom/ScriptedAnimationController.h"
@@ -206,6 +205,7 @@
 #include "core/page/scrolling/SnapCoordinator.h"
 #include "core/page/scrolling/TopDocumentRootScrollerController.h"
 #include "core/paint/compositing/PaintLayerCompositor.h"
+#include "core/policy/DocumentPolicy.h"
 #include "core/probe/CoreProbes.h"
 #include "core/resize_observer/ResizeObserverController.h"
 #include "core/svg/SVGDocumentExtensions.h"
@@ -7209,7 +7209,9 @@
 }
 
 Policy* Document::policy() {
-  return Policy::Create(this);
+  if (!policy_)
+    policy_ = new DocumentPolicy(this);
+  return policy_.Get();
 }
 
 void Document::Trace(blink::Visitor* visitor) {
@@ -7268,6 +7270,7 @@
   visitor->Trace(resize_observer_controller_);
   visitor->Trace(property_registry_);
   visitor->Trace(network_state_observer_);
+  visitor->Trace(policy_);
   Supplementable<Document>::Trace(visitor);
   TreeScope::Trace(visitor);
   ContainerNode::Trace(visitor);
@@ -7316,6 +7319,7 @@
   visitor->TraceWrappers(script_runner_);
   visitor->TraceWrappers(scripted_animation_controller_);
   visitor->TraceWrappers(scripted_idle_task_controller_);
+  visitor->TraceWrappers(intersection_observer_controller_);
   ContainerNode::TraceWrappers(visitor);
   Supplementable<Document>::TraceWrappers(visitor);
 }
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 93965f1..265076e 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -1765,7 +1765,8 @@
 
   Member<CanvasFontCache> canvas_font_cache_;
 
-  Member<IntersectionObserverController> intersection_observer_controller_;
+  TraceWrapperMember<IntersectionObserverController>
+      intersection_observer_controller_;
   Member<ResizeObserverController> resize_observer_controller_;
 
   int node_count_;
@@ -1803,6 +1804,8 @@
   int64_t ukm_source_id_;
 
   bool needs_to_record_ukm_outlive_time_;
+
+  Member<Policy> policy_;
 };
 
 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.cpp b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
index 9279c64..47032f1 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
@@ -135,10 +135,9 @@
                            const ScriptFetchOptions& fetch_options,
                            const String& source_text,
                            const TextPosition& start_position)
-    : Script(fetch_options),
+    : Script(fetch_options, base_url),
       settings_object_(settings_object),
       record_(this),
-      base_url_(base_url),
       parse_error_(this),
       error_to_rethrow_(this),
       source_text_(source_text),
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.h b/third_party/WebKit/Source/core/dom/ModuleScript.h
index fe6e89b..46b711f 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -43,7 +43,6 @@
 
   ScriptModule Record() const;
   bool HasEmptyRecord() const;
-  const KURL& BaseURL() const { return base_url_; }
 
   void SetParseErrorAndClearRecord(ScriptValue error);
   bool HasParseError() const { return !parse_error_.IsEmpty(); }
@@ -86,9 +85,6 @@
   // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-module-record
   TraceWrapperV8Reference<v8::Module> record_;
 
-  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-base-url
-  const KURL base_url_;
-
   // https://html.spec.whatwg.org/multipage/webappapis.html#concept-script-parse-error
   //
   // |record_|, |parse_error_| and |error_to_rethrow_| are TraceWrappers()ed and
diff --git a/third_party/WebKit/Source/core/dom/Policy.h b/third_party/WebKit/Source/core/dom/Policy.h
deleted file mode 100644
index 83b3fd8..0000000
--- a/third_party/WebKit/Source/core/dom/Policy.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef Policy_h
-#define Policy_h
-
-#include "core/CoreExport.h"
-#include "platform/bindings/ScriptWrappable.h"
-#include "platform/heap/Member.h"
-
-namespace blink {
-
-class Document;
-
-class CORE_EXPORT Policy final : public ScriptWrappable {
-  DEFINE_WRAPPERTYPEINFO();
-
- public:
-  ~Policy() {}
-  static Policy* Create(Document*);
-  // Returns whether or not the given feature is allowed on the origin of the
-  // document that owns the policy.
-  bool allowsFeature(const String& feature) const;
-  // Returns whether or not the given feature is allowed on the origin of the
-  // given URL.
-  bool allowsFeature(const String& feature, const String& url) const;
-  // Returns a list of feature names that are allowed on the self origin.
-  Vector<String> allowedFeatures() const;
-  // Returns a list of feature name that are allowed on the origin of the given
-  // URL.
-  Vector<String> getAllowlistForFeature(const String& url) const;
-
-  void Trace(blink::Visitor*);
-
- private:
-  // Add console message to |document_|.
-  void AddWarningForUnrecognizedFeature(const String& message) const;
-
-  explicit Policy(Document*);
-  Member<Document> document_;
-};
-
-}  // namespace blink
-
-#endif
diff --git a/third_party/WebKit/Source/core/dom/PolicyTest.cpp b/third_party/WebKit/Source/core/dom/PolicyTest.cpp
deleted file mode 100644
index 024938c2..0000000
--- a/third_party/WebKit/Source/core/dom/PolicyTest.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/dom/Policy.h"
-
-#include "core/dom/Document.h"
-#include "platform/weborigin/SecurityOrigin.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace blink {
-
-namespace {
-constexpr char kSelfOrigin[] = "https://selforigin.com";
-constexpr char kOriginA[] = "https://example.com";
-constexpr char kOriginB[] = "https://example.net";
-}  // namespace
-
-using ::testing::UnorderedElementsAre;
-
-class PolicyTest : public ::testing::Test {
- public:
-  void SetUp() override {
-    document_ = Document::CreateForTest();
-    document_->SetSecurityOrigin(SecurityOrigin::CreateFromString(kSelfOrigin));
-    document_->ApplyFeaturePolicyFromHeader(
-        "fullscreen *; payment 'self'; midi 'none'; camera 'self' "
-        "https://example.com https://example.net");
-    policy_ = Policy::Create(document_);
-  }
-
-  Policy* GetPolicy() const { return policy_; }
-
- private:
-  Persistent<Document> document_;
-  Persistent<Policy> policy_;
-};
-
-TEST_F(PolicyTest, TestAllowsFeature) {
-  EXPECT_FALSE(GetPolicy()->allowsFeature("badfeature"));
-  EXPECT_FALSE(GetPolicy()->allowsFeature("midi"));
-  EXPECT_FALSE(GetPolicy()->allowsFeature("midi", kSelfOrigin));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen"));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen", kOriginA));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("payment"));
-  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginA));
-  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginB));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("camera"));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("camera", kOriginA));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("camera", kOriginB));
-  EXPECT_FALSE(GetPolicy()->allowsFeature("camera", "https://badorigin.com"));
-  EXPECT_TRUE(GetPolicy()->allowsFeature("geolocation", kSelfOrigin));
-}
-
-TEST_F(PolicyTest, TestGetAllowList) {
-  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("camera"),
-              UnorderedElementsAre(kSelfOrigin, kOriginA, kOriginB));
-  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("payment"),
-              UnorderedElementsAre(kSelfOrigin));
-  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("geolocation"),
-              UnorderedElementsAre(kSelfOrigin));
-  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("fullscreen"),
-              UnorderedElementsAre("*"));
-  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("badfeature").IsEmpty());
-  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("midi").IsEmpty());
-}
-
-TEST_F(PolicyTest, TestAllowedFeatures) {
-  Vector<String> allowed_features = GetPolicy()->allowedFeatures();
-  EXPECT_TRUE(allowed_features.Contains("fullscreen"));
-  EXPECT_TRUE(allowed_features.Contains("payment"));
-  EXPECT_TRUE(allowed_features.Contains("camera"));
-  // "geolocation" has default policy as allowed on self origin.
-  EXPECT_TRUE(allowed_features.Contains("geolocation"));
-  EXPECT_FALSE(allowed_features.Contains("badfeature"));
-  EXPECT_FALSE(allowed_features.Contains("midi"));
-}
-
-}  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/Script.h b/third_party/WebKit/Source/core/dom/Script.h
index be3121a..51d93538 100644
--- a/third_party/WebKit/Source/core/dom/Script.h
+++ b/third_party/WebKit/Source/core/dom/Script.h
@@ -36,14 +36,18 @@
   virtual String InlineSourceTextForCSP() const = 0;
 
   const ScriptFetchOptions& FetchOptions() const { return fetch_options_; }
+  const KURL& BaseURL() const { return base_url_; }
 
  protected:
-  explicit Script(const ScriptFetchOptions& fetch_options)
-      : fetch_options_(fetch_options) {}
+  explicit Script(const ScriptFetchOptions& fetch_options, const KURL& base_url)
+      : fetch_options_(fetch_options), base_url_(base_url) {}
 
  private:
   // https://html.spec.whatwg.org/#concept-script-script-fetch-options
   const ScriptFetchOptions fetch_options_;
+
+  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-script-base-url
+  const KURL base_url_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index dfa3bbf90..3867908 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -378,13 +378,17 @@
   ScriptFetchOptions options(nonce, integrity_metadata, integrity_attr,
                              parser_state, credentials_mode);
 
-  // 21. "If the element has a src content attribute, run these substeps:"
+  // 21. "Let settings object be the element's node document's Window object's
+  //      environmental settings object." [spec text]
+  // Note: We use |element_document| as "settings object" in the steps below.
+
+  // 22. "If the element has a src content attribute, run these substeps:"
   if (element_->HasSourceAttribute()) {
-    // 21.1. Let src be the value of the element's src attribute.
+    // 22.1. Let src be the value of the element's src attribute.
     String src =
         StripLeadingAndTrailingHTMLSpaces(element_->SourceAttributeValue());
 
-    // 21.2. "If src is the empty string, queue a task to
+    // 22.2. "If src is the empty string, queue a task to
     //        fire an event named error at the element, and abort these steps."
     if (src.IsEmpty()) {
       // TODO(hiroshige): Make this asynchronous. Currently we fire the error
@@ -393,13 +397,13 @@
       return false;
     }
 
-    // 21.3. "Set the element's from an external file flag."
+    // 22.3. "Set the element's from an external file flag."
     is_external_script_ = true;
 
-    // 21.4. "Parse src relative to the element's node document."
+    // 22.4. "Parse src relative to the element's node document."
     KURL url = element_document.CompleteURL(src);
 
-    // 21.5. "If the previous step failed, queue a task to
+    // 22.5. "If the previous step failed, queue a task to
     //        fire an event named error at the element, and abort these steps."
     if (!url.IsValid()) {
       // TODO(hiroshige): Make this asynchronous. Currently we fire the error
@@ -408,7 +412,7 @@
       return false;
     }
 
-    // 21.6. "Switch on the script's type:"
+    // 22.6. "Switch on the script's type:"
     if (GetScriptType() == ScriptType::kClassic) {
       // - "classic":
 
@@ -451,30 +455,32 @@
     // the script is ready is specified later, in
     // - ScriptLoader::PrepareScript(), or
     // - HTMLParserScriptRunner,
-    // depending on the conditions in Step 23 of "prepare a script".
+    // depending on the conditions in Step 24 of "prepare a script".
   }
 
-  // 22. "If the element does not have a src content attribute,
+  // 23. "If the element does not have a src content attribute,
   //      run these substeps:"
   if (!element_->HasSourceAttribute()) {
-    // 22.1. "Let source text be the value of the text IDL attribute."
+    // 23.1. "Let source text be the value of the text IDL attribute."
     // This step is done later as ScriptElementBase::TextFromChildren():
-    // - in ScriptLoader::PrepareScript() (Step 23, 6th Clause),
+    // - in ScriptLoader::PrepareScript() (Step 24, 6th Clause),
     // - in HTMLParserScriptRunner::ProcessScriptElementInternal()
-    //   (Duplicated code of Step 23, 6th Clause),
-    // - in XMLDocumentParser::EndElementNs() (Step 23, 5th Clause), or
+    //   (Duplicated code of Step 24, 6th Clause),
+    // - in XMLDocumentParser::EndElementNs() (Step 24, 5th Clause), or
     // - in PendingScript::GetSource() (Indirectly used via
     //   HTMLParserScriptRunner::ProcessScriptElementInternal(),
-    //   Step 23, 5th Clause).
+    //   Step 24, 5th Clause).
 
-    // 22.2. "Switch on the script's type:"
+    // 23.2 "Let base URL be the script element's node document's document
+    // base URL." [spec text]
+    KURL base_url = element_document.BaseURL();
+
+    // 23.3. "Switch on the script's type:"
     switch (GetScriptType()) {
       // - "classic":
       case ScriptType::kClassic: {
         // 1. Let script be the result of creating a classic script using source
         // text, settings object, base URL, and options.
-        //
-        // TODO(hiroshige): Implement base URL and options.
 
         ScriptSourceLocationType script_location_type =
             ScriptSourceLocationType::kInline;
@@ -498,11 +504,7 @@
 
       // - "module":
       case ScriptType::kModule: {
-        // 1. "Let base URL be the script element's node document's document
-        //     base URL."
-        KURL base_url = element_document.BaseURL();
-
-        // 2. "Let script be the result of creating a module script using
+        // 1. "Let script be the result of creating a module script using
         //     source text, settings, base URL, cryptographic nonce,
         //     parser state, and module script credentials mode."
         // TODO(kouhei,hiroshige): Update spec refs to use ScriptFetchOptions.
@@ -512,12 +514,12 @@
             element_->TextFromChildren(), modulator, base_url, options,
             kSharableCrossOrigin, position);
 
-        // 3. "If this returns null, set the script's script to null and abort
+        // 2. "If this returns null, set the script's script to null and abort
         //     these substeps; the script is ready."
         if (!module_script)
           return false;
 
-        // 4. "Fetch the descendants of script (using an empty ancestor list).
+        // 3. "Fetch the descendants of script (using an empty ancestor list).
         //     When this asynchronously completes, set the script's script to
         //     the result. At that time, the script is ready."
         auto* module_tree_client = ModulePendingScriptTreeClient::Create();
@@ -532,11 +534,11 @@
 
   DCHECK(prepared_pending_script_);
 
-  // 23. "Then, follow the first of the following options that describes the
+  // 24. "Then, follow the first of the following options that describes the
   //      situation:"
 
   // Three flags are used to instruct the caller of prepareScript() to execute
-  // a part of Step 23, when |m_willBeParserExecuted| is true:
+  // a part of Step 24, when |m_willBeParserExecuted| is true:
   // - |m_willBeParserExecuted|
   // - |m_willExecuteWhenDocumentFinishedParsing|
   // - |m_readyToBeParserExecuted|
diff --git a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
index 0e8064b3..34b1675 100644
--- a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
@@ -76,18 +76,16 @@
   return referrer_module_script;
 }
 
-ModuleScript* CreateTargetModuleScript(
-    Modulator* modulator,
-    V8TestingScope& scope,
-    ScriptModuleState state = ScriptModuleState::kInstantiated) {
+ModuleScript* CreateTargetModuleScript(Modulator* modulator,
+                                       V8TestingScope& scope,
+                                       bool has_parse_error = false) {
   ScriptModule record = ScriptModule::Compile(
       scope.GetIsolate(), "export const pi = 3.14;", "target.js",
       ScriptFetchOptions(), kSharableCrossOrigin,
       TextPosition::MinimumPosition(), ASSERT_NO_EXCEPTION);
   KURL url("https://example.com/target.js");
   auto* module_script = ModuleScript::CreateForTest(modulator, record, url);
-  if (state != ScriptModuleState::kInstantiated) {
-    EXPECT_EQ(ScriptModuleState::kErrored, state);
+  if (has_parse_error) {
     v8::Local<v8::Value> error =
         V8ThrowException::CreateError(scope.GetIsolate(), "hoge");
     module_script->SetParseErrorAndClearRecord(
diff --git a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
index 58becc2..fa19c59 100644
--- a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp
@@ -138,6 +138,8 @@
 ScriptedIdleTaskController::RegisterCallback(
     IdleTask* idle_task,
     const IdleRequestOptions& options) {
+  DCHECK(idle_task);
+
   CallbackId id = NextCallbackId();
   idle_tasks_.Set(id, idle_task);
   long long timeout_millis = options.timeout();
@@ -208,9 +210,15 @@
     double deadline_seconds,
     IdleDeadline::CallbackType callback_type) {
   DCHECK(!paused_);
-  IdleTask* idle_task = idle_tasks_.Take(id);
-  if (!idle_task)
+
+  // Keep the idle task in |idle_tasks_| so that it's still wrapper-traced.
+  // TODO(https://crbug.com/796145): Remove this hack once on-stack objects
+  // get supported by either of wrapper-tracing or unified GC.
+  auto idle_task_iter = idle_tasks_.find(id);
+  if (idle_task_iter == idle_tasks_.end())
     return;
+  IdleTask* idle_task = idle_task_iter->value;
+  DCHECK(idle_task);
 
   double allotted_time_millis =
       std::max((deadline_seconds - CurrentTimeTicksInSeconds()) * 1000, 0.0);
@@ -230,6 +238,11 @@
           GetExecutionContext(), id, allotted_time_millis,
           callback_type == IdleDeadline::CallbackType::kCalledByTimeout));
   idle_task->invoke(IdleDeadline::Create(deadline_seconds, callback_type));
+
+  // Finally there is no need to keep the idle task alive.
+  //
+  // Do not use the iterator because the idle task might update |idle_tasks_|.
+  idle_tasks_.erase(id);
 }
 
 void ScriptedIdleTaskController::ContextDestroyed(ExecutionContext*) {
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index f8936bfa..86e887c 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -26,12 +26,10 @@
 
 #include "core/editing/spellcheck/SpellChecker.h"
 
-#include "core/clipboard/DataObject.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/ElementTraversal.h"
 #include "core/dom/NodeTraversal.h"
-#include "core/dom/Range.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/editing/Editor.h"
 #include "core/editing/EphemeralRange.h"
@@ -39,9 +37,6 @@
 #include "core/editing/SelectionTemplate.h"
 #include "core/editing/VisiblePosition.h"
 #include "core/editing/VisibleUnits.h"
-#include "core/editing/commands/CompositeEditCommand.h"
-#include "core/editing/commands/ReplaceSelectionCommand.h"
-#include "core/editing/commands/TypingCommand.h"
 #include "core/editing/iterators/CharacterIterator.h"
 #include "core/editing/markers/DocumentMarkerController.h"
 #include "core/editing/markers/SpellCheckMarker.h"
@@ -49,16 +44,13 @@
 #include "core/editing/spellcheck/SpellCheckRequester.h"
 #include "core/editing/spellcheck/TextCheckingParagraph.h"
 #include "core/frame/LocalFrame.h"
-#include "core/frame/Settings.h"
 #include "core/html/forms/HTMLInputElement.h"
 #include "core/html_names.h"
 #include "core/input_type_names.h"
 #include "core/layout/LayoutTextControl.h"
 #include "core/loader/EmptyClients.h"
-#include "core/page/FocusController.h"
 #include "core/page/Page.h"
 #include "platform/text/TextBreakIterator.h"
-#include "platform/wtf/Assertions.h"
 #include "public/platform/WebSpellCheckPanelHostClient.h"
 #include "public/platform/WebString.h"
 #include "public/web/WebTextCheckClient.h"
@@ -111,16 +103,6 @@
   return false;
 }
 
-void SpellChecker::ToggleSpellCheckingEnabled() {
-  Page* page = GetFrame().GetPage();
-  if (!page)
-    return;
-  if (IsSpellCheckingEnabled())
-    page->SetSpellCheckStatus(Page::SpellCheckStatus::kForcedOff);
-  else
-    page->SetSpellCheckStatus(Page::SpellCheckStatus::kForcedOn);
-}
-
 void SpellChecker::IgnoreSpelling() {
   RemoveMarkers(GetFrame()
                     .Selection()
@@ -256,28 +238,6 @@
   SpellCheckPanelHostClient().ShowSpellingUI(true);
 }
 
-bool SpellChecker::IsSpellCheckingEnabledInFocusedNode() const {
-  // To avoid regression on speedometer benchmark[1] test, we should not
-  // update layout tree in this code block.
-  // [1] http://browserbench.org/Speedometer/
-  DocumentLifecycle::DisallowTransitionScope disallow_transition(
-      GetFrame().GetDocument()->Lifecycle());
-
-  Node* focused_node = GetFrame()
-                           .Selection()
-                           .GetSelectionInDOMTree()
-                           .ComputeStartPosition()
-                           .AnchorNode();
-  if (!focused_node)
-    return false;
-  const Element* focused_element = focused_node->IsElementNode()
-                                       ? ToElement(focused_node)
-                                       : focused_node->parentElement();
-  if (!focused_element)
-    return false;
-  return focused_element->IsSpellCheckingEnabled();
-}
-
 static void AddMarker(Document* document,
                       const EphemeralRange& checking_range,
                       DocumentMarker::MarkerType type,
@@ -356,14 +316,14 @@
 
   TextCheckingParagraph paragraph(checking_range, checking_range);
 
-  // TODO(xiaochengh): The following comment does not match the current behavior
-  // and should be rewritten.
+  // TODO(crbug.com/230387): The following comment does not match the current
+  // behavior and should be rewritten.
   // Expand the range to encompass entire paragraphs, since text checking needs
   // that much context.
   int ambiguous_boundary_offset = -1;
 
   if (GetFrame().Selection().ComputeVisibleSelectionInDOMTree().IsCaret()) {
-    // TODO(xiaochengh): The following comment does not match the current
+    // TODO(crbug.com/230387): The following comment does not match the current
     // behavior and should be rewritten.
     // Attempt to save the caret position so we can restore it later if needed
     const Position& caret_position =
@@ -657,37 +617,6 @@
   idle_spell_check_callback_->Deactivate();
 }
 
-bool SpellChecker::ShouldSpellcheckByDefault() const {
-  // Spellcheck should be enabled for all editable areas (such as textareas,
-  // contentEditable regions, designMode docs and inputs).
-  Page* page = GetFrame().GetPage();
-  if (!page)
-    return false;
-  Frame* focused_frame = page->GetFocusController().FocusedOrMainFrame();
-  if (!focused_frame->IsLocalFrame())
-    return false;
-  const LocalFrame* frame = ToLocalFrame(focused_frame);
-  if (frame->GetSpellChecker().IsSpellCheckingEnabledInFocusedNode())
-    return true;
-  const Document* document = frame->GetDocument();
-  if (!document)
-    return false;
-  const Element* element = document->FocusedElement();
-  // If |element| is null, we default to allowing spellchecking. This is done
-  // in order to mitigate the issue when the user clicks outside the textbox,
-  // as a result of which |element| becomes null, resulting in all the spell
-  // check markers being deleted. Also, the LocalFrame will decide not to do
-  // spellchecking if the user can't edit - so returning true here will not
-  // cause any problems to the LocalFrame's behavior.
-  if (!element)
-    return true;
-  const LayoutObject* layout_object = element->GetLayoutObject();
-  if (!layout_object)
-    return false;
-
-  return true;
-}
-
 Vector<TextCheckingResult> SpellChecker::FindMisspellings(const String& text) {
   Vector<UChar> characters;
   text.AppendTo(characters);
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h
index d3d006c..e3d9d99f 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h
@@ -58,9 +58,7 @@
 
   static bool IsSpellCheckingEnabledAt(const Position&);
   bool IsSpellCheckingEnabled() const;
-  void ToggleSpellCheckingEnabled();
   void IgnoreSpelling();
-  bool IsSpellCheckingEnabledInFocusedNode() const;
   void MarkAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>&);
   void AdvanceToNextMisspelling(bool start_before_selection);
   void ShowSpellingGuessPanel();
@@ -109,15 +107,6 @@
     return *frame_;
   }
 
-  // Returns whether or not the focused control needs spell-checking.
-  // Currently, this function just retrieves the focused node and determines
-  // whether or not it is a <textarea> element or an element whose
-  // contenteditable attribute is true.
-  // FIXME: Bug 740540: This code just implements the default behavior
-  // proposed in this issue. We should also retrieve "spellcheck" attributes
-  // for text fields and create a flag to over-write the default behavior.
-  bool ShouldSpellcheckByDefault() const;
-
   // Helper functions for advanceToNextMisspelling()
   Vector<TextCheckingResult> FindMisspellings(const String&);
   std::pair<String, int> FindFirstMisspelling(const Position&, const Position&);
diff --git a/third_party/WebKit/Source/core/exported/BUILD.gn b/third_party/WebKit/Source/core/exported/BUILD.gn
index e8132ed..2881e10 100644
--- a/third_party/WebKit/Source/core/exported/BUILD.gn
+++ b/third_party/WebKit/Source/core/exported/BUILD.gn
@@ -16,7 +16,6 @@
     "WebAssociatedURLLoaderImpl.h",
     "WebBlob.cpp",
     "WebCSSParser.cpp",
-    "WebColorSuggestion.cpp",
     "WebContextFeatures.cpp",
     "WebCustomElement.cpp",
     "WebDOMActivityLogger.cpp",
diff --git a/third_party/WebKit/Source/core/exported/WebColorSuggestion.cpp b/third_party/WebKit/Source/core/exported/WebColorSuggestion.cpp
deleted file mode 100644
index 4aca4af..0000000
--- a/third_party/WebKit/Source/core/exported/WebColorSuggestion.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2013 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.
- */
-
-#include "public/web/WebColorSuggestion.h"
-
-#include "platform/ColorSuggestion.h"
-#include "public/platform/WebColor.h"
-#include "public/platform/WebString.h"
-
-namespace blink {
-
-WebColorSuggestion::WebColorSuggestion(const ColorSuggestion& suggestion)
-    : color(static_cast<WebColor>(suggestion.color.Rgb())),
-      label(suggestion.label) {}
-
-WebColorSuggestion& WebColorSuggestion::operator=(
-    const ColorSuggestion& suggestion) {
-  color = static_cast<WebColor>(suggestion.color.Rgb());
-  label = suggestion.label;
-  return *this;
-}
-
-}  // namespace blink
diff --git a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
index 542c7a7..7a6fcab 100644
--- a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
@@ -83,11 +83,13 @@
 #include "platform/wtf/Vector.h"
 #include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
+#include "public/platform/WebFloatRect.h"
 #include "public/platform/WebLayerTreeView.h"
 #include "public/platform/WebRect.h"
 #include "public/platform/WebString.h"
 #include "public/web/WebDevToolsAgentClient.h"
 #include "public/web/WebSettings.h"
+#include "public/web/WebViewClient.h"
 
 namespace blink {
 
@@ -497,6 +499,15 @@
     const WebPoint& point_in_root_frame) {
   if (!session_id)
     return;
+
+  WebPoint point = point_in_root_frame;
+  if (web_local_frame_impl_->ViewImpl() &&
+      web_local_frame_impl_->ViewImpl()->Client()) {
+    WebFloatRect rect(point.x, point.y, 0, 0);
+    web_local_frame_impl_->ViewImpl()->Client()->ConvertWindowToViewport(&rect);
+    point = WebPoint(rect.x, rect.y);
+  }
+
   auto agent_it = overlay_agents_.find(session_id);
   if (agent_it == overlay_agents_.end())
     return;
@@ -507,7 +518,7 @@
   WebMouseEvent dummy_event(WebInputEvent::kMouseDown,
                             WebInputEvent::kNoModifiers,
                             WTF::CurrentTimeTicksInMilliseconds());
-  dummy_event.SetPositionInWidget(point_in_root_frame.x, point_in_root_frame.y);
+  dummy_event.SetPositionInWidget(point.x, point.y);
   IntPoint transformed_point = FlooredIntPoint(
       TransformWebMouseEvent(web_local_frame_impl_->GetFrameView(), dummy_event)
           .PositionInRootFrame());
diff --git a/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
index f1355b85..1fc26d0 100644
--- a/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
@@ -364,6 +364,10 @@
   view->InvalidateRect(damaged_rect);
 }
 
+WebHitTestResult WebFrameWidgetImpl::HitTestResultAt(const WebPoint& point) {
+  return CoreHitTestResultAt(point);
+}
+
 const WebInputEvent* WebFrameWidgetImpl::current_input_event_ = nullptr;
 
 WebInputEventResult WebFrameWidgetImpl::HandleInputEvent(
diff --git a/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h b/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h
index 6bb02e40..ced53f7 100644
--- a/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h
+++ b/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h
@@ -84,6 +84,7 @@
   void CompositeAndReadbackAsync(
       WebCompositeAndReadbackAsyncCallback*) override;
   void ThemeChanged() override;
+  WebHitTestResult HitTestResultAt(const WebPoint&) override;
   WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&) override;
   void SetCursorVisibilityState(bool is_visible) override;
 
diff --git a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
index f82821b..a2968e87 100644
--- a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
@@ -1126,16 +1126,6 @@
   }
 }
 
-void WebLocalFrameImpl::EnableSpellChecking(bool enable) {
-  if (enable == IsSpellCheckingEnabled())
-    return;
-  GetFrame()->GetSpellChecker().ToggleSpellCheckingEnabled();
-}
-
-bool WebLocalFrameImpl::IsSpellCheckingEnabled() const {
-  return GetFrame()->GetSpellChecker().IsSpellCheckingEnabled();
-}
-
 void WebLocalFrameImpl::ReplaceMisspelledRange(const WebString& text) {
   // If this caret selection has two or more markers, this function replace the
   // range covered by the first marker with the specified word as Microsoft Word
diff --git a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
index 604aa48..5e0dd570 100644
--- a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
@@ -177,8 +177,6 @@
   void SetTextDirection(WebTextDirection) override;
   void SetTextCheckClient(WebTextCheckClient*) override;
   void SetSpellCheckPanelHostClient(WebSpellCheckPanelHostClient*) override;
-  void EnableSpellChecking(bool) override;
-  bool IsSpellCheckingEnabled() const override;
   void ReplaceMisspelledRange(const WebString&) override;
   void RemoveSpellingMarkers() override;
   void RemoveSpellingMarkersUnderWords(
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
index 1cd03ed..6e4bedd 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
@@ -31,6 +31,7 @@
 #include "core/html_names.h"
 #include "core/inspector/ConsoleMessage.h"
 #include "core/layout/LayoutIFrame.h"
+#include "core/policy/IFramePolicy.h"
 #include "platform/runtime_enabled_features.h"
 
 namespace blink {
@@ -47,6 +48,7 @@
 
 void HTMLIFrameElement::Trace(blink::Visitor* visitor) {
   visitor->Trace(sandbox_);
+  visitor->Trace(policy_);
   HTMLFrameElementBase::Trace(visitor);
   Supplementable<HTMLIFrameElement>::Trace(visitor);
 }
@@ -69,6 +71,14 @@
   return sandbox_.Get();
 }
 
+Policy* HTMLIFrameElement::policy() {
+  if (!policy_) {
+    policy_ = new IFramePolicy(&GetDocument(), ContainerPolicy(),
+                               GetOriginForFeaturePolicy());
+  }
+  return policy_.Get();
+}
+
 bool HTMLIFrameElement::IsPresentationAttribute(
     const QualifiedName& name) const {
   if (name == widthAttr || name == heightAttr || name == alignAttr ||
@@ -256,6 +266,10 @@
     }
   }
 
+  // Update Policy associated with this iframe, if exists.
+  if (policy_)
+    policy_->UpdateContainerPolicy(container_policy, src_origin);
+
   return container_policy;
 }
 
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.h b/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
index 1c63cf8..9fd227df 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
@@ -31,6 +31,7 @@
 #include "third_party/WebKit/common/feature_policy/feature_policy.h"
 
 namespace blink {
+class Policy;
 
 class CORE_EXPORT HTMLIFrameElement final
     : public HTMLFrameElementBase,
@@ -43,6 +44,8 @@
   virtual void Trace(blink::Visitor*);
   ~HTMLIFrameElement() override;
   DOMTokenList* sandbox() const;
+  // Support JS introspection of frame policy (e.g. feature policy)
+  Policy* policy();
 
   ParsedFeaturePolicy ConstructContainerPolicy(
       Vector<String>* /* messages */,
@@ -82,6 +85,7 @@
   bool allow_payment_request_;
   bool collapsed_by_client_;
   Member<HTMLIFrameElementSandbox> sandbox_;
+  Member<Policy> policy_;
 
   ReferrerPolicy referrer_policy_;
 };
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl b/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl
index 7badc2f..1e61bae 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl
@@ -37,9 +37,14 @@
     // https://w3c.github.io/webappsec-csp/embedded/#dom-htmliframeelement-csp
     [RuntimeEnabled=EmbedderCSPEnforcement, CEReactions, Reflect] attribute DOMString csp;
 
-    // Feature Policy allow attribute
+    // Feature Policy
     // https://wicg.github.io/feature-policy/
     [RuntimeEnabled=FeaturePolicy, CEReactions, Reflect] attribute DOMString allow;
+    // TODO(iclelland): add spec for JS exposure in the spec for Feature Policy.
+    // Please refer to this doc for more details for now:
+    // https://docs.google.com/a/chromium.org/document/d/1wvk3cXkblNnbkMcsKayseK-k0SMGiP9b9fQFgfpqQpc/edit?usp=sharing
+    [RuntimeEnabled=FeaturePolicyJavaScriptInterface] readonly attribute Policy policy;
+
     // obsolete members
     // https://html.spec.whatwg.org/#HTMLIFrameElement-partial
     [CEReactions, Reflect] attribute DOMString align;
diff --git a/third_party/WebKit/Source/core/html/forms/ColorChooserClient.h b/third_party/WebKit/Source/core/html/forms/ColorChooserClient.h
index 30d1865..23d4ef02 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorChooserClient.h
+++ b/third_party/WebKit/Source/core/html/forms/ColorChooserClient.h
@@ -32,10 +32,11 @@
 #define ColorChooserClient_h
 
 #include "core/CoreExport.h"
-#include "platform/ColorSuggestion.h"
 #include "platform/geometry/IntRect.h"
+#include "platform/graphics/Color.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/Vector.h"
+#include "third_party/WebKit/common/color_chooser/color_chooser.mojom-blink.h"
 
 namespace blink {
 
@@ -52,7 +53,7 @@
   virtual IntRect ElementRectRelativeToViewport() const = 0;
   virtual Color CurrentColor() = 0;
   virtual bool ShouldShowSuggestions() const = 0;
-  virtual Vector<ColorSuggestion> Suggestions() const = 0;
+  virtual Vector<mojom::blink::ColorSuggestionPtr> Suggestions() const = 0;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.cpp b/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.cpp
index 48118863..831468c 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.cpp
@@ -32,7 +32,6 @@
 #include "core/page/PagePopup.h"
 #include "platform/geometry/IntRect.h"
 #include "public/platform/Platform.h"
-#include "public/web/WebColorChooser.h"
 
 namespace blink {
 
@@ -46,7 +45,7 @@
 ColorChooserPopupUIController::ColorChooserPopupUIController(
     LocalFrame* frame,
     ChromeClient* chrome_client,
-    ColorChooserClient* client)
+    blink::ColorChooserClient* client)
     : ColorChooserUIController(frame, client),
       chrome_client_(chrome_client),
       popup_(nullptr),
@@ -73,9 +72,7 @@
 }
 
 void ColorChooserPopupUIController::EndChooser() {
-  if (chooser_)
-    chooser_->EndChooser();
-
+  ColorChooserUIController::EndChooser();
   ClosePopup();
 }
 
@@ -84,10 +81,9 @@
 }
 
 void ColorChooserPopupUIController::WriteDocument(SharedBuffer* data) {
-  Vector<ColorSuggestion> suggestions = client_->Suggestions();
   Vector<String> suggestion_values;
-  for (unsigned i = 0; i < suggestions.size(); i++)
-    suggestion_values.push_back(suggestions[i].color.Serialized());
+  for (auto& suggestion : client_->Suggestions())
+    suggestion_values.push_back(suggestion->label);
   IntRect anchor_rect_in_screen = chrome_client_->ViewportToScreen(
       client_->ElementRectRelativeToViewport(), frame_->View());
 
@@ -141,7 +137,7 @@
   popup_ = nullptr;
 
   if (!chooser_)
-    DidEndChooser();
+    EndChooser();
 }
 
 Element& ColorChooserPopupUIController::OwnerElement() {
diff --git a/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.h b/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.h
index dfa6cac2..1f539e3b 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.h
+++ b/third_party/WebKit/Source/core/html/forms/ColorChooserPopupUIController.h
@@ -42,9 +42,10 @@
   USING_PRE_FINALIZER(ColorChooserPopupUIController, Dispose);
 
  public:
-  static ColorChooserPopupUIController* Create(LocalFrame* frame,
-                                               ChromeClient* chrome_client,
-                                               ColorChooserClient* client) {
+  static ColorChooserPopupUIController* Create(
+      LocalFrame* frame,
+      ChromeClient* chrome_client,
+      blink::ColorChooserClient* client) {
     return new ColorChooserPopupUIController(frame, chrome_client, client);
   }
 
@@ -71,7 +72,7 @@
  private:
   ColorChooserPopupUIController(LocalFrame*,
                                 ChromeClient*,
-                                ColorChooserClient*);
+                                blink::ColorChooserClient*);
 
   void OpenPopup();
   void Dispose();
diff --git a/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.cpp b/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.cpp
index aa40e48..f16f7a3 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.cpp
@@ -30,21 +30,17 @@
 #include "platform/graphics/Color.h"
 #include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebColor.h"
-#include "public/web/WebColorChooser.h"
-#include "public/web/WebColorSuggestion.h"
 #include "public/web/WebFrameClient.h"
+#include "services/service_manager/public/cpp/interface_provider.h"
 
 namespace blink {
 
-ColorChooserUIController::ColorChooserUIController(LocalFrame* frame,
-                                                   ColorChooserClient* client)
-    : client_(client), frame_(frame) {}
+ColorChooserUIController::ColorChooserUIController(
+    LocalFrame* frame,
+    blink::ColorChooserClient* client)
+    : client_(client), frame_(frame), binding_(this) {}
 
-ColorChooserUIController::~ColorChooserUIController() {
-  // The client cannot be accessed when finalizing.
-  client_ = nullptr;
-  EndChooser();
-}
+ColorChooserUIController::~ColorChooserUIController() {}
 
 void ColorChooserUIController::Trace(blink::Visitor* visitor) {
   visitor->Trace(frame_);
@@ -52,44 +48,43 @@
   ColorChooser::Trace(visitor);
 }
 
+void ColorChooserUIController::Dispose() {
+  binding_.Close();
+}
+
 void ColorChooserUIController::OpenUI() {
   OpenColorChooser();
 }
 
 void ColorChooserUIController::SetSelectedColor(const Color& color) {
+  // Color can be set via JS before mojo OpenColorChooser completes.
   if (chooser_)
-    chooser_->SetSelectedColor(static_cast<WebColor>(color.Rgb()));
+    chooser_->SetSelectedColor(color.Rgb());
 }
 
 void ColorChooserUIController::EndChooser() {
-  if (chooser_)
-    chooser_->EndChooser();
+  chooser_.reset();
+  client_->DidEndChooser();
 }
 
 AXObject* ColorChooserUIController::RootAXObject() {
   return nullptr;
 }
 
-void ColorChooserUIController::DidChooseColor(const WebColor& color) {
-  DCHECK(client_);
-  client_->DidChooseColor(Color(static_cast<RGBA32>(color)));
-}
-
-void ColorChooserUIController::DidEndChooser() {
-  chooser_ = nullptr;
-  if (client_)
-    client_->DidEndChooser();
+void ColorChooserUIController::DidChooseColor(uint32_t color) {
+  client_->DidChooseColor(color);
 }
 
 void ColorChooserUIController::OpenColorChooser() {
   DCHECK(!chooser_);
-  WebLocalFrameImpl* frame = WebLocalFrameImpl::FromFrame(frame_);
-  WebFrameClient* web_frame_client = frame->Client();
-  if (!web_frame_client)
-    return;
-  chooser_ = WTF::WrapUnique(web_frame_client->CreateColorChooser(
-      this, static_cast<WebColor>(client_->CurrentColor().Rgb()),
-      client_->Suggestions()));
+  frame_->GetInterfaceProvider().GetInterface(&color_chooser_factory_);
+  mojom::blink::ColorChooserClientPtr mojo_client;
+  binding_.Bind(mojo::MakeRequest(&mojo_client));
+  binding_.set_connection_error_handler(WTF::Bind(
+      &ColorChooserUIController::EndChooser, WrapWeakPersistent(this)));
+  color_chooser_factory_->OpenColorChooser(
+      mojo::MakeRequest(&chooser_), std::move(mojo_client),
+      client_->CurrentColor().Rgb(), client_->Suggestions());
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.h b/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.h
index 6a80e0d..6d97b48d 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.h
+++ b/third_party/WebKit/Source/core/html/forms/ColorChooserUIController.h
@@ -29,31 +29,34 @@
 #include <memory>
 #include "core/CoreExport.h"
 #include "core/html/forms/ColorChooser.h"
+#include "mojo/public/cpp/bindings/binding.h"
 #include "platform/heap/Handle.h"
 #include "platform/text/PlatformLocale.h"
-#include "public/web/WebColorChooserClient.h"
+#include "third_party/WebKit/common/color_chooser/color_chooser.mojom-blink.h"
 
 namespace blink {
 
 class ColorChooserClient;
 class LocalFrame;
-class WebColorChooser;
 
 class CORE_EXPORT ColorChooserUIController
     : public GarbageCollectedFinalized<ColorChooserUIController>,
-      public WebColorChooserClient,
+      public mojom::blink::ColorChooserClient,
       public ColorChooser {
   USING_GARBAGE_COLLECTED_MIXIN(ColorChooserUIController);
+  USING_PRE_FINALIZER(ColorChooserUIController, Dispose);
 
  public:
   static ColorChooserUIController* Create(LocalFrame* frame,
-                                          ColorChooserClient* client) {
+                                          blink::ColorChooserClient* client) {
     return new ColorChooserUIController(frame, client);
   }
 
   ~ColorChooserUIController() override;
   void Trace(blink::Visitor*) override;
 
+  void Dispose();
+
   virtual void OpenUI();
 
   // ColorChooser functions:
@@ -61,18 +64,21 @@
   void EndChooser() override;
   AXObject* RootAXObject() override;
 
-  // WebColorChooserClient functions:
-  void DidChooseColor(const WebColor&) final;
-  void DidEndChooser() final;
+  // mojom::blink::ColorChooserClient functions:
+  void DidChooseColor(uint32_t color) final;
 
  protected:
-  ColorChooserUIController(LocalFrame*, ColorChooserClient*);
+  ColorChooserUIController(LocalFrame*, blink::ColorChooserClient*);
 
   void OpenColorChooser();
-  std::unique_ptr<WebColorChooser> chooser_;
-  Member<ColorChooserClient> client_;
+  mojom::blink::ColorChooserPtr chooser_;
+  Member<blink::ColorChooserClient> client_;
 
   Member<LocalFrame> frame_;
+
+ private:
+  mojom::blink::ColorChooserFactoryPtr color_chooser_factory_;
+  mojo::Binding<mojom::blink::ColorChooserClient> binding_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp b/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
index f39d962..5e6f4b8 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ColorInputType.cpp
@@ -238,8 +238,8 @@
   return GetElement().FastHasAttribute(listAttr);
 }
 
-Vector<ColorSuggestion> ColorInputType::Suggestions() const {
-  Vector<ColorSuggestion> suggestions;
+Vector<mojom::blink::ColorSuggestionPtr> ColorInputType::Suggestions() const {
+  Vector<mojom::blink::ColorSuggestionPtr> suggestions;
   HTMLDataListElement* data_list = GetElement().DataList();
   if (data_list) {
     HTMLDataListOptionsCollection* options = data_list->options();
@@ -251,9 +251,8 @@
       Color color;
       if (!color.SetFromString(option->value()))
         continue;
-      ColorSuggestion suggestion(
-          color, option->label().Left(kMaxSuggestionLabelLength));
-      suggestions.push_back(suggestion);
+      suggestions.push_back(mojom::blink::ColorSuggestion::New(
+          color.Rgb(), option->label().Left(kMaxSuggestionLabelLength)));
       if (suggestions.size() >= kMaxSuggestions)
         break;
     }
diff --git a/third_party/WebKit/Source/core/html/forms/ColorInputType.h b/third_party/WebKit/Source/core/html/forms/ColorInputType.h
index a293827..05ed01a 100644
--- a/third_party/WebKit/Source/core/html/forms/ColorInputType.h
+++ b/third_party/WebKit/Source/core/html/forms/ColorInputType.h
@@ -57,7 +57,7 @@
   IntRect ElementRectRelativeToViewport() const override;
   Color CurrentColor() override;
   bool ShouldShowSuggestions() const override;
-  Vector<ColorSuggestion> Suggestions() const override;
+  Vector<mojom::blink::ColorSuggestionPtr> Suggestions() const override;
   ColorChooserClient* GetColorChooserClient() override;
 
  private:
diff --git a/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp
index 23ce48b..e7103ec7 100644
--- a/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp
@@ -780,16 +780,16 @@
   } else if (name == minlengthAttr) {
     SetNeedsValidityCheck();
   } else if (name == sizeAttr) {
-    int old_size = size_;
-    size_ = kDefaultSize;
-    int value_as_integer;
-    if (!value.IsEmpty() && ParseHTMLInteger(value, value_as_integer) &&
-        value_as_integer > 0)
-      size_ = value_as_integer;
-    if (size_ != old_size && GetLayoutObject()) {
-      GetLayoutObject()
-          ->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
-              LayoutInvalidationReason::kAttributeChanged);
+    unsigned size = 0;
+    if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, size) ||
+        size == 0 || size > 0x7fffffffu)
+      size = kDefaultSize;
+    if (size_ != size) {
+      size_ = size;
+      if (GetLayoutObject())
+        GetLayoutObject()
+            ->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
+                LayoutInvalidationReason::kAttributeChanged);
     }
   } else if (name == altAttr) {
     input_type_view_->AltAttributeChanged();
@@ -1011,7 +1011,7 @@
     o->InvalidateIfControlStateChanged(kCheckedControlState);
 }
 
-int HTMLInputElement::size() const {
+unsigned HTMLInputElement::size() const {
   return size_;
 }
 
@@ -1439,16 +1439,13 @@
   return FastHasAttribute(multipleAttr);
 }
 
-void HTMLInputElement::setSize(unsigned size) {
-  SetUnsignedIntegralAttribute(sizeAttr, size);
-}
-
 void HTMLInputElement::setSize(unsigned size, ExceptionState& exception_state) {
   if (size == 0) {
     exception_state.ThrowDOMException(
         kIndexSizeError, "The value provided is 0, which is an invalid size.");
   } else {
-    setSize(size);
+    SetUnsignedIntegralAttribute(sizeAttr, size ? size : kDefaultSize,
+                                 kDefaultSize);
   }
 }
 
diff --git a/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h b/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h
index 67c740c6..37504496c 100644
--- a/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h
+++ b/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h
@@ -122,7 +122,7 @@
   bool ShouldAppearChecked() const;
   bool ShouldAppearIndeterminate() const override;
 
-  int size() const;
+  unsigned size() const;
   bool SizeShouldIncludeDecoration(int& preferred_size) const;
 
   void setType(const AtomicString&);
@@ -202,7 +202,6 @@
   Vector<String> AcceptFileExtensions() const;
   const AtomicString& Alt() const;
 
-  void setSize(unsigned);
   void setSize(unsigned, ExceptionState&);
 
   KURL Src() const;
@@ -408,7 +407,7 @@
   AtomicString name_;
   // The value string in |value| value mode.
   String non_attribute_value_;
-  int size_;
+  unsigned size_;
   // https://html.spec.whatwg.org/multipage/forms.html#concept-input-value-dirty-flag
   unsigned has_dirty_value_ : 1;
   // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-checked
diff --git a/third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp b/third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp
index ee1159c..1256e6e2 100644
--- a/third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp
+++ b/third_party/WebKit/Source/core/html/forms/InternalPopupMenu.cpp
@@ -29,7 +29,6 @@
 #include "public/platform/Platform.h"
 #include "public/platform/TaskType.h"
 #include "public/platform/WebMouseEvent.h"
-#include "public/web/WebColorChooser.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/core/html/forms/LabelsNodeList.cpp b/third_party/WebKit/Source/core/html/forms/LabelsNodeList.cpp
index 97ceeb7..9f47a34 100644
--- a/third_party/WebKit/Source/core/html/forms/LabelsNodeList.cpp
+++ b/third_party/WebKit/Source/core/html/forms/LabelsNodeList.cpp
@@ -36,7 +36,7 @@
 LabelsNodeList::LabelsNodeList(ContainerNode& owner_node)
     : LiveNodeList(owner_node,
                    kLabelsNodeListType,
-                   kInvalidateOnForAttrChange,
+                   kInvalidateForFormControls,
                    NodeListRootType::kTreeScope) {}
 
 LabelsNodeList::~LabelsNodeList() {}
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 1817779..278a65a3 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -654,7 +654,7 @@
   if (!mouse_event.FromTouch())
     frame_->Selection().SetCaretBlinkingSuspended(true);
 
-  WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents(
+  WebInputEventResult event_result = DispatchMousePointerEvent(
       EventTypeNames::mousedown, mev.InnerNode(), mev.CanvasRegionId(),
       mev.Event(), Vector<WebMouseEvent>());
 
@@ -819,9 +819,9 @@
   }
 
   if (frame_set_being_resized_) {
-    return UpdatePointerTargetAndDispatchEvents(
-        EventTypeNames::mousemove, frame_set_being_resized_.Get(), String(),
-        mouse_event, coalesced_events);
+    return DispatchMousePointerEvent(EventTypeNames::mousemove,
+                                     frame_set_being_resized_.Get(), String(),
+                                     mouse_event, coalesced_events);
   }
 
   // Send events right to a scrollbar if the mouse is pressed.
@@ -899,7 +899,7 @@
   if (new_subframe) {
     // Update over/out state before passing the event to the subframe.
     pointer_event_manager_->SendMouseAndPointerBoundaryEvents(
-        UpdateMouseEventTargetNode(mev.InnerNode()), mev.CanvasRegionId(),
+        EffectiveMouseEventTargetNode(mev.InnerNode()), mev.CanvasRegionId(),
         mev.Event());
 
     // Event dispatch in sendMouseAndPointerBoundaryEvents may have caused the
@@ -929,7 +929,7 @@
   if (event_result != WebInputEventResult::kNotHandled)
     return event_result;
 
-  event_result = UpdatePointerTargetAndDispatchEvents(
+  event_result = DispatchMousePointerEvent(
       EventTypeNames::mousemove, mev.InnerNode(), mev.CanvasRegionId(),
       mev.Event(), coalesced_events);
   if (event_result != WebInputEventResult::kNotHandled)
@@ -960,20 +960,20 @@
     }
   }
 
-  mouse_event_manager_->SetMousePressed(false);
+  mouse_event_manager_->ReleaseMousePress();
   mouse_event_manager_->SetLastKnownMousePosition(mouse_event);
   mouse_event_manager_->HandleSvgPanIfNeeded(true);
 
   if (frame_set_being_resized_) {
     return mouse_event_manager_->SetMousePositionAndDispatchMouseEvent(
-        UpdateMouseEventTargetNode(frame_set_being_resized_.Get()), String(),
+        EffectiveMouseEventTargetNode(frame_set_being_resized_.Get()), String(),
         EventTypeNames::mouseup, mouse_event);
   }
 
   if (last_scrollbar_under_mouse_) {
     mouse_event_manager_->InvalidateClick();
     last_scrollbar_under_mouse_->MouseUp(mouse_event);
-    return UpdatePointerTargetAndDispatchEvents(
+    return DispatchMousePointerEvent(
         EventTypeNames::mouseup, mouse_event_manager_->GetNodeUnderMouse(),
         String(), mouse_event, Vector<WebMouseEvent>());
   }
@@ -1012,7 +1012,7 @@
     gesture_indicator = Frame::NotifyUserActivation(frame_);
   }
 
-  WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents(
+  WebInputEventResult event_result = DispatchMousePointerEvent(
       EventTypeNames::mouseup, mev.InnerNode(), mev.CanvasRegionId(),
       mev.Event(), Vector<WebMouseEvent>());
 
@@ -1182,7 +1182,7 @@
   event_handler_will_reset_capturing_mouse_events_node_ = false;
 }
 
-Node* EventHandler::UpdateMouseEventTargetNode(Node* target_node) {
+Node* EventHandler::EffectiveMouseEventTargetNode(Node* target_node) {
   Node* new_node_under_mouse = target_node;
 
   if (capturing_mouse_events_node_) {
@@ -1267,7 +1267,7 @@
     mouse_wheel_event_manager_->ElementRemoved(target->ToNode());
 }
 
-WebInputEventResult EventHandler::UpdatePointerTargetAndDispatchEvents(
+WebInputEventResult EventHandler::DispatchMousePointerEvent(
     const AtomicString& mouse_event_type,
     Node* target_node,
     const String& canvas_region_id,
@@ -1278,7 +1278,7 @@
          mouse_event_type == EventTypeNames::mouseup);
 
   const auto& event_result = pointer_event_manager_->SendMousePointerEvent(
-      UpdateMouseEventTargetNode(target_node), canvas_region_id,
+      EffectiveMouseEventTargetNode(target_node), canvas_region_id,
       mouse_event_type, mouse_event, coalesced_events);
   return event_result;
 }
@@ -1599,7 +1599,7 @@
   while (index_exited_frame_chain) {
     LocalFrame* leave_frame = exited_frame_chain[--index_exited_frame_chain];
     leave_frame->GetEventHandler().mouse_event_manager_->SetNodeUnderMouse(
-        UpdateMouseEventTargetNode(nullptr), String(), fake_mouse_move);
+        EffectiveMouseEventTargetNode(nullptr), String(), fake_mouse_move);
   }
 
   // update the mouseover/mouseenter event
@@ -1610,7 +1610,7 @@
       ToLocalFrame(parent_frame)
           ->GetEventHandler()
           .mouse_event_manager_->SetNodeUnderMouse(
-              UpdateMouseEventTargetNode(ToHTMLFrameOwnerElement(
+              EffectiveMouseEventTargetNode(ToHTMLFrameOwnerElement(
                   entered_frame_chain[index_entered_frame_chain]->Owner())),
               String(), fake_mouse_move);
     }
@@ -1762,7 +1762,7 @@
 
   // Clear mouse press state to avoid initiating a drag while context menu is
   // up.
-  mouse_event_manager_->SetMousePressed(false);
+  mouse_event_manager_->ReleaseMousePress();
   LayoutPoint position_in_contents =
       v->RootFrameToContents(FlooredIntPoint(event.PositionInRootFrame()));
   HitTestRequest request(HitTestRequest::kActive);
@@ -1779,7 +1779,7 @@
   Node* target_node =
       override_target_node ? override_target_node : mev.InnerNode();
   return mouse_event_manager_->DispatchMouseEvent(
-      UpdateMouseEventTargetNode(target_node), EventTypeNames::contextmenu,
+      EffectiveMouseEventTargetNode(target_node), EventTypeNames::contextmenu,
       event, mev.GetHitTestResult().CanvasRegionId(), nullptr);
 }
 
diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h
index ad9f3b46..121de3c 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.h
+++ b/third_party/WebKit/Source/core/input/EventHandler.h
@@ -328,16 +328,11 @@
 
   ScrollableArea* AssociatedScrollableArea(const PaintLayer*) const;
 
-  Node* UpdateMouseEventTargetNode(Node*);
+  Node* EffectiveMouseEventTargetNode(Node*);
 
   // Dispatches ME after corresponding PE provided the PE has not been canceled.
-  // The eventType arg must be a mouse event that can be gated though a
-  // preventDefaulted pointerdown (i.e., one of
-  // {mousedown, mousemove, mouseup}).
-  // TODO(mustaq): Can we avoid the clickCount param, instead use
-  // WebmMouseEvent's count?
-  //     Same applied to dispatchMouseEvent() above.
-  WebInputEventResult UpdatePointerTargetAndDispatchEvents(
+  // The |mouse_event_type| arg must be one of {mousedown, mousemove, mouseup}.
+  WebInputEventResult DispatchMousePointerEvent(
       const AtomicString& mouse_event_type,
       Node* target,
       const String& canvas_region_id,
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index e839a75a..317750e7 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -1113,8 +1113,8 @@
   return mouse_pressed_;
 }
 
-void MouseEventManager::SetMousePressed(bool mouse_pressed) {
-  mouse_pressed_ = mouse_pressed;
+void MouseEventManager::ReleaseMousePress() {
+  mouse_pressed_ = false;
 }
 
 bool MouseEventManager::CapturesDragging() const {
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.h b/third_party/WebKit/Source/core/input/MouseEventManager.h
index d8b735e7..403305e 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.h
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.h
@@ -134,7 +134,7 @@
   FloatPoint LastKnownMousePositionGlobal();
 
   bool MousePressed();
-  void SetMousePressed(bool);
+  void ReleaseMousePress();
 
   bool CapturesDragging() const;
   void SetCapturesDragging(bool);
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index 9a1c026..85436b3 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -471,8 +471,12 @@
       mouse_event_type, mouse_event, coalesced_events,
       frame_->GetDocument()->domWindow());
 
+  bool fake_mouse_event = (mouse_event.GetModifiers() &
+                           WebInputEvent::Modifiers::kRelativeMotionEvent);
+  DCHECK(!fake_mouse_event || mouse_event_type == EventTypeNames::mousemove);
+
   // This is for when the mouse is released outside of the page.
-  if (pointer_event->type() == EventTypeNames::pointermove &&
+  if (!fake_mouse_event && mouse_event_type == EventTypeNames::mousemove &&
       !pointer_event->buttons()) {
     ReleasePointerCapture(pointer_event->pointerId());
     // Send got/lostpointercapture rightaway if necessary.
@@ -487,17 +491,13 @@
   EventTarget* pointer_event_target = ProcessCaptureAndPositionOfPointerEvent(
       pointer_event, target, canvas_region_id, &mouse_event);
 
+  // Don't send fake mouse event to the DOM.
+  if (fake_mouse_event)
+    return WebInputEventResult::kHandledSuppressed;
+
   EventTarget* effective_target = GetEffectiveTargetForPointerEvent(
       pointer_event_target, pointer_event->pointerId());
 
-  // Do not send the fake mouse move event to the DOM, because the mouse does
-  // not move.
-  if ((mouse_event_type == EventTypeNames::mousemove) &&
-      mouse_event.GetModifiers() &
-          WebInputEvent::Modifiers::kRelativeMotionEvent) {
-    return WebInputEventResult::kHandledSuppressed;
-  }
-
   WebInputEventResult result =
       DispatchPointerEvent(effective_target, pointer_event);
 
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
index 110c38b7..744b473 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
@@ -232,9 +232,6 @@
       .Serialized();
 }
 
-bool DevToolsHost::isUnderTest() {
-  return client_ && client_->IsUnderTest();
-}
 
 bool DevToolsHost::isHostedMode() {
   return false;
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.h b/third_party/WebKit/Source/core/inspector/DevToolsHost.h
index 02e07b6..34089dc 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.h
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.h
@@ -71,7 +71,6 @@
   String getInactiveSelectionBackgroundColor();
   String getInactiveSelectionForegroundColor();
 
-  bool isUnderTest();
   bool isHostedMode();
 
   LocalFrame* FrontendFrame() { return frontend_frame_; }
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.idl b/third_party/WebKit/Source/core/inspector/DevToolsHost.idl
index 2bbddc47..cd4481da 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.idl
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.idl
@@ -46,6 +46,5 @@
     DOMString getInactiveSelectionBackgroundColor();
     DOMString getInactiveSelectionForegroundColor();
 
-    boolean isUnderTest();
     boolean isHostedMode();
 };
diff --git a/third_party/WebKit/Source/core/inspector/InspectorFrontendClient.h b/third_party/WebKit/Source/core/inspector/InspectorFrontendClient.h
index 5d3e63e2..5bcdfaf 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorFrontendClient.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorFrontendClient.h
@@ -45,8 +45,6 @@
 
   virtual void SendMessageToEmbedder(const String&) = 0;
 
-  virtual bool IsUnderTest() = 0;
-
   virtual void ShowContextMenu(LocalFrame* target_frame,
                                float x,
                                float y,
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json
index f7f5323..f457cc45 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -10719,8 +10719,21 @@
                     "description": "Enables tracking security state changes."
                 },
                 {
+                    "name": "setIgnoreCertificateErrors",
+                    "description": "Enable/disable whether all certificate errors should be ignored.",
+                    "experimental": true,
+                    "parameters": [
+                        {
+                            "name": "ignore",
+                            "description": "If true, all certificate errors will be ignored.",
+                            "type": "boolean"
+                        }
+                    ]
+                },
+                {
                     "name": "handleCertificateError",
                     "description": "Handles a certificate error that fired a certificateError event.",
+                    "deprecated": true,
                     "parameters": [
                         {
                             "name": "eventId",
@@ -10737,6 +10750,7 @@
                 {
                     "name": "setOverrideCertificateErrors",
                     "description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to\nbe handled by the DevTools client and should be answered with handleCertificateError commands.",
+                    "deprecated": true,
                     "parameters": [
                         {
                             "name": "override",
@@ -10749,7 +10763,8 @@
             "events": [
                 {
                     "name": "certificateError",
-                    "description": "There is a certificate error. If overriding certificate errors is enabled, then it should be\nhandled with the handleCertificateError command. Note: this event does not fire if the\ncertificate error has been allowed internally.",
+                    "description": "There is a certificate error. If overriding certificate errors is enabled, then it should be\nhandled with the handleCertificateError command. Note: this event does not fire if the\ncertificate error has been allowed internally. Only one client per target should override\ncertificate errors at the same time.",
+                    "deprecated": true,
                     "parameters": [
                         {
                             "name": "eventId",
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.pdl b/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
index 349ee19..3068ab4 100644
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
@@ -4929,8 +4929,14 @@
   # Enables tracking security state changes.
   command enable
 
+  # Enable/disable whether all certificate errors should be ignored. 
+  experimental command setIgnoreCertificateErrors
+    parameters
+      # If true, all certificate errors will be ignored.
+      boolean ignore
+
   # Handles a certificate error that fired a certificateError event.
-  command handleCertificateError
+  deprecated command handleCertificateError
     parameters
       # The ID of the event.
       integer eventId
@@ -4939,15 +4945,16 @@
 
   # Enable/disable overriding certificate errors. If enabled, all certificate error events need to
   # be handled by the DevTools client and should be answered with handleCertificateError commands.
-  command setOverrideCertificateErrors
+  deprecated command setOverrideCertificateErrors
     parameters
       # If true, certificate errors will be overridden.
       boolean override
 
   # There is a certificate error. If overriding certificate errors is enabled, then it should be
   # handled with the handleCertificateError command. Note: this event does not fire if the
-  # certificate error has been allowed internally.
-  event certificateError
+  # certificate error has been allowed internally. Only one client per target should override
+  # certificate errors at the same time.
+  deprecated event certificateError
     parameters
       # The ID of the event.
       integer eventId
diff --git a/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.cpp b/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.cpp
index e71106a..0f49517 100644
--- a/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.cpp
+++ b/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.cpp
@@ -64,10 +64,10 @@
     callback_fired_while_suspended_ = true;
     return;
   }
-  HeapHashSet<Member<IntersectionObserver>> observers;
-  pending_intersection_observers_.swap(observers);
-  for (auto& observer : observers)
+  pending_intersection_observers_.swap(intersection_observers_being_invoked_);
+  for (auto& observer : intersection_observers_being_invoked_)
     observer->Deliver();
+  intersection_observers_being_invoked_.clear();
 }
 
 void IntersectionObserverController::ComputeTrackedIntersectionObservations() {
@@ -98,7 +98,16 @@
 void IntersectionObserverController::Trace(blink::Visitor* visitor) {
   visitor->Trace(tracked_intersection_observers_);
   visitor->Trace(pending_intersection_observers_);
+  visitor->Trace(intersection_observers_being_invoked_);
   PausableObject::Trace(visitor);
 }
 
+void IntersectionObserverController::TraceWrappers(
+    const ScriptWrappableVisitor* visitor) const {
+  for (const auto& observer : pending_intersection_observers_)
+    visitor->TraceWrappers(observer);
+  for (const auto& observer : intersection_observers_being_invoked_)
+    visitor->TraceWrappers(observer);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.h b/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.h
index 43924cad..b3236bd0 100644
--- a/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.h
+++ b/third_party/WebKit/Source/core/intersection_observer/IntersectionObserverController.h
@@ -7,6 +7,7 @@
 
 #include "core/dom/PausableObject.h"
 #include "core/intersection_observer/IntersectionObserver.h"
+#include "platform/bindings/TraceWrapperMember.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/HashSet.h"
 
@@ -19,7 +20,8 @@
 
 class IntersectionObserverController
     : public GarbageCollectedFinalized<IntersectionObserverController>,
-      public PausableObject {
+      public PausableObject,
+      public TraceWrapperBase {
   USING_GARBAGE_COLLECTED_MIXIN(IntersectionObserverController);
 
  public:
@@ -35,6 +37,7 @@
   void RemoveTrackedObserversForRoot(const Node&);
 
   void Trace(blink::Visitor*);
+  void TraceWrappers(const ScriptWrappableVisitor*) const override;
 
  private:
   explicit IntersectionObserverController(Document*);
@@ -45,7 +48,12 @@
   HeapHashSet<WeakMember<IntersectionObserver>> tracked_intersection_observers_;
   // IntersectionObservers for which this is the execution context of the
   // callback.
-  HeapHashSet<Member<IntersectionObserver>> pending_intersection_observers_;
+  HeapHashSet<TraceWrapperMember<IntersectionObserver>>
+      pending_intersection_observers_;
+  // TODO(https://crbug.com/796145): Remove this hack once on-stack objects
+  // get supported by either of wrapper-tracing or unified GC.
+  HeapHashSet<TraceWrapperMember<IntersectionObserver>>
+      intersection_observers_being_invoked_;
 
   bool callback_fired_while_suspended_;
 };
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 21f23f8..f608f0a8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5739,7 +5739,7 @@
   if (layer.YPosition().IsPercentOrCalc() && !layer.YPosition().IsZero())
     return true;
 
-  if (layer.BackgroundYOrigin() != kTopEdge)
+  if (layer.BackgroundYOrigin() != BackgroundEdgeOrigin::kTop)
     return true;
 
   EFillSizeType size_type = layer.SizeType();
@@ -5781,7 +5781,7 @@
   if (layer.XPosition().IsPercentOrCalc() && !layer.XPosition().IsZero())
     return true;
 
-  if (layer.BackgroundXOrigin() != kLeftEdge)
+  if (layer.BackgroundXOrigin() != BackgroundEdgeOrigin::kLeft)
     return true;
 
   EFillSizeType size_type = layer.SizeType();
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc
index 18d22098e..bec6e88 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc
@@ -141,7 +141,8 @@
       std::move(fragment), oof_positioned_descendants_, positioned_floats_,
       unpositioned_floats_, std::move(exclusion_space_), bfc_offset_,
       end_margin_strut_,
-      /* intrinsic_block_size */ LayoutUnit(), NGLayoutResult::kSuccess));
+      /* intrinsic_block_size */ LayoutUnit(), EBreakBetween::kAuto,
+      EBreakBetween::kAuto, NGLayoutResult::kSuccess));
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index e6dc9ac..62313666 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -369,6 +369,13 @@
       HandleFloat(previous_inflow_position, ToNGBlockNode(child),
                   ToNGBlockBreakToken(child_break_token));
     } else {
+      // We need to propagate the initial break-before value up our container
+      // chain, until we reach a container that's not a first child. If we get
+      // all the way to the root of the fragmentation context without finding
+      // any such container, we have no valid class A break point, and if a
+      // forced break was requested, none will be inserted.
+      container_builder_.SetInitialBreakBefore(child.Style().BreakBefore());
+
       bool success =
           child.CreatesNewFormattingContext()
               ? HandleNewFormattingContext(child, child_break_token,
@@ -663,8 +670,11 @@
       container_builder_.Size().inline_size, ConstraintSpace().Direction());
 
   if (ConstraintSpace().HasBlockFragmentation() &&
-      BreakBeforeChild(child, physical_fragment, logical_offset.block_offset))
+      BreakBeforeChild(child, *layout_result, logical_offset.block_offset))
     return true;
+  EBreakBetween break_after = JoinFragmentainerBreakValues(
+      layout_result->FinalBreakAfter(), child.Style().BreakAfter());
+  container_builder_.SetPreviousBreakAfter(break_after);
 
   intrinsic_block_size_ =
       std::max(intrinsic_block_size_,
@@ -990,8 +1000,11 @@
       CalculateLogicalOffset(fragment, child_data.margins, child_bfc_offset);
 
   if (ConstraintSpace().HasBlockFragmentation() &&
-      BreakBeforeChild(child, physical_fragment, logical_offset.block_offset))
+      BreakBeforeChild(child, *layout_result, logical_offset.block_offset))
     return true;
+  EBreakBetween break_after = JoinFragmentainerBreakValues(
+      layout_result->FinalBreakAfter(), child.Style().BreakAfter());
+  container_builder_.SetPreviousBreakAfter(break_after);
 
   // Only modify intrinsic_block_size_ if the fragment is non-empty block.
   //
@@ -1230,10 +1243,10 @@
 
 bool NGBlockLayoutAlgorithm::BreakBeforeChild(
     NGLayoutInputNode child,
-    const NGPhysicalFragment& physical_fragment,
+    const NGLayoutResult& layout_result,
     LayoutUnit block_offset) {
   DCHECK(ConstraintSpace().HasBlockFragmentation());
-  if (!ShouldBreakBeforeChild(child, physical_fragment, block_offset))
+  if (!ShouldBreakBeforeChild(child, layout_result, block_offset))
     return false;
 
   // The remaining part of the fragmentainer (the unusable space for child
@@ -1250,11 +1263,14 @@
 
 bool NGBlockLayoutAlgorithm::ShouldBreakBeforeChild(
     NGLayoutInputNode child,
-    const NGPhysicalFragment& physical_fragment,
+    const NGLayoutResult& layout_result,
     LayoutUnit block_offset) const {
   if (!container_builder_.BfcOffset().has_value())
     return false;
 
+  const NGPhysicalFragment& physical_fragment =
+      *layout_result.PhysicalFragment();
+
   // If we haven't used any space at all in the fragmentainer yet, we cannot
   // break, or there'd be no progress. We'd end up creating an infinite number
   // of fragmentainers without putting any content into them.
@@ -1274,6 +1290,17 @@
   if (space_left <= LayoutUnit())
     return true;
 
+  EBreakBetween break_before = JoinFragmentainerBreakValues(
+      child.Style().BreakBefore(), layout_result.InitialBreakBefore());
+  EBreakBetween break_between =
+      container_builder_.JoinedBreakBetweenValue(break_before);
+  if (IsForcedBreakValue(ConstraintSpace(), break_between)) {
+    // There should be a forced break before this child, and if we're not at the
+    // first in-flow child, just go ahead and break.
+    if (has_processed_first_child_)
+      return true;
+  }
+
   const auto* token = physical_fragment.BreakToken();
   if (!token || token->IsFinished())
     return false;
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index 5b39590..2f0ac61 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -156,13 +156,13 @@
   // Insert a fragmentainer break before the child if necessary.
   // Return true if a break was inserted, false otherwise.
   bool BreakBeforeChild(NGLayoutInputNode child,
-                        const NGPhysicalFragment&,
+                        const NGLayoutResult&,
                         LayoutUnit block_offset);
 
   // Given a child fragment and the corresponding node's style, return true if
   // we need to insert a fragmentainer break in front of it.
   bool ShouldBreakBeforeChild(NGLayoutInputNode child,
-                              const NGPhysicalFragment& physical_fragment,
+                              const NGLayoutResult&,
                               LayoutUnit block_offset) const;
 
   // Final adjustments before fragment creation. We need to prevent the
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc
index dbd4c5b..b4673bb 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc
@@ -1454,6 +1454,59 @@
   EXPECT_EQ(expectation, dump);
 }
 
+TEST_F(NGColumnLayoutAlgorithmTest, ForcedBreaks) {
+  // This tests that forced breaks are honored, but only at valid class A break
+  // points (i.e. *between* in-flow block siblings).
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        width: 320px;
+        height: 100px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div style="float:left; width:1px; height:1px;"></div>
+        <div style="break-before:column; break-after:column;">
+          <div style="float:left; width:1px; height:1px;"></div>
+          <div style="break-after:column; width:50px; height:10px;"></div>
+          <div style="break-before:column; width:60px; height:10px;"></div>
+          <div>
+            <div>
+              <div style="break-after:column; width:70px; height:10px;"></div>
+            </div>
+          </div>
+          <div style="width:80px; height:10px;"></div>
+        </div>
+      </div>
+    </div>
+  )HTML");
+
+  String dump = DumpFragmentTree(GetElementById("container"));
+  String expectation = R"DUMP(.:: LayoutNG Physical Fragment Tree ::.
+  offset:unplaced size:1000x100
+    offset:0,0 size:320x100
+      offset:0,0 size:100x100
+        offset:0,0 size:1x1
+        offset:0,0 size:100x100
+          offset:1,0 size:1x1
+          offset:0,0 size:50x10
+      offset:110,0 size:100x100
+        offset:0,0 size:100x100
+          offset:0,0 size:60x10
+          offset:0,10 size:100x10
+            offset:0,0 size:100x10
+              offset:0,0 size:70x10
+      offset:220,0 size:100x10
+        offset:0,0 size:100x10
+          offset:0,0 size:80x10
+)DUMP";
+  EXPECT_EQ(expectation, dump);
+}
+
 TEST_F(NGColumnLayoutAlgorithmTest, MinMax) {
   // The multicol container here contains two inline-blocks with a line break
   // opportunity between them. We'll test what min/max values we get for the
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
index d3f6d2fc5..b75c4ab 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -14,6 +14,7 @@
 #include "core/layout/ng/ng_break_token.h"
 #include "core/layout/ng/ng_exclusion_space.h"
 #include "core/layout/ng/ng_fragment.h"
+#include "core/layout/ng/ng_fragmentation_utils.h"
 #include "core/layout/ng/ng_layout_result.h"
 #include "core/layout/ng/ng_physical_box_fragment.h"
 #include "core/layout/ng/ng_positioned_float.h"
@@ -201,6 +202,11 @@
   baselines_.push_back(NGBaseline{request, offset});
 }
 
+EBreakBetween NGFragmentBuilder::JoinedBreakBetweenValue(
+    EBreakBetween break_before) const {
+  return JoinFragmentainerBreakValues(previous_break_after_, break_before);
+}
+
 scoped_refptr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
   DCHECK_EQ(offsets_.size(), children_.size());
 
@@ -240,17 +246,18 @@
   return base::AdoptRef(new NGLayoutResult(
       std::move(fragment), oof_positioned_descendants_, positioned_floats,
       unpositioned_floats_, std::move(exclusion_space_), bfc_offset_,
-      end_margin_strut_, intrinsic_block_size_, NGLayoutResult::kSuccess));
+      end_margin_strut_, intrinsic_block_size_, initial_break_before_,
+      previous_break_after_, NGLayoutResult::kSuccess));
 }
 
 scoped_refptr<NGLayoutResult> NGFragmentBuilder::Abort(
     NGLayoutResult::NGLayoutResultStatus status) {
   Vector<NGOutOfFlowPositionedDescendant> oof_positioned_descendants;
   Vector<NGPositionedFloat> positioned_floats;
-  return base::AdoptRef(
-      new NGLayoutResult(nullptr, oof_positioned_descendants, positioned_floats,
-                         unpositioned_floats_, nullptr, bfc_offset_,
-                         end_margin_strut_, LayoutUnit(), status));
+  return base::AdoptRef(new NGLayoutResult(
+      nullptr, oof_positioned_descendants, positioned_floats,
+      unpositioned_floats_, nullptr, bfc_offset_, end_margin_strut_,
+      LayoutUnit(), EBreakBetween::kAuto, EBreakBetween::kAuto, status));
 }
 
 // Finds FragmentPairs that define inline containing blocks.
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
index d386a684..d34403f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
@@ -13,6 +13,7 @@
 #include "core/layout/ng/ng_container_fragment_builder.h"
 #include "core/layout/ng/ng_layout_result.h"
 #include "core/layout/ng/ng_out_of_flow_positioned_descendant.h"
+#include "core/style/ComputedStyleConstants.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/Allocator.h"
 namespace blink {
@@ -75,6 +76,19 @@
     return *this;
   }
 
+  void SetInitialBreakBefore(EBreakBetween break_before) {
+    initial_break_before_ = break_before;
+  }
+
+  void SetPreviousBreakAfter(EBreakBetween break_after) {
+    previous_break_after_ = break_after;
+  }
+
+  // Join/"collapse" the previous (stored) break-after value with the next
+  // break-before value, to determine how to deal with breaking between two
+  // in-flow siblings.
+  EBreakBetween JoinedBreakBetweenValue(EBreakBetween break_before) const;
+
   // Offsets are not supposed to be set during fragment construction, so we
   // do not provide a setter here.
 
@@ -144,6 +158,13 @@
   bool did_break_;
   LayoutUnit used_block_size_;
 
+  // The break-before value on the initial child we cannot honor. There's no
+  // valid class A break point before a first child, only *between* siblings.
+  EBreakBetween initial_break_before_ = EBreakBetween::kAuto;
+
+  // The break-after value of the previous in-flow sibling.
+  EBreakBetween previous_break_after_ = EBreakBetween::kAuto;
+
   Vector<scoped_refptr<NGBreakToken>> child_break_tokens_;
   scoped_refptr<NGBreakToken> last_inline_break_token_;
 
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.cc
index b07f520..028f630f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.cc
@@ -43,4 +43,64 @@
   return !break_token || break_token->IsFinished();
 }
 
+// At a class A break point [1], the break value with the highest precedence
+// wins. If the two values have the same precedence (e.g. "left" and "right"),
+// the value specified on a latter object wins.
+//
+// [1] https://drafts.csswg.org/css-break/#possible-breaks
+inline int FragmentainerBreakPrecedence(EBreakBetween break_value) {
+  // "auto" has the lowest priority.
+  // "avoid*" values win over "auto".
+  // "avoid-page" wins over "avoid-column".
+  // "avoid" wins over "avoid-page".
+  // Forced break values win over "avoid".
+  // Any forced page break value wins over "column" forced break.
+  // More specific break values (left, right, recto, verso) wins over generic
+  // "page" values.
+
+  switch (break_value) {
+    default:
+      NOTREACHED();
+    // fall-through
+    case EBreakBetween::kAuto:
+      return 0;
+    case EBreakBetween::kAvoidColumn:
+      return 1;
+    case EBreakBetween::kAvoidPage:
+      return 2;
+    case EBreakBetween::kAvoid:
+      return 3;
+    case EBreakBetween::kColumn:
+      return 4;
+    case EBreakBetween::kPage:
+      return 5;
+    case EBreakBetween::kLeft:
+    case EBreakBetween::kRight:
+    case EBreakBetween::kRecto:
+    case EBreakBetween::kVerso:
+      return 6;
+  }
+}
+
+EBreakBetween JoinFragmentainerBreakValues(EBreakBetween first_value,
+                                           EBreakBetween second_value) {
+  if (FragmentainerBreakPrecedence(second_value) >=
+      FragmentainerBreakPrecedence(first_value))
+    return second_value;
+  return first_value;
+}
+
+bool IsForcedBreakValue(const NGConstraintSpace& constraint_space,
+                        EBreakBetween break_value) {
+  if (break_value == EBreakBetween::kColumn)
+    return constraint_space.BlockFragmentationType() == kFragmentColumn;
+  if (break_value == EBreakBetween::kLeft ||
+      break_value == EBreakBetween::kPage ||
+      break_value == EBreakBetween::kRecto ||
+      break_value == EBreakBetween::kRight ||
+      break_value == EBreakBetween::kVerso)
+    return constraint_space.BlockFragmentationType() == kFragmentPage;
+  return false;
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.h
index a5acd2c..7f2d636 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.h
@@ -5,6 +5,7 @@
 #ifndef NGFragmentationUtils_h
 #define NGFragmentationUtils_h
 
+#include "core/style/ComputedStyleConstants.h"
 #include "platform/LayoutUnit.h"
 
 namespace blink {
@@ -24,6 +25,23 @@
 // Return true if the specified fragment is the final fragment of some node.
 bool IsLastFragment(const NGPhysicalFragment&);
 
+// Join two adjacent break values specified on break-before and/or break-
+// after. avoid* values win over auto values, and forced break values win over
+// avoid* values. |first_value| is specified on an element earlier in the flow
+// than |second_value|. This method is used at class A break points [1], to join
+// the values of the previous break-after and the next break-before, to figure
+// out whether we may, must, or should not break at that point. It is also used
+// when propagating break-before values from first children and break-after
+// values on last children to their container.
+//
+// [1] https://drafts.csswg.org/css-break/#possible-breaks
+EBreakBetween JoinFragmentainerBreakValues(EBreakBetween first_value,
+                                           EBreakBetween second_value);
+
+// Return true if the specified break value has a forced break effect in the
+// current fragmentation context.
+bool IsForcedBreakValue(const NGConstraintSpace&, EBreakBetween);
+
 }  // namespace blink
 
 #endif  // NGFragmentationUtils_h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc
index 56daf78..b6d4adb1 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc
@@ -20,12 +20,16 @@
     const WTF::Optional<NGBfcOffset> bfc_offset,
     const NGMarginStrut end_margin_strut,
     const LayoutUnit intrinsic_block_size,
+    EBreakBetween initial_break_before,
+    EBreakBetween final_break_after,
     NGLayoutResultStatus status)
     : physical_fragment_(std::move(physical_fragment)),
       exclusion_space_(std::move(exclusion_space)),
       bfc_offset_(bfc_offset),
       end_margin_strut_(end_margin_strut),
       intrinsic_block_size_(intrinsic_block_size),
+      initial_break_before_(initial_break_before),
+      final_break_after_(final_break_after),
       status_(status) {
   oof_positioned_descendants_.swap(oof_positioned_descendants);
   positioned_floats_.swap(positioned_floats);
@@ -47,7 +51,8 @@
   return base::AdoptRef(new NGLayoutResult(
       physical_fragment_->CloneWithoutOffset(), oof_positioned_descendants,
       positioned_floats, unpositioned_floats, std::move(exclusion_space),
-      bfc_offset_, end_margin_strut_, intrinsic_block_size_, Status()));
+      bfc_offset_, end_margin_strut_, intrinsic_block_size_,
+      initial_break_before_, final_break_after_, Status()));
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h
index 52e92e9d..198303e 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h
@@ -11,6 +11,7 @@
 #include "core/layout/ng/geometry/ng_margin_strut.h"
 #include "core/layout/ng/ng_out_of_flow_positioned_descendant.h"
 #include "core/layout/ng/ng_physical_fragment.h"
+#include "core/style/ComputedStyleConstants.h"
 #include "platform/wtf/Vector.h"
 
 namespace blink {
@@ -86,6 +87,14 @@
     return intrinsic_block_size_;
   }
 
+  // The break-before value on the first child needs to be propagated to the
+  // container, in search of a valid class A break point.
+  EBreakBetween InitialBreakBefore() const { return initial_break_before_; }
+
+  // The break-after value on the last child needs to be propagated to the
+  // container, in search of a valid class A break point.
+  EBreakBetween FinalBreakAfter() const { return final_break_after_; }
+
   scoped_refptr<NGLayoutResult> CloneWithoutOffset() const;
 
  private:
@@ -102,6 +111,8 @@
       const WTF::Optional<NGBfcOffset> bfc_offset,
       const NGMarginStrut end_margin_strut,
       const LayoutUnit intrinsic_block_size,
+      EBreakBetween initial_break_before,
+      EBreakBetween final_break_after,
       NGLayoutResultStatus status);
 
   scoped_refptr<NGPhysicalFragment> physical_fragment_;
@@ -115,6 +126,9 @@
   const NGMarginStrut end_margin_strut_;
   const LayoutUnit intrinsic_block_size_;
 
+  EBreakBetween initial_break_before_;
+  EBreakBetween final_break_after_;
+
   unsigned status_ : 1;
 };
 
diff --git a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
index a884747..99eedd1 100644
--- a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
@@ -96,8 +96,6 @@
 #include "public/platform/WebRect.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/web/WebAutofillClient.h"
-#include "public/web/WebColorChooser.h"
-#include "public/web/WebColorSuggestion.h"
 #include "public/web/WebConsoleMessage.h"
 #include "public/web/WebFrameClient.h"
 #include "public/web/WebInputElement.h"
diff --git a/third_party/WebKit/Source/core/page/ChromeClientImplTest.cpp b/third_party/WebKit/Source/core/page/ChromeClientImplTest.cpp
index 424d5e3..678d9263 100644
--- a/third_party/WebKit/Source/core/page/ChromeClientImplTest.cpp
+++ b/third_party/WebKit/Source/core/page/ChromeClientImplTest.cpp
@@ -128,8 +128,8 @@
   IntRect ElementRectRelativeToViewport() const override { return IntRect(); }
   Color CurrentColor() override { return Color(); }
   bool ShouldShowSuggestions() const override { return false; }
-  Vector<ColorSuggestion> Suggestions() const override {
-    return Vector<ColorSuggestion>();
+  Vector<mojom::blink::ColorSuggestionPtr> Suggestions() const override {
+    return Vector<mojom::blink::ColorSuggestionPtr>();
   }
 
  private:
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index fcdfa68..46ca2fb 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -239,12 +239,10 @@
 }
 
 DOMRectList* Page::NonFastScrollableRects(const LocalFrame* frame) {
-  DisableCompositingQueryAsserts disabler;
-  if (ScrollingCoordinator* scrolling_coordinator =
-          this->GetScrollingCoordinator()) {
-    // Hits in compositing/iframes/iframe-composited-scrolling.html
-    scrolling_coordinator->UpdateAfterCompositingChangeIfNeeded(frame->View());
-  }
+  // Update lifecycle to kPrePaintClean.  This includes the compositing update
+  // and ScrollingCoordinator::UpdateAfterCompositingChangeIfNeeded, which
+  // computes the non-fast scrollable region.
+  frame->View()->UpdateAllLifecyclePhasesExceptPaint();
 
   GraphicsLayer* layer =
       frame->View()->LayoutViewportScrollableArea()->LayerForScrolling();
diff --git a/third_party/WebKit/Source/core/page/Page.h b/third_party/WebKit/Source/core/page/Page.h
index 4e54ac7c..bd85d9f 100644
--- a/third_party/WebKit/Source/core/page/Page.h
+++ b/third_party/WebKit/Source/core/page/Page.h
@@ -145,14 +145,6 @@
 
   EditorClient& GetEditorClient() const { return *editor_client_; }
 
-  // This flag controls whether spell check for this page is manually
-  // turned on/off. The default setting is kAutomatic.
-  enum class SpellCheckStatus { kAutomatic, kForcedOn, kForcedOff };
-  void SetSpellCheckStatus(SpellCheckStatus status) {
-    spell_check_status_ = status;
-  }
-  SpellCheckStatus GetSpellCheckStatus() { return spell_check_status_; }
-
   void SetMainFrame(Frame*);
   Frame* MainFrame() const { return main_frame_; }
   // Escape hatch for existing code that assumes that the root frame is
@@ -363,7 +355,6 @@
   Member<PluginData> plugin_data_;
 
   EditorClient* const editor_client_;
-  SpellCheckStatus spell_check_status_ = SpellCheckStatus::kAutomatic;
   Member<ValidationMessageClient> validation_message_client_;
 
   UseCounter use_counter_;
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
index 7289acf..6357133 100644
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
@@ -91,22 +91,23 @@
   ScrollableArea* scrollable_area = ScrollableAreaForSnapping(snap_container);
   if (!scrollable_area)
     return;
-  snap_container_data.min_offset = scrollable_area->MinimumScrollOffset();
-  snap_container_data.max_offset = scrollable_area->MaximumScrollOffset();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
+  snap_container_data.max_position =
+      gfx::ScrollOffset(max_position.X(), max_position.Y());
 
   if (SnapAreaSet* snap_areas = snap_container.SnapAreas()) {
     for (const LayoutBox* snap_area : *snap_areas) {
-      snap_container_data.AddSnapAreaData(CalculateSnapAreaData(
-          *snap_area, snap_container, snap_container_data.min_offset,
-          snap_container_data.max_offset));
+      snap_container_data.AddSnapAreaData(
+          CalculateSnapAreaData(*snap_area, snap_container, max_position));
     }
   }
   snap_container_map_.Set(&snap_container, snap_container_data);
 }
 
-static float ClipInContainer(LayoutUnit unit, float min, float max) {
-  float value = unit.ToFloat();
-  return value < min ? min : (value > max ? max : value);
+static float ClipInContainer(LayoutUnit unit, float max) {
+  float value = unit.ClampNegativeToZero().ToFloat();
+  return value > max ? max : value;
 }
 
 // Returns scroll offset at which the snap area and snap containers meet the
@@ -120,17 +121,16 @@
 //    boundary. Note that this rect is represented by the dotted box below,
 //    which is contracted by the scroll-padding from the element's original
 //    boundary.
-// scrollable_size - The maximal scrollable offset of the container. The
-//    calculated snap_offset can not be larger than this value.
+// max_position - The maximal scrollable offset of the container. The
+//    calculated snap_position can not be larger than this value.
 // area - The snap area rect relative to the snap container's boundary. Note
 //    that this rect is represented by the dotted box below, which is expanded
 //    by the scroll-snap-margin from the element's original boundary.
-static float CalculateSnapOffset(SnapAlignment alignment,
-                                 SnapAxis axis,
-                                 const LayoutRect& container,
-                                 const ScrollOffset& min_offset,
-                                 const ScrollOffset& max_offset,
-                                 const LayoutRect& area) {
+static float CalculateSnapPosition(SnapAlignment alignment,
+                                   SnapAxis axis,
+                                   const LayoutRect& container,
+                                   const FloatPoint& max_position,
+                                   const LayoutRect& area) {
   DCHECK(axis == SnapAxis::kX || axis == SnapAxis::kY);
   switch (alignment) {
     /* Start alignment aligns the area's start edge with container's start edge.
@@ -138,7 +138,7 @@
       + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       +                   ^                                     +
       +                   |                                     +
-      +                   |snap_offset                          +
+      +                   |snap_position                          +
       +                   |                                     +
       +                   v                                     +
       +  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\  +
@@ -165,18 +165,16 @@
     */
     case SnapAlignment::kStart:
       if (axis == SnapAxis::kX) {
-        return ClipInContainer(area.X() - container.X(), min_offset.Width(),
-                               max_offset.Width());
+        return ClipInContainer(area.X() - container.X(), max_position.X());
       }
-      return ClipInContainer(area.Y() - container.Y(), min_offset.Height(),
-                             max_offset.Height());
+      return ClipInContainer(area.Y() - container.Y(), max_position.Y());
 
     /* Center alignment aligns the snap_area(with margin)'s center line with
        snap_container(without padding)'s center line.
        https://www.w3.org/TR/css-scroll-snap-1/#valdef-scroll-snap-align-center
       + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       +                    ^                                    +
-      +                    | snap_offset                        +
+      +                    | snap_position                        +
       +                    v                                    +
       +  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\  +
       +  \                 scroll-padding                    \  +
@@ -205,17 +203,17 @@
     case SnapAlignment::kCenter:
       if (axis == SnapAxis::kX) {
         return ClipInContainer(area.Center().X() - container.Center().X(),
-                               min_offset.Width(), max_offset.Width());
+                               max_position.X());
       }
       return ClipInContainer(area.Center().Y() - container.Center().Y(),
-                             min_offset.Height(), max_offset.Height());
+                             max_position.Y());
 
     /* End alignment aligns the snap_area(with margin)'s end edge with
        snap_container(without padding)'s end edge.
        https://www.w3.org/TR/css-scroll-snap-1/#valdef-scroll-snap-align-end
       + + + + + + + + + + + + + + + + + + + + + + + + + + + + . .
       +                    ^                                    +
-      +                    | snap_offset                        +
+      +                    | snap_position                        +
       +                    v                                    +
       +  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\  +
       +  \                                                   \  +
@@ -243,20 +241,32 @@
     case SnapAlignment::kEnd:
       if (axis == SnapAxis::kX) {
         return ClipInContainer(area.MaxX() - container.MaxX(),
-                               min_offset.Width(), max_offset.Width());
+                               max_position.X());
       }
-      return ClipInContainer(area.MaxY() - container.MaxY(),
-                             min_offset.Height(), max_offset.Height());
+      return ClipInContainer(area.MaxY() - container.MaxY(), max_position.Y());
     default:
-      return LayoutUnit(SnapAreaData::kInvalidScrollOffset);
+      return LayoutUnit(SnapAreaData::kInvalidScrollPosition);
   }
 }
 
+static ScrollSnapAlign GetPhysicalAlignment(
+    const ComputedStyle& area_style,
+    const ComputedStyle& container_style) {
+  ScrollSnapAlign align = area_style.GetScrollSnapAlign();
+  if (container_style.IsFlippedBlocksWritingMode()) {
+    if (align.alignmentX == SnapAlignment::kStart) {
+      align.alignmentX = SnapAlignment::kEnd;
+    } else if (align.alignmentX == SnapAlignment::kEnd) {
+      align.alignmentX = SnapAlignment::kStart;
+    }
+  }
+  return align;
+}
+
 SnapAreaData SnapCoordinator::CalculateSnapAreaData(
     const LayoutBox& snap_area,
     const LayoutBox& snap_container,
-    const ScrollOffset& min_offset,
-    const ScrollOffset& max_offset) {
+    const FloatPoint& max_position) {
   const ComputedStyle* container_style = snap_container.Style();
   const ComputedStyle* area_style = snap_area.Style();
   SnapAreaData snap_area_data;
@@ -280,12 +290,18 @@
     container_element = ToElement(snap_container.GetNode());
   else
     container_element = nullptr;
-  // If the container_element is nullptr, which is when the container is
-  // the root element, OffsetPoint() returns the distance between the canvas
-  // origin and the left/top border edge of the snap_area.
-  LayoutRect area(
-      snap_area.OffsetPoint(container_element),
-      LayoutSize(snap_area.OffsetWidth(), snap_area.OffsetHeight()));
+
+  LayoutRect area(LayoutPoint(), LayoutSize(snap_area.OffsetWidth(),
+                                            snap_area.OffsetHeight()));
+  area = EnclosingLayoutRect(
+      snap_area
+          .LocalToAncestorQuad(FloatRect(area), &snap_container,
+                               kUseTransforms | kTraverseDocumentBoundaries)
+          .BoundingBox());
+  ScrollableArea* scrollable_area = ScrollableAreaForSnapping(snap_container);
+  if (scrollable_area)
+    area.MoveBy(LayoutPoint(scrollable_area->ScrollPosition()));
+
   LayoutRectOutsets container_padding(
       // The percentage of scroll-padding is different from that of normal
       // padding, as scroll-padding resolves the percentage against
@@ -313,11 +329,12 @@
   container.Contract(container_padding);
   area.Expand(area_margin);
 
-  ScrollSnapAlign align = area_style->GetScrollSnapAlign();
-  snap_area_data.snap_offset.SetWidth(CalculateSnapOffset(
-      align.alignmentX, SnapAxis::kX, container, min_offset, max_offset, area));
-  snap_area_data.snap_offset.SetHeight(CalculateSnapOffset(
-      align.alignmentY, SnapAxis::kY, container, min_offset, max_offset, area));
+  ScrollSnapAlign align = GetPhysicalAlignment(*area_style, *container_style);
+
+  snap_area_data.snap_position.set_x(CalculateSnapPosition(
+      align.alignmentX, SnapAxis::kX, container, max_position, area));
+  snap_area_data.snap_position.set_y(CalculateSnapPosition(
+      align.alignmentY, SnapAxis::kY, container, max_position, area));
 
   if (align.alignmentX != SnapAlignment::kNone &&
       align.alignmentY != SnapAlignment::kNone) {
@@ -335,45 +352,45 @@
   return snap_area_data;
 }
 
-ScrollOffset SnapCoordinator::FindSnapOffset(const ScrollOffset& current_offset,
+FloatPoint SnapCoordinator::FindSnapPosition(const FloatPoint& current_position,
                                              const SnapContainerData& data,
                                              bool should_snap_on_x,
                                              bool should_snap_on_y) {
   float smallest_distance_x = std::numeric_limits<float>::max();
   float smallest_distance_y = std::numeric_limits<float>::max();
-  ScrollOffset snap_offset = current_offset;
+  FloatPoint snap_position = current_position;
   for (SnapAreaData snap_area_data : data.snap_area_list) {
     // TODO(sunyunjia): We should consider visiblity when choosing snap offset.
     if (should_snap_on_x && (snap_area_data.snap_axis == SnapAxis::kX ||
                              snap_area_data.snap_axis == SnapAxis::kBoth)) {
-      float offset = snap_area_data.snap_offset.Width();
-      if (offset == SnapAreaData::kInvalidScrollOffset)
+      float offset = snap_area_data.snap_position.x();
+      if (offset == SnapAreaData::kInvalidScrollPosition)
         continue;
-      float distance = std::abs(current_offset.Width() - offset);
+      float distance = std::abs(current_position.X() - offset);
       if (distance < smallest_distance_x) {
         smallest_distance_x = distance;
-        snap_offset.SetWidth(offset);
+        snap_position.SetX(offset);
       }
     }
     if (should_snap_on_y && (snap_area_data.snap_axis == SnapAxis::kY ||
                              snap_area_data.snap_axis == SnapAxis::kBoth)) {
-      float offset = snap_area_data.snap_offset.Height();
-      if (offset == SnapAreaData::kInvalidScrollOffset)
+      float offset = snap_area_data.snap_position.y();
+      if (offset == SnapAreaData::kInvalidScrollPosition)
         continue;
-      float distance = std::abs(current_offset.Height() - offset);
+      float distance = std::abs(current_position.Y() - offset);
       if (distance < smallest_distance_y) {
         smallest_distance_y = distance;
-        snap_offset.SetHeight(offset);
+        snap_position.SetY(offset);
       }
     }
   }
-  return snap_offset;
+  return snap_position;
 }
 
 bool SnapCoordinator::GetSnapPosition(const LayoutBox& snap_container,
                                       bool did_scroll_x,
                                       bool did_scroll_y,
-                                      ScrollOffset* snap_offset) {
+                                      FloatPoint* snap_position) {
   auto iter = snap_container_map_.find(&snap_container);
   if (iter == snap_container_map_.end())
     return false;
@@ -390,25 +407,26 @@
   if (!scrollable_area)
     return false;
 
-  ScrollOffset current_scroll_offset;
-  current_scroll_offset = scrollable_area->GetScrollOffset();
+  FloatPoint current_position = scrollable_area->ScrollPosition();
 
-  *snap_offset =
-      FindSnapOffset(current_scroll_offset, data, did_scroll_x, did_scroll_y);
+  *snap_position =
+      FindSnapPosition(current_position, data, did_scroll_x, did_scroll_y);
 
-  return *snap_offset != current_scroll_offset;
+  return *snap_position != current_position;
 }
 
 void SnapCoordinator::PerformSnapping(const LayoutBox& snap_container,
                                       bool did_scroll_x,
                                       bool did_scroll_y) {
-  ScrollOffset snap_offset;
+  FloatPoint snap_position;
   if (GetSnapPosition(snap_container, did_scroll_x, did_scroll_y,
-                      &snap_offset)) {
+                      &snap_position)) {
     if (ScrollableArea* scrollable_area =
             ScrollableAreaForSnapping(snap_container)) {
-      scrollable_area->SetScrollOffset(snap_offset, kProgrammaticScroll,
-                                       kScrollBehaviorSmooth);
+      scrollable_area->SetScrollOffset(
+          ScrollPositionToOffset(snap_position,
+                                 scrollable_area->ScrollOrigin()),
+          kProgrammaticScroll, kScrollBehaviorSmooth);
     }
   }
 }
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h
index 6c70e40..124908b 100644
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h
@@ -13,10 +13,6 @@
 namespace blink {
 
 class LayoutBox;
-struct ScrollSnapType;
-struct ScrollSnapAlign;
-struct SnapAreaData;
-struct SnapContainerData;
 
 // Snap Coordinator keeps track of snap containers and all of their associated
 // snap areas. It also contains the logic to generate the list of valid snap
@@ -48,8 +44,7 @@
   // container.
   SnapAreaData CalculateSnapAreaData(const LayoutBox& snap_area,
                                      const LayoutBox& snap_container,
-                                     const ScrollOffset& min_offset,
-                                     const ScrollOffset& max_offset);
+                                     const FloatPoint& max_position);
 
   // Called by LocalFrameView::PerformPostLayoutTasks(), so that the snap data
   // are updated whenever a layout happens.
@@ -65,8 +60,8 @@
   bool GetSnapPosition(const LayoutBox& snap_container,
                        bool did_scroll_x,
                        bool did_scroll_y,
-                       ScrollOffset* snap_offset);
-  static ScrollOffset FindSnapOffset(const ScrollOffset& current_offset,
+                       FloatPoint* snap_position);
+  static FloatPoint FindSnapPosition(const FloatPoint& current_position,
                                      const SnapContainerData&,
                                      bool should_snap_on_x,
                                      bool should_snap_on_y);
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp
index 8b945314..676a0f7 100644
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp
@@ -304,20 +304,18 @@
 
 #define EXPECT_EQ_CONTAINER(expected, actual)                                \
   {                                                                          \
-    EXPECT_EQ(expected.min_offset.Width(), actual.min_offset.Width());       \
-    EXPECT_EQ(expected.min_offset.Height(), actual.min_offset.Height());     \
-    EXPECT_EQ(expected.max_offset.Width(), actual.max_offset.Width());       \
-    EXPECT_EQ(expected.max_offset.Height(), actual.max_offset.Height());     \
+    EXPECT_EQ(expected.max_position.x(), actual.max_position.x());           \
+    EXPECT_EQ(expected.max_position.y(), actual.max_position.y());           \
     EXPECT_EQ(expected.scroll_snap_type, actual.scroll_snap_type);           \
     EXPECT_EQ(expected.snap_area_list.size(), actual.snap_area_list.size()); \
   }
 
-#define EXPECT_EQ_AREA(expected, actual)                                   \
-  {                                                                        \
-    EXPECT_EQ(expected.snap_axis, actual.snap_axis);                       \
-    EXPECT_EQ(expected.snap_offset.Width(), actual.snap_offset.Width());   \
-    EXPECT_EQ(expected.snap_offset.Height(), actual.snap_offset.Height()); \
-    EXPECT_EQ(expected.must_snap, actual.must_snap);                       \
+#define EXPECT_EQ_AREA(expected, actual)                             \
+  {                                                                  \
+    EXPECT_EQ(expected.snap_axis, actual.snap_axis);                 \
+    EXPECT_EQ(expected.snap_position.x(), actual.snap_position.x()); \
+    EXPECT_EQ(expected.snap_position.y(), actual.snap_position.y()); \
+    EXPECT_EQ(expected.must_snap, actual.must_snap);                 \
   }
 
 // The following tests check EnsureSnapContainerData().
@@ -332,27 +330,61 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.left - #area.scroll-snap-margin) - (#scroller.scroll-padding)
-  double snap_offset_x = (200 - 8) - 10;
+  double snap_position_x = (200 - 8) - 10;
   // (#area.top - #area.scroll-snap-margin) - (#scroller.scroll-padding)
-  double snap_offset_y = (200 - 8) - 10;
+  double snap_position_y = (200 - 8) - 10;
 
   bool must_snap = false;
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
+  expected_container.AddSnapAreaData(expected_area);
+
+  EXPECT_EQ_CONTAINER(expected_container, actual_container);
+  EXPECT_EQ_AREA(expected_area, actual_container.snap_area_list[0]);
+}
+
+TEST_P(SnapCoordinatorTest, ScrolledStartAlignmentCalculation) {
+  SetUpSingleSnapArea();
+  Element* scroller_element = GetDocument().getElementById("scroller");
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  scroller_element->scrollBy(20, 20);
+  EXPECT_EQ(FloatPoint(20, 20), scrollable_area->ScrollPosition());
+  Element* area_element = GetDocument().getElementById("area");
+  area_element->setAttribute(styleAttr, "scroll-snap-align: start;");
+  GetDocument().UpdateStyleAndLayout();
+  SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
+  SnapContainerData actual_container =
+      snap_coordinator->EnsureSnapContainerData(
+          *scroller_element->GetLayoutBox());
+
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
+
+  // (#area.left - #area.scroll-snap-margin) - (#scroller.scroll-padding)
+  double snap_position_x = (200 - 8) - 10;
+  // (#area.top - #area.scroll-snap-margin) - (#scroller.scroll-padding)
+  double snap_position_y = (200 - 8) - 10;
+
+  bool must_snap = false;
+
+  SnapContainerData expected_container(
+      ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
+  SnapAreaData expected_area(
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -371,27 +403,24 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.left - #area.scroll-snap-margin) - (#scroller.scroll-padding)
-  double snap_offset_x = (200 - (-8)) - 10;
+  double snap_position_x = (200 - (-8)) - 10;
   // (#area.top - #area.scroll-snap-margin) - (#scroller.scroll-padding)
-  double snap_offset_y = (200 - (-8)) - 10;
+  double snap_position_y = (200 - (-8)) - 10;
 
   bool must_snap = false;
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -409,29 +438,26 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.left + #area.right) / 2 - #scroller.width / 2
-  double snap_offset_x =
+  double snap_position_x =
       (200 + (200 + 100)) / 2 - float(scroller_element->clientWidth()) / 2;
   // (#area.top + #area.bottom) / 2 - #scroller.height / 2
-  double snap_offset_y =
+  double snap_position_y =
       (200 + (200 + 100)) / 2 - float(scroller_element->clientHeight()) / 2;
 
   bool must_snap = false;
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -463,20 +489,16 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.left - #area.scroll-snap-margin-left +
   //  #area.right + #area.scroll-snap-margin-right) / 2 -
   // (#scroller.left + #scroller.scroll-padding-left +
   //  #scroller.right - #scroller.scroll-padding-right) / 2
-  double snap_offset_x =
+  double snap_position_x =
       (200 - 8 + (200 + 100 + 4)) / 2 -
       (0 + 16 + float(scroller_element->clientWidth()) - 12) / 2;
 
@@ -484,7 +506,7 @@
   //  #area.bottom + #area.scroll-snap-margin-bottom) / 2 -
   // (#scroller.top + #scroller.scroll-padding-top +
   //  #scroller.bottom - #scroller.scroll-padding-bottom) / 2
-  double snap_offset_y =
+  double snap_position_y =
       (200 - 2 + (200 + 100 + 6)) / 2 -
       (0 + 10 + float(scroller_element->clientHeight()) - 14) / 2;
 
@@ -492,9 +514,10 @@
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -512,32 +535,113 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.right + #area.scroll-snap-margin)
   // - (#scroller.right - #scroller.scroll-padding)
-  double snap_offset_x =
+  double snap_position_x =
       (200 + 100 + 8) - (scroller_element->clientWidth() - 10);
 
   // (#area.bottom + #area.scroll-snap-margin)
   // - (#scroller.bottom - #scroller.scroll-padding)
-  double snap_offset_y =
+  double snap_position_y =
       (200 + 100 + 8) - (scroller_element->clientHeight() - 10);
 
   bool must_snap = false;
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
+  expected_container.AddSnapAreaData(expected_area);
+
+  EXPECT_EQ_CONTAINER(expected_container, actual_container);
+  EXPECT_EQ_AREA(expected_area, actual_container.snap_area_list[0]);
+}
+
+TEST_P(SnapCoordinatorTest, ScaledEndAlignmentCalculation) {
+  SetUpSingleSnapArea();
+  Element* area_element = GetDocument().getElementById("area");
+  area_element->setAttribute(styleAttr,
+                             "scroll-snap-align: end; transform: scale(4, 4);");
+  GetDocument().UpdateStyleAndLayout();
+  Element* scroller_element = GetDocument().getElementById("scroller");
+  SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
+  SnapContainerData actual_container =
+      snap_coordinator->EnsureSnapContainerData(
+          *scroller_element->GetLayoutBox());
+
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
+
+  // The area is scaled from center, so it pushes the area's top-left corner to
+  // (50, 50).
+  // (#area.right + #area.scroll-snap-margin)
+  // - (#scroller.right - #scroller.scroll-padding)
+  double snap_position_x =
+      (50 + 400 + 8) - (scroller_element->clientWidth() - 10);
+
+  // (#area.bottom + #area.scroll-snap-margin)
+  // - (#scroller.bottom - #scroller.scroll-padding)
+  double snap_position_y =
+      (50 + 400 + 8) - (scroller_element->clientHeight() - 10);
+
+  bool must_snap = false;
+
+  SnapContainerData expected_container(
+      ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
+  SnapAreaData expected_area(
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
+  expected_container.AddSnapAreaData(expected_area);
+
+  EXPECT_EQ_CONTAINER(expected_container, actual_container);
+  EXPECT_EQ_AREA(expected_area, actual_container.snap_area_list[0]);
+}
+
+TEST_P(SnapCoordinatorTest, VerticalRlStartAlignmentCalculation) {
+  SetUpSingleSnapArea();
+  Element* area_element = GetDocument().getElementById("area");
+  area_element->setAttribute(styleAttr,
+                             "scroll-snap-align: start; left: -200px;");
+  Element* scroller_element = GetDocument().getElementById("scroller");
+  scroller_element->setAttribute(styleAttr, "writing-mode: vertical-rl;");
+  GetDocument().UpdateStyleAndLayout();
+  SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
+  SnapContainerData actual_container =
+      snap_coordinator->EnsureSnapContainerData(
+          *scroller_element->GetLayoutBox());
+
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
+
+  // Under vertical-rl writing mode, 'start' should align to the right.
+  // (#area.right + #area.scroll-snap-margin)
+  // - (#scroller.right - #scroller.scroll-padding)
+  double snap_position_x =
+      (200 + 100 + 8) - (scroller_element->clientWidth() - 10);
+
+  // (#area.top - #area.scroll-snap-margin) - (#scroller.scroll-padding)
+  double snap_position_y = (200 - 8) - 10;
+
+  bool must_snap = false;
+
+  SnapContainerData expected_container(
+      ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
+  SnapAreaData expected_area(
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -556,34 +660,31 @@
       snap_coordinator->EnsureSnapContainerData(
           *scroller_element->GetLayoutBox());
 
-  double scrollable_x = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Width();
-  double scrollable_y = scroller_element->GetLayoutBox()
-                            ->GetScrollableArea()
-                            ->MaximumScrollOffset()
-                            .Height();
+  ScrollableArea* scrollable_area =
+      scroller_element->GetLayoutBox()->GetScrollableArea();
+  FloatPoint max_position = ScrollOffsetToPosition(
+      scrollable_area->MaximumScrollOffset(), scrollable_area->ScrollOrigin());
 
   // (#area.right + #area.scroll-snap-margin)
   //  - (#scroller.right - #scroller.scroll-padding)
   // = (100 + 8) - (clientWidth - 10) < 0
-  // As scrollOffset cannot be set to a negative number, we set it to 0.
-  double snap_offset_x = 0;
+  // As scrollPosition cannot be set to a negative number, we set it to 0.
+  double snap_position_x = 0;
 
   // (#area.bottom + #area.scroll-snap-margin)
   //  - (#scroller.bottom - #scroller.scroll-padding)
   // = (100 + 8) - (clientHeight - 10) < 0
-  // As scrollOffset cannot be set to a negative number, we set it to 0.
-  double snap_offset_y = 0;
+  // As scrollPosition cannot be set to a negative number, we set it to 0.
+  double snap_position_y = 0;
 
   bool must_snap = false;
 
   SnapContainerData expected_container(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(scrollable_x, scrollable_y));
+      gfx::ScrollOffset(max_position.X(), max_position.Y()));
   SnapAreaData expected_area(
-      SnapAxis::kBoth, ScrollOffset(snap_offset_x, snap_offset_y), must_snap);
+      SnapAxis::kBoth, gfx::ScrollOffset(snap_position_x, snap_position_y),
+      must_snap);
   expected_container.AddSnapAreaData(expected_area);
 
   EXPECT_EQ_CONTAINER(expected_container, actual_container);
@@ -604,11 +705,11 @@
 
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   LayoutBox* snap_container = scroller_element->GetLayoutBox();
-  ScrollOffset snap_offset;
+  FloatPoint snap_position;
   EXPECT_TRUE(snap_coordinator->GetSnapPosition(*snap_container, true, false,
-                                                &snap_offset));
-  EXPECT_EQ(200 - 8 - 10, snap_offset.Width());
-  EXPECT_EQ(150, snap_offset.Height());
+                                                &snap_position));
+  EXPECT_EQ(200 - 8 - 10, snap_position.X());
+  EXPECT_EQ(150, snap_position.Y());
 }
 
 TEST_P(SnapCoordinatorTest, DoesNotSnapOnNonSnappingAxis) {
@@ -624,9 +725,9 @@
 
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   LayoutBox* snap_container = scroller_element->GetLayoutBox();
-  ScrollOffset snap_offset;
+  FloatPoint snap_position;
   EXPECT_FALSE(snap_coordinator->GetSnapPosition(*snap_container, true, false,
-                                                 &snap_offset));
+                                                 &snap_position));
 }
 
 TEST_P(SnapCoordinatorTest, DoesNotSnapOnEmptyContainer) {
@@ -642,9 +743,9 @@
 
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   LayoutBox* snap_container = scroller_element->GetLayoutBox();
-  ScrollOffset snap_offset;
+  FloatPoint snap_position;
   EXPECT_FALSE(snap_coordinator->GetSnapPosition(*snap_container, true, false,
-                                                 &snap_offset));
+                                                 &snap_position));
 }
 
 TEST_P(SnapCoordinatorTest, DoesNotSnapOnNonSnapContainer) {
@@ -660,71 +761,71 @@
 
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   LayoutBox* snap_container = scroller_element->GetLayoutBox();
-  ScrollOffset snap_offset;
+  FloatPoint snap_position;
   EXPECT_FALSE(snap_coordinator->GetSnapPosition(*snap_container, true, false,
-                                                 &snap_offset));
+                                                 &snap_position));
 }
 
-// The following tests check FindSnapOffset().
-TEST_P(SnapCoordinatorTest, FindsClosestSnapOffsetIndependently) {
+// The following tests check FindSnapPosition().
+TEST_P(SnapCoordinatorTest, FindsClosestSnapPositionIndependently) {
   SnapContainerData container_data(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(360, 380));
-  ScrollOffset current_offset(100, 100);
-  SnapAreaData snap_x_only(SnapAxis::kX,
-                           ScrollOffset(80, SnapAreaData::kInvalidScrollOffset),
-                           false);
-  SnapAreaData snap_y_only(SnapAxis::kY,
-                           ScrollOffset(SnapAreaData::kInvalidScrollOffset, 70),
-                           false);
-  SnapAreaData snap_on_both(SnapAxis::kBoth, ScrollOffset(50, 150), false);
+      gfx::ScrollOffset(360, 380));
+  FloatPoint current_position(100, 100);
+  SnapAreaData snap_x_only(
+      SnapAxis::kX, gfx::ScrollOffset(80, SnapAreaData::kInvalidScrollPosition),
+      false);
+  SnapAreaData snap_y_only(
+      SnapAxis::kY, gfx::ScrollOffset(SnapAreaData::kInvalidScrollPosition, 70),
+      false);
+  SnapAreaData snap_on_both(SnapAxis::kBoth, gfx::ScrollOffset(50, 150), false);
   container_data.AddSnapAreaData(snap_x_only);
   container_data.AddSnapAreaData(snap_y_only);
   container_data.AddSnapAreaData(snap_on_both);
-  ScrollOffset snapped_offset = SnapCoordinator::FindSnapOffset(
-      current_offset, container_data, true, true);
-  EXPECT_EQ(80, snapped_offset.Width());
-  EXPECT_EQ(70, snapped_offset.Height());
+  FloatPoint snap_position = SnapCoordinator::FindSnapPosition(
+      current_position, container_data, true, true);
+  EXPECT_EQ(80, snap_position.X());
+  EXPECT_EQ(70, snap_position.Y());
 }
 
-TEST_P(SnapCoordinatorTest, FindsClosestSnapOffsetOnAxisValueBoth) {
+TEST_P(SnapCoordinatorTest, FindsClosestSnapPositionOnAxisValueBoth) {
   SnapContainerData container_data(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(360, 380));
-  ScrollOffset current_offset(40, 150);
-  SnapAreaData snap_x_only(SnapAxis::kX,
-                           ScrollOffset(80, SnapAreaData::kInvalidScrollOffset),
-                           false);
-  SnapAreaData snap_y_only(SnapAxis::kY,
-                           ScrollOffset(SnapAreaData::kInvalidScrollOffset, 70),
-                           false);
-  SnapAreaData snap_on_both(SnapAxis::kBoth, ScrollOffset(50, 150), false);
+      gfx::ScrollOffset(360, 380));
+  FloatPoint current_position(40, 150);
+  SnapAreaData snap_x_only(
+      SnapAxis::kX, gfx::ScrollOffset(80, SnapAreaData::kInvalidScrollPosition),
+      false);
+  SnapAreaData snap_y_only(
+      SnapAxis::kY, gfx::ScrollOffset(SnapAreaData::kInvalidScrollPosition, 70),
+      false);
+  SnapAreaData snap_on_both(SnapAxis::kBoth, gfx::ScrollOffset(50, 150), false);
   container_data.AddSnapAreaData(snap_x_only);
   container_data.AddSnapAreaData(snap_y_only);
   container_data.AddSnapAreaData(snap_on_both);
-  ScrollOffset snapped_offset = SnapCoordinator::FindSnapOffset(
-      current_offset, container_data, true, true);
-  EXPECT_EQ(50, snapped_offset.Width());
-  EXPECT_EQ(150, snapped_offset.Height());
+  FloatPoint snap_position = SnapCoordinator::FindSnapPosition(
+      current_position, container_data, true, true);
+  EXPECT_EQ(50, snap_position.X());
+  EXPECT_EQ(150, snap_position.Y());
 }
 
 TEST_P(SnapCoordinatorTest, DoesNotSnapOnNonScrolledAxis) {
   SnapContainerData container_data(
       ScrollSnapType(false, SnapAxis::kBoth, SnapStrictness::kMandatory),
-      ScrollOffset(), ScrollOffset(360, 380));
-  ScrollOffset current_offset(100, 100);
-  SnapAreaData snap_x_only(SnapAxis::kX,
-                           ScrollOffset(80, SnapAreaData::kInvalidScrollOffset),
-                           false);
-  SnapAreaData snap_y_only(SnapAxis::kY,
-                           ScrollOffset(SnapAreaData::kInvalidScrollOffset, 70),
-                           false);
+      gfx::ScrollOffset(360, 380));
+  FloatPoint current_position(100, 100);
+  SnapAreaData snap_x_only(
+      SnapAxis::kX, gfx::ScrollOffset(80, SnapAreaData::kInvalidScrollPosition),
+      false);
+  SnapAreaData snap_y_only(
+      SnapAxis::kY, gfx::ScrollOffset(SnapAreaData::kInvalidScrollPosition, 70),
+      false);
   container_data.AddSnapAreaData(snap_x_only);
   container_data.AddSnapAreaData(snap_y_only);
-  ScrollOffset snapped_offset = SnapCoordinator::FindSnapOffset(
-      current_offset, container_data, true, false);
-  EXPECT_EQ(80, snapped_offset.Width());
-  EXPECT_EQ(100, snapped_offset.Height());
+  FloatPoint snap_position = SnapCoordinator::FindSnapPosition(
+      current_position, container_data, true, false);
+  EXPECT_EQ(80, snap_position.X());
+  EXPECT_EQ(100, snap_position.Y());
 }
 
 }  // namespace
diff --git a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
index eeb0cc4..be69fc4 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
@@ -231,7 +231,7 @@
                                      unsnapped_available_width) -
         offset_for_cell;
     float number_of_tiles_in_position;
-    if (fill_layer.BackgroundXOrigin() == kRightEdge) {
+    if (fill_layer.BackgroundXOrigin() == BackgroundEdgeOrigin::kRight) {
       number_of_tiles_in_position =
           (snapped_available_width - computed_x_position + extra_offset)
               .ToFloat() /
@@ -267,7 +267,7 @@
                                      unsnapped_available_height) -
         offset_for_cell;
     float number_of_tiles_in_position;
-    if (fill_layer.BackgroundYOrigin() == kBottomEdge) {
+    if (fill_layer.BackgroundYOrigin() == BackgroundEdgeOrigin::kBottom) {
       number_of_tiles_in_position =
           (snapped_available_height - computed_y_position + extra_offset)
               .ToFloat() /
@@ -693,9 +693,10 @@
       background_repeat_x = EFillRepeat::kNoRepeatFill;
   }
   if (background_repeat_x == EFillRepeat::kNoRepeatFill) {
-    LayoutUnit x_offset = fill_layer.BackgroundXOrigin() == kRightEdge
-                              ? available_width - computed_x_position
-                              : computed_x_position;
+    LayoutUnit x_offset =
+        fill_layer.BackgroundXOrigin() == BackgroundEdgeOrigin::kRight
+            ? available_width - computed_x_position
+            : computed_x_position;
     SetNoRepeatX(box_offset.X() + x_offset);
     if (offset_in_background_.X() > TileSize().Width())
       SetDestRect(LayoutRect());
@@ -715,9 +716,10 @@
       background_repeat_y = EFillRepeat::kNoRepeatFill;
   }
   if (background_repeat_y == EFillRepeat::kNoRepeatFill) {
-    LayoutUnit y_offset = fill_layer.BackgroundYOrigin() == kBottomEdge
-                              ? available_height - computed_y_position
-                              : computed_y_position;
+    LayoutUnit y_offset =
+        fill_layer.BackgroundYOrigin() == BackgroundEdgeOrigin::kBottom
+            ? available_height - computed_y_position
+            : computed_y_position;
     SetNoRepeatY(box_offset.Y() + y_offset);
     if (offset_in_background_.Y() > TileSize().Height())
       SetDestRect(LayoutRect());
diff --git a/third_party/WebKit/Source/core/policy/BUILD.gn b/third_party/WebKit/Source/core/policy/BUILD.gn
new file mode 100644
index 0000000..07b7cd9
--- /dev/null
+++ b/third_party/WebKit/Source/core/policy/BUILD.gn
@@ -0,0 +1,14 @@
+# 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("//third_party/WebKit/Source/core/core.gni")
+
+blink_core_sources("policy") {
+  sources = [
+    "DocumentPolicy.h",
+    "IFramePolicy.h",
+    "Policy.cpp",
+    "Policy.h",
+  ]
+}
diff --git a/third_party/WebKit/Source/core/policy/DocumentPolicy.h b/third_party/WebKit/Source/core/policy/DocumentPolicy.h
new file mode 100644
index 0000000..eff5a956
--- /dev/null
+++ b/third_party/WebKit/Source/core/policy/DocumentPolicy.h
@@ -0,0 +1,39 @@
+// 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 DocumentPolicy_h
+#define DocumentPolicy_h
+
+#include "core/CoreExport.h"
+#include "core/dom/Document.h"
+#include "core/policy/Policy.h"
+#include "platform/heap/Member.h"
+
+namespace blink {
+
+// DocumentPolicy inherits Policy. It represents the feature policy
+// introspection of a document.
+class CORE_EXPORT DocumentPolicy final : public Policy {
+ public:
+  // Create a new DocumentPolicy, which is associated with |document|.
+  explicit DocumentPolicy(Document* document) : document_(document) {}
+
+  void Trace(blink::Visitor* visitor) override {
+    visitor->Trace(document_);
+    ScriptWrappable::Trace(visitor);
+  }
+
+ protected:
+  const FeaturePolicy* GetPolicy() const override {
+    return document_->GetFeaturePolicy();
+  }
+  Document* GetDocument() const override { return document_; }
+
+ private:
+  Member<Document> document_;
+};
+
+}  // namespace blink
+
+#endif  // DocumentPolicy_h
diff --git a/third_party/WebKit/Source/core/policy/IFramePolicy.h b/third_party/WebKit/Source/core/policy/IFramePolicy.h
new file mode 100644
index 0000000..cbcd059
--- /dev/null
+++ b/third_party/WebKit/Source/core/policy/IFramePolicy.h
@@ -0,0 +1,56 @@
+// 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 IFramePolicy_h
+#define IFramePolicy_h
+
+#include "core/CoreExport.h"
+#include "core/policy/Policy.h"
+#include "platform/heap/Member.h"
+#include "platform/weborigin/SecurityOrigin.h"
+
+namespace blink {
+
+// IFramePolicy inherits Policy. It represents the feature policy introspection
+// of an iframe contained in a document. It is tynthetic from the parent policy
+// and the iframe container policy (parsed from the allow attribute).
+class IFramePolicy final : public Policy {
+ public:
+  ~IFramePolicy() override = default;
+
+  // Create a new IFramePolicy, which is synthetic for a frame contained within
+  // a document.
+  IFramePolicy(Document* parent_document,
+               const ParsedFeaturePolicy& container_policy,
+               scoped_refptr<const SecurityOrigin> src_origin)
+      : parent_document_(parent_document) {
+    DCHECK(src_origin);
+    UpdateContainerPolicy(container_policy, src_origin);
+  }
+
+  void UpdateContainerPolicy(
+      const ParsedFeaturePolicy& container_policy,
+      scoped_refptr<const SecurityOrigin> src_origin) override {
+    policy_ = FeaturePolicy::CreateFromParentPolicy(
+        parent_document_->GetFeaturePolicy(), container_policy,
+        src_origin->ToUrlOrigin());
+  }
+
+  void Trace(blink::Visitor* visitor) override {
+    visitor->Trace(parent_document_);
+    Policy::Trace(visitor);
+  }
+
+ protected:
+  const FeaturePolicy* GetPolicy() const override { return policy_.get(); }
+  Document* GetDocument() const override { return parent_document_; }
+
+ private:
+  Member<Document> parent_document_;
+  std::unique_ptr<FeaturePolicy> policy_;
+};
+
+}  // namespace blink
+
+#endif  // IFramePolicy_h
diff --git a/third_party/WebKit/Source/core/dom/Policy.cpp b/third_party/WebKit/Source/core/policy/Policy.cpp
similarity index 76%
rename from third_party/WebKit/Source/core/dom/Policy.cpp
rename to third_party/WebKit/Source/core/policy/Policy.cpp
index 58829400..3c1cf24 100644
--- a/third_party/WebKit/Source/core/dom/Policy.cpp
+++ b/third_party/WebKit/Source/core/policy/Policy.cpp
@@ -2,28 +2,19 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "core/dom/Policy.h"
+#include "core/policy/Policy.h"
 
 #include "core/dom/Document.h"
 #include "core/inspector/ConsoleMessage.h"
 #include "platform/feature_policy/FeaturePolicy.h"
 #include "platform/weborigin/SecurityOrigin.h"
 #include "platform/wtf/text/StringUTF8Adaptor.h"
-#include "third_party/WebKit/common/feature_policy/feature_policy.h"
 
 namespace blink {
 
-// static
-Policy* Policy::Create(Document* document) {
-  return new Policy(document);
-}
-
-// explicit
-Policy::Policy(Document* document) : document_(document) {}
-
 bool Policy::allowsFeature(const String& feature) const {
   if (GetDefaultFeatureNameMap().Contains(feature)) {
-    return document_->GetFeaturePolicy()->IsFeatureEnabled(
+    return GetPolicy()->IsFeatureEnabled(
         GetDefaultFeatureNameMap().at(feature));
   }
 
@@ -32,10 +23,10 @@
 }
 
 bool Policy::allowsFeature(const String& feature, const String& url) const {
-  const scoped_refptr<const SecurityOrigin> origin =
+  scoped_refptr<const SecurityOrigin> origin =
       SecurityOrigin::CreateFromString(url);
   if (!origin || origin->IsUnique()) {
-    document_->AddConsoleMessage(ConsoleMessage::Create(
+    GetDocument()->AddConsoleMessage(ConsoleMessage::Create(
         kOtherMessageSource, kWarningMessageLevel,
         "Invalid origin url for feature '" + feature + "': " + url + "."));
     return false;
@@ -46,14 +37,14 @@
     return false;
   }
 
-  return document_->GetFeaturePolicy()->IsFeatureEnabledForOrigin(
+  return GetPolicy()->IsFeatureEnabledForOrigin(
       GetDefaultFeatureNameMap().at(feature), origin->ToUrlOrigin());
 }
 
 Vector<String> Policy::allowedFeatures() const {
   Vector<String> allowed_features;
   for (const auto& entry : GetDefaultFeatureNameMap()) {
-    if (document_->GetFeaturePolicy()->IsFeatureEnabled(entry.value))
+    if (GetPolicy()->IsFeatureEnabled(entry.value))
       allowed_features.push_back(entry.key);
   }
   return allowed_features;
@@ -62,7 +53,7 @@
 Vector<String> Policy::getAllowlistForFeature(const String& feature) const {
   if (GetDefaultFeatureNameMap().Contains(feature)) {
     const FeaturePolicy::Whitelist whitelist =
-        document_->GetFeaturePolicy()->GetWhitelistForFeature(
+        GetPolicy()->GetWhitelistForFeature(
             GetDefaultFeatureNameMap().at(feature));
     if (whitelist.MatchesAll())
       return Vector<String>({"*"});
@@ -78,13 +69,12 @@
 }
 
 void Policy::AddWarningForUnrecognizedFeature(const String& feature) const {
-  document_->AddConsoleMessage(
+  GetDocument()->AddConsoleMessage(
       ConsoleMessage::Create(kOtherMessageSource, kWarningMessageLevel,
                              "Unrecognized feature: '" + feature + "'."));
 }
 
 void Policy::Trace(blink::Visitor* visitor) {
-  visitor->Trace(document_);
   ScriptWrappable::Trace(visitor);
 }
 
diff --git a/third_party/WebKit/Source/core/policy/Policy.h b/third_party/WebKit/Source/core/policy/Policy.h
new file mode 100644
index 0000000..704d5a1
--- /dev/null
+++ b/third_party/WebKit/Source/core/policy/Policy.h
@@ -0,0 +1,59 @@
+// 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 Policy_h
+#define Policy_h
+
+#include "core/CoreExport.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/heap/Member.h"
+#include "third_party/WebKit/common/feature_policy/feature_policy.h"
+
+namespace blink {
+
+class Document;
+class SecurityOrigin;
+
+// Policy provides an interface for feature policy introspection of a document
+// (DocumentPolicy) or an iframe (IFramePolicy).
+class CORE_EXPORT Policy : public ScriptWrappable {
+  DEFINE_WRAPPERTYPEINFO();
+
+ public:
+  ~Policy() override = default;
+
+  // Implementation of methods of the policy interface:
+  // Returns whether or not the given feature is allowed on the origin of the
+  // document that owns the policy.
+  bool allowsFeature(const String& feature) const;
+  // Returns whether or not the given feature is allowed on the origin of the
+  // given URL.
+  bool allowsFeature(const String& feature, const String& url) const;
+  // Returns a list of feature names that are allowed on the self origin.
+  Vector<String> allowedFeatures() const;
+  // Returns a list of feature name that are allowed on the origin of the given
+  // URL.
+  Vector<String> getAllowlistForFeature(const String& url) const;
+
+  // Inform the Policy object when the container policy on its frame element has
+  // changed.
+  virtual void UpdateContainerPolicy(
+      const ParsedFeaturePolicy& container_policy = {},
+      scoped_refptr<const SecurityOrigin> src_origin = nullptr) {}
+
+  virtual void Trace(blink::Visitor*);
+
+ protected:
+  virtual const FeaturePolicy* GetPolicy() const = 0;
+  // Get the containing document.
+  virtual Document* GetDocument() const = 0;
+
+ private:
+  // Add console message to the containing document.
+  void AddWarningForUnrecognizedFeature(const String& message) const;
+};
+
+}  // namespace blink
+
+#endif  // Policy_h
diff --git a/third_party/WebKit/Source/core/dom/Policy.idl b/third_party/WebKit/Source/core/policy/Policy.idl
similarity index 100%
rename from third_party/WebKit/Source/core/dom/Policy.idl
rename to third_party/WebKit/Source/core/policy/Policy.idl
diff --git a/third_party/WebKit/Source/core/policy/PolicyTest.cpp b/third_party/WebKit/Source/core/policy/PolicyTest.cpp
new file mode 100644
index 0000000..b68e3c2
--- /dev/null
+++ b/third_party/WebKit/Source/core/policy/PolicyTest.cpp
@@ -0,0 +1,156 @@
+// 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.
+
+#include "core/policy/DocumentPolicy.h"
+#include "core/policy/IFramePolicy.h"
+
+#include "core/dom/Document.h"
+#include "platform/feature_policy/FeaturePolicy.h"
+#include "platform/weborigin/SecurityOrigin.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace blink {
+
+namespace {
+constexpr char kSelfOrigin[] = "https://selforigin.com";
+constexpr char kOriginA[] = "https://example.com";
+constexpr char kOriginB[] = "https://example.net";
+}  // namespace
+
+using ::testing::UnorderedElementsAre;
+
+class PolicyTest : public ::testing::Test {
+ public:
+  void SetUp() override {
+    document_ = Document::CreateForTest();
+    document_->SetSecurityOrigin(SecurityOrigin::CreateFromString(kSelfOrigin));
+    document_->ApplyFeaturePolicyFromHeader(
+        "fullscreen *; payment 'self'; midi 'none'; camera 'self' "
+        "https://example.com https://example.net");
+  }
+
+  Policy* GetPolicy() const { return policy_; }
+
+ protected:
+  Persistent<Document> document_;
+  Persistent<Policy> policy_;
+};
+
+class DocumentPolicyTest : public PolicyTest {
+ public:
+  void SetUp() override {
+    PolicyTest::SetUp();
+    policy_ = new DocumentPolicy(document_);
+  }
+};
+
+class IFramePolicyTest : public PolicyTest {
+ public:
+  void SetUp() override {
+    PolicyTest::SetUp();
+    policy_ = new IFramePolicy(document_, {},
+                               SecurityOrigin::CreateFromString(kSelfOrigin));
+  }
+};
+
+TEST_F(DocumentPolicyTest, TestAllowsFeature) {
+  EXPECT_FALSE(GetPolicy()->allowsFeature("badfeature"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("midi"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("midi", kSelfOrigin));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen"));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen", kOriginA));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("payment"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginA));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginB));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("camera"));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("camera", kOriginA));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("camera", kOriginB));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("camera", "https://badorigin.com"));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("geolocation", kSelfOrigin));
+}
+
+TEST_F(DocumentPolicyTest, TestGetAllowList) {
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("camera"),
+              UnorderedElementsAre(kSelfOrigin, kOriginA, kOriginB));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("payment"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("geolocation"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("fullscreen"),
+              UnorderedElementsAre("*"));
+  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("badfeature").IsEmpty());
+  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("midi").IsEmpty());
+}
+
+TEST_F(DocumentPolicyTest, TestAllowedFeatures) {
+  Vector<String> allowed_features = GetPolicy()->allowedFeatures();
+  EXPECT_TRUE(allowed_features.Contains("fullscreen"));
+  EXPECT_TRUE(allowed_features.Contains("payment"));
+  EXPECT_TRUE(allowed_features.Contains("camera"));
+  // "geolocation" has default policy as allowed on self origin.
+  EXPECT_TRUE(allowed_features.Contains("geolocation"));
+  EXPECT_FALSE(allowed_features.Contains("badfeature"));
+  EXPECT_FALSE(allowed_features.Contains("midi"));
+}
+
+TEST_F(IFramePolicyTest, TestAllowsFeature) {
+  EXPECT_FALSE(GetPolicy()->allowsFeature("badfeature"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("midi"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("midi", kSelfOrigin));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("fullscreen", kOriginA));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("fullscreen", kSelfOrigin));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("payment"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginA));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("payment", kOriginB));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("camera"));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("camera", kOriginA));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("camera", kOriginB));
+  EXPECT_FALSE(GetPolicy()->allowsFeature("camera", "https://badorigin.com"));
+  EXPECT_TRUE(GetPolicy()->allowsFeature("geolocation", kSelfOrigin));
+}
+
+TEST_F(IFramePolicyTest, TestGetAllowList) {
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("camera"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("payment"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("geolocation"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_THAT(GetPolicy()->getAllowlistForFeature("fullscreen"),
+              UnorderedElementsAre(kSelfOrigin));
+  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("badfeature").IsEmpty());
+  EXPECT_TRUE(GetPolicy()->getAllowlistForFeature("midi").IsEmpty());
+}
+
+TEST_F(IFramePolicyTest, TestAllowedFeatures) {
+  Vector<String> allowed_features = GetPolicy()->allowedFeatures();
+  EXPECT_TRUE(allowed_features.Contains("fullscreen"));
+  EXPECT_TRUE(allowed_features.Contains("payment"));
+  EXPECT_TRUE(allowed_features.Contains("camera"));
+  // "geolocation" has default policy as allowed on self origin.
+  EXPECT_TRUE(allowed_features.Contains("geolocation"));
+  EXPECT_FALSE(allowed_features.Contains("badfeature"));
+  EXPECT_FALSE(allowed_features.Contains("midi"));
+}
+
+TEST_F(IFramePolicyTest, TestCombinedPolicy) {
+  ParsedFeaturePolicy container_policy = ParseFeaturePolicyAttribute(
+      "geolocation 'src'; payment 'none'; midi; camera 'src'",
+      SecurityOrigin::CreateFromString(kSelfOrigin),
+      SecurityOrigin::CreateFromString(kOriginA), nullptr, nullptr);
+  GetPolicy()->UpdateContainerPolicy(
+      container_policy, SecurityOrigin::CreateFromString(kOriginA));
+  Vector<String> allowed_features = GetPolicy()->allowedFeatures();
+  EXPECT_TRUE(allowed_features.Contains("fullscreen"));
+  EXPECT_FALSE(allowed_features.Contains("payment"));
+  EXPECT_TRUE(allowed_features.Contains("geolocation"));
+  EXPECT_FALSE(allowed_features.Contains("midi"));
+  EXPECT_TRUE(allowed_features.Contains("camera"));
+  // "geolocation" has default policy as allowed on self origin.
+  EXPECT_FALSE(allowed_features.Contains("badfeature"));
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index 6473388..ee2174f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -140,7 +140,7 @@
 };
 
 // CSS3 Background Position
-enum BackgroundEdgeOrigin { kTopEdge, kRightEdge, kBottomEdge, kLeftEdge };
+enum class BackgroundEdgeOrigin : unsigned { kTop, kRight, kBottom, kLeft };
 
 // CSS Mask Source Types
 enum EMaskSourceType { kMaskAlpha, kMaskLuminance };
diff --git a/third_party/WebKit/Source/core/style/FillLayer.cpp b/third_party/WebKit/Source/core/style/FillLayer.cpp
index ee6cc8f..f4c8b35 100644
--- a/third_party/WebKit/Source/core/style/FillLayer.cpp
+++ b/third_party/WebKit/Source/core/style/FillLayer.cpp
@@ -62,8 +62,8 @@
               : static_cast<unsigned>(EFillSizeType::kSizeNone)),
       blend_mode_(static_cast<unsigned>(FillLayer::InitialFillBlendMode(type))),
       mask_source_type_(FillLayer::InitialFillMaskSourceType(type)),
-      background_x_origin_(kLeftEdge),
-      background_y_origin_(kTopEdge),
+      background_x_origin_(static_cast<unsigned>(BackgroundEdgeOrigin::kLeft)),
+      background_y_origin_(static_cast<unsigned>(BackgroundEdgeOrigin::kTop)),
       image_set_(use_initial_values),
       attachment_set_(use_initial_values),
       clip_set_(use_initial_values),
diff --git a/third_party/WebKit/Source/core/style/FillLayer.h b/third_party/WebKit/Source/core/style/FillLayer.h
index ea0439a..98dadb9 100644
--- a/third_party/WebKit/Source/core/style/FillLayer.h
+++ b/third_party/WebKit/Source/core/style/FillLayer.h
@@ -125,20 +125,20 @@
     x_position_ = position;
     x_pos_set_ = true;
     background_x_origin_set_ = false;
-    background_x_origin_ = kLeftEdge;
+    background_x_origin_ = static_cast<unsigned>(BackgroundEdgeOrigin::kLeft);
   }
   void SetYPosition(const Length& position) {
     y_position_ = position;
     y_pos_set_ = true;
     background_y_origin_set_ = false;
-    background_y_origin_ = kTopEdge;
+    background_y_origin_ = static_cast<unsigned>(BackgroundEdgeOrigin::kTop);
   }
   void SetBackgroundXOrigin(BackgroundEdgeOrigin origin) {
-    background_x_origin_ = origin;
+    background_x_origin_ = static_cast<unsigned>(origin);
     background_x_origin_set_ = true;
   }
   void SetBackgroundYOrigin(BackgroundEdgeOrigin origin) {
-    background_y_origin_ = origin;
+    background_y_origin_ = static_cast<unsigned>(origin);
     background_y_origin_set_ = true;
   }
   void SetAttachment(EFillAttachment attachment) {
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index cdadc62a..d0e4d221 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -267,12 +267,6 @@
       ->LayoutViewportScrollableArea()
       ->SetScrollOffset(ScrollOffset(), kProgrammaticScroll);
   OverrideUserPreferredLanguagesForTesting(Vector<AtomicString>());
-  if (!page->DeprecatedLocalMainFrame()
-           ->GetSpellChecker()
-           .IsSpellCheckingEnabled())
-    page->DeprecatedLocalMainFrame()
-        ->GetSpellChecker()
-        .ToggleSpellCheckingEnabled();
   if (page->DeprecatedLocalMainFrame()->GetEditor().IsOverwriteModeEnabled())
     page->DeprecatedLocalMainFrame()->GetEditor().ToggleOverwriteModeEnabled();
 
diff --git a/third_party/WebKit/Source/devtools/front_end/accessibility/axBreadcrumbs.css b/third_party/WebKit/Source/devtools/front_end/accessibility/axBreadcrumbs.css
index 35a67fb..febc62c 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/axBreadcrumbs.css
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/axBreadcrumbs.css
@@ -45,13 +45,13 @@
     -webkit-mask-size: 30px 10px;
     -webkit-mask-repeat: no-repeat;
     background-color: rgb(48, 57, 66);
-    content: "&nbsp;";
-    color: transparent;
+    content: "";
     text-shadow: none;
     margin-right: -2px;
     height: 12px;
     width: 14px;
     position: absolute;
+    display: inline-block;
 }
 
 @media (-webkit-min-device-pixel-ratio: 1.1) {
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js b/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
index a3c59f8..af8a9eb 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsolePanel.js
@@ -58,9 +58,11 @@
    */
   willHide() {
     super.willHide();
+    // The minimized drawer has 0 height, and showing Console inside may set
+    // Console's scrollTop to 0. Unminimize before calling show to avoid this.
+    UI.inspectorView.setDrawerMinimized(false);
     if (Console.ConsolePanel.WrapperView._instance)
       Console.ConsolePanel.WrapperView._instance._showViewInWrapper();
-    UI.inspectorView.setDrawerMinimized(false);
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index d312b96..03714ed7 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -368,8 +368,11 @@
    * @override
    */
   focus() {
-    if (!this._prompt.hasFocus())
+    if (!this._prompt.hasFocus()) {
+      var oldScrollTop = this._viewport.element.scrollTop;
       this._prompt.focus();
+      this._viewport.element.scrollTop = oldScrollTop;
+    }
   }
 
   /**
@@ -847,10 +850,7 @@
       var clickedOutsideMessageList = event.target === this._messagesElement;
       if (clickedOutsideMessageList)
         this._prompt.moveCaretToEndOfPrompt();
-      // Prevent scrolling when expanding objects in console, but focus the prompt anyway.
-      var oldScrollTop = this._viewport.element.scrollTop;
       this.focus();
-      this._viewport.element.scrollTop = oldScrollTop;
     }
     // TODO: fix this.
     var groupMessage = event.target.enclosingNodeOrSelfWithClass('console-group-title');
@@ -1146,7 +1146,8 @@
      */
     function updateViewportState() {
       this._muteViewportUpdates = false;
-      this._viewport.setStickToBottom(this._messagesElement.isScrolledToBottom());
+      if (this.isShowing())
+        this._viewport.setStickToBottom(this._messagesElement.isScrolledToBottom());
       if (this._maybeDirtyWhileMuted) {
         this._scheduleViewportRefresh();
         delete this._maybeDirtyWhileMuted;
diff --git a/third_party/WebKit/Source/devtools/front_end/console_test_runner/ConsoleTestRunner.js b/third_party/WebKit/Source/devtools/front_end/console_test_runner/ConsoleTestRunner.js
index 684407b..5b336d2d 100644
--- a/third_party/WebKit/Source/devtools/front_end/console_test_runner/ConsoleTestRunner.js
+++ b/third_party/WebKit/Source/devtools/front_end/console_test_runner/ConsoleTestRunner.js
@@ -492,6 +492,14 @@
 };
 
 /**
+ * @param {number} expectedCount
+ * @return {!Promise}
+ */
+ConsoleTestRunner.waitForConsoleMessagesPromise = function(expectedCount) {
+  return new Promise(fulfill => ConsoleTestRunner.waitForConsoleMessages(expectedCount, fulfill));
+};
+
+/**
  * @param {number} fromMessage
  * @param {number} fromTextOffset
  * @param {number} toMessage
diff --git a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
index 17cba4383..f48c1126 100644
--- a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
+++ b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
@@ -659,14 +659,6 @@
 
     /**
      * @override
-     * @return {boolean}
-     */
-    isUnderTest() {
-      return DevToolsHost.isUnderTest();
-    }
-
-    /**
-     * @override
      * @param {function()} callback
      */
     reattach(callback) {
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
index 2887ebd..896352e1 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
@@ -48,7 +48,7 @@
     modeToolbar.makeWrappable();
     this._fillModeToolbar(modeToolbar);
     rightContainer.createChild('div', 'device-mode-toolbar-spacer');
-    var optionsToolbar = new UI.Toolbar('', rightContainer);
+    var optionsToolbar = new UI.Toolbar('device-mode-toolbar-options', rightContainer);
     optionsToolbar.makeWrappable(true);
     this._fillOptionsToolbar(optionsToolbar);
 
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css b/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
index 25c4721..b542d72 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
@@ -30,6 +30,12 @@
     flex: 0 1 auto;
 }
 
+.device-mode-toolbar-options.toolbar {
+    position: sticky;
+    right: 0;
+    flex: none;
+}
+
 .device-mode-toolbar-spacer {
     flex: 1 1 0;
     display: flex;
diff --git a/third_party/WebKit/Source/devtools/front_end/externs.js b/third_party/WebKit/Source/devtools/front_end/externs.js
index 26138d5..579f68d 100644
--- a/third_party/WebKit/Source/devtools/front_end/externs.js
+++ b/third_party/WebKit/Source/devtools/front_end/externs.js
@@ -270,11 +270,6 @@
 /**
  * @return {boolean}
  */
-DevToolsHost.isUnderTest = function() {};
-
-/**
- * @return {boolean}
- */
 DevToolsHost.isHostedMode = function() {};
 
 /**
diff --git a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
index 599f90c16..cff0911d 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
@@ -370,14 +370,6 @@
 
   /**
    * @override
-   * @return {boolean}
-   */
-  isUnderTest() {
-    return false;
-  }
-
-  /**
-   * @override
    * @param {function()} callback
    */
   reattach(callback) {
@@ -554,12 +546,13 @@
  * @return {boolean}
  */
 Host.isUnderTest = function(prefs) {
-  if (InspectorFrontendHost.isUnderTest())
+  // Integration tests rely on test queryParam.
+  if (Runtime.queryParam('test'))
     return true;
-
+  // Browser tests rely on prefs.
   if (prefs)
     return prefs['isUnderTest'] === 'true';
-  return Common.settings.createSetting('isUnderTest', false).get();
+  return Common.settings && Common.settings.createSetting('isUnderTest', false).get();
 };
 
 /**
diff --git a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
index ccb741d..51c880a 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
@@ -316,11 +316,6 @@
    */
   reattach(callback) {},
 
-  /**
-   * @return {boolean}
-   */
-  isUnderTest() {},
-
   readyForTest() {},
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index a1a8fac..d923a166 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -87,15 +87,15 @@
    * Note: this function is called from testSettings in Tests.js.
    */
   _createSettings(prefs) {
-    this._initializeExperiments(prefs);
+    this._initializeExperiments();
     var storagePrefix = '';
     if (Host.isCustomDevtoolsFrontend())
       storagePrefix = '__custom__';
-    else if (!Runtime.queryParam('can_dock') && !!Runtime.queryParam('debugFrontend') && !Host.isUnderTest(prefs))
+    else if (!Runtime.queryParam('can_dock') && !!Runtime.queryParam('debugFrontend') && !Host.isUnderTest())
       storagePrefix = '__bundled__';
 
     var localStorage;
-    if (!Host.isUnderTest(prefs) && window.localStorage) {
+    if (!Host.isUnderTest() && window.localStorage) {
       localStorage = new Common.SettingsStorage(
           window.localStorage, undefined, undefined, () => window.localStorage.clear(), storagePrefix);
     } else {
@@ -105,14 +105,11 @@
         prefs, InspectorFrontendHost.setPreference, InspectorFrontendHost.removePreference,
         InspectorFrontendHost.clearPreferences, storagePrefix);
     Common.settings = new Common.Settings(globalStorage, localStorage);
-    if (!Host.isUnderTest(prefs))
+    if (!Host.isUnderTest())
       new Common.VersionController().updateVersion();
   }
 
-  /**
-   * @param {!Object<string, string>} prefs
-   */
-  _initializeExperiments(prefs) {
+  _initializeExperiments() {
     // Keep this sorted alphabetically: both keys and values.
     Runtime.experiments.register('accessibilityInspection', 'Accessibility Inspection');
     Runtime.experiments.register('applyCustomStylesheet', 'Allow custom UI themes');
@@ -143,8 +140,8 @@
 
     Runtime.experiments.cleanUpStaleExperiments();
 
-    if (Host.isUnderTest(prefs)) {
-      var testPath = Runtime.queryParam('test') || JSON.parse(prefs['testPath'] || '""');
+    if (Host.isUnderTest()) {
+      var testPath = Runtime.queryParam('test');
       // Enable experiments for testing.
       if (testPath.indexOf('accessibility/') !== -1)
         Runtime.experiments.enableForTest('accessibilityInspection');
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
index 794568c..a55bf58c 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestHeadersView.js
@@ -186,13 +186,27 @@
    * @param {?string} sourceText
    */
   _populateTreeElementWithSourceText(treeElement, sourceText) {
+    var max_len = 3000;
+    var text = (sourceText || '').trim();
+    var trim = text.length > max_len;
+
     var sourceTextElement = createElementWithClass('span', 'header-value source-code');
-    sourceTextElement.textContent = String(sourceText || '').trim();
+    sourceTextElement.textContent = trim ? text.substr(0, max_len) : text;
 
     var sourceTreeElement = new UI.TreeElement(sourceTextElement);
     sourceTreeElement.selectable = false;
     treeElement.removeChildren();
     treeElement.appendChild(sourceTreeElement);
+    if (!trim)
+      return;
+
+    var showMoreButton = createElementWithClass('button', 'request-headers-show-more-button');
+    showMoreButton.textContent = Common.UIString('Show more');
+    showMoreButton.addEventListener('click', () => {
+      showMoreButton.remove();
+      sourceTextElement.textContent = text;
+    });
+    sourceTextElement.appendChild(showMoreButton);
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/network/requestHeadersTree.css b/third_party/WebKit/Source/devtools/front_end/network/requestHeadersTree.css
index d253dea..2b2239b 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/requestHeadersTree.css
+++ b/third_party/WebKit/Source/devtools/front_end/network/requestHeadersTree.css
@@ -81,3 +81,14 @@
 .tree-outline .empty-request-header {
     color: rgba(33%, 33%, 33%, 0.5);
 }
+
+.request-headers-show-more-button {
+    border: none;
+    border-radius: 3px;
+    display: inline-block;
+    font-size: 12px;
+    font-family: sans-serif;
+    cursor: pointer;
+    margin: 0 4px;
+    padding: 2px 4px;
+}
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompilerPlugin.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompilerPlugin.js
index 937b73d..6c9670b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompilerPlugin.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompilerPlugin.js
@@ -73,8 +73,11 @@
     if (!currentExecutionContext)
       return;
 
-    this._compiling = true;
     var code = this._textEditor.text();
+    if (code.length > 1024 * 1024)
+      return;
+
+    this._compiling = true;
     var result = await runtimeModel.compileScript(code, '', false, currentExecutionContext.id);
 
     this._compiling = false;
diff --git a/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js b/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
index b7db8d1..c4be7f5 100644
--- a/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
+++ b/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
@@ -1307,10 +1307,7 @@
  * @return {string}
  */
 TestRunner.url = function(url = '') {
-  // TODO(chenwilliam): only new-style tests will have a test queryParam;
-  // remove inspectedURL() after all tests have been migrated to new test framework.
-  var testScriptURL =
-      /** @type {string} */ (Runtime.queryParam('test')) || SDK.targetManager.mainTarget().inspectedURL();
+  var testScriptURL = /** @type {string} */ (Runtime.queryParam('test'));
 
   // This handles relative (e.g. "../file"), root (e.g. "/resource"),
   // absolute (e.g. "http://", "data:") and empty (e.g. "") paths
@@ -1414,10 +1411,6 @@
   return !self.testRunner || !!Runtime.queryParam('debugFrontend');
 };
 
-// Old-style tests start test using inspector-test.js
-if (Runtime.queryParam('test'))
-  SDK.targetManager.observeTargets(new TestRunner._TestObserver());
-
 (function() {
 /**
    * @param {string|!Event} message
@@ -1434,10 +1427,8 @@
 self['onerror'] = completeTestOnError;
 InspectorFrontendHost.events.addEventListener(
     InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, TestRunner._evaluateForTestInFrontend, TestRunner);
-// TODO(chenwilliam): remove check for legacy test when test migration is done.
-if (!Runtime.queryParam('test'))
-  return;
 TestRunner._printDevToolsConsole();
 if (Host.isStartupTest())
   TestRunner._executeTestScript();
+SDK.targetManager.observeTargets(new TestRunner._TestObserver());
 })();
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index 8705011c..04842c4 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -468,7 +468,13 @@
    * @override
    */
   wasShown() {
-    this._materialize();
+    this._materialize().then(() => {
+      this._wasShownForTest();
+    });
+  }
+
+  _wasShownForTest() {
+    // This method is sniffed in tests.
   }
 };
 
diff --git a/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletGlobalScopeTest.cpp b/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletGlobalScopeTest.cpp
index f479c17..c59865a 100644
--- a/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletGlobalScopeTest.cpp
+++ b/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletGlobalScopeTest.cpp
@@ -12,7 +12,7 @@
 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
 #include "core/dom/Document.h"
 #include "core/origin_trials/OriginTrialContext.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "core/workers/GlobalScopeCreationParams.h"
 #include "core/workers/WorkerReportingProxy.h"
 #include "modules/animationworklet/AnimationWorklet.h"
@@ -32,14 +32,14 @@
 
 namespace blink {
 
-class AnimationWorkletGlobalScopeTest : public ::testing::Test {
+class AnimationWorkletGlobalScopeTest : public PageTestBase {
  public:
   AnimationWorkletGlobalScopeTest() {}
 
   void SetUp() override {
     AnimationWorkletThread::CreateSharedBackingThreadForTest();
-    page_ = DummyPageHolder::Create();
-    Document* document = page_->GetFrame().GetDocument();
+    PageTestBase::SetUp(IntSize());
+    Document* document = &GetDocument();
     document->SetURL(KURL("https://example.com/"));
     document->UpdateSecurityOrigin(SecurityOrigin::Create(document->Url()));
     reporting_proxy_ = std::make_unique<WorkerReportingProxy>();
@@ -55,7 +55,7 @@
 
     WorkerClients* clients = WorkerClients::Create();
 
-    Document* document = page_->GetFrame().GetDocument();
+    Document* document = &GetDocument();
     thread->Start(
         std::make_unique<GlobalScopeCreationParams>(
             document->Url(), document->UserAgent(),
@@ -275,7 +275,6 @@
     return value.IsEmpty();
   }
 
-  std::unique_ptr<DummyPageHolder> page_;
   std::unique_ptr<WorkerReportingProxy> reporting_proxy_;
 };
 
diff --git a/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletThreadTest.cpp b/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletThreadTest.cpp
index 13c032d..fd1493a 100644
--- a/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletThreadTest.cpp
@@ -13,7 +13,7 @@
 #include "core/dom/AnimationWorkletProxyClient.h"
 #include "core/inspector/ConsoleMessage.h"
 #include "core/origin_trials/OriginTrialContext.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "core/workers/GlobalScopeCreationParams.h"
 #include "core/workers/ParentFrameTaskRunners.h"
 #include "core/workers/WorkerBackingThread.h"
@@ -67,12 +67,12 @@
 
 }  // namespace
 
-class AnimationWorkletThreadTest : public ::testing::Test {
+class AnimationWorkletThreadTest : public PageTestBase {
  public:
   void SetUp() override {
     AnimationWorkletThread::CreateSharedBackingThreadForTest();
-    page_ = DummyPageHolder::Create();
-    Document* document = page_->GetFrame().GetDocument();
+    PageTestBase::SetUp(IntSize());
+    Document* document = &GetDocument();
     document->SetURL(KURL("https://example.com/"));
     document->UpdateSecurityOrigin(SecurityOrigin::Create(document->Url()));
     reporting_proxy_ = std::make_unique<WorkerReportingProxy>();
@@ -89,7 +89,7 @@
 
     std::unique_ptr<AnimationWorkletThread> thread =
         AnimationWorkletThread::Create(nullptr, *reporting_proxy_);
-    Document* document = page_->GetFrame().GetDocument();
+    Document* document = &GetDocument();
     thread->Start(
         std::make_unique<GlobalScopeCreationParams>(
             document->Url(), document->UserAgent(),
@@ -134,7 +134,6 @@
     wait_event->Signal();
   }
 
-  std::unique_ptr<DummyPageHolder> page_;
   std::unique_ptr<WorkerReportingProxy> reporting_proxy_;
   ScopedTestingPlatformSupport<AnimationWorkletTestPlatform> platform_;
 };
diff --git a/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp b/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
index 95c2412..f1ea1d9 100644
--- a/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
+++ b/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
@@ -9,14 +9,33 @@
 #include "core/clipboard/DataTransfer.h"
 #include "core/clipboard/DataTransferItem.h"
 #include "core/clipboard/DataTransferItemList.h"
-#include "platform/CrossThreadFunctional.h"
+#include "core/dom/ExecutionContext.h"
+#include "core/frame/LocalFrame.h"
+#include "modules/permissions/PermissionUtils.h"
 #include "platform/clipboard/ClipboardMimeTypes.h"
 #include "public/platform/Platform.h"
 #include "public/platform/TaskType.h"
+#include "public/platform/modules/permissions/permission.mojom-blink.h"
 #include "third_party/WebKit/public/platform/WebClipboard.h"
 
+// And now, a brief note about clipboard permissions.
+//
+// There are 2 clipboard permissions defined in the spec:
+// * clipboard-read
+// * clipboard-write
+// See https://w3c.github.io/clipboard-apis/#clipboard-permissions
+//
+// In Chromium we automatically grant clipboard-write access and clipboard-read
+// access is gated behind a permission prompt. Both clipboard read and write
+// require the tab to be focused (and Chromium must be the foreground app) for
+// the operation to be allowed.
+
 namespace blink {
 
+using mojom::blink::PermissionStatus;
+using mojom::blink::PermissionService;
+using mojom::PageVisibilityState;
+
 ScriptPromise ClipboardPromise::CreateForRead(ScriptState* script_state) {
   ClipboardPromise* clipboard_promise = new ClipboardPromise(script_state);
   clipboard_promise->GetTaskRunner()->PostTask(
@@ -54,17 +73,84 @@
 
 ClipboardPromise::ClipboardPromise(ScriptState* script_state)
     : ContextLifecycleObserver(blink::ExecutionContext::From(script_state)),
+      script_state_(script_state),
       script_promise_resolver_(ScriptPromiseResolver::Create(script_state)),
-      buffer_(mojom::ClipboardBuffer::kStandard) {}
+      buffer_(mojom::ClipboardBuffer::kStandard),
+      write_data_() {}
 
 scoped_refptr<WebTaskRunner> ClipboardPromise::GetTaskRunner() {
   // TODO(garykac): Replace MiscPlatformAPI with TaskType specific to clipboard.
   return GetExecutionContext()->GetTaskRunner(TaskType::kMiscPlatformAPI);
 }
 
-// TODO(garykac): This currently only handles plain text.
-void ClipboardPromise::HandleRead() {
+PermissionService* ClipboardPromise::GetPermissionService() {
+  if (!permission_service_) {
+    ConnectToPermissionService(ExecutionContext::From(script_state_),
+                               mojo::MakeRequest(&permission_service_));
+  }
+  return permission_service_.get();
+}
+
+bool ClipboardPromise::IsFocusedDocument(ExecutionContext* context) {
+  DCHECK(context->IsDocument());
+  Document* doc = ToDocumentOrNull(context);
+  return doc && doc->hasFocus();
+}
+
+void ClipboardPromise::RequestReadPermission(
+    PermissionService::RequestPermissionCallback callback) {
   DCHECK(script_promise_resolver_);
+
+  ExecutionContext* context = ExecutionContext::From(script_state_);
+  DCHECK(context->IsSecureContext());  // [SecureContext] in IDL
+
+  // Document must be focused.
+  if (!IsFocusedDocument(context) || !GetPermissionService()) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
+  // Query for permission if necessary.
+  // See crbug.com/795929 for moving this check into the Browser process.
+  permission_service_->RequestPermission(
+      CreateClipboardPermissionDescriptor(
+          mojom::blink::PermissionName::CLIPBOARD_READ, false),
+      false, std::move(callback));
+}
+
+void ClipboardPromise::CheckWritePermission(
+    PermissionService::HasPermissionCallback callback) {
+  DCHECK(script_promise_resolver_);
+
+  ExecutionContext* context = ExecutionContext::From(script_state_);
+  DCHECK(context->IsSecureContext());  // [SecureContext] in IDL
+
+  // Document must be focused.
+  if (!IsFocusedDocument(context) || !GetPermissionService()) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
+  // Check current permission (but do not query the user).
+  // See crbug.com/795929 for moving this check into the Browser process.
+  permission_service_->HasPermission(
+      CreateClipboardPermissionDescriptor(
+          mojom::blink::PermissionName::CLIPBOARD_WRITE, false),
+      std::move(callback));
+}
+
+void ClipboardPromise::HandleRead() {
+  RequestReadPermission(WTF::Bind(&ClipboardPromise::HandleReadWithPermission,
+                                  WrapPersistent(this)));
+}
+
+// TODO(garykac): This currently only handles plain text.
+void ClipboardPromise::HandleReadWithPermission(PermissionStatus status) {
+  if (status != PermissionStatus::GRANTED) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
   String plain_text = Platform::Current()->Clipboard()->ReadPlainText(buffer_);
 
   const DataTransfer::DataTransferType type =
@@ -77,32 +163,61 @@
 }
 
 void ClipboardPromise::HandleReadText() {
-  DCHECK(script_promise_resolver_);
+  RequestReadPermission(WTF::Bind(
+      &ClipboardPromise::HandleReadTextWithPermission, WrapPersistent(this)));
+}
+
+void ClipboardPromise::HandleReadTextWithPermission(PermissionStatus status) {
+  if (status != PermissionStatus::GRANTED) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
   String text = Platform::Current()->Clipboard()->ReadPlainText(buffer_);
   script_promise_resolver_->Resolve(text);
 }
 
 // TODO(garykac): This currently only handles plain text.
 void ClipboardPromise::HandleWrite(DataTransfer* data) {
-  DCHECK(script_promise_resolver_);
+  // Scan DataTransfer and extract data types that we support.
   size_t num_items = data->items()->length();
   for (unsigned long i = 0; i < num_items; i++) {
     DataTransferItem* item = data->items()->item(i);
     DataObjectItem* objectItem = item->GetDataObjectItem();
     if (objectItem->Kind() == DataObjectItem::kStringKind &&
         objectItem->GetType() == kMimeTypeTextPlain) {
-      String text = objectItem->GetAsString();
-      Platform::Current()->Clipboard()->WritePlainText(text);
-      script_promise_resolver_->Resolve();
-      return;
+      write_data_ = objectItem->GetAsString();
+      break;
     }
   }
-  script_promise_resolver_->Reject();
+  CheckWritePermission(WTF::Bind(&ClipboardPromise::HandleWriteWithPermission,
+                                 WrapPersistent(this)));
+}
+
+void ClipboardPromise::HandleWriteWithPermission(PermissionStatus status) {
+  if (status != PermissionStatus::GRANTED) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
+  Platform::Current()->Clipboard()->WritePlainText(write_data_);
+  script_promise_resolver_->Resolve();
 }
 
 void ClipboardPromise::HandleWriteText(const String& data) {
+  write_data_ = data;
+  CheckWritePermission(WTF::Bind(
+      &ClipboardPromise::HandleWriteTextWithPermission, WrapPersistent(this)));
+}
+
+void ClipboardPromise::HandleWriteTextWithPermission(PermissionStatus status) {
+  if (status != PermissionStatus::GRANTED) {
+    script_promise_resolver_->Reject();
+    return;
+  }
+
   DCHECK(script_promise_resolver_);
-  Platform::Current()->Clipboard()->WritePlainText(data);
+  Platform::Current()->Clipboard()->WritePlainText(write_data_);
   script_promise_resolver_->Resolve();
 }
 
diff --git a/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h b/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h
index 8b0c254..b4aa20e 100644
--- a/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h
+++ b/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h
@@ -8,6 +8,7 @@
 #include "bindings/core/v8/ScriptPromise.h"
 #include "core/CoreExport.h"
 #include "core/dom/ContextLifecycleObserver.h"
+#include "public/platform/modules/permissions/permission.mojom-blink.h"
 #include "third_party/WebKit/common/clipboard/clipboard.mojom-blink.h"
 
 namespace blink {
@@ -35,16 +36,36 @@
   ClipboardPromise(ScriptState*);
 
   scoped_refptr<WebTaskRunner> GetTaskRunner();
+  mojom::blink::PermissionService* GetPermissionService();
+
+  bool IsFocusedDocument(ExecutionContext*);
+
+  void RequestReadPermission(
+      mojom::blink::PermissionService::RequestPermissionCallback);
+  void CheckWritePermission(
+      mojom::blink::PermissionService::HasPermissionCallback);
 
   void HandleRead();
+  void HandleReadWithPermission(mojom::blink::PermissionStatus);
+
   void HandleReadText();
+  void HandleReadTextWithPermission(mojom::blink::PermissionStatus);
 
   void HandleWrite(DataTransfer*);
+  void HandleWriteWithPermission(mojom::blink::PermissionStatus);
+
   void HandleWriteText(const String&);
+  void HandleWriteTextWithPermission(mojom::blink::PermissionStatus);
+
+  ScriptState* script_state_;
 
   Member<ScriptPromiseResolver> script_promise_resolver_;
 
+  mojom::blink::PermissionServicePtr permission_service_;
+
   mojom::ClipboardBuffer buffer_;
+
+  WebString write_data_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
index 1c467a9..09a7185 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
@@ -43,103 +43,9 @@
 namespace blink {
 namespace {
 
-bool IsSameOriginWithAncestors(Frame* frame) {
-  if (!frame)
-    return true;
-
-  Frame* current = frame;
-  const SecurityOrigin* origin =
-      frame->GetSecurityContext()->GetSecurityOrigin();
-  while (current->Tree().Parent()) {
-    current = current->Tree().Parent();
-    if (!origin->CanAccess(current->GetSecurityContext()->GetSecurityOrigin()))
-      return false;
-  }
-  return true;
-}
-
-void RejectDueToCredentialManagerError(ScriptPromiseResolver* resolver,
-                                       WebCredentialManagerError reason) {
-  switch (reason) {
-    case kWebCredentialManagerDisabledError:
-      resolver->Reject(DOMException::Create(
-          kInvalidStateError, "The credential manager is disabled."));
-      break;
-    case kWebCredentialManagerPendingRequestError:
-      resolver->Reject(DOMException::Create(kInvalidStateError,
-                                            "A request is already pending."));
-      break;
-    case kWebCredentialManagerNotAllowedError:
-      resolver->Reject(DOMException::Create(kNotAllowedError,
-                                            "The operation is not allowed."));
-      break;
-    case kWebCredentialManagerNotSupportedError:
-      resolver->Reject(DOMException::Create(
-          kNotSupportedError,
-          "Parameters for this operation are not supported."));
-      break;
-    case kWebCredentialManagerSecurityError:
-      resolver->Reject(DOMException::Create(kSecurityError,
-                                            "The operation is insecure and "
-                                            "is not allowed."));
-      break;
-    case kWebCredentialManagerCancelledError:
-      resolver->Reject(DOMException::Create(
-          kNotAllowedError, "The user cancelled the operation."));
-      break;
-    case kWebCredentialManagerNotImplementedError:
-      resolver->Reject(DOMException::Create(
-          kNotAllowedError, "The operation is not implemented."));
-      break;
-    case kWebCredentialManagerUnknownError:
-    default:
-      resolver->Reject(DOMException::Create(kNotReadableError,
-                                            "An unknown error occurred while "
-                                            "talking to the credential "
-                                            "manager."));
-      break;
-  }
-}
-
-bool CheckBoilerplate(ScriptPromiseResolver* resolver) {
-  String error_message;
-  if (!ExecutionContext::From(resolver->GetScriptState())
-           ->IsSecureContext(error_message)) {
-    resolver->Reject(DOMException::Create(kSecurityError, error_message));
-    return false;
-  }
-
-  CredentialManagerClient* client = CredentialManagerClient::From(
-      ExecutionContext::From(resolver->GetScriptState()));
-  if (!client) {
-    resolver->Reject(DOMException::Create(
-        kInvalidStateError,
-        "Could not establish connection to the credential manager."));
-    return false;
-  }
-
-  return true;
-}
-
-bool IsIconURLInsecure(const Credential* credential) {
-  PlatformCredential* platform_credential = credential->GetPlatformCredential();
-  auto is_insecure = [](const KURL& url) {
-    return !url.IsEmpty() && !url.ProtocolIs("https");
-  };
-  if (platform_credential->IsFederated()) {
-    return is_insecure(
-        static_cast<PlatformFederatedCredential*>(platform_credential)
-            ->IconURL());
-  }
-  if (platform_credential->IsPassword()) {
-    return is_insecure(
-        static_cast<PlatformPasswordCredential*>(platform_credential)
-            ->IconURL());
-  }
-  return false;
-}
-
-}  // namespace
+bool IsSameOriginWithAncestors(Frame*);
+void RejectDueToCredentialManagerError(ScriptPromiseResolver*,
+                                       WebCredentialManagerError);
 
 class NotificationCallbacks
     : public WebCredentialManagerClient::NotificationCallbacks {
@@ -267,6 +173,109 @@
   const Persistent<ScriptPromiseResolver> resolver_;
 };
 
+bool IsSameOriginWithAncestors(Frame* frame) {
+  if (!frame)
+    return true;
+
+  Frame* current = frame;
+  const SecurityOrigin* origin =
+      frame->GetSecurityContext()->GetSecurityOrigin();
+  while (current->Tree().Parent()) {
+    current = current->Tree().Parent();
+    if (!origin->CanAccess(current->GetSecurityContext()->GetSecurityOrigin()))
+      return false;
+  }
+  return true;
+}
+
+bool CheckBoilerplate(ScriptPromiseResolver* resolver) {
+  String error_message;
+  if (!ExecutionContext::From(resolver->GetScriptState())
+           ->IsSecureContext(error_message)) {
+    resolver->Reject(DOMException::Create(kSecurityError, error_message));
+    return false;
+  }
+
+  CredentialManagerClient* client = CredentialManagerClient::From(
+      ExecutionContext::From(resolver->GetScriptState()));
+  if (!client) {
+    resolver->Reject(DOMException::Create(
+        kInvalidStateError,
+        "Could not establish connection to the credential manager."));
+    return false;
+  }
+
+  return true;
+}
+
+bool IsIconURLEmptyOrSecure(const Credential* credential) {
+  PlatformCredential* platform_credential = credential->GetPlatformCredential();
+  if (!platform_credential->IsPassword() &&
+      !platform_credential->IsFederated()) {
+    return true;
+  }
+
+  const KURL& url =
+      platform_credential->IsFederated()
+          ? static_cast<const PlatformFederatedCredential*>(platform_credential)
+                ->IconURL()
+          : static_cast<const PlatformPasswordCredential*>(platform_credential)
+                ->IconURL();
+
+  if (url.IsEmpty())
+    return true;
+
+  // https://www.w3.org/TR/mixed-content/#a-priori-authenticated-url
+  return url.IsAboutSrcdocURL() || url.IsAboutBlankURL() ||
+         url.ProtocolIsData() ||
+         SecurityOrigin::Create(url)->IsPotentiallyTrustworthy();
+}
+
+void RejectDueToCredentialManagerError(ScriptPromiseResolver* resolver,
+                                       WebCredentialManagerError reason) {
+  switch (reason) {
+    case kWebCredentialManagerDisabledError:
+      resolver->Reject(DOMException::Create(
+          kInvalidStateError, "The credential manager is disabled."));
+      break;
+    case kWebCredentialManagerPendingRequestError:
+      resolver->Reject(DOMException::Create(kInvalidStateError,
+                                            "A request is already pending."));
+      break;
+    case kWebCredentialManagerNotAllowedError:
+      resolver->Reject(DOMException::Create(kNotAllowedError,
+                                            "The operation is not allowed."));
+      break;
+    case kWebCredentialManagerNotSupportedError:
+      resolver->Reject(DOMException::Create(
+          kNotSupportedError,
+          "Parameters for this operation are not supported."));
+      break;
+    case kWebCredentialManagerSecurityError:
+      resolver->Reject(DOMException::Create(kSecurityError,
+                                            "The operation is insecure and "
+                                            "is not allowed."));
+      break;
+    case kWebCredentialManagerCancelledError:
+      resolver->Reject(DOMException::Create(
+          kNotAllowedError, "The user cancelled the operation."));
+      break;
+    case kWebCredentialManagerNotImplementedError:
+      resolver->Reject(DOMException::Create(
+          kNotAllowedError, "The operation is not implemented."));
+      break;
+    case kWebCredentialManagerUnknownError:
+    default:
+      resolver->Reject(DOMException::Create(kNotReadableError,
+                                            "An unknown error occurred while "
+                                            "talking to the credential "
+                                            "manager."));
+      break;
+  }
+}
+
+}  // namespace
+
 CredentialsContainer* CredentialsContainer::Create() {
   return new CredentialsContainer();
 }
@@ -352,7 +361,7 @@
         "Store operation not permitted for PublicKey credentials."));
   }
 
-  if (IsIconURLInsecure(credential)) {
+  if (!IsIconURLEmptyOrSecure(credential)) {
     resolver->Reject(DOMException::Create(kSecurityError,
                                           "'iconURL' should be a secure URL"));
     return promise;
diff --git a/third_party/WebKit/Source/modules/credentialmanager/WebAuthenticationClient.cpp b/third_party/WebKit/Source/modules/credentialmanager/WebAuthenticationClient.cpp
index 43bd921..ecbe84a 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/WebAuthenticationClient.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/WebAuthenticationClient.cpp
@@ -19,10 +19,9 @@
 namespace blink {
 
 namespace {
-using PublicKeyCallbacks = WebAuthenticationClient::PublicKeyCallbacks;
 
 void RespondToPublicKeyCallback(
-    std::unique_ptr<PublicKeyCallbacks> callbacks,
+    std::unique_ptr<WebAuthenticationClient::PublicKeyCallbacks> callbacks,
     webauth::mojom::blink::AuthenticatorStatus status,
     webauth::mojom::blink::PublicKeyCredentialInfoPtr credential) {
   if (status != webauth::mojom::AuthenticatorStatus::SUCCESS) {
@@ -54,7 +53,7 @@
 
 void WebAuthenticationClient::DispatchMakeCredential(
     const MakePublicKeyCredentialOptions& publicKey,
-    std::unique_ptr<PublicKeyCallbacks> callbacks) {
+    std::unique_ptr<WebAuthenticationClient::PublicKeyCallbacks> callbacks) {
   if (!authenticator_) {
     callbacks->OnError(
         WebCredentialManagerError::kWebCredentialManagerNotImplementedError);
@@ -76,7 +75,7 @@
 
 void WebAuthenticationClient::GetAssertion(
     const PublicKeyCredentialRequestOptions& publicKey,
-    PublicKeyCallbacks* callbacks) {
+    WebAuthenticationClient::PublicKeyCallbacks* callbacks) {
   // TODO (kpaulhamus): implement GetAssertion and removed NOTREACHED().
   NOTREACHED();
   return;
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
index 87cdf379..5ac134a 100644
--- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
@@ -5,7 +5,7 @@
 #include "modules/fetch/BlobBytesConsumer.h"
 
 #include "core/loader/ThreadableLoader.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "modules/fetch/BytesConsumerTestUtil.h"
 #include "modules/fetch/DataConsumerHandleTestUtil.h"
 #include "platform/blob/BlobData.h"
@@ -125,15 +125,9 @@
   int num_on_state_change_called_ = 0;
 };
 
-class BlobBytesConsumerTest : public ::testing::Test {
+class BlobBytesConsumerTest : public PageTestBase {
  public:
-  BlobBytesConsumerTest()
-      : dummy_page_holder_(DummyPageHolder::Create(IntSize(1, 1))) {}
-
-  Document& GetDocument() { return dummy_page_holder_->GetDocument(); }
-
- private:
-  std::unique_ptr<DummyPageHolder> dummy_page_holder_;
+  void SetUp() override { PageTestBase::SetUp(IntSize(1, 1)); }
 };
 
 TEST_F(BlobBytesConsumerTest, TwoPhaseRead) {
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp
index 4b91058..b1f75e6a 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandleTest.cpp
@@ -6,7 +6,7 @@
 
 #include <memory>
 
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "modules/fetch/BytesConsumer.h"
 #include "modules/fetch/DataConsumerHandleTestUtil.h"
 #include "platform/testing/UnitTestHelpers.h"
@@ -25,16 +25,12 @@
 using ::testing::InSequence;
 using ::testing::Return;
 
-class BytesConsumerForDataConsumerHandleTest : public ::testing::Test {
- public:
-  Document* GetDocument() { return &page_->GetDocument(); }
-
+class BytesConsumerForDataConsumerHandleTest : public PageTestBase {
  protected:
-  BytesConsumerForDataConsumerHandleTest() : page_(DummyPageHolder::Create()) {}
+  void SetUp() override { PageTestBase::SetUp(IntSize()); }
   ~BytesConsumerForDataConsumerHandleTest() override {
     ThreadState::Current()->CollectAllGarbage();
   }
-  std::unique_ptr<DummyPageHolder> page_;
 };
 
 class MockBytesConsumerClient
@@ -99,7 +95,7 @@
   handle->Add(DataConsumerCommand(DataConsumerCommand::kData, "hello"));
   handle->Add(DataConsumerCommand(DataConsumerCommand::kDone));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
 }
 
 TEST_F(BytesConsumerForDataConsumerHandleTest, BecomeReadable) {
@@ -115,7 +111,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kData, "hello"));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(client);
   EXPECT_EQ(BytesConsumer::PublicState::kReadableOrWaiting,
             consumer->GetPublicState());
@@ -140,7 +136,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kDone));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(client);
   EXPECT_EQ(BytesConsumer::PublicState::kReadableOrWaiting,
             consumer->GetPublicState());
@@ -164,7 +160,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kError));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(client);
   EXPECT_EQ(BytesConsumer::PublicState::kReadableOrWaiting,
             consumer->GetPublicState());
@@ -187,7 +183,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kError));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(client);
   consumer->ClearClient();
 
@@ -200,7 +196,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kData, "hello"));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
 
   const char* buffer = nullptr;
@@ -219,7 +215,7 @@
 TEST_F(BytesConsumerForDataConsumerHandleTest, TwoPhaseReadWhenWaiting) {
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
   const char* buffer = nullptr;
   size_t available = 0;
@@ -230,7 +226,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kDone));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
   const char* buffer = nullptr;
   size_t available = 0;
@@ -241,7 +237,7 @@
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   handle->Add(DataConsumerCommand(DataConsumerCommand::kError));
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
   const char* buffer = nullptr;
   size_t available = 0;
@@ -252,7 +248,7 @@
 TEST_F(BytesConsumerForDataConsumerHandleTest, Cancel) {
   std::unique_ptr<ReplayingHandle> handle = ReplayingHandle::Create();
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
   consumer->Cancel();
   const char* buffer = nullptr;
@@ -267,7 +263,7 @@
       WTF::WrapUnique(new MockDataConsumerHandle);
   Persistent<MockDataConsumerHandle::MockReaderProxy> proxy = handle->Proxy();
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
 
   Checkpoint checkpoint;
@@ -286,7 +282,7 @@
       WTF::WrapUnique(new MockDataConsumerHandle);
   Persistent<MockDataConsumerHandle::MockReaderProxy> proxy = handle->Proxy();
   Persistent<BytesConsumer> consumer =
-      new BytesConsumerForDataConsumerHandle(GetDocument(), std::move(handle));
+      new BytesConsumerForDataConsumerHandle(&GetDocument(), std::move(handle));
   consumer->SetClient(MockBytesConsumerClient::Create());
 
   Checkpoint checkpoint;
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index a2649fb..0498d9c 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -114,6 +114,8 @@
 void Geolocation::Trace(blink::Visitor* visitor) {
   visitor->Trace(one_shots_);
   visitor->Trace(watchers_);
+  visitor->Trace(one_shots_being_invoked_);
+  visitor->Trace(watchers_being_invoked_);
   visitor->Trace(last_position_);
   ScriptWrappable::Trace(visitor);
   ContextLifecycleObserver::Trace(visitor);
@@ -124,6 +126,9 @@
   for (const auto& one_shot : one_shots_)
     visitor->TraceWrappers(one_shot);
   visitor->TraceWrappers(watchers_);
+  for (const auto& one_shot : one_shots_being_invoked_)
+    visitor->TraceWrappers(one_shot);
+  visitor->TraceWrappers(watchers_being_invoked_);
   ScriptWrappable::TraceWrappers(visitor);
 }
 
@@ -397,10 +402,10 @@
   // added by calls to Geolocation methods from the callbacks, and to prevent
   // further callbacks to these notifiers.
   GeoNotifierVector one_shots_with_cached_position;
-  one_shots_.clear();
-  if (error->IsFatal())
-    watchers_.Clear();
-  else {
+  swap(one_shots_, one_shots_being_invoked_);
+  if (error->IsFatal()) {
+    swap(watchers_, watchers_being_invoked_);
+  } else {
     // Don't send non-fatal errors to notifiers due to receive a cached
     // position.
     ExtractNotifiersWithCachedPosition(one_shots_copy,
@@ -419,6 +424,9 @@
 
   // Maintain a reference to the cached notifiers until their timer fires.
   CopyToSet(one_shots_with_cached_position, one_shots_);
+
+  one_shots_being_invoked_.clear();
+  watchers_being_invoked_.Clear();
 }
 
 void Geolocation::MakeSuccessCallbacks() {
@@ -433,13 +441,15 @@
   // Clear the lists before we make the callbacks, to avoid clearing notifiers
   // added by calls to Geolocation methods from the callbacks, and to prevent
   // further callbacks to these notifiers.
-  one_shots_.clear();
+  swap(one_shots_, one_shots_being_invoked_);
 
   SendPosition(one_shots_copy, last_position_);
   SendPosition(watchers_copy, last_position_);
 
   if (!HasListeners())
     StopUpdating();
+
+  one_shots_being_invoked_.clear();
 }
 
 void Geolocation::PositionChanged() {
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.h b/third_party/WebKit/Source/modules/geolocation/Geolocation.h
index 3dbb93f..ff83f37 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.h
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.h
@@ -168,6 +168,20 @@
 
   GeoNotifierSet one_shots_;
   GeolocationWatchers watchers_;
+  // GeoNotifiers that may be scheduled to be invoked but need to be removed
+  // from |one_shots_| and |watchers_|.
+  //
+  // |HandleError(error)| and |MakeSuccessCallbacks| need to clear |one_shots_|
+  // (and optionally |watchers_|) before invoking the callbacks, in order to
+  // avoid clearing notifiers added by calls to Geolocation methods from the
+  // callbacks. Thus, something else needs to make the notifiers being invoked
+  // alive with wrapper-tracing because V8 GC may run during the callbacks.
+  // |one_shots_being_invoked_| and |watchers_being_invoked_| perform
+  // wrapper-tracing.
+  // TODO(https://crbug.com/796145): Remove this hack once on-stack objects
+  // get supported by either of wrapper-tracing or unified GC.
+  GeoNotifierSet one_shots_being_invoked_;
+  GeolocationWatchers watchers_being_invoked_;
   Member<Geoposition> last_position_;
 
   device::mojom::blink::GeolocationPtr geolocation_;
diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
index 82cbe1e..79dce17 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
@@ -69,6 +69,11 @@
   return id_to_notifier_map_.IsEmpty();
 }
 
+void GeolocationWatchers::Swap(GeolocationWatchers& other) {
+  swap(id_to_notifier_map_, other.id_to_notifier_map_);
+  swap(notifier_to_id_map_, other.notifier_to_id_map_);
+}
+
 void GeolocationWatchers::GetNotifiersVector(
     HeapVector<Member<GeoNotifier>>& copy) const {
   CopyValuesToVector(id_to_notifier_map_, copy);
diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.h b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.h
index 98692dd4..4eee7df 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.h
+++ b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.h
@@ -27,6 +27,7 @@
   bool Contains(GeoNotifier*) const;
   void Clear();
   bool IsEmpty() const;
+  void Swap(GeolocationWatchers& other);
 
   void GetNotifiersVector(HeapVector<Member<GeoNotifier>>&) const;
 
@@ -38,6 +39,10 @@
   NotifierToIdMap notifier_to_id_map_;
 };
 
+inline void swap(GeolocationWatchers& a, GeolocationWatchers& b) {
+  a.Swap(b);
+}
+
 }  // namespace blink
 
 #endif  // GeolocationWatchers_h
diff --git a/third_party/WebKit/Source/modules/locks/LockManager.cpp b/third_party/WebKit/Source/modules/locks/LockManager.cpp
index d2f4661b..c2fc30c9 100644
--- a/third_party/WebKit/Source/modules/locks/LockManager.cpp
+++ b/third_party/WebKit/Source/modules/locks/LockManager.cpp
@@ -187,9 +187,7 @@
   AddPendingRequest(new LockRequestImpl(callback, resolver, name, mode,
                                         mojo::MakeRequest(&request_ptr), this));
 
-  service_->RequestLock(
-      ExecutionContext::From(script_state)->GetSecurityOrigin(), name, mode,
-      wait, std::move(request_ptr));
+  service_->RequestLock(name, mode, wait, std::move(request_ptr));
 
   return promise;
 }
diff --git a/third_party/WebKit/Source/modules/push_messaging/BUILD.gn b/third_party/WebKit/Source/modules/push_messaging/BUILD.gn
index 3bbe2d1..056cb94 100644
--- a/third_party/WebKit/Source/modules/push_messaging/BUILD.gn
+++ b/third_party/WebKit/Source/modules/push_messaging/BUILD.gn
@@ -16,8 +16,8 @@
     "PushManager.h",
     "PushMessageData.cpp",
     "PushMessageData.h",
-    "PushPermissionStatusCallbacks.cpp",
-    "PushPermissionStatusCallbacks.h",
+    "PushMessagingBridge.cpp",
+    "PushMessagingBridge.h",
     "PushSubscription.cpp",
     "PushSubscription.h",
     "PushSubscriptionCallbacks.cpp",
diff --git a/third_party/WebKit/Source/modules/push_messaging/DEPS b/third_party/WebKit/Source/modules/push_messaging/DEPS
index aeae175..301e8db 100644
--- a/third_party/WebKit/Source/modules/push_messaging/DEPS
+++ b/third_party/WebKit/Source/modules/push_messaging/DEPS
@@ -2,6 +2,7 @@
     "-modules",
     "+modules/EventModules.h",
     "+modules/ModulesExport.h",
+    "+modules/permissions",
     "+modules/push_messaging",
     "+modules/serviceworkers",
 ]
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
index 9f8cda4a..54b029c 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
@@ -17,7 +17,7 @@
 #include "core/frame/LocalFrame.h"
 #include "modules/push_messaging/PushController.h"
 #include "modules/push_messaging/PushError.h"
-#include "modules/push_messaging/PushPermissionStatusCallbacks.h"
+#include "modules/push_messaging/PushMessagingBridge.h"
 #include "modules/push_messaging/PushSubscription.h"
 #include "modules/push_messaging/PushSubscriptionCallbacks.h"
 #include "modules/push_messaging/PushSubscriptionOptions.h"
@@ -117,14 +117,8 @@
                                "Document is detached from window."));
   }
 
-  ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
-  ScriptPromise promise = resolver->Promise();
-
-  PushProvider()->GetPermissionStatus(
-      registration_->WebRegistration(),
-      PushSubscriptionOptions::ToWeb(options, exception_state),
-      std::make_unique<PushPermissionStatusCallbacks>(resolver));
-  return promise;
+  return PushMessagingBridge::From(registration_)
+      ->GetPermissionState(script_state, options);
 }
 
 void PushManager::Trace(blink::Visitor* visitor) {
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.cpp b/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.cpp
new file mode 100644
index 0000000..73e728b9
--- /dev/null
+++ b/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.cpp
@@ -0,0 +1,104 @@
+// 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.
+
+#include "modules/push_messaging/PushMessagingBridge.h"
+
+#include "core/dom/DOMException.h"
+#include "core/dom/ExceptionCode.h"
+#include "modules/permissions/PermissionUtils.h"
+#include "modules/push_messaging/PushError.h"
+#include "modules/push_messaging/PushSubscriptionOptionsInit.h"
+#include "platform/bindings/ScriptState.h"
+#include "platform/wtf/Functional.h"
+#include "public/platform/modules/push_messaging/WebPushError.h"
+
+namespace blink {
+namespace {
+
+// Error message to explain that the userVisibleOnly flag must be set.
+const char kUserVisibleOnlyRequired[] =
+    "Push subscriptions that don't enable userVisibleOnly are not supported.";
+
+String PermissionStatusToString(mojom::blink::PermissionStatus status) {
+  switch (status) {
+    case mojom::blink::PermissionStatus::GRANTED:
+      return "granted";
+    case mojom::blink::PermissionStatus::DENIED:
+      return "denied";
+    case mojom::blink::PermissionStatus::ASK:
+      return "prompt";
+  }
+
+  NOTREACHED();
+  return "denied";
+}
+
+}  // namespace
+
+// static
+PushMessagingBridge* PushMessagingBridge::From(
+    ServiceWorkerRegistration* service_worker_registration) {
+  DCHECK(service_worker_registration);
+
+  PushMessagingBridge* bridge = static_cast<PushMessagingBridge*>(
+      Supplement<ServiceWorkerRegistration>::From(service_worker_registration,
+                                                  SupplementName()));
+
+  if (!bridge) {
+    bridge = new PushMessagingBridge(*service_worker_registration);
+    Supplement<ServiceWorkerRegistration>::ProvideTo(
+        *service_worker_registration, SupplementName(), bridge);
+  }
+
+  return bridge;
+}
+
+PushMessagingBridge::PushMessagingBridge(
+    ServiceWorkerRegistration& registration)
+    : Supplement<ServiceWorkerRegistration>(registration) {}
+
+PushMessagingBridge::~PushMessagingBridge() = default;
+
+const char* PushMessagingBridge::SupplementName() {
+  return "PushMessagingBridge";
+}
+
+ScriptPromise PushMessagingBridge::GetPermissionState(
+    ScriptState* script_state,
+    const PushSubscriptionOptionsInit& options) {
+  ExecutionContext* context = ExecutionContext::From(script_state);
+  if (!permission_service_) {
+    ConnectToPermissionService(context,
+                               mojo::MakeRequest(&permission_service_));
+  }
+
+  ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
+  ScriptPromise promise = resolver->Promise();
+
+  // The `userVisibleOnly` flag on |options| must be set, as it's intended to be
+  // a contract with the developer that they will show a notification upon
+  // receiving a push message. Permission is denied without this setting.
+  //
+  // TODO(peter): Would it be better to resolve DENIED rather than rejecting?
+  if (!options.hasUserVisibleOnly() || !options.userVisibleOnly()) {
+    resolver->Reject(
+        DOMException::Create(kNotSupportedError, kUserVisibleOnlyRequired));
+    return promise;
+  }
+
+  permission_service_->HasPermission(
+      CreatePermissionDescriptor(mojom::blink::PermissionName::NOTIFICATIONS),
+      WTF::Bind(&PushMessagingBridge::DidGetPermissionState,
+                WrapPersistent(this), WrapPersistent(resolver)));
+
+  return promise;
+}
+
+void PushMessagingBridge::DidGetPermissionState(
+    ScriptPromiseResolver* resolver,
+    mojom::blink::PermissionStatus status) {
+  resolver->Resolve(PermissionStatusToString(status));
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.h b/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.h
new file mode 100644
index 0000000..8d487ef
--- /dev/null
+++ b/third_party/WebKit/Source/modules/push_messaging/PushMessagingBridge.h
@@ -0,0 +1,54 @@
+// 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 PushMessagingBridge_h
+#define PushMessagingBridge_h
+
+#include "modules/serviceworkers/ServiceWorkerRegistration.h"
+#include "platform/Supplementable.h"
+#include "platform/heap/GarbageCollected.h"
+#include "public/platform/modules/permissions/permission.mojom-blink.h"
+#include "public/platform/modules/permissions/permission_status.mojom-blink.h"
+
+namespace blink {
+
+class PushSubscriptionOptionsInit;
+class ScriptPromiseResolver;
+class ScriptState;
+
+// The bridge is responsible for establishing and maintaining the Mojo
+// connection to the permission service. It's keyed on an active Service Worker
+// Registration.
+//
+// TODO(peter): Use the PushMessaging Mojo service directly from here.
+class PushMessagingBridge final
+    : public GarbageCollectedFinalized<PushMessagingBridge>,
+      public Supplement<ServiceWorkerRegistration> {
+  USING_GARBAGE_COLLECTED_MIXIN(PushMessagingBridge);
+  WTF_MAKE_NONCOPYABLE(PushMessagingBridge);
+
+ public:
+  static PushMessagingBridge* From(ServiceWorkerRegistration*);
+  static const char* SupplementName();
+
+  virtual ~PushMessagingBridge();
+
+  // Asynchronously determines the permission state for the current origin.
+  ScriptPromise GetPermissionState(ScriptState*,
+                                   const PushSubscriptionOptionsInit&);
+
+ private:
+  explicit PushMessagingBridge(ServiceWorkerRegistration&);
+
+  // Method to be invoked when the permission status has been retrieved from the
+  // permission service. Will settle the given |resolver|.
+  void DidGetPermissionState(ScriptPromiseResolver*,
+                             mojom::blink::PermissionStatus);
+
+  mojom::blink::PermissionServicePtr permission_service_;
+};
+
+}  // namespace blink
+
+#endif  // PushMessagingBridge_h
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp
deleted file mode 100644
index 6e3b222..0000000
--- a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "modules/push_messaging/PushPermissionStatusCallbacks.h"
-
-#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "modules/push_messaging/PushError.h"
-#include "platform/wtf/Assertions.h"
-#include "platform/wtf/text/WTFString.h"
-
-namespace blink {
-
-PushPermissionStatusCallbacks::PushPermissionStatusCallbacks(
-    ScriptPromiseResolver* resolver)
-    : resolver_(resolver) {}
-
-PushPermissionStatusCallbacks::~PushPermissionStatusCallbacks() {}
-
-void PushPermissionStatusCallbacks::OnSuccess(WebPushPermissionStatus status) {
-  resolver_->Resolve(PermissionString(status));
-}
-
-void PushPermissionStatusCallbacks::OnError(const WebPushError& error) {
-  if (!resolver_->GetExecutionContext() ||
-      resolver_->GetExecutionContext()->IsContextDestroyed())
-    return;
-  resolver_->Reject(PushError::Take(resolver_.Get(), error));
-}
-
-// static
-String PushPermissionStatusCallbacks::PermissionString(
-    WebPushPermissionStatus status) {
-  switch (status) {
-    case kWebPushPermissionStatusGranted:
-      return "granted";
-    case kWebPushPermissionStatusDenied:
-      return "denied";
-    case kWebPushPermissionStatusPrompt:
-      return "prompt";
-  }
-
-  NOTREACHED();
-  return "denied";
-}
-
-}  // namespace blink
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h
deleted file mode 100644
index e3efef4..0000000
--- a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h
+++ /dev/null
@@ -1,43 +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 PushPermissionStatusCallbacks_h
-#define PushPermissionStatusCallbacks_h
-
-#include "platform/heap/Handle.h"
-#include "platform/wtf/Noncopyable.h"
-#include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
-#include "public/platform/modules/push_messaging/WebPushProvider.h"
-
-namespace WTF {
-class String;
-}
-
-namespace blink {
-
-class ScriptPromiseResolver;
-
-// Will resolve the underlying promise depending on the permission received.
-class PushPermissionStatusCallbacks final
-    : public WebPushPermissionStatusCallbacks {
-  WTF_MAKE_NONCOPYABLE(PushPermissionStatusCallbacks);
-  USING_FAST_MALLOC(PushPermissionStatusCallbacks);
-
- public:
-  explicit PushPermissionStatusCallbacks(ScriptPromiseResolver*);
-  ~PushPermissionStatusCallbacks() override;
-
-  void OnSuccess(WebPushPermissionStatus) override;
-
-  // Called if for some reason the status of the permission cannot be checked.
-  void OnError(const WebPushError&) override;
-
- private:
-  static WTF::String PermissionString(WebPushPermissionStatus);
-  Persistent<ScriptPromiseResolver> resolver_;
-};
-
-}  // namespace blink
-
-#endif  // PushPermissionStatusCallbacks_h
diff --git a/third_party/WebKit/Source/modules/sensor/AbsoluteOrientationSensor.cpp b/third_party/WebKit/Source/modules/sensor/AbsoluteOrientationSensor.cpp
index 0d7e6cf6..6dfed6c4 100644
--- a/third_party/WebKit/Source/modules/sensor/AbsoluteOrientationSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/AbsoluteOrientationSensor.cpp
@@ -30,7 +30,10 @@
     : OrientationSensor(execution_context,
                         options,
                         exception_state,
-                        SensorType::ABSOLUTE_ORIENTATION_QUATERNION) {}
+                        SensorType::ABSOLUTE_ORIENTATION_QUATERNION,
+                        {FeaturePolicyFeature::kAccelerometer,
+                         FeaturePolicyFeature::kGyroscope,
+                         FeaturePolicyFeature::kMagnetometer}) {}
 
 void AbsoluteOrientationSensor::Trace(blink::Visitor* visitor) {
   OrientationSensor::Trace(visitor);
diff --git a/third_party/WebKit/Source/modules/sensor/Accelerometer.cpp b/third_party/WebKit/Source/modules/sensor/Accelerometer.cpp
index 282eab2b..00c5f428 100644
--- a/third_party/WebKit/Source/modules/sensor/Accelerometer.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Accelerometer.cpp
@@ -12,7 +12,8 @@
                                      const SensorOptions& options,
                                      ExceptionState& exception_state) {
   return new Accelerometer(execution_context, options, exception_state,
-                           SensorType::ACCELEROMETER);
+                           SensorType::ACCELEROMETER,
+                           {FeaturePolicyFeature::kAccelerometer});
 }
 
 // static
@@ -24,8 +25,13 @@
 Accelerometer::Accelerometer(ExecutionContext* execution_context,
                              const SensorOptions& options,
                              ExceptionState& exception_state,
-                             SensorType sensor_type)
-    : Sensor(execution_context, options, exception_state, sensor_type) {}
+                             SensorType sensor_type,
+                             const Vector<FeaturePolicyFeature>& features)
+    : Sensor(execution_context,
+             options,
+             exception_state,
+             sensor_type,
+             features) {}
 
 double Accelerometer::x(bool& is_null) const {
   INIT_IS_NULL_AND_RETURN(is_null, 0.0);
diff --git a/third_party/WebKit/Source/modules/sensor/Accelerometer.h b/third_party/WebKit/Source/modules/sensor/Accelerometer.h
index 4ca14335..9072a0b 100644
--- a/third_party/WebKit/Source/modules/sensor/Accelerometer.h
+++ b/third_party/WebKit/Source/modules/sensor/Accelerometer.h
@@ -28,7 +28,8 @@
   Accelerometer(ExecutionContext*,
                 const SensorOptions&,
                 ExceptionState&,
-                device::mojom::blink::SensorType);
+                device::mojom::blink::SensorType,
+                const Vector<FeaturePolicyFeature>&);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
index 773e181..267578a 100644
--- a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
@@ -32,7 +32,8 @@
     : Sensor(execution_context,
              options,
              exception_state,
-             SensorType::AMBIENT_LIGHT) {}
+             SensorType::AMBIENT_LIGHT,
+             {FeaturePolicyFeature::kAmbientLightSensor}) {}
 
 double AmbientLightSensor::illuminance(bool& is_null) const {
   INIT_IS_NULL_AND_RETURN(is_null, 0.0);
diff --git a/third_party/WebKit/Source/modules/sensor/DEPS b/third_party/WebKit/Source/modules/sensor/DEPS
index 6cffc204..5b669f4 100644
--- a/third_party/WebKit/Source/modules/sensor/DEPS
+++ b/third_party/WebKit/Source/modules/sensor/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+    "+common/feature_policy",
     "-modules",
     "+modules/EventModules.h",
     "+modules/EventTargetModules.h",
diff --git a/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp b/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
index cf03ca5f..75bbf76b 100644
--- a/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
@@ -27,7 +27,8 @@
     : Sensor(execution_context,
              options,
              exception_state,
-             SensorType::GYROSCOPE) {}
+             SensorType::GYROSCOPE,
+             {FeaturePolicyFeature::kGyroscope}) {}
 
 double Gyroscope::x(bool& is_null) const {
   INIT_IS_NULL_AND_RETURN(is_null, 0.0);
diff --git a/third_party/WebKit/Source/modules/sensor/LinearAccelerationSensor.cpp b/third_party/WebKit/Source/modules/sensor/LinearAccelerationSensor.cpp
index e70456c..031cefe 100644
--- a/third_party/WebKit/Source/modules/sensor/LinearAccelerationSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/LinearAccelerationSensor.cpp
@@ -30,7 +30,8 @@
     : Accelerometer(execution_context,
                     options,
                     exception_state,
-                    SensorType::LINEAR_ACCELERATION) {}
+                    SensorType::LINEAR_ACCELERATION,
+                    {FeaturePolicyFeature::kAccelerometer}) {}
 
 void LinearAccelerationSensor::Trace(blink::Visitor* visitor) {
   Accelerometer::Trace(visitor);
diff --git a/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp b/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp
index 88831597..e3dcccf 100644
--- a/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp
@@ -27,7 +27,8 @@
     : Sensor(execution_context,
              options,
              exception_state,
-             SensorType::MAGNETOMETER) {}
+             SensorType::MAGNETOMETER,
+             {FeaturePolicyFeature::kMagnetometer}) {}
 
 double Magnetometer::x(bool& is_null) const {
   INIT_IS_NULL_AND_RETURN(is_null, 0.0);
diff --git a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
index af625849..cd53b04 100644
--- a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
@@ -114,11 +114,13 @@
   return reading_dirty_ || !hasReading();
 }
 
-OrientationSensor::OrientationSensor(ExecutionContext* execution_context,
-                                     const SensorOptions& options,
-                                     ExceptionState& exception_state,
-                                     device::mojom::blink::SensorType type)
-    : Sensor(execution_context, options, exception_state, type),
+OrientationSensor::OrientationSensor(
+    ExecutionContext* execution_context,
+    const SensorOptions& options,
+    ExceptionState& exception_state,
+    device::mojom::blink::SensorType type,
+    const Vector<FeaturePolicyFeature>& features)
+    : Sensor(execution_context, options, exception_state, type, features),
       reading_dirty_(true) {}
 
 void OrientationSensor::OnSensorReadingChanged() {
diff --git a/third_party/WebKit/Source/modules/sensor/OrientationSensor.h b/third_party/WebKit/Source/modules/sensor/OrientationSensor.h
index 55e1109..7091bda 100644
--- a/third_party/WebKit/Source/modules/sensor/OrientationSensor.h
+++ b/third_party/WebKit/Source/modules/sensor/OrientationSensor.h
@@ -26,7 +26,8 @@
   OrientationSensor(ExecutionContext*,
                     const SensorOptions&,
                     ExceptionState&,
-                    device::mojom::blink::SensorType);
+                    device::mojom::blink::SensorType,
+                    const Vector<FeaturePolicyFeature>& features);
 
  private:
   // SensorProxy override.
diff --git a/third_party/WebKit/Source/modules/sensor/RelativeOrientationSensor.cpp b/third_party/WebKit/Source/modules/sensor/RelativeOrientationSensor.cpp
index f0ec91c5..cf7d69b 100644
--- a/third_party/WebKit/Source/modules/sensor/RelativeOrientationSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/RelativeOrientationSensor.cpp
@@ -30,7 +30,9 @@
     : OrientationSensor(execution_context,
                         options,
                         exception_state,
-                        SensorType::RELATIVE_ORIENTATION_QUATERNION) {}
+                        SensorType::RELATIVE_ORIENTATION_QUATERNION,
+                        {FeaturePolicyFeature::kAccelerometer,
+                         FeaturePolicyFeature::kGyroscope}) {}
 
 void RelativeOrientationSensor::Trace(blink::Visitor* visitor) {
   OrientationSensor::Trace(visitor);
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.cpp b/third_party/WebKit/Source/modules/sensor/Sensor.cpp
index 27177c4d..58f68c8 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp
@@ -12,6 +12,7 @@
 #include "modules/sensor/SensorErrorEvent.h"
 #include "modules/sensor/SensorProviderProxy.h"
 #include "platform/LayoutTestSupport.h"
+#include "platform/feature_policy/FeaturePolicy.h"
 #include "public/platform/TaskType.h"
 #include "services/device/public/cpp/generic_sensor/sensor_traits.h"
 #include "services/device/public/interfaces/sensor.mojom-blink.h"
@@ -20,12 +21,22 @@
 
 namespace {
 const double kWaitingIntervalThreshold = 0.01;
+
+bool AreFeaturesEnabled(LocalFrame* frame,
+                        const Vector<FeaturePolicyFeature>& features) {
+  return std::all_of(features.begin(), features.end(),
+                     [frame](FeaturePolicyFeature feature) {
+                       return frame->IsFeatureEnabled(feature);
+                     });
+}
+
 }  // namespace
 
 Sensor::Sensor(ExecutionContext* execution_context,
                const SensorOptions& sensor_options,
                ExceptionState& exception_state,
-               device::mojom::blink::SensorType type)
+               device::mojom::blink::SensorType type,
+               const Vector<FeaturePolicyFeature>& features)
     : ContextLifecycleObserver(execution_context),
       sensor_options_(sensor_options),
       type_(type),
@@ -33,12 +44,12 @@
       last_reported_timestamp_(0.0) {
   // [SecureContext] in idl.
   DCHECK(execution_context->IsSecureContext());
+  DCHECK(!features.IsEmpty());
+  LocalFrame* frame = ToDocument(execution_context)->GetFrame();
 
-  // Check top-level browsing context.
-  if (!ToDocument(execution_context)->domWindow()->GetFrame() ||
-      !ToDocument(execution_context)->GetFrame()->IsMainFrame()) {
+  if (!frame || !AreFeaturesEnabled(frame, features)) {
     exception_state.ThrowSecurityError(
-        "Must be in a top-level browsing context");
+        "Access to sensor features is disallowed by feature policy");
     return;
   }
 
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.h b/third_party/WebKit/Source/modules/sensor/Sensor.h
index 348c84ce..346c4d1 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.h
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.h
@@ -6,6 +6,7 @@
 #define Sensor_h
 
 #include "bindings/core/v8/ActiveScriptWrappable.h"
+#include "common/feature_policy/feature_policy.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/dom/DOMHighResTimeStamp.h"
 #include "core/dom/DOMTimeStamp.h"
@@ -65,7 +66,8 @@
   Sensor(ExecutionContext*,
          const SensorOptions&,
          ExceptionState&,
-         device::mojom::blink::SensorType);
+         device::mojom::blink::SensorType,
+         const Vector<FeaturePolicyFeature>&);
 
   using SensorConfigurationPtr = device::mojom::blink::SensorConfigurationPtr;
   using SensorConfiguration = device::mojom::blink::SensorConfiguration;
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp
index 6f2409e..5fd1ce4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp
@@ -7,7 +7,7 @@
 #include <memory>
 
 #include "core/dom/Document.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebAudioDevice.h"
@@ -83,7 +83,7 @@
 
 }  // anonymous namespace
 
-class AudioContextTest : public ::testing::Test {
+class AudioContextTest : public PageTestBase {
  protected:
   AudioContextTest() :
       platform_(new ScopedTestingPlatformSupport<AudioContextTestPlatform>) {}
@@ -92,14 +92,9 @@
     platform_.reset();
   }
 
-  void SetUp() override {
-    dummy_page_holder_ = DummyPageHolder::Create();
-  }
-
-  Document& GetDocument() { return dummy_page_holder_->GetDocument(); }
+  void SetUp() override { PageTestBase::SetUp(IntSize()); }
 
  private:
-  std::unique_ptr<DummyPageHolder> dummy_page_holder_;
   std::unique_ptr<ScopedTestingPlatformSupport<AudioContextTestPlatform>>
       platform_;
 };
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
index 92dbd8d..5fd2bc9 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
@@ -20,7 +20,7 @@
 #include "core/messaging/MessageChannel.h"
 #include "core/messaging/MessagePort.h"
 #include "core/origin_trials/OriginTrialContext.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "core/workers/GlobalScopeCreationParams.h"
 #include "core/workers/WorkerBackingThread.h"
 #include "core/workers/WorkerInspectorProxy.h"
@@ -52,12 +52,12 @@
 
 }  // namespace
 
-class AudioWorkletGlobalScopeTest : public ::testing::Test {
+class AudioWorkletGlobalScopeTest : public PageTestBase {
  public:
   void SetUp() override {
     AudioWorkletThread::CreateSharedBackingThreadForTest();
-    page_ = DummyPageHolder::Create();
-    Document* document = page_->GetFrame().GetDocument();
+    PageTestBase::SetUp(IntSize());
+    Document* document = &GetDocument();
     document->SetURL(KURL("https://example.com/"));
     document->UpdateSecurityOrigin(SecurityOrigin::Create(document->Url()));
     reporting_proxy_ = std::make_unique<WorkerReportingProxy>();
@@ -66,7 +66,7 @@
   std::unique_ptr<AudioWorkletThread> CreateAudioWorkletThread() {
     std::unique_ptr<AudioWorkletThread> thread =
         AudioWorkletThread::Create(nullptr, *reporting_proxy_);
-    Document* document = page_->GetFrame().GetDocument();
+    Document* document = &GetDocument();
     thread->Start(
         std::make_unique<GlobalScopeCreationParams>(
             document->Url(), document->UserAgent(),
@@ -362,7 +362,6 @@
     wait_event->Signal();
   }
 
-  std::unique_ptr<DummyPageHolder> page_;
   std::unique_ptr<WorkerReportingProxy> reporting_proxy_;
 };
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
index 85e0af2..3d322a42 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
@@ -13,7 +13,7 @@
 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
 #include "core/inspector/ConsoleMessage.h"
 #include "core/origin_trials/OriginTrialContext.h"
-#include "core/testing/DummyPageHolder.h"
+#include "core/testing/PageTestBase.h"
 #include "core/workers/GlobalScopeCreationParams.h"
 #include "core/workers/WorkerBackingThread.h"
 #include "core/workers/WorkerInspectorProxy.h"
@@ -36,12 +36,12 @@
 
 namespace blink {
 
-class AudioWorkletThreadTest : public ::testing::Test {
+class AudioWorkletThreadTest : public PageTestBase {
  public:
   void SetUp() override {
     AudioWorkletThread::CreateSharedBackingThreadForTest();
-    page_ = DummyPageHolder::Create();
-    Document* document = page_->GetFrame().GetDocument();
+    PageTestBase::SetUp(IntSize());
+    Document* document = &GetDocument();
     document->SetURL(KURL("https://example.com/"));
     document->UpdateSecurityOrigin(SecurityOrigin::Create(document->Url()));
     reporting_proxy_ = std::make_unique<WorkerReportingProxy>();
@@ -50,7 +50,7 @@
   std::unique_ptr<AudioWorkletThread> CreateAudioWorkletThread() {
     std::unique_ptr<AudioWorkletThread> thread =
         AudioWorkletThread::Create(nullptr, *reporting_proxy_);
-    Document* document = page_->GetFrame().GetDocument();
+    Document* document = &GetDocument();
     thread->Start(
         std::make_unique<GlobalScopeCreationParams>(
             document->Url(), document->UserAgent(),
@@ -94,7 +94,6 @@
     wait_event->Signal();
   }
 
-  std::unique_ptr<DummyPageHolder> page_;
   std::unique_ptr<WorkerReportingProxy> reporting_proxy_;
 };
 
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index 3474e3e..27b61fb5 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn
+++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -1331,7 +1331,6 @@
     "scroll/ScrollAnimatorBase.h",
     "scroll/ScrollAnimatorCompositorCoordinator.cpp",
     "scroll/ScrollAnimatorCompositorCoordinator.h",
-    "scroll/ScrollSnapData.cpp",
     "scroll/ScrollSnapData.h",
     "scroll/ScrollStateData.h",
     "scroll/ScrollTypes.h",
diff --git a/third_party/WebKit/Source/platform/ColorSuggestion.h b/third_party/WebKit/Source/platform/ColorSuggestion.h
deleted file mode 100644
index 94c8312..0000000
--- a/third_party/WebKit/Source/platform/ColorSuggestion.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2013 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.
- */
-
-#ifndef ColorSuggestion_h
-#define ColorSuggestion_h
-
-#include "platform/graphics/Color.h"
-#include "platform/wtf/Allocator.h"
-#include "platform/wtf/text/WTFString.h"
-
-namespace blink {
-
-struct ColorSuggestion {
-  DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-  Color color;
-  String label;
-
-  ColorSuggestion(const Color& color_value, const String& label)
-      : color(color_value), label(label) {}
-};
-
-}  // namespace blink
-
-#endif  // ColorSuggestion_h
diff --git a/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp b/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
index 4254d68..c8cdb55 100644
--- a/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
@@ -264,6 +264,10 @@
   RuntimeEnabledFeatures::SetPermissionsEnabled(enable);
 }
 
+void WebRuntimeFeatures::EnablePictureInPicture(bool enable) {
+  RuntimeEnabledFeatures::SetPictureInPictureEnabled(enable);
+}
+
 void WebRuntimeFeatures::EnablePreloadDefaultIsMetadata(bool enable) {
   RuntimeEnabledFeatures::SetPreloadDefaultIsMetadataEnabled(enable);
 }
diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
index 59a0f108..fa1b2712 100644
--- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
+++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
@@ -203,6 +203,10 @@
     case FeaturePolicyFeature::kPayment:
     case FeaturePolicyFeature::kUsb:
     case FeaturePolicyFeature::kWebVr:
+    case FeaturePolicyFeature::kAccelerometer:
+    case FeaturePolicyFeature::kAmbientLightSensor:
+    case FeaturePolicyFeature::kGyroscope:
+    case FeaturePolicyFeature::kMagnetometer:
       return true;
     case FeaturePolicyFeature::kSyncXHR:
     case FeaturePolicyFeature::kVibrate:
@@ -229,6 +233,13 @@
                                  FeaturePolicyFeature::kGeolocation);
     default_feature_name_map.Set("midi", FeaturePolicyFeature::kMidiFeature);
     default_feature_name_map.Set("vr", FeaturePolicyFeature::kWebVr);
+    default_feature_name_map.Set("accelerometer",
+                                 FeaturePolicyFeature::kAccelerometer);
+    default_feature_name_map.Set("ambient-light-sensor",
+                                 FeaturePolicyFeature::kAmbientLightSensor);
+    default_feature_name_map.Set("gyroscope", FeaturePolicyFeature::kGyroscope);
+    default_feature_name_map.Set("magnetometer",
+                                 FeaturePolicyFeature::kMagnetometer);
     if (RuntimeEnabledFeatures::FeaturePolicyExperimentalFeaturesEnabled()) {
       default_feature_name_map.Set("vibrate", FeaturePolicyFeature::kVibrate);
       default_feature_name_map.Set("cookie",
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h
index e4226993..4cd5c52 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h
@@ -261,7 +261,7 @@
   void GenSyncTokenCHROMIUM(GLbyte* sync_token) override {
     static uint64_t unique_id = 1;
     gpu::SyncToken source(
-        gpu::GPU_IO, 1, gpu::CommandBufferId::FromUnsafeValue(unique_id++), 2);
+        gpu::GPU_IO, gpu::CommandBufferId::FromUnsafeValue(unique_id++), 2);
     memcpy(sync_token, &source, sizeof(source));
   }
 
diff --git a/third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp
index fb9c026..2ac6077 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp
@@ -7,7 +7,6 @@
 #include "platform/graphics/GraphicsContext.h"
 #include "platform/graphics/Path.h"
 #include "public/platform/WebDisplayItemList.h"
-#include "third_party/skia/include/core/SkPictureAnalyzer.h"
 #include "third_party/skia/include/core/SkScalar.h"
 
 namespace blink {
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 974882b..57f7b7ae 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -10,7 +10,6 @@
 #include "platform/instrumentation/tracing/TraceEvent.h"
 #include "platform/wtf/AutoReset.h"
 #include "platform/wtf/text/StringBuilder.h"
-#include "third_party/skia/include/core/SkPictureAnalyzer.h"
 
 #ifndef NDEBUG
 #include "platform/graphics/LoggingCanvas.h"
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index a38ec52..54558609 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -146,6 +146,12 @@
   ProcessHeap::DecreaseTotalAllocatedSpace(delta);
 }
 
+double ThreadHeapStats::LiveObjectRateSinceLastGC() const {
+  if (ObjectSizeAtLastGC() > 0)
+    return static_cast<double>(MarkedObjectSize()) / ObjectSizeAtLastGC();
+  return 0.0;
+}
+
 ThreadHeap::ThreadHeap(ThreadState* thread_state)
     : thread_state_(thread_state),
       region_tree_(std::make_unique<RegionTree>()),
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
index 3e54c03..33753e9 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.h
+++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -179,11 +179,12 @@
   void DecreaseAllocatedObjectSize(size_t delta);
   size_t AllocatedObjectSize() { return allocated_object_size_; }
   void IncreaseMarkedObjectSize(size_t delta);
-  size_t MarkedObjectSize() { return marked_object_size_; }
+  size_t MarkedObjectSize() const { return marked_object_size_; }
   void IncreaseAllocatedSpace(size_t delta);
   void DecreaseAllocatedSpace(size_t delta);
   size_t AllocatedSpace() { return allocated_space_; }
-  size_t ObjectSizeAtLastGC() { return object_size_at_last_gc_; }
+  size_t ObjectSizeAtLastGC() const { return object_size_at_last_gc_; }
+  double LiveObjectRateSinceLastGC() const;
   void IncreaseWrapperCount(size_t delta) { wrapper_count_ += delta; }
   void DecreaseWrapperCount(size_t delta) { wrapper_count_ -= delta; }
   size_t WrapperCount() { return AcquireLoad(&wrapper_count_); }
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index 5ceef5a4..1ccdbdac 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -31,6 +31,7 @@
 #include "platform/heap/HeapPage.h"
 
 #include "base/trace_event/process_memory_dump.h"
+#include "platform/Histogram.h"
 #include "platform/MemoryCoordinator.h"
 #include "platform/bindings/ScriptForbiddenScope.h"
 #include "platform/heap/BlinkGCMemoryDumpProvider.h"
@@ -714,6 +715,8 @@
   DCHECK(!HasCurrentAllocationArea());
   TRACE_EVENT0("blink_gc", "BaseArena::coalesce");
 
+  double coalesce_start_time = WTF::CurrentTimeTicksInMilliseconds();
+
   // Rebuild free lists.
   free_list_.Clear();
   size_t freed_size = 0;
@@ -769,6 +772,14 @@
   GetThreadState()->Heap().HeapStats().DecreaseAllocatedObjectSize(freed_size);
   DCHECK_EQ(promptly_freed_size_, freed_size);
   promptly_freed_size_ = 0;
+
+  double coalesce_time =
+      WTF::CurrentTimeTicksInMilliseconds() - coalesce_start_time;
+  DEFINE_THREAD_SAFE_STATIC_LOCAL(
+      CustomCountHistogram, time_for_heap_coalesce_histogram,
+      ("BlinkGC.TimeForCoalesce", 1, 10 * 1000, 50));
+  time_for_heap_coalesce_histogram.Count(coalesce_time);
+
   return true;
 }
 
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index d084fd08..bfbe745 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -32,6 +32,7 @@
 
 #include <v8.h>
 
+#include <iomanip>
 #include <memory>
 
 #include "base/location.h"
@@ -53,7 +54,6 @@
 #include "platform/instrumentation/tracing/web_memory_allocator_dump.h"
 #include "platform/instrumentation/tracing/web_process_memory_dump.h"
 #include "platform/scheduler/child/web_scheduler.h"
-#include "platform/wtf/DataLog.h"
 #include "platform/wtf/PtrUtil.h"
 #include "platform/wtf/StackUtil.h"
 #include "platform/wtf/ThreadingPrimitives.h"
@@ -83,7 +83,9 @@
 
 const size_t kDefaultAllocatedObjectSizeThreshold = 100 * 1024;
 
-const char* ThreadState::GcReasonString(BlinkGC::GCReason reason) {
+namespace {
+
+const char* GcReasonString(BlinkGC::GCReason reason) {
   switch (reason) {
     case BlinkGC::kIdleGC:
       return "IdleGC";
@@ -103,6 +105,30 @@
   return "<Unknown>";
 }
 
+const char* GcTypeString(BlinkGC::GCType type) {
+  switch (type) {
+    case BlinkGC::kGCWithSweep:
+      return "GCWithSweep";
+    case BlinkGC::kGCWithoutSweep:
+      return "GCWithoutSweep";
+    case BlinkGC::kTakeSnapshot:
+      return "TakeSnapshot";
+  }
+  return "<Unknown>";
+}
+
+const char* StackStateString(BlinkGC::StackState state) {
+  switch (state) {
+    case BlinkGC::kNoHeapPointersOnStack:
+      return "NoHeapPointersOnStack";
+    case BlinkGC::kHeapPointersOnStack:
+      return "HeapPointersOnStack";
+  }
+  return "<Unknown>";
+}
+
+}  // namespace
+
 ThreadState::ThreadState()
     : thread_(CurrentThread()),
       persistent_region_(std::make_unique<PersistentRegion>()),
@@ -354,12 +380,13 @@
           allocated_object_size_threshold ||
       TotalMemorySize() < total_memory_size_threshold)
     return false;
-// If the growing rate of Oilpan's heap or PartitionAlloc is high enough,
-// trigger a GC.
-#if PRINT_HEAP_STATS
-  DataLogF("heapGrowingRate=%.1lf, partitionAllocGrowingRate=%.1lf\n",
-           HeapGrowingRate(), PartitionAllocGrowingRate());
-#endif
+
+  VLOG(2) << "[state:" << this << "] JudgeGCThreshold:"
+          << " heapGrowingRate=" << std::setprecision(1) << HeapGrowingRate()
+          << " partitionAllocGrowingRate=" << std::setprecision(1)
+          << PartitionAllocGrowingRate();
+  // If the growing rate of Oilpan's heap or PartitionAlloc is high enough,
+  // trigger a GC.
   return HeapGrowingRate() >= heap_growing_rate_threshold ||
          PartitionAllocGrowingRate() >= heap_growing_rate_threshold;
 }
@@ -412,14 +439,11 @@
 }
 
 void ThreadState::ScheduleV8FollowupGCIfNeeded(BlinkGC::V8GCType gc_type) {
+  VLOG(2) << "[state:" << this << "] ScheduleV8FollowupGCIfNeeded: v8_gc_type="
+          << ((gc_type == BlinkGC::kV8MajorGC) ? "MajorGC" : "MinorGC");
   DCHECK(CheckThread());
   ThreadHeap::ReportMemoryUsageForTracing();
 
-#if PRINT_HEAP_STATS
-  DataLogF("ThreadState::scheduleV8FollowupGCIfNeeded (gcType=%s)\n",
-           gc_type == BlinkGC::kV8MajorGC ? "MajorGC" : "MinorGC");
-#endif
-
   if (IsGCForbidden())
     return;
 
@@ -431,16 +455,14 @@
 
   if ((gc_type == BlinkGC::kV8MajorGC && ShouldForceMemoryPressureGC()) ||
       ShouldScheduleV8FollowupGC()) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled PreciseGC\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "ScheduleV8FollowupGCIfNeeded: Scheduled precise GC";
     SchedulePreciseGC();
     return;
   }
   if (gc_type == BlinkGC::kV8MajorGC && ShouldScheduleIdleGC()) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled IdleGC\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "ScheduleV8FollowupGCIfNeeded: Scheduled idle GC";
     ScheduleIdleGC();
     return;
   }
@@ -460,16 +482,12 @@
 
 void ThreadState::SchedulePageNavigationGCIfNeeded(
     float estimated_removal_ratio) {
+  VLOG(2) << "[state:" << this << "] SchedulePageNavigationGCIfNeeded: "
+          << "estimatedRemovalRatio=" << std::setprecision(2)
+          << estimated_removal_ratio;
   DCHECK(CheckThread());
   ThreadHeap::ReportMemoryUsageForTracing();
 
-#if PRINT_HEAP_STATS
-  DataLogF(
-      "ThreadState::schedulePageNavigationGCIfNeeded "
-      "(estimatedRemovalRatio=%.2lf)\n",
-      estimated_removal_ratio);
-#endif
-
   if (IsGCForbidden())
     return;
 
@@ -481,17 +499,15 @@
   DCHECK(!SweepForbidden());
 
   if (ShouldForceMemoryPressureGC()) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled MemoryPressureGC\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "SchedulePageNavigationGCIfNeeded: Scheduled memory pressure GC";
     CollectGarbage(BlinkGC::kHeapPointersOnStack, BlinkGC::kGCWithoutSweep,
                    BlinkGC::kMemoryPressureGC);
     return;
   }
   if (ShouldSchedulePageNavigationGC(estimated_removal_ratio)) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled PageNavigationGC\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "SchedulePageNavigationGCIfNeeded: Scheduled page navigation GC";
     SchedulePageNavigationGC();
   }
 }
@@ -503,13 +519,10 @@
 }
 
 void ThreadState::ScheduleGCIfNeeded() {
+  VLOG(2) << "[state:" << this << "] ScheduleGCIfNeeded";
   DCHECK(CheckThread());
   ThreadHeap::ReportMemoryUsageForTracing();
 
-#if PRINT_HEAP_STATS
-  DataLogF("ThreadState::scheduleGCIfNeeded\n");
-#endif
-
   // Allocation is allowed during sweeping, but those allocations should not
   // trigger nested GCs.
   if (IsGCForbidden() || SweepForbidden())
@@ -520,9 +533,8 @@
   if (ShouldForceMemoryPressureGC()) {
     CompleteSweep();
     if (ShouldForceMemoryPressureGC()) {
-#if PRINT_HEAP_STATS
-      DataLogF("Scheduled MemoryPressureGC\n");
-#endif
+      VLOG(2) << "[state:" << this << "] "
+              << "ScheduleGCIfNeeded: Scheduled memory pressure GC";
       CollectGarbage(BlinkGC::kHeapPointersOnStack, BlinkGC::kGCWithoutSweep,
                      BlinkGC::kMemoryPressureGC);
       return;
@@ -532,9 +544,8 @@
   if (ShouldForceConservativeGC()) {
     CompleteSweep();
     if (ShouldForceConservativeGC()) {
-#if PRINT_HEAP_STATS
-      DataLogF("Scheduled ConservativeGC\n");
-#endif
+      VLOG(2) << "[state:" << this << "] "
+              << "ScheduleGCIfNeeded: Scheduled conservative GC";
       CollectGarbage(BlinkGC::kHeapPointersOnStack, BlinkGC::kGCWithoutSweep,
                      BlinkGC::kConservativeGC);
       return;
@@ -542,17 +553,15 @@
   }
 
   if (ShouldScheduleIdleGC()) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled IdleGC\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "ScheduleGCIfNeeded: Scheduled idle GC";
     ScheduleIdleGC();
     return;
   }
 
   if (ShouldScheduleIncrementalMarking()) {
-#if PRINT_HEAP_STATS
-    DataLogF("Scheduled IncrementalMarking\n");
-#endif
+    VLOG(2) << "[state:" << this << "] "
+            << "ScheduleGCIfNeeded: Scheduled incremental marking";
     ScheduleIncrementalMarkingStart();
   }
 }
@@ -945,18 +954,15 @@
   ThreadHeap::ReportMemoryUsageForTracing();
 
   if (IsMainThread()) {
-    double collection_rate = 0;
-    if (heap_->HeapStats().ObjectSizeAtLastGC() > 0)
-      collection_rate = 1 - 1.0 * heap_->HeapStats().MarkedObjectSize() /
-                                heap_->HeapStats().ObjectSizeAtLastGC();
+    double collection_rate =
+        1.0 - heap_->HeapStats().LiveObjectRateSinceLastGC();
     TRACE_COUNTER1(TRACE_DISABLED_BY_DEFAULT("blink_gc"),
                    "ThreadState::collectionRate",
                    static_cast<int>(100 * collection_rate));
 
-#if PRINT_HEAP_STATS
-    DataLogF("ThreadState::postSweep (collectionRate=%d%%)\n",
-             static_cast<int>(100 * collection_rate));
-#endif
+    VLOG(1) << "[state:" << this << "]"
+            << " PostSweep: collection_rate: " << std::setprecision(2)
+            << (100 * collection_rate) << "%";
 
     // ThreadHeap::markedObjectSize() may be underestimated here if any other
     // thread has not yet finished lazy sweeping.
@@ -1219,18 +1225,21 @@
 }
 
 void ThreadState::IncrementalMarkingStart() {
-  DataLogF("IncrementalMarkingStart\n");
+  VLOG(2) << "[state:" << this << "] "
+          << "IncrementalMarking: Start";
   Heap().EnableIncrementalMarkingBarrier();
   ScheduleIncrementalMarkingStep();
 }
 
 void ThreadState::IncrementalMarkingStep() {
-  DataLogF("IncrementalMarkingStep\n");
+  VLOG(2) << "[state:" << this << "] "
+          << "IncrementalMarking: Step";
   ScheduleIncrementalMarkingFinalize();
 }
 
 void ThreadState::IncrementalMarkingFinalize() {
-  DataLogF("IncrementalMarkingFinalize\n");
+  VLOG(2) << "[state:" << this << "] "
+          << "IncrementalMarking: Finalize";
   Heap().DisableIncrementalMarkingBarrier();
   SetGCState(kNoGCScheduled);
 }
@@ -1245,6 +1254,9 @@
   if (SweepForbidden())
     return;
 
+  double start_total_collect_garbage_time =
+      WTF::CurrentTimeTicksInMilliseconds();
+
   CompleteSweep();
 
   RUNTIME_CALL_TIMER_SCOPE_IF_ISOLATE_EXISTS(
@@ -1272,15 +1284,20 @@
     }
   }
 
-#if PRINT_HEAP_STATS
-  DataLogF(
-      "ThreadHeap::collectGarbage (gcReason=%s, lazySweeping=%d, "
-      "time=%.1lfms)\n",
-      GcReasonString(reason), gc_type == BlinkGC::kGCWithoutSweep,
-      current_gc_data_.marking_time_in_milliseconds);
-#endif
-
   PreSweep(gc_type);
+
+  double total_collect_garbage_time =
+      WTF::CurrentTimeTicksInMilliseconds() - start_total_collect_garbage_time;
+  DEFINE_THREAD_SAFE_STATIC_LOCAL(
+      CustomCountHistogram, time_for_total_collect_garbage_histogram,
+      ("BlinkGC.TimeForTotalCollectGarbage", 1, 10 * 1000, 50));
+  time_for_total_collect_garbage_histogram.Count(total_collect_garbage_time);
+  VLOG(1) << "[state:" << this << "]"
+          << " CollectGarbage: time: " << std::setprecision(2)
+          << total_collect_garbage_time << "ms"
+          << " stack: " << StackStateString(stack_state)
+          << " type: " << GcTypeString(gc_type)
+          << " reason: " << GcReasonString(reason);
 }
 
 void ThreadState::MarkPhasePrologue(BlinkGC::StackState stack_state,
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h
index 36908df9..d0cfdb5 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.h
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
@@ -508,8 +508,6 @@
     }
   };
 
-  static const char* GcReasonString(BlinkGC::GCReason);
-
   // Returns |true| if |object| resides on this thread's heap.
   // It is well-defined to call this method on any heap allocated
   // reference, provided its associated heap hasn't been detached
diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
index 5ad67733..c93d044 100644
--- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5
+++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -806,6 +806,9 @@
       status: "experimental",
     },
     {
+      name: "PictureInPicture",
+    },
+    {
       name: "PreciseMemoryInfo",
     },
     {
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index d91fd17..8e38cbe2 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -21,15 +21,26 @@
 #include "platform/scheduler/base/work_queue.h"
 #include "platform/scheduler/base/work_queue_sets.h"
 
-static const double kLongTaskTraceEventThreshold = 0.05;
-
 namespace blink {
 namespace scheduler {
 
 namespace {
+
+const double kLongTaskTraceEventThreshold = 0.05;
+
 double MonotonicTimeInSeconds(base::TimeTicks time_ticks) {
   return (time_ticks - base::TimeTicks()).InSecondsF();
 }
+
+void SweepCanceledDelayedTasksInQueue(
+    internal::TaskQueueImpl* queue,
+    std::map<TimeDomain*, base::TimeTicks>* time_domain_now) {
+  TimeDomain* time_domain = queue->GetTimeDomain();
+  if (time_domain_now->find(time_domain) == time_domain_now->end())
+    time_domain_now->insert(std::make_pair(time_domain, time_domain->Now()));
+  queue->SweepCanceledDelayedTasks(time_domain_now->at(time_domain));
+}
+
 }  // namespace
 
 TaskQueueManager::TaskQueueManager(
@@ -37,11 +48,6 @@
     : real_time_domain_(new RealTimeDomain()),
       graceful_shutdown_helper_(new internal::GracefulQueueShutdownHelper()),
       controller_(std::move(controller)),
-      task_was_run_on_quiescence_monitored_queue_(false),
-      work_batch_size_(1),
-      task_count_(0),
-      currently_executing_task_queue_(nullptr),
-      observer_(nullptr),
       weak_factory_(this) {
   // TODO(altimin): Create a sequence checker here.
   DCHECK(controller_->RunsTasksInCurrentSequence());
@@ -88,11 +94,6 @@
           base::DefaultTickClock::GetInstance())));
 }
 
-TaskQueueManager::AnyThread::AnyThread()
-    : do_work_running_count(0),
-      immediate_do_work_posted_count(0),
-      is_nested(false) {}
-
 void TaskQueueManager::RegisterTimeDomain(TimeDomain* time_domain) {
   time_domains_.insert(time_domain);
   time_domain->OnRegisterWithTaskQueueManager(this);
@@ -104,7 +105,7 @@
 
 std::unique_ptr<internal::TaskQueueImpl> TaskQueueManager::CreateTaskQueueImpl(
     const TaskQueue::Spec& spec) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   TimeDomain* time_domain =
       spec.time_domain ? spec.time_domain : real_time_domain_.get();
   DCHECK(time_domains_.find(time_domain) != time_domains_.end());
@@ -116,7 +117,7 @@
 }
 
 void TaskQueueManager::SetObserver(Observer* observer) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   observer_ = observer;
 }
 
@@ -124,7 +125,7 @@
     std::unique_ptr<internal::TaskQueueImpl> task_queue) {
   TRACE_EVENT1("renderer.scheduler", "TaskQueueManager::UnregisterTaskQueue",
                "queue_name", task_queue->GetName());
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
 
   selector_.RemoveQueue(task_queue.get());
 
@@ -222,7 +223,7 @@
     TimeDomain* requesting_time_domain,
     base::TimeTicks now,
     base::TimeTicks run_time) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   // Make sure we don't cancel another TimeDomain's wake-up.
   DCHECK(!next_delayed_do_work_ ||
          next_delayed_do_work_.time_domain() == requesting_time_domain);
@@ -254,7 +255,7 @@
 
 void TaskQueueManager::CancelDelayedWork(TimeDomain* requesting_time_domain,
                                          base::TimeTicks run_time) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   if (next_delayed_do_work_.run_time() != run_time)
     return;
 
@@ -264,7 +265,7 @@
 }
 
 void TaskQueueManager::DoWork(WorkType work_type) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   TRACE_EVENT1("renderer.scheduler", "TaskQueueManager::DoWork", "delayed",
                work_type == WorkType::kDelayed);
 
@@ -369,7 +370,7 @@
     base::Optional<NextTaskDelay> next_delay,
     LazyNow* lazy_now,
     MoveableAutoLock lock) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
 
   {
     MoveableAutoLock auto_lock(std::move(lock));
@@ -388,7 +389,7 @@
     if (any_thread().immediate_do_work_posted_count > 0)
       return;
 
-    if (next_delay->Delay() <= base::TimeDelta()) {
+    if (next_delay->delay() <= base::TimeDelta()) {
       // If a delayed DoWork is pending then we don't need to post a
       // continuation because it should run immediately.
       if (next_delayed_do_work_ &&
@@ -401,23 +402,23 @@
   }
 
   // We avoid holding |any_thread_lock_| while posting the task.
-  if (next_delay->Delay() <= base::TimeDelta()) {
+  if (next_delay->delay() <= base::TimeDelta()) {
     controller_->ScheduleWork();
   } else {
-    base::TimeTicks run_time = lazy_now->Now() + next_delay->Delay();
+    base::TimeTicks run_time = lazy_now->Now() + next_delay->delay();
 
     if (next_delayed_do_work_.run_time() == run_time)
       return;
 
     next_delayed_do_work_ =
         NextDelayedDoWork(run_time, next_delay->time_domain());
-    controller_->ScheduleDelayedWork(next_delay->Delay());
+    controller_->ScheduleDelayedWork(next_delay->delay());
   }
 }
 
 base::Optional<TaskQueueManager::NextTaskDelay>
 TaskQueueManager::ComputeDelayTillNextTaskLocked(LazyNow* lazy_now) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
 
   // Unfortunately because |any_thread_lock_| is held it's not safe to call
   // ReloadEmptyWorkQueues here (possible lock order inversion), however this
@@ -471,7 +472,7 @@
     bool is_nested,
     LazyNow time_before_task,
     base::TimeTicks* time_after_task) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   base::WeakPtr<TaskQueueManager> protect = GetWeakPtr();
   internal::TaskQueueImpl::Task pending_task =
       work_queue->TakeTaskFromWorkQueue();
@@ -625,32 +626,32 @@
 }
 
 void TaskQueueManager::SetWorkBatchSize(int work_batch_size) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   DCHECK_GE(work_batch_size, 1);
   work_batch_size_ = work_batch_size;
 }
 
 void TaskQueueManager::AddTaskObserver(
     base::MessageLoop::TaskObserver* task_observer) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   task_observers_.AddObserver(task_observer);
 }
 
 void TaskQueueManager::RemoveTaskObserver(
     base::MessageLoop::TaskObserver* task_observer) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   task_observers_.RemoveObserver(task_observer);
 }
 
 void TaskQueueManager::AddTaskTimeObserver(
     TaskTimeObserver* task_time_observer) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   task_time_observers_.AddObserver(task_time_observer);
 }
 
 void TaskQueueManager::RemoveTaskTimeObserver(
     TaskTimeObserver* task_time_observer) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   task_time_observers_.RemoveObserver(task_time_observer);
 }
 
@@ -679,7 +680,7 @@
 TaskQueueManager::AsValueWithSelectorResult(
     bool should_run,
     internal::WorkQueue* selected_work_queue) const {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   base::TimeTicks now = real_time_domain()->CreateLazyNow().Now();
@@ -726,7 +727,7 @@
 }
 
 void TaskQueueManager::OnTaskQueueEnabled(internal::TaskQueueImpl* queue) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   DCHECK(queue->IsQueueEnabled());
   // Only schedule DoWork if there's something to do.
   if (queue->HasTaskToRunImmediately() && !queue->BlockedByFence())
@@ -735,7 +736,7 @@
 
 void TaskQueueManager::OnTriedToSelectBlockedWorkQueue(
     internal::WorkQueue* work_queue) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
+  DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
   DCHECK(!work_queue->Empty());
   if (observer_)
     observer_->OnTriedToExecuteBlockedTask();
@@ -745,19 +746,6 @@
   return !selector_.EnabledWorkQueuesEmpty();
 }
 
-namespace {
-
-void SweepCanceledDelayedTasksInQueue(
-    internal::TaskQueueImpl* queue,
-    std::map<TimeDomain*, base::TimeTicks>* time_domain_now) {
-  TimeDomain* time_domain = queue->GetTimeDomain();
-  if (time_domain_now->find(time_domain) == time_domain_now->end())
-    time_domain_now->insert(std::make_pair(time_domain, time_domain->Now()));
-  queue->SweepCanceledDelayedTasks(time_domain_now->at(time_domain));
-}
-
-}  // namespace
-
 void TaskQueueManager::SweepCanceledDelayedTasks() {
   std::map<TimeDomain*, base::TimeTicks> time_domain_now;
   for (const auto& queue : active_queues_)
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
index 5d36310..b61a714 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
@@ -33,14 +33,16 @@
 
 namespace blink {
 namespace scheduler {
-namespace task_queue_manager_unittest {
-class TaskQueueManagerTest;
-}
+
 namespace internal {
 class TaskQueueImpl;
 class ThreadController;
 }  // namespace internal
 
+namespace task_queue_manager_unittest {
+class TaskQueueManagerTest;
+}  // namespace task_queue_manager_unittest
+
 class LazyNow;
 class RealTimeDomain;
 class TaskQueue;
@@ -53,7 +55,7 @@
 //
 // 1. Incoming task queue. Tasks that are posted get immediately appended here.
 //    When a task is appended into an empty incoming queue, the task manager
-//    work function (DoWork) is scheduled to run on the main task runner.
+//    work function (DoWork()) is scheduled to run on the main task runner.
 //
 // 2. Work queue. If a work queue is empty when DoWork() is entered, tasks from
 //    the incoming task queue (if any) are moved here. The work queues are
@@ -66,6 +68,18 @@
       public internal::TaskQueueSelector::Observer,
       public base::RunLoop::NestingObserver {
  public:
+  // Observer class that is called back on the main thread.
+  class PLATFORM_EXPORT Observer {
+   public:
+    virtual ~Observer() {}
+
+    virtual void OnTriedToExecuteBlockedTask() = 0;
+
+    virtual void OnBeginNestedRunLoop() = 0;
+
+    virtual void OnExitNestedRunLoop() = 0;
+  };
+
   ~TaskQueueManager() override;
 
   // Assume direct control over current thread and create a TaskQueueManager.
@@ -86,7 +100,7 @@
 
   // Requests that a task to process work is posted on the main task runner.
   // These tasks are de-duplicated in two buckets: main-thread and all other
-  // threads.  This distinction is done to reduce the overehead from locks, we
+  // threads. This distinction is done to reduce the overhead from locks, we
   // assume the main-thread path will be hot.
   void MaybeScheduleImmediateWork(const base::Location& from_here);
 
@@ -131,20 +145,9 @@
     return task_queue;
   }
 
-  class PLATFORM_EXPORT Observer {
-   public:
-    virtual ~Observer() {}
-
-    virtual void OnTriedToExecuteBlockedTask() = 0;
-
-    virtual void OnBeginNestedRunLoop() = 0;
-
-    virtual void OnExitNestedRunLoop() = 0;
-  };
-
   // Called once to set the Observer. This function is called on the main
   // thread. If |observer| is null, then no callbacks will occur.
-  // Note |observer| is expected to outlive the SchedulerHelper.
+  // Note: |observer| is expected to outlive the SchedulerHelper.
   void SetObserver(Observer* observer);
 
   // Time domains must be registered for the task queues to get updated.
@@ -158,7 +161,7 @@
   // Returns the currently executing TaskQueue if any. Must be called on the
   // thread this class was created on.
   internal::TaskQueueImpl* currently_executing_task_queue() const {
-    DCHECK(main_thread_checker_.CalledOnValidThread());
+    DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
     return currently_executing_task_queue_;
   }
 
@@ -214,7 +217,7 @@
       DCHECK(time_domain);
     }
 
-    base::TimeDelta Delay() const { return delay_; }
+    base::TimeDelta delay() const { return delay_; }
     TimeDomain* time_domain() const { return time_domain_; }
 
     bool operator>(const NextTaskDelay& other) const {
@@ -266,12 +269,35 @@
     TimeDomain* time_domain_;
   };
 
-  // TaskQueueSelector::Observer implementation:
+  enum class ProcessTaskResult {
+    kDeferred,
+    kExecuted,
+    kTaskQueueManagerDeleted,
+  };
+
+  using IncomingImmediateWorkMap =
+      std::unordered_map<internal::TaskQueueImpl*, internal::EnqueueOrder>;
+
+  struct AnyThread {
+    AnyThread() = default;
+
+    // Task queues with newly available work on the incoming queue.
+    IncomingImmediateWorkMap has_incoming_immediate_work;
+
+    int do_work_running_count = 0;
+    int immediate_do_work_posted_count = 0;
+    // Whether or not the message loop is currently nested.
+    bool is_nested = false;
+  };
+
+  // TODO(alexclarke): Add a MainThreadOnly struct too.
+
+  // TaskQueueSelector::Observer:
   void OnTaskQueueEnabled(internal::TaskQueueImpl* queue) override;
   void OnTriedToSelectBlockedWorkQueue(
       internal::WorkQueue* work_queue) override;
 
-  // base::RunLoop::NestingObserver implementation:
+  // base::RunLoop::NestingObserver:
   void OnBeginNestedRunLoop() override;
 
   // Called by the task queue to register a new pending task.
@@ -280,7 +306,7 @@
   // Use the selector to choose a pending task and run it.
   void DoWork(WorkType work_type);
 
-  // Post a DoWork continuation if |next_delay| is not empty.
+  // Post a DoWork() continuation if |next_delay| is not empty.
   void PostDoWorkContinuationLocked(base::Optional<NextTaskDelay> next_delay,
                                     LazyNow* lazy_now,
                                     MoveableAutoLock lock);
@@ -294,15 +320,9 @@
   // avoid running any tasks.
   bool SelectWorkQueueToService(internal::WorkQueue** out_work_queue);
 
-  enum class ProcessTaskResult {
-    kDeferred,
-    kExecuted,
-    kTaskQueueManagerDeleted,
-  };
-
   // Runs a single nestable task from the |queue|. On exit, |out_task| will
   // contain the task which was executed. Non-nestable task are reposted on the
-  // run loop. The queue must not be empty.  On exit |time_after_task| may get
+  // run loop. The queue must not be empty. On exit |time_after_task| may get
   // set (not guaranteed), sampling |real_time_domain()->Now()| immediately
   // after running the task.
   ProcessTaskResult ProcessTaskFromWorkQueue(internal::WorkQueue* work_queue,
@@ -345,9 +365,6 @@
                                        internal::EnqueueOrder enqueue_order,
                                        bool queue_is_blocked);
 
-  using IncomingImmediateWorkMap =
-      std::unordered_map<internal::TaskQueueImpl*, internal::EnqueueOrder>;
-
   // Calls |ReloadImmediateWorkQueueIfEmpty| on all queues in
   // |queues_to_reload|.
   void ReloadEmptyWorkQueues(
@@ -386,24 +403,11 @@
   internal::EnqueueOrderGenerator enqueue_order_generator_;
   base::debug::TaskAnnotator task_annotator_;
 
-  base::ThreadChecker main_thread_checker_;
+  THREAD_CHECKER(main_thread_checker_);
   std::unique_ptr<internal::ThreadController> controller_;
   internal::TaskQueueSelector selector_;
 
-  bool task_was_run_on_quiescence_monitored_queue_;
-
-  struct AnyThread {
-    AnyThread();
-
-    // Task queues with newly available work on the incoming queue.
-    IncomingImmediateWorkMap has_incoming_immediate_work;
-
-    int do_work_running_count;
-    int immediate_do_work_posted_count;
-    bool is_nested;  // Whether or not the message loop is currently nested.
-  };
-
-  // TODO(alexclarke): Add a MainThreadOnly struct too.
+  bool task_was_run_on_quiescence_monitored_queue_ = false;
 
   mutable base::Lock any_thread_lock_;
   AnyThread any_thread_;
@@ -419,16 +423,17 @@
 
   NextDelayedDoWork next_delayed_do_work_;
 
-  int work_batch_size_;
-  size_t task_count_;
+  int work_batch_size_ = 1;
+  size_t task_count_ = 0;
 
   base::ObserverList<base::MessageLoop::TaskObserver> task_observers_;
 
   base::ObserverList<TaskTimeObserver> task_time_observers_;
 
-  internal::TaskQueueImpl* currently_executing_task_queue_;  // NOT OWNED
+  // NOT OWNED
+  internal::TaskQueueImpl* currently_executing_task_queue_ = nullptr;
 
-  Observer* observer_;  // NOT OWNED
+  Observer* observer_ = nullptr;  // NOT OWNED
   base::WeakPtrFactory<TaskQueueManager> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
index 272ffe7..8b1c75ed 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
@@ -2619,23 +2619,23 @@
                                base::TimeDelta::FromSeconds(10));
 
   EXPECT_EQ(base::TimeDelta::FromSeconds(10),
-            ComputeDelayTillNextTask(&lazy_now)->Delay());
+            ComputeDelayTillNextTask(&lazy_now)->delay());
 
   runners_[1]->PostDelayedTask(FROM_HERE, base::Bind(&NopTask),
                                base::TimeDelta::FromSeconds(15));
 
   EXPECT_EQ(base::TimeDelta::FromSeconds(10),
-            ComputeDelayTillNextTask(&lazy_now)->Delay());
+            ComputeDelayTillNextTask(&lazy_now)->delay());
 
   runners_[1]->PostDelayedTask(FROM_HERE, base::Bind(&NopTask),
                                base::TimeDelta::FromSeconds(5));
 
   EXPECT_EQ(base::TimeDelta::FromSeconds(5),
-            ComputeDelayTillNextTask(&lazy_now)->Delay());
+            ComputeDelayTillNextTask(&lazy_now)->delay());
 
   runners_[0]->PostTask(FROM_HERE, base::Bind(&NopTask));
 
-  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->Delay());
+  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->delay());
 }
 
 TEST_F(TaskQueueManagerTest, ComputeDelayTillNextTask_Disabled) {
@@ -2668,7 +2668,7 @@
   runners_[0]->InsertFence(TaskQueue::InsertFencePosition::kNow);
 
   LazyNow lazy_now(&now_src_);
-  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->Delay());
+  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->delay());
 }
 
 TEST_F(TaskQueueManagerTest, ComputeDelayTillNextTask_DelayedTaskReady) {
@@ -2680,7 +2680,7 @@
   now_src_.Advance(base::TimeDelta::FromSeconds(10));
 
   LazyNow lazy_now(&now_src_);
-  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->Delay());
+  EXPECT_EQ(base::TimeDelta(), ComputeDelayTillNextTask(&lazy_now)->delay());
 }
 
 TEST_F(TaskQueueManagerTest, PostDoWorkContinuation_NoMoreWork) {
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
index 56e12ec..6ee65f4 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
@@ -77,6 +77,14 @@
   }
 }
 
+const char* HiddenStateToString(bool is_hidden) {
+  if (is_hidden) {
+    return "hidden";
+  } else {
+    return "visible";
+  }
+}
+
 const char* AudioPlayingStateToString(bool is_audio_playing) {
   if (is_audio_playing) {
     return "playing";
@@ -93,6 +101,17 @@
   }
 }
 
+const char* RendererProcessTypeToString(RendererProcessType process_type) {
+  switch (process_type) {
+    case RendererProcessType::kRenderer:
+      return "normal";
+    case RendererProcessType::kExtensionRenderer:
+      return "extension";
+  }
+  NOTREACHED();
+  return "";  // MSVC needs that.
+}
+
 }  // namespace
 
 RendererSchedulerImpl::RendererSchedulerImpl(
@@ -228,8 +247,18 @@
                        "RendererScheduler.UseCase",
                        renderer_scheduler_impl,
                        UseCaseToString),
-      renderer_pause_count(0),
-      navigation_task_expected_count(0),
+      longest_jank_free_task_duration(
+          base::TimeDelta(),
+          "RendererScheduler.LongestJankFreeTaskDuration",
+          renderer_scheduler_impl,
+          TimeDeltaToMilliseconds),
+      renderer_pause_count(0,
+                           "RendererScheduler.PauseCount",
+                           renderer_scheduler_impl),
+      navigation_task_expected_count(
+          0,
+          "RendererScheduler.NavigationTaskExpectedCount",
+          renderer_scheduler_impl),
       expensive_task_policy(ExpensiveTaskPolicy::kRun,
                             "RendererScheduler.ExpensiveTaskPolicy",
                             renderer_scheduler_impl,
@@ -238,14 +267,28 @@
                             "RendererScheduler.RAILMode",
                             renderer_scheduler_impl,
                             RAILModeToString),
-      renderer_hidden(false),
+      renderer_hidden(false,
+                      "RendererScheduler.Hidden",
+                      renderer_scheduler_impl,
+                      HiddenStateToString),
       renderer_backgrounded(false,
                             "RendererScheduler.Backgrounded",
                             renderer_scheduler_impl,
                             BackgroundStateToString),
-      stopping_when_backgrounded_enabled(false),
-      stopped_when_backgrounded(false),
-      was_shutdown(false),
+      stopping_when_backgrounded_enabled(
+          false,
+          "RendererScheduler.StoppingWhenBackgroundedEnabled",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      stopped_when_backgrounded(
+          false,
+          "RendererScheduler.StoppedWhenBackgrounded",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      was_shutdown(false,
+                   "RendererScheduler.WasShutdown",
+                   renderer_scheduler_impl,
+                   YesNoStateToString),
       loading_task_estimated_cost(
           base::TimeDelta(),
           "RendererScheduler.LoadingTaskEstimatedCostMs",
@@ -269,25 +312,64 @@
                                "RendererScheduler.TouchstartExpectedSoon",
                                renderer_scheduler_impl,
                                YesNoStateToString),
-      have_seen_a_begin_main_frame(false),
-      have_reported_blocking_intervention_in_current_policy(false),
-      have_reported_blocking_intervention_since_navigation(false),
-      has_visible_render_widget_with_touch_handler(false),
-      begin_frame_not_expected_soon(false),
-      in_idle_period_for_testing(false),
-      use_virtual_time(false),
+      have_seen_a_begin_main_frame(
+          false,
+          "RendererScheduler.HasSeenBeginMainFrame",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      have_reported_blocking_intervention_in_current_policy(
+          false,
+          "RendererScheduler.HasReportedBlockingInterventionInCurrentPolicy",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      have_reported_blocking_intervention_since_navigation(
+          false,
+          "RendererScheduler.HasReportedBlockingInterventionSinceNavigation",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      has_visible_render_widget_with_touch_handler(
+          false,
+          "RendererScheduler.HasVisibleRenderWidgetWithTouchHandler",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      begin_frame_not_expected_soon(
+          false,
+          "RendererScheduler.BeginFrameNotExpectedSoon",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      in_idle_period_for_testing(false,
+                                 "RendererScheduler.InIdlePeriod",
+                                 renderer_scheduler_impl,
+                                 YesNoStateToString),
+      use_virtual_time(false,
+                       "RendererScheduler.UseVirtualTime",
+                       renderer_scheduler_impl,
+                       YesNoStateToString),
       is_audio_playing(false,
                        "RendererScheduler.AudioPlaying",
                        renderer_scheduler_impl,
                        AudioPlayingStateToString),
-      compositor_will_send_main_frame_not_expected(false),
-      has_navigated(false),
-      pause_timers_for_webview(false),
+      compositor_will_send_main_frame_not_expected(
+          false,
+          "RendererScheduler.CompositorWillSendMainFrameNotExpected",
+          renderer_scheduler_impl,
+          YesNoStateToString),
+      has_navigated(false,
+                    "RendererScheduler.HasNavigated",
+                    renderer_scheduler_impl,
+                    YesNoStateToString),
+      pause_timers_for_webview(false,
+                               "RendererScheduler.PauseTimersForWebview",
+                               renderer_scheduler_impl,
+                               YesNoStateToString),
       background_status_changed_at(now),
       rail_mode_observer(nullptr),
       wake_up_budget_pool(nullptr),
       metrics_helper(renderer_scheduler_impl, now, renderer_backgrounded),
-      process_type(RendererProcessType::kRenderer),
+      process_type(RendererProcessType::kRenderer,
+                   "RendererScheduler.ProcessType",
+                   renderer_scheduler_impl,
+                   RendererProcessTypeToString),
       virtual_time_policy(VirtualTimePolicy::kAdvance),
       virtual_time_pause_count(0),
       max_virtual_time_task_starvation_count(0),
@@ -721,7 +803,7 @@
   if (helper_.IsShutdown())
     return;
   --main_thread_only().renderer_pause_count;
-  DCHECK_GE(main_thread_only().renderer_pause_count, 0);
+  DCHECK_GE(main_thread_only().renderer_pause_count.value(), 0);
   UpdatePolicy();
 }
 
@@ -1264,7 +1346,7 @@
     if (RuntimeEnabledFeatures::StopLoadingInBackgroundAndroidEnabled())
       new_policy.loading_queue_policy().is_stopped = true;
   }
-  if (main_thread_only().renderer_pause_count) {
+  if (main_thread_only().renderer_pause_count != 0) {
     new_policy.loading_queue_policy().is_paused = true;
     new_policy.timer_queue_policy().is_paused = true;
   }
@@ -1826,7 +1908,7 @@
   // TODO(skyostil): Can we somehow trace how accurate these estimates were?
   state->SetDouble(
       "longest_jank_free_task_duration",
-      main_thread_only().longest_jank_free_task_duration.InMillisecondsF());
+      main_thread_only().longest_jank_free_task_duration->InMillisecondsF());
   state->SetDouble(
       "compositor_frame_interval",
       main_thread_only().compositor_frame_interval.InMillisecondsF());
@@ -1927,7 +2009,7 @@
 
 void RendererSchedulerImpl::OnPendingTasksChanged(bool has_tasks) {
   if (has_tasks ==
-      main_thread_only().compositor_will_send_main_frame_not_expected)
+      main_thread_only().compositor_will_send_main_frame_not_expected.get())
     return;
 
   main_thread_only().compositor_will_send_main_frame_not_expected = has_tasks;
@@ -2143,7 +2225,7 @@
   if (main_thread_only().current_use_case == UseCase::kTouchstart ||
       main_thread_only().longest_jank_free_task_duration <
           base::TimeDelta::FromMilliseconds(kRailsResponseTimeMillis) ||
-      main_thread_only().renderer_pause_count ||
+      main_thread_only().renderer_pause_count != 0 ||
       main_thread_only().stopped_when_backgrounded) {
     return;
   }
@@ -2313,16 +2395,39 @@
 void RendererSchedulerImpl::OnTraceLogEnabled() {
   CreateTraceEventObjectSnapshot();
 
+  // TODO(kraynov): Create auto-registration mechanism.
   main_thread_only().current_use_case.OnTraceLogEnabled();
+  main_thread_only().longest_jank_free_task_duration.Trace();
+  main_thread_only().renderer_pause_count.Trace();
+  main_thread_only().navigation_task_expected_count.Trace();
   main_thread_only().expensive_task_policy.OnTraceLogEnabled();
   main_thread_only().rail_mode_for_tracing.OnTraceLogEnabled();
+  main_thread_only().renderer_hidden.OnTraceLogEnabled();
   main_thread_only().renderer_backgrounded.OnTraceLogEnabled();
+  main_thread_only().stopping_when_backgrounded_enabled.OnTraceLogEnabled();
+  main_thread_only().stopped_when_backgrounded.OnTraceLogEnabled();
+  main_thread_only().was_shutdown.OnTraceLogEnabled();
   main_thread_only().loading_task_estimated_cost.Trace();
   main_thread_only().timer_task_estimated_cost.Trace();
   main_thread_only().loading_tasks_seem_expensive.OnTraceLogEnabled();
   main_thread_only().timer_tasks_seem_expensive.OnTraceLogEnabled();
   main_thread_only().touchstart_expected_soon.OnTraceLogEnabled();
+  main_thread_only().have_seen_a_begin_main_frame.OnTraceLogEnabled();
+  main_thread_only().have_reported_blocking_intervention_in_current_policy.
+      OnTraceLogEnabled();
+  main_thread_only().have_reported_blocking_intervention_since_navigation.
+      OnTraceLogEnabled();
+  main_thread_only().has_visible_render_widget_with_touch_handler.
+      OnTraceLogEnabled();
+  main_thread_only().begin_frame_not_expected_soon.OnTraceLogEnabled();
+  main_thread_only().in_idle_period_for_testing.OnTraceLogEnabled();
+  main_thread_only().use_virtual_time.OnTraceLogEnabled();
   main_thread_only().is_audio_playing.OnTraceLogEnabled();
+  main_thread_only().compositor_will_send_main_frame_not_expected.
+      OnTraceLogEnabled();
+  main_thread_only().has_navigated.OnTraceLogEnabled();
+  main_thread_only().pause_timers_for_webview.OnTraceLogEnabled();
+  main_thread_only().process_type.OnTraceLogEnabled();
 
   for (WebViewSchedulerImpl* web_view_scheduler :
        main_thread_only().web_view_schedulers) {
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
index a38c85f..d639006 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
@@ -631,19 +631,24 @@
     base::TimeTicks current_task_start_time;
     base::TimeDelta most_recent_expected_queueing_time;
     base::TimeDelta compositor_frame_interval;
-    base::TimeDelta longest_jank_free_task_duration;
+    TraceableCounter<base::TimeDelta, kTracingCategoryNameDebug>
+        longest_jank_free_task_duration;
     base::Optional<base::TimeTicks> last_audio_state_change;
-    int renderer_pause_count;  // Renderer is paused if non-zero.
-    int navigation_task_expected_count;
+    TraceableCounter<int, kTracingCategoryNameInfo>
+        renderer_pause_count;  // Renderer is paused if non-zero.
+    TraceableCounter<int, kTracingCategoryNameDebug>
+        navigation_task_expected_count;
     TraceableState<ExpensiveTaskPolicy, kTracingCategoryNameInfo>
         expensive_task_policy;
     TraceableState<v8::RAILMode, kTracingCategoryNameInfo>
         rail_mode_for_tracing;  // Don't use except for tracing.
-    bool renderer_hidden;
+    TraceableState<bool, kTracingCategoryNameDebug> renderer_hidden;
     TraceableState<bool, kTracingCategoryNameDefault> renderer_backgrounded;
-    bool stopping_when_backgrounded_enabled;
-    bool stopped_when_backgrounded;
-    bool was_shutdown;
+    TraceableState<bool, kTracingCategoryNameInfo>
+        stopping_when_backgrounded_enabled;
+    TraceableState<bool, kTracingCategoryNameInfo>
+        stopped_when_backgrounded;
+    TraceableState<bool, kTracingCategoryNameInfo> was_shutdown;
     TraceableCounter<base::TimeDelta, kTracingCategoryNameInfo>
         loading_task_estimated_cost;
     TraceableCounter<base::TimeDelta, kTracingCategoryNameInfo>
@@ -651,17 +656,23 @@
     TraceableState<bool, kTracingCategoryNameInfo> loading_tasks_seem_expensive;
     TraceableState<bool, kTracingCategoryNameInfo> timer_tasks_seem_expensive;
     TraceableState<bool, kTracingCategoryNameDefault> touchstart_expected_soon;
-    bool have_seen_a_begin_main_frame;
-    bool have_reported_blocking_intervention_in_current_policy;
-    bool have_reported_blocking_intervention_since_navigation;
-    bool has_visible_render_widget_with_touch_handler;
-    bool begin_frame_not_expected_soon;
-    bool in_idle_period_for_testing;
-    bool use_virtual_time;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        have_seen_a_begin_main_frame;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        have_reported_blocking_intervention_in_current_policy;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        have_reported_blocking_intervention_since_navigation;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        has_visible_render_widget_with_touch_handler;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        begin_frame_not_expected_soon;
+    TraceableState<bool, kTracingCategoryNameDebug> in_idle_period_for_testing;
+    TraceableState<bool, kTracingCategoryNameInfo> use_virtual_time;
     TraceableState<bool, kTracingCategoryNameDefault> is_audio_playing;
-    bool compositor_will_send_main_frame_not_expected;
-    bool has_navigated;
-    bool pause_timers_for_webview;
+    TraceableState<bool, kTracingCategoryNameDebug>
+        compositor_will_send_main_frame_not_expected;
+    TraceableState<bool, kTracingCategoryNameDebug> has_navigated;
+    TraceableState<bool, kTracingCategoryNameDebug> pause_timers_for_webview;
     std::unique_ptr<base::SingleSampleMetric> max_queueing_time_metric;
     base::TimeDelta max_queueing_time;
     base::TimeTicks background_status_changed_at;
@@ -669,8 +680,8 @@
     RAILModeObserver* rail_mode_observer;                 // Not owned.
     WakeUpBudgetPool* wake_up_budget_pool;                // Not owned.
     RendererMetricsHelper metrics_helper;
-    RendererProcessType process_type;
-
+    TraceableState<RendererProcessType, kTracingCategoryNameDefault>
+        process_type;
     base::ObserverList<VirtualTimeObserver> virtual_time_observers;
     base::TimeTicks initial_virtual_time;
     VirtualTimePolicy virtual_time_policy;
diff --git a/third_party/WebKit/Source/platform/scheduler/util/tracing_helper.h b/third_party/WebKit/Source/platform/scheduler/util/tracing_helper.h
index 592b1936..18fdc25b 100644
--- a/third_party/WebKit/Source/platform/scheduler/util/tracing_helper.h
+++ b/third_party/WebKit/Source/platform/scheduler/util/tracing_helper.h
@@ -74,6 +74,9 @@
   operator T() const {
     return state_;
   }
+  const T& get() const {
+    return state_;
+  }
 
   void OnTraceLogEnabled() {
     Trace();
@@ -137,6 +140,17 @@
     Trace();
   }
 
+  TraceableCounter(T initial_value,
+                   const char* name,
+                   const void* object)
+      : name_(name),
+        object_(object),
+        converter_([](const T& value) { return static_cast<double>(value); }),
+        value_(initial_value) {
+    internal::ValidateTracingCategory(category);
+    Trace();
+  }
+
   TraceableCounter& operator =(const T& value) {
     value_ = value;
     Trace();
@@ -200,6 +214,44 @@
   return lhs.value() > rhs;
 }
 
+template <typename T, const char* category>
+constexpr bool operator <(
+    const TraceableCounter<T, category>& lhs, const T& rhs) {
+  return lhs.value() < rhs;
+}
+
+template <typename T, const char* category>
+constexpr bool operator !=(
+    const TraceableCounter<T, category>& lhs, const T& rhs) {
+  return lhs.value() != rhs;
+}
+
+template <typename T, const char* category>
+constexpr T operator ++(TraceableCounter<T, category>& counter) {
+  counter = counter.value() + 1;
+  return counter.value();
+}
+
+template <typename T, const char* category>
+constexpr T operator --(TraceableCounter<T, category>& counter) {
+  counter = counter.value() - 1;
+  return counter.value();
+}
+
+template <typename T, const char* category>
+constexpr T operator ++(TraceableCounter<T, category>& counter, int) {
+  T value = counter.value();
+  counter = value + 1;
+  return value;
+}
+
+template <typename T, const char* category>
+constexpr T operator --(TraceableCounter<T, category>& counter, int) {
+  T value = counter.value();
+  counter = value - 1;
+  return value;
+}
+
 }  // namespace scheduler
 }  // namespace blink
 
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollSnapData.cpp b/third_party/WebKit/Source/platform/scroll/ScrollSnapData.cpp
deleted file mode 100644
index b303dcf9..0000000
--- a/third_party/WebKit/Source/platform/scroll/ScrollSnapData.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/scroll/ScrollSnapData.h"
-
-namespace blink {
-
-std::ostream& operator<<(std::ostream& ostream, const SnapAreaData& area_data) {
-  return ostream << area_data.snap_offset.Width() << ", "
-                 << area_data.snap_offset.Height();
-}
-
-std::ostream& operator<<(std::ostream& ostream,
-                         const SnapContainerData& container_data) {
-  for (SnapAreaData area_data : container_data.snap_area_list) {
-    ostream << area_data << "\n";
-  }
-  return ostream;
-}
-
-}  // namespace blink
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollSnapData.h b/third_party/WebKit/Source/platform/scroll/ScrollSnapData.h
index 2b12e2e..f8cdb013 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollSnapData.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollSnapData.h
@@ -5,146 +5,19 @@
 #ifndef ScrollSnapData_h
 #define ScrollSnapData_h
 
-#include "platform/scroll/ScrollTypes.h"
-#include "platform/wtf/Vector.h"
+#include "cc/input/scroll_snap_data.h"
 
 // This file defines classes and structs used in SnapCoordinator.h
 
 namespace blink {
 
-// See https://www.w3.org/TR/css-scroll-snap-1/#snap-axis
-enum class SnapAxis : unsigned {
-  kBoth,
-  kX,
-  kY,
-  kBlock,
-  kInline,
-};
-
-// See https://www.w3.org/TR/css-scroll-snap-1/#snap-strictness
-// TODO(sunyunjia): Add kNone for SnapStrictness to match the spec.
-// crbug.com/791663
-enum class SnapStrictness : unsigned { kProximity, kMandatory };
-
-// See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-align
-enum class SnapAlignment : unsigned { kNone, kStart, kEnd, kCenter };
-
-struct ScrollSnapType {
-  DISALLOW_NEW();
-
-  ScrollSnapType()
-      : is_none(true),
-        axis(SnapAxis::kBoth),
-        strictness(SnapStrictness::kProximity) {}
-
-  ScrollSnapType(bool snap_type_none, SnapAxis axis, SnapStrictness strictness)
-      : is_none(snap_type_none), axis(axis), strictness(strictness) {}
-
-  bool operator==(const ScrollSnapType& other) const {
-    return is_none == other.is_none && axis == other.axis &&
-           strictness == other.strictness;
-  }
-
-  bool operator!=(const ScrollSnapType& other) const {
-    return !(*this == other);
-  }
-
-  // Whether the scroll-snap-type is none or the snap-strictness field has the
-  // value None.
-  // TODO(sunyunjia): Consider combining is_none with SnapStrictness.
-  bool is_none;
-
-  SnapAxis axis;
-  SnapStrictness strictness;
-};
-
-struct ScrollSnapAlign {
-  DISALLOW_NEW();
-
-  ScrollSnapAlign()
-      : alignmentX(SnapAlignment::kNone), alignmentY(SnapAlignment::kNone) {}
-
-  explicit ScrollSnapAlign(SnapAlignment alignment)
-      : alignmentX(alignment), alignmentY(alignment) {}
-
-  ScrollSnapAlign(SnapAlignment x, SnapAlignment y)
-      : alignmentX(x), alignmentY(y) {}
-
-  bool operator==(const ScrollSnapAlign& other) const {
-    return alignmentX == other.alignmentX && alignmentY == other.alignmentY;
-  }
-
-  bool operator!=(const ScrollSnapAlign& other) const {
-    return !(*this == other);
-  }
-
-  SnapAlignment alignmentX;
-  SnapAlignment alignmentY;
-};
-
-// Snap area is a bounding box that could be snapped to when a scroll happens in
-// its scroll container.
-// This data structure describes the data needed for SnapCoordinator if we want
-// to snap to this snap area.
-struct SnapAreaData {
-  // kInvalidScrollOffset is used to mark that the snap_offset on a specific
-  // axis is not applicable, thus should not be considered when snapping on that
-  // axis. This is because the snap area has SnapAlignmentNone on that axis.
-  static const int kInvalidScrollOffset = -1;
-
-  SnapAreaData() {}
-
-  SnapAreaData(SnapAxis axis, ScrollOffset offset, bool msnap)
-      : snap_axis(axis), snap_offset(offset), must_snap(msnap) {}
-
-  // The axes along which the area has specified snap positions.
-  SnapAxis snap_axis;
-
-  // The scroll_offset to snap the area at the specified alignment in that axis.
-  ScrollOffset snap_offset;
-
-  // Whether this area has scroll-snap-stop: always.
-  // See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-stop
-  bool must_snap;
-
-  // TODO(sunyunjia): Add fields for visibility requirement and large area
-  // snapping.
-};
-
-// Snap container is a scroll container that has non-'none' value for
-// scroll-snap-type. It can be snapped to one of its snap areas when a scroll
-// happens.
-// This data structure describes the data needed for SnapCoordinator to perform
-// snapping in the snap container.
-struct SnapContainerData {
-  SnapContainerData() : SnapContainerData(ScrollSnapType()) {}
-  explicit SnapContainerData(ScrollSnapType type) : scroll_snap_type(type) {}
-  SnapContainerData(ScrollSnapType type, ScrollOffset min, ScrollOffset max)
-      : scroll_snap_type(type), min_offset(min), max_offset(max) {}
-  void AddSnapAreaData(SnapAreaData snap_area_data) {
-    snap_area_list.push_back(snap_area_data);
-  }
-
-  // Specifies whether a scroll container is a scroll snap container, how
-  // strictly it snaps, and which axes are considered.
-  // See https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-type for details.
-  ScrollSnapType scroll_snap_type;
-
-  // The minimal scrollable offset of the SnapContainer.
-  ScrollOffset min_offset;
-
-  // The maximal scrollable offset of the SnapContainer.
-  ScrollOffset max_offset;
-
-  // The SnapAreaData for the snap areas in this snap container. When a scroll
-  // happens, we iterate through the snap_area_list to find the best snap
-  // position.
-  Vector<SnapAreaData> snap_area_list;
-};
-
-PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const SnapAreaData&);
-PLATFORM_EXPORT std::ostream& operator<<(std::ostream&,
-                                         const SnapContainerData&);
+using SnapAxis = cc::SnapAxis;
+using SnapStrictness = cc::SnapStrictness;
+using SnapAlignment = cc::SnapAlignment;
+using ScrollSnapType = cc::ScrollSnapType;
+using ScrollSnapAlign = cc::ScrollSnapAlign;
+using SnapAreaData = cc::SnapAreaData;
+using SnapContainerData = cc::SnapContainerData;
 
 }  // namespace blink
 
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollTypes.h b/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
index ff1582f..883e73cb 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
@@ -282,6 +282,16 @@
   }
 }
 
+inline ScrollOffset ScrollPositionToOffset(FloatPoint position,
+                                           FloatPoint origin) {
+  return position - origin;
+}
+
+inline FloatPoint ScrollOffsetToPosition(ScrollOffset offset,
+                                         FloatPoint origin) {
+  return origin + offset;
+}
+
 typedef unsigned ScrollbarControlPartMask;
 
 }  // namespace blink
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
index ed7e67d..7cb28db 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
@@ -371,13 +371,17 @@
             run under the server lock, the second can be run whenever.
         """
 
+        # WARNING: fully_parallel and run_singly flags are deprecated.
+        if fully_parallel:
+            _log.warning('WARNING: fully_parallel flag is deprecated.')
+        if run_singly:
+            _log.warning('WARNING: run_singly flag is deprecated.')
+
         # FIXME: Move all of the sharding logic out of manager into its
         # own class or module. Consider grouping it with the chunking logic
         # in prepare_lists as well.
         if num_workers == 1:
             return self._shard_in_two(test_inputs)
-        elif fully_parallel:
-            return self._shard_every_file(test_inputs, run_singly)
         return self._shard_by_directory(test_inputs)
 
     def _shard_in_two(self, test_inputs):
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
index d1128af..37d728c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
@@ -219,24 +219,6 @@
                                                          'dom/html/level2/html/HTMLAnchorElement06.html']),
                                ('fast/css', ['fast/css/display-none-inline-style-change-crash.html'])])
 
-    def test_shard_every_file(self):
-        locked, unlocked = self.get_shards(num_workers=2, fully_parallel=True, max_locked_shards=2, run_singly=False)
-        self.assert_shards(locked,
-                           [('locked_shard_1',
-                             ['http/tests/websocket/tests/unicode.htm',
-                              'http/tests/security/view-source-no-refresh.html',
-                              'http/tests/websocket/tests/websocket-protocol-ignored.html']),
-                               ('locked_shard_2',
-                                ['http/tests/xmlhttprequest/supported-xml-content-types.html',
-                                 'perf/object-keys.html'])])
-        self.assert_shards(unlocked,
-                           [('virtual/threaded/dir', ['virtual/threaded/dir/test.html']),
-                            ('virtual/threaded/fast/foo', ['virtual/threaded/fast/foo/test.html']),
-                               ('.', ['animations/keyframes.html']),
-                               ('.', ['fast/css/display-none-inline-style-change-crash.html']),
-                               ('.', ['dom/html/level2/html/HTMLAnchorElement03.html']),
-                               ('.', ['dom/html/level2/html/HTMLAnchorElement06.html'])])
-
     def test_shard_in_two(self):
         locked, unlocked = self.get_shards(num_workers=1, fully_parallel=False, run_singly=False)
         self.assert_shards(locked,
@@ -286,18 +268,3 @@
                               'http/tests/websocket/tests/websocket-protocol-ignored.html',
                               'http/tests/xmlhttprequest/supported-xml-content-types.html',
                               'perf/object-keys.html'])])
-
-    def test_virtual_shards(self):
-        # With run_singly=False, we try to keep all of the tests in a virtual suite together even
-        # when fully_parallel=True, so that we don't restart every time the command line args change.
-        _, unlocked = self.get_shards(num_workers=2, fully_parallel=True, max_locked_shards=2, run_singly=False,
-                                      test_list=['virtual/foo/bar1.html', 'virtual/foo/bar2.html'])
-        self.assert_shards(unlocked,
-                           [('virtual/foo', ['virtual/foo/bar1.html', 'virtual/foo/bar2.html'])])
-
-        # But, with run_singly=True, we have to restart every time anyway, so we want full parallelism.
-        _, unlocked = self.get_shards(num_workers=2, fully_parallel=True, max_locked_shards=2, run_singly=True,
-                                      test_list=['virtual/foo/bar1.html', 'virtual/foo/bar2.html'])
-        self.assert_shards(unlocked,
-                           [('.', ['virtual/foo/bar1.html']),
-                            ('.', ['virtual/foo/bar2.html'])])
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 2ac0ee28..e5c0965f3 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -445,7 +445,6 @@
                 help=('wrapper command to insert before invocations of the driver; option '
                       'is split on whitespace before running. (Example: --wrapper="valgrind '
                       '--smc-check=all")')),
-            # FIXME: Display the default number of child processes that will run.
             optparse.make_option(
                 '-f', '--fully-parallel',
                 action='store_true',
diff --git a/third_party/WebKit/common/BUILD.gn b/third_party/WebKit/common/BUILD.gn
index 1c6996a..2f4271d 100644
--- a/third_party/WebKit/common/BUILD.gn
+++ b/third_party/WebKit/common/BUILD.gn
@@ -113,6 +113,7 @@
     "blob/blob.mojom",
     "blob/blob_registry.mojom",
     "clipboard/clipboard.mojom",
+    "color_chooser/color_chooser.mojom",
     "feature_policy/feature_policy.mojom",
     "page/page_visibility_state.mojom",
     "service_worker/navigation_preload_state.mojom",
diff --git a/third_party/WebKit/common/color_chooser/OWNERS b/third_party/WebKit/common/color_chooser/OWNERS
new file mode 100644
index 0000000..08850f4
--- /dev/null
+++ b/third_party/WebKit/common/color_chooser/OWNERS
@@ -0,0 +1,2 @@
+per-file *.mojom=set noparent
+per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/content/common/color_chooser.mojom b/third_party/WebKit/common/color_chooser/color_chooser.mojom
similarity index 88%
rename from content/common/color_chooser.mojom
rename to third_party/WebKit/common/color_chooser/color_chooser.mojom
index 6e701fb..c2525a2 100644
--- a/content/common/color_chooser.mojom
+++ b/third_party/WebKit/common/color_chooser/color_chooser.mojom
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-module content.mojom;
+module blink.mojom;
 
-import "content/public/common/color_suggestion.mojom";
+struct ColorSuggestion {
+  uint32 color;
+  string label;
+};
 
 // A ColorChooser window is shown for <input type="color">.
 interface ColorChooserFactory {
diff --git a/third_party/WebKit/common/feature_policy/feature_policy.cc b/third_party/WebKit/common/feature_policy/feature_policy.cc
index ee8e9dc7..18a35ee 100644
--- a/third_party/WebKit/common/feature_policy/feature_policy.cc
+++ b/third_party/WebKit/common/feature_policy/feature_policy.cc
@@ -269,6 +269,14 @@
                            {FeaturePolicyFeature::kUsb,
                             FeaturePolicy::FeatureDefault::EnableForSelf},
                            {FeaturePolicyFeature::kWebVr,
+                            FeaturePolicy::FeatureDefault::EnableForSelf},
+                           {FeaturePolicyFeature::kAccelerometer,
+                            FeaturePolicy::FeatureDefault::EnableForSelf},
+                           {FeaturePolicyFeature::kAmbientLightSensor,
+                            FeaturePolicy::FeatureDefault::EnableForSelf},
+                           {FeaturePolicyFeature::kGyroscope,
+                            FeaturePolicy::FeatureDefault::EnableForSelf},
+                           {FeaturePolicyFeature::kMagnetometer,
                             FeaturePolicy::FeatureDefault::EnableForSelf}}));
   return default_feature_list;
 }
diff --git a/third_party/WebKit/common/feature_policy/feature_policy.mojom b/third_party/WebKit/common/feature_policy/feature_policy.mojom
index f67a1a0..f2f39ae 100644
--- a/third_party/WebKit/common/feature_policy/feature_policy.mojom
+++ b/third_party/WebKit/common/feature_policy/feature_policy.mojom
@@ -73,6 +73,14 @@
   kAccessibilityEvents,
   // Controls use of WebVR API.
   kWebVr,
+  // The following features control access to the corresponding sensor classes.
+  // Fusion sensor APIs (e.g. LinearAcceleration, OrientationSensor-based
+  // classes)require all of the features that are inputs into that API to be
+  // enabled for the feature to be allowed.
+  kAccelerometer,
+  kAmbientLightSensor,
+  kGyroscope,
+  kMagnetometer,
 };
 
 // This struct holds feature policy whitelist data that needs to be replicated
diff --git a/third_party/WebKit/common/feature_policy/feature_policy_feature.h b/third_party/WebKit/common/feature_policy/feature_policy_feature.h
index 608243bd..3475df5 100644
--- a/third_party/WebKit/common/feature_policy/feature_policy_feature.h
+++ b/third_party/WebKit/common/feature_policy/feature_policy_feature.h
@@ -51,7 +51,15 @@
   kAccessibilityEvents,
   // Controls use of WebVR API.
   kWebVr,
-  LAST_FEATURE = kWebVr
+  // The following features control access to the corresponding sensor classes.
+  // Fusion sensor APIs (e.g. LinearAcceleration, OrientationSensor-based
+  // classes)require all of the features that are inputs into that API to be
+  // enabled for the feature to be allowed.
+  kAccelerometer,
+  kAmbientLightSensor,
+  kGyroscope,
+  kMagnetometer,
+  LAST_FEATURE = kMagnetometer
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/common/feature_policy/feature_policy_struct_traits.h b/third_party/WebKit/common/feature_policy/feature_policy_struct_traits.h
index f4d9068..a8ea444 100644
--- a/third_party/WebKit/common/feature_policy/feature_policy_struct_traits.h
+++ b/third_party/WebKit/common/feature_policy/feature_policy_struct_traits.h
@@ -57,6 +57,14 @@
                    ::blink::mojom::FeaturePolicyFeature::kUsb);
 STATIC_ASSERT_ENUM(::blink::FeaturePolicyFeature::kWebVr,
                    ::blink::mojom::FeaturePolicyFeature::kWebVr);
+STATIC_ASSERT_ENUM(::blink::FeaturePolicyFeature::kAccelerometer,
+                   ::blink::mojom::FeaturePolicyFeature::kAccelerometer);
+STATIC_ASSERT_ENUM(::blink::FeaturePolicyFeature::kAmbientLightSensor,
+                   ::blink::mojom::FeaturePolicyFeature::kAmbientLightSensor);
+STATIC_ASSERT_ENUM(::blink::FeaturePolicyFeature::kGyroscope,
+                   ::blink::mojom::FeaturePolicyFeature::kGyroscope);
+STATIC_ASSERT_ENUM(::blink::FeaturePolicyFeature::kMagnetometer,
+                   ::blink::mojom::FeaturePolicyFeature::kMagnetometer);
 
 // TODO(crbug.com/789818) - Merge these 2 WebSandboxFlags enums.
 STATIC_ASSERT_ENUM(::blink::WebSandboxFlags::kNone,
diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn
index 1fa6b6e..a4ba948 100644
--- a/third_party/WebKit/public/BUILD.gn
+++ b/third_party/WebKit/public/BUILD.gn
@@ -418,7 +418,6 @@
     "platform/modules/presentation/WebPresentationReceiver.h",
     "platform/modules/push_messaging/WebPushClient.h",
     "platform/modules/push_messaging/WebPushError.h",
-    "platform/modules/push_messaging/WebPushPermissionStatus.h",
     "platform/modules/push_messaging/WebPushProvider.h",
     "platform/modules/push_messaging/WebPushSubscription.h",
     "platform/modules/push_messaging/WebPushSubscriptionOptions.h",
@@ -470,9 +469,6 @@
     "web/WebAutofillClient.h",
     "web/WebBlob.h",
     "web/WebCSSParser.h",
-    "web/WebColorChooser.h",
-    "web/WebColorChooserClient.h",
-    "web/WebColorSuggestion.h",
     "web/WebConsoleMessage.h",
     "web/WebContextFeatures.h",
     "web/WebContextMenuData.h",
diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
index 342eb3c..7aff6714 100644
--- a/third_party/WebKit/public/platform/Platform.h
+++ b/third_party/WebKit/public/platform/Platform.h
@@ -480,7 +480,7 @@
   // Returns an interface to run nested message loop. Used for debugging.
   class NestedMessageLoopRunner {
    public:
-    virtual ~NestedMessageLoopRunner() {}
+    virtual ~NestedMessageLoopRunner() = default;
     virtual void Run() = 0;
     virtual void QuitNow() = 0;
   };
diff --git a/third_party/WebKit/public/platform/WebApplicationCacheHost.h b/third_party/WebKit/public/platform/WebApplicationCacheHost.h
index 286ba2bc..02d7ab0 100644
--- a/third_party/WebKit/public/platform/WebApplicationCacheHost.h
+++ b/third_party/WebKit/public/platform/WebApplicationCacheHost.h
@@ -81,7 +81,7 @@
 
   static const int kAppCacheNoHostId = 0;
 
-  virtual ~WebApplicationCacheHost() {}
+  virtual ~WebApplicationCacheHost() = default;
 
   // Called for every request made within the context.
   virtual void WillStartMainResourceRequest(
diff --git a/third_party/WebKit/public/platform/WebApplicationCacheHostClient.h b/third_party/WebKit/public/platform/WebApplicationCacheHostClient.h
index b72194d2..afa00f9 100644
--- a/third_party/WebKit/public/platform/WebApplicationCacheHostClient.h
+++ b/third_party/WebKit/public/platform/WebApplicationCacheHostClient.h
@@ -55,7 +55,7 @@
 
  protected:
   // Should not be deleted by the embedder.
-  virtual ~WebApplicationCacheHostClient() {}
+  virtual ~WebApplicationCacheHostClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebAudioBus.h b/third_party/WebKit/public/platform/WebAudioBus.h
index 5d1fa1ee..e7485da 100644
--- a/third_party/WebKit/public/platform/WebAudioBus.h
+++ b/third_party/WebKit/public/platform/WebAudioBus.h
@@ -42,7 +42,7 @@
 //
 class BLINK_PLATFORM_EXPORT WebAudioBus {
  public:
-  WebAudioBus() {}
+  WebAudioBus() = default;
   ~WebAudioBus() { Reset(); }
 
   // Initialize() allocates memory of the given length for the given number of
@@ -71,8 +71,8 @@
 
  private:
   // Disallow copy and assign.
-  WebAudioBus(const WebAudioBus&);
-  void operator=(const WebAudioBus&);
+  WebAudioBus(const WebAudioBus&) = delete;
+  void operator=(const WebAudioBus&) = delete;
 
   AudioBus* private_ = nullptr;
 };
diff --git a/third_party/WebKit/public/platform/WebAudioDestinationConsumer.h b/third_party/WebKit/public/platform/WebAudioDestinationConsumer.h
index 32a3532..4b5bbd9d 100644
--- a/third_party/WebKit/public/platform/WebAudioDestinationConsumer.h
+++ b/third_party/WebKit/public/platform/WebAudioDestinationConsumer.h
@@ -31,7 +31,7 @@
 
 class WebAudioDestinationConsumer {
  public:
-  virtual ~WebAudioDestinationConsumer() {}
+  virtual ~WebAudioDestinationConsumer() = default;
 
   virtual void SetFormat(size_t number_of_channels, float sample_rate) = 0;
 
diff --git a/third_party/WebKit/public/platform/WebAudioDevice.h b/third_party/WebKit/public/platform/WebAudioDevice.h
index 0191d5b..b29baed 100644
--- a/third_party/WebKit/public/platform/WebAudioDevice.h
+++ b/third_party/WebKit/public/platform/WebAudioDevice.h
@@ -54,7 +54,7 @@
     virtual ~RenderCallback();
   };
 
-  virtual ~WebAudioDevice() {}
+  virtual ~WebAudioDevice() = default;
 
   virtual void Start() = 0;
   virtual void Stop() = 0;
diff --git a/third_party/WebKit/public/platform/WebAudioSourceProvider.h b/third_party/WebKit/public/platform/WebAudioSourceProvider.h
index 7a25f277..c66f709 100644
--- a/third_party/WebKit/public/platform/WebAudioSourceProvider.h
+++ b/third_party/WebKit/public/platform/WebAudioSourceProvider.h
@@ -34,7 +34,7 @@
 // Abstract interface for a pull-model client.
 class WebAudioSourceProvider {
  public:
-  virtual ~WebAudioSourceProvider() {}
+  virtual ~WebAudioSourceProvider() = default;
 
   // ProvideInput() gets called repeatedly to render time-slices of a continuous
   // audio stream. May be called from any thread.
diff --git a/third_party/WebKit/public/platform/WebAudioSourceProviderClient.h b/third_party/WebKit/public/platform/WebAudioSourceProviderClient.h
index 3537c30..2f8634ba 100644
--- a/third_party/WebKit/public/platform/WebAudioSourceProviderClient.h
+++ b/third_party/WebKit/public/platform/WebAudioSourceProviderClient.h
@@ -32,7 +32,7 @@
   virtual void SetFormat(size_t number_of_channels, float sample_rate) = 0;
 
  protected:
-  virtual ~WebAudioSourceProviderClient() {}
+  virtual ~WebAudioSourceProviderClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebBlobRegistry.h b/third_party/WebKit/public/platform/WebBlobRegistry.h
index 6acce30..983e75c0 100644
--- a/third_party/WebKit/public/platform/WebBlobRegistry.h
+++ b/third_party/WebKit/public/platform/WebBlobRegistry.h
@@ -60,7 +60,7 @@
   // * Append.* methods are invalid after Build() is called.
   class Builder {
    public:
-    virtual ~Builder() {}
+    virtual ~Builder() = default;
     virtual void AppendData(const WebThreadSafeData&) = 0;
     virtual void AppendFile(const WebString& path,
                             uint64_t offset,
@@ -81,7 +81,7 @@
     virtual void Build() = 0;
   };
 
-  virtual ~WebBlobRegistry() {}
+  virtual ~WebBlobRegistry() = default;
 
   // TODO(dmurph): Deprecate and migrate to CreateBuilder
   virtual void RegisterBlobData(const WebString& uuid, const WebBlobData&) {}
diff --git a/third_party/WebKit/public/platform/WebCache.h b/third_party/WebKit/public/platform/WebCache.h
index 0062ec1..780e960b 100644
--- a/third_party/WebKit/public/platform/WebCache.h
+++ b/third_party/WebKit/public/platform/WebCache.h
@@ -75,7 +75,7 @@
   BLINK_PLATFORM_EXPORT static void GetResourceTypeStats(ResourceTypeStats*);
 
  private:
-  WebCache();  // Not intended to be instanced.
+  WebCache() = delete;  // Not intended to be instanced.
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCallbacks.h b/third_party/WebKit/public/platform/WebCallbacks.h
index 1a5f1f2..d66ff7e 100644
--- a/third_party/WebKit/public/platform/WebCallbacks.h
+++ b/third_party/WebKit/public/platform/WebCallbacks.h
@@ -44,7 +44,7 @@
 template <typename S, typename T>
 class WebCallbacks {
  public:
-  virtual ~WebCallbacks() {}
+  virtual ~WebCallbacks() = default;
   virtual void OnSuccess(S) {}
   virtual void OnError(T) {}
 };
@@ -52,7 +52,7 @@
 template <typename T>
 class WebCallbacks<void, T> {
  public:
-  virtual ~WebCallbacks() {}
+  virtual ~WebCallbacks() = default;
   virtual void OnSuccess() {}
   virtual void OnError(T) {}
 };
@@ -60,7 +60,7 @@
 template <typename S>
 class WebCallbacks<S, void> {
  public:
-  virtual ~WebCallbacks() {}
+  virtual ~WebCallbacks() = default;
   virtual void OnSuccess(S) {}
   virtual void OnError() {}
 };
@@ -68,7 +68,7 @@
 template <>
 class WebCallbacks<void, void> {
  public:
-  virtual ~WebCallbacks() {}
+  virtual ~WebCallbacks() = default;
   virtual void OnSuccess() {}
   virtual void OnError() {}
 };
diff --git a/third_party/WebKit/public/platform/WebClientHintsType.h b/third_party/WebKit/public/platform/WebClientHintsType.h
index 7210ac5..96e0ea0 100644
--- a/third_party/WebKit/public/platform/WebClientHintsType.h
+++ b/third_party/WebKit/public/platform/WebClientHintsType.h
@@ -12,7 +12,7 @@
 // WebEnabledClientHints stores all the client hints along with whether the hint
 // is enabled or not.
 struct WebEnabledClientHints {
-  WebEnabledClientHints() {}
+  WebEnabledClientHints() = default;
 
   bool IsEnabled(mojom::WebClientHintsType type) const {
     return enabled_types_[static_cast<int>(type)];
diff --git a/third_party/WebKit/public/platform/WebCompositorMutatorClient.h b/third_party/WebKit/public/platform/WebCompositorMutatorClient.h
index b69ee21..ae74495 100644
--- a/third_party/WebKit/public/platform/WebCompositorMutatorClient.h
+++ b/third_party/WebKit/public/platform/WebCompositorMutatorClient.h
@@ -15,7 +15,7 @@
 class BLINK_PLATFORM_EXPORT WebCompositorMutatorClient
     : public cc::LayerTreeMutator {
  public:
-  ~WebCompositorMutatorClient() override {}
+  ~WebCompositorMutatorClient() override = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCompositorSupport.h b/third_party/WebKit/public/platform/WebCompositorSupport.h
index 416738aa..d99aa820 100644
--- a/third_party/WebKit/public/platform/WebCompositorSupport.h
+++ b/third_party/WebKit/public/platform/WebCompositorSupport.h
@@ -82,7 +82,7 @@
       bool is_left_side_vertical_scrollbar) = 0;
 
  protected:
-  virtual ~WebCompositorSupport() {}
+  virtual ~WebCompositorSupport() = default;
 };
 }
 
diff --git a/third_party/WebKit/public/platform/WebContentLayer.h b/third_party/WebKit/public/platform/WebContentLayer.h
index eedd739..220be8b2 100644
--- a/third_party/WebKit/public/platform/WebContentLayer.h
+++ b/third_party/WebKit/public/platform/WebContentLayer.h
@@ -33,7 +33,7 @@
 
 class WebContentLayer {
  public:
-  virtual ~WebContentLayer() {}
+  virtual ~WebContentLayer() = default;
 
   // The WebContentLayer has ownership of this wrapper.
   virtual WebLayer* Layer() = 0;
diff --git a/third_party/WebKit/public/platform/WebContentLayerClient.h b/third_party/WebKit/public/platform/WebContentLayerClient.h
index 02f6566..9db7a09 100644
--- a/third_party/WebKit/public/platform/WebContentLayerClient.h
+++ b/third_party/WebKit/public/platform/WebContentLayerClient.h
@@ -76,7 +76,7 @@
   virtual size_t ApproximateUnsharedMemoryUsage() const { return 0; }
 
  protected:
-  virtual ~WebContentLayerClient() {}
+  virtual ~WebContentLayerClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebContentSettingCallbacks.h b/third_party/WebKit/public/platform/WebContentSettingCallbacks.h
index 0c63c982e..34a4ed94 100644
--- a/third_party/WebKit/public/platform/WebContentSettingCallbacks.h
+++ b/third_party/WebKit/public/platform/WebContentSettingCallbacks.h
@@ -19,7 +19,7 @@
 class WebContentSettingCallbacks {
  public:
   ~WebContentSettingCallbacks() { Reset(); }
-  WebContentSettingCallbacks() {}
+  WebContentSettingCallbacks() = default;
   WebContentSettingCallbacks(const WebContentSettingCallbacks& c) { Assign(c); }
   WebContentSettingCallbacks& operator=(const WebContentSettingCallbacks& c) {
     Assign(c);
diff --git a/third_party/WebKit/public/platform/WebContentSettingsClient.h b/third_party/WebKit/public/platform/WebContentSettingsClient.h
index 04dc079..6bcf94a 100644
--- a/third_party/WebKit/public/platform/WebContentSettingsClient.h
+++ b/third_party/WebKit/public/platform/WebContentSettingsClient.h
@@ -115,7 +115,7 @@
       base::TimeDelta duration,
       const blink::WebURL& url) {}
 
-  virtual ~WebContentSettingsClient() {}
+  virtual ~WebContentSettingsClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCookieJar.h b/third_party/WebKit/public/platform/WebCookieJar.h
index bd0a1aba..85bacc2 100644
--- a/third_party/WebKit/public/platform/WebCookieJar.h
+++ b/third_party/WebKit/public/platform/WebCookieJar.h
@@ -50,7 +50,7 @@
   }
 
  protected:
-  ~WebCookieJar() {}
+  ~WebCookieJar() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCredentialManagerClient.h b/third_party/WebKit/public/platform/WebCredentialManagerClient.h
index d20e5af..79edb4a 100644
--- a/third_party/WebKit/public/platform/WebCredentialManagerClient.h
+++ b/third_party/WebKit/public/platform/WebCredentialManagerClient.h
@@ -39,7 +39,7 @@
                            RequestCallbacks*) {}
 
  protected:
-  virtual ~WebCredentialManagerClient() {}
+  virtual ~WebCredentialManagerClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCrypto.h b/third_party/WebKit/public/platform/WebCrypto.h
index cf6a02fd..625be5f 100644
--- a/third_party/WebKit/public/platform/WebCrypto.h
+++ b/third_party/WebKit/public/platform/WebCrypto.h
@@ -110,7 +110,7 @@
 
 class WebCryptoDigestor {
  public:
-  virtual ~WebCryptoDigestor() {}
+  virtual ~WebCryptoDigestor() = default;
 
   // Consume() will return |true| on the successful addition of data to the
   // partially generated digest. It will return |false| when that fails. After
@@ -130,7 +130,7 @@
   }
 
  protected:
-  WebCryptoDigestor() {}
+  WebCryptoDigestor() = default;
 };
 
 class WebCrypto {
@@ -353,7 +353,7 @@
   }
 
  protected:
-  virtual ~WebCrypto() {}
+  virtual ~WebCrypto() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCryptoAlgorithm.h b/third_party/WebKit/public/platform/WebCryptoAlgorithm.h
index 242c3c40..5f7fd80 100644
--- a/third_party/WebKit/public/platform/WebCryptoAlgorithm.h
+++ b/third_party/WebKit/public/platform/WebCryptoAlgorithm.h
@@ -152,7 +152,7 @@
 class WebCryptoAlgorithm {
  public:
 #if INSIDE_BLINK
-  WebCryptoAlgorithm() {}
+  WebCryptoAlgorithm() = default;
   BLINK_PLATFORM_EXPORT WebCryptoAlgorithm(
       WebCryptoAlgorithmId,
       std::unique_ptr<WebCryptoAlgorithmParams>);
diff --git a/third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h b/third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h
index 2438320c..681175d3 100644
--- a/third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h
+++ b/third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h
@@ -53,8 +53,8 @@
 
 class WebCryptoAlgorithmParams {
  public:
-  WebCryptoAlgorithmParams() {}
-  virtual ~WebCryptoAlgorithmParams() {}
+  WebCryptoAlgorithmParams() = default;
+  virtual ~WebCryptoAlgorithmParams() = default;
   virtual WebCryptoAlgorithmParamsType GetType() const = 0;
 };
 
diff --git a/third_party/WebKit/public/platform/WebCryptoKey.h b/third_party/WebKit/public/platform/WebCryptoKey.h
index cde45a07..41c80807 100644
--- a/third_party/WebKit/public/platform/WebCryptoKey.h
+++ b/third_party/WebKit/public/platform/WebCryptoKey.h
@@ -90,7 +90,7 @@
 class WebCryptoKey {
  public:
   // Constructs a "null" key (One for which isNull() returns true).
-  WebCryptoKey() {}
+  WebCryptoKey() = default;
   ~WebCryptoKey() { Reset(); }
 
   WebCryptoKey(const WebCryptoKey& other) { Assign(other); }
@@ -137,7 +137,7 @@
 // of this object is controlled by WebCryptoKey using reference counting.
 class WebCryptoKeyHandle {
  public:
-  virtual ~WebCryptoKeyHandle() {}
+  virtual ~WebCryptoKeyHandle() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h b/third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h
index 448f8fb0..085a953d 100644
--- a/third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h
+++ b/third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h
@@ -50,7 +50,7 @@
 //   * Copiable (cheaply)
 class WebCryptoKeyAlgorithm {
  public:
-  WebCryptoKeyAlgorithm() {}
+  WebCryptoKeyAlgorithm() = default;
 
 #if INSIDE_BLINK
   BLINK_PLATFORM_EXPORT WebCryptoKeyAlgorithm(
diff --git a/third_party/WebKit/public/platform/WebCryptoKeyAlgorithmParams.h b/third_party/WebKit/public/platform/WebCryptoKeyAlgorithmParams.h
index 2ba370e..df62b5ae 100644
--- a/third_party/WebKit/public/platform/WebCryptoKeyAlgorithmParams.h
+++ b/third_party/WebKit/public/platform/WebCryptoKeyAlgorithmParams.h
@@ -48,7 +48,7 @@
   STACK_ALLOCATED();
 #endif
  public:
-  virtual ~WebCryptoKeyAlgorithmDictionary() {}
+  virtual ~WebCryptoKeyAlgorithmDictionary() = default;
 
   virtual void SetString(const char*, const char*) = 0;
   virtual void SetUint(const char*, unsigned) = 0;
@@ -66,7 +66,7 @@
 
 class WebCryptoKeyAlgorithmParams {
  public:
-  virtual ~WebCryptoKeyAlgorithmParams() {}
+  virtual ~WebCryptoKeyAlgorithmParams() = default;
   virtual WebCryptoKeyAlgorithmParamsType GetType() const {
     return kWebCryptoKeyAlgorithmParamsTypeNone;
   }
diff --git a/third_party/WebKit/public/platform/WebData.h b/third_party/WebKit/public/platform/WebData.h
index ddb5bed4..ac0d810d 100644
--- a/third_party/WebKit/public/platform/WebData.h
+++ b/third_party/WebKit/public/platform/WebData.h
@@ -50,7 +50,7 @@
  public:
   ~WebData() { Reset(); }
 
-  WebData() {}
+  WebData() = default;
 
   WebData(const char* data, size_t size) { Assign(data, size); }
 
diff --git a/third_party/WebKit/public/platform/WebDataConsumerHandle.h b/third_party/WebKit/public/platform/WebDataConsumerHandle.h
index d4477d9..42bad3d7 100644
--- a/third_party/WebKit/public/platform/WebDataConsumerHandle.h
+++ b/third_party/WebKit/public/platform/WebDataConsumerHandle.h
@@ -41,7 +41,7 @@
   // Client gets notification from the pipe.
   class BLINK_PLATFORM_EXPORT Client {
    public:
-    virtual ~Client() {}
+    virtual ~Client() = default;
     // The associated handle gets readable. This function will be called
     // when the associated reader was waiting but is not waiting any more.
     // This means this function can be called when handle gets errored or
@@ -65,7 +65,7 @@
    public:
     // Destructing a reader means it is released and a user can get another
     // Reader by calling |ObtainReader| on any thread again.
-    virtual ~Reader() {}
+    virtual ~Reader() = default;
 
     // Reads data into |data| up to |size| bytes. The actual read size will
     // be stored in |*read_size|. This function cannot be called when a
diff --git a/third_party/WebKit/public/platform/WebDatabaseObserver.h b/third_party/WebKit/public/platform/WebDatabaseObserver.h
index 4d354b1..2b08aca 100644
--- a/third_party/WebKit/public/platform/WebDatabaseObserver.h
+++ b/third_party/WebKit/public/platform/WebDatabaseObserver.h
@@ -77,7 +77,7 @@
                                           int sqlite_error_code) {}
 
  protected:
-  ~WebDatabaseObserver() {}
+  ~WebDatabaseObserver() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebDisplayItemList.h b/third_party/WebKit/public/platform/WebDisplayItemList.h
index 404925a..82af75c 100644
--- a/third_party/WebKit/public/platform/WebDisplayItemList.h
+++ b/third_party/WebKit/public/platform/WebDisplayItemList.h
@@ -35,7 +35,7 @@
 // http://dev.chromium.org/blink/slimming-paint.
 class WebDisplayItemList {
  public:
-  virtual ~WebDisplayItemList() {}
+  virtual ~WebDisplayItemList() = default;
 
   virtual void AppendDrawingItem(const WebRect& visual_rect,
                                  sk_sp<const cc::PaintRecord>) {}
diff --git a/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h b/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h
index 9ec6052..75770ef 100644
--- a/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h
+++ b/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h
@@ -17,13 +17,13 @@
   // thread to create the subresource filter for the worker thread.
   class Builder {
    public:
-    virtual ~Builder() {}
+    virtual ~Builder() = default;
     virtual std::unique_ptr<WebDocumentSubresourceFilter> Build() = 0;
   };
 
   enum LoadPolicy { kAllow, kDisallow, kWouldDisallow };
 
-  virtual ~WebDocumentSubresourceFilter() {}
+  virtual ~WebDocumentSubresourceFilter() = default;
   virtual LoadPolicy GetLoadPolicy(const WebURL& resource_url,
                                    WebURLRequest::RequestContext) = 0;
   virtual LoadPolicy GetLoadPolicyForWebSocketConnect(const WebURL&) = 0;
diff --git a/third_party/WebKit/public/platform/WebDragData.h b/third_party/WebKit/public/platform/WebDragData.h
index d1e2b919..c08eb45 100644
--- a/third_party/WebKit/public/platform/WebDragData.h
+++ b/third_party/WebKit/public/platform/WebDragData.h
@@ -92,21 +92,11 @@
 
   WebDragData() : valid_(false), modifier_key_state_(0) {}
 
-  WebDragData(const WebDragData& object)
-      : valid_(object.valid_),
-        item_list_(object.item_list_),
-        modifier_key_state_(object.modifier_key_state_),
-        filesystem_id_(object.filesystem_id_) {}
+  WebDragData(const WebDragData& object) = default;
 
-  WebDragData& operator=(const WebDragData& object) {
-    valid_ = object.valid_;
-    item_list_ = object.item_list_;
-    modifier_key_state_ = object.modifier_key_state_;
-    filesystem_id_ = object.filesystem_id_;
-    return *this;
-  }
+  WebDragData& operator=(const WebDragData& object) = default;
 
-  ~WebDragData() {}
+  ~WebDragData() = default;
 
   WebVector<Item> Items() const { return item_list_; }
 
diff --git a/third_party/WebKit/public/platform/WebExternalTextureLayer.h b/third_party/WebKit/public/platform/WebExternalTextureLayer.h
index fafbab9..58854a1c5 100644
--- a/third_party/WebKit/public/platform/WebExternalTextureLayer.h
+++ b/third_party/WebKit/public/platform/WebExternalTextureLayer.h
@@ -40,7 +40,7 @@
 // the WebLayerTreeView is destroyed.
 class WebExternalTextureLayer {
  public:
-  virtual ~WebExternalTextureLayer() {}
+  virtual ~WebExternalTextureLayer() = default;
 
   virtual WebLayer* Layer() = 0;
 
diff --git a/third_party/WebKit/public/platform/WebFileSystem.h b/third_party/WebKit/public/platform/WebFileSystem.h
index 33b422c6..071e634 100644
--- a/third_party/WebKit/public/platform/WebFileSystem.h
+++ b/third_party/WebKit/public/platform/WebFileSystem.h
@@ -195,7 +195,7 @@
   virtual bool WaitForAdditionalResult(int callbacks_id) = 0;
 
  protected:
-  virtual ~WebFileSystem() {}
+  virtual ~WebFileSystem() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebFileSystemCallbacks.h b/third_party/WebKit/public/platform/WebFileSystemCallbacks.h
index 754e997b..c952638 100644
--- a/third_party/WebKit/public/platform/WebFileSystemCallbacks.h
+++ b/third_party/WebKit/public/platform/WebFileSystemCallbacks.h
@@ -54,7 +54,7 @@
 class WebFileSystemCallbacks {
  public:
   ~WebFileSystemCallbacks() { Reset(); }
-  WebFileSystemCallbacks() {}
+  WebFileSystemCallbacks() = default;
   WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { Assign(c); }
   WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) {
     Assign(c);
diff --git a/third_party/WebKit/public/platform/WebFileUtilities.h b/third_party/WebKit/public/platform/WebFileUtilities.h
index dadb002..a5dd0761 100644
--- a/third_party/WebKit/public/platform/WebFileUtilities.h
+++ b/third_party/WebKit/public/platform/WebFileUtilities.h
@@ -59,7 +59,7 @@
   virtual WebURL FilePathToURL(const WebString& path) { return WebURL(); }
 
  protected:
-  ~WebFileUtilities() {}
+  ~WebFileUtilities() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebFileWriter.h b/third_party/WebKit/public/platform/WebFileWriter.h
index 5fa66b0..06c54d6a 100644
--- a/third_party/WebKit/public/platform/WebFileWriter.h
+++ b/third_party/WebKit/public/platform/WebFileWriter.h
@@ -40,7 +40,7 @@
 
 class WebFileWriter {
  public:
-  virtual ~WebFileWriter() {}
+  virtual ~WebFileWriter() = default;
 
   // Only one write or one truncate operation can be in progress at a time.
   // These functions are asynchronous and will report results through the
diff --git a/third_party/WebKit/public/platform/WebFileWriterClient.h b/third_party/WebKit/public/platform/WebFileWriterClient.h
index ba7d49a..81bdd4ac 100644
--- a/third_party/WebKit/public/platform/WebFileWriterClient.h
+++ b/third_party/WebKit/public/platform/WebFileWriterClient.h
@@ -51,7 +51,7 @@
   virtual void DidFail(WebFileError) = 0;
 
  protected:
-  virtual ~WebFileWriterClient() {}
+  virtual ~WebFileWriterClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebGamepadListener.h b/third_party/WebKit/public/platform/WebGamepadListener.h
index 26bd8cc6..29f5d9f 100644
--- a/third_party/WebKit/public/platform/WebGamepadListener.h
+++ b/third_party/WebKit/public/platform/WebGamepadListener.h
@@ -19,7 +19,7 @@
   virtual void DidDisconnectGamepad(unsigned index, const device::Gamepad&) = 0;
 
  protected:
-  ~WebGamepadListener() override {}
+  ~WebGamepadListener() override = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebGestureCurve.h b/third_party/WebKit/public/platform/WebGestureCurve.h
index 2c9332a..372e84c 100644
--- a/third_party/WebKit/public/platform/WebGestureCurve.h
+++ b/third_party/WebKit/public/platform/WebGestureCurve.h
@@ -37,7 +37,7 @@
 // animation.
 class WebGestureCurve {
  public:
-  virtual ~WebGestureCurve() {}
+  virtual ~WebGestureCurve() = default;
 
   // Returns false if curve has finished and can no longer be applied.
   // TODO(sahel): This will get removed once touchscreen and autoscroll flings
diff --git a/third_party/WebKit/public/platform/WebGestureCurveTarget.h b/third_party/WebKit/public/platform/WebGestureCurveTarget.h
index 5e17131..c9f6c55 100644
--- a/third_party/WebKit/public/platform/WebGestureCurveTarget.h
+++ b/third_party/WebKit/public/platform/WebGestureCurveTarget.h
@@ -36,7 +36,7 @@
                         const WebFloatSize& velocity) = 0;
 
  protected:
-  virtual ~WebGestureCurveTarget() {}
+  virtual ~WebGestureCurveTarget() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h b/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
index a2d237d..9e37b9d 100644
--- a/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
+++ b/third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h
@@ -52,7 +52,7 @@
 
 class WebGraphicsContext3DProvider {
  public:
-  virtual ~WebGraphicsContext3DProvider() {}
+  virtual ~WebGraphicsContext3DProvider() = default;
 
   virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
   virtual bool BindToCurrentThread() = 0;
diff --git a/third_party/WebKit/public/platform/WebHTTPBody.h b/third_party/WebKit/public/platform/WebHTTPBody.h
index 774abc5b..3823ce5 100644
--- a/third_party/WebKit/public/platform/WebHTTPBody.h
+++ b/third_party/WebKit/public/platform/WebHTTPBody.h
@@ -70,7 +70,7 @@
 
   ~WebHTTPBody() { Reset(); }
 
-  WebHTTPBody() {}
+  WebHTTPBody() = default;
   WebHTTPBody(const WebHTTPBody& b) { Assign(b); }
   WebHTTPBody& operator=(const WebHTTPBody& b) {
     Assign(b);
diff --git a/third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h b/third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h
index 2286eaa..2768f23 100644
--- a/third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h
+++ b/third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h
@@ -40,7 +40,7 @@
   virtual void VisitHeader(const WebString& name, const WebString& value) = 0;
 
  protected:
-  virtual ~WebHTTPHeaderVisitor() {}
+  virtual ~WebHTTPHeaderVisitor() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h b/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
index b181373..75ddf54 100644
--- a/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
+++ b/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
@@ -20,7 +20,7 @@
 // Platform interface of an ImageCapture class for GrabFrame() calls.
 class WebImageCaptureFrameGrabber {
  public:
-  virtual ~WebImageCaptureFrameGrabber() {}
+  virtual ~WebImageCaptureFrameGrabber() = default;
 
   virtual void GrabFrame(WebMediaStreamTrack*,
                          WebImageCaptureGrabFrameCallbacks*) = 0;
diff --git a/third_party/WebKit/public/platform/WebImageLayer.h b/third_party/WebKit/public/platform/WebImageLayer.h
index f34681c9..b73842dd 100644
--- a/third_party/WebKit/public/platform/WebImageLayer.h
+++ b/third_party/WebKit/public/platform/WebImageLayer.h
@@ -40,7 +40,7 @@
 
 class WebImageLayer {
  public:
-  virtual ~WebImageLayer() {}
+  virtual ~WebImageLayer() = default;
 
   virtual WebLayer* Layer() = 0;
   virtual void SetImage(PaintImage) = 0;
diff --git a/third_party/WebKit/public/platform/WebInbandTextTrack.h b/third_party/WebKit/public/platform/WebInbandTextTrack.h
index d6644d39..3ca0f70 100644
--- a/third_party/WebKit/public/platform/WebInbandTextTrack.h
+++ b/third_party/WebKit/public/platform/WebInbandTextTrack.h
@@ -48,7 +48,7 @@
     kKindNone
   };
 
-  virtual ~WebInbandTextTrack() {}
+  virtual ~WebInbandTextTrack() = default;
 
   virtual void SetClient(WebInbandTextTrackClient*) = 0;
   virtual WebInbandTextTrackClient* Client() = 0;
diff --git a/third_party/WebKit/public/platform/WebInbandTextTrackClient.h b/third_party/WebKit/public/platform/WebInbandTextTrackClient.h
index ce33942..89f9182 100644
--- a/third_party/WebKit/public/platform/WebInbandTextTrackClient.h
+++ b/third_party/WebKit/public/platform/WebInbandTextTrackClient.h
@@ -37,7 +37,7 @@
 
 class WebInbandTextTrackClient {
  public:
-  virtual ~WebInbandTextTrackClient() {}
+  virtual ~WebInbandTextTrackClient() = default;
 
   virtual void AddWebVTTCue(double start,
                             double end,
diff --git a/third_party/WebKit/public/platform/WebLayer.h b/third_party/WebKit/public/platform/WebLayer.h
index 72bdbe0..24a8042 100644
--- a/third_party/WebKit/public/platform/WebLayer.h
+++ b/third_party/WebKit/public/platform/WebLayer.h
@@ -60,7 +60,7 @@
 
 class WebLayer {
  public:
-  virtual ~WebLayer() {}
+  virtual ~WebLayer() = default;
 
   // Returns a positive ID that will be unique across all WebLayers allocated in
   // this process.
diff --git a/third_party/WebKit/public/platform/WebLayerScrollClient.h b/third_party/WebKit/public/platform/WebLayerScrollClient.h
index 40e6193..9aeb044d 100644
--- a/third_party/WebKit/public/platform/WebLayerScrollClient.h
+++ b/third_party/WebKit/public/platform/WebLayerScrollClient.h
@@ -43,7 +43,7 @@
   virtual void DidScroll(const gfx::ScrollOffset&, const cc::ElementId&) = 0;
 
  protected:
-  virtual ~WebLayerScrollClient() {}
+  virtual ~WebLayerScrollClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebLayerTreeView.h b/third_party/WebKit/public/platform/WebLayerTreeView.h
index 1ad33f1..55ba358 100644
--- a/third_party/WebKit/public/platform/WebLayerTreeView.h
+++ b/third_party/WebKit/public/platform/WebLayerTreeView.h
@@ -70,7 +70,7 @@
   };
   using ReportTimeCallback = base::Callback<void(SwapResult, double)>;
 
-  virtual ~WebLayerTreeView() {}
+  virtual ~WebLayerTreeView() = default;
 
   // Initialization and lifecycle --------------------------------------
 
diff --git a/third_party/WebKit/public/platform/WebMediaConstraints.h b/third_party/WebKit/public/platform/WebMediaConstraints.h
index b46565f..b4c266a 100644
--- a/third_party/WebKit/public/platform/WebMediaConstraints.h
+++ b/third_party/WebKit/public/platform/WebMediaConstraints.h
@@ -294,7 +294,7 @@
 
 class WebMediaConstraints {
  public:
-  WebMediaConstraints() {}
+  WebMediaConstraints() = default;
   WebMediaConstraints(const WebMediaConstraints& other) { Assign(other); }
   ~WebMediaConstraints() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebMediaKeySystemMediaCapability.h b/third_party/WebKit/public/platform/WebMediaKeySystemMediaCapability.h
index 51fcdbda..81d9b32 100644
--- a/third_party/WebKit/public/platform/WebMediaKeySystemMediaCapability.h
+++ b/third_party/WebKit/public/platform/WebMediaKeySystemMediaCapability.h
@@ -10,7 +10,7 @@
 namespace blink {
 
 struct WebMediaKeySystemMediaCapability {
-  WebMediaKeySystemMediaCapability() {}
+  WebMediaKeySystemMediaCapability() = default;
 
   WebString content_type;
   WebString mime_type;
diff --git a/third_party/WebKit/public/platform/WebMediaPlayer.h b/third_party/WebKit/public/platform/WebMediaPlayer.h
index 1d1f0e8..c2c2967 100644
--- a/third_party/WebKit/public/platform/WebMediaPlayer.h
+++ b/third_party/WebKit/public/platform/WebMediaPlayer.h
@@ -116,7 +116,7 @@
     bool skipped = false;
   };
 
-  virtual ~WebMediaPlayer() {}
+  virtual ~WebMediaPlayer() = default;
 
   virtual void Load(LoadType, const WebMediaPlayerSource&, CORSMode) = 0;
 
diff --git a/third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h b/third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h
index b40b784..2a7f097f 100644
--- a/third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h
+++ b/third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h
@@ -45,7 +45,7 @@
   virtual void DidResumePlaybackBlockedForKey() = 0;
 
  protected:
-  ~WebMediaPlayerEncryptedMediaClient() {}
+  ~WebMediaPlayerEncryptedMediaClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebMediaSource.h b/third_party/WebKit/public/platform/WebMediaSource.h
index d11bb283..f1889fab18 100644
--- a/third_party/WebKit/public/platform/WebMediaSource.h
+++ b/third_party/WebKit/public/platform/WebMediaSource.h
@@ -52,7 +52,7 @@
     kEndOfStreamStatusDecodeError,
   };
 
-  virtual ~WebMediaSource() {}
+  virtual ~WebMediaSource() = default;
   virtual AddStatus AddSourceBuffer(const WebString& type,
                                     const WebString& codecs,
                                     WebSourceBuffer**) = 0;
diff --git a/third_party/WebKit/public/platform/WebMediaStream.h b/third_party/WebKit/public/platform/WebMediaStream.h
index 684d944..c81652a 100644
--- a/third_party/WebKit/public/platform/WebMediaStream.h
+++ b/third_party/WebKit/public/platform/WebMediaStream.h
@@ -43,12 +43,12 @@
   virtual void TrackRemoved(const blink::WebMediaStreamTrack&) = 0;
 
  protected:
-  virtual ~WebMediaStreamObserver() {}
+  virtual ~WebMediaStreamObserver() = default;
 };
 
 class WebMediaStream {
  public:
-  WebMediaStream() {}
+  WebMediaStream() = default;
   WebMediaStream(const WebMediaStream& other) { Assign(other); }
   ~WebMediaStream() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebMediaStreamCenter.h b/third_party/WebKit/public/platform/WebMediaStreamCenter.h
index 08b12858..ff60ea3 100644
--- a/third_party/WebKit/public/platform/WebMediaStreamCenter.h
+++ b/third_party/WebKit/public/platform/WebMediaStreamCenter.h
@@ -40,7 +40,7 @@
 
 class WebMediaStreamCenter {
  public:
-  virtual ~WebMediaStreamCenter() {}
+  virtual ~WebMediaStreamCenter() = default;
 
   // Track functionality.
   virtual void DidCreateMediaStreamTrack(const WebMediaStreamTrack&) {}
diff --git a/third_party/WebKit/public/platform/WebMediaStreamCenterClient.h b/third_party/WebKit/public/platform/WebMediaStreamCenterClient.h
index 88cb905..72b809c 100644
--- a/third_party/WebKit/public/platform/WebMediaStreamCenterClient.h
+++ b/third_party/WebKit/public/platform/WebMediaStreamCenterClient.h
@@ -39,7 +39,7 @@
 
 class BLINK_PLATFORM_EXPORT WebMediaStreamCenterClient {
  public:
-  virtual ~WebMediaStreamCenterClient() {}
+  virtual ~WebMediaStreamCenterClient() = default;
 
   virtual void StopLocalMediaStream(const WebMediaStream&) = 0;
 };
diff --git a/third_party/WebKit/public/platform/WebMediaStreamSource.h b/third_party/WebKit/public/platform/WebMediaStreamSource.h
index 82eae98..19c32658 100644
--- a/third_party/WebKit/public/platform/WebMediaStreamSource.h
+++ b/third_party/WebKit/public/platform/WebMediaStreamSource.h
@@ -51,7 +51,7 @@
   class ExtraData {
    public:
     ExtraData() : owner_(0) {}
-    virtual ~ExtraData() {}
+    virtual ~ExtraData() = default;
 
     BLINK_PLATFORM_EXPORT WebMediaStreamSource Owner();
 #if INSIDE_BLINK
@@ -73,7 +73,7 @@
     kReadyStateEnded = 2
   };
 
-  WebMediaStreamSource() {}
+  WebMediaStreamSource() = default;
   WebMediaStreamSource(const WebMediaStreamSource& other) { Assign(other); }
   ~WebMediaStreamSource() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebMediaStreamTrack.h b/third_party/WebKit/public/platform/WebMediaStreamTrack.h
index 9842415..d3551ed 100644
--- a/third_party/WebKit/public/platform/WebMediaStreamTrack.h
+++ b/third_party/WebKit/public/platform/WebMediaStreamTrack.h
@@ -76,8 +76,8 @@
 
   class TrackData {
    public:
-    TrackData() {}
-    virtual ~TrackData() {}
+    TrackData() = default;
+    virtual ~TrackData() = default;
     virtual void GetSettings(Settings&) = 0;
   };
 
@@ -89,7 +89,7 @@
     kVideoDetail
   };
 
-  WebMediaStreamTrack() {}
+  WebMediaStreamTrack() = default;
   WebMediaStreamTrack(const WebMediaStreamTrack& other) { Assign(other); }
   ~WebMediaStreamTrack() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebNetworkStateNotifier.h b/third_party/WebKit/public/platform/WebNetworkStateNotifier.h
index 7f41955..4364141b 100644
--- a/third_party/WebKit/public/platform/WebNetworkStateNotifier.h
+++ b/third_party/WebKit/public/platform/WebNetworkStateNotifier.h
@@ -51,7 +51,7 @@
   BLINK_PLATFORM_EXPORT static void SetSaveDataEnabled(bool enabled);
 
  private:
-  WebNetworkStateNotifier();
+  WebNetworkStateNotifier() = delete;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebPlatformEventListener.h b/third_party/WebKit/public/platform/WebPlatformEventListener.h
index 87dbff9..05c8ada2 100644
--- a/third_party/WebKit/public/platform/WebPlatformEventListener.h
+++ b/third_party/WebKit/public/platform/WebPlatformEventListener.h
@@ -9,7 +9,7 @@
 
 class WebPlatformEventListener {
  public:
-  virtual ~WebPlatformEventListener() {}
+  virtual ~WebPlatformEventListener() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebPrerender.h b/third_party/WebKit/public/platform/WebPrerender.h
index 2735490..d9c8603 100644
--- a/third_party/WebKit/public/platform/WebPrerender.h
+++ b/third_party/WebKit/public/platform/WebPrerender.h
@@ -52,11 +52,11 @@
  public:
   class ExtraData {
    public:
-    virtual ~ExtraData() {}
+    virtual ~ExtraData() = default;
   };
 
   ~WebPrerender() { Reset(); }
-  WebPrerender() {}
+  WebPrerender() = default;
   WebPrerender(const WebPrerender& other) { Assign(other); }
   WebPrerender& operator=(const WebPrerender& other) {
     Assign(other);
diff --git a/third_party/WebKit/public/platform/WebPrerenderingSupport.h b/third_party/WebKit/public/platform/WebPrerenderingSupport.h
index 15d388d..6e98b5a 100644
--- a/third_party/WebKit/public/platform/WebPrerenderingSupport.h
+++ b/third_party/WebKit/public/platform/WebPrerenderingSupport.h
@@ -61,8 +61,8 @@
   virtual void PrefetchFinished() = 0;
 
  protected:
-  WebPrerenderingSupport() {}
-  virtual ~WebPrerenderingSupport() {}
+  WebPrerenderingSupport() = default;
+  virtual ~WebPrerenderingSupport() = default;
 
  private:
   static WebPrerenderingSupport* platform_;
diff --git a/third_party/WebKit/public/platform/WebPrescientNetworking.h b/third_party/WebKit/public/platform/WebPrescientNetworking.h
index d959c7a..aa8a34f 100644
--- a/third_party/WebKit/public/platform/WebPrescientNetworking.h
+++ b/third_party/WebKit/public/platform/WebPrescientNetworking.h
@@ -39,7 +39,7 @@
 
 class WebPrescientNetworking {
  public:
-  virtual ~WebPrescientNetworking() {}
+  virtual ~WebPrescientNetworking() = default;
 
   // When a page navigation is speculated, DNS prefetch is triggered to hide
   // the host resolution latency.
diff --git a/third_party/WebKit/public/platform/WebPrivatePtr.h b/third_party/WebKit/public/platform/WebPrivatePtr.h
index 576eefd9..c1407a6d 100644
--- a/third_party/WebKit/public/platform/WebPrivatePtr.h
+++ b/third_party/WebKit/public/platform/WebPrivatePtr.h
@@ -230,8 +230,8 @@
 
  private:
   // Prevent construction via normal means.
-  PtrStorage();
-  PtrStorage(const PtrStorage&);
+  PtrStorage() = delete;
+  PtrStorage(const PtrStorage&) = delete;
 };
 #endif
 
diff --git a/third_party/WebKit/public/platform/WebPublicSuffixList.h b/third_party/WebKit/public/platform/WebPublicSuffixList.h
index f0b2713..89d5706 100644
--- a/third_party/WebKit/public/platform/WebPublicSuffixList.h
+++ b/third_party/WebKit/public/platform/WebPublicSuffixList.h
@@ -40,7 +40,7 @@
   virtual size_t GetPublicSuffixLength(const WebString&) = 0;
 
  protected:
-  virtual ~WebPublicSuffixList() {}
+  virtual ~WebPublicSuffixList() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebRTCCertificateGenerator.h b/third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
index 51f36ff..80d464c 100644
--- a/third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
+++ b/third_party/WebKit/public/platform/WebRTCCertificateGenerator.h
@@ -51,7 +51,7 @@
 // asynchronously.
 class WebRTCCertificateGenerator {
  public:
-  virtual ~WebRTCCertificateGenerator() {}
+  virtual ~WebRTCCertificateGenerator() = default;
 
   // Start generating a certificate asynchronously. |observer| is invoked on the
   // same thread that called generateCertificate when the operation is
diff --git a/third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h b/third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h
index 600cfad..d25ef0ae 100644
--- a/third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h
+++ b/third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h
@@ -35,7 +35,7 @@
 
 class WebRTCDTMFSenderHandler {
  public:
-  virtual ~WebRTCDTMFSenderHandler() {}
+  virtual ~WebRTCDTMFSenderHandler() = default;
 
   virtual void SetClient(WebRTCDTMFSenderHandlerClient*) = 0;
 
diff --git a/third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h b/third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h
index 575bf07..6885c2c 100644
--- a/third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h
+++ b/third_party/WebKit/public/platform/WebRTCDTMFSenderHandlerClient.h
@@ -34,7 +34,7 @@
 
 class WebRTCDTMFSenderHandlerClient {
  public:
-  virtual ~WebRTCDTMFSenderHandlerClient() {}
+  virtual ~WebRTCDTMFSenderHandlerClient() = default;
 
   virtual void DidPlayTone(const WebString& tone) = 0;
 };
diff --git a/third_party/WebKit/public/platform/WebRTCDataChannelHandler.h b/third_party/WebKit/public/platform/WebRTCDataChannelHandler.h
index b4ed6dddc..3926d6b 100644
--- a/third_party/WebKit/public/platform/WebRTCDataChannelHandler.h
+++ b/third_party/WebKit/public/platform/WebRTCDataChannelHandler.h
@@ -34,7 +34,7 @@
 
 class WebRTCDataChannelHandler {
  public:
-  virtual ~WebRTCDataChannelHandler() {}
+  virtual ~WebRTCDataChannelHandler() = default;
 
   virtual void SetClient(WebRTCDataChannelHandlerClient*) = 0;
 
diff --git a/third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h b/third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h
index b0ac630..453daacd 100644
--- a/third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h
+++ b/third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h
@@ -40,7 +40,7 @@
     kReadyStateClosed = 3,
   };
 
-  virtual ~WebRTCDataChannelHandlerClient() {}
+  virtual ~WebRTCDataChannelHandlerClient() = default;
 
   virtual void DidChangeReadyState(ReadyState) = 0;
   // TODO(bemasc): Make this pure virtual once Chromium unit tests are updated
diff --git a/third_party/WebKit/public/platform/WebRTCICECandidate.h b/third_party/WebKit/public/platform/WebRTCICECandidate.h
index 5ec7df3..4e313018 100644
--- a/third_party/WebKit/public/platform/WebRTCICECandidate.h
+++ b/third_party/WebKit/public/platform/WebRTCICECandidate.h
@@ -71,7 +71,7 @@
         sdp_mid_(sdp_mid),
         sdp_m_line_index_(sdp_m_line_index) {}
 
-  ~WebRTCICECandidate() {}
+  ~WebRTCICECandidate() = default;
 
   WebString candidate_;
   WebString sdp_mid_;
diff --git a/third_party/WebKit/public/platform/WebRTCLegacyStats.h b/third_party/WebKit/public/platform/WebRTCLegacyStats.h
index 4d8603b8..298125c 100644
--- a/third_party/WebKit/public/platform/WebRTCLegacyStats.h
+++ b/third_party/WebKit/public/platform/WebRTCLegacyStats.h
@@ -23,7 +23,7 @@
 
 class WebRTCLegacyStats {
  public:
-  virtual ~WebRTCLegacyStats() {}
+  virtual ~WebRTCLegacyStats() = default;
 
   virtual WebString Id() const = 0;
   virtual WebString GetType() const = 0;
@@ -36,7 +36,7 @@
 
 class WebRTCLegacyStatsMemberIterator {
  public:
-  virtual ~WebRTCLegacyStatsMemberIterator() {}
+  virtual ~WebRTCLegacyStatsMemberIterator() = default;
   virtual bool IsEnd() const = 0;
   virtual void Next() = 0;
 
diff --git a/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h b/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
index b5e81f3..ce58604 100644
--- a/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
+++ b/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
@@ -56,7 +56,7 @@
 
 class WebRTCPeerConnectionHandler {
  public:
-  virtual ~WebRTCPeerConnectionHandler() {}
+  virtual ~WebRTCPeerConnectionHandler() = default;
 
   virtual bool Initialize(const WebRTCConfiguration&,
                           const WebMediaConstraints&) = 0;
diff --git a/third_party/WebKit/public/platform/WebRTCSessionDescription.h b/third_party/WebKit/public/platform/WebRTCSessionDescription.h
index ff121685..895b20d1 100644
--- a/third_party/WebKit/public/platform/WebRTCSessionDescription.h
+++ b/third_party/WebKit/public/platform/WebRTCSessionDescription.h
@@ -53,7 +53,7 @@
 
 class WebRTCSessionDescription {
  public:
-  WebRTCSessionDescription() {}
+  WebRTCSessionDescription() = default;
   WebRTCSessionDescription(const WebRTCSessionDescription& other) {
     Assign(other);
   }
diff --git a/third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h b/third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h
index 64efb4e..55cd3b0 100644
--- a/third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h
+++ b/third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h
@@ -42,7 +42,7 @@
 
 class WebRTCSessionDescriptionRequest {
  public:
-  WebRTCSessionDescriptionRequest() {}
+  WebRTCSessionDescriptionRequest() = default;
   WebRTCSessionDescriptionRequest(
       const WebRTCSessionDescriptionRequest& other) {
     Assign(other);
diff --git a/third_party/WebKit/public/platform/WebRTCStatsRequest.h b/third_party/WebKit/public/platform/WebRTCStatsRequest.h
index bcb64c7d..3092a51 100644
--- a/third_party/WebKit/public/platform/WebRTCStatsRequest.h
+++ b/third_party/WebKit/public/platform/WebRTCStatsRequest.h
@@ -60,7 +60,7 @@
 
 class WebRTCStatsRequest {
  public:
-  WebRTCStatsRequest() {}
+  WebRTCStatsRequest() = default;
   WebRTCStatsRequest(const WebRTCStatsRequest& other) { Assign(other); }
   ~WebRTCStatsRequest() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebRTCStatsResponse.h b/third_party/WebKit/public/platform/WebRTCStatsResponse.h
index 0e1d0c0..5279d0f 100644
--- a/third_party/WebKit/public/platform/WebRTCStatsResponse.h
+++ b/third_party/WebKit/public/platform/WebRTCStatsResponse.h
@@ -37,7 +37,7 @@
 class WebRTCStatsResponse {
  public:
   WebRTCStatsResponse(const WebRTCStatsResponse& other) { Assign(other); }
-  WebRTCStatsResponse() {}
+  WebRTCStatsResponse() = default;
   ~WebRTCStatsResponse() { Reset(); }
 
   WebRTCStatsResponse& operator=(const WebRTCStatsResponse& other) {
diff --git a/third_party/WebKit/public/platform/WebRTCVoidRequest.h b/third_party/WebKit/public/platform/WebRTCVoidRequest.h
index a066b099..a1214ee 100644
--- a/third_party/WebKit/public/platform/WebRTCVoidRequest.h
+++ b/third_party/WebKit/public/platform/WebRTCVoidRequest.h
@@ -41,7 +41,7 @@
 
 class WebRTCVoidRequest {
  public:
-  WebRTCVoidRequest() {}
+  WebRTCVoidRequest() = default;
   WebRTCVoidRequest(const WebRTCVoidRequest& other) { Assign(other); }
   ~WebRTCVoidRequest() { Reset(); }
 
diff --git a/third_party/WebKit/public/platform/WebRemoteScrollProperties.h b/third_party/WebKit/public/platform/WebRemoteScrollProperties.h
index eba18a794..cd107c87 100644
--- a/third_party/WebKit/public/platform/WebRemoteScrollProperties.h
+++ b/third_party/WebKit/public/platform/WebRemoteScrollProperties.h
@@ -58,7 +58,7 @@
   Behavior behavior = kAuto;
   bool is_for_scroll_sequence;
 
-  WebRemoteScrollProperties() {}
+  WebRemoteScrollProperties() = default;
 #if INSIDE_BLINK
   BLINK_PLATFORM_EXPORT WebRemoteScrollProperties(Alignment,
                                                   Alignment,
diff --git a/third_party/WebKit/public/platform/WebRuntimeFeatures.h b/third_party/WebKit/public/platform/WebRuntimeFeatures.h
index 63b0419..06e9ec2 100644
--- a/third_party/WebKit/public/platform/WebRuntimeFeatures.h
+++ b/third_party/WebKit/public/platform/WebRuntimeFeatures.h
@@ -116,6 +116,7 @@
   BLINK_PLATFORM_EXPORT static void EnablePaymentApp(bool);
   BLINK_PLATFORM_EXPORT static void EnablePaymentRequest(bool);
   BLINK_PLATFORM_EXPORT static void EnablePermissionsAPI(bool);
+  BLINK_PLATFORM_EXPORT static void EnablePictureInPicture(bool);
   BLINK_PLATFORM_EXPORT static void EnablePreciseMemoryInfo(bool);
   BLINK_PLATFORM_EXPORT static void EnablePreloadDefaultIsMetadata(bool);
   BLINK_PLATFORM_EXPORT static void EnablePrintBrowser(bool);
diff --git a/third_party/WebKit/public/platform/WebScrollbar.h b/third_party/WebKit/public/platform/WebScrollbar.h
index 6e20b09..5949bcb 100644
--- a/third_party/WebKit/public/platform/WebScrollbar.h
+++ b/third_party/WebKit/public/platform/WebScrollbar.h
@@ -65,7 +65,7 @@
 
   enum class ScrollingMode { kAuto, kAlwaysOff, kAlwaysOn, kLast = kAlwaysOn };
 
-  virtual ~WebScrollbar() {}
+  virtual ~WebScrollbar() = default;
 
   // Return true if this is an overlay scrollbar.
   virtual bool IsOverlay() const = 0;
diff --git a/third_party/WebKit/public/platform/WebScrollbarBehavior.h b/third_party/WebKit/public/platform/WebScrollbarBehavior.h
index 151622b..6d960f0 100644
--- a/third_party/WebKit/public/platform/WebScrollbarBehavior.h
+++ b/third_party/WebKit/public/platform/WebScrollbarBehavior.h
@@ -14,7 +14,7 @@
 
 class WebScrollbarBehavior {
  public:
-  virtual ~WebScrollbarBehavior() {}
+  virtual ~WebScrollbarBehavior() = default;
   virtual bool ShouldCenterOnThumb(WebPointerProperties::Button,
                                    bool shift_key_pressed,
                                    bool alt_key_pressed) {
diff --git a/third_party/WebKit/public/platform/WebScrollbarLayer.h b/third_party/WebKit/public/platform/WebScrollbarLayer.h
index a758547..c080d58 100644
--- a/third_party/WebKit/public/platform/WebScrollbarLayer.h
+++ b/third_party/WebKit/public/platform/WebScrollbarLayer.h
@@ -39,7 +39,7 @@
 
 class WebScrollbarLayer {
  public:
-  virtual ~WebScrollbarLayer() {}
+  virtual ~WebScrollbarLayer() = default;
 
   virtual WebLayer* Layer() = 0;
 
diff --git a/third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h b/third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h
index ca72ac4..9b94f6b 100644
--- a/third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h
+++ b/third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h
@@ -35,7 +35,7 @@
 
 class BLINK_PLATFORM_EXPORT WebScrollbarThemeGeometry {
  public:
-  virtual ~WebScrollbarThemeGeometry() {}
+  virtual ~WebScrollbarThemeGeometry() = default;
 
   virtual bool HasButtons(WebScrollbar*) = 0;
   virtual bool HasThumb(WebScrollbar*) = 0;
diff --git a/third_party/WebKit/public/platform/WebSecurityOrigin.h b/third_party/WebKit/public/platform/WebSecurityOrigin.h
index 7307a78..4bde2989 100644
--- a/third_party/WebKit/public/platform/WebSecurityOrigin.h
+++ b/third_party/WebKit/public/platform/WebSecurityOrigin.h
@@ -49,7 +49,7 @@
  public:
   ~WebSecurityOrigin() { Reset(); }
 
-  WebSecurityOrigin() {}
+  WebSecurityOrigin() = default;
   WebSecurityOrigin(const WebSecurityOrigin& s) { Assign(s); }
   WebSecurityOrigin& operator=(const WebSecurityOrigin& s) {
     Assign(s);
diff --git a/third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h b/third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h
index dfe09e1..1cdccc08 100644
--- a/third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h
+++ b/third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h
@@ -28,7 +28,7 @@
  public:
   // Destruction implies that the handshake has been aborted. Any ongoing work
   // should be cleaned up if possible.
-  virtual ~WebSocketHandshakeThrottle() {}
+  virtual ~WebSocketHandshakeThrottle() = default;
 
   // The WebCallbacks OnSuccess or OnError should be called asychronously to
   // permit Javascript to use the connection or not. OnError should be passed
diff --git a/third_party/WebKit/public/platform/WebSourceBuffer.h b/third_party/WebKit/public/platform/WebSourceBuffer.h
index ddb1db4..88b982d 100644
--- a/third_party/WebKit/public/platform/WebSourceBuffer.h
+++ b/third_party/WebKit/public/platform/WebSourceBuffer.h
@@ -44,7 +44,7 @@
  public:
   enum AppendMode { kAppendModeSegments, kAppendModeSequence };
 
-  virtual ~WebSourceBuffer() {}
+  virtual ~WebSourceBuffer() = default;
 
   // This will only be called once and only with a non-null pointer to a
   // client whose ownership is not transferred to this WebSourceBuffer.
diff --git a/third_party/WebKit/public/platform/WebSourceBufferClient.h b/third_party/WebKit/public/platform/WebSourceBufferClient.h
index 9cdf5c1..a1ecf94 100644
--- a/third_party/WebKit/public/platform/WebSourceBufferClient.h
+++ b/third_party/WebKit/public/platform/WebSourceBufferClient.h
@@ -18,7 +18,7 @@
   // Parser notification types used to monitor problematic usage.
   enum ParseWarning { kKeyframeTimeGreaterThanDependant, kMuxedSequenceMode };
 
-  virtual ~WebSourceBufferClient() {}
+  virtual ~WebSourceBufferClient() = default;
 
   // Complete media track info: track type, unique track id, kind, label,
   // language.
diff --git a/third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h b/third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h
index 8457308..709572ed 100644
--- a/third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h
+++ b/third_party/WebKit/public/platform/WebSpeechSynthesisUtterance.h
@@ -36,7 +36,7 @@
 
 class WebSpeechSynthesisUtterance {
  public:
-  WebSpeechSynthesisUtterance() {}
+  WebSpeechSynthesisUtterance() = default;
   WebSpeechSynthesisUtterance(const WebSpeechSynthesisUtterance& other) {
     Assign(other);
   }
diff --git a/third_party/WebKit/public/platform/WebSpeechSynthesizer.h b/third_party/WebKit/public/platform/WebSpeechSynthesizer.h
index 4192641..2bc44c9 100644
--- a/third_party/WebKit/public/platform/WebSpeechSynthesizer.h
+++ b/third_party/WebKit/public/platform/WebSpeechSynthesizer.h
@@ -34,7 +34,7 @@
 
 class WebSpeechSynthesizer {
  public:
-  virtual ~WebSpeechSynthesizer() {}
+  virtual ~WebSpeechSynthesizer() = default;
 
   virtual void UpdateVoiceList() = 0;
 
diff --git a/third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h b/third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h
index 9138158..a0352b4f 100644
--- a/third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h
+++ b/third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h
@@ -34,7 +34,7 @@
 
 class WebSpeechSynthesizerClient {
  public:
-  virtual ~WebSpeechSynthesizerClient() {}
+  virtual ~WebSpeechSynthesizerClient() = default;
 
   virtual void SetVoiceList(const WebVector<WebSpeechSynthesisVoice>&) = 0;
   virtual void DidStartSpeaking(const WebSpeechSynthesisUtterance&) = 0;
diff --git a/third_party/WebKit/public/platform/WebStorageArea.h b/third_party/WebKit/public/platform/WebStorageArea.h
index eb4452e..4b405a45 100644
--- a/third_party/WebKit/public/platform/WebStorageArea.h
+++ b/third_party/WebKit/public/platform/WebStorageArea.h
@@ -40,7 +40,7 @@
 
 class WebStorageArea {
  public:
-  virtual ~WebStorageArea() {}
+  virtual ~WebStorageArea() = default;
 
   enum Result {
     kResultOK = 0,
diff --git a/third_party/WebKit/public/platform/WebStorageNamespace.h b/third_party/WebKit/public/platform/WebStorageNamespace.h
index a79b532..c08b713 100644
--- a/third_party/WebKit/public/platform/WebStorageNamespace.h
+++ b/third_party/WebKit/public/platform/WebStorageNamespace.h
@@ -44,7 +44,7 @@
 // entire browser.
 class WebStorageNamespace {
  public:
-  virtual ~WebStorageNamespace() {}
+  virtual ~WebStorageNamespace() = default;
 
   // Create a new WebStorageArea object. Two subsequent calls with the same
   // origin will return two different WebStorageArea objects that share the same
diff --git a/third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h b/third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h
index 7692ce0..f73dab2 100644
--- a/third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h
+++ b/third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h
@@ -42,7 +42,7 @@
 class WebStorageQuotaCallbacks {
  public:
   ~WebStorageQuotaCallbacks() { Reset(); }
-  WebStorageQuotaCallbacks() {}
+  WebStorageQuotaCallbacks() = default;
   WebStorageQuotaCallbacks(const WebStorageQuotaCallbacks& c) { Assign(c); }
   WebStorageQuotaCallbacks& operator=(const WebStorageQuotaCallbacks& c) {
     Assign(c);
diff --git a/third_party/WebKit/public/platform/WebThread.h b/third_party/WebKit/public/platform/WebThread.h
index 9230455..8fb35d6c 100644
--- a/third_party/WebKit/public/platform/WebThread.h
+++ b/third_party/WebKit/public/platform/WebThread.h
@@ -58,7 +58,7 @@
 
   class BLINK_PLATFORM_EXPORT TaskObserver {
    public:
-    virtual ~TaskObserver() {}
+    virtual ~TaskObserver() = default;
     virtual void WillProcessTask() = 0;
     virtual void DidProcessTask() = 0;
   };
@@ -94,7 +94,7 @@
   // Returns the scheduler associated with the thread.
   virtual WebScheduler* Scheduler() const = 0;
 
-  virtual ~WebThread() {}
+  virtual ~WebThread() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebThreadSafeData.h b/third_party/WebKit/public/platform/WebThreadSafeData.h
index 492e9c3..70f3024 100644
--- a/third_party/WebKit/public/platform/WebThreadSafeData.h
+++ b/third_party/WebKit/public/platform/WebThreadSafeData.h
@@ -48,7 +48,7 @@
 // object.  It is safe to pass a WebThreadSafeData across threads.
 class WebThreadSafeData {
  public:
-  WebThreadSafeData() {}
+  WebThreadSafeData() = default;
   BLINK_PLATFORM_EXPORT WebThreadSafeData(const char* data, size_t length);
 
   ~WebThreadSafeData() { Reset(); }
diff --git a/third_party/WebKit/public/platform/WebTrialTokenValidator.h b/third_party/WebKit/public/platform/WebTrialTokenValidator.h
index 6086566..a5926d01 100644
--- a/third_party/WebKit/public/platform/WebTrialTokenValidator.h
+++ b/third_party/WebKit/public/platform/WebTrialTokenValidator.h
@@ -22,7 +22,7 @@
 
 class WebTrialTokenValidator {
  public:
-  virtual ~WebTrialTokenValidator() {}
+  virtual ~WebTrialTokenValidator() = default;
 
   // Returns whether the given token is valid for the specified origin. If the
   // token is valid, it also returns the feature the token is valid for in
diff --git a/third_party/WebKit/public/platform/WebURL.h b/third_party/WebKit/public/platform/WebURL.h
index cf16001..0327f071 100644
--- a/third_party/WebKit/public/platform/WebURL.h
+++ b/third_party/WebKit/public/platform/WebURL.h
@@ -45,19 +45,13 @@
 
 class WebURL {
  public:
-  ~WebURL() {}
+  ~WebURL() = default;
 
   WebURL() : is_valid_(false) {}
 
-  WebURL(const WebURL& url)
-      : string_(url.string_), parsed_(url.parsed_), is_valid_(url.is_valid_) {}
+  WebURL(const WebURL& url) = default;
 
-  WebURL& operator=(const WebURL& url) {
-    string_ = url.string_;
-    parsed_ = url.parsed_;
-    is_valid_ = url.is_valid_;
-    return *this;
-  }
+  WebURL& operator=(const WebURL& url) = default;
 
   const WebString& GetString() const { return string_; }
 
diff --git a/third_party/WebKit/public/platform/WebURLLoadTiming.h b/third_party/WebKit/public/platform/WebURLLoadTiming.h
index 5a382835..ecc5e5a 100644
--- a/third_party/WebKit/public/platform/WebURLLoadTiming.h
+++ b/third_party/WebKit/public/platform/WebURLLoadTiming.h
@@ -46,7 +46,7 @@
  public:
   ~WebURLLoadTiming() { Reset(); }
 
-  WebURLLoadTiming() {}
+  WebURLLoadTiming() = default;
   WebURLLoadTiming(const WebURLLoadTiming& d) { Assign(d); }
   WebURLLoadTiming& operator=(const WebURLLoadTiming& d) {
     Assign(d);
diff --git a/third_party/WebKit/public/platform/WebURLLoader.h b/third_party/WebKit/public/platform/WebURLLoader.h
index 7912385..fbc751e 100644
--- a/third_party/WebKit/public/platform/WebURLLoader.h
+++ b/third_party/WebKit/public/platform/WebURLLoader.h
@@ -46,7 +46,7 @@
 class WebURLLoader {
  public:
   // The WebURLLoader may be deleted in a call to its client.
-  virtual ~WebURLLoader() {}
+  virtual ~WebURLLoader() = default;
 
   // Load the request synchronously, returning results directly to the
   // caller upon completion.  There is no mechanism to interrupt a
diff --git a/third_party/WebKit/public/platform/WebURLLoaderClient.h b/third_party/WebKit/public/platform/WebURLLoaderClient.h
index c6e9787..429c84c9 100644
--- a/third_party/WebKit/public/platform/WebURLLoaderClient.h
+++ b/third_party/WebKit/public/platform/WebURLLoaderClient.h
@@ -116,7 +116,7 @@
   static const int64_t kUnknownEncodedDataLength = -1;
 
  protected:
-  virtual ~WebURLLoaderClient() {}
+  virtual ~WebURLLoaderClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/WebURLLoaderFactory.h b/third_party/WebKit/public/platform/WebURLLoaderFactory.h
index 5b7e7bf7..2ee7f4d 100644
--- a/third_party/WebKit/public/platform/WebURLLoaderFactory.h
+++ b/third_party/WebKit/public/platform/WebURLLoaderFactory.h
@@ -20,7 +20,7 @@
 // loading context holds its own per-context WebURLLoaderFactory.
 class WebURLLoaderFactory {
  public:
-  virtual ~WebURLLoaderFactory() {}
+  virtual ~WebURLLoaderFactory() = default;
 
   // Returns a new WebURLLoader instance. This should internally choose
   // the most appropriate URLLoaderFactory implementation.
diff --git a/third_party/WebKit/public/platform/WebURLLoaderMockFactory.h b/third_party/WebKit/public/platform/WebURLLoaderMockFactory.h
index 05551cb..cdca836 100644
--- a/third_party/WebKit/public/platform/WebURLLoaderMockFactory.h
+++ b/third_party/WebKit/public/platform/WebURLLoaderMockFactory.h
@@ -23,7 +23,7 @@
  public:
   static std::unique_ptr<WebURLLoaderMockFactory> Create();
 
-  virtual ~WebURLLoaderMockFactory() {}
+  virtual ~WebURLLoaderMockFactory() = default;
 
   // Create a WebURLLoader that takes care of mocked requests.
   // Non-mocked request are forwarded to given loader which should not
diff --git a/third_party/WebKit/public/platform/WebURLRequest.h b/third_party/WebKit/public/platform/WebURLRequest.h
index 62203ce..a298dcd 100644
--- a/third_party/WebKit/public/platform/WebURLRequest.h
+++ b/third_party/WebKit/public/platform/WebURLRequest.h
@@ -162,7 +162,7 @@
 
   class ExtraData {
    public:
-    virtual ~ExtraData() {}
+    virtual ~ExtraData() = default;
   };
 
   BLINK_PLATFORM_EXPORT ~WebURLRequest();
diff --git a/third_party/WebKit/public/platform/WebURLResponse.h b/third_party/WebKit/public/platform/WebURLResponse.h
index 3b778f7e..11621be2 100644
--- a/third_party/WebKit/public/platform/WebURLResponse.h
+++ b/third_party/WebKit/public/platform/WebURLResponse.h
@@ -61,7 +61,7 @@
   };
 
   struct SignedCertificateTimestamp {
-    SignedCertificateTimestamp() {}
+    SignedCertificateTimestamp() = default;
     SignedCertificateTimestamp(WebString status,
                                WebString origin,
                                WebString log_description,
@@ -139,7 +139,7 @@
 
   class ExtraData {
    public:
-    virtual ~ExtraData() {}
+    virtual ~ExtraData() = default;
   };
 
   BLINK_PLATFORM_EXPORT ~WebURLResponse();
diff --git a/third_party/WebKit/public/platform/WebVector.h b/third_party/WebKit/public/platform/WebVector.h
index fc2da17..afaf554 100644
--- a/third_party/WebKit/public/platform/WebVector.h
+++ b/third_party/WebKit/public/platform/WebVector.h
@@ -66,7 +66,7 @@
   using iterator = typename std::vector<T>::iterator;
   using const_iterator = typename std::vector<T>::const_iterator;
 
-  ~WebVector() {}
+  ~WebVector() = default;
 
   explicit WebVector(size_t size = 0) : data_(size) {}
 
diff --git a/third_party/WebKit/public/platform/WebWorkerFetchContext.h b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
index bd51862..30cd20a0 100644
--- a/third_party/WebKit/public/platform/WebWorkerFetchContext.h
+++ b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
@@ -29,7 +29,7 @@
 // used to create a new WebURLLoader instance in the worker thread.
 class WebWorkerFetchContext {
  public:
-  virtual ~WebWorkerFetchContext() {}
+  virtual ~WebWorkerFetchContext() = default;
 
   virtual void InitializeOnWorkerThread(
       scoped_refptr<base::SingleThreadTaskRunner>) = 0;
diff --git a/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h b/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h
index 508afad..6d2975e 100644
--- a/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h
+++ b/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionListener.h
@@ -44,7 +44,7 @@
   // This method is called every time new device motion data is available.
   virtual void DidChangeDeviceMotion(const device::MotionData&) = 0;
 
-  ~WebDeviceMotionListener() override {}
+  ~WebDeviceMotionListener() override = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationListener.h b/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationListener.h
index 5fea265b1..6972149 100644
--- a/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationListener.h
+++ b/third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationListener.h
@@ -44,7 +44,7 @@
   // This method is called every time new device orientation data is available.
   virtual void DidChangeDeviceOrientation(const device::OrientationData&) = 0;
 
-  ~WebDeviceOrientationListener() override {}
+  ~WebDeviceOrientationListener() override = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h
index 71e3d11a..bef4f5c 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h
@@ -41,7 +41,7 @@
 
 class WebIDBCallbacks {
  public:
-  virtual ~WebIDBCallbacks() {}
+  virtual ~WebIDBCallbacks() = default;
 
   // Pointers transfer ownership.
   virtual void OnError(const WebIDBDatabaseError&) = 0;
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h
index c46ffc3f..481bbca 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h
@@ -36,7 +36,7 @@
 
 class WebIDBCursor {
  public:
-  virtual ~WebIDBCursor() {}
+  virtual ~WebIDBCursor() = default;
 
   virtual void Advance(unsigned long, WebIDBCallbacks*) = 0;
   virtual void Continue(const WebIDBKey&,
@@ -45,7 +45,7 @@
   virtual void PostSuccessHandlerCallback() {}  // Only used in frontend.
 
  protected:
-  WebIDBCursor() {}
+  WebIDBCursor() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h
index a1d0c5b..a541d58 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h
@@ -44,7 +44,7 @@
 
 class WebIDBDatabase {
  public:
-  virtual ~WebIDBDatabase() {}
+  virtual ~WebIDBDatabase() = default;
 
   virtual void CreateObjectStore(long long transaction_id,
                                  long long object_store_id,
@@ -146,7 +146,7 @@
   virtual void AckReceivedBlobs(const WebVector<WebString>& uuids) = 0;
 
  protected:
-  WebIDBDatabase() {}
+  WebIDBDatabase() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h
index e380e26..59857c517 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h
@@ -40,7 +40,7 @@
 
 class WebIDBDatabaseCallbacks {
  public:
-  virtual ~WebIDBDatabaseCallbacks() {}
+  virtual ~WebIDBDatabaseCallbacks() = default;
 
   virtual void OnForcedClose() = 0;
   virtual void OnVersionChange(long long old_version,
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseError.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseError.h
index 0fb49f5e..625ca3e 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseError.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseError.h
@@ -41,16 +41,11 @@
   WebIDBDatabaseError(unsigned short code, const WebString& message)
       : code_(code), message_(message) {}
 
-  WebIDBDatabaseError(const WebIDBDatabaseError& error)
-      : code_(error.code_), message_(error.message_) {}
+  WebIDBDatabaseError(const WebIDBDatabaseError& error) = default;
 
-  ~WebIDBDatabaseError() {}
+  ~WebIDBDatabaseError() = default;
 
-  WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error) {
-    code_ = error.code_;
-    message_ = error.message_;
-    return *this;
-  }
+  WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error) = default;
 
   unsigned short Code() const { return code_; }
   const WebString& Message() const { return message_; }
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h
index dc0374b6..c47273e9 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h
@@ -40,7 +40,7 @@
 
 class WebIDBFactory {
  public:
-  virtual ~WebIDBFactory() {}
+  virtual ~WebIDBFactory() = default;
 
   virtual void GetDatabaseNames(WebIDBCallbacks*, const WebSecurityOrigin&) = 0;
   virtual void Open(const WebString& name,
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKey.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKey.h
index 869e282b..f69f2201 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKey.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKey.h
@@ -41,7 +41,7 @@
  public:
   // Please use one of the factory methods. This is public only to allow
   // WebVector.
-  WebIDBKey() {}
+  WebIDBKey() = default;
   ~WebIDBKey() { Reset(); }
 
   BLINK_EXPORT static WebIDBKey CreateArray(const WebVector<WebIDBKey>&);
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h
index af21519..746b3402 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h
@@ -52,19 +52,11 @@
   explicit WebIDBKeyPath(const WebVector<WebString>& array)
       : type_(kWebIDBKeyPathTypeArray), array_(array) {}
 
-  WebIDBKeyPath(const WebIDBKeyPath& key_path)
-      : type_(key_path.type_),
-        array_(key_path.array_),
-        string_(key_path.string_) {}
+  WebIDBKeyPath(const WebIDBKeyPath& key_path) = default;
 
-  ~WebIDBKeyPath() {}
+  ~WebIDBKeyPath() = default;
 
-  WebIDBKeyPath& operator=(const WebIDBKeyPath& key_path) {
-    type_ = key_path.type_;
-    array_ = key_path.array_;
-    string_ = key_path.string_;
-    return *this;
-  }
+  WebIDBKeyPath& operator=(const WebIDBKeyPath& key_path) = default;
 
   WebIDBKeyPathType KeyPathType() const { return type_; }
   const WebVector<WebString>& Array() const {
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyRange.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyRange.h
index 7943bea..80cf25e 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyRange.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyRange.h
@@ -38,7 +38,7 @@
  public:
   ~WebIDBKeyRange() { Reset(); }
 
-  WebIDBKeyRange() {}
+  WebIDBKeyRange() = default;
   WebIDBKeyRange(const WebIDBKeyRange& key_range) { Assign(key_range); }
   WebIDBKeyRange(const WebIDBKey& lower,
                  const WebIDBKey& upper,
diff --git a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h
index 12d43d7d..2b48f043 100644
--- a/third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h
+++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h
@@ -14,7 +14,7 @@
 namespace blink {
 
 struct WebIDBValue {
-  WebIDBValue() {}
+  WebIDBValue() = default;
   explicit WebIDBValue(const WebData& data) : data(data) {}
   WebIDBValue(const WebData& data, const WebVector<WebBlobInfo>& blob_info)
       : data(data), web_blob_info(blob_info) {}
diff --git a/third_party/WebKit/public/platform/modules/installedapp/WebRelatedApplication.h b/third_party/WebKit/public/platform/modules/installedapp/WebRelatedApplication.h
index b53f3a00..bb3d286 100644
--- a/third_party/WebKit/public/platform/modules/installedapp/WebRelatedApplication.h
+++ b/third_party/WebKit/public/platform/modules/installedapp/WebRelatedApplication.h
@@ -10,7 +10,7 @@
 namespace blink {
 
 struct WebRelatedApplication {
-  WebRelatedApplication() {}
+  WebRelatedApplication() = default;
 
   WebString platform;
   WebString url;
diff --git a/third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.h b/third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.h
index 4690b83..3d7c84e 100644
--- a/third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.h
+++ b/third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.h
@@ -19,7 +19,7 @@
 
 class WebRelatedAppsFetcher {
  public:
-  virtual ~WebRelatedAppsFetcher() {}
+  virtual ~WebRelatedAppsFetcher() = default;
 
   // Gets the list of related applications from the web frame's manifest.
   virtual void GetManifestRelatedApplications(
diff --git a/third_party/WebKit/public/platform/modules/locks/lock_manager.mojom b/third_party/WebKit/public/platform/modules/locks/lock_manager.mojom
index e9b51e44..8cd5a60f 100644
--- a/third_party/WebKit/public/platform/modules/locks/lock_manager.mojom
+++ b/third_party/WebKit/public/platform/modules/locks/lock_manager.mojom
@@ -4,8 +4,6 @@
 
 module blink.mojom;
 
-import "url/mojo/origin.mojom";
-
 // An opaque handle passed from the browser process to a child process to
 // reflect a held lock. The lock is released when the handle is dropped.
 interface LockHandle {};
@@ -46,8 +44,7 @@
     NO_WAIT
   };
 
-  RequestLock(url.mojom.Origin origin,
-              string name,
+  RequestLock(string name,
               LockMode mode,
               WaitMode wait,
               LockRequest request);
diff --git a/third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h b/third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h
index a2d701b..1f33ec9 100644
--- a/third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h
+++ b/third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h
@@ -32,7 +32,7 @@
 // Provides the services to show platform notifications to the user.
 class WebNotificationManager {
  public:
-  virtual ~WebNotificationManager() {}
+  virtual ~WebNotificationManager() = default;
 
   // Shows a page notification on the user's system. These notifications will
   // have their events delivered to the delegate specified in this call.
diff --git a/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h b/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h
index 2478026e..39cf0bf 100644
--- a/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h
+++ b/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h
@@ -25,7 +25,7 @@
 // onion souped (crbug.com/749327).
 class WebPresentationClient {
  public:
-  virtual ~WebPresentationClient() {}
+  virtual ~WebPresentationClient() = default;
 
   // Passes the Blink-side delegate to the embedder.
   virtual void SetReceiver(WebPresentationReceiver*) = 0;
diff --git a/third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h b/third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h
index 51f4f8d..5f81889 100644
--- a/third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h
+++ b/third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h
@@ -17,7 +17,7 @@
 
 class WebPushClient {
  public:
-  virtual ~WebPushClient() {}
+  virtual ~WebPushClient() = default;
 
   // Ownership of the WebServiceWorkerRegistration is not transferred.
   // Ownership of the callbacks is transferred to the client.
diff --git a/third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h b/third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h
deleted file mode 100644
index d74ef17..0000000
--- a/third_party/WebKit/public/platform/modules/push_messaging/WebPushPermissionStatus.h
+++ /dev/null
@@ -1,20 +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 WebPushPermissionStatus_h
-#define WebPushPermissionStatus_h
-
-namespace blink {
-
-enum WebPushPermissionStatus {
-  kWebPushPermissionStatusGranted = 0,
-  kWebPushPermissionStatusDenied,
-  kWebPushPermissionStatusPrompt,
-
-  // Used for IPC message range checks.
-  kWebPushPermissionStatusLast = kWebPushPermissionStatusPrompt
-};
-
-}  // namespace blink
-#endif  // WebPushPermissionStatus_h
diff --git a/third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h b/third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h
index 3cb28c8..acc3844 100644
--- a/third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h
+++ b/third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h
@@ -6,7 +6,6 @@
 #define WebPushProvider_h
 
 #include "public/platform/WebCallbacks.h"
-#include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 #include "public/platform/modules/push_messaging/WebPushSubscription.h"
 
 #include <memory>
@@ -19,13 +18,11 @@
 
 using WebPushSubscriptionCallbacks =
     WebCallbacks<std::unique_ptr<WebPushSubscription>, const WebPushError&>;
-using WebPushPermissionStatusCallbacks =
-    WebCallbacks<WebPushPermissionStatus, const WebPushError&>;
 using WebPushUnsubscribeCallbacks = WebCallbacks<bool, const WebPushError&>;
 
 class WebPushProvider {
  public:
-  virtual ~WebPushProvider() {}
+  virtual ~WebPushProvider() = default;
 
   // Takes ownership of the WebPushSubscriptionCallbacks.
   // Does not take ownership of the WebServiceWorkerRegistration.
@@ -40,13 +37,6 @@
       WebServiceWorkerRegistration*,
       std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
 
-  // Takes ownership of the WebPushPermissionStatusCallbacks.
-  // Does not take ownership of the WebServiceWorkerRegistration.
-  virtual void GetPermissionStatus(
-      WebServiceWorkerRegistration*,
-      const WebPushSubscriptionOptions&,
-      std::unique_ptr<WebPushPermissionStatusCallbacks>) = 0;
-
   // Takes ownership if the WebPushUnsubscribeCallbacks.
   // Does not take ownership of the WebServiceWorkerRegistration.
   virtual void Unsubscribe(WebServiceWorkerRegistration*,
diff --git a/third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationCallback.h b/third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationCallback.h
index 181ebe8..50fc524e 100644
--- a/third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationCallback.h
+++ b/third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationCallback.h
@@ -17,7 +17,7 @@
 // failure.
 class WebLockOrientationCallback {
  public:
-  virtual ~WebLockOrientationCallback() {}
+  virtual ~WebLockOrientationCallback() = default;
 
   virtual void OnSuccess() = 0;
   virtual void OnError(WebLockOrientationError) = 0;
diff --git a/third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationClient.h b/third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationClient.h
index 4973d55..56375df 100644
--- a/third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationClient.h
+++ b/third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationClient.h
@@ -15,7 +15,7 @@
 // Client handling screen orientation locking for a given WebFrame.
 class WebScreenOrientationClient {
  public:
-  virtual ~WebScreenOrientationClient() {}
+  virtual ~WebScreenOrientationClient() = default;
 
   // Request a screen orientation lock. The implementation will own the
   // callback.
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorker.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorker.h
index de071679..cbf263a6 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorker.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorker.h
@@ -52,11 +52,11 @@
   // Blink is owning this handle.
   class Handle {
    public:
-    virtual ~Handle() {}
+    virtual ~Handle() = default;
     virtual WebServiceWorker* ServiceWorker() { return nullptr; }
   };
 
-  virtual ~WebServiceWorker() {}
+  virtual ~WebServiceWorker() = default;
 
   // Sets ServiceWorkerProxy, with which callee can start making upcalls
   // to the ServiceWorker object via the client. This doesn't pass the
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCache.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCache.h
index dbe80a1..cd70cdf 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCache.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCache.h
@@ -34,7 +34,7 @@
   using CacheBatchCallbacks =
       WebCallbacks<void, blink::mojom::CacheStorageError>;
 
-  virtual ~WebServiceWorkerCache() {}
+  virtual ~WebServiceWorkerCache() = default;
 
   // Options that affect the scope of searches.
   struct QueryParams {
@@ -63,7 +63,7 @@
     QueryParams match_params;
   };
 
-  WebServiceWorkerCache() {}
+  WebServiceWorkerCache() = default;
 
   // Ownership of the Cache*Callbacks methods passes to the
   // WebServiceWorkerCache instance, which will delete it after calling
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h
index 80f819e..05d643f 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h
@@ -36,7 +36,7 @@
       WebCallbacks<const WebServiceWorkerResponse&,
                    blink::mojom::CacheStorageError>;
 
-  virtual ~WebServiceWorkerCacheStorage() {}
+  virtual ~WebServiceWorkerCacheStorage() = default;
 
   // Ownership of the CacheStorage*Callbacks methods passes to the
   // WebServiceWorkerCacheStorage instance, which will delete it after calling
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h
index 729cc74..88b9711 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h
@@ -53,7 +53,7 @@
 // DocumentLoader.
 class WebServiceWorkerNetworkProvider {
  public:
-  virtual ~WebServiceWorkerNetworkProvider() {}
+  virtual ~WebServiceWorkerNetworkProvider() = default;
 
   // A request is about to be sent out, and the client may modify it. Request
   // is writable, and changes to the URL, for example, will change the request
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h
index 3e6bd9b..a01d8f9 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h
@@ -132,7 +132,7 @@
     return false;
   }
 
-  virtual ~WebServiceWorkerProvider() {}
+  virtual ~WebServiceWorkerProvider() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
index 16e87cea8..ffa9cf1e 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
@@ -51,7 +51,7 @@
 // MockServiceWorkerProviderClient for unit tests.
 class WebServiceWorkerProviderClient {
  public:
-  virtual ~WebServiceWorkerProviderClient() {}
+  virtual ~WebServiceWorkerProviderClient() = default;
 
   virtual void SetController(std::unique_ptr<WebServiceWorker::Handle>,
                              bool should_notify_controller_change) = 0;
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProxy.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProxy.h
index 992009bd..769818e 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProxy.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProxy.h
@@ -18,7 +18,7 @@
   virtual void DispatchStateChangeEvent() = 0;
 
  protected:
-  virtual ~WebServiceWorkerProxy() {}
+  virtual ~WebServiceWorkerProxy() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
index 019d3ba..2b0045d 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
@@ -23,7 +23,7 @@
 // implementation via the handle to update or unregister the registration.
 class WebServiceWorkerRegistration {
  public:
-  virtual ~WebServiceWorkerRegistration() {}
+  virtual ~WebServiceWorkerRegistration() = default;
 
   using WebServiceWorkerUpdateCallbacks =
       WebCallbacks<void, const WebServiceWorkerError&>;
@@ -43,7 +43,7 @@
   // registration representation while Blink is owning this handle.
   class Handle {
    public:
-    virtual ~Handle() {}
+    virtual ~Handle() = default;
     virtual WebServiceWorkerRegistration* Registration() { return nullptr; }
   };
 
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h
index 744a638..b3801ee 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h
@@ -26,7 +26,7 @@
   virtual void SetActive(std::unique_ptr<WebServiceWorker::Handle>) = 0;
 
  protected:
-  virtual ~WebServiceWorkerRegistrationProxy() {}
+  virtual ~WebServiceWorkerRegistrationProxy() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
index d643e46..e2589f39f 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
@@ -19,7 +19,8 @@
   // end of the body or it has accidentally finished.
   class Listener {
    public:
-    virtual ~Listener(){};
+    virtual ~Listener() = default;
+    ;
     virtual void OnAborted() = 0;
     virtual void OnCompleted() = 0;
   };
diff --git a/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h b/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h
index 7a48058b..ca12b732 100644
--- a/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h
+++ b/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessor.h
@@ -37,7 +37,7 @@
 
 class WebMIDIAccessor {
  public:
-  virtual ~WebMIDIAccessor() {}
+  virtual ~WebMIDIAccessor() = default;
 
   virtual void StartSession() {}
   virtual void Open(unsigned port_index) {}
diff --git a/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessorClient.h b/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessorClient.h
index 0df3dad..4a0ff0d 100644
--- a/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessorClient.h
+++ b/third_party/WebKit/public/platform/modules/webmidi/WebMIDIAccessorClient.h
@@ -66,7 +66,7 @@
                                   double time_stamp) = 0;
 
  protected:
-  virtual ~WebMIDIAccessorClient() {}
+  virtual ~WebMIDIAccessorClient() = default;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/public/platform/scheduler/child/child_scheduler.h b/third_party/WebKit/public/platform/scheduler/child/child_scheduler.h
index 0c366b80..79aa9f4 100644
--- a/third_party/WebKit/public/platform/scheduler/child/child_scheduler.h
+++ b/third_party/WebKit/public/platform/scheduler/child/child_scheduler.h
@@ -20,7 +20,7 @@
 
 class BLINK_PLATFORM_EXPORT ChildScheduler {
  public:
-  virtual ~ChildScheduler() {}
+  virtual ~ChildScheduler() = default;
 
   // Returns the default task runner.
   virtual scoped_refptr<base::SingleThreadTaskRunner> DefaultTaskRunner() = 0;
@@ -63,7 +63,7 @@
   virtual void Shutdown() = 0;
 
  protected:
-  ChildScheduler() {}
+  ChildScheduler() = default;
   DISALLOW_COPY_AND_ASSIGN(ChildScheduler);
 };
 
diff --git a/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h b/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
index 9ec9aca..4bf0d79 100644
--- a/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
+++ b/third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h
@@ -145,8 +145,8 @@
   // at least one pause handle exists.
   class BLINK_PLATFORM_EXPORT RendererPauseHandle {
    public:
-    RendererPauseHandle() {}
-    virtual ~RendererPauseHandle() {}
+    RendererPauseHandle() = default;
+    virtual ~RendererPauseHandle() = default;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(RendererPauseHandle);
diff --git a/third_party/WebKit/public/web/WebColorChooser.h b/third_party/WebKit/public/web/WebColorChooser.h
deleted file mode 100644
index f4e956a..0000000
--- a/third_party/WebKit/public/web/WebColorChooser.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2011 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:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef WebColorChooser_h
-#define WebColorChooser_h
-
-#include "public/platform/WebColor.h"
-#include "public/platform/WebCommon.h"
-
-namespace blink {
-
-// This represents a color chooser.
-class WebColorChooser {
- public:
-  virtual ~WebColorChooser() {}
-
-  // Set selected color in the color chooser.
-  virtual void SetSelectedColor(const WebColor color) {}
-
-  // Calling this ends the color chooser and the client won't be recieving
-  // didChooseColor callbacks anymore.
-  virtual void EndChooser() {}
-};
-}
-
-#endif  // WebColorChooser_h
diff --git a/third_party/WebKit/public/web/WebColorChooserClient.h b/third_party/WebKit/public/web/WebColorChooserClient.h
deleted file mode 100644
index 439998c..0000000
--- a/third_party/WebKit/public/web/WebColorChooserClient.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2011 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:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef WebColorChooserClient_h
-#define WebColorChooserClient_h
-
-#include "public/platform/WebColor.h"
-#include "public/platform/WebCommon.h"
-
-namespace blink {
-
-// Receives calls from WebColorChooser and passes it to the WebCore side.
-class WebColorChooserClient {
- public:
-  virtual ~WebColorChooserClient() {}
-
-  // Called when user selects a color in the color chooser.
-  virtual void DidChooseColor(const WebColor&) {}
-
-  // Called when color chooser has ended.
-  virtual void DidEndChooser() {}
-};
-}
-
-#endif  // WebColorChooserClient_h
diff --git a/third_party/WebKit/public/web/WebColorSuggestion.h b/third_party/WebKit/public/web/WebColorSuggestion.h
deleted file mode 100644
index ccc8b57..0000000
--- a/third_party/WebKit/public/web/WebColorSuggestion.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2013 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.
- */
-
-#ifndef WebColorSuggestion_h
-#define WebColorSuggestion_h
-
-#include "public/platform/WebColor.h"
-#include "public/platform/WebString.h"
-
-namespace blink {
-
-struct ColorSuggestion;
-
-struct WebColorSuggestion {
-  WebColor color;
-  WebString label;
-
-#if INSIDE_BLINK
-  BLINK_EXPORT WebColorSuggestion(const ColorSuggestion&);
-  BLINK_EXPORT WebColorSuggestion& operator=(const ColorSuggestion&);
-#endif
-};
-
-}  // namespace blink
-
-#endif  // WebColorSuggestion_h
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index 770d48b..11306bd 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -89,8 +89,6 @@
 class AssociatedInterfaceProvider;
 class WebApplicationCacheHost;
 class WebApplicationCacheHostClient;
-class WebColorChooser;
-class WebColorChooserClient;
 class WebContentDecryptionModule;
 class WebCookieJar;
 class WebDocumentLoader;
@@ -116,7 +114,6 @@
 class WebURL;
 class WebURLResponse;
 class WebUserMediaClient;
-struct WebColorSuggestion;
 struct WebConsoleMessage;
 struct WebContextMenuData;
 struct WebPluginParams;
@@ -552,19 +549,6 @@
 
   // Dialogs -------------------------------------------------------------
 
-  // This method opens the color chooser and returns a new WebColorChooser
-  // instance. If there is a WebColorChooser already from the last time this
-  // was called, it ends the color chooser by calling endChooser, and replaces
-  // it with the new one. The given list of suggestions can be used to show a
-  // simple interface with a limited set of choices.
-
-  virtual WebColorChooser* CreateColorChooser(
-      WebColorChooserClient*,
-      const WebColor&,
-      const WebVector<WebColorSuggestion>&) {
-    return nullptr;
-  }
-
   // Displays a modal alert dialog containing the given message. Returns
   // once the user dismisses the dialog.
   virtual void RunModalAlertDialog(const WebString& message) {}
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index 12637dd..c546f58 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -571,8 +571,6 @@
   virtual void SetSpellCheckPanelHostClient(WebSpellCheckPanelHostClient*) = 0;
   virtual WebSpellCheckPanelHostClient* SpellCheckPanelHostClient() const = 0;
   virtual void ReplaceMisspelledRange(const WebString&) = 0;
-  virtual void EnableSpellChecking(bool) = 0;
-  virtual bool IsSpellCheckingEnabled() const = 0;
   virtual void RemoveSpellingMarkers() = 0;
   virtual void RemoveSpellingMarkersUnderWords(
       const WebVector<WebString>& words) = 0;
diff --git a/third_party/WebKit/public/web/WebTextCheckClient.h b/third_party/WebKit/public/web/WebTextCheckClient.h
index 516116b..29a68775 100644
--- a/third_party/WebKit/public/web/WebTextCheckClient.h
+++ b/third_party/WebKit/public/web/WebTextCheckClient.h
@@ -12,7 +12,6 @@
 
 class WebTextCheckingCompletion;
 
-// TODO(xiaochengh): Rename WebTextCheckClient to WebSpellCheckClient.
 class WebTextCheckClient {
  public:
   // Returns the Chromium setting of whether spell-checking is enabled.
diff --git a/third_party/binutils/OWNERS b/third_party/binutils/OWNERS
index 9ff8e32..f7b05de 100644
--- a/third_party/binutils/OWNERS
+++ b/third_party/binutils/OWNERS
@@ -1,3 +1,3 @@
 thakis@chromium.org
 thestig@chromium.org
-tansell@chromium.org
+thomasanderson@chromium.org
diff --git a/third_party/boringssl/crypto_test_data.cc b/third_party/boringssl/crypto_test_data.cc
index 75c355c..e1ca010 100644
--- a/third_party/boringssl/crypto_test_data.cc
+++ b/third_party/boringssl/crypto_test_data.cc
@@ -2432,20 +2432,20 @@
     "f9d0e58056e653104925b9fe6c9\n\n# The same key, but with the redundant parameters in the ECPrivateKey mismatched.\nPrivateKey = P-256-BadInnerParameters\nInput = 308190020100301306072a8648ce3d020106082a8648ce3d0301070476307402010104208a872fb62893c4d1ffc5b9f0f91758069f8352e08fa05a49f8db926cb5728725a00706052b81040022a144034200042c150f429ce70f216c252cf5e062ce1f639cd5d165c7f89424072c27197d78b33b920e95cdb664e990dcf0cfea0d94e2a8e6af9d0e58056e653104925b9fe6c9\nError = GROUP_MISMATCH\n\n# The public half of the same key encoded as a PublicKey.\nPublicKey = P-256-SPKI\nType = EC\nInput = 3059301306072a8648ce3d020106082a8648ce3d030107034200042c150f429ce70f216c252cf5e062ce1f639cd5d165c7f89424072c27197d78b33b920e95cdb664e990dcf0cfea0d94e2a8e6af9d0e58056e653104925b9fe6c9\n\n# The same as above, but with the curve explicitly spelled out.\nPublicKey = P-256-SPKI\nInput = 3082014b3082010306072a8648ce3d02013081f7020101302c06072a8648ce3d0101022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff305b0420ffffffff00000001000000000000000000000000fffffffffffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b031500c49d360886e704936a6678e1139d26b7819f7e900441046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551020101034200042c150f429ce70f216c252cf5e062ce1f639cd5d165c7f89424072c27197d78b33b920e95cdb664e990dcf0cfea0d94e2a8e6af9d0e58056e653104925b9fe6c9\nError = DECODE_ERROR\n\n# The same as above, but with trailing data after the curve name.\nPublicKey = P-256-SPKI\nInput = 305b301506072a8648ce3d020106082a8648ce3d0301070500034200042c150f429ce70f216c252cf5e062ce1f639cd5d165c7f89424072c27197d78b33b920e95cdb664e990dcf0cfea0d94e2a8e6af9d0e58056e653104925b9fe6c9\nError = DECODE_ERROR\n\n# A DSA private key.\nPrivateKey = DSA-1024\nType = DSA\nInput = 308202650201003082023906072a8648ce3804013082022c02820101009e12fab3de12213501dd82aa10ca2d101d2d4ebfef4d2a3f8daa0fe0cedad8d6af85616aa2f3252c0a2b5a6db09e6f14900e0ddb8311876dd8f9669525f99ed65949e184d5064793271169a228680b95ec12f59a8e20b21f2b58eb2a2012d35bde2ee351822fe8f32d0a330565dcce5c672b7259c14b2433d0b5b2ca2b2db0ab626e8f13f47fe0345d904e7294bb038e9ce21a9e580b83356278706cfe768436c69de149ccff98b4aab8cb4f6385c9f102ce59346eaeef27e0ad222d53d6e89cc8cde5776dd00057b03f2d88ab3cedbafd7b585f0b7f7835e17a3728bbf25ea62572f245dc111f3ce39cb6ffacc31b0a2790e7bde90224ea9b09315362af3d2b022100f381dcf53ebf724f8b2e5ca82c010fb4b5eda9358d0fd88ed278589488b54fc3028201000c402a725dcc3a62e02bf4cf43cd17f4a493591220223669cf4193edab423ad08dfb552e308a6a57a5ffbc7cd0fb2087f81f8df0cb08ab2133287d2b6968714a94f633c940845a48a3e16708dde761cc6a8eab2d84db21b6ea5b07681493cc9c31fbc368b243f6ddf8c932a8b4038f44e7b15ca876344a147859f2b43b39458668ad5e0a1a9a669546dd2812e3b3617a0aef99d58e3bb4cc87fd94225e01d2dcc469a77268146c51918f18e8b4d70aa1f0c7623bcc52cf3731d38641b2d2830b7eecb2f09552ff137d046e494e7f33c3590002b16d1b97d936fda28f90c3ed3ca35338168ac16f77c3c57adc2e8f7c6c2256e41a5f65450590dbb5bcf06d66610423022100b0c768702743bc51242993a971a52889795444f7c6452203d0ce84fe6117d46e\n\n# A DSA public key.\nPublicKey = DSA-1024-SPKI\nType = DSA\nInput = 308201b73082012c06072a8648ce3804013082011f02818100b3429b8b128c9079f9b72e86857e98d265e5d91661ed8b5f4cc56e5eed1e571da30186983a9dd76297eab73ee13a1db841f8800d04a7cab478af6cde2ea4a2868531af169a24858c6268efa39ceb7ed0d4227eb5bbb01124a2a5a26038c7bcfb8cc827f68f5202345166e4718596799b65c9def82828ce44e62e38e41a0d24b1021500c5a56c81ddd87f47e676546c56d05706421624cf0281810094de40d27314fe929e47ff9b1ac65cfc73ef38c4d381c890be6217b15039ae18190e6b421af8c0bda35a5cfd050f58ae2644adce83e68c8e5ba11729df56bbb21e227a60b816cc033fa799a38fe1ba5b4aa1801b6f841ce3df99feb3b4fb96950c960af13fa2ce920aabc12dd24ad2044a35063ea0e25f67f560f4cfbdc5598303818400028180258c30ebbb7f34fdc873ce679f6cea373c7886d75d4421b90920db034daedd292c64d8edd8cdbdd7f3ad23d74cfa2135247d0cef6ecf2e14f99e19d22a8c1266bd8fb8719c0e5667c716c45c7adbdabe548085bdad2dfee636f8d52fd6adb2193df6c4f0520fbd171b91882e0e4f321f8250ffecf4dbea00e114427d3ef96c1a\n\n# The same key as above, but without the parameters.\nPublicKey = DSA-1024-SPKI-No-Params\nType = DSA\nInput = 308192300906072a8648ce38040103818400028180258c30ebbb7f34fdc873ce679f6cea373c7886d75d4421b90920db034daedd292c64d8edd8cdbdd7f3ad23d74cfa2135247d0cef6ecf2e14f99e19d22a8c1266bd8fb8719c0e5667c716c45c7adbdabe548085bdad2dfee636f8d52fd6adb2193df6c4f0520fbd171b91882e0e4f321f8250ffecf4dbea00e114427d3ef96c1a\n\n# Private keys from RFC 8032.\nPrivateKey = Ed25519\nType = Ed25519\nInput = 302e020100300506032b6570042204209d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60\n\nPrivateKey = Ed25519-2\nType = Ed25519\nInput = 302e020100300506032b6570042204204ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb\n\nPrivateKey = Ed25519-3\nType = Ed25519\nInput = 302e020100300506032b657004220420c5aa8df43f9f837bedb7442f31dcb7b166d38535076f094b85ce3a2e0b4458f7\n\nPrivateKey = Ed25519-4\nType = Ed25519\nInput = 302e020100300506032b657004220420f5e5767cf153319517630f226876b86c8160cc583bc013744c6bf255f5cc0ee5\n\nPrivateKey = Ed25519-5\nType = Ed25519\nInput = 302e020100300506032b657004220420833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42\n\n# Public keys from RFC 8032.\nPublicKey = Ed25519-SPKI\nType = Ed25519\nInput = 302a300506032b6570032100d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a\n\nPublicKey = Ed25519-SPKI-2\nType = Ed25519\nInput = 302a300506032b65700321003d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c\n\nPublicKey = Ed25519-SPKI-3\nType = Ed25519\nInput = 302a300506032b6570032100fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025\n\nPublicKey = Ed25519-SPKI-4\nType = Ed25519\nInput = 302a300506032b6570032100278117fc144c72340f67d0f2316e8386ceffbf2b2428c9c51fef7c597f1d426e\n\nPublicKey = Ed25519-SPKI-5\nType = Ed25519\nInput = 302a300506032b6570032100ec172b93ad5e563bf4932c70e1245034c35467ef2efd4d64ebf819683467e2bf\n\n# The first key, private and public, with invalid NULL parameters.\nPrivateKey = Ed25519-NULL\nInput = 3030020100300706032b65700500042204209d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60\nError = DECODE_ERROR\n\nPublicKey = Ed25519-SPKI-NULL\nInput = 302c300706032b65700500032100d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a\nError = DECODE_ERROR\n\n# Sample public key from draft-ietf-curdle-pkix-04.\nPublicKey = Ed25519-SPKI-Spec\nType = Ed25519\nInput = 302a300506032b657003210019bf44096984cdfe8541bac167dc3b96c85086aa30b6b6cb0c5c38ad703166e1\n\n# Sample private key from draft-ietf-curdle-pkix-04.\nPrivateKey = Ed25519-Spec\nType = Ed25519\nInput = 302e020100300506032b657004220420d4ee72dbf913584ad5b6d8f1f769f8ad3afe7c28cbf1d4fbe097a88f44755842\n\n\n# RSA tests\n\nSign = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\n\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\n\nVerify = RSA-2048-SPKI\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d",
     "4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\n\n# Digest too long\nSign = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF12345\"\nError = INVALID_MESSAGE_LENGTH\n\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF12345\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\nError = INVALID_MESSAGE_LENGTH\n\n# Digest too short\nSign = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF123\"\nError = INVALID_MESSAGE_LENGTH\n\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF123\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\nError = INVALID_MESSAGE_LENGTH\n\n# Digest too large for key.\nSign = RSA-512\nDigest = SHA512\nInput = \"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"\nError = DIGEST_TOO_BIG_FOR_RSA_KEY\n\n# Mismatched digest\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1233\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ad\nError = BAD_SIGNATURE\n\n# Corrupted signature\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1233\"\nOutput = c09d402423cbf233d26cae21f954547bc43fe80fd41360a0336cfdbe9aedad05bef6fd2eaee6cd60089a52482d4809a238149520df3bdde4cb9e23d9307b05c0a6f327052325a29adf2cc95b66523be7024e2a585c3d4db15dfbe146efe0ecdc0402e33fe5d40324ee96c5c3edd374a15cdc0f5d84aa243c0f07e188c6518fbfceae158a9943be398e31097da81b62074f626eff738be6160741d5a26957a482b3251fd85d8df78b98148459de10aa93305dbb4a5230aa1da291a9b0e481918f99b7638d72bb687f97661d304ae145d64a474437a4ef39d7b8059332ddeb07e92bf6e0e3acaf8afedc93795e4511737ec1e7aab6d5bc9466afc950c1c17b48ae\nError = BLOCK_TYPE_IS_NOT_01\n\n# parameter missing (NOTE: this differs from upstream)\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3ec3fc29eb6e122bd7aa361cd09fe1bcbe85311096a7b9e4799cedfb2351ce0ab7fe4e75b4f6b37f67edd9c60c800f9ab941c0c157d7d880ca9de40c951d60fd293ae220d4bc510b1572d6e85a1bbbd8605b52e05f1c64fafdae59a1c2fbed214b7844d0134619de62851d5a0522e32e556e5950f3f97b8150e3f0dffee612c924201c27cd9bc8b423a71533380c276d3d59fcba35a2e80a1a192ec266a6c2255012cd86a349fe90a542b355fa3355b04da6cdf1df77f0e7bd44a90e880e1760266d233e465226f5db1c68857847d82072861ee266ddfc2e596845b77e1803274a579835ab5e4975d81d20b7df9cec7795489e4a2bdb8c1cf6a6b359945ac92c\nError = BAD_SIGNATURE\n\n# embedded digest too long\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = afec9a0d5330a08f54283bb4a9d4e7e7e70fc1342336c4c766fba713f66970151c6e27413c48c33864ea45a0238787004f338ed3e21b53b0fe9c1151c42c388cbc7cba5a06b706c407a5b48324fbe994dc7afc3a19fb3d2841e66222596c14cd72a0f0a7455a019d8eb554f59c0183f9552b75aa96fee8bf935945e079ca283d2bd3534a86f11351f6d6181fbf433e5b01a6d1422145c7a72214d3aacdd5d3af12b2d6bf6438f9f9a64010d8aeed801c87f0859412b236150b86a545f7239be022f4a7ad246b59df87514294cb4a4c7c5a997ee53c66054d9f38ca4e76c1f7af83c30f737ef70f83a45aebe18238ddb95e1998814ca4fc72388f1533147c169d\nError = BAD_SIGNATURE\n\n# embedded digest too short\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = afec9a0d5330a08f54283bb4a9d4e7e7e70fc1342336c4c766fba713f66970151c6e27413c48c33864ea45a0238787004f338ed3e21b53b0fe9c1151c42c388cbc7cba5a06b706c407a5b48324fbe994dc7afc3a19fb3d2841e66222596c14cd72a0f0a7455a019d8eb554f59c0183f9552b75aa96fee8bf935945e079ca283d2bd3534a86f11351f6d6181fbf433e5b01a6d1422145c7a72214d3aacdd5d3af12b2d6bf6438f9f9a64010d8aeed801c87f0859412b236150b86a545f7239be022f4a7ad246b59df87514294cb4a4c7c5a997ee53c66054d9f38ca4e76c1f7af83c30f737ef70f83a45aebe18238ddb95e1998814ca4fc72388f1533147c169d\nError = BAD_SIGNATURE\n\n# Garbage after DigestInfo\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 9ee34872d4271a7d8808af0a4052a145a6d6a8437d00da3ed14428c7f087cd39f4d43334c41af63e7fa1ba363fee7bcef401d9d36a662abbab55ce89a696e1be0dfa19a5d09ca617dd488787b6048baaefeb29bc8688b2fe3882de2b77c905b5a8b56cf9616041e5ec934ba6de863efe93acc4eef783fe7f72a00fa65d6093ed32bf98ce527e62ccb1d56317f4be18b7e0f55d7c36617d2d0678a306e3350956b662ac15df45215dd8f6b314babb9788e6c272fa461e4c9b512a11a4b92bc77c3a4c95c903fccb238794eca5c750477bf56ea6ee6a167367d881b485ae3889e7c489af8fdf38e0c0f2aed780831182e34abedd43c39281b290774bf35cc25274\nError = BAD_SIGNATURE\n\n# invalid tag for parameter\nVerify = RSA-2048\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 49525db4d44c755e560cba980b1d85ea604b0e077fcadd4ba44072a3487bbddb835016200a7d8739cce2dc3223d9c20cbdd25059ab02277f1f21318efd18e21038ec89aa9d40680987129e8b41ba33bceb86518bdf47268b921cce2037acabca6575d832499538d6f40cdba0d40bd7f4d8ea6ca6e2eec87f294efc971407857f5d7db09f6a7b31e301f571c6d82a5e3d08d2bb3a36e673d28b910f5bec57f0fcc4d968fd7c94d0b9226dec17f5192ad8b42bcab6f26e1bea1fdc3b958199acb00f14ebcb2a352f3afcedd4c09000128a603bbeb9696dea13040445253972d46237a25c7845e3b464e6984c2348ea1f1210a9ff0b00d2d72b50db00c009bb39f9\nError = BAD_SIGNATURE\n\n\n# RSA-PSS tests.\n\n# Zero salt length makes the output deterministic\nSign = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\n\n# Verify of above signature\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\n\n# A non-zero salt length must be checked by round-tripping.\nSign = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 32\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nCheckVerify\n\n# Auto-detected salt length\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = -2\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7",
     "d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\n\n# Signing with salt length -1 means to match the digest length.\nSign = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = -1\nVerifyPSSSaltLength = 32\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nCheckVerify\n\n# Signing with salt length -2 means to maximize the salt length.\nSign = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = -2\nVerifyPSSSaltLength = 222  # 256 - 32 - 2\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nCheckVerify\n\n# Wrong digest\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"00000000000000000000000000000000\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = BAD_SIGNATURE\n\n# Digest too short\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDE\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = INVALID_MESSAGE_LENGTH\n\n# Digest too long\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF0\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = INVALID_MESSAGE_LENGTH\n\n# Wrong salt length\nVerify = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 2\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = SLEN_CHECK_FAILED\n\n# Wrong salt length using implicit hash length\nVerify = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = -1\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = SLEN_CHECK_FAILED\n\n# Wrong MGF1 digest, SHA-1\nVerify = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nMGF1Digest = SHA1\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\n# If SHA-1, this input happens to succeed recovering a salt length, but it does\n# not match.\nError = SLEN_CHECK_FAILED\n\n# Wrong MGF1 digest, SHA-384\nVerify = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nMGF1Digest = SHA384\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\n# If SHA-384, this input happens fail to recover the salt length altogether.\nError = SLEN_RECOVERY_FAILED\n\n# The salt length is too large for the modulus (signing).\nSign = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 223\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nError = DATA_TOO_LARGE\n\n# The salt length is too large for the modulus (verifying).\nVerify = RSA-2048\nRSAPadding = PSS\nPSSSaltLength = 223\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4de433d5844043ef08d354da03cb29068780d52706d7d1e4d50efb7d58c9d547d83a747ddd0635a96b28f854e50145518482cb49e963054621b53c60c498d07c16e9c2789c893cf38d4d86900de71bde463bd2761d1271e358c7480a1ac0bab930ddf39602ad1bc165b5d7436b516b7a7858e8eb7ab1c420eeb482f4d207f0e462b1724959320a084e13848d11d10fb593e66bf680bf6d3f345fc3e9c3de60abbac37e1c6ec80a268c8d9fc49626c679097aa690bc1aa662b95eb8db70390861aa0898229f9349b4b5fdd030d4928c47084708a933144be23bd3c6e661b85b2c0ef9ed36d498d5b7320e8194d363d4ad478c059bae804181965e0b81b663158a\nError = DATA_TOO_LARGE\n\n# The hash is too large for the modulus (signing).\nSign = RSA-512\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA512\nInput = \"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"\nError = DATA_TOO_LARGE\n\nSign = RSA-512\nRSAPadding = PSS\nPSSSaltLength = -2\nDigest = SHA512\nInput = \"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"\nError = DATA_TOO_LARGE\n\n# The hash is too large for the modulus (verifying).\nVerify = RSA-512\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA512\nInput = \"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"\nOutput = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nError = DATA_TOO_LARGE\n\nVerify = RSA-512\nRSAPadding = PSS\nPSSSaltLength = -2\nDigest = SHA512\nInput = \"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"\nOutput = 457001d9ca50a93385fc5ec721c9dbbe7a0f2e9e4a2f846a30a8811dde66347b83901c7492039243537c7a667fafffd69049bcbd36afd0010d9b425e2d8785c1\nError = DATA_TOO_LARGE\n\n# Sample RSA-515 signature.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 00c5926600f160f85e7fe950cfe123908384211cd8fe25c90cb8e8cc0593308e9aa2efe3acbf100ec1658ded8f72f506525fc2c44f06251b08d896e7bb3f05b135\n\n# T",
-    "he above, but with too few leading zeros.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = c5926600f160f85e7fe950cfe123908384211cd8fe25c90cb8e8cc0593308e9aa2efe3acbf100ec1658ded8f72f506525fc2c44f06251b08d896e7bb3f05b135\nError = DATA_LEN_NOT_EQUAL_TO_MOD_LEN\n\n# The above, but with too many leading zeros.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 0000c5926600f160f85e7fe950cfe123908384211cd8fe25c90cb8e8cc0593308e9aa2efe3acbf100ec1658ded8f72f506525fc2c44f06251b08d896e7bb3f05b135\nError = DATA_LEN_NOT_EQUAL_TO_MOD_LEN\n\n# The above with an invalid leading byte. The top few bits of EM are required to\n# be cleared.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 007f803c832a2090aea04013d9fa9c1630732a1625232826d235f0950f7050d3fb0eb06ef9ea8b260fad68e1165a2d770a8c7fc7a8aaa68620b021fc19c97e0041\nError = FIRST_OCTET_INVALID\n\n# The above with an invalid trailing byte.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 03e68555035891eb08d96c0967db22328cd892ad2856d88516ecb946bfdba732bb029b5c0dfa2119ed7349897d2324e95e86d91d0c4afc82700a36db8933abbf58\nError = LAST_OCTET_INVALID\n\n# Non-zero salt length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 32\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n# Non-zero salt length, wrong salt length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 31\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\nError = SLEN_CHECK_FAILED\n\n# Non-zero salt length, match hash length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = -1\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n# Non-zero salt length, auto-detected.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = -2\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n\n# RSA decrypt\n\nDecrypt = RSA-2048\nInput = 550af55a2904e7b9762352f8fb7fa235a9cb053aacb2d5fcb8ca48453cb2ee3619746c701abf2d4cc67003471a187900b05aa812bd25ed05c675dfc8c97a24a7bf49bd6214992cad766d05a9a2b57b74f26a737e0237b8b76c45f1f226a836d7cfbc75ba999bdbe48dbc09227aa46c88f21dccba7840141ad5a5d71fd122e6bd6ac3e564780dfe623fc1ca9b995a6037bf0bbd43b205a84ac5444f34202c05ce9113087176432476576de6ffff9a52ea57c08be3ec2f49676cb8e12f762ac71fa3c321e00ac988910c85ff52f93825666ce0d40ffaa0592078919d4493f46d95ccf76364c6d57760dd0b64805f9afc76a2365a5575ca301d5103f0ea76cb9a78\nOutput = \"Hello World\"\n\n# Corrupted ciphertext\nDecrypt = RSA-2048\nInput = 550af55a2904e7b9762352f8fb7fa235a9cb053aacb2d5fcb8ca48453cb2ee3619746c701abf2d4cc67003471a187900b05aa812bd25ed05c675dfc8c97a24a7bf49bd6214992cad766d05a9a2b57b74f26a737e0237b8b76c45f1f226a836d7cfbc75ba999bdbe48dbc09227aa46c88f21dccba7840141ad5a5d71fd122e6bd6ac3e564780dfe623fc1ca9b995a6037bf0bbd43b205a84ac5444f34202c05ce9113087176432476576de6ffff9a52ea57c08be3ec2f49676cb8e12f762ac71fa3c321e00ac988910c85ff52f93825666ce0d40ffaa0592078919d4493f46d95ccf76364c6d57760dd0b64805f9afc76a2365a5575ca301d5103f0ea76cb9a79\nError = PKCS_DECODING_ERROR\n\n# OAEP padding\nDecrypt = RSA-2048\nRSAPadding = OAEP\nInput = 458708dfbd42a1297ce7a9c86c7087ab80b1754810929b89c5107ca55368587686986fce94d86cc1595b3fb736223a656ec0f34d18ba1cc5665593610f56c58e26b272d584f3d983a5c91085700755aebd921fb280bba3eda7046ec07b43e7298e52d59edc92be4639a8ce08b2f85976ecf6d98cc469eeb9d5d8e2a32ea8a6626edafe1038b3df455668a9f3c77cad8b92fb872e00058c3d2a7ede1a1f03fc5622084ae04d9d24f6bf0995c58d35b93b699b9763595e123f2ab0863cc9229eb290e2ede7715c7a8f39e0b9a3e2e1b56ebb62f1cbfbb5986fb212ebd785b83d01d968b11d1756c7337f70c1f1a63bff03608e24f3a2fd44e67f832a8701c5d5af\nOutput = \"Hello World\"\n\n# OAEP padding with label and custom hash.\nDecrypt = RSA-2048\nRSAPadding = OAEP\nOAEPDigest = SHA512\nOAEPLabel = 00112233445566778899aabbccddeeff\nInput = 48b956c22b8e40cc38f0893672ddf488fc806cf1fcc6239c66dd8345eb543d6b5cac589e6c7ae86dac1c2436c4d72c48009a737b2c649e6000dbab17203e4d9c078bd70b649700a0830d4ddc396af0c48973177a229e48259d93247f04f76474c7611b530c66f020c4da2cc861c2e4104831ecc0336e0cb10d6520fdefd0b33606f5cdd736dd439583b9b6011cce99623c93caf5f76e21e9fefab414795dd5ac12cba551be74ebf266834fcffab182c5e7c9b6c064df154cb26ddfd4fe2fd87590005f4bf45e776a0082803e9f68995b8eeb4c6802c67b5ef349e5b2dc0cf7a12fc097030f2bd28f0253f17129b04c82993a12957728b35880fdd2f8d0cc469f\nOutput = \"Hello World\"\n\n# OAEP padding, corrupted ciphertext\nDecrypt = RSA-2048\nRSAPadding = OAEP\nInput = 458708dfbd42a1297ce7a9c86c7087ab80b1754810929b89c5107ca55368587686986fce94d86cc1595b3fb736223a656ec0f34d18ba1cc5665593610f56c58e26b272d584f3d983a5c91085700755aebd921fb280bba3eda7046ec07b43e7298e52d59edc92be4639a8ce08b2f85976ecf6d98cc469eeb9d5d8e2a32ea8a6626edafe1038b3df455668a9f3c77cad8b92fb872e00058c3d2a7ede1a1f03fc5622084ae04d9d24f6bf0995c58d35b93b699b9763595e123f2ab0863cc9229eb290e2ede7715c7a8f39e0b9a3e2e1b56ebb62f1cbfbb5986fb212ebd785b83d01d968b11d1756c7337f70c1f1a63bff03608e24f3a2fd44e67f832a8701c5d5ac\nError = OAEP_DECODING_ERROR\n\n# Test that RSA encryption successfully round-trips through decryption\n# with various parameters.\nEncrypt = RSA-2048\nInput = \"Hello World\"\nCheckDecrypt\n\nEncrypt = RSA-2048\nRSAPadding = OAEP\nInput = \"Hello World\"\nCheckDecrypt\n\nEncrypt = RSA-2048\nRSAPadding = OAEP\nOAEPDigest = SHA512\nOAEPLabel = 00112233445566778899aabbccddeeff\nInput = \"Hello World\"\nCheckDecrypt\n\n\n# EC tests\n\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\n\nVerify = P-256-SPKI\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\n\n# Digest too long\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF12345\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83",
-    "a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Digest too short\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF123\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Digest invalid\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1235\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Invalid signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec7\nError = BAD_SIGNATURE\n\n# Garbage after signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec800\nError = BAD_SIGNATURE\n\n# BER signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3080022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec80000\nError = BAD_SIGNATURE\n\n\n# Additional RSA-PSS and RSA-OAEP tests converted from\n# ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip\n\nPublicKey = RSA-PSS-1\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a21370203010001\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = cd8b6538cb8e8de566b68bd067569dbf1ee2718e\nOutput = 9074308fb598e9701b2294388e52f971faac2b60a5145af185df5287b5ed2887e57ce7fd44dc8634e407c8e0e4360bc226f3ec227f9d9e54638e8d31f5051215df6ebb9c2f9579aa77598a38f914b5b9c1bd83c4e2f9f382a0d0aa3542ffee65984a601bc69eb28deb27dca12c82c2d4c3f66cd500f1ff2b994d8a4e30cbb33c\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e35befc17a1d160b9ce35fbd8eb16e7ee491d3fd\nOutput = 3ef7f46e831bf92b32274142a585ffcefbdca7b32ae90d10fb0f0c729984f04ef29a9df0780775ce43739b97838390db0a5505e63de927028d9d29b219ca2c4517832558a55d694a6d25b9dab66003c4cccd907802193be5170d26147d37b93590241be51c25055f47ef62752cfbe21418fafe98c22c4d4d47724fdb5669e843\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0652ec67bcee30f9d2699122b91c19abdba89f91\nOutput = 666026fba71bd3e7cf13157cc2c51a8e4aa684af9778f91849f34335d141c00154c4197621f9624a675b5abc22ee7d5baaffaae1c9baca2cc373b3f33e78e6143c395a91aa7faca664eb733afd14d8827259d99a7550faca501ef2b04e33c23aa51f4b9e8282efdb728cc0ab09405a91607c6369961bc8270d2d4f39fce612b1\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 39c21c4cceda9c1adf839c744e1212a6437575ec\nOutput = 4609793b23e9d09362dc21bb47da0b4f3a7622649a47d464019b9aeafe53359c178c91cd58ba6bcb78be0346a7bc637f4b873d4bab38ee661f199634c547a1ad8442e03da015b136e543f7ab07c0c13e4225b8de8cce25d4f6eb8400f81f7e1833b7ee6e334d370964ca79fdb872b4d75223b5eeb08101591fb532d155a6de87\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 36dae913b77bd17cae6e7b09453d24544cebb33c\nOutput = 1d2aad221ca4d31ddf13509239019398e3d14b32dc34dc5af4aeaea3c095af73479cf0a45e5629635a53a018377615b16cb9b13b3e09d671eb71e387b8545c5960da5a64776e768e82b2c93583bf104c3fdb23512b7b4e89f633dd0063a530db4524b01c3f384c09310e315a79dcd3d684022a7f31c865a664e316978b759fad\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 45eef191f4f79c31fe5d2ede7e5098994e929d2d\nOutput = 2a34f6125e1f6b0bf971e84fbd41c632be8f2c2ace7de8b6926e31ff93e9af987fbc06e51e9be14f5198f91f3f953bd67da60a9df59764c3dc0fe08e1cbef0b75f868d10ad3fba749fef59fb6dac46a0d6e504369331586f58e4628f39aa278982543bc0eeb537dc61958019b394fb273f215858a0a01ac4d650b955c67f4c58\n\nPublicKey = RSA-PSS-2\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818101d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c90203010001\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 5c81a3e2a658246628cd0ee8b00bb4c012bc9739\nOutput = 014c5ba5338328ccc6e7a90bf1c0ab3fd606ff4796d3c12e4b639ed9136a5fec6c16d8884bdd99cfdc521456b0742b736868cf90de099adb8d5ffd1deff39ba4007ab746cefdb22d7df0e225f54627dc65466131721b90af445363a8358b9f607642f78fab0ab0f43b7168d64bae70d8827848d8ef1e421c5754ddf42c2589b5b3\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 27f71611446aa6eabf037f7dedeede3203244991\nOutput = 010991656cca182b7f29d2dbc007e7ae0fec158eb6759cb9c45c5ff87c7635dd46d150882f4de1e9ae65e7f7d9018f6836954a47c0a81a8a6b6f83f2944d6081b1aa7c759b254b2c34b691da67cc0226e20b2f18b42212761dcd4b908a62b371b5918c5742af4b537e296917674fb914194761621cc19a41f6fb953fbcbb649dea\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 03ecc2c33e93f05fc7224fcc0d461356cb897217\nOutput = 007f0030018f53cdc71f23d03659fde54d4241f758a750b42f185f87578520c30742afd84359b6e6e8d3ed959dc6fe486bedc8e2cf001f63a7abe16256a1b84df0d249fc05d3194ce5f0912742dbbf80dd174f6c51f6bad7f16cf3364eba095a06267dc3793803ac7526aebe0a475d38b8c2247ab51c4898df7047dc6adf52c6c4\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 246c727b4b9494849dddb068d582e179ac20999c\nOutput = 009cd2f4edbe23e12346ae8c76dd9ad3230a62076141f16c152ba18513a48ef6f010e0e37fd3df10a1ec629a0cb5a3b5d2893007298c30936a95903b6ba85555d9ec3673a06108fd62a2fda56d1ce2e85c4db6b24a81ca3b496c36d4fd06eb7c9166d8e94877c42bea622b3bfe9251fdc21d8d5371badad78a488214796335b40b\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e8617ca3ea66ce6a58ede2d11af8c3ba8a6ba912\nOutput = 00ec430824931ebd3baa43034dae98ba646b8c36013d1671c3cf1cf8260c374b19f8e1cc8d965012405e7e9bf7378612dfcc85fce12cda11f950bd0ba8876740436c1d2595a64a1b32efcfb74a21c873b3cc33aaf4e3dc3953de67f0674c0453b4fd9f604406d441b816098cb106fe3472bc251f815f59db2e4378a3addc181ecf\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7a6fdc1a4e434ecbc35d657ad49a2f4fafd43bc8\nOutput = 00475b1648f814a8dc0abdc37b5527f543b666bb6e39d30e5b49d3b876dccc58eac14e32a2d55c2616014456ad2f246fc8e3d560da3ddf379a1c0bd200f10221df078c219a151bc8d4ec9d2fc2564467811014ef15d8ea01c2ebbff8c2c8efab38096e55fcbe3285c7aa558851254faffa92c1c72b78758663ef4582843139d7a6\n\nPublicKey = RSA-PSS-3\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818102f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a4430203010001\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3552be69dd74bdc56d2cf8c38ef7bafe269040fe\nOutput = 0088b135fb1794b6b96c4a3e678197f8cac52b64b2fe907d6f27de761124964a99a01a882740ecfaed6c01a47464bb05182313c01338a8cd097214cd68ca103bd57d3bc9e816213e61d784f182467abf8a01cf253e99a156eaa8e3e1f90e3c6e4e3aa2d83ed0345b89fafc9c26077c14b6ac51454fa26e446e3a2f153b2b16797f\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 609143ff7240e55c062aba8b9e4426a781919bc9\nOutput = 02a5f0a858a0864a4f65017a7d69454f3f973a2999839b7bbc48bf78641169179556f595fa41f6ff18e286c2783079bc0910ee9cc34f49ba681124f923dfa88f426141a368a5f5a930c628c2c3c200e18a7644721a0cbec6dd3f6279bde3e8f2be5e2d4ee56f97e7ceaf33054be7042bd91a63bb09f897bd41e81197dee99b11af\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0afd22f879a9cda7c584f4135f8f1c961db114c0\nOutput = 0244bcd1c8c16955736c803be401272e18cb990811b14f72db964124d5fa760649cbb57afb8755dbb62bf51f466cf23a0a1607576e983d778fceffa92df7548aea8ea4ecad2c29dd9f95bc07fe91ecf8bee255bfe8762fd7690aa9bfa4fa0849ef728c2c42c4532364522df2ab7f9f8a03b63f7a499175828668f5ef5a29e3802c\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 405dd5",
-    "6d395ef0f01b555c48f748cc32b210650b\nOutput = 0196f12a005b98129c8df13c4cb16f8aa887d3c40d96df3a88e7532ef39cd992f273abc370bc1be6f097cfebbf0118fd9ef4b927155f3df22b904d90702d1f7ba7a52bed8b8942f412cd7bd676c9d18e170391dcd345c06a730964b3f30bcce0bb20ba106f9ab0eeb39cf8a6607f75c0347f0af79f16afa081d2c92d1ee6f836b8\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = a2c313b0440c8a0c47233b87f0a160c61af3eae7\nOutput = 021eca3ab4892264ec22411a752d92221076d4e01c0e6f0dde9afd26ba5acf6d739ef987545d16683e5674c9e70f1de649d7e61d48d0caeb4fb4d8b24fba84a6e3108fee7d0705973266ac524b4ad280f7ae17dc59d96d3351586b5a3bdb895d1e1f7820ac6135d8753480998382ba32b7349559608c38745290a85ef4e9f9bd83\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f1bf6ca7b4bbdbb6bf20a4bf55728725d177154a\nOutput = 012fafec862f56e9e92f60ab0c77824f4299a0ca734ed26e0644d5d222c7f0bde03964f8e70a5cb65ed44e44d56ae0edf1ff86ca032cc5dd4404dbb76ab854586c44eed8336d08d457ce6c03693b45c0f1efef93624b95b8ec169c616d20e5538ebc0b6737a6f82b4bc0570924fc6b35759a3348426279f8b3d7744e2d222426ce\n\nPublicKey = RSA-PSS-4\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c37050203010001\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f8b0abf70fec0bca74f0accbc24f75e6e90d3bfd\nOutput = 0323d5b7bf20ba4539289ae452ae4297080feff4518423ff4811a817837e7d82f1836cdfab54514ff0887bddeebf40bf99b047abc3ecfa6a37a3ef00f4a0c4a88aae0904b745c846c4107e8797723e8ac810d9e3d95dfa30ff4966f4d75d13768d20857f2b1406f264cfe75e27d7652f4b5ed3575f28a702f8c4ed9cf9b2d44948\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 04a10944bfe11ab801e77889f3fd3d7f4ff0b629\nOutput = 049d0185845a264d28feb1e69edaec090609e8e46d93abb38371ce51f4aa65a599bdaaa81d24fba66a08a116cb644f3f1e653d95c89db8bbd5daac2709c8984000178410a7c6aa8667ddc38c741f710ec8665aa9052be929d4e3b16782c1662114c5414bb0353455c392fc28f3db59054b5f365c49e1d156f876ee10cb4fd70598\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ba01243db223eb97fb86d746c3148adaaa0ca344\nOutput = 03fbc410a2ced59500fb99f9e2af2781ada74e13145624602782e2994813eefca0519ecd253b855fb626a90d771eae028b0c47a199cbd9f8e3269734af4163599090713a3fa910fa0960652721432b971036a7181a2bc0cab43b0b598bc6217461d7db305ff7e954c5b5bb231c39e791af6bcfa76b147b081321f72641482a2aad\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 934bb0d38d6836daec9de82a9648d4593da67cd2\nOutput = 0486644bc66bf75d28335a6179b10851f43f09bded9fac1af33252bb9953ba4298cd6466b27539a70adaa3f89b3db3c74ab635d122f4ee7ce557a61e59b82ffb786630e5f9db53c77d9a0c12fab5958d4c2ce7daa807cd89ba2cc7fcd02ff470ca67b229fcce814c852c73cc93bea35be68459ce478e9d4655d121c8472f371d4f\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ec35d81abd1cceac425a935758b683465c8bd879\nOutput = 022a80045353904cb30cbb542d7d4990421a6eec16a8029a8422adfd22d6aff8c4cc0294af110a0c067ec86a7d364134459bb1ae8ff836d5a8a2579840996b320b19f13a13fad378d931a65625dae2739f0c53670b35d9d3cbac08e733e4ec2b83af4b9196d63e7c4ff1ddeae2a122791a125bfea8deb0de8ccf1f4ffaf6e6fb0a\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 72ce251d17b04dd3970d6ff1fbe3624899e9e941\nOutput = 00938dcb6d583046065f69c78da7a1f1757066a7fa75125a9d2929f0b79a60b627b082f11f5b196f28eb9daa6f21c05e5140f6aef1737d2023075c05ecf04a028c686a2ab3e7d5a0664f295ce12995e890908b6ad21f0839eb65b70393a7b5afd9871de0caa0cedec5b819626756209d13ab1e7bb9546a26ff37e9a51af9fd562e\n\nPublicKey = RSA-PSS-5\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d003081890281810d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc5070203010001\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = d98b7061943510bc3dd9162f7169aabdbdcd0222\nOutput = 0ba373f76e0921b70a8fbfe622f0bf77b28a3db98e361051c3d7cb92ad0452915a4de9c01722f6823eeb6adf7e0ca8290f5de3e549890ac2a3c5950ab217ba58590894952de96f8df111b2575215da6c161590c745be612476ee578ed384ab33e3ece97481a252f5c79a98b5532ae00cdd62f2ecc0cd1baefe80d80b962193ec1d\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7ae8e699f754988f4fd645e463302e49a2552072\nOutput = 08180de825e4b8b014a32da8ba761555921204f2f90d5f24b712908ff84f3e220ad17997c0dd6e706630ba3e84add4d5e7ab004e58074b549709565d43ad9e97b5a7a1a29e85b9f90f4aafcdf58321de8c5974ef9abf2d526f33c0f2f82e95d158ea6b81f1736db8d1af3d6ac6a83b32d18bae0ff1b2fe27de4c76ed8c7980a34e\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 8d46c7c05534c1ba2cc7624500d48a4531604bff\nOutput = 05e0fdbdf6f756ef733185ccfa8ced2eb6d029d9d56e35561b5db8e70257ee6fd019d2f0bbf669fe9b9821e78df6d41e31608d58280f318ee34f559941c8df13287574bac000b7e58dc4f414ba49fb127f9d0f8936638c76e85356c994f79750f7fa3cf4fd482df75e3fb9978cd061f7abb17572e6e63e0bde12cbdcf18c68b979\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ee3de96783fd0a157c8b20bf5566124124dcfe65\nOutput = 0bc989853bc2ea86873271ce183a923ab65e8a53100e6df5d87a24c4194eb797813ee2a187c097dd872d591da60c568605dd7e742d5af4e33b11678ccb63903204a3d080b0902c89aba8868f009c0f1c0cb85810bbdd29121abb8471ff2d39e49fd92d56c655c8e037ad18fafbdc92c95863f7f61ea9efa28fea401369d19daea1\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 1204df0b03c2724e2709c23fc71789a21b00ae4c\nOutput = 0aefa943b698b9609edf898ad22744ac28dc239497cea369cbbd84f65c95c0ad776b594740164b59a739c6ff7c2f07c7c077a86d95238fe51e1fcf33574a4ae0684b42a3f6bf677d91820ca89874467b2c23add77969c80717430d0efc1d3695892ce855cb7f7011630f4df26def8ddf36fc23905f57fa6243a485c770d5681fcd\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 29926bc3280c841f601acd0d6f17ea38023eddbc\nOutput = 02802dccfa8dfaf5279bf0b4a29ba1b157611faeaaf419b8919d15941900c1339e7e92e6fae562c53e6cc8e84104b110bce03ad18525e3c49a0eadad5d3f28f244a8ed89edbafbb686277cfa8ae909714d6b28f4bf8e293aa04c41efe7c0a81266d5c061e2575be032aa464674ff71626219bd74cc45f0e7ed4e3ff96eee758e8f\n\nPublicKey = RSA-PSS-6\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d10203010001\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ab464e8cb65ae5fdea47a53fa84b234d6bfd52f6\nOutput = 04c0cfacec04e5badbece159a5a1103f69b3f32ba593cb4cc4b1b7ab455916a96a27cd2678ea0f46ba37f7fc9c86325f29733b389f1d97f43e7201c0f348fc45fe42892335362eee018b5b161f2f9393031225c713012a576bc88e23052489868d9010cbf033ecc568e8bc152bdc59d560e41291915d28565208e22aeec9ef85d1\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 92d0bcae82b641f578f040f5151be8eda6d42299\nOutput = 0a2314250cf52b6e4e908de5b35646bcaa24361da8160fb0f9257590ab3ace42b0dc3e77ad2db7c203a20bd952fbb56b1567046ecfaa933d7b1000c3de9ff05b7d989ba46fd43bc4c2d0a3986b7ffa13471d37eb5b47d64707bd290cfd6a9f393ad08ec1e3bd71bb5792615035cdaf2d8929aed3be098379377e777ce79aaa4773\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3569bd8fd2e28f2443375efa94f186f6911ffc2b\nOutput = 086df6b500098c120f24ff8423f727d9c61a5c9007d3b6a31ce7cf8f3cbec1a26bb20e2bd4a046793299e03e37a21b40194fb045f90b18bf20a47992ccd799cf9c059c299c0526854954aade8a6ad9d97ec91a1145383f42468b231f4d72f23706d9853c3fa43ce8ace8bfe7484987a1ec6a16c8daf81f7c8bf42774707a9df456\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7abbb7b42de335730a0b641f1e314b6950b84f98\nOutput = 0b5b11ad549863ffa9c51a14a1106c2a72cc8b646e5c7262509786105a984776534ca9b54c1cc64bf2d5a44fd7e8a69db699d5ea52087a4748fd2abc1afed1e5d6f7c89025530bdaa2213d7e030fa55df6f34bcf1ce46d2edf4e3ae4f3b01891a068c9e3a44bbc43133edad6ecb9f35400c4252a5762d65744b99cb9f4c559329f\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 55b7eb27be7a787a59eb7e5fac468",
-    "db8917a7725\nOutput = 02d71fa9b53e4654fefb7f08385cf6b0ae3a817942ebf66c35ac67f0b069952a3ce9c7e1f1b02e480a9500836de5d64cdb7ecde04542f7a79988787e24c2ba05f5fd482c023ed5c30e04839dc44bed2a3a3a4fee01113c891a47d32eb8025c28cb050b5cdb576c70fe76ef523405c08417faf350b037a43c379339fcb18d3a356b\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = de2fa0367ef49083ff89b9905d3fd646fcc12c38\nOutput = 0a40a16e2fe2b38d1df90546167cf9469c9e3c3681a3442b4b2c2f581deb385ce99fc6188bb02a841d56e76d301891e24560550fcc2a26b55f4ccb26d837d350a154bcaca8392d98fa67959e9727b78cad03269f56968fc56b68bd679926d83cc9cb215550645ccda31c760ff35888943d2d8a1d351e81e5d07b86182e751081ef\n\nPublicKey = RSA-PSS-7\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818137c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab30203010001\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 8be4afbdd76bd8d142c5f4f46dba771ee5d6d29d\nOutput = 187f390723c8902591f0154bae6d4ecbffe067f0e8b795476ea4f4d51ccc810520bb3ca9bca7d0b1f2ea8a17d873fa27570acd642e3808561cb9e975ccfd80b23dc5771cdb3306a5f23159dacbd3aa2db93d46d766e09ed15d900ad897a8d274dc26b47e994a27e97e2268a766533ae4b5e42a2fcaf755c1c4794b294c60555823\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 402140dc605b2f5c5ec0d15bce9f9ba8857fe117\nOutput = 10fd89768a60a67788abb5856a787c8561f3edcf9a83e898f7dc87ab8cce79429b43e56906941a886194f137e591fe7c339555361fbbe1f24feb2d4bcdb80601f3096bc9132deea60ae13082f44f9ad41cd628936a4d51176e42fc59cb76db815ce5ab4db99a104aafea68f5d330329ebf258d4ede16064bd1d00393d5e1570eb8\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3e885205892ff2b6b37c2c4eb486c4bf2f9e7f20\nOutput = 2b31fde99859b977aa09586d8e274662b25a2a640640b457f594051cb1e7f7a911865455242926cf88fe80dfa3a75ba9689844a11e634a82b075afbd69c12a0df9d25f84ad4945df3dc8fe90c3cefdf26e95f0534304b5bdba20d3e5640a2ebfb898aac35ae40f26fce5563c2f9f24f3042af76f3c7072d687bbfb959a88460af1\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 1fc2201d0c442a4736cd8b2cd00c959c47a3bf42\nOutput = 32c7ca38ff26949a15000c4ba04b2b13b35a3810e568184d7ecabaa166b7ffabddf2b6cf4ba07124923790f2e5b1a5be040aea36fe132ec130e1f10567982d17ac3e89b8d26c3094034e762d2e031264f01170beecb3d1439e05846f25458367a7d9c02060444672671e64e877864559ca19b2074d588a281b5804d23772fbbe19\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e4351b66819e5a31501f89acc7faf57030e9aac5\nOutput = 07eb651d75f1b52bc263b2e198336e99fbebc4f332049a922a10815607ee2d989db3a4495b7dccd38f58a211fb7e193171a3d891132437ebca44f318b280509e52b5fa98fcce8205d9697c8ee4b7ff59d4c59c79038a1970bd2a0d451ecdc5ef11d9979c9d35f8c70a6163717607890d586a7c6dc01c79f86a8f28e85235f8c2f1\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 49f6cc58365e514e1a3f301f4de16f9fb5347ff2\nOutput = 18da3cdcfe79bfb77fd9c32f377ad399146f0a8e810620233271a6e3ed3248903f5cdc92dc79b55d3e11615aa056a795853792a3998c349ca5c457e8ca7d29d796aa24f83491709befcfb1510ea513c92829a3f00b104f655634f320752e130ec0ccf6754ff893db302932bb025eb60e87822598fc619e0e981737a9a4c4152d33\n\nPublicKey = RSA-PSS-8\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f0203010001\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = a1dd230d8ead860199b6277c2ecfe3d95f6d9160\nOutput = 0262ac254bfa77f3c1aca22c5179f8f040422b3c5bafd40a8f21cf0fa5a667ccd5993d42dbafb409c520e25fce2b1ee1e716577f1efa17f3da28052f40f0419b23106d7845aaf01125b698e7a4dfe92d3967bb00c4d0d35ba3552ab9a8b3eef07c7fecdbc5424ac4db1e20cb37d0b2744769940ea907e17fbbca673b20522380c5\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f6e68e53c602c5c65fa67b5aa6d786e5524b12ab\nOutput = 2707b9ad5115c58c94e932e8ec0a280f56339e44a1b58d4ddcff2f312e5f34dcfe39e89c6a94dcee86dbbdae5b79ba4e0819a9e7bfd9d982e7ee6c86ee68396e8b3a14c9c8f34b178eb741f9d3f121109bf5c8172fada2e768f9ea1433032c004a8aa07eb990000a48dc94c8bac8aabe2b09b1aa46c0a2aa0e12f63fbba775ba7e\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = d6f9fcd3ae27f32bb2c7c93536782eba52af1f76\nOutput = 2ad20509d78cf26d1b6c406146086e4b0c91a91c2bd164c87b966b8faa42aa0ca446022323ba4b1a1b89706d7f4c3be57d7b69702d168ab5955ee290356b8c4a29ed467d547ec23cbadf286ccb5863c6679da467fc9324a151c7ec55aac6db4084f82726825cfe1aa421bc64049fb42f23148f9c25b2dc300437c38d428aa75f96\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7ff2a53ce2e2d900d468e498f230a5f5dd0020de\nOutput = 1e24e6e58628e5175044a9eb6d837d48af1260b0520e87327de7897ee4d5b9f0df0be3e09ed4dea8c1454ff3423bb08e1793245a9df8bf6ab3968c8eddc3b5328571c77f091cc578576912dfebd164b9de5454fe0be1c1f6385b328360ce67ec7a05f6e30eb45c17c48ac70041d2cab67f0a2ae7aafdcc8d245ea3442a6300ccc7\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 4eb309f7022ba0b03bb78601b12931ec7c1be8d3\nOutput = 33341ba3576a130a50e2a5cf8679224388d5693f5accc235ac95add68e5eb1eec31666d0ca7a1cda6f70a1aa762c05752a51950cdb8af3c5379f18cfe6b5bc55a4648226a15e912ef19ad77adeea911d67cfefd69ba43fa4119135ff642117ba985a7e0100325e9519f1ca6a9216bda055b5785015291125e90dcd07a2ca9673ee\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 65033bc2f67d6aba7d526acb873b8d9241e5e4d9\nOutput = 1ed1d848fb1edb44129bd9b354795af97a069a7a00d0151048593e0c72c3517ff9ff2a41d0cb5a0ac860d736a199704f7cb6a53986a88bbd8abcc0076a2ce847880031525d449da2ac78356374c536e343faa7cba42a5aaa6506087791c06a8e989335aed19bfab2d5e67e27fb0c2875af896c21b6e8e7309d04e4f6727e69463e\n\nPublicKey = RSA-PSS-9\nType = RSA\nInput = 3081df300d06092a864886f70d01010105000381cd003081c90281c100e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b0203010001\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 2715a49b8b0012cd7aee84c116446e6dfe3faec0\nOutput = 586107226c3ce013a7c8f04d1a6a2959bb4b8e205ba43a27b50f124111bc35ef589b039f5932187cb696d7d9a32c0c38300a5cdda4834b62d2eb240af33f79d13dfbf095bf599e0d9686948c1964747b67e89c9aba5cd85016236f566cc5802cb13ead51bc7ca6bef3b94dcbdbb1d570469771df0e00b1a8a06777472d2316279edae86474668d4e1efff95f1de61c6020da32ae92bbf16520fef3cf4d88f61121f24bbd9fe91b59caf1235b2a93ff81fc403addf4ebdea84934a9cdaf8e1a9e\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 2dac956d53964748ac364d06595827c6b4f143cd\nOutput = 80b6d643255209f0a456763897ac9ed259d459b49c2887e5882ecb4434cfd66dd7e1699375381e51cd7f554f2c271704b399d42b4be2540a0eca61951f55267f7c2878c122842dadb28b01bd5f8c025f7e228418a673c03d6bc0c736d0a29546bd67f786d9d692ccea778d71d98c2063b7a71092187a4d35af108111d83e83eae46c46aa34277e06044589903788f1d5e7cee25fb485e92949118814d6f2c3ee361489016f327fb5bc517eb50470bffa1afa5f4ce9aa0ce5b8ee19bf5501b958\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 28d98c46cccafbd3bc04e72f967a54bd3ea12298\nOutput = 484408f3898cd5f53483f80819efbf2708c34d27a8b2a6fae8b322f9240237f981817aca1846f1084daa6d7c0795f6e5bf1af59c38e1858437ce1f7ec419b98c8736adf6dd9a00b1806d2bd3ad0a73775e05f52dfef3a59ab4b08143f0df05cd1ad9d04bececa6daa4a2129803e200cbc77787caf4c1d0663a6c5987b605952019782caf2ec1426d68fb94ed1d4be816a7ed081b77e6ab330b3ffc073820fecde3727fcbe295ee61a050a343658637c3fd659cfb63736de32d9f90d3c2f63eca\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0866d2ff5a79f25ef668cd6f31b42dee421e4c0e\nOutput = 84ebeb481be59845b46468bafb471c0112e02b235d84b5d911cbd1926ee5074ae0424495cb20e82308b8ebb65f419a03fb40e72b78981d88aad143053685172c97b29c8b7bf0ae73b5b2263c403da0ed2f80ff7450af7828eb8b86f0028bd2a8b176a4d228cccea18394f238b09ff758cc00bc0430115235",
-    "5742f282b54e663a919e709d8da24ade5500a7b9aa50226e0ca52923e6c2d860ec50ff480fa57477e82b0565f4379f79c772d5c2da80af9fbf325ece6fc20b00961614bee89a183e\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 6a5b4be4cd36cc97dfde9995efbf8f097a4a991a\nOutput = 82102df8cb91e7179919a04d26d335d64fbc2f872c44833943241de8454810274cdf3db5f42d423db152af7135f701420e39b494a67cbfd19f9119da233a23da5c6439b5ba0d2bc373eee3507001378d4a4073856b7fe2aba0b5ee93b27f4afec7d4d120921c83f606765b02c19e4d6a1a3b95fa4c422951be4f52131077ef17179729cddfbdb56950dbaceefe78cb16640a099ea56d24389eef10f8fecb31ba3ea3b227c0a86698bb89e3e9363905bf22777b2a3aa521b65b4cef76d83bde4c\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = b9dfd1df76a461c51e6576c6c8ed0a923d1c50e7\nOutput = a7fdb0d259165ca2c88d00bbf1028a867d337699d061193b17a9648e14ccbbaadeacaacdec815e7571294ebb8a117af205fa078b47b0712c199e3ad05135c504c24b81705115740802487992ffd511d4afc6b854491eb3f0dd523139542ff15c3101ee85543517c6a3c79417c67e2dd9aa741e9a29b06dcb593c2336b3670ae3afbac7c3e76e215473e866e338ca244de00b62624d6b9426822ceae9f8cc460895f41250073fd45c5a1e7b425c204a423a699159f6903e710b37a7bb2bc8049f\n\nPublicKey = RSA-PSS-10\nType = RSA\nInput = 30820122300d06092a864886f70d01010105000382010f003082010a0282010100a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae050203010001\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 9596bb630cf6a8d4ea4600422b9eba8b13675dd4\nOutput = 82c2b160093b8aa3c0f7522b19f87354066c77847abf2a9fce542d0e84e920c5afb49ffdfdace16560ee94a1369601148ebad7a0e151cf16331791a5727d05f21e74e7eb811440206935d744765a15e79f015cb66c532c87a6a05961c8bfad741a9a6657022894393e7223739796c02a77455d0f555b0ec01ddf259b6207fd0fd57614cef1a5573baaff4ec00069951659b85f24300a25160ca8522dc6e6727e57d019d7e63629b8fe5e89e25cc15beb3a647577559299280b9b28f79b0409000be25bbd96408ba3b43cc486184dd1c8e62553fa1af4040f60663de7f5e49c04388e257f1ce89c95dab48a315d9b66b1b7628233876ff2385230d070d07e1666\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = b503319399277fd6c1c8f1033cbf04199ea21716\nOutput = 14ae35d9dd06ba92f7f3b897978aed7cd4bf5ff0b585a40bd46ce1b42cd2703053bb9044d64e813d8f96db2dd7007d10118f6f8f8496097ad75e1ff692341b2892ad55a633a1c55e7f0a0ad59a0e203a5b8278aec54dd8622e2831d87174f8caff43ee6c46445345d84a59659bfb92ecd4c818668695f34706f66828a89959637f2bf3e3251c24bdba4d4b7649da0022218b119c84e79a6527ec5b8a5f861c159952e23ec05e1e717346faefe8b1686825bd2b262fb2531066c0de09acde2e4231690728b5d85e115a2f6b92b79c25abc9bd9399ff8bcf825a52ea1f56ea76dd26f43baafa18bfa92a504cbd35699e26d1dcc5a2887385f3c63232f06f3244c3\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 50aaede8536b2c307208b275a67ae2df196c7628\nOutput = 6e3e4d7b6b15d2fb46013b8900aa5bbb3939cf2c095717987042026ee62c74c54cffd5d7d57efbbf950a0f5c574fa09d3fc1c9f513b05b4ff50dd8df7edfa20102854c35e592180119a70ce5b085182aa02d9ea2aa90d1df03f2daae885ba2f5d05afdac97476f06b93b5bc94a1a80aa9116c4d615f333b098892b25fface266f5db5a5a3bcc10a824ed55aad35b727834fb8c07da28fcf416a5d9b2224f1f8b442b36f91e456fdea2d7cfe3367268de0307a4c74e924159ed33393d5e0655531c77327b89821bdedf880161c78cd4196b5419f7acc3f13e5ebf161b6e7c6724716ca33b85c2e25640192ac2859651d50bde7eb976e51cec828b98b6563b86bb\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = aa0b72b8b371ddd10c8ae474425ccccf8842a294\nOutput = 34047ff96c4dc0dc90b2d4ff59a1a361a4754b255d2ee0af7d8bf87c9bc9e7ddeede33934c63ca1c0e3d262cb145ef932a1f2c0a997aa6a34f8eaee7477d82ccf09095a6b8acad38d4eec9fb7eab7ad02da1d11d8e54c1825e55bf58c2a23234b902be124f9e9038a8f68fa45dab72f66e0945bf1d8bacc9044c6f07098c9fcec58a3aab100c805178155f030a124c450e5acbda47d0e4f10b80a23f803e774d023b0015c20b9f9bbe7c91296338d5ecb471cafb032007b67a60be5f69504a9f01abb3cb467b260e2bce860be8d95bf92c0c8e1496ed1e528593a4abb6df462dde8a0968dffe4683116857a232f5ebf6c85be238745ad0f38f767a5fdbf486fb\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = fad3902c9750622a2bc672622c48270cc57d3ea8\nOutput = 7e0935ea18f4d6c1d17ce82eb2b3836c55b384589ce19dfe743363ac9948d1f346b7bfddfe92efd78adb21faefc89ade42b10f374003fe122e67429a1cb8cbd1f8d9014564c44d120116f4990f1a6e38774c194bd1b8213286b077b0499d2e7b3f434ab12289c556684deed78131934bb3dd6537236f7c6f3dcb09d476be07721e37e1ceed9b2f7b406887bd53157305e1c8b4f84d733bc1e186fe06cc59b6edb8f4bd7ffefdf4f7ba9cfb9d570689b5a1a4109a746a690893db3799255a0cb9215d2d1cd490590e952e8c8786aa0011265252470c041dfbc3eec7c3cbf71c24869d115c0cb4a956f56d530b80ab589acfefc690751ddf36e8d383f83cedd2cc\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 122196deb5d122bd8c6fc781ff6924d7c695aade\nOutput = 6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f\n\nPrivateKey = RSA-OAEP-1\nType = RSA\nInput = 30820276020100300d06092a864886f70d0101010500048202603082025c02010002818100a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb020301000102818053339cfdb79fc8466a655c7316aca85c55fd8f6dd898fdaf119517ef4f52e8fd8e258df93fee180fa0e4ab29693cd83b152a553d4ac4d1812b8b9fa5af0e7f55fe7304df41570926f3311f15c4d65a732c483116ee3d3d2d0af3549ad9bf7cbfb78ad884f84d5beb04724dc7369b31def37d0cf539e9cfcdd3de653729ead5d1024100d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d024100cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d7702400e12bf1718e9cef5599ba1c3882fe8046a90874eefce8f2ccc20e4f2741fb0a33a3848aec9c9305fbecbd2d76819967d4671acc6431e4037968db37878e695c102410095297b0f95a2fa67d00707d609dfd4fc05c89dafc2ef6d6ea55bec771ea333734d9251e79082ecda866efef13c459e1a631386b7e354c899f5f112ca85d7158302404f456c502493bdc0ed2ab756a3a6ed4d67352a697d4216e93212b127a63d5411ce6fa98d5dbefd73263e3728142743818166ed7dd63687dd2a8ca1d2f4fbd8e1\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 354fe67b4a126d5d35fe36c777791a3f7ba13def484e2d3908aff722fad468fb21696de95d0be911c2d3174f8afcc201035f7b6d8e69402de5451618c21a535fa9d7bfc5b8dd9fc243f8cf927db31322d6e881eaa91a996170e657a05a266426d98c88003f8477c1227094a0d9fa1e8c4024309ce1ecccb5210035d47ac72e8a\nOutput = 6628194e12073db03ba94cda9ef9532397d50dba79b987004afefe34\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 640db1acc58e0568fe5407e5f9b701dff8c3c91e716c536fc7fcec6cb5b71c1165988d4a279e1577d730fc7a29932e3f00c81515236d8d8e31017a7a09df4352d904cdeb79aa583adcc31ea698a4c05283daba9089be5491f67c1a4ee48dc74bbbe6643aef846679b4cb395a352d5ed115912df696ffe0702932946d71492b44\nOutput = 750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 423736ed035f6026af276c35c0b3741b365e5f76ca091b4e8c29e2f0befee603595aa8322d602d2e625e95eb81b2f1c9724e822eca76db8618cf09c5343503a4360835b5903bc637e3879fb05e0ef32685d5aec5067cd7cc96fe4b2670b6eac3066b1fcf5686b68589aafb7d629b02d8f8625ca3833624d4800fb081b1cf94eb\nOutput = d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 45ead4ca551e662c9800f1aca8283b0525e6abae30be4b4aba762fa40",
-    "fd3d38e22abefc69794f6ebbbc05ddbb11216247d2f412fd0fba87c6e3acd888813646fd0e48e785204f9c3f73d6d8239562722dddd8771fec48b83a31ee6f592c4cfd4bc88174f3b13a112aae3b9f7b80e0fc6f7255ba880dc7d8021e22ad6a85f0755\nOutput = 52e650d98e7f2a048b4f86852153b97e01dd316f346a19f67a85\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 36f6e34d94a8d34daacba33a2139d00ad85a9345a86051e73071620056b920e219005855a213a0f23897cdcd731b45257c777fe908202befdd0b58386b1244ea0cf539a05d5d10329da44e13030fd760dcd644cfef2094d1910d3f433e1c7c6dd18bc1f2df7f643d662fb9dd37ead9059190f4fa66ca39e869c4eb449cbdc439\nOutput = 8da89fd9e5f974a29feffb462b49180f6cf9e802\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 42cee2617b1ecea4db3f4829386fbd61dafbf038e180d837c96366df24c097b4ab0fac6bdf590d821c9f10642e681ad05b8d78b378c0f46ce2fad63f74e0ad3df06b075d7eb5f5636f8d403b9059ca761b5c62bb52aa45002ea70baace08ded243b9d8cbd62a68ade265832b56564e43a6fa42ed199a099769742df1539e8255\nOutput = 26521050844271\n\nPrivateKey = RSA-OAEP-2\nType = RSA\nInput = 30820276020100300d06092a864886f70d0101010500048202603082025c02010002818101947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f4502030100010281800823f20fadb5da89088a9d00893e21fa4a1b11fbc93c64a3be0baaea97fb3b93c3ff713704c19c963c1d107aae99054739f79e02e186de86f87a6ddefea6d8ccd1d3c81a47bfa7255be20601a4a4b2f08a167b5e279d715b1b455bdd7eab245941d9768b9acefb3ccda5952da3cee72525b4501663a8ee15c9e992d92462fe3902410159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a430241012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd70240436ef508de736519c2da4c580d98c82cb7452a3fb5efadc3b9c7789a1bc6584f795addbbd32439c74686552ecb6c2c307a4d3af7f539eec157248c7b31f1a2550241012b15a89f3dfb2b39073e73f02bdd0c1a7b379dd435f05cdde2eff9e462948b7cec62ee9050d5e0816e0785a856b49108dcb75f3683874d1ca6329a19013066ff02400270db17d5914b018d76118b24389a7350ec836b0063a21721236fd8edb6d89b51e7eeb87b611b7132cb7ea7356c23151c1e7751507c786d9ee1794170a8c8e8\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0181af8922b9fcb4d79d92ebe19815992fc0c1439d8bcd491398a0f4ad3a329a5bd9385560db532683c8b7da04e4b12aed6aacdf471c34c9cda891addcc2df3456653aa6382e9ae59b54455257eb099d562bbe10453f2b6d13c59c02e10f1f8abb5da0d0570932dacf2d0901db729d0fefcc054e70968ea540c81b04bcaefe720e\nOutput = 8ff00caa605c702830634d9a6c3d42c652b58cf1d92fec570beee7\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 018759ff1df63b2792410562314416a8aeaf2ac634b46f940ab82d64dbf165eee33011da749d4bab6e2fcd18129c9e49277d8453112b429a222a8471b070993998e758861c4d3f6d749d91c4290d332c7a4ab3f7ea35ff3a07d497c955ff0ffc95006b62c6d296810d9bfab024196c7934012c2df978ef299aba239940cba10245\nOutput = 2d\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 018802bab04c60325e81c4962311f2be7c2adce93041a00719c88f957575f2c79f1b7bc8ced115c706b311c08a2d986ca3b6a9336b147c29c6f229409ddec651bd1fdd5a0b7f610c9937fdb4a3a762364b8b3206b4ea485fd098d08f63d4aa8bb2697d027b750c32d7f74eaf5180d2e9b66b17cb2fa55523bc280da10d14be2053\nOutput = 74fc88c51bc90f77af9d5e9a4a70133d4b4e0b34da3c37c7ef8e\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00a4578cbc176318a638fba7d01df15746af44d4f6cd96d7e7c495cbf425b09c649d32bf886da48fbaf989a2117187cafb1fb580317690e3ccd446920b7af82b31db5804d87d01514acbfa9156e782f867f6bed9449e0e9a2c09bcecc6aa087636965e34b3ec766f2fe2e43018a2fddeb140616a0e9d82e5331024ee0652fc7641\nOutput = a7eb2a5036931d27d4e891326d99692ffadda9bf7efd3e34e622c4adc085f721dfe885072c78a203b151739be540fa8c153a10f00a\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00ebc5f5fda77cfdad3c83641a9025e77d72d8a6fb33a810f5950f8d74c73e8d931e8634d86ab1246256ae07b6005b71b7f2fb98351218331ce69b8ffbdc9da08bbc9c704f876deb9df9fc2ec065cad87f9090b07acc17aa7f997b27aca48806e897f771d95141fe4526d8a5301b678627efab707fd40fbebd6e792a25613e7aec\nOutput = 2ef2b066f854c33f3bdcbb5994a435e73d6c6c\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 010839ec20c27b9052e55befb9b77e6fc26e9075d7a54378c646abdf51e445bd5715de81789f56f1803d9170764a9e93cb78798694023ee7393ce04bc5d8f8c5a52c171d43837e3aca62f609eb0aa5ffb0960ef04198dd754f57f7fbe6abf765cf118b4ca443b23b5aab266f952326ac4581100644325f8b721acd5d04ff14ef3a\nOutput = 8a7fb344c8b6cb2cf2ef1f643f9a3218f6e19bba89c0\n\nPrivateKey = RSA-OAEP-3\nType = RSA\nInput = 30820277020100300d06092a864886f70d0101010500048202613082025d02010002818102b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9020301000102818015b48a5b5683a94670e23b5718f814fa0e13f85038f50711182cba61510581f3d22c7e232ef937e22e551d68b86e2f8cb1aad8be2e488f5df7efd279e3f568d4eaf36f80cf7141ace60fcc9113fb6c4a841fd50bbc7c512ffcbeff21487aa811eb3ca8c62005346a86de86bfa1d8a948fd3f348c22eaadf333c3ce6ce13208fd024101bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf0241018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7024006c0a249d20a6f2ee75c88b494d53f6aae99aa427c88c28b163a769445e5f390cf40c274fd6ea6329a5ce7c7ce03a2158396ee2a7845786e09e2885a9728e4e5024100d1d27c29fedd92d86c348edd0ccbfac14f746e051ce1d1811df35d61f2ee1c97d4bf2804802f6427187ba8e90a8af44243b4079b03445e602e29fa5193e64fe90241008cb2f756bd8941b1d3b770e5ad31ee373b28acda69ff9b6f40fe578b9f1afb85836f9627d37acff73c2779e634bb26011c2c8f7f3361ae2a9ea65ed689e3639a\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 026a0485d96aebd96b4382085099b962e6a2bdec3d90c8db625e14372de85e2d5b7baab65c8faf91bb5504fb495afce5c988b3f6a52e20e1d6cbd3566c5cd1f2b8318bb542cc0ea25c4aab9932afa20760eaddec784396a07ea0ef24d4e6f4d37e5052a7a31e146aa480a111bbe926401307e00f410033842b6d82fe5ce4dfae80\nOutput = 087820b569e8fa8d\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 024db89c7802989be0783847863084941bf209d761987e38f97cb5f6f1bc88da72a50b73ebaf11c879c4f95df37b850b8f65d7622e25b1b889e80fe80baca2069d6e0e1d829953fc459069de98ea9798b451e557e99abf8fe3d9ccf9096ebbf3e5255d3b4e1c6d2ecadf067a359eea86405acd47d5e165517ccafd47d6dbee4bf5\nOutput = 4653acaf171960b01f52a7be63a3ab21dc368ec43b50d82ec3781e04\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0239bce681032441528877d6d1c8bb28aa3bc97f1df584563618995797683844ca86664732f4bed7a0aab083aaabfb7238f582e30958c2024e44e57043b97950fd543da977c90cdde5337d618442f99e60d7783ab59ce6dd9d69c47ad1e962bec22d05895cff8d3f64ed5261d92b2678510393484990ba3f7f06818ae6ffce8a3a\nOutput = d94cd0e08fa404ed89\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 02994c62afd76f498ba1fd2cf642857fca81f4373cb08f1cbaee6f025c3b512b42c3e8779113476648039dbe0493f9246292fac28950600e7c0f32edf9c81b9dec45c3bde0cc8d8847590169907b7dc5991ceb29bb0714d613d96df0f12ec5d8d3507c8ee7ae78dd83f216fa61de100363aca48a7e914ae9f42ddfbe943b09d9a0\nOutput = 6cc641b6b61e6f963974dad23a9013284ef1\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0162042ff6969592a6167031811a239834ce638abf54fec8b99478122afe2ee67f8c5b18b0339805bfdbc5a4e6720b37c59cfba942464c597ff532a119821545fd2e59b114e61daf71820529f5029cf524954327c34ec5e6f5ba7efcc4de943ab8ad4ed787b1454329f70db798a3a8f4d92f8274e2b2948ade627ce8ee33e43c60\nOutput = df5151832b61f4f25891fb4172f328d2eddf8371ffcfdbe997939295f30eca6918017cfda1153bf7a6af87593223\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00112051e75d064943bc4478075e43482fd59cee0679de6893eec3a943daa490b9691c93dfc0464b6623b9f3dbd3e70083264f034b374f74164e1a00763725e574744ba0b9db83434f31df96f6e2a26f6d8eba348bd4686c2238ac07c37aac3785d1c7eea2f819fd91491798ed8e9cef5e43b781b0e0276e37c43ff9492d005730\nOutput = 3c3bad893c544a6d520ab022319188c8d504b7a788b850903",
-    "b85972eaa18552e1134a7ad6098826254ff7ab672b3d8eb3158fac6d4cbaef1\n\nPrivateKey = RSA-OAEP-4\nType = RSA\nInput = 30820277020100300d06092a864886f70d0101010500048202613082025d020100028181051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb03902030100010281800411ffca3b7ca5e9e9be7fe38a85105e353896db05c5796aecd2a725161eb3651c8629a9b862b904d7b0c7b37f8cb5a1c2b54001018a00a1eb2cafe4ee4e9492c348bc2bedab4b9ebbf064e8eff322b9009f8eec653905f40df88a3cdc49d4567f75627d41aca624129b46a0b7c698e5e65f2b7ba102c749a10135b6540d04010241027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba570102410210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139024039fa028b826e88c1121b750a8b242fa9a35c5b66bdfd1fa637d3cc48a84a4f457a194e7727e49f7bcc6e5a5a412657fc470c7322ebc37416ef458c307a8c09010241015d99a84195943979fa9e1be2c3c1b69f432f46fd03e47d5befbbbfd6b1d1371d83efb330a3e020942b2fed115e5d02be24fd92c9019d1cecd6dd4cf1e54cc899024101f0b7015170b3f5e42223ba30301c41a6d87cbb70e30cb7d3c67d25473db1f6cbf03e3f9126e3e97968279a865b2c2b426524cfc52a683d31ed30eb984be412ba\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 04cce19614845e094152a3fe18e54e3330c44e5efbc64ae16886cb1869014cc5781b1f8f9e045384d0112a135ca0d12e9c88a8e4063416deaae3844f60d6e96fe155145f4525b9a34431ca3766180f70e15a5e5d8e8b1a516ff870609f13f896935ced188279a58ed13d07114277d75c6568607e0ab092fd803a223e4a8ee0b1a8\nOutput = 4a86609534ee434a6cbca3f7e962e76d455e3264c19f605f6e5ff6137c65c56d7fb344cd52bc93374f3d166c9f0c6f9c506bad19330972d2\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0097b698c6165645b303486fbf5a2a4479c0ee85889b541a6f0b858d6b6597b13b854eb4f839af03399a80d79bda6578c841f90d645715b280d37143992dd186c80b949b775cae97370e4ec97443136c6da484e970ffdb1323a20847821d3b18381de13bb49aaea66530c4a4b8271f3eae172cd366e07e6636f1019d2a28aed15e\nOutput = b0adc4f3fe11da59ce992773d9059943c03046497ee9d9f9a06df1166db46d98f58d27ec074c02eee6cbe2449c8b9fc5080c5c3f4433092512ec46aa793743c8\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0301f935e9c47abcb48acbbe09895d9f5971af14839da4ff95417ee453d1fd77319072bb7297e1b55d7561cd9d1bb24c1a9a37c619864308242804879d86ebd001dce5183975e1506989b70e5a83434154d5cbfd6a24787e60eb0c658d2ac193302d1192c6e622d4a12ad4b53923bca246df31c6395e37702c6a78ae081fb9d065\nOutput = bf6d42e701707b1d0206b0c8b45a1c72641ff12889219a82bdea965b5e79a96b0d0163ed9d578ec9ada20f2fbcf1ea3c4089d83419ba81b0c60f3606da99\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 02d110ad30afb727beb691dd0cf17d0af1a1e7fa0cc040ec1a4ba26a42c59d0a796a2e22c8f357ccc98b6519aceb682e945e62cb734614a529407cd452bee3e44fece8423cc19e55548b8b994b849c7ecde4933e76037e1d0ce44275b08710c68e430130b929730ed77e09b015642c5593f04e4ffb9410798102a8e96ffdfe11e4\nOutput = fb2ef112f5e766eb94019297934794f7be2f6fc1c58e\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00dbb8a7439d90efd919a377c54fae8fe11ec58c3b858362e23ad1b8a44310799066b99347aa525691d2adc58d9b06e34f288c170390c5f0e11c0aa3645959f18ee79e8f2be8d7ac5c23d061f18dd74b8c5f2a58fcb5eb0c54f99f01a83247568292536583340948d7a8c97c4acd1e98d1e29dc320e97a260532a8aa7a758a1ec2\nOutput = 28ccd447bb9e85166dabb9e5b7d1adadc4b9d39f204e96d5e440ce9ad928bc1c2284\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00a5ffa4768c8bbecaee2db77e8f2eec99595933545520835e5ba7db9493d3e17cddefe6a5f567624471908db4e2d83a0fbee60608fc84049503b2234a07dc83b27b22847ad8920ff42f674ef79b76280b00233d2b51b8cb2703a9d42bfbc8250c96ec32c051e57f1b4ba528db89c37e4c54e27e6e64ac69635ae887d9541619a9\nOutput = f22242751ec6b1\n\nPrivateKey = RSA-OAEP-5\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f0201000281810aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed902030100010281810256eb4cba7067f2d2be540dcdff4582a36b7d31d1c9099bb214b79848466a268f80f58a49ac04c0e3648934a0206c04537c19b236643a6082732144df75fa217588f794682be89168276dc726c5c0cbdb84d31bbf26d0a43af495717f7d528acfee341561f6ff3cae05c578f8470d9682f9c0d072f9f6068b56d5880f682be2c5024103b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707024102e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f024101e84b119d25161fa67b00256a5bd9b645d2b232ecb05b015180029a88622adc3f09b3aeacde6161ab7cde22c2ad26e7797df54e072cbd3b2673800b3e4338dbd5024100eb90aa1a40135b4cea07197cedc8819be1e7cbff2547662116f465a4a9f487ab12f3ba4fef13822265a65297d98b7bded9372e3ffe81a38b3e9600fed055754f0241012f7f8138f9404062eb85a42924520b38f5bb886a0196f48bb8dcea60fd92cc027f18e78158a34a5c5d5f860a0f6c04071a7d01312c065062f1eb48b79d1c83cb\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 036046a4a47d9ed3ba9a89139c105038eb7492b05a5d68bfd53accff4597f7a68651b47b4a4627d927e485eed7b4566420e8b409879e5d606eae251d22a5df799f7920bfc117b992572a53b1263146bcea03385cc5e853c9a101c8c3e1bda31a519807496c6cb5e5efb408823a352b8fa0661fb664efadd593deb99fff5ed000e5\nOutput = af71a901e3a61d3132f0fc1fdb474f9ea6579257ffc24d164170145b3dbde8\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 03d6eb654edce615bc59f455265ed4e5a18223cbb9be4e4069b473804d5de96f54dcaaa603d049c5d94aa1470dfcd2254066b7c7b61ff1f6f6770e3215c51399fd4e34ec5082bc48f089840ad04354ae66dc0f1bd18e461a33cc1258b443a2837a6df26759aa2302334986f87380c9cc9d53be9f99605d2c9a97da7b0915a4a7ad\nOutput = a3b844a08239a8ac41605af17a6cfda4d350136585903a417a79268760519a4b4ac3303ec73f0f87cfb32399\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0770952181649f9f9f07ff626ff3a22c35c462443d905d456a9fd0bff43cac2ca7a9f554e9478b9acc3ac838b02040ffd3e1847de2e4253929f9dd9ee4044325a9b05cabb808b2ee840d34e15d105a3f1f7b27695a1a07a2d73fe08ecaaa3c9c9d4d5a89ff890d54727d7ae40c0ec1a8dd86165d8ee2c6368141016a48b55b6967\nOutput = 308b0ecbd2c76cb77fc6f70c5edd233fd2f20929d629f026953bb62a8f4a3a314bde195de85b5f816da2aab074d26cb6acddf323ae3b9c678ac3cf12fbdde7\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0812b76768ebcb642d040258e5f4441a018521bd96687e6c5e899fcd6c17588ff59a82cc8ae03a4b45b31299af1788c329f7dcd285f8cf4ced82606b97612671a45bedca133442144d1617d114f802857f0f9d739751c57a3f9ee400912c61e2e6992be031a43dd48fa6ba14eef7c422b5edc4e7afa04fdd38f402d1c8bb719abf\nOutput = 15c5b9ee1185\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 07b60e14ec954bfd29e60d0047e789f51d57186c63589903306793ced3f68241c743529aba6a6374f92e19e0163efa33697e196f7661dfaaa47aac6bde5e51deb507c72c589a2ca1693d96b1460381249b2cdb9eac44769f2489c5d3d2f99f0ee3c7ee5bf64a5ac79c42bd433f149be8cb59548361640595513c97af7bc2509723\nOutput = 21026e6800c7fa728fcaaba0d196ae28d7a2ac4ffd8abce794f0985f60c8a6737277365d3fea11db8923a2029a\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 08c36d4dda33423b2ed6830d85f6411ba1dcf470a1fae0ebefee7c089f256cef74cb96ea69c38f60f39abee44129bcb4c92de7f797623b20074e3d9c2899701ed9071e1efa0bdd84d4c3e5130302d8f0240baba4b84a71cc032f2235a5ff0fae277c3e8f9112bef44c9ae20d175fc9a4058bfc930ba31b02e2e4f444483710f24a\nOutput = 541e37b68b6c8872b84c02\n\nPrivateKey = RSA-OAEP-6\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f02010002818112b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af02030100010281810295eca3560618369559cecd303aa9cfdafc1d9f06959df75ffef929aa896961bcd190dc6997eda7f5963e724d07b4dc11f3065e5ae97d96835112280b9084bb14f2a21ebd4e889d41b9c4132ec1956fcab8bb2fed0575884936522c5ff7d33261",
-    "904824e7cadee4e0bb372d2457cf78e2bd1286228ff83f10731ce63c90cff3f9024104a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b02410404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed024103961c8f760aa2bd5154c7aafd77225b3bacd0139ae7b5948ea3311fccd86fb95c75afa767284b9b2de559572f15d8d044c7eb83a1be5fadf2cc377c0d8475294b0241022197e066742196aabc03fa2feeb4e70b15cb787d617acd31bb75c7bc234ad706f7c48d2182d1f0ff9c228dcf41967b6c0ba6d2c0ad110a1b857831ec245e2cb102410401c4c0c53d45dbdb5e9d96d0fecf4275df0974bc4a0736b4a74c3269053efb686ace2406e22c9e058ddb4ae540627ae2fdb08261e8e7e4bcbc994daafa305c45\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0630eebcd2856c24f798806e41f9e67345eda9ceda386acc9facaea1eeed06ace583709718d9d169fadf414d5c76f92996833ef305b75b1e4b95f662a20faedc3bae0c4827a8bf8a88edbd57ec203a27a841f02e43a615bab1a8cac0701de34debdef62a088089b55ec36ea7522fd3ec8d06b6a073e6df833153bc0aefd93bd1a3\nOutput = 4046ca8baa3347ca27f49e0d81f9cc1d71be9ba517d4\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0ebc37376173a4fd2f89cc55c2ca62b26b11d51c3c7ce49e8845f74e7607317c436bc8d23b9667dfeb9d087234b47bc6837175ae5c0559f6b81d7d22416d3e50f4ac533d8f0812f2db9e791fe9c775ac8b6ad0f535ad9ceb23a4a02014c58ab3f8d3161499a260f39348e714ae2a1d3443208fd8b722ccfdfb393e98011f99e63f\nOutput = 5cc72c60231df03b3d40f9b57931bc31109f972527f28b19e7480c7288cb3c92b22512214e4be6c914792ddabdf57faa8aa7\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0a98bf1093619394436cf68d8f38e2f158fde8ea54f3435f239b8d06b8321844202476aeed96009492480ce3a8d705498c4c8c68f01501dc81db608f60087350c8c3b0bd2e9ef6a81458b7c801b89f2e4fe99d4900ba6a4b5e5a96d865dc676c7755928794130d6280a8160a190f2df3ea7cf9aa0271d88e9e6905ecf1c5152d65\nOutput = b20e651303092f4bccb43070c0f86d23049362ed96642fc5632c27db4a52e3d831f2ab068b23b149879c002f6bf3feee97591112562c\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 008e7a67cacfb5c4e24bec7dee149117f19598ce8c45808fef88c608ff9cd6e695263b9a3c0ad4b8ba4c95238e96a8422b8535629c8d5382374479ad13fa39974b242f9a759eeaf9c83ad5a8ca18940a0162ba755876df263f4bd50c6525c56090267c1f0e09ce0899a0cf359e88120abd9bf893445b3cae77d3607359ae9a52f8\nOutput = 684e3038c5c041f7\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00003474416c7b68bdf961c385737944d7f1f40cb395343c693cc0b4fe63b31fedf1eaeeac9ccc0678b31dc32e0977489514c4f09085f6298a9653f01aea4045ff582ee887be26ae575b73eef7f3774921e375a3d19adda0ca31aa1849887c1f42cac9677f7a2f4e923f6e5a868b38c084ef187594dc9f7f048fea2e02955384ab\nOutput = 32488cb262d041d6e4dd35f987bf3ca696db1f06ac29a44693\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0a026dda5fc8785f7bd9bf75327b63e85e2c0fdee5dadb65ebdcac9ae1de95c92c672ab433aa7a8e69ce6a6d8897fac4ac4a54de841ae5e5bbce7687879d79634cea7a30684065c714d52409b928256bbf53eabcd5231eb7259504537399bd29164b726d33a46da701360a4168a091ccab72d44a62fed246c0ffea5b1348ab5470\nOutput = 50ba14be8462720279c306ba\n\nPrivateKey = RSA-OAEP-7\nType = RSA\nInput = 30820278020100300d06092a864886f70d0101010500048202623082025e020100028181311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e3730203010001028181070cfcff2feb8276e27432c45dfee48f49b7917d6530e1f0ca3460f32e0276174487c56e22a45d2500d7775495219d7d165a9cf3bd92c32af9a98d8dc9cc296800adc94a0a54fb40f34291bf84ee8ea12b6f109359c6d3542a50f9c767f5cfff05a681c2e656fb77caaadb4be9468d8abcd4df98f58e86d2053fa1349f748e21b102410749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71024106bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023024103bc7ea7f0aab143abc6ce8b97118636a30172e4cfe02c8fa0dda3b7baaf90f8092982985525f488bdfcb4bd726e22639ac64a3092ab7ffcbf1d5334cfa50b5bf102410262a6aa29c2a3c67dc5346c06381afd987aa3cc93cfbfecf54fdd9f9d787d7f59a523d398979da137a2f6381fe94801f7c94da21518dc34cb40870c4697994ad90240649d4c17b6ee1721e772d0389a559c3d3cdf9550d457c46b037b74641b1d52166af8a213c8396206cdfba4422f18d6f61dbcb5d214c971bf482aeb976a7370c2\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1688e4ce7794bba6cb7014169ecd559cede2a30b56a52b68d9fe18cf1973ef97b2a03153951c755f6294aa49adbdb55845ab6875fb3986c93ecf927962840d282f9e54ce8b690f7c0cb8bbd73440d9571d1b16cd9260f9eab4783cc482e5223dc60973871783ec27b0ae0fd47732cbc286a173fc92b00fb4ba6824647cd93c85c1\nOutput = 47aae909\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1052ed397b2e01e1d0ee1c50bf24363f95e504f4a03434a08fd822574ed6b9736edbb5f390db10321479a8a139350e2bd4977c3778ef331f3e78ae118b268451f20a2f01d471f5d53c566937171b2dbc2d4bde459a5799f0372d6574239b2323d245d0bb81c286b63c89a361017337e4902f88a467f4c7f244bfd5ab46437ff3b6\nOutput = 1d9b2e2223d9bc13bfb9f162ce735db48ba7c68f6822a0a1a7b6ae165834e7\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2155cd843ff24a4ee8badb7694260028a490813ba8b369a4cbf106ec148e5298707f5965be7d101c1049ea8584c24cd63455ad9c104d686282d3fb803a4c11c1c2e9b91c7178801d1b6640f003f5728df007b8a4ccc92bce05e41a27278d7c85018c52414313a5077789001d4f01910b72aad05d220aa14a58733a7489bc54556b\nOutput = d976fc\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0ab14c373aeb7d4328d0aaad8c094d88b9eb098b95f21054a29082522be7c27a312878b637917e3d819e6c3c568db5d843802b06d51d9e98a2be0bf40c031423b00edfbff8320efb9171bd2044653a4cb9c5122f6c65e83cda2ec3c126027a9c1a56ba874d0fea23f380b82cf240b8cf540004758c4c77d934157a74f3fc12bfac\nOutput = d4738623df223aa43843df8467534c41d013e0c803c624e263666b239bde40a5f29aeb8de79e3daa61dd0370f49bd4b013834b98212aef6b1c5ee373b3cb\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 028387a318277434798b4d97f460068df5298faba5041ba11761a1cb7316b24184114ec500257e2589ed3b607a1ebbe97a6cc2e02bf1b681f42312a33b7a77d8e7855c4a6de03e3c04643f786b91a264a0d6805e2cea91e68177eb7a64d9255e4f27e713b7ccec00dc200ebd21c2ea2bb890feae4942df941dc3f97890ed347478\nOutput = bb47231ca5ea1d3ad46c99345d9a8a61\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 14c678a94ad60525ef39e959b2f3ba5c097a94ff912b67dbace80535c187abd47d075420b1872152bba08f7fc31f313bbf9273c912fc4c0149a9b0cfb79807e346eb332069611bec0ff9bcd168f1f7c33e77313cea454b94e2549eecf002e2acf7f6f2d2845d4fe0aab2e5a92ddf68c480ae11247935d1f62574842216ae674115\nOutput = 2184827095d35c3f86f600e8e59754013296\n\nPrivateKey = RSA-OAEP-8\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f0201000281815bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff702030100010281810f7d1e9e5aaa25fd13e4a0663ae144e0d15f5cd18bcdb09df2cc7e64e3c5e915ad62645304161d098c715bb7ab8bd01d07eaf3fed7c7ed08af2a8a62ef44ab16b320e14af72a48f96afe262a0ae4cf65e635e910790cd4ee5cea768a4b2639f7e6f677b3f0bb6be32b75747d8909036f0264f58d401cdba131716157a75ecf633102410a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f0241092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9024107c71410af103962db367404e37ae850baa4e9c29dd92145815294a67c7d1c6ded263aa030a9b633ae50303e14035d1af014123eba687820308d8ebc85b6957d7d024100ae2c75380c02c016ad05891b3301de881f28ae1171182b6b2c83bea7c515eca9ca298c7b1cab5817a597068fc85060de4da8a016378aae43c7f967bcc37904b902410598d1059e3ada4f6320752c09d805ff7d1f1ae0d017aeeee9cefa0d7dd7ff775e44b578322f6405d6211da19519666aa87fdc4cd8c88f6b6e3d67e961dcbba3d0\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 09b3683d8a2eb0fb295b62ed1fb9290b714457b7825319f4647872af889b30409472020ad12912bf19b11d4819f49614824ffd84d09c0a17e7d17309d1291",
-    "9790410aa2995699f6a86dbe3242b5acc23af45691080d6b1ae810fb3e3057087f0970092ce00be9562ff4053b6262ce0caa93e13723d2e3a5ba075d45f0d61b54b61\nOutput = 050b755e5e6880f7b9e9d692a74c37aae449b31bfea6deff83747a897f6c2c825bb1adbf850a3c96994b5de5b33cbc7d4a17913a7967\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2ecf15c97c5a15b1476ae986b371b57a24284f4a162a8d0c8182e7905e792256f1812ba5f83f1f7a130e42dcc02232844edc14a31a68ee97ae564a383a3411656424c5f62ddb646093c367be1fcda426cf00a06d8acb7e57776fbbd855ac3df506fc16b1d7c3f2110f3d8068e91e186363831c8409680d8da9ecd8cf1fa20ee39d\nOutput = 4eb68dcd93ca9b19df111bd43608f557026fe4aa1d5cfac227a3eb5ab9548c18a06dded23f81825986b2fcd71109ecef7eff88873f075c2aa0c469f69c92bc\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 4bc89130a5b2dabb7c2fcf90eb5d0eaf9e681b7146a38f3173a3d9cfec52ea9e0a41932e648a9d69344c50da763f51a03c95762131e8052254dcd2248cba40fd31667786ce05a2b7b531ac9dac9ed584a59b677c1a8aed8c5d15d68c05569e2be780bf7db638fd2bfd2a85ab276860f3777338fca989ffd743d13ee08e0ca9893f\nOutput = 8604ac56328c1ab5ad917861\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2e456847d8fc36ff0147d6993594b9397227d577752c79d0f904fcb039d4d812fea605a7b574dd82ca786f93752348438ee9f5b5454985d5f0e1699e3e7ad175a32e15f03deb042ab9fe1dd9db1bb86f8c089ccb45e7ef0c5ee7ca9b7290ca6b15bed47039788a8a93ff83e0e8d6244c71006362deef69b6f416fb3c684383fbd0\nOutput = fdda5fbf6ec361a9d9a4ac68af216a0686f438b1e0e5c36b955f74e107f39c0dddcc\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1fb9356fd5c4b1796db2ebf7d0d393cc810adf6145defc2fce714f79d93800d5e2ac211ea8bbecca4b654b94c3b18b30dd576ce34dc95436ef57a09415645923359a5d7b4171ef22c24670f1b229d3603e91f76671b7df97e7317c97734476d5f3d17d21cf82b5ba9f83df2e588d36984fd1b584468bd23b2e875f32f68953f7b2\nOutput = 4a5f4914bee25de3c69341de07\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 3afd9c6600147b21798d818c655a0f4c9212db26d0b0dfdc2a7594ccb3d22f5bf1d7c3e112cd73fc7d509c7a8bafdd3c274d1399009f9609ec4be6477e453f075aa33db382870c1c3409aef392d7386ae3a696b99a94b4da0589447e955d16c98b17602a59bd736279fcd8fb280c4462d590bfa9bf13fed570eafde97330a2c210\nOutput = 8e07d66f7b880a72563abcd3f35092bc33409fb7f88f2472be\n\nPrivateKey = RSA-OAEP-9\nType = RSA\nInput = 30820397020100300d06092a864886f70d0101010500048203813082037d0201000281c100cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d02030100010281c0198c141e23715a92bccf6a119a5bc11389468d2811f548d727e17b4ab0eb986d6f211efb53b71f7ccbea87ee69c75ee615008c5332deb52bf390abdfbfe37d7205368159b2638c1de326e21d22251f0fb5848b3bf15005d2a74330f0afe916ee62ccc1344d1d83a709e60676273840f7f377424a5e0a4da75f01b31ff76819cf9cbfdd215243c3917c03ef38199312e567b3bf7aed3ab457f371ef8a1423f45b68c6e282ec111bba2833b987fd69fad83bc1b8c613c5e1ea16c11ed125ea7ec1026100fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd026100d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1026100db16802f79a2f0d45f358d69fd33e44b81fae828622e93a54253e997d01b0743759da0e812b4aa4e6c8beab2328d5431955a418a67ff26a8c5c807a5da354e05ef31cc8cf758f463732950b03e265726fb94e39d6a572a26244ab08db75752ad026100a0a317cfe7df1423f87a6dee8451f4e2b4a67e5497f29b4f1e4e830b9fadd9401167026f5596e5a39c97817e0f5f16e27e19ec9902e01d7ea6fb9aa3c760afee1e381b69de6ac9c07585a06ad9c4ba00bf75c8ad2fa898a479e80ae294fed2a102600b21f335c353342eb44c3aa24445780c2d655b940174cae38c7c8a4e6493c0ba9fd303748267b083b9a7a6cb61e42db362b8c9896db7064e02ad5ae61587da15b4649c90594909feb37dbcb654beb7268ec801e5a8b4aa3911bebd88542f05be\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 267bcd118acab1fc8ba81c85d73003cb8610fa55c1d97da8d48a7c7f06896a4db751aa284255b9d36ad65f37653d829f1b37f97b8001942545b2fc2c55a7376ca7a1be4b1760c8e05a33e5aa2526b8d98e317088e7834c755b2a59b12631a182c05d5d43ab1779264f8456f515ce57dfdf512d5493dab7b7338dc4b7d78db9c091ac3baf537a69fc7f549d979f0eff9a94fda4169bd4d1d19a69c99e33c3b55490d501b39b1edae118ff6793a153261584d3a5f39f6e682e3d17c8cd1261fa72\nOutput = f735fd55ba92592c3b52b8f9c4f69aaa1cbef8fe88add095595412467f9cf4ec0b896c59eda16210e7549c8abb10cdbc21a12ec9b6b5b8fd2f10399eb6\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 93ac9f0671ec29acbb444effc1a5741351d60fdb0e393fbf754acf0de49761a14841df7772e9bc82773966a1584c4d72baea00118f83f35cca6e537cbd4d811f5583b29783d8a6d94cd31be70d6f526c10ff09c6fa7ce069795a3fcd0511fd5fcb564bcc80ea9c78f38b80012539d8a4ddf6fe81e9cddb7f50dbbbbcc7e5d86097ccf4ec49189fb8bf318be6d5a0715d516b49af191258cd32dc833ce6eb4673c03a19bbace88cc54895f636cc0c1ec89096d11ce235a265ca1764232a689ae8\nOutput = 81b906605015a63aabe42ddf11e1978912f5404c7474b26dce3ed482bf961ecc818bf420c54659\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 81ebdd95054b0c822ef9ad7693f5a87adfb4b4c4ce70df2df84ed49c04da58ba5fc20a19e1a6e8b7a3900b22796dc4e869ee6b42792d15a8eceb56c09c69914e813cea8f6931e4b8ed6f421af298d595c97f4789c7caa612c7ef360984c21b93edc5401068b5af4c78a8771b984d53b8ea8adf2f6a7d4a0ba76c75e1dd9f658f20ded4a46071d46d7791b56803d8fea7f0b0f8e41ae3f09383a6f9585fe7753eaaffd2bf94563108beecc207bbb535f5fcc705f0dde9f708c62f49a9c90371d3\nOutput = fd326429df9b890e09b54b18b8f34f1e24\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = bcc35f94cde66cb1136625d625b94432a35b22f3d2fa11a613ff0fca5bd57f87b902ccdc1cd0aebcb0715ee869d1d1fe395f6793003f5eca465059c88660d446ff5f0818552022557e38c08a67ead991262254f10682975ec56397768537f4977af6d5f6aaceb7fb25dec5937230231fd8978af49119a29f29e424ab8272b47562792d5c94f774b8829d0b0d9f1a8c9eddf37574d5fa248eefa9c5271fc5ec2579c81bdd61b410fa61fe36e424221c113addb275664c801d34ca8c6351e4a858\nOutput = f1459b5f0c92f01a0f723a2e5662484d8f8c0a20fc29dad6acd43bb5f3effdf4e1b63e07fdfe6628d0d74ca19bf2d69e4a0abf86d293925a796772f8088e\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 232afbc927fa08c2f6a27b87d4a5cb09c07dc26fae73d73a90558839f4fd66d281b87ec734bce237ba166698ed829106a7de6942cd6cdce78fed8d2e4d81428e66490d036264cef92af941d3e35055fe3981e14d29cbb9a4f67473063baec79a1179f5a17c9c1832f2838fd7d5e59bb9659d56dce8a019edef1bb3accc697cc6cc7a778f60a064c7f6f5d529c6210262e003de583e81e3167b89971fb8c0e15d44fffef89b53d8d64dd797d159b56d2b08ea5307ea12c241bd58d4ee278a1f2e\nOutput = 53e6e8c729d6f9c319dd317e74b0db8e4ccca25f3c8305746e137ac63a63ef3739e7b595abb96e8d55e54f7bd41ab433378ffb911d\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 438cc7dc08a68da249e42505f8573ba60e2c2773d5b290f4cf9dff718e842081c383e67024a0f29594ea987b9d25e4b738f285970d195abb3a8c8054e3d79d6b9c9a8327ba596f1259e27126674766907d8d582ff3a8476154929adb1e6d1235b2ccb4ec8f663ba9cc670a92bebd853c8dbf69c6436d016f61add836e94732450434207f9fd4c43dec2a12a958efa01efe2669899b5e604c255c55fb7166de5589e369597bb09168c06dd5db177e06a1740eb2d5c82faeca6d92fcee9931ba9f\nOutput = b6b28ea2198d0c1008bc64\n\nPrivateKey = RSA-OAEP-10\nType = RSA\nInput = 308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb020301000102820100056b04216fe5f354ac77250a4b6b0c8525a85c59b0bd80c56450a22d5f438e596a333aa875e291dd43f48cb88b9d5fc0d499f9fcd1c397f9afc070cd9e398c8d19e61db7c7410a6b2675dfbf5d345b804d201add502d5ce2d",
-    "fcb091ce9997bbebe57306f383e4d588103f036f7e85d1934d152a323e4a8db451d6f4a5b1b0f102cc150e02feee2b88dea4ad4c1baccb24d84072d14e1d24a6771f7408ee30564fb86d4393a34bcf0b788501d193303f13a2284b001f0f649eaf79328d4ac5c430ab4414920a9460ed1b7bc40ec653e876d09abc509ae45b525190116a0c26101848298509c1c3bf3a483e7274054e15e97075036e989f60932807b5257751e7902818100ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce76902818100bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc386318302818100c73564571d00fb15d08a3de9957a50915d7126e9442dacf42bc82e862e5673ff6a008ed4d2e374617df89f17a160b43b7fda9cb6b6b74218609815f7d45ca263c159aa32d272d127faf4bc8ca2d77378e8aeb19b0ad7da3cb3de0ae7314980f62b6d4b0a875d1df03c1bae39ccd833ef6cd7e2d9528bf084d1f969e794e9f6c10281802658b37f6df9c1030be1db68117fa9d87e39ea2b693b7e6d3a2f70947413eec6142e18fb8dfcb6ac545d7c86a0ad48f8457170f0efb26bc48126c53efd1d16920198dc2a1107dc282db6a80cd3062360ba3fa13f70e4312ff1a6cd6b8fc4cd9c5c3db17c6d6a57212f73ae29f619327bad59b153858585ba4e28b60a62a45e490281806f38526b3925085534ef3e415a836ede8b86158a2c7cbfeccb0bd834304fec683ba8d4f479c433d43416e63269623cea100776d85aff401d3fff610ee65411ce3b1363d63a9709eede42647cea561493d54570a879c18682cd97710b96205ec31117d73b5f36223fadd6e8ba90dd7c0ee61d44e163251e20c7f66eb305117cb8\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 53ea5dc08cd260fb3b858567287fa91552c30b2febfba213f0ae87702d068d19bab07fe574523dfb42139d68c3c5afeee0bfe4cb7969cbf382b804d6e61396144e2d0e60741f8993c3014b58b9b1957a8babcd23af854f4c356fb1662aa72bfcc7e586559dc4280d160c126785a723ebeebeff71f11594440aaef87d10793a8774a239d4a04c87fe1467b9daf85208ec6c7255794a96cc29142f9a8bd418e3c1fd67344b0cd0829df3b2bec60253196293c6b34d3f75d32f213dd45c6273d505adf4cced1057cb758fc26aeefa441255ed4e64c199ee075e7f16646182fdb464739b68ab5daff0e63e9552016824f054bf4d3c8c90a97bb6b6553284eb429fcc\nOutput = 8bba6bf82a6c0f86d5f1756e97956870b08953b06b4eb205bc1694ee\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = a2b1a430a9d657e2fa1c2bb5ed43ffb25c05a308fe9093c01031795f5874400110828ae58fb9b581ce9dddd3e549ae04a0985459bde6c626594e7b05dc4278b2a1465c1368408823c85e96dc66c3a30983c639664fc4569a37fe21e5a195b5776eed2df8d8d361af686e750229bbd663f161868a50615e0c337bec0ca35fec0bb19c36eb2e0bbcc0582fa1d93aacdb061063f59f2ce1ee43605e5d89eca183d2acdfe9f81011022ad3b43a3dd417dac94b4e11ea81b192966e966b182082e71964607b4f8002f36299844a11f2ae0faeac2eae70f8f4f98088acdcd0ac556e9fccc511521908fad26f04c64201450305778758b0538bf8b5bb144a828e629795\nOutput = e6ad181f053b58a904f2457510373e57\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 9886c3e6764a8b9a84e84148ebd8c3b1aa8050381a78f668714c16d9cfd2a6edc56979c535d9dee3b44b85c18be8928992371711472216d95dda98d2ee8347c9b14dffdff84aa48d25ac06f7d7e65398ac967b1ce90925f67dce049b7f812db0742997a74d44fe81dbe0e7a3feaf2e5c40af888d550ddbbe3bc20657a29543f8fc2913b9bd1a61b2ab2256ec409bbd7dc0d17717ea25c43f42ed27df8738bf4afc6766ff7aff0859555ee283920f4c8a63c4a7340cbafddc339ecdb4b0515002f96c932b5b79167af699c0ad3fccfdf0f44e85a70262bf2e18fe34b850589975e867ff969d48eabf212271546cdc05a69ecb526e52870c836f307bd798780ede\nOutput = 510a2cf60e866fa2340553c94ea39fbc256311e83e94454b4124\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 6318e9fb5c0d05e5307e1683436e903293ac4642358aaa223d7163013aba87e2dfda8e60c6860e29a1e92686163ea0b9175f329ca3b131a1edd3a77759a8b97bad6a4f8f4396f28cf6f39ca58112e48160d6e203daa5856f3aca5ffed577af499408e3dfd233e3e604dbe34a9c4c9082de65527cac6331d29dc80e0508a0fa7122e7f329f6cca5cfa34d4d1da417805457e008bec549e478ff9e12a763c477d15bbb78f5b69bd57830fc2c4ed686d79bc72a95d85f88134c6b0afe56a8ccfbc855828bb339bd17909cf1d70de3335ae07039093e606d655365de6550b872cd6de1d440ee031b61945f629ad8a353b0d40939e96a3c450d2a8d5eee9f678093c8\nOutput = bcdd190da3b7d300df9a06e22caae2a75f10c91ff667b7c16bde8b53064a2649a94045c9\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 75290872ccfd4a4505660d651f56da6daa09ca1301d890632f6a992f3d565cee464afded40ed3b5be9356714ea5aa7655f4a1366c2f17c728f6f2c5a5d1f8e28429bc4e6f8f2cff8da8dc0e0a9808e45fd09ea2fa40cb2b6ce6ffff5c0e159d11b68d90a85f7b84e103b09e682666480c657505c0929259468a314786d74eab131573cf234bf57db7d9e66cc6748192e002dc0deea930585f0831fdcd9bc33d51f79ed2ffc16bcf4d59812fcebcaa3f9069b0e445686d644c25ccf63b456ee5fa6ffe96f19cdf751fed9eaf35957754dbf4bfea5216aa1844dc507cb2d080e722eba150308c2b5ff1193620f1766ecf4481bafb943bd292877f2136ca494aba0\nOutput = a7dd6c7dc24b46f9dd5f1e91ada4c3b3df947e877232a9\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2d207a73432a8fb4c03051b3f73b28a61764098dfa34c47a20995f8115aa6816679b557e82dbee584908c6e69782d7deb34dbd65af063d57fca76a5fd069492fd6068d9984d209350565a62e5c77f23038c12cb10c6634709b547c46f6b4a709bd85ca122d74465ef97762c29763e06dbc7a9e738c78bfca0102dc5e79d65b973f28240caab2e161a78b57d262457ed8195d53e3c7ae9da021883c6db7c24afdd2322eac972ad3c354c5fcef1e146c3a0290fb67adf007066e00428d2cec18ce58f9328698defef4b2eb5ec76918fde1c198cbb38b7afc67626a9aefec4322bfd90d2563481c9a221f78c8272c82d1b62ab914e1c69f6af6ef30ca5260db4a46\nOutput = eaf1a73a1b0c4609537de69cd9228bbcfb9a8ca8c6c3efaf056fe4a7f4634ed00b7c39ec6922d7b8ea2c04ebac\n\n\n# Single-shot signing tests.\n\nSignMessage = RSA-2048\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = RSA-2048\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = RSA-2048-SPKI\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = P-256\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 304502204c66004635c267394bd6857c1e0b53b22a2bab1ca7dff9d5c1b42143858b3ea7022100ae81228510e03cd49a8863d2ebd1c05fe0c87eacd1150433132b909994cd0dbd\n\n# Digest can't be omitted in many algorithms.\nSignMessage = RSA-2048\nInput = \"Hello world\"\nError = NO_DEFAULT_DIGEST\n\nVerifyMessage = RSA-2048\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe9",
-    "8bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\nError = NO_DEFAULT_DIGEST\n\n# Signing test vectors from RFC 8032.\nSignMessage = Ed25519\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nSignMessage = Ed25519-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nSignMessage = Ed25519-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nSignMessage = Ed25519-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nSignMessage = Ed25519-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\n# Signing with public keys is not allowed.\nSignMessage = Ed25519-SPKI\nInput = \"\"\nError = NOT_A_PRIVATE_KEY\n\n# Verify test vectors from RFC 8032. Test verifying with both the public and\n# private key.\nVerifyMessage = Ed25519\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nVerifyMessage = Ed25519-SPKI\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nVerifyMessage = Ed25519-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nVerifyMessage = Ed25519-SPKI-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nVerifyMessage = Ed25519-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nVerifyMessage = Ed25519-SPKI-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nVerifyMessage = Ed25519-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nVerifyMessage = Ed25519-SPKI-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419",
-    "c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nVerifyMessage = Ed25519-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\nVerifyMessage = Ed25519-SPKI-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\n# Length is wrong.\nVerifyMessage = Ed25519-SPKI\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a10\nError = INVALID_SIGNATURE\n\n# Message is wrong.\nVerifyMessage = Ed25519-SPKI\nInput = \"Hello world\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\nError = INVALID_SIGNATURE\n\n# Ed25519 does not support configuring a digest.\nSignMessage = Ed25519\nInput = \"\"\nDigest = SHA256\nError = COMMAND_NOT_SUPPORTED\n\n# Ed25519 does not support signing a pre-hashed value.\nSign = Ed25519\nInput = \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"\nError = OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\n\nVerify = Ed25519\nInput = \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\nError = OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\n",
+    "he above, but with too few leading zeros.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = c5926600f160f85e7fe950cfe123908384211cd8fe25c90cb8e8cc0593308e9aa2efe3acbf100ec1658ded8f72f506525fc2c44f06251b08d896e7bb3f05b135\nError = DATA_LEN_NOT_EQUAL_TO_MOD_LEN\n\n# The above, but with too many leading zeros.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 0000c5926600f160f85e7fe950cfe123908384211cd8fe25c90cb8e8cc0593308e9aa2efe3acbf100ec1658ded8f72f506525fc2c44f06251b08d896e7bb3f05b135\nError = DATA_LEN_NOT_EQUAL_TO_MOD_LEN\n\n# The above with an invalid leading byte. The top few bits of EM are required to\n# be cleared.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 007f803c832a2090aea04013d9fa9c1630732a1625232826d235f0950f7050d3fb0eb06ef9ea8b260fad68e1165a2d770a8c7fc7a8aaa68620b021fc19c97e0041\nError = FIRST_OCTET_INVALID\n\n# The above with an invalid trailing byte.\nVerify = RSA-515\nRSAPadding = PSS\nPSSSaltLength = 0\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 03e68555035891eb08d96c0967db22328cd892ad2856d88516ecb946bfdba732bb029b5c0dfa2119ed7349897d2324e95e86d91d0c4afc82700a36db8933abbf58\nError = LAST_OCTET_INVALID\n\n# Non-zero salt length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 32\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n# Non-zero salt length, wrong salt length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = 31\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\nError = SLEN_CHECK_FAILED\n\n# Non-zero salt length, match hash length.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = -1\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n# Non-zero salt length, auto-detected.\nVerify = RSA-2048-SPKI\nRSAPadding = PSS\nPSSSaltLength = -2\nDigest = SHA256\nInput = \"0123456789ABCDEF0123456789ABCDEF\"\nOutput = 4065b284b0a6e98d4c41a8427007f878d8dd61599c87764fa79b8bf03f030c48127a4b1a5af5a6e0cf9055e57a1f47e5b0c0d8c600e78369cf1c39374899fac91a812692aa2216ba10900ce85a5cf7fddcafb726e4b83479c5bb7b3b84b08ffe183b4c2973aa3193ec7b7d4ea73bf1b579c6657b78ad7800e1975a4838c28ffe353fafef96be27b5c69677760a71b6f4df65ba6fe6b3565580a536f966928294c6e9ece807a90c1477779bcbfa3a250e98d685097c162c1c8c56ab02bd2e16eec7a019b51c067bdba7fa8cd5460796e22c607a8b6d12e1deb9be51c6943c46590f416800c48bb4cbb8c409d316573e59eadf7d3b9e6e5c2d0e570692e511e139\n\n\n# RSA decrypt\n\nDecrypt = RSA-2048\nInput = 550af55a2904e7b9762352f8fb7fa235a9cb053aacb2d5fcb8ca48453cb2ee3619746c701abf2d4cc67003471a187900b05aa812bd25ed05c675dfc8c97a24a7bf49bd6214992cad766d05a9a2b57b74f26a737e0237b8b76c45f1f226a836d7cfbc75ba999bdbe48dbc09227aa46c88f21dccba7840141ad5a5d71fd122e6bd6ac3e564780dfe623fc1ca9b995a6037bf0bbd43b205a84ac5444f34202c05ce9113087176432476576de6ffff9a52ea57c08be3ec2f49676cb8e12f762ac71fa3c321e00ac988910c85ff52f93825666ce0d40ffaa0592078919d4493f46d95ccf76364c6d57760dd0b64805f9afc76a2365a5575ca301d5103f0ea76cb9a78\nOutput = \"Hello World\"\n\n# Corrupted ciphertext\nDecrypt = RSA-2048\nInput = 550af55a2904e7b9762352f8fb7fa235a9cb053aacb2d5fcb8ca48453cb2ee3619746c701abf2d4cc67003471a187900b05aa812bd25ed05c675dfc8c97a24a7bf49bd6214992cad766d05a9a2b57b74f26a737e0237b8b76c45f1f226a836d7cfbc75ba999bdbe48dbc09227aa46c88f21dccba7840141ad5a5d71fd122e6bd6ac3e564780dfe623fc1ca9b995a6037bf0bbd43b205a84ac5444f34202c05ce9113087176432476576de6ffff9a52ea57c08be3ec2f49676cb8e12f762ac71fa3c321e00ac988910c85ff52f93825666ce0d40ffaa0592078919d4493f46d95ccf76364c6d57760dd0b64805f9afc76a2365a5575ca301d5103f0ea76cb9a79\nError = PKCS_DECODING_ERROR\n\n# OAEP padding\nDecrypt = RSA-2048\nRSAPadding = OAEP\nInput = 458708dfbd42a1297ce7a9c86c7087ab80b1754810929b89c5107ca55368587686986fce94d86cc1595b3fb736223a656ec0f34d18ba1cc5665593610f56c58e26b272d584f3d983a5c91085700755aebd921fb280bba3eda7046ec07b43e7298e52d59edc92be4639a8ce08b2f85976ecf6d98cc469eeb9d5d8e2a32ea8a6626edafe1038b3df455668a9f3c77cad8b92fb872e00058c3d2a7ede1a1f03fc5622084ae04d9d24f6bf0995c58d35b93b699b9763595e123f2ab0863cc9229eb290e2ede7715c7a8f39e0b9a3e2e1b56ebb62f1cbfbb5986fb212ebd785b83d01d968b11d1756c7337f70c1f1a63bff03608e24f3a2fd44e67f832a8701c5d5af\nOutput = \"Hello World\"\n\n# OAEP padding with label and custom hash.\nDecrypt = RSA-2048\nRSAPadding = OAEP\nOAEPDigest = SHA512\nOAEPLabel = 00112233445566778899aabbccddeeff\nInput = 48b956c22b8e40cc38f0893672ddf488fc806cf1fcc6239c66dd8345eb543d6b5cac589e6c7ae86dac1c2436c4d72c48009a737b2c649e6000dbab17203e4d9c078bd70b649700a0830d4ddc396af0c48973177a229e48259d93247f04f76474c7611b530c66f020c4da2cc861c2e4104831ecc0336e0cb10d6520fdefd0b33606f5cdd736dd439583b9b6011cce99623c93caf5f76e21e9fefab414795dd5ac12cba551be74ebf266834fcffab182c5e7c9b6c064df154cb26ddfd4fe2fd87590005f4bf45e776a0082803e9f68995b8eeb4c6802c67b5ef349e5b2dc0cf7a12fc097030f2bd28f0253f17129b04c82993a12957728b35880fdd2f8d0cc469f\nOutput = \"Hello World\"\n\n# OAEP padding, corrupted ciphertext\nDecrypt = RSA-2048\nRSAPadding = OAEP\nInput = 458708dfbd42a1297ce7a9c86c7087ab80b1754810929b89c5107ca55368587686986fce94d86cc1595b3fb736223a656ec0f34d18ba1cc5665593610f56c58e26b272d584f3d983a5c91085700755aebd921fb280bba3eda7046ec07b43e7298e52d59edc92be4639a8ce08b2f85976ecf6d98cc469eeb9d5d8e2a32ea8a6626edafe1038b3df455668a9f3c77cad8b92fb872e00058c3d2a7ede1a1f03fc5622084ae04d9d24f6bf0995c58d35b93b699b9763595e123f2ab0863cc9229eb290e2ede7715c7a8f39e0b9a3e2e1b56ebb62f1cbfbb5986fb212ebd785b83d01d968b11d1756c7337f70c1f1a63bff03608e24f3a2fd44e67f832a8701c5d5ac\nError = OAEP_DECODING_ERROR\n\n# Test that RSA encryption successfully round-trips through decryption\n# with various parameters.\nEncrypt = RSA-2048\nInput = \"Hello World\"\nCheckDecrypt\n\nEncrypt = RSA-2048\nRSAPadding = OAEP\nInput = \"Hello World\"\nCheckDecrypt\n\nEncrypt = RSA-2048\nRSAPadding = OAEP\nOAEPDigest = SHA512\nOAEPLabel = 00112233445566778899aabbccddeeff\nInput = \"Hello World\"\nCheckDecrypt\n\n# Though we will never generate such a key, test that RSA keys where p < q work\n# properly.\nPrivateKey = RSA-Swapped\nType = RSA\nInput = 30820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100ab28f98747934779011417d5bbb4095eae6f48ed09e13081616cf390aac75b10a206a98953d402647dfef7fa363be2765a303b05ec388bd9a1d75123a1205b4ecb43c33f2e37d3e30842181d694a3acfc39afc52554946e699d97d97066596a46725ce6dea322623afcafecbd2884d9a0c5eae9c4d7da8874c29c19edb762e1902030100010281800d637ea568e169f15ab6be288f6ec55edd29425c9c6dbb941b5160fa1b89cda34ef15378b5107c016d63b0f52721e71497f876dd7f3d6b1f228c4bc20c3c12384644200e91130c9195660d1e706f55b",
+    "2accf00c5e2174a1d9ee289f0e763ee58860485ec97d19d7fa2df38af5b5910b1fa52087768d288e6ec4c8d5eca23c8d3024100be757a24dc2c923692d964693b2d71ca33ccb2f946f9e5232d2090b715a97dca554068fab8876105bc9ed6dccfd0917c5e0b80339306535c3eeb787e89397bc7024100e60f5c9e52434da079b8c641791a81a96daa4d9921a07e5b48292a9fce230df7c9fc2b97b5e38834ed5caaa387a0bca35c474e989a68dd65b79a6f691a74471f0240438ccf017bc5a3260ff76291a01782204136fcd344c524ebd0f997da17a8c1a09d93f6a7d602cdfa86e79f3539cfb389f4a1079b432e1f2abc762f8a51893dc9024046604ca4e1e554c9d27283b363a888219c3a8ca25b770d303f52d8872a37eefdedfc0619d2ba57e058fc0ff71676453e73ec1c4ef26d41ccebed824754a05d6102404445374d8450e753e0a42085b56b0d6d500b3e3518536dc8f12ec8fd77aa75491835327ac0e12d73b5c3f1b09d03f6a24fe63b9c551dee6559b625435ec92429\n\nSign = RSA-Swapped\nDigest = SHA256\nInput = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\nOutput = 07fa4e3de9c002c41c952dc292ef5a814c4c17dc1a6cf958c4c971e8089676d6661b442270ef9295c41e5385c9628aa1bdee2cc2558b8473ba212f2ba04b9ff2264c19187b9506b1d0a1cc2751844cc8dedf555d62ce81bc0e70bfe83d0184ee964593af91b9b327c0fb272c799148cd8737d412cbf36c2ad25fd66977bf805f\n\n# Though we will never generate such a key, test that RSA keys where p and q are\n# different sizes work properly.\nPrivateKey = RSA-PrimeMismatch\nType = RSA\nInput = 30820295020100300d06092a864886f70d01010105000482027f3082027b02010002818100c766f4fef89f5e9a8e13ed500fb38523ea94d7f8be066900eee58c913b4c6fdcb13d63d39b9108feabcefd1ffd04776403dc58f968ae817977d0809e567d8af512d604a0e9cb448fa5e402204ee519712a5ebbfd002faf8169495a782f54366b4665aac0d968bfec63c5446b6f9b13061c7f3d1f3f1b6bede8fff881b410a66f0203010001028180528c062f49485c771a0b18ca747d8a47f8941ea63c305626cb3f1f067e6861c4441c432687dbd08d484aac3b01f3ffdc3b762c719167f7cb22e565aa6acd597306ef6f7828b9720e9d440816186d940c4c5a9720dddf71fe0b59483f02a751515c8c27e43c575d6725d55f5bb77e0f977773b00afc058cfab6617ec90d0b62a9026100cb8f97c37b4fbc298b645bc3dc0526f8a4274e9a193b33c3acb76499b5b96330e4b586cbaa56368ffc12644952322253bc669496d572c0980f125fd7273739cf790d24401052b13732114d397c8c16a44716dc62d2320fb1ced99290dfd53e07022100fac51ac653609cdaba53280c6b6f209052e270be0c3c68fe8b37d6bf05fbba59026038dff2f04c58d7e2e7ae6fb1469d2de954bc22cb0d77ac1be4fb0ca1a1d39d7240c4b357de4cde4bd68b30f8077e38771af1b25c7e60e48cd7d1337402e1fc460ab57046720918b8aa4589452196669119c7ba65e602d4bdc264a9fdce7c5f2b0220773af0180bdc8bb7938fa6230191bcb1e236b7d4248d347e9242e25fc0c0874102605c4894cde334889f5b52ed8f86a2ee9c1fbe4166287e24ce44f3093bff383962f08043842f6ff3e6002104b0e29442c4a4483c5d06e2254fbe5e3930de3d0e28af10e96c6e341a4b8859382dbba24536a38ae71118e3e22413a93f298a7f744c\n\nSign = RSA-PrimeMismatch\nDigest = SHA256\nInput = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\nOutput = 6192b1ce630c87d02e8245fd74d4f6ecac37eef979d188c8fa48c4d355fbe814e7dd3152f42bb020d769b540d11867af5b947387b8c99158d56901ff3708e423931178213916ae1002f162c9d497aacacdcb20e6ffe7ed40138a253fc943ddf3587433df5831a3ce46aeefce358a009bf6bad12d82d77424c2755d984d7da196\n\n\n# EC tests\n\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\n\nVerify = P-256-SPKI\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\n\n# Digest too long\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF12345\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Digest too short\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF123\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Digest invalid\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1235\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8\nError = BAD_SIGNATURE\n\n# Invalid signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec7\nError = BAD_SIGNATURE\n\n# Garbage after signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec800\nError = BAD_SIGNATURE\n\n# BER signature\nVerify = P-256\nDigest = SHA1\nInput = \"0123456789ABCDEF1234\"\nOutput = 3080022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec80000\nError = BAD_SIGNATURE\n\n\n# Additional RSA-PSS and RSA-OAEP tests converted from\n# ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip\n\nPublicKey = RSA-PSS-1\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a21370203010001\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = cd8b6538cb8e8de566b68bd067569dbf1ee2718e\nOutput = 9074308fb598e9701b2294388e52f971faac2b60a5145af185df5287b5ed2887e57ce7fd44dc8634e407c8e0e4360bc226f3ec227f9d9e54638e8d31f5051215df6ebb9c2f9579aa77598a38f914b5b9c1bd83c4e2f9f382a0d0aa3542ffee65984a601bc69eb28deb27dca12c82c2d4c3f66cd500f1ff2b994d8a4e30cbb33c\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e35befc17a1d160b9ce35fbd8eb16e7ee491d3fd\nOutput = 3ef7f46e831bf92b32274142a585ffcefbdca7b32ae90d10fb0f0c729984f04ef29a9df0780775ce43739b97838390db0a5505e63de927028d9d29b219ca2c4517832558a55d694a6d25b9dab66003c4cccd907802193be5170d26147d37b93590241be51c25055f47ef62752cfbe21418fafe98c22c4d4d47724fdb5669e843\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0652ec67bcee30f9d2699122b91c19abdba89f91\nOutput = 666026fba71bd3e7cf13157cc2c51a8e4aa684af9778f91849f34335d141c00154c4197621f9624a675b5abc22ee7d5baaffaae1c9baca2cc373b3f33e78e6143c395a91aa7faca664eb733afd14d8827259d99a7550faca501ef2b04e33c23aa51f4b9e8282efdb728cc0ab09405a91607c6369961bc8270d2d4f39fce612b1\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 39c21c4cceda9c1adf839c744e1212a6437575ec\nOutput = 4609793b23e9d09362dc21bb47da0b4f3a7622649a47d464019b9aeafe53359c178c91cd58ba6bcb78be0346a7bc637f4b873d4bab38ee661f199634c547a1ad8442e03da015b136e543f7ab07c0c13e4225b8de8cce25d4f6eb8400f81f7e1833b7ee6e334d370964ca79fdb872b4d75223b5eeb08101591fb532d155a6de87\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 36dae913b77bd17cae6e7b09453d24544cebb33c\nOutput = 1d2aad221ca4d31ddf13509239019398e3d14b32dc34dc5af4aeaea3c095af73479cf0a45e5629635a53a018377615b16cb9b13b3e09d671eb71e387b8545c5960da5a64776e768e82b2c93583bf104c3fdb23512b7b4e89f633dd0063a530db4524b01c3f384c09310e315a79dcd3d684022a7f31c865a664e316978b759fad\n\nVerify = RSA-PSS-1\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 45eef191f4f79c31fe5d2ede7e5098994e929d2d\nOutput = 2a34f6125e1f6b0bf971e84fbd41c632be8f2c2ace7de8b6926e31ff93e9af987fbc06e51e9be14f5198f91f3f953bd67da60a9df59764c3dc0fe08e1cbef0b75f868d10ad3fba749fef59fb6dac46a0d6e504369331586f58e4628f39aa278982543bc0eeb537dc61958019b394fb273f215858a0a01ac4d650b955c67f4c58\n\nPublicKey = RSA-PSS-2\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818101d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c90203010001\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 5c81a3e2a658246628cd0ee8b00bb4c012bc9739\nOutput = 014c5ba5338328ccc6e7a90bf1c0ab3fd606ff4796d3c12e4b639ed9136a5fec6c16d8884bd",
+    "d99cfdc521456b0742b736868cf90de099adb8d5ffd1deff39ba4007ab746cefdb22d7df0e225f54627dc65466131721b90af445363a8358b9f607642f78fab0ab0f43b7168d64bae70d8827848d8ef1e421c5754ddf42c2589b5b3\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 27f71611446aa6eabf037f7dedeede3203244991\nOutput = 010991656cca182b7f29d2dbc007e7ae0fec158eb6759cb9c45c5ff87c7635dd46d150882f4de1e9ae65e7f7d9018f6836954a47c0a81a8a6b6f83f2944d6081b1aa7c759b254b2c34b691da67cc0226e20b2f18b42212761dcd4b908a62b371b5918c5742af4b537e296917674fb914194761621cc19a41f6fb953fbcbb649dea\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 03ecc2c33e93f05fc7224fcc0d461356cb897217\nOutput = 007f0030018f53cdc71f23d03659fde54d4241f758a750b42f185f87578520c30742afd84359b6e6e8d3ed959dc6fe486bedc8e2cf001f63a7abe16256a1b84df0d249fc05d3194ce5f0912742dbbf80dd174f6c51f6bad7f16cf3364eba095a06267dc3793803ac7526aebe0a475d38b8c2247ab51c4898df7047dc6adf52c6c4\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 246c727b4b9494849dddb068d582e179ac20999c\nOutput = 009cd2f4edbe23e12346ae8c76dd9ad3230a62076141f16c152ba18513a48ef6f010e0e37fd3df10a1ec629a0cb5a3b5d2893007298c30936a95903b6ba85555d9ec3673a06108fd62a2fda56d1ce2e85c4db6b24a81ca3b496c36d4fd06eb7c9166d8e94877c42bea622b3bfe9251fdc21d8d5371badad78a488214796335b40b\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e8617ca3ea66ce6a58ede2d11af8c3ba8a6ba912\nOutput = 00ec430824931ebd3baa43034dae98ba646b8c36013d1671c3cf1cf8260c374b19f8e1cc8d965012405e7e9bf7378612dfcc85fce12cda11f950bd0ba8876740436c1d2595a64a1b32efcfb74a21c873b3cc33aaf4e3dc3953de67f0674c0453b4fd9f604406d441b816098cb106fe3472bc251f815f59db2e4378a3addc181ecf\n\nVerify = RSA-PSS-2\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7a6fdc1a4e434ecbc35d657ad49a2f4fafd43bc8\nOutput = 00475b1648f814a8dc0abdc37b5527f543b666bb6e39d30e5b49d3b876dccc58eac14e32a2d55c2616014456ad2f246fc8e3d560da3ddf379a1c0bd200f10221df078c219a151bc8d4ec9d2fc2564467811014ef15d8ea01c2ebbff8c2c8efab38096e55fcbe3285c7aa558851254faffa92c1c72b78758663ef4582843139d7a6\n\nPublicKey = RSA-PSS-3\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818102f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a4430203010001\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3552be69dd74bdc56d2cf8c38ef7bafe269040fe\nOutput = 0088b135fb1794b6b96c4a3e678197f8cac52b64b2fe907d6f27de761124964a99a01a882740ecfaed6c01a47464bb05182313c01338a8cd097214cd68ca103bd57d3bc9e816213e61d784f182467abf8a01cf253e99a156eaa8e3e1f90e3c6e4e3aa2d83ed0345b89fafc9c26077c14b6ac51454fa26e446e3a2f153b2b16797f\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 609143ff7240e55c062aba8b9e4426a781919bc9\nOutput = 02a5f0a858a0864a4f65017a7d69454f3f973a2999839b7bbc48bf78641169179556f595fa41f6ff18e286c2783079bc0910ee9cc34f49ba681124f923dfa88f426141a368a5f5a930c628c2c3c200e18a7644721a0cbec6dd3f6279bde3e8f2be5e2d4ee56f97e7ceaf33054be7042bd91a63bb09f897bd41e81197dee99b11af\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0afd22f879a9cda7c584f4135f8f1c961db114c0\nOutput = 0244bcd1c8c16955736c803be401272e18cb990811b14f72db964124d5fa760649cbb57afb8755dbb62bf51f466cf23a0a1607576e983d778fceffa92df7548aea8ea4ecad2c29dd9f95bc07fe91ecf8bee255bfe8762fd7690aa9bfa4fa0849ef728c2c42c4532364522df2ab7f9f8a03b63f7a499175828668f5ef5a29e3802c\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 405dd56d395ef0f01b555c48f748cc32b210650b\nOutput = 0196f12a005b98129c8df13c4cb16f8aa887d3c40d96df3a88e7532ef39cd992f273abc370bc1be6f097cfebbf0118fd9ef4b927155f3df22b904d90702d1f7ba7a52bed8b8942f412cd7bd676c9d18e170391dcd345c06a730964b3f30bcce0bb20ba106f9ab0eeb39cf8a6607f75c0347f0af79f16afa081d2c92d1ee6f836b8\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = a2c313b0440c8a0c47233b87f0a160c61af3eae7\nOutput = 021eca3ab4892264ec22411a752d92221076d4e01c0e6f0dde9afd26ba5acf6d739ef987545d16683e5674c9e70f1de649d7e61d48d0caeb4fb4d8b24fba84a6e3108fee7d0705973266ac524b4ad280f7ae17dc59d96d3351586b5a3bdb895d1e1f7820ac6135d8753480998382ba32b7349559608c38745290a85ef4e9f9bd83\n\nVerify = RSA-PSS-3\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f1bf6ca7b4bbdbb6bf20a4bf55728725d177154a\nOutput = 012fafec862f56e9e92f60ab0c77824f4299a0ca734ed26e0644d5d222c7f0bde03964f8e70a5cb65ed44e44d56ae0edf1ff86ca032cc5dd4404dbb76ab854586c44eed8336d08d457ce6c03693b45c0f1efef93624b95b8ec169c616d20e5538ebc0b6737a6f82b4bc0570924fc6b35759a3348426279f8b3d7744e2d222426ce\n\nPublicKey = RSA-PSS-4\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c37050203010001\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f8b0abf70fec0bca74f0accbc24f75e6e90d3bfd\nOutput = 0323d5b7bf20ba4539289ae452ae4297080feff4518423ff4811a817837e7d82f1836cdfab54514ff0887bddeebf40bf99b047abc3ecfa6a37a3ef00f4a0c4a88aae0904b745c846c4107e8797723e8ac810d9e3d95dfa30ff4966f4d75d13768d20857f2b1406f264cfe75e27d7652f4b5ed3575f28a702f8c4ed9cf9b2d44948\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 04a10944bfe11ab801e77889f3fd3d7f4ff0b629\nOutput = 049d0185845a264d28feb1e69edaec090609e8e46d93abb38371ce51f4aa65a599bdaaa81d24fba66a08a116cb644f3f1e653d95c89db8bbd5daac2709c8984000178410a7c6aa8667ddc38c741f710ec8665aa9052be929d4e3b16782c1662114c5414bb0353455c392fc28f3db59054b5f365c49e1d156f876ee10cb4fd70598\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ba01243db223eb97fb86d746c3148adaaa0ca344\nOutput = 03fbc410a2ced59500fb99f9e2af2781ada74e13145624602782e2994813eefca0519ecd253b855fb626a90d771eae028b0c47a199cbd9f8e3269734af4163599090713a3fa910fa0960652721432b971036a7181a2bc0cab43b0b598bc6217461d7db305ff7e954c5b5bb231c39e791af6bcfa76b147b081321f72641482a2aad\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 934bb0d38d6836daec9de82a9648d4593da67cd2\nOutput = 0486644bc66bf75d28335a6179b10851f43f09bded9fac1af33252bb9953ba4298cd6466b27539a70adaa3f89b3db3c74ab635d122f4ee7ce557a61e59b82ffb786630e5f9db53c77d9a0c12fab5958d4c2ce7daa807cd89ba2cc7fcd02ff470ca67b229fcce814c852c73cc93bea35be68459ce478e9d4655d121c8472f371d4f\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ec35d81abd1cceac425a935758b683465c8bd879\nOutput = 022a80045353904cb30cbb542d7d4990421a6eec16a8029a8422adfd22d6aff8c4cc0294af110a0c067ec86a7d364134459bb1ae8ff836d5a8a2579840996b320b19f13a13fad378d931a65625dae2739f0c53670b35d9d3cbac08e733e4ec2b83af4b9196d63e7c4ff1ddeae2a122791a125bfea8deb0de8ccf1f4ffaf6e6fb0a\n\nVerify = RSA-PSS-4\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 72ce251d17b04dd3970d6ff1fbe3624899e9e941\nOutput = 00938dcb6d583046065f69c78da7a1f1757066a7fa75125a9d2929f0b79a60b627b082f11f5b196f28eb9daa6f21c05e5140f6aef1737d2023075c05ecf04a028c686a2ab3e7d5a0664f295ce12995e890908b6ad21f0839eb65b70393a7b5afd9871de0caa0cedec5b819626756209d13ab1e7bb9546a26ff37e9a51af9fd562e\n\nPublicKey = RSA-PSS-5\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d003081890281810d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc5070203010001\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = d98b7061943510bc3dd9162f7169aabdbdcd0222\nOutput = 0ba373f76e0921b70a8fbfe622f0bf77b28a3db98e361051c3d7cb92ad0452915a4de9c01722f6823eeb6adf7e0ca8290f5de3e549890ac2a3c5950ab217ba58590894952de96f8df111b2575215da6c161590c745be612476ee578ed384ab33e3ece97481a252f5c79a98b5532ae00cdd62f2ecc0cd1baefe80d80b962193ec1d\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7ae8e699f754988f4fd645e463302e49a2552072\nOutput = 08180de825e4b8b014a32da8ba761555921204f2f90d5f24b712908ff84f3e220ad17997c0dd6e706630ba3e84add4d5e7",
+    "ab004e58074b549709565d43ad9e97b5a7a1a29e85b9f90f4aafcdf58321de8c5974ef9abf2d526f33c0f2f82e95d158ea6b81f1736db8d1af3d6ac6a83b32d18bae0ff1b2fe27de4c76ed8c7980a34e\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 8d46c7c05534c1ba2cc7624500d48a4531604bff\nOutput = 05e0fdbdf6f756ef733185ccfa8ced2eb6d029d9d56e35561b5db8e70257ee6fd019d2f0bbf669fe9b9821e78df6d41e31608d58280f318ee34f559941c8df13287574bac000b7e58dc4f414ba49fb127f9d0f8936638c76e85356c994f79750f7fa3cf4fd482df75e3fb9978cd061f7abb17572e6e63e0bde12cbdcf18c68b979\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ee3de96783fd0a157c8b20bf5566124124dcfe65\nOutput = 0bc989853bc2ea86873271ce183a923ab65e8a53100e6df5d87a24c4194eb797813ee2a187c097dd872d591da60c568605dd7e742d5af4e33b11678ccb63903204a3d080b0902c89aba8868f009c0f1c0cb85810bbdd29121abb8471ff2d39e49fd92d56c655c8e037ad18fafbdc92c95863f7f61ea9efa28fea401369d19daea1\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 1204df0b03c2724e2709c23fc71789a21b00ae4c\nOutput = 0aefa943b698b9609edf898ad22744ac28dc239497cea369cbbd84f65c95c0ad776b594740164b59a739c6ff7c2f07c7c077a86d95238fe51e1fcf33574a4ae0684b42a3f6bf677d91820ca89874467b2c23add77969c80717430d0efc1d3695892ce855cb7f7011630f4df26def8ddf36fc23905f57fa6243a485c770d5681fcd\n\nVerify = RSA-PSS-5\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 29926bc3280c841f601acd0d6f17ea38023eddbc\nOutput = 02802dccfa8dfaf5279bf0b4a29ba1b157611faeaaf419b8919d15941900c1339e7e92e6fae562c53e6cc8e84104b110bce03ad18525e3c49a0eadad5d3f28f244a8ed89edbafbb686277cfa8ae909714d6b28f4bf8e293aa04c41efe7c0a81266d5c061e2575be032aa464674ff71626219bd74cc45f0e7ed4e3ff96eee758e8f\n\nPublicKey = RSA-PSS-6\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d10203010001\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = ab464e8cb65ae5fdea47a53fa84b234d6bfd52f6\nOutput = 04c0cfacec04e5badbece159a5a1103f69b3f32ba593cb4cc4b1b7ab455916a96a27cd2678ea0f46ba37f7fc9c86325f29733b389f1d97f43e7201c0f348fc45fe42892335362eee018b5b161f2f9393031225c713012a576bc88e23052489868d9010cbf033ecc568e8bc152bdc59d560e41291915d28565208e22aeec9ef85d1\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 92d0bcae82b641f578f040f5151be8eda6d42299\nOutput = 0a2314250cf52b6e4e908de5b35646bcaa24361da8160fb0f9257590ab3ace42b0dc3e77ad2db7c203a20bd952fbb56b1567046ecfaa933d7b1000c3de9ff05b7d989ba46fd43bc4c2d0a3986b7ffa13471d37eb5b47d64707bd290cfd6a9f393ad08ec1e3bd71bb5792615035cdaf2d8929aed3be098379377e777ce79aaa4773\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3569bd8fd2e28f2443375efa94f186f6911ffc2b\nOutput = 086df6b500098c120f24ff8423f727d9c61a5c9007d3b6a31ce7cf8f3cbec1a26bb20e2bd4a046793299e03e37a21b40194fb045f90b18bf20a47992ccd799cf9c059c299c0526854954aade8a6ad9d97ec91a1145383f42468b231f4d72f23706d9853c3fa43ce8ace8bfe7484987a1ec6a16c8daf81f7c8bf42774707a9df456\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7abbb7b42de335730a0b641f1e314b6950b84f98\nOutput = 0b5b11ad549863ffa9c51a14a1106c2a72cc8b646e5c7262509786105a984776534ca9b54c1cc64bf2d5a44fd7e8a69db699d5ea52087a4748fd2abc1afed1e5d6f7c89025530bdaa2213d7e030fa55df6f34bcf1ce46d2edf4e3ae4f3b01891a068c9e3a44bbc43133edad6ecb9f35400c4252a5762d65744b99cb9f4c559329f\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 55b7eb27be7a787a59eb7e5fac468db8917a7725\nOutput = 02d71fa9b53e4654fefb7f08385cf6b0ae3a817942ebf66c35ac67f0b069952a3ce9c7e1f1b02e480a9500836de5d64cdb7ecde04542f7a79988787e24c2ba05f5fd482c023ed5c30e04839dc44bed2a3a3a4fee01113c891a47d32eb8025c28cb050b5cdb576c70fe76ef523405c08417faf350b037a43c379339fcb18d3a356b\n\nVerify = RSA-PSS-6\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = de2fa0367ef49083ff89b9905d3fd646fcc12c38\nOutput = 0a40a16e2fe2b38d1df90546167cf9469c9e3c3681a3442b4b2c2f581deb385ce99fc6188bb02a841d56e76d301891e24560550fcc2a26b55f4ccb26d837d350a154bcaca8392d98fa67959e9727b78cad03269f56968fc56b68bd679926d83cc9cb215550645ccda31c760ff35888943d2d8a1d351e81e5d07b86182e751081ef\n\nPublicKey = RSA-PSS-7\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d0030818902818137c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab30203010001\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 8be4afbdd76bd8d142c5f4f46dba771ee5d6d29d\nOutput = 187f390723c8902591f0154bae6d4ecbffe067f0e8b795476ea4f4d51ccc810520bb3ca9bca7d0b1f2ea8a17d873fa27570acd642e3808561cb9e975ccfd80b23dc5771cdb3306a5f23159dacbd3aa2db93d46d766e09ed15d900ad897a8d274dc26b47e994a27e97e2268a766533ae4b5e42a2fcaf755c1c4794b294c60555823\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 402140dc605b2f5c5ec0d15bce9f9ba8857fe117\nOutput = 10fd89768a60a67788abb5856a787c8561f3edcf9a83e898f7dc87ab8cce79429b43e56906941a886194f137e591fe7c339555361fbbe1f24feb2d4bcdb80601f3096bc9132deea60ae13082f44f9ad41cd628936a4d51176e42fc59cb76db815ce5ab4db99a104aafea68f5d330329ebf258d4ede16064bd1d00393d5e1570eb8\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 3e885205892ff2b6b37c2c4eb486c4bf2f9e7f20\nOutput = 2b31fde99859b977aa09586d8e274662b25a2a640640b457f594051cb1e7f7a911865455242926cf88fe80dfa3a75ba9689844a11e634a82b075afbd69c12a0df9d25f84ad4945df3dc8fe90c3cefdf26e95f0534304b5bdba20d3e5640a2ebfb898aac35ae40f26fce5563c2f9f24f3042af76f3c7072d687bbfb959a88460af1\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 1fc2201d0c442a4736cd8b2cd00c959c47a3bf42\nOutput = 32c7ca38ff26949a15000c4ba04b2b13b35a3810e568184d7ecabaa166b7ffabddf2b6cf4ba07124923790f2e5b1a5be040aea36fe132ec130e1f10567982d17ac3e89b8d26c3094034e762d2e031264f01170beecb3d1439e05846f25458367a7d9c02060444672671e64e877864559ca19b2074d588a281b5804d23772fbbe19\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = e4351b66819e5a31501f89acc7faf57030e9aac5\nOutput = 07eb651d75f1b52bc263b2e198336e99fbebc4f332049a922a10815607ee2d989db3a4495b7dccd38f58a211fb7e193171a3d891132437ebca44f318b280509e52b5fa98fcce8205d9697c8ee4b7ff59d4c59c79038a1970bd2a0d451ecdc5ef11d9979c9d35f8c70a6163717607890d586a7c6dc01c79f86a8f28e85235f8c2f1\n\nVerify = RSA-PSS-7\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 49f6cc58365e514e1a3f301f4de16f9fb5347ff2\nOutput = 18da3cdcfe79bfb77fd9c32f377ad399146f0a8e810620233271a6e3ed3248903f5cdc92dc79b55d3e11615aa056a795853792a3998c349ca5c457e8ca7d29d796aa24f83491709befcfb1510ea513c92829a3f00b104f655634f320752e130ec0ccf6754ff893db302932bb025eb60e87822598fc619e0e981737a9a4c4152d33\n\nPublicKey = RSA-PSS-8\nType = RSA\nInput = 30819f300d06092a864886f70d010101050003818d00308189028181495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f0203010001\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = a1dd230d8ead860199b6277c2ecfe3d95f6d9160\nOutput = 0262ac254bfa77f3c1aca22c5179f8f040422b3c5bafd40a8f21cf0fa5a667ccd5993d42dbafb409c520e25fce2b1ee1e716577f1efa17f3da28052f40f0419b23106d7845aaf01125b698e7a4dfe92d3967bb00c4d0d35ba3552ab9a8b3eef07c7fecdbc5424ac4db1e20cb37d0b2744769940ea907e17fbbca673b20522380c5\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = f6e68e53c602c5c65fa67b5aa6d786e5524b12ab\nOutput = 2707b9ad5115c58c94e932e8ec0a280f56339e44a1b58d4ddcff2f312e5f34dcfe39e89c6a94dcee86dbbdae5b79ba4e0819a9e7bfd9d982e7ee6c86ee68396e8b3a14c9c8f34b178eb741f9d3f121109bf5c8172fada2e768f9ea1433032c004a8aa07eb990000a48dc94c8bac8aabe2b09b1aa46c0a2aa0e12f63fbba775ba7e\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = d6f9fcd3ae27f32bb2c7c93536782eba52af1f76\nOutput = 2ad20509d78cf26d1b6c406146086e4b0c91a91c2bd164c87b966b8faa42aa0ca446022323ba4b1a1b89706d7f4c3be57d7b69702d168ab5955ee2903",
+    "56b8c4a29ed467d547ec23cbadf286ccb5863c6679da467fc9324a151c7ec55aac6db4084f82726825cfe1aa421bc64049fb42f23148f9c25b2dc300437c38d428aa75f96\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 7ff2a53ce2e2d900d468e498f230a5f5dd0020de\nOutput = 1e24e6e58628e5175044a9eb6d837d48af1260b0520e87327de7897ee4d5b9f0df0be3e09ed4dea8c1454ff3423bb08e1793245a9df8bf6ab3968c8eddc3b5328571c77f091cc578576912dfebd164b9de5454fe0be1c1f6385b328360ce67ec7a05f6e30eb45c17c48ac70041d2cab67f0a2ae7aafdcc8d245ea3442a6300ccc7\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 4eb309f7022ba0b03bb78601b12931ec7c1be8d3\nOutput = 33341ba3576a130a50e2a5cf8679224388d5693f5accc235ac95add68e5eb1eec31666d0ca7a1cda6f70a1aa762c05752a51950cdb8af3c5379f18cfe6b5bc55a4648226a15e912ef19ad77adeea911d67cfefd69ba43fa4119135ff642117ba985a7e0100325e9519f1ca6a9216bda055b5785015291125e90dcd07a2ca9673ee\n\nVerify = RSA-PSS-8\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 65033bc2f67d6aba7d526acb873b8d9241e5e4d9\nOutput = 1ed1d848fb1edb44129bd9b354795af97a069a7a00d0151048593e0c72c3517ff9ff2a41d0cb5a0ac860d736a199704f7cb6a53986a88bbd8abcc0076a2ce847880031525d449da2ac78356374c536e343faa7cba42a5aaa6506087791c06a8e989335aed19bfab2d5e67e27fb0c2875af896c21b6e8e7309d04e4f6727e69463e\n\nPublicKey = RSA-PSS-9\nType = RSA\nInput = 3081df300d06092a864886f70d01010105000381cd003081c90281c100e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b0203010001\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 2715a49b8b0012cd7aee84c116446e6dfe3faec0\nOutput = 586107226c3ce013a7c8f04d1a6a2959bb4b8e205ba43a27b50f124111bc35ef589b039f5932187cb696d7d9a32c0c38300a5cdda4834b62d2eb240af33f79d13dfbf095bf599e0d9686948c1964747b67e89c9aba5cd85016236f566cc5802cb13ead51bc7ca6bef3b94dcbdbb1d570469771df0e00b1a8a06777472d2316279edae86474668d4e1efff95f1de61c6020da32ae92bbf16520fef3cf4d88f61121f24bbd9fe91b59caf1235b2a93ff81fc403addf4ebdea84934a9cdaf8e1a9e\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 2dac956d53964748ac364d06595827c6b4f143cd\nOutput = 80b6d643255209f0a456763897ac9ed259d459b49c2887e5882ecb4434cfd66dd7e1699375381e51cd7f554f2c271704b399d42b4be2540a0eca61951f55267f7c2878c122842dadb28b01bd5f8c025f7e228418a673c03d6bc0c736d0a29546bd67f786d9d692ccea778d71d98c2063b7a71092187a4d35af108111d83e83eae46c46aa34277e06044589903788f1d5e7cee25fb485e92949118814d6f2c3ee361489016f327fb5bc517eb50470bffa1afa5f4ce9aa0ce5b8ee19bf5501b958\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 28d98c46cccafbd3bc04e72f967a54bd3ea12298\nOutput = 484408f3898cd5f53483f80819efbf2708c34d27a8b2a6fae8b322f9240237f981817aca1846f1084daa6d7c0795f6e5bf1af59c38e1858437ce1f7ec419b98c8736adf6dd9a00b1806d2bd3ad0a73775e05f52dfef3a59ab4b08143f0df05cd1ad9d04bececa6daa4a2129803e200cbc77787caf4c1d0663a6c5987b605952019782caf2ec1426d68fb94ed1d4be816a7ed081b77e6ab330b3ffc073820fecde3727fcbe295ee61a050a343658637c3fd659cfb63736de32d9f90d3c2f63eca\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 0866d2ff5a79f25ef668cd6f31b42dee421e4c0e\nOutput = 84ebeb481be59845b46468bafb471c0112e02b235d84b5d911cbd1926ee5074ae0424495cb20e82308b8ebb65f419a03fb40e72b78981d88aad143053685172c97b29c8b7bf0ae73b5b2263c403da0ed2f80ff7450af7828eb8b86f0028bd2a8b176a4d228cccea18394f238b09ff758cc00bc04301152355742f282b54e663a919e709d8da24ade5500a7b9aa50226e0ca52923e6c2d860ec50ff480fa57477e82b0565f4379f79c772d5c2da80af9fbf325ece6fc20b00961614bee89a183e\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 6a5b4be4cd36cc97dfde9995efbf8f097a4a991a\nOutput = 82102df8cb91e7179919a04d26d335d64fbc2f872c44833943241de8454810274cdf3db5f42d423db152af7135f701420e39b494a67cbfd19f9119da233a23da5c6439b5ba0d2bc373eee3507001378d4a4073856b7fe2aba0b5ee93b27f4afec7d4d120921c83f606765b02c19e4d6a1a3b95fa4c422951be4f52131077ef17179729cddfbdb56950dbaceefe78cb16640a099ea56d24389eef10f8fecb31ba3ea3b227c0a86698bb89e3e9363905bf22777b2a3aa521b65b4cef76d83bde4c\n\nVerify = RSA-PSS-9\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = b9dfd1df76a461c51e6576c6c8ed0a923d1c50e7\nOutput = a7fdb0d259165ca2c88d00bbf1028a867d337699d061193b17a9648e14ccbbaadeacaacdec815e7571294ebb8a117af205fa078b47b0712c199e3ad05135c504c24b81705115740802487992ffd511d4afc6b854491eb3f0dd523139542ff15c3101ee85543517c6a3c79417c67e2dd9aa741e9a29b06dcb593c2336b3670ae3afbac7c3e76e215473e866e338ca244de00b62624d6b9426822ceae9f8cc460895f41250073fd45c5a1e7b425c204a423a699159f6903e710b37a7bb2bc8049f\n\nPublicKey = RSA-PSS-10\nType = RSA\nInput = 30820122300d06092a864886f70d01010105000382010f003082010a0282010100a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae050203010001\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 9596bb630cf6a8d4ea4600422b9eba8b13675dd4\nOutput = 82c2b160093b8aa3c0f7522b19f87354066c77847abf2a9fce542d0e84e920c5afb49ffdfdace16560ee94a1369601148ebad7a0e151cf16331791a5727d05f21e74e7eb811440206935d744765a15e79f015cb66c532c87a6a05961c8bfad741a9a6657022894393e7223739796c02a77455d0f555b0ec01ddf259b6207fd0fd57614cef1a5573baaff4ec00069951659b85f24300a25160ca8522dc6e6727e57d019d7e63629b8fe5e89e25cc15beb3a647577559299280b9b28f79b0409000be25bbd96408ba3b43cc486184dd1c8e62553fa1af4040f60663de7f5e49c04388e257f1ce89c95dab48a315d9b66b1b7628233876ff2385230d070d07e1666\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = b503319399277fd6c1c8f1033cbf04199ea21716\nOutput = 14ae35d9dd06ba92f7f3b897978aed7cd4bf5ff0b585a40bd46ce1b42cd2703053bb9044d64e813d8f96db2dd7007d10118f6f8f8496097ad75e1ff692341b2892ad55a633a1c55e7f0a0ad59a0e203a5b8278aec54dd8622e2831d87174f8caff43ee6c46445345d84a59659bfb92ecd4c818668695f34706f66828a89959637f2bf3e3251c24bdba4d4b7649da0022218b119c84e79a6527ec5b8a5f861c159952e23ec05e1e717346faefe8b1686825bd2b262fb2531066c0de09acde2e4231690728b5d85e115a2f6b92b79c25abc9bd9399ff8bcf825a52ea1f56ea76dd26f43baafa18bfa92a504cbd35699e26d1dcc5a2887385f3c63232f06f3244c3\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 50aaede8536b2c307208b275a67ae2df196c7628\nOutput = 6e3e4d7b6b15d2fb46013b8900aa5bbb3939cf2c095717987042026ee62c74c54cffd5d7d57efbbf950a0f5c574fa09d3fc1c9f513b05b4ff50dd8df7edfa20102854c35e592180119a70ce5b085182aa02d9ea2aa90d1df03f2daae885ba2f5d05afdac97476f06b93b5bc94a1a80aa9116c4d615f333b098892b25fface266f5db5a5a3bcc10a824ed55aad35b727834fb8c07da28fcf416a5d9b2224f1f8b442b36f91e456fdea2d7cfe3367268de0307a4c74e924159ed33393d5e0655531c77327b89821bdedf880161c78cd4196b5419f7acc3f13e5ebf161b6e7c6724716ca33b85c2e25640192ac2859651d50bde7eb976e51cec828b98b6563b86bb\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = aa0b72b8b371ddd10c8ae474425ccccf8842a294\nOutput = 34047ff96c4dc0dc90b2d4ff59a1a361a4754b255d2ee0af7d8bf87c9bc9e7ddeede33934c63ca1c0e3d262cb145ef932a1f2c0a997aa6a34f8eaee7477d82ccf09095a6b8acad38d4eec9fb7eab7ad02da1d11d8e54c1825e55bf58c2a23234b902be124f9e9038a8f68fa45dab72f66e0945bf1d8bacc9044c6f07098c9fcec58a3aab100c805178155f030a124c450e5acbda47d0e4f10b80a23f803e774d023b0015c20b9f9bbe7c91296338d5ecb471cafb032007b67a60be5f69504a9f01abb3cb467b260e2bce860be8d95bf92c0c8e1496ed1e528593a4abb6df462dde8a0968dffe4683116857a232f5ebf6c85be238745ad0f38f767a5fdbf486fb\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = fad3902c9750622a2bc672622c48270cc57d3ea8\nOutput = 7e0935ea18f4d6c1d17ce82eb2b3836c55b384589ce19dfe743363ac9948d1f346b7bfddfe92efd78adb21faefc89ade42b10f374003fe122e67429a1cb8cbd1f8d9014564c44d120116f4990f1a6e38774c194bd1b8213286b077b0499d2e7b3f434ab12",
+    "289c556684deed78131934bb3dd6537236f7c6f3dcb09d476be07721e37e1ceed9b2f7b406887bd53157305e1c8b4f84d733bc1e186fe06cc59b6edb8f4bd7ffefdf4f7ba9cfb9d570689b5a1a4109a746a690893db3799255a0cb9215d2d1cd490590e952e8c8786aa0011265252470c041dfbc3eec7c3cbf71c24869d115c0cb4a956f56d530b80ab589acfefc690751ddf36e8d383f83cedd2cc\n\nVerify = RSA-PSS-10\nRSAPadding = PSS\nMGF1Digest = SHA1\nInput = 122196deb5d122bd8c6fc781ff6924d7c695aade\nOutput = 6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f\n\nPrivateKey = RSA-OAEP-1\nType = RSA\nInput = 30820276020100300d06092a864886f70d0101010500048202603082025c02010002818100a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb020301000102818053339cfdb79fc8466a655c7316aca85c55fd8f6dd898fdaf119517ef4f52e8fd8e258df93fee180fa0e4ab29693cd83b152a553d4ac4d1812b8b9fa5af0e7f55fe7304df41570926f3311f15c4d65a732c483116ee3d3d2d0af3549ad9bf7cbfb78ad884f84d5beb04724dc7369b31def37d0cf539e9cfcdd3de653729ead5d1024100d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d024100cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d7702400e12bf1718e9cef5599ba1c3882fe8046a90874eefce8f2ccc20e4f2741fb0a33a3848aec9c9305fbecbd2d76819967d4671acc6431e4037968db37878e695c102410095297b0f95a2fa67d00707d609dfd4fc05c89dafc2ef6d6ea55bec771ea333734d9251e79082ecda866efef13c459e1a631386b7e354c899f5f112ca85d7158302404f456c502493bdc0ed2ab756a3a6ed4d67352a697d4216e93212b127a63d5411ce6fa98d5dbefd73263e3728142743818166ed7dd63687dd2a8ca1d2f4fbd8e1\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 354fe67b4a126d5d35fe36c777791a3f7ba13def484e2d3908aff722fad468fb21696de95d0be911c2d3174f8afcc201035f7b6d8e69402de5451618c21a535fa9d7bfc5b8dd9fc243f8cf927db31322d6e881eaa91a996170e657a05a266426d98c88003f8477c1227094a0d9fa1e8c4024309ce1ecccb5210035d47ac72e8a\nOutput = 6628194e12073db03ba94cda9ef9532397d50dba79b987004afefe34\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 640db1acc58e0568fe5407e5f9b701dff8c3c91e716c536fc7fcec6cb5b71c1165988d4a279e1577d730fc7a29932e3f00c81515236d8d8e31017a7a09df4352d904cdeb79aa583adcc31ea698a4c05283daba9089be5491f67c1a4ee48dc74bbbe6643aef846679b4cb395a352d5ed115912df696ffe0702932946d71492b44\nOutput = 750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 423736ed035f6026af276c35c0b3741b365e5f76ca091b4e8c29e2f0befee603595aa8322d602d2e625e95eb81b2f1c9724e822eca76db8618cf09c5343503a4360835b5903bc637e3879fb05e0ef32685d5aec5067cd7cc96fe4b2670b6eac3066b1fcf5686b68589aafb7d629b02d8f8625ca3833624d4800fb081b1cf94eb\nOutput = d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 45ead4ca551e662c9800f1aca8283b0525e6abae30be4b4aba762fa40fd3d38e22abefc69794f6ebbbc05ddbb11216247d2f412fd0fba87c6e3acd888813646fd0e48e785204f9c3f73d6d8239562722dddd8771fec48b83a31ee6f592c4cfd4bc88174f3b13a112aae3b9f7b80e0fc6f7255ba880dc7d8021e22ad6a85f0755\nOutput = 52e650d98e7f2a048b4f86852153b97e01dd316f346a19f67a85\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 36f6e34d94a8d34daacba33a2139d00ad85a9345a86051e73071620056b920e219005855a213a0f23897cdcd731b45257c777fe908202befdd0b58386b1244ea0cf539a05d5d10329da44e13030fd760dcd644cfef2094d1910d3f433e1c7c6dd18bc1f2df7f643d662fb9dd37ead9059190f4fa66ca39e869c4eb449cbdc439\nOutput = 8da89fd9e5f974a29feffb462b49180f6cf9e802\n\nDecrypt = RSA-OAEP-1\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 42cee2617b1ecea4db3f4829386fbd61dafbf038e180d837c96366df24c097b4ab0fac6bdf590d821c9f10642e681ad05b8d78b378c0f46ce2fad63f74e0ad3df06b075d7eb5f5636f8d403b9059ca761b5c62bb52aa45002ea70baace08ded243b9d8cbd62a68ade265832b56564e43a6fa42ed199a099769742df1539e8255\nOutput = 26521050844271\n\nPrivateKey = RSA-OAEP-2\nType = RSA\nInput = 30820276020100300d06092a864886f70d0101010500048202603082025c02010002818101947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f4502030100010281800823f20fadb5da89088a9d00893e21fa4a1b11fbc93c64a3be0baaea97fb3b93c3ff713704c19c963c1d107aae99054739f79e02e186de86f87a6ddefea6d8ccd1d3c81a47bfa7255be20601a4a4b2f08a167b5e279d715b1b455bdd7eab245941d9768b9acefb3ccda5952da3cee72525b4501663a8ee15c9e992d92462fe3902410159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a430241012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd70240436ef508de736519c2da4c580d98c82cb7452a3fb5efadc3b9c7789a1bc6584f795addbbd32439c74686552ecb6c2c307a4d3af7f539eec157248c7b31f1a2550241012b15a89f3dfb2b39073e73f02bdd0c1a7b379dd435f05cdde2eff9e462948b7cec62ee9050d5e0816e0785a856b49108dcb75f3683874d1ca6329a19013066ff02400270db17d5914b018d76118b24389a7350ec836b0063a21721236fd8edb6d89b51e7eeb87b611b7132cb7ea7356c23151c1e7751507c786d9ee1794170a8c8e8\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0181af8922b9fcb4d79d92ebe19815992fc0c1439d8bcd491398a0f4ad3a329a5bd9385560db532683c8b7da04e4b12aed6aacdf471c34c9cda891addcc2df3456653aa6382e9ae59b54455257eb099d562bbe10453f2b6d13c59c02e10f1f8abb5da0d0570932dacf2d0901db729d0fefcc054e70968ea540c81b04bcaefe720e\nOutput = 8ff00caa605c702830634d9a6c3d42c652b58cf1d92fec570beee7\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 018759ff1df63b2792410562314416a8aeaf2ac634b46f940ab82d64dbf165eee33011da749d4bab6e2fcd18129c9e49277d8453112b429a222a8471b070993998e758861c4d3f6d749d91c4290d332c7a4ab3f7ea35ff3a07d497c955ff0ffc95006b62c6d296810d9bfab024196c7934012c2df978ef299aba239940cba10245\nOutput = 2d\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 018802bab04c60325e81c4962311f2be7c2adce93041a00719c88f957575f2c79f1b7bc8ced115c706b311c08a2d986ca3b6a9336b147c29c6f229409ddec651bd1fdd5a0b7f610c9937fdb4a3a762364b8b3206b4ea485fd098d08f63d4aa8bb2697d027b750c32d7f74eaf5180d2e9b66b17cb2fa55523bc280da10d14be2053\nOutput = 74fc88c51bc90f77af9d5e9a4a70133d4b4e0b34da3c37c7ef8e\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00a4578cbc176318a638fba7d01df15746af44d4f6cd96d7e7c495cbf425b09c649d32bf886da48fbaf989a2117187cafb1fb580317690e3ccd446920b7af82b31db5804d87d01514acbfa9156e782f867f6bed9449e0e9a2c09bcecc6aa087636965e34b3ec766f2fe2e43018a2fddeb140616a0e9d82e5331024ee0652fc7641\nOutput = a7eb2a5036931d27d4e891326d99692ffadda9bf7efd3e34e622c4adc085f721dfe885072c78a203b151739be540fa8c153a10f00a\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00ebc5f5fda77cfdad3c83641a9025e77d72d8a6fb33a810f5950f8d74c73e8d931e8634d86ab1246256ae07b6005b71b7f2fb98351218331ce69b8ffbdc9da08bbc9c704f876deb9df9fc2ec065cad87f9090b07acc17aa7f997b27aca48806e897f771d95141fe4526d8a5301b678627efab707fd40fbebd6e792a25613e7aec\nOutput = 2ef2b066f854c33f3bdcbb5994a435e73d6c6c\n\nDecrypt = RSA-OAEP-2\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 010839ec20c27b9052e55befb9b77e6fc26e9075d7a54378c646abdf51e445bd5715de81789f56f1803d9170764a9e93cb78798694023ee7393ce04bc5d8f8c5a52c171d43837e3aca62f609eb0aa5ffb0960ef04198dd754f57f7fbe6abf765cf118b4ca443b23b5aab266f952326ac4581100644325f8b721acd5d04ff14ef3a\nOutput = 8a7fb344c8b6cb2cf2ef1f643f9a3218f6e19bba",
+    "89c0\n\nPrivateKey = RSA-OAEP-3\nType = RSA\nInput = 30820277020100300d06092a864886f70d0101010500048202613082025d02010002818102b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9020301000102818015b48a5b5683a94670e23b5718f814fa0e13f85038f50711182cba61510581f3d22c7e232ef937e22e551d68b86e2f8cb1aad8be2e488f5df7efd279e3f568d4eaf36f80cf7141ace60fcc9113fb6c4a841fd50bbc7c512ffcbeff21487aa811eb3ca8c62005346a86de86bfa1d8a948fd3f348c22eaadf333c3ce6ce13208fd024101bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf0241018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7024006c0a249d20a6f2ee75c88b494d53f6aae99aa427c88c28b163a769445e5f390cf40c274fd6ea6329a5ce7c7ce03a2158396ee2a7845786e09e2885a9728e4e5024100d1d27c29fedd92d86c348edd0ccbfac14f746e051ce1d1811df35d61f2ee1c97d4bf2804802f6427187ba8e90a8af44243b4079b03445e602e29fa5193e64fe90241008cb2f756bd8941b1d3b770e5ad31ee373b28acda69ff9b6f40fe578b9f1afb85836f9627d37acff73c2779e634bb26011c2c8f7f3361ae2a9ea65ed689e3639a\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 026a0485d96aebd96b4382085099b962e6a2bdec3d90c8db625e14372de85e2d5b7baab65c8faf91bb5504fb495afce5c988b3f6a52e20e1d6cbd3566c5cd1f2b8318bb542cc0ea25c4aab9932afa20760eaddec784396a07ea0ef24d4e6f4d37e5052a7a31e146aa480a111bbe926401307e00f410033842b6d82fe5ce4dfae80\nOutput = 087820b569e8fa8d\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 024db89c7802989be0783847863084941bf209d761987e38f97cb5f6f1bc88da72a50b73ebaf11c879c4f95df37b850b8f65d7622e25b1b889e80fe80baca2069d6e0e1d829953fc459069de98ea9798b451e557e99abf8fe3d9ccf9096ebbf3e5255d3b4e1c6d2ecadf067a359eea86405acd47d5e165517ccafd47d6dbee4bf5\nOutput = 4653acaf171960b01f52a7be63a3ab21dc368ec43b50d82ec3781e04\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0239bce681032441528877d6d1c8bb28aa3bc97f1df584563618995797683844ca86664732f4bed7a0aab083aaabfb7238f582e30958c2024e44e57043b97950fd543da977c90cdde5337d618442f99e60d7783ab59ce6dd9d69c47ad1e962bec22d05895cff8d3f64ed5261d92b2678510393484990ba3f7f06818ae6ffce8a3a\nOutput = d94cd0e08fa404ed89\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 02994c62afd76f498ba1fd2cf642857fca81f4373cb08f1cbaee6f025c3b512b42c3e8779113476648039dbe0493f9246292fac28950600e7c0f32edf9c81b9dec45c3bde0cc8d8847590169907b7dc5991ceb29bb0714d613d96df0f12ec5d8d3507c8ee7ae78dd83f216fa61de100363aca48a7e914ae9f42ddfbe943b09d9a0\nOutput = 6cc641b6b61e6f963974dad23a9013284ef1\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0162042ff6969592a6167031811a239834ce638abf54fec8b99478122afe2ee67f8c5b18b0339805bfdbc5a4e6720b37c59cfba942464c597ff532a119821545fd2e59b114e61daf71820529f5029cf524954327c34ec5e6f5ba7efcc4de943ab8ad4ed787b1454329f70db798a3a8f4d92f8274e2b2948ade627ce8ee33e43c60\nOutput = df5151832b61f4f25891fb4172f328d2eddf8371ffcfdbe997939295f30eca6918017cfda1153bf7a6af87593223\n\nDecrypt = RSA-OAEP-3\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00112051e75d064943bc4478075e43482fd59cee0679de6893eec3a943daa490b9691c93dfc0464b6623b9f3dbd3e70083264f034b374f74164e1a00763725e574744ba0b9db83434f31df96f6e2a26f6d8eba348bd4686c2238ac07c37aac3785d1c7eea2f819fd91491798ed8e9cef5e43b781b0e0276e37c43ff9492d005730\nOutput = 3c3bad893c544a6d520ab022319188c8d504b7a788b850903b85972eaa18552e1134a7ad6098826254ff7ab672b3d8eb3158fac6d4cbaef1\n\nPrivateKey = RSA-OAEP-4\nType = RSA\nInput = 30820277020100300d06092a864886f70d0101010500048202613082025d020100028181051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb03902030100010281800411ffca3b7ca5e9e9be7fe38a85105e353896db05c5796aecd2a725161eb3651c8629a9b862b904d7b0c7b37f8cb5a1c2b54001018a00a1eb2cafe4ee4e9492c348bc2bedab4b9ebbf064e8eff322b9009f8eec653905f40df88a3cdc49d4567f75627d41aca624129b46a0b7c698e5e65f2b7ba102c749a10135b6540d04010241027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba570102410210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139024039fa028b826e88c1121b750a8b242fa9a35c5b66bdfd1fa637d3cc48a84a4f457a194e7727e49f7bcc6e5a5a412657fc470c7322ebc37416ef458c307a8c09010241015d99a84195943979fa9e1be2c3c1b69f432f46fd03e47d5befbbbfd6b1d1371d83efb330a3e020942b2fed115e5d02be24fd92c9019d1cecd6dd4cf1e54cc899024101f0b7015170b3f5e42223ba30301c41a6d87cbb70e30cb7d3c67d25473db1f6cbf03e3f9126e3e97968279a865b2c2b426524cfc52a683d31ed30eb984be412ba\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 04cce19614845e094152a3fe18e54e3330c44e5efbc64ae16886cb1869014cc5781b1f8f9e045384d0112a135ca0d12e9c88a8e4063416deaae3844f60d6e96fe155145f4525b9a34431ca3766180f70e15a5e5d8e8b1a516ff870609f13f896935ced188279a58ed13d07114277d75c6568607e0ab092fd803a223e4a8ee0b1a8\nOutput = 4a86609534ee434a6cbca3f7e962e76d455e3264c19f605f6e5ff6137c65c56d7fb344cd52bc93374f3d166c9f0c6f9c506bad19330972d2\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0097b698c6165645b303486fbf5a2a4479c0ee85889b541a6f0b858d6b6597b13b854eb4f839af03399a80d79bda6578c841f90d645715b280d37143992dd186c80b949b775cae97370e4ec97443136c6da484e970ffdb1323a20847821d3b18381de13bb49aaea66530c4a4b8271f3eae172cd366e07e6636f1019d2a28aed15e\nOutput = b0adc4f3fe11da59ce992773d9059943c03046497ee9d9f9a06df1166db46d98f58d27ec074c02eee6cbe2449c8b9fc5080c5c3f4433092512ec46aa793743c8\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0301f935e9c47abcb48acbbe09895d9f5971af14839da4ff95417ee453d1fd77319072bb7297e1b55d7561cd9d1bb24c1a9a37c619864308242804879d86ebd001dce5183975e1506989b70e5a83434154d5cbfd6a24787e60eb0c658d2ac193302d1192c6e622d4a12ad4b53923bca246df31c6395e37702c6a78ae081fb9d065\nOutput = bf6d42e701707b1d0206b0c8b45a1c72641ff12889219a82bdea965b5e79a96b0d0163ed9d578ec9ada20f2fbcf1ea3c4089d83419ba81b0c60f3606da99\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 02d110ad30afb727beb691dd0cf17d0af1a1e7fa0cc040ec1a4ba26a42c59d0a796a2e22c8f357ccc98b6519aceb682e945e62cb734614a529407cd452bee3e44fece8423cc19e55548b8b994b849c7ecde4933e76037e1d0ce44275b08710c68e430130b929730ed77e09b015642c5593f04e4ffb9410798102a8e96ffdfe11e4\nOutput = fb2ef112f5e766eb94019297934794f7be2f6fc1c58e\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00dbb8a7439d90efd919a377c54fae8fe11ec58c3b858362e23ad1b8a44310799066b99347aa525691d2adc58d9b06e34f288c170390c5f0e11c0aa3645959f18ee79e8f2be8d7ac5c23d061f18dd74b8c5f2a58fcb5eb0c54f99f01a83247568292536583340948d7a8c97c4acd1e98d1e29dc320e97a260532a8aa7a758a1ec2\nOutput = 28ccd447bb9e85166dabb9e5b7d1adadc4b9d39f204e96d5e440ce9ad928bc1c2284\n\nDecrypt = RSA-OAEP-4\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00a5ffa4768c8bbecaee2db77e8f2eec99595933545520835e5ba7db9493d3e17cddefe6a5f567624471908db4e2d83a0fbee60608fc84049503b2234a07dc83b27b22847ad8920ff42f674ef79b76280b00233d2b51b8cb2703a9d42bfbc8250c96ec32c051e57f1b4ba528db89c37e4c54e27e6e64ac69635ae887d9541619a9\nOutput = f22242751ec6b1\n\nPrivateKey = RSA-OAEP-5\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f0201000281810aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed902030100010281810256eb4cba7067f2d2be540dcdff4582a36b7d31d1c9099bb214b79848466a268f80f58a49ac04c0e3648934a0206c04537c19b236643a6082732144df75fa217588f794682be89168276dc726c5c0cbdb84d31bbf26d0a43af495717f7d528acfee341561f6ff3cae05c578f8470d9682f9c0d072f9f6068b56d5880f682be2c5024103b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860",
+    "dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707024102e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f024101e84b119d25161fa67b00256a5bd9b645d2b232ecb05b015180029a88622adc3f09b3aeacde6161ab7cde22c2ad26e7797df54e072cbd3b2673800b3e4338dbd5024100eb90aa1a40135b4cea07197cedc8819be1e7cbff2547662116f465a4a9f487ab12f3ba4fef13822265a65297d98b7bded9372e3ffe81a38b3e9600fed055754f0241012f7f8138f9404062eb85a42924520b38f5bb886a0196f48bb8dcea60fd92cc027f18e78158a34a5c5d5f860a0f6c04071a7d01312c065062f1eb48b79d1c83cb\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 036046a4a47d9ed3ba9a89139c105038eb7492b05a5d68bfd53accff4597f7a68651b47b4a4627d927e485eed7b4566420e8b409879e5d606eae251d22a5df799f7920bfc117b992572a53b1263146bcea03385cc5e853c9a101c8c3e1bda31a519807496c6cb5e5efb408823a352b8fa0661fb664efadd593deb99fff5ed000e5\nOutput = af71a901e3a61d3132f0fc1fdb474f9ea6579257ffc24d164170145b3dbde8\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 03d6eb654edce615bc59f455265ed4e5a18223cbb9be4e4069b473804d5de96f54dcaaa603d049c5d94aa1470dfcd2254066b7c7b61ff1f6f6770e3215c51399fd4e34ec5082bc48f089840ad04354ae66dc0f1bd18e461a33cc1258b443a2837a6df26759aa2302334986f87380c9cc9d53be9f99605d2c9a97da7b0915a4a7ad\nOutput = a3b844a08239a8ac41605af17a6cfda4d350136585903a417a79268760519a4b4ac3303ec73f0f87cfb32399\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0770952181649f9f9f07ff626ff3a22c35c462443d905d456a9fd0bff43cac2ca7a9f554e9478b9acc3ac838b02040ffd3e1847de2e4253929f9dd9ee4044325a9b05cabb808b2ee840d34e15d105a3f1f7b27695a1a07a2d73fe08ecaaa3c9c9d4d5a89ff890d54727d7ae40c0ec1a8dd86165d8ee2c6368141016a48b55b6967\nOutput = 308b0ecbd2c76cb77fc6f70c5edd233fd2f20929d629f026953bb62a8f4a3a314bde195de85b5f816da2aab074d26cb6acddf323ae3b9c678ac3cf12fbdde7\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0812b76768ebcb642d040258e5f4441a018521bd96687e6c5e899fcd6c17588ff59a82cc8ae03a4b45b31299af1788c329f7dcd285f8cf4ced82606b97612671a45bedca133442144d1617d114f802857f0f9d739751c57a3f9ee400912c61e2e6992be031a43dd48fa6ba14eef7c422b5edc4e7afa04fdd38f402d1c8bb719abf\nOutput = 15c5b9ee1185\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 07b60e14ec954bfd29e60d0047e789f51d57186c63589903306793ced3f68241c743529aba6a6374f92e19e0163efa33697e196f7661dfaaa47aac6bde5e51deb507c72c589a2ca1693d96b1460381249b2cdb9eac44769f2489c5d3d2f99f0ee3c7ee5bf64a5ac79c42bd433f149be8cb59548361640595513c97af7bc2509723\nOutput = 21026e6800c7fa728fcaaba0d196ae28d7a2ac4ffd8abce794f0985f60c8a6737277365d3fea11db8923a2029a\n\nDecrypt = RSA-OAEP-5\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 08c36d4dda33423b2ed6830d85f6411ba1dcf470a1fae0ebefee7c089f256cef74cb96ea69c38f60f39abee44129bcb4c92de7f797623b20074e3d9c2899701ed9071e1efa0bdd84d4c3e5130302d8f0240baba4b84a71cc032f2235a5ff0fae277c3e8f9112bef44c9ae20d175fc9a4058bfc930ba31b02e2e4f444483710f24a\nOutput = 541e37b68b6c8872b84c02\n\nPrivateKey = RSA-OAEP-6\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f02010002818112b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af02030100010281810295eca3560618369559cecd303aa9cfdafc1d9f06959df75ffef929aa896961bcd190dc6997eda7f5963e724d07b4dc11f3065e5ae97d96835112280b9084bb14f2a21ebd4e889d41b9c4132ec1956fcab8bb2fed0575884936522c5ff7d33261904824e7cadee4e0bb372d2457cf78e2bd1286228ff83f10731ce63c90cff3f9024104a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b02410404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed024103961c8f760aa2bd5154c7aafd77225b3bacd0139ae7b5948ea3311fccd86fb95c75afa767284b9b2de559572f15d8d044c7eb83a1be5fadf2cc377c0d8475294b0241022197e066742196aabc03fa2feeb4e70b15cb787d617acd31bb75c7bc234ad706f7c48d2182d1f0ff9c228dcf41967b6c0ba6d2c0ad110a1b857831ec245e2cb102410401c4c0c53d45dbdb5e9d96d0fecf4275df0974bc4a0736b4a74c3269053efb686ace2406e22c9e058ddb4ae540627ae2fdb08261e8e7e4bcbc994daafa305c45\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0630eebcd2856c24f798806e41f9e67345eda9ceda386acc9facaea1eeed06ace583709718d9d169fadf414d5c76f92996833ef305b75b1e4b95f662a20faedc3bae0c4827a8bf8a88edbd57ec203a27a841f02e43a615bab1a8cac0701de34debdef62a088089b55ec36ea7522fd3ec8d06b6a073e6df833153bc0aefd93bd1a3\nOutput = 4046ca8baa3347ca27f49e0d81f9cc1d71be9ba517d4\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0ebc37376173a4fd2f89cc55c2ca62b26b11d51c3c7ce49e8845f74e7607317c436bc8d23b9667dfeb9d087234b47bc6837175ae5c0559f6b81d7d22416d3e50f4ac533d8f0812f2db9e791fe9c775ac8b6ad0f535ad9ceb23a4a02014c58ab3f8d3161499a260f39348e714ae2a1d3443208fd8b722ccfdfb393e98011f99e63f\nOutput = 5cc72c60231df03b3d40f9b57931bc31109f972527f28b19e7480c7288cb3c92b22512214e4be6c914792ddabdf57faa8aa7\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0a98bf1093619394436cf68d8f38e2f158fde8ea54f3435f239b8d06b8321844202476aeed96009492480ce3a8d705498c4c8c68f01501dc81db608f60087350c8c3b0bd2e9ef6a81458b7c801b89f2e4fe99d4900ba6a4b5e5a96d865dc676c7755928794130d6280a8160a190f2df3ea7cf9aa0271d88e9e6905ecf1c5152d65\nOutput = b20e651303092f4bccb43070c0f86d23049362ed96642fc5632c27db4a52e3d831f2ab068b23b149879c002f6bf3feee97591112562c\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 008e7a67cacfb5c4e24bec7dee149117f19598ce8c45808fef88c608ff9cd6e695263b9a3c0ad4b8ba4c95238e96a8422b8535629c8d5382374479ad13fa39974b242f9a759eeaf9c83ad5a8ca18940a0162ba755876df263f4bd50c6525c56090267c1f0e09ce0899a0cf359e88120abd9bf893445b3cae77d3607359ae9a52f8\nOutput = 684e3038c5c041f7\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 00003474416c7b68bdf961c385737944d7f1f40cb395343c693cc0b4fe63b31fedf1eaeeac9ccc0678b31dc32e0977489514c4f09085f6298a9653f01aea4045ff582ee887be26ae575b73eef7f3774921e375a3d19adda0ca31aa1849887c1f42cac9677f7a2f4e923f6e5a868b38c084ef187594dc9f7f048fea2e02955384ab\nOutput = 32488cb262d041d6e4dd35f987bf3ca696db1f06ac29a44693\n\nDecrypt = RSA-OAEP-6\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0a026dda5fc8785f7bd9bf75327b63e85e2c0fdee5dadb65ebdcac9ae1de95c92c672ab433aa7a8e69ce6a6d8897fac4ac4a54de841ae5e5bbce7687879d79634cea7a30684065c714d52409b928256bbf53eabcd5231eb7259504537399bd29164b726d33a46da701360a4168a091ccab72d44a62fed246c0ffea5b1348ab5470\nOutput = 50ba14be8462720279c306ba\n\nPrivateKey = RSA-OAEP-7\nType = RSA\nInput = 30820278020100300d06092a864886f70d0101010500048202623082025e020100028181311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e3730203010001028181070cfcff2feb8276e27432c45dfee48f49b7917d6530e1f0ca3460f32e0276174487c56e22a45d2500d7775495219d7d165a9cf3bd92c32af9a98d8dc9cc296800adc94a0a54fb40f34291bf84ee8ea12b6f109359c6d3542a50f9c767f5cfff05a681c2e656fb77caaadb4be9468d8abcd4df98f58e86d2053fa1349f748e21b102410749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71024106bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023024103bc7ea7f0aab143abc6ce8b97118636a30172e4cfe02c8fa0dda3b7baaf90f8092982985525f488bdfcb4bd726e22639ac64a3092ab7ffcbf1d5334cfa50b5bf102410262a6aa29c2a3c67dc5346c06381afd987aa3cc93cfbfecf54fdd9f9d787d7f59a523d398979da137a2f6381fe94801f7c94da21518dc34cb40870c4697994ad90240649d4c17b6ee1721e772d0389a559c3d3cdf9550d457c46b037b74641b1d52166af8a213c8396206cdfba4422f18d6f61dbcb5d214c971bf482aeb976a7370c2\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1688e4ce7794bba6cb7014169ecd559cede2a30b56a52b68d9fe18cf1973ef97b2a03153951c755f6294aa49adbdb55845ab6875fb3986c93ecf927962840d",
+    "282f9e54ce8b690f7c0cb8bbd73440d9571d1b16cd9260f9eab4783cc482e5223dc60973871783ec27b0ae0fd47732cbc286a173fc92b00fb4ba6824647cd93c85c1\nOutput = 47aae909\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1052ed397b2e01e1d0ee1c50bf24363f95e504f4a03434a08fd822574ed6b9736edbb5f390db10321479a8a139350e2bd4977c3778ef331f3e78ae118b268451f20a2f01d471f5d53c566937171b2dbc2d4bde459a5799f0372d6574239b2323d245d0bb81c286b63c89a361017337e4902f88a467f4c7f244bfd5ab46437ff3b6\nOutput = 1d9b2e2223d9bc13bfb9f162ce735db48ba7c68f6822a0a1a7b6ae165834e7\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2155cd843ff24a4ee8badb7694260028a490813ba8b369a4cbf106ec148e5298707f5965be7d101c1049ea8584c24cd63455ad9c104d686282d3fb803a4c11c1c2e9b91c7178801d1b6640f003f5728df007b8a4ccc92bce05e41a27278d7c85018c52414313a5077789001d4f01910b72aad05d220aa14a58733a7489bc54556b\nOutput = d976fc\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 0ab14c373aeb7d4328d0aaad8c094d88b9eb098b95f21054a29082522be7c27a312878b637917e3d819e6c3c568db5d843802b06d51d9e98a2be0bf40c031423b00edfbff8320efb9171bd2044653a4cb9c5122f6c65e83cda2ec3c126027a9c1a56ba874d0fea23f380b82cf240b8cf540004758c4c77d934157a74f3fc12bfac\nOutput = d4738623df223aa43843df8467534c41d013e0c803c624e263666b239bde40a5f29aeb8de79e3daa61dd0370f49bd4b013834b98212aef6b1c5ee373b3cb\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 028387a318277434798b4d97f460068df5298faba5041ba11761a1cb7316b24184114ec500257e2589ed3b607a1ebbe97a6cc2e02bf1b681f42312a33b7a77d8e7855c4a6de03e3c04643f786b91a264a0d6805e2cea91e68177eb7a64d9255e4f27e713b7ccec00dc200ebd21c2ea2bb890feae4942df941dc3f97890ed347478\nOutput = bb47231ca5ea1d3ad46c99345d9a8a61\n\nDecrypt = RSA-OAEP-7\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 14c678a94ad60525ef39e959b2f3ba5c097a94ff912b67dbace80535c187abd47d075420b1872152bba08f7fc31f313bbf9273c912fc4c0149a9b0cfb79807e346eb332069611bec0ff9bcd168f1f7c33e77313cea454b94e2549eecf002e2acf7f6f2d2845d4fe0aab2e5a92ddf68c480ae11247935d1f62574842216ae674115\nOutput = 2184827095d35c3f86f600e8e59754013296\n\nPrivateKey = RSA-OAEP-8\nType = RSA\nInput = 30820279020100300d06092a864886f70d0101010500048202633082025f0201000281815bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff702030100010281810f7d1e9e5aaa25fd13e4a0663ae144e0d15f5cd18bcdb09df2cc7e64e3c5e915ad62645304161d098c715bb7ab8bd01d07eaf3fed7c7ed08af2a8a62ef44ab16b320e14af72a48f96afe262a0ae4cf65e635e910790cd4ee5cea768a4b2639f7e6f677b3f0bb6be32b75747d8909036f0264f58d401cdba131716157a75ecf633102410a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f0241092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9024107c71410af103962db367404e37ae850baa4e9c29dd92145815294a67c7d1c6ded263aa030a9b633ae50303e14035d1af014123eba687820308d8ebc85b6957d7d024100ae2c75380c02c016ad05891b3301de881f28ae1171182b6b2c83bea7c515eca9ca298c7b1cab5817a597068fc85060de4da8a016378aae43c7f967bcc37904b902410598d1059e3ada4f6320752c09d805ff7d1f1ae0d017aeeee9cefa0d7dd7ff775e44b578322f6405d6211da19519666aa87fdc4cd8c88f6b6e3d67e961dcbba3d0\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 09b3683d8a2eb0fb295b62ed1fb9290b714457b7825319f4647872af889b30409472020ad12912bf19b11d4819f49614824ffd84d09c0a17e7d17309d12919790410aa2995699f6a86dbe3242b5acc23af45691080d6b1ae810fb3e3057087f0970092ce00be9562ff4053b6262ce0caa93e13723d2e3a5ba075d45f0d61b54b61\nOutput = 050b755e5e6880f7b9e9d692a74c37aae449b31bfea6deff83747a897f6c2c825bb1adbf850a3c96994b5de5b33cbc7d4a17913a7967\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2ecf15c97c5a15b1476ae986b371b57a24284f4a162a8d0c8182e7905e792256f1812ba5f83f1f7a130e42dcc02232844edc14a31a68ee97ae564a383a3411656424c5f62ddb646093c367be1fcda426cf00a06d8acb7e57776fbbd855ac3df506fc16b1d7c3f2110f3d8068e91e186363831c8409680d8da9ecd8cf1fa20ee39d\nOutput = 4eb68dcd93ca9b19df111bd43608f557026fe4aa1d5cfac227a3eb5ab9548c18a06dded23f81825986b2fcd71109ecef7eff88873f075c2aa0c469f69c92bc\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 4bc89130a5b2dabb7c2fcf90eb5d0eaf9e681b7146a38f3173a3d9cfec52ea9e0a41932e648a9d69344c50da763f51a03c95762131e8052254dcd2248cba40fd31667786ce05a2b7b531ac9dac9ed584a59b677c1a8aed8c5d15d68c05569e2be780bf7db638fd2bfd2a85ab276860f3777338fca989ffd743d13ee08e0ca9893f\nOutput = 8604ac56328c1ab5ad917861\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2e456847d8fc36ff0147d6993594b9397227d577752c79d0f904fcb039d4d812fea605a7b574dd82ca786f93752348438ee9f5b5454985d5f0e1699e3e7ad175a32e15f03deb042ab9fe1dd9db1bb86f8c089ccb45e7ef0c5ee7ca9b7290ca6b15bed47039788a8a93ff83e0e8d6244c71006362deef69b6f416fb3c684383fbd0\nOutput = fdda5fbf6ec361a9d9a4ac68af216a0686f438b1e0e5c36b955f74e107f39c0dddcc\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 1fb9356fd5c4b1796db2ebf7d0d393cc810adf6145defc2fce714f79d93800d5e2ac211ea8bbecca4b654b94c3b18b30dd576ce34dc95436ef57a09415645923359a5d7b4171ef22c24670f1b229d3603e91f76671b7df97e7317c97734476d5f3d17d21cf82b5ba9f83df2e588d36984fd1b584468bd23b2e875f32f68953f7b2\nOutput = 4a5f4914bee25de3c69341de07\n\nDecrypt = RSA-OAEP-8\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 3afd9c6600147b21798d818c655a0f4c9212db26d0b0dfdc2a7594ccb3d22f5bf1d7c3e112cd73fc7d509c7a8bafdd3c274d1399009f9609ec4be6477e453f075aa33db382870c1c3409aef392d7386ae3a696b99a94b4da0589447e955d16c98b17602a59bd736279fcd8fb280c4462d590bfa9bf13fed570eafde97330a2c210\nOutput = 8e07d66f7b880a72563abcd3f35092bc33409fb7f88f2472be\n\nPrivateKey = RSA-OAEP-9\nType = RSA\nInput = 30820397020100300d06092a864886f70d0101010500048203813082037d0201000281c100cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d02030100010281c0198c141e23715a92bccf6a119a5bc11389468d2811f548d727e17b4ab0eb986d6f211efb53b71f7ccbea87ee69c75ee615008c5332deb52bf390abdfbfe37d7205368159b2638c1de326e21d22251f0fb5848b3bf15005d2a74330f0afe916ee62ccc1344d1d83a709e60676273840f7f377424a5e0a4da75f01b31ff76819cf9cbfdd215243c3917c03ef38199312e567b3bf7aed3ab457f371ef8a1423f45b68c6e282ec111bba2833b987fd69fad83bc1b8c613c5e1ea16c11ed125ea7ec1026100fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd026100d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1026100db16802f79a2f0d45f358d69fd33e44b81fae828622e93a54253e997d01b0743759da0e812b4aa4e6c8beab2328d5431955a418a67ff26a8c5c807a5da354e05ef31cc8cf758f463732950b03e265726fb94e39d6a572a26244ab08db75752ad026100a0a317cfe7df1423f87a6dee8451f4e2b4a67e5497f29b4f1e4e830b9fadd9401167026f5596e5a39c97817e0f5f16e27e19ec9902e01d7ea6fb9aa3c760afee1e381b69de6ac9c07585a06ad9c4ba00bf75c8ad2fa898a479e80ae294fed2a102600b21f335c353342eb44c3aa24445780c2d655b940174cae38c7c8a4e6493c0ba9fd303748267b083b9a7a6cb61e42db362b8c9896db7064e02ad5ae61587da15b4649c90594909feb37dbcb654beb7268ec801e5a8b4aa3911bebd88542f05be\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 267bcd118acab1fc8ba81c85d73003cb8610fa55c1d97da8d48a7c7f06896a4db751aa284255b9d36ad65f37653d829f1b37f97b8001942545b2fc2c55a7376ca7a1be4b1760c8e05a33e5aa2526b8d98e317088e7834c755b2a59b12631a182c05d5d43ab1779264f8456f515ce57dfdf512d5493dab7b7338dc4b7d78db9c091ac3baf537a69fc7f549d979f0eff9a94fda4169bd4d1d19a69c99e33c3b55490d501b39b1edae118ff6793a153261584d3a5f39f6e682e3d17c8cd1261fa72\nOutput = f735fd55ba92592c3b52b8f9",
+    "c4f69aaa1cbef8fe88add095595412467f9cf4ec0b896c59eda16210e7549c8abb10cdbc21a12ec9b6b5b8fd2f10399eb6\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 93ac9f0671ec29acbb444effc1a5741351d60fdb0e393fbf754acf0de49761a14841df7772e9bc82773966a1584c4d72baea00118f83f35cca6e537cbd4d811f5583b29783d8a6d94cd31be70d6f526c10ff09c6fa7ce069795a3fcd0511fd5fcb564bcc80ea9c78f38b80012539d8a4ddf6fe81e9cddb7f50dbbbbcc7e5d86097ccf4ec49189fb8bf318be6d5a0715d516b49af191258cd32dc833ce6eb4673c03a19bbace88cc54895f636cc0c1ec89096d11ce235a265ca1764232a689ae8\nOutput = 81b906605015a63aabe42ddf11e1978912f5404c7474b26dce3ed482bf961ecc818bf420c54659\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 81ebdd95054b0c822ef9ad7693f5a87adfb4b4c4ce70df2df84ed49c04da58ba5fc20a19e1a6e8b7a3900b22796dc4e869ee6b42792d15a8eceb56c09c69914e813cea8f6931e4b8ed6f421af298d595c97f4789c7caa612c7ef360984c21b93edc5401068b5af4c78a8771b984d53b8ea8adf2f6a7d4a0ba76c75e1dd9f658f20ded4a46071d46d7791b56803d8fea7f0b0f8e41ae3f09383a6f9585fe7753eaaffd2bf94563108beecc207bbb535f5fcc705f0dde9f708c62f49a9c90371d3\nOutput = fd326429df9b890e09b54b18b8f34f1e24\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = bcc35f94cde66cb1136625d625b94432a35b22f3d2fa11a613ff0fca5bd57f87b902ccdc1cd0aebcb0715ee869d1d1fe395f6793003f5eca465059c88660d446ff5f0818552022557e38c08a67ead991262254f10682975ec56397768537f4977af6d5f6aaceb7fb25dec5937230231fd8978af49119a29f29e424ab8272b47562792d5c94f774b8829d0b0d9f1a8c9eddf37574d5fa248eefa9c5271fc5ec2579c81bdd61b410fa61fe36e424221c113addb275664c801d34ca8c6351e4a858\nOutput = f1459b5f0c92f01a0f723a2e5662484d8f8c0a20fc29dad6acd43bb5f3effdf4e1b63e07fdfe6628d0d74ca19bf2d69e4a0abf86d293925a796772f8088e\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 232afbc927fa08c2f6a27b87d4a5cb09c07dc26fae73d73a90558839f4fd66d281b87ec734bce237ba166698ed829106a7de6942cd6cdce78fed8d2e4d81428e66490d036264cef92af941d3e35055fe3981e14d29cbb9a4f67473063baec79a1179f5a17c9c1832f2838fd7d5e59bb9659d56dce8a019edef1bb3accc697cc6cc7a778f60a064c7f6f5d529c6210262e003de583e81e3167b89971fb8c0e15d44fffef89b53d8d64dd797d159b56d2b08ea5307ea12c241bd58d4ee278a1f2e\nOutput = 53e6e8c729d6f9c319dd317e74b0db8e4ccca25f3c8305746e137ac63a63ef3739e7b595abb96e8d55e54f7bd41ab433378ffb911d\n\nDecrypt = RSA-OAEP-9\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 438cc7dc08a68da249e42505f8573ba60e2c2773d5b290f4cf9dff718e842081c383e67024a0f29594ea987b9d25e4b738f285970d195abb3a8c8054e3d79d6b9c9a8327ba596f1259e27126674766907d8d582ff3a8476154929adb1e6d1235b2ccb4ec8f663ba9cc670a92bebd853c8dbf69c6436d016f61add836e94732450434207f9fd4c43dec2a12a958efa01efe2669899b5e604c255c55fb7166de5589e369597bb09168c06dd5db177e06a1740eb2d5c82faeca6d92fcee9931ba9f\nOutput = b6b28ea2198d0c1008bc64\n\nPrivateKey = RSA-OAEP-10\nType = RSA\nInput = 308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb020301000102820100056b04216fe5f354ac77250a4b6b0c8525a85c59b0bd80c56450a22d5f438e596a333aa875e291dd43f48cb88b9d5fc0d499f9fcd1c397f9afc070cd9e398c8d19e61db7c7410a6b2675dfbf5d345b804d201add502d5ce2dfcb091ce9997bbebe57306f383e4d588103f036f7e85d1934d152a323e4a8db451d6f4a5b1b0f102cc150e02feee2b88dea4ad4c1baccb24d84072d14e1d24a6771f7408ee30564fb86d4393a34bcf0b788501d193303f13a2284b001f0f649eaf79328d4ac5c430ab4414920a9460ed1b7bc40ec653e876d09abc509ae45b525190116a0c26101848298509c1c3bf3a483e7274054e15e97075036e989f60932807b5257751e7902818100ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce76902818100bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc386318302818100c73564571d00fb15d08a3de9957a50915d7126e9442dacf42bc82e862e5673ff6a008ed4d2e374617df89f17a160b43b7fda9cb6b6b74218609815f7d45ca263c159aa32d272d127faf4bc8ca2d77378e8aeb19b0ad7da3cb3de0ae7314980f62b6d4b0a875d1df03c1bae39ccd833ef6cd7e2d9528bf084d1f969e794e9f6c10281802658b37f6df9c1030be1db68117fa9d87e39ea2b693b7e6d3a2f70947413eec6142e18fb8dfcb6ac545d7c86a0ad48f8457170f0efb26bc48126c53efd1d16920198dc2a1107dc282db6a80cd3062360ba3fa13f70e4312ff1a6cd6b8fc4cd9c5c3db17c6d6a57212f73ae29f619327bad59b153858585ba4e28b60a62a45e490281806f38526b3925085534ef3e415a836ede8b86158a2c7cbfeccb0bd834304fec683ba8d4f479c433d43416e63269623cea100776d85aff401d3fff610ee65411ce3b1363d63a9709eede42647cea561493d54570a879c18682cd97710b96205ec31117d73b5f36223fadd6e8ba90dd7c0ee61d44e163251e20c7f66eb305117cb8\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 53ea5dc08cd260fb3b858567287fa91552c30b2febfba213f0ae87702d068d19bab07fe574523dfb42139d68c3c5afeee0bfe4cb7969cbf382b804d6e61396144e2d0e60741f8993c3014b58b9b1957a8babcd23af854f4c356fb1662aa72bfcc7e586559dc4280d160c126785a723ebeebeff71f11594440aaef87d10793a8774a239d4a04c87fe1467b9daf85208ec6c7255794a96cc29142f9a8bd418e3c1fd67344b0cd0829df3b2bec60253196293c6b34d3f75d32f213dd45c6273d505adf4cced1057cb758fc26aeefa441255ed4e64c199ee075e7f16646182fdb464739b68ab5daff0e63e9552016824f054bf4d3c8c90a97bb6b6553284eb429fcc\nOutput = 8bba6bf82a6c0f86d5f1756e97956870b08953b06b4eb205bc1694ee\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = a2b1a430a9d657e2fa1c2bb5ed43ffb25c05a308fe9093c01031795f5874400110828ae58fb9b581ce9dddd3e549ae04a0985459bde6c626594e7b05dc4278b2a1465c1368408823c85e96dc66c3a30983c639664fc4569a37fe21e5a195b5776eed2df8d8d361af686e750229bbd663f161868a50615e0c337bec0ca35fec0bb19c36eb2e0bbcc0582fa1d93aacdb061063f59f2ce1ee43605e5d89eca183d2acdfe9f81011022ad3b43a3dd417dac94b4e11ea81b192966e966b182082e71964607b4f8002f36299844a11f2ae0faeac2eae70f8f4f98088acdcd0ac556e9fccc511521908fad26f04c64201450305778758b0538bf8b5bb144a828e629795\nOutput = e6ad181f053b58a904f2457510373e57\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 9886c3e6764a8b9a84e84148ebd8c3b1aa8050381a78f668714c16d9cfd2a6edc56979c535d9dee3b44b85c18be8928992371711472216d95dda98d2ee8347c9b14dffdff84aa48d25ac06f7d7e65398ac967b1ce90925f67dce049b7f812db0742997a74d44fe81dbe0e7a3feaf2e5c40af888d550ddbbe3bc20657a29543f8fc2913b9bd1a61b2ab2256ec409bbd7dc0d17717ea25c43f42ed27df8738bf4afc6766ff7aff0859555ee283920f4c8a63c4a7340cbafddc339ecdb4b0515002f96c932b5b79167af699c0ad3fccfdf0f44e85a70262bf2e18fe34b850589975e867ff969d48eabf212271546cdc05a69ecb526e52870c836f307bd798780ede\nOutput = 510a2cf60e866fa2340553c94ea39fbc256311e83e94454b4124\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 6318e9fb5c0d05e5307e1683436e903293ac4642358aaa223d7163013aba87e2dfda8e60c6860e29a1e92686163ea0b9175f329ca3b131a1edd3a77759a8b97bad6a4f8f4396f28cf6f39ca58112e48160d6e203daa5856f3aca5ffed577af499408e3dfd233e3e604dbe34a9c4c9082de65527cac6331d29dc80e0508a0fa7122e7f329f6cca5cfa34d4d1da417805457e008bec549e478ff9e12a763c477d15bbb78f5b69bd57830fc2c4ed686d79bc72a95d85f88134c6b0afe56a8ccfbc855828bb339bd17909cf1d70de3335ae07039093e606d655365de6550b872cd6de1d440ee031b61945f629ad8a353b0d40939e96a3c450d2a8d5eee9f678093c8\nOutput = bcdd190da3b7d300df9a06e22caae2a75f10c91ff667b7c16bde8b53064a2649a94045c9\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 75290872ccfd4a4505660d651f56da6daa09ca1301d890632f6a992f3d565cee464afded40ed3b5be9356714ea5aa7655f4a1366c2f17c728f6f2c5a5d1f8e28429bc4e6f8f2cff8da8dc0e0a9808e45fd09ea2fa40cb2b6ce6ffff5c0e159d11b68d90a85f7b84e103b09e682666480c657505c0929259468a314786d74eab131573cf234bf57db7d9e66cc6748192e002dc0deea930585f",
+    "0831fdcd9bc33d51f79ed2ffc16bcf4d59812fcebcaa3f9069b0e445686d644c25ccf63b456ee5fa6ffe96f19cdf751fed9eaf35957754dbf4bfea5216aa1844dc507cb2d080e722eba150308c2b5ff1193620f1766ecf4481bafb943bd292877f2136ca494aba0\nOutput = a7dd6c7dc24b46f9dd5f1e91ada4c3b3df947e877232a9\n\nDecrypt = RSA-OAEP-10\nRSAPadding = OAEP\nMGF1Digest = SHA1\nInput = 2d207a73432a8fb4c03051b3f73b28a61764098dfa34c47a20995f8115aa6816679b557e82dbee584908c6e69782d7deb34dbd65af063d57fca76a5fd069492fd6068d9984d209350565a62e5c77f23038c12cb10c6634709b547c46f6b4a709bd85ca122d74465ef97762c29763e06dbc7a9e738c78bfca0102dc5e79d65b973f28240caab2e161a78b57d262457ed8195d53e3c7ae9da021883c6db7c24afdd2322eac972ad3c354c5fcef1e146c3a0290fb67adf007066e00428d2cec18ce58f9328698defef4b2eb5ec76918fde1c198cbb38b7afc67626a9aefec4322bfd90d2563481c9a221f78c8272c82d1b62ab914e1c69f6af6ef30ca5260db4a46\nOutput = eaf1a73a1b0c4609537de69cd9228bbcfb9a8ca8c6c3efaf056fe4a7f4634ed00b7c39ec6922d7b8ea2c04ebac\n\n\n# Single-shot signing tests.\n\nSignMessage = RSA-2048\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = RSA-2048\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = RSA-2048-SPKI\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\n\nVerifyMessage = P-256\nDigest = SHA256\nInput = \"Hello world\"\nOutput = 304502204c66004635c267394bd6857c1e0b53b22a2bab1ca7dff9d5c1b42143858b3ea7022100ae81228510e03cd49a8863d2ebd1c05fe0c87eacd1150433132b909994cd0dbd\n\n# Digest can't be omitted in many algorithms.\nSignMessage = RSA-2048\nInput = \"Hello world\"\nError = NO_DEFAULT_DIGEST\n\nVerifyMessage = RSA-2048\nInput = \"Hello world\"\nOutput = 301894798b49d6ec55d32dcc74314f04230591a515781f3eb4492f5324b56046836c4bc3e25942af341e88558cb4c3814a849207575d343189147989b16e296b5138dbbc717116dc416f201dfa35943d15060493953cda1f04a13ff89845cf7fd69e1a78d5d38522a77bb234e5d0ba2ae17ada6e22fdae27a4052fdb8ac267507dfe06ed7a865e61a52b530bbbf65c7caa89739613df10ae3b0e62ff6831ee0770086aad39c329462aede9f1b29a501bc3d09e0fe4034aa5d6831d44491d508111d88a1d7ba50cee5ef7e701b3a589adc09a752a974a6805956f4a1a0582f66309a1e02e9fb6b10d2c820fe98bb2eb04f435bc8a649cc9ab6c5a4c03e83800d1\nError = NO_DEFAULT_DIGEST\n\n# Signing test vectors from RFC 8032.\nSignMessage = Ed25519\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nSignMessage = Ed25519-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nSignMessage = Ed25519-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nSignMessage = Ed25519-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nSignMessage = Ed25519-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\n# Signing with public keys is not allowed.\nSignMessage = Ed25519-SPKI\nInput = \"\"\nError = NOT_A_PRIVATE_KEY\n\n# Verify test vectors from RFC 8032. Test verifying with both the public and\n# private key.\nVerifyMessage = Ed25519\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nVerifyMessage = Ed25519-SPKI\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\n\nVerifyMessage = Ed25519-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nVerifyMessage = Ed25519-SPKI-2\nInput = 72\nOutput = 92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\n\nVerifyMessage = Ed25519-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nVerifyMessage = Ed25519-SPKI-3\nInput = af82\nOutput = 6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\n\nVerifyMessage = Ed25519-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d",
+    "9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nVerifyMessage = Ed25519-SPKI-4\nInput = 08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d879de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4feba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbefefd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed185ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f27088d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b0707e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128bab27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51addd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429ec96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb751fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34dff7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e488acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a32ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5fb93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b50d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380db2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\nOutput = 0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\n\nVerifyMessage = Ed25519-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\nVerifyMessage = Ed25519-SPKI-5\nInput = ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f\nOutput = dc2a4459e7369633a52b1bf277839a00201009a3efbf3ecb69bea2186c26b58909351fc9ac90b3ecfdfbc7c66431e0303dca179c138ac17ad9bef1177331a704\n\n# Length is wrong.\nVerifyMessage = Ed25519-SPKI\nInput = \"\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a10\nError = INVALID_SIGNATURE\n\n# Message is wrong.\nVerifyMessage = Ed25519-SPKI\nInput = \"Hello world\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\nError = INVALID_SIGNATURE\n\n# Ed25519 does not support configuring a digest.\nSignMessage = Ed25519\nInput = \"\"\nDigest = SHA256\nError = COMMAND_NOT_SUPPORTED\n\n# Ed25519 does not support signing a pre-hashed value.\nSign = Ed25519\nInput = \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"\nError = OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\n\nVerify = Ed25519\nInput = \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"\nOutput = e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\nError = OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\n",
 };
-static const size_t kLen32 = 125220;
+static const size_t kLen32 = 128816;
 
 static const char *kData33[] = {
     "#\n# Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.\n#\n# Licensed under the OpenSSL license (the \"License\").  You may not use\n# this file except in compliance with the License.  You can obtain a copy\n# in the file LICENSE in the source distribution or at\n# https://www.openssl.org/source/license.html\n\nPassword = \"\"\nSalt = \"\"\nN = 16\nr = 1\np = 1\nKey = 77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906\n\nPassword = \"password\"\nSalt = \"NaCl\"\nN = 1024\nr = 8\np = 16\nKey = fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640\n\nPassword = \"pleaseletmein\"\nSalt = \"SodiumChloride\"\nN = 16384\nr = 8\np = 1\nKey = 7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887\n\n# NB: this test requires more than 1GB of memory to run so it is disabled by\n# default. Uncomment it to run.\n# Password = \"pleaseletmein\"\n# Salt = \"SodiumChloride\"\n# N = 1048576\n# r = 8\n# p = 1\n# Key = 2101cb9b6a511aaeaddbbe09cf70f881ec568d574a2ffd4dabe5ee9820adaa478e56fd8f4ba5d09ffa1c6d927c40f4c337304049e8a952fbcbf45c6fa77a41a4\n# MaxMemory = 10000000000\n",
diff --git a/third_party/boringssl/err_data.c b/third_party/boringssl/err_data.c
index e83dc914..06003ac 100644
--- a/third_party/boringssl/err_data.c
+++ b/third_party/boringssl/err_data.c
@@ -185,43 +185,43 @@
     0x28340c5e,
     0x283480ac,
     0x283500ea,
-    0x2c322c82,
+    0x2c322c99,
     0x2c3292a5,
-    0x2c332c90,
-    0x2c33aca2,
-    0x2c342cb6,
-    0x2c34acc8,
-    0x2c352ce3,
-    0x2c35acf5,
-    0x2c362d08,
+    0x2c332ca7,
+    0x2c33acb9,
+    0x2c342ccd,
+    0x2c34acdf,
+    0x2c352cfa,
+    0x2c35ad0c,
+    0x2c362d1f,
     0x2c36832d,
-    0x2c372d15,
-    0x2c37ad27,
-    0x2c382d4c,
-    0x2c38ad63,
-    0x2c392d71,
-    0x2c39ad81,
-    0x2c3a2d93,
-    0x2c3aada7,
-    0x2c3b2db8,
-    0x2c3badd7,
+    0x2c372d2c,
+    0x2c37ad3e,
+    0x2c382d63,
+    0x2c38ad7a,
+    0x2c392d88,
+    0x2c39ad98,
+    0x2c3a2daa,
+    0x2c3aadbe,
+    0x2c3b2dcf,
+    0x2c3badee,
     0x2c3c12b7,
     0x2c3c92cd,
-    0x2c3d2deb,
+    0x2c3d2e02,
     0x2c3d92e6,
-    0x2c3e2e08,
-    0x2c3eae16,
-    0x2c3f2e2e,
-    0x2c3fae46,
-    0x2c402e53,
+    0x2c3e2e1f,
+    0x2c3eae2d,
+    0x2c3f2e45,
+    0x2c3fae5d,
+    0x2c402e6a,
     0x2c4091b8,
-    0x2c412e64,
-    0x2c41ae77,
+    0x2c412e7b,
+    0x2c41ae8e,
     0x2c42117e,
-    0x2c42ae88,
+    0x2c42ae9f,
     0x2c430720,
-    0x2c43adc9,
-    0x2c442d3a,
+    0x2c43ade0,
+    0x2c442d51,
     0x30320000,
     0x30328015,
     0x3033001f,
@@ -410,167 +410,168 @@
     0x404c1dd7,
     0x404c9de9,
     0x404d1e0a,
-    0x404d9e2c,
-    0x404e1e40,
-    0x404e9e4d,
-    0x404f1e7a,
-    0x404f9ea3,
-    0x40501ede,
-    0x40509ef2,
-    0x40511f0d,
-    0x40521f1d,
-    0x40529f41,
-    0x40531f59,
-    0x40539f6c,
-    0x40541f81,
-    0x40549fa4,
-    0x40551fb2,
-    0x40559fcf,
-    0x40561fdc,
-    0x40569ff5,
-    0x4057200d,
-    0x4057a020,
-    0x40582035,
-    0x4058a05c,
-    0x4059208b,
-    0x4059a0b8,
-    0x405a20cc,
-    0x405aa0dc,
-    0x405b20f4,
-    0x405ba105,
-    0x405c2118,
-    0x405ca157,
-    0x405d2164,
-    0x405da17b,
-    0x405e21b9,
+    0x404d9e43,
+    0x404e1e57,
+    0x404e9e64,
+    0x404f1e91,
+    0x404f9eba,
+    0x40501ef5,
+    0x40509f09,
+    0x40511f24,
+    0x40521f34,
+    0x40529f58,
+    0x40531f70,
+    0x40539f83,
+    0x40541f98,
+    0x40549fbb,
+    0x40551fc9,
+    0x40559fe6,
+    0x40561ff3,
+    0x4056a00c,
+    0x40572024,
+    0x4057a037,
+    0x4058204c,
+    0x4058a073,
+    0x405920a2,
+    0x4059a0cf,
+    0x405a20e3,
+    0x405aa0f3,
+    0x405b210b,
+    0x405ba11c,
+    0x405c212f,
+    0x405ca16e,
+    0x405d217b,
+    0x405da192,
+    0x405e21d0,
     0x405e8ab1,
-    0x405f21da,
-    0x405fa1e7,
-    0x406021f5,
-    0x4060a217,
-    0x4061225b,
-    0x4061a293,
-    0x406222aa,
-    0x4062a2bb,
-    0x406322cc,
-    0x4063a2e1,
-    0x406422f8,
-    0x4064a324,
-    0x4065233f,
-    0x4065a356,
-    0x4066236e,
-    0x4066a398,
-    0x406723c3,
-    0x4067a3e4,
-    0x4068240b,
-    0x4068a42c,
-    0x4069245e,
-    0x4069a48c,
-    0x406a24ad,
-    0x406aa4cd,
-    0x406b2655,
-    0x406ba678,
-    0x406c268e,
-    0x406ca909,
-    0x406d2938,
-    0x406da960,
-    0x406e298e,
-    0x406ea9db,
-    0x406f29fa,
-    0x406faa32,
-    0x40702a45,
-    0x4070aa62,
+    0x405f21f1,
+    0x405fa1fe,
+    0x4060220c,
+    0x4060a22e,
+    0x40612272,
+    0x4061a2aa,
+    0x406222c1,
+    0x4062a2d2,
+    0x406322e3,
+    0x4063a2f8,
+    0x4064230f,
+    0x4064a33b,
+    0x40652356,
+    0x4065a36d,
+    0x40662385,
+    0x4066a3af,
+    0x406723da,
+    0x4067a3fb,
+    0x40682422,
+    0x4068a443,
+    0x40692475,
+    0x4069a4a3,
+    0x406a24c4,
+    0x406aa4e4,
+    0x406b266c,
+    0x406ba68f,
+    0x406c26a5,
+    0x406ca920,
+    0x406d294f,
+    0x406da977,
+    0x406e29a5,
+    0x406ea9f2,
+    0x406f2a11,
+    0x406faa49,
+    0x40702a5c,
+    0x4070aa79,
     0x40710800,
-    0x4071aa74,
-    0x40722a87,
-    0x4072aaa0,
-    0x40732ab8,
+    0x4071aa8b,
+    0x40722a9e,
+    0x4072aab7,
+    0x40732acf,
     0x407394a4,
-    0x40742acc,
-    0x4074aae6,
-    0x40752af7,
-    0x4075ab0b,
-    0x40762b19,
+    0x40742ae3,
+    0x4074aafd,
+    0x40752b0e,
+    0x4075ab22,
+    0x40762b30,
     0x4076927b,
-    0x40772b3e,
-    0x4077ab60,
-    0x40782b7b,
-    0x4078abb4,
-    0x40792bcb,
-    0x4079abe1,
-    0x407a2bed,
-    0x407aac00,
-    0x407b2c15,
-    0x407bac27,
-    0x407c2c58,
-    0x407cac61,
-    0x407d2447,
-    0x407d9eb3,
-    0x407e2b90,
-    0x407ea06c,
+    0x40772b55,
+    0x4077ab77,
+    0x40782b92,
+    0x4078abcb,
+    0x40792be2,
+    0x4079abf8,
+    0x407a2c04,
+    0x407aac17,
+    0x407b2c2c,
+    0x407bac3e,
+    0x407c2c6f,
+    0x407cac78,
+    0x407d245e,
+    0x407d9eca,
+    0x407e2ba7,
+    0x407ea083,
     0x407f1c93,
     0x407f9a53,
-    0x40801e8a,
+    0x40801ea1,
     0x40809cbb,
-    0x40811f2f,
-    0x40819e64,
-    0x40822979,
+    0x40811f46,
+    0x40819e7b,
+    0x40822990,
     0x40829a39,
-    0x40832047,
-    0x4083a309,
+    0x4083205e,
+    0x4083a320,
     0x40841ccf,
-    0x4084a0a4,
-    0x40852129,
-    0x4085a23f,
-    0x4086219b,
-    0x40869ecd,
-    0x408729bf,
-    0x4087a270,
+    0x4084a0bb,
+    0x40852140,
+    0x4085a256,
+    0x408621b2,
+    0x40869ee4,
+    0x408729d6,
+    0x4087a287,
     0x40881a9a,
-    0x4088a3f7,
+    0x4088a40e,
     0x40891ae9,
     0x40899a76,
-    0x408a26ae,
+    0x408a26c5,
     0x408a9884,
-    0x408b2c3c,
-    0x408baa0f,
-    0x408c2139,
+    0x408b2c53,
+    0x408baa26,
+    0x408c2150,
     0x408c98a0,
     0x408d1d12,
     0x408d9ce3,
-    0x41f42580,
-    0x41f92612,
-    0x41fe2505,
-    0x41fea6fa,
-    0x41ff27eb,
-    0x42032599,
-    0x420825bb,
-    0x4208a5f7,
-    0x420924e9,
-    0x4209a631,
-    0x420a2540,
-    0x420aa520,
-    0x420b2560,
-    0x420ba5d9,
-    0x420c2807,
-    0x420ca6c7,
-    0x420d26e1,
-    0x420da718,
-    0x42122732,
-    0x421727ce,
-    0x4217a774,
-    0x421c2796,
-    0x421f2751,
-    0x4221281e,
-    0x422627b1,
-    0x422b28ed,
-    0x422ba89b,
-    0x422c28d5,
-    0x422ca85a,
-    0x422d2839,
-    0x422da8ba,
-    0x422e2880,
-    0x422ea9a6,
+    0x408e1e2c,
+    0x41f42597,
+    0x41f92629,
+    0x41fe251c,
+    0x41fea711,
+    0x41ff2802,
+    0x420325b0,
+    0x420825d2,
+    0x4208a60e,
+    0x42092500,
+    0x4209a648,
+    0x420a2557,
+    0x420aa537,
+    0x420b2577,
+    0x420ba5f0,
+    0x420c281e,
+    0x420ca6de,
+    0x420d26f8,
+    0x420da72f,
+    0x42122749,
+    0x421727e5,
+    0x4217a78b,
+    0x421c27ad,
+    0x421f2768,
+    0x42212835,
+    0x422627c8,
+    0x422b2904,
+    0x422ba8b2,
+    0x422c28ec,
+    0x422ca871,
+    0x422d2850,
+    0x422da8d1,
+    0x422e2897,
+    0x422ea9bd,
     0x4432072b,
     0x4432873a,
     0x44330746,
@@ -623,69 +624,69 @@
     0x4c4014c9,
     0x4c4092f7,
     0x4c4114ed,
-    0x50322e9a,
-    0x5032aea9,
-    0x50332eb4,
-    0x5033aec4,
-    0x50342edd,
-    0x5034aef7,
-    0x50352f05,
-    0x5035af1b,
-    0x50362f2d,
-    0x5036af43,
-    0x50372f5c,
-    0x5037af6f,
-    0x50382f87,
-    0x5038af98,
-    0x50392fad,
-    0x5039afc1,
-    0x503a2fe1,
-    0x503aaff7,
-    0x503b300f,
-    0x503bb021,
-    0x503c303d,
-    0x503cb054,
-    0x503d306d,
-    0x503db083,
-    0x503e3090,
-    0x503eb0a6,
-    0x503f30b8,
+    0x50322eb1,
+    0x5032aec0,
+    0x50332ecb,
+    0x5033aedb,
+    0x50342ef4,
+    0x5034af0e,
+    0x50352f1c,
+    0x5035af32,
+    0x50362f44,
+    0x5036af5a,
+    0x50372f73,
+    0x5037af86,
+    0x50382f9e,
+    0x5038afaf,
+    0x50392fc4,
+    0x5039afd8,
+    0x503a2ff8,
+    0x503ab00e,
+    0x503b3026,
+    0x503bb038,
+    0x503c3054,
+    0x503cb06b,
+    0x503d3084,
+    0x503db09a,
+    0x503e30a7,
+    0x503eb0bd,
+    0x503f30cf,
     0x503f8382,
-    0x504030cb,
-    0x5040b0db,
-    0x504130f5,
-    0x5041b104,
-    0x5042311e,
-    0x5042b13b,
-    0x5043314b,
-    0x5043b15b,
-    0x5044316a,
+    0x504030e2,
+    0x5040b0f2,
+    0x5041310c,
+    0x5041b11b,
+    0x50423135,
+    0x5042b152,
+    0x50433162,
+    0x5043b172,
+    0x50443181,
     0x5044843f,
-    0x5045317e,
-    0x5045b19c,
-    0x504631af,
-    0x5046b1c5,
-    0x504731d7,
-    0x5047b1ec,
-    0x50483212,
-    0x5048b220,
-    0x50493233,
-    0x5049b248,
-    0x504a325e,
-    0x504ab26e,
-    0x504b328e,
-    0x504bb2a1,
-    0x504c32c4,
-    0x504cb2f2,
-    0x504d3304,
-    0x504db321,
-    0x504e333c,
-    0x504eb358,
-    0x504f336a,
-    0x504fb381,
-    0x50503390,
+    0x50453195,
+    0x5045b1b3,
+    0x504631c6,
+    0x5046b1dc,
+    0x504731ee,
+    0x5047b203,
+    0x50483229,
+    0x5048b237,
+    0x5049324a,
+    0x5049b25f,
+    0x504a3275,
+    0x504ab285,
+    0x504b32a5,
+    0x504bb2b8,
+    0x504c32db,
+    0x504cb309,
+    0x504d331b,
+    0x504db338,
+    0x504e3353,
+    0x504eb36f,
+    0x504f3381,
+    0x504fb398,
+    0x505033a7,
     0x505086ef,
-    0x505133a3,
+    0x505133ba,
     0x58320f3a,
     0x68320efc,
     0x68328c6a,
@@ -1112,6 +1113,7 @@
     "FRAGMENT_MISMATCH\0"
     "GOT_NEXT_PROTO_WITHOUT_EXTENSION\0"
     "HANDSHAKE_FAILURE_ON_CLIENT_HELLO\0"
+    "HANDSHAKE_NOT_COMPLETE\0"
     "HTTPS_PROXY_REQUEST\0"
     "HTTP_REQUEST\0"
     "INAPPROPRIATE_FALLBACK\0"
diff --git a/third_party/boringssl/ios-aarch64/crypto/fipsmodule/aesv8-armx64.S b/third_party/boringssl/ios-aarch64/crypto/fipsmodule/aesv8-armx64.S
index 90310f62..787cce2 100644
--- a/third_party/boringssl/ios-aarch64/crypto/fipsmodule/aesv8-armx64.S
+++ b/third_party/boringssl/ios-aarch64/crypto/fipsmodule/aesv8-armx64.S
@@ -2,9 +2,7 @@
 
 #if __ARM_MAX_ARCH__>=7
 .text
-#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH)
 
-#endif
 .align	5
 Lrcon:
 .long	0x01,0x01,0x01,0x01
diff --git a/third_party/boringssl/ios-aarch64/crypto/fipsmodule/ghashv8-armx64.S b/third_party/boringssl/ios-aarch64/crypto/fipsmodule/ghashv8-armx64.S
index 01d32321..cdf64e6 100644
--- a/third_party/boringssl/ios-aarch64/crypto/fipsmodule/ghashv8-armx64.S
+++ b/third_party/boringssl/ios-aarch64/crypto/fipsmodule/ghashv8-armx64.S
@@ -1,9 +1,7 @@
 #include <openssl/arm_arch.h>
 
 .text
-#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH)
 
-#endif
 .globl	_gcm_init_v8
 .private_extern	_gcm_init_v8
 
diff --git a/third_party/boringssl/ios-arm/crypto/chacha/chacha-armv4.S b/third_party/boringssl/ios-arm/crypto/chacha/chacha-armv4.S
index 8c61ca5..2ec7129 100644
--- a/third_party/boringssl/ios-arm/crypto/chacha/chacha-armv4.S
+++ b/third_party/boringssl/ios-arm/crypto/chacha/chacha-armv4.S
@@ -1,5 +1,9 @@
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+
+
 .text
 #if defined(__thumb2__) || defined(__clang__)
 .syntax	unified
diff --git a/third_party/boringssl/ios-arm/crypto/fipsmodule/aes-armv4.S b/third_party/boringssl/ios-arm/crypto/fipsmodule/aes-armv4.S
index 516c89b0..8d43e367 100644
--- a/third_party/boringssl/ios-arm/crypto/fipsmodule/aes-armv4.S
+++ b/third_party/boringssl/ios-arm/crypto/fipsmodule/aes-armv4.S
@@ -44,6 +44,11 @@
 # define __ARM_ARCH__ __LINUX_ARM_ARCH__
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions. (ARMv8 AES
+@ instructions are in aesv8-armx.pl.)
+
+
 .text
 #if defined(__thumb2__) && !defined(__APPLE__)
 .syntax	unified
diff --git a/third_party/boringssl/ios-arm/crypto/fipsmodule/armv4-mont.S b/third_party/boringssl/ios-arm/crypto/fipsmodule/armv4-mont.S
index 1d516ef..fbb341fd 100644
--- a/third_party/boringssl/ios-arm/crypto/fipsmodule/armv4-mont.S
+++ b/third_party/boringssl/ios-arm/crypto/fipsmodule/armv4-mont.S
@@ -1,5 +1,9 @@
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+
+
 .text
 #if defined(__thumb2__)
 .syntax	unified
diff --git a/third_party/boringssl/ios-arm/crypto/fipsmodule/ghash-armv4.S b/third_party/boringssl/ios-arm/crypto/fipsmodule/ghash-armv4.S
index 0a053c5..ace157f 100644
--- a/third_party/boringssl/ios-arm/crypto/fipsmodule/ghash-armv4.S
+++ b/third_party/boringssl/ios-arm/crypto/fipsmodule/ghash-armv4.S
@@ -1,5 +1,10 @@
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions. (ARMv8 PMULL
+@ instructions are in aesv8-armx.pl.)
+
+
 .text
 #if defined(__thumb2__) || defined(__clang__)
 .syntax	unified
diff --git a/third_party/boringssl/ios-arm/crypto/fipsmodule/sha256-armv4.S b/third_party/boringssl/ios-arm/crypto/fipsmodule/sha256-armv4.S
index 2ea6517..7be4b6e 100644
--- a/third_party/boringssl/ios-arm/crypto/fipsmodule/sha256-armv4.S
+++ b/third_party/boringssl/ios-arm/crypto/fipsmodule/sha256-armv4.S
@@ -50,6 +50,11 @@
 # define __ARM_MAX_ARCH__ 7
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors. It does have ARMv8-only code, but those
+@ instructions are manually-encoded. (See unsha256.)
+
+
 .text
 #if defined(__thumb2__)
 .syntax	unified
diff --git a/third_party/boringssl/ios-arm/crypto/fipsmodule/sha512-armv4.S b/third_party/boringssl/ios-arm/crypto/fipsmodule/sha512-armv4.S
index b225c99..68aa98d4 100644
--- a/third_party/boringssl/ios-arm/crypto/fipsmodule/sha512-armv4.S
+++ b/third_party/boringssl/ios-arm/crypto/fipsmodule/sha512-armv4.S
@@ -63,6 +63,10 @@
 # define VFP_ABI_POP
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+
+
 #ifdef __ARMEL__
 # define LO 0
 # define HI 4
diff --git a/third_party/boringssl/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S
index 51e2464..0903773 100644
--- a/third_party/boringssl/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S
+++ b/third_party/boringssl/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S
@@ -3,9 +3,7 @@
 
 #if __ARM_MAX_ARCH__>=7
 .text
-#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH)
 .arch	armv8-a+crypto
-#endif
 .align	5
 .Lrcon:
 .long	0x01,0x01,0x01,0x01
diff --git a/third_party/boringssl/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S
index 89d780ff..bc59946 100644
--- a/third_party/boringssl/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S
+++ b/third_party/boringssl/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S
@@ -2,9 +2,7 @@
 #include <openssl/arm_arch.h>
 
 .text
-#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH)
 .arch	armv8-a+crypto
-#endif
 .globl	gcm_init_v8
 .hidden	gcm_init_v8
 .type	gcm_init_v8,%function
diff --git a/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S b/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
index 6c947734fe..bb48d1721 100644
--- a/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
@@ -1,6 +1,10 @@
 #if defined(__arm__)
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+.arch	armv7-a
+
 .text
 #if defined(__thumb2__) || defined(__clang__)
 .syntax	unified
diff --git a/third_party/boringssl/linux-arm/crypto/fipsmodule/aes-armv4.S b/third_party/boringssl/linux-arm/crypto/fipsmodule/aes-armv4.S
index d401fc7..5e49e08 100644
--- a/third_party/boringssl/linux-arm/crypto/fipsmodule/aes-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/fipsmodule/aes-armv4.S
@@ -45,6 +45,11 @@
 # define __ARM_ARCH__ __LINUX_ARM_ARCH__
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions. (ARMv8 AES
+@ instructions are in aesv8-armx.pl.)
+.arch	armv7-a
+
 .text
 #if defined(__thumb2__) && !defined(__APPLE__)
 .syntax	unified
diff --git a/third_party/boringssl/linux-arm/crypto/fipsmodule/armv4-mont.S b/third_party/boringssl/linux-arm/crypto/fipsmodule/armv4-mont.S
index e77a9ea..1181a45 100644
--- a/third_party/boringssl/linux-arm/crypto/fipsmodule/armv4-mont.S
+++ b/third_party/boringssl/linux-arm/crypto/fipsmodule/armv4-mont.S
@@ -1,6 +1,10 @@
 #if defined(__arm__)
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+.arch	armv7-a
+
 .text
 #if defined(__thumb2__)
 .syntax	unified
diff --git a/third_party/boringssl/linux-arm/crypto/fipsmodule/ghash-armv4.S b/third_party/boringssl/linux-arm/crypto/fipsmodule/ghash-armv4.S
index 5f8b50d..2ead979 100644
--- a/third_party/boringssl/linux-arm/crypto/fipsmodule/ghash-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/fipsmodule/ghash-armv4.S
@@ -1,6 +1,11 @@
 #if defined(__arm__)
 #include <openssl/arm_arch.h>
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions. (ARMv8 PMULL
+@ instructions are in aesv8-armx.pl.)
+.arch	armv7-a
+
 .text
 #if defined(__thumb2__) || defined(__clang__)
 .syntax	unified
diff --git a/third_party/boringssl/linux-arm/crypto/fipsmodule/sha256-armv4.S b/third_party/boringssl/linux-arm/crypto/fipsmodule/sha256-armv4.S
index f37fd7c..3479a756 100644
--- a/third_party/boringssl/linux-arm/crypto/fipsmodule/sha256-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/fipsmodule/sha256-armv4.S
@@ -51,6 +51,11 @@
 # define __ARM_MAX_ARCH__ 7
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors. It does have ARMv8-only code, but those
+@ instructions are manually-encoded. (See unsha256.)
+.arch	armv7-a
+
 .text
 #if defined(__thumb2__)
 .syntax	unified
diff --git a/third_party/boringssl/linux-arm/crypto/fipsmodule/sha512-armv4.S b/third_party/boringssl/linux-arm/crypto/fipsmodule/sha512-armv4.S
index bbeddf9..f02c0ff 100644
--- a/third_party/boringssl/linux-arm/crypto/fipsmodule/sha512-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/fipsmodule/sha512-armv4.S
@@ -64,6 +64,10 @@
 # define VFP_ABI_POP
 #endif
 
+@ Silence ARMv8 deprecated IT instruction warnings. This file is used by both
+@ ARMv7 and ARMv8 processors and does not use ARMv8 instructions.
+.arch	armv7-a
+
 #ifdef __ARMEL__
 # define LO 0
 # define HI 4
diff --git a/third_party/crashpad/README.chromium b/third_party/crashpad/README.chromium
index ce4a7b9..cb7b8cc 100644
--- a/third_party/crashpad/README.chromium
+++ b/third_party/crashpad/README.chromium
@@ -2,7 +2,7 @@
 Short Name: crashpad
 URL: https://crashpad.chromium.org/
 Version: unknown
-Revision: 10ff56eee5da29d14b86818b88a93d3e96b4bacd
+Revision: e9d2ca60f7329bf86951a6c9704953303ecaf6a6
 License: Apache 2.0
 License File: crashpad/LICENSE
 Security Critical: yes
diff --git a/third_party/crashpad/crashpad/.gn b/third_party/crashpad/crashpad/.gn
index 304422d..d447a55 100644
--- a/third_party/crashpad/crashpad/.gn
+++ b/third_party/crashpad/crashpad/.gn
@@ -13,7 +13,3 @@
 # limitations under the License.
 
 buildconfig = "//build/BUILDCONFIG.gn"
-
-# This secondary source root is used to put various forwarding/stub files that
-# serve to make the core build files compatible with Chromium.
-secondary_source = "//build/chromium_compatibility/"
diff --git a/third_party/crashpad/crashpad/BUILD.gn b/third_party/crashpad/crashpad/BUILD.gn
index 6ca07512..9f386afa 100644
--- a/third_party/crashpad/crashpad/BUILD.gn
+++ b/third_party/crashpad/crashpad/BUILD.gn
@@ -12,14 +12,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
-import("build/crashpad_in_chromium.gni")
+import("build/crashpad_buildconfig.gni")
+import("build/test.gni")
 
 config("crashpad_config") {
   include_dirs = [ "." ]
 }
 
-if (crashpad_in_chromium) {
+if (crashpad_is_in_chromium) {
   test("crashpad_tests") {
     deps = [
       "client:client_test",
diff --git a/third_party/crashpad/crashpad/DEPS b/third_party/crashpad/crashpad/DEPS
index c59ff43..b197e65 100644
--- a/third_party/crashpad/crashpad/DEPS
+++ b/third_party/crashpad/crashpad/DEPS
@@ -28,7 +28,7 @@
       '5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f',
   'crashpad/third_party/mini_chromium/mini_chromium':
       Var('chromium_git') + '/chromium/mini_chromium@' +
-      '20182dd263312db9fad52042fc92c33331ec6904',
+      'edfe51ce818e55eae73ab3f144a360e855533888',
   'crashpad/third_party/zlib/zlib':
       Var('chromium_git') + '/chromium/src/third_party/zlib@' +
       '13dc246a58e4b72104d35f9b1809af95221ebda7',
diff --git a/third_party/crashpad/crashpad/build/BUILD.gn b/third_party/crashpad/crashpad/build/BUILD.gn
index e60cd0c6..ceae81e 100644
--- a/third_party/crashpad/crashpad/build/BUILD.gn
+++ b/third_party/crashpad/crashpad/build/BUILD.gn
@@ -16,10 +16,18 @@
 # whether code is being built standalone, or in Chromium, or potentially in some
 # other configutation.
 
-import("crashpad_in_chromium.gni")
+import("crashpad_buildconfig.gni")
 
-config("crashpad_in_chromium") {
-  if (crashpad_in_chromium) {
-    defines = [ "CRASHPAD_IN_CHROMIUM" ]
+config("crashpad_is_in_chromium") {
+  if (crashpad_is_in_chromium) {
+    defines = [ "CRASHPAD_IS_IN_CHROMIUM" ]
+  }
+}
+
+group("default_exe_manifest_win") {
+  if (crashpad_is_in_chromium) {
+    deps = [
+      "//build/win:default_exe_manifest",
+    ]
   }
 }
diff --git a/third_party/crashpad/crashpad/build/BUILDCONFIG.gn b/third_party/crashpad/crashpad/build/BUILDCONFIG.gn
index c931c2a..67d56ae 100644
--- a/third_party/crashpad/crashpad/build/BUILDCONFIG.gn
+++ b/third_party/crashpad/crashpad/build/BUILDCONFIG.gn
@@ -12,6 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Intentionally very minimal, so that Crashpad can build in-tree in a variety of
+# other projects, unrelated to the variables that are set in those projects'
+# BUILDCONFIG.gn. Do not add more variables here. Instead, make them available
+# in build/crashpad_buildconfig.gni if they must be globally available.
+
 if (target_os == "") {
   target_os = host_os
 }
@@ -28,33 +33,7 @@
   current_cpu = target_cpu
 }
 
-declare_args() {
-  is_debug = false
-  is_clang = current_os == "mac" || current_os == "fuchsia"
-  clang_root = ""
-}
-
-is_mac = false
-is_win = false
-is_linux = false
-is_android = false
-is_fuchsia = false
-
-if (current_os == "mac") {
-  is_mac = true
-} else if (current_os == "win") {
-  is_win = true
-} else if (current_os == "android") {
-  is_android = true
-} else if (current_os == "linux") {
-  is_linux = true
-} else if (current_os == "fuchsia") {
-  is_fuchsia = true
-}
-
-is_posix = is_mac || is_linux || is_android || is_fuchsia
-
-if (is_win) {
+if (current_os == "win") {
   set_default_toolchain(
       "//third_party/mini_chromium/mini_chromium/build:msvc_toolchain")
 } else {
@@ -62,15 +41,22 @@
       "//third_party/mini_chromium/mini_chromium/build:gcc_like_toolchain")
 }
 
+declare_args() {
+  # When true, enables the debug configuration, with additional run-time checks
+  # and logging. When false, enables the release configuration, with additional
+  # optimizations.
+  is_debug = false
+}
+
 _default_configs = [
   "//third_party/mini_chromium/mini_chromium/build:default",
   "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
-
-  # This (no-op) is added here so that build files that expect to be able to
-  # remove it can do so without causing an error.
-  "//build/config/compiler:chromium_code",
 ]
 
+_default_executable_configs =
+    _default_configs +
+    [ "//third_party/mini_chromium/mini_chromium/build:executable" ]
+
 set_defaults("source_set") {
   configs = _default_configs
 }
@@ -80,7 +66,7 @@
 }
 
 set_defaults("executable") {
-  configs = _default_configs
+  configs = _default_executable_configs
 }
 
 set_defaults("loadable_module") {
@@ -91,8 +77,6 @@
   configs = _default_configs
 }
 
-# These are set to constant values for Chromium build file compatibility. This
-# generally avoids extra explicit checking of whether or not Crashpad is
-# building in Chromium mode or not.
-is_ios = false
-is_component_build = false
+set_defaults("test") {
+  configs = _default_executable_configs
+}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/README.crashpad b/third_party/crashpad/crashpad/build/chromium_compatibility/README.crashpad
deleted file mode 100644
index 9a3c1296..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/README.crashpad
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory is used as a secondary GN source root for compatibility with
-Chromium. Files in this subtree should match file paths that the Crashpad build
-files need to refer to when building in Chromium. In the Crashpad tree, they
-should either be empty/no-ops, or forward to the real Crashpad implementation
-in the real tree. No actual configuration should be done in this secondary tree.
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/base/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/base/BUILD.gn
deleted file mode 100644
index f00a51c2..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/base/BUILD.gn
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This target is a stub so that both Crashpad and Chromium can refer to "//base"
-# in their build files. When building in the Chromium tree, "//base" will refer
-# the "real" base, but when building standalone in Crashpad, we forward those
-# references on to mini_chromium.
-
-group("base") {
-  public_configs =
-      [ "//third_party/mini_chromium/mini_chromium/base:base_public_config" ]
-  public_deps = [
-    "//third_party/mini_chromium/mini_chromium/base",
-  ]
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/base/test/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/base/test/BUILD.gn
deleted file mode 100644
index 5bc810a..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/base/test/BUILD.gn
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a stub to match Chromium. This target is unused and has no effect when
-# building standalone in Crashpad.
-
-group("test_support") {
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/BUILD.gn
deleted file mode 100644
index 9d4d2e14..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/BUILD.gn
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a stub to match Chromium. The configs in this file do not have any
-# effect on the build when building standalone in Crashpad.
-
-config("default_symbols") {
-}
-
-config("minimal_symbols") {
-}
-
-config("chromium_code") {
-}
-
-config("no_chromium_code") {
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/compiler.gni b/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/compiler.gni
deleted file mode 100644
index f615259..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/compiler/compiler.gni
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a stub to match Chromium, but is unused when building standalone in
-# Crashpad.
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/sysroot.gni b/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/sysroot.gni
deleted file mode 100644
index 49390dde..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/build/config/sysroot.gni
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# In Crashpad, sysroot.gni is in mini_chromium, forward to that one.
-import("//third_party/mini_chromium/mini_chromium/build/sysroot.gni")
-
-# To avoid Chromium Mac hermetic toolchain paths without explicitly checking
-# whether building in Chromium mode.
-if (is_mac) {
-  use_system_xcode = true
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/build/win/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/build/win/BUILD.gn
deleted file mode 100644
index 3bf730e..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/build/win/BUILD.gn
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a stub to match Chromium. The configs in this file do not have any
-# effect on the build when building standalone in Crashpad.
-
-group("default_exe_manifest") {
-}
-
-config("console") {
-}
-
-config("windowed") {
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gmock/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gmock/BUILD.gn
deleted file mode 100644
index 06c404c..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gmock/BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a forwarding target to match the location that Chromium uses.
-
-group("gmock") {
-  public_configs = [ "//third_party/gtest:gmock_public_config" ]
-  public_deps = [
-    "//third_party/gtest:gmock",
-  ]
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gtest/BUILD.gn b/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gtest/BUILD.gn
deleted file mode 100644
index 236359fd..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/gtest/BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This is a forwarding target to match the location that Chromium uses.
-
-group("gtest") {
-  public_configs = [ "//third_party/gtest:gtest_public_config" ]
-  public_deps = [
-    "//third_party/gtest:gtest",
-  ]
-}
diff --git a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/test.gni b/third_party/crashpad/crashpad/build/chromium_compatibility/testing/test.gni
deleted file mode 100644
index b94470dc..0000000
--- a/third_party/crashpad/crashpad/build/chromium_compatibility/testing/test.gni
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2017 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-template("test") {
-  executable(target_name) {
-    deps = []
-    forward_variables_from(invoker, "*")
-
-    testonly = true
-  }
-}
diff --git a/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni b/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni
new file mode 100644
index 0000000..021bd53
--- /dev/null
+++ b/third_party/crashpad/crashpad/build/crashpad_buildconfig.gni
@@ -0,0 +1,59 @@
+# Copyright 2017 The Crashpad Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+declare_args() {
+  # Determines various flavors of build configuration, and which concrete
+  # targets to use for dependencies. Valid values are "standalone", "chromium",
+  # and "fuchsia".
+  crashpad_dependencies = "standalone"
+}
+
+assert(
+    crashpad_dependencies == "chromium" || crashpad_dependencies == "fuchsia" ||
+    crashpad_dependencies == "standalone")
+
+crashpad_is_in_chromium = crashpad_dependencies == "chromium"
+crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia"
+crashpad_is_standalone = crashpad_dependencies == "standalone"
+
+if (crashpad_is_in_chromium) {
+  crashpad_is_mac = is_mac
+  crashpad_is_win = is_win
+  crashpad_is_linux = is_linux
+  crashpad_is_android = is_android
+  crashpad_is_fuchsia = is_fuchsia
+
+  crashpad_is_posix = is_posix
+
+  crashpad_is_clang = is_clang
+} else {
+  # Using mini_chromium, but in different locations depending on whether in
+  # Fuchsia, or standalone.
+  if (crashpad_is_in_fuchsia) {
+    import("//third_party/mini_chromium/build/compiler.gni")
+    import("//third_party/mini_chromium/build/platform.gni")
+  } else {
+    import("../third_party/mini_chromium/mini_chromium/build/compiler.gni")
+    import("../third_party/mini_chromium/mini_chromium/build/platform.gni")
+  }
+  crashpad_is_mac = mini_chromium_is_mac
+  crashpad_is_win = mini_chromium_is_win
+  crashpad_is_linux = mini_chromium_is_linux
+  crashpad_is_android = mini_chromium_is_android
+  crashpad_is_fuchsia = mini_chromium_is_fuchsia
+
+  crashpad_is_posix = mini_chromium_is_posix
+
+  crashpad_is_clang = mini_chromium_is_clang
+}
diff --git a/third_party/crashpad/crashpad/build/crashpad_dependencies.gni b/third_party/crashpad/crashpad/build/crashpad_dependencies.gni
new file mode 100644
index 0000000..1964fac
--- /dev/null
+++ b/third_party/crashpad/crashpad/build/crashpad_dependencies.gni
@@ -0,0 +1,53 @@
+# Copyright 2017 The Crashpad Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+declare_args() {
+  # Determines various flavors of build configuration, and which concrete
+  # targets to use for dependencies. Valid values are "standalone", "chromium",
+  # and "fuchsia".
+  crashpad_dependencies = "standalone"
+}
+
+assert(
+    crashpad_dependencies == "chromium" || crashpad_dependencies == "fuchsia" ||
+    crashpad_dependencies == "standalone")
+
+crashpad_is_in_chromium = crashpad_dependencies == "chromium"
+crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia"
+crashpad_is_standalone = crashpad_dependencies == "standalone"
+
+if (crashpad_is_in_chromium) {
+  crashpad_is_posix = is_posix
+} else if (crashpad_is_in_fuchsia) {
+  import("//third_party/mini_chromium/build/is_posix.gni")
+  crashpad_is_posix = mini_chromium_is_posix
+} else if (crashpad_is_standalone) {
+  import("../third_party/mini_chromium/mini_chromium/build/is_posix.gni")
+  crashpad_is_posix = mini_chromium_is_posix
+}
+
+if (crashpad_is_in_chromium) {
+  import("//testing/test.gni")
+} else {
+  template("test") {
+    executable(target_name) {
+      testonly = true
+      forward_variables_from(invoker, "*")
+    }
+  }
+
+  set_defaults("test") {
+    configs = default_executable_configs
+  }
+}
diff --git a/third_party/crashpad/crashpad/build/crashpad_in_chromium.gni b/third_party/crashpad/crashpad/build/test.gni
similarity index 72%
rename from third_party/crashpad/crashpad/build/crashpad_in_chromium.gni
rename to third_party/crashpad/crashpad/build/test.gni
index 568c52e7..f46520b 100644
--- a/third_party/crashpad/crashpad/build/crashpad_in_chromium.gni
+++ b/third_party/crashpad/crashpad/build/test.gni
@@ -12,6 +12,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-declare_args() {
-  crashpad_in_chromium = false
+import("crashpad_buildconfig.gni")
+
+if (crashpad_is_in_chromium) {
+  import("//testing/test.gni")
+} else {
+  template("test") {
+    executable(target_name) {
+      testonly = true
+      forward_variables_from(invoker, "*")
+    }
+  }
 }
diff --git a/third_party/crashpad/crashpad/client/BUILD.gn b/third_party/crashpad/crashpad/client/BUILD.gn
index bdff4cf..f7fd288f 100644
--- a/third_party/crashpad/crashpad/client/BUILD.gn
+++ b/third_party/crashpad/crashpad/client/BUILD.gn
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
 
 static_library("client") {
   sources = [
@@ -34,7 +34,7 @@
     "simulate_crash.h",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "capture_context_mac.S",
       "capture_context_mac.h",
@@ -45,7 +45,7 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     sources += [
       "crash_report_database_win.cc",
       "crashpad_client_win.cc",
@@ -53,7 +53,7 @@
     ]
   }
 
-  if (is_fuchsia) {
+  if (crashpad_is_fuchsia) {
     sources += [
       "crash_report_database_fuchsia.cc",
       "crashpad_client_fuchsia.cc",
@@ -64,11 +64,11 @@
 
   deps = [
     "../compat",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     libs = [ "rpcrt4.lib" ]
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
@@ -87,14 +87,14 @@
     "simple_string_dictionary_test.cc",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "capture_context_mac_test.cc",
       "simulate_crash_mac_test.cc",
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     sources += [ "crashpad_client_win_test.cc" ]
   }
 
@@ -102,17 +102,17 @@
     ":client",
     "../compat",
     "../test",
+    "../third_party/gtest:gmock",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gmock",
-    "//testing/gtest",
   ]
 
   data_deps = [
     "../handler:crashpad_handler",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     data_deps += [ "../handler:crashpad_handler_console" ]
   }
 }
diff --git a/third_party/crashpad/crashpad/compat/BUILD.gn b/third_party/crashpad/crashpad/compat/BUILD.gn
index a03653cf..52eda78b 100644
--- a/third_party/crashpad/crashpad/compat/BUILD.gn
+++ b/third_party/crashpad/crashpad/compat/BUILD.gn
@@ -12,29 +12,47 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import("../build/crashpad_buildconfig.gni")
+
 config("compat_config") {
   include_dirs = []
 
-  if (is_win) {
+  if (crashpad_is_mac) {
+    include_dirs += [ "mac" ]
+  }
+
+  if (crashpad_is_linux) {
+    include_dirs += [ "linux" ]
+  }
+
+  if (crashpad_is_win) {
     include_dirs += [ "win" ]
   } else {
     include_dirs += [ "non_win" ]
   }
+}
 
-  if (is_mac) {
-    include_dirs += [ "mac" ]
+template("compat_target") {
+  if (crashpad_is_mac) {
+    # There are no sources to compile, which doesn’t mix will with a
+    # static_library.
+    group(target_name) {
+      forward_variables_from(invoker, "*")
+    }
+  } else {
+    static_library(target_name) {
+      forward_variables_from(invoker, "*")
+    }
   }
 }
 
-static_library("compat") {
+compat_target("compat") {
   sources = []
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/AvailabilityMacros.h",
       "mac/kern/exc_resource.h",
-      "mac/mach-o/getsect.cc",
-      "mac/mach-o/getsect.h",
       "mac/mach-o/loader.h",
       "mac/mach/mach.h",
       "mac/sys/resource.h",
@@ -43,7 +61,14 @@
     sources += [ "non_mac/mach/mach.h" ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "linux/signal.h",
+      "linux/sys/ptrace.h",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "win/getopt.h",
       "win/strings.cc",
@@ -73,10 +98,7 @@
 
   deps = []
 
-  if (is_mac) {
-    deps += [ "../third_party/apple_cctools" ]
-  }
-  if (is_win) {
+  if (crashpad_is_win) {
     deps += [ "../third_party/getopt" ]
   }
 }
diff --git a/third_party/crashpad/crashpad/compat/android/sys/epoll.cc b/third_party/crashpad/crashpad/compat/android/sys/epoll.cc
new file mode 100644
index 0000000..64de763
--- /dev/null
+++ b/third_party/crashpad/crashpad/compat/android/sys/epoll.cc
@@ -0,0 +1,37 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <sys/epoll.h>
+
+#include <dlfcn.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+#if __ANDROID_API__ < 21
+
+extern "C" {
+
+int epoll_create1(int flags) {
+  static const auto epoll_create1_p =
+      reinterpret_cast<int (*)(int)>(dlsym(RTLD_DEFAULT, "epoll_create1"));
+  if (epoll_create1_p) {
+    return epoll_create1_p(flags);
+  }
+
+  return syscall(SYS_epoll_create1, flags);
+}
+
+}  // extern "C"
+
+#endif  // __ANDROID_API__ < 21
diff --git a/third_party/crashpad/crashpad/compat/android/sys/epoll.h b/third_party/crashpad/crashpad/compat/android/sys/epoll.h
new file mode 100644
index 0000000..387813e
--- /dev/null
+++ b/third_party/crashpad/crashpad/compat/android/sys/epoll.h
@@ -0,0 +1,50 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_COMPAT_ANDROID_SYS_EPOLL_H_
+#define CRASHPAD_COMPAT_ANDROID_SYS_EPOLL_H_
+
+#include_next <sys/epoll.h>
+
+#include <android/api-level.h>
+#include <fcntl.h>
+
+// This is missing from traditional headers before API 21.
+#if !defined(EPOLLRDHUP)
+#define EPOLLRDHUP 0x00002000
+#endif
+
+// EPOLL_CLOEXEC is undefined in traditional headers before API 21 and removed
+// from unified headers at API levels < 21 as a means to indicate that
+// epoll_create1 is missing from the C library, but the raw system call should
+// still be available.
+#if !defined(EPOLL_CLOEXEC)
+#define EPOLL_CLOEXEC O_CLOEXEC
+#endif
+
+#if __ANDROID_API__ < 21
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int epoll_create1(int flags);
+
+#ifdef __cplusplus
+}  // extern "C"
+#endif
+
+#endif  // __ANDROID_API__ < 21
+
+#endif  // CRASHPAD_COMPAT_ANDROID_SYS_EPOLL_H_
diff --git a/third_party/crashpad/crashpad/compat/android/sys/syscall.h b/third_party/crashpad/crashpad/compat/android/sys/syscall.h
index 81fce78..facce20 100644
--- a/third_party/crashpad/crashpad/compat/android/sys/syscall.h
+++ b/third_party/crashpad/crashpad/compat/android/sys/syscall.h
@@ -19,6 +19,10 @@
 
 // Android 5.0.0 (API 21) NDK
 
+#if !defined(SYS_epoll_create1)
+#define SYS_epoll_create1 __NR_epoll_create1
+#endif
+
 #if !defined(SYS_gettid)
 #define SYS_gettid __NR_gettid
 #endif
diff --git a/third_party/crashpad/crashpad/compat/compat.gyp b/third_party/crashpad/crashpad/compat/compat.gyp
index b0aec0af..d3b785b9 100644
--- a/third_party/crashpad/crashpad/compat/compat.gyp
+++ b/third_party/crashpad/crashpad/compat/compat.gyp
@@ -26,6 +26,8 @@
         'android/linux/prctl.h',
         'android/linux/ptrace.h',
         'android/sched.h',
+        'android/sys/epoll.cc',
+        'android/sys/epoll.h',
         'android/sys/mman.cc',
         'android/sys/mman.h',
         'android/sys/syscall.h',
@@ -36,8 +38,6 @@
         'mac/kern/exc_resource.h',
         'mac/mach/i386/thread_state.h',
         'mac/mach/mach.h',
-        'mac/mach-o/getsect.cc',
-        'mac/mach-o/getsect.h',
         'mac/mach-o/loader.h',
         'mac/sys/resource.h',
         'non_mac/mach/mach.h',
@@ -60,9 +60,6 @@
       ],
       'conditions': [
         ['OS=="mac"', {
-          'dependencies': [
-            '../third_party/apple_cctools/apple_cctools.gyp:apple_cctools',
-          ],
           'include_dirs': [
             'mac',
           ],
diff --git a/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.cc b/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.cc
deleted file mode 100644
index 6cda9ff..0000000
--- a/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2014 The Crashpad Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <mach-o/getsect.h>
-
-// This is only necessary when building code that might run on systems earlier
-// than 10.7. When building for 10.7 or later, getsectiondata() and
-// getsegmentdata() are always present in libmacho and made available through
-// libSystem. When building for earlier systems, custom definitions of
-// these functions are needed.
-//
-// This file checks the deployment target instead of the SDK. The deployment
-// target is correct because it identifies the earliest possible system that
-// the code being compiled is expected to run on.
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
-
-#include <dlfcn.h>
-#include <stddef.h>
-
-#include "third_party/apple_cctools/cctools/include/mach-o/getsect.h"
-
-namespace {
-
-// Returns a dlopen() handle to the same library that provides the
-// getsectbyname() function. getsectbyname() is always present in libmacho.
-// getsectiondata() and getsegmentdata() are not always present, but when they
-// are, they’re in the same library as getsectbyname(). If the library cannot
-// be found or a handle to it cannot be returned, returns nullptr.
-void* SystemLibMachOHandle() {
-  Dl_info info;
-  if (!dladdr(reinterpret_cast<void*>(getsectbyname), &info)) {
-    return nullptr;
-  }
-  return dlopen(info.dli_fname, RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-}
-
-// Returns a function pointer to a function in libmacho based on a lookup of
-// that function by symbol name. Returns nullptr if libmacho cannot be found or
-// opened, or if the named symbol cannot be found in libmacho.
-void* LookUpSystemLibMachOSymbol(const char* symbol) {
-  static void* dl_handle = SystemLibMachOHandle();
-  if (!dl_handle) {
-    return nullptr;
-  }
-  return dlsym(dl_handle, symbol);
-}
-
-#ifndef __LP64__
-using MachHeader = mach_header;
-#else
-using MachHeader = mach_header_64;
-#endif
-
-using GetSectionDataType =
-    uint8_t*(*)(const MachHeader*, const char*, const char*, unsigned long*);
-using GetSegmentDataType =
-    uint8_t*(*)(const MachHeader*, const char*, unsigned long*);
-
-}  // namespace
-
-extern "C" {
-
-// These implementations look up their functions in libmacho at run time. If the
-// system libmacho provides these functions as it normally does on OS X 10.7 and
-// later, the system’s versions are used directly. Otherwise, the versions in
-// third_party/apple_cctools are used, which are actually just copies of the
-// system’s functions.
-
-uint8_t* getsectiondata(const MachHeader* mhp,
-                        const char* segname,
-                        const char* sectname,
-                        unsigned long* size) {
-  static GetSectionDataType system_getsectiondata =
-      reinterpret_cast<GetSectionDataType>(
-          LookUpSystemLibMachOSymbol("getsectiondata"));
-  if (system_getsectiondata) {
-    return system_getsectiondata(mhp, segname, sectname, size);
-  }
-  return crashpad_getsectiondata(mhp, segname, sectname, size);
-}
-
-uint8_t* getsegmentdata(
-    const MachHeader* mhp, const char* segname, unsigned long* size) {
-  static GetSegmentDataType system_getsegmentdata =
-      reinterpret_cast<GetSegmentDataType>(
-          LookUpSystemLibMachOSymbol("getsegmentdata"));
-  if (system_getsegmentdata) {
-    return system_getsegmentdata(mhp, segname, size);
-  }
-  return crashpad_getsegmentdata(mhp, segname, size);
-}
-
-}  // extern "C"
-
-#endif  // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
diff --git a/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.h b/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.h
deleted file mode 100644
index c9169e16..0000000
--- a/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2014 The Crashpad Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
-#define CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
-
-#include_next <mach-o/getsect.h>
-
-#include <AvailabilityMacros.h>
-
-// This file checks the SDK instead of the deployment target. The SDK is correct
-// because this file is concerned with providing compile-time declarations,
-// which are either present in a specific SDK version or not.
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-#include <mach-o/loader.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Don’t use a type alias to account for the mach_header/mach_header_64
-// difference between the 32-bit and 64-bit versions of getsectiondata() and
-// getsegmentdata(). This file should be faithfully equivalent to the native
-// SDK, and adding type aliases here would pollute the namespace in a way that
-// the native SDK does not.
-
-#if !defined(__LP64__)
-
-uint8_t* getsectiondata(const struct mach_header* mhp,
-                        const char* segname,
-                        const char* sectname,
-                        unsigned long* size);
-
-uint8_t* getsegmentdata(
-    const struct mach_header* mhp, const char* segname, unsigned long* size);
-
-#else
-
-uint8_t* getsectiondata(const struct mach_header_64* mhp,
-                        const char* segname,
-                        const char* sectname,
-                        unsigned long* size);
-
-uint8_t* getsegmentdata(
-    const struct mach_header_64* mhp, const char* segname, unsigned long* size);
-
-#endif
-
-#ifdef __cplusplus
-}  // extern "C"
-#endif
-
-#endif  // MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-
-#endif  // CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
diff --git a/third_party/crashpad/crashpad/handler/BUILD.gn b/third_party/crashpad/crashpad/handler/BUILD.gn
index 496f256..71037bb0 100644
--- a/third_party/crashpad/crashpad/handler/BUILD.gn
+++ b/third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,14 +12,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
 
 static_library("handler") {
   sources = [
     "crash_report_upload_thread.cc",
     "crash_report_upload_thread.h",
-    "handler_main.cc",
-    "handler_main.h",
     "minidump_to_upload_parameters.cc",
     "minidump_to_upload_parameters.h",
     "prune_crash_reports_thread.cc",
@@ -28,7 +26,7 @@
     "user_stream_data_source.h",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/crash_report_exception_handler.cc",
       "mac/crash_report_exception_handler.h",
@@ -39,14 +37,26 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "linux/exception_handler_server.cc",
+      "linux/exception_handler_server.h",
+    ]
+  } else {
+    sources += [
+      "handler_main.cc",
+      "handler_main.h",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "win/crash_report_exception_handler.cc",
       "win/crash_report_exception_handler.h",
     ]
   }
 
-  if (is_fuchsia) {
+  if (crashpad_is_fuchsia) {
     sources += [
       "fuchsia/crash_report_exception_handler.cc",
       "fuchsia/crash_report_exception_handler.h",
@@ -62,12 +72,12 @@
     "../compat",
     "../minidump",
     "../snapshot",
+    "../third_party/mini_chromium:base",
     "../tools:tool_support",
     "../util",
-    "//base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
 }
@@ -79,6 +89,14 @@
     "minidump_to_upload_parameters_test.cc",
   ]
 
+  if (crashpad_is_linux) {
+    sources += [ "linux/exception_handler_server_test.cc" ]
+  }
+
+  if (crashpad_is_win) {
+    sources += [ "crashpad_handler_test.cc" ]
+  }
+
   deps = [
     ":handler",
     "../client",
@@ -86,14 +104,12 @@
     "../snapshot",
     "../snapshot:test_support",
     "../test",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gtest",
   ]
 
-  if (is_win) {
-    sources += [ "crashpad_handler_test.cc" ]
-
+  if (crashpad_is_win) {
     data_deps = [
       ":crashpad_handler_test_extended_handler",
     ]
@@ -107,28 +123,30 @@
 
   deps = [
     ":handler",
+    "../build:default_exe_manifest_win",
     "../compat",
-    "//base",
-    "//build/win:default_exe_manifest",
+    "../third_party/mini_chromium:base",
   ]
 
-  if (is_mac && is_component_build) {
-    ldflags = [
-      # The handler is in
-      # Chromium.app/Contents/Versions/X/Chromium Framework.framework/Versions/A/Helpers/
-      # so set rpath up to the base.
-      "-rpath",
-      "@loader_path/../../../../../../../..",
+  if (crashpad_is_mac && crashpad_is_in_chromium) {
+    if (is_component_build) {
+      ldflags = [
+        # The handler is in
+        # Chromium.app/Contents/Versions/X/Chromium Framework.framework/Versions/A/Helpers/
+        # so set rpath up to the base.
+        "-rpath",
+        "@loader_path/../../../../../../../..",
 
-      # The handler is also in
-      # Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Helpers/
-      # so set the rpath for that too.
-      "-rpath",
-      "@loader_path/../../../../..",
-    ]
+        # The handler is also in
+        # Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Helpers/
+        # so set the rpath for that too.
+        "-rpath",
+        "@loader_path/../../../../..",
+      ]
+    }
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     configs -= [ "//build/config/win:console" ]
     configs += [ "//build/config/win:windowed" ]
   }
@@ -143,15 +161,15 @@
 
   deps = [
     ":handler",
+    "../build:default_exe_manifest_win",
     "../compat",
     "../minidump:test_support",
+    "../third_party/mini_chromium:base",
     "../tools:tool_support",
-    "//base",
-    "//build/win:default_exe_manifest",
   ]
 }
 
-if (is_win) {
+if (crashpad_is_win) {
   executable("crashpad_handler_com") {
     sources = [
       "main.cc",
@@ -164,9 +182,9 @@
 
     deps = [
       ":handler",
+      "../build:default_exe_manifest_win",
       "../compat",
-      "//base",
-      "//build/win:default_exe_manifest",
+      "../third_party/mini_chromium:base",
     ]
   }
 
diff --git a/third_party/crashpad/crashpad/handler/handler.gyp b/third_party/crashpad/crashpad/handler/handler.gyp
index ff455dee..8263dfd 100644
--- a/third_party/crashpad/crashpad/handler/handler.gyp
+++ b/third_party/crashpad/crashpad/handler/handler.gyp
@@ -39,6 +39,8 @@
         'crash_report_upload_thread.h',
         'handler_main.cc',
         'handler_main.h',
+        'linux/exception_handler_server.cc',
+        'linux/exception_handler_server.h',
         'mac/crash_report_exception_handler.cc',
         'mac/crash_report_exception_handler.h',
         'mac/exception_handler_server.cc',
@@ -54,6 +56,20 @@
         'win/crash_report_exception_handler.cc',
         'win/crash_report_exception_handler.h',
       ],
+      'conditions': [
+        ['OS=="linux" or OS=="android"', {
+          'sources!': [
+            'handler_main.cc',
+          ],
+        }],
+      ],
+      'target_conditions': [
+        ['OS=="android"', {
+          'sources/': [
+            ['include', '^linux/'],
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'crashpad_handler',
diff --git a/third_party/crashpad/crashpad/handler/handler_test.gyp b/third_party/crashpad/crashpad/handler/handler_test.gyp
index 4712c05..c047e7c 100644
--- a/third_party/crashpad/crashpad/handler/handler_test.gyp
+++ b/third_party/crashpad/crashpad/handler/handler_test.gyp
@@ -38,6 +38,7 @@
       ],
       'sources': [
         'crashpad_handler_test.cc',
+        'linux/exception_handler_server_test.cc',
         'minidump_to_upload_parameters_test.cc',
       ],
       'conditions': [
@@ -50,6 +51,13 @@
           ],
         }],
       ],
+      'target_conditions': [
+        ['OS=="android"', {
+          'sources/': [
+            ['include', '^linux/'],
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'crashpad_handler_test_extended_handler',
diff --git a/third_party/crashpad/crashpad/handler/linux/exception_handler_server.cc b/third_party/crashpad/crashpad/handler/linux/exception_handler_server.cc
new file mode 100644
index 0000000..3369c4f
--- /dev/null
+++ b/third_party/crashpad/crashpad/handler/linux/exception_handler_server.cc
@@ -0,0 +1,446 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "handler/linux/exception_handler_server.h"
+
+#include <errno.h>
+#include <sys/capability.h>
+#include <sys/epoll.h>
+#include <sys/eventfd.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <utility>
+
+#include "base/logging.h"
+#include "base/posix/eintr_wrapper.h"
+#include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
+#include "util/file/file_io.h"
+#include "util/file/filesystem.h"
+#include "util/misc/as_underlying_type.h"
+
+namespace crashpad {
+
+namespace {
+
+// Log an error for a socket after an EPOLLERR.
+void LogSocketError(int sock) {
+  int err;
+  socklen_t err_len = sizeof(err);
+  if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &err_len) != 0) {
+    PLOG(ERROR) << "getsockopt";
+  } else {
+    errno = err;
+    PLOG(ERROR) << "EPOLLERR";
+  }
+}
+
+enum class PtraceScope {
+  kClassic = 0,
+  kRestricted,
+  kAdminOnly,
+  kNoAttach,
+  kUnknown
+};
+
+PtraceScope GetPtraceScope() {
+  const base::FilePath settings_file("/proc/sys/kernel/yama/ptrace_scope");
+  if (!IsRegularFile(base::FilePath(settings_file))) {
+    return PtraceScope::kClassic;
+  }
+
+  std::string contents;
+  if (!LoggingReadEntireFile(settings_file, &contents)) {
+    return PtraceScope::kUnknown;
+  }
+
+  if (contents.back() != '\n') {
+    LOG(ERROR) << "format error";
+    return PtraceScope::kUnknown;
+  }
+  contents.pop_back();
+
+  int ptrace_scope;
+  if (!base::StringToInt(contents, &ptrace_scope)) {
+    LOG(ERROR) << "format error";
+    return PtraceScope::kUnknown;
+  }
+
+  if (ptrace_scope < static_cast<int>(PtraceScope::kClassic) ||
+      ptrace_scope >= static_cast<int>(PtraceScope::kUnknown)) {
+    LOG(ERROR) << "invalid ptrace scope";
+    return PtraceScope::kUnknown;
+  }
+
+  return static_cast<PtraceScope>(ptrace_scope);
+}
+
+bool HaveCapSysPtrace() {
+  struct __user_cap_header_struct cap_header = {};
+  struct __user_cap_data_struct cap_data = {};
+
+  cap_header.pid = getpid();
+
+  if (capget(&cap_header, &cap_data) != 0) {
+    PLOG(ERROR) << "capget";
+    return false;
+  }
+
+  if (cap_header.version != _LINUX_CAPABILITY_VERSION_3) {
+    LOG(ERROR) << "Unexpected capability version " << std::hex
+               << cap_header.version;
+    return false;
+  }
+
+  return (cap_data.effective & (1 << CAP_SYS_PTRACE)) != 0;
+}
+
+bool SendMessageToClient(int client_sock, ServerToClientMessage::Type type) {
+  ServerToClientMessage message = {};
+  message.type = type;
+  if (type == ServerToClientMessage::kTypeSetPtracer) {
+    message.pid = getpid();
+  }
+  return LoggingWriteFile(client_sock, &message, sizeof(message));
+}
+
+class PtraceStrategyDeciderImpl : public PtraceStrategyDecider {
+ public:
+  PtraceStrategyDeciderImpl() : PtraceStrategyDecider() {}
+  ~PtraceStrategyDeciderImpl() = default;
+
+  Strategy ChooseStrategy(int sock, const ucred& client_credentials) override {
+    switch (GetPtraceScope()) {
+      case PtraceScope::kClassic:
+        return getuid() == client_credentials.uid ? Strategy::kDirectPtrace
+                                                  : Strategy::kForkBroker;
+
+      case PtraceScope::kRestricted:
+        if (!SendMessageToClient(sock,
+                                 ServerToClientMessage::kTypeSetPtracer)) {
+          return Strategy::kError;
+        }
+
+        Errno status;
+        if (!LoggingReadFileExactly(sock, &status, sizeof(status))) {
+          return Strategy::kError;
+        }
+
+        if (status != 0) {
+          errno = status;
+          PLOG(ERROR) << "Handler Client SetPtracer";
+          return Strategy::kForkBroker;
+        }
+        return Strategy::kDirectPtrace;
+
+      case PtraceScope::kAdminOnly:
+        if (HaveCapSysPtrace()) {
+          return Strategy::kDirectPtrace;
+        }
+      // fallthrough
+      case PtraceScope::kNoAttach:
+        LOG(WARNING) << "no ptrace";
+        return Strategy::kNoPtrace;
+
+      case PtraceScope::kUnknown:
+        LOG(WARNING) << "Unknown ptrace scope";
+        return Strategy::kError;
+    }
+
+    DCHECK(false);
+  }
+};
+
+}  // namespace
+
+struct ExceptionHandlerServer::Event {
+  enum class Type { kShutdown, kClientMessage } type;
+
+  ScopedFileHandle fd;
+};
+
+ExceptionHandlerServer::ExceptionHandlerServer()
+    : clients_(),
+      shutdown_event_(),
+      strategy_decider_(new PtraceStrategyDeciderImpl()),
+      delegate_(nullptr),
+      pollfd_(),
+      keep_running_(true) {}
+
+ExceptionHandlerServer::~ExceptionHandlerServer() = default;
+
+void ExceptionHandlerServer::SetPtraceStrategyDecider(
+    std::unique_ptr<PtraceStrategyDecider> decider) {
+  strategy_decider_ = std::move(decider);
+}
+
+bool ExceptionHandlerServer::InitializeWithClient(ScopedFileHandle sock) {
+  INITIALIZATION_STATE_SET_INITIALIZING(initialized_);
+
+  pollfd_.reset(epoll_create1(EPOLL_CLOEXEC));
+  if (!pollfd_.is_valid()) {
+    PLOG(ERROR) << "epoll_create1";
+    return false;
+  }
+
+  shutdown_event_ = std::make_unique<Event>();
+  shutdown_event_->type = Event::Type::kShutdown;
+  shutdown_event_->fd.reset(eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK));
+  if (!shutdown_event_->fd.is_valid()) {
+    PLOG(ERROR) << "eventfd";
+    return false;
+  }
+
+  epoll_event poll_event;
+  poll_event.events = EPOLLIN;
+  poll_event.data.ptr = shutdown_event_.get();
+  if (epoll_ctl(pollfd_.get(),
+                EPOLL_CTL_ADD,
+                shutdown_event_->fd.get(),
+                &poll_event) != 0) {
+    PLOG(ERROR) << "epoll_ctl";
+    return false;
+  }
+
+  if (!InstallClientSocket(std::move(sock))) {
+    return false;
+  }
+
+  INITIALIZATION_STATE_SET_VALID(initialized_);
+  return true;
+}
+
+void ExceptionHandlerServer::Run(Delegate* delegate) {
+  INITIALIZATION_STATE_DCHECK_VALID(initialized_);
+  delegate_ = delegate;
+
+  while (keep_running_ && clients_.size() > 0) {
+    epoll_event poll_event;
+    int res = HANDLE_EINTR(epoll_wait(pollfd_.get(), &poll_event, 1, -1));
+    if (res < 0) {
+      PLOG(ERROR) << "epoll_wait";
+      return;
+    }
+    DCHECK_EQ(res, 1);
+
+    Event* eventp = reinterpret_cast<Event*>(poll_event.data.ptr);
+    if (eventp->type == Event::Type::kShutdown) {
+      if (poll_event.events & EPOLLERR) {
+        LogSocketError(eventp->fd.get());
+      }
+      keep_running_ = false;
+    } else {
+      HandleEvent(eventp, poll_event.events);
+    }
+  }
+}
+
+void ExceptionHandlerServer::Stop() {
+  keep_running_ = false;
+  if (shutdown_event_ && shutdown_event_->fd.is_valid()) {
+    uint64_t value = 1;
+    LoggingWriteFile(shutdown_event_->fd.get(), &value, sizeof(value));
+  }
+}
+
+void ExceptionHandlerServer::HandleEvent(Event* event, uint32_t event_type) {
+  DCHECK_EQ(AsUnderlyingType(event->type),
+            AsUnderlyingType(Event::Type::kClientMessage));
+
+  if (event_type & EPOLLERR) {
+    LogSocketError(event->fd.get());
+    UninstallClientSocket(event);
+    return;
+  }
+
+  if (event_type & EPOLLIN) {
+    if (!ReceiveClientMessage(event)) {
+      UninstallClientSocket(event);
+    }
+    return;
+  }
+
+  if (event_type & EPOLLHUP || event_type & EPOLLRDHUP) {
+    UninstallClientSocket(event);
+    return;
+  }
+
+  LOG(ERROR) << "Unexpected event 0x" << std::hex << event_type;
+  return;
+}
+
+bool ExceptionHandlerServer::InstallClientSocket(ScopedFileHandle socket) {
+  int optval = 1;
+  socklen_t optlen = sizeof(optval);
+  if (setsockopt(socket.get(), SOL_SOCKET, SO_PASSCRED, &optval, optlen) != 0) {
+    PLOG(ERROR) << "setsockopt";
+    return false;
+  }
+
+  auto event = std::make_unique<Event>();
+  event->type = Event::Type::kClientMessage;
+  event->fd.reset(socket.release());
+
+  Event* eventp = event.get();
+
+  if (!clients_.insert(std::make_pair(event->fd.get(), std::move(event)))
+           .second) {
+    LOG(ERROR) << "duplicate descriptor";
+    return false;
+  }
+
+  epoll_event poll_event;
+  poll_event.events = EPOLLIN | EPOLLRDHUP;
+  poll_event.data.ptr = eventp;
+
+  if (epoll_ctl(pollfd_.get(), EPOLL_CTL_ADD, eventp->fd.get(), &poll_event) !=
+      0) {
+    PLOG(ERROR) << "epoll_ctl";
+    clients_.erase(eventp->fd.get());
+    return false;
+  }
+
+  return true;
+}
+
+bool ExceptionHandlerServer::UninstallClientSocket(Event* event) {
+  if (epoll_ctl(pollfd_.get(), EPOLL_CTL_DEL, event->fd.get(), nullptr) != 0) {
+    PLOG(ERROR) << "epoll_ctl";
+    return false;
+  }
+
+  if (clients_.erase(event->fd.get()) != 1) {
+    LOG(ERROR) << "event not found";
+    return false;
+  }
+
+  return true;
+}
+
+bool ExceptionHandlerServer::ReceiveClientMessage(Event* event) {
+  ClientToServerMessage message;
+  iovec iov;
+  iov.iov_base = &message;
+  iov.iov_len = sizeof(message);
+
+  msghdr msg;
+  msg.msg_name = nullptr;
+  msg.msg_namelen = 0;
+  msg.msg_iov = &iov;
+  msg.msg_iovlen = 1;
+
+  char cmsg_buf[CMSG_SPACE(sizeof(ucred))];
+  msg.msg_control = cmsg_buf;
+  msg.msg_controllen = sizeof(cmsg_buf);
+  msg.msg_flags = 0;
+
+  int res = recvmsg(event->fd.get(), &msg, 0);
+  if (res < 0) {
+    PLOG(ERROR) << "recvmsg";
+    return false;
+  }
+  if (res == 0) {
+    // The client had an orderly shutdown.
+    return false;
+  }
+
+  if (msg.msg_name != nullptr || msg.msg_namelen != 0) {
+    LOG(ERROR) << "unexpected msg name";
+    return false;
+  }
+
+  if (msg.msg_iovlen != 1) {
+    LOG(ERROR) << "unexpected iovlen";
+    return false;
+  }
+
+  if (msg.msg_iov[0].iov_len != sizeof(ClientToServerMessage)) {
+    LOG(ERROR) << "unexpected message size " << msg.msg_iov[0].iov_len;
+    return false;
+  }
+  auto client_msg =
+      reinterpret_cast<ClientToServerMessage*>(msg.msg_iov[0].iov_base);
+
+  switch (client_msg->type) {
+    case ClientToServerMessage::kCrashDumpRequest:
+      return HandleCrashDumpRequest(
+          msg, client_msg->client_info, event->fd.get());
+  }
+
+  DCHECK(false);
+  LOG(ERROR) << "Unknown message type";
+  return false;
+}
+
+bool ExceptionHandlerServer::HandleCrashDumpRequest(
+    const msghdr& msg,
+    const ClientInformation& client_info,
+    int client_sock) {
+  cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+  if (cmsg == nullptr) {
+    LOG(ERROR) << "missing credentials";
+    return false;
+  }
+
+  if (cmsg->cmsg_level != SOL_SOCKET) {
+    LOG(ERROR) << "unexpected cmsg_level " << cmsg->cmsg_level;
+    return false;
+  }
+
+  if (cmsg->cmsg_type != SCM_CREDENTIALS) {
+    LOG(ERROR) << "unexpected cmsg_type " << cmsg->cmsg_type;
+    return false;
+  }
+
+  if (cmsg->cmsg_len != CMSG_LEN(sizeof(ucred))) {
+    LOG(ERROR) << "unexpected cmsg_len " << cmsg->cmsg_len;
+    return false;
+  }
+
+  ucred* client_credentials = reinterpret_cast<ucred*>(CMSG_DATA(cmsg));
+  pid_t client_process_id = client_credentials->pid;
+
+  switch (strategy_decider_->ChooseStrategy(client_sock, *client_credentials)) {
+    case PtraceStrategyDecider::Strategy::kError:
+      return false;
+
+    case PtraceStrategyDecider::Strategy::kNoPtrace:
+      return SendMessageToClient(client_sock,
+                                 ServerToClientMessage::kTypeCrashDumpFailed);
+
+    case PtraceStrategyDecider::Strategy::kDirectPtrace:
+      delegate_->HandleException(client_process_id,
+                                 client_info.exception_information_address);
+      break;
+
+    case PtraceStrategyDecider::Strategy::kForkBroker:
+      if (!SendMessageToClient(client_sock,
+                               ServerToClientMessage::kTypeForkBroker)) {
+        return false;
+      }
+
+      delegate_->HandleExceptionWithBroker(
+          client_process_id,
+          client_info.exception_information_address,
+          client_sock);
+      break;
+  }
+
+  return SendMessageToClient(client_sock,
+                             ServerToClientMessage::kTypeCrashDumpComplete);
+}
+
+}  // namespace crashpad
diff --git a/third_party/crashpad/crashpad/handler/linux/exception_handler_server.h b/third_party/crashpad/crashpad/handler/linux/exception_handler_server.h
new file mode 100644
index 0000000..fcafb88
--- /dev/null
+++ b/third_party/crashpad/crashpad/handler/linux/exception_handler_server.h
@@ -0,0 +1,155 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_HANDLER_LINUX_EXCEPTION_HANDLER_SERVER_H_
+#define CRASHPAD_HANDLER_LINUX_EXCEPTION_HANDLER_SERVER_H_
+
+#include <stdint.h>
+#include <sys/socket.h>
+
+#include <memory>
+#include <unordered_map>
+
+#include "base/macros.h"
+#include "util/file/file_io.h"
+#include "util/linux/exception_handler_protocol.h"
+#include "util/misc/address_types.h"
+#include "util/misc/initialization_state_dcheck.h"
+
+namespace crashpad {
+
+//! \brief Abstract base class for deciding how the handler should `ptrace` a
+//!     client.
+class PtraceStrategyDecider {
+ public:
+  virtual ~PtraceStrategyDecider() = default;
+
+  //! \brief The possible return values for ChooseStrategy().
+  enum class Strategy {
+    //! \brief An error occurred,  with a message logged.
+    kError,
+
+    //! \brief Ptrace cannot be used.
+    kNoPtrace,
+
+    //! \brief The handler should `ptrace`-attach the client directly.
+    kDirectPtrace,
+
+    //! \brief The client should `fork` a PtraceBroker for the handler.
+    kForkBroker,
+  };
+
+  //! \brief Chooses an appropriate `ptrace` strategy.
+  //!
+  //! \param[in] sock A socket conncted to a ExceptionHandlerClient.
+  //! \param[in] client_credentials The credentials for the connected client.
+  //! \return the chosen #Strategy.
+  virtual Strategy ChooseStrategy(int sock,
+                                  const ucred& client_credentials) = 0;
+
+ protected:
+  PtraceStrategyDecider() = default;
+};
+
+//! \brief Runs the main exception-handling server in Crashpad’s handler
+//!     process.
+class ExceptionHandlerServer {
+ public:
+  class Delegate {
+   public:
+    //! \brief Called on receipt of a crash dump request from a client.
+    //!
+    //! \param[in] client_process_id The process ID of the crashing client.
+    //! \param[in] exception_information_address The address in the client's
+    //!     address space of an ExceptionInformation struct.
+    //! \return `true` on success. `false` on failure with a message logged.
+    virtual bool HandleException(pid_t client_process_id,
+                                 VMAddress exception_information_address) = 0;
+
+    //! \brief Called on the receipt of a crash dump request from a client for a
+    //!     crash that should be mediated by a PtraceBroker.
+    //!
+    //! \param[in] client_process_id The process ID of the crashing client.
+    //! \param[in] exception_information_address The address in the client's
+    //!     address space of an ExceptionInformation struct.
+    //! \param[in] broker_sock A socket connected to the PtraceBroker.
+    //! \return `true` on success. `false` on failure with a message logged.
+    virtual bool HandleExceptionWithBroker(
+        pid_t client_process_id,
+        VMAddress exception_information_address,
+        int broker_sock) = 0;
+
+   protected:
+    ~Delegate() {}
+  };
+
+  ExceptionHandlerServer();
+  ~ExceptionHandlerServer();
+
+  //! \brief Sets the handler's PtraceStrategyDecider.
+  //!
+  //! If this method is not called, a default PtraceStrategyDecider will be
+  //! used.
+  void SetPtraceStrategyDecider(std::unique_ptr<PtraceStrategyDecider> decider);
+
+  //! \brief Initializes this object.
+  //!
+  //! This method must be successfully called before Run().
+  //!
+  //! \param[in] sock A socket on which to receive client requests.
+  //! \return `true` on success. `false` on failure with a message logged.
+  bool InitializeWithClient(ScopedFileHandle sock);
+
+  //! \brief Runs the exception-handling server.
+  //!
+  //! This method must only be called once on an ExceptionHandlerServer object.
+  //! This method returns when there are no more client connections or Stop()
+  //! has been called.
+  //!
+  //! \param[in] delegate An object to send exceptions to.
+  void Run(Delegate* delegate);
+
+  //! \brief Stops a running exception-handling server.
+  //!
+  //! Stop() may be called at any time, and may be called from a signal handler.
+  //! If Stop() is called before Run() it will cause Run() to return as soon as
+  //! it is called. It is harmless to call Stop() after Run() has already
+  //! returned, or to call Stop() after it has already been called.
+  void Stop();
+
+ private:
+  struct Event;
+
+  void HandleEvent(Event* event, uint32_t event_type);
+  bool InstallClientSocket(ScopedFileHandle socket);
+  bool UninstallClientSocket(Event* event);
+  bool ReceiveClientMessage(Event* event);
+  bool HandleCrashDumpRequest(const msghdr& msg,
+                              const ClientInformation& client_info,
+                              int client_sock);
+
+  std::unordered_map<int, std::unique_ptr<Event>> clients_;
+  std::unique_ptr<Event> shutdown_event_;
+  std::unique_ptr<PtraceStrategyDecider> strategy_decider_;
+  Delegate* delegate_;
+  ScopedFileHandle pollfd_;
+  bool keep_running_;
+  InitializationStateDcheck initialized_;
+
+  DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
+};
+
+}  // namespace crashpad
+
+#endif  // CRASHPAD_HANDLER_LINUX_EXCEPTION_HANDLER_SERVER_H_
diff --git a/third_party/crashpad/crashpad/handler/linux/exception_handler_server_test.cc b/third_party/crashpad/crashpad/handler/linux/exception_handler_server_test.cc
new file mode 100644
index 0000000..fb6c21a9
--- /dev/null
+++ b/third_party/crashpad/crashpad/handler/linux/exception_handler_server_test.cc
@@ -0,0 +1,307 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "handler/linux/exception_handler_server.h"
+
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "base/logging.h"
+#include "gtest/gtest.h"
+#include "test/errors.h"
+#include "test/linux/scoped_pr_set_ptracer.h"
+#include "test/multiprocess.h"
+#include "util/linux/direct_ptrace_connection.h"
+#include "util/linux/exception_handler_client.h"
+#include "util/linux/ptrace_client.h"
+#include "util/synchronization/semaphore.h"
+#include "util/thread/thread.h"
+
+namespace crashpad {
+namespace test {
+namespace {
+
+// Runs the ExceptionHandlerServer on a background thread.
+class RunServerThread : public Thread {
+ public:
+  RunServerThread(ExceptionHandlerServer* server,
+                  ExceptionHandlerServer::Delegate* delegate)
+      : server_(server), delegate_(delegate), join_sem_(0) {}
+
+  ~RunServerThread() override {}
+
+  bool JoinWithTimeout(double timeout) {
+    if (!join_sem_.TimedWait(timeout)) {
+      return false;
+    }
+    Join();
+    return true;
+  }
+
+ private:
+  // Thread:
+  void ThreadMain() override {
+    server_->Run(delegate_);
+    join_sem_.Signal();
+  }
+
+  ExceptionHandlerServer* server_;
+  ExceptionHandlerServer::Delegate* delegate_;
+  Semaphore join_sem_;
+
+  DISALLOW_COPY_AND_ASSIGN(RunServerThread);
+};
+
+class ScopedStopServerAndJoinThread {
+ public:
+  ScopedStopServerAndJoinThread(ExceptionHandlerServer* server,
+                                RunServerThread* thread)
+      : server_(server), thread_(thread) {}
+
+  ~ScopedStopServerAndJoinThread() {
+    server_->Stop();
+    EXPECT_TRUE(thread_->JoinWithTimeout(5.0));
+  }
+
+ private:
+  ExceptionHandlerServer* server_;
+  RunServerThread* thread_;
+
+  DISALLOW_COPY_AND_ASSIGN(ScopedStopServerAndJoinThread);
+};
+
+class TestDelegate : public ExceptionHandlerServer::Delegate {
+ public:
+  TestDelegate()
+      : Delegate(), last_exception_address_(0), last_client_(-1), sem_(0) {}
+
+  ~TestDelegate() {}
+
+  bool WaitForException(double timeout_seconds,
+                        pid_t* last_client,
+                        VMAddress* last_address) {
+    if (sem_.TimedWait(timeout_seconds)) {
+      *last_client = last_client_;
+      *last_address = last_exception_address_;
+      return true;
+    }
+
+    return false;
+  }
+
+  bool HandleException(pid_t client_process_id,
+                       VMAddress exception_information_address) override {
+    DirectPtraceConnection connection;
+    bool connected = connection.Initialize(client_process_id);
+    EXPECT_TRUE(connected);
+
+    last_exception_address_ = exception_information_address;
+    last_client_ = client_process_id;
+    sem_.Signal();
+    return connected;
+  }
+
+  bool HandleExceptionWithBroker(pid_t client_process_id,
+                                 VMAddress exception_information_address,
+                                 int broker_sock) override {
+    PtraceClient client;
+    bool connected = client.Initialize(broker_sock, client_process_id);
+    EXPECT_TRUE(connected);
+
+    last_exception_address_ = exception_information_address,
+    last_client_ = client_process_id;
+    sem_.Signal();
+    return connected;
+  }
+
+ private:
+  VMAddress last_exception_address_;
+  pid_t last_client_;
+  Semaphore sem_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestDelegate);
+};
+
+class MockPtraceStrategyDecider : public PtraceStrategyDecider {
+ public:
+  MockPtraceStrategyDecider(PtraceStrategyDecider::Strategy strategy)
+      : PtraceStrategyDecider(), strategy_(strategy) {}
+
+  ~MockPtraceStrategyDecider() {}
+
+  Strategy ChooseStrategy(int sock, const ucred& client_credentials) override {
+    return strategy_;
+  }
+
+ private:
+  Strategy strategy_;
+
+  DISALLOW_COPY_AND_ASSIGN(MockPtraceStrategyDecider);
+};
+
+class ExceptionHandlerServerTest : public testing::Test {
+ public:
+  ExceptionHandlerServerTest()
+      : server_(),
+        delegate_(),
+        server_thread_(&server_, &delegate_),
+        sock_to_handler_() {}
+
+  ~ExceptionHandlerServerTest() = default;
+
+  int SockToHandler() { return sock_to_handler_.get(); }
+
+  TestDelegate* Delegate() { return &delegate_; }
+
+  void Hangup() { sock_to_handler_.reset(); }
+
+  RunServerThread* ServerThread() { return &server_thread_; }
+
+  ExceptionHandlerServer* Server() { return &server_; }
+
+  class CrashDumpTest : public Multiprocess {
+   public:
+    CrashDumpTest(ExceptionHandlerServerTest* server_test, bool succeeds)
+        : Multiprocess(), server_test_(server_test), succeeds_(succeeds) {}
+
+    ~CrashDumpTest() = default;
+
+    void MultiprocessParent() override {
+      ClientInformation info;
+      ASSERT_TRUE(
+          LoggingReadFileExactly(ReadPipeHandle(), &info, sizeof(info)));
+
+      if (succeeds_) {
+        VMAddress last_address;
+        pid_t last_client;
+        ASSERT_TRUE(server_test_->Delegate()->WaitForException(
+            5.0, &last_client, &last_address));
+        EXPECT_EQ(last_address, info.exception_information_address);
+        EXPECT_EQ(last_client, ChildPID());
+      } else {
+        CheckedReadFileAtEOF(ReadPipeHandle());
+      }
+    }
+
+    void MultiprocessChild() override {
+      ASSERT_EQ(close(server_test_->sock_to_client_), 0);
+
+      ClientInformation info;
+      info.exception_information_address = 42;
+
+      ASSERT_TRUE(LoggingWriteFile(WritePipeHandle(), &info, sizeof(info)));
+
+      // If the current ptrace_scope is restricted, the broker needs to be set
+      // as the ptracer for this process. Setting this process as its own
+      // ptracer allows the broker to inherit this condition.
+      ScopedPrSetPtracer set_ptracer(getpid());
+
+      ExceptionHandlerClient client(server_test_->SockToHandler());
+      ASSERT_EQ(client.RequestCrashDump(info), 0);
+    }
+
+   private:
+    ExceptionHandlerServerTest* server_test_;
+    bool succeeds_;
+
+    DISALLOW_COPY_AND_ASSIGN(CrashDumpTest);
+  };
+
+  void ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy strategy,
+                                    bool succeeds) {
+    ScopedStopServerAndJoinThread stop_server(Server(), ServerThread());
+    ServerThread()->Start();
+
+    Server()->SetPtraceStrategyDecider(
+        std::make_unique<MockPtraceStrategyDecider>(strategy));
+
+    CrashDumpTest test(this, succeeds);
+    test.Run();
+  }
+
+ protected:
+  void SetUp() override {
+    int socks[2];
+    ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, socks), 0);
+    sock_to_handler_.reset(socks[0]);
+    sock_to_client_ = socks[1];
+
+    ASSERT_TRUE(server_.InitializeWithClient(ScopedFileHandle(socks[1])));
+  }
+
+ private:
+  ExceptionHandlerServer server_;
+  TestDelegate delegate_;
+  RunServerThread server_thread_;
+  ScopedFileHandle sock_to_handler_;
+  int sock_to_client_;
+
+  DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServerTest);
+};
+
+TEST_F(ExceptionHandlerServerTest, ShutdownWithNoClients) {
+  ServerThread()->Start();
+  Hangup();
+  ASSERT_TRUE(ServerThread()->JoinWithTimeout(5.0));
+}
+
+TEST_F(ExceptionHandlerServerTest, StopWithClients) {
+  ServerThread()->Start();
+  Server()->Stop();
+  ASSERT_TRUE(ServerThread()->JoinWithTimeout(5.0));
+}
+
+TEST_F(ExceptionHandlerServerTest, StopBeforeRun) {
+  Server()->Stop();
+  ServerThread()->Start();
+  ASSERT_TRUE(ServerThread()->JoinWithTimeout(5.0));
+}
+
+TEST_F(ExceptionHandlerServerTest, MultipleStops) {
+  ServerThread()->Start();
+  Server()->Stop();
+  Server()->Stop();
+  ASSERT_TRUE(ServerThread()->JoinWithTimeout(5.0));
+}
+
+TEST_F(ExceptionHandlerServerTest, RequestCrashDumpDefault) {
+  ScopedStopServerAndJoinThread stop_server(Server(), ServerThread());
+  ServerThread()->Start();
+
+  CrashDumpTest test(this, true);
+  test.Run();
+}
+
+TEST_F(ExceptionHandlerServerTest, RequestCrashDumpNoPtrace) {
+  ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy::kNoPtrace,
+                               false);
+}
+
+TEST_F(ExceptionHandlerServerTest, RequestCrashDumpForkBroker) {
+  ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy::kForkBroker,
+                               true);
+}
+
+TEST_F(ExceptionHandlerServerTest, RequestCrashDumpDirectPtrace) {
+  ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy::kDirectPtrace,
+                               true);
+}
+
+TEST_F(ExceptionHandlerServerTest, RequestCrashDumpError) {
+  ExpectCrashDumpUsingStrategy(PtraceStrategyDecider::Strategy::kError, false);
+}
+
+}  // namespace
+}  // namespace test
+}  // namespace crashpad
diff --git a/third_party/crashpad/crashpad/handler/mac/exception_handler_server.h b/third_party/crashpad/crashpad/handler/mac/exception_handler_server.h
index 7d893002..272cf7624 100644
--- a/third_party/crashpad/crashpad/handler/mac/exception_handler_server.h
+++ b/third_party/crashpad/crashpad/handler/mac/exception_handler_server.h
@@ -63,9 +63,7 @@
 
   //! \brief Stops a running exception-handling server.
   //!
-  //! The normal mode of operation is to call Stop() while Run() is running. It
-  //! is expected that Stop() would be called from a signal handler.
-  //!
+  //! Stop() may be called at any time, and may be called from a signal handler.
   //! If Stop() is called before Run() it will cause Run() to return as soon as
   //! it is called. It is harmless to call Stop() after Run() has already
   //! returned, or to call Stop() after it has already been called.
diff --git a/third_party/crashpad/crashpad/handler/win/crash_report_exception_handler.h b/third_party/crashpad/crashpad/handler/win/crash_report_exception_handler.h
index 54dfa9719..e1fb725d 100644
--- a/third_party/crashpad/crashpad/handler/win/crash_report_exception_handler.h
+++ b/third_party/crashpad/crashpad/handler/win/crash_report_exception_handler.h
@@ -58,7 +58,7 @@
       const std::map<std::string, std::string>* process_annotations,
       const UserStreamDataSources* user_stream_data_sources);
 
-  ~CrashReportExceptionHandler() override;
+  ~CrashReportExceptionHandler();
 
   // ExceptionHandlerServer::Delegate:
 
diff --git a/third_party/crashpad/crashpad/minidump/BUILD.gn b/third_party/crashpad/crashpad/minidump/BUILD.gn
index a3c6a2c9..88a1081 100644
--- a/third_party/crashpad/crashpad/minidump/BUILD.gn
+++ b/third_party/crashpad/crashpad/minidump/BUILD.gn
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
 
 static_library("minidump") {
   sources = [
@@ -77,11 +77,11 @@
 
   deps = [
     "../snapshot",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [
       "/wd4201",  # nonstandard extension used : nameless struct/union
       "/wd4324",  # 'struct' : structure was padded due to __declspec(align())
@@ -118,11 +118,11 @@
   ]
 
   deps = [
-    "//base",
-    "//testing/gtest",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
 }
@@ -158,12 +158,12 @@
     ":test_support",
     "../snapshot:test_support",
     "../test",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gtest",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
 }
diff --git a/third_party/crashpad/crashpad/snapshot/BUILD.gn b/third_party/crashpad/crashpad/snapshot/BUILD.gn
index c5d38f1..665620fd 100644
--- a/third_party/crashpad/crashpad/snapshot/BUILD.gn
+++ b/third_party/crashpad/crashpad/snapshot/BUILD.gn
@@ -12,8 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//build/config/compiler/compiler.gni")
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
+
+if (crashpad_is_in_chromium) {
+  import("//build/config/compiler/compiler.gni")
+}
 
 static_library("snapshot") {
   sources = [
@@ -53,7 +56,7 @@
     "unloaded_module_snapshot.h",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/cpu_context_mac.cc",
       "mac/cpu_context_mac.h",
@@ -95,7 +98,35 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "elf/elf_dynamic_array_reader.cc",
+      "elf/elf_dynamic_array_reader.h",
+      "elf/elf_image_reader.cc",
+      "elf/elf_image_reader.h",
+      "elf/elf_symbol_table_reader.cc",
+      "elf/elf_symbol_table_reader.h",
+      "linux/cpu_context_linux.cc",
+      "linux/cpu_context_linux.h",
+      "linux/debug_rendezvous.cc",
+      "linux/debug_rendezvous.h",
+      "linux/exception_snapshot_linux.cc",
+      "linux/exception_snapshot_linux.h",
+      "linux/memory_snapshot_linux.cc",
+      "linux/memory_snapshot_linux.h",
+      "linux/process_reader.cc",
+      "linux/process_reader.h",
+      "linux/process_snapshot_linux.cc",
+      "linux/process_snapshot_linux.h",
+      "linux/signal_context.h",
+      "linux/system_snapshot_linux.cc",
+      "linux/system_snapshot_linux.h",
+      "linux/thread_snapshot_linux.cc",
+      "linux/thread_snapshot_linux.h",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "win/capture_memory_delegate_win.cc",
       "win/capture_memory_delegate_win.h",
@@ -128,7 +159,7 @@
     ]
   }
 
-  if (is_fuchsia) {
+  if (crashpad_is_fuchsia) {
     sources += [
       "fuchsia/process_snapshot_fuchsia.cc",
       "fuchsia/process_snapshot_fuchsia.h",
@@ -147,17 +178,17 @@
   deps = [
     "../client",
     "../compat",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
     libs = [ "powrprof.lib" ]
   }
 }
 
-if (is_win) {
+if (crashpad_is_win) {
   static_library("snapshot_api") {
     sources = [
       "api/module_annotations_win.cc",
@@ -171,8 +202,8 @@
     deps = [
       ":snapshot",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 } else {
@@ -210,25 +241,37 @@
 
   deps = [
     "../compat",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
   ]
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
 }
 
+config("snapshot_test_link") {
+  visibility = [ ":*" ]
+  if (crashpad_is_linux) {
+    # There’s no way to make the link depend on this file. “inputs” doesn’t have
+    # the intended effect in a config. https://crbug.com/781858,
+    # https://crbug.com/796187.
+    inputs = [
+      "elf/test_exported_symbols.sym",
+    ]
+    ldflags = [ "-Wl,--dynamic-list," + rebase_path(inputs[0], root_build_dir) ]
+  }
+}
+
 source_set("snapshot_test") {
   testonly = true
 
   sources = [
     "cpu_context_test.cc",
-    "crashpad_info_client_options_test.cc",
     "minidump/process_snapshot_minidump_test.cc",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/cpu_context_mac_test.cc",
       "mac/mach_o_image_annotations_reader_test.cc",
@@ -240,7 +283,21 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "elf/elf_image_reader_test.cc",
+      "elf/elf_image_reader_test_note.S",
+      "elf/test_exported_symbols.sym",
+      "linux/debug_rendezvous_test.cc",
+      "linux/exception_snapshot_linux_test.cc",
+      "linux/process_reader_test.cc",
+      "linux/system_snapshot_linux_test.cc",
+    ]
+  } else {
+    sources += [ "crashpad_info_client_options_test.cc" ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "api/module_annotations_win_test.cc",
       "win/cpu_context_win_test.cc",
@@ -256,15 +313,21 @@
     sources += [ "posix/timezone_test.cc" ]
   }
 
+  # public_configs isn’t quite right. snapshot_test_link sets ldflags, and
+  # what’s really needed is a way to push ldflags to dependent targets that
+  # produce linker output. Luckily in this case, all dependents do produce
+  # linker output. https://crbug.com/796183.
+  public_configs = [ ":snapshot_test_link" ]
+
   deps = [
     ":snapshot_api",
     ":test_support",
     "../client",
     "../compat",
     "../test",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gtest",
   ]
 
   data_deps = [
@@ -273,7 +336,7 @@
     ":crashpad_snapshot_test_module_small",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     libs = [ "OpenCL.framework" ]
 
     data_deps += [
@@ -282,7 +345,11 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    libs = [ "dl" ]
+  }
+
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
 
     data_deps += [
@@ -303,7 +370,7 @@
   ]
   deps = [
     "../client",
-    "//base",
+    "../third_party/mini_chromium:base",
   ]
 }
 
@@ -314,7 +381,7 @@
   ]
   defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
   deps = [
-    "//base",
+    "../third_party/mini_chromium:base",
   ]
 }
 
@@ -325,11 +392,11 @@
   ]
   defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
   deps = [
-    "//base",
+    "../third_party/mini_chromium:base",
   ]
 }
 
-if (is_mac) {
+if (crashpad_is_mac) {
   loadable_module("crashpad_snapshot_test_module_crashy_initializer") {
     testonly = true
     sources = [
@@ -345,7 +412,7 @@
   }
 }
 
-if (is_win) {
+if (crashpad_is_win) {
   executable("crashpad_snapshot_test_annotations") {
     testonly = true
     sources = [
@@ -354,7 +421,7 @@
     deps = [
       "../client",
       "../compat",
-      "//base",
+      "../third_party/mini_chromium:base",
     ]
   }
 
@@ -366,8 +433,8 @@
     deps = [
       "../client",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 
@@ -379,8 +446,8 @@
     deps = [
       "../client",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 
@@ -392,7 +459,7 @@
     deps = [
       "../client",
       "../compat",
-      "//base",
+      "../third_party/mini_chromium:base",
     ]
   }
 
@@ -404,13 +471,16 @@
     deps = [
       "../client",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
-    if (symbol_level == 0) {
-      # The tests that use this executable rely on at least minimal debug info.
-      configs -= [ "//build/config/compiler:default_symbols" ]
-      configs += [ "//build/config/compiler:minimal_symbols" ]
+    if (crashpad_is_in_chromium) {
+      if (symbol_level == 0) {
+        # The tests that use this executable rely on at least minimal debug
+        # info.
+        configs -= [ "//build/config/compiler:default_symbols" ]
+        configs += [ "//build/config/compiler:minimal_symbols" ]
+      }
     }
   }
 
@@ -421,12 +491,14 @@
     ]
     deps = [
       "../client",
-      "//base",
+      "../third_party/mini_chromium:base",
     ]
-    if (symbol_level == 0) {
-      # The tests that use this module rely on at least minimal debug info.
-      configs -= [ "//build/config/compiler:default_symbols" ]
-      configs += [ "//build/config/compiler:minimal_symbols" ]
+    if (crashpad_is_in_chromium) {
+      if (symbol_level == 0) {
+        # The tests that use this module rely on at least minimal debug info.
+        configs -= [ "//build/config/compiler:default_symbols" ]
+        configs += [ "//build/config/compiler:minimal_symbols" ]
+      }
     }
   }
 }
diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
index 8a2e812..092762c 100644
--- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -53,7 +53,7 @@
     const SignalThreadContext32& thread_context,
     CPUContextX86* context);
 
-// \{
+//! \{
 //! \brief Initializes a CPUContextX86_64 structure from native context
 //!     structures on Linux.
 //!
diff --git a/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win_test.cc b/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win_test.cc
index 843ad263..a1ab8c6 100644
--- a/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win_test.cc
+++ b/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win_test.cc
@@ -79,7 +79,7 @@
       : server_ready_(server_ready),
         completed_test_event_(completed_test_event),
         break_near_(0) {}
-  ~CrashingDelegate() override {}
+  ~CrashingDelegate() {}
 
   void set_break_near(WinVMAddress break_near) { break_near_ = break_near; }
 
@@ -183,7 +183,7 @@
       : server_ready_(server_ready),
         completed_test_event_(completed_test_event),
         dump_near_(0) {}
-  ~SimulateDelegate() override {}
+  ~SimulateDelegate() {}
 
   void set_dump_near(WinVMAddress dump_near) { dump_near_ = dump_near; }
 
diff --git a/third_party/crashpad/crashpad/test/BUILD.gn b/third_party/crashpad/crashpad/test/BUILD.gn
index ae44fc5..b8e11d0 100644
--- a/third_party/crashpad/crashpad/test/BUILD.gn
+++ b/third_party/crashpad/crashpad/test/BUILD.gn
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
 
 static_library("test") {
   testonly = true
@@ -41,18 +41,18 @@
     "test_paths.h",
   ]
 
-  if (is_posix) {
+  if (crashpad_is_posix) {
     sources += [
       "multiprocess_posix.cc",
       "scoped_temp_dir_posix.cc",
     ]
 
-    if (!is_fuchsia) {
+    if (!crashpad_is_fuchsia) {
       sources += [ "multiprocess_exec_posix.cc" ]
     }
   }
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/dyld.cc",
       "mac/dyld.h",
@@ -65,7 +65,18 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "linux/fake_ptrace_connection.cc",
+      "linux/fake_ptrace_connection.h",
+      "linux/get_tls.cc",
+      "linux/get_tls.h",
+      "linux/scoped_pr_set_ptracer.cc",
+      "linux/scoped_pr_set_ptracer.h",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "multiprocess_exec_win.cc",
       "scoped_temp_dir_win.cc",
@@ -82,7 +93,7 @@
 
   public_configs = [ "..:crashpad_config" ]
 
-  configs += [ "../build:crashpad_in_chromium" ]
+  configs += [ "../build:crashpad_is_in_chromium" ]
 
   data = [
     "test_paths_test_data_root.txt",
@@ -90,12 +101,12 @@
 
   deps = [
     "../compat",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gtest",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     libs = [ "bsm" ]
     deps += [
       "../handler",
@@ -114,22 +125,22 @@
     "test_paths_test.cc",
   ]
 
-  if (is_posix && !is_fuchsia) {
+  if (crashpad_is_posix && !crashpad_is_fuchsia) {
     sources += [ "multiprocess_posix_test.cc" ]
   }
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [ "mac/mach_multiprocess_test.cc" ]
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     sources += [
       "win/win_child_process_test.cc",
       "win/win_multiprocess_test.cc",
     ]
   }
 
-  if (!is_fuchsia) {
+  if (!crashpad_is_fuchsia) {
     sources += [
       # TODO(scottmg): A MultiprocessExecFuchsia is probably desirable, but
       # hasn't been implemented yet.
@@ -140,10 +151,10 @@
   deps = [
     ":test",
     "../compat",
+    "../third_party/gtest:gmock",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//testing/gmock",
-    "//testing/gtest",
   ]
 
   data_deps = [
@@ -162,14 +173,14 @@
   sources = [
     "gtest_main.cc",
   ]
-  configs += [ "../build:crashpad_in_chromium" ]
+  configs += [ "../build:crashpad_is_in_chromium" ]
   defines = [ "CRASHPAD_TEST_LAUNCHER_GMOCK" ]
   deps = [
     ":test",
-    "//base",
-    "//base/test:test_support",
-    "//testing/gmock",
-    "//testing/gtest",
+    "../third_party/gtest:gmock",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
+    "../third_party/mini_chromium:base_test_support",
   ]
 }
 
@@ -178,12 +189,12 @@
   sources = [
     "gtest_main.cc",
   ]
-  configs += [ "../build:crashpad_in_chromium" ]
+  configs += [ "../build:crashpad_is_in_chromium" ]
   defines = [ "CRASHPAD_TEST_LAUNCHER_GTEST" ]
   deps = [
     ":test",
-    "//base",
-    "//base/test:test_support",
-    "//testing/gtest",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
+    "../third_party/mini_chromium:base_test_support",
   ]
 }
diff --git a/third_party/crashpad/crashpad/test/gtest_main.cc b/third_party/crashpad/crashpad/test/gtest_main.cc
index d8c2a904..5a3d7996 100644
--- a/third_party/crashpad/crashpad/test/gtest_main.cc
+++ b/third_party/crashpad/crashpad/test/gtest_main.cc
@@ -25,18 +25,18 @@
 #include "test/win/win_child_process.h"
 #endif  // OS_WIN
 
-#if defined(CRASHPAD_IN_CHROMIUM)
+#if defined(CRASHPAD_IS_IN_CHROMIUM)
 #include "base/bind.h"
 #include "base/test/launcher/unit_test_launcher.h"
 #include "base/test/test_suite.h"
-#endif  // CRASHPAD_IN_CHROMIUM
+#endif  // CRASHPAD_IS_IN_CHROMIUM
 
 int main(int argc, char* argv[]) {
   crashpad::test::InitializeMainArguments(argc, argv);
   testing::AddGlobalTestEnvironment(
       crashpad::test::DisabledTestGtestEnvironment::Get());
 
-#if defined(CRASHPAD_IN_CHROMIUM)
+#if defined(CRASHPAD_IS_IN_CHROMIUM)
 
 #if defined(OS_WIN)
   // Chromium’s test launcher interferes with WinMultiprocess-based tests. Allow
@@ -58,7 +58,7 @@
         base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
   }
 
-#endif  // CRASHPAD_IN_CHROMIUM
+#endif  // CRASHPAD_IS_IN_CHROMIUM
 
 #if defined(CRASHPAD_TEST_LAUNCHER_GMOCK)
   testing::InitGoogleMock(&argc, argv);
diff --git a/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.cc b/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.cc
new file mode 100644
index 0000000..bc9695ae
--- /dev/null
+++ b/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.cc
@@ -0,0 +1,40 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "test/linux/scoped_pr_set_ptracer.h"
+
+#include <errno.h>
+#include <sys/prctl.h>
+
+#include "gtest/gtest.h"
+#include "test/errors.h"
+
+namespace crashpad {
+namespace test {
+
+ScopedPrSetPtracer::ScopedPrSetPtracer(pid_t pid) {
+  success_ = prctl(PR_SET_PTRACER, pid, 0, 0, 0) == 0;
+  if (!success_) {
+    EXPECT_EQ(errno, EINVAL) << ErrnoMessage("prctl");
+  }
+}
+
+ScopedPrSetPtracer::~ScopedPrSetPtracer() {
+  if (success_) {
+    EXPECT_EQ(prctl(PR_SET_PTRACER, 0, 0, 0, 0), 0) << ErrnoMessage("prctl");
+  }
+}
+
+}  // namespace test
+}  // namespace crashpad
diff --git a/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.h b/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.h
new file mode 100644
index 0000000..df9cff7
--- /dev/null
+++ b/third_party/crashpad/crashpad/test/linux/scoped_pr_set_ptracer.h
@@ -0,0 +1,47 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_TEST_LINUX_SCOPED_PR_SET_PTRACER_H_
+#define CRASHPAD_TEST_LINUX_SCOPED_PR_SET_PTRACER_H_
+
+#include <sys/types.h>
+
+#include "base/macros.h"
+
+namespace crashpad {
+namespace test {
+
+class ScopedPrSetPtracer {
+ public:
+  //! \brief Uses `PR_SET_PTRACER` to set \a pid as the caller's ptracer or
+  //!     expects `EINVAL`.
+  //!
+  //! `PR_SET_PTRACER` is only supported if the Yama Linux security module (LSM)
+  //! is enabled. Otherwise, `prctl(PR_SET_PTRACER, ...)` fails with `EINVAL`.
+  //! See linux-4.9.20/security/yama/yama_lsm.c yama_task_prctl() and
+  //! linux-4.9.20/kernel/sys.c [sys_]prctl().
+  explicit ScopedPrSetPtracer(pid_t pid);
+
+  ~ScopedPrSetPtracer();
+
+ private:
+  bool success_;
+
+  DISALLOW_COPY_AND_ASSIGN(ScopedPrSetPtracer);
+};
+
+}  // namespace test
+}  // namespace crashpad
+
+#endif  // CRASHPAD_TEST_LINUX_SCOPED_PR_SET_PTRACER_H_
diff --git a/third_party/crashpad/crashpad/test/test.gyp b/third_party/crashpad/crashpad/test/test.gyp
index ce2ba7d..ad88e03 100644
--- a/third_party/crashpad/crashpad/test/test.gyp
+++ b/third_party/crashpad/crashpad/test/test.gyp
@@ -45,6 +45,8 @@
         'linux/fake_ptrace_connection.h',
         'linux/get_tls.cc',
         'linux/get_tls.h',
+        'linux/scoped_pr_set_ptracer.cc',
+        'linux/scoped_pr_set_ptracer.h',
         'mac/dyld.cc',
         'mac/dyld.h',
         'mac/exception_swallower.cc',
diff --git a/third_party/crashpad/crashpad/test/test_paths.cc b/third_party/crashpad/crashpad/test/test_paths.cc
index 923d22f..b3eee3c 100644
--- a/third_party/crashpad/crashpad/test/test_paths.cc
+++ b/third_party/crashpad/crashpad/test/test_paths.cc
@@ -127,12 +127,12 @@
 // static
 base::FilePath TestPaths::ExpectedExecutableBasename(
     const base::FilePath::StringType& name) {
-#if defined(CRASHPAD_IN_CHROMIUM)
+#if defined(CRASHPAD_IS_IN_CHROMIUM)
   base::FilePath::StringType executable_name(
       FILE_PATH_LITERAL("crashpad_tests"));
-#else  // CRASHPAD_IN_CHROMIUM
+#else  // CRASHPAD_IS_IN_CHROMIUM
   base::FilePath::StringType executable_name(name);
-#endif  // CRASHPAD_IN_CHROMIUM
+#endif  // CRASHPAD_IS_IN_CHROMIUM
 
 #if defined(OS_WIN)
   executable_name += FILE_PATH_LITERAL(".exe");
@@ -170,9 +170,9 @@
 
   base::FilePath::StringType test_name =
       FILE_PATH_LITERAL("crashpad_") + module + FILE_PATH_LITERAL("_test");
-#if !defined(CRASHPAD_IN_CHROMIUM)
+#if !defined(CRASHPAD_IS_IN_CHROMIUM)
   CHECK(Executable().BaseName().RemoveFinalExtension().value() == test_name);
-#endif  // !CRASHPAD_IN_CHROMIUM
+#endif  // !CRASHPAD_IS_IN_CHROMIUM
 
   base::FilePath::StringType extension;
   switch (file_type) {
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/BUILD.gn b/third_party/crashpad/crashpad/third_party/apple_cctools/BUILD.gn
deleted file mode 100644
index c627728..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/BUILD.gn
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2015 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-config("apple_cctools_config") {
-  include_dirs = [ "../.." ]
-}
-
-source_set("apple_cctools") {
-  sources = [
-    "cctools/include/mach-o/getsect.h",
-    "cctools/libmacho/getsecbyname.c",
-  ]
-  public_configs = [ ":apple_cctools_config" ]
-}
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/README.crashpad b/third_party/crashpad/crashpad/third_party/apple_cctools/README.crashpad
deleted file mode 100644
index 43b08618..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/README.crashpad
+++ /dev/null
@@ -1,44 +0,0 @@
-Name: Apple cctools
-Short Name: cctools
-URL: https://opensource.apple.com/source/cctools/
-URL: https://opensource.apple.com/tarballs/cctools/
-Version: 855 (from Xcode 5.1)
-License: APSL 2.0
-License File: cctools/APPLE_LICENSE
-Security Critical: no
-
-Description:
-cctools contains portions of Apple’s compiler toolchain, including common tools
-like ar, as, nm, strings, and strip, and platform-specific tools like lipo and
-otool. It also contains support libraries such as libmacho, which contains
-interfaces for dealing with Mach-O images.
-
-libmacho is available on macOS as a runtime library that is part of libSystem,
-but versions of libmacho included in operating system versions prior to Mac OS X
-10.7 did not include the getsectiondata() and getsegmentdata() functions. This
-library is present here to provide implementations of these functions for
-systems that do not have them.
-
-Crashpad code is not expected to use this library directly. It should use the
-getsectiondata() and getsegmentdata() wrappers in compat, which will use
-system-provided implementations if present at runtime, and will otherwise fall
-back to the implementations in this library.
-
-Local Modifications:
- - Only cctools/APPLE_LICENSE, cctools/libmacho/getsecbyname.c, and
-   cctools/include/mach-o/getsect.h are included.
- - getsecbyname.c and getsect.h have been trimmed to remove everything other
-   than the getsectiondata() and getsegmentdata() functions. The #include guards
-   in getsect.h have been made unique.
- - getsectiondata() is renamed to crashpad_getsectiondata(), and
-   getsegmentdata() is renamed to crashpad_getsegmentdata().
- - These functions are only declared and defined if the deployment target is
-   older than 10.7. This library is not needed otherwise, because in that case,
-   the system always provides implementations in runtime libraries.
- - Originally, each of these two functions were implemented twice: once for
-   32-bit code and once for 64-bit code. Aside from the types and constants
-   used, the two implementations were completely identical. This has been
-   simplified to have a shared implementation that relies on local typedefs and
-   constants being defined properly. This change was only made in
-   getsecbyname.c. getsect.h was not changed to avoid leaking new definitions
-   beyond this header.
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/apple_cctools.gyp b/third_party/crashpad/crashpad/third_party/apple_cctools/apple_cctools.gyp
deleted file mode 100644
index 7e0dfd4..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/apple_cctools.gyp
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2014 The Crashpad Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{
-  'targets': [
-    {
-      'target_name': 'apple_cctools',
-      'type': 'static_library',
-      'include_dirs': [
-        '../..',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '../..',
-        ],
-      },
-      'sources': [
-        'cctools/include/mach-o/getsect.h',
-        'cctools/libmacho/getsecbyname.c',
-      ],
-    },
-  ],
-}
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/APPLE_LICENSE b/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/APPLE_LICENSE
deleted file mode 100644
index fe81a60..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/APPLE_LICENSE
+++ /dev/null
@@ -1,367 +0,0 @@
-APPLE PUBLIC SOURCE LICENSE
-Version 2.0 - August 6, 2003
-
-Please read this License carefully before downloading this software.
-By downloading or using this software, you are agreeing to be bound by
-the terms of this License. If you do not or cannot agree to the terms
-of this License, please do not download or use the software.
-
-1. General; Definitions. This License applies to any program or other
-work which Apple Computer, Inc. ("Apple") makes publicly available and
-which contains a notice placed by Apple identifying such program or
-work as "Original Code" and stating that it is subject to the terms of
-this Apple Public Source License version 2.0 ("License"). As used in
-this License:
-
-1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
-the grantor of rights, (i) claims of patents that are now or hereafter
-acquired, owned by or assigned to Apple and (ii) that cover subject
-matter contained in the Original Code, but only to the extent
-necessary to use, reproduce and/or distribute the Original Code
-without infringement; and (b) in the case where You are the grantor of
-rights, (i) claims of patents that are now or hereafter acquired,
-owned by or assigned to You and (ii) that cover subject matter in Your
-Modifications, taken alone or in combination with Original Code.
-
-1.2 "Contributor" means any person or entity that creates or
-contributes to the creation of Modifications.
-
-1.3 "Covered Code" means the Original Code, Modifications, the
-combination of Original Code and any Modifications, and/or any
-respective portions thereof.
-
-1.4 "Externally Deploy" means: (a) to sublicense, distribute or
-otherwise make Covered Code available, directly or indirectly, to
-anyone other than You; and/or (b) to use Covered Code, alone or as
-part of a Larger Work, in any way to provide a service, including but
-not limited to delivery of content, through electronic communication
-with a client other than You.
-
-1.5 "Larger Work" means a work which combines Covered Code or portions
-thereof with code not governed by the terms of this License.
-
-1.6 "Modifications" mean any addition to, deletion from, and/or change
-to, the substance and/or structure of the Original Code, any previous
-Modifications, the combination of Original Code and any previous
-Modifications, and/or any respective portions thereof. When code is
-released as a series of files, a Modification is: (a) any addition to
-or deletion from the contents of a file containing Covered Code;
-and/or (b) any new file or other representation of computer program
-statements that contains any part of Covered Code.
-
-1.7 "Original Code" means (a) the Source Code of a program or other
-work as originally made available by Apple under this License,
-including the Source Code of any updates or upgrades to such programs
-or works made available by Apple under this License, and that has been
-expressly identified by Apple as such in the header file(s) of such
-work; and (b) the object code compiled from such Source Code and
-originally made available by Apple under this License.
-
-1.8 "Source Code" means the human readable form of a program or other
-work that is suitable for making modifications to it, including all
-modules it contains, plus any associated interface definition files,
-scripts used to control compilation and installation of an executable
-(object code).
-
-1.9 "You" or "Your" means an individual or a legal entity exercising
-rights under this License. For legal entities, "You" or "Your"
-includes any entity which controls, is controlled by, or is under
-common control with, You, where "control" means (a) the power, direct
-or indirect, to cause the direction or management of such entity,
-whether by contract or otherwise, or (b) ownership of fifty percent
-(50%) or more of the outstanding shares or beneficial ownership of
-such entity.
-
-2. Permitted Uses; Conditions & Restrictions. Subject to the terms
-and conditions of this License, Apple hereby grants You, effective on
-the date You accept this License and download the Original Code, a
-world-wide, royalty-free, non-exclusive license, to the extent of
-Apple's Applicable Patent Rights and copyrights covering the Original
-Code, to do the following:
-
-2.1 Unmodified Code. You may use, reproduce, display, perform,
-internally distribute within Your organization, and Externally Deploy
-verbatim, unmodified copies of the Original Code, for commercial or
-non-commercial purposes, provided that in each instance:
-
-(a) You must retain and reproduce in all copies of Original Code the
-copyright and other proprietary notices and disclaimers of Apple as
-they appear in the Original Code, and keep intact all notices in the
-Original Code that refer to this License; and
-
-(b) You must include a copy of this License with every copy of Source
-Code of Covered Code and documentation You distribute or Externally
-Deploy, and You may not offer or impose any terms on such Source Code
-that alter or restrict this License or the recipients' rights
-hereunder, except as permitted under Section 6.
-
-2.2 Modified Code. You may modify Covered Code and use, reproduce,
-display, perform, internally distribute within Your organization, and
-Externally Deploy Your Modifications and Covered Code, for commercial
-or non-commercial purposes, provided that in each instance You also
-meet all of these conditions:
-
-(a) You must satisfy all the conditions of Section 2.1 with respect to
-the Source Code of the Covered Code;
-
-(b) You must duplicate, to the extent it does not already exist, the
-notice in Exhibit A in each file of the Source Code of all Your
-Modifications, and cause the modified files to carry prominent notices
-stating that You changed the files and the date of any change; and
-
-(c) If You Externally Deploy Your Modifications, You must make
-Source Code of all Your Externally Deployed Modifications either
-available to those to whom You have Externally Deployed Your
-Modifications, or publicly available. Source Code of Your Externally
-Deployed Modifications must be released under the terms set forth in
-this License, including the license grants set forth in Section 3
-below, for as long as you Externally Deploy the Covered Code or twelve
-(12) months from the date of initial External Deployment, whichever is
-longer. You should preferably distribute the Source Code of Your
-Externally Deployed Modifications electronically (e.g. download from a
-web site).
-
-2.3 Distribution of Executable Versions. In addition, if You
-Externally Deploy Covered Code (Original Code and/or Modifications) in
-object code, executable form only, You must include a prominent
-notice, in the code itself as well as in related documentation,
-stating that Source Code of the Covered Code is available under the
-terms of this License with information on how and where to obtain such
-Source Code.
-
-2.4 Third Party Rights. You expressly acknowledge and agree that
-although Apple and each Contributor grants the licenses to their
-respective portions of the Covered Code set forth herein, no
-assurances are provided by Apple or any Contributor that the Covered
-Code does not infringe the patent or other intellectual property
-rights of any other entity. Apple and each Contributor disclaim any
-liability to You for claims brought by any other entity based on
-infringement of intellectual property rights or otherwise. As a
-condition to exercising the rights and licenses granted hereunder, You
-hereby assume sole responsibility to secure any other intellectual
-property rights needed, if any. For example, if a third party patent
-license is required to allow You to distribute the Covered Code, it is
-Your responsibility to acquire that license before distributing the
-Covered Code.
-
-3. Your Grants. In consideration of, and as a condition to, the
-licenses granted to You under this License, You hereby grant to any
-person or entity receiving or distributing Covered Code under this
-License a non-exclusive, royalty-free, perpetual, irrevocable license,
-under Your Applicable Patent Rights and other intellectual property
-rights (other than patent) owned or controlled by You, to use,
-reproduce, display, perform, modify, sublicense, distribute and
-Externally Deploy Your Modifications of the same scope and extent as
-Apple's licenses under Sections 2.1 and 2.2 above.
-
-4. Larger Works. You may create a Larger Work by combining Covered
-Code with other code not governed by the terms of this License and
-distribute the Larger Work as a single product. In each such instance,
-You must make sure the requirements of this License are fulfilled for
-the Covered Code or any portion thereof.
-
-5. Limitations on Patent License. Except as expressly stated in
-Section 2, no other patent rights, express or implied, are granted by
-Apple herein. Modifications and/or Larger Works may require additional
-patent licenses from Apple which Apple may grant in its sole
-discretion.
-
-6. Additional Terms. You may choose to offer, and to charge a fee for,
-warranty, support, indemnity or liability obligations and/or other
-rights consistent with the scope of the license granted herein
-("Additional Terms") to one or more recipients of Covered Code.
-However, You may do so only on Your own behalf and as Your sole
-responsibility, and not on behalf of Apple or any Contributor. You
-must obtain the recipient's agreement that any such Additional Terms
-are offered by You alone, and You hereby agree to indemnify, defend
-and hold Apple and every Contributor harmless for any liability
-incurred by or claims asserted against Apple or such Contributor by
-reason of any such Additional Terms.
-
-7. Versions of the License. Apple may publish revised and/or new
-versions of this License from time to time. Each version will be given
-a distinguishing version number. Once Original Code has been published
-under a particular version of this License, You may continue to use it
-under the terms of that version. You may also choose to use such
-Original Code under the terms of any subsequent version of this
-License published by Apple. No one other than Apple has the right to
-modify the terms applicable to Covered Code created under this
-License.
-
-8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
-part pre-release, untested, or not fully tested works. The Covered
-Code may contain errors that could cause failures or loss of data, and
-may be incomplete or contain inaccuracies. You expressly acknowledge
-and agree that use of the Covered Code, or any portion thereof, is at
-Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
-WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
-APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
-PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
-ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
-MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
-PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
-PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
-INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
-FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
-THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
-ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
-ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
-AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
-You acknowledge that the Covered Code is not intended for use in the
-operation of nuclear facilities, aircraft navigation, communication
-systems, or air traffic control machines in which case the failure of
-the Covered Code could lead to death, personal injury, or severe
-physical or environmental damage.
-
-9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
-EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
-TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
-ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
-TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
-APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
-REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
-INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
-TO YOU. In no event shall Apple's total liability to You for all
-damages (other than as may be required by applicable law) under this
-License exceed the amount of fifty dollars ($50.00).
-
-10. Trademarks. This License does not grant any rights to use the
-trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
-"QuickTime", "QuickTime Streaming Server" or any other trademarks,
-service marks, logos or trade names belonging to Apple (collectively
-"Apple Marks") or to any trademark, service mark, logo or trade name
-belonging to any Contributor. You agree not to use any Apple Marks in
-or as part of the name of products derived from the Original Code or
-to endorse or promote products derived from the Original Code other
-than as expressly permitted by and in strict compliance at all times
-with Apple's third party trademark usage guidelines which are posted
-at http://www.apple.com/legal/guidelinesfor3rdparties.html.
-
-11. Ownership. Subject to the licenses granted under this License,
-each Contributor retains all rights, title and interest in and to any
-Modifications made by such Contributor. Apple retains all rights,
-title and interest in and to the Original Code and any Modifications
-made by or on behalf of Apple ("Apple Modifications"), and such Apple
-Modifications will not be automatically subject to this License. Apple
-may, at its sole discretion, choose to license such Apple
-Modifications under this License, or on different terms from those
-contained in this License or may choose not to license them at all.
-
-12. Termination.
-
-12.1 Termination. This License and the rights granted hereunder will
-terminate:
-
-(a) automatically without notice from Apple if You fail to comply with
-any term(s) of this License and fail to cure such breach within 30
-days of becoming aware of such breach;
-
-(b) immediately in the event of the circumstances described in Section
-13.5(b); or
-
-(c) automatically without notice from Apple if You, at any time during
-the term of this License, commence an action for patent infringement
-against Apple; provided that Apple did not first commence
-an action for patent infringement against You in that instance.
-
-12.2 Effect of Termination. Upon termination, You agree to immediately
-stop any further use, reproduction, modification, sublicensing and
-distribution of the Covered Code. All sublicenses to the Covered Code
-which have been properly granted prior to termination shall survive
-any termination of this License. Provisions which, by their nature,
-should remain in effect beyond the termination of this License shall
-survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
-12.2 and 13. No party will be liable to any other for compensation,
-indemnity or damages of any sort solely as a result of terminating
-this License in accordance with its terms, and termination of this
-License will be without prejudice to any other right or remedy of
-any party.
-
-13. Miscellaneous.
-
-13.1 Government End Users. The Covered Code is a "commercial item" as
-defined in FAR 2.101. Government software and technical data rights in
-the Covered Code include only those rights customarily provided to the
-public as defined in this License. This customary commercial license
-in technical data and software is provided in accordance with FAR
-12.211 (Technical Data) and 12.212 (Computer Software) and, for
-Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
-Commercial Items) and 227.7202-3 (Rights in Commercial Computer
-Software or Computer Software Documentation). Accordingly, all U.S.
-Government End Users acquire Covered Code with only those rights set
-forth herein.
-
-13.2 Relationship of Parties. This License will not be construed as
-creating an agency, partnership, joint venture or any other form of
-legal association between or among You, Apple or any Contributor, and
-You will not represent to the contrary, whether expressly, by
-implication, appearance or otherwise.
-
-13.3 Independent Development. Nothing in this License will impair
-Apple's right to acquire, license, develop, have others develop for
-it, market and/or distribute technology or products that perform the
-same or similar functions as, or otherwise compete with,
-Modifications, Larger Works, technology or products that You may
-develop, produce, market or distribute.
-
-13.4 Waiver; Construction. Failure by Apple or any Contributor to
-enforce any provision of this License will not be deemed a waiver of
-future enforcement of that or any other provision. Any law or
-regulation which provides that the language of a contract shall be
-construed against the drafter will not apply to this License.
-
-13.5 Severability. (a) If for any reason a court of competent
-jurisdiction finds any provision of this License, or portion thereof,
-to be unenforceable, that provision of the License will be enforced to
-the maximum extent permissible so as to effect the economic benefits
-and intent of the parties, and the remainder of this License will
-continue in full force and effect. (b) Notwithstanding the foregoing,
-if applicable law prohibits or restricts You from fully and/or
-specifically complying with Sections 2 and/or 3 or prevents the
-enforceability of either of those Sections, this License will
-immediately terminate and You must immediately discontinue any use of
-the Covered Code and destroy all copies of it that are in your
-possession or control.
-
-13.6 Dispute Resolution. Any litigation or other dispute resolution
-between You and Apple relating to this License shall take place in the
-Northern District of California, and You and Apple hereby consent to
-the personal jurisdiction of, and venue in, the state and federal
-courts within that District with respect to this License. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded.
-
-13.7 Entire Agreement; Governing Law. This License constitutes the
-entire agreement between the parties with respect to the subject
-matter hereof. This License shall be governed by the laws of the
-United States and the State of California, except that body of
-California law concerning conflicts of law.
-
-Where You are located in the province of Quebec, Canada, the following
-clause applies: The parties hereby confirm that they have requested
-that this License and all related documents be drafted in English. Les
-parties ont exige que le present contrat et tous les documents
-connexes soient rediges en anglais.
-
-EXHIBIT A.
-
-"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
-Reserved.
-
-This file contains Original Code and/or Modifications of Original Code
-as defined in and that are subject to the Apple Public Source License
-Version 2.0 (the 'License'). You may not use this file except in
-compliance with the License. Please obtain a copy of the License at
-http://www.opensource.apple.com/apsl/ and read it before using this
-file.
-
-The Original Code and all software distributed under the License are
-distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
-INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
-Please see the License for the specific language governing rights and
-limitations under the License."
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/include/mach-o/getsect.h b/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/include/mach-o/getsect.h
deleted file mode 100644
index 639b8061..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/include/mach-o/getsect.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-#ifndef CRASHPAD_THIRD_PARTY_APPLE_CCTOOLS_CCTOOLS_INCLUDE_MACH_O_GETSECT_H_
-#define CRASHPAD_THIRD_PARTY_APPLE_CCTOOLS_CCTOOLS_INCLUDE_MACH_O_GETSECT_H_
-
-#include <AvailabilityMacros.h>
-
-#if !defined(MAC_OS_X_VERSION_10_7) || \
-    MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
-
-#include <stdint.h>
-#include <mach-o/loader.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef __LP64__
-/*
- * Runtime interfaces for 32-bit Mach-O programs.
- */
-extern uint8_t *crashpad_getsectiondata(
-    const struct mach_header *mhp,
-    const char *segname,
-    const char *sectname,
-    unsigned long *size);
-
-extern uint8_t *crashpad_getsegmentdata(
-    const struct mach_header *mhp,
-    const char *segname,
-    unsigned long *size);
-
-#else /* defined(__LP64__) */
-/*
- * Runtime interfaces for 64-bit Mach-O programs.
- */
-extern uint8_t *crashpad_getsectiondata(
-    const struct mach_header_64 *mhp,
-    const char *segname,
-    const char *sectname,
-    unsigned long *size);
-
-extern uint8_t *crashpad_getsegmentdata(
-    const struct mach_header_64 *mhp,
-    const char *segname,
-    unsigned long *size);
-
-#endif /* defined(__LP64__) */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 */
-
-#endif /* CRASHPAD_THIRD_PARTY_APPLE_CCTOOLS_CCTOOLS_INCLUDE_MACH_O_GETSECT_H_ */
diff --git a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/libmacho/getsecbyname.c b/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/libmacho/getsecbyname.c
deleted file mode 100644
index 1db1cbec..0000000
--- a/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/libmacho/getsecbyname.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include "third_party/apple_cctools/cctools/include/mach-o/getsect.h"
-
-#if !defined(MAC_OS_X_VERSION_10_7) || \
-    MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
-
-#include <string.h>
-
-#ifndef __LP64__
-typedef struct mach_header mach_header_32_64;
-typedef struct segment_command segment_command_32_64;
-typedef struct section section_32_64;
-#define LC_SEGMENT_32_64 LC_SEGMENT
-#else /* defined(__LP64__) */
-typedef struct mach_header_64 mach_header_32_64;
-typedef struct segment_command_64 segment_command_32_64;
-typedef struct section_64 section_32_64;
-#define LC_SEGMENT_32_64 LC_SEGMENT_64
-#endif /* defined(__LP64__) */
-
-/*
- * This routine returns the a pointer to the section contents of the named
- * section in the named segment if it exists in the image pointed to by the
- * mach header.  Otherwise it returns zero.
- */
-
-uint8_t *
-crashpad_getsectiondata(
-const mach_header_32_64 *mhp,
-const char *segname,
-const char *sectname,
-unsigned long *size)
-{
-    segment_command_32_64 *sgp, *zero;
-    section_32_64 *sp, *find;
-    uint32_t i, j;
-
-	zero = 0;
-	find = 0;
-	sp = 0;
-	sgp = (segment_command_32_64 *)
-	      ((char *)mhp + sizeof(mach_header_32_64));
-	for(i = 0; i < mhp->ncmds; i++){
-	    if(sgp->cmd == LC_SEGMENT_32_64){
-		if(zero == 0 && sgp->fileoff == 0 && sgp->nsects != 0){
-		    zero = sgp;
-		    if(find != 0)
-			goto done;
-		}
-		if(find == 0 &&
-		   strncmp(sgp->segname, segname, sizeof(sgp->segname)) == 0){
-		    sp = (section_32_64 *)((char *)sgp +
-			 sizeof(segment_command_32_64));
-		    for(j = 0; j < sgp->nsects; j++){
-			if(strncmp(sp->sectname, sectname,
-			   sizeof(sp->sectname)) == 0 &&
-			   strncmp(sp->segname, segname,
-			   sizeof(sp->segname)) == 0){
-			    find = sp;
-			    if(zero != 0)
-				goto done;
-			}
-			sp = (section_32_64 *)((char *)sp +
-			     sizeof(section_32_64));
-		    }
-		}
-	    }
-	    sgp = (segment_command_32_64 *)((char *)sgp + sgp->cmdsize);
-	}
-	return(0);
-done:
-	*size = sp->size;
-	return((uint8_t *)((uintptr_t)mhp - zero->vmaddr + sp->addr));
-}
-
-uint8_t *
-crashpad_getsegmentdata(
-const mach_header_32_64 *mhp,
-const char *segname,
-unsigned long *size)
-{
-    segment_command_32_64 *sgp, *zero, *find;
-    uint32_t i;
-
-	zero = 0;
-	find = 0;
-	sgp = (segment_command_32_64 *)
-	      ((char *)mhp + sizeof(mach_header_32_64));
-	for(i = 0; i < mhp->ncmds; i++){
-	    if(sgp->cmd == LC_SEGMENT_32_64){
-		if(zero == 0 && sgp->fileoff == 0 && sgp->nsects != 0){
-		    zero = sgp;
-		    if(find != 0)
-			goto done;
-		}
-		if(find == 0 &&
-		   strncmp(sgp->segname, segname, sizeof(sgp->segname)) == 0){
-		    find = sgp;
-		    if(zero != 0)
-			goto done;
-		}
-	    }
-	    sgp = (segment_command_32_64 *)((char *)sgp + sgp->cmdsize);
-	}
-	return(0);
-done:
-	*size = sgp->vmsize;
-	return((uint8_t *)((uintptr_t)mhp - zero->vmaddr + sgp->vmaddr));
-}
-
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 */
diff --git a/third_party/crashpad/crashpad/third_party/getopt/BUILD.gn b/third_party/crashpad/crashpad/third_party/getopt/BUILD.gn
index 573d844..da27624f 100644
--- a/third_party/crashpad/crashpad/third_party/getopt/BUILD.gn
+++ b/third_party/crashpad/crashpad/third_party/getopt/BUILD.gn
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-source_set("getopt") {
+static_library("getopt") {
   sources = [
     "getopt.cc",
     "getopt.h",
diff --git a/third_party/crashpad/crashpad/third_party/gtest/BUILD.gn b/third_party/crashpad/crashpad/third_party/gtest/BUILD.gn
index 97fe183..d2702315 100644
--- a/third_party/crashpad/crashpad/third_party/gtest/BUILD.gn
+++ b/third_party/crashpad/crashpad/third_party/gtest/BUILD.gn
@@ -12,121 +12,388 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-config("gtest_private_config") {
-  visibility = [ ":*" ]
-  include_dirs = [ "gtest/googletest" ]
-  defines = [ "GUNIT_NO_GOOGLE3=1" ]
-}
+import("../../build/crashpad_buildconfig.gni")
+import("../../build/test.gni")
 
-config("gtest_public_config") {
-  include_dirs = [ "gtest/googletest/include" ]
-}
-
-static_library("gtest") {
-  sources = [
-    "gtest/googletest/include/gtest/gtest-death-test.h",
-    "gtest/googletest/include/gtest/gtest-message.h",
-    "gtest/googletest/include/gtest/gtest-param-test.h",
-    "gtest/googletest/include/gtest/gtest-printers.h",
-    "gtest/googletest/include/gtest/gtest-spi.h",
-    "gtest/googletest/include/gtest/gtest-test-part.h",
-    "gtest/googletest/include/gtest/gtest-typed-test.h",
-    "gtest/googletest/include/gtest/gtest.h",
-    "gtest/googletest/include/gtest/gtest_pred_impl.h",
-    "gtest/googletest/include/gtest/gtest_prod.h",
-    "gtest/googletest/include/gtest/internal/custom/gtest-port.h",
-    "gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
-    "gtest/googletest/include/gtest/internal/custom/gtest.h",
-    "gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
-    "gtest/googletest/include/gtest/internal/gtest-filepath.h",
-    "gtest/googletest/include/gtest/internal/gtest-internal.h",
-    "gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
-    "gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
-    "gtest/googletest/include/gtest/internal/gtest-param-util.h",
-    "gtest/googletest/include/gtest/internal/gtest-port-arch.h",
-    "gtest/googletest/include/gtest/internal/gtest-port.h",
-    "gtest/googletest/include/gtest/internal/gtest-string.h",
-    "gtest/googletest/include/gtest/internal/gtest-tuple.h",
-    "gtest/googletest/include/gtest/internal/gtest-type-util.h",
-    "gtest/googletest/src/gtest-all.cc",
-    "gtest/googletest/src/gtest-death-test.cc",
-    "gtest/googletest/src/gtest-filepath.cc",
-    "gtest/googletest/src/gtest-internal-inl.h",
-    "gtest/googletest/src/gtest-port.cc",
-    "gtest/googletest/src/gtest-printers.cc",
-    "gtest/googletest/src/gtest-test-part.cc",
-    "gtest/googletest/src/gtest-typed-test.cc",
-    "gtest/googletest/src/gtest.cc",
-  ]
-  sources -= [ "gtest/googletest/src/gtest-all.cc" ]
-  configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
-  configs += [ ":gtest_private_config" ]
-  public_configs = [ ":gtest_public_config" ]
-}
-
-config("gmock_private_config") {
-  visibility = [ ":*" ]
-  include_dirs = [ "gtest/googlemock" ]
-}
-
-config("gmock_public_config") {
-  include_dirs = [ "gtest/googlemock/include" ]
-
-  # The MOCK_METHODn() macros do not specify “override”, which triggers this
-  # warning in users: “error: 'Method' overrides a member function but is not
-  # marked 'override' [-Werror,-Winconsistent-missing-override]”. Suppress
-  # these warnings, and add -Wno-unknown-warning-option because only recent
-  # versions of clang (trunk r220703 and later, version
-  # 3.6 and later) recognize it.
-  if (is_clang) {
-    cflags_cc = [
-      "-Wno-inconsistent-missing-override",
-      "-Wno-unknown-warning-option",
+if (crashpad_is_in_chromium) {
+  group("gtest") {
+    testonly = true
+    public_deps = [
+      "//testing/gtest",
     ]
   }
-}
+  group("gmock") {
+    testonly = true
+    public_deps = [
+      "//testing/gmock",
+    ]
+  }
+} else if (crashpad_is_in_fuchsia) {
+  group("gtest") {
+    testonly = true
+    public_deps = [
+      "//third_party/gtest",
+    ]
+  }
+  group("gmock") {
+    testonly = true
+    # TODO(scottmg): Fuchsia doesn't have a third_party/gmock, and has a
+    # pre-gmock-integration gtest.
+  }
+} else if (crashpad_is_standalone) {
+  config("gtest_private_config") {
+    visibility = [ ":*" ]
+    include_dirs = [ "gtest/googletest" ]
+    defines = [ "GUNIT_NO_GOOGLE3=1" ]
+  }
 
-static_library("gmock") {
-  sources = [
-    "gtest/googlemock/include/gmock/gmock-actions.h",
-    "gtest/googlemock/include/gmock/gmock-cardinalities.h",
-    "gtest/googlemock/include/gmock/gmock-generated-actions.h",
-    "gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
-    "gtest/googlemock/include/gmock/gmock-generated-matchers.h",
-    "gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
-    "gtest/googlemock/include/gmock/gmock-matchers.h",
-    "gtest/googlemock/include/gmock/gmock-more-actions.h",
-    "gtest/googlemock/include/gmock/gmock-more-matchers.h",
-    "gtest/googlemock/include/gmock/gmock-spec-builders.h",
-    "gtest/googlemock/include/gmock/gmock.h",
-    "gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
-    "gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
-    "gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
-    "gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
-    "gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
-    "gtest/googlemock/include/gmock/internal/gmock-port.h",
-    "gtest/googlemock/src/gmock-all.cc",
-    "gtest/googlemock/src/gmock-cardinalities.cc",
-    "gtest/googlemock/src/gmock-internal-utils.cc",
-    "gtest/googlemock/src/gmock-matchers.cc",
-    "gtest/googlemock/src/gmock-spec-builders.cc",
-    "gtest/googlemock/src/gmock.cc",
-  ]
-  sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
-  deps = [
-    ":gtest",
-  ]
-  configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
-  configs += [ ":gmock_private_config" ]
-  public_configs = [ ":gmock_public_config" ]
-}
+  config("gtest_public_config") {
+    include_dirs = [ "gtest/googletest/include" ]
+  }
 
-static_library("gmock_main") {
-  sources = [
-    "gtest/googlemock/src/gmock_main.cc",
-  ]
-  deps = [
-    ":gmock",
-    ":gtest",
-  ]
+  static_library("gtest") {
+    testonly = true
+    sources = [
+      "gtest/googletest/include/gtest/gtest-death-test.h",
+      "gtest/googletest/include/gtest/gtest-message.h",
+      "gtest/googletest/include/gtest/gtest-param-test.h",
+      "gtest/googletest/include/gtest/gtest-printers.h",
+      "gtest/googletest/include/gtest/gtest-spi.h",
+      "gtest/googletest/include/gtest/gtest-test-part.h",
+      "gtest/googletest/include/gtest/gtest-typed-test.h",
+      "gtest/googletest/include/gtest/gtest.h",
+      "gtest/googletest/include/gtest/gtest_pred_impl.h",
+      "gtest/googletest/include/gtest/gtest_prod.h",
+      "gtest/googletest/include/gtest/internal/custom/gtest-port.h",
+      "gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
+      "gtest/googletest/include/gtest/internal/custom/gtest.h",
+      "gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
+      "gtest/googletest/include/gtest/internal/gtest-filepath.h",
+      "gtest/googletest/include/gtest/internal/gtest-internal.h",
+      "gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
+      "gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
+      "gtest/googletest/include/gtest/internal/gtest-param-util.h",
+      "gtest/googletest/include/gtest/internal/gtest-port-arch.h",
+      "gtest/googletest/include/gtest/internal/gtest-port.h",
+      "gtest/googletest/include/gtest/internal/gtest-string.h",
+      "gtest/googletest/include/gtest/internal/gtest-tuple.h",
+      "gtest/googletest/include/gtest/internal/gtest-type-util.h",
+      "gtest/googletest/src/gtest-all.cc",
+      "gtest/googletest/src/gtest-death-test.cc",
+      "gtest/googletest/src/gtest-filepath.cc",
+      "gtest/googletest/src/gtest-internal-inl.h",
+      "gtest/googletest/src/gtest-port.cc",
+      "gtest/googletest/src/gtest-printers.cc",
+      "gtest/googletest/src/gtest-test-part.cc",
+      "gtest/googletest/src/gtest-typed-test.cc",
+      "gtest/googletest/src/gtest.cc",
+    ]
+    sources -= [ "gtest/googletest/src/gtest-all.cc" ]
+    public_configs = [ ":gtest_public_config" ]
+    configs -= [
+      "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
+    ]
+    configs += [ ":gtest_private_config" ]
+  }
+
+  static_library("gtest_main") {
+    # Tests outside of this file should use ../../test:gtest_main instead.
+    visibility = [ ":*" ]
+
+    testonly = true
+    sources = [
+      "gtest/googletest/src/gtest_main.cc",
+    ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_all_test") {
+    sources = [
+      "gtest/googletest/test/gtest-death-test_test.cc",
+      "gtest/googletest/test/gtest-filepath_test.cc",
+      "gtest/googletest/test/gtest-linked_ptr_test.cc",
+      "gtest/googletest/test/gtest-message_test.cc",
+      "gtest/googletest/test/gtest-options_test.cc",
+      "gtest/googletest/test/gtest-port_test.cc",
+      "gtest/googletest/test/gtest-printers_test.cc",
+      "gtest/googletest/test/gtest-test-part_test.cc",
+      "gtest/googletest/test/gtest-typed-test2_test.cc",
+      "gtest/googletest/test/gtest-typed-test_test.cc",
+      "gtest/googletest/test/gtest-typed-test_test.h",
+      "gtest/googletest/test/gtest_main_unittest.cc",
+      "gtest/googletest/test/gtest_pred_impl_unittest.cc",
+      "gtest/googletest/test/gtest_prod_test.cc",
+      "gtest/googletest/test/gtest_unittest.cc",
+      "gtest/googletest/test/production.cc",
+      "gtest/googletest/test/production.h",
+    ]
+    configs -= [
+      "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
+    ]
+    configs += [ ":gtest_private_config" ]
+    deps = [
+      ":gtest",
+      ":gtest_main",
+    ]
+  }
+
+  test("gtest_environment_test") {
+    sources = [
+      "gtest/googletest/test/gtest_environment_test.cc",
+    ]
+    configs += [ ":gtest_private_config" ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_listener_test") {
+    sources = [
+      "gtest/googletest/test/gtest-listener_test.cc",
+    ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_no_test") {
+    sources = [
+      "gtest/googletest/test/gtest_no_test_unittest.cc",
+    ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_param_test") {
+    sources = [
+      "gtest/googletest/test/gtest-param-test2_test.cc",
+      "gtest/googletest/test/gtest-param-test_test.cc",
+      "gtest/googletest/test/gtest-param-test_test.h",
+    ]
+    configs -= [
+      "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
+    ]
+    configs += [ ":gtest_private_config" ]
+    deps = [
+      ":gtest",
+    ]
+
+    if (crashpad_is_clang) {
+      cflags_cc = [
+        # For gtest/googlemock/test/gmock-matchers_test.cc’s
+        # Unstreamable::value_.
+        "-Wno-unused-private-field",
+      ]
+    }
+  }
+
+  test("gtest_premature_exit_test") {
+    sources = [
+      "gtest/googletest/test/gtest_premature_exit_test.cc",
+    ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_repeat_test") {
+    sources = [
+      "gtest/googletest/test/gtest_repeat_test.cc",
+    ]
+    configs += [ ":gtest_private_config" ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_sole_header_test") {
+    sources = [
+      "gtest/googletest/test/gtest_sole_header_test.cc",
+    ]
+    deps = [
+      ":gtest",
+      ":gtest_main",
+    ]
+  }
+
+  test("gtest_stress_test") {
+    sources = [
+      "gtest/googletest/test/gtest_stress_test.cc",
+    ]
+    configs += [ ":gtest_private_config" ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  test("gtest_unittest_api_test") {
+    sources = [
+      "gtest/googletest/test/gtest-unittest-api_test.cc",
+    ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  group("gtest_all_tests") {
+    testonly = true
+    deps = [
+      ":gtest_all_test",
+      ":gtest_environment_test",
+      ":gtest_listener_test",
+      ":gtest_no_test",
+      ":gtest_param_test",
+      ":gtest_premature_exit_test",
+      ":gtest_repeat_test",
+      ":gtest_sole_header_test",
+      ":gtest_stress_test",
+      ":gtest_unittest_api_test",
+    ]
+  }
+
+  config("gmock_private_config") {
+    visibility = [ ":*" ]
+    include_dirs = [ "gtest/googlemock" ]
+  }
+
+  config("gmock_public_config") {
+    include_dirs = [ "gtest/googlemock/include" ]
+
+    if (crashpad_is_clang) {
+      cflags_cc = [
+        # The MOCK_METHODn() macros do not specify “override”, which triggers
+        # this warning in users: “error: 'Method' overrides a member function
+        # but is not marked 'override'
+        # [-Werror,-Winconsistent-missing-override]”. Suppress these warnings
+        # until https://github.com/google/googletest/issues/533 is fixed.
+        "-Wno-inconsistent-missing-override",
+      ]
+    }
+  }
+
+  static_library("gmock") {
+    testonly = true
+    sources = [
+      "gtest/googlemock/include/gmock/gmock-actions.h",
+      "gtest/googlemock/include/gmock/gmock-cardinalities.h",
+      "gtest/googlemock/include/gmock/gmock-generated-actions.h",
+      "gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
+      "gtest/googlemock/include/gmock/gmock-generated-matchers.h",
+      "gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
+      "gtest/googlemock/include/gmock/gmock-matchers.h",
+      "gtest/googlemock/include/gmock/gmock-more-actions.h",
+      "gtest/googlemock/include/gmock/gmock-more-matchers.h",
+      "gtest/googlemock/include/gmock/gmock-spec-builders.h",
+      "gtest/googlemock/include/gmock/gmock.h",
+      "gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
+      "gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
+      "gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
+      "gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
+      "gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
+      "gtest/googlemock/include/gmock/internal/gmock-port.h",
+      "gtest/googlemock/src/gmock-all.cc",
+      "gtest/googlemock/src/gmock-cardinalities.cc",
+      "gtest/googlemock/src/gmock-internal-utils.cc",
+      "gtest/googlemock/src/gmock-matchers.cc",
+      "gtest/googlemock/src/gmock-spec-builders.cc",
+      "gtest/googlemock/src/gmock.cc",
+    ]
+    sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
+    public_configs = [ ":gmock_public_config" ]
+    configs -= [
+      "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
+    ]
+    configs += [ ":gmock_private_config" ]
+    deps = [
+      ":gtest",
+    ]
+  }
+
+  static_library("gmock_main") {
+    # Tests outside of this file should use ../../test:gmock_main instead.
+    visibility = [ ":*" ]
+    testonly = true
+    sources = [
+      "gtest/googlemock/src/gmock_main.cc",
+    ]
+    deps = [
+      ":gmock",
+      ":gtest",
+    ]
+  }
+
+  test("gmock_all_test") {
+    sources = [
+      "gtest/googlemock/test/gmock-actions_test.cc",
+      "gtest/googlemock/test/gmock-cardinalities_test.cc",
+      "gtest/googlemock/test/gmock-generated-actions_test.cc",
+      "gtest/googlemock/test/gmock-generated-function-mockers_test.cc",
+      "gtest/googlemock/test/gmock-generated-internal-utils_test.cc",
+      "gtest/googlemock/test/gmock-generated-matchers_test.cc",
+      "gtest/googlemock/test/gmock-internal-utils_test.cc",
+      "gtest/googlemock/test/gmock-matchers_test.cc",
+      "gtest/googlemock/test/gmock-more-actions_test.cc",
+      "gtest/googlemock/test/gmock-nice-strict_test.cc",
+      "gtest/googlemock/test/gmock-port_test.cc",
+      "gtest/googlemock/test/gmock-spec-builders_test.cc",
+      "gtest/googlemock/test/gmock_test.cc",
+    ]
+    configs += [
+      ":gmock_private_config",
+      ":gtest_private_config",
+    ]
+    deps = [
+      ":gmock",
+      ":gmock_main",
+      ":gtest",
+    ]
+
+    if (crashpad_is_clang) {
+      cflags_cc = [
+        # For gtest/googlemock/test/gmock-matchers_test.cc’s
+        # testing::gmock_matchers_test::Unprintable::c_.
+        "-Wno-unused-private-field",
+      ]
+    }
+  }
+
+  test("gmock_link_test") {
+    sources = [
+      "gtest/googlemock/test/gmock_link2_test.cc",
+      "gtest/googlemock/test/gmock_link_test.cc",
+      "gtest/googlemock/test/gmock_link_test.h",
+    ]
+    configs += [ ":gmock_private_config" ]
+    deps = [
+      ":gmock",
+      ":gmock_main",
+      ":gtest",
+    ]
+  }
+
+  test("gmock_stress_test") {
+    sources = [
+      "gtest/googlemock/test/gmock_stress_test.cc",
+    ]
+    configs -= [
+      "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
+    ]
+    configs += [ ":gmock_private_config" ]
+    deps = [
+      ":gmock",
+      ":gtest",
+    ]
+  }
+
+  group("gmock_all_tests") {
+    testonly = true
+    deps = [
+      ":gmock_all_test",
+      ":gmock_link_test",
+      ":gmock_stress_test",
+    ]
+  }
 }
diff --git a/third_party/crashpad/crashpad/third_party/gtest/gmock.gyp b/third_party/crashpad/crashpad/third_party/gtest/gmock.gyp
index a6600708..d53c925 100644
--- a/third_party/crashpad/crashpad/third_party/gtest/gmock.gyp
+++ b/third_party/crashpad/crashpad/third_party/gtest/gmock.gyp
@@ -92,22 +92,19 @@
             # triggers this warning in users: “error: 'Method' overrides a
             # member function but is not marked 'override'
             # [-Werror,-Winconsistent-missing-override]”. Suppress these
-            # warnings, and add -Wno-unknown-warning-option because only
-            # recent versions of clang (trunk r220703 and later, version
-            # 3.6 and later) recognize it.
+            # warnings until https://github.com/google/googletest/issues/533 is
+            # fixed.
             'conditions': [
               ['OS=="mac"', {
                 'xcode_settings': {
                   'WARNING_CFLAGS': [
                     '-Wno-inconsistent-missing-override',
-                    '-Wno-unknown-warning-option',
                   ],
                 },
               }],
               ['OS=="linux" or OS=="android"', {
                 'cflags': [
                   '-Wno-inconsistent-missing-override',
-                  '-Wno-unknown-warning-option',
                 ],
               }],
             ],
@@ -171,6 +168,26 @@
         '<(gmock_dir)/test/gmock-spec-builders_test.cc',
         '<(gmock_dir)/test/gmock_test.cc',
       ],
+      'conditions': [
+         ['clang!=0', {
+          # For gtest/googlemock/test/gmock-matchers_test.cc’s
+          # Unstreamable::value_.
+          'conditions': [
+            ['OS=="mac"', {
+              'xcode_settings': {
+                'WARNING_CFLAGS': [
+                  '-Wno-unused-private-field',
+                ],
+              },
+            }],
+            ['OS=="linux" or OS=="android"', {
+              'cflags': [
+                '-Wno-unused-private-field',
+              ],
+            }],
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'gmock_link_test',
diff --git a/third_party/crashpad/crashpad/third_party/gtest/gtest.gyp b/third_party/crashpad/crashpad/third_party/gtest/gtest.gyp
index 5079e26..5d93feb 100644
--- a/third_party/crashpad/crashpad/third_party/gtest/gtest.gyp
+++ b/third_party/crashpad/crashpad/third_party/gtest/gtest.gyp
@@ -216,6 +216,26 @@
         '<(gtest_dir)/test/gtest-param-test_test.cc',
         '<(gtest_dir)/test/gtest-param-test_test.h',
       ],
+      'conditions': [
+         ['clang!=0', {
+          # For gtest/googlemock/test/gmock-matchers_test.cc’s
+          # Unstreamable::value_.
+          'conditions': [
+            ['OS=="mac"', {
+              'xcode_settings': {
+                'WARNING_CFLAGS': [
+                  '-Wno-unused-private-field',
+                ],
+              },
+            }],
+            ['OS=="linux" or OS=="android"', {
+              'cflags': [
+                '-Wno-unused-private-field',
+              ],
+            }],
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'gtest_premature_exit_test',
diff --git a/third_party/crashpad/crashpad/third_party/mini_chromium/BUILD.gn b/third_party/crashpad/crashpad/third_party/mini_chromium/BUILD.gn
new file mode 100644
index 0000000..9ab8178
--- /dev/null
+++ b/third_party/crashpad/crashpad/third_party/mini_chromium/BUILD.gn
@@ -0,0 +1,41 @@
+# Copyright 2017 The Crashpad Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("../../build/crashpad_buildconfig.gni")
+
+group("base") {
+  if (crashpad_is_in_chromium) {
+    public_deps = [
+      "//base",
+    ]
+  } else if (crashpad_is_in_fuchsia) {
+    public_deps = [
+      "//third_party/mini_chromium/base",
+    ]
+  } else if (crashpad_is_standalone) {
+    public_deps = [
+      "//third_party/mini_chromium/mini_chromium/base",
+    ]
+  }
+}
+
+group("base_test_support") {
+  testonly = true
+
+  if (crashpad_is_in_chromium) {
+    public_deps = [
+      "//base/test:test_support",
+    ]
+  }
+}
diff --git a/third_party/crashpad/crashpad/third_party/zlib/BUILD.gn b/third_party/crashpad/crashpad/third_party/zlib/BUILD.gn
index cfea9f3..db0f99a1 100644
--- a/third_party/crashpad/crashpad/third_party/zlib/BUILD.gn
+++ b/third_party/crashpad/crashpad/third_party/zlib/BUILD.gn
@@ -12,25 +12,40 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("../../build/crashpad_in_chromium.gni")
+import("../../build/crashpad_buildconfig.gni")
+
+if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
+  zlib_source = "external"
+} else if (!crashpad_is_win && !crashpad_is_fuchsia) {
+  zlib_source = "system"
+} else {
+  zlib_source = "embedded"
+}
 
 config("zlib_config") {
-  if (crashpad_in_chromium) {
-    defines = [ "CRASHPAD_ZLIB_SOURCE_CHROMIUM" ]
-  } else {
+  if (zlib_source == "external") {
+    defines = [ "CRASHPAD_ZLIB_SOURCE_EXTERNAL" ]
+  } else if (zlib_source == "system") {
+    defines = [ "CRASHPAD_ZLIB_SOURCE_SYSTEM" ]
+  } else if (zlib_source == "embedded") {
     defines = [ "CRASHPAD_ZLIB_SOURCE_EMBEDDED" ]
     include_dirs = [ "zlib" ]
   }
 }
 
-if (crashpad_in_chromium) {
+if (zlib_source == "external") {
   group("zlib") {
     public_configs = [ ":zlib_config" ]
     public_deps = [
       "//third_party/zlib",
     ]
   }
-} else {
+} else if (zlib_source == "system") {
+  source_set("zlib") {
+    public_configs = [ ":zlib_config" ]
+    libs = [ "z" ]
+  }
+} else if (zlib_source == "embedded") {
   static_library("zlib") {
     sources = [
       "zlib/adler32.c",
@@ -67,7 +82,7 @@
     defines = [ "HAVE_STDARG_H" ]
     public_configs = [ ":zlib_config" ]
 
-    if (is_win) {
+    if (crashpad_is_win) {
       cflags += [
         "/wd4131",  # uses old-style declarator
         "/wd4244",  # conversion from 't1' to 't2', possible loss of data
@@ -89,13 +104,13 @@
         "zlib/x86.c",
         "zlib/x86.h",
       ]
-      if (!is_win || is_clang) {
+      if (!crashpad_is_win || crashpad_is_clang) {
         cflags += [
           "-msse4.2",
           "-mpclmul",
         ]
       }
-      if (is_clang) {
+      if (crashpad_is_clang) {
         cflags += [ "-Wno-incompatible-pointer-types" ]
       }
     } else {
diff --git a/third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h b/third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h
index 2ab542e..d3a2386 100644
--- a/third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h
+++ b/third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h
@@ -19,12 +19,12 @@
 // available at any other location in the source tree. It will #include the
 // proper <zlib.h> depending on how the build has been configured.
 
-#if defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
+#if defined(CRASHPAD_ZLIB_SOURCE_EXTERNAL)
+#include "third_party/zlib/zlib.h"
+#elif defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
 #include <zlib.h>
 #elif defined(CRASHPAD_ZLIB_SOURCE_EMBEDDED)
 #include "third_party/zlib/zlib/zlib.h"
-#elif defined(CRASHPAD_ZLIB_SOURCE_CHROMIUM)
-#include "third_party/zlib/zlib.h"
 #else
 #error Unknown zlib source
 #endif
diff --git a/third_party/crashpad/crashpad/tools/BUILD.gn b/third_party/crashpad/crashpad/tools/BUILD.gn
index af02e66..5418819 100644
--- a/third_party/crashpad/crashpad/tools/BUILD.gn
+++ b/third_party/crashpad/crashpad/tools/BUILD.gn
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import("../build/crashpad_buildconfig.gni")
+
 source_set("tool_support") {
   sources = [
     "tool_support.cc",
@@ -21,7 +23,7 @@
   public_configs = [ "..:crashpad_config" ]
 
   deps = [
-    "//base",
+    "../third_party/mini_chromium:base",
   ]
 }
 
@@ -32,11 +34,11 @@
 
   deps = [
     ":tool_support",
+    "../build:default_exe_manifest_win",
     "../client",
     "../compat",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//build/win:default_exe_manifest",
   ]
 }
 
@@ -47,10 +49,10 @@
 
   deps = [
     ":tool_support",
+    "../build:default_exe_manifest_win",
     "../compat",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//build/win:default_exe_manifest",
   ]
 }
 
@@ -61,34 +63,35 @@
 
   deps = [
     ":tool_support",
+    "../build:default_exe_manifest_win",
     "../compat",
     "../minidump",
     "../snapshot",
+    "../third_party/mini_chromium:base",
     "../util",
-    "//base",
-    "//build/win:default_exe_manifest",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     # This would be better as a config so that it could be shared with
     # exception_port_tool, but configs can’t alter “inputs”.
+    # https://crbug.com/781858.
     inputs = [
-      rebase_path("mac/sectaskaccess_info.plist"),
+      "mac/sectaskaccess_info.plist",
     ]
     ldflags = [
       "-sectcreate",
       "__TEXT",
       "__info_plist",
-      inputs[0],
+      rebase_path(inputs[0], root_build_dir),
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     cflags = [ "/wd4201" ]  # nonstandard extension used : nameless struct/union
   }
 }
 
-if (is_mac) {
+if (crashpad_is_mac) {
   executable("catch_exception_tool") {
     sources = [
       "mac/catch_exception_tool.cc",
@@ -97,8 +100,8 @@
     deps = [
       ":tool_support",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 
@@ -108,22 +111,22 @@
     ]
 
     # This would be better as a config so that it could be shared with
-    # generate_dump, but configs can’t alter “inputs”.
+    # generate_dump, but configs can’t alter “inputs”. https://crbug.com/781858.
     inputs = [
-      rebase_path("mac/sectaskaccess_info.plist"),
+      "mac/sectaskaccess_info.plist",
     ]
     ldflags = [
       "-sectcreate",
       "__TEXT",
       "__info_plist",
-      inputs[0],
+      rebase_path(inputs[0], root_build_dir),
     ]
 
     deps = [
       ":tool_support",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 
@@ -140,8 +143,8 @@
     deps = [
       ":tool_support",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 
@@ -154,8 +157,8 @@
       ":tool_support",
       "../client",
       "../compat",
+      "../third_party/mini_chromium:base",
       "../util",
-      "//base",
     ]
   }
 }
diff --git a/third_party/crashpad/crashpad/util/BUILD.gn b/third_party/crashpad/crashpad/util/BUILD.gn
index ba5232f0..9a4970f 100644
--- a/third_party/crashpad/crashpad/util/BUILD.gn
+++ b/third_party/crashpad/crashpad/util/BUILD.gn
@@ -12,10 +12,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import("//testing/test.gni")
+import("../build/crashpad_buildconfig.gni")
 
-if (is_mac) {
-  import("//build/config/sysroot.gni")
+if (crashpad_is_mac) {
+  if (crashpad_is_in_chromium) {
+    import("//build/config/sysroot.gni")
+  } else {
+    import("//third_party/mini_chromium/mini_chromium/build/sysroot.gni")
+  }
 
   action_foreach("mig") {
     script = "mach/mig.py"
@@ -36,15 +40,21 @@
 
     args = [ "{{source}}" ]
     args += rebase_path(outputs, root_build_dir)
-    if (!use_system_xcode) {
+    if (crashpad_is_in_chromium) {
+      if (!use_system_xcode) {
+        args += [
+          "--developer-dir",
+          hermetic_xcode_path,
+        ]
+      }
+    }
+    if (sysroot != "") {
       args += [
-        "--developer-dir",
-        hermetic_xcode_path,
+        "--sdk",
+        sysroot,
       ]
     }
     args += [
-      "--sdk",
-      sysroot,
       "--include",
       rebase_path("../compat/mac", root_build_dir),
     ]
@@ -140,7 +150,7 @@
     "thread/worker_thread.h",
   ]
 
-  if (is_posix) {
+  if (crashpad_is_posix) {
     sources += [
       "file/directory_reader_posix.cc",
       "file/file_io_posix.cc",
@@ -158,7 +168,7 @@
       "thread/thread_posix.cc",
     ]
 
-    if (!is_fuchsia) {
+    if (!crashpad_is_fuchsia) {
       sources += [
         "posix/close_multiple.cc",
         "posix/close_multiple.h",
@@ -177,7 +187,7 @@
     }
   }
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/checked_mach_address_range.h",
       "mac/launchd.h",
@@ -230,7 +240,47 @@
     sources += get_target_outputs(":mig")
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "linux/address_types.h",
+      "linux/auxiliary_vector.cc",
+      "linux/auxiliary_vector.h",
+      "linux/checked_linux_address_range.h",
+      "linux/direct_ptrace_connection.cc",
+      "linux/direct_ptrace_connection.h",
+      "linux/exception_handler_client.cc",
+      "linux/exception_handler_client.h",
+      "linux/exception_handler_protocol.h",
+      "linux/exception_information.h",
+      "linux/memory_map.cc",
+      "linux/memory_map.h",
+      "linux/proc_stat_reader.cc",
+      "linux/proc_stat_reader.h",
+      "linux/ptrace_broker.cc",
+      "linux/ptrace_broker.h",
+      "linux/ptrace_client.cc",
+      "linux/ptrace_client.h",
+      "linux/ptrace_connection.h",
+      "linux/ptracer.cc",
+      "linux/ptracer.h",
+      "linux/scoped_ptrace_attach.cc",
+      "linux/scoped_ptrace_attach.h",
+      "linux/thread_info.cc",
+      "linux/thread_info.h",
+      "linux/traits.h",
+      "misc/paths_linux.cc",
+      "net/http_transport_libcurl.cc",
+      "posix/process_info_linux.cc",
+      "process/process_memory_linux.cc",
+      "process/process_memory_linux.h",
+
+      # TODO: Port to all platforms.
+      "process/process_memory_range.cc",
+      "process/process_memory_range.h",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "file/directory_reader_win.cc",
       "file/file_io_win.cc",
@@ -307,7 +357,7 @@
     }
   }
 
-  if (is_fuchsia) {
+  if (crashpad_is_fuchsia) {
     sources += [
       "misc/paths_fuchsia.cc",
       "net/http_transport_fuchsia.cc",
@@ -324,11 +374,11 @@
   ]
 
   deps = [
+    "../third_party/mini_chromium:base",
     "../third_party/zlib",
-    "//base",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     libs = [
       "bsm",
       "CoreFoundation.framework",
@@ -339,7 +389,11 @@
     include_dirs += [ "$root_build_dir/gen" ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    libs = [ "curl" ]
+  }
+
+  if (crashpad_is_win) {
     cflags = [
       "/wd4201",  # nonstandard extension used : nameless struct/union.
       "/wd4577",  # 'noexcept' used with no exception handling mode specified.
@@ -396,7 +450,7 @@
     "thread/worker_thread_test.cc",
   ]
 
-  if (!is_fuchsia) {
+  if (!crashpad_is_fuchsia) {
     # TODO(scottmg): This requires an implementation of MultiprocessExec for
     # testing, and a solution to http_transport_test_server.py -- either a port
     # to non-Python, or method of forwarding those requests back to the builder
@@ -404,8 +458,8 @@
     sources += [ "net/http_transport_test.cc" ]
   }
 
-  if (is_posix) {
-    if (!is_fuchsia) {
+  if (crashpad_is_posix) {
+    if (!crashpad_is_fuchsia) {
       sources += [
         "posix/process_info_test.cc",
         "posix/signals_test.cc",
@@ -415,7 +469,7 @@
     sources += [ "posix/scoped_mmap_test.cc" ]
   }
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     sources += [
       "mac/launchd_test.mm",
       "mac/mac_util_test.mm",
@@ -439,7 +493,22 @@
     ]
   }
 
-  if (is_win) {
+  if (crashpad_is_linux) {
+    sources += [
+      "linux/auxiliary_vector_test.cc",
+      "linux/memory_map_test.cc",
+      "linux/proc_stat_reader_test.cc",
+      "linux/ptrace_broker_test.cc",
+      "linux/ptracer_test.cc",
+      "linux/scoped_ptrace_attach_test.cc",
+
+      # TODO: Port to all platforms.
+      "process/process_memory_range_test.cc",
+      "process/process_memory_test.cc",
+    ]
+  }
+
+  if (crashpad_is_win) {
     sources += [
       "win/capture_context_test.cc",
       "win/command_line_test.cc",
@@ -466,17 +535,17 @@
     "../client",
     "../compat",
     "../test",
+    "../third_party/gtest:gmock",
+    "../third_party/gtest:gtest",
+    "../third_party/mini_chromium:base",
     "../third_party/zlib",
-    "//base",
-    "//testing/gmock",
-    "//testing/gtest",
   ]
 
-  if (is_mac) {
+  if (crashpad_is_mac) {
     libs = [ "Foundation.framework" ]
   }
 
-  if (is_win) {
+  if (crashpad_is_win) {
     libs = [ "rpcrt4.lib" ]
     data_deps = [
       ":crashpad_util_test_process_info_test_child",
@@ -485,7 +554,7 @@
   }
 }
 
-if (is_win) {
+if (crashpad_is_win) {
   executable("crashpad_util_test_process_info_test_child") {
     testonly = true
     sources = [
diff --git a/third_party/crashpad/crashpad/util/linux/exception_handler_client.cc b/third_party/crashpad/crashpad/util/linux/exception_handler_client.cc
new file mode 100644
index 0000000..65f6809
--- /dev/null
+++ b/third_party/crashpad/crashpad/util/linux/exception_handler_client.cc
@@ -0,0 +1,163 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "util/linux/exception_handler_client.h"
+
+#include <errno.h>
+#include <sys/prctl.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "base/logging.h"
+#include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
+#include "util/file/file_io.h"
+#include "util/linux/ptrace_broker.h"
+#include "util/posix/signals.h"
+
+namespace crashpad {
+
+ExceptionHandlerClient::ExceptionHandlerClient(int sock)
+    : server_sock_(sock), ptracer_(-1), can_set_ptracer_(true) {}
+
+ExceptionHandlerClient::~ExceptionHandlerClient() = default;
+
+int ExceptionHandlerClient::RequestCrashDump(const ClientInformation& info) {
+  int status = SendCrashDumpRequest(info);
+  if (status != 0) {
+    return status;
+  }
+  return WaitForCrashDumpComplete();
+}
+
+int ExceptionHandlerClient::SetPtracer(pid_t pid) {
+  if (ptracer_ == pid) {
+    return 0;
+  }
+
+  if (!can_set_ptracer_) {
+    return EPERM;
+  }
+
+  if (prctl(PR_SET_PTRACER, pid, 0, 0, 0) == 0) {
+    return 0;
+  }
+  return errno;
+}
+
+void ExceptionHandlerClient::SetCanSetPtracer(bool can_set_ptracer) {
+  can_set_ptracer_ = can_set_ptracer;
+}
+
+int ExceptionHandlerClient::SendCrashDumpRequest(
+    const ClientInformation& info) {
+  ClientToServerMessage message;
+  message.type = ClientToServerMessage::kCrashDumpRequest;
+  message.client_info = info;
+
+  iovec iov;
+  iov.iov_base = &message;
+  iov.iov_len = sizeof(message);
+
+  msghdr msg;
+  msg.msg_name = nullptr;
+  msg.msg_namelen = 0;
+  msg.msg_iov = &iov;
+  msg.msg_iovlen = 1;
+
+  ucred creds;
+  creds.pid = getpid();
+  creds.uid = geteuid();
+  creds.gid = getegid();
+
+  char cmsg_buf[CMSG_SPACE(sizeof(creds))];
+  msg.msg_control = cmsg_buf;
+  msg.msg_controllen = sizeof(cmsg_buf);
+
+  cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+  cmsg->cmsg_level = SOL_SOCKET;
+  cmsg->cmsg_type = SCM_CREDENTIALS;
+  cmsg->cmsg_len = CMSG_LEN(sizeof(creds));
+  *reinterpret_cast<ucred*>(CMSG_DATA(cmsg)) = creds;
+
+  if (sendmsg(server_sock_, &msg, MSG_NOSIGNAL) < 0) {
+    PLOG(ERROR) << "sendmsg";
+    return errno;
+  }
+
+  return 0;
+}
+
+int ExceptionHandlerClient::WaitForCrashDumpComplete() {
+  ServerToClientMessage message;
+
+  // If the server hangs up, ReadFileExactly will return false without setting
+  // errno.
+  errno = 0;
+  while (ReadFileExactly(server_sock_, &message, sizeof(message))) {
+    switch (message.type) {
+      case ServerToClientMessage::kTypeForkBroker: {
+        Signals::InstallDefaultHandler(SIGCHLD);
+
+        pid_t pid = fork();
+        if (pid < 0) {
+          Errno error = errno;
+          if (!WriteFile(server_sock_, &error, sizeof(error))) {
+            return errno;
+          }
+          continue;
+        }
+
+        if (pid == 0) {
+#if defined(ARCH_CPU_64_BITS)
+          constexpr bool am_64_bit = true;
+#else
+          constexpr bool am_64_bit = false;
+#endif  // ARCH_CPU_64_BITS
+
+          PtraceBroker broker(server_sock_, am_64_bit);
+          _exit(broker.Run());
+        }
+
+        int status = 0;
+        pid_t child = HANDLE_EINTR(waitpid(pid, &status, 0));
+        DCHECK_EQ(child, pid);
+
+        if (child == pid && status != 0) {
+          return status;
+        }
+        continue;
+      }
+
+      case ServerToClientMessage::kTypeSetPtracer: {
+        Errno result = SetPtracer(message.pid);
+        if (!WriteFile(server_sock_, &result, sizeof(result))) {
+          return errno;
+        }
+        continue;
+      }
+
+      case ServerToClientMessage::kTypeCrashDumpComplete:
+      case ServerToClientMessage::kTypeCrashDumpFailed:
+        return 0;
+    }
+
+    DCHECK(false);
+  }
+
+  return errno;
+}
+
+}  // namespace crashpad
diff --git a/third_party/crashpad/crashpad/util/linux/exception_handler_client.h b/third_party/crashpad/crashpad/util/linux/exception_handler_client.h
new file mode 100644
index 0000000..a60b065
--- /dev/null
+++ b/third_party/crashpad/crashpad/util/linux/exception_handler_client.h
@@ -0,0 +1,68 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_CLIENT_H_
+#define CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_CLIENT_H_
+
+#include <sys/types.h>
+
+#include "base/macros.h"
+#include "util/linux/exception_handler_protocol.h"
+
+namespace crashpad {
+
+//! A client for an ExceptionHandlerServer
+class ExceptionHandlerClient {
+ public:
+  //! \brief Constructs this object.
+  //!
+  //! \param[in] sock A socket connected to an ExceptionHandlerServer.
+  explicit ExceptionHandlerClient(int sock);
+
+  ~ExceptionHandlerClient();
+
+  //! \brief Request a crash dump from the ExceptionHandlerServer.
+  //!
+  //! This method blocks until the crash dump is complete.
+  //!
+  //! \param[in] info Information about this client.
+  //! \return 0 on success or an error code on failure.
+  int RequestCrashDump(const ClientInformation& info);
+
+  //! \brief Uses `prctl(PR_SET_PTRACER, ...)` to set the process with
+  //!     process ID \a pid as the ptracer for this process.
+  //!
+  //! \param[in] pid The process ID of the process to be set as this process'
+  //!     ptracer.
+  //! \return 0 on success or an error code on failure.
+  int SetPtracer(pid_t pid);
+
+  //! \brief Enables or disables SetPtracer().
+  //! \param[in] can_set_ptracer Whether SetPtracer should be enabled.
+  void SetCanSetPtracer(bool can_set_ptracer);
+
+ private:
+  int SendCrashDumpRequest(const ClientInformation& info);
+  int WaitForCrashDumpComplete();
+
+  int server_sock_;
+  pid_t ptracer_;
+  bool can_set_ptracer_;
+
+  DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerClient);
+};
+
+}  // namespace crashpad
+
+#endif  // CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_CLIENT_H_
diff --git a/third_party/crashpad/crashpad/util/linux/exception_handler_protocol.h b/third_party/crashpad/crashpad/util/linux/exception_handler_protocol.h
new file mode 100644
index 0000000..3f71abf7
--- /dev/null
+++ b/third_party/crashpad/crashpad/util/linux/exception_handler_protocol.h
@@ -0,0 +1,86 @@
+// Copyright 2017 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_PROTOCOL_H_
+#define CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_PROTOCOL_H_
+
+#include <errno.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "util/file/file_io.h"
+#include "util/misc/address_types.h"
+
+namespace crashpad {
+
+#pragma pack(push, 1)
+
+//! \brief The type used for error reporting.
+using Errno = int32_t;
+static_assert(sizeof(Errno) >= sizeof(errno), "Errno type is too small");
+
+//! \brief A boolean status suitable for communication between processes.
+enum Bool : char { kBoolFalse, kBoolTrue };
+
+//! \brief Information about a client registered with an ExceptionHandlerServer.
+struct ClientInformation {
+  //! \brief The address in the client's address space of an
+  //!     ExceptionInformation struct.
+  VMAddress exception_information_address;
+};
+
+//! \brief The message passed from client to server.
+struct ClientToServerMessage {
+  static constexpr int32_t kVersion = 1;
+
+  //! \brief Indicates what message version is being used.
+  int32_t version = kVersion;
+
+  enum Type : uint32_t {
+    //! \brief Used to request a crash dump for the sending client.
+    kCrashDumpRequest
+  } type;
+
+  union {
+    //! \brief Valid for type == kCrashDumpRequest
+    ClientInformation client_info;
+  };
+};
+
+//! \brief The message passed from server to client.
+struct ServerToClientMessage {
+  enum Type : uint32_t {
+    //! \brief Indicates that the client should fork a PtraceBroker process.
+    kTypeForkBroker,
+
+    //! \brief Inidicates that the client should set allow the handler to trace
+    //!     it using PR_SET_PTRACER.
+    kTypeSetPtracer,
+
+    //! \brief Indicates that the handler has completed a requested crash dump.
+    kTypeCrashDumpComplete,
+
+    //! \brief Indicicates that the handler was unable to produce a crash dump.
+    kTypeCrashDumpFailed
+  } type;
+
+  //! \brief The handler's process ID. Valid for kTypeSetPtracer.
+  pid_t pid;
+};
+
+#pragma pack(pop)
+
+}  // namespace crashpad
+
+#endif  // CRASHPAD_UTIL_LINUX_EXCEPTION_HANDLER_PROTOCOL_H_
diff --git a/third_party/crashpad/crashpad/util/linux/ptrace_broker.h b/third_party/crashpad/crashpad/util/linux/ptrace_broker.h
index d725cb7..96cbee5 100644
--- a/third_party/crashpad/crashpad/util/linux/ptrace_broker.h
+++ b/third_party/crashpad/crashpad/util/linux/ptrace_broker.h
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 
 #include "base/macros.h"
+#include "util/linux/exception_handler_protocol.h"
 #include "util/linux/ptrace_connection.h"
 #include "util/linux/ptracer.h"
 #include "util/linux/scoped_ptrace_attach.h"
@@ -87,13 +88,6 @@
     } iov;
   };
 
-  //! \brief The type used for error reporting.
-  using Errno = int32_t;
-  static_assert(sizeof(Errno) >= sizeof(errno), "Errno type is too small");
-
-  //! \brief A boolean status suitable for communication between processes.
-  enum Bool : char { kBoolFalse, kBoolTrue };
-
   //! \brief The response sent for a Request with type kTypeGetThreadInfo.
   struct GetThreadInfoResponse {
     //! \brief Information about the specified thread. Only valid if #success
diff --git a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
index dabda12..3cdfcbe2 100644
--- a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
+++ b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
@@ -27,7 +27,7 @@
 namespace {
 
 bool ReceiveAndLogError(int sock, const std::string& operation) {
-  PtraceBroker::Errno error;
+  Errno error;
   if (!LoggingReadFileExactly(sock, &error, sizeof(error))) {
     return false;
   }
@@ -44,13 +44,14 @@
     return false;
   }
 
-  PtraceBroker::Bool success;
+  Bool success;
   if (!LoggingReadFileExactly(sock, &success, sizeof(success))) {
     return false;
   }
 
-  if (success != PtraceBroker::kBoolTrue) {
+  if (success != kBoolTrue) {
     ReceiveAndLogError(sock, "PtraceBroker Attach");
+    return false;
   }
 
   return true;
@@ -90,11 +91,11 @@
     return false;
   }
 
-  PtraceBroker::Bool is_64_bit;
+  Bool is_64_bit;
   if (!LoggingReadFileExactly(sock_, &is_64_bit, sizeof(is_64_bit))) {
     return false;
   }
-  is_64_bit_ = is_64_bit == PtraceBroker::kBoolTrue;
+  is_64_bit_ = is_64_bit == kBoolTrue;
 
   INITIALIZATION_STATE_SET_VALID(initialized_);
   return true;
@@ -130,7 +131,7 @@
     return false;
   }
 
-  if (response.success == PtraceBroker::kBoolTrue) {
+  if (response.success == kBoolTrue) {
     *info = response.info;
     return true;
   }
diff --git a/third_party/crashpad/crashpad/util/linux/scoped_ptrace_attach_test.cc b/third_party/crashpad/crashpad/util/linux/scoped_ptrace_attach_test.cc
index 99072e4c..78552e77 100644
--- a/third_party/crashpad/crashpad/util/linux/scoped_ptrace_attach_test.cc
+++ b/third_party/crashpad/crashpad/util/linux/scoped_ptrace_attach_test.cc
@@ -15,12 +15,12 @@
 #include "util/linux/scoped_ptrace_attach.h"
 
 #include <errno.h>
-#include <sys/prctl.h>
 #include <sys/ptrace.h>
 #include <unistd.h>
 
 #include "gtest/gtest.h"
 #include "test/errors.h"
+#include "test/linux/scoped_pr_set_ptracer.h"
 #include "test/multiprocess.h"
 #include "util/file/file_io.h"
 
@@ -28,39 +28,13 @@
 namespace test {
 namespace {
 
-class ScopedPrSetPtracer {
- public:
-  explicit ScopedPrSetPtracer(pid_t pid) {
-    // PR_SET_PTRACER is only supported if the Yama Linux security module (LSM)
-    // is enabled. Otherwise, this prctl() call fails with EINVAL. See
-    // linux-4.9.20/security/yama/yama_lsm.c yama_task_prctl() and
-    // linux-4.9.20/kernel/sys.c [sys_]prctl().
-    //
-    // If Yama is not enabled, the default ptrace restrictions should be
-    // sufficient for these tests.
-    //
-    // If Yama is enabled, then /proc/sys/kernel/yama/ptrace_scope must be 0
-    // (YAMA_SCOPE_DISABLED, in which case this prctl() is not necessary) or 1
-    // (YAMA_SCOPE_RELATIONAL) for these tests to succeed. If it is 2
-    // (YAMA_SCOPE_CAPABILITY) then the test requires CAP_SYS_PTRACE, and if it
-    // is 3 (YAMA_SCOPE_NO_ATTACH), these tests will fail.
-    success_ = prctl(PR_SET_PTRACER, pid, 0, 0, 0) == 0;
-    if (!success_) {
-      EXPECT_EQ(errno, EINVAL) << ErrnoMessage("prctl");
-    }
-  }
-
-  ~ScopedPrSetPtracer() {
-    if (success_) {
-      EXPECT_EQ(prctl(PR_SET_PTRACER, 0, 0, 0, 0), 0) << ErrnoMessage("prctl");
-    }
-  }
-
- private:
-  bool success_;
-
-  DISALLOW_COPY_AND_ASSIGN(ScopedPrSetPtracer);
-};
+// If Yama is not enabled, the default ptrace restrictions should be
+// sufficient for these tests.
+//
+// If Yama is enabled, then /proc/sys/kernel/yama/ptrace_scope must be 0
+// (YAMA_SCOPE_DISABLED) or 1 (YAMA_SCOPE_RELATIONAL) for these tests to
+// succeed. If it is 2 (YAMA_SCOPE_CAPABILITY) then the test requires
+// CAP_SYS_PTRACE, and if it is 3 (YAMA_SCOPE_NO_ATTACH), these tests will fail.
 
 class AttachTest : public Multiprocess {
  public:
diff --git a/third_party/crashpad/crashpad/util/posix/signals.cc b/third_party/crashpad/crashpad/util/posix/signals.cc
index d79d53ab..63764ab 100644
--- a/third_party/crashpad/crashpad/util/posix/signals.cc
+++ b/third_party/crashpad/crashpad/util/posix/signals.cc
@@ -139,6 +139,15 @@
 }
 
 // static
+bool Signals::InstallDefaultHandler(int sig) {
+  struct sigaction action;
+  sigemptyset(&action.sa_mask);
+  action.sa_flags = 0;
+  action.sa_handler = SIG_DFL;
+  return sigaction(sig, &action, nullptr) == 0;
+}
+
+// static
 bool Signals::InstallCrashHandlers(Handler handler,
                                    int flags,
                                    OldActions* old_actions) {
diff --git a/third_party/crashpad/crashpad/util/posix/signals.h b/third_party/crashpad/crashpad/util/posix/signals.h
index 36d33cd..ade093bfa 100644
--- a/third_party/crashpad/crashpad/util/posix/signals.h
+++ b/third_party/crashpad/crashpad/util/posix/signals.h
@@ -85,6 +85,14 @@
                              int flags,
                              struct sigaction* old_action);
 
+  //! \brief Installs `SIG_DFL` for the signal \a sig.
+  //!
+  //! \param[in] sig The signal to set the default action for.
+  //!
+  //! \return `true` on success, `false` on failure with errno set. No message
+  //!     is logged.
+  static bool InstallDefaultHandler(int sig);
+
   //! \brief Installs a new signal handler for all signals associated with
   //!     crashes.
   //!
diff --git a/third_party/crashpad/crashpad/util/util.gyp b/third_party/crashpad/crashpad/util/util.gyp
index a7bed77..43b6e32 100644
--- a/third_party/crashpad/crashpad/util/util.gyp
+++ b/third_party/crashpad/crashpad/util/util.gyp
@@ -58,6 +58,10 @@
         'linux/checked_address_range.h',
         'linux/direct_ptrace_connection.cc',
         'linux/direct_ptrace_connection.h',
+        'linux/exception_handler_client.cc',
+        'linux/exception_handler_client.h',
+        'linux/exception_handler_protocol.h',
+        'linux/exception_information.h',
         'linux/memory_map.cc',
         'linux/memory_map.h',
         'linux/proc_stat_reader.cc',
@@ -69,7 +73,6 @@
         'linux/ptrace_connection.h',
         'linux/ptracer.cc',
         'linux/ptracer.h',
-        'linux/exception_information.h',
         'linux/scoped_ptrace_attach.cc',
         'linux/scoped_ptrace_attach.h',
         'linux/thread_info.cc',
diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.h b/third_party/crashpad/crashpad/util/win/exception_handler_server.h
index 69f760d..994cdba 100644
--- a/third_party/crashpad/crashpad/util/win/exception_handler_server.h
+++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.h
@@ -38,8 +38,6 @@
  public:
   class Delegate {
    public:
-    virtual ~Delegate();
-
     //! \brief Called when the server has created the named pipe connection
     //!     points and is ready to service requests.
     virtual void ExceptionHandlerServerStarted() = 0;
@@ -60,6 +58,9 @@
         HANDLE process,
         WinVMAddress exception_information_address,
         WinVMAddress debug_critical_section_address) = 0;
+
+   protected:
+    ~Delegate();
   };
 
   //! \brief Constructs the exception handling server.
diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server_test.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server_test.cc
index 6f880516..ce31677 100644
--- a/third_party/crashpad/crashpad/util/win/exception_handler_server_test.cc
+++ b/third_party/crashpad/crashpad/util/win/exception_handler_server_test.cc
@@ -56,7 +56,7 @@
 class TestDelegate : public ExceptionHandlerServer::Delegate {
  public:
   explicit TestDelegate(HANDLE server_ready) : server_ready_(server_ready) {}
-  ~TestDelegate() override {}
+  ~TestDelegate() {}
 
   void ExceptionHandlerServerStarted() override {
     SetEvent(server_ready_);
diff --git a/third_party/errorprone/BUILD.gn b/third_party/errorprone/BUILD.gn
index 3b7ee58..a32c57ca 100644
--- a/third_party/errorprone/BUILD.gn
+++ b/third_party/errorprone/BUILD.gn
@@ -6,7 +6,7 @@
 
 if (current_toolchain == default_toolchain) {
   java_library("errorprone_java") {
-    jar_path = "lib/error_prone_ant-2.1.2.jar"
+    jar_path = "lib/error_prone_ant-2.1.3.jar"
   }
 
   java_binary("errorprone") {
@@ -14,6 +14,6 @@
       ":errorprone_java",
     ]
     main_class = "com.google.errorprone.ErrorProneCompiler"
-    bootclasspath = "$root_build_dir/lib.java/third_party/errorprone/error_prone_ant-2.1.2.jar"
+    bootclasspath = "$root_build_dir/lib.java/third_party/errorprone/error_prone_ant-2.1.3.jar"
   }
 }
diff --git a/third_party/errorprone/README.chromium b/third_party/errorprone/README.chromium
index 640f5e2a..5e5abb3 100644
--- a/third_party/errorprone/README.chromium
+++ b/third_party/errorprone/README.chromium
@@ -1,8 +1,8 @@
 Name: Error Prone
 Short Name: errorprone
 URL: http://errorprone.info/
-Version: 2.1.2
-Date: November 9, 2017
+Version: 2.1.3
+Date: December 11, 2017
 License: Apache 2.0
 License File: NOT_SHIPPED
 Security Critical: no
diff --git a/third_party/harfbuzz-ng/NEWS b/third_party/harfbuzz-ng/NEWS
index 0599596..793e14a 100644
--- a/third_party/harfbuzz-ng/NEWS
+++ b/third_party/harfbuzz-ng/NEWS
@@ -1,3 +1,13 @@
+Overview of changes leading to 1.7.3
+Monday, December 18, 2017
+====================================
+
+- hb_set_t performance tuning and optimizations.
+- Speed up collect_glyphs() and reject garbage data.
+- In hb_coretext_font_create() set font point-size (ptem).
+- Misc fixes.
+
+
 Overview of changes leading to 1.7.2
 Monday, December 4, 2017
 ====================================
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium
index fe5f63c..6e72b1c 100644
--- a/third_party/harfbuzz-ng/README.chromium
+++ b/third_party/harfbuzz-ng/README.chromium
@@ -1,8 +1,8 @@
 Name: harfbuzz-ng
 Short Name: harfbuzz-ng
 URL: http://harfbuzz.org
-Version: 1.7.2
-Date: 20171204
+Version: 1.7.3
+Date: 20171220
 Security Critical: yes
 License: MIT
 License File: COPYING
@@ -19,8 +19,5 @@
 harfbuzz.gyp accordingly, update the NEWS file from HarfBuzz' release notes, and
 bump the version numbers in README.chromium.
 
-Locally patch hb-private.hh to silence unusued variable warnings in MSVC.
-
-Locally patch PAGE_BITS to 8192 in hb-set-private to see whether larger page
-sizes help avoid the set performance regressions we are observing in issue
-782220.
+Cherry-pick 2fe5f885..a9432bde on top of 1.7.3 to incorporate hb_set
+regression fixes.
diff --git a/third_party/harfbuzz-ng/src/hb-blob.cc b/third_party/harfbuzz-ng/src/hb-blob.cc
index ceeb18d..59c8333 100644
--- a/third_party/harfbuzz-ng/src/hb-blob.cc
+++ b/third_party/harfbuzz-ng/src/hb-blob.cc
@@ -29,8 +29,8 @@
 #define _POSIX_C_SOURCE 199309L
 #endif
 
-#include "hb-debug.hh"
 #include "hb-private.hh"
+#include "hb-debug.hh"
 
 #include "hb-object-private.hh"
 
diff --git a/third_party/harfbuzz-ng/src/hb-buffer-deserialize-json.hh b/third_party/harfbuzz-ng/src/hb-buffer-deserialize-json.hh
index 125a4192..3f626bd 100644
--- a/third_party/harfbuzz-ng/src/hb-buffer-deserialize-json.hh
+++ b/third_party/harfbuzz-ng/src/hb-buffer-deserialize-json.hh
@@ -448,7 +448,7 @@
   const char *p = buf, *pe = buf + buf_len;
 
   /* Ensure we have positions. */
-  (void) hb_buffer_get_glyph_positions (buffer, nullptr);
+  (void) hb_buffer_get_glyph_positions (buffer, NULL);
 
   while (p < pe && ISSPACE (*p))
     p++;
@@ -457,7 +457,7 @@
     *end_ptr = ++p;
   }
 
-  const char *tok = nullptr;
+  const char *tok = NULL;
   int cs;
   hb_glyph_info_t info = {0};
   hb_glyph_position_t pos = {0};
diff --git a/third_party/harfbuzz-ng/src/hb-buffer-deserialize-text.hh b/third_party/harfbuzz-ng/src/hb-buffer-deserialize-text.hh
index 426b137..d2d8daa 100644
--- a/third_party/harfbuzz-ng/src/hb-buffer-deserialize-text.hh
+++ b/third_party/harfbuzz-ng/src/hb-buffer-deserialize-text.hh
@@ -325,7 +325,7 @@
   const char *p = buf, *pe = buf + buf_len;
 
   /* Ensure we have positions. */
-  (void) hb_buffer_get_glyph_positions (buffer, nullptr);
+  (void) hb_buffer_get_glyph_positions (buffer, NULL);
 
   while (p < pe && ISSPACE (*p))
     p++;
@@ -334,7 +334,7 @@
     *end_ptr = ++p;
   }
 
-  const char *eof = pe, *tok = nullptr;
+  const char *eof = pe, *tok = NULL;
   int cs;
   hb_glyph_info_t info = {0};
   hb_glyph_position_t pos = {0};
diff --git a/third_party/harfbuzz-ng/src/hb-buffer.cc b/third_party/harfbuzz-ng/src/hb-buffer.cc
index ef70002..7ead43b 100644
--- a/third_party/harfbuzz-ng/src/hb-buffer.cc
+++ b/third_party/harfbuzz-ng/src/hb-buffer.cc
@@ -554,7 +554,7 @@
   unsigned int cluster = info[start].cluster;
 
   for (unsigned int i = start + 1; i < end; i++)
-    cluster = MIN<unsigned int>(cluster, info[i].cluster);
+    cluster = MIN<unsigned int> (cluster, info[i].cluster);
 
   /* Extend end */
   while (end < len && info[end - 1].cluster == info[end].cluster)
@@ -585,7 +585,7 @@
   unsigned int cluster = out_info[start].cluster;
 
   for (unsigned int i = start + 1; i < end; i++)
-    cluster = MIN<unsigned int>(cluster, out_info[i].cluster);
+    cluster = MIN<unsigned int> (cluster, out_info[i].cluster);
 
   /* Extend start */
   while (start && out_info[start - 1].cluster == out_info[start].cluster)
@@ -742,23 +742,23 @@
 hb_buffer_get_empty (void)
 {
   static const hb_buffer_t _hb_buffer_nil = {
-      HB_OBJECT_HEADER_STATIC,
+    HB_OBJECT_HEADER_STATIC,
 
-      const_cast<hb_unicode_funcs_t*>(&_hb_unicode_funcs_nil),
-      HB_BUFFER_FLAG_DEFAULT,
-      HB_BUFFER_CLUSTER_LEVEL_DEFAULT,
-      HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT,
-      HB_BUFFER_SCRATCH_FLAG_DEFAULT,
-      HB_BUFFER_MAX_LEN_DEFAULT,
-      HB_BUFFER_MAX_OPS_DEFAULT,
+    const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil),
+    HB_BUFFER_FLAG_DEFAULT,
+    HB_BUFFER_CLUSTER_LEVEL_DEFAULT,
+    HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT,
+    HB_BUFFER_SCRATCH_FLAG_DEFAULT,
+    HB_BUFFER_MAX_LEN_DEFAULT,
+    HB_BUFFER_MAX_OPS_DEFAULT,
 
-      HB_BUFFER_CONTENT_TYPE_INVALID,
-      HB_SEGMENT_PROPERTIES_DEFAULT,
-      true, /* in_error */
-      true, /* have_output */
-      true  /* have_positions */
+    HB_BUFFER_CONTENT_TYPE_INVALID,
+    HB_SEGMENT_PROPERTIES_DEFAULT,
+    true, /* in_error */
+    true, /* have_output */
+    true  /* have_positions */
 
-      /* Zero is good enough for everything else. */
+    /* Zero is good enough for everything else. */
   };
 
   return const_cast<hb_buffer_t *> (&_hb_buffer_nil);
diff --git a/third_party/harfbuzz-ng/src/hb-common.cc b/third_party/harfbuzz-ng/src/hb-common.cc
index c8e3d60..cb1fb43 100644
--- a/third_party/harfbuzz-ng/src/hb-common.cc
+++ b/third_party/harfbuzz-ng/src/hb-common.cc
@@ -85,7 +85,7 @@
   for (; i < 4; i++)
     tag[i] = ' ';
 
-  return HB_TAG(tag[0], tag[1], tag[2], tag[3]);
+  return HB_TAG (tag[0], tag[1], tag[2], tag[3]);
 }
 
 /**
@@ -700,14 +700,14 @@
 #if defined (HAVE_NEWLOCALE) && defined (HAVE_STRTOD_L)
 #define USE_XLOCALE 1
 #define HB_LOCALE_T locale_t
-#define HB_CREATE_LOCALE(locName) newlocale(LC_ALL_MASK, locName, nullptr)
-#define HB_FREE_LOCALE(loc) freelocale(loc)
+#define HB_CREATE_LOCALE(locName) newlocale (LC_ALL_MASK, locName, nullptr)
+#define HB_FREE_LOCALE(loc) freelocale (loc)
 #elif defined(_MSC_VER)
 #define USE_XLOCALE 1
 #define HB_LOCALE_T _locale_t
-#define HB_CREATE_LOCALE(locName) _create_locale(LC_ALL, locName)
-#define HB_FREE_LOCALE(loc) _free_locale(loc)
-#define strtod_l(a, b, c) _strtod_l((a), (b), (c))
+#define HB_CREATE_LOCALE(locName) _create_locale (LC_ALL, locName)
+#define HB_FREE_LOCALE(loc) _free_locale (loc)
+#define strtod_l(a, b, c) _strtod_l ((a), (b), (c))
 #endif
 
 #ifdef USE_XLOCALE
@@ -719,21 +719,23 @@
 free_C_locale (void)
 {
   if (C_locale)
-    HB_FREE_LOCALE(C_locale);
+    HB_FREE_LOCALE (C_locale);
 }
 #endif
 
-static HB_LOCALE_T get_C_locale(void) {
+static HB_LOCALE_T
+get_C_locale (void)
+{
 retry:
-  HB_LOCALE_T C = (HB_LOCALE_T)hb_atomic_ptr_get(&C_locale);
+  HB_LOCALE_T C = (HB_LOCALE_T) hb_atomic_ptr_get (&C_locale);
 
   if (unlikely (!C))
   {
-    C = HB_CREATE_LOCALE("C");
+    C = HB_CREATE_LOCALE ("C");
 
     if (!hb_atomic_ptr_cmpexch (&C_locale, nullptr, C))
     {
-      HB_FREE_LOCALE(C_locale);
+      HB_FREE_LOCALE (C_locale);
       goto retry;
     }
 
@@ -782,9 +784,9 @@
     (*pp)++;
 
   /* CSS allows on/off as aliases 1/0. */
-  if (*pp - p == 2 || 0 == strncmp (p, "on", 2))
+  if (*pp - p == 2 && 0 == strncmp (p, "on", 2))
     *pv = 1;
-  else if (*pp - p == 3 || 0 == strncmp (p, "off", 2))
+  else if (*pp - p == 3 && 0 == strncmp (p, "off", 3))
     *pv = 0;
   else
     return false;
diff --git a/third_party/harfbuzz-ng/src/hb-coretext.cc b/third_party/harfbuzz-ng/src/hb-coretext.cc
index 62b79da..4402017 100644
--- a/third_party/harfbuzz-ng/src/hb-coretext.cc
+++ b/third_party/harfbuzz-ng/src/hb-coretext.cc
@@ -28,8 +28,8 @@
 
 #define HB_SHAPER coretext
 
-#include "hb-debug.hh"
 #include "hb-private.hh"
+#include "hb-debug.hh"
 #include "hb-shaper-impl-private.hh"
 
 #include "hb-coretext.h"
@@ -39,7 +39,7 @@
 #define HB_CORETEXT_DEFAULT_FONT_SIZE 12.f
 
 static CGFloat
-coretext_font_size (float ptem)
+coretext_font_size_from_ptem (float ptem)
 {
   /* CoreText points are CSS pixels (96 per inch),
    * NOT typographic points (72 per inch).
@@ -49,6 +49,12 @@
   ptem *= 96.f / 72.f;
   return ptem <= 0.f ? HB_CORETEXT_DEFAULT_FONT_SIZE : ptem;
 }
+static float
+coretext_font_size_to_ptem (CGFloat size)
+{
+  size *= 72.f / 96.f;
+  return size <= 0.f ? 0 : size;
+}
 
 static void
 release_table_data (void *user_data)
@@ -84,7 +90,7 @@
 
 HB_SHAPER_DATA_ENSURE_DEFINE(coretext, face)
 HB_SHAPER_DATA_ENSURE_DEFINE_WITH_CONDITION(coretext, font,
-	fabs (CTFontGetSize((CTFontRef) data) - coretext_font_size (font->ptem)) <= .5
+	fabs (CTFontGetSize((CTFontRef) data) - coretext_font_size_from_ptem (font->ptem)) <= .5
 )
 
 static CTFontDescriptorRef
@@ -258,9 +264,10 @@
   CFRelease ((CGFontRef) data);
 }
 
-hb_face_t* hb_coretext_face_create(CGFontRef cg_font) {
-  return hb_face_create_for_tables(reference_table, CGFontRetain(cg_font),
-                                   _hb_cg_font_release);
+hb_face_t *
+hb_coretext_face_create (CGFontRef cg_font)
+{
+  return hb_face_create_for_tables (reference_table, CGFontRetain (cg_font), _hb_cg_font_release);
 }
 
 /*
@@ -281,7 +288,7 @@
   if (unlikely (!hb_coretext_shaper_face_data_ensure (face))) return nullptr;
   CGFontRef cg_font = (CGFontRef) HB_SHAPER_DATA_GET (face);
 
-  CTFontRef ct_font = create_ct_font (cg_font, coretext_font_size (font->ptem));
+  CTFontRef ct_font = create_ct_font (cg_font, coretext_font_size_from_ptem (font->ptem));
 
   if (unlikely (!ct_font))
   {
@@ -301,28 +308,35 @@
 /*
  * Since: 1.7.2
  */
-hb_font_t* hb_coretext_font_create(CTFontRef ct_font) {
-  CGFontRef cg_font = CTFontCopyGraphicsFont(ct_font, 0);
-  hb_face_t* face = hb_coretext_face_create(cg_font);
-  CFRelease(cg_font);
-  hb_font_t* font = hb_font_create(face);
-  hb_face_destroy(face);
+hb_font_t *
+hb_coretext_font_create (CTFontRef ct_font)
+{
+  CGFontRef cg_font = CTFontCopyGraphicsFont (ct_font, 0);
+  hb_face_t *face = hb_coretext_face_create (cg_font);
+  CFRelease (cg_font);
+  hb_font_t *font = hb_font_create (face);
+  hb_face_destroy (face);
 
-  if (unlikely(hb_object_is_inert(font)))
+  if (unlikely (hb_object_is_inert (font)))
     return font;
 
+  hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font)));
+
   /* Let there be dragons here... */
-  HB_SHAPER_DATA_GET(font) = (hb_coretext_shaper_font_data_t*)CFRetain(ct_font);
+  HB_SHAPER_DATA_GET (font) = (hb_coretext_shaper_font_data_t *) CFRetain (ct_font);
 
   return font;
 }
 
-CTFontRef hb_coretext_font_get_ct_font(hb_font_t* font) {
-  if (unlikely(!hb_coretext_shaper_font_data_ensure(font)))
-    return nullptr;
-  return (CTFontRef)HB_SHAPER_DATA_GET(font);
+CTFontRef
+hb_coretext_font_get_ct_font (hb_font_t *font)
+{
+  if (unlikely (!hb_coretext_shaper_font_data_ensure (font))) return nullptr;
+  return (CTFontRef) HB_SHAPER_DATA_GET (font);
 }
 
+
+
 /*
  * shaper shape_plan data
  */
@@ -358,9 +372,9 @@
   feature_record_t rec;
   unsigned int order;
 
-  static int cmp(const void* pa, const void* pb) {
-    const active_feature_t* a = (const active_feature_t*)pa;
-    const active_feature_t* b = (const active_feature_t*)pb;
+  static int cmp (const void *pa, const void *pb) {
+    const active_feature_t *a = (const active_feature_t *) pa;
+    const active_feature_t *b = (const active_feature_t *) pb;
     return a->rec.feature < b->rec.feature ? -1 : a->rec.feature > b->rec.feature ? 1 :
 	   a->order < b->order ? -1 : a->order > b->order ? 1 :
 	   a->rec.setting < b->rec.setting ? -1 : a->rec.setting > b->rec.setting ? 1 :
@@ -376,9 +390,9 @@
   bool start;
   active_feature_t feature;
 
-  static int cmp(const void* pa, const void* pb) {
-    const feature_event_t* a = (const feature_event_t*)pa;
-    const feature_event_t* b = (const feature_event_t*)pb;
+  static int cmp (const void *pa, const void *pb) {
+    const feature_event_t *a = (const feature_event_t *) pa;
+    const feature_event_t *b = (const feature_event_t *) pb;
     return a->index < b->index ? -1 : a->index > b->index ? 1 :
 	   a->start < b->start ? -1 : a->start > b->start ? 1 :
 	   active_feature_t::cmp (&a->feature, &b->feature);
@@ -989,34 +1003,32 @@
       CTFontRef run_ct_font = static_cast<CTFontRef>(CFDictionaryGetValue (attributes, kCTFontAttributeName));
       if (!CFEqual (run_ct_font, ct_font))
       {
-        /* The run doesn't use our main font instance.  We have to figure out
-         * whether font fallback happened, or this is just CoreText giving us
-         * another CTFont using the same underlying CGFont.  CoreText seems
-         * to do that in a variety of situations, one of which being vertical
-         * text, but also perhaps for caching reasons.
-         *
-         * First, see if it uses any of our subfonts created to set font
-         * features...
-         *
-         * Next, compare the CGFont to the one we used to create our fonts.
-         * Even this doesn't work all the time.
-         *
-         * Finally, we compare PS names, which I don't think are unique...
-         *
-         * Looks like if we really want to be sure here we have to modify the
-         * font to change the name table, similar to what we do in the uniscribe
-         * backend.
-         *
-         * However, even that wouldn't work if we were passed in the CGFont to
-         * construct a hb_face to begin with.
-         *
-         * See: http://github.com/harfbuzz/harfbuzz/pull/36
-         *
-         * Also see:
-         * https://bugs.chromium.org/p/chromium/issues/detail?id=597098
-         */
-        bool matched = false;
-        for (unsigned int i = 0; i < range_records.len; i++)
+	/* The run doesn't use our main font instance.  We have to figure out
+	 * whether font fallback happened, or this is just CoreText giving us
+	 * another CTFont using the same underlying CGFont.  CoreText seems
+	 * to do that in a variety of situations, one of which being vertical
+	 * text, but also perhaps for caching reasons.
+	 *
+	 * First, see if it uses any of our subfonts created to set font features...
+	 *
+	 * Next, compare the CGFont to the one we used to create our fonts.
+	 * Even this doesn't work all the time.
+	 *
+	 * Finally, we compare PS names, which I don't think are unique...
+	 *
+	 * Looks like if we really want to be sure here we have to modify the
+	 * font to change the name table, similar to what we do in the uniscribe
+	 * backend.
+	 *
+	 * However, even that wouldn't work if we were passed in the CGFont to
+	 * construct a hb_face to begin with.
+	 *
+	 * See: http://github.com/harfbuzz/harfbuzz/pull/36
+	 *
+	 * Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=597098
+	 */
+	bool matched = false;
+	for (unsigned int i = 0; i < range_records.len; i++)
 	  if (range_records[i].font && CFEqual (run_ct_font, range_records[i].font))
 	  {
 	    matched = true;
@@ -1273,7 +1285,7 @@
     }
   }
 
-  buffer->unsafe_to_break_all();
+  buffer->unsafe_to_break_all ();
 
 #undef FAIL
 
diff --git a/third_party/harfbuzz-ng/src/hb-coretext.h b/third_party/harfbuzz-ng/src/hb-coretext.h
index 67eeccbc..4b0a6f01 100644
--- a/third_party/harfbuzz-ng/src/hb-coretext.h
+++ b/third_party/harfbuzz-ng/src/hb-coretext.h
@@ -48,7 +48,9 @@
 HB_EXTERN hb_face_t *
 hb_coretext_face_create (CGFontRef cg_font);
 
-HB_EXTERN hb_font_t* hb_coretext_font_create(CTFontRef ct_font);
+HB_EXTERN hb_font_t *
+hb_coretext_font_create (CTFontRef ct_font);
+
 
 HB_EXTERN CGFontRef
 hb_coretext_face_get_cg_font (hb_face_t *face);
diff --git a/third_party/harfbuzz-ng/src/hb-debug.hh b/third_party/harfbuzz-ng/src/hb-debug.hh
index 20dead65..6c425f7 100644
--- a/third_party/harfbuzz-ng/src/hb-debug.hh
+++ b/third_party/harfbuzz-ng/src/hb-debug.hh
@@ -93,7 +93,7 @@
   fprintf (stderr, "%-10s", what ? what : "");
 
   if (obj)
-    fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
+    fprintf (stderr, "(%*p) ", (unsigned int) (2 * sizeof (void *)), obj);
   else
     fprintf (stderr, " %*s  ", (unsigned int) (2 * sizeof (void *)), "");
 
@@ -220,8 +220,8 @@
 {}
 
 template <int max_level, typename ret_t>
-struct hb_auto_trace_t {
-
+struct hb_auto_trace_t
+{
   explicit inline hb_auto_trace_t (unsigned int *plevel_,
 				   const char *what_,
 				   const void *obj_,
@@ -269,7 +269,17 @@
   bool returned;
 };
 template <typename ret_t> /* Make sure we don't use hb_auto_trace_t when not tracing. */
-struct hb_auto_trace_t<0, ret_t>;
+struct hb_auto_trace_t<0, ret_t>
+{
+  explicit inline hb_auto_trace_t (unsigned int *plevel_,
+				   const char *what_,
+				   const void *obj_,
+				   const char *func,
+				   const char *message,
+				   ...) HB_PRINTF_FUNC(6, 7) {}
+
+  inline ret_t ret (ret_t v, unsigned int line HB_UNUSED = 0) { return v; }
+};
 
 /* For disabled tracing; optimize out everything.
  * https://github.com/harfbuzz/harfbuzz/pull/605 */
diff --git a/third_party/harfbuzz-ng/src/hb-ft.cc b/third_party/harfbuzz-ng/src/hb-ft.cc
index 16a4a840..4f33e11 100644
--- a/third_party/harfbuzz-ng/src/hb-ft.cc
+++ b/third_party/harfbuzz-ng/src/hb-ft.cc
@@ -27,8 +27,8 @@
  * Google Author(s): Behdad Esfahbod
  */
 
-#include "hb-debug.hh"
 #include "hb-private.hh"
+#include "hb-debug.hh"
 
 #include "hb-ft.h"
 
@@ -747,6 +747,7 @@
     FT_Set_Transform (ft_face, &matrix, nullptr);
   }
 
+#ifdef HAVE_FT_SET_VAR_BLEND_COORDINATES
   unsigned int num_coords;
   const int *coords = hb_font_get_var_coords_normalized (font, &num_coords);
   if (num_coords)
@@ -760,6 +761,7 @@
       free (ft_coords);
     }
   }
+#endif
 
   ft_face->generic.data = blob;
   ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
diff --git a/third_party/harfbuzz-ng/src/hb-glib.cc b/third_party/harfbuzz-ng/src/hb-glib.cc
index aca8df7..50c30e9c 100644
--- a/third_party/harfbuzz-ng/src/hb-glib.cc
+++ b/third_party/harfbuzz-ng/src/hb-glib.cc
@@ -364,11 +364,13 @@
   return utf8_decomposed_len;
 }
 
-static hb_unicode_funcs_t* static_glib_funcs = nullptr;
+static hb_unicode_funcs_t *static_glib_funcs = nullptr;
 
 #ifdef HB_USE_ATEXIT
-static void free_static_glib_funcs(void) {
-  hb_unicode_funcs_destroy(static_glib_funcs);
+static
+void free_static_glib_funcs (void)
+{
+  hb_unicode_funcs_destroy (static_glib_funcs);
 }
 #endif
 
@@ -376,32 +378,30 @@
 hb_glib_get_unicode_funcs (void)
 {
 retry:
-  hb_unicode_funcs_t* funcs =
-      (hb_unicode_funcs_t*)hb_atomic_ptr_get(&static_glib_funcs);
+  hb_unicode_funcs_t *funcs = (hb_unicode_funcs_t *) hb_atomic_ptr_get (&static_glib_funcs);
 
-  if (unlikely(!funcs)) {
-    funcs = hb_unicode_funcs_create(nullptr);
+  if (unlikely (!funcs))
+  {
+    funcs = hb_unicode_funcs_create (nullptr);
 
-#define HB_UNICODE_FUNC_IMPLEMENT(name)                                      \
-  hb_unicode_funcs_set_##name##_func(funcs, hb_glib_unicode_##name, nullptr, \
-                                     nullptr);
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#define HB_UNICODE_FUNC_IMPLEMENT(name) \
+    hb_unicode_funcs_set_##name##_func (funcs, hb_glib_unicode_##name, nullptr, nullptr);
+      HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_UNICODE_FUNC_IMPLEMENT
 
-    hb_unicode_funcs_make_immutable(funcs);
+    hb_unicode_funcs_make_immutable (funcs);
 
-    if (!hb_atomic_ptr_cmpexch(&static_glib_funcs, nullptr, funcs)) {
-      hb_unicode_funcs_destroy(funcs);
+    if (!hb_atomic_ptr_cmpexch (&static_glib_funcs, nullptr, funcs)) {
+      hb_unicode_funcs_destroy (funcs);
       goto retry;
     }
 
 #ifdef HB_USE_ATEXIT
-    atexit(
-        free_static_glib_funcs); /* First person registers atexit() callback. */
+    atexit (free_static_glib_funcs); /* First person registers atexit() callback. */
 #endif
   };
 
-  return hb_unicode_funcs_reference(funcs);
+  return hb_unicode_funcs_reference (funcs);
 }
 
 #if GLIB_CHECK_VERSION(2,31,10)
diff --git a/third_party/harfbuzz-ng/src/hb-graphite2.cc b/third_party/harfbuzz-ng/src/hb-graphite2.cc
index 3e4a523..62aaae9 100644
--- a/third_party/harfbuzz-ng/src/hb-graphite2.cc
+++ b/third_party/harfbuzz-ng/src/hb-graphite2.cc
@@ -306,7 +306,8 @@
   {
     curradv = gr_slot_origin_X(gr_seg_first_slot(seg));
     clusters[0].advance = gr_seg_advance_X(seg) - curradv;
-  } else
+  }
+  else
     clusters[0].advance = 0;
   for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
   {
@@ -332,7 +333,8 @@
       c->num_glyphs = 0;
       if (HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
         c->advance = curradv - gr_slot_origin_X(is);
-      else {
+      else
+      {
         c->advance = 0;
         clusters[ci].advance += gr_slot_origin_X(is) - curradv;
       }
@@ -414,7 +416,7 @@
   if (feats) gr_featureval_destroy (feats);
   gr_seg_destroy (seg);
 
-  buffer->unsafe_to_break_all();
+  buffer->unsafe_to_break_all ();
 
   return true;
 }
diff --git a/third_party/harfbuzz-ng/src/hb-icu.cc b/third_party/harfbuzz-ng/src/hb-icu.cc
index 6c54a61..552eaec 100644
--- a/third_party/harfbuzz-ng/src/hb-icu.cc
+++ b/third_party/harfbuzz-ng/src/hb-icu.cc
@@ -344,11 +344,14 @@
   return utf32_len;
 }
 
-static hb_unicode_funcs_t* static_icu_funcs = nullptr;
+
+static hb_unicode_funcs_t *static_icu_funcs = nullptr;
 
 #ifdef HB_USE_ATEXIT
-static void free_static_icu_funcs(void) {
-  hb_unicode_funcs_destroy(static_icu_funcs);
+static
+void free_static_icu_funcs (void)
+{
+  hb_unicode_funcs_destroy (static_icu_funcs);
 }
 #endif
 
@@ -356,39 +359,36 @@
 hb_icu_get_unicode_funcs (void)
 {
 retry:
-  hb_unicode_funcs_t* funcs =
-      (hb_unicode_funcs_t*)hb_atomic_ptr_get(&static_icu_funcs);
+  hb_unicode_funcs_t *funcs = (hb_unicode_funcs_t *) hb_atomic_ptr_get (&static_icu_funcs);
 
-  if (unlikely(!funcs)) {
+  if (unlikely (!funcs))
+  {
 #if U_ICU_VERSION_MAJOR_NUM >= 49
-    if (!hb_atomic_ptr_get(&normalizer)) {
+    if (!hb_atomic_ptr_get (&normalizer)) {
       UErrorCode icu_err = U_ZERO_ERROR;
       /* We ignore failure in getNFCInstace(). */
-      (void)hb_atomic_ptr_cmpexch(&normalizer, nullptr,
-                                  unorm2_getNFCInstance(&icu_err));
+      (void) hb_atomic_ptr_cmpexch (&normalizer, nullptr, unorm2_getNFCInstance (&icu_err));
     }
 #endif
 
-    funcs = hb_unicode_funcs_create(nullptr);
+    funcs = hb_unicode_funcs_create (nullptr);
 
-#define HB_UNICODE_FUNC_IMPLEMENT(name)                                     \
-  hb_unicode_funcs_set_##name##_func(funcs, hb_icu_unicode_##name, nullptr, \
-                                     nullptr);
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#define HB_UNICODE_FUNC_IMPLEMENT(name) \
+    hb_unicode_funcs_set_##name##_func (funcs, hb_icu_unicode_##name, nullptr, nullptr);
+      HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_UNICODE_FUNC_IMPLEMENT
 
-    hb_unicode_funcs_make_immutable(funcs);
+    hb_unicode_funcs_make_immutable (funcs);
 
-    if (!hb_atomic_ptr_cmpexch(&static_icu_funcs, nullptr, funcs)) {
-      hb_unicode_funcs_destroy(funcs);
+    if (!hb_atomic_ptr_cmpexch (&static_icu_funcs, nullptr, funcs)) {
+      hb_unicode_funcs_destroy (funcs);
       goto retry;
     }
 
 #ifdef HB_USE_ATEXIT
-    atexit(
-        free_static_icu_funcs); /* First person registers atexit() callback. */
+    atexit (free_static_icu_funcs); /* First person registers atexit() callback. */
 #endif
   };
 
-  return hb_unicode_funcs_reference(funcs);
+  return hb_unicode_funcs_reference (funcs);
 }
diff --git a/third_party/harfbuzz-ng/src/hb-ot-font.cc b/third_party/harfbuzz-ng/src/hb-ot-font.cc
index c818a07..9864064b1 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-font.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-font.cc
@@ -30,13 +30,14 @@
 
 #include "hb-font-private.hh"
 
-#include "hb-ot-cbdt-table.hh"
 #include "hb-ot-cmap-table.hh"
+#include "hb-ot-cbdt-table.hh"
 #include "hb-ot-glyf-table.hh"
 #include "hb-ot-hmtx-table.hh"
 #include "hb-ot-kern-table.hh"
 #include "hb-ot-post-table.hh"
 
+
 struct hb_ot_font_t
 {
   OT::cmap::accelerator_t cmap;
@@ -58,14 +59,12 @@
     return nullptr;
 
   ot_font->cmap.init (face);
-  ot_font->h_metrics.init(face);
-  ot_font->v_metrics.init(
-      face, ot_font->h_metrics.ascender -
-                ot_font->h_metrics.descender); /* TODO Can we do this lazily? */
+  ot_font->h_metrics.init (face);
+  ot_font->v_metrics.init (face, ot_font->h_metrics.ascender - ot_font->h_metrics.descender); /* TODO Can we do this lazily? */
   ot_font->glyf.init (face);
   ot_font->cbdt.init (face);
   ot_font->post.init (face);
-  ot_font->kern.init(face);
+  ot_font->kern.init (face);
 
   return ot_font;
 }
@@ -81,7 +80,7 @@
   ot_font->glyf.fini ();
   ot_font->cbdt.fini ();
   ot_font->post.fini ();
-  ot_font->kern.fini();
+  ot_font->kern.fini ();
 
   free (ot_font);
 }
@@ -131,14 +130,15 @@
   return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph, font));
 }
 
-static hb_position_t hb_ot_get_glyph_h_kerning(hb_font_t* font,
-                                               void* font_data,
-                                               hb_codepoint_t left_glyph,
-                                               hb_codepoint_t right_glyph,
-                                               void* user_data HB_UNUSED) {
-  const hb_ot_font_t* ot_font = (const hb_ot_font_t*)font_data;
-  return font->em_scale_x(
-      ot_font->kern->get_h_kerning(left_glyph, right_glyph));
+static hb_position_t
+hb_ot_get_glyph_h_kerning (hb_font_t *font,
+			   void *font_data,
+			   hb_codepoint_t left_glyph,
+			   hb_codepoint_t right_glyph,
+			   void *user_data HB_UNUSED)
+{
+  const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
+  return font->em_scale_x (ot_font->kern->get_h_kerning (left_glyph, right_glyph));
 }
 
 static hb_bool_t
@@ -238,12 +238,10 @@
     hb_font_funcs_set_glyph_v_advance_func (funcs, hb_ot_get_glyph_v_advance, nullptr, nullptr);
     //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ot_get_glyph_h_origin, nullptr, nullptr);
     //hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ot_get_glyph_v_origin, nullptr, nullptr);
-    hb_font_funcs_set_glyph_h_kerning_func(funcs, hb_ot_get_glyph_h_kerning,
-                                           nullptr, nullptr);
+    hb_font_funcs_set_glyph_h_kerning_func (funcs, hb_ot_get_glyph_h_kerning, nullptr, nullptr);
     //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_ot_get_glyph_v_kerning, nullptr, nullptr);
     hb_font_funcs_set_glyph_extents_func (funcs, hb_ot_get_glyph_extents, nullptr, nullptr);
-    // hb_font_funcs_set_glyph_contour_point_func (funcs,
-    // hb_ot_get_glyph_contour_point, nullptr, nullptr);
+    //hb_font_funcs_set_glyph_contour_point_func (funcs, hb_ot_get_glyph_contour_point, nullptr, nullptr);
     hb_font_funcs_set_glyph_name_func (funcs, hb_ot_get_glyph_name, nullptr, nullptr);
     hb_font_funcs_set_glyph_from_name_func (funcs, hb_ot_get_glyph_from_name, nullptr, nullptr);
 
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh
index 86a74ccb..5e699e1 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh
@@ -155,8 +155,8 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
-    glyphs->add_range (start, end);
+  inline bool add_coverage (set_t *glyphs) const {
+    return glyphs->add_range (start, end);
   }
 
   GlyphID	start;		/* First GlyphID in the range */
@@ -715,10 +715,8 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
-    unsigned int count = glyphArray.len;
-    for (unsigned int i = 0; i < count; i++)
-      glyphs->add (glyphArray[i]);
+  inline bool add_coverage (set_t *glyphs) const {
+    return glyphs->add_sorted_array (glyphArray.array, glyphArray.len);
   }
 
   public:
@@ -817,10 +815,12 @@
   }
 
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
+  inline bool add_coverage (set_t *glyphs) const {
     unsigned int count = rangeRecord.len;
     for (unsigned int i = 0; i < count; i++)
-      rangeRecord[i].add_coverage (glyphs);
+      if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+        return false;
+    return true;
   }
 
   public:
@@ -927,12 +927,14 @@
     }
   }
 
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
   template <typename set_t>
-  inline void add_coverage (set_t *glyphs) const {
+  inline bool add_coverage (set_t *glyphs) const {
     switch (u.format) {
-    case 1: u.format1.add_coverage (glyphs); break;
-    case 2: u.format2.add_coverage (glyphs); break;
-    default:                                 break;
+    case 1: return u.format1.add_coverage (glyphs);
+    case 2: return u.format2.add_coverage (glyphs);
+    default:return false;
     }
   }
 
@@ -1018,11 +1020,36 @@
   }
 
   template <typename set_t>
-  inline void add_class (set_t *glyphs, unsigned int klass) const {
+  inline bool add_coverage (set_t *glyphs) const {
+    unsigned int start = 0;
     unsigned int count = classValue.len;
     for (unsigned int i = 0; i < count; i++)
+    {
+      if (classValue[i])
+        continue;
+
+      if (start != i)
+	if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + i)))
+	  return false;
+
+      start = i + 1;
+    }
+    if (start != count)
+      if (unlikely (!glyphs->add_range (startGlyph + start, startGlyph + count)))
+	return false;
+
+    return true;
+  }
+
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    unsigned int count = classValue.len;
+    for (unsigned int i = 0; i < count; i++)
+    {
       if (classValue[i] == klass)
         glyphs->add (startGlyph + i);
+    }
+    return true;
   }
 
   inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
@@ -1075,11 +1102,25 @@
   }
 
   template <typename set_t>
-  inline void add_class (set_t *glyphs, unsigned int klass) const {
+  inline bool add_coverage (set_t *glyphs) const {
     unsigned int count = rangeRecord.len;
     for (unsigned int i = 0; i < count; i++)
+      if (rangeRecord[i].value)
+	if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+	  return false;
+    return true;
+  }
+
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    unsigned int count = rangeRecord.len;
+    for (unsigned int i = 0; i < count; i++)
+    {
       if (rangeRecord[i].value == klass)
-        rangeRecord[i].add_coverage (glyphs);
+        if (unlikely (!rangeRecord[i].add_coverage (glyphs)))
+	  return false;
+    }
+    return true;
   }
 
   inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
@@ -1137,11 +1178,25 @@
     }
   }
 
-  inline void add_class (hb_set_t *glyphs, unsigned int klass) const {
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename set_t>
+  inline bool add_coverage (set_t *glyphs) const {
     switch (u.format) {
-    case 1: u.format1.add_class (glyphs, klass); return;
-    case 2: u.format2.add_class (glyphs, klass); return;
-    default:return;
+    case 1: return u.format1.add_coverage (glyphs);
+    case 2: return u.format2.add_coverage (glyphs);
+    default:return false;
+    }
+  }
+
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename set_t>
+  inline bool add_class (set_t *glyphs, unsigned int klass) const {
+    switch (u.format) {
+    case 1: return u.format1.add_class (glyphs, klass);
+    case 2: return u.format2.add_class (glyphs, klass);
+    default:return false;
     }
   }
 
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh
index 3dcf2ec9..b344d79 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh
+++ b/third_party/harfbuzz-ng/src/hb-ot-layout-gpos-table.hh
@@ -462,7 +462,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -510,7 +510,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -607,12 +607,7 @@
     unsigned int record_size = UINT16::static_size * (1 + len1 + len2);
 
     const PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
-    unsigned int count = len;
-    for (unsigned int i = 0; i < count; i++)
-    {
-      c->input->add (record->secondGlyph);
-      record = &StructAtOffset<PairValueRecord> (record, record_size);
-    }
+    c->input->add_array (&record->secondGlyph, len, record_size);
   }
 
   inline bool apply (hb_apply_context_t *c,
@@ -689,7 +684,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     unsigned int count = pairSet.len;
     for (unsigned int i = 0; i < count; i++)
       (this+pairSet[i]).collect_glyphs (c, valueFormat);
@@ -755,17 +750,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
-
-    unsigned int count1 = class1Count;
-    const ClassDef &klass1 = this+classDef1;
-    for (unsigned int i = 0; i < count1; i++)
-      klass1.add_class (c->input, i);
-
-    unsigned int count2 = class2Count;
-    const ClassDef &klass2 = this+classDef2;
-    for (unsigned int i = 0; i < count2; i++)
-      klass2.add_class (c->input, i);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+classDef2).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -906,7 +892,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1064,8 +1050,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+markCoverage).add_coverage (c->input);
-    (this+baseCoverage).add_coverage (c->input);
+    if (unlikely (!(this+markCoverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+baseCoverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1167,8 +1153,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+markCoverage).add_coverage (c->input);
-    (this+ligatureCoverage).add_coverage (c->input);
+    if (unlikely (!(this+markCoverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+ligatureCoverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
@@ -1280,8 +1266,8 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+mark1Coverage).add_coverage (c->input);
-    (this+mark2Coverage).add_coverage (c->input);
+    if (unlikely (!(this+mark1Coverage).add_coverage (c->input))) return;
+    if (unlikely (!(this+mark2Coverage).add_coverage (c->input))) return;
   }
 
   inline const Coverage &get_coverage (void) const
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh b/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
index 28e0790..0b09c4e 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
+++ b/third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh
@@ -54,13 +54,13 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     for (iter.init (this+coverage); iter.more (); iter.next ())
     {
       /* TODO Switch to range-based API to work around malicious fonts.
        * https://github.com/harfbuzz/harfbuzz/issues/363 */
       hb_codepoint_t glyph_id = iter.get_glyph ();
-      c->input->add (glyph_id);
       c->output->add ((glyph_id + deltaGlyphID) & 0xFFFFu);
     }
   }
@@ -139,13 +139,13 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = substitute.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       c->output->add (substitute[iter.get_coverage ()]);
     }
   }
@@ -269,9 +269,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    unsigned int count = substitute.len;
-    for (unsigned int i = 0; i < count; i++)
-      c->output->add (substitute[i]);
+    c->output->add_array (substitute.array, substitute.len);
   }
 
   inline bool apply (hb_apply_context_t *c) const
@@ -348,7 +346,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage).add_coverage (c->input);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     unsigned int count = sequence.len;
     for (unsigned int i = 0; i < count; i++)
 	(this+sequence[i]).collect_glyphs (c);
@@ -474,17 +472,15 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = alternateSet.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
-      unsigned int count = alt_set.len;
-      for (unsigned int i = 0; i < count; i++)
-	c->output->add (alt_set[i]);
+      c->output->add_array (alt_set.array, alt_set.len);
     }
   }
 
@@ -615,9 +611,7 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    unsigned int count = component.len;
-    for (unsigned int i = 1; i < count; i++)
-      c->input->add (component[i]);
+    c->input->add_array (component.array, component.len ? component.len - 1 : 0);
     c->output->add (ligGlyph);
   }
 
@@ -801,13 +795,13 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
     Coverage::Iter iter;
     unsigned int count = ligatureSet.len;
     for (iter.init (this+coverage); iter.more (); iter.next ())
     {
       if (unlikely (iter.get_coverage () >= count))
         break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
-      c->input->add (iter.get_glyph ());
       (this+ligatureSet[iter.get_coverage ()]).collect_glyphs (c);
     }
   }
@@ -970,25 +964,22 @@
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
+    if (unlikely (!(this+coverage).add_coverage (c->input))) return;
 
     unsigned int count;
 
-    (this+coverage).add_coverage (c->input);
-
     count = backtrack.len;
     for (unsigned int i = 0; i < count; i++)
-      (this+backtrack[i]).add_coverage (c->before);
+      if (unlikely (!(this+backtrack[i]).add_coverage (c->before))) return;
 
+    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
     count = lookahead.len;
     for (unsigned int i = 0; i < count; i++)
-      (this+lookahead[i]).add_coverage (c->after);
+      if (unlikely (!(this+lookahead[i]).add_coverage (c->after))) return;
 
     const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
     count = substitute.len;
-    for (unsigned int i = 0; i < count; i++)
-      c->output->add (substitute[i]);
+    c->output->add_array (substitute.array, substitute.len);
   }
 
   inline const Coverage &get_coverage (void) const
diff --git a/third_party/harfbuzz-ng/src/hb-ot-layout.cc b/third_party/harfbuzz-ng/src/hb-ot-layout.cc
index e1109d8..8845889 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-layout.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-layout.cc
@@ -32,14 +32,16 @@
 #include "hb-ot-layout-private.hh"
 
 #include "hb-ot-layout-gdef-table.hh"
-#include "hb-ot-layout-gpos-table.hh"
 #include "hb-ot-layout-gsub-table.hh"
-#include "hb-ot-layout-jstf-table.hh"  // Just so we compile it; unused otherwise.
-#include "hb-ot-name-table.hh"  // Just so we compile it; unused otherwise.
+#include "hb-ot-layout-gpos-table.hh"
+#include "hb-ot-layout-jstf-table.hh" // Just so we compile it; unused otherwise.
+#include "hb-ot-name-table.hh" // Just so we compile it; unused otherwise.
 
 #include "hb-ot-map-private.hh"
 
-const void* const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof(void*)] = {};
+
+const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+
 
 hb_ot_layout_t *
 _hb_ot_layout_create (hb_face_t *face)
@@ -599,8 +601,7 @@
 hb_ot_layout_table_get_lookup_count (hb_face_t    *face,
 				     hb_tag_t      table_tag)
 {
-  if (unlikely(!hb_ot_shaper_face_data_ensure(face)))
-    return 0;
+  if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return 0;
   switch (table_tag)
   {
     case HB_OT_TAG_GSUB:
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh
index b7638b7..d98cde1 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic-fallback.hh
@@ -77,7 +77,7 @@
 
   /* Bubble-sort or something equally good!
    * May not be good-enough for presidential candidate interviews, but good-enough for us... */
-  hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]);
+  hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]);
 
   OT::Supplier<OT::GlyphID> glyphs_supplier      (glyphs, num_glyphs);
   OT::Supplier<OT::GlyphID> substitutes_supplier (substitutes, num_glyphs);
@@ -126,7 +126,7 @@
     first_glyphs_indirection[num_first_glyphs] = first_glyph_idx;
     num_first_glyphs++;
   }
-  hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]);
+  hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]);
 
   /* Now that the first-glyphs are sorted, walk again, populate ligatures. */
   for (unsigned int i = 0; i < num_first_glyphs; i++)
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
index a18c9a1..eb9d36f 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-arabic.cc
@@ -24,10 +24,11 @@
  * Google Author(s): Behdad Esfahbod
  */
 
+#include "hb-private.hh"
 #include "hb-debug.hh"
 #include "hb-ot-shape-complex-arabic-private.hh"
 #include "hb-ot-shape-private.hh"
-#include "hb-private.hh"
+
 
 /* buffer var allocations */
 #define arabic_shaping_action() complex_var_u8_0() /* arabic shaping action */
@@ -35,8 +36,7 @@
 #define HB_BUFFER_SCRATCH_FLAG_ARABIC_HAS_STCH HB_BUFFER_SCRATCH_FLAG_COMPLEX0
 
 /* See:
- * https://github.com/harfbuzz/harfbuzz/commit/6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d#commitcomment-14248516
- */
+ * https://github.com/harfbuzz/harfbuzz/commit/6e6f82b6f3dde0fc6c3c7d991d9ec6cfff57823d#commitcomment-14248516 */
 #define HB_ARABIC_GENERAL_CATEGORY_IS_WORD(gen_cat) \
 	(FLAG_UNSAFE (gen_cat) & \
 	 (FLAG (HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED) | \
@@ -560,9 +560,9 @@
       }
       else
       {
-        buffer->unsafe_to_break(context, end);
-        hb_position_t x_offset = 0;
-        for (unsigned int k = end; k > start; k--)
+	buffer->unsafe_to_break (context, end);
+	hb_position_t x_offset = 0;
+	for (unsigned int k = end; k > start; k--)
 	{
 	  hb_position_t width = font->get_glyph_h_advance (info[k - 1].codepoint);
 
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc
index 9c7c359..97d6d382 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc
@@ -215,19 +215,15 @@
     pos = POS_BELOW_C;
   }
 
-  /* According to ScriptExtensions.txt, these Grantha marks may also be used in
-   * Tamil, so the Indic shaper needs to know their categories. */
-  else if (unlikely(u == 0x11301u || u == 0x11303u))
-    cat = OT_SM;
+  /* According to ScriptExtensions.txt, these Grantha marks may also be used in Tamil,
+   * so the Indic shaper needs to know their categories. */
+  else if (unlikely (u == 0x11301u || u == 0x11303u)) cat = OT_SM;
   else if (unlikely (u == 0x1133cu)) cat = OT_N;
 
-  else if (unlikely(u == 0x0AFBu))
-    cat = OT_N; /* https://github.com/harfbuzz/harfbuzz/issues/552 */
+  else if (unlikely (u == 0x0AFBu)) cat = OT_N; /* https://github.com/harfbuzz/harfbuzz/issues/552 */
 
-  else if (unlikely(u == 0x0980u))
-    cat = OT_PLACEHOLDER; /* https://github.com/harfbuzz/harfbuzz/issues/538 */
-  else if (unlikely(u == 0x0C80u))
-    cat = OT_PLACEHOLDER; /* https://github.com/harfbuzz/harfbuzz/pull/623 */
+  else if (unlikely (u == 0x0980u)) cat = OT_PLACEHOLDER; /* https://github.com/harfbuzz/harfbuzz/issues/538 */
+  else if (unlikely (u == 0x0C80u)) cat = OT_PLACEHOLDER; /* https://github.com/harfbuzz/harfbuzz/pull/623 */
   else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */
   else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u)))
 				    cat = OT_PLACEHOLDER;
@@ -718,7 +714,7 @@
    * following algorithm: starting from the end of the syllable, move backwards
    * until a consonant is found that does not have a below-base or post-base
    * form (post-base forms have to follow below-base forms), or that is not a
-   * pre-base reordering Ra, or arrive at the first consonant. The consonant
+   * pre-base-reordering Ra, or arrive at the first consonant. The consonant
    * stopped at will be the base.
    *
    *   o If the syllable starts with Ra + Halant (in a script that has Reph)
@@ -789,11 +785,11 @@
 	    if (info[i].indic_position() == POS_BELOW_C)
 	      seen_below = true;
 
-	    /* -> or that is not a pre-base reordering Ra,
+	    /* -> or that is not a pre-base-reordering Ra,
 	     *
 	     * IMPLEMENTATION NOTES:
 	     *
-	     * Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped
+	     * Our pre-base-reordering Ra's are marked POS_POST_C, so will be skipped
 	     * by the logic above already.
 	     */
 
@@ -1128,7 +1124,7 @@
   unsigned int pref_len = 2;
   if (indic_plan->mask_array[PREF] && base + pref_len < end)
   {
-    /* Find a Halant,Ra sequence and mark it for pre-base reordering processing. */
+    /* Find a Halant,Ra sequence and mark it for pre-base-reordering processing. */
     for (unsigned int i = base + 1; i + pref_len - 1 < end; i++) {
       hb_codepoint_t glyphs[2];
       for (unsigned int j = 0; j < pref_len; j++)
@@ -1522,7 +1518,7 @@
 
     /*       3. If reph should be repositioned after the main consonant: find the
      *          first consonant not ligated with main, or find the first
-     *          consonant that is not a potential pre-base reordering Ra.
+     *          consonant that is not a potential pre-base-reordering Ra.
      */
     if (reph_pos == REPH_POS_AFTER_MAIN)
     {
@@ -1611,13 +1607,13 @@
   }
 
 
-  /*   o Reorder pre-base reordering consonants:
+  /*   o Reorder pre-base-reordering consonants:
    *
-   *     If a pre-base reordering consonant is found, reorder it according to
+   *     If a pre-base-reordering consonant is found, reorder it according to
    *     the following rules:
    */
 
-  if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
+  if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base-reordering Ra. */
   {
     for (unsigned int i = base + 1; i < end; i++)
       if ((info[i].mask & indic_plan->mask_array[PREF]) != 0)
@@ -1691,16 +1687,17 @@
 
 
   /* Apply 'init' to the Left Matra if it's a word start. */
-  if (info[start].indic_position() == POS_PRE_M) {
+  if (info[start].indic_position () == POS_PRE_M)
+  {
     if (!start ||
-        !(FLAG_UNSAFE(_hb_glyph_info_get_general_category(&info[start - 1])) &
-          FLAG_RANGE(HB_UNICODE_GENERAL_CATEGORY_FORMAT,
-                     HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
+	!(FLAG_UNSAFE (_hb_glyph_info_get_general_category (&info[start - 1])) &
+	 FLAG_RANGE (HB_UNICODE_GENERAL_CATEGORY_FORMAT, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
       info[start].mask |= indic_plan->mask_array[INIT];
     else
-      buffer->unsafe_to_break(start - 1, start + 1);
+      buffer->unsafe_to_break (start - 1, start + 1);
   }
 
+
   /*
    * Finish off the clusters and go home!
    */
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use-table.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use-table.cc
index bf27a99..fd6978f 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use-table.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-use-table.cc
@@ -57,666 +57,623 @@
 
 static const USE_TABLE_ELEMENT_TYPE use_table[] = {
 
+
 #define use_offset_0x0028u 0
 
-    /* Basic Latin */
-    O, O, O, O, O, GB, O, O,
-    /* 0030 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+
+  /* Basic Latin */
+                                                                         O,     O,     O,     O,     O,    GB,     O,     O,
+  /* 0030 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x00a0u 24
 
-    /* Latin-1 Supplement */
 
-    /* 00A0 */ GB, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 00B0 */ O, O, FM, FM, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 00C0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 00D0 */ O, O, O, O, O, O, O, GB,
+  /* Latin-1 Supplement */
+
+  /* 00A0 */    GB,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 00B0 */     O,     O,    FM,    FM,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 00C0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 00D0 */     O,     O,     O,     O,     O,     O,     O,    GB,
 
 #define use_offset_0x0900u 80
 
-    /* Devanagari */
 
-    /* 0900 */ VMAbv, VMAbv, VMAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0910 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0920 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0930 */ B, B, B, B, B, B, B, B, B, B, VAbv, VPst, CMBlw, B, VPst, VPre,
-    /* 0940 */ VPst, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, VPst, VPst,
-    VPst, VPst, H, VPre, VPst,
-    /* 0950 */ O, VMAbv, VMBlw, O, O, VAbv, VBlw, VBlw, B, B, B, B, B, B, B, B,
-    /* 0960 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0970 */ O, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
+  /* Devanagari */
 
-    /* Bengali */
+  /* 0900 */ VMAbv, VMAbv, VMAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0910 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0920 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0930 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VAbv,  VPst, CMBlw,     B,  VPst,  VPre,
+  /* 0940 */  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv,  VPst,  VPst,  VPst,  VPst,     H,  VPre,  VPst,
+  /* 0950 */     O, VMAbv, VMBlw,     O,     O,  VAbv,  VBlw,  VBlw,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0960 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0970 */     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
 
-    /* 0980 */ O, VMAbv, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, O, B,
-    /* 0990 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 09A0 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 09B0 */ B, O, B, O, O, O, B, B, B, B, O, O, CMBlw, B, VPst, VPre,
-    /* 09C0 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, O, O, VPre, VPre,
-    H, IND, O,
-    /* 09D0 */ O, O, O, O, O, O, O, VPst, O, O, O, O, B, B, O, B,
-    /* 09E0 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 09F0 */ B, B, O, O, O, O, O, O, O, O, O, O, B, O, O, O,
+  /* Bengali */
 
-    /* Gurmukhi */
+  /* 0980 */     O, VMAbv, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     B,
+  /* 0990 */     B,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 09A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 09B0 */     B,     O,     B,     O,     O,     O,     B,     B,     B,     B,     O,     O, CMBlw,     B,  VPst,  VPre,
+  /* 09C0 */  VPst,  VBlw,  VBlw,  VBlw,  VBlw,     O,     O,  VPre,  VPre,     O,     O,  VPre,  VPre,     H,   IND,     O,
+  /* 09D0 */     O,     O,     O,     O,     O,     O,     O,  VPst,     O,     O,     O,     O,     B,     B,     O,     B,
+  /* 09E0 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 09F0 */     B,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     B,     O,     O,     O,
 
-    /* 0A00 */ O, VMAbv, VMAbv, VMPst, O, B, B, B, B, B, B, O, O, O, O, B,
-    /* 0A10 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0A20 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 0A30 */ B, O, B, B, O, B, B, O, B, B, O, O, CMBlw, O, VPst, VPre,
-    /* 0A40 */ VPst, VBlw, VBlw, O, O, O, O, VAbv, VAbv, O, O, VAbv, VAbv, H, O,
-    O,
-    /* 0A50 */ O, O, O, O, O, O, O, O, O, B, B, B, B, O, B, O,
-    /* 0A60 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0A70 */ VMAbv, CMAbv, GB, GB, O, MBlw, O, O, O, O, O, O, O, O, O, O,
+  /* Gurmukhi */
 
-    /* Gujarati */
+  /* 0A00 */     O, VMAbv, VMAbv, VMPst,     O,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     B,
+  /* 0A10 */     B,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0A20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 0A30 */     B,     O,     B,     B,     O,     B,     B,     O,     B,     B,     O,     O, CMBlw,     O,  VPst,  VPre,
+  /* 0A40 */  VPst,  VBlw,  VBlw,     O,     O,     O,     O,  VAbv,  VAbv,     O,     O,  VAbv,  VAbv,     H,     O,     O,
+  /* 0A50 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,     O,     B,     O,
+  /* 0A60 */     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0A70 */ VMAbv, CMAbv,    GB,    GB,     O,  MBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 0A80 */ O, VMAbv, VMAbv, VMPst, O, B, B, B, B, B, B, B, B, B, O, B,
-    /* 0A90 */ B, B, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0AA0 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 0AB0 */ B, O, B, B, O, B, B, B, B, B, O, O, CMBlw, B, VPst, VPre,
-    /* 0AC0 */ VPst, VBlw, VBlw, VBlw, VBlw, VAbv, O, VAbv, VAbv, VAbv, O, VPst,
-    VPst, H, O, O,
-    /* 0AD0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 0AE0 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0AF0 */ O, O, O, O, O, O, O, O, O, B, VMAbv, VMAbv, VMAbv, CMAbv, CMAbv,
-    CMAbv,
+  /* Gujarati */
 
-    /* Oriya */
+  /* 0A80 */     O, VMAbv, VMAbv, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,
+  /* 0A90 */     B,     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0AA0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 0AB0 */     B,     O,     B,     B,     O,     B,     B,     B,     B,     B,     O,     O, CMBlw,     B,  VPst,  VPre,
+  /* 0AC0 */  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,     O,  VAbv,  VAbv,  VAbv,     O,  VPst,  VPst,     H,     O,     O,
+  /* 0AD0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 0AE0 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0AF0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     B, VMAbv, VMAbv, VMAbv, CMAbv, CMAbv, CMAbv,
 
-    /* 0B00 */ O, VMAbv, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, O, B,
-    /* 0B10 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0B20 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 0B30 */ B, O, B, B, O, B, B, B, B, B, O, O, CMBlw, B, VPst, VAbv,
-    /* 0B40 */ VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, O, O, VPre, VPre,
-    H, O, O,
-    /* 0B50 */ O, O, O, O, O, O, VAbv, VAbv, O, O, O, O, B, B, O, B,
-    /* 0B60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0B70 */ O, B, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Oriya */
 
-    /* Tamil */
+  /* 0B00 */     O, VMAbv, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     B,
+  /* 0B10 */     B,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0B20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 0B30 */     B,     O,     B,     B,     O,     B,     B,     B,     B,     B,     O,     O, CMBlw,     B,  VPst,  VAbv,
+  /* 0B40 */  VPst,  VBlw,  VBlw,  VBlw,  VBlw,     O,     O,  VPre,  VPre,     O,     O,  VPre,  VPre,     H,     O,     O,
+  /* 0B50 */     O,     O,     O,     O,     O,     O,  VAbv,  VAbv,     O,     O,     O,     O,     B,     B,     O,     B,
+  /* 0B60 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0B70 */     O,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 0B80 */ O, O, VMAbv, IND, O, B, B, B, B, B, B, O, O, O, B, B,
-    /* 0B90 */ B, O, B, B, B, B, O, O, O, B, B, O, B, O, B, B,
-    /* 0BA0 */ O, O, O, B, B, O, O, O, B, B, B, O, O, O, B, B,
-    /* 0BB0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, VPst, VPst,
-    /* 0BC0 */ VAbv, VPst, VPst, O, O, O, VPre, VPre, VPre, O, VPre, VPre, VPre,
-    H, O, O,
-    /* 0BD0 */ O, O, O, O, O, O, O, VPst, O, O, O, O, O, O, O, O,
-    /* 0BE0 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0BF0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Tamil */
 
-    /* Telugu */
+  /* 0B80 */     O,     O, VMAbv,   IND,     O,     B,     B,     B,     B,     B,     B,     O,     O,     O,     B,     B,
+  /* 0B90 */     B,     O,     B,     B,     B,     B,     O,     O,     O,     B,     B,     O,     B,     O,     B,     B,
+  /* 0BA0 */     O,     O,     O,     B,     B,     O,     O,     O,     B,     B,     B,     O,     O,     O,     B,     B,
+  /* 0BB0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,  VPst,  VPst,
+  /* 0BC0 */  VAbv,  VPst,  VPst,     O,     O,     O,  VPre,  VPre,  VPre,     O,  VPre,  VPre,  VPre,     H,     O,     O,
+  /* 0BD0 */     O,     O,     O,     O,     O,     O,     O,  VPst,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 0BE0 */     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0BF0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 0C00 */ VMAbv, VMPst, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, B, B,
-    /* 0C10 */ B, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0C20 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 0C30 */ B, B, B, B, B, B, B, B, B, B, O, O, O, B, VAbv, VAbv,
-    /* 0C40 */ VAbv, VPst, VPst, VPst, VPst, O, VAbv, VAbv, VAbv, O, VAbv, VAbv,
-    VAbv, H, O, O,
-    /* 0C50 */ O, O, O, O, O, VAbv, VBlw, O, B, B, B, O, O, O, O, O,
-    /* 0C60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0C70 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Telugu */
 
-    /* Kannada */
+  /* 0C00 */ VMAbv, VMPst, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,
+  /* 0C10 */     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0C20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 0C30 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     B,  VAbv,  VAbv,
+  /* 0C40 */  VAbv,  VPst,  VPst,  VPst,  VPst,     O,  VAbv,  VAbv,  VAbv,     O,  VAbv,  VAbv,  VAbv,     H,     O,     O,
+  /* 0C50 */     O,     O,     O,     O,     O,  VAbv,  VBlw,     O,     B,     B,     B,     O,     O,     O,     O,     O,
+  /* 0C60 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0C70 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 0C80 */ O, VMAbv, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, B, B,
-    /* 0C90 */ B, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0CA0 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 0CB0 */ B, B, B, B, O, B, B, B, B, B, O, O, CMBlw, B, VPst, VAbv,
-    /* 0CC0 */ VAbv, VPst, VPst, VPst, VPst, O, VAbv, VAbv, VAbv, O, VAbv, VAbv,
-    VAbv, H, O, O,
-    /* 0CD0 */ O, O, O, O, O, VPst, VPst, O, O, O, O, O, O, O, B, O,
-    /* 0CE0 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0CF0 */ O, CS, CS, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Kannada */
 
-    /* Malayalam */
+  /* 0C80 */     O, VMAbv, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,
+  /* 0C90 */     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0CA0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 0CB0 */     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     O,     O, CMBlw,     B,  VPst,  VAbv,
+  /* 0CC0 */  VAbv,  VPst,  VPst,  VPst,  VPst,     O,  VAbv,  VAbv,  VAbv,     O,  VAbv,  VAbv,  VAbv,     H,     O,     O,
+  /* 0CD0 */     O,     O,     O,     O,     O,  VPst,  VPst,     O,     O,     O,     O,     O,     O,     O,     B,     O,
+  /* 0CE0 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0CF0 */     O,    CS,    CS,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 0D00 */ VMAbv, VMAbv, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, B, B,
-    /* 0D10 */ B, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0D20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0D30 */ B, B, B, B, B, B, B, B, B, B, B, VAbv, VAbv, B, VPst, VPst,
-    /* 0D40 */ VPst, VPst, VPst, VBlw, VBlw, O, VPre, VPre, VPre, O, VPre, VPre,
-    VPre, H, R, O,
-    /* 0D50 */ O, O, O, O, IND, IND, IND, VPst, O, O, O, O, O, O, O, B,
-    /* 0D60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0D70 */ O, O, O, O, O, O, O, O, O, O, IND, IND, IND, IND, IND, IND,
+  /* Malayalam */
 
-    /* Sinhala */
+  /* 0D00 */ VMAbv, VMAbv, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,
+  /* 0D10 */     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0D20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0D30 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VAbv,  VAbv,     B,  VPst,  VPst,
+  /* 0D40 */  VPst,  VPst,  VPst,  VBlw,  VBlw,     O,  VPre,  VPre,  VPre,     O,  VPre,  VPre,  VPre,     H,     R,     O,
+  /* 0D50 */     O,     O,     O,     O,   IND,   IND,   IND,  VPst,     O,     O,     O,     O,     O,     O,     O,     B,
+  /* 0D60 */     B,     B,  VBlw,  VBlw,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0D70 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,   IND,   IND,   IND,   IND,   IND,   IND,
 
-    /* 0D80 */ O, O, VMPst, VMPst, O, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0D90 */ B, B, B, B, B, B, B, O, O, O, B, B, B, B, B, B,
-    /* 0DA0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 0DB0 */ B, B, O, B, B, B, B, B, B, B, B, B, O, B, O, O,
-    /* 0DC0 */ B, B, B, B, B, B, B, O, O, O, H, O, O, O, O, VPst,
-    /* 0DD0 */ VPst, VPst, VAbv, VAbv, VBlw, O, VBlw, O, VPst, VPre, VPre, VPre,
-    VPre, VPre, VPre, VPst,
-    /* 0DE0 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B,
-    /* 0DF0 */ O, O, VPst, VPst, O, O, O, O,
+  /* Sinhala */
+
+  /* 0D80 */     O,     O, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0D90 */     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     B,     B,     B,     B,     B,     B,
+  /* 0DA0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0DB0 */     B,     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     O,     O,
+  /* 0DC0 */     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     H,     O,     O,     O,     O,  VPst,
+  /* 0DD0 */  VPst,  VPst,  VAbv,  VAbv,  VBlw,     O,  VBlw,     O,  VPst,  VPre,  VPre,  VPre,  VPre,  VPre,  VPre,  VPst,
+  /* 0DE0 */     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 0DF0 */     O,     O,  VPst,  VPst,     O,     O,     O,     O,
 
 #define use_offset_0x1000u 1352
 
-    /* Myanmar */
 
-    /* 1000 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1010 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1020 */ B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VAbv, VAbv, VBlw,
-    /* 1030 */ VBlw, VPre, VAbv, VAbv, VAbv, VAbv, VMAbv, VMBlw, VMPst, H, VAbv,
-    MPst, MPre, MBlw, MBlw, B,
-    /* 1040 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, GB, O,
-    /* 1050 */ B, B, B, B, B, B, VPst, VPst, VBlw, VBlw, B, B, B, B, MBlw, MBlw,
-    /* 1060 */ MBlw, B, VPst, VMPst, VMPst, B, B, VPst, VPst, VMPst, VMPst,
-    VMPst, VMPst, VMPst, B, B,
-    /* 1070 */ B, VAbv, VAbv, VAbv, VAbv, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1080 */ B, B, MBlw, VPst, VPre, VAbv, VAbv, VMPst, VMPst, VMPst, VMPst,
-    VMPst, VMPst, VMBlw, B, VMPst,
-    /* 1090 */ B, B, B, B, B, B, B, B, B, B, VMPst, VMPst, VPst, VAbv, O, O,
+  /* Myanmar */
+
+  /* 1000 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1010 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1020 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VPst,  VPst,  VAbv,  VAbv,  VBlw,
+  /* 1030 */  VBlw,  VPre,  VAbv,  VAbv,  VAbv,  VAbv, VMAbv, VMBlw, VMPst,     H,  VAbv,  MPst,  MPre,  MBlw,  MBlw,     B,
+  /* 1040 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,    GB,     O,
+  /* 1050 */     B,     B,     B,     B,     B,     B,  VPst,  VPst,  VBlw,  VBlw,     B,     B,     B,     B,  MBlw,  MBlw,
+  /* 1060 */  MBlw,     B,  VPst, VMPst, VMPst,     B,     B,  VPst,  VPst, VMPst, VMPst, VMPst, VMPst, VMPst,     B,     B,
+  /* 1070 */     B,  VAbv,  VAbv,  VAbv,  VAbv,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1080 */     B,     B,  MBlw,  VPst,  VPre,  VAbv,  VAbv, VMPst, VMPst, VMPst, VMPst, VMPst, VMPst, VMBlw,     B, VMPst,
+  /* 1090 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B, VMPst, VMPst,  VPst,  VAbv,     O,     O,
 
 #define use_offset_0x1700u 1512
 
-    /* Tagalog */
 
-    /* 1700 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, B, B,
-    /* 1710 */ B, B, VAbv, VBlw, VBlw, O, O, O, O, O, O, O, O, O, O, O,
+  /* Tagalog */
 
-    /* Hanunoo */
+  /* 1700 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,
+  /* 1710 */     B,     B,  VAbv,  VBlw,  VBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1720 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1730 */ B, B, VAbv, VBlw, VBlw, O, O, O, O, O, O, O, O, O, O, O,
+  /* Hanunoo */
 
-    /* Buhid */
+  /* 1720 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1730 */     B,     B,  VAbv,  VBlw,  VBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1740 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1750 */ B, B, VAbv, VBlw, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Buhid */
 
-    /* Tagbanwa */
+  /* 1740 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1750 */     B,     B,  VAbv,  VBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1760 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, B, B,
-    /* 1770 */ B, O, VAbv, VBlw, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Tagbanwa */
 
-    /* Khmer */
+  /* 1760 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,
+  /* 1770 */     B,     O,  VAbv,  VBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1780 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1790 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 17A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 17B0 */ B, B, B, B, O, O, VPst, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw, VBlw,
-    VPre, VPre,
-    /* 17C0 */ VPre, VPre, VPre, VPre, VPre, VPre, VMAbv, VMPst, VPst, VMAbv,
-    VMAbv, FM, FAbv, CMAbv, FM, FM,
-    /* 17D0 */ FM, VAbv, H, FM, O, O, O, O, O, O, O, O, B, VAbv, O, O,
-    /* 17E0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Khmer */
+
+  /* 1780 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1790 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 17A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 17B0 */     B,     B,     B,     B,     O,     O,  VPst,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VBlw,  VPre,  VPre,
+  /* 17C0 */  VPre,  VPre,  VPre,  VPre,  VPre,  VPre, VMAbv, VMPst,  VPst, VMAbv, VMAbv,    FM,  FAbv, CMAbv,    FM,    FM,
+  /* 17D0 */    FM,  VAbv,     H,    FM,     O,     O,     O,     O,     O,     O,     O,     O,     B,  VAbv,     O,     O,
+  /* 17E0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x1900u 1752
 
-    /* Limbu */
 
-    /* 1900 */ GB, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1910 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, O,
-    /* 1920 */ VAbv, VAbv, VBlw, VPst, VPst, VAbv, VAbv, VAbv, VAbv, SUB, SUB,
-    SUB, O, O, O, O,
-    /* 1930 */ FPst, FPst, VMBlw, FPst, FPst, FPst, FPst, FPst, FPst, FBlw,
-    VAbv, FM, O, O, O, O,
-    /* 1940 */ O, O, O, O, O, O, B, B, B, B, B, B, B, B, B, B,
+  /* Limbu */
 
-    /* Tai Le */
+  /* 1900 */    GB,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1910 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,
+  /* 1920 */  VAbv,  VAbv,  VBlw,  VPst,  VPst,  VAbv,  VAbv,  VAbv,  VAbv,   SUB,   SUB,   SUB,     O,     O,     O,     O,
+  /* 1930 */  FPst,  FPst, VMBlw,  FPst,  FPst,  FPst,  FPst,  FPst,  FPst,  FBlw,  VAbv,    FM,     O,     O,     O,     O,
+  /* 1940 */     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
 
-    /* 1950 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1960 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, O, O,
-    /* 1970 */ B, B, B, B, B, O, O, O, O, O, O, O, O, O, O, O,
+  /* Tai Le */
 
-    /* New Tai Lue */
+  /* 1950 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1960 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,
+  /* 1970 */     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1980 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1990 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 19A0 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O,
-    /* 19B0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 19C0 */ B, B, B, B, B, B, B, B, VMPst, VMPst, O, O, O, O, O, O,
-    /* 19D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 19E0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 19F0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* New Tai Lue */
 
-    /* Buginese */
+  /* 1980 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1990 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 19A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,
+  /* 19B0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 19C0 */     B,     B,     B,     B,     B,     B,     B,     B, VMPst, VMPst,     O,     O,     O,     O,     O,     O,
+  /* 19D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 19E0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 19F0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1A00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1A10 */ B, B, B, B, B, B, B, VAbv, VBlw, VPre, VPst, VAbv, O, O, O, O,
+  /* Buginese */
 
-    /* Tai Tham */
+  /* 1A00 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1A10 */     B,     B,     B,     B,     B,     B,     B,  VAbv,  VBlw,  VPre,  VPst,  VAbv,     O,     O,     O,     O,
 
-    /* 1A20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1A30 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1A40 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1A50 */ B, B, B, B, B, MPre, MBlw, SUB, FAbv, FAbv, FAbv, SUB, SUB, SUB,
-    SUB, O,
-    /* 1A60 */ H, VPst, VAbv, VPst, VPst, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw,
-    VAbv, VBlw, VPst, VPre, VPre,
-    /* 1A70 */ VPre, VPre, VPre, VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,
-    VAbv, FM, FM, O, O, FBlw,
-    /* 1A80 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 1A90 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Tai Tham */
+
+  /* 1A20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1A30 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1A40 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1A50 */     B,     B,     B,     B,     B,  MPre,  MBlw,   SUB,  FAbv,  FAbv,  FAbv,   SUB,   SUB,   SUB,   SUB,     O,
+  /* 1A60 */     H,  VPst,  VAbv,  VPst,  VPst,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VAbv,  VBlw,  VPst,  VPre,  VPre,
+  /* 1A70 */  VPre,  VPre,  VPre,  VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,  VAbv,    FM,    FM,     O,     O,  FBlw,
+  /* 1A80 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 1A90 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x1b00u 2168
 
-    /* Balinese */
 
-    /* 1B00 */ VMAbv, VMAbv, VMAbv, FAbv, VMPst, B, B, B, B, B, B, B, B, B, B,
-    B,
-    /* 1B10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1B30 */ B, B, B, B, CMAbv, VPst, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw,
-    VAbv, VAbv, VPre, VPre,
-    /* 1B40 */ VPre, VPre, VAbv, VAbv, H, B, B, B, B, B, B, B, O, O, O, O,
-    /* 1B50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 1B60 */ O, O, O, O, O, O, O, O, O, O, O, SMAbv, SMBlw, SMAbv, SMAbv,
-    SMAbv,
-    /* 1B70 */ SMAbv, SMAbv, SMAbv, SMAbv, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Balinese */
 
-    /* Sundanese */
+  /* 1B00 */ VMAbv, VMAbv, VMAbv,  FAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1B10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1B20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1B30 */     B,     B,     B,     B, CMAbv,  VPst,  VAbv,  VAbv,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,  VAbv,  VPre,  VPre,
+  /* 1B40 */  VPre,  VPre,  VAbv,  VAbv,     H,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,
+  /* 1B50 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 1B60 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O, SMAbv, SMBlw, SMAbv, SMAbv, SMAbv,
+  /* 1B70 */ SMAbv, SMAbv, SMAbv, SMAbv,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1B80 */ VMAbv, FAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1B90 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1BA0 */ B, SUB, SUB, SUB, VAbv, VBlw, VPre, VPst, VAbv, VAbv, VPst, H,
-    SUB, SUB, B, B,
-    /* 1BB0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
+  /* Sundanese */
 
-    /* Batak */
+  /* 1B80 */ VMAbv,  FAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1B90 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1BA0 */     B,   SUB,   SUB,   SUB,  VAbv,  VBlw,  VPre,  VPst,  VAbv,  VAbv,  VPst,     H,   SUB,   SUB,     B,     B,
+  /* 1BB0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
 
-    /* 1BC0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1BD0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1BE0 */ B, B, B, B, B, B, CMAbv, VPst, VAbv, VAbv, VPst, VPst, VPst,
-    VAbv, VPst, VAbv,
-    /* 1BF0 */ FAbv, FAbv, VPst, VPst, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Batak */
 
-    /* Lepcha */
+  /* 1BC0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1BD0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1BE0 */     B,     B,     B,     B,     B,     B, CMAbv,  VPst,  VAbv,  VAbv,  VPst,  VPst,  VPst,  VAbv,  VPst,  VAbv,
+  /* 1BF0 */  FAbv,  FAbv,  VPst,  VPst,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 1C00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1C10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 1C20 */ B, B, B, B, SUB, SUB, VPst, VPre, VPre, VPre, VPst, VPst, VBlw,
-    FAbv, FAbv, FAbv,
-    /* 1C30 */ FAbv, FAbv, FAbv, FAbv, VMPre, VMPre, FM, CMBlw, O, O, O, O, O,
-    O, O, O,
-    /* 1C40 */ B, B, B, B, B, B, B, B, B, B, O, O, O, B, B, B,
+  /* Lepcha */
+
+  /* 1C00 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1C10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 1C20 */     B,     B,     B,     B,   SUB,   SUB,  VPst,  VPre,  VPre,  VPre,  VPst,  VPst,  VBlw,  FAbv,  FAbv,  FAbv,
+  /* 1C30 */  FAbv,  FAbv,  FAbv,  FAbv, VMPre, VMPre,    FM, CMBlw,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 1C40 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     B,     B,     B,
 
 #define use_offset_0x1cd0u 2504
 
-    /* Vedic Extensions */
 
-    /* 1CD0 */ VMAbv, VMAbv, VMAbv, O, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw,
-    VMAbv, VMAbv, VMBlw, VMBlw, VMBlw, VMBlw,
-    /* 1CE0 */ VMAbv, VMPst, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, O,
-    O, O, O, VMBlw, O, O,
-    /* 1CF0 */ O, O, VMPst, VMPst, VMAbv, O, O, VMPst, VMAbv, VMAbv, O, O, O, O,
-    O, O,
+  /* Vedic Extensions */
+
+  /* 1CD0 */ VMAbv, VMAbv, VMAbv,     O, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMAbv, VMAbv, VMBlw, VMBlw, VMBlw, VMBlw,
+  /* 1CE0 */ VMAbv, VMPst, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw, VMBlw,     O,     O,     O,     O, VMBlw,     O,     O,
+  /* 1CF0 */     O,     O, VMPst, VMPst, VMAbv,     O,     O, VMPst, VMAbv, VMAbv,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x1df8u 2552
 
-    /* Combining Diacritical Marks Supplement */
-    O, O, O, FM, O, O, O, O,
+
+  /* Combining Diacritical Marks Supplement */
+                                                                         O,     O,     O,    FM,     O,     O,     O,     O,
 
 #define use_offset_0x2008u 2560
 
-    /* General Punctuation */
-    O, O, O, O, ZWNJ, ZWJ, O, O,
-    /* 2010 */ GB, GB, GB, GB, GB, O, O, O,
+
+  /* General Punctuation */
+                                                                         O,     O,     O,     O,  ZWNJ,   ZWJ,     O,     O,
+  /* 2010 */    GB,    GB,    GB,    GB,    GB,     O,     O,     O,
 
 #define use_offset_0x2060u 2576
 
-    /* 2060 */ WJ, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* 2060 */    WJ,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* Superscripts and Subscripts */
+  /* Superscripts and Subscripts */
 
-    /* 2070 */ O, O, O, O, FM, O, O, O, O, O, O, O, O, O, O, O,
-    /* 2080 */ O, O, FM, FM, FM, O, O, O,
+  /* 2070 */     O,     O,     O,     O,    FM,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 2080 */     O,     O,    FM,    FM,    FM,     O,     O,     O,
 
 #define use_offset_0x20f0u 2616
 
-    /* Combining Diacritical Marks for Symbols */
 
-    /* 20F0 */ VMAbv, O, O, O, O, O, O, O,
+  /* Combining Diacritical Marks for Symbols */
+
+  /* 20F0 */ VMAbv,     O,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0xa800u 2624
 
-    /* Syloti Nagri */
 
-    /* A800 */ B, B, O, B, B, B, VAbv, B, B, B, B, VMAbv, B, B, B, B,
-    /* A810 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A820 */ B, B, B, VPst, VPst, VBlw, VAbv, VPst, O, O, O, O, O, O, O, O,
-    /* A830 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Syloti Nagri */
 
-    /* Phags-pa */
+  /* A800 */     B,     B,     O,     B,     B,     B,  VAbv,     B,     B,     B,     B, VMAbv,     B,     B,     B,     B,
+  /* A810 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A820 */     B,     B,     B,  VPst,  VPst,  VBlw,  VAbv,  VPst,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* A830 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* A840 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A850 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A860 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A870 */ B, B, B, B, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Phags-pa */
 
-    /* Saurashtra */
+  /* A840 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A850 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A860 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A870 */     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* A880 */ VMPst, VMPst, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A890 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A8A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A8B0 */ B, B, B, B, MPst, VPst, VPst, VPst, VPst, VPst, VPst, VPst, VPst,
-    VPst, VPst, VPst,
-    /* A8C0 */ VPst, VPst, VPst, VPst, H, VMAbv, O, O, O, O, O, O, O, O, O, O,
-    /* A8D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Saurashtra */
 
-    /* Devanagari Extended */
+  /* A880 */ VMPst, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A890 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A8A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A8B0 */     B,     B,     B,     B,  MPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,  VPst,
+  /* A8C0 */  VPst,  VPst,  VPst,  VPst,     H, VMAbv,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* A8D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
-    /* A8E0 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,
-    VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,
-    /* A8F0 */ VMAbv, VMAbv, B, B, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Devanagari Extended */
 
-    /* Kayah Li */
+  /* A8E0 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,
+  /* A8F0 */ VMAbv, VMAbv,     B,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* A900 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A910 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A920 */ B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VAbv, VMBlw, VMBlw,
-    VMBlw, O, O,
+  /* Kayah Li */
 
-    /* Rejang */
+  /* A900 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A910 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A920 */     B,     B,     B,     B,     B,     B,  VAbv,  VAbv,  VAbv,  VAbv,  VAbv, VMBlw, VMBlw, VMBlw,     O,     O,
 
-    /* A930 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A940 */ B, B, B, B, B, B, B, VBlw, VBlw, VBlw, VAbv, VBlw, VBlw, VBlw,
-    VBlw, FAbv,
-    /* A950 */ FAbv, FAbv, FPst, VPst, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* A960 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* A970 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Rejang */
 
-    /* Javanese */
+  /* A930 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A940 */     B,     B,     B,     B,     B,     B,     B,  VBlw,  VBlw,  VBlw,  VAbv,  VBlw,  VBlw,  VBlw,  VBlw,  FAbv,
+  /* A950 */  FAbv,  FAbv,  FPst,  VPst,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* A960 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* A970 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* A980 */ VMAbv, VMAbv, FAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A990 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A9A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* A9B0 */ B, B, B, CMAbv, VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VPre,
-    VAbv, SUB, MPst, MBlw,
-    /* A9C0 */ H, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* A9D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Javanese */
 
-    /* Myanmar Extended-B */
+  /* A980 */ VMAbv, VMAbv,  FAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A990 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A9A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A9B0 */     B,     B,     B, CMAbv,  VPst,  VPst,  VAbv,  VAbv,  VBlw,  VBlw,  VPre,  VPre,  VAbv,   SUB,  MPst,  MBlw,
+  /* A9C0 */     H,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* A9D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
-    /* A9E0 */ B, B, B, B, B, VAbv, O, B, B, B, B, B, B, B, B, B,
-    /* A9F0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, O,
+  /* Myanmar Extended-B */
 
-    /* Cham */
+  /* A9E0 */     B,     B,     B,     B,     B,  VAbv,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* A9F0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,
 
-    /* AA00 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AA10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AA20 */ B, B, B, B, B, B, B, B, B, VMAbv, VAbv, VAbv, VAbv, VBlw, VAbv,
-    VPre,
-    /* AA30 */ VPre, VAbv, VBlw, MPst, MPre, MBlw, MBlw, O, O, O, O, O, O, O, O,
-    O,
-    /* AA40 */ B, B, B, FAbv, B, B, B, B, B, B, B, B, FAbv, FPst, O, O,
-    /* AA50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Cham */
 
-    /* Myanmar Extended-A */
+  /* AA00 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AA10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AA20 */     B,     B,     B,     B,     B,     B,     B,     B,     B, VMAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VAbv,  VPre,
+  /* AA30 */  VPre,  VAbv,  VBlw,  MPst,  MPre,  MBlw,  MBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* AA40 */     B,     B,     B,  FAbv,     B,     B,     B,     B,     B,     B,     B,     B,  FAbv,  FPst,     O,     O,
+  /* AA50 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
-    /* AA60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AA70 */ O, B, B, B, GB, GB, GB, O, O, O, B, VMPst, VMAbv, VMPst, B, B,
+  /* Myanmar Extended-A */
 
-    /* Tai Viet */
+  /* AA60 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AA70 */     O,     B,     B,     B,    GB,    GB,    GB,     O,     O,     O,     B, VMPst, VMAbv, VMPst,     B,     B,
 
-    /* AA80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AA90 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AAA0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* AAB0 */ VAbv, B, VAbv, VAbv, VBlw, B, B, VAbv, VAbv, B, B, B, B, B, VAbv,
-    VMAbv,
-    /* AAC0 */ B, VMAbv, B, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* AAD0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Tai Viet */
 
-    /* Meetei Mayek Extensions */
+  /* AA80 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AA90 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AAA0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* AAB0 */  VAbv,     B,  VAbv,  VAbv,  VBlw,     B,     B,  VAbv,  VAbv,     B,     B,     B,     B,     B,  VAbv, VMAbv,
+  /* AAC0 */     B, VMAbv,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* AAD0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* AAE0 */ B, B, B, B, B, B, B, B, B, B, B, VPre, VBlw, VAbv, VPre, VPst,
-    /* AAF0 */ O, O, O, O, O, VMPst, H, O,
+  /* Meetei Mayek Extensions */
+
+  /* AAE0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VPre,  VBlw,  VAbv,  VPre,  VPst,
+  /* AAF0 */     O,     O,     O,     O,     O, VMPst,     H,     O,
 
 #define use_offset_0xabc0u 3384
 
-    /* Meetei Mayek */
 
-    /* ABC0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* ABD0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* ABE0 */ B, B, B, VPst, VPst, VAbv, VPst, VPst, VBlw, VPst, VPst, O,
-    VMPst, VBlw, O, O,
-    /* ABF0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Meetei Mayek */
+
+  /* ABC0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* ABD0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* ABE0 */     B,     B,     B,  VPst,  VPst,  VAbv,  VPst,  VPst,  VBlw,  VPst,  VPst,     O, VMPst,  VBlw,     O,     O,
+  /* ABF0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0xfe00u 3448
 
-    /* Variation Selectors */
 
-    /* FE00 */ VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS,
+  /* Variation Selectors */
+
+  /* FE00 */    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,    VS,
 
 #define use_offset_0x10a00u 3464
 
-    /* Kharoshthi */
 
-    /* 10A00 */ B, VBlw, VBlw, VBlw, O, VAbv, VBlw, O, O, O, O, O, VBlw, VBlw,
-    VMBlw, VMAbv,
-    /* 10A10 */ B, B, B, B, O, B, B, B, O, B, B, B, B, B, B, B,
-    /* 10A20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 10A30 */ B, B, B, B, O, O, O, O, CMAbv, CMBlw, CMBlw, O, O, O, O, H,
-    /* 10A40 */ B, B, B, B, B, B, B, B,
+  /* Kharoshthi */
+
+  /* 10A00 */     B,  VBlw,  VBlw,  VBlw,     O,  VAbv,  VBlw,     O,     O,     O,     O,     O,  VBlw,  VBlw, VMBlw, VMAbv,
+  /* 10A10 */     B,     B,     B,     B,     O,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,     B,
+  /* 10A20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 10A30 */     B,     B,     B,     B,     O,     O,     O,     O, CMAbv, CMBlw, CMBlw,     O,     O,     O,     O,     H,
+  /* 10A40 */     B,     B,     B,     B,     B,     B,     B,     B,
 
 #define use_offset_0x11000u 3536
 
-    /* Brahmi */
 
-    /* 11000 */ VMPst, VMAbv, VMPst, CS, CS, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11010 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11020 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11030 */ B, B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VAbv, VBlw, VBlw,
-    VBlw, VBlw,
-    /* 11040 */ VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, H, O, O, O, O, O, O, O, O,
-    O,
-    /* 11050 */ O, O, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
-    /* 11060 */ N, N, N, N, N, N, B, B, B, B, B, B, B, B, B, B,
-    /* 11070 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Brahmi */
 
-    /* Kaithi */
+  /* 11000 */ VMPst, VMAbv, VMPst,    CS,    CS,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11010 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11020 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11030 */     B,     B,     B,     B,     B,     B,     B,     B,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VBlw,  VBlw,
+  /* 11040 */  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv,     H,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11050 */     O,     O,     N,     N,     N,     N,     N,     N,     N,     N,     N,     N,     N,     N,     N,     N,
+  /* 11060 */     N,     N,     N,     N,     N,     N,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11070 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11080 */ VMAbv, VMAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11090 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw,
-    O, O, O, O, O,
+  /* Kaithi */
+
+  /* 11080 */ VMAbv, VMAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11090 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 110A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 110B0 */  VPst,  VPre,  VPst,  VBlw,  VBlw,  VAbv,  VAbv,  VPst,  VPst,     H, CMBlw,     O,     O,     O,     O,     O,
 
 #define use_offset_0x11100u 3728
 
-    /* Chakma */
 
-    /* 11100 */ VMAbv, VMAbv, VMAbv, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11110 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11120 */ B, B, B, B, B, B, B, VAbv, VAbv, VAbv, VBlw, VBlw, VPre, VAbv,
-    VAbv, VAbv,
-    /* 11130 */ VAbv, VBlw, VBlw, H, VAbv, O, B, B, B, B, B, B, B, B, B, B,
-    /* 11140 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Chakma */
 
-    /* Mahajani */
+  /* 11100 */ VMAbv, VMAbv, VMAbv,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11110 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11120 */     B,     B,     B,     B,     B,     B,     B,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VPre,  VAbv,  VAbv,  VAbv,
+  /* 11130 */  VAbv,  VBlw,  VBlw,     H,  VAbv,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11140 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11150 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11160 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11170 */ B, B, B, CMBlw, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Mahajani */
 
-    /* Sharada */
+  /* 11150 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11160 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11170 */     B,     B,     B, CMBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11180 */ VMAbv, VMAbv, VMPst, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11190 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 111A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 111B0 */ B, B, B, VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw,
-    VAbv, VAbv, VAbv, VAbv,
-    /* 111C0 */ H, B, R, R, O, O, O, O, O, O, CMBlw, VAbv, VBlw, O, O, O,
-    /* 111D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Sharada */
 
-    /* Sinhala Archaic Numbers */
+  /* 11180 */ VMAbv, VMAbv, VMPst,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11190 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 111A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 111B0 */     B,     B,     B,  VPst,  VPre,  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv,
+  /* 111C0 */     H,     B,     R,     R,     O,     O,     O,     O,     O,     O, CMBlw,  VAbv,  VBlw,     O,     O,     O,
+  /* 111D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
-    /* 111E0 */ O, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 111F0 */ B, B, B, B, B, O, O, O, O, O, O, O, O, O, O, O,
+  /* Sinhala Archaic Numbers */
 
-    /* Khojki */
+  /* 111E0 */     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 111F0 */     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11200 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11210 */ B, B, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw,
-    /* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O,
-    O, VMAbv, O,
+  /* Khojki */
+
+  /* 11200 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11210 */     B,     B,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11220 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VPst,  VPst,  VPst,  VBlw,
+  /* 11230 */  VAbv,  VAbv,  VAbv,  VAbv, VMAbv,     H, CMAbv, CMAbv,     O,     O,     O,     O,     O,     O, VMAbv,     O,
 
 #define use_offset_0x11280u 4048
 
-    /* Multani */
 
-    /* 11280 */ B, B, B, B, B, B, B, O, B, O, B, B, B, B, O, B,
-    /* 11290 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, O, B,
-    /* 112A0 */ B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, O,
+  /* Multani */
 
-    /* Khudawadi */
+  /* 11280 */     B,     B,     B,     B,     B,     B,     B,     O,     B,     O,     B,     B,     B,     B,     O,     B,
+  /* 11290 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,
+  /* 112A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 112B0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 112C0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 112D0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, VMAbv,
-    /* 112E0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, CMBlw,
-    VBlw, O, O, O, O, O,
-    /* 112F0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Khudawadi */
 
-    /* Grantha */
+  /* 112B0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 112C0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 112D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B, VMAbv,
+  /* 112E0 */  VPst,  VPre,  VPst,  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv, CMBlw,  VBlw,     O,     O,     O,     O,     O,
+  /* 112F0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
-    /* 11300 */ VMAbv, VMAbv, VMPst, VMPst, O, B, B, B, B, B, B, B, B, O, O, B,
-    /* 11310 */ B, O, O, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11320 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 11330 */ B, O, B, B, O, B, B, B, B, B, O, O, CMBlw, B, VPst, VPst,
-    /* 11340 */ VAbv, VPst, VPst, VPst, VPst, O, O, VPre, VPre, O, O, VPre,
-    VPre, H, O, O,
-    /* 11350 */ O, O, O, O, O, O, O, VPst, O, O, O, O, O, O, B, B,
-    /* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,
-    VMAbv, VMAbv, O, O, O,
-    /* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
+  /* Grantha */
+
+  /* 11300 */ VMAbv, VMAbv, VMPst, VMPst,     O,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     B,
+  /* 11310 */     B,     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11320 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 11330 */     B,     O,     B,     B,     O,     B,     B,     B,     B,     B,     O,     O, CMBlw,     B,  VPst,  VPst,
+  /* 11340 */  VAbv,  VPst,  VPst,  VPst,  VPst,     O,     O,  VPre,  VPre,     O,     O,  VPre,  VPre,     H,     O,     O,
+  /* 11350 */     O,     O,     O,     O,     O,     O,     O,  VPst,     O,     O,     O,     O,     O,     O,     B,     B,
+  /* 11360 */     B,     B,  VPst,  VPst,     O,     O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,     O,     O,     O,
+  /* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,     O,     O,     O,
 
 #define use_offset_0x11400u 4296
 
-    /* Newa */
 
-    /* 11400 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11410 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11420 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11430 */ B, B, B, B, B, VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw,
-    VBlw, VAbv, VAbv,
-    /* 11440 */ VPst, VPst, H, VMAbv, VMAbv, VMPst, CMBlw, B, O, O, O, O, O, O,
-    O, O,
-    /* 11450 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 11460 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 11470 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Newa */
 
-    /* Tirhuta */
+  /* 11400 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11410 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11420 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11430 */     B,     B,     B,     B,     B,  VPst,  VPre,  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,  VAbv,
+  /* 11440 */  VPst,  VPst,     H, VMAbv, VMAbv, VMPst, CMBlw,     B,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11450 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 11460 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11470 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11480 */ O, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11490 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 114A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 114B0 */ VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VPre,
-    VAbv, VPre, VPre, VPst, VPre, VMAbv,
-    /* 114C0 */ VMAbv, VMPst, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O,
-    /* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Tirhuta */
+
+  /* 11480 */     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11490 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 114A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 114B0 */  VPst,  VPre,  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VPre,  VAbv,  VPre,  VPre,  VPst,  VPre, VMAbv,
+  /* 114C0 */ VMAbv, VMPst,     H, CMBlw,     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 114D0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x11580u 4520
 
-    /* Siddham */
 
-    /* 11580 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11590 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 115A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, VPst,
-    /* 115B0 */ VPre, VPst, VBlw, VBlw, VBlw, VBlw, O, O, VPre, VPre, VPre,
-    VPre, VMAbv, VMAbv, VMPst, H,
-    /* 115C0 */ CMBlw, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 115D0 */ O, O, O, O, O, O, O, O, B, B, B, B, VBlw, VBlw, O, O,
-    /* 115E0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 115F0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Siddham */
 
-    /* Modi */
+  /* 11580 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11590 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 115A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VPst,
+  /* 115B0 */  VPre,  VPst,  VBlw,  VBlw,  VBlw,  VBlw,     O,     O,  VPre,  VPre,  VPre,  VPre, VMAbv, VMAbv, VMPst,     H,
+  /* 115C0 */ CMBlw,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 115D0 */     O,     O,     O,     O,     O,     O,     O,     O,     B,     B,     B,     B,  VBlw,  VBlw,     O,     O,
+  /* 115E0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 115F0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11600 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11610 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11620 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11630 */ VPst, VPst, VPst, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VAbv,
-    VAbv, VPst, VPst, VMAbv, VMPst, H,
-    /* 11640 */ VAbv, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 11650 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 11660 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 11670 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Modi */
 
-    /* Takri */
+  /* 11600 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11610 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11620 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11630 */  VPst,  VPst,  VPst,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,  VAbv,  VAbv,  VPst,  VPst, VMAbv, VMPst,     H,
+  /* 11640 */  VAbv,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11650 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 11660 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11670 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11680 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11690 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 116A0 */ B, B, B, B, B, B, B, B, B, B, B, VMAbv, VMPst, VAbv, VPre, VPst,
-    /* 116B0 */ VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, H, CMBlw, O, O, O, O, O, O,
-    O, O,
-    /* 116C0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-    /* 116D0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 116E0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 116F0 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
+  /* Takri */
 
-    /* Ahom */
+  /* 11680 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11690 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 116A0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B, VMAbv, VMPst,  VAbv,  VPre,  VPst,
+  /* 116B0 */  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv,     H, CMBlw,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 116C0 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
+  /* 116D0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 116E0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 116F0 */     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11700 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11710 */ B, B, B, B, B, B, B, B, B, B, O, O, O, MBlw, MPre, MAbv,
-    /* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv,
-    VAbv, VAbv, O, O, O, O,
-    /* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O,
+  /* Ahom */
+
+  /* 11700 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11710 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,  MBlw,  MPre,  MAbv,
+  /* 11720 */  VPst,  VPst,  VAbv,  VAbv,  VBlw,  VBlw,  VPre,  VAbv,  VBlw,  VAbv,  VAbv,  VAbv,     O,     O,     O,     O,
+  /* 11730 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,
 
 #define use_offset_0x11a00u 4968
 
-    /* Zanabazar Square */
 
-    /* 11A00 */ B, VAbv, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, VAbv, VAbv, VBlw,
-    B, B, B, B, B,
-    /* 11A10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11A20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11A30 */ B, B, B, FM, VBlw, VMAbv, VMAbv, VMAbv, VMAbv, VMPst, R, MBlw,
-    MBlw, MBlw, MBlw, GB,
-    /* 11A40 */ O, O, O, O, O, GB, O, H, O, O, O, O, O, O, O, O,
+  /* Zanabazar Square */
 
-    /* Soyombo */
+  /* 11A00 */     B,  VAbv,  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,     B,     B,     B,     B,     B,
+  /* 11A10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11A20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11A30 */     B,     B,     B,    FM,  VBlw, VMAbv, VMAbv, VMAbv, VMAbv, VMPst,     R,  MBlw,  MBlw,  MBlw,  MBlw,    GB,
+  /* 11A40 */     O,     O,     O,     O,     O,    GB,     O,     H,     O,     O,     O,     O,     O,     O,     O,     O,
 
-    /* 11A50 */ B, VAbv, VBlw, VBlw, VAbv, VAbv, VAbv, VPst, VPst, VBlw, VBlw,
-    VBlw, B, B, B, B,
-    /* 11A60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11A70 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11A80 */ B, B, B, B, O, O, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw,
-    FBlw,
-    /* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O,
-    O, O, O, O, O,
+  /* Soyombo */
+
+  /* 11A50 */     B,  VAbv,  VBlw,  VBlw,  VAbv,  VAbv,  VAbv,  VPst,  VPst,  VBlw,  VBlw,  VBlw,     B,     B,     B,     B,
+  /* 11A60 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11A70 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11A80 */     B,     B,     B,     B,     O,     O,     R,     R,     R,     R,  FBlw,  FBlw,  FBlw,  FBlw,  FBlw,  FBlw,
+  /* 11A90 */  FBlw,  FBlw,  FBlw,  FBlw,  FBlw,  FBlw, VMAbv, VMPst, CMAbv,     H,     O,     O,     O,     O,     O,     O,
 
 #define use_offset_0x11c00u 5128
 
-    /* Bhaiksuki */
 
-    /* 11C00 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
-    /* 11C10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11C20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, VPst,
-    /* 11C30 */ VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VBlw, O, VAbv, VAbv, VAbv,
-    VAbv, VMAbv, VMAbv, VMPst, H,
-    /* 11C40 */ B, O, O, O, O, O, O, O, O, O, O, O, O, O, O, O,
-    /* 11C50 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11C60 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, O, O,
+  /* Bhaiksuki */
 
-    /* Marchen */
+  /* 11C00 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     B,     B,     B,     B,
+  /* 11C10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11C20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,  VPst,
+  /* 11C30 */  VAbv,  VAbv,  VBlw,  VBlw,  VBlw,  VBlw,  VBlw,     O,  VAbv,  VAbv,  VAbv,  VAbv, VMAbv, VMAbv, VMPst,     H,
+  /* 11C40 */     B,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11C50 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11C60 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,
 
-    /* 11C70 */ O, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11C80 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11C90 */ O, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB,
-    SUB, SUB, SUB,
-    /* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB,
-    SUB, SUB, SUB,
-    /* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O,
+  /* Marchen */
+
+  /* 11C70 */     O,     O,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11C80 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11C90 */     O,     O,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,
+  /* 11CA0 */   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,     O,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,   SUB,
+  /* 11CB0 */  VBlw,  VPre,  VBlw,  VAbv,  VPst, VMAbv, VMAbv,     O,
 
 #define use_offset_0x11d00u 5312
 
-    /* Masaram Gondi */
 
-    /* 11D00 */ B, B, B, B, B, B, B, O, B, B, O, B, B, B, B, B,
-    /* 11D10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11D20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
-    /* 11D30 */ B, VAbv, VAbv, VAbv, VAbv, VAbv, VBlw, O, O, O, VAbv, O, VAbv,
-    VAbv, O, VAbv,
-    /* 11D40 */ VMAbv, VMAbv, CMBlw, VAbv, VBlw, H, R, MBlw, O, O, O, O, O, O,
-    O, O,
-    /* 11D50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
+  /* Masaram Gondi */
+
+  /* 11D00 */     B,     B,     B,     B,     B,     B,     B,     O,     B,     B,     O,     B,     B,     B,     B,     B,
+  /* 11D10 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11D20 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
+  /* 11D30 */     B,  VAbv,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,     O,     O,     O,  VAbv,     O,  VAbv,  VAbv,     O,  VAbv,
+  /* 11D40 */ VMAbv, VMAbv, CMBlw,  VAbv,  VBlw,     H,     R,  MBlw,     O,     O,     O,     O,     O,     O,     O,     O,
+  /* 11D50 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 
 }; /* Table items: 5408; occupancy: 73% */
 
@@ -744,8 +701,7 @@
     case 0x2u:
       if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
       if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u];
-      if (hb_in_range<hb_codepoint_t>(u, 0x20F0u, 0x20F7u))
-        return use_table[u - 0x20F0u + use_offset_0x20f0u];
+      if (hb_in_range<hb_codepoint_t> (u, 0x20F0u, 0x20F7u)) return use_table[u - 0x20F0u + use_offset_0x20f0u];
       if (unlikely (u == 0x25CCu)) return GB;
       break;
 
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-fallback.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-fallback.cc
index c46f523..458c8ea 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-fallback.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-fallback.cc
@@ -209,6 +209,7 @@
   hb_glyph_position_t &pos = buffer->pos[i];
   pos.x_offset = pos.y_offset = 0;
 
+
   /* We don't position LEFT and RIGHT marks. */
 
   /* X positioning */
@@ -217,12 +218,10 @@
     case HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW:
     case HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE:
       if (buffer->props.direction == HB_DIRECTION_LTR) {
-        pos.x_offset += base_extents.x_bearing + base_extents.width -
-                        mark_extents.width / 2 - mark_extents.x_bearing;
+	pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width / 2 - mark_extents.x_bearing;
         break;
       } else if (buffer->props.direction == HB_DIRECTION_RTL) {
-        pos.x_offset += base_extents.x_bearing - mark_extents.width / 2 -
-                        mark_extents.x_bearing;
+	pos.x_offset += base_extents.x_bearing - mark_extents.width / 2 - mark_extents.x_bearing;
         break;
       }
       HB_FALLTHROUGH;
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape.cc b/third_party/harfbuzz-ng/src/hb-ot-shape.cc
index a7496780..2f28b56 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape.cc
@@ -817,15 +817,15 @@
 {
   c->buffer->deallocate_var_all ();
   c->buffer->scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT;
-  if (likely(!_hb_unsigned_int_mul_overflows(c->buffer->len,
-                                             HB_BUFFER_MAX_LEN_FACTOR))) {
-    c->buffer->max_len = MAX(c->buffer->len * HB_BUFFER_MAX_LEN_FACTOR,
-                             (unsigned)HB_BUFFER_MAX_LEN_MIN);
+  if (likely (!_hb_unsigned_int_mul_overflows (c->buffer->len, HB_BUFFER_MAX_LEN_FACTOR)))
+  {
+    c->buffer->max_len = MAX (c->buffer->len * HB_BUFFER_MAX_LEN_FACTOR,
+			      (unsigned) HB_BUFFER_MAX_LEN_MIN);
   }
-  if (likely(!_hb_unsigned_int_mul_overflows(c->buffer->len,
-                                             HB_BUFFER_MAX_OPS_FACTOR))) {
-    c->buffer->max_ops = MAX(c->buffer->len * HB_BUFFER_MAX_OPS_FACTOR,
-                             (unsigned)HB_BUFFER_MAX_OPS_MIN);
+  if (likely (!_hb_unsigned_int_mul_overflows (c->buffer->len, HB_BUFFER_MAX_OPS_FACTOR)))
+  {
+    c->buffer->max_ops = MAX (c->buffer->len * HB_BUFFER_MAX_OPS_FACTOR,
+			      (unsigned) HB_BUFFER_MAX_OPS_MIN);
   }
 
   bool disable_otl = c->plan->shaper->disable_otl && c->plan->shaper->disable_otl (c->plan);
diff --git a/third_party/harfbuzz-ng/src/hb-ot-tag.cc b/third_party/harfbuzz-ng/src/hb-ot-tag.cc
index ae354e2..1338c31 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-tag.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-tag.cc
@@ -878,9 +878,12 @@
   {"zh-hant",	HB_TAG('Z','H','T',' ')},	/* Chinese (Traditional) */
 };
 
-static int lang_compare_first_component(const void* pa, const void* pb) {
-  const char* a = (const char*)pa;
-  const char* b = (const char*)pb;
+static int
+lang_compare_first_component (const void *pa,
+			      const void *pb)
+{
+  const char *a = (const char *) pa;
+  const char *b = (const char *) pb;
   unsigned int da, db;
   const char *p;
 
@@ -917,12 +920,12 @@
     char tag[4];
     int i;
     s += 6;
-    for (i = 0; i < 4 && ISALPHA (s[i]); i++)
+    for (i = 0; i < 4 && ISALNUM (s[i]); i++)
       tag[i] = TOUPPER (s[i]);
     if (i) {
       for (; i < 4; i++)
 	tag[i] = ' ';
-      return HB_TAG(tag[0], tag[1], tag[2], tag[3]);
+      return HB_TAG (tag[0], tag[1], tag[2], tag[3]);
     }
   }
 
@@ -969,9 +972,9 @@
   /* Find a language matching in the first component */
   {
     const LangTag *lang_tag;
-    lang_tag =
-        (LangTag*)bsearch(lang_str, ot_languages, ARRAY_LENGTH(ot_languages),
-                          sizeof(LangTag), lang_compare_first_component);
+    lang_tag = (LangTag *) bsearch (lang_str, ot_languages,
+				    ARRAY_LENGTH (ot_languages), sizeof (LangTag),
+				    lang_compare_first_component);
     if (lang_tag)
       return lang_tag->tag;
   }
diff --git a/third_party/harfbuzz-ng/src/hb-private.hh b/third_party/harfbuzz-ng/src/hb-private.hh
index 117f4983..acddd89 100644
--- a/third_party/harfbuzz-ng/src/hb-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-private.hh
@@ -112,7 +112,7 @@
 #endif
 #if __GNUC__ >= 4
 #define HB_UNUSED	__attribute__((unused))
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) /* https://github.com/harfbuzz/harfbuzz/issues/635 */
 #define HB_UNUSED __pragma(warning(suppress: 4100 4101))
 #else
 #define HB_UNUSED
diff --git a/third_party/harfbuzz-ng/src/hb-set-digest-private.hh b/third_party/harfbuzz-ng/src/hb-set-digest-private.hh
index 9135136..e099a82 100644
--- a/third_party/harfbuzz-ng/src/hb-set-digest-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-set-digest-private.hh
@@ -71,7 +71,7 @@
     mask |= mask_for (g);
   }
 
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
     if ((b >> shift) - (a >> shift) >= mask_bits - 1)
       mask = (mask_t) -1;
     else {
@@ -79,6 +79,27 @@
       mask_t mb = mask_for (b);
       mask |= mb + (mb - ma) - (mb < ma);
     }
+    return true;
+  }
+
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    for (unsigned int i = 0; i < count; i++)
+    {
+      add (*array);
+      array = (const T *) (stride + (const char *) array);
+    }
+  }
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    for (unsigned int i = 0; i < count; i++)
+    {
+      add (*array);
+      array = (const T *) (stride + (const char *) array);
+    }
+    return true;
   }
 
   inline bool may_have (hb_codepoint_t g) const {
@@ -108,9 +129,23 @@
     tail.add (g);
   }
 
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
     head.add_range (a, b);
     tail.add_range (a, b);
+    return true;
+  }
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    head.add_array (array, count, stride);
+    tail.add_array (array, count, stride);
+  }
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    head.add_sorted_array (array, count, stride);
+    tail.add_sorted_array (array, count, stride);
+    return true;
   }
 
   inline bool may_have (hb_codepoint_t g) const {
diff --git a/third_party/harfbuzz-ng/src/hb-set-private.hh b/third_party/harfbuzz-ng/src/hb-set-private.hh
index ae34a94..9c6f3ee3 100644
--- a/third_party/harfbuzz-ng/src/hb-set-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-set-private.hh
@@ -70,20 +70,19 @@
 
     inline void add_range (hb_codepoint_t a, hb_codepoint_t b)
     {
-     elt_t *la = &elt (a);
-     elt_t *lb = &elt (b);
-     if (la == lb)
-       *la |= (mask (b) << 1) - mask(a);
-     else
-     {
-       *la |= ~(mask (a) - 1);
-       la++;
+      elt_t *la = &elt (a);
+      elt_t *lb = &elt (b);
+      if (la == lb)
+        *la |= (mask (b) << 1) - mask(a);
+      else
+      {
+	*la |= ~(mask (a) - 1);
+	la++;
 
-       memset (la, 0xff, (char *) lb - (char *) la);
+	memset (la, 0xff, (char *) lb - (char *) la);
 
-       *lb |= ((mask (b) << 1) - 1);
-
-     }
+	*lb |= ((mask (b) << 1) - 1);
+      }
     }
 
     inline bool is_equal (const page_t *other) const
@@ -182,7 +181,18 @@
   ASSERT_POD ();
   bool in_error;
   hb_prealloced_array_t<page_map_t, 8> page_map;
-  hb_prealloced_array_t<page_t, 8> pages;
+  hb_prealloced_array_t<page_t, 1> pages;
+
+  inline void init (void)
+  {
+    page_map.init ();
+    pages.init ();
+  }
+  inline void finish (void)
+  {
+    page_map.finish ();
+    pages.finish ();
+  }
 
   inline bool resize (unsigned int count)
   {
@@ -215,39 +225,90 @@
   {
     if (unlikely (in_error)) return;
     if (unlikely (g == INVALID)) return;
-    page_t *page = page_for_insert (g);
-    if (unlikely (!page)) return;
+    page_t *page = page_for_insert (g); if (unlikely (!page)) return;
     page->add (g);
   }
-  inline void add_range (hb_codepoint_t a, hb_codepoint_t b)
+  inline bool add_range (hb_codepoint_t a, hb_codepoint_t b)
   {
-    if (unlikely (in_error || a > b || a == INVALID || b == INVALID)) return;
+    if (unlikely (in_error)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
+    if (unlikely (a > b || a == INVALID || b == INVALID)) return false;
     unsigned int ma = get_major (a);
     unsigned int mb = get_major (b);
     if (ma == mb)
     {
-      page_t *page = page_for_insert (a);
-      if (unlikely (!page)) return;
+      page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
       page->add_range (a, b);
     }
     else
     {
-      page_t *page = page_for_insert (a);
-      if (unlikely (!page)) return;
+      page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
       page->add_range (a, major_start (ma + 1) - 1);
 
       for (unsigned int m = ma + 1; m < mb; m++)
       {
-	page = page_for_insert (major_start (m));
-	if (unlikely (!page)) return;
+	page = page_for_insert (major_start (m)); if (unlikely (!page)) return false;
 	page->init1 ();
       }
 
-      page = page_for_insert (b);
-      if (unlikely (!page)) return;
+      page = page_for_insert (b); if (unlikely (!page)) return false;
       page->add_range (major_start (mb), b);
     }
+    return true;
   }
+
+  template <typename T>
+  inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    if (unlikely (in_error)) return;
+    if (!count) return;
+    hb_codepoint_t g = *array;
+    while (count)
+    {
+      unsigned int m = get_major (g);
+      page_t *page = page_for_insert (g); if (unlikely (!page)) return;
+      unsigned int start = major_start (m);
+      unsigned int end = major_start (m + 1);
+      do
+      {
+	page->add (g);
+
+	array++;
+	count--;
+      }
+      while (count && (g = *array, start <= g && g < end));
+    }
+  }
+
+  /* Might return false if array looks unsorted.
+   * Used for faster rejection of corrupt data. */
+  template <typename T>
+  inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+  {
+    if (unlikely (in_error)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
+    if (!count) return true;
+    hb_codepoint_t g = *array;
+    hb_codepoint_t last_g = g;
+    while (count)
+    {
+      unsigned int m = get_major (g);
+      page_t *page = page_for_insert (g); if (unlikely (!page)) return false;
+      unsigned int end = major_start (m + 1);
+      do
+      {
+        /* If we try harder we can change the following comparison to <=;
+	 * Not sure if it's worth it. */
+        if (g < last_g) return false;
+	last_g = g;
+	page->add (g);
+
+	array++;
+	count--;
+      }
+      while (count && (g = *array, g < end));
+    }
+    return true;
+  }
+
   inline void del (hb_codepoint_t g)
   {
     if (unlikely (in_error)) return;
diff --git a/third_party/harfbuzz-ng/src/hb-set.cc b/third_party/harfbuzz-ng/src/hb-set.cc
index d61a24c0..0b4f871 100644
--- a/third_party/harfbuzz-ng/src/hb-set.cc
+++ b/third_party/harfbuzz-ng/src/hb-set.cc
@@ -45,8 +45,7 @@
   if (!(set = hb_object_create<hb_set_t> ()))
     return hb_set_get_empty ();
 
-  set->page_map.init();
-  set->pages.init();
+  set->init ();
 
   return set;
 }
@@ -96,8 +95,7 @@
 {
   if (!hb_object_destroy (set)) return;
 
-  set->page_map.finish();
-  set->pages.finish();
+  set->finish ();
 
   free (set);
 }
@@ -375,7 +373,7 @@
  * hb_set_invert:
  * @set: a set.
  *
- *
+ * 
  *
  * Since: 0.9.10
  *
diff --git a/third_party/harfbuzz-ng/src/hb-shape-plan.cc b/third_party/harfbuzz-ng/src/hb-shape-plan.cc
index b38be2ce..6eeba2b 100644
--- a/third_party/harfbuzz-ng/src/hb-shape-plan.cc
+++ b/third_party/harfbuzz-ng/src/hb-shape-plan.cc
@@ -24,12 +24,13 @@
  * Google Author(s): Behdad Esfahbod
  */
 
-#include "hb-buffer-private.hh"
-#include "hb-debug.hh"
-#include "hb-font-private.hh"
 #include "hb-private.hh"
+#include "hb-debug.hh"
 #include "hb-shape-plan-private.hh"
 #include "hb-shaper-private.hh"
+#include "hb-font-private.hh"
+#include "hb-buffer-private.hh"
+
 
 static void
 hb_shape_plan_plan (hb_shape_plan_t    *shape_plan,
diff --git a/third_party/harfbuzz-ng/src/hb-ucdn.cc b/third_party/harfbuzz-ng/src/hb-ucdn.cc
index eb1f1d0..9515bda 100644
--- a/third_party/harfbuzz-ng/src/hb-ucdn.cc
+++ b/third_party/harfbuzz-ng/src/hb-ucdn.cc
@@ -231,11 +231,13 @@
     return ucdn_compat_decompose(u, decomposed);
 }
 
-static hb_unicode_funcs_t* static_ucdn_funcs = nullptr;
+static hb_unicode_funcs_t *static_ucdn_funcs = nullptr;
 
 #ifdef HB_USE_ATEXIT
-static void free_static_ucdn_funcs(void) {
-  hb_unicode_funcs_destroy(static_ucdn_funcs);
+static
+void free_static_ucdn_funcs (void)
+{
+  hb_unicode_funcs_destroy (static_ucdn_funcs);
 }
 #endif
 
@@ -244,29 +246,28 @@
 hb_ucdn_get_unicode_funcs (void)
 {
 retry:
-  hb_unicode_funcs_t* funcs =
-      (hb_unicode_funcs_t*)hb_atomic_ptr_get(&static_ucdn_funcs);
+  hb_unicode_funcs_t *funcs = (hb_unicode_funcs_t *) hb_atomic_ptr_get (&static_ucdn_funcs);
 
-  if (unlikely(!funcs)) {
-    funcs = hb_unicode_funcs_create(nullptr);
+  if (unlikely (!funcs))
+  {
+    funcs = hb_unicode_funcs_create (nullptr);
 
 #define HB_UNICODE_FUNC_IMPLEMENT(name) \
-  hb_unicode_funcs_set_##name##_func(funcs, hb_ucdn_##name, nullptr, nullptr);
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+    hb_unicode_funcs_set_##name##_func (funcs, hb_ucdn_##name, nullptr, nullptr);
+      HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_UNICODE_FUNC_IMPLEMENT
 
-    hb_unicode_funcs_make_immutable(funcs);
+    hb_unicode_funcs_make_immutable (funcs);
 
-    if (!hb_atomic_ptr_cmpexch(&static_ucdn_funcs, nullptr, funcs)) {
-      hb_unicode_funcs_destroy(funcs);
+    if (!hb_atomic_ptr_cmpexch (&static_ucdn_funcs, nullptr, funcs)) {
+      hb_unicode_funcs_destroy (funcs);
       goto retry;
     }
 
 #ifdef HB_USE_ATEXIT
-    atexit(
-        free_static_ucdn_funcs); /* First person registers atexit() callback. */
+    atexit (free_static_ucdn_funcs); /* First person registers atexit() callback. */
 #endif
   };
 
-  return hb_unicode_funcs_reference(funcs);
+  return hb_unicode_funcs_reference (funcs);
 }
diff --git a/third_party/harfbuzz-ng/src/main.cc b/third_party/harfbuzz-ng/src/main.cc
index d12d8df..819100e 100644
--- a/third_party/harfbuzz-ng/src/main.cc
+++ b/third_party/harfbuzz-ng/src/main.cc
@@ -38,7 +38,7 @@
 
 using namespace OT;
 
-const void* const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof(void*)] = {};
+const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
 
 int
 main (int argc, char **argv)
@@ -105,73 +105,72 @@
 	      (unsigned int) table.length);
 
       switch (table.tag) {
-        case HB_OT_TAG_GSUB:
-        case HB_OT_TAG_GPOS: {
-          const GSUBGPOS& g = *CastP<GSUBGPOS>(font_data + table.offset);
 
-          int num_scripts = g.get_script_count();
-          printf("    %d script(s) found in table\n", num_scripts);
-          for (int n_script = 0; n_script < num_scripts; n_script++) {
-            const Script& script = g.get_script(n_script);
-            printf("    Script %2d of %2d: %.4s\n", n_script, num_scripts,
-                   (const char*)g.get_script_tag(n_script));
+      case HB_OT_TAG_GSUB:
+      case HB_OT_TAG_GPOS:
+	{
 
-            if (!script.has_default_lang_sys())
-              printf("      No default language system\n");
-            int num_langsys = script.get_lang_sys_count();
-            printf("      %d language system(s) found in script\n",
-                   num_langsys);
-            for (int n_langsys = script.has_default_lang_sys() ? -1 : 0;
-                 n_langsys < num_langsys; n_langsys++) {
-              const LangSys& langsys = n_langsys == -1
-                                           ? script.get_default_lang_sys()
-                                           : script.get_lang_sys(n_langsys);
-              if (n_langsys == -1)
-                printf("      Default Language System\n");
-              else
-                printf("      Language System %2d of %2d: %.4s\n", n_langsys,
-                       num_langsys,
-                       (const char*)script.get_lang_sys_tag(n_langsys));
-              if (!langsys.has_required_feature())
-                printf("        No required feature\n");
-              else
-                printf("        Required feature index: %d\n",
-                       langsys.get_required_feature_index());
+	const GSUBGPOS &g = *CastP<GSUBGPOS> (font_data + table.offset);
 
-              int num_features = langsys.get_feature_count();
-              printf("        %d feature(s) found in language system\n",
-                     num_features);
-              for (int n_feature = 0; n_feature < num_features; n_feature++) {
-                printf("        Feature index %2d of %2d: %d\n", n_feature,
-                       num_features, langsys.get_feature_index(n_feature));
-              }
-            }
-          }
+	int num_scripts = g.get_script_count ();
+	printf ("    %d script(s) found in table\n", num_scripts);
+	for (int n_script = 0; n_script < num_scripts; n_script++) {
+	  const Script &script = g.get_script (n_script);
+	  printf ("    Script %2d of %2d: %.4s\n", n_script, num_scripts,
+	          (const char *)g.get_script_tag(n_script));
 
-          int num_features = g.get_feature_count();
-          printf("    %d feature(s) found in table\n", num_features);
-          for (int n_feature = 0; n_feature < num_features; n_feature++) {
-            const Feature& feature = g.get_feature(n_feature);
-            int num_lookups = feature.get_lookup_count();
-            printf("    Feature %2d of %2d: %c%c%c%c\n", n_feature,
-                   num_features, HB_UNTAG(g.get_feature_tag(n_feature)));
+	  if (!script.has_default_lang_sys())
+	    printf ("      No default language system\n");
+	  int num_langsys = script.get_lang_sys_count ();
+	  printf ("      %d language system(s) found in script\n", num_langsys);
+	  for (int n_langsys = script.has_default_lang_sys() ? -1 : 0; n_langsys < num_langsys; n_langsys++) {
+	    const LangSys &langsys = n_langsys == -1
+				   ? script.get_default_lang_sys ()
+				   : script.get_lang_sys (n_langsys);
+	    if (n_langsys == -1)
+	      printf ("      Default Language System\n");
+	    else
+	      printf ("      Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
+		      (const char *)script.get_lang_sys_tag (n_langsys));
+	    if (!langsys.has_required_feature ())
+	      printf ("        No required feature\n");
+	    else
+	      printf ("        Required feature index: %d\n",
+		      langsys.get_required_feature_index ());
 
-            printf("        %d lookup(s) found in feature\n", num_lookups);
-            for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
-              printf("        Lookup index %2d of %2d: %d\n", n_lookup,
-                     num_lookups, feature.get_lookup_index(n_lookup));
-            }
-          }
+	    int num_features = langsys.get_feature_count ();
+	    printf ("        %d feature(s) found in language system\n", num_features);
+	    for (int n_feature = 0; n_feature < num_features; n_feature++) {
+	      printf ("        Feature index %2d of %2d: %d\n", n_feature, num_features,
+	              langsys.get_feature_index (n_feature));
+	    }
+	  }
+	}
 
-          int num_lookups = g.get_lookup_count();
-          printf("    %d lookup(s) found in table\n", num_lookups);
-          for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
-            const Lookup& lookup = g.get_lookup(n_lookup);
-            printf("    Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup,
-                   num_lookups, lookup.get_type(), lookup.get_props());
-          }
+	int num_features = g.get_feature_count ();
+	printf ("    %d feature(s) found in table\n", num_features);
+	for (int n_feature = 0; n_feature < num_features; n_feature++) {
+	  const Feature &feature = g.get_feature (n_feature);
+	  int num_lookups = feature.get_lookup_count ();
+	  printf ("    Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features,
+	          HB_UNTAG(g.get_feature_tag(n_feature)));
 
-        }
+	  printf ("        %d lookup(s) found in feature\n", num_lookups);
+	  for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
+	    printf ("        Lookup index %2d of %2d: %d\n", n_lookup, num_lookups,
+	            feature.get_lookup_index (n_lookup));
+	  }
+	}
+
+	int num_lookups = g.get_lookup_count ();
+	printf ("    %d lookup(s) found in table\n", num_lookups);
+	for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
+	  const Lookup &lookup = g.get_lookup (n_lookup);
+	  printf ("    Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
+	          lookup.get_type(), lookup.get_props());
+	}
+
+	}
 	break;
 
       case GDEF::tableTag:
diff --git a/third_party/harfbuzz-ng/src/test-buffer-serialize.cc b/third_party/harfbuzz-ng/src/test-buffer-serialize.cc
index 5c329a5a..4b429eab 100644
--- a/third_party/harfbuzz-ng/src/test-buffer-serialize.cc
+++ b/third_party/harfbuzz-ng/src/test-buffer-serialize.cc
@@ -26,8 +26,8 @@
 
 #include "hb-private.hh"
 
-#include "hb-ot.h"
 #include "hb.h"
+#include "hb-ot.h"
 #ifdef HAVE_FREETYPE
 #include "hb-ft.h"
 #endif
@@ -91,9 +91,9 @@
   hb_font_t *font = hb_font_create (face);
   hb_face_destroy (face);
   hb_font_set_scale (font, upem, upem);
-  hb_ot_font_set_funcs(font);
+  hb_ot_font_set_funcs (font);
 #ifdef HAVE_FREETYPE
-// hb_ft_font_set_funcs (font);
+  //hb_ft_font_set_funcs (font);
 #endif
 
   hb_buffer_t *buf;
diff --git a/third_party/libvpx/README.chromium b/third_party/libvpx/README.chromium
index ae7207d..a1d5159 100644
--- a/third_party/libvpx/README.chromium
+++ b/third_party/libvpx/README.chromium
@@ -5,9 +5,9 @@
 License File: source/libvpx/LICENSE
 Security Critical: yes
 
-Date: Wednesday December 06 2017
+Date: Tuesday December 19 2017
 Branch: master
-Commit: 14dbdd95e686eafbe556c154c9e0bd76fe1d2d1a
+Commit: a2127236ae4742f329e5571d76b84de08cd3b8ea
 
 Description:
 Contains the sources used to compile libvpx binaries used by Google Chrome and
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
index c6222d0..737afd5 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
index a78c947..bd397cc 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
index 3baa8752..cc0b382 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
index c6222d0..737afd5 100644
--- a/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
index a78c947..bd397cc 100644
--- a/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
index 3baa8752..cc0b382 100644
--- a/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
index f89a505..ca242d0 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
index f67b1254..dc5b2d1 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
index 552d4f2..c518d2b 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
index c6222d0..737afd5 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
index a78c947..bd397cc 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
index 3baa8752..cc0b382 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
index ad38b1c..a84e3b3 100644
--- a/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
index 2eb1bc6..478101ff 100644
--- a/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
index ddd31b1b..9cbc77b 100644
--- a/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
index c6222d0..737afd5 100644
--- a/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
index a78c947..bd397cc 100644
--- a/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
index 3baa8752..cc0b382 100644
--- a/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h
index 564cb3b..555013e 100644
--- a/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h b/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
index 5af3874..dc054d6 100644
--- a/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h b/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
index a834876..289a739 100644
--- a/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
index 474ce64..ad8928bf 100644
--- a/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h
index 6686511..c5196db4d 100644
--- a/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
index 2f3a2d3..9472db1 100644
--- a/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
index a4d23ee..2ffeeb0 100644
--- a/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
index bc99c7a..2ad16428 100644
--- a/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
index 5af3874..dc054d6 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
index 93be420..1eb9db5 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
index d628eab..ddac3c1 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h
index 6686511..c5196db4d 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
index 5af3874..dc054d6 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
index 93be420..1eb9db5 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
index d628eab..ddac3c1 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h
index 6686511..c5196db4d 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
index baafe8be..4e9d062 100644
--- a/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
index c8e64b9..4b2b1013 100644
--- a/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
index cebbdef..4f34b7a 100644
--- a/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
index 2f3a2d3..9472db1 100644
--- a/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
index a4d23ee..2ffeeb0 100644
--- a/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
index bc99c7a..2ad16428 100644
--- a/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h b/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
index baafe8be..4e9d062 100644
--- a/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h b/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
index c8e64b9..4b2b1013 100644
--- a/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
index cebbdef..4f34b7a 100644
--- a/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/nacl/vp8_rtcd.h b/third_party/libvpx/source/config/nacl/vp8_rtcd.h
index 5af3874..dc054d6 100644
--- a/third_party/libvpx/source/config/nacl/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/nacl/vp9_rtcd.h b/third_party/libvpx/source/config/nacl/vp9_rtcd.h
index a834876..289a739 100644
--- a/third_party/libvpx/source/config/nacl/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
index 474ce64..ad8928bf 100644
--- a/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h b/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h
index 6686511..c5196db4d 100644
--- a/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/vpx_version.h b/third_party/libvpx/source/config/vpx_version.h
index eb88e42..8f44efe1 100644
--- a/third_party/libvpx/source/config/vpx_version.h
+++ b/third_party/libvpx/source/config/vpx_version.h
@@ -1,7 +1,8 @@
+// This file is generated. Do not edit.
 #define VERSION_MAJOR  1
 #define VERSION_MINOR  6
 #define VERSION_PATCH  1
-#define VERSION_EXTRA  "1441-g14dbdd95e"
+#define VERSION_EXTRA  "1464-ga2127236a"
 #define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH))
-#define VERSION_STRING_NOSP "v1.6.1-1441-g14dbdd95e"
-#define VERSION_STRING      " v1.6.1-1441-g14dbdd95e"
+#define VERSION_STRING_NOSP "v1.6.1-1464-ga2127236a"
+#define VERSION_STRING      " v1.6.1-1464-ga2127236a"
diff --git a/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
index 2f3a2d3..9472db1 100644
--- a/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
index a4d23ee..2ffeeb0 100644
--- a/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
index bc99c7a..2ad16428 100644
--- a/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h b/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/win/x64/vp8_rtcd.h b/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
index baafe8be..4e9d062 100644
--- a/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP8_RTCD_H_
 #define VP8_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/win/x64/vp9_rtcd.h b/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
index c8e64b9..4b2b1013 100644
--- a/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VP9_RTCD_H_
 #define VP9_RTCD_H_
 
@@ -11,10 +12,10 @@
  * VP9
  */
 
-#include "vpx/vpx_integer.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
 #include "vp9/common/vp9_filter.h"
+#include "vpx/vpx_integer.h"
 
 struct macroblockd;
 
diff --git a/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
index cebbdef..4f34b7a 100644
--- a/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_DSP_RTCD_H_
 #define VPX_DSP_RTCD_H_
 
diff --git a/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h
index 0ba352cb..19da7a7 100644
--- a/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vpx_scale_rtcd.h
@@ -1,3 +1,4 @@
+// This file is generated. Do not edit.
 #ifndef VPX_SCALE_RTCD_H_
 #define VPX_SCALE_RTCD_H_
 
diff --git a/third_party/tcmalloc/OWNERS b/third_party/tcmalloc/OWNERS
index c9b293a..3af31808 100644
--- a/third_party/tcmalloc/OWNERS
+++ b/third_party/tcmalloc/OWNERS
@@ -1,4 +1,4 @@
-jar@chromium.org
+primiano@chromium.org
 wfh@chromium.org
 
 # COMPONENT: Internals>Core
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index 8e445bb0..c3cc8b5 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -51,9 +51,6 @@
     }
   }
 
-  configs -= [ "//build/config/compiler:chromium_code" ]
-  configs += [ "//build/config/compiler:no_chromium_code" ]
-
   public_configs = [ ":zlib_adler32_simd_config" ]
 }
 
diff --git a/third_party/zlib/adler32_simd.c b/third_party/zlib/adler32_simd.c
index d73f97e..1354915 100644
--- a/third_party/zlib/adler32_simd.c
+++ b/third_party/zlib/adler32_simd.c
@@ -76,7 +76,7 @@
     {
         unsigned n = NMAX / BLOCK_SIZE;  /* The NMAX constraint. */
         if (n > blocks)
-            n = blocks;
+            n = (unsigned) blocks;
         blocks -= n;
 
         const __m128i tap1 =
@@ -237,7 +237,7 @@
     {
         unsigned n = NMAX / BLOCK_SIZE;  /* The NMAX constraint. */
         if (n > blocks)
-            n = blocks;
+            n = (unsigned) blocks;
         blocks -= n;
 
         /*
diff --git a/third_party/zlib/contrib/optimizations/chunkcopy.h b/third_party/zlib/contrib/optimizations/chunkcopy.h
index 2988fb0..fe38be6 100644
--- a/third_party/zlib/contrib/optimizations/chunkcopy.h
+++ b/third_party/zlib/contrib/optimizations/chunkcopy.h
@@ -111,7 +111,7 @@
     unsigned len,
     unsigned char FAR* limit) {
   Assert(out + len <= limit, "chunk copy exceeds safety limit");
-  if (limit - out < CHUNKCOPY_CHUNK_SIZE) {
+  if ((limit - out) < (ptrdiff_t)CHUNKCOPY_CHUNK_SIZE) {
     const unsigned char FAR* Z_RESTRICT rfrom = from;
     if (len & 8) {
       Z_BUILTIN_MEMCPY(out, rfrom, 8);
@@ -396,7 +396,7 @@
     unsigned len,
     unsigned char FAR* limit) {
   Assert(out + len <= limit, "chunk copy exceeds safety limit");
-  if (limit - out < CHUNKCOPY_CHUNK_SIZE * 3) {
+  if ((limit - out) < (ptrdiff_t)(3 * CHUNKCOPY_CHUNK_SIZE)) {
     /* TODO(cavalcantii): try harder to optimise this */
     while (len-- > 0) {
       *out = *(out - dist);
diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
index 8f6cca7..da4dc26 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -151,9 +151,9 @@
 
   for (size_t i = 0; i < bytes_to_send; i++) {
     if (bytes[i] == BATTOR_CONTROL_BYTE_START ||
-        bytes[i] == BATTOR_CONTROL_BYTE_END) {
+        bytes[i] == BATTOR_CONTROL_BYTE_END ||
+        bytes[i] == BATTOR_CONTROL_BYTE_ESCAPE)
       data.push_back(BATTOR_CONTROL_BYTE_ESCAPE);
-    }
 
     data.push_back(bytes[i]);
   }
diff --git a/tools/battor_agent/battor_connection_impl_unittest.cc b/tools/battor_agent/battor_connection_impl_unittest.cc
index 98de9ee..8c384f7a 100644
--- a/tools/battor_agent/battor_connection_impl_unittest.cc
+++ b/tools/battor_agent/battor_connection_impl_unittest.cc
@@ -310,6 +310,98 @@
   ASSERT_FALSE(GetOpenSuccess());
 }
 
+TEST_F(BattOrConnectionImplTest, ControlSendEscapesStartBytesCorrectly) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  SendControlMessage(
+      BATTOR_CONTROL_MESSAGE_TYPE_INIT,
+      BATTOR_CONTROL_BYTE_START,
+      BATTOR_CONTROL_BYTE_START);
+
+  const char expected_data[] = {
+      BATTOR_CONTROL_BYTE_START, BATTOR_MESSAGE_TYPE_CONTROL,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_MESSAGE_TYPE_INIT,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_START,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_START,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_END,
+  };
+
+  ASSERT_TRUE(GetSendSuccess());
+  ASSERT_EQ(0, std::memcmp(ReadMessageRaw(13)->data(), expected_data, 13));
+}
+
+TEST_F(BattOrConnectionImplTest, ControlSendEscapesEndBytesCorrectly) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  SendControlMessage(
+      BATTOR_CONTROL_MESSAGE_TYPE_RESET,
+      BATTOR_CONTROL_BYTE_END,
+      BATTOR_CONTROL_BYTE_END);
+
+  const char expected_data[] = {
+      BATTOR_CONTROL_BYTE_START, BATTOR_MESSAGE_TYPE_CONTROL,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_MESSAGE_TYPE_RESET,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_END,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_END,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_END,
+  };
+
+  ASSERT_TRUE(GetSendSuccess());
+  ASSERT_EQ(0, std::memcmp(ReadMessageRaw(13)->data(), expected_data, 13));
+}
+
+TEST_F(BattOrConnectionImplTest, ControlSendEscapesEscapeBytesCorrectly) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  SendControlMessage(
+      BATTOR_CONTROL_MESSAGE_TYPE_SELF_TEST,
+      BATTOR_CONTROL_BYTE_ESCAPE,
+      BATTOR_CONTROL_BYTE_ESCAPE);
+
+  const char expected_data[] = {
+      BATTOR_CONTROL_BYTE_START, BATTOR_MESSAGE_TYPE_CONTROL,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_MESSAGE_TYPE_SELF_TEST,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_ESCAPE,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_ESCAPE, BATTOR_CONTROL_BYTE_ESCAPE,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_END,
+  };
+
+  ASSERT_TRUE(GetSendSuccess());
+  ASSERT_EQ(0, std::memcmp(ReadMessageRaw(13)->data(), expected_data, 13));
+}
+
+TEST_F(BattOrConnectionImplTest, ControlSendEscapesParametersCorrectly) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  // Check if the two control parameters are ordered and escaped properly.
+  // This also checks the byte ordering of the two 16-bit control message
+  // parameters, which should be little-endian on the wire.
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_READ_SD_UART, 0x0100, 0x0002);
+
+  const char expected_data[] = {
+      BATTOR_CONTROL_BYTE_START, BATTOR_MESSAGE_TYPE_CONTROL,
+      BATTOR_CONTROL_MESSAGE_TYPE_READ_SD_UART,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x01,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x02,
+      BATTOR_CONTROL_BYTE_ESCAPE, 0x00,
+      BATTOR_CONTROL_BYTE_END,
+  };
+
+  ASSERT_TRUE(GetSendSuccess());
+  ASSERT_EQ(0, std::memcmp(ReadMessageRaw(12)->data(), expected_data, 12));
+}
+
 TEST_F(BattOrConnectionImplTest, InitSendsCorrectBytes) {
   OpenConnection();
   AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
diff --git a/tools/chrome_proxy/webdriver/lite_page.py b/tools/chrome_proxy/webdriver/lite_page.py
index d502901e..b0d1d54 100644
--- a/tools/chrome_proxy/webdriver/lite_page.py
+++ b/tools/chrome_proxy/webdriver/lite_page.py
@@ -69,6 +69,7 @@
   # directive is provided when always-on.
   # Note: this test is only on M-60+ which supports exp=force_lite_page
   @ChromeVersionEqualOrAfterM(60)
+  @ChromeVersionBeforeM(65)
   def testLitePageForcedExperiment(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
@@ -112,6 +113,7 @@
   # Checks that a Lite Page is not served for the Cellular-Only option but
   # not on cellular connection.
   @ChromeVersionEqualOrAfterM(61)
+  @ChromeVersionBeforeM(65)
   def testLitePageNotAcceptedForCellularOnlyFlag(self):
     with TestDriver() as test_driver:
       test_driver.AddChromeArg('--enable-spdy-proxy-auth')
@@ -144,6 +146,7 @@
   # of the page and is able to load all resources. This test is only run on
   # Android because it depends on window size of the browser.
   @AndroidOnly
+  @ChromeVersionBeforeM(65)
   def testLitePageBTF(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
@@ -193,7 +196,7 @@
   # bottom of the page and is able to load all resources. This test is only run
   # on Android because it depends on window size of the browser.
   @AndroidOnly
-  @ChromeVersionEqualOrAfterM(65)
+  @ChromeVersionEqualOrAfterM(61)
   def testLitePageBTFNano(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
diff --git a/tools/chrome_proxy/webdriver/lofi.py b/tools/chrome_proxy/webdriver/lofi.py
index c85603b..59caa20 100644
--- a/tools/chrome_proxy/webdriver/lofi.py
+++ b/tools/chrome_proxy/webdriver/lofi.py
@@ -13,6 +13,7 @@
   #  Checks that the compressed image is below a certain threshold.
   #  The test page is uncacheable otherwise a cached page may be served that
   #  doesn't have the correct via headers.
+  @ChromeVersionBeforeM(65)
   def testLoFi(self):
     with TestDriver() as test_driver:
       test_driver.AddChromeArg('--enable-spdy-proxy-auth')
@@ -41,8 +42,41 @@
       histogram = test_driver.GetHistogram('Previews.InfoBarAction.LoFi', 5)
       self.assertEqual(1, histogram['count'])
 
+  #  Checks that the compressed image is below a certain threshold.
+  #  The test page is uncacheable otherwise a cached page may be served that
+  #  doesn't have the correct via headers.
+  @ChromeVersionEqualOrAfterM(65)
+  def testLoFiWithServerPreviewsFlag(self):
+    with TestDriver() as test_driver:
+      test_driver.AddChromeArg('--enable-spdy-proxy-auth')
+      test_driver.AddChromeArg('--enable-features='
+                               'DataReductionProxyDecidesTransform')
+      # Disable server experiments such as tamper detection.
+      test_driver.AddChromeArg('--data-reduction-proxy-server-experiments-'
+                               'disabled')
+      test_driver.AddChromeArg('--force-fieldtrial-params='
+                               'NetworkQualityEstimator.Enabled:'
+                               'force_effective_connection_type/Slow2G')
+      test_driver.AddChromeArg('--force-fieldtrials=NetworkQualityEstimator/'
+                               'Enabled')
+
+      test_driver.LoadURL('http://check.googlezip.net/static/index.html')
+
+      lofi_responses = 0
+      for response in test_driver.GetHTTPResponses():
+        if not response.url.endswith('png'):
+          continue
+        if not response.request_headers:
+          continue
+        if (self.checkLoFiResponse(response, True)):
+          lofi_responses = lofi_responses + 1
+
+      # Verify that Lo-Fi responses were seen.
+      self.assertNotEqual(0, lofi_responses)
+
   # Checks that LoFi images are served when LoFi slow connections are used and
   # the network quality estimator returns Slow2G.
+  @ChromeVersionBeforeM(65)
   def testLoFiSlowConnection(self):
     with TestDriver() as test_driver:
       test_driver.AddChromeArg('--enable-spdy-proxy-auth')
@@ -166,6 +200,7 @@
   # enabled and Lo-Fi disabled and the same test page is loaded. This third page
   # load should not pick the Lo-Fi placeholder from cache and original image
   # should be loaded.
+  @ChromeVersionBeforeM(65)
   def testLoFiCacheBypass(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
@@ -236,9 +271,97 @@
       # Verify that responses were seen.
       self.assertNotEqual(0, responses)
 
+  # Checks that Lo-Fi placeholder images are not loaded from cache on page
+  # reloads when Lo-Fi mode is disabled or data reduction proxy is disabled.
+  # First a test page is opened with Lo-Fi and chrome proxy enabled. This allows
+  # Chrome to cache the Lo-Fi placeholder image. The browser is restarted with
+  # chrome proxy disabled and the same test page is loaded. This second page
+  # load should not pick the Lo-Fi placeholder from cache and original image
+  # should be loaded. Finally, the browser is restarted with chrome proxy
+  # enabled and Lo-Fi disabled and the same test page is loaded. This third page
+  # load should not pick the Lo-Fi placeholder from cache and original image
+  # should be loaded.
+  @ChromeVersionEqualOrAfterM(65)
+  def testLoFiCacheBypassWithServerPreviewsFlag(self):
+    # If it was attempted to run with another experiment, skip this test.
+    if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
+        in common.ParseFlags().browser_args):
+      self.skipTest('This test cannot be run with other experiments.')
+    with TestDriver() as test_driver:
+      # First page load, enable Lo-Fi and chrome proxy. Disable server
+      # experiments such as tamper detection. This test should be run with
+      # --profile-type=default command line for the same user profile and cache
+      # to be used across the two page loads.
+      test_driver.AddChromeArg('--enable-spdy-proxy-auth')
+      test_driver.AddChromeArg('--enable-features='
+                               'DataReductionProxyDecidesTransform')
+      test_driver.AddChromeArg('--profile-type=default')
+      test_driver.AddChromeArg('--data-reduction-proxy-server-experiments-'
+                               'disabled')
+      test_driver.AddChromeArg('--force-fieldtrial-params='
+                               'NetworkQualityEstimator.Enabled:'
+                               'force_effective_connection_type/Slow2G')
+      test_driver.AddChromeArg('--force-fieldtrials=NetworkQualityEstimator/'
+                               'Enabled')
+
+      test_driver.LoadURL('http://check.googlezip.net/cacheable/test.html')
+
+      lofi_responses = 0
+      for response in test_driver.GetHTTPResponses():
+        if not response.url.endswith('png'):
+          continue
+        if not response.request_headers:
+          continue
+        if (self.checkLoFiResponse(response, True)):
+          lofi_responses = lofi_responses + 1
+
+      # Verify that Lo-Fi responses were seen.
+      self.assertNotEqual(0, lofi_responses)
+
+      # Second page load with the chrome proxy off.
+      test_driver._StopDriver()
+      test_driver.RemoveChromeArg('--enable-spdy-proxy-auth')
+      test_driver.LoadURL('http://check.googlezip.net/cacheable/test.html')
+
+      responses = 0
+      for response in test_driver.GetHTTPResponses():
+        if not response.url.endswith('png'):
+          continue
+        if not response.request_headers:
+          continue
+        responses = responses + 1
+        self.assertNotHasChromeProxyViaHeader(response)
+        self.checkLoFiResponse(response, False)
+
+      # Verify that responses were seen.
+      self.assertNotEqual(0, responses)
+
+      # Third page load with the chrome proxy on and Lo-Fi off.
+      test_driver._StopDriver()
+      test_driver.AddChromeArg('--enable-spdy-proxy-auth')
+      test_driver.RemoveChromeArg('--enable-features='
+                                  'DataReductionProxyDecidesTransform')
+      test_driver.AddChromeArg('--disable-features='
+                               'DataReductionProxyDecidesTransform')
+      test_driver.LoadURL('http://check.googlezip.net/cacheable/test.html')
+
+      responses = 0
+      for response in test_driver.GetHTTPResponses():
+        if not response.url.endswith('png'):
+          continue
+        if not response.request_headers:
+          continue
+        responses = responses + 1
+        self.assertHasChromeProxyViaHeader(response)
+        self.checkLoFiResponse(response, False)
+
+      # Verify that responses were seen.
+      self.assertNotEqual(0, responses)
+
   # Checks that LoFi images are served and the force empty image experiment
   # directive is provided when LoFi is always-on without Lite Pages enabled.
   @ChromeVersionEqualOrAfterM(61)
+  @ChromeVersionBeforeM(65)
   def testLoFiForcedExperiment(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
diff --git a/tools/grit/grit/node/misc.py b/tools/grit/grit/node/misc.py
index 7cff4930..174e5b2 100755
--- a/tools/grit/grit/node/misc.py
+++ b/tools/grit/grit/node/misc.py
@@ -457,6 +457,11 @@
 
     # Check if the input is required for any output configuration.
     input_files = set()
+    # Collect even inactive PartNodes since they affect ID assignments.
+    for node in self:
+      if isinstance(node, misc.PartNode):
+        input_files.add(self.ToRealPath(node.GetInputPath()))
+
     old_output_language = self.output_language
     for lang, ctx, fallback in self.GetConfigurations():
       self.SetOutputLanguage(lang or self.GetSourceLanguage())
@@ -464,7 +469,7 @@
       self.SetFallbackToDefaultLayout(fallback)
 
       for node in self.ActiveDescendants():
-        if isinstance(node, (io.FileNode, include.IncludeNode, misc.PartNode,
+        if isinstance(node, (io.FileNode, include.IncludeNode,
                              structure.StructureNode, variant.SkeletonNode)):
           input_path = node.GetInputPath()
           if input_path is not None:
diff --git a/tools/grit/grit/testdata/default_100_percent/a.png b/tools/grit/grit/testdata/default_100_percent/a.png
index 7898192..5d50890 100644
--- a/tools/grit/grit/testdata/default_100_percent/a.png
+++ b/tools/grit/grit/testdata/default_100_percent/a.png
Binary files differ
diff --git a/tools/grit/grit/testdata/depfile.grd b/tools/grit/grit/testdata/depfile.grd
new file mode 100644
index 0000000..e2f7191
--- /dev/null
+++ b/tools/grit/grit/testdata/depfile.grd
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
+<grit
+    base_dir="."
+    latest_public_release="0"
+    current_release="1">
+  <outputs>
+    <output filename="default_100_percent.pak" lang="en" type="data_package" context="default_100_percent" />
+    <output filename="special_100_percent.pak" lang="en" type="data_package" context="special_100_percent" />
+  </outputs>
+  <release seq="1">
+    <structures fallback_to_low_resolution="true">
+      <if expr="False">
+        <part file="grit_part.grdp" />
+      </if>
+      <structure type="chrome_scaled_image" name="IDR_A" file="a.png" />
+    </structures>
+  </release>
+</grit>
diff --git a/tools/grit/grit/testdata/grit_part.grdp b/tools/grit/grit/testdata/grit_part.grdp
new file mode 100644
index 0000000..c8e9d926
--- /dev/null
+++ b/tools/grit/grit/testdata/grit_part.grdp
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grit-part>
+  <!-- Important for test purposes that this file not exist. -->
+  <structure type="chrome_scaled_image" name="IDR_DOES_NOT_EXIST" file="does-not-exist.png" />
+</grit-part>
diff --git a/tools/grit/grit/testdata/special_100_percent/a.png b/tools/grit/grit/testdata/special_100_percent/a.png
index 7898192..5d50890 100644
--- a/tools/grit/grit/testdata/special_100_percent/a.png
+++ b/tools/grit/grit/testdata/special_100_percent/a.png
Binary files differ
diff --git a/tools/grit/grit/tool/build_unittest.py b/tools/grit/grit/tool/build_unittest.py
index 1750bfc..d6e3727 100755
--- a/tools/grit/grit/tool/build_unittest.py
+++ b/tools/grit/grit/tool/build_unittest.py
@@ -39,7 +39,7 @@
     builder = build.RcBuilder()
     class DummyOpts(object):
       def __init__(self):
-        self.input = util.PathFromRoot('grit/testdata/substitute.grd')
+        self.input = util.PathFromRoot('grit/testdata/depfile.grd')
         self.verbose = False
         self.extra_verbose = False
     expected_dep_file = os.path.join(output_dir, 'substitute.grd.d')
@@ -53,10 +53,12 @@
       (dep_output_file, deps_string) = line.split(': ')
       deps = deps_string.split(' ')
 
-      self.failUnlessEqual("resource.h", dep_output_file)
-      self.failUnlessEqual(1, len(deps))
-      self.failUnlessEqual(deps[0],
-          util.PathFromRoot('grit/testdata/substitute.xmb'))
+      self.failUnlessEqual("default_100_percent.pak", dep_output_file)
+      self.failUnlessEqual(deps, [
+          util.PathFromRoot('grit/testdata/default_100_percent/a.png'),
+          util.PathFromRoot('grit/testdata/grit_part.grdp'),
+          util.PathFromRoot('grit/testdata/special_100_percent/a.png'),
+      ])
 
   def testGenerateDepFileWithResourceIds(self):
     output_dir = tempfile.mkdtemp()
@@ -374,9 +376,9 @@
       deps = deps_string.split(' ')
 
       self.failUnlessEqual(expected_stamp_file_name, dep_output_file)
-      self.failUnlessEqual(1, len(deps))
-      self.failUnlessEqual(deps[0],
-          util.PathFromRoot('grit/testdata/substitute.xmb'))
+      self.failUnlessEqual(deps, [
+          util.PathFromRoot('grit/testdata/substitute.xmb'),
+      ])
 
 
 if __name__ == '__main__':
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 6d93640..ff4610b 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -966,7 +966,6 @@
     bool verified_flush = false;
     gpu::CommandBufferNamespace namespace_id =
         gpu::CommandBufferNamespace::INVALID;
-    int32_t extra_data_field = 0;
     gpu::CommandBufferId command_buffer_id;
     uint64_t release_count = 0;
 
@@ -974,15 +973,13 @@
       return false;
     if (!FuzzParam(&namespace_id, fuzzer))
       return false;
-    if (!FuzzParam(&extra_data_field, fuzzer))
-      return false;
     if (!FuzzParam(&command_buffer_id, fuzzer))
       return false;
     if (!FuzzParam(&release_count, fuzzer))
       return false;
 
     p->Clear();
-    p->Set(namespace_id, extra_data_field, command_buffer_id, release_count);
+    p->Set(namespace_id, command_buffer_id, release_count);
     if (verified_flush)
       p->SetVerifyFlush();
     return true;
diff --git a/tools/luci-go/linux64/isolate.sha1 b/tools/luci-go/linux64/isolate.sha1
index e49fdc7..9162638 100644
--- a/tools/luci-go/linux64/isolate.sha1
+++ b/tools/luci-go/linux64/isolate.sha1
@@ -1 +1 @@
-0c5f61171e70fabea55489eccb330687e94a43a3
+3edf192dfe8e2b9c5e89e3885b7bb27bac3450f0
diff --git a/tools/luci-go/mac64/isolate.sha1 b/tools/luci-go/mac64/isolate.sha1
index 1c79cd3..d7f394d 100644
--- a/tools/luci-go/mac64/isolate.sha1
+++ b/tools/luci-go/mac64/isolate.sha1
@@ -1 +1 @@
-f79355e863ef6e67a074ed85b043db81376ffbde
+869b8c39e30c2b19fa82be5eb4642f29720ba634
diff --git a/tools/luci-go/win64/isolate.exe.sha1 b/tools/luci-go/win64/isolate.exe.sha1
index 725910c..5f3b0be9 100644
--- a/tools/luci-go/win64/isolate.exe.sha1
+++ b/tools/luci-go/win64/isolate.exe.sha1
@@ -1 +1 @@
-a7682ca46f9ac393f3e8c3b8feb4aa7cef49693f
+dd9791d5ac0e667a17ded140c3bf0bf9673b0da5
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index fbc4134..463e7a1 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -18238,6 +18238,7 @@
   <int value="8" label="MergeHistogramDeltasFromSource"/>
   <int value="9" label="RecordHistogramSnapshotsFromSource"/>
   <int value="10" label="ProvideIndependentMetrics"/>
+  <int value="11" label="ScheduleSourcesCheck Failed"/>
 </enum>
 
 <enum name="FileReaderSyncWorkerType">
@@ -24811,6 +24812,7 @@
   <int value="-1691668194" label="enable-new-bookmark-apps"/>
   <int value="-1691281364" label="enable-notification-action-icons"/>
   <int value="-1686782572" label="ChromeHomeInactivitySheetExpansion:disabled"/>
+  <int value="-1682843294" label="DataReductionProxyDecidesTransform:enabled"/>
   <int value="-1670137340"
       label="OptimizeLoadingIPCForSmallResources:disabled"/>
   <int value="-1669486359" label="ImportantSitesInCBD:enabled"/>
@@ -24994,6 +24996,7 @@
       label="OmniboxUIExperimentHideSuggestionUrlScheme:disabled"/>
   <int value="-1203955801" label="enable-password-change-support:disabled"/>
   <int value="-1203742042" label="enable-gesture-selection"/>
+  <int value="-1201741587" label="DataReductionProxyDecidesTransform:disabled"/>
   <int value="-1201183153" label="enable-centered-app-list"/>
   <int value="-1197035323" label="ZeroSuggestRedirectToChrome:disabled"/>
   <int value="-1195194959" label="XGEOVisibleNetworks:disabled"/>
@@ -25250,6 +25253,7 @@
   <int value="-519960638" label="enable-site-engagement-service"/>
   <int value="-518104091" label="NewAudioRenderingMixingStrategy:enabled"/>
   <int value="-516845951" label="enable-embedded-extension-options"/>
+  <int value="-513305102" label="LanguagesPreference:enabled"/>
   <int value="-512971943" label="disable-one-copy"/>
   <int value="-510488450" label="disable-pnacl"/>
   <int value="-508143738" label="disable-accelerated-fixed-root-background"/>
@@ -25396,6 +25400,7 @@
   <int value="-122492389" label="enable-browser-task-scheduler"/>
   <int value="-120521482" label="DirectManipulationStylus:enabled"/>
   <int value="-119055644" label="GenericSensor:enabled"/>
+  <int value="-110465424" label="PictureInPicture:enabled"/>
   <int value="-108881882" label="NTPCondensedTileLayout:enabled"/>
   <int value="-102537270" label="extension-content-verification"/>
   <int value="-99781021" label="disable-roboto-font-ui"/>
@@ -25788,6 +25793,7 @@
   <int value="1003002105" label="MaterialDesignBookmarks:disabled"/>
   <int value="1004909189"
       label="ContentSuggestionsThumbnailDominantColor:disabled"/>
+  <int value="1005684777" label="PictureInPicture:disabled"/>
   <int value="1007444341" label="enable-prefixed-encrypted-media"/>
   <int value="1015895665" label="drop-sync-credential:enabled"/>
   <int value="1018998019" label="memlog"/>
@@ -26002,6 +26008,7 @@
   <int value="1515196403" label="fast-user-switching"/>
   <int value="1517863401" label="history-entry-requires-user-gesture"/>
   <int value="1529979182" label="EnablePasswordSelection:enabled"/>
+  <int value="1530177325" label="LanguagesPreference:disabled"/>
   <int value="1533111748" label="Multidevice:enabled"/>
   <int value="1536921097" label="NavigationMojoResponse:disabled"/>
   <int value="1538690515" label="OneGoogleBarOnLocalNtp:enabled"/>
@@ -43316,7 +43323,7 @@
   <int value="22" label="YUV420P12"/>
   <int value="23" label="YUV422P12"/>
   <int value="24" label="YUV444P12"/>
-  <int value="25" label="Y8"/>
+  <int value="25" label="Y8 (Deprecated in M65)"/>
   <int value="26" label="Y16"/>
 </enum>
 
@@ -43926,6 +43933,7 @@
   <int value="0" label="Installed via the automatically-triggered prompt"/>
   <int value="1" label="Installed via the menu"/>
   <int value="2" label="Installed via a developer-triggered API call"/>
+  <int value="3" label="Installed via the management API (not reported)"/>
 </enum>
 
 <enum name="WebAudioAutoplayStatus">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index c2a75e8..9b65986 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -25395,6 +25395,9 @@
 </histogram>
 
 <histogram name="Favicons.CandidatesCount">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <owner>fhorschig@chromium.org</owner>
   <summary>
     Records the number of favicon link tags on a page once the page has finished
@@ -25403,6 +25406,9 @@
 </histogram>
 
 <histogram name="Favicons.CandidatesWithDefinedSizesCount">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <owner>fhorschig@chromium.org</owner>
   <summary>
     Records the number of favicon link tags with a non empty sizes attribute
@@ -25411,6 +25417,9 @@
 </histogram>
 
 <histogram name="Favicons.CandidatesWithTouchIconsCount">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <owner>fhorschig@chromium.org</owner>
   <summary>
     Records the number of apple-touch-icon and apple-touch-icon-precomposed link
@@ -25419,6 +25428,9 @@
 </histogram>
 
 <histogram base="true" name="Favicons.DownloadAttempts" units="attempts">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <owner>fhorschig@chromium.org</owner>
   <summary>
     Records the number of icons requested until the best-fitting candidate was
@@ -25429,6 +25441,9 @@
 </histogram>
 
 <histogram name="Favicons.DownloadOutcome" enum="FaviconDownloadStatus">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <owner>fhorschig@chromium.org</owner>
   <summary>
     Records whether a download succeeded, failed or was skipped because it has
@@ -45434,7 +45449,6 @@
 </histogram>
 
 <histogram name="Net.QuicSession.CreationError" enum="QuicSessionErrorCodes">
-  <owner>jar@chromium.org</owner>
   <owner>rch@chromium.org</owner>
   <summary>
     Count of errors during attempts to create a QUIC session (before even using
@@ -46492,7 +46506,6 @@
   <obsolete>
     Replaced by Net.SocketUnchangeableReceiveBuffer 3/31/2014.
   </obsolete>
-  <owner>jar@chromium.org</owner>
   <summary>
     The size of a socket's receive buffer when the attempt to change it via
     setsockopt failed.
@@ -46617,7 +46630,7 @@
 </histogram>
 
 <histogram name="Net.SocketUnchangeableReceiveBuffer" units="Bytes">
-  <owner>jar@chromium.org</owner>
+  <owner>rch@chromium.org</owner>
   <summary>
     The size of a socket's receive buffer when the attempt to change it via
     setsockopt failed.
@@ -46625,7 +46638,7 @@
 </histogram>
 
 <histogram name="Net.SocketUnchangeableSendBuffer" units="Bytes">
-  <owner>jar@chromium.org</owner>
+  <owner>rch@chromium.org</owner>
   <summary>
     The size of a socket's send buffer when the attempt to change it via
     setsockopt failed.
@@ -83777,6 +83790,18 @@
   </summary>
 </histogram>
 
+<histogram name="Startup.Android.Experimental.Cold.TimeToFirstContentfulPaint"
+    units="ms">
+  <owner>pasko@chromium.org</owner>
+  <owner>alexilin@chromium.org</owner>
+  <summary>
+    Android: The time from the earliest entry point in the browser process to
+    the first contentful paint of the first loaded page. It's not recorded when
+    the first loaded page is non http(s) page like a chrome error page, a new
+    tab page, a blank page.
+  </summary>
+</histogram>
+
 <histogram name="Startup.Android.Experimental.Cold.TimeToFirstNavigationCommit"
     units="ms">
   <owner>pasko@chromium.org</owner>
@@ -83784,8 +83809,8 @@
   <summary>
     Android: The time from the earliest entry point in the browser process to
     the moment the first navigation is committed, i.e. when renderer gets the
-    first byte of the document. It excludes all navigations to non http(s) pages
-    like chrome error pages, a new tab page, a blank page.
+    first byte of the document. It's not recorded when the first loaded page is
+    non http(s) page like a chrome error page, a new tab page, a blank page.
   </summary>
 </histogram>
 
@@ -102593,6 +102618,9 @@
 </histogram_suffixes>
 
 <histogram_suffixes name="FaviconIconType" separator=".">
+  <obsolete>
+    Deprecated as of 12/2017.
+  </obsolete>
   <suffix name="Favicons" label="Metrics for regular favicons."/>
   <suffix name="LargeIcons" label="Metrics for large non-touch icons."/>
   <suffix name="TouchIcons" label="Metrics for large touch icons."/>
diff --git a/tools/perf/core/perf_data_generator.py b/tools/perf/core/perf_data_generator.py
index 30784829..74e0c06 100755
--- a/tools/perf/core/perf_data_generator.py
+++ b/tools/perf/core/perf_data_generator.py
@@ -176,6 +176,7 @@
          ('tracing_perftests', 'build73-b1--device2'),
          ('gpu_perftests', 'build73-b1--device2'),
          #  ('cc_perftests', 'build73-b1--device2'),  # crbug.com/721757
+         ('media_perftests', 'build74-b1--device7'),
        ],
        'perf_tests_with_args': [
          ('angle_perftests', 'build73-b1--device4', ['--shard-timeout=180'],
diff --git a/tools/perf/core/perf_data_generator_unittest.py b/tools/perf/core/perf_data_generator_unittest.py
index 22a7977..8438c6b 100644
--- a/tools/perf/core/perf_data_generator_unittest.py
+++ b/tools/perf/core/perf_data_generator_unittest.py
@@ -7,7 +7,6 @@
 from core.perf_data_generator import BenchmarkMetadata
 
 from telemetry import benchmark
-from telemetry import story
 
 import mock
 
@@ -283,24 +282,6 @@
           perf_data_generator.ShouldBenchmarksBeScheduled(
               RegularBenchmark, 'bot_name', os, None))
 
-  def testShouldBenchmarksBeScheduledDisabledButScheduled(self):
-    class RegularBenchmark(benchmark.Benchmark):
-      @classmethod
-      def Name(cls):
-        return 'regular'
-
-      def GetExpectations(self):
-        class Expectations(story.expectations.StoryExpectations):
-          def SetExpectations(self):
-            self.DisableBenchmark([story.expectations.ALL], 'reason')
-        return Expectations()
-
-    valid_os_list = ['mac', 'android', 'windows', 'linux']
-    for os in valid_os_list:
-      self.assertTrue(
-          perf_data_generator.ShouldBenchmarksBeScheduled(
-              RegularBenchmark, 'bot_name', os, None))
-
   def testShouldBenchmarkBeScheduledSupportedPlatform(self):
     class RegularBenchmark(benchmark.Benchmark):
       SUPPORTED_PLATFORMS = []
diff --git a/tools/perf/expectations.config b/tools/perf/expectations.config
index 9819614..0b2dca7d 100644
--- a/tools/perf/expectations.config
+++ b/tools/perf/expectations.config
@@ -57,15 +57,9 @@
 [ All ] loading.mobile/HashOcean [ Skip ]
 crbug.com/776092 [ Cherry_Mobile_Android_One ] loading.mobile/GoogleRedirectToGoogleJapan [ Skip ]
 crbug.com/656861 [ All ] loading.mobile/G1 [ Skip ]
-[ All ] loading.mobile/SBS [ Skip ]
-[ All ] loading.mobile/MLSMatrix [ Skip ]
 [ Nexus_5X ] loading.mobile/Hongkiat [ Skip ]
-[ All ] loading.mobile/GFK [ Skip ]
-[ All ] loading.mobile/FuturaSciences [ Skip ]
 [ Nexus_5X ] loading.mobile/Dramaq [ Skip ]
-[ All ] loading.mobile/EBS [ Skip ]
 [ Nexus_7 ] loading.mobile/Facebook [ Skip ]
-[ All ] loading.mobile/163 [ Skip ]
 
 # Benchmark: memory.long_running_idle_gmail_tbmv2
 crbug.com/611167 [ Android_Svelte ] memory.long_running_idle_gmail_tbmv2/* [ Skip ]
@@ -344,8 +338,6 @@
 
 # Benchmark: wasm
 [ Android ] wasm/WasmTanks [ Skip ]
-crbug.com/788976 [ Cherry_Mobile_Android_One ] wasm/WasmSpaceBuggy [ Skip ]
-crbug.com/788976 [ Android_Webview ] wasm/WasmSpaceBuggy [ Skip ]
 
 ##### Perf FYI benchmarks go after here #####
 # Benchmark: loading.desktop.network_service
diff --git a/tools/perf/page_sets/idle_after_loading_stories.py b/tools/perf/page_sets/idle_after_loading_stories.py
index 7f1a8a7..d42dd99 100644
--- a/tools/perf/page_sets/idle_after_loading_stories.py
+++ b/tools/perf/page_sets/idle_after_loading_stories.py
@@ -51,9 +51,3 @@
     # https://crbug.com/638365.
     for url in SITES:
       self.AddStory(_BasePage(self, url, wait_in_seconds, url))
-
-
-class IdleAfterLoadingStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    self.DisableStory(
-        'http://abcnews.go.com/', [story.expectations.ALL], 'crbug.com/505990')
diff --git a/tools/perf/page_sets/intl_ar_fa_he.py b/tools/perf/page_sets/intl_ar_fa_he.py
index 6b7988c..c329157 100644
--- a/tools/perf/page_sets/intl_ar_fa_he.py
+++ b/tools/perf/page_sets/intl_ar_fa_he.py
@@ -43,8 +43,3 @@
     for url in urls_list:
       for temp in cache_temperatures:
         self.AddStory(IntlArFaHePage(url, self, cache_temperature=temp))
-
-
-class IntlArFaHeStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass
diff --git a/tools/perf/page_sets/intl_es_fr_pt-BR.py b/tools/perf/page_sets/intl_es_fr_pt-BR.py
index a8f65ee0..753e296 100644
--- a/tools/perf/page_sets/intl_es_fr_pt-BR.py
+++ b/tools/perf/page_sets/intl_es_fr_pt-BR.py
@@ -51,8 +51,3 @@
     for url in urls_list:
       for temp in cache_temperatures:
         self.AddStory(IntlEsFrPtBrPage(url, self, cache_temperature=temp))
-
-
-class IntlEsFrPtBrStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass
diff --git a/tools/perf/page_sets/intl_hi_ru.py b/tools/perf/page_sets/intl_hi_ru.py
index 8f98a19c..fd40173 100644
--- a/tools/perf/page_sets/intl_hi_ru.py
+++ b/tools/perf/page_sets/intl_hi_ru.py
@@ -52,7 +52,3 @@
     for url in urls_list:
       for temp in cache_temperatures:
         self.AddStory(IntlHiRuPage(url, self, cache_temperature=temp))
-
-class IntlHiRuStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass
diff --git a/tools/perf/page_sets/intl_ja_zh.py b/tools/perf/page_sets/intl_ja_zh.py
index fb1fdaeb..b5439795 100644
--- a/tools/perf/page_sets/intl_ja_zh.py
+++ b/tools/perf/page_sets/intl_ja_zh.py
@@ -63,8 +63,3 @@
     for url in urls_list:
       for temp in cache_temperatures:
         self.AddStory(IntlJaZhPage(url, self, cache_temperature=temp))
-
-
-class IntlJaZhStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass
diff --git a/tools/perf/page_sets/intl_ko_th_vi.py b/tools/perf/page_sets/intl_ko_th_vi.py
index c5b33f65..928b7245c 100644
--- a/tools/perf/page_sets/intl_ko_th_vi.py
+++ b/tools/perf/page_sets/intl_ko_th_vi.py
@@ -57,8 +57,3 @@
     for url in urls_list:
       for temp in cache_temperatures:
         self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp))
-
-
-class IntlKoThViStoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass
diff --git a/tools/perf/page_sets/key_mobile_sites_smooth.py b/tools/perf/page_sets/key_mobile_sites_smooth.py
index 9d7db3bf..aee9cf1 100644
--- a/tools/perf/page_sets/key_mobile_sites_smooth.py
+++ b/tools/perf/page_sets/key_mobile_sites_smooth.py
@@ -280,9 +280,3 @@
 
     for url in urls_list:
       self.AddStory(KeyMobileSitesSmoothPage(url, self))
-
-
-class KeyMobileSitesSmoothStoryExpectations(
-    story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    pass # No tests disabled.
diff --git a/tools/perf/page_sets/loading_mobile.py b/tools/perf/page_sets/loading_mobile.py
index a6455706..7a7cab7 100644
--- a/tools/perf/page_sets/loading_mobile.py
+++ b/tools/perf/page_sets/loading_mobile.py
@@ -106,22 +106,18 @@
       ('http://www.dawn.com', 'Dawn'),
       ('http://www.thairath.co.th', 'Thairath'),
       ('http://www.hashocean.com', 'HashOcean'),
-      ('http://www.163.com', '163'),
     ], cache_temperatures, traffic_settings)
 
     self.AddStories(['easy_ttfmp'], [
       ('http://www.slideshare.net', 'SlideShare'),
       ('http://www.bradesco.com.br', 'Bradesco'),
       ('http://www.gsshop.com', 'GSShop'),
-      ('http://www.sbs.co.kr', 'SBS'),
-      ('http://www.futura-sciences.com', 'FuturaSciences'),
     ], cache_temperatures, traffic_settings)
 
     self.AddStories(['tough_tti'], [
       ('http://www.thestar.com.my', 'TheStar'),
       ('http://www.58pic.com', '58Pic'),
       ('http://www.hongkiat.com', 'Hongkiat'),
-      ('http://www.ebs.in', 'EBS'),
       ('http://www.ibicn.com', 'IBI'),
     ], cache_temperatures, traffic_settings)
 
@@ -129,8 +125,6 @@
       ('http://www.dramaq.com.tw', 'Dramaq'),
       ('http://www.locanto.in', 'Locanto'),
       ('http://www.francetvinfo.fr', 'FranceTVInfo'),
-      ('http://www.gfk.com', 'GFK'),
-      ('http://www.mlsmatrix.com', 'MLSMatrix'),
     ], cache_temperatures, traffic_settings)
 
   def AddStories(self, tags, urls, cache_temperatures, traffic_settings):
diff --git a/tools/perf/page_sets/top_25_pages.py b/tools/perf/page_sets/top_25_pages.py
index af23583..16e9303 100644
--- a/tools/perf/page_sets/top_25_pages.py
+++ b/tools/perf/page_sets/top_25_pages.py
@@ -61,8 +61,3 @@
       self.AddStory(
           page.Page(url, self, shared_page_state_class=shared_desktop_state,
                     name=url))
-
-class Top25StoryExpectations(story.expectations.StoryExpectations):
-  def SetExpectations(self):
-    self.DisableStory(
-        'http://www.cnn.com', [story.expectations.ALL], 'crbug.com/528472')
diff --git a/tools/traffic_annotation/auditor/instance.cc b/tools/traffic_annotation/auditor/instance.cc
index 5d62576..2644bba7 100644
--- a/tools/traffic_annotation/auditor/instance.cc
+++ b/tools/traffic_annotation/auditor/instance.cc
@@ -470,6 +470,14 @@
   return AuditorResult::Type::RESULT_OK;
 }
 
+int AnnotationInstance::GetContentHashCode() const {
+  AnnotationInstance source_free(*this);
+  std::string content;
+  source_free.proto.clear_source();
+  google::protobuf::TextFormat::PrintToString(source_free.proto, &content);
+  return TrafficAnnotationAuditor::ComputeHashValue(content);
+}
+
 CallInstance::CallInstance() : line_number(0), is_annotated(false) {}
 
 CallInstance::CallInstance(const CallInstance& other)
diff --git a/tools/traffic_annotation/auditor/instance.h b/tools/traffic_annotation/auditor/instance.h
index 1d0c6b80..cd69154 100644
--- a/tools/traffic_annotation/auditor/instance.h
+++ b/tools/traffic_annotation/auditor/instance.h
@@ -82,6 +82,11 @@
            type == Type::ANNOTATION_BRANCHED_COMPLETING;
   }
 
+  // Computes a hashcode for the annotation content. Source field is not used in
+  // this computation as we don't need sensitivity to changes in source
+  // location, i.e. filepath, line number and function.
+  int GetContentHashCode() const;
+
   // Combines |*this| partial annotation with a completing/branched_completing
   // annotation and returns the combined complete annotation.
   AuditorResult CreateCompleteAnnotation(
diff --git a/tools/traffic_annotation/auditor/traffic_annotation_auditor_ui.cc b/tools/traffic_annotation/auditor/traffic_annotation_auditor_ui.cc
index b82e9cf..f8b935c 100644
--- a/tools/traffic_annotation/auditor/traffic_annotation_auditor_ui.cc
+++ b/tools/traffic_annotation/auditor/traffic_annotation_auditor_ui.cc
@@ -190,15 +190,16 @@
                           const std::vector<AnnotationInstance>& annotations) {
   std::vector<std::string> lines;
   std::string title =
-      "Unique ID\tReview by pconunsel\tSender\tDescription\tTrigger\t"
-      "Data\tDestination\tEmpty Policy Justification\tCookies Allowed\t"
-      "Cookies Store\tSetting\tChrome Policy\tComments\tSource File\tHash Code";
+      "Unique ID\tLast Update\tSender\tDescription\tTrigger\tData\t"
+      "Destination\tEmpty Policy Justification\tCookies Allowed\t"
+      "Cookies Store\tSetting\tChrome Policy\tComments\tSource File\t"
+      "ID Hash Code\tContent Hash Code";
 
   for (auto& instance : annotations) {
     // Unique ID
     std::string line = instance.proto.unique_id();
 
-    // Place holder for Review by pcounsel.
+    // Place holder for Last Update Date, will be updated in the scripts.
     line += "\t";
 
     // Semantics.
@@ -273,9 +274,12 @@
     line += base::StringPrintf("\t%s%s?l=%i", kCodeSearchLink.c_str(),
                                source.file().c_str(), source.line());
 
-    // Hash code.
+    // ID Hash code.
     line += base::StringPrintf("\t%i", instance.unique_id_hash_code);
 
+    // Content Hash code.
+    line += base::StringPrintf("\t%i", instance.GetContentHashCode());
+
     lines.push_back(line);
   }
 
diff --git a/tools/traffic_annotation/auditor/traffic_annotation_exporter.cc b/tools/traffic_annotation/auditor/traffic_annotation_exporter.cc
index 00a1f0e..44b8a4a 100644
--- a/tools/traffic_annotation/auditor/traffic_annotation_exporter.cc
+++ b/tools/traffic_annotation/auditor/traffic_annotation_exporter.cc
@@ -61,16 +61,6 @@
   }
 }
 
-// Compute a hashcode for the annotation content. Source field is not used in
-// this computation as we don't need sensitivity to changes in source location,
-// i.e. filepath, line number and function.
-int GetContentHashCode(AnnotationInstance annotation) {
-  std::string content;
-  annotation.proto.clear_source();
-  google::protobuf::TextFormat::PrintToString(annotation.proto, &content);
-  return TrafficAnnotationAuditor::ComputeHashValue(content);
-}
-
 }  // namespace
 
 TrafficAnnotationExporter::AnnotationItem::AnnotationItem()
@@ -193,7 +183,7 @@
     if (annotation.is_merged)
       continue;
 
-    int content_hash_code = GetContentHashCode(annotation);
+    int content_hash_code = annotation.GetContentHashCode();
     // If annotation unique id is already in the imported annotations list,
     // check if other fields have changed.
     if (base::ContainsKey(annotation_items_, annotation.proto.unique_id())) {
diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc
index 2cfa8da7..3d966b3 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -144,12 +144,12 @@
     UMA_HISTOGRAM_ENUMERATION(kAppListFolderOpenedHistogram, kOldFolders,
                               kMaxFolderOpened);
   } else {
+    base::RecordAction(base::UserMetricsAction("AppList_ClickOnApp"));
     item->Activate(event_flags);
     UMA_HISTOGRAM_BOOLEAN(features::IsFullscreenAppListEnabled()
                               ? kAppListAppLaunchedFullscreen
                               : kAppListAppLaunched,
                           false /*not a suggested app*/);
-    base::RecordAction(base::UserMetricsAction("AppList_ClickOnApp"));
   }
 }
 
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index 1282ab6..519d842 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -2235,7 +2235,7 @@
 }
 
 void AppsGridView::MaybeStartPageFlipTimer(const gfx::Point& drag_point) {
-  if (!IsPointWithinDragBuffer(drag_point))
+  if (!IsPointWithinPageFlipBuffer(drag_point))
     StopPageFlipTimer();
   int new_page_flip_target = -1;
 
@@ -2540,19 +2540,20 @@
 }
 
 bool AppsGridView::IsPointWithinDragBuffer(const gfx::Point& point) const {
-  if (is_fullscreen_app_list_enabled_) {
-    gfx::Point point_in_screen = point;
-    ConvertPointToScreen(this, &point_in_screen);
-    const display::Display display =
-        display::Screen::GetScreen()->GetDisplayNearestView(
-            GetWidget()->GetNativeView());
-    return display.work_area().Contains(point_in_screen);
-  }
   gfx::Rect rect(GetLocalBounds());
   rect.Inset(-kDragBufferPx, -kDragBufferPx, -kDragBufferPx, -kDragBufferPx);
   return rect.Contains(point);
 }
 
+bool AppsGridView::IsPointWithinPageFlipBuffer(const gfx::Point& point) const {
+  gfx::Point point_in_screen = point;
+  ConvertPointToScreen(this, &point_in_screen);
+  const display::Display display =
+      display::Screen::GetScreen()->GetDisplayNearestView(
+          GetWidget()->GetNativeView());
+  return display.work_area().Contains(point_in_screen);
+}
+
 void AppsGridView::ButtonPressed(views::Button* sender,
                                  const ui::Event& event) {
   if (dragging())
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index 4357fec..06b94446 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -428,9 +428,13 @@
   void DeleteItemViewAtIndex(int index);
 
   // Returns true if |point| lies within the bounds of this grid view plus a
-  // buffer area surrounding it.
+  // buffer area surrounding it that can trigger drop target change.
   bool IsPointWithinDragBuffer(const gfx::Point& point) const;
 
+  // Returns true if |point| lies within the bounds of this grid view plus a
+  // buffer area surrounding it that can trigger page flip.
+  bool IsPointWithinPageFlipBuffer(const gfx::Point& point) const;
+
   // Overridden from views::ButtonListener:
   void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index a922322..76f5ecd 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -181,19 +181,10 @@
   ]
 
   if (use_x11) {
-    configs += [
-      "//build/config/linux:x11",
-      "//build/config/linux:xrandr",
-    ]
     deps += [
-      "//ui/events:events_base",
-      "//ui/events/devices",
-      "//ui/events/devices/x11",
       "//ui/events/platform/x11",
-      "//ui/gfx/x",
+      "//ui/platform_window/x11",
     ]
-    sources += [ "window_tree_host_x11.cc" ]
-    public += [ "window_tree_host_x11.h" ]
   }
 
   if (is_win) {
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index 9f4dba2..827c9dc 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -1906,7 +1906,7 @@
   EXPECT_FALSE(queued_delegate->scroll_end());
 
   // Move the second touch-point enough so that it is considered a pinch. This
-  // should generate both SCROLL_BEGIN and PINCH_BEGIN gestures.
+  // should generate SCROLL_BEGIN, PINCH_BEGIN, and PINCH_UPDATE gestures.
   queued_delegate->Reset();
   delegate->Reset();
   ui::TouchEvent move(
@@ -1969,7 +1969,7 @@
   EXPECT_TRUE(queued_delegate->scroll_update());
   EXPECT_FALSE(queued_delegate->scroll_end());
   EXPECT_TRUE(queued_delegate->pinch_begin());
-  EXPECT_FALSE(queued_delegate->pinch_update());
+  EXPECT_TRUE(queued_delegate->pinch_update());
   EXPECT_FALSE(queued_delegate->pinch_end());
 }
 
@@ -2024,9 +2024,8 @@
       ui::ET_TOUCH_MOVED, gfx::Point(95, 201), tes.Now(),
       ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, kTouchId1));
   DispatchEventUsingWindowDispatcher(&move3);
-  EXPECT_2_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_3_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE,
+                  ui::ET_GESTURE_PINCH_BEGIN, ui::ET_GESTURE_PINCH_UPDATE);
   EXPECT_EQ(gfx::Rect(10, 10, 85, 191).ToString(),
             delegate->bounding_box().ToString());
 
@@ -2087,10 +2086,10 @@
   DispatchEventUsingWindowDispatcher(&press2);
   EXPECT_FALSE(delegate->pinch_begin());
 
-  // Touch move triggers pinch begin.
+  // Touch move triggers pinch begin and update.
   tes.SendScrollEvent(event_sink(), 130, 230, kTouchId1, delegate.get());
   EXPECT_TRUE(delegate->pinch_begin());
-  EXPECT_FALSE(delegate->pinch_update());
+  EXPECT_TRUE(delegate->pinch_update());
 
   // Touch move triggers pinch update.
   tes.SendScrollEvent(event_sink(), 160, 200, kTouchId1, delegate.get());
@@ -2166,10 +2165,9 @@
       ui::ET_TOUCH_MOVED, gfx::Point(65, 201), tes.Now(),
       ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, kTouchId1));
   DispatchEventUsingWindowDispatcher(&move3);
-  EXPECT_3_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_BEGIN,
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_4_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_BEGIN,
+                  ui::ET_GESTURE_SCROLL_UPDATE, ui::ET_GESTURE_PINCH_BEGIN,
+                  ui::ET_GESTURE_PINCH_UPDATE);
   EXPECT_EQ(gfx::Rect(10, 10, 55, 191).ToString(),
             delegate->bounding_box().ToString());
 
@@ -2511,9 +2509,8 @@
 
   delegate->Reset();
   delegate->ReceivedAck();
-  EXPECT_2_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_3_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE,
+                  ui::ET_GESTURE_PINCH_BEGIN, ui::ET_GESTURE_PINCH_UPDATE);
 
   // Ack the first release. Although the release is processed, it should still
   // generate a pinch-end event.
@@ -3802,10 +3799,9 @@
       ui::ET_TOUCH_MOVED, gfx::Point(350, 300), tes.Now(),
       ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, kTouchId2));
   DispatchEventUsingWindowDispatcher(&move);
-  EXPECT_3_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_BEGIN,
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_4_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_BEGIN,
+                  ui::ET_GESTURE_SCROLL_UPDATE, ui::ET_GESTURE_PINCH_BEGIN,
+                  ui::ET_GESTURE_PINCH_UPDATE);
   EXPECT_EQ(2, handler->touch_pressed_count());
   delegate->Reset();
   handler->Reset();
@@ -4223,7 +4219,7 @@
   EXPECT_TRUE(delegate->scroll_begin());
   EXPECT_TRUE(delegate->scroll_update());
   EXPECT_TRUE(delegate->pinch_begin());
-  EXPECT_FALSE(delegate->pinch_update());
+  EXPECT_TRUE(delegate->pinch_update());
   delegate->Reset();
 
   const float expected_scales[] = {1.5f, 1.2f, 1.125f};
@@ -4370,10 +4366,9 @@
       ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, kTouchId1));
   DispatchEventUsingWindowDispatcher(&move1);
 
-  EXPECT_3_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_BEGIN,
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_4_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_BEGIN,
+                  ui::ET_GESTURE_SCROLL_UPDATE, ui::ET_GESTURE_PINCH_BEGIN,
+                  ui::ET_GESTURE_PINCH_UPDATE);
 
   // No pinch update occurs, as kCompensateForUnstablePinchZoom is on and
   // |min_pinch_update_span_delta| was nonzero, and this is a very small pinch.
@@ -4413,10 +4408,9 @@
       ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, kTouchId1));
   DispatchEventUsingWindowDispatcher(&move1);
 
-  EXPECT_3_EVENTS(delegate->events(),
-                  ui::ET_GESTURE_SCROLL_BEGIN,
-                  ui::ET_GESTURE_SCROLL_UPDATE,
-                  ui::ET_GESTURE_PINCH_BEGIN);
+  EXPECT_4_EVENTS(delegate->events(), ui::ET_GESTURE_SCROLL_BEGIN,
+                  ui::ET_GESTURE_SCROLL_UPDATE, ui::ET_GESTURE_PINCH_BEGIN,
+                  ui::ET_GESTURE_PINCH_UPDATE);
 
   delegate->Reset();
   ui::TouchEvent move2(
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index 16027fa..9f25b25e 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -28,14 +28,16 @@
 #include "ui/platform_window/win/win_window.h"
 #endif
 
+#if defined(USE_X11)
+#include "ui/platform_window/x11/x11_window.h"
+#endif
+
 namespace aura {
 
-#if defined(OS_WIN) || defined(OS_ANDROID) || defined(USE_OZONE)
 // static
 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
   return new WindowTreeHostPlatform(bounds);
 }
-#endif
 
 WindowTreeHostPlatform::WindowTreeHostPlatform(const gfx::Rect& bounds)
     : WindowTreeHostPlatform() {
@@ -48,6 +50,8 @@
   platform_window_.reset(new ui::WinWindow(this, bounds));
 #elif defined(OS_ANDROID)
   platform_window_.reset(new ui::PlatformWindowAndroid(this));
+#elif defined(USE_X11)
+  platform_window_.reset(new ui::X11Window(this, bounds));
 #else
   NOTIMPLEMENTED();
 #endif
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
deleted file mode 100644
index b155321..0000000
--- a/ui/aura/window_tree_host_x11.cc
+++ /dev/null
@@ -1,560 +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.
-
-#include "ui/aura/window_tree_host_x11.h"
-
-#include <strings.h>
-
-#include <algorithm>
-#include <limits>
-#include <string>
-
-#include "base/command_line.h"
-#include "base/macros.h"
-#include "base/stl_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_split.h"
-#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
-#include "base/sys_info.h"
-#include "base/trace_event/trace_event.h"
-#include "build/build_config.h"
-#include "ui/aura/client/cursor_client.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/layout.h"
-#include "ui/base/platform_window_defaults.h"
-#include "ui/base/ui_base_switches.h"
-#include "ui/base/view_prop.h"
-#include "ui/base/x/x11_util.h"
-#include "ui/base/x/x11_window_event_manager.h"
-#include "ui/compositor/compositor.h"
-#include "ui/compositor/dip_util.h"
-#include "ui/compositor/layer.h"
-#include "ui/display/screen.h"
-#include "ui/events/devices/x11/device_data_manager_x11.h"
-#include "ui/events/devices/x11/device_list_cache_x11.h"
-#include "ui/events/devices/x11/touch_factory_x11.h"
-#include "ui/events/event.h"
-#include "ui/events/event_switches.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/events/platform/platform_event_observer.h"
-#include "ui/events/platform/platform_event_source.h"
-#include "ui/events/platform/x11/x11_event_source.h"
-#include "ui/gfx/x/x11.h"
-#include "ui/gfx/x/x11_atom_cache.h"
-
-using std::max;
-using std::min;
-
-namespace aura {
-
-namespace {
-
-constexpr uint32_t kInputEventMask =
-    ButtonPressMask | ButtonReleaseMask | FocusChangeMask | KeyPressMask |
-    KeyReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask;
-
-constexpr uint32_t kEventMask = kInputEventMask | ExposureMask |
-                                VisibilityChangeMask | StructureNotifyMask |
-                                PropertyChangeMask;
-
-::Window FindEventTarget(const base::NativeEvent& xev) {
-  ::Window target = xev->xany.window;
-  if (xev->type == GenericEvent)
-    target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
-  return target;
-}
-
-void SelectXInput2EventsForRootWindow(XDisplay* display, ::Window root_window) {
-  CHECK(ui::IsXInput2Available());
-  unsigned char mask[XIMaskLen(XI_LASTEVENT)] = {};
-  memset(mask, 0, sizeof(mask));
-
-  XISetMask(mask, XI_HierarchyChanged);
-
-  XIEventMask evmask;
-  evmask.deviceid = XIAllDevices;
-  evmask.mask_len = sizeof(mask);
-  evmask.mask = mask;
-  XISelectEvents(display, root_window, &evmask, 1);
-
-#if defined(OS_CHROMEOS)
-  if (base::SysInfo::IsRunningOnChromeOS()) {
-    // It is necessary to listen for touch events on the root window for proper
-    // touch event calibration on Chrome OS, but this is not currently necessary
-    // on the desktop. This seems to fail in some cases (e.g. when logging
-    // in incognito). So select for non-touch events first, and then select for
-    // touch-events (but keep the other events in the mask, i.e. do not memset
-    // |mask| back to 0).
-    // TODO(sad): Figure out why this happens. http://crbug.com/153976
-    XISetMask(mask, XI_TouchBegin);
-    XISetMask(mask, XI_TouchUpdate);
-    XISetMask(mask, XI_TouchEnd);
-    XISelectEvents(display, root_window, &evmask, 1);
-  }
-#endif
-}
-
-}  // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHostX11
-
-WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
-    : xdisplay_(gfx::GetXDisplay()),
-      xwindow_(0),
-      x_root_window_(DefaultRootWindow(xdisplay_)),
-      current_cursor_(ui::CursorType::kNull),
-      window_mapped_(false),
-      bounds_(bounds) {
-  XSetWindowAttributes swa;
-  memset(&swa, 0, sizeof(swa));
-  swa.background_pixmap = x11::None;
-  swa.bit_gravity = NorthWestGravity;
-  swa.override_redirect = ui::UseTestConfigForPlatformWindows();
-  xwindow_ = XCreateWindow(
-      xdisplay_, x_root_window_,
-      bounds.x(), bounds.y(), bounds.width(), bounds.height(),
-      0,               // border width
-      CopyFromParent,  // depth
-      InputOutput,
-      CopyFromParent,  // visual
-      CWBackPixmap | CWBitGravity | CWOverrideRedirect,
-      &swa);
-  if (ui::PlatformEventSource::GetInstance())
-    ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
-
-  xwindow_events_.reset(new ui::XScopedEventSelector(xwindow_, kEventMask));
-  XFlush(xdisplay_);
-
-  if (ui::IsXInput2Available()) {
-    ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_);
-    SelectXInput2EventsForRootWindow(xdisplay_, x_root_window_);
-  }
-
-  // TODO(erg): We currently only request window deletion events. We also
-  // should listen for activation events and anything else that GTK+ listens
-  // for, and do something useful.
-  ::Atom protocols[2];
-  protocols[0] = gfx::GetAtom("WM_DELETE_WINDOW");
-  protocols[1] = gfx::GetAtom("_NET_WM_PING");
-  XSetWMProtocols(xdisplay_, xwindow_, protocols, 2);
-
-  // We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with
-  // the desktop environment.
-  XSetWMProperties(xdisplay_, xwindow_, NULL, NULL, NULL, 0, NULL, NULL, NULL);
-  ui::SetWindowClassHint(xdisplay_, xwindow_, "chromiumos", "ChromiumOS");
-
-  // Likewise, the X server needs to know this window's pid so it knows which
-  // program to kill if the window hangs.
-  // XChangeProperty() expects "pid" to be long.
-  static_assert(sizeof(long) >= sizeof(pid_t),
-                "pid_t should not be larger than long");
-  long pid = getpid();
-  XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom("_NET_WM_PID"), XA_CARDINAL,
-                  32, PropModeReplace, reinterpret_cast<unsigned char*>(&pid),
-                  1);
-
-  XRRSelectInput(xdisplay_, x_root_window_,
-                 RRScreenChangeNotifyMask | RROutputChangeNotifyMask);
-  CreateCompositor();
-  OnAcceleratedWidgetAvailable();
-}
-
-WindowTreeHostX11::~WindowTreeHostX11() {
-  if (ui::PlatformEventSource::GetInstance())
-    ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
-
-  DestroyCompositor();
-  DestroyDispatcher();
-  XDestroyWindow(xdisplay_, xwindow_);
-}
-
-bool WindowTreeHostX11::CanDispatchEvent(const ui::PlatformEvent& event) {
-  ::Window target = FindEventTarget(event);
-  return target == xwindow_ || target == x_root_window_;
-}
-
-uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
-  XEvent* xev = event;
-  if (FindEventTarget(xev) == x_root_window_) {
-    if (xev->type == GenericEvent)
-      DispatchXI2Event(xev);
-    return ui::POST_DISPATCH_NONE;
-  }
-
-  if (xev->type == MotionNotify) {
-    // Discard all but the most recent motion event that targets the same
-    // window with unchanged state.
-    XEvent last_event;
-    while (XPending(xev->xany.display)) {
-      XEvent next_event;
-      XPeekEvent(xev->xany.display, &next_event);
-      if (next_event.type == MotionNotify &&
-          next_event.xmotion.window == xev->xmotion.window &&
-          next_event.xmotion.subwindow == xev->xmotion.subwindow &&
-          next_event.xmotion.state == xev->xmotion.state) {
-        XNextEvent(xev->xany.display, &last_event);
-        xev = &last_event;
-      } else {
-        break;
-      }
-    }
-  }
-
-  if ((xev->type == EnterNotify || xev->type == LeaveNotify) &&
-      xev->xcrossing.detail == NotifyInferior) {
-    // Ignore EventNotify and LeaveNotify  events from children of |xwindow_|.
-    // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
-    // TODO(pkotwicz|tdanderson): Figure out whether the suppression is
-    // necessary. crbug.com/385716
-    return ui::POST_DISPATCH_STOP_PROPAGATION;
-  }
-
-  if (xev->type == EnterNotify ||
-      xev->type == LeaveNotify ||
-      xev->type == KeyPress ||
-      xev->type == KeyRelease ||
-      xev->type == ButtonPress ||
-      xev->type == ButtonRelease ||
-      xev->type == MotionNotify) {
-    switch (ui::EventTypeFromNative(xev)) {
-      case ui::ET_KEY_PRESSED:
-      case ui::ET_KEY_RELEASED: {
-        ui::KeyEvent keydown_event(xev);
-        SendEventToSink(&keydown_event);
-        break;
-      }
-      case ui::ET_MOUSE_MOVED:
-      case ui::ET_MOUSE_DRAGGED:
-      case ui::ET_MOUSE_ENTERED:
-      case ui::ET_MOUSE_EXITED:
-      case ui::ET_MOUSE_PRESSED:
-      case ui::ET_MOUSE_RELEASED: {
-        ui::MouseEvent mouse_event(xev);
-        if (xev->type == EnterNotify) {
-          aura::Window* root_window = window();
-          client::CursorClient* cursor_client =
-              client::GetCursorClient(root_window);
-          if (cursor_client) {
-            const display::Display display =
-                display::Screen::GetScreen()->GetDisplayNearestWindow(
-                    root_window);
-            cursor_client->SetDisplay(display);
-          }
-        }
-
-        TranslateAndDispatchLocatedEvent(&mouse_event);
-        break;
-      }
-      case ui::ET_MOUSEWHEEL: {
-        ui::MouseWheelEvent mouseev(xev);
-        TranslateAndDispatchLocatedEvent(&mouseev);
-        break;
-      }
-      case ui::ET_UNKNOWN:
-        // No event is created for X11-release events for mouse-wheel buttons.
-        break;
-      default:
-         NOTREACHED();
-    }
-    return ui::POST_DISPATCH_STOP_PROPAGATION;
-  }
-
-  switch (xev->type) {
-    case Expose: {
-      gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y,
-                            xev->xexpose.width, xev->xexpose.height);
-      compositor()->ScheduleRedrawRect(damage_rect);
-      break;
-    }
-    case FocusOut:
-      if (xev->xfocus.mode != NotifyGrab)
-        OnHostLostWindowCapture();
-      break;
-    case ConfigureNotify: {
-      DCHECK_EQ(xwindow_, xev->xconfigure.event);
-      DCHECK_EQ(xwindow_, xev->xconfigure.window);
-      // It's possible that the X window may be resized by some other means
-      // than from within aura (e.g. the X window manager can change the
-      // size). Make sure the root window size is maintained properly.
-      int translated_x = xev->xconfigure.x;
-      int translated_y = xev->xconfigure.y;
-      if (!xev->xconfigure.send_event && !xev->xconfigure.override_redirect) {
-        ::Window unused;
-        XTranslateCoordinates(xdisplay_, xwindow_, x_root_window_, 0, 0,
-                              &translated_x, &translated_y, &unused);
-      }
-      gfx::Rect bounds(translated_x, translated_y, xev->xconfigure.width,
-                       xev->xconfigure.height);
-
-      bool size_changed = bounds_.size() != bounds.size();
-      bool origin_changed = bounds_.origin() != bounds.origin();
-      bounds_ = bounds;
-      OnConfigureNotify();
-      if (size_changed)
-        OnHostResizedInPixels(bounds.size());
-      if (origin_changed)
-        OnHostMovedInPixels(bounds_.origin());
-      break;
-    }
-    case GenericEvent:
-      DispatchXI2Event(xev);
-      break;
-    case ClientMessage: {
-      Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]);
-      if (message_type == gfx::GetAtom("WM_DELETE_WINDOW")) {
-        // We have received a close message from the window manager.
-        OnHostCloseRequested();
-      } else if (message_type == gfx::GetAtom("_NET_WM_PING")) {
-        XEvent reply_event = *xev;
-        reply_event.xclient.window = x_root_window_;
-
-        XSendEvent(xdisplay_, reply_event.xclient.window, x11::False,
-                   SubstructureRedirectMask | SubstructureNotifyMask,
-                   &reply_event);
-        XFlush(xdisplay_);
-      }
-      break;
-    }
-    case MappingNotify: {
-      switch (xev->xmapping.request) {
-        case MappingModifier:
-        case MappingKeyboard:
-          XRefreshKeyboardMapping(&xev->xmapping);
-          break;
-        case MappingPointer:
-          ui::DeviceDataManagerX11::GetInstance()->UpdateButtonMap();
-          break;
-        default:
-          NOTIMPLEMENTED() << " Unknown request: " << xev->xmapping.request;
-          break;
-      }
-      break;
-    }
-  }
-  return ui::POST_DISPATCH_STOP_PROPAGATION;
-}
-
-ui::EventSource* WindowTreeHostX11::GetEventSource() {
-  return this;
-}
-
-gfx::AcceleratedWidget WindowTreeHostX11::GetAcceleratedWidget() {
-  return xwindow_;
-}
-
-void WindowTreeHostX11::ShowImpl() {
-  if (!window_mapped_) {
-    // Before we map the window, set size hints. Otherwise, some window managers
-    // will ignore toplevel XMoveWindow commands.
-    XSizeHints size_hints;
-    size_hints.flags = PPosition | PWinGravity;
-    size_hints.x = bounds_.x();
-    size_hints.y = bounds_.y();
-    // Set StaticGravity so that the window position is not affected by the
-    // frame width when running with window manager.
-    size_hints.win_gravity = StaticGravity;
-    XSetWMNormalHints(xdisplay_, xwindow_, &size_hints);
-
-    XMapWindow(xdisplay_, xwindow_);
-
-    // We now block until our window is mapped. Some X11 APIs will crash and
-    // burn if passed |xwindow_| before the window is mapped, and XMapWindow is
-    // asynchronous.
-    if (ui::X11EventSource::GetInstance())
-      ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(xwindow_);
-    window_mapped_ = true;
-  }
-}
-
-void WindowTreeHostX11::HideImpl() {
-  if (window_mapped_) {
-    XWithdrawWindow(xdisplay_, xwindow_, 0);
-    window_mapped_ = false;
-  }
-}
-
-gfx::Rect WindowTreeHostX11::GetBoundsInPixels() const {
-  return bounds_;
-}
-
-void WindowTreeHostX11::SetBoundsInPixels(const gfx::Rect& bounds) {
-  // Even if the host window's size doesn't change, aura's root window
-  // size, which is in DIP, changes when the scale changes.
-  float current_scale = compositor()->device_scale_factor();
-  float new_scale = ui::GetScaleFactorForNativeView(window());
-  bool origin_changed = bounds_.origin() != bounds.origin();
-  bool size_changed = bounds_.size() != bounds.size();
-  XWindowChanges changes = {0};
-  unsigned value_mask = 0;
-
-  if (size_changed) {
-    changes.width = bounds.width();
-    changes.height = bounds.height();
-    value_mask = CWHeight | CWWidth;
-  }
-
-  if (origin_changed) {
-    changes.x = bounds.x();
-    changes.y = bounds.y();
-    value_mask |= CWX | CWY;
-  }
-  if (value_mask)
-    XConfigureWindow(xdisplay_, xwindow_, value_mask, &changes);
-
-  // Assume that the resize will go through as requested, which should be the
-  // case if we're running without a window manager.  If there's a window
-  // manager, it can modify or ignore the request, but (per ICCCM) we'll get a
-  // (possibly synthetic) ConfigureNotify about the actual size and correct
-  // |bounds_| later.
-  bounds_ = bounds;
-  if (origin_changed)
-    OnHostMovedInPixels(bounds.origin());
-  if (size_changed || current_scale != new_scale) {
-    OnHostResizedInPixels(bounds.size());
-  } else {
-    window()->SchedulePaintInRect(window()->bounds());
-  }
-}
-
-gfx::Point WindowTreeHostX11::GetLocationOnScreenInPixels() const {
-  return bounds_.origin();
-}
-
-void WindowTreeHostX11::SetCapture() {
-  // Do not grab X11 input. Grabbing X11 input is asynchronous and this method
-  // is expected to be synchronous. Grabbing X11 input is unnecessary on
-  // ChromeOS because ChromeOS manages all of the X windows. When running
-  // ChromeOS on the desktop for the sake of debugging:
-  // - Implicit pointer grab as a result of pressing a mouse button
-  // - Releasing capture as a result of losing activation (FocusOut)
-  // is sufficient.
-}
-
-void WindowTreeHostX11::ReleaseCapture() {
-}
-
-void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) {
-  if (cursor == current_cursor_)
-    return;
-  current_cursor_ = cursor;
-  SetCursorInternal(cursor);
-}
-
-void WindowTreeHostX11::MoveCursorToScreenLocationInPixels(
-    const gfx::Point& location_in_pixels) {
-  XWarpPointer(xdisplay_, x11::None, x_root_window_, 0, 0, 0, 0,
-               bounds_.x() + location_in_pixels.x(),
-               bounds_.y() + location_in_pixels.y());
-}
-
-void WindowTreeHostX11::OnCursorVisibilityChangedNative(bool show) {
-}
-
-void WindowTreeHostX11::DisableInput() {
-  xwindow_events_.reset(
-      new ui::XScopedEventSelector(xwindow_, kEventMask & ~kInputEventMask));
-  unsigned char mask[XIMaskLen(XI_LASTEVENT)] = {0};
-  XIEventMask evmask;
-  evmask.deviceid = XIAllDevices;
-  evmask.mask_len = sizeof(mask);
-  evmask.mask = mask;
-  XISelectEvents(gfx::GetXDisplay(), xwindow_, &evmask, 1);
-}
-
-void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
-  ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
-  XEvent* xev = event;
-  if (!factory->ShouldProcessXI2Event(xev))
-    return;
-
-  TRACE_EVENT1("input", "WindowTreeHostX11::DispatchXI2Event",
-               "event_latency_us",
-               (ui::EventTimeForNow() - ui::EventTimeFromNative(event)).
-                 InMicroseconds());
-
-  int num_coalesced = 0;
-  XEvent last_event;
-  if (xev->xgeneric.evtype == XI_Motion) {
-    // If this is a motion event, we want to coalesce all pending motion
-    // events that are at the top of the queue. Note, we don't coalesce
-    // touch update events here.
-    num_coalesced = ui::CoalescePendingMotionEvents(xev, &last_event);
-    if (num_coalesced > 0)
-      xev = &last_event;
-  }
-  ui::EventType type = ui::EventTypeFromNative(xev);
-
-  switch (type) {
-    case ui::ET_TOUCH_MOVED:
-    case ui::ET_TOUCH_PRESSED:
-    case ui::ET_TOUCH_CANCELLED:
-    case ui::ET_TOUCH_RELEASED: {
-      ui::TouchEvent touchev(xev);
-      TranslateAndDispatchLocatedEvent(&touchev);
-      break;
-    }
-    case ui::ET_MOUSE_MOVED:
-    case ui::ET_MOUSE_DRAGGED:
-    case ui::ET_MOUSE_PRESSED:
-    case ui::ET_MOUSE_RELEASED:
-    case ui::ET_MOUSE_ENTERED:
-    case ui::ET_MOUSE_EXITED: {
-      ui::MouseEvent mouseev(xev);
-      TranslateAndDispatchLocatedEvent(&mouseev);
-      break;
-    }
-    case ui::ET_MOUSEWHEEL: {
-      ui::MouseWheelEvent mouseev(xev);
-      TranslateAndDispatchLocatedEvent(&mouseev);
-      break;
-    }
-    case ui::ET_SCROLL_FLING_START:
-    case ui::ET_SCROLL_FLING_CANCEL:
-    case ui::ET_SCROLL: {
-      ui::ScrollEvent scrollev(xev);
-      SendEventToSink(&scrollev);
-      break;
-    }
-    case ui::ET_KEY_PRESSED:
-    case ui::ET_KEY_RELEASED: {
-      ui::KeyEvent key_event(xev);
-      SendEventToSink(&key_event);
-      break;
-    }
-    case ui::ET_UMA_DATA:
-      break;
-    case ui::ET_UNKNOWN:
-      break;
-    default:
-      NOTREACHED();
-  }
-
-  // If we coalesced an event we need to free its cookie.
-  if (num_coalesced > 0)
-    XFreeEventData(xev->xgeneric.display, &last_event.xcookie);
-}
-
-void WindowTreeHostX11::SetCursorInternal(gfx::NativeCursor cursor) {
-  XDefineCursor(xdisplay_, xwindow_, cursor.platform());
-}
-
-void WindowTreeHostX11::OnConfigureNotify() {}
-
-void WindowTreeHostX11::TranslateAndDispatchLocatedEvent(
-    ui::LocatedEvent* event) {
-  SendEventToSink(event);
-}
-
-// static
-WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) {
-  return new WindowTreeHostX11(bounds_in_pixels);
-}
-
-}  // namespace aura
diff --git a/ui/aura/window_tree_host_x11.h b/ui/aura/window_tree_host_x11.h
deleted file mode 100644
index f9e1765..0000000
--- a/ui/aura/window_tree_host_x11.h
+++ /dev/null
@@ -1,104 +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_AURA_WINDOW_TREE_HOST_X11_H_
-#define UI_AURA_WINDOW_TREE_HOST_X11_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/macros.h"
-#include "ui/aura/aura_export.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/events/platform/platform_event_dispatcher.h"
-#include "ui/gfx/geometry/insets.h"
-#include "ui/gfx/geometry/rect.h"
-
-// X forward decls to avoid including Xlib.h in a header file.
-typedef struct _XDisplay XDisplay;
-typedef unsigned long XID;
-typedef XID Window;
-
-namespace ui {
-class XScopedEventSelector;
-}
-
-namespace aura {
-
-class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
-                                      public ui::PlatformEventDispatcher {
- public:
-  explicit WindowTreeHostX11(const gfx::Rect& bounds);
-  ~WindowTreeHostX11() override;
-
-  // ui::PlatformEventDispatcher:
-  bool CanDispatchEvent(const ui::PlatformEvent& event) override;
-  uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
-
-  // WindowTreeHost:
-  ui::EventSource* GetEventSource() override;
-  gfx::AcceleratedWidget GetAcceleratedWidget() override;
-  void ShowImpl() override;
-  void HideImpl() override;
-  gfx::Rect GetBoundsInPixels() const override;
-  void SetBoundsInPixels(const gfx::Rect& bounds) override;
-  gfx::Point GetLocationOnScreenInPixels() const override;
-  void SetCapture() override;
-  void ReleaseCapture() override;
-  void SetCursorNative(gfx::NativeCursor cursor_type) override;
-  void MoveCursorToScreenLocationInPixels(
-      const gfx::Point& location_in_pixels) override;
-  void OnCursorVisibilityChangedNative(bool show) override;
-
-  // Deselects mouse and keyboard events on |xwindow_|.
-  void DisableInput();
-
- protected:
-  // Called when X Configure Notify event is recevied.
-  virtual void OnConfigureNotify();
-
-  // Translates the native mouse location into screen coordinates and
-  // dispatches the event via WindowEventDispatcher.
-  virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event);
-
-  ::Window x_root_window() { return x_root_window_; }
-  XDisplay* xdisplay() { return xdisplay_; }
-  const gfx::Rect& bounds() const { return bounds_; }
-
- private:
-  // Dispatches XI2 events. Note that some events targetted for the X root
-  // window are dispatched to the aura root window (e.g. touch events after
-  // calibration).
-  void DispatchXI2Event(const base::NativeEvent& event);
-
-  // Sets the cursor on |xwindow_| to |cursor|.  Does not check or update
-  // |current_cursor_|.
-  void SetCursorInternal(gfx::NativeCursor cursor);
-
-  // The display and the native X window hosting the root window.
-  XDisplay* xdisplay_;
-  ::Window xwindow_;
-
-  // Events selected on |xwindow_|.
-  std::unique_ptr<ui::XScopedEventSelector> xwindow_events_;
-
-  // The native root window.
-  ::Window x_root_window_;
-
-  // Current Aura cursor.
-  gfx::NativeCursor current_cursor_;
-
-  // Is the window mapped to the screen?
-  bool window_mapped_;
-
-  // The bounds of |xwindow_|.
-  gfx::Rect bounds_;
-
-  DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11);
-};
-
-}  // namespace aura
-
-#endif  // UI_AURA_WINDOW_TREE_HOST_X11_H_
diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn
index 0382921..141aff7 100644
--- a/ui/compositor/BUILD.gn
+++ b/ui/compositor/BUILD.gn
@@ -111,8 +111,6 @@
     "test/context_factories_for_test.h",
     "test/draw_waiter_for_test.cc",
     "test/draw_waiter_for_test.h",
-    "test/fake_compositor_lock.cc",
-    "test/fake_compositor_lock.h",
     "test/fake_context_factory.cc",
     "test/fake_context_factory.h",
     "test/in_process_context_factory.cc",
@@ -183,6 +181,7 @@
 test("compositor_unittests") {
   sources = [
     "callback_layer_animation_observer_unittest.cc",
+    "compositor_lock_unittest.cc",
     "compositor_unittest.cc",
     "layer_animation_element_unittest.cc",
     "layer_animation_sequence_unittest.cc",
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 3645718..8120e96 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -70,11 +70,8 @@
       external_begin_frames_enabled_(external_begin_frames_enabled),
       force_software_compositor_(force_software_compositor),
       layer_animator_collection_(this),
-      scheduled_timeout_(base::TimeTicks()),
-      allow_locks_to_extend_timeout_(false),
       is_pixel_canvas_(enable_pixel_canvas),
-      weak_ptr_factory_(this),
-      lock_timeout_weak_ptr_factory_(this),
+      lock_manager_(task_runner, this),
       context_creation_weak_ptr_factory_(this) {
   if (context_factory_private) {
     auto* host_frame_sink_manager =
@@ -617,46 +614,10 @@
   host_->SetDebugState(debug_state);
 }
 
-std::unique_ptr<CompositorLock> Compositor::GetCompositorLock(
-    CompositorLockClient* client,
-    base::TimeDelta timeout) {
-  // This uses the main WeakPtrFactory to break the connection from the lock to
-  // the Compositor when the Compositor is destroyed.
-  auto lock =
-      std::make_unique<CompositorLock>(client, weak_ptr_factory_.GetWeakPtr());
-  bool was_empty = active_locks_.empty();
-  active_locks_.push_back(lock.get());
-
-  bool should_extend_timeout = false;
-  if ((was_empty || allow_locks_to_extend_timeout_) && !timeout.is_zero()) {
-    const base::TimeTicks time_to_timeout = base::TimeTicks::Now() + timeout;
-    // For the first lock, scheduled_timeout.is_null is true,
-    // |time_to_timeout| will always larger than |scheduled_timeout_|. And it
-    // is ok to invalidate the weakptr of |lock_timeout_weak_ptr_factory_|.
-    if (time_to_timeout > scheduled_timeout_) {
-      scheduled_timeout_ = time_to_timeout;
-      should_extend_timeout = true;
-      lock_timeout_weak_ptr_factory_.InvalidateWeakPtrs();
-    }
-  }
-
-  if (was_empty) {
-    host_->SetDeferCommits(true);
-    for (auto& observer : observer_list_)
-      observer.OnCompositingLockStateChanged(this);
-  }
-
-  if (should_extend_timeout) {
-    // The timeout task uses an independent WeakPtrFactory that is invalidated
-    // when all locks are ended to prevent the timeout from leaking into
-    // another lock that should have its own timeout.
-    task_runner_->PostDelayedTask(
-        FROM_HERE,
-        base::Bind(&Compositor::TimeoutLocks,
-                   lock_timeout_weak_ptr_factory_.GetWeakPtr()),
-        timeout);
-  }
-  return lock;
+void Compositor::OnCompositorLockStateChanged(bool locked) {
+  host_->SetDeferCommits(locked);
+  for (auto& observer : observer_list_)
+    observer.OnCompositingLockStateChanged(this);
 }
 
 void Compositor::RequestPresentationTimeForNextFrame(
@@ -664,24 +625,4 @@
   host_->RequestPresentationTimeForNextFrame(std::move(callback));
 }
 
-void Compositor::RemoveCompositorLock(CompositorLock* lock) {
-  base::Erase(active_locks_, lock);
-  if (active_locks_.empty()) {
-    host_->SetDeferCommits(false);
-    for (auto& observer : observer_list_)
-      observer.OnCompositingLockStateChanged(this);
-    lock_timeout_weak_ptr_factory_.InvalidateWeakPtrs();
-    scheduled_timeout_ = base::TimeTicks();
-  }
-}
-
-void Compositor::TimeoutLocks() {
-  // Make a copy, we're going to cause |active_locks_| to become
-  // empty.
-  std::vector<CompositorLock*> locks = active_locks_;
-  for (auto* lock : locks)
-    lock->TimeoutLock();
-  DCHECK(active_locks_.empty());
-}
-
 }  // namespace ui
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 5e54899a..459c984 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -193,7 +193,7 @@
 // view hierarchy.
 class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
                                      public cc::LayerTreeHostSingleThreadClient,
-                                     public CompositorLockDelegate,
+                                     public CompositorLockManagerClient,
                                      public viz::HostFrameSinkClient {
  public:
   Compositor(const viz::FrameSinkId& frame_sink_id,
@@ -367,7 +367,9 @@
   std::unique_ptr<CompositorLock> GetCompositorLock(
       CompositorLockClient* client,
       base::TimeDelta timeout =
-          base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs));
+          base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)) {
+    return lock_manager_.GetCompositorLock(client, timeout);
+  }
 
   // Registers a callback that is run when the next frame successfully makes it
   // to the screen (it's entirely possible some frames may be dropped between
@@ -411,7 +413,10 @@
   void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override;
   void OnFrameTokenChanged(uint32_t frame_token) override;
 
-  bool IsLocked() { return !active_locks_.empty(); }
+  // CompositorLockManagerClient implementation.
+  void OnCompositorLockStateChanged(bool locked) override;
+
+  bool IsLocked() { return lock_manager_.IsLocked(); }
 
   void SetOutputIsSecure(bool output_is_secure);
 
@@ -426,8 +431,8 @@
   int activated_frame_count() const { return activated_frame_count_; }
   float refresh_rate() const { return refresh_rate_; }
 
-  void set_allow_locks_to_extend_timeout(bool allowed) {
-    allow_locks_to_extend_timeout_ = allowed;
+  void SetAllowLocksToExtendTimeout(bool allowed) {
+    lock_manager_.set_allow_locks_to_extend_timeout(allowed);
   }
 
   // If true, all paint commands are recorded at pixel size instead of DIP.
@@ -436,12 +441,6 @@
  private:
   friend class base::RefCounted<Compositor>;
 
-  // CompositorLockDelegate implementation.
-  void RemoveCompositorLock(CompositorLock* lock) override;
-
-  // Causes all active CompositorLocks to be timed out.
-  void TimeoutLocks();
-
   gfx::Size size_;
 
   ui::ContextFactory* context_factory_;
@@ -486,8 +485,6 @@
   // layers on.
   float device_scale_factor_ = 0.f;
 
-  std::vector<CompositorLock*> active_locks_;
-
   LayerAnimatorCollection layer_animator_collection_;
   scoped_refptr<cc::AnimationTimeline> animation_timeline_;
   std::unique_ptr<ScopedAnimationDurationScaleMode> slow_animations_;
@@ -497,15 +494,11 @@
   gfx::ColorSpace output_color_space_;
   gfx::ColorSpace blending_color_space_;
 
-  // The estimated time that the locks will timeout.
-  base::TimeTicks scheduled_timeout_;
-  // If true, the |scheduled_timeout_| might be recalculated and extended.
-  bool allow_locks_to_extend_timeout_;
   // If true, all paint commands are recorded at pixel size instead of DIP.
   const bool is_pixel_canvas_;
 
-  base::WeakPtrFactory<Compositor> weak_ptr_factory_;
-  base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_;
+  CompositorLockManager lock_manager_;
+
   base::WeakPtrFactory<Compositor> context_creation_weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(Compositor);
diff --git a/ui/compositor/compositor_lock.cc b/ui/compositor/compositor_lock.cc
index 8b001de..02c609b 100644
--- a/ui/compositor/compositor_lock.cc
+++ b/ui/compositor/compositor_lock.cc
@@ -4,20 +4,89 @@
 
 #include "ui/compositor/compositor_lock.h"
 
+#include "base/bind.h"
+#include "base/stl_util.h"
+
 namespace ui {
 
+CompositorLockManager::CompositorLockManager(
+    scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+    CompositorLockManagerClient* client)
+    : task_runner_(std::move(task_runner)),
+      client_(client),
+      weak_ptr_factory_(this),
+      lock_timeout_weak_ptr_factory_(this) {}
+
+CompositorLockManager::~CompositorLockManager() = default;
+
+std::unique_ptr<CompositorLock> CompositorLockManager::GetCompositorLock(
+    CompositorLockClient* client,
+    base::TimeDelta timeout) {
+  // This uses the main WeakPtrFactory to break the connection from the lock to
+  // the CompositorLockManager when the CompositorLockManager is destroyed.
+  auto lock =
+      std::make_unique<CompositorLock>(client, weak_ptr_factory_.GetWeakPtr());
+  bool was_empty = active_locks_.empty();
+  active_locks_.push_back(lock.get());
+
+  bool should_extend_timeout = false;
+  if ((was_empty || allow_locks_to_extend_timeout_) && !timeout.is_zero()) {
+    const base::TimeTicks time_to_timeout = base::TimeTicks::Now() + timeout;
+    // For the first lock, scheduled_timeout.is_null is true,
+    // |time_to_timeout| will always larger than |scheduled_timeout_|. And it
+    // is ok to invalidate the weakptr of |lock_timeout_weak_ptr_factory_|.
+    if (time_to_timeout > scheduled_timeout_) {
+      scheduled_timeout_ = time_to_timeout;
+      should_extend_timeout = true;
+      lock_timeout_weak_ptr_factory_.InvalidateWeakPtrs();
+    }
+  }
+
+  if (was_empty)
+    client_->OnCompositorLockStateChanged(true);
+
+  if (should_extend_timeout) {
+    // The timeout task uses an independent WeakPtrFactory that is invalidated
+    // when all locks are ended to prevent the timeout from leaking into
+    // another lock that should have its own timeout.
+    task_runner_->PostDelayedTask(
+        FROM_HERE,
+        base::BindOnce(&CompositorLockManager::TimeoutLocks,
+                       lock_timeout_weak_ptr_factory_.GetWeakPtr()),
+        timeout);
+  }
+  return lock;
+}
+
+void CompositorLockManager::RemoveCompositorLock(CompositorLock* lock) {
+  base::Erase(active_locks_, lock);
+  if (active_locks_.empty()) {
+    client_->OnCompositorLockStateChanged(false);
+    lock_timeout_weak_ptr_factory_.InvalidateWeakPtrs();
+    scheduled_timeout_ = base::TimeTicks();
+  }
+}
+
+void CompositorLockManager::TimeoutLocks() {
+  // Make a copy, we're going to cause |active_locks_| to become empty.
+  std::vector<CompositorLock*> locks = active_locks_;
+  for (auto* lock : locks)
+    lock->TimeoutLock();
+  DCHECK(active_locks_.empty());
+}
+
 CompositorLock::CompositorLock(CompositorLockClient* client,
-                               base::WeakPtr<CompositorLockDelegate> delegate)
-    : client_(client), delegate_(std::move(delegate)) {}
+                               base::WeakPtr<CompositorLockManager> manager)
+    : client_(client), manager_(std::move(manager)) {}
 
 CompositorLock::~CompositorLock() {
-  if (delegate_)
-    delegate_->RemoveCompositorLock(this);
+  if (manager_)
+    manager_->RemoveCompositorLock(this);
 }
 
 void CompositorLock::TimeoutLock() {
-  delegate_->RemoveCompositorLock(this);
-  delegate_ = nullptr;
+  manager_->RemoveCompositorLock(this);
+  manager_ = nullptr;
   if (client_)
     client_->CompositorLockTimedOut();
 }
diff --git a/ui/compositor/compositor_lock.h b/ui/compositor/compositor_lock.h
index 23734739..370724c 100644
--- a/ui/compositor/compositor_lock.h
+++ b/ui/compositor/compositor_lock.h
@@ -5,8 +5,11 @@
 #ifndef UI_COMPOSITOR_COMPOSITOR_LOCK_H_
 #define UI_COMPOSITOR_COMPOSITOR_LOCK_H_
 
+#include <vector>
+
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
 #include "ui/compositor/compositor_export.h"
 
 namespace ui {
@@ -14,6 +17,8 @@
 class Compositor;
 class CompositorLock;
 
+// Implemented by clients which take compositor lock. Used to notify the client
+// when their lock times out.
 class CompositorLockClient {
  public:
   virtual ~CompositorLockClient() {}
@@ -22,12 +27,61 @@
   virtual void CompositorLockTimedOut() = 0;
 };
 
-class CompositorLockDelegate {
+// Implemented by clients which are locked by a compositor lock. Used by the
+// CompositorLockManager to notify their parent that lock state has changed.
+class CompositorLockManagerClient {
  public:
-  virtual ~CompositorLockDelegate() {}
+  virtual ~CompositorLockManagerClient() {}
+
+  // Called when the lock state changes.
+  virtual void OnCompositorLockStateChanged(bool locked) = 0;
+};
+
+// A helper class used to manage compositor locks. Should be created/used by
+// classes which want to provide out compositor locking.
+class COMPOSITOR_EXPORT CompositorLockManager {
+ public:
+  CompositorLockManager(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+                        CompositorLockManagerClient* client);
+  ~CompositorLockManager();
+
+  // Creates a compositor lock. Returns NULL if it is not possible to lock at
+  // this time (i.e. we're waiting to complete a previous unlock). If the
+  // timeout is null, then no timeout is used.
+  std::unique_ptr<CompositorLock> GetCompositorLock(
+      CompositorLockClient* client,
+      base::TimeDelta timeout);
+
+  void set_allow_locks_to_extend_timeout(bool allowed) {
+    allow_locks_to_extend_timeout_ = allowed;
+  }
+
+  bool IsLocked() const { return !active_locks_.empty(); }
+
+  void TimeoutLocksForTesting() { TimeoutLocks(); }
+
+ private:
+  friend class CompositorLock;
+
+  // Causes all active CompositorLocks to be timed out.
+  void TimeoutLocks();
 
   // Called to perform the unlock operation.
-  virtual void RemoveCompositorLock(CompositorLock*) = 0;
+  void RemoveCompositorLock(CompositorLock*);
+
+  // The TaskRunner on which timeouts are run.
+  scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+  // A client which is notified about lock state changes.
+  CompositorLockManagerClient* client_ = nullptr;
+  // The estimated time that the locks will timeout.
+  base::TimeTicks scheduled_timeout_;
+  // If true, the |scheduled_timeout_| might be recalculated and extended.
+  bool allow_locks_to_extend_timeout_ = false;
+  // The set of locks that are held externally.
+  std::vector<CompositorLock*> active_locks_;
+
+  base::WeakPtrFactory<CompositorLockManager> weak_ptr_factory_;
+  base::WeakPtrFactory<CompositorLockManager> lock_timeout_weak_ptr_factory_;
 };
 
 // This class represents a lock on the compositor, that can be used to prevent
@@ -46,18 +100,17 @@
   // |delegate| is used to perform actual unlocking. If |timeout| is zero then
   // no timeout is scheduled, else a timeout is scheduled on the |task_runner|.
   explicit CompositorLock(CompositorLockClient* client,
-                          base::WeakPtr<CompositorLockDelegate> delegate);
+                          base::WeakPtr<CompositorLockManager> manager);
   ~CompositorLock();
 
  private:
-  friend class Compositor;
-  friend class FakeCompositorLock;
+  friend class CompositorLockManager;
 
   // Causes the CompositorLock to end due to a timeout.
   void TimeoutLock();
 
   CompositorLockClient* const client_;
-  base::WeakPtr<CompositorLockDelegate> delegate_;
+  base::WeakPtr<CompositorLockManager> manager_;
 
   DISALLOW_COPY_AND_ASSIGN(CompositorLock);
 };
diff --git a/ui/compositor/compositor_lock_unittest.cc b/ui/compositor/compositor_lock_unittest.cc
new file mode 100644
index 0000000..6ca8cf8
--- /dev/null
+++ b/ui/compositor/compositor_lock_unittest.cc
@@ -0,0 +1,347 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdint.h>
+
+#include "base/test/test_mock_time_task_runner.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/compositor/compositor_lock.h"
+
+using testing::Mock;
+using testing::_;
+
+namespace ui {
+namespace {
+
+// For tests that control time.
+class CompositorLockTest : public testing::Test,
+                           public ui::CompositorLockManagerClient {
+ protected:
+  CompositorLockTest() {}
+  ~CompositorLockTest() override {}
+
+  void SetUp() override {
+    task_runner_ = new base::TestMockTimeTaskRunner;
+    lock_manager_ = std::make_unique<CompositorLockManager>(task_runner_, this);
+  }
+
+  base::TestMockTimeTaskRunner* task_runner() { return task_runner_.get(); }
+
+  CompositorLockManager* lock_manager() { return lock_manager_.get(); }
+
+  void DestroyLockManager() { lock_manager_.reset(); }
+
+  // ui::CompositorLockManagerClient implementation.
+  void OnCompositorLockStateChanged(bool locked) override {
+    EXPECT_EQ(locked, lock_manager_->IsLocked());
+  }
+
+ protected:
+  scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
+  std::unique_ptr<CompositorLockManager> lock_manager_;
+  bool is_locked_ = false;
+};
+
+class MockCompositorLockClient : public ui::CompositorLockClient {
+ public:
+  MOCK_METHOD0(CompositorLockTimedOut, void());
+};
+
+}  // namespace
+
+TEST_F(CompositorLockTest, LocksTimeOut) {
+  std::unique_ptr<CompositorLock> lock;
+
+  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(100);
+
+  {
+    testing::StrictMock<MockCompositorLockClient> lock_client;
+    // This lock has a timeout.
+    lock = lock_manager()->GetCompositorLock(&lock_client, timeout);
+    EXPECT_TRUE(lock_manager()->IsLocked());
+    EXPECT_CALL(lock_client, CompositorLockTimedOut()).Times(1);
+    task_runner()->FastForwardBy(timeout);
+    task_runner()->RunUntilIdle();
+    EXPECT_FALSE(lock_manager()->IsLocked());
+  }
+
+  {
+    testing::StrictMock<MockCompositorLockClient> lock_client;
+    // This lock has no timeout.
+    lock = lock_manager()->GetCompositorLock(&lock_client, base::TimeDelta());
+    EXPECT_TRUE(lock_manager()->IsLocked());
+    EXPECT_CALL(lock_client, CompositorLockTimedOut()).Times(0);
+    task_runner()->FastForwardBy(timeout);
+    task_runner()->RunUntilIdle();
+    EXPECT_TRUE(lock_manager()->IsLocked());
+  }
+}
+
+TEST_F(CompositorLockTest, MultipleLockClients) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
+  // Both locks are grabbed from the Compositor with a separate client.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout);
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+  // Both clients get notified of timeout.
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, ExtendingLifeOfLockDoesntUseDeadClient) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
+
+  // One lock is grabbed from the compositor with a client. The other
+  // extends its lifetime past that of the first.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  // This also locks the compositor and will do so past |lock1| ending.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout);
+  // |lock1| is destroyed, so it won't timeout but |lock2| will.
+  lock1 = nullptr;
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout);
+  task_runner()->RunUntilIdle();
+
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, AddingLocksDoesNotExtendTimeout) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
+
+  // The first lock has a short timeout.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  // The second lock has a longer timeout, but since a lock is active,
+  // the first one is used for both.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout1);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, AllowAndExtendTimeout) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
+
+  // The first lock has a short timeout.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  // Allow locks to extend timeout.
+  lock_manager()->set_allow_locks_to_extend_timeout(true);
+  // The second lock has a longer timeout, so the second one is used for both.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+  lock_manager()->set_allow_locks_to_extend_timeout(false);
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
+  task_runner()->FastForwardBy(timeout1);
+  task_runner()->RunUntilIdle();
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout2 - timeout1);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, ExtendingTimeoutStartingCreatedTime) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(5);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
+
+  // The first lock has a short timeout.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  base::TimeDelta time_elapse = base::TimeDelta::FromMilliseconds(1);
+  task_runner()->FastForwardBy(time_elapse);
+  task_runner()->RunUntilIdle();
+
+  // Allow locks to extend timeout.
+  lock_manager()->set_allow_locks_to_extend_timeout(true);
+  // The second lock has a longer timeout, so the second one is used for both
+  // and start from the time second lock created.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+  lock_manager()->set_allow_locks_to_extend_timeout(false);
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
+  task_runner()->FastForwardBy(timeout1 - time_elapse);
+  task_runner()->RunUntilIdle();
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout2 - (timeout1 - time_elapse));
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, AllowButNotExtendTimeout) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(10);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(1);
+
+  // The first lock has a longer timeout.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  // Allow locks to extend timeout.
+  lock_manager()->set_allow_locks_to_extend_timeout(true);
+  // The second lock has a short timeout, so the first one is used for both.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+  lock_manager()->set_allow_locks_to_extend_timeout(false);
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
+  task_runner()->FastForwardBy(timeout2);
+  task_runner()->RunUntilIdle();
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout1 - timeout2);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, AllowingExtendDoesNotUseDeadClient) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
+
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
+  task_runner()->FastForwardBy(timeout1);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+
+  // Allow locks to extend timeout.
+  lock_manager()->set_allow_locks_to_extend_timeout(true);
+  // |lock1| is timed out already. The second lock can timeout on its own.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+  lock_manager()->set_allow_locks_to_extend_timeout(false);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+  task_runner()->FastForwardBy(timeout2);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, LockIsDestroyedDoesntTimeout) {
+  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
+
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+  // The CompositorLockClient is destroyed when |lock1| is released.
+  lock1 = nullptr;
+  // The client isn't called as a result.
+  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
+  task_runner()->FastForwardBy(timeout);
+  task_runner()->RunUntilIdle();
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, TimeoutEndsWhenLockEnds) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+  testing::StrictMock<MockCompositorLockClient> lock_client2;
+  std::unique_ptr<CompositorLock> lock2;
+
+  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
+  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
+
+  // The first lock has a short timeout.
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, timeout1);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+  // But the first lock is ended before timeout.
+  lock1 = nullptr;
+  EXPECT_FALSE(lock_manager()->IsLocked());
+
+  // The second lock has a longer timeout, and it should use that timeout,
+  // since the first lock is done.
+  lock2 = lock_manager()->GetCompositorLock(&lock_client2, timeout2);
+  EXPECT_TRUE(lock_manager()->IsLocked());
+
+  {
+    // The second lock doesn't timeout from the first lock which has ended.
+    EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
+    task_runner()->FastForwardBy(timeout1);
+    task_runner()->RunUntilIdle();
+  }
+
+  {
+    // The second lock can still timeout on its own though.
+    EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
+    task_runner()->FastForwardBy(timeout2 - timeout1);
+    task_runner()->RunUntilIdle();
+  }
+
+  EXPECT_FALSE(lock_manager()->IsLocked());
+}
+
+TEST_F(CompositorLockTest, CompositorLockOutlivesManager) {
+  testing::StrictMock<MockCompositorLockClient> lock_client1;
+  std::unique_ptr<CompositorLock> lock1;
+
+  lock1 = lock_manager()->GetCompositorLock(&lock_client1, base::TimeDelta());
+  // The compositor is destroyed before the lock.
+  DestroyLockManager();
+  // This doesn't crash.
+  lock1 = nullptr;
+}
+
+}  // namespace ui
diff --git a/ui/compositor/compositor_unittest.cc b/ui/compositor/compositor_unittest.cc
index eccd07a..33e98cc7 100644
--- a/ui/compositor/compositor_unittest.cc
+++ b/ui/compositor/compositor_unittest.cc
@@ -118,11 +118,6 @@
   bool locked_ = false;
 };
 
-class MockCompositorLockClient : public ui::CompositorLockClient {
- public:
-  MOCK_METHOD0(CompositorLockTimedOut, void());
-};
-
 }  // namespace
 
 TEST_F(CompositorTestWithMessageLoop, OutputColorMatrix) {
@@ -188,299 +183,6 @@
   compositor()->RemoveObserver(&observer);
 }
 
-TEST_F(CompositorTestWithMockedTime, LocksTimeOut) {
-  std::unique_ptr<CompositorLock> lock;
-
-  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(100);
-
-  {
-    testing::StrictMock<MockCompositorLockClient> lock_client;
-    // This lock has a timeout.
-    lock = compositor()->GetCompositorLock(&lock_client, timeout);
-    EXPECT_TRUE(compositor()->IsLocked());
-    EXPECT_CALL(lock_client, CompositorLockTimedOut()).Times(1);
-    task_runner()->FastForwardBy(timeout);
-    task_runner()->RunUntilIdle();
-    EXPECT_FALSE(compositor()->IsLocked());
-  }
-
-  {
-    testing::StrictMock<MockCompositorLockClient> lock_client;
-    // This lock has no timeout.
-    lock = compositor()->GetCompositorLock(&lock_client, base::TimeDelta());
-    EXPECT_TRUE(compositor()->IsLocked());
-    EXPECT_CALL(lock_client, CompositorLockTimedOut()).Times(0);
-    task_runner()->FastForwardBy(timeout);
-    task_runner()->RunUntilIdle();
-    EXPECT_TRUE(compositor()->IsLocked());
-  }
-}
-
-TEST_F(CompositorTestWithMockedTime, MultipleLockClients) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
-  // Both locks are grabbed from the Compositor with a separate client.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout);
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout);
-  EXPECT_TRUE(compositor()->IsLocked());
-  // Both clients get notified of timeout.
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, ExtendingLifeOfLockDoesntUseDeadClient) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
-
-  // One lock is grabbed from the compositor with a client. The other
-  // extends its lifetime past that of the first.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  // This also locks the compositor and will do so past |lock1| ending.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout);
-  // |lock1| is destroyed, so it won't timeout but |lock2| will.
-  lock1 = nullptr;
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout);
-  task_runner()->RunUntilIdle();
-
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, AddingLocksDoesNotExtendTimeout) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
-
-  // The first lock has a short timeout.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  // The second lock has a longer timeout, but since a lock is active,
-  // the first one is used for both.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout1);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, AllowAndExtendTimeout) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
-
-  // The first lock has a short timeout.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  // Allow locks to extend timeout.
-  compositor()->set_allow_locks_to_extend_timeout(true);
-  // The second lock has a longer timeout, so the second one is used for both.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-  compositor()->set_allow_locks_to_extend_timeout(false);
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
-  task_runner()->FastForwardBy(timeout1);
-  task_runner()->RunUntilIdle();
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout2 - timeout1);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, ExtendingTimeoutStartingCreatedTime) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(5);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
-
-  // The first lock has a short timeout.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  base::TimeDelta time_elapse = base::TimeDelta::FromMilliseconds(1);
-  task_runner()->FastForwardBy(time_elapse);
-  task_runner()->RunUntilIdle();
-
-  // Allow locks to extend timeout.
-  compositor()->set_allow_locks_to_extend_timeout(true);
-  // The second lock has a longer timeout, so the second one is used for both
-  // and start from the time second lock created.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-  compositor()->set_allow_locks_to_extend_timeout(false);
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
-  task_runner()->FastForwardBy(timeout1 - time_elapse);
-  task_runner()->RunUntilIdle();
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout2 - (timeout1 - time_elapse));
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, AllowButNotExtendTimeout) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(10);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(1);
-
-  // The first lock has a longer timeout.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  // Allow locks to extend timeout.
-  compositor()->set_allow_locks_to_extend_timeout(true);
-  // The second lock has a short timeout, so the first one is used for both.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-  compositor()->set_allow_locks_to_extend_timeout(false);
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
-  task_runner()->FastForwardBy(timeout2);
-  task_runner()->RunUntilIdle();
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout1 - timeout2);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, AllowingExtendDoesNotUseDeadClient) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
-
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(1);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
-  task_runner()->FastForwardBy(timeout1);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-
-  // Allow locks to extend timeout.
-  compositor()->set_allow_locks_to_extend_timeout(true);
-  // |lock1| is timed out already. The second lock can timeout on its own.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-  compositor()->set_allow_locks_to_extend_timeout(false);
-  EXPECT_TRUE(compositor()->IsLocked());
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-  task_runner()->FastForwardBy(timeout2);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, LockIsDestroyedDoesntTimeout) {
-  base::TimeDelta timeout = base::TimeDelta::FromMilliseconds(1);
-
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout);
-  EXPECT_TRUE(compositor()->IsLocked());
-  // The CompositorLockClient is destroyed when |lock1| is released.
-  lock1 = nullptr;
-  // The client isn't called as a result.
-  EXPECT_CALL(lock_client1, CompositorLockTimedOut()).Times(0);
-  task_runner()->FastForwardBy(timeout);
-  task_runner()->RunUntilIdle();
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, TimeoutEndsWhenLockEnds) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-  testing::StrictMock<MockCompositorLockClient> lock_client2;
-  std::unique_ptr<CompositorLock> lock2;
-
-  base::TimeDelta timeout1 = base::TimeDelta::FromMilliseconds(1);
-  base::TimeDelta timeout2 = base::TimeDelta::FromMilliseconds(10);
-
-  // The first lock has a short timeout.
-  lock1 = compositor()->GetCompositorLock(&lock_client1, timeout1);
-  EXPECT_TRUE(compositor()->IsLocked());
-  // But the first lock is ended before timeout.
-  lock1 = nullptr;
-  EXPECT_FALSE(compositor()->IsLocked());
-
-  // The second lock has a longer timeout, and it should use that timeout,
-  // since the first lock is done.
-  lock2 = compositor()->GetCompositorLock(&lock_client2, timeout2);
-  EXPECT_TRUE(compositor()->IsLocked());
-
-  {
-    // The second lock doesn't timeout from the first lock which has ended.
-    EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(0);
-    task_runner()->FastForwardBy(timeout1);
-    task_runner()->RunUntilIdle();
-  }
-
-  {
-    // The second lock can still timeout on its own though.
-    EXPECT_CALL(lock_client2, CompositorLockTimedOut()).Times(1);
-    task_runner()->FastForwardBy(timeout2 - timeout1);
-    task_runner()->RunUntilIdle();
-  }
-
-  EXPECT_FALSE(compositor()->IsLocked());
-}
-
-TEST_F(CompositorTestWithMockedTime, CompositorLockOutlivesCompositor) {
-  testing::StrictMock<MockCompositorLockClient> lock_client1;
-  std::unique_ptr<CompositorLock> lock1;
-
-  lock1 = compositor()->GetCompositorLock(&lock_client1, base::TimeDelta());
-  // The compositor is destroyed before the lock.
-  DestroyCompositor();
-  // This doesn't crash.
-  lock1 = nullptr;
-}
-
 TEST_F(CompositorTestWithMockedTime,
        ReleaseWidgetWithOutputSurfaceNeverCreated) {
   compositor()->SetVisible(false);
diff --git a/ui/compositor/test/fake_compositor_lock.cc b/ui/compositor/test/fake_compositor_lock.cc
deleted file mode 100644
index 98123c0..0000000
--- a/ui/compositor/test/fake_compositor_lock.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/compositor/test/fake_compositor_lock.h"
-
-namespace ui {
-
-FakeCompositorLock::FakeCompositorLock(
-    CompositorLockClient* client,
-    base::WeakPtr<CompositorLockDelegate> delegate)
-    : CompositorLock(client, delegate) {}
-
-}  // namespace
diff --git a/ui/compositor/test/fake_compositor_lock.h b/ui/compositor/test/fake_compositor_lock.h
deleted file mode 100644
index d79b34f..0000000
--- a/ui/compositor/test/fake_compositor_lock.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_COMPOSITOR_FAKE_COMPOSITOR_LOCK_H_
-#define UI_COMPOSITOR_FAKE_COMPOSITOR_LOCK_H_
-
-#include "ui/compositor/compositor_lock.h"
-
-namespace ui {
-
-class FakeCompositorLock : public CompositorLock {
- public:
-  explicit FakeCompositorLock(CompositorLockClient* client,
-                              base::WeakPtr<CompositorLockDelegate> delegate);
-
-  // Allow tests to cause the lock to timeout.
-  using CompositorLock::TimeoutLock;
-};
-
-}  // namespace
-
-#endif  // UI_COMPOSITOR_FAKE_COMPOSITOR_LOCK_H_
diff --git a/ui/display/manager/chromeos/touch_device_manager.cc b/ui/display/manager/chromeos/touch_device_manager.cc
index bb9fbf6..4289ec2 100644
--- a/ui/display/manager/chromeos/touch_device_manager.cc
+++ b/ui/display/manager/chromeos/touch_device_manager.cc
@@ -20,7 +20,7 @@
 namespace display {
 namespace {
 
-using DisplayInfoList = std::vector<ManagedDisplayInfo*>;
+using ManagedDisplayInfoList = std::vector<ManagedDisplayInfo*>;
 using DeviceList = std::vector<ui::TouchscreenDevice>;
 
 constexpr char kFallbackTouchDeviceName[] = "fallback_touch_device_name";
@@ -95,7 +95,7 @@
 
 // Returns a pointer to the internal display from the list of |displays|. Will
 // return null if there is no internal display in the list.
-ManagedDisplayInfo* GetInternalDisplay(DisplayInfoList* displays) {
+ManagedDisplayInfo* GetInternalDisplay(ManagedDisplayInfoList* displays) {
   auto it =
       std::find_if(displays->begin(), displays->end(), &IsInternalDisplay);
   return it == displays->end() ? nullptr : *it;
@@ -116,7 +116,7 @@
 ManagedDisplayInfo* GetBestMatchForDevice(
     const TouchDeviceManager::TouchAssociationMap& touch_associations,
     const TouchDeviceIdentifier& identifier,
-    DisplayInfoList* displays) {
+    ManagedDisplayInfoList* displays) {
   ManagedDisplayInfo* display_info = nullptr;
   base::Time most_recent_timestamp;
 
@@ -260,7 +260,7 @@
   // has been associated, it is removed from the |displays| or |devices| list.
 
   // Construct our initial set of display/devices that we will process.
-  DisplayInfoList displays;
+  ManagedDisplayInfoList displays;
   for (ManagedDisplayInfo& display : *all_displays) {
     // Reset touch support from the display.
     display.set_touch_support(Display::TOUCH_SUPPORT_UNAVAILABLE);
@@ -296,8 +296,9 @@
     LOG(WARNING) << "Unmatched device " << device.name;
 }
 
-void TouchDeviceManager::AssociateInternalDevices(DisplayInfoList* displays,
-                                                  DeviceList* devices) {
+void TouchDeviceManager::AssociateInternalDevices(
+    ManagedDisplayInfoList* displays,
+    DeviceList* devices) {
   VLOG(2) << "Trying to match internal devices (" << displays->size()
           << " displays and " << devices->size() << " devices to match)";
 
@@ -340,8 +341,9 @@
   }
 }
 
-void TouchDeviceManager::AssociateFromHistoricalData(DisplayInfoList* displays,
-                                                     DeviceList* devices) {
+void TouchDeviceManager::AssociateFromHistoricalData(
+    ManagedDisplayInfoList* displays,
+    DeviceList* devices) {
   if (!devices->size() || !displays->size())
     return;
 
@@ -364,7 +366,7 @@
   }
 }
 
-void TouchDeviceManager::AssociateUdlDevices(DisplayInfoList* displays,
+void TouchDeviceManager::AssociateUdlDevices(ManagedDisplayInfoList* displays,
                                              DeviceList* devices) {
   VLOG(2) << "Trying to match udl devices (" << displays->size()
           << " displays and " << devices->size() << " devices to match)";
@@ -385,8 +387,9 @@
   }
 }
 
-void TouchDeviceManager::AssociateSameSizeDevices(DisplayInfoList* displays,
-                                                  DeviceList* devices) {
+void TouchDeviceManager::AssociateSameSizeDevices(
+    ManagedDisplayInfoList* displays,
+    DeviceList* devices) {
   // Associate screens/displays with the same size.
   VLOG(2) << "Trying to match same-size devices (" << displays->size()
           << " displays and " << devices->size() << " devices to match)";
@@ -425,8 +428,9 @@
   }
 }
 
-void TouchDeviceManager::AssociateToSingleDisplay(DisplayInfoList* displays,
-                                                  DeviceList* devices) {
+void TouchDeviceManager::AssociateToSingleDisplay(
+    ManagedDisplayInfoList* displays,
+    DeviceList* devices) {
   // If there is only one display left, then we should associate all input
   // devices with it.
   VLOG(2) << "Trying to match to single display (" << displays->size()
@@ -454,8 +458,9 @@
   devices->clear();
 }
 
-void TouchDeviceManager::AssociateAnyRemainingDevices(DisplayInfoList* displays,
-                                                      DeviceList* devices) {
+void TouchDeviceManager::AssociateAnyRemainingDevices(
+    ManagedDisplayInfoList* displays,
+    DeviceList* devices) {
   if (!displays->size() || !devices->size())
     return;
   VLOG(2) << "Trying to match remaining " << devices->size()
diff --git a/ui/events/cocoa/events_mac.mm b/ui/events/cocoa/events_mac.mm
index a975768f..a0280c53 100644
--- a/ui/events/cocoa/events_mac.mm
+++ b/ui/events/cocoa/events_mac.mm
@@ -78,13 +78,8 @@
 }
 
 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) {
-  NSTimeInterval since_system_startup = [native_event timestamp];
-  // Truncate to extract seconds before doing floating point arithmetic.
-  int64_t seconds = since_system_startup;
-  since_system_startup -= seconds;
-  int64_t microseconds = since_system_startup * 1000000;
-  base::TimeTicks timestamp = ui::EventTimeStampFromSeconds(seconds) +
-         base::TimeDelta::FromMicroseconds(microseconds);
+  base::TimeTicks timestamp =
+      ui::EventTimeStampFromSeconds([native_event timestamp]);
   ValidateEventTimeClock(&timestamp);
   return timestamp;
 }
diff --git a/ui/events/devices/input_device_observer_win.cc b/ui/events/devices/input_device_observer_win.cc
index 5f9196bd..9b3cdc8 100644
--- a/ui/events/devices/input_device_observer_win.cc
+++ b/ui/events/devices/input_device_observer_win.cc
@@ -10,10 +10,10 @@
 #include "base/strings/string16.h"
 
 // This macro provides the implementation for the observer notification methods.
-#define NOTIFY_OBSERVERS(method_decl, observer_call)       \
-  void InputDeviceObserverWin::method_decl {               \
-    for (InputDeviceEventObserver & observer : observers_) \
-      observer.observer_call;                              \
+#define NOTIFY_OBSERVERS_METHOD(method_decl, observer_call) \
+  void InputDeviceObserverWin::method_decl {                \
+    for (InputDeviceEventObserver & observer : observers_)  \
+      observer.observer_call;                               \
   }
 
 namespace ui {
@@ -90,10 +90,10 @@
   observers_.RemoveObserver(observer);
 }
 
-NOTIFY_OBSERVERS(NotifyObserversKeyboardDeviceConfigurationChanged(),
-                 OnKeyboardDeviceConfigurationChanged());
+NOTIFY_OBSERVERS_METHOD(NotifyObserversKeyboardDeviceConfigurationChanged(),
+                        OnKeyboardDeviceConfigurationChanged());
 
-NOTIFY_OBSERVERS(NotifyObserversTouchpadDeviceConfigurationChanged(),
-                 OnTouchpadDeviceConfigurationChanged());
+NOTIFY_OBSERVERS_METHOD(NotifyObserversTouchpadDeviceConfigurationChanged(),
+                        OnTouchpadDeviceConfigurationChanged());
 
 }  // namespace ui
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index 39b8a2d..c933f99d 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -230,7 +230,9 @@
                const MotionEvent& e) override {
     if (ignore_multitouch_zoom_events_ && !detector.InAnchoredScaleMode())
       return false;
+    bool first_scale = false;
     if (!pinch_event_sent_) {
+      first_scale = true;
       Send(CreateGesture(ET_GESTURE_PINCH_BEGIN,
                          e.GetPointerId(),
                          e.GetToolType(),
@@ -259,8 +261,13 @@
       // For historical reasons, Chrome has instead adopted a scale factor
       // computation that is invariant to the focal distance, where
       // the scale delta remains constant if the touch velocity is constant.
-      float dy =
-          (detector.GetCurrentSpanY() - detector.GetPreviousSpanY()) * 0.5f;
+      // Note: Because we calculate the scale here manually based on the
+      // y-span, but the scale factor accounts for slop in the first previous
+      // span, we manaully reproduce the behavior here for previous span y.
+      float prev_y = first_scale
+                         ? config_.gesture_detector_config.touch_slop * 2
+                         : detector.GetPreviousSpanY();
+      float dy = (detector.GetCurrentSpanY() - prev_y) * 0.5f;
       scale = std::pow(scale > 1 ? 1.0f + kDoubleTapDragZoomSpeed
                                  : 1.0f - kDoubleTapDragZoomSpeed,
                        std::abs(dy));
diff --git a/ui/events/gesture_detection/gesture_provider_unittest.cc b/ui/events/gesture_detection/gesture_provider_unittest.cc
index 50390db..39eae93 100644
--- a/ui/events/gesture_detection/gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/gesture_provider_unittest.cc
@@ -179,6 +179,15 @@
     return gestures_.back();
   }
 
+  const GestureEventData& GetNthMostRecentGestureEvent(size_t n) const {
+    EXPECT_FALSE(gestures_.empty());
+    return GetReceivedGesture(GetReceivedGestureCount() - 1 - n);
+  }
+
+  EventType GetNthMostRecentGestureEventType(size_t n) const {
+    return GetNthMostRecentGestureEvent(n).type();
+  }
+
   EventType GetMostRecentGestureEventType() const {
     EXPECT_FALSE(gestures_.empty());
     return gestures_.back().type();
@@ -782,7 +791,9 @@
                             kFakeCoordY + 100);
   EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
-  ASSERT_EQ(ET_GESTURE_PINCH_BEGIN, GetMostRecentGestureEventType());
+  ASSERT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  ASSERT_EQ(ET_GESTURE_PINCH_UPDATE, GetMostRecentGestureEventType());
+  EXPECT_LT(1.f, GetMostRecentGestureEvent().details.scale());
   EXPECT_EQ(BoundsForSingleMockTouchAtLocation(kFakeCoordX, kFakeCoordY + 100),
             GetMostRecentGestureEvent().details.bounding_box_f());
 
@@ -1287,7 +1298,8 @@
   event.SetPrimaryPointerId(motion_event_id);
 
   EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
-  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetMostRecentGestureEventType());
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetMostRecentGestureEventType());
   EXPECT_EQ(motion_event_id, GetMostRecentGestureEvent().motion_event_id);
   EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points());
   EXPECT_TRUE(gesture_provider_->IsDoubleTapInProgress());
@@ -1657,7 +1669,9 @@
                             kFakeCoordY + 100);
   EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
-  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetMostRecentGestureEventType());
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetMostRecentGestureEventType());
+  EXPECT_LT(1.f, GetMostRecentGestureEvent().details.scale());
   EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points());
 
   // Simulate setting a fixed page scale (or a mobile viewport);
@@ -1683,7 +1697,7 @@
   EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points());
 
   // The double-tap gesture has finished, but the page scale is fixed.
-  // The same event sequence should not generate any double tap getsures.
+  // The same event sequence should not generate any double tap gestures.
   gestures_.clear();
   down_time_1 += kOneMicrosecond * 40;
   down_time_2 += kOneMicrosecond * 40;
@@ -2134,7 +2148,8 @@
                             kFakeCoordY - 30);
   EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
-  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetMostRecentGestureEventType());
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetMostRecentGestureEventType());
   EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points());
 
   event = ObtainMotionEvent(down_time_2 + kOneMicrosecond * 2,
@@ -2501,6 +2516,210 @@
   EXPECT_EQ(1U, GetReceivedGestureCount());
 }
 
+// Verify that the event that starts the pinch-zoom by exceeding the touch-slop
+// also generates an update.
+TEST_F(GestureProviderTest, PinchExceedingSlopCausesUpdate) {
+  base::TimeTicks event_time = base::TimeTicks::Now();
+  const float touch_slop = GetTouchSlop();
+  const float min_scaling_span = GetMinScalingSpan();
+  const float raw_offset_x = 3.2f;
+  const float raw_offset_y = 4.3f;
+  int motion_event_id = 6;
+
+  gesture_provider_->SetDoubleTapSupportForPageEnabled(false);
+  gesture_provider_->SetDoubleTapSupportForPlatformEnabled(true);
+  gesture_provider_->SetMultiTouchZoomSupportEnabled(true);
+
+  int secondary_coord_x = kFakeCoordX;
+  int secondary_coord_y = kFakeCoordY + min_scaling_span + 1;
+
+  // First Finger Down
+  MockMotionEvent event =
+      ObtainMotionEvent(event_time, MotionEvent::ACTION_DOWN);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+  EXPECT_EQ(kFakeCoordX, GetMostRecentGestureEvent().x);
+  EXPECT_EQ(kFakeCoordY, GetMostRecentGestureEvent().y);
+
+  // Second Finger Down
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_POINTER_DOWN,
+                            kFakeCoordX, kFakeCoordY, secondary_coord_x,
+                            secondary_coord_y);
+
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+
+  gesture_provider_->OnTouchEvent(event);
+  EXPECT_EQ(1U, GetReceivedGestureCount());
+
+  // Move second finger by exactly the touch slop. This shouldn't yet generate
+  // a Pinch Begin.
+  secondary_coord_y += touch_slop * 2;
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(3U, GetReceivedGestureCount());
+  EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
+  EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_UPDATE));
+  EXPECT_FALSE(HasReceivedGesture(ET_GESTURE_PINCH_BEGIN));
+
+  // Move second finger that should *just* cross the slop threshold.
+  secondary_coord_y += 1;
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(6U, GetReceivedGestureCount());
+  EXPECT_EQ(ET_GESTURE_SCROLL_UPDATE, GetNthMostRecentGestureEventType(2));
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetNthMostRecentGestureEventType(0));
+  EXPECT_LT(1.f, GetMostRecentGestureEvent().details.scale());
+}
+
+// Verify that the event that stops the pinch-zoom by exceeding the min scaling
+// span also generates an update.
+TEST_F(GestureProviderTest, PinchBelowMinSpanCausesUpdate) {
+  base::TimeTicks event_time = base::TimeTicks::Now();
+  const float touch_slop = GetTouchSlop();
+  const float min_scaling_span = GetMinScalingSpan();
+  const float raw_offset_x = 3.2f;
+  const float raw_offset_y = 4.3f;
+  int motion_event_id = 6;
+
+  gesture_provider_->SetDoubleTapSupportForPageEnabled(false);
+  gesture_provider_->SetDoubleTapSupportForPlatformEnabled(true);
+  gesture_provider_->SetMultiTouchZoomSupportEnabled(true);
+
+  int secondary_coord_x = kFakeCoordX;
+  int secondary_coord_y = kFakeCoordY + min_scaling_span + touch_slop * 3;
+
+  // First Finger Down
+  MockMotionEvent event =
+      ObtainMotionEvent(event_time, MotionEvent::ACTION_DOWN);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+  EXPECT_EQ(kFakeCoordX, GetMostRecentGestureEvent().x);
+  EXPECT_EQ(kFakeCoordY, GetMostRecentGestureEvent().y);
+
+  // Second Finger Down
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_POINTER_DOWN,
+                            kFakeCoordX, kFakeCoordY, secondary_coord_x,
+                            secondary_coord_y);
+
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+
+  gesture_provider_->OnTouchEvent(event);
+  EXPECT_EQ(1U, GetReceivedGestureCount());
+
+  // Move second finger enough to exceed the touch slop and start zooming.
+  secondary_coord_y -= (touch_slop * 2 + 1);
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(5U, GetReceivedGestureCount());
+  EXPECT_EQ(ET_GESTURE_SCROLL_BEGIN, GetNthMostRecentGestureEventType(3));
+  EXPECT_EQ(ET_GESTURE_SCROLL_UPDATE, GetNthMostRecentGestureEventType(2));
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetNthMostRecentGestureEventType(0));
+
+  // Move second finger so that the span becomes smaller than the min scaling
+  // span. The pinch should end but we should receive an update before it does.
+  secondary_coord_y -= touch_slop * 2;
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(8U, GetReceivedGestureCount());
+  EXPECT_EQ(ET_GESTURE_SCROLL_UPDATE, GetNthMostRecentGestureEventType(2));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetNthMostRecentGestureEventType(1));
+  EXPECT_GT(1.f, GetNthMostRecentGestureEvent(1).details.scale());
+  EXPECT_EQ(ET_GESTURE_PINCH_END, GetNthMostRecentGestureEventType(0));
+}
+
+// Verify that the pinch isn't started until it becomes larger than the min
+// scaling span.
+TEST_F(GestureProviderTest, PinchExceedingSlopWithinMinScale) {
+  base::TimeTicks event_time = base::TimeTicks::Now();
+  const float touch_slop = GetTouchSlop();
+  const float min_scaling_span = GetMinScalingSpan();
+  const float raw_offset_x = 3.2f;
+  const float raw_offset_y = 4.3f;
+  int motion_event_id = 6;
+
+  gesture_provider_->SetDoubleTapSupportForPageEnabled(false);
+  gesture_provider_->SetDoubleTapSupportForPlatformEnabled(true);
+  gesture_provider_->SetMultiTouchZoomSupportEnabled(true);
+
+  int secondary_coord_x = kFakeCoordX;
+  int secondary_coord_y = kFakeCoordY + min_scaling_span / 4;
+
+  // This test only makes sense if the min_scaling_span is greater than the
+  // touch slop span.
+  ASSERT_GT(min_scaling_span, touch_slop * 2);
+
+  // First Finger Down
+  MockMotionEvent event =
+      ObtainMotionEvent(event_time, MotionEvent::ACTION_DOWN);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+  EXPECT_EQ(kFakeCoordX, GetMostRecentGestureEvent().x);
+  EXPECT_EQ(kFakeCoordY, GetMostRecentGestureEvent().y);
+
+  // Second Finger Down
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_POINTER_DOWN,
+                            kFakeCoordX, kFakeCoordY, secondary_coord_x,
+                            secondary_coord_y);
+
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+
+  gesture_provider_->OnTouchEvent(event);
+  EXPECT_EQ(1U, GetReceivedGestureCount());
+
+  // Move second finger to exceed the touch slop. This shouldn't yet generate
+  // a Pinch Begin since we're still within the minimum scaling span.
+  secondary_coord_y += touch_slop * 2 + 1;
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(3U, GetReceivedGestureCount());
+  EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
+  EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_UPDATE));
+  EXPECT_FALSE(HasReceivedGesture(ET_GESTURE_PINCH_BEGIN));
+
+  // Move second finger that should *just* cross the min scaling span threshold.
+  secondary_coord_y = kFakeCoordY + min_scaling_span + 1;
+  event = ObtainMotionEvent(event_time, MotionEvent::ACTION_MOVE, kFakeCoordX,
+                            kFakeCoordY, secondary_coord_x, secondary_coord_y);
+  event.SetPrimaryPointerId(motion_event_id);
+  event.SetRawOffset(raw_offset_x, raw_offset_y);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(6U, GetReceivedGestureCount());
+  EXPECT_EQ(ET_GESTURE_SCROLL_UPDATE, GetNthMostRecentGestureEventType(2));
+  EXPECT_EQ(ET_GESTURE_PINCH_BEGIN, GetNthMostRecentGestureEventType(1));
+  EXPECT_EQ(ET_GESTURE_PINCH_UPDATE, GetNthMostRecentGestureEventType(0));
+
+  // The scale must start from the min scale span threshold, rather than from
+  // the touch_slop so it should be very small.
+  EXPECT_LT(1.f, GetMostRecentGestureEvent().details.scale());
+  EXPECT_GT(1.01f, GetMostRecentGestureEvent().details.scale());
+}
+
 // Verify that pinch zoom only sends updates which exceed the
 // min_pinch_update_span_delta.
 TEST_F(GestureProviderTest, PinchZoomWithThreshold) {
@@ -2549,11 +2768,12 @@
   EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
   EXPECT_EQ(2, GetMostRecentGestureEvent().details.touch_points());
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_PINCH_BEGIN));
-  EXPECT_FALSE(HasReceivedGesture(ET_GESTURE_PINCH_UPDATE));
+  EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_PINCH_UPDATE));
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_BEGIN));
   EXPECT_TRUE(HasReceivedGesture(ET_GESTURE_SCROLL_UPDATE));
 
   // Small move, shouldn't trigger pinch.
+  gestures_.clear();
   event = ObtainMotionEvent(event_time,
                             MotionEvent::ACTION_MOVE,
                             kFakeCoordX,
diff --git a/ui/events/gesture_detection/scale_gesture_detector.cc b/ui/events/gesture_detection/scale_gesture_detector.cc
index 9eb3636..73beab4 100644
--- a/ui/events/gesture_detection/scale_gesture_detector.cc
+++ b/ui/events/gesture_detection/scale_gesture_detector.cc
@@ -21,6 +21,12 @@
 
 const float kScaleFactor = .5f;
 
+// Using a small epsilon when comparing slop distances allows pixel
+// perfect slop determination when using fractional DPI coordinates
+// (assuming the slop region and DPI scale are reasonably
+// proportioned).
+const float kSlopEpsilon = .05f;
+
 }  // namespace
 
 // Note: These constants were taken directly from the default (unscaled)
@@ -56,14 +62,8 @@
       event_before_or_above_starting_gesture_event_(false) {
   DCHECK(listener_);
 
-  // Using a small epsilon when comparing slop distances allows pixel
-  // perfect slop determination when using fractional DPI coordinates
-  // (assuming the slop region and DPI scale are reasonably
-  // proportioned).
-  const float kSlopEpsilon = .05f;
-
-  span_slop_ = config.span_slop + kSlopEpsilon;
-  min_span_ = config.min_scaling_span + kSlopEpsilon;
+  span_slop_ = config.span_slop;
+  min_span_ = config.min_scaling_span;
 }
 
 ScaleGestureDetector::~ScaleGestureDetector() {}
@@ -178,8 +178,7 @@
   const bool was_in_progress = in_progress_;
   focus_x_ = focus_x;
   focus_y_ = focus_y;
-  if (!InAnchoredScaleMode() && in_progress_ &&
-      (span < min_span_ || config_changed)) {
+  if (!InAnchoredScaleMode() && in_progress_ && config_changed) {
     listener_->OnScaleEnd(*this, event);
     ResetScaleWithSpan(span);
   }
@@ -190,11 +189,22 @@
   }
 
   const float min_span = InAnchoredScaleMode() ? span_slop_ : min_span_;
-  if (!in_progress_ && span >= min_span &&
-      (was_in_progress || std::abs(span - initial_span_) > span_slop_)) {
+  bool span_exceeds_min_span = span >= min_span + kSlopEpsilon ||
+                               initial_span_ >= min_span + kSlopEpsilon;
+  if (!in_progress_ && span_exceeds_min_span &&
+      (was_in_progress ||
+       std::abs(span - initial_span_) > span_slop_ + kSlopEpsilon)) {
+    float zoom_sign = span > initial_span_ ? 1 : -1;
+
     prev_span_x_ = curr_span_x_ = span_x;
     prev_span_y_ = curr_span_y_ = span_y;
-    prev_span_ = curr_span_ = span;
+    curr_span_ = span;
+
+    // To ensure we don't lose any delta when the first event crosses the min
+    // and slop thresholds, the prev_span on the first update will be the point
+    // at which zooming would have started.
+    prev_span_ = std::max(initial_span_ + zoom_sign * span_slop_, min_span);
+
     prev_time_ = curr_time_;
     in_progress_ = listener_->OnScaleBegin(*this, event);
   }
@@ -207,9 +217,8 @@
 
     bool update_prev = true;
 
-    if (in_progress_) {
+    if (in_progress_)
       update_prev = listener_->OnScale(*this, event);
-    }
 
     if (update_prev) {
       prev_span_x_ = curr_span_x_;
@@ -219,6 +228,12 @@
     }
   }
 
+  if (!InAnchoredScaleMode() && in_progress_ &&
+      span < min_span_ + kSlopEpsilon) {
+    listener_->OnScaleEnd(*this, event);
+    ResetScaleWithSpan(span);
+  }
+
   return true;
 }
 
@@ -245,20 +260,28 @@
 float ScaleGestureDetector::GetPreviousSpanY() const { return prev_span_y_; }
 
 float ScaleGestureDetector::GetScaleFactor() const {
+  float curr_span = curr_span_;
   if (InAnchoredScaleMode()) {
     // Drag is moving up; the further away from the gesture start, the smaller
     // the span should be, the closer, the larger the span, and therefore the
     // larger the scale.
     const bool scale_up = (event_before_or_above_starting_gesture_event_ &&
-                           (curr_span_ < prev_span_)) ||
+                           (curr_span < prev_span_)) ||
                           (!event_before_or_above_starting_gesture_event_ &&
-                           (curr_span_ > prev_span_));
+                           (curr_span > prev_span_));
     const float span_diff =
-        (std::abs(1.f - (curr_span_ / prev_span_)) * kScaleFactor);
+        (std::abs(1.f - (curr_span / prev_span_)) * kScaleFactor);
     return prev_span_ <= 0 ? 1.f
                            : (scale_up ? (1.f + span_diff) : (1.f - span_diff));
   }
-  return prev_span_ > 0 ? curr_span_ / prev_span_ : 1;
+
+  // If this will be the last update because this event crossed the min
+  // threshold, calculate the update as if the event stopped right at the
+  // boundary.
+  if (curr_span < min_span_ + kSlopEpsilon)
+    curr_span = min_span_;
+
+  return prev_span_ > 0 ? curr_span / prev_span_ : 1;
 }
 
 base::TimeDelta ScaleGestureDetector::GetTimeDelta() const {
diff --git a/ui/gfx/codec/chromeos/jpeg_codec_robust_slow.cc b/ui/gfx/codec/chromeos/jpeg_codec_robust_slow.cc
index 60fd0833..1ab3208d 100644
--- a/ui/gfx/codec/chromeos/jpeg_codec_robust_slow.cc
+++ b/ui/gfx/codec/chromeos/jpeg_codec_robust_slow.cc
@@ -25,13 +25,13 @@
 namespace {
 
 // used to pass error info through the JPEG library
-struct CoderErrorMgr {
+struct IjgCoderErrorMgr {
   jpeg_error_mgr pub;
   jmp_buf setjmp_buffer;
 };
 
-void ErrorExit(jpeg_common_struct* cinfo) {
-  CoderErrorMgr* err = reinterpret_cast<CoderErrorMgr*>(cinfo->err);
+void IjgErrorExit(jpeg_common_struct* cinfo) {
+  IjgCoderErrorMgr* err = reinterpret_cast<IjgCoderErrorMgr*>(cinfo->err);
 
   // Return control to the setjmp point.
   longjmp(err->setjmp_buffer, false);
@@ -43,8 +43,8 @@
 
 namespace {
 
-struct JpegDecoderState {
-  JpegDecoderState(const unsigned char* in, size_t len)
+struct IjgJpegDecoderState {
+  IjgJpegDecoderState(const unsigned char* in, size_t len)
       : input_buffer(in), input_buffer_length(len) {}
 
   const unsigned char* input_buffer;
@@ -57,8 +57,9 @@
 //  "Initialize source. This is called by jpeg_read_header() before any data is
 //   actually read. May leave bytes_in_buffer set to 0 (in which case a
 //   fill_input_buffer() call will occur immediately)."
-void InitSource(j_decompress_ptr cinfo) {
-  JpegDecoderState* state = static_cast<JpegDecoderState*>(cinfo->client_data);
+void IjgInitSource(j_decompress_ptr cinfo) {
+  IjgJpegDecoderState* state =
+      static_cast<IjgJpegDecoderState*>(cinfo->client_data);
   cinfo->src->next_input_byte = state->input_buffer;
   cinfo->src->bytes_in_buffer = state->input_buffer_length;
 }
@@ -76,7 +77,7 @@
 //   entirely, only to obtain at least one more byte. bytes_in_buffer MUST be
 //   set to a positive value if TRUE is returned. A FALSE return should only
 //   be used when I/O suspension is desired."
-boolean FillInputBuffer(j_decompress_ptr cinfo) {
+boolean IjgFillInputBuffer(j_decompress_ptr cinfo) {
   return false;
 }
 
@@ -93,11 +94,11 @@
 //   being smart is worth much trouble; large skips are uncommon.
 //   bytes_in_buffer may be zero on return. A zero or negative skip count
 //   should be treated as a no-op."
-void SkipInputData(j_decompress_ptr cinfo, long num_bytes) {
+void IjgSkipInputData(j_decompress_ptr cinfo, long num_bytes) {
   if (num_bytes > static_cast<long>(cinfo->src->bytes_in_buffer)) {
     // Since all our data should be in the buffer, trying to skip beyond it
     // means that there is some kind of error or corrupt input data. A 0 for
-    // bytes left means it will call FillInputBuffer which will then fail.
+    // bytes left means it will call IjgFillInputBuffer which will then fail.
     cinfo->src->next_input_byte += cinfo->src->bytes_in_buffer;
     cinfo->src->bytes_in_buffer = 0;
   } else if (num_bytes > 0) {
@@ -112,7 +113,7 @@
 //  "Terminate source --- called by jpeg_finish_decompress() after all data has
 //   been read to clean up JPEG source manager. NOT called by jpeg_abort() or
 //   jpeg_destroy()."
-void TermSource(j_decompress_ptr cinfo) {}
+void IjgTermSource(j_decompress_ptr cinfo) {}
 
 #if !defined(JCS_EXTENSIONS)
 // Converts one row of rgb data to rgba data by adding a fully-opaque alpha
@@ -141,10 +142,10 @@
 // This class destroys the given jpeg_decompress object when it goes out of
 // scope. It simplifies the error handling in Decode (and even applies to the
 // success case).
-class DecompressDestroyer {
+class IjgDecompressDestroyer {
  public:
-  DecompressDestroyer() : cinfo_(NULL) {}
-  ~DecompressDestroyer() { DestroyManagedObject(); }
+  IjgDecompressDestroyer() : cinfo_(NULL) {}
+  ~IjgDecompressDestroyer() { DestroyManagedObject(); }
   void SetManagedObject(jpeg_decompress_struct* ci) {
     DestroyManagedObject();
     cinfo_ = ci;
@@ -169,16 +170,16 @@
                                  int* w,
                                  int* h) {
   jpeg_decompress_struct cinfo;
-  DecompressDestroyer destroyer;
+  IjgDecompressDestroyer destroyer;
   destroyer.SetManagedObject(&cinfo);
   output->clear();
 
   // We set up the normal JPEG error routines, then override error_exit.
   // This must be done before the call to create_decompress.
-  CoderErrorMgr errmgr;
+  IjgCoderErrorMgr errmgr;
   cinfo.err = jpeg_std_error(&errmgr.pub);
-  errmgr.pub.error_exit = ErrorExit;
-  // Establish the setjmp return context for ErrorExit to use.
+  errmgr.pub.error_exit = IjgErrorExit;
+  // Establish the setjmp return context for IjgErrorExit to use.
   if (setjmp(errmgr.setjmp_buffer)) {
     // If we get here, the JPEG code has signaled an error.
     // See note in JPEGCodec::Encode() for why we need to destroy the cinfo
@@ -193,14 +194,14 @@
 
   // set up the source manager
   jpeg_source_mgr srcmgr;
-  srcmgr.init_source = InitSource;
-  srcmgr.fill_input_buffer = FillInputBuffer;
-  srcmgr.skip_input_data = SkipInputData;
+  srcmgr.init_source = IjgInitSource;
+  srcmgr.fill_input_buffer = IjgFillInputBuffer;
+  srcmgr.skip_input_data = IjgSkipInputData;
   srcmgr.resync_to_restart = jpeg_resync_to_restart;  // use default routine
-  srcmgr.term_source = TermSource;
+  srcmgr.term_source = IjgTermSource;
   cinfo.src = &srcmgr;
 
-  JpegDecoderState state(input, input_size);
+  IjgJpegDecoderState state(input, input_size);
   cinfo.client_data = &state;
 
   // fill the file metadata into our buffer
@@ -230,7 +231,7 @@
         cinfo.output_components = 4;
       } else {
         // We can exit this function without calling jpeg_destroy_decompress()
-        // because DecompressDestroyer automaticaly calls it.
+        // because IjgDecompressDestroyer automaticaly calls it.
         NOTREACHED() << "Invalid pixel format";
         return false;
       }
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index 51e9e72..77674d1 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -8,6 +8,7 @@
 #include <map>
 #include <sstream>
 
+#include "base/containers/mru_cache.h"
 #include "base/lazy_instance.h"
 #include "base/synchronization/lock.h"
 #include "third_party/skia/include/core/SkColorSpace.h"
@@ -18,6 +19,24 @@
 
 namespace gfx {
 
+namespace {
+
+// See comments in ToSkColorSpace about this cache. This cache may only be
+// accessed while holding g_lock.
+static const size_t kMaxCachedSkColorSpaces = 16;
+using SkColorSpaceCacheBase =
+    base::MRUCache<gfx::ColorSpace, sk_sp<SkColorSpace>>;
+class SkColorSpaceCache : public SkColorSpaceCacheBase {
+ public:
+  SkColorSpaceCache() : SkColorSpaceCacheBase(kMaxCachedSkColorSpaces) {}
+};
+base::LazyInstance<SkColorSpaceCache>::DestructorAtExit g_sk_color_space_cache =
+    LAZY_INSTANCE_INITIALIZER;
+base::LazyInstance<base::Lock>::DestructorAtExit g_lock =
+    LAZY_INSTANCE_INITIALIZER;
+
+}  // namespace
+
 ColorSpace::ColorSpace() {}
 
 ColorSpace::ColorSpace(PrimaryID primaries,
@@ -429,6 +448,8 @@
   }
 
   // Use the named SRGB and linear-SRGB instead of the generic constructors.
+  // These do not need to be cached because skia will always return the same
+  // pointer.
   if (primaries_ == PrimaryID::BT709) {
     if (transfer_ == TransferID::IEC61966_2_1)
       return SkColorSpace::MakeSRGB();
@@ -440,6 +461,7 @@
   bool has_named_gamma = true;
   SkColorSpace::RenderTargetGamma named_gamma =
       SkColorSpace::kSRGB_RenderTargetGamma;
+  SkColorSpaceTransferFn custom_gamma;
   switch (transfer_) {
     case TransferID::IEC61966_2_1:
       break;
@@ -449,10 +471,15 @@
       break;
     default:
       has_named_gamma = false;
+      if (!GetTransferFunction(&custom_gamma)) {
+        DLOG(ERROR) << "Failed to transfer function for SkColorSpace";
+        return nullptr;
+      }
       break;
   }
   bool has_named_gamut = true;
   SkColorSpace::Gamut named_gamut = SkColorSpace::kSRGB_Gamut;
+  SkMatrix44 custom_gamut;
   switch (primaries_) {
     case PrimaryID::BT709:
       break;
@@ -467,27 +494,36 @@
       break;
     default:
       has_named_gamut = false;
+      GetPrimaryMatrix(&custom_gamut);
       break;
   }
-  if (has_named_gamut && has_named_gamma)
-    return SkColorSpace::MakeRGB(named_gamma, named_gamut);
 
-  // Use named gamma with custom primaries, if possible.
-  SkMatrix44 to_xyz_d50;
-  GetPrimaryMatrix(&to_xyz_d50);
-  if (has_named_gamma)
-    return SkColorSpace::MakeRGB(named_gamma, to_xyz_d50);
+  // Maintain a gfx::ColorSpace to SkColorSpace map, so that pointer-based
+  // comparisons of SkColorSpaces will be more likely to be accurate.
+  // https://crbug.com/793116
+  base::AutoLock lock(g_lock.Get());
 
-  // Use the parametric transfer function if there is no named transfer
-  // function.
-  SkColorSpaceTransferFn fn;
-  if (!GetTransferFunction(&fn)) {
-    DLOG(ERROR) << "Failed to parameterize transfer function for SkColorSpace";
-    return nullptr;
+  auto found = g_sk_color_space_cache.Get().Get(*this);
+  if (found != g_sk_color_space_cache.Get().end())
+    return found->second;
+
+  sk_sp<SkColorSpace> sk_color_space;
+  if (has_named_gamma) {
+    if (has_named_gamut)
+      sk_color_space = SkColorSpace::MakeRGB(named_gamma, named_gamut);
+    else
+      sk_color_space = SkColorSpace::MakeRGB(named_gamma, custom_gamut);
+  } else {
+    if (has_named_gamut)
+      sk_color_space = SkColorSpace::MakeRGB(custom_gamma, named_gamut);
+    else
+      sk_color_space = SkColorSpace::MakeRGB(custom_gamma, custom_gamut);
   }
-  if (has_named_gamut)
-    return SkColorSpace::MakeRGB(fn, named_gamut);
-  return SkColorSpace::MakeRGB(fn, to_xyz_d50);
+  if (!sk_color_space)
+    DLOG(ERROR) << "SkColorSpace::MakeRGB failed.";
+
+  g_sk_color_space_cache.Get().Put(*this, sk_color_space);
+  return sk_color_space;
 }
 
 void ColorSpace::GetPrimaryMatrix(SkMatrix44* to_XYZD50) const {
diff --git a/ui/gfx/color_space_unittest.cc b/ui/gfx/color_space_unittest.cc
index bef60b8..96dd37d 100644
--- a/ui/gfx/color_space_unittest.cc
+++ b/ui/gfx/color_space_unittest.cc
@@ -257,7 +257,11 @@
 }
 
 TEST(ColorSpace, ToSkColorSpace) {
-  const size_t kNumTests = 4;
+  const size_t kNumTests = 5;
+  SkMatrix44 primary_matrix;
+  primary_matrix.set3x3(0.205276f, 0.149185f, 0.609741f, 0.625671f, 0.063217f,
+                        0.311111f, 0.060867f, 0.744553f, 0.019470f);
+  SkColorSpaceTransferFn transfer_fn = {2.1f, 1.f, 0.f, 0.f, 0.f, 0.f, 0.f};
   ColorSpace color_spaces[kNumTests] = {
       ColorSpace(ColorSpace::PrimaryID::BT709,
                  ColorSpace::TransferID::IEC61966_2_1),
@@ -267,6 +271,7 @@
                  ColorSpace::TransferID::LINEAR),
       ColorSpace(ColorSpace::PrimaryID::BT2020,
                  ColorSpace::TransferID::IEC61966_2_1),
+      ColorSpace::CreateCustom(primary_matrix, transfer_fn),
   };
   sk_sp<SkColorSpace> sk_color_spaces[kNumTests] = {
       SkColorSpace::MakeSRGB(),
@@ -276,11 +281,25 @@
                             SkColorSpace::kDCIP3_D65_Gamut),
       SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
                             SkColorSpace::kRec2020_Gamut),
+      SkColorSpace::MakeRGB(transfer_fn, primary_matrix),
   };
+  sk_sp<SkColorSpace> got_sk_color_spaces[kNumTests];
+  for (size_t i = 0; i < kNumTests; ++i)
+    got_sk_color_spaces[i] = color_spaces[i].ToSkColorSpace();
   for (size_t i = 0; i < kNumTests; ++i) {
-    EXPECT_TRUE(SkColorSpace::Equals(color_spaces[i].ToSkColorSpace().get(),
+    EXPECT_TRUE(SkColorSpace::Equals(got_sk_color_spaces[i].get(),
                                      sk_color_spaces[i].get()))
         << " on iteration i = " << i;
+    // ToSkColorSpace should return the same thing every time.
+    EXPECT_EQ(got_sk_color_spaces[i].get(),
+              color_spaces[i].ToSkColorSpace().get())
+        << " on iteration i = " << i;
+    // But there is no cache within Skia, except for sRGB.
+    // This test may start failing if this behavior changes.
+    if (i != 0) {
+      EXPECT_NE(got_sk_color_spaces[i].get(), sk_color_spaces[i].get())
+          << " on iteration i = " << i;
+    }
   }
 }
 
diff --git a/ui/gfx/font_render_params_linux_unittest.cc b/ui/gfx/font_render_params_linux_unittest.cc
index ca782e5f..34732ed 100644
--- a/ui/gfx/font_render_params_linux_unittest.cc
+++ b/ui/gfx/font_render_params_linux_unittest.cc
@@ -17,6 +17,18 @@
 
 namespace {
 
+// Strings appearing at the beginning and end of Fontconfig XML files.
+const char kFontconfigFileHeader[] =
+    "<?xml version=\"1.0\"?>\n"
+    "<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n"
+    "<fontconfig>\n";
+const char kFontconfigFileFooter[] = "</fontconfig>";
+
+// Strings appearing at the beginning and end of Fontconfig <match> stanzas.
+const char kFontconfigMatchFontHeader[] = "  <match target=\"font\">\n";
+const char kFontconfigMatchPatternHeader[] = "  <match target=\"pattern\">\n";
+const char kFontconfigMatchFooter[] = "  </match>\n";
+
 // Implementation of LinuxFontDelegate that returns a canned FontRenderParams
 // struct. This is used to isolate tests from the system's local configuration.
 class TestFontDelegate : public LinuxFontDelegate {
diff --git a/ui/gfx/test/fontconfig_util_linux.cc b/ui/gfx/test/fontconfig_util_linux.cc
index 7a0e910..298860a 100644
--- a/ui/gfx/test/fontconfig_util_linux.cc
+++ b/ui/gfx/test/fontconfig_util_linux.cc
@@ -61,15 +61,6 @@
 
 const size_t kNumCloudStorageSyncedFonts = arraysize(kCloudStorageSyncedFonts);
 
-const char kFontconfigFileHeader[] =
-    "<?xml version=\"1.0\"?>\n"
-    "<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n"
-    "<fontconfig>\n";
-const char kFontconfigFileFooter[] = "</fontconfig>";
-const char kFontconfigMatchFontHeader[] = "  <match target=\"font\">\n";
-const char kFontconfigMatchPatternHeader[] = "  <match target=\"pattern\">\n";
-const char kFontconfigMatchFooter[] = "  </match>\n";
-
 void SetUpFontconfig() {
   FcInit();
 
diff --git a/ui/gfx/test/fontconfig_util_linux.h b/ui/gfx/test/fontconfig_util_linux.h
index 07046a0..96dfed7 100644
--- a/ui/gfx/test/fontconfig_util_linux.h
+++ b/ui/gfx/test/fontconfig_util_linux.h
@@ -9,7 +9,9 @@
 
 #include <string>
 
-#include "base/files/file_path.h"
+namespace base {
+class FilePath;
+}
 
 namespace gfx {
 
@@ -21,15 +23,6 @@
 extern const char* const kCloudStorageSyncedFonts[];
 extern const size_t kNumCloudStorageSyncedFonts;
 
-// Strings appearing at the beginning and end of Fontconfig XML files.
-extern const char kFontconfigFileHeader[];
-extern const char kFontconfigFileFooter[];
-
-// Strings appearing at the beginning and end of Fontconfig <match> stanzas.
-extern const char kFontconfigMatchFontHeader[];
-extern const char kFontconfigMatchPatternHeader[];
-extern const char kFontconfigMatchFooter[];
-
 // Initializes Fontconfig and creates and swaps in a new, empty config.
 void SetUpFontconfig();
 
diff --git a/ui/gfx/test/ui_cocoa_test_helper.h b/ui/gfx/test/ui_cocoa_test_helper.h
index fe8e8e8..df10f0c 100644
--- a/ui/gfx/test/ui_cocoa_test_helper.h
+++ b/ui/gfx/test/ui_cocoa_test_helper.h
@@ -14,15 +14,32 @@
 #import "base/mac/scoped_nsobject.h"
 #include "testing/platform_test.h"
 
-// Background windows normally will not display things such as focus
-// rings.  This class allows -isKeyWindow to be manipulated to test
-// such things.
-@interface CocoaTestHelperWindow : NSWindow {
- @private
-  BOOL pretendIsKeyWindow_;
-  BOOL pretendIsOccluded_;
-  BOOL useDefaultConstraints_;
-}
+// CocoaTestHelperWindow behaves differently from a regular NSWindow in the
+// following ways:
+// - It allows -isKeyWindow to be manipulated to test things like focus rings
+//   (which background windows won't normally display).
+// - It ignores its real occlusion state and returns a value based on
+//   pretendIsOccluded.
+// - It ignores the system setting for full keyboard access and returns a value
+//   based on pretendFullKeyboardAccessIsEnabled.
+@interface CocoaTestHelperWindow : NSWindow
+
+// Value to return for -isKeyWindow.
+@property(nonatomic) BOOL pretendIsKeyWindow;
+
+// Value to return for -occlusionState. Setting posts a
+// NSWindowDidChangeOcclusionStateNotification.
+@property(nonatomic) BOOL pretendIsOccluded;
+
+// Whether to handle the key view loop as if full keyboard access is enabled.
+@property(nonatomic) BOOL pretendFullKeyboardAccessIsEnabled;
+
+// Whether to use or ignore the default contraints for window sizing and
+// placement.
+@property(nonatomic) BOOL useDefaultConstraints;
+
+// All of the window's valid key views, in order.
+@property(nonatomic, readonly) NSArray<NSView*>* validKeyViews;
 
 // Init a borderless non-deferred window with a backing store.
 - (id)initWithContentRect:(NSRect)contentRect;
@@ -39,17 +56,6 @@
 // to being non-key.
 - (void)clearPretendKeyWindowAndFirstResponder;
 
-// Set value to return for -isKeyWindow.
-- (void)setPretendIsKeyWindow:(BOOL)isKeyWindow;
-
-// Set value to return for -occlusionState and posts a
-// NSWindowDidChangeOcclusionStateNotification.
-- (void)setPretendIsOccluded:(BOOL)isOccluded;
-
-// Whether to use or ignore the default contraints for window sizing and
-// placement.
-- (void)setUseDefaultConstraints:(BOOL)useDefaultConstraints;
-
 - (BOOL)isKeyWindow;
 
 - (NSWindowOcclusionState)occlusionState;
diff --git a/ui/gfx/test/ui_cocoa_test_helper.mm b/ui/gfx/test/ui_cocoa_test_helper.mm
index ca51b65..ec3b1f6 100644
--- a/ui/gfx/test/ui_cocoa_test_helper.mm
+++ b/ui/gfx/test/ui_cocoa_test_helper.mm
@@ -31,6 +31,12 @@
 
 @implementation CocoaTestHelperWindow
 
+@synthesize pretendIsKeyWindow = pretendIsKeyWindow_;
+@synthesize pretendIsOccluded = pretendIsOccluded_;
+@synthesize pretendFullKeyboardAccessIsEnabled =
+    pretendFullKeyboardAccessIsEnabled_;
+@synthesize useDefaultConstraints = useDefaultConstraints_;
+
 - (id)initWithContentRect:(NSRect)contentRect {
   self = [super initWithContentRect:contentRect
                           styleMask:NSBorderlessWindowMask
@@ -54,18 +60,14 @@
 
 - (void)makePretendKeyWindowAndSetFirstResponder:(NSResponder*)responder {
   EXPECT_TRUE([self makeFirstResponder:responder]);
-  [self setPretendIsKeyWindow:YES];
+  self.pretendIsKeyWindow = YES;
 }
 
 - (void)clearPretendKeyWindowAndFirstResponder {
-  [self setPretendIsKeyWindow:NO];
+  self.pretendIsKeyWindow = NO;
   EXPECT_TRUE([self makeFirstResponder:NSApp]);
 }
 
-- (void)setPretendIsKeyWindow:(BOOL)flag {
-  pretendIsKeyWindow_ = flag;
-}
-
 - (void)setPretendIsOccluded:(BOOL)flag {
   pretendIsOccluded_ = flag;
   [[NSNotificationCenter defaultCenter]
@@ -73,18 +75,40 @@
                     object:self];
 }
 
-- (void)setUseDefaultConstraints:(BOOL)useDefaultConstraints {
-  useDefaultConstraints_ = useDefaultConstraints;
+- (void)setPretendFullKeyboardAccessIsEnabled:(BOOL)enabled {
+  EXPECT_TRUE([NSWindow
+      instancesRespondToSelector:@selector(_allowsAnyValidResponder)]);
+  pretendFullKeyboardAccessIsEnabled_ = enabled;
+  [self recalculateKeyViewLoop];
 }
 
 - (BOOL)isKeyWindow {
   return pretendIsKeyWindow_;
 }
 
+// Override of an undocumented AppKit method which controls call to check if
+// full keyboard access is enabled. Its presence is verified in
+// -setPretendFullKeyboardAccessIsEnabled:.
+- (BOOL)_allowsAnyValidResponder {
+  return pretendFullKeyboardAccessIsEnabled_;
+}
+
 - (NSWindowOcclusionState)occlusionState {
   return pretendIsOccluded_ ? 0 : NSWindowOcclusionStateVisible;
 }
 
+- (NSArray<NSView*>*)validKeyViews {
+  NSMutableArray<NSView*>* validKeyViews = [NSMutableArray array];
+  NSView* contentView = self.contentView;
+  if (contentView.canBecomeKeyView)
+    [validKeyViews addObject:contentView];
+  for (NSView* keyView = contentView.nextValidKeyView;
+       keyView != nil && ![validKeyViews containsObject:keyView];
+       keyView = keyView.nextValidKeyView)
+    [validKeyViews addObject:keyView];
+  return validKeyViews;
+}
+
 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
   if (!useDefaultConstraints_)
     return frameRect;
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index 4df23df92..44c2225 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -155,6 +155,9 @@
   deps = [
     "//base/third_party/dynamic_annotations",
 
+    # Remove after fixing crbug.com/724999.
+    "//components/crash/core/common:crash_key",
+
     # ANGLE includes are used cross-platform.
     "//third_party/angle:includes",
   ]
diff --git a/ui/gl/DEPS b/ui/gl/DEPS
index 8ab9645d..c818eb38 100644
--- a/ui/gl/DEPS
+++ b/ui/gl/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+  "+components/crash/core/common/crash_key.h",  # Remove after fixing crbug.com/724999.
   "+third_party/khronos",
   "+third_party/skia",
   "+ui/events",
diff --git a/ui/gl/egl_api_unittest.cc b/ui/gl/egl_api_unittest.cc
index 1d8babc..25ba3db8 100644
--- a/ui/gl/egl_api_unittest.cc
+++ b/ui/gl/egl_api_unittest.cc
@@ -8,6 +8,7 @@
 #include "ui/gl/gl_egl_api_implementation.h"
 #include "ui/gl/gl_surface_egl.h"
 #include "ui/gl/gl_switches.h"
+#include "ui/gl/init/gl_factory.h"
 
 namespace gl {
 
@@ -18,8 +19,9 @@
     fake_extension_string_ = "";
 
     // TODO(dyen): Add a way to bind mock drivers for testing.
-    g_driver_egl.ClearBindings();
+    init::ShutdownGL(false);
     g_driver_egl.fn.eglInitializeFn = &FakeInitialize;
+    g_driver_egl.fn.eglTerminateFn = &FakeTerminate;
     g_driver_egl.fn.eglQueryStringFn = &FakeQueryString;
     g_driver_egl.fn.eglGetCurrentDisplayFn = &FakeGetCurrentDisplay;
     g_driver_egl.fn.eglGetDisplayFn = &FakeGetDisplay;
@@ -30,9 +32,8 @@
   }
 
   void TearDown() override {
-    g_current_egl_context = nullptr;
+    init::ShutdownGL(false);
     api_.reset(nullptr);
-    g_driver_egl.ClearBindings();
 
     fake_client_extension_string_ = "";
     fake_extension_string_ = "";
@@ -62,6 +63,10 @@
     return EGL_TRUE;
   }
 
+  static EGLBoolean GL_BINDING_CALL FakeTerminate(EGLDisplay dpy) {
+    return EGL_TRUE;
+  }
+
   static const char* GL_BINDING_CALL FakeQueryString(EGLDisplay dpy,
                                                      EGLint name) {
     if (dpy == EGL_NO_DISPLAY) {
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index 40e2f95c..003893eb 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -9,13 +9,13 @@
 #include "base/bind.h"
 #include "base/cancelable_callback.h"
 #include "base/command_line.h"
-#include "base/debug/crash_logging.h"
 #include "base/debug/stack_trace.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread_local.h"
+#include "components/crash/core/common/crash_key.h"
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_gl_api_implementation.h"
 #include "ui/gl/gl_implementation.h"
@@ -254,8 +254,10 @@
   if (!surface && GetGLImplementation() != kGLImplementationMockGL &&
       GetGLImplementation() != kGLImplementationStubGL) {
     // TODO(sunnyps): Remove after fixing crbug.com/724999.
-    base::debug::SetCrashKeyToStackTrace("gl-context-set-current-stack-trace",
-                                         base::debug::StackTrace());
+    static crash_reporter::CrashKeyString<1024> crash_key(
+        "gl-context-set-current-stack-trace");
+    crash_reporter::SetCrashKeyStringToStackTrace(&crash_key,
+                                                  base::debug::StackTrace());
     SetCurrentGL(nullptr);
   }
 }
diff --git a/ui/gl/gl_egl_api_implementation.cc b/ui/gl/gl_egl_api_implementation.cc
index f3bcf75..18be27ac 100644
--- a/ui/gl/gl_egl_api_implementation.cc
+++ b/ui/gl/gl_egl_api_implementation.cc
@@ -41,7 +41,7 @@
     delete g_real_egl;
     g_real_egl = NULL;
   }
-  g_current_egl_context = NULL;
+  g_current_egl_context = nullptr;
   g_driver_egl.ClearBindings();
 }
 
diff --git a/ui/gl/gl_image_ahardwarebuffer.cc b/ui/gl/gl_image_ahardwarebuffer.cc
index d1377be..3121a95c 100644
--- a/ui/gl/gl_image_ahardwarebuffer.cc
+++ b/ui/gl/gl_image_ahardwarebuffer.cc
@@ -13,6 +13,15 @@
 
 GLImageAHardwareBuffer::~GLImageAHardwareBuffer() {}
 
+bool GLImageAHardwareBuffer::Initialize(AHardwareBuffer* buffer,
+                                        bool preserved) {
+  EGLint attribs[] = {EGL_IMAGE_PRESERVED_KHR, preserved ? EGL_TRUE : EGL_FALSE,
+                      EGL_NONE};
+  EGLClientBuffer client_buffer = eglGetNativeClientBufferANDROID(buffer);
+  return GLImageEGL::Initialize(EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
+                                client_buffer, attribs);
+}
+
 unsigned GLImageAHardwareBuffer::GetInternalFormat() {
   return GL_RGBA;
 }
diff --git a/ui/gl/gl_image_ahardwarebuffer.h b/ui/gl/gl_image_ahardwarebuffer.h
index a8ef6f9..b3ebd04 100644
--- a/ui/gl/gl_image_ahardwarebuffer.h
+++ b/ui/gl/gl_image_ahardwarebuffer.h
@@ -15,6 +15,9 @@
  public:
   explicit GLImageAHardwareBuffer(const gfx::Size& size);
 
+  // Create an EGLImage from a given Android hardware buffer.
+  bool Initialize(AHardwareBuffer* buffer, bool preserved);
+
   // Overridden from GLImage:
   unsigned GetInternalFormat() override;
   bool CopyTexImage(unsigned target) override;
diff --git a/ui/gl/gl_image_ahardwarebuffer_unittest.cc b/ui/gl/gl_image_ahardwarebuffer_unittest.cc
index 6986a0e4..156bc5b 100644
--- a/ui/gl/gl_image_ahardwarebuffer_unittest.cc
+++ b/ui/gl/gl_image_ahardwarebuffer_unittest.cc
@@ -76,10 +76,7 @@
     EXPECT_EQ(unlock_result, 0);
 
     auto image = base::MakeRefCounted<GLImageAHardwareBuffer>(size);
-    EGLint attribs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE};
-    EGLClientBuffer client_buffer = eglGetNativeClientBufferANDROID(buffer);
-    bool rv = image->Initialize(EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
-                                client_buffer, attribs);
+    bool rv = image->Initialize(buffer, /* preserved */ true);
     EXPECT_TRUE(rv);
     return image;
   }
diff --git a/ui/gl/gl_image_egl.h b/ui/gl/gl_image_egl.h
index 6a23ba35..b32e948 100644
--- a/ui/gl/gl_image_egl.h
+++ b/ui/gl/gl_image_egl.h
@@ -18,6 +18,14 @@
  public:
   explicit GLImageEGL(const gfx::Size& size);
 
+  // Overridden from GLImage:
+  gfx::Size GetSize() override;
+  bool BindTexImage(unsigned target) override;
+  void ReleaseTexImage(unsigned target) override {}
+
+ protected:
+  ~GLImageEGL() override;
+
   // Same semantic as specified for eglCreateImageKHR. There two main usages:
   // 1- When using the |target| EGL_GL_TEXTURE_2D_KHR it is required to pass
   // a valid |context|. This allows to create an EGLImage from a GL texture.
@@ -32,14 +40,6 @@
                   EGLClientBuffer buffer,
                   const EGLint* attrs);
 
-  // Overridden from GLImage:
-  gfx::Size GetSize() override;
-  bool BindTexImage(unsigned target) override;
-  void ReleaseTexImage(unsigned target) override {}
-
- protected:
-  ~GLImageEGL() override;
-
   EGLImageKHR egl_image_;
   const gfx::Size size_;
   base::ThreadChecker thread_checker_;
diff --git a/ui/gl/gl_image_native_pixmap.cc b/ui/gl/gl_image_native_pixmap.cc
index 956cd64..49441196 100644
--- a/ui/gl/gl_image_native_pixmap.cc
+++ b/ui/gl/gl_image_native_pixmap.cc
@@ -239,6 +239,26 @@
   return true;
 }
 
+bool GLImageNativePixmap::InitializeFromTexture(uint32_t texture_id) {
+  GLContext* current_context = GLContext::GetCurrent();
+  if (!current_context || !current_context->IsCurrent(nullptr)) {
+    LOG(ERROR) << "No gl context bound to the current thread";
+    return false;
+  }
+
+  EGLContext context_handle =
+      reinterpret_cast<EGLContext>(current_context->GetHandle());
+  DCHECK_NE(context_handle, EGL_NO_CONTEXT);
+
+  if (!GLImageEGL::Initialize(context_handle, EGL_GL_TEXTURE_2D_KHR,
+                              reinterpret_cast<EGLClientBuffer>(texture_id),
+                              nullptr)) {
+    return false;
+  }
+
+  return true;
+}
+
 gfx::NativePixmapHandle GLImageNativePixmap::ExportHandle() {
   DCHECK(!pixmap_);
   DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/ui/gl/gl_image_native_pixmap.h b/ui/gl/gl_image_native_pixmap.h
index d8987691..66c985c 100644
--- a/ui/gl/gl_image_native_pixmap.h
+++ b/ui/gl/gl_image_native_pixmap.h
@@ -19,7 +19,11 @@
  public:
   GLImageNativePixmap(const gfx::Size& size, unsigned internalformat);
 
+  // Create an EGLImage from a given NativePixmap.
   bool Initialize(gfx::NativePixmap* pixmap, gfx::BufferFormat format);
+  // Create an EGLImage from a given GL texture.
+  bool InitializeFromTexture(uint32_t texture_id);
+  // Export the wrapped EGLImage to dmabuf fds.
   gfx::NativePixmapHandle ExportHandle();
 
   // Overridden from GLImage:
diff --git a/ui/gl/gl_image_native_pixmap_unittest.cc b/ui/gl/gl_image_native_pixmap_unittest.cc
index bc8107ec..baa54d9 100644
--- a/ui/gl/gl_image_native_pixmap_unittest.cc
+++ b/ui/gl/gl_image_native_pixmap_unittest.cc
@@ -53,7 +53,10 @@
     surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size());
     context_ =
         gl::init::CreateGLContext(nullptr, surface_.get(), GLContextAttribs());
-    context_->MakeCurrent(surface_.get());
+    if (!context_->MakeCurrent(surface_.get())) {
+      LOG(WARNING) << "Skip test, failed to make the GL context current";
+      return;
+    }
 
     skip_test_ = false;
   }
@@ -76,12 +79,6 @@
                          GLenum tex_format) {
   const gfx::Size image_size(64, 64);
 
-  EXPECT_NE(nullptr, GLContext::GetCurrent());
-
-  EGLContext context =
-      reinterpret_cast<EGLContext>(GLContext::GetCurrent()->GetHandle());
-  EXPECT_NE(EGL_NO_CONTEXT, context);
-
   scoped_refptr<gl::GLImageNativePixmap> image(new gl::GLImageNativePixmap(
       image_size,
       gl::GLImageNativePixmap::GetInternalFormatForTesting(image_format)));
@@ -97,10 +94,7 @@
   glTexImage2D(GL_TEXTURE_2D, 0, tex_internal_format, image_size.width(),
                image_size.height(), 0, tex_format, GL_UNSIGNED_BYTE, nullptr);
 
-  scoped_refptr<gl::GLImageEGL> base_image = image;
-  EXPECT_TRUE(base_image->Initialize(
-      context, EGL_GL_TEXTURE_2D_KHR,
-      reinterpret_cast<EGLClientBuffer>(texture_id), nullptr));
+  EXPECT_TRUE(image->InitializeFromTexture(texture_id));
 
   gfx::NativePixmapHandle native_pixmap_handle = image->ExportHandle();
 
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 556c566..3a0bcc8 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -691,8 +691,10 @@
 void GLSurfaceEGL::ShutdownOneOff() {
   angle::ResetPlatform(g_display);
 
-  if (g_display != EGL_NO_DISPLAY)
+  if (g_display != EGL_NO_DISPLAY) {
+    DCHECK(g_driver_egl.fn.eglTerminateFn);
     eglTerminate(g_display);
+  }
   g_display = EGL_NO_DISPLAY;
 
   g_egl_extensions = nullptr;
diff --git a/ui/gl/scoped_make_current.cc b/ui/gl/scoped_make_current.cc
index 4f12557..cb06ba55 100644
--- a/ui/gl/scoped_make_current.cc
+++ b/ui/gl/scoped_make_current.cc
@@ -5,6 +5,7 @@
 #include "ui/gl/scoped_make_current.h"
 
 #include "base/logging.h"
+#include "components/crash/core/common/crash_key.h"
 #include "ui/gl/gl_context.h"
 #include "ui/gl/gl_surface.h"
 
@@ -60,8 +61,14 @@
   DCHECK(!restored_);
   restored_ = true;
 
-  if (previous_context_)
+  if (previous_context_) {
+    // TODO(sunnyps): Remove after fixing https://crbug.com/724999.
+    static crash_reporter::CrashKeyString<4> crash_key(
+        "scoped-release-current-is-current");
+    crash_key.Set(previous_context_->IsCurrent(previous_surface_.get()) ? "1"
+                                                                        : "0");
     return previous_context_->MakeCurrent(previous_surface_.get());
+  }
 
   return true;
 }
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index fd3883d7..ed64c39a 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -708,8 +708,17 @@
 }
 
 const gfx::Rect KeyboardController::GetWorkspaceObscuringBounds() const {
-  if (keyboard_visible() &&
-      container_behavior_->BoundsAffectWorkspaceLayout()) {
+  if (keyboard_visible() && container_behavior_->BoundsObscureUsableRegion())
+    return current_keyboard_bounds_;
+  return gfx::Rect();
+}
+
+const gfx::Rect KeyboardController::GetKeyboardLockScreenOffsetBounds() const {
+  // Overscroll is generally dependent on lock state, however, its behavior
+  // temporarily overridden by a static field in certain lock screen contexts.
+  // Furthermore, floating keyboard should never affect layout.
+  if (keyboard_visible() && !keyboard::IsKeyboardOverscrollEnabled() &&
+      container_behavior_->GetType() != ContainerType::FLOATING) {
     return current_keyboard_bounds_;
   }
   return gfx::Rect();
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 6ae5d286..0102563 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -145,6 +145,10 @@
   // region of the screen, an empty rectangle will get returned.
   const gfx::Rect GetWorkspaceObscuringBounds() const;
 
+  // Returns the current bounds that affect the window layout of the various
+  // lock screens.
+  const gfx::Rect GetKeyboardLockScreenOffsetBounds() const;
+
   KeyboardControllerState GetStateForTest() const { return state_; }
 
   const gfx::Rect AdjustSetBoundsRequest(
diff --git a/ui/ozone/platform/drm/common/drm_util.cc b/ui/ozone/platform/drm/common/drm_util.cc
index b42b6b5..92dd569 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -16,7 +16,6 @@
 #include "base/containers/flat_map.h"
 #include "base/memory/ptr_util.h"
 #include "ui/display/types/display_mode.h"
-#include "ui/display/types/display_snapshot.h"
 #include "ui/display/util/edid_parser.h"
 
 #if !defined(DRM_FORMAT_R16)
@@ -333,6 +332,47 @@
       mode.flags & DRM_MODE_FLAG_INTERLACE, GetRefreshRate(mode));
 }
 
+display::DisplaySnapshot::DisplayModeList ExtractDisplayModes(
+    HardwareDisplayControllerInfo* info,
+    const gfx::Size& active_pixel_size,
+    const display::DisplayMode** out_current_mode,
+    const display::DisplayMode** out_native_mode) {
+  DCHECK(out_current_mode);
+  DCHECK(out_native_mode);
+
+  *out_current_mode = nullptr;
+  *out_native_mode = nullptr;
+  display::DisplaySnapshot::DisplayModeList modes;
+  for (int i = 0; i < info->connector()->count_modes; ++i) {
+    const drmModeModeInfo& mode = info->connector()->modes[i];
+    modes.push_back(CreateDisplayMode(mode));
+
+    if (info->crtc()->mode_valid && SameMode(info->crtc()->mode, mode))
+      *out_current_mode = modes.back().get();
+
+    if (mode.type & DRM_MODE_TYPE_PREFERRED)
+      *out_native_mode = modes.back().get();
+  }
+
+  // If we couldn't find a preferred mode, then try to find a mode that has the
+  // same size as the first detailed timing descriptor in the EDID.
+  if (!*out_native_mode && !active_pixel_size.IsEmpty()) {
+    for (const auto& mode : modes) {
+      if (mode->size() == active_pixel_size) {
+        *out_native_mode = mode.get();
+        break;
+      }
+    }
+  }
+
+  // If we still have no preferred mode, then use the first one since it should
+  // be the best mode.
+  if (!*out_native_mode && !modes.empty())
+    *out_native_mode = modes.front().get();
+
+  return modes;
+}
+
 std::unique_ptr<display::DisplaySnapshot> CreateDisplaySnapshot(
     HardwareDisplayControllerInfo* info,
     int fd,
@@ -355,6 +395,10 @@
   bool has_overscan = false;
   gfx::ColorSpace display_color_space;
 
+  // This is the size of the active pixels from the first detailed timing
+  // descriptor in the EDID.
+  gfx::Size active_pixel_size;
+
   ScopedDrmPropertyBlobPtr edid_blob(
       GetDrmPropertyBlob(fd, info->connector(), "EDID"));
   if (edid_blob) {
@@ -364,7 +408,7 @@
     display::GetDisplayIdFromEDID(edid, display_id, &display_id, &product_id);
 
     display::ParseOutputDeviceData(edid, nullptr, nullptr, &display_name,
-                                   nullptr, nullptr);
+                                   &active_pixel_size, nullptr);
     display::ParseOutputOverscanFlag(edid, &has_overscan);
 
     display_color_space = GetColorSpaceFromEdid(edid);
@@ -373,24 +417,10 @@
             << info->connector()->connector_id;
   }
 
-  display::DisplaySnapshot::DisplayModeList modes;
   const display::DisplayMode* current_mode = nullptr;
   const display::DisplayMode* native_mode = nullptr;
-  for (int i = 0; i < info->connector()->count_modes; ++i) {
-    const drmModeModeInfo& mode = info->connector()->modes[i];
-    modes.push_back(CreateDisplayMode(mode));
-
-    if (info->crtc()->mode_valid && SameMode(info->crtc()->mode, mode))
-      current_mode = modes.back().get();
-
-    if (mode.type & DRM_MODE_TYPE_PREFERRED)
-      native_mode = modes.back().get();
-  }
-
-  // If no preferred mode is found then use the first one. Using the first one
-  // since it should be the best mode.
-  if (!native_mode && !modes.empty())
-    native_mode = modes.front().get();
+  display::DisplaySnapshot::DisplayModeList modes =
+      ExtractDisplayModes(info, active_pixel_size, &current_mode, &native_mode);
 
   return std::make_unique<display::DisplaySnapshot>(
       display_id, origin, physical_size, type, is_aspect_preserving_scaling,
diff --git a/ui/ozone/platform/drm/common/drm_util.h b/ui/ozone/platform/drm/common/drm_util.h
index 35a5bbb..9a058a7 100644
--- a/ui/ozone/platform/drm/common/drm_util.h
+++ b/ui/ozone/platform/drm/common/drm_util.h
@@ -12,6 +12,7 @@
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "ui/display/types/display_snapshot.h"
 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
 #include "ui/ozone/platform/drm/common/display_types.h"
 #include "ui/ozone/platform/drm/common/scoped_drm_types.h"
@@ -20,7 +21,6 @@
 
 namespace display {
 class DisplayMode;
-class DisplaySnapshot;
 }  // namespace display
 
 namespace gfx {
@@ -61,6 +61,15 @@
 std::unique_ptr<display::DisplayMode> CreateDisplayMode(
     const drmModeModeInfo& mode);
 
+// Extracts the display modes list from |info| as well as the current and native
+// display modes given the |active_pixel_size| which is retrieved from the first
+// detailed timing descriptor in the EDID.
+display::DisplaySnapshot::DisplayModeList ExtractDisplayModes(
+    HardwareDisplayControllerInfo* info,
+    const gfx::Size& active_pixel_size,
+    const display::DisplayMode** out_current_mode,
+    const display::DisplayMode** out_native_mode);
+
 // |info| provides the DRM information related to the display, |fd| is the
 // connection to the DRM device.
 std::unique_ptr<display::DisplaySnapshot> CreateDisplaySnapshot(
diff --git a/ui/ozone/platform/drm/common/drm_util_unittest.cc b/ui/ozone/platform/drm/common/drm_util_unittest.cc
index 6a5f2f39..03dae19 100644
--- a/ui/ozone/platform/drm/common/drm_util_unittest.cc
+++ b/ui/ozone/platform/drm/common/drm_util_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "ui/ozone/platform/drm/common/drm_util.h"
 
+#include <xf86drm.h>
+#include <xf86drmMode.h>
+
 #include <map>
 
 #include "testing/gtest/include/gtest/gtest.h"
@@ -350,4 +353,154 @@
       << sst210_color_space_2.ToString();
 }
 
+TEST_F(DrmUtilTest, TestDisplayModesExtraction) {
+  // Initialize a list of display modes.
+  constexpr size_t kNumModes = 5;
+  drmModeModeInfo modes[kNumModes] = {
+      {0,
+       640 /* hdisplay */,
+       0,
+       0,
+       0,
+       0,
+       400 /* vdisplay */,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       {}},
+      {0,
+       640 /* hdisplay */,
+       0,
+       0,
+       0,
+       0,
+       480 /* vdisplay */,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       {}},
+      {0,
+       800 /* hdisplay */,
+       0,
+       0,
+       0,
+       0,
+       600 /* vdisplay */,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       {}},
+      {0,
+       1024 /* hdisplay */,
+       0,
+       0,
+       0,
+       0,
+       768 /* vdisplay */,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       {}},
+      {0,
+       1280 /* hdisplay */,
+       0,
+       0,
+       0,
+       0,
+       768 /* vdisplay */,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       0,
+       {}},
+  };
+  drmModeModeInfoPtr modes_ptr = static_cast<drmModeModeInfoPtr>(
+      drmMalloc(kNumModes * sizeof(drmModeModeInfo)));
+  std::memcpy(modes_ptr, &modes[0], kNumModes * sizeof(drmModeModeInfo));
+
+  // Initialize a connector.
+  drmModeConnector connector = {
+      0,
+      0,
+      0,
+      0,
+      DRM_MODE_CONNECTED,
+      0,
+      0,
+      DRM_MODE_SUBPIXEL_UNKNOWN,
+      5 /* count_modes */,
+      modes_ptr,
+      0,
+      nullptr,
+      nullptr,
+      0,
+      nullptr,
+  };
+  drmModeConnector* connector_ptr =
+      static_cast<drmModeConnector*>(drmMalloc(sizeof(drmModeConnector)));
+  *connector_ptr = connector;
+
+  // Initialize a CRTC.
+  drmModeCrtc crtc = {
+      0, 0, 0, 0, 0, 0, 1 /* mode_valid */, modes[0], 0,
+  };
+  drmModeCrtcPtr crtc_ptr =
+      static_cast<drmModeCrtcPtr>(drmMalloc(sizeof(drmModeCrtc)));
+  *crtc_ptr = crtc;
+
+  HardwareDisplayControllerInfo info(ScopedDrmConnectorPtr(connector_ptr),
+                                     ScopedDrmCrtcPtr(crtc_ptr), 0);
+
+  const display::DisplayMode* current_mode;
+  const display::DisplayMode* native_mode;
+  auto extracted_modes =
+      ExtractDisplayModes(&info, gfx::Size(), &current_mode, &native_mode);
+
+  // With no preferred mode and no active pixel size, the native mode will be
+  // selected as the first mode.
+  ASSERT_EQ(5u, extracted_modes.size());
+  EXPECT_EQ(extracted_modes[0].get(), current_mode);
+  EXPECT_EQ(extracted_modes[0].get(), native_mode);
+  EXPECT_EQ(gfx::Size(640, 400), native_mode->size());
+
+  // With no preferred mode, but with an active pixel size, the native mode will
+  // be the mode that has the same size as the active pixel size.
+  const gfx::Size active_pixel_size(1280, 768);
+  extracted_modes = ExtractDisplayModes(&info, active_pixel_size, &current_mode,
+                                        &native_mode);
+  ASSERT_EQ(5u, extracted_modes.size());
+  EXPECT_EQ(extracted_modes[0].get(), current_mode);
+  EXPECT_EQ(extracted_modes[4].get(), native_mode);
+  EXPECT_EQ(active_pixel_size, native_mode->size());
+
+  // The preferred mode is always returned as the native mode, even when a valid
+  // active pixel size supplied.
+  modes_ptr[2].type |= DRM_MODE_TYPE_PREFERRED;
+  extracted_modes = ExtractDisplayModes(&info, active_pixel_size, &current_mode,
+                                        &native_mode);
+  ASSERT_EQ(5u, extracted_modes.size());
+  EXPECT_EQ(extracted_modes[0].get(), current_mode);
+  EXPECT_EQ(extracted_modes[2].get(), native_mode);
+  EXPECT_EQ(gfx::Size(800, 600), native_mode->size());
+}
+
 }  // namespace ui
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
index 6ea6b5aa..0591063 100644
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -67,7 +67,6 @@
       const gfx::Rect& bounds) override {
     std::unique_ptr<X11WindowOzone> window = std::make_unique<X11WindowOzone>(
         window_manager_.get(), delegate, bounds);
-    window->Create();
     window->SetTitle(base::ASCIIToUTF16("Ozone X11"));
     return std::move(window);
   }
diff --git a/ui/platform_window/x11/x11_window_base.cc b/ui/platform_window/x11/x11_window_base.cc
index 201a4fe7..d309fc8 100644
--- a/ui/platform_window/x11/x11_window_base.cc
+++ b/ui/platform_window/x11/x11_window_base.cc
@@ -39,6 +39,7 @@
       xroot_window_(DefaultRootWindow(xdisplay_)),
       bounds_(bounds) {
   DCHECK(delegate_);
+  Create();
 }
 
 X11WindowBase::~X11WindowBase() {
@@ -141,8 +142,6 @@
 void X11WindowBase::Show() {
   if (window_mapped_)
     return;
-  if (xwindow_ == x11::None)
-    Create();
 
   XMapWindow(xdisplay_, xwindow_);
 
diff --git a/ui/platform_window/x11/x11_window_base.h b/ui/platform_window/x11/x11_window_base.h
index be89c6c..a46feee 100644
--- a/ui/platform_window/x11/x11_window_base.h
+++ b/ui/platform_window/x11/x11_window_base.h
@@ -27,9 +27,6 @@
   X11WindowBase(PlatformWindowDelegate* delegate, const gfx::Rect& bounds);
   ~X11WindowBase() override;
 
-  // Creates new underlying XWindow. Does not map XWindow.
-  void Create();
-
   // PlatformWindow:
   void Show() override;
   void Hide() override;
@@ -48,6 +45,9 @@
   PlatformImeController* GetPlatformImeController() override;
 
  protected:
+  // Creates new underlying XWindow. Does not map XWindow.
+  void Create();
+
   void Destroy();
 
   PlatformWindowDelegate* delegate() { return delegate_; }