diff --git a/DEPS b/DEPS
index a7760251..c80639cd 100644
--- a/DEPS
+++ b/DEPS
@@ -117,7 +117,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': '671809e62e807eb0f890a5d53eee1f8cb5fb825e',
+  'angle_revision': 'c97e3f6684c71b3eeb799837106c1588fc36282b',
   # 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.
@@ -129,7 +129,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': '94f3ca931552ba76d1b216020633829e1a07b212',
+  'pdfium_revision': '29b708e7af32de30d946b4bb609b390187987cb5',
   # 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.
@@ -213,7 +213,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
-  'spv_tools_revision': '1c128aa9efd991dd67c2bf4daa326c0e80a691d2',
+  'spv_tools_revision': '5bc30788fd8acf1c73b2a33f4b5fea371b6c9094',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
@@ -600,7 +600,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '03ec3c699be2279b5583c6d5e75d0933cd8baaf4',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'f9da224859f3aad65b28830093bc6f3c8e719809',
       'condition': 'checkout_linux',
   },
 
@@ -1106,7 +1106,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '6d2f3f4cb8bac1f7c4a945c73d07a33df74f22f9',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '55d1af14751ad10e0cae741240f013ea67039f45',
+    Var('webrtc_git') + '/src.git' + '@' + 'f7fee39547d8e88d28f606a41a0d903f3bff2a82',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1137,7 +1137,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@2cecd6e79600cfc4fc51c6109f5c2000b0fd684a',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@4bc3c99c2672f224fda1345e4bc9a31a0333eb54',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/android_webview/browser/DEPS b/android_webview/browser/DEPS
index cc9a1aee..0e80ae3b 100644
--- a/android_webview/browser/DEPS
+++ b/android_webview/browser/DEPS
@@ -64,7 +64,6 @@
   # AwContentBrowserClient::GetDefaultFavicon
   "!ui/resources/grit/ui_resources.h",
 
-
   # QuotaStatusCode required by AwQuotaManagerBridge.
   "+third_party/blink/public/mojom/quota",
   # Interface required for in-process input event handling.
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 560a3a2..f0634f7b 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -769,11 +769,12 @@
   auto proxied_request = std::move(*factory_request);
   network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
   *factory_request = mojo::MakeRequest(&target_factory_info);
+  int process_id = is_navigation ? 0 : frame->GetProcess()->GetID();
 
   // Android WebView has one non off-the-record browser context.
   base::PostTaskWithTraits(
       FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&AwProxyingURLLoaderFactory::CreateProxy,
+      base::BindOnce(&AwProxyingURLLoaderFactory::CreateProxy, process_id,
                      std::move(proxied_request), std::move(target_factory_info),
                      nullptr /* AwInterceptedRequestHandler */));
   return true;
diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc
index 5af4c0a..80e04966 100644
--- a/android_webview/browser/aw_contents.cc
+++ b/android_webview/browser/aw_contents.cc
@@ -50,6 +50,7 @@
 #include "base/location.h"
 #include "base/macros.h"
 #include "base/memory/memory_pressure_listener.h"
+#include "base/no_destructor.h"
 #include "base/pickle.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string16.h"
@@ -116,13 +117,13 @@
 bool g_should_download_favicons = false;
 
 std::string* g_locale() {
-  CR_DEFINE_STATIC_LOCAL(std::string, locale, ());
-  return &locale;
+  static base::NoDestructor<std::string> locale;
+  return locale.get();
 }
 
 std::string* g_locale_list() {
-  CR_DEFINE_STATIC_LOCAL(std::string, locale_list, ());
-  return &locale_list;
+  static base::NoDestructor<std::string> locale_list;
+  return locale_list.get();
 }
 
 const void* const kAwContentsUserDataKey = &kAwContentsUserDataKey;
@@ -1125,7 +1126,7 @@
     return gfx::Point();
   std::vector<int> location;
   base::android::JavaIntArrayToIntVector(
-      env, Java_AwContents_getLocationOnScreen(env, obj).obj(), &location);
+      env, Java_AwContents_getLocationOnScreen(env, obj), &location);
   return gfx::Point(location[0], location[1]);
 }
 
diff --git a/android_webview/browser/aw_contents_client_bridge.cc b/android_webview/browser/aw_contents_client_bridge.cc
index 6a96152..a142bc7 100644
--- a/android_webview/browser/aw_contents_client_bridge.cc
+++ b/android_webview/browser/aw_contents_client_bridge.cc
@@ -256,8 +256,8 @@
   // Convert the encoded chain to a vector of strings.
   std::vector<std::string> encoded_chain_strings;
   if (!encoded_chain_ref.is_null()) {
-    base::android::JavaArrayOfByteArrayToStringVector(
-        env, encoded_chain_ref.obj(), &encoded_chain_strings);
+    base::android::JavaArrayOfByteArrayToStringVector(env, encoded_chain_ref,
+                                                      &encoded_chain_strings);
   }
 
   std::vector<base::StringPiece> encoded_chain;
diff --git a/android_webview/browser/aw_contents_client_bridge_unittest.cc b/android_webview/browser/aw_contents_client_bridge_unittest.cc
index 592d3107..203bcbea 100644
--- a/android_webview/browser/aw_contents_client_bridge_unittest.cc
+++ b/android_webview/browser/aw_contents_client_bridge_unittest.cc
@@ -122,8 +122,7 @@
   ScopedJavaLocalRef<jobjectArray> key_types =
       Java_MockAwContentsClientBridge_getKeyTypes(env_, jbridge_);
   std::vector<std::string> vec;
-  base::android::AppendJavaStringArrayToStringVector(env_, key_types.obj(),
-                                                     &vec);
+  base::android::AppendJavaStringArrayToStringVector(env_, key_types, &vec);
   EXPECT_EQ(1u, vec.size());
   EXPECT_EQ(expected_name, vec[0]);
 }
diff --git a/android_webview/browser/aw_pdf_exporter.cc b/android_webview/browser/aw_pdf_exporter.cc
index 4065691..eab60f1e 100644
--- a/android_webview/browser/aw_pdf_exporter.cc
+++ b/android_webview/browser/aw_pdf_exporter.cc
@@ -24,7 +24,7 @@
                                      const JavaRef<jintArray>& int_arr,
                                      printing::PageRanges* range_vector) {
   std::vector<int> pages;
-  base::android::JavaIntArrayToIntVector(env, int_arr.obj(), &pages);
+  base::android::JavaIntArrayToIntVector(env, int_arr, &pages);
   for (int page : pages) {
     printing::PageRange range;
     range.from = page;
diff --git a/android_webview/browser/aw_proxying_url_loader_factory.cc b/android_webview/browser/aw_proxying_url_loader_factory.cc
index 70dfa2f..feb8596 100644
--- a/android_webview/browser/aw_proxying_url_loader_factory.cc
+++ b/android_webview/browser/aw_proxying_url_loader_factory.cc
@@ -6,19 +6,284 @@
 
 #include <utility>
 
+#include "android_webview/browser/aw_contents_client_bridge.h"
 #include "base/strings/stringprintf.h"
+#include "base/task/post_task.h"
+#include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/global_request_id.h"
+#include "content/public/browser/resource_request_info.h"
+#include "content/public/browser/web_contents.h"
 #include "content/public/common/url_utils.h"
 #include "net/http/http_util.h"
 
 namespace android_webview {
 
+namespace {
+
+// Handles intercepted, in-progress requests/responses, so that they can be
+// controlled and modified accordingly.
+class InterceptedRequest : public network::mojom::URLLoader,
+                           public network::mojom::URLLoaderClient {
+ public:
+  InterceptedRequest(
+      int process_id,
+      uint64_t request_id,
+      int32_t routing_id,
+      uint32_t options,
+      const network::ResourceRequest& request,
+      const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
+      network::mojom::URLLoaderRequest loader_request,
+      network::mojom::URLLoaderClientPtr client,
+      network::mojom::URLLoaderFactoryPtr target_factory);
+  ~InterceptedRequest() override;
+
+  void Restart();
+
+  // network::mojom::URLLoaderClient
+  void OnReceiveResponse(const network::ResourceResponseHead& head) override;
+  void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
+                         const network::ResourceResponseHead& head) override;
+  void OnUploadProgress(int64_t current_position,
+                        int64_t total_size,
+                        OnUploadProgressCallback callback) override;
+  void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
+  void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
+  void OnStartLoadingResponseBody(
+      mojo::ScopedDataPipeConsumerHandle body) override;
+  void OnComplete(const network::URLLoaderCompletionStatus& status) override;
+
+  // network::mojom::URLLoader
+  void FollowRedirect(const base::Optional<std::vector<std::string>>&
+                          to_be_removed_request_headers,
+                      const base::Optional<net::HttpRequestHeaders>&
+                          modified_request_headers) override;
+  void ProceedWithResponse() override;
+  void SetPriority(net::RequestPriority priority,
+                   int32_t intra_priority_value) override;
+  void PauseReadingBodyFromNet() override;
+  void ResumeReadingBodyFromNet() override;
+
+ private:
+  void OnRequestError(const network::URLLoaderCompletionStatus& status);
+
+  const int process_id_;
+  const uint64_t request_id_;
+  const int32_t routing_id_;
+  const uint32_t options_;
+
+  network::ResourceRequest request_;
+  const net::MutableNetworkTrafficAnnotationTag traffic_annotation_;
+
+  mojo::Binding<network::mojom::URLLoader> proxied_loader_binding_;
+  network::mojom::URLLoaderClientPtr target_client_;
+
+  mojo::Binding<network::mojom::URLLoaderClient> proxied_client_binding_;
+  network::mojom::URLLoaderPtr target_loader_;
+  network::mojom::URLLoaderFactoryPtr target_factory_;
+
+  base::WeakPtrFactory<InterceptedRequest> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(InterceptedRequest);
+};
+
+InterceptedRequest::InterceptedRequest(
+    int process_id,
+    uint64_t request_id,
+    int32_t routing_id,
+    uint32_t options,
+    const network::ResourceRequest& request,
+    const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
+    network::mojom::URLLoaderRequest loader_request,
+    network::mojom::URLLoaderClientPtr client,
+    network::mojom::URLLoaderFactoryPtr target_factory)
+    : process_id_(process_id),
+      request_id_(request_id),
+      routing_id_(routing_id),
+      options_(options),
+      request_(request),
+      traffic_annotation_(traffic_annotation),
+      proxied_loader_binding_(this, std::move(loader_request)),
+      target_client_(std::move(client)),
+      proxied_client_binding_(this),
+      target_factory_(std::move(target_factory)),
+      weak_factory_(this) {
+  // If there is a client error, clean up the request.
+  target_client_.set_connection_error_handler(base::BindOnce(
+      &InterceptedRequest::OnRequestError, weak_factory_.GetWeakPtr(),
+      network::URLLoaderCompletionStatus(net::ERR_ABORTED)));
+}
+
+InterceptedRequest::~InterceptedRequest() {}
+
+void InterceptedRequest::Restart() {
+  // TODO(timvolodine): add async check shouldOverrideUrlLoading and
+  // shouldInterceptRequest.
+
+  if (!target_loader_ && target_factory_) {
+    network::mojom::URLLoaderClientPtr proxied_client;
+    proxied_client_binding_.Bind(mojo::MakeRequest(&proxied_client));
+    target_factory_->CreateLoaderAndStart(
+        mojo::MakeRequest(&target_loader_), routing_id_, request_id_, options_,
+        request_, std::move(proxied_client), traffic_annotation_);
+  }
+}
+
+namespace {
+
+void OnReceivedHttpErrorOnUiThread(
+    int process_id,
+    int render_frame_id,
+    const AwWebResourceRequest& request,
+    std::unique_ptr<AwContentsClientBridge::HttpErrorInfo> http_error_info) {
+  // TODO(timvolodine): consider factoring out this functionality as it will
+  // be needed for other callbacks as well.
+  content::WebContents* wc =
+      process_id
+          ? content::WebContents::FromRenderFrameHost(
+                content::RenderFrameHost::FromID(process_id, render_frame_id))
+          : content::WebContents::FromFrameTreeNodeId(render_frame_id);
+  auto* client = AwContentsClientBridge::FromWebContents(wc);
+  if (!client) {
+    DLOG(WARNING) << "client is null, onReceivedHttpError dropped for "
+                  << request.url;
+    return;
+  }
+  client->OnReceivedHttpError(request, std::move(http_error_info));
+}
+
+}  // namespace
+
+// URLLoaderClient methods.
+
+void InterceptedRequest::OnReceiveResponse(
+    const network::ResourceResponseHead& head) {
+  // intercept response headers here
+  // pause/resume proxied_client_binding_ if necessary
+
+  if (head.headers->response_code() >= 400) {
+    // In Android WebView the WebViewClient.onReceivedHttpError callback
+    // is invoked for any resource (main page, iframe, image, etc.) with
+    // status code >= 400.
+    std::unique_ptr<AwContentsClientBridge::HttpErrorInfo> error_info =
+        AwContentsClientBridge::ExtractHttpErrorInfo(head.headers.get());
+
+    base::PostTaskWithTraits(
+        FROM_HERE, {content::BrowserThread::UI},
+        base::BindOnce(
+            &OnReceivedHttpErrorOnUiThread, process_id_,
+            request_.render_frame_id,
+            AwWebResourceRequest(
+                request_.url.spec(), request_.method,
+                request_.resource_type == content::RESOURCE_TYPE_MAIN_FRAME,
+                request_.has_user_gesture, request_.headers),
+            std::move(error_info)));
+  }
+
+  target_client_->OnReceiveResponse(head);
+}
+
+void InterceptedRequest::OnReceiveRedirect(
+    const net::RedirectInfo& redirect_info,
+    const network::ResourceResponseHead& head) {
+  // TODO(timvolodine): handle redirect override.
+  // TODO(timvolodine): handle unsafe redirect case.
+  target_client_->OnReceiveRedirect(redirect_info, head);
+  request_.url = redirect_info.new_url;
+  request_.method = redirect_info.new_method;
+  request_.site_for_cookies = redirect_info.new_site_for_cookies;
+  request_.referrer = GURL(redirect_info.new_referrer);
+  request_.referrer_policy = redirect_info.new_referrer_policy;
+}
+
+void InterceptedRequest::OnUploadProgress(int64_t current_position,
+                                          int64_t total_size,
+                                          OnUploadProgressCallback callback) {
+  target_client_->OnUploadProgress(current_position, total_size,
+                                   std::move(callback));
+}
+
+void InterceptedRequest::OnReceiveCachedMetadata(
+    const std::vector<uint8_t>& data) {
+  target_client_->OnReceiveCachedMetadata(data);
+}
+
+void InterceptedRequest::OnTransferSizeUpdated(int32_t transfer_size_diff) {
+  target_client_->OnTransferSizeUpdated(transfer_size_diff);
+}
+
+void InterceptedRequest::OnStartLoadingResponseBody(
+    mojo::ScopedDataPipeConsumerHandle body) {
+  target_client_->OnStartLoadingResponseBody(std::move(body));
+}
+
+void InterceptedRequest::OnComplete(
+    const network::URLLoaderCompletionStatus& status) {
+  target_client_->OnComplete(status);
+
+  // Deletes |this|.
+  // TODO(timvolodine): consider doing this via the factory.
+  delete this;
+}
+
+// URLLoader methods.
+
+void InterceptedRequest::FollowRedirect(
+    const base::Optional<std::vector<std::string>>&
+        to_be_removed_request_headers,
+    const base::Optional<net::HttpRequestHeaders>& modified_request_headers) {
+  if (target_loader_) {
+    target_loader_->FollowRedirect(to_be_removed_request_headers,
+                                   modified_request_headers);
+  }
+
+  Restart();
+}
+
+void InterceptedRequest::ProceedWithResponse() {
+  if (target_loader_)
+    target_loader_->ProceedWithResponse();
+}
+
+void InterceptedRequest::SetPriority(net::RequestPriority priority,
+                                     int32_t intra_priority_value) {
+  if (target_loader_)
+    target_loader_->SetPriority(priority, intra_priority_value);
+}
+
+void InterceptedRequest::PauseReadingBodyFromNet() {
+  if (target_loader_)
+    target_loader_->PauseReadingBodyFromNet();
+}
+
+void InterceptedRequest::ResumeReadingBodyFromNet() {
+  if (target_loader_)
+    target_loader_->ResumeReadingBodyFromNet();
+}
+
+void InterceptedRequest::OnRequestError(
+    const network::URLLoaderCompletionStatus& status) {
+  target_client_->OnComplete(status);
+
+  // Deletes |this|.
+  // TODO(timvolodine): consider handling this through a data structure.
+  delete this;
+}
+
+}  // namespace
+
+//============================
+// AwProxyingURLLoaderFactory
+//============================
+
 AwProxyingURLLoaderFactory::AwProxyingURLLoaderFactory(
+    int process_id,
     network::mojom::URLLoaderFactoryRequest loader_request,
     network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
     std::unique_ptr<AwInterceptedRequestHandler> request_handler)
-    : request_handler_(std::move(request_handler)), weak_factory_(this) {
+    : process_id_(process_id),
+      request_handler_(std::move(request_handler)),
+      weak_factory_(this) {
   // actual creation of the factory
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
   target_factory_.Bind(std::move(target_factory_info));
@@ -35,13 +300,14 @@
 
 // static
 void AwProxyingURLLoaderFactory::CreateProxy(
+    int process_id,
     network::mojom::URLLoaderFactoryRequest loader_request,
     network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
     std::unique_ptr<AwInterceptedRequestHandler> request_handler) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
 
   // will manage its own lifetime
-  new AwProxyingURLLoaderFactory(std::move(loader_request),
+  new AwProxyingURLLoaderFactory(process_id, std::move(loader_request),
                                  std::move(target_factory_info),
                                  std::move(request_handler));
 }
@@ -54,8 +320,9 @@
     const network::ResourceRequest& request,
     network::mojom::URLLoaderClientPtr client,
     const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
-  if (!request_handler_) {
-    // no interceptor --> pass through
+  bool pass_through = false;
+  if (pass_through) {
+    // this is the so-called pass-through, no-op option.
     target_factory_->CreateLoaderAndStart(
         std::move(loader), routing_id, request_id, options, request,
         std::move(client), traffic_annotation);
@@ -64,6 +331,16 @@
 
   // TODO(timvolodine): handle interception, modification (headers for
   // webview), blocking, callbacks etc..
+
+  network::mojom::URLLoaderFactoryPtr target_factory_clone;
+  target_factory_->Clone(MakeRequest(&target_factory_clone));
+
+  // manages its own lifecycle
+  // TODO(timvolodine): consider keeping track of requests.
+  InterceptedRequest* req = new InterceptedRequest(
+      process_id_, request_id, routing_id, options, request, traffic_annotation,
+      std::move(loader), std::move(client), std::move(target_factory_clone));
+  req->Restart();
 }
 
 void AwProxyingURLLoaderFactory::OnTargetFactoryError() {
diff --git a/android_webview/browser/aw_proxying_url_loader_factory.h b/android_webview/browser/aw_proxying_url_loader_factory.h
index b7cada8..5a673ff 100644
--- a/android_webview/browser/aw_proxying_url_loader_factory.h
+++ b/android_webview/browser/aw_proxying_url_loader_factory.h
@@ -31,6 +31,7 @@
 class AwProxyingURLLoaderFactory : public network::mojom::URLLoaderFactory {
  public:
   AwProxyingURLLoaderFactory(
+      int process_id,
       network::mojom::URLLoaderFactoryRequest loader_request,
       network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
       std::unique_ptr<AwInterceptedRequestHandler> request_handler);
@@ -39,6 +40,7 @@
 
   // static
   static void CreateProxy(
+      int process_id,
       network::mojom::URLLoaderFactoryRequest loader,
       network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
       std::unique_ptr<AwInterceptedRequestHandler> request_handler);
@@ -58,6 +60,7 @@
   void OnTargetFactoryError();
   void OnProxyBindingError();
 
+  const int process_id_;
   mojo::BindingSet<network::mojom::URLLoaderFactory> proxy_bindings_;
   network::mojom::URLLoaderFactoryPtr target_factory_;
 
diff --git a/android_webview/browser/aw_settings.cc b/android_webview/browser/aw_settings.cc
index a98fd91..fdd0bce 100644
--- a/android_webview/browser/aw_settings.cc
+++ b/android_webview/browser/aw_settings.cc
@@ -13,6 +13,7 @@
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
 #include "base/macros.h"
+#include "base/no_destructor.h"
 #include "base/supports_user_data.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/navigation_entry.h"
@@ -36,15 +37,14 @@
 
 void PopulateFixedRendererPreferences(RendererPreferences* prefs) {
   // TODO(boliu): Deduplicate with chrome/ code.
-  CR_DEFINE_STATIC_LOCAL(
-      const gfx::FontRenderParams, params,
-      (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL)));
-  prefs->should_antialias_text = params.antialiasing;
-  prefs->use_subpixel_positioning = params.subpixel_positioning;
-  prefs->hinting = params.hinting;
-  prefs->use_autohinter = params.autohinter;
-  prefs->use_bitmaps = params.use_bitmaps;
-  prefs->subpixel_rendering = params.subpixel_rendering;
+  static const base::NoDestructor<gfx::FontRenderParams> params(
+      gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr));
+  prefs->should_antialias_text = params->antialiasing;
+  prefs->use_subpixel_positioning = params->subpixel_positioning;
+  prefs->hinting = params->hinting;
+  prefs->use_autohinter = params->autohinter;
+  prefs->use_bitmaps = params->use_bitmaps;
+  prefs->subpixel_rendering = params->subpixel_rendering;
 }
 
 void PopulateFixedWebPreferences(WebPreferences* web_prefs) {
diff --git a/android_webview/browser/aw_variations_seed_bridge.cc b/android_webview/browser/aw_variations_seed_bridge.cc
index 4b4b95d1..7102357 100644
--- a/android_webview/browser/aw_variations_seed_bridge.cc
+++ b/android_webview/browser/aw_variations_seed_bridge.cc
@@ -37,7 +37,7 @@
   Java_AwVariationsSeedBridge_clearSeed(env);
 
   auto java_seed = std::make_unique<variations::SeedResponse>();
-  base::android::JavaByteArrayToString(env, j_data.obj(), &java_seed->data);
+  base::android::JavaByteArrayToString(env, j_data, &java_seed->data);
   java_seed->signature = ConvertJavaStringToUTF8(j_signature);
   java_seed->country = ConvertJavaStringToUTF8(j_country);
   java_seed->date = ConvertJavaStringToUTF8(j_date);
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 9d8b9a58..f65fc30 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -33,7 +33,8 @@
       last_committed_layer_tree_frame_sink_id_(0u),
       last_submitted_layer_tree_frame_sink_id_(0u) {
   DCHECK(last_egl_context_);
-  surfaces_->GetFrameSinkManager()->RegisterFrameSinkId(frame_sink_id_);
+  surfaces_->GetFrameSinkManager()->RegisterFrameSinkId(
+      frame_sink_id_, true /* report_activation */);
   surfaces_->GetFrameSinkManager()->SetFrameSinkDebugLabel(frame_sink_id_,
                                                            "HardwareRenderer");
   CreateNewCompositorFrameSinkSupport();
diff --git a/android_webview/browser/net/aw_web_resource_response.cc b/android_webview/browser/net/aw_web_resource_response.cc
index f45174a..c6568e7 100644
--- a/android_webview/browser/net/aw_web_resource_response.cc
+++ b/android_webview/browser/net/aw_web_resource_response.cc
@@ -79,9 +79,9 @@
     return false;
   std::vector<std::string> header_names;
   std::vector<std::string> header_values;
-  AppendJavaStringArrayToStringVector(env, jstringArray_headerNames.obj(),
+  AppendJavaStringArrayToStringVector(env, jstringArray_headerNames,
                                       &header_names);
-  AppendJavaStringArrayToStringVector(env, jstringArray_headerValues.obj(),
+  AppendJavaStringArrayToStringVector(env, jstringArray_headerValues,
                                       &header_values);
   DCHECK_EQ(header_values.size(), header_names.size());
   for (size_t i = 0; i < header_names.size(); ++i) {
diff --git a/android_webview/common/aw_resource.cc b/android_webview/common/aw_resource.cc
index 6400a1a..77c92d3 100644
--- a/android_webview/common/aw_resource.cc
+++ b/android_webview/common/aw_resource.cc
@@ -19,7 +19,7 @@
   std::vector<std::string> key_system_uuid_mappings;
   ScopedJavaLocalRef<jobjectArray> mappings =
       Java_AwResource_getConfigKeySystemUuidMapping(env);
-  base::android::AppendJavaStringArrayToStringVector(env, mappings.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, mappings,
                                                      &key_system_uuid_mappings);
   return key_system_uuid_mappings;
 }
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
index b235cb76..ea2e4e7 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
@@ -139,6 +139,11 @@
 
         @Override
         public boolean init(Observer result) {
+            return init(result, false);
+        }
+
+        @Override
+        public boolean init(Observer result, boolean enableLocalBlacklists) {
             mObserver = result;
             return true;
         }
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 6adae32..460a626 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -244,6 +244,8 @@
     "assistant/util/views_util.h",
     "autoclick/autoclick_controller.cc",
     "autoclick/autoclick_controller.h",
+    "autoclick/autoclick_ring_handler.cc",
+    "autoclick/autoclick_ring_handler.h",
     "bluetooth_devices_observer.cc",
     "bluetooth_devices_observer.h",
     "cancel_mode.cc",
@@ -511,8 +513,6 @@
     "new_window_controller.cc",
     "note_taking_controller.cc",
     "note_taking_controller.h",
-    "pointer_watcher_adapter.cc",
-    "pointer_watcher_adapter.h",
     "policy/policy_recommendation_restorer.cc",
     "policy/policy_recommendation_restorer.h",
     "root_window_controller.cc",
@@ -1360,7 +1360,6 @@
   deps = [
     "//ash/app_menu",
     "//ash/assistant/ui:constants",
-    "//ash/autoclick/common:autoclick",
     "//ash/components/cursor",
     "//ash/components/fast_ink",
     "//ash/components/quick_launch/public/mojom",
@@ -1816,7 +1815,6 @@
     "metrics/user_metrics_recorder_unittest.cc",
     "multi_device_setup/multi_device_notification_presenter_unittest.cc",
     "mus_property_mirror_ash_unittest.cc",
-    "pointer_watcher_adapter_unittest.cc",
     "policy/policy_recommendation_restorer_unittest.cc",
     "root_window_controller_unittest.cc",
     "rotator/screen_rotation_animation_unittest.cc",
@@ -2015,7 +2013,6 @@
     "//ash/app_list:test_support",
     "//ash/app_list/presenter",
     "//ash/app_menu",
-    "//ash/autoclick/common:autoclick",
     "//ash/components/fast_ink",
     "//ash/components/fast_ink:unit_tests",
     "//ash/components/quick_launch/public/mojom:constants",
diff --git a/ash/ash_service_unittest.cc b/ash/ash_service_unittest.cc
index 8e5bbb0e..67a0c2c9 100644
--- a/ash/ash_service_unittest.cc
+++ b/ash/ash_service_unittest.cc
@@ -54,9 +54,6 @@
   void OnEmbedRootDestroyed(
       aura::WindowTreeHostMus* window_tree_host) override {}
   void OnLostConnection(aura::WindowTreeClient* client) override {}
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              aura::Window* target) override {}
   aura::PropertyConverter* GetPropertyConverter() override {
     return &property_converter_;
   }
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index 020f0cb55..60ef942c1 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -4,17 +4,14 @@
 
 #include "ash/autoclick/autoclick_controller.h"
 
-#include "ash/autoclick/common/autoclick_controller_common.h"
-#include "ash/autoclick/common/autoclick_controller_common_delegate.h"
+#include "ash/autoclick/autoclick_ring_handler.h"
 #include "ash/public/cpp/ash_constants.h"
 #include "ash/public/cpp/shell_window_ids.h"
 #include "ash/shell.h"
 #include "ash/wm/root_window_finder.h"
 #include "base/timer/timer.h"
-#include "ui/aura/window_observer.h"
 #include "ui/aura/window_tree_host.h"
 #include "ui/events/event.h"
-#include "ui/events/event_handler.h"
 #include "ui/events/event_sink.h"
 #include "ui/events/event_utils.h"
 #include "ui/views/widget/widget.h"
@@ -22,67 +19,41 @@
 
 namespace ash {
 
+namespace {
+
+// The threshold of mouse movement measured in DIP that will
+// initiate a new autoclick.
+const int kMovementThreshold = 20;
+
+bool IsModifierKey(const ui::KeyboardCode key_code) {
+  return key_code == ui::VKEY_SHIFT || key_code == ui::VKEY_LSHIFT ||
+         key_code == ui::VKEY_CONTROL || key_code == ui::VKEY_LCONTROL ||
+         key_code == ui::VKEY_RCONTROL || key_code == ui::VKEY_MENU ||
+         key_code == ui::VKEY_LMENU || key_code == ui::VKEY_RMENU;
+}
+
+}  // namespace
+
 // static.
 base::TimeDelta AutoclickController::GetDefaultAutoclickDelay() {
   return base::TimeDelta::FromMilliseconds(int64_t{kDefaultAutoclickDelayMs});
 }
 
-class AutoclickControllerImpl : public AutoclickController,
-                                public ui::EventHandler,
-                                public AutoclickControllerCommonDelegate,
-                                public aura::WindowObserver {
- public:
-  AutoclickControllerImpl();
-  ~AutoclickControllerImpl() override;
-
- private:
-  void SetTapDownTarget(aura::Window* target);
-
-  // AutoclickController overrides:
-  void SetEnabled(bool enabled) override;
-  bool IsEnabled() const override;
-  void SetAutoclickDelay(base::TimeDelta delay) override;
-
-  // ui::EventHandler overrides:
-  void OnMouseEvent(ui::MouseEvent* event) override;
-  void OnKeyEvent(ui::KeyEvent* event) override;
-  void OnTouchEvent(ui::TouchEvent* event) override;
-  void OnGestureEvent(ui::GestureEvent* event) override;
-  void OnScrollEvent(ui::ScrollEvent* event) override;
-
-  // AutoclickControllerCommonDelegate overrides:
-  views::Widget* CreateAutoclickRingWidget(
-      const gfx::Point& point_in_screen) override;
-  void UpdateAutoclickRingWidget(views::Widget* widget,
-                                 const gfx::Point& point_in_screen) override;
-  void DoAutoclick(const gfx::Point& point_in_screen,
-                   const int mouse_event_flags) override;
-  void OnAutoclickCanceled() override;
-
-  // aura::WindowObserver overrides:
-  void OnWindowDestroying(aura::Window* window) override;
-
-  bool enabled_;
-  // The target window is observed by AutoclickControllerImpl for the duration
-  // of a autoclick gesture.
-  aura::Window* tap_down_target_;
-  std::unique_ptr<views::Widget> widget_;
-  std::unique_ptr<AutoclickControllerCommon> autoclick_controller_common_;
-
-  DISALLOW_COPY_AND_ASSIGN(AutoclickControllerImpl);
-};
-
-AutoclickControllerImpl::AutoclickControllerImpl()
+AutoclickController::AutoclickController()
     : enabled_(false),
       tap_down_target_(nullptr),
-      autoclick_controller_common_(
-          new AutoclickControllerCommon(GetDefaultAutoclickDelay(), this)) {}
+      delay_(GetDefaultAutoclickDelay()),
+      mouse_event_flags_(ui::EF_NONE),
+      anchor_location_(-kMovementThreshold, -kMovementThreshold),
+      autoclick_ring_handler_(std::make_unique<AutoclickRingHandler>()) {
+  InitClickTimer();
+}
 
-AutoclickControllerImpl::~AutoclickControllerImpl() {
+AutoclickController::~AutoclickController() {
   SetTapDownTarget(nullptr);
 }
 
-void AutoclickControllerImpl::SetTapDownTarget(aura::Window* target) {
+void AutoclickController::SetTapDownTarget(aura::Window* target) {
   if (tap_down_target_ == target)
     return;
 
@@ -93,7 +64,7 @@
     tap_down_target_->AddObserver(this);
 }
 
-void AutoclickControllerImpl::SetEnabled(bool enabled) {
+void AutoclickController::SetEnabled(bool enabled) {
   if (enabled_ == enabled)
     return;
   enabled_ = enabled;
@@ -103,38 +74,19 @@
   else
     Shell::Get()->RemovePreTargetHandler(this);
 
-  autoclick_controller_common_->CancelAutoclick();
+  CancelAutoclick();
 }
 
-bool AutoclickControllerImpl::IsEnabled() const {
+bool AutoclickController::IsEnabled() const {
   return enabled_;
 }
 
-void AutoclickControllerImpl::SetAutoclickDelay(base::TimeDelta delay) {
-  autoclick_controller_common_->SetAutoclickDelay(delay);
+void AutoclickController::SetAutoclickDelay(base::TimeDelta delay) {
+  delay_ = delay;
+  InitClickTimer();
 }
 
-void AutoclickControllerImpl::OnMouseEvent(ui::MouseEvent* event) {
-  autoclick_controller_common_->HandleMouseEvent(*event);
-}
-
-void AutoclickControllerImpl::OnKeyEvent(ui::KeyEvent* event) {
-  autoclick_controller_common_->HandleKeyEvent(*event);
-}
-
-void AutoclickControllerImpl::OnTouchEvent(ui::TouchEvent* event) {
-  autoclick_controller_common_->CancelAutoclick();
-}
-
-void AutoclickControllerImpl::OnGestureEvent(ui::GestureEvent* event) {
-  autoclick_controller_common_->CancelAutoclick();
-}
-
-void AutoclickControllerImpl::OnScrollEvent(ui::ScrollEvent* event) {
-  autoclick_controller_common_->CancelAutoclick();
-}
-
-views::Widget* AutoclickControllerImpl::CreateAutoclickRingWidget(
+void AutoclickController::CreateAutoclickRingWidget(
     const gfx::Point& point_in_screen) {
   aura::Window* target = ash::wm::GetRootWindowAt(point_in_screen);
   SetTapDownTarget(target);
@@ -150,10 +102,9 @@
       Shell::GetContainer(root_window, kShellWindowId_OverlayContainer);
   widget_->Init(params);
   widget_->SetOpacity(1.f);
-  return widget_.get();
 }
 
-void AutoclickControllerImpl::UpdateAutoclickRingWidget(
+void AutoclickController::UpdateAutoclickRingWidget(
     views::Widget* widget,
     const gfx::Point& point_in_screen) {
   aura::Window* target = ash::wm::GetRootWindowAt(point_in_screen);
@@ -166,8 +117,10 @@
   }
 }
 
-void AutoclickControllerImpl::DoAutoclick(const gfx::Point& point_in_screen,
-                                          const int mouse_event_flags) {
+void AutoclickController::DoAutoclick() {
+  gfx::Point point_in_screen =
+      display::Screen::GetScreen()->GetCursorScreenPoint();
+  anchor_location_ = point_in_screen;
   aura::Window* root_window = wm::GetRootWindowAt(point_in_screen);
   DCHECK(root_window) << "Root window not found while attempting autoclick.";
 
@@ -178,11 +131,11 @@
 
   ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, location_in_pixels,
                              location_in_pixels, ui::EventTimeForNow(),
-                             mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
+                             mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
                              ui::EF_LEFT_MOUSE_BUTTON);
   ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, location_in_pixels,
                                location_in_pixels, ui::EventTimeForNow(),
-                               mouse_event_flags | ui::EF_LEFT_MOUSE_BUTTON,
+                               mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON,
                                ui::EF_LEFT_MOUSE_BUTTON);
 
   ui::EventDispatchDetails details =
@@ -191,18 +144,87 @@
     details = host->event_sink()->OnEventFromSource(&release_event);
 }
 
-void AutoclickControllerImpl::OnAutoclickCanceled() {
+void AutoclickController::CancelAutoclick() {
+  autoclick_timer_->Stop();
+  autoclick_ring_handler_->StopGesture();
   SetTapDownTarget(nullptr);
 }
 
-void AutoclickControllerImpl::OnWindowDestroying(aura::Window* window) {
-  DCHECK_EQ(tap_down_target_, window);
-  autoclick_controller_common_->CancelAutoclick();
+void AutoclickController::InitClickTimer() {
+  autoclick_timer_ = std::make_unique<base::RetainingOneShotTimer>(
+      FROM_HERE, delay_,
+      base::BindRepeating(&AutoclickController::DoAutoclick,
+                          base::Unretained(this)));
 }
 
-// static.
-AutoclickController* AutoclickController::CreateInstance() {
-  return new AutoclickControllerImpl();
+void AutoclickController::UpdateRingWidget(const gfx::Point& point_in_screen) {
+  if (!widget_) {
+    CreateAutoclickRingWidget(point_in_screen);
+  } else {
+    UpdateAutoclickRingWidget(widget_.get(), point_in_screen);
+  }
+}
+
+void AutoclickController::OnMouseEvent(ui::MouseEvent* event) {
+  DCHECK(event->target());
+  gfx::Point point_in_screen = event->target()->GetScreenLocation(*event);
+  if (event->type() == ui::ET_MOUSE_MOVED &&
+      !(event->flags() & ui::EF_IS_SYNTHESIZED)) {
+    mouse_event_flags_ = event->flags();
+    UpdateRingWidget(point_in_screen);
+
+    // The distance between the mouse location and the anchor location
+    // must exceed a certain threshold to initiate a new autoclick countdown.
+    // This ensures that mouse jitter caused by poor motor control does not
+    // 1. initiate an unwanted autoclick from rest
+    // 2. prevent the autoclick from ever occurring when the mouse
+    //    arrives at the target.
+    gfx::Vector2d delta = point_in_screen - anchor_location_;
+    if (delta.LengthSquared() >= kMovementThreshold * kMovementThreshold) {
+      anchor_location_ = point_in_screen;
+      autoclick_timer_->Reset();
+      autoclick_ring_handler_->StartGesture(delay_, anchor_location_,
+                                            widget_.get());
+    } else if (autoclick_timer_->IsRunning()) {
+      autoclick_ring_handler_->SetGestureCenter(point_in_screen, widget_.get());
+    }
+  } else if (event->type() == ui::ET_MOUSE_PRESSED) {
+    CancelAutoclick();
+  } else if (event->type() == ui::ET_MOUSEWHEEL &&
+             autoclick_timer_->IsRunning()) {
+    autoclick_timer_->Reset();
+    UpdateRingWidget(point_in_screen);
+    autoclick_ring_handler_->StartGesture(delay_, anchor_location_,
+                                          widget_.get());
+  }
+}
+
+void AutoclickController::OnKeyEvent(ui::KeyEvent* event) {
+  int modifier_mask = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN |
+                      ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN |
+                      ui::EF_IS_EXTENDED_KEY;
+  int new_modifiers = event->flags() & modifier_mask;
+  mouse_event_flags_ = (mouse_event_flags_ & ~modifier_mask) | new_modifiers;
+
+  if (!IsModifierKey(event->key_code()))
+    CancelAutoclick();
+}
+
+void AutoclickController::OnTouchEvent(ui::TouchEvent* event) {
+  CancelAutoclick();
+}
+
+void AutoclickController::OnGestureEvent(ui::GestureEvent* event) {
+  CancelAutoclick();
+}
+
+void AutoclickController::OnScrollEvent(ui::ScrollEvent* event) {
+  CancelAutoclick();
+}
+
+void AutoclickController::OnWindowDestroying(aura::Window* window) {
+  DCHECK_EQ(tap_down_target_, window);
+  CancelAutoclick();
 }
 
 }  // namespace ash
diff --git a/ash/autoclick/autoclick_controller.h b/ash/autoclick/autoclick_controller.h
index 5b64af5e..38e4968 100644
--- a/ash/autoclick/autoclick_controller.h
+++ b/ash/autoclick/autoclick_controller.h
@@ -8,35 +8,77 @@
 #include "ash/ash_export.h"
 #include "base/macros.h"
 #include "base/time/time.h"
+#include "ui/aura/window_observer.h"
+#include "ui/events/event_handler.h"
+#include "ui/gfx/geometry/point.h"
+
+namespace base {
+class RetainingOneShotTimer;
+}  // namespace base
+
+namespace views {
+class Widget;
+}  // namespace views
 
 namespace ash {
 
-// Controls the autoclick a11y feature in ash.
-// If enabled, we will automatically send a click event a short time after
-// the mouse had been at rest.
-class ASH_EXPORT AutoclickController {
+class AutoclickRingHandler;
+
+// Autoclick is one of the accessibility features. If enabled, two circles will
+// animate at the mouse event location and an automatic click event will happen
+// after a certain amount of time at that location.
+class ASH_EXPORT AutoclickController : public ui::EventHandler,
+                                       public aura::WindowObserver {
  public:
-  virtual ~AutoclickController() {}
+  AutoclickController();
+  ~AutoclickController() override;
 
   // Set whether autoclicking is enabled.
-  virtual void SetEnabled(bool enabled) = 0;
+  void SetEnabled(bool enabled);
 
   // Returns true if autoclicking is enabled.
-  virtual bool IsEnabled() const = 0;
+  bool IsEnabled() const;
 
   // Set the time to wait in milliseconds from when the mouse stops moving
   // to when the autoclick event is sent.
-  virtual void SetAutoclickDelay(base::TimeDelta delay) = 0;
-
-  static AutoclickController* CreateInstance();
+  void SetAutoclickDelay(base::TimeDelta delay);
 
   // Gets the default wait time as a base::TimeDelta object.
   static base::TimeDelta GetDefaultAutoclickDelay();
 
- protected:
-  AutoclickController() {}
-
  private:
+  void SetTapDownTarget(aura::Window* target);
+  void CreateAutoclickRingWidget(const gfx::Point& point_in_screen);
+  void UpdateAutoclickRingWidget(views::Widget* widget,
+                                 const gfx::Point& point_in_screen);
+  void DoAutoclick();
+  void CancelAutoclick();
+  void InitClickTimer();
+  void UpdateRingWidget(const gfx::Point& mouse_location);
+
+  // ui::EventHandler overrides:
+  void OnMouseEvent(ui::MouseEvent* event) override;
+  void OnKeyEvent(ui::KeyEvent* event) override;
+  void OnTouchEvent(ui::TouchEvent* event) override;
+  void OnGestureEvent(ui::GestureEvent* event) override;
+  void OnScrollEvent(ui::ScrollEvent* event) override;
+
+  // aura::WindowObserver overrides:
+  void OnWindowDestroying(aura::Window* window) override;
+
+  bool enabled_;
+  // The target window is observed by AutoclickController for the duration
+  // of a autoclick gesture.
+  aura::Window* tap_down_target_;
+  std::unique_ptr<views::Widget> widget_;
+  base::TimeDelta delay_;
+  int mouse_event_flags_;
+  std::unique_ptr<base::RetainingOneShotTimer> autoclick_timer_;
+  // The position in screen coordinates used to determine
+  // the distance the mouse has moved.
+  gfx::Point anchor_location_;
+  std::unique_ptr<AutoclickRingHandler> autoclick_ring_handler_;
+
   DISALLOW_COPY_AND_ASSIGN(AutoclickController);
 };
 
diff --git a/ash/autoclick/common/autoclick_ring_handler.cc b/ash/autoclick/autoclick_ring_handler.cc
similarity index 99%
rename from ash/autoclick/common/autoclick_ring_handler.cc
rename to ash/autoclick/autoclick_ring_handler.cc
index 0d7cbb2..67f2bdf2 100644
--- a/ash/autoclick/common/autoclick_ring_handler.cc
+++ b/ash/autoclick/autoclick_ring_handler.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 "ash/autoclick/common/autoclick_ring_handler.h"
+#include "ash/autoclick/autoclick_ring_handler.h"
 
 #include "third_party/skia/include/core/SkColor.h"
 #include "third_party/skia/include/core/SkPath.h"
diff --git a/ash/autoclick/common/autoclick_ring_handler.h b/ash/autoclick/autoclick_ring_handler.h
similarity index 90%
rename from ash/autoclick/common/autoclick_ring_handler.h
rename to ash/autoclick/autoclick_ring_handler.h
index bf424e6..c17a565a 100644
--- a/ash/autoclick/common/autoclick_ring_handler.h
+++ b/ash/autoclick/autoclick_ring_handler.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 ASH_AUTOCLICK_COMMON_AUTOCLICK_RING_HANDLER_H_
-#define ASH_AUTOCLICK_COMMON_AUTOCLICK_RING_HANDLER_H_
+#ifndef ASH_AUTOCLICK_AUTOCLICK_RING_HANDLER_H_
+#define ASH_AUTOCLICK_AUTOCLICK_RING_HANDLER_H_
 
 #include "base/macros.h"
 #include "base/timer/timer.h"
@@ -57,4 +57,4 @@
 
 }  // namespace ash
 
-#endif  // ASH_AUTOCLICK_COMMON_AUTOCLICK_RING_HANDLER_H_
+#endif  // ASH_AUTOCLICK_AUTOCLICK_RING_HANDLER_H_
diff --git a/ash/autoclick/common/BUILD.gn b/ash/autoclick/common/BUILD.gn
deleted file mode 100644
index 5c46da1..0000000
--- a/ash/autoclick/common/BUILD.gn
+++ /dev/null
@@ -1,29 +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.
-
-import("//build/config/ui.gni")
-
-source_set("autoclick") {
-  sources = [
-    "autoclick_controller_common.cc",
-    "autoclick_controller_common.h",
-    "autoclick_controller_common_delegate.h",
-    "autoclick_ring_handler.cc",
-    "autoclick_ring_handler.h",
-  ]
-
-  deps = [
-    "//base",
-    "//cc/paint",
-    "//skia",
-    "//ui/aura",
-    "//ui/compositor",
-    "//ui/display",
-    "//ui/events",
-    "//ui/gfx",
-    "//ui/gfx/geometry",
-    "//ui/views",
-    "//ui/wm",
-  ]
-}
diff --git a/ash/autoclick/common/DEPS b/ash/autoclick/common/DEPS
deleted file mode 100644
index 5eead835..0000000
--- a/ash/autoclick/common/DEPS
+++ /dev/null
@@ -1,12 +0,0 @@
-include_rules = [
-  "-ash",
-  "+ash/autoclick/common",
-  "+ui/aura",
-  "+ui/compositor",
-  "+ui/display",
-  "+ui/events",
-  "+ui/gfx",
-  "+ui/gfx/geometry",
-  "+ui/views",
-  "+ui/wm",
-]
diff --git a/ash/autoclick/common/autoclick_controller_common.cc b/ash/autoclick/common/autoclick_controller_common.cc
deleted file mode 100644
index c9886595..0000000
--- a/ash/autoclick/common/autoclick_controller_common.cc
+++ /dev/null
@@ -1,130 +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 "ash/autoclick/common/autoclick_controller_common.h"
-
-#include "ash/autoclick/common/autoclick_controller_common_delegate.h"
-#include "ui/aura/window.h"
-#include "ui/display/screen.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/geometry/vector2d.h"
-#include "ui/wm/core/coordinate_conversion.h"
-
-namespace ash {
-
-namespace {
-
-// The threshold of mouse movement measured in DIP that will
-// initiate a new autoclick.
-const int kMovementThreshold = 20;
-
-bool IsModifierKey(const ui::KeyboardCode key_code) {
-  return key_code == ui::VKEY_SHIFT || key_code == ui::VKEY_LSHIFT ||
-         key_code == ui::VKEY_CONTROL || key_code == ui::VKEY_LCONTROL ||
-         key_code == ui::VKEY_RCONTROL || key_code == ui::VKEY_MENU ||
-         key_code == ui::VKEY_LMENU || key_code == ui::VKEY_RMENU;
-}
-
-}  // namespace
-
-AutoclickControllerCommon::AutoclickControllerCommon(
-    base::TimeDelta delay,
-    AutoclickControllerCommonDelegate* delegate)
-    : delay_(delay),
-      mouse_event_flags_(ui::EF_NONE),
-      delegate_(delegate),
-      widget_(nullptr),
-      anchor_location_(-kMovementThreshold, -kMovementThreshold),
-      autoclick_ring_handler_(new AutoclickRingHandler()) {
-  InitClickTimer();
-}
-
-AutoclickControllerCommon::~AutoclickControllerCommon() = default;
-
-void AutoclickControllerCommon::HandleMouseEvent(const ui::MouseEvent& event) {
-  gfx::Point mouse_location = event.location();
-  if (event.type() == ui::ET_MOUSE_MOVED &&
-      !(event.flags() & ui::EF_IS_SYNTHESIZED)) {
-    mouse_event_flags_ = event.flags();
-
-    // TODO(riajiang): Make getting screen location work for mus as well.
-    // Also switch to take in a PointerEvent instead of a MouseEvent after
-    // this is done. (crbug.com/608547)
-    if (event.target() != nullptr) {
-      ::wm::ConvertPointToScreen(static_cast<aura::Window*>(event.target()),
-                                 &mouse_location);
-    }
-    UpdateRingWidget(mouse_location);
-
-    // The distance between the mouse location and the anchor location
-    // must exceed a certain threshold to initiate a new autoclick countdown.
-    // This ensures that mouse jitter caused by poor motor control does not
-    // 1. initiate an unwanted autoclick from rest
-    // 2. prevent the autoclick from ever occurring when the mouse
-    //    arrives at the target.
-    gfx::Vector2d delta = mouse_location - anchor_location_;
-    if (delta.LengthSquared() >= kMovementThreshold * kMovementThreshold) {
-      anchor_location_ = mouse_location;
-      autoclick_timer_->Reset();
-      autoclick_ring_handler_->StartGesture(delay_, anchor_location_, widget_);
-    } else if (autoclick_timer_->IsRunning()) {
-      autoclick_ring_handler_->SetGestureCenter(mouse_location, widget_);
-    }
-  } else if (event.type() == ui::ET_MOUSE_PRESSED) {
-    CancelAutoclick();
-  } else if (event.type() == ui::ET_MOUSEWHEEL &&
-             autoclick_timer_->IsRunning()) {
-    autoclick_timer_->Reset();
-    UpdateRingWidget(mouse_location);
-    autoclick_ring_handler_->StartGesture(delay_, anchor_location_, widget_);
-  }
-}
-
-void AutoclickControllerCommon::HandleKeyEvent(const ui::KeyEvent& event) {
-  int modifier_mask = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN |
-                      ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN |
-                      ui::EF_IS_EXTENDED_KEY;
-  int new_modifiers = event.flags() & modifier_mask;
-  mouse_event_flags_ = (mouse_event_flags_ & ~modifier_mask) | new_modifiers;
-
-  if (!IsModifierKey(event.key_code()))
-    CancelAutoclick();
-}
-
-void AutoclickControllerCommon::SetAutoclickDelay(const base::TimeDelta delay) {
-  delay_ = delay;
-  InitClickTimer();
-}
-
-void AutoclickControllerCommon::CancelAutoclick() {
-  autoclick_timer_->Stop();
-  autoclick_ring_handler_->StopGesture();
-  delegate_->OnAutoclickCanceled();
-}
-
-void AutoclickControllerCommon::InitClickTimer() {
-  autoclick_timer_.reset(new base::RetainingOneShotTimer(
-      FROM_HERE, delay_,
-      base::Bind(&AutoclickControllerCommon::DoAutoclick,
-                 base::Unretained(this))));
-}
-
-void AutoclickControllerCommon::DoAutoclick() {
-  gfx::Point screen_location =
-      display::Screen::GetScreen()->GetCursorScreenPoint();
-  anchor_location_ = screen_location;
-  delegate_->DoAutoclick(screen_location, mouse_event_flags_);
-}
-
-void AutoclickControllerCommon::UpdateRingWidget(
-    const gfx::Point& mouse_location) {
-  if (!widget_) {
-    widget_ = delegate_->CreateAutoclickRingWidget(mouse_location);
-  } else {
-    delegate_->UpdateAutoclickRingWidget(widget_, mouse_location);
-  }
-}
-
-}  // namespace ash
diff --git a/ash/autoclick/common/autoclick_controller_common.h b/ash/autoclick/common/autoclick_controller_common.h
deleted file mode 100644
index e8dfe42..0000000
--- a/ash/autoclick/common/autoclick_controller_common.h
+++ /dev/null
@@ -1,65 +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 ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_H
-#define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_H
-
-#include "ash/autoclick/common/autoclick_ring_handler.h"
-#include "base/macros.h"
-#include "base/timer/timer.h"
-#include "ui/gfx/geometry/point.h"
-
-namespace views {
-class Widget;
-}
-
-namespace ui {
-class MouseEvent;
-class KeyEvent;
-}
-
-namespace ash {
-class AutoclickControllerCommonDelegate;
-
-// Autoclick is one of the accessibility features. If enabled, two circles will
-// animate at the mouse event location and an automatic click event will happen
-// after a certain amout of time at that location.
-// AutoclickControllerCommon is the common code for both ash and mus to handle
-// events and to manage autoclick time delay and timer.
-// TODO(jamescook): Collapse with AutoclickController. https://crbug.com/876115
-class AutoclickControllerCommon {
- public:
-  AutoclickControllerCommon(base::TimeDelta delay,
-                            AutoclickControllerCommonDelegate* delegate);
-  ~AutoclickControllerCommon();
-
-  void HandleMouseEvent(const ui::MouseEvent& event);
-  void HandleKeyEvent(const ui::KeyEvent& event);
-
-  void SetAutoclickDelay(const base::TimeDelta delay);
-  void CancelAutoclick();
-
- private:
-  void InitClickTimer();
-
-  void DoAutoclick();
-
-  void UpdateRingWidget(const gfx::Point& mouse_location);
-
-  base::TimeDelta delay_;
-  int mouse_event_flags_;
-  std::unique_ptr<base::RetainingOneShotTimer> autoclick_timer_;
-  AutoclickControllerCommonDelegate* delegate_;
-  views::Widget* widget_;
-  // The position in screen coordinates used to determine
-  // the distance the mouse has moved.
-  gfx::Point anchor_location_;
-  std::unique_ptr<AutoclickRingHandler> autoclick_ring_handler_;
-
-  DISALLOW_COPY_AND_ASSIGN(AutoclickControllerCommon);
-};
-
-}  // namespace ash
-
-#endif  // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_H
diff --git a/ash/autoclick/common/autoclick_controller_common_delegate.h b/ash/autoclick/common/autoclick_controller_common_delegate.h
deleted file mode 100644
index f23a889..0000000
--- a/ash/autoclick/common/autoclick_controller_common_delegate.h
+++ /dev/null
@@ -1,44 +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 ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
-#define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
-
-namespace views {
-class Widget;
-}
-
-namespace gfx {
-class Point;
-}
-
-namespace ash {
-
-class AutoclickControllerCommonDelegate {
- public:
-  // Creates a ring widget at |point_in_screen|.
-  // AutoclickControllerCommonDelegate still has ownership of the widget they
-  // created.
-  virtual views::Widget* CreateAutoclickRingWidget(
-      const gfx::Point& point_in_screen) = 0;
-
-  // Moves |widget| to |point_in_screen|. The point may be on a different
-  // display.
-  virtual void UpdateAutoclickRingWidget(views::Widget* widget,
-                                         const gfx::Point& point_in_screen) = 0;
-
-  // Generates a click at |point_in_screen|. |mouse_event_flags| may contain key
-  // modifiers (e.g. shift, control) for the click.
-  virtual void DoAutoclick(const gfx::Point& point_in_screen,
-                           const int mouse_event_flags) = 0;
-
-  virtual void OnAutoclickCanceled() = 0;
-
- protected:
-  virtual ~AutoclickControllerCommonDelegate() {}
-};
-
-}  // namespace ash
-
-#endif  // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
diff --git a/ash/components/tap_visualizer/tap_renderer.cc b/ash/components/tap_visualizer/tap_renderer.cc
index 2937ba6e..218fccc 100644
--- a/ash/components/tap_visualizer/tap_renderer.cc
+++ b/ash/components/tap_visualizer/tap_renderer.cc
@@ -51,16 +51,17 @@
     gradient_pos_[1] = SkFloatToScalar(1.0f);
   }
 
-  void UpdateTouch(const ui::PointerEvent& touch) {
-    if (touch.type() == ui::ET_POINTER_UP ||
-        touch.type() == ui::ET_POINTER_CANCELLED) {
+  void UpdateTouch(const ui::TouchEvent& touch) {
+    if (touch.type() == ui::ET_TOUCH_RELEASED ||
+        touch.type() == ui::ET_TOUCH_CANCELLED) {
       fadeout_.reset(
           new gfx::LinearAnimation(kFadeoutDuration, kFadeoutFrameRate, this));
       fadeout_->Start();
     } else {
-      SetX(parent()->GetMirroredXInView(touch.root_location().x()) -
-           kPointRadius - 1);
-      SetY(touch.root_location().y() - kPointRadius - 1);
+      gfx::Point location = touch.root_location();
+      ConvertPointFromScreen(parent(), &location);
+      SetX(parent()->GetMirroredXInView(location.x()) - kPointRadius - 1);
+      SetY(location.y() - kPointRadius - 1);
     }
   }
 
@@ -122,10 +123,9 @@
 
 TapRenderer::~TapRenderer() = default;
 
-void TapRenderer::HandleTouchEvent(const ui::PointerEvent& event) {
-  DCHECK(event.IsTouchPointerEvent());
+void TapRenderer::HandleTouchEvent(const ui::TouchEvent& event) {
   const int id = event.pointer_details().id;
-  if (event.type() == ui::ET_POINTER_DOWN) {
+  if (event.type() == ui::ET_TOUCH_PRESSED) {
     TouchPointView* point = new TouchPointView();
     widget_->GetContentsView()->AddChildView(point);
     point->UpdateTouch(event);
@@ -141,8 +141,8 @@
     std::map<int, TouchPointView*>::iterator iter = points_.find(id);
     if (iter != points_.end()) {
       iter->second->UpdateTouch(event);
-      if (event.type() == ui::ET_POINTER_UP ||
-          event.type() == ui::ET_POINTER_CANCELLED) {
+      if (event.type() == ui::ET_TOUCH_RELEASED ||
+          event.type() == ui::ET_TOUCH_CANCELLED) {
         points_.erase(iter);
         // View will fade out then delete itself.
       }
diff --git a/ash/components/tap_visualizer/tap_renderer.h b/ash/components/tap_visualizer/tap_renderer.h
index 0a77e4a..7b11ba1 100644
--- a/ash/components/tap_visualizer/tap_renderer.h
+++ b/ash/components/tap_visualizer/tap_renderer.h
@@ -11,7 +11,7 @@
 #include "base/macros.h"
 
 namespace ui {
-class PointerEvent;
+class TouchEvent;
 }
 
 namespace views {
@@ -28,7 +28,7 @@
   ~TapRenderer();
 
   // Receives a touch event and draws its touch point.
-  void HandleTouchEvent(const ui::PointerEvent& event);
+  void HandleTouchEvent(const ui::TouchEvent& event);
 
  private:
   friend class TapVisualizerAppTestApi;
diff --git a/ash/components/tap_visualizer/tap_visualizer_app.cc b/ash/components/tap_visualizer/tap_visualizer_app.cc
index a60dc86..c214aed 100644
--- a/ash/components/tap_visualizer/tap_visualizer_app.cc
+++ b/ash/components/tap_visualizer/tap_visualizer_app.cc
@@ -19,8 +19,6 @@
 #include "ui/display/screen.h"
 #include "ui/views/mus/aura_init.h"
 #include "ui/views/mus/mus_client.h"
-#include "ui/views/mus/pointer_watcher_event_router.h"
-#include "ui/views/pointer_watcher.h"
 #include "ui/views/widget/widget.h"
 #include "ui/views/widget/widget_delegate.h"
 
@@ -30,14 +28,15 @@
 
 TapVisualizerApp::~TapVisualizerApp() {
   display::Screen::GetScreen()->RemoveObserver(this);
-  views::MusClient::Get()->pointer_watcher_event_router()->RemovePointerWatcher(
-      this);
+  aura::Env::GetInstance()->RemoveEventObserver(this);
 }
 
 void TapVisualizerApp::Start() {
   // Watches moves so the user can drag around a touch point.
-  views::MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher(
-      this, true /* want_moves */);
+  aura::Env* env = aura::Env::GetInstance();
+  std::set<ui::EventType> types = {ui::ET_TOUCH_PRESSED, ui::ET_TOUCH_RELEASED,
+                                   ui::ET_TOUCH_MOVED, ui::ET_TOUCH_CANCELLED};
+  env->AddEventObserver(this, env, types);
   display::Screen::GetScreen()->AddObserver(this);
   for (const display::Display& display :
        display::Screen::GetScreen()->GetAllDisplays()) {
@@ -58,20 +57,19 @@
   Start();
 }
 
-void TapVisualizerApp::OnPointerEventObserved(
-    const ui::PointerEvent& event,
-    const gfx::Point& location_in_screen,
-    gfx::NativeView target) {
-  if (!event.IsTouchPointerEvent())
+void TapVisualizerApp::OnEvent(const ui::Event& event) {
+  if (!event.IsTouchEvent())
     return;
 
+  // The event never targets this app, so the location is in screen coordinates.
+  const gfx::Point screen_location = event.AsTouchEvent()->root_location();
   int64_t display_id = display::Screen::GetScreen()
-                           ->GetDisplayNearestPoint(location_in_screen)
+                           ->GetDisplayNearestPoint(screen_location)
                            .id();
   auto it = display_id_to_renderer_.find(display_id);
   if (it != display_id_to_renderer_.end()) {
     TapRenderer* renderer = it->second.get();
-    renderer->HandleTouchEvent(event);
+    renderer->HandleTouchEvent(*event.AsTouchEvent());
   }
 }
 
diff --git a/ash/components/tap_visualizer/tap_visualizer_app.h b/ash/components/tap_visualizer/tap_visualizer_app.h
index de3fe20..edba6fe9 100644
--- a/ash/components/tap_visualizer/tap_visualizer_app.h
+++ b/ash/components/tap_visualizer/tap_visualizer_app.h
@@ -13,7 +13,7 @@
 #include "base/macros.h"
 #include "services/service_manager/public/cpp/service.h"
 #include "ui/display/display_observer.h"
-#include "ui/views/pointer_watcher.h"
+#include "ui/events/event_observer.h"
 
 namespace views {
 class AuraInit;
@@ -26,7 +26,7 @@
 // Application that paints touch tap points as circles. Creates a fullscreen
 // transparent widget on each display to draw the taps.
 class TapVisualizerApp : public service_manager::Service,
-                         public views::PointerWatcher,
+                         public ui::EventObserver,
                          public display::DisplayObserver {
  public:
   TapVisualizerApp();
@@ -41,10 +41,8 @@
   // service_manager::Service:
   void OnStart() override;
 
-  // views::PointerWatcher:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              gfx::NativeView target) override;
+  // ui::EventObserver:
+  void OnEvent(const ui::Event& event) override;
 
   // display::DisplayObserver:
   void OnDisplayAdded(const display::Display& new_display) override;
diff --git a/ash/components/tap_visualizer/tap_visualizer_app_unittest.cc b/ash/components/tap_visualizer/tap_visualizer_app_unittest.cc
index 2854cb4e9..9de9eff 100644
--- a/ash/components/tap_visualizer/tap_visualizer_app_unittest.cc
+++ b/ash/components/tap_visualizer/tap_visualizer_app_unittest.cc
@@ -7,11 +7,11 @@
 #include "ash/components/tap_visualizer/tap_renderer.h"
 #include "base/stl_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "ui/aura/env.h"
 #include "ui/aura/test/aura_test_base.h"
 #include "ui/display/display.h"
 #include "ui/display/screen_base.h"
 #include "ui/views/mus/mus_client.h"
-#include "ui/views/mus/pointer_watcher_event_router.h"
 #include "ui/views/test/test_views_delegate.h"
 #include "ui/views/view.h"
 
@@ -96,12 +96,10 @@
   EXPECT_EQ(0, contents->child_count());
 
   // Simulate a touch tap.
-  ui::PointerEvent tap(
-      ui::ET_POINTER_DOWN, gfx::Point(1, 1), gfx::Point(1, 1), 0, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH),
-      base::TimeTicks());
-  mus_client_->pointer_watcher_event_router()->OnPointerEventObserved(
-      tap, gfx::Point(1, 1), nullptr);
+  ui::TouchEvent tap(
+      ui::ET_TOUCH_PRESSED, gfx::Point(1, 1), base::TimeTicks(),
+      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH));
+  widget->GetNativeWindow()->env()->NotifyEventObservers(tap);
 
   // A touch point view was created.
   EXPECT_EQ(1, contents->child_count());
@@ -123,16 +121,16 @@
   EXPECT_TRUE(test_api.HasRendererForDisplay(kSecondDisplayId));
 
   // Simulate a touch tap on the second display.
-  ui::PointerEvent tap(
-      ui::ET_POINTER_DOWN, gfx::Point(1, 1), gfx::Point(1, 1), 0, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH),
-      base::TimeTicks());
-  mus_client_->pointer_watcher_event_router()->OnPointerEventObserved(
-      tap, gfx::Point(802, 1), nullptr);
-
-  // A touch point view was created on the second display.
+  ui::TouchEvent tap(
+      ui::ET_TOUCH_PRESSED, gfx::Point(802, 1), base::TimeTicks(),
+      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH));
   views::Widget* widget1 = test_api.GetWidgetForDisplay(kFirstDisplayId);
   views::Widget* widget2 = test_api.GetWidgetForDisplay(kSecondDisplayId);
+  EXPECT_EQ(widget1->GetNativeWindow()->env(),
+            widget2->GetNativeWindow()->env());
+  widget1->GetNativeWindow()->env()->NotifyEventObservers(tap);
+
+  // A touch point view was created on the second display.
   EXPECT_EQ(0, widget1->GetContentsView()->child_count());
   EXPECT_EQ(1, widget2->GetContentsView()->child_count());
 
diff --git a/ash/login/ui/login_auth_user_view.cc b/ash/login/ui/login_auth_user_view.cc
index c9c68d4..2ed146d 100644
--- a/ash/login/ui/login_auth_user_view.cc
+++ b/ash/login/ui/login_auth_user_view.cc
@@ -777,6 +777,7 @@
     OnOnlineSignInMessageTap();
   } else if (sender == external_binary_auth_button_) {
     password_view_->SetReadOnly(true);
+    external_binary_auth_button_->SetEnabled(false);
     Shell::Get()->login_screen_controller()->AuthenticateUserWithExternalBinary(
         current_user()->basic_user_info->account_id,
         base::BindOnce(&LoginAuthUserView::OnAuthComplete,
@@ -812,6 +813,7 @@
   if (!auth_success.value()) {
     password_view_->Clear();
     password_view_->SetReadOnly(false);
+    external_binary_auth_button_->SetEnabled(true);
   }
 
   on_auth_.Run(auth_success.value());
diff --git a/ash/magnifier/docked_magnifier_controller.cc b/ash/magnifier/docked_magnifier_controller.cc
index 79158e30..5bfe355 100644
--- a/ash/magnifier/docked_magnifier_controller.cc
+++ b/ash/magnifier/docked_magnifier_controller.cc
@@ -16,6 +16,8 @@
 #include "ash/shelf/shelf.h"
 #include "ash/shelf/shelf_layout_manager.h"
 #include "ash/shell.h"
+#include "ash/wm/overview/window_selector_controller.h"
+#include "ash/wm/splitview/split_view_controller.h"
 #include "base/numerics/ranges.h"
 #include "components/prefs/pref_change_registrar.h"
 #include "components/prefs/pref_registry_simple.h"
@@ -84,7 +86,7 @@
 
   auto root_bounds = root->GetBoundsInRootWindow();
   root_bounds.set_height(root_bounds.height() /
-                         DockedMagnifierController::kScreenHeightDevisor);
+                         DockedMagnifierController::kScreenHeightDivisor);
   return root_bounds;
 }
 
@@ -330,7 +332,15 @@
 
 void DockedMagnifierController::OnCaretBoundsChanged(
     const ui::TextInputClient* client) {
-  DCHECK(GetEnabled());
+  if (!GetEnabled()) {
+    // There is a small window between the time the "enabled" pref is updated to
+    // false, and the time we're notified with this change, upon which we remove
+    // the magnifier's viewport widget and stop observing the input method.
+    // During this short interval, if focus is in an editable element, the input
+    // method can notify us here. In this case, we should just return.
+    return;
+  }
+
   aura::client::DragDropClient* drag_drop_client =
       aura::client::GetDragDropClient(current_source_root_window_);
   if (drag_drop_client && drag_drop_client->IsDragDropInProgress()) {
@@ -517,18 +527,39 @@
 }
 
 void DockedMagnifierController::OnEnabledPrefChanged() {
-  Shell* shell = Shell::Get();
   // When switching from the signin screen to a newly created profile while the
-  // Docked Magnifier is enabled, the prefs will copied from the signin profile
-  // to the user profile, and the Docked Magnifier will remain enabled. We don't
-  // want to redo the below operations if the status doesn't change, for example
-  // readding the same observer to the WindowTreeHostManager will cause a crash
-  // on DCHECK on debug builds.
+  // Docked Magnifier is enabled, the prefs will be copied from the signin
+  // profile to the user profile, and the Docked Magnifier will remain enabled.
+  // We don't want to redo the below operations if the status doesn't change,
+  // for example readding the same observer to the WindowTreeHostManager will
+  // cause a crash on DCHECK on debug builds.
   const bool current_enabled = !!current_source_root_window_;
   const bool new_enabled = GetEnabled();
   if (current_enabled == new_enabled)
     return;
 
+  // Toggling the status of the docked magnifier, changes the display's work
+  // area. However, display's work area changes are not allowed while overview
+  // mode is active (See https://crbug.com/834400). For this reason, we exit
+  // overview mode, before we actually update the state of docked magnifier
+  // below. https://crbug.com/894256.
+  Shell* shell = Shell::Get();
+  auto* window_selector_controller = shell->window_selector_controller();
+  if (window_selector_controller->IsSelecting()) {
+    auto* split_view_controller = shell->split_view_controller();
+    if (split_view_controller->IsSplitViewModeActive()) {
+      // In this case, we're in a single-split-view mode, i.e. a window is
+      // snapped to one side of the split view, while the other side has the
+      // window selector active.
+      // We need to exit split view as well as exiting overview mode, otherwise
+      // we'll be in an invalid state.
+      split_view_controller->EndSplitView(
+          SplitViewController::EndReason::kNormal);
+    }
+
+    window_selector_controller->ToggleOverview();
+  }
+
   if (new_enabled) {
     // Enabling the Docked Magnifier disables the Fullscreen Magnifier.
     SetFullscreenMagnifierEnabled(false);
diff --git a/ash/magnifier/docked_magnifier_controller.h b/ash/magnifier/docked_magnifier_controller.h
index d783599..da60b7349 100644
--- a/ash/magnifier/docked_magnifier_controller.h
+++ b/ash/magnifier/docked_magnifier_controller.h
@@ -57,9 +57,9 @@
   // the rest of the screen.
   static constexpr int kSeparatorHeight = 10;
 
-  // The value by which the screen height is devided to calculate the height of
+  // The value by which the screen height is divided to calculate the height of
   // the magnifier viewport.
-  static constexpr int kScreenHeightDevisor = 3;
+  static constexpr int kScreenHeightDivisor = 3;
 
   static void RegisterProfilePrefs(PrefRegistrySimple* registry, bool for_test);
 
diff --git a/ash/magnifier/docked_magnifier_controller_unittest.cc b/ash/magnifier/docked_magnifier_controller_unittest.cc
index 602ef3e1..56c5198 100644
--- a/ash/magnifier/docked_magnifier_controller_unittest.cc
+++ b/ash/magnifier/docked_magnifier_controller_unittest.cc
@@ -22,6 +22,10 @@
 #include "ash/shell.h"
 #include "ash/test/ash_test_base.h"
 #include "ash/test/ash_test_helper.h"
+#include "ash/wm/overview/window_selector_controller.h"
+#include "ash/wm/splitview/split_view_controller.h"
+#include "ash/wm/tablet_mode/tablet_mode_controller.h"
+#include "ash/wm/window_state.h"
 #include "base/command_line.h"
 #include "base/test/scoped_feature_list.h"
 #include "components/prefs/pref_service.h"
@@ -41,6 +45,12 @@
 constexpr char kUser1Email[] = "user1@dockedmagnifier";
 constexpr char kUser2Email[] = "user2@dockedmagnifier";
 
+// Returns the magnifier area height given the display height.
+int GetMagnifierHeight(int display_height) {
+  return (display_height / DockedMagnifierController::kScreenHeightDivisor) +
+         DockedMagnifierController::kSeparatorHeight;
+}
+
 class DockedMagnifierTest : public NoSessionAshTestBase {
  public:
   DockedMagnifierTest() = default;
@@ -250,9 +260,7 @@
   // the separator layer.
   gfx::Rect disp_1_workspace_with_magnifier = disp_1_workarea_no_magnifier;
   const int disp_1_magnifier_height =
-      (disp_1_bounds.height() /
-       DockedMagnifierController::kScreenHeightDevisor) +
-      DockedMagnifierController::kSeparatorHeight;
+      GetMagnifierHeight(disp_1_bounds.height());
   disp_1_workspace_with_magnifier.Inset(0, disp_1_magnifier_height, 0, 0);
   EXPECT_EQ(disp_1_bounds, display_1.bounds());
   EXPECT_EQ(disp_1_workspace_with_magnifier, display_1.work_area());
@@ -287,9 +295,7 @@
   EXPECT_EQ(disp_2_bounds, display_2.bounds());
   gfx::Rect disp_2_workspace_with_magnifier = disp_2_workarea_no_magnifier;
   const int disp_2_magnifier_height =
-      (disp_2_bounds.height() /
-       DockedMagnifierController::kScreenHeightDevisor) +
-      DockedMagnifierController::kSeparatorHeight;
+      GetMagnifierHeight(disp_2_bounds.height());
   disp_2_workspace_with_magnifier.Inset(0, disp_2_magnifier_height, 0, 0);
   EXPECT_EQ(disp_2_workspace_with_magnifier, display_2.work_area());
   // Display 2's mouse is confined outside the viewport.
@@ -313,6 +319,120 @@
             gfx::Rect(gfx::Point(0, 0), disp_2_bounds.size()));
 }
 
+// Test that we exit overview mode when enabling the docked magnifier.
+TEST_F(DockedMagnifierTest, DisplaysWorkAreasOverviewMode) {
+  std::unique_ptr<aura::Window> window(
+      CreateTestWindowInShell(SK_ColorWHITE, 100, gfx::Rect(0, 0, 200, 200)));
+  wm::GetWindowState(window.get())->Maximize();
+
+  // Enable overview mode followed by the magnifier.
+  auto* window_selector_controller = Shell::Get()->window_selector_controller();
+  window_selector_controller->ToggleOverview();
+  EXPECT_TRUE(window_selector_controller->IsSelecting());
+  controller()->SetEnabled(true);
+  EXPECT_TRUE(controller()->GetEnabled());
+
+  // Expect that overview mode is exited, the display's work area is updated,
+  // and the window's bounds are updated to be equal to the new display's work
+  // area bounds.
+  EXPECT_FALSE(window_selector_controller->IsSelecting());
+  const display::Display& display = display_manager()->GetDisplayAt(0);
+  gfx::Rect workarea = display.bounds();
+  const int magnifier_height = GetMagnifierHeight(display.bounds().height());
+  workarea.Inset(0, magnifier_height, 0, ShelfConstants::shelf_size());
+  EXPECT_EQ(workarea, display.work_area());
+  EXPECT_EQ(workarea, window->bounds());
+  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
+}
+
+// Test that we exist split view and over view modes when a single window is
+// snapped and the other snap region is hosting overview mode.
+TEST_F(DockedMagnifierTest, DisplaysWorkAreasSingleSplitView) {
+  // Verify that we're in tablet mode.
+  Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
+  EXPECT_TRUE(Shell::Get()
+                  ->tablet_mode_controller()
+                  ->IsTabletModeWindowManagerEnabled());
+
+  std::unique_ptr<aura::Window> window(
+      CreateTestWindowInShell(SK_ColorWHITE, 100, gfx::Rect(0, 0, 200, 200)));
+  wm::GetWindowState(window.get())->Maximize();
+
+  auto* split_view_controller = Shell::Get()->split_view_controller();
+  EXPECT_EQ(split_view_controller->state(), SplitViewController::NO_SNAP);
+  EXPECT_EQ(split_view_controller->IsSplitViewModeActive(), false);
+
+  // Simulate going into split view, by enabling overview mode, and snapping
+  // a window to the left.
+  auto* window_selector_controller = Shell::Get()->window_selector_controller();
+  window_selector_controller->ToggleOverview();
+  EXPECT_TRUE(window_selector_controller->IsSelecting());
+  split_view_controller->SnapWindow(window.get(), SplitViewController::LEFT);
+  EXPECT_EQ(split_view_controller->state(), SplitViewController::LEFT_SNAPPED);
+  EXPECT_EQ(split_view_controller->left_window(), window.get());
+  EXPECT_TRUE(window_selector_controller->IsSelecting());
+
+  // Enable the docked magnifier and expect that both overview and split view
+  // modes are exited, and the window remains maximized, and its bounds are
+  // updated to match the new display's work area.
+  controller()->SetEnabled(true);
+  EXPECT_TRUE(controller()->GetEnabled());
+  EXPECT_FALSE(window_selector_controller->IsSelecting());
+  EXPECT_EQ(split_view_controller->state(), SplitViewController::NO_SNAP);
+  EXPECT_EQ(split_view_controller->IsSplitViewModeActive(), false);
+  const display::Display& display = display_manager()->GetDisplayAt(0);
+  const int magnifier_height = GetMagnifierHeight(display.bounds().height());
+  gfx::Rect work_area = display.bounds();
+  work_area.Inset(0, magnifier_height, 0, ShelfConstants::shelf_size());
+  EXPECT_EQ(work_area, display.work_area());
+  EXPECT_EQ(work_area, window->bounds());
+  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
+}
+
+// Test that we don't exit split view with two windows snapped on both sides
+// when we enable the docked magnifier, but rather their bounds are updated.
+TEST_F(DockedMagnifierTest, DisplaysWorkAreasDoubleSplitView) {
+  // Verify that we're in tablet mode.
+  Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
+  EXPECT_TRUE(Shell::Get()
+                  ->tablet_mode_controller()
+                  ->IsTabletModeWindowManagerEnabled());
+
+  std::unique_ptr<aura::Window> window1(
+      CreateTestWindowInShell(SK_ColorWHITE, 100, gfx::Rect(0, 0, 200, 200)));
+  std::unique_ptr<aura::Window> window2(
+      CreateTestWindowInShell(SK_ColorWHITE, 200, gfx::Rect(0, 0, 200, 200)));
+
+  auto* window_selector_controller = Shell::Get()->window_selector_controller();
+  window_selector_controller->ToggleOverview();
+  EXPECT_TRUE(window_selector_controller->IsSelecting());
+
+  auto* split_view_controller = Shell::Get()->split_view_controller();
+  EXPECT_EQ(split_view_controller->IsSplitViewModeActive(), false);
+  split_view_controller->SnapWindow(window1.get(), SplitViewController::LEFT);
+  split_view_controller->SnapWindow(window2.get(), SplitViewController::RIGHT);
+  EXPECT_EQ(split_view_controller->IsSplitViewModeActive(), true);
+  EXPECT_EQ(split_view_controller->state(), SplitViewController::BOTH_SNAPPED);
+
+  // Snapping both windows should exit overview mode.
+  EXPECT_FALSE(window_selector_controller->IsSelecting());
+
+  // Enable the docked magnifier, and expect that split view does not exit, and
+  // the two windows heights are updated to be equal to the height of the
+  // updated display's work area.
+  controller()->SetEnabled(true);
+  EXPECT_TRUE(controller()->GetEnabled());
+  EXPECT_EQ(split_view_controller->IsSplitViewModeActive(), true);
+  EXPECT_EQ(split_view_controller->state(), SplitViewController::BOTH_SNAPPED);
+  const display::Display& display = display_manager()->GetDisplayAt(0);
+  const int magnifier_height = GetMagnifierHeight(display.bounds().height());
+  gfx::Rect work_area = display.bounds();
+  work_area.Inset(0, magnifier_height, 0, ShelfConstants::shelf_size());
+  EXPECT_EQ(work_area, display.work_area());
+  EXPECT_EQ(work_area.height(), window1->bounds().height());
+  EXPECT_EQ(work_area.height(), window2->bounds().height());
+}
+
 // Tests that the Docked Magnifier follows touch events.
 TEST_F(DockedMagnifierTest, TouchEvents) {
   UpdateDisplay("800x600,800+0-400x300");
@@ -361,7 +481,7 @@
   ASSERT_NE(nullptr, viewport_widget);
   EXPECT_EQ(root_windows[0], viewport_widget->GetNativeView()->GetRootWindow());
   const int viewport_1_height =
-      800 / DockedMagnifierController::kScreenHeightDevisor;
+      800 / DockedMagnifierController::kScreenHeightDivisor;
   EXPECT_EQ(gfx::Rect(0, 0, 600, viewport_1_height),
             viewport_widget->GetWindowBoundsInScreen());
 
@@ -386,7 +506,7 @@
   viewport_widget = controller()->GetViewportWidgetForTesting();
   EXPECT_EQ(root_windows[1], viewport_widget->GetNativeView()->GetRootWindow());
   const int viewport_2_height =
-      600 / DockedMagnifierController::kScreenHeightDevisor;
+      600 / DockedMagnifierController::kScreenHeightDivisor;
   EXPECT_EQ(gfx::Rect(600, 0, 400, viewport_2_height),
             viewport_widget->GetWindowBoundsInScreen());
 
@@ -425,7 +545,7 @@
   ASSERT_NE(nullptr, viewport_widget);
   EXPECT_EQ(root_windows[0], viewport_widget->GetNativeView()->GetRootWindow());
   const int viewport_height =
-      800 / DockedMagnifierController::kScreenHeightDevisor;
+      800 / DockedMagnifierController::kScreenHeightDivisor;
   EXPECT_EQ(gfx::Rect(0, 0, 800, viewport_height),
             viewport_widget->GetWindowBoundsInScreen());
 
diff --git a/ash/metrics/pointer_metrics_recorder_unittest.cc b/ash/metrics/pointer_metrics_recorder_unittest.cc
index 0e8c38c..f479e54 100644
--- a/ash/metrics/pointer_metrics_recorder_unittest.cc
+++ b/ash/metrics/pointer_metrics_recorder_unittest.cc
@@ -15,11 +15,8 @@
 #include "ui/aura/window.h"
 #include "ui/display/test/display_manager_test_api.h"
 #include "ui/events/event.h"
-#include "ui/views/pointer_watcher.h"
 #include "ui/views/widget/widget.h"
 
-using views::PointerWatcher;
-
 namespace ash {
 namespace {
 
diff --git a/ash/pointer_watcher_adapter.cc b/ash/pointer_watcher_adapter.cc
deleted file mode 100644
index 2cdedaef..0000000
--- a/ash/pointer_watcher_adapter.cc
+++ /dev/null
@@ -1,97 +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 "ash/pointer_watcher_adapter.h"
-
-#include "ash/shell.h"
-#include "ui/aura/window.h"
-#include "ui/display/screen.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/gfx/geometry/point.h"
-#include "ui/views/pointer_watcher.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-PointerWatcherAdapter::PointerWatcherAdapter() {
-  Shell::Get()->AddPreTargetHandler(this);
-}
-
-PointerWatcherAdapter::~PointerWatcherAdapter() {
-  Shell::Get()->RemovePreTargetHandler(this);
-}
-
-void PointerWatcherAdapter::AddPointerWatcher(
-    views::PointerWatcher* watcher,
-    views::PointerWatcherEventTypes events) {
-  // We only allow a watcher to be added once. That is, we don't consider
-  // the pair of |watcher| and |events| unique, just |watcher|.
-  DCHECK(!non_move_watchers_.HasObserver(watcher));
-  DCHECK(!move_watchers_.HasObserver(watcher));
-  DCHECK(!drag_watchers_.HasObserver(watcher));
-  if (events == views::PointerWatcherEventTypes::DRAGS)
-    drag_watchers_.AddObserver(watcher);
-  else if (events == views::PointerWatcherEventTypes::MOVES)
-    move_watchers_.AddObserver(watcher);
-  else
-    non_move_watchers_.AddObserver(watcher);
-}
-
-void PointerWatcherAdapter::RemovePointerWatcher(
-    views::PointerWatcher* watcher) {
-  non_move_watchers_.RemoveObserver(watcher);
-  move_watchers_.RemoveObserver(watcher);
-  drag_watchers_.RemoveObserver(watcher);
-}
-
-void PointerWatcherAdapter::OnMouseEvent(ui::MouseEvent* event) {
-  if (event->type() != ui::ET_MOUSE_PRESSED &&
-      event->type() != ui::ET_MOUSE_RELEASED &&
-      event->type() != ui::ET_MOUSE_MOVED &&
-      event->type() != ui::ET_MOUSEWHEEL &&
-      event->type() != ui::ET_MOUSE_CAPTURE_CHANGED &&
-      event->type() != ui::ET_MOUSE_DRAGGED)
-    return;
-
-  DCHECK(ui::PointerEvent::CanConvertFrom(*event));
-  NotifyWatchers(ui::PointerEvent(*event), *event);
-}
-
-void PointerWatcherAdapter::OnTouchEvent(ui::TouchEvent* event) {
-  if (event->type() != ui::ET_TOUCH_PRESSED &&
-      event->type() != ui::ET_TOUCH_RELEASED &&
-      event->type() != ui::ET_TOUCH_MOVED)
-    return;
-
-  DCHECK(ui::PointerEvent::CanConvertFrom(*event));
-  NotifyWatchers(ui::PointerEvent(*event), *event);
-}
-
-gfx::Point PointerWatcherAdapter::GetLocationInScreen(
-    const ui::LocatedEvent& event) const {
-  if (event.type() == ui::ET_MOUSE_CAPTURE_CHANGED)
-    return display::Screen::GetScreen()->GetCursorScreenPoint();
-  return event.target()->GetScreenLocation(event);
-}
-
-void PointerWatcherAdapter::NotifyWatchers(
-    const ui::PointerEvent& event,
-    const ui::LocatedEvent& original_event) {
-  const gfx::Point screen_location(GetLocationInScreen(original_event));
-  aura::Window* target = static_cast<aura::Window*>(original_event.target());
-  for (auto& observer : drag_watchers_)
-    observer.OnPointerEventObserved(event, screen_location, target);
-  if (original_event.type() != ui::ET_TOUCH_MOVED &&
-      original_event.type() != ui::ET_MOUSE_DRAGGED) {
-    for (auto& observer : move_watchers_)
-      observer.OnPointerEventObserved(event, screen_location, target);
-  }
-  if (event.type() != ui::ET_POINTER_MOVED) {
-    for (auto& observer : non_move_watchers_)
-      observer.OnPointerEventObserved(event, screen_location, target);
-  }
-}
-
-}  // namespace ash
diff --git a/ash/pointer_watcher_adapter.h b/ash/pointer_watcher_adapter.h
deleted file mode 100644
index a6c7f85..0000000
--- a/ash/pointer_watcher_adapter.h
+++ /dev/null
@@ -1,70 +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 ASH_POINTER_WATCHER_ADAPTER_H_
-#define ASH_POINTER_WATCHER_ADAPTER_H_
-
-#include "ash/ash_export.h"
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace gfx {
-class Point;
-}
-
-namespace ui {
-class LocatedEvent;
-class PointerEvent;
-}  // namespace ui
-
-namespace views {
-class PointerWatcher;
-enum class PointerWatcherEventTypes;
-}  // namespace views
-
-namespace ash {
-
-// Support for PointerWatchers in ash, implemented with a pre-target
-// EventHandler on the Shell.
-class ASH_EXPORT PointerWatcherAdapter : public ui::EventHandler {
- public:
-  PointerWatcherAdapter();
-  ~PointerWatcherAdapter() override;
-
-  // See Shell::AddPointerWatcher() for details.
-  void AddPointerWatcher(views::PointerWatcher* watcher,
-                         views::PointerWatcherEventTypes events);
-  void RemovePointerWatcher(views::PointerWatcher* watcher);
-
-  // ui::EventHandler:
-  void OnMouseEvent(ui::MouseEvent* event) override;
-  void OnTouchEvent(ui::TouchEvent* event) override;
-
- private:
-  gfx::Point GetLocationInScreen(const ui::LocatedEvent& event) const;
-  gfx::NativeView GetTargetWindow(const ui::LocatedEvent& event) const;
-
-  // Calls OnPointerEventObserved() on the appropriate set of watchers as
-  // determined by the type of event. |original_event| is the original
-  // event supplied to OnMouseEvent()/OnTouchEvent(), |pointer_event| is
-  // |original_event| converted to a PointerEvent.
-  void NotifyWatchers(const ui::PointerEvent& pointer_event,
-                      const ui::LocatedEvent& original_event);
-
-  // The true parameter to ObserverList indicates the list must be empty on
-  // destruction. Two sets of observers are maintained, one for observers not
-  // needing moves |non_move_watchers_| and |move_watchers_| for those
-  // observers wanting moves too.
-  base::ObserverList<views::PointerWatcher, true>::Unchecked non_move_watchers_;
-  base::ObserverList<views::PointerWatcher, true>::Unchecked move_watchers_;
-  base::ObserverList<views::PointerWatcher, true>::Unchecked drag_watchers_;
-
-  DISALLOW_COPY_AND_ASSIGN(PointerWatcherAdapter);
-};
-
-}  // namespace ash
-
-#endif  // ASH_POINTER_WATCHER_ADAPTER_H_
diff --git a/ash/pointer_watcher_adapter_unittest.cc b/ash/pointer_watcher_adapter_unittest.cc
deleted file mode 100644
index e622f2e..0000000
--- a/ash/pointer_watcher_adapter_unittest.cc
+++ /dev/null
@@ -1,212 +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 "ash/shell.h"
-#include "ash/test/ash_test_base.h"
-#include "ui/events/base_event_utils.h"
-#include "ui/events/event.h"
-#include "ui/events/test/event_generator.h"
-#include "ui/views/pointer_watcher.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-using PointerWatcherAdapterTest = AshTestBase;
-
-enum TestPointerCaptureEvents {
-  NONE = 0x01,
-  CAPTURE = 0x02,
-  WHEEL = 0x04,
-  PRESS_OR_RELEASE = 0x08,
-  MOVE = 0x10,
-  DRAG = 0x20
-};
-
-// Records calls to OnPointerEventObserved() in |mouse_wheel_event_count| for a
-// mouse wheel event, in |capture_changed_count_| for a mouse capture change
-// event and in |pointer_event_count_| for all other pointer events.
-class TestPointerWatcher : public views::PointerWatcher {
- public:
-  explicit TestPointerWatcher(views::PointerWatcherEventTypes events) {
-    Shell::Get()->AddPointerWatcher(this, events);
-  }
-  ~TestPointerWatcher() override { Shell::Get()->RemovePointerWatcher(this); }
-
-  void ClearCounts() {
-    pointer_event_count_ = capture_changed_count_ = mouse_wheel_event_count_ =
-        move_changed_count_ = drag_changed_count_ = 0;
-  }
-
-  int pointer_event_count() const { return pointer_event_count_; }
-  int capture_changed_count() const { return capture_changed_count_; }
-  int mouse_wheel_event_count() const { return mouse_wheel_event_count_; }
-  int move_changed_count() const { return move_changed_count_; }
-  int drag_changed_count() const { return drag_changed_count_; }
-
-  // views::PointerWatcher:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              gfx::NativeView target) override {
-    if (event.type() == ui::ET_POINTER_WHEEL_CHANGED) {
-      mouse_wheel_event_count_++;
-    } else if (event.type() == ui::ET_POINTER_CAPTURE_CHANGED) {
-      capture_changed_count_++;
-    } else if (event.type() == ui::ET_POINTER_MOVED) {
-      // Pointer moved events are drags if they are a touch event.
-      if (event.IsTouchPointerEvent()) {
-        drag_changed_count_++;
-      } else if (event.IsMousePointerEvent()) {
-        // Differentiate between a drag and move event.
-        if (event.flags() &
-            (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON |
-             ui::EF_RIGHT_MOUSE_BUTTON)) {
-          drag_changed_count_++;
-        } else {
-          move_changed_count_++;
-        }
-      } else {
-        move_changed_count_++;
-      }
-    } else {
-      pointer_event_count_++;
-    }
-  }
-
- private:
-  int pointer_event_count_ = 0;
-  int capture_changed_count_ = 0;
-  int mouse_wheel_event_count_ = 0;
-  int move_changed_count_ = 0;
-  int drag_changed_count_ = 0;
-
-  DISALLOW_COPY_AND_ASSIGN(TestPointerWatcher);
-};
-
-// Creates three TestPointerWatchers, one that wants moves and one that wants
-// drags, and one that does not want either.
-class TestHelper {
- public:
-  TestHelper()
-      : basic_watcher_(views::PointerWatcherEventTypes::BASIC),
-        move_watcher_(views::PointerWatcherEventTypes::MOVES),
-        drag_watcher_(views::PointerWatcherEventTypes::DRAGS) {}
-  ~TestHelper() = default;
-
-  // Used to verify call counts. One ExpectCallCount call should be made after
-  // each generated mouse events. |basic_events_bitmask| defines which events
-  // the test basic watcher should receive and |move_events_bitamsk| defines
-  // which events the test move watcher should receive and |drag_events_bitmask|
-  // defines which events the test drag watcher should receive.
-  void ExpectCallCount(int basic_events_bitmask,
-                       int move_events_bitmask,
-                       int drag_events_bitmask) {
-    // Compare the expected events in the |basic_events_bitmask| with the actual
-    // counts. Basic watcher should never have any move or drag counts.
-    EXPECT_EQ(0, basic_watcher_.move_changed_count());
-    EXPECT_EQ(0, basic_watcher_.drag_changed_count());
-    EXPECT_EQ(basic_events_bitmask & PRESS_OR_RELEASE ? 1 : 0,
-              basic_watcher_.pointer_event_count());
-    EXPECT_EQ(basic_events_bitmask & CAPTURE ? 1 : 0,
-              basic_watcher_.capture_changed_count());
-    EXPECT_EQ(basic_events_bitmask & WHEEL ? 1 : 0,
-              basic_watcher_.mouse_wheel_event_count());
-    // Compare the expected events in the |move_events_bitmask| with the actual
-    // counts. Move watcher should never have any drag counts.
-    EXPECT_EQ(0, move_watcher_.drag_changed_count());
-    EXPECT_EQ(move_events_bitmask & MOVE ? 1 : 0,
-              move_watcher_.move_changed_count());
-    EXPECT_EQ(move_events_bitmask & PRESS_OR_RELEASE ? 1 : 0,
-              move_watcher_.pointer_event_count());
-    EXPECT_EQ(move_events_bitmask & CAPTURE ? 1 : 0,
-              move_watcher_.capture_changed_count());
-    EXPECT_EQ(move_events_bitmask & WHEEL ? 1 : 0,
-              move_watcher_.mouse_wheel_event_count());
-    // Compare the expected events in the |drag_events_bitmask| with the actual
-    // counts.
-    EXPECT_EQ(drag_events_bitmask & MOVE ? 1 : 0,
-              drag_watcher_.move_changed_count());
-    EXPECT_EQ(drag_events_bitmask & DRAG ? 1 : 0,
-              drag_watcher_.drag_changed_count());
-    EXPECT_EQ(drag_events_bitmask & PRESS_OR_RELEASE ? 1 : 0,
-              drag_watcher_.pointer_event_count());
-    EXPECT_EQ(drag_events_bitmask & CAPTURE ? 1 : 0,
-              drag_watcher_.capture_changed_count());
-    EXPECT_EQ(drag_events_bitmask & WHEEL ? 1 : 0,
-              drag_watcher_.mouse_wheel_event_count());
-
-    basic_watcher_.ClearCounts();
-    move_watcher_.ClearCounts();
-    drag_watcher_.ClearCounts();
-  }
-
- private:
-  TestPointerWatcher basic_watcher_;
-  TestPointerWatcher move_watcher_;
-  TestPointerWatcher drag_watcher_;
-
-  DISALLOW_COPY_AND_ASSIGN(TestHelper);
-};
-
-TEST_F(PointerWatcherAdapterTest, MouseEvents) {
-  TestHelper helper;
-
-  // Move: only the move and drag PointerWatcher should get the event.
-  ui::test::EventGenerator* event_generator = GetEventGenerator();
-  event_generator->MoveMouseTo(gfx::Point(10, 10));
-  helper.ExpectCallCount(NONE, MOVE, MOVE);
-
-  // Press: all.
-  event_generator->PressLeftButton();
-  helper.ExpectCallCount(PRESS_OR_RELEASE, PRESS_OR_RELEASE, PRESS_OR_RELEASE);
-
-  // Drag: only drag PointerWatcher should get the event.
-  event_generator->MoveMouseTo(gfx::Point(20, 30));
-  helper.ExpectCallCount(NONE, NONE, DRAG);
-
-  // Release: all (aura generates a capture event here).
-  event_generator->ReleaseLeftButton();
-  helper.ExpectCallCount(CAPTURE | PRESS_OR_RELEASE, CAPTURE | PRESS_OR_RELEASE,
-                         CAPTURE | PRESS_OR_RELEASE);
-
-  // Exit: none.
-  event_generator->SendMouseExit();
-  helper.ExpectCallCount(NONE, NONE, NONE);
-
-  // Enter: none.
-  ui::MouseEvent enter_event(ui::ET_MOUSE_ENTERED, gfx::Point(), gfx::Point(),
-                             ui::EventTimeForNow(), 0, 0);
-  event_generator->Dispatch(&enter_event);
-  helper.ExpectCallCount(NONE, NONE, NONE);
-
-  // Wheel: all
-  event_generator->MoveMouseWheel(10, 11);
-  helper.ExpectCallCount(WHEEL, WHEEL, WHEEL);
-
-  // Capture: all.
-  ui::MouseEvent capture_event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(),
-                               gfx::Point(), ui::EventTimeForNow(), 0, 0);
-  event_generator->Dispatch(&capture_event);
-  helper.ExpectCallCount(CAPTURE, CAPTURE, CAPTURE);
-}
-
-TEST_F(PointerWatcherAdapterTest, TouchEvents) {
-  TestHelper helper;
-
-  // Press: all.
-  const int touch_id = 11;
-  ui::test::EventGenerator* event_generator = GetEventGenerator();
-  event_generator->PressTouchId(touch_id);
-  helper.ExpectCallCount(PRESS_OR_RELEASE, PRESS_OR_RELEASE, PRESS_OR_RELEASE);
-
-  // Drag: only drag.
-  event_generator->MoveTouchId(gfx::Point(20, 30), touch_id);
-  helper.ExpectCallCount(NONE, NONE, DRAG);
-
-  // Release: both (contrary to mouse above, touch does not implicitly generate
-  // capture).
-  event_generator->ReleaseTouchId(touch_id);
-  helper.ExpectCallCount(PRESS_OR_RELEASE, PRESS_OR_RELEASE, PRESS_OR_RELEASE);
-}
-
-}  // namespace ash
diff --git a/ash/public/cpp/app_list/app_list_config.cc b/ash/public/cpp/app_list/app_list_config.cc
index 5514872..08c0391 100644
--- a/ash/public/cpp/app_list/app_list_config.cc
+++ b/ash/public/cpp/app_list/app_list_config.cc
@@ -6,6 +6,7 @@
 
 #include "ash/public/cpp/app_list/app_list_features.h"
 #include "base/macros.h"
+#include "base/no_destructor.h"
 #include "ui/gfx/color_palette.h"
 
 namespace app_list {
@@ -101,8 +102,8 @@
 
 // static
 const AppListConfig& AppListConfig::instance() {
-  CR_DEFINE_STATIC_LOCAL(AppListConfig, instance, ());
-  return instance;
+  static const base::NoDestructor<AppListConfig> instance;
+  return *instance;
 }
 
 int AppListConfig::GetPreferredIconDimension(
diff --git a/ash/public/cpp/ash_pref_names.cc b/ash/public/cpp/ash_pref_names.cc
index 3b94ee5..11424563 100644
--- a/ash/public/cpp/ash_pref_names.cc
+++ b/ash/public/cpp/ash_pref_names.cc
@@ -214,8 +214,14 @@
 const char kPowerUseAudioActivity[] = "power.use_audio_activity";
 const char kPowerUseVideoActivity[] = "power.use_video_activity";
 
-// Should extensions be able to use the chrome.power API to override
-// screen-related power management (including locking)?
+// Should extensions, ARC apps, and other code within Chrome be able to override
+// system power management (preventing automatic actions like sleeping, locking,
+// or screen dimming)?
+const char kPowerAllowWakeLocks[] = "power.allow_wake_locks";
+
+// Should extensions, ARC apps, and other code within Chrome be able to override
+// display-related power management? (Disallowing wake locks in general takes
+// precedence over this.)
 const char kPowerAllowScreenWakeLocks[] = "power.allow_screen_wake_locks";
 
 // Amount by which the screen-dim delay should be scaled while the system
diff --git a/ash/public/cpp/ash_pref_names.h b/ash/public/cpp/ash_pref_names.h
index c84cf7b8..43976d4 100644
--- a/ash/public/cpp/ash_pref_names.h
+++ b/ash/public/cpp/ash_pref_names.h
@@ -87,6 +87,7 @@
 ASH_PUBLIC_EXPORT extern const char kPowerLidClosedAction[];
 ASH_PUBLIC_EXPORT extern const char kPowerUseAudioActivity[];
 ASH_PUBLIC_EXPORT extern const char kPowerUseVideoActivity[];
+ASH_PUBLIC_EXPORT extern const char kPowerAllowWakeLocks[];
 ASH_PUBLIC_EXPORT extern const char kPowerAllowScreenWakeLocks[];
 ASH_PUBLIC_EXPORT extern const char kPowerPresentationScreenDimDelayFactor[];
 ASH_PUBLIC_EXPORT extern const char kPowerUserActivityScreenDimDelayFactor[];
diff --git a/ash/public/cpp/immersive/immersive_context.h b/ash/public/cpp/immersive/immersive_context.h
index 7bb83b8..eaab141 100644
--- a/ash/public/cpp/immersive/immersive_context.h
+++ b/ash/public/cpp/immersive/immersive_context.h
@@ -10,11 +10,10 @@
 namespace gfx {
 class Rect;
 }
+
 namespace views {
-class PointerWatcher;
-enum class PointerWatcherEventTypes;
 class Widget;
-}  // namespace views
+}
 
 namespace ash {
 
@@ -38,11 +37,6 @@
   // Returns the bounds of the display the widget is on, in screen coordinates.
   virtual gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) = 0;
 
-  // See Shell::AddPointerWatcher for details.
-  virtual void AddPointerWatcher(views::PointerWatcher* watcher,
-                                 views::PointerWatcherEventTypes events) = 0;
-  virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0;
-
   // Returns true if any window has capture.
   virtual bool DoesAnyWindowHaveCapture() = 0;
 
diff --git a/ash/public/cpp/immersive/immersive_fullscreen_controller.cc b/ash/public/cpp/immersive/immersive_fullscreen_controller.cc
index 88a6498..b3783b12 100644
--- a/ash/public/cpp/immersive/immersive_fullscreen_controller.cc
+++ b/ash/public/cpp/immersive/immersive_fullscreen_controller.cc
@@ -13,6 +13,7 @@
 #include "ash/public/cpp/immersive/immersive_handler_factory.h"
 #include "ash/public/cpp/window_properties.h"
 #include "base/metrics/histogram_macros.h"
+#include "ui/aura/env.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_targeter.h"
 #include "ui/display/display.h"
@@ -143,13 +144,11 @@
 
   // Mouse hover can initiate revealing the top-of-window views while |widget_|
   // is inactive.
-
   if (reveal_state_ == SLIDING_OPEN || reveal_state_ == REVEALED) {
     top_edge_hover_timer_.Stop();
     UpdateLocatedEventRevealedLock(&event, location_in_screen);
   } else if (event.type() != ui::ET_MOUSE_CAPTURE_CHANGED) {
-    // Trigger a reveal if the cursor pauses at the top of the screen for a
-    // while.
+    // Trigger reveal if the cursor pauses at the top of the screen for a while.
     UpdateTopEdgeHoverTimer(event, location_in_screen, target);
   }
 }
@@ -203,24 +202,18 @@
   }
 }
 
-void ImmersiveFullscreenController::OnPointerEventObserved(
-    const ui::PointerEvent& event,
-    const gfx::Point& location_in_screen,
-    gfx::NativeView target) {
-  if (event.IsMousePointerEvent()) {
-    if (event.type() == ui::ET_POINTER_WHEEL_CHANGED) {
-      const ui::MouseWheelEvent mouse_wheel_event(event);
-      OnMouseEvent(mouse_wheel_event, location_in_screen,
-                   views::Widget::GetTopLevelWidgetForNativeView(target));
-    } else {
-      const ui::MouseEvent mouse_event(event);
-      OnMouseEvent(mouse_event, location_in_screen,
-                   views::Widget::GetTopLevelWidgetForNativeView(target));
-    }
-  } else {
-    DCHECK(event.IsTouchPointerEvent());
-    const ui::TouchEvent touch_event(event);
-    OnTouchEvent(touch_event, location_in_screen);
+void ImmersiveFullscreenController::OnEvent(const ui::Event& event) {
+  if (!event.IsLocatedEvent())
+    return;
+
+  DCHECK(!event.IsPointerEvent());
+  const ui::LocatedEvent* located_event = event.AsLocatedEvent();
+  aura::Window* target = static_cast<aura::Window*>(event.target());
+  if (event.IsMouseEvent()) {
+    OnMouseEvent(*event.AsMouseEvent(), located_event->root_location(),
+                 views::Widget::GetTopLevelWidgetForNativeView(target));
+  } else if (event.IsTouchEvent()) {
+    OnTouchEvent(*event.AsTouchEvent(), located_event->root_location());
   }
 }
 
@@ -332,15 +325,18 @@
     return;
   event_observers_enabled_ = enable;
 
+  aura::Env* env = widget_->GetNativeWindow()->env();
   if (enable) {
     immersive_focus_watcher_ =
         ImmersiveHandlerFactory::Get()->CreateFocusWatcher(this);
     immersive_gesture_handler_ =
         ImmersiveHandlerFactory::Get()->CreateGestureHandler(this);
-    immersive_context_->AddPointerWatcher(
-        this, views::PointerWatcherEventTypes::MOVES);
+    std::set<ui::EventType> types = {
+        ui::ET_MOUSE_MOVED, ui::ET_MOUSE_PRESSED,         ui::ET_MOUSE_RELEASED,
+        ui::ET_MOUSEWHEEL,  ui::ET_MOUSE_CAPTURE_CHANGED, ui::ET_TOUCH_PRESSED};
+    env->AddEventObserver(this, env, types);
   } else {
-    immersive_context_->RemovePointerWatcher(this);
+    env->RemoveEventObserver(this);
     immersive_gesture_handler_.reset();
     immersive_focus_watcher_.reset();
 
diff --git a/ash/public/cpp/immersive/immersive_fullscreen_controller.h b/ash/public/cpp/immersive/immersive_fullscreen_controller.h
index 8ea8f835..b604907 100644
--- a/ash/public/cpp/immersive/immersive_fullscreen_controller.h
+++ b/ash/public/cpp/immersive/immersive_fullscreen_controller.h
@@ -13,9 +13,9 @@
 #include "base/macros.h"
 #include "base/timer/timer.h"
 #include "ui/aura/window_observer.h"
+#include "ui/events/event_observer.h"
 #include "ui/gfx/animation/animation_delegate.h"
 #include "ui/gfx/animation/slide_animation.h"
-#include "ui/views/pointer_watcher.h"
 #include "ui/views/view_observer.h"
 #include "ui/views/widget/widget_observer.h"
 
@@ -50,7 +50,7 @@
 class ASH_PUBLIC_EXPORT ImmersiveFullscreenController
     : public aura::WindowObserver,
       public gfx::AnimationDelegate,
-      public views::PointerWatcher,
+      public ui::EventObserver,
       public views::ViewObserver,
       public ImmersiveRevealedLock::Delegate {
  public:
@@ -118,10 +118,8 @@
   // Processes a GestureEvent. This may call SetHandled() on the supplied event.
   void OnGestureEvent(ui::GestureEvent* event);
 
-  // views::PointerWatcher:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              gfx::NativeView target) override;
+  // ui::EventObserver:
+  void OnEvent(const ui::Event& event) override;
 
   // aura::WindowObserver:
   void OnWindowPropertyChanged(aura::Window* window,
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 8e70da64..c04c0b4 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -543,7 +543,7 @@
 
   // Close the overflow bubble if an item on either shelf is clicked. Press
   // events elsewhere will close the overflow shelf via OverflowBubble's
-  // PointerWatcher functionality.
+  // EventHandler functionality.
   ShelfView* shelf_view = main_shelf_ ? main_shelf_ : this;
   if (shelf_view->IsShowingOverflowBubble())
     shelf_view->ToggleOverflowBubble();
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index fa40da60a..46e4e074 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -1833,7 +1833,7 @@
 
 TEST_F(ShelfViewTest, TestHideOverflow) {
   // Use an event generator instead of SimulateClick because the overflow bubble
-  // is a PointerWatcher and gets the events directly.
+  // uses a Shell pre-target EventHandler to observe input events.
   ui::test::EventGenerator* generator = GetEventGenerator();
 
   // Add one app (which is on the main shelf) and then add buttons until
diff --git a/ash/shell.cc b/ash/shell.cc
index bf71484..6cb7e5b25 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -68,7 +68,6 @@
 #include "ash/multi_device_setup/multi_device_notification_presenter.h"
 #include "ash/new_window_controller.h"
 #include "ash/note_taking_controller.h"
-#include "ash/pointer_watcher_adapter.h"
 #include "ash/policy/policy_recommendation_restorer.h"
 #include "ash/public/cpp/ash_constants.h"
 #include "ash/public/cpp/ash_features.h"
@@ -568,15 +567,6 @@
                                                          source_type);
 }
 
-void Shell::AddPointerWatcher(views::PointerWatcher* watcher,
-                              views::PointerWatcherEventTypes events) {
-  pointer_watcher_adapter_->AddPointerWatcher(watcher, events);
-}
-
-void Shell::RemovePointerWatcher(views::PointerWatcher* watcher) {
-  pointer_watcher_adapter_->RemovePointerWatcher(watcher);
-}
-
 void Shell::AddShellObserver(ShellObserver* observer) {
   shell_observers_.AddObserver(observer);
 }
@@ -903,8 +893,6 @@
   // Must be released before |focus_controller_|.
   ime_focus_handler_.reset();
 
-  pointer_watcher_adapter_.reset();
-
   // Stop observing window activation changes before closing all windows.
   focus_controller_->RemoveObserver(this);
 
@@ -1177,7 +1165,7 @@
   magnification_controller_ = std::make_unique<MagnificationController>();
   mru_window_tracker_ = std::make_unique<MruWindowTracker>();
 
-  autoclick_controller_.reset(AutoclickController::CreateInstance());
+  autoclick_controller_ = std::make_unique<AutoclickController>();
 
   high_contrast_controller_.reset(new HighContrastController);
 
@@ -1202,10 +1190,6 @@
 
   event_client_.reset(new EventClientImpl);
 
-  // Must occur after Shell has installed its early pre-target handlers (for
-  // example, WindowModalityController).
-  pointer_watcher_adapter_ = std::make_unique<PointerWatcherAdapter>();
-
   resize_shadow_controller_.reset(new ResizeShadowController());
   shadow_controller_ = std::make_unique<::wm::ShadowController>(
       focus_controller_.get(), std::make_unique<WmShadowControllerDelegate>(),
diff --git a/ash/shell.h b/ash/shell.h
index 9af4b92..14b046a 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -64,8 +64,6 @@
 
 namespace views {
 class NonClientFrameView;
-class PointerWatcher;
-enum class PointerWatcherEventTypes;
 class Widget;
 namespace corewm {
 class TooltipController;
@@ -151,7 +149,6 @@
 class PartialMagnificationController;
 class PeripheralBatteryNotifier;
 class PersistentWindowController;
-class PointerWatcherAdapter;
 class PolicyRecommendationRestorer;
 class PowerButtonController;
 class PowerEventObserver;
@@ -594,16 +591,6 @@
   void ShowContextMenu(const gfx::Point& location_in_screen,
                        ui::MenuSourceType source_type);
 
-  // If |events| is PointerWatcherEventTypes::MOVES,
-  // PointerWatcher::OnPointerEventObserved() is called for pointer move events.
-  // If |events| is PointerWatcherEventTypes::DRAGS,
-  // PointerWatcher::OnPointerEventObserved() is called for pointer drag events.
-  // Requesting pointer moves or drags may incur a performance hit and should be
-  // avoided if possible.
-  void AddPointerWatcher(views::PointerWatcher* watcher,
-                         views::PointerWatcherEventTypes events);
-  void RemovePointerWatcher(views::PointerWatcher* watcher);
-
   void AddShellObserver(ShellObserver* observer);
   void RemoveShellObserver(ShellObserver* observer);
 
@@ -760,7 +747,6 @@
   std::unique_ptr<MultiDeviceNotificationPresenter>
       multidevice_notification_presenter_;
   std::unique_ptr<NewWindowController> new_window_controller_;
-  std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_;
   std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
   std::unique_ptr<SessionController> session_controller_;
   std::unique_ptr<NightLightController> night_light_controller_;
diff --git a/ash/system/palette/palette_tray.cc b/ash/system/palette/palette_tray.cc
index e188252..f6e945f 100644
--- a/ash/system/palette/palette_tray.cc
+++ b/ash/system/palette/palette_tray.cc
@@ -45,7 +45,6 @@
 #include "ui/views/controls/separator.h"
 #include "ui/views/layout/box_layout.h"
 #include "ui/views/layout/fill_layout.h"
-#include "ui/views/pointer_watcher.h"
 
 namespace ash {
 
diff --git a/ash/system/power/power_prefs.cc b/ash/system/power/power_prefs.cc
index 1a1bdeb..54643286 100644
--- a/ash/system/power/power_prefs.cc
+++ b/ash/system/power/power_prefs.cc
@@ -93,6 +93,8 @@
                                 PrefRegistry::PUBLIC);
   registry->RegisterBooleanPref(prefs::kPowerUseVideoActivity, true,
                                 PrefRegistry::PUBLIC);
+  registry->RegisterBooleanPref(prefs::kPowerAllowWakeLocks, true,
+                                PrefRegistry::PUBLIC);
   registry->RegisterBooleanPref(prefs::kPowerAllowScreenWakeLocks, true,
                                 PrefRegistry::PUBLIC);
   registry->RegisterDoublePref(prefs::kPowerPresentationScreenDimDelayFactor,
@@ -244,6 +246,7 @@
       GetPowerPolicyAction(prefs, prefs::kPowerLidClosedAction);
   values.use_audio_activity = prefs->GetBoolean(prefs::kPowerUseAudioActivity);
   values.use_video_activity = prefs->GetBoolean(prefs::kPowerUseVideoActivity);
+  values.allow_wake_locks = prefs->GetBoolean(prefs::kPowerAllowWakeLocks);
   values.allow_screen_wake_locks =
       prefs->GetBoolean(prefs::kPowerAllowScreenWakeLocks);
   values.enable_auto_screen_lock =
@@ -293,6 +296,7 @@
   pref_change_registrar_->Add(prefs::kPowerLidClosedAction, update_callback);
   pref_change_registrar_->Add(prefs::kPowerUseAudioActivity, update_callback);
   pref_change_registrar_->Add(prefs::kPowerUseVideoActivity, update_callback);
+  pref_change_registrar_->Add(prefs::kPowerAllowWakeLocks, update_callback);
   pref_change_registrar_->Add(prefs::kPowerAllowScreenWakeLocks,
                               update_callback);
   pref_change_registrar_->Add(prefs::kEnableAutoScreenLock, update_callback);
diff --git a/ash/wm/immersive_context_ash.cc b/ash/wm/immersive_context_ash.cc
index ab396e7..88a07c1 100644
--- a/ash/wm/immersive_context_ash.cc
+++ b/ash/wm/immersive_context_ash.cc
@@ -10,7 +10,6 @@
 #include "ash/wm/window_state.h"
 #include "ash/wm/window_util.h"
 #include "base/logging.h"
-#include "ui/display/display.h"
 #include "ui/display/screen.h"
 #include "ui/views/widget/widget.h"
 #include "ui/wm/core/cursor_manager.h"
@@ -42,16 +41,6 @@
   return display.bounds();
 }
 
-void ImmersiveContextAsh::AddPointerWatcher(
-    views::PointerWatcher* watcher,
-    views::PointerWatcherEventTypes events) {
-  Shell::Get()->AddPointerWatcher(watcher, events);
-}
-
-void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) {
-  Shell::Get()->RemovePointerWatcher(watcher);
-}
-
 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() {
   return wm::GetCaptureWindow() != nullptr;
 }
diff --git a/ash/wm/immersive_context_ash.h b/ash/wm/immersive_context_ash.h
index 96bc2afb..cce453e 100644
--- a/ash/wm/immersive_context_ash.h
+++ b/ash/wm/immersive_context_ash.h
@@ -20,9 +20,6 @@
   void OnEnteringOrExitingImmersive(ImmersiveFullscreenController* controller,
                                     bool entering) override;
   gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) override;
-  void AddPointerWatcher(views::PointerWatcher* watcher,
-                         views::PointerWatcherEventTypes events) override;
-  void RemovePointerWatcher(views::PointerWatcher* watcher) override;
   bool DoesAnyWindowHaveCapture() override;
   bool IsMouseEventsEnabled() override;
 
diff --git a/base/android/animation_frame_time_histogram.cc b/base/android/animation_frame_time_histogram.cc
index 23dffd8..6b487bab 100644
--- a/base/android/animation_frame_time_histogram.cc
+++ b/base/android/animation_frame_time_histogram.cc
@@ -15,7 +15,8 @@
     const JavaParamRef<jstring>& j_histogram_name,
     const JavaParamRef<jlongArray>& j_frame_times_ms,
     jint j_count) {
-  jlong *frame_times_ms = env->GetLongArrayElements(j_frame_times_ms, NULL);
+  jlong* frame_times_ms =
+      env->GetLongArrayElements(j_frame_times_ms.obj(), nullptr);
   std::string histogram_name = base::android::ConvertJavaStringToUTF8(
       env, j_histogram_name);
 
@@ -23,4 +24,6 @@
     UMA_HISTOGRAM_TIMES(histogram_name.c_str(),
                         base::TimeDelta::FromMilliseconds(frame_times_ms[i]));
   }
+  env->ReleaseLongArrayElements(j_frame_times_ms.obj(), frame_times_ms,
+                                JNI_ABORT);
 }
diff --git a/base/android/apk_assets.cc b/base/android/apk_assets.cc
index de468b4..8347feb 100644
--- a/base/android/apk_assets.cc
+++ b/base/android/apk_assets.cc
@@ -23,7 +23,7 @@
   ScopedJavaLocalRef<jlongArray> jarr = Java_ApkAssets_open(
       env, base::android::ConvertUTF8ToJavaString(env, file_path));
   std::vector<jlong> results;
-  base::android::JavaLongArrayToLongVector(env, jarr.obj(), &results);
+  base::android::JavaLongArrayToLongVector(env, jarr, &results);
   CHECK_EQ(3U, results.size());
   int fd = static_cast<int>(results[0]);
   region->offset = results[1];
diff --git a/base/android/build_info.cc b/base/android/build_info.cc
index bebf901..89d2025 100644
--- a/base/android/build_info.cc
+++ b/base/android/build_info.cc
@@ -38,7 +38,7 @@
     JNIEnv* env = AttachCurrentThread();
     ScopedJavaLocalRef<jobjectArray> params_objs = Java_BuildInfo_getAll(env);
     std::vector<std::string> params;
-    AppendJavaStringArrayToStringVector(env, params_objs.obj(), &params);
+    AppendJavaStringArrayToStringVector(env, params_objs, &params);
     return new BuildInfo(params);
   }
 
diff --git a/base/android/important_file_writer_android.cc b/base/android/important_file_writer_android.cc
index fcaa3b1..8d9e8dc0 100644
--- a/base/android/important_file_writer_android.cc
+++ b/base/android/important_file_writer_android.cc
@@ -4,6 +4,7 @@
 
 #include <string>
 
+#include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/files/important_file_writer.h"
 #include "base/threading/thread_restrictions.h"
@@ -23,13 +24,10 @@
   std::string native_file_name;
   base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
   base::FilePath path(native_file_name);
-  int data_length = env->GetArrayLength(data);
-  jbyte* native_data = env->GetByteArrayElements(data, NULL);
-  std::string native_data_string(reinterpret_cast<char *>(native_data),
-                                 data_length);
+  std::string native_data_string;
+  JavaByteArrayToString(env, data, &native_data_string);
   bool result = base::ImportantFileWriter::WriteFileAtomically(
       path, native_data_string);
-  env->ReleaseByteArrayElements(data, native_data, JNI_ABORT);
   return result;
 }
 
diff --git a/base/android/jni_array.cc b/base/android/jni_array.cc
index 403c56e..0693776 100644
--- a/base/android/jni_array.cc
+++ b/base/android/jni_array.cc
@@ -16,9 +16,9 @@
 // may be -1 if |array| is not a valid Java array), provide a safe wrapper
 // that always returns a valid, non-negative size.
 template <typename JavaArrayType>
-size_t SafeGetArrayLength(JNIEnv* env, JavaArrayType jarray) {
+size_t SafeGetArrayLength(JNIEnv* env, const JavaRef<JavaArrayType>& jarray) {
   DCHECK(jarray);
-  jsize length = env->GetArrayLength(jarray);
+  jsize length = env->GetArrayLength(jarray.obj());
   DCHECK_GE(length, 0) << "Invalid array length: " << length;
   return static_cast<size_t>(std::max(0, length));
 }
@@ -166,7 +166,7 @@
 }
 
 void AppendJavaStringArrayToStringVector(JNIEnv* env,
-                                         jobjectArray array,
+                                         const JavaRef<jobjectArray>& array,
                                          std::vector<string16>* out) {
   DCHECK(out);
   if (!array)
@@ -175,14 +175,14 @@
   size_t back = out->size();
   out->resize(back + len);
   for (size_t i = 0; i < len; ++i) {
-    ScopedJavaLocalRef<jstring> str(env,
-        static_cast<jstring>(env->GetObjectArrayElement(array, i)));
+    ScopedJavaLocalRef<jstring> str(
+        env, static_cast<jstring>(env->GetObjectArrayElement(array.obj(), i)));
     ConvertJavaStringToUTF16(env, str.obj(), out->data() + back + i);
   }
 }
 
 void AppendJavaStringArrayToStringVector(JNIEnv* env,
-                                         jobjectArray array,
+                                         const JavaRef<jobjectArray>& array,
                                          std::vector<std::string>* out) {
   DCHECK(out);
   if (!array)
@@ -191,14 +191,14 @@
   size_t back = out->size();
   out->resize(back + len);
   for (size_t i = 0; i < len; ++i) {
-    ScopedJavaLocalRef<jstring> str(env,
-        static_cast<jstring>(env->GetObjectArrayElement(array, i)));
+    ScopedJavaLocalRef<jstring> str(
+        env, static_cast<jstring>(env->GetObjectArrayElement(array.obj(), i)));
     ConvertJavaStringToUTF8(env, str.obj(), out->data() + back + i);
   }
 }
 
 void AppendJavaByteArrayToByteVector(JNIEnv* env,
-                                     jbyteArray byte_array,
+                                     const JavaRef<jbyteArray>& byte_array,
                                      std::vector<uint8_t>* out) {
   DCHECK(out);
   if (!byte_array)
@@ -208,12 +208,12 @@
     return;
   size_t back = out->size();
   out->resize(back + len);
-  env->GetByteArrayRegion(byte_array, 0, len,
+  env->GetByteArrayRegion(byte_array.obj(), 0, len,
                           reinterpret_cast<int8_t*>(out->data() + back));
 }
 
 void JavaByteArrayToByteVector(JNIEnv* env,
-                               jbyteArray byte_array,
+                               const JavaRef<jbyteArray>& byte_array,
                                std::vector<uint8_t>* out) {
   DCHECK(out);
   DCHECK(byte_array);
@@ -222,7 +222,7 @@
 }
 
 void JavaByteArrayToString(JNIEnv* env,
-                           jbyteArray byte_array,
+                           const JavaRef<jbyteArray>& byte_array,
                            std::string* out) {
   DCHECK(out);
   DCHECK(byte_array);
@@ -233,7 +233,7 @@
 }
 
 void JavaBooleanArrayToBoolVector(JNIEnv* env,
-                                  jbooleanArray boolean_array,
+                                  const JavaRef<jbooleanArray>& boolean_array,
                                   std::vector<bool>* out) {
   DCHECK(out);
   if (!boolean_array)
@@ -243,25 +243,26 @@
     return;
   out->resize(len);
   // It is not possible to get bool* out of vector<bool>.
-  jboolean* values = env->GetBooleanArrayElements(boolean_array, nullptr);
+  jboolean* values = env->GetBooleanArrayElements(boolean_array.obj(), nullptr);
   for (size_t i = 0; i < len; ++i) {
     out->at(i) = static_cast<bool>(values[i]);
   }
+  env->ReleaseBooleanArrayElements(boolean_array.obj(), values, JNI_ABORT);
 }
 
 void JavaIntArrayToIntVector(JNIEnv* env,
-                             jintArray int_array,
+                             const JavaRef<jintArray>& int_array,
                              std::vector<int>* out) {
   DCHECK(out);
   size_t len = SafeGetArrayLength(env, int_array);
   out->resize(len);
   if (!len)
     return;
-  env->GetIntArrayRegion(int_array, 0, len, out->data());
+  env->GetIntArrayRegion(int_array.obj(), 0, len, out->data());
 }
 
 void JavaLongArrayToInt64Vector(JNIEnv* env,
-                                jlongArray long_array,
+                                const JavaRef<jlongArray>& long_array,
                                 std::vector<int64_t>* out) {
   DCHECK(out);
   std::vector<jlong> temp;
@@ -271,38 +272,37 @@
 }
 
 void JavaLongArrayToLongVector(JNIEnv* env,
-                               jlongArray long_array,
+                               const JavaRef<jlongArray>& long_array,
                                std::vector<jlong>* out) {
   DCHECK(out);
   size_t len = SafeGetArrayLength(env, long_array);
   out->resize(len);
   if (!len)
     return;
-  env->GetLongArrayRegion(long_array, 0, len, out->data());
+  env->GetLongArrayRegion(long_array.obj(), 0, len, out->data());
 }
 
 void JavaFloatArrayToFloatVector(JNIEnv* env,
-                                 jfloatArray float_array,
+                                 const JavaRef<jfloatArray>& float_array,
                                  std::vector<float>* out) {
   DCHECK(out);
   size_t len = SafeGetArrayLength(env, float_array);
   out->resize(len);
   if (!len)
     return;
-  env->GetFloatArrayRegion(float_array, 0, len, out->data());
+  env->GetFloatArrayRegion(float_array.obj(), 0, len, out->data());
 }
 
-void JavaArrayOfByteArrayToStringVector(
-    JNIEnv* env,
-    jobjectArray array,
-    std::vector<std::string>* out) {
+void JavaArrayOfByteArrayToStringVector(JNIEnv* env,
+                                        const JavaRef<jobjectArray>& array,
+                                        std::vector<std::string>* out) {
   DCHECK(out);
   size_t len = SafeGetArrayLength(env, array);
   out->resize(len);
   for (size_t i = 0; i < len; ++i) {
     ScopedJavaLocalRef<jbyteArray> bytes_array(
-        env, static_cast<jbyteArray>(
-            env->GetObjectArrayElement(array, i)));
+        env,
+        static_cast<jbyteArray>(env->GetObjectArrayElement(array.obj(), i)));
     jsize bytes_len = env->GetArrayLength(bytes_array.obj());
     jbyte* bytes = env->GetByteArrayElements(bytes_array.obj(), nullptr);
     (*out)[i].assign(reinterpret_cast<const char*>(bytes), bytes_len);
@@ -310,17 +310,17 @@
   }
 }
 
-void JavaArrayOfIntArrayToIntVector(
-    JNIEnv* env,
-    jobjectArray array,
-    std::vector<std::vector<int>>* out) {
+void JavaArrayOfIntArrayToIntVector(JNIEnv* env,
+                                    const JavaRef<jobjectArray>& array,
+                                    std::vector<std::vector<int>>* out) {
   DCHECK(out);
   size_t len = SafeGetArrayLength(env, array);
   out->resize(len);
   for (size_t i = 0; i < len; ++i) {
     ScopedJavaLocalRef<jintArray> int_array(
-        env, static_cast<jintArray>(env->GetObjectArrayElement(array, i)));
-    JavaIntArrayToIntVector(env, int_array.obj(), &out->at(i));
+        env,
+        static_cast<jintArray>(env->GetObjectArrayElement(array.obj(), i)));
+    JavaIntArrayToIntVector(env, int_array, &out->at(i));
   }
 }
 
diff --git a/base/android/jni_array.h b/base/android/jni_array.h
index 0ec38e9..c5a1c0368 100644
--- a/base/android/jni_array.h
+++ b/base/android/jni_array.h
@@ -73,56 +73,59 @@
 // Converts a Java string array to a native array.
 BASE_EXPORT void AppendJavaStringArrayToStringVector(
     JNIEnv* env,
-    jobjectArray array,
+    const JavaRef<jobjectArray>& array,
     std::vector<string16>* out);
 
 BASE_EXPORT void AppendJavaStringArrayToStringVector(
     JNIEnv* env,
-    jobjectArray array,
+    const JavaRef<jobjectArray>& array,
     std::vector<std::string>* out);
 
 // Appends the Java bytes in |bytes_array| onto the end of |out|.
-BASE_EXPORT void AppendJavaByteArrayToByteVector(JNIEnv* env,
-                                                 jbyteArray byte_array,
-                                                 std::vector<uint8_t>* out);
+BASE_EXPORT void AppendJavaByteArrayToByteVector(
+    JNIEnv* env,
+    const JavaRef<jbyteArray>& byte_array,
+    std::vector<uint8_t>* out);
 
 // Replaces the content of |out| with the Java bytes in |byte_array|.
-BASE_EXPORT void JavaByteArrayToByteVector(JNIEnv* env,
-                                           jbyteArray byte_array,
-                                           std::vector<uint8_t>* out);
+BASE_EXPORT void JavaByteArrayToByteVector(
+    JNIEnv* env,
+    const JavaRef<jbyteArray>& byte_array,
+    std::vector<uint8_t>* out);
 
 // Replaces the content of |out| with the Java bytes in |byte_array|. No UTF-8
 // conversion is performed.
 BASE_EXPORT void JavaByteArrayToString(JNIEnv* env,
-                                       jbyteArray byte_array,
+                                       const JavaRef<jbyteArray>& byte_array,
                                        std::string* out);
 
 // Replaces the content of |out| with the Java booleans in |boolean_array|.
-BASE_EXPORT void JavaBooleanArrayToBoolVector(JNIEnv* env,
-                                              jbooleanArray boolean_array,
-                                              std::vector<bool>* out);
+BASE_EXPORT void JavaBooleanArrayToBoolVector(
+    JNIEnv* env,
+    const JavaRef<jbooleanArray>& boolean_array,
+    std::vector<bool>* out);
 
 // Replaces the content of |out| with the Java ints in |int_array|.
-BASE_EXPORT void JavaIntArrayToIntVector(
-    JNIEnv* env,
-    jintArray int_array,
-    std::vector<int>* out);
+BASE_EXPORT void JavaIntArrayToIntVector(JNIEnv* env,
+                                         const JavaRef<jintArray>& int_array,
+                                         std::vector<int>* out);
 
 // Replaces the content of |out| with the Java longs in |long_array|.
-BASE_EXPORT void JavaLongArrayToInt64Vector(JNIEnv* env,
-                                            jlongArray long_array,
-                                            std::vector<int64_t>* out);
+BASE_EXPORT void JavaLongArrayToInt64Vector(
+    JNIEnv* env,
+    const JavaRef<jlongArray>& long_array,
+    std::vector<int64_t>* out);
 
 // Replaces the content of |out| with the Java longs in |long_array|.
 BASE_EXPORT void JavaLongArrayToLongVector(
     JNIEnv* env,
-    jlongArray long_array,
+    const JavaRef<jlongArray>& long_array,
     std::vector<jlong>* out);
 
 // Replaces the content of |out| with the Java floats in |float_array|.
 BASE_EXPORT void JavaFloatArrayToFloatVector(
     JNIEnv* env,
-    jfloatArray float_array,
+    const JavaRef<jfloatArray>& float_array,
     std::vector<float>* out);
 
 // Assuming |array| is an byte[][] (array of byte arrays), replaces the
@@ -130,14 +133,14 @@
 // conversion is performed.
 BASE_EXPORT void JavaArrayOfByteArrayToStringVector(
     JNIEnv* env,
-    jobjectArray array,
+    const JavaRef<jobjectArray>& array,
     std::vector<std::string>* out);
 
 // Assuming |array| is an int[][] (array of int arrays), replaces the
 // contents of |out| with the corresponding vectors of ints.
 BASE_EXPORT void JavaArrayOfIntArrayToIntVector(
     JNIEnv* env,
-    jobjectArray array,
+    const JavaRef<jobjectArray>& array,
     std::vector<std::vector<int>>* out);
 
 }  // namespace android
diff --git a/base/android/jni_array_unittest.cc b/base/android/jni_array_unittest.cc
index eb5bec7..5c5eb058 100644
--- a/base/android/jni_array_unittest.cc
+++ b/base/android/jni_array_unittest.cc
@@ -22,24 +22,24 @@
   const size_t kLen = arraysize(kBytes);
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jbyteArray> bytes = ToJavaByteArray(env, kBytes, kLen);
-  ASSERT_TRUE(bytes.obj());
+  ASSERT_TRUE(bytes);
 
   std::vector<uint8_t> inputVector(kBytes, kBytes + kLen);
   ScopedJavaLocalRef<jbyteArray> bytesFromVector =
       ToJavaByteArray(env, inputVector);
-  ASSERT_TRUE(bytesFromVector.obj());
+  ASSERT_TRUE(bytesFromVector);
 
   std::vector<uint8_t> vectorFromBytes(5);
   std::vector<uint8_t> vectorFromVector(5);
-  JavaByteArrayToByteVector(env, bytes.obj(), &vectorFromBytes);
-  JavaByteArrayToByteVector(env, bytesFromVector.obj(), &vectorFromVector);
+  JavaByteArrayToByteVector(env, bytes, &vectorFromBytes);
+  JavaByteArrayToByteVector(env, bytesFromVector, &vectorFromVector);
   EXPECT_EQ(4U, vectorFromBytes.size());
   EXPECT_EQ(4U, vectorFromVector.size());
   std::vector<uint8_t> expected_vec(kBytes, kBytes + kLen);
   EXPECT_EQ(expected_vec, vectorFromBytes);
   EXPECT_EQ(expected_vec, vectorFromVector);
 
-  AppendJavaByteArrayToByteVector(env, bytes.obj(), &vectorFromBytes);
+  AppendJavaByteArrayToByteVector(env, bytes, &vectorFromBytes);
   EXPECT_EQ(8U, vectorFromBytes.size());
   expected_vec.insert(expected_vec.end(), kBytes, kBytes + kLen);
   EXPECT_EQ(expected_vec, vectorFromBytes);
@@ -50,10 +50,10 @@
   std::string inputString("hello\0world");
   ScopedJavaLocalRef<jbyteArray> bytesFromString =
       ToJavaByteArray(env, inputString);
-  ASSERT_TRUE(bytesFromString.obj());
+  ASSERT_TRUE(bytesFromString);
 
   std::string stringFromString;
-  JavaByteArrayToString(env, bytesFromString.obj(), &stringFromString);
+  JavaByteArrayToString(env, bytesFromString, &stringFromString);
   EXPECT_EQ(inputString, stringFromString);
 }
 
@@ -61,7 +61,7 @@
                          const bool* bool_array,
                          const size_t len,
                          const ScopedJavaLocalRef<jbooleanArray>& booleans) {
-  ASSERT_TRUE(booleans.obj());
+  ASSERT_TRUE(booleans);
 
   jsize java_array_len = env->GetArrayLength(booleans.obj());
   ASSERT_EQ(static_cast<jsize>(len), java_array_len);
@@ -86,7 +86,7 @@
     const int* int_array,
     const size_t len,
     const ScopedJavaLocalRef<jintArray>& ints) {
-  ASSERT_TRUE(ints.obj());
+  ASSERT_TRUE(ints);
 
   jsize java_array_len = env->GetArrayLength(ints.obj());
   ASSERT_EQ(static_cast<jsize>(len), java_array_len);
@@ -114,7 +114,7 @@
                          const int64_t* long_array,
                          const size_t len,
                          const ScopedJavaLocalRef<jlongArray>& longs) {
-  ASSERT_TRUE(longs.obj());
+  ASSERT_TRUE(longs);
 
   jsize java_array_len = env->GetArrayLength(longs.obj());
   ASSERT_EQ(static_cast<jsize>(len), java_array_len);
@@ -165,7 +165,7 @@
     const float* float_array,
     const size_t len,
     const ScopedJavaLocalRef<jfloatArray>& floats) {
-  ASSERT_TRUE(floats.obj());
+  ASSERT_TRUE(floats);
 
   jsize java_array_len = env->GetArrayLength(floats.obj());
   ASSERT_EQ(static_cast<jsize>(len), java_array_len);
@@ -195,7 +195,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jbooleanArray> jbooleans(env, env->NewBooleanArray(kLen));
-  ASSERT_TRUE(jbooleans.obj());
+  ASSERT_TRUE(jbooleans);
 
   for (size_t i = 0; i < kLen; ++i) {
     jboolean j = static_cast<jboolean>(kBools[i]);
@@ -204,7 +204,7 @@
   }
 
   std::vector<bool> bools;
-  JavaBooleanArrayToBoolVector(env, jbooleans.obj(), &bools);
+  JavaBooleanArrayToBoolVector(env, jbooleans, &bools);
 
   ASSERT_EQ(static_cast<jsize>(bools.size()),
             env->GetArrayLength(jbooleans.obj()));
@@ -218,7 +218,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jintArray> jints(env, env->NewIntArray(kLen));
-  ASSERT_TRUE(jints.obj());
+  ASSERT_TRUE(jints);
 
   for (size_t i = 0; i < kLen; ++i) {
     jint j = static_cast<jint>(kInts[i]);
@@ -227,7 +227,7 @@
   }
 
   std::vector<int> ints;
-  JavaIntArrayToIntVector(env, jints.obj(), &ints);
+  JavaIntArrayToIntVector(env, jints, &ints);
 
   ASSERT_EQ(static_cast<jsize>(ints.size()), env->GetArrayLength(jints.obj()));
 
@@ -240,7 +240,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jlongArray> jlongs(env, env->NewLongArray(kLen));
-  ASSERT_TRUE(jlongs.obj());
+  ASSERT_TRUE(jlongs);
 
   for (size_t i = 0; i < kLen; ++i) {
     jlong j = static_cast<jlong>(kInt64s[i]);
@@ -249,7 +249,7 @@
   }
 
   std::vector<int64_t> int64s;
-  JavaLongArrayToInt64Vector(env, jlongs.obj(), &int64s);
+  JavaLongArrayToInt64Vector(env, jlongs, &int64s);
 
   ASSERT_EQ(static_cast<jsize>(int64s.size()),
             env->GetArrayLength(jlongs.obj()));
@@ -268,7 +268,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jlongArray> jlongs(env, env->NewLongArray(kLen));
-  ASSERT_TRUE(jlongs.obj());
+  ASSERT_TRUE(jlongs);
 
   for (size_t i = 0; i < kLen; ++i) {
     jlong j = static_cast<jlong>(kInt64s[i]);
@@ -277,7 +277,7 @@
   }
 
   std::vector<jlong> jlongs_vector;
-  JavaLongArrayToLongVector(env, jlongs.obj(), &jlongs_vector);
+  JavaLongArrayToLongVector(env, jlongs, &jlongs_vector);
 
   ASSERT_EQ(static_cast<jsize>(jlongs_vector.size()),
             env->GetArrayLength(jlongs.obj()));
@@ -295,7 +295,7 @@
 
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jfloatArray> jfloats(env, env->NewFloatArray(kLen));
-  ASSERT_TRUE(jfloats.obj());
+  ASSERT_TRUE(jfloats);
 
   for (size_t i = 0; i < kLen; ++i) {
     jfloat j = static_cast<jfloat>(kFloats[i]);
@@ -304,7 +304,7 @@
   }
 
   std::vector<float> floats;
-  JavaFloatArrayToFloatVector(env, jfloats.obj(), &floats);
+  JavaFloatArrayToFloatVector(env, jfloats, &floats);
 
   ASSERT_EQ(static_cast<jsize>(floats.size()),
       env->GetArrayLength(jfloats.obj()));
@@ -322,11 +322,11 @@
 
   // Create a byte[][] object.
   ScopedJavaLocalRef<jclass> byte_array_clazz(env, env->FindClass("[B"));
-  ASSERT_TRUE(byte_array_clazz.obj());
+  ASSERT_TRUE(byte_array_clazz);
 
   ScopedJavaLocalRef<jobjectArray> array(
       env, env->NewObjectArray(kMaxItems, byte_array_clazz.obj(), NULL));
-  ASSERT_TRUE(array.obj());
+  ASSERT_TRUE(array);
 
   // Create kMaxItems byte buffers.
   char text[16];
@@ -335,7 +335,7 @@
     ScopedJavaLocalRef<jbyteArray> byte_array =
         ToJavaByteArray(env, reinterpret_cast<uint8_t*>(text),
                         static_cast<size_t>(strlen(text)));
-    ASSERT_TRUE(byte_array.obj());
+    ASSERT_TRUE(byte_array);
 
     env->SetObjectArrayElement(array.obj(), i, byte_array.obj());
     ASSERT_FALSE(HasException(env));
@@ -343,7 +343,7 @@
 
   // Convert to std::vector<std::string>, check the content.
   std::vector<std::string> vec;
-  JavaArrayOfByteArrayToStringVector(env, array.obj(), &vec);
+  JavaArrayOfByteArrayToStringVector(env, array, &vec);
 
   EXPECT_EQ(static_cast<size_t>(kMaxItems), vec.size());
   for (int i = 0; i < kMaxItems; ++i) {
@@ -358,11 +358,11 @@
 
   // Create an int[][] object.
   ScopedJavaLocalRef<jclass> int_array_clazz(env, env->FindClass("[I"));
-  ASSERT_TRUE(int_array_clazz.obj());
+  ASSERT_TRUE(int_array_clazz);
 
   ScopedJavaLocalRef<jobjectArray> array(
       env, env->NewObjectArray(kNumItems, int_array_clazz.obj(), nullptr));
-  ASSERT_TRUE(array.obj());
+  ASSERT_TRUE(array);
 
   // Populate int[][] object.
   const int kInts0[] = {0, 1, -1, std::numeric_limits<int32_t>::min(),
@@ -388,7 +388,7 @@
 
   // Convert to std::vector<std::vector<int>>, check the content.
   std::vector<std::vector<int>> out;
-  JavaArrayOfIntArrayToIntVector(env, array.obj(), &out);
+  JavaArrayOfIntArrayToIntVector(env, array, &out);
 
   EXPECT_EQ(kNumItems, out.size());
   CheckIntArrayConversion(env, int_array0, out[0], kLen0);
diff --git a/base/android/library_loader/library_prefetcher.cc b/base/android/library_loader/library_prefetcher.cc
index 2ccf6a0..d74f49f3 100644
--- a/base/android/library_loader/library_prefetcher.cc
+++ b/base/android/library_loader/library_prefetcher.cc
@@ -320,7 +320,10 @@
 
 // static
 void NativeLibraryPrefetcher::MadviseForOrderfile() {
-  CHECK(IsOrderingSane());
+  if (!IsOrderingSane()) {
+    LOG(WARNING) << "Code not ordered, madvise optimization skipped";
+    return;
+  }
   LOG(WARNING) << "Performing experimental madvise from orderfile information";
   // First MADV_RANDOM on all of text, then turn the ordered text range back to
   // normal. The ordered range may be placed anywhere within .text.
diff --git a/base/android/path_utils.cc b/base/android/path_utils.cc
index dfb68e6..d4d557d 100644
--- a/base/android/path_utils.cc
+++ b/base/android/path_utils.cc
@@ -52,7 +52,7 @@
   std::vector<std::string> dirs;
   JNIEnv* env = AttachCurrentThread();
   auto jarray = Java_PathUtils_getAllPrivateDownloadsDirectories(env);
-  base::android::AppendJavaStringArrayToStringVector(env, jarray.obj(), &dirs);
+  base::android::AppendJavaStringArrayToStringVector(env, jarray, &dirs);
 
   std::vector<base::FilePath> file_paths;
   for (const auto& dir : dirs)
diff --git a/base/macros.h b/base/macros.h
index 52ea2e5c..0f875c7 100644
--- a/base/macros.h
+++ b/base/macros.h
@@ -68,27 +68,4 @@
 inline void ignore_result(const T&) {
 }
 
-namespace base {
-
-// Use these to declare and define a static local variable (static T;) so that
-// it is leaked so that its destructors are not called at exit.  This is
-// thread-safe.
-//
-// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEPRECATED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-// Please don't use this macro. Use a function-local static of type
-// base::NoDestructor<T> instead:
-//
-// Factory& Factory::GetInstance() {
-//   static base::NoDestructor<Factory> instance;
-//   return *instance;
-// }
-//
-// Removal of this macro is tracked in https://crbug.com/893317.
-//
-// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#define CR_DEFINE_STATIC_LOCAL(type, name, arguments) \
-  static type& name = *new type arguments
-
-}  // base
-
 #endif  // BASE_MACROS_H_
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index e1289e7e..a316c9f 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -365,8 +365,7 @@
 #else
   static const char kShmem[] = "org.chromium.Chromium.shmem.";
 #endif
-  CR_DEFINE_STATIC_LOCAL(const std::string, name_base, (kShmem));
-  *path = temp_dir.AppendASCII(name_base + mem_name);
+  *path = temp_dir.AppendASCII(kShmem + mem_name);
   return true;
 }
 
diff --git a/base/metrics/persistent_memory_allocator.cc b/base/metrics/persistent_memory_allocator.cc
index a8cd4a4c..01b1795 100644
--- a/base/metrics/persistent_memory_allocator.cc
+++ b/base/metrics/persistent_memory_allocator.cc
@@ -21,8 +21,9 @@
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/numerics/safe_conversions.h"
+#include "base/optional.h"
 #include "base/sys_info.h"
-#include "base/threading/thread_restrictions.h"
+#include "base/threading/scoped_blocking_call.h"
 #include "build/build_config.h"
 
 namespace {
@@ -1068,7 +1069,7 @@
 void FilePersistentMemoryAllocator::Cache() {
   // Since this method is expected to load data from permanent storage
   // into memory, blocking I/O may occur.
-  AssertBlockingAllowed();
+  base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
 
   // Calculate begin/end addresses so that the first byte of every page
   // in that range can be read. Keep within the used space. The |volatile|
@@ -1092,14 +1093,16 @@
 }
 
 void FilePersistentMemoryAllocator::FlushPartial(size_t length, bool sync) {
-  if (sync)
-    AssertBlockingAllowed();
   if (IsReadonly())
     return;
 
+  base::Optional<base::ScopedBlockingCall> scoped_blocking_call;
+  if (sync)
+    scoped_blocking_call.emplace(base::BlockingType::MAY_BLOCK);
+
 #if defined(OS_WIN)
   // Windows doesn't support asynchronous flush.
-  AssertBlockingAllowed();
+  scoped_blocking_call.emplace(base::BlockingType::MAY_BLOCK);
   BOOL success = ::FlushViewOfFile(data(), length);
   DPCHECK(success);
 #elif defined(OS_MACOSX)
diff --git a/base/no_destructor.h b/base/no_destructor.h
index aabc6e6a7..21cfef8 100644
--- a/base/no_destructor.h
+++ b/base/no_destructor.h
@@ -38,7 +38,6 @@
 // indirection and a malloc. Also note that since C++11 static local variable
 // initialization is thread-safe and so is this pattern. Code should prefer to
 // use NoDestructor<T> over:
-// - The CR_DEFINE_STATIC_LOCAL() helper macro.
 // - A function scoped static T* or T& that is dynamically initialized.
 // - A global base::LazyInstance<T>.
 //
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 98067ced..17ef722 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -23,6 +23,7 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
+#include "base/no_destructor.h"
 #include "base/path_service.h"
 #include "base/process/launch.h"
 #include "base/process/memory.h"
@@ -135,18 +136,16 @@
   DISALLOW_COPY_AND_ASSIGN(CheckForLeakedGlobals);
 };
 
-std::string GetProfileName() {
-  static const char kDefaultProfileName[] = "test-profile-{pid}";
-  CR_DEFINE_STATIC_LOCAL(std::string, profile_name, ());
-  if (profile_name.empty()) {
+const std::string& GetProfileName() {
+  static const base::NoDestructor<std::string> profile_name([]() {
     const base::CommandLine& command_line =
         *base::CommandLine::ForCurrentProcess();
     if (command_line.HasSwitch(switches::kProfilingFile))
-      profile_name = command_line.GetSwitchValueASCII(switches::kProfilingFile);
+      return command_line.GetSwitchValueASCII(switches::kProfilingFile);
     else
-      profile_name = std::string(kDefaultProfileName);
-  }
-  return profile_name;
+      return std::string("test-profile-{pid}");
+  }());
+  return *profile_name;
 }
 
 void InitializeLogging() {
diff --git a/base/trace_event/memory_infra_background_whitelist.cc b/base/trace_event/memory_infra_background_whitelist.cc
index ed47bd5..7248ab8 100644
--- a/base/trace_event/memory_infra_background_whitelist.cc
+++ b/base/trace_event/memory_infra_background_whitelist.cc
@@ -35,7 +35,6 @@
     "gpu::TextureManager",
     "FontCaches",
     "HistoryReport",
-    "HistoryService",
     "IPCChannel",
     "IndexedDBBackingStore",
     "InMemoryURLIndex",
@@ -99,7 +98,6 @@
     "gpu/gl/renderbuffers/context_group_0x?",
     "gpu/gl/textures/context_group_0x?",
     "history/delta_file_service/leveldb_0x?",
-    "history/history_service",
     "history/usage_reports_buffer/leveldb_0x?",
     "java_heap",
     "java_heap/allocated_objects",
diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py
index c90e5639..8229c86 100755
--- a/build/android/gyp/proguard.py
+++ b/build/android/gyp/proguard.py
@@ -66,6 +66,8 @@
   parser.add_option('--main-dex-rules-path', action='append',
                     help='Paths to main dex rules for multidex'
                          '- only works with R8.')
+  parser.add_option('--min-api', default='',
+                    help='Minimum Android API level compatibility.')
   parser.add_option('--verbose', '-v', action='store_true',
                     help='Print all proguard output')
 
@@ -73,6 +75,8 @@
 
   assert not options.main_dex_rules_path or options.r8_path, \
       "R8 must be enabled to pass main dex rules."
+  assert not options.min_api or options.r8_path, \
+      "R8 must be enabled to pass min api."
 
   classpath = []
   for arg in options.classpath:
@@ -132,6 +136,9 @@
   for config_file in options.proguard_configs:
     cmd += ['--pg-conf', config_file]
 
+  if options.min_api:
+    cmd += ['--min-api', options.min_api]
+
   if options.main_dex_rules_path:
     for main_dex_rule in options.main_dex_rules_path:
       cmd += ['--main-dex-rules', main_dex_rule]
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 6995161..7f012c4 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -1131,6 +1131,13 @@
           args += invoker.proguard_args
         }
 
+        if (_proguarding_with_r8 && defined(invoker.min_sdk_version)) {
+          args += [
+            "--min-api",
+            "${invoker.min_sdk_version}",
+          ]
+        }
+
         output_path = _proguard_output_path
       }
     }
diff --git a/build/config/mac/package_framework.py b/build/config/mac/package_framework.py
index f669528..7560409 100644
--- a/build/config/mac/package_framework.py
+++ b/build/config/mac/package_framework.py
@@ -23,7 +23,7 @@
   # Foo.framework/Versions/Current symlink to it.
   if args.version:
     try:
-      os.makedirs(os.path.join(args.framework, VERSIONS, args.version), 0744)
+      os.makedirs(os.path.join(args.framework, VERSIONS, args.version), 0755)
     except OSError as e:
       if e.errno != errno.EEXIST:
         raise e
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1
index eb5baf9..3edff3f 100644
--- a/build/fuchsia/linux.sdk.sha1
+++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@
-d5cb91035bcf04ae5cb23f3cce9edb8cdfdd86f9
\ No newline at end of file
+70f5fe6a9162ad58e8688abc704ef58cc6458b1a
\ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1
index b6accb8..4739966b 100644
--- a/build/fuchsia/mac.sdk.sha1
+++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@
-6cac70796e4f58c3c3ec9ae2e9e97731456e5311
\ No newline at end of file
+514ca7db27b2028a00b81571552cf51b8ff8a67c
\ No newline at end of file
diff --git a/cc/input/browser_controls_offset_manager.cc b/cc/input/browser_controls_offset_manager.cc
index e55bf94..863cee53 100644
--- a/cc/input/browser_controls_offset_manager.cc
+++ b/cc/input/browser_controls_offset_manager.cc
@@ -38,6 +38,7 @@
     float controls_show_threshold,
     float controls_hide_threshold)
     : client_(client),
+      animation_initialized_(false),
       animation_start_value_(0.f),
       animation_stop_value_(0.f),
       animation_direction_(NO_ANIMATION),
@@ -197,6 +198,16 @@
   if (!has_animation() || !client_->HaveRootScrollNode())
     return gfx::Vector2dF();
 
+  if (!animation_initialized_) {
+    // Setup the animation start and time here so that they use the same clock
+    // as frame times. This is helpful for tests that mock time.
+    animation_start_time_ = monotonic_time;
+    animation_stop_time_ =
+        animation_start_time_ +
+        base::TimeDelta::FromMilliseconds(kShowHideMaxDurationMs);
+    animation_initialized_ = true;
+  }
+
   float old_offset = ContentTopOffset();
   float new_ratio = gfx::Tween::ClampedFloatValueBetween(
       monotonic_time, animation_start_time_, animation_start_value_,
@@ -211,6 +222,7 @@
 }
 
 void BrowserControlsOffsetManager::ResetAnimations() {
+  animation_initialized_ = false;
   animation_start_time_ = base::TimeTicks();
   animation_start_value_ = 0.f;
   animation_stop_time_ = base::TimeTicks();
@@ -234,13 +246,9 @@
     return;
   }
 
-  animation_start_time_ = base::TimeTicks::Now();
   animation_start_value_ = TopControlsShownRatio();
 
   const float max_ending_ratio = (direction == SHOWING_CONTROLS ? 1 : -1);
-  animation_stop_time_ =
-      animation_start_time_ +
-      base::TimeDelta::FromMilliseconds(kShowHideMaxDurationMs);
   animation_stop_value_ = animation_start_value_ + max_ending_ratio;
 
   animation_direction_ = direction;
diff --git a/cc/input/browser_controls_offset_manager.h b/cc/input/browser_controls_offset_manager.h
index ae4d9e4..f154eba 100644
--- a/cc/input/browser_controls_offset_manager.h
+++ b/cc/input/browser_controls_offset_manager.h
@@ -81,6 +81,9 @@
   // The client manages the lifecycle of this.
   BrowserControlsOffsetManagerClient* client_;
 
+  // animation_initialized_ tracks if we've initialized the start and end
+  // times since that must happen at a BeginFrame.
+  bool animation_initialized_;
   base::TimeTicks animation_start_time_;
   float animation_start_value_;
   base::TimeTicks animation_stop_time_;
diff --git a/cc/input/browser_controls_offset_manager_unittest.cc b/cc/input/browser_controls_offset_manager_unittest.cc
index 3caad9c..97a66f3d 100644
--- a/cc/input/browser_controls_offset_manager_unittest.cc
+++ b/cc/input/browser_controls_offset_manager_unittest.cc
@@ -167,7 +167,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -199,7 +204,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->BottomControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -229,7 +239,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -256,7 +271,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->BottomControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -283,7 +303,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -310,7 +335,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -341,7 +371,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -372,7 +407,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -435,7 +475,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   base::TimeTicks time = base::TimeTicks::Now();
-  float previous;
+
+  // First animate will establish the animaion.
+  float previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
@@ -456,6 +501,12 @@
   EXPECT_TRUE(manager->has_animation());
 
   time = base::TimeTicks::Now();
+
+  // First animate will establish the animaion.
+  previous = manager->TopControlsShownRatio();
+  manager->Animate(time);
+  EXPECT_EQ(manager->TopControlsShownRatio(), previous);
+
   while (manager->has_animation()) {
     previous = manager->TopControlsShownRatio();
     time = base::TimeDelta::FromMicroseconds(100) + time;
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index e8cd983..1837ed1 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -8,6 +8,7 @@
 
 #include "base/trace_event/trace_event.h"
 #include "cc/layers/heads_up_display_layer_impl.h"
+#include "cc/trees/layer_tree_host.h"
 
 namespace cc {
 
@@ -27,6 +28,32 @@
 
 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() = default;
 
+void HeadsUpDisplayLayer::UpdateLocationAndSize(
+    const gfx::Size& device_viewport,
+    float device_scale_factor) {
+  gfx::Size device_viewport_in_layout_pixels =
+      gfx::Size(device_viewport.width() / device_scale_factor,
+                device_viewport.height() / device_scale_factor);
+
+  gfx::Size bounds;
+  gfx::Transform matrix;
+  matrix.MakeIdentity();
+
+  if (layer_tree_host()->GetDebugState().ShowHudRects()) {
+    bounds = device_viewport_in_layout_pixels;
+  } else {
+    // If the HUD is not displaying full-viewport rects (e.g., it is showing the
+    // FPS meter), use a fixed size.
+    constexpr int kDefaultHUDSize = 256;
+    bounds.SetSize(kDefaultHUDSize, kDefaultHUDSize);
+    matrix.Translate(device_viewport_in_layout_pixels.width() - kDefaultHUDSize,
+                     0.0);
+  }
+
+  SetBounds(bounds);
+  SetTransform(matrix);
+}
+
 bool HeadsUpDisplayLayer::HasDrawableContent() const {
   return true;
 }
diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h
index ee3402e..2936a975 100644
--- a/cc/layers/heads_up_display_layer.h
+++ b/cc/layers/heads_up_display_layer.h
@@ -20,6 +20,9 @@
  public:
   static scoped_refptr<HeadsUpDisplayLayer> Create();
 
+  void UpdateLocationAndSize(const gfx::Size& device_viewport,
+                             float device_scale_factor);
+
   std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   // Layer overrides.
diff --git a/cc/layers/heads_up_display_unittest.cc b/cc/layers/heads_up_display_unittest.cc
index 840f82f8..6ebce87 100644
--- a/cc/layers/heads_up_display_unittest.cc
+++ b/cc/layers/heads_up_display_unittest.cc
@@ -82,5 +82,24 @@
 
 SINGLE_AND_MULTI_THREAD_TEST_F(HudWithRootLayerChange);
 
+class HeadsUpDisplaySizeWithFPS : public LayerTreeTest {
+ public:
+  void InitializeSettings(LayerTreeSettings* settings) override {
+    settings->initial_debug_state.show_fps_counter = true;
+  }
+
+  void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+
+  void DidCommit() override {
+    ASSERT_TRUE(layer_tree_host()->hud_layer());
+    EXPECT_EQ(gfx::Size(256, 256), layer_tree_host()->hud_layer()->bounds());
+    EndTest();
+  }
+
+  void AfterTest() override {}
+};
+
+SINGLE_AND_MULTI_THREAD_TEST_F(HeadsUpDisplaySizeWithFPS);
+
 }  // namespace
 }  // namespace cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index ecee592..f3724ab 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1412,14 +1412,10 @@
   if (show_hud_info) {
     if (!hud_layer_.get())
       hud_layer_ = HeadsUpDisplayLayer::Create();
-
-    gfx::Size device_viewport_in_layout_pixels =
-        gfx::Size(device_viewport_size_.width() / device_scale_factor_,
-                  device_viewport_size_.height() / device_scale_factor_);
-    hud_layer_->SetBounds(device_viewport_in_layout_pixels);
-
     if (root_layer_.get() && !hud_layer_->parent())
       root_layer_->AddChild(hud_layer_);
+    hud_layer_->UpdateLocationAndSize(device_viewport_size_,
+                                      device_scale_factor_);
   } else if (hud_layer_.get()) {
     hud_layer_->RemoveFromParent();
     hud_layer_ = nullptr;
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index d2cd6ed..68ea2c0 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -470,8 +470,8 @@
   void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll);
   gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; }
 
-  // Ensures a HUD layer exists if it is needed, and updates the layer bounds.
-  // If a HUD layer exists but is no longer needed, it is destroyed.
+  // Ensures a HUD layer exists if it is needed, and updates the HUD bounds and
+  // position. If a HUD layer exists but is no longer needed, it is destroyed.
   void UpdateHudLayer(bool show_hud_info);
   HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); }
 
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index cfff074..17799ae 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -6297,6 +6297,20 @@
   viz::BeginFrameArgs begin_frame_args =
       viz::CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, 0, 1);
 
+  // The first animation frame will not produce any delta, it will establish
+  // the animation.
+  {
+    begin_frame_args.frame_time = start_time;
+    begin_frame_args.sequence_number++;
+    host_impl_->WillBeginImplFrame(begin_frame_args);
+    host_impl_->Animate();
+    host_impl_->UpdateAnimationState(true);
+    host_impl_->DidFinishImplFrame();
+    float delta =
+        host_impl_->active_tree()->top_controls_shown_ratio()->Delta();
+    ASSERT_EQ(delta, 0);
+  }
+
   // Pump an animation frame to put some delta in the browser controls.
   {
     begin_frame_args.frame_time =
diff --git a/cc/trees/layer_tree_host_unittest_proxy.cc b/cc/trees/layer_tree_host_unittest_proxy.cc
index 9d207e79..51cc6a51 100644
--- a/cc/trees/layer_tree_host_unittest_proxy.cc
+++ b/cc/trees/layer_tree_host_unittest_proxy.cc
@@ -423,4 +423,86 @@
 
 MULTI_THREAD_TEST_F(LayerTreeHostProxyTestCommitWaitsForActivationMFBA);
 
+// Tests that SingleThreadProxy correctly reports pending animations when
+// requested from the impl-side.
+class LayerTreeHostProxyTestImplFrameCausesAnimatePending
+    : public LayerTreeHostProxyTest {
+ protected:
+  LayerTreeHostProxyTestImplFrameCausesAnimatePending() = default;
+
+  void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+
+  void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+    switch (host_impl->sync_tree()->source_frame_number()) {
+      case 0: {
+        EXPECT_FALSE(proxy()->RequestedAnimatePending());
+        host_impl->SetNeedsOneBeginImplFrame();
+        EXPECT_TRUE(proxy()->RequestedAnimatePending());
+        PostSetNeedsCommitToMainThread();
+        break;
+      }
+      case 1: {
+        EXPECT_FALSE(proxy()->RequestedAnimatePending());
+        EndTest();
+        break;
+      }
+      default: { NOTREACHED(); }
+    }
+  }
+
+  void AfterTest() override {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(LayerTreeHostProxyTestImplFrameCausesAnimatePending);
+};
+
+SINGLE_THREAD_TEST_F(LayerTreeHostProxyTestImplFrameCausesAnimatePending);
+
+// Test that the SingleThreadProxy correctly records and clears commit requests
+// from the impl-side.
+class LayerTreeHostProxyTestNeedsCommitFromImpl
+    : public LayerTreeHostProxyTest {
+ protected:
+  LayerTreeHostProxyTestNeedsCommitFromImpl() = default;
+
+  void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+
+  void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+    switch (host_impl->sync_tree()->source_frame_number()) {
+      case 0: {
+        host_impl->SetNeedsCommit();
+        MainThreadTaskRunner()->PostTask(
+            FROM_HERE,
+            base::BindOnce(&LayerTreeHostProxyTestNeedsCommitFromImpl::
+                               CheckCommitRequested,
+                           base::Unretained(this)));
+        break;
+      }
+      case 1: {
+        MainThreadTaskRunner()->PostTask(
+            FROM_HERE,
+            base::BindOnce(&LayerTreeHostProxyTestNeedsCommitFromImpl::
+                               CheckRequestClearedAndEnd,
+                           base::Unretained(this)));
+        break;
+      }
+      default: { NOTREACHED(); }
+    }
+  }
+
+  void CheckCommitRequested() { EXPECT_TRUE(proxy()->CommitRequested()); }
+
+  void CheckRequestClearedAndEnd() {
+    EXPECT_FALSE(proxy()->CommitRequested());
+    EndTest();
+  }
+
+  void AfterTest() override {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(LayerTreeHostProxyTestNeedsCommitFromImpl);
+};
+
+SINGLE_THREAD_TEST_F(LayerTreeHostProxyTestNeedsCommitFromImpl);
+
 }  // namespace cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 8e79bbb..549f3ed 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -50,6 +50,7 @@
       animate_requested_(false),
       commit_requested_(false),
       inside_synchronous_composite_(false),
+      needs_impl_frame_(false),
       layer_tree_frame_sink_creation_requested_(false),
       layer_tree_frame_sink_lost_(true),
       frame_sink_bound_weak_factory_(this),
@@ -258,7 +259,7 @@
 }
 
 bool SingleThreadProxy::RequestedAnimatePending() {
-  return animate_requested_ || commit_requested_;
+  return animate_requested_ || commit_requested_ || needs_impl_frame_;
 }
 
 void SingleThreadProxy::SetDeferCommits(bool defer_commits) {
@@ -346,6 +347,7 @@
   single_thread_client_->RequestScheduleComposite();
   if (scheduler_on_impl_thread_)
     scheduler_on_impl_thread_->SetNeedsOneBeginImplFrame();
+  needs_impl_frame_ = true;
 }
 
 void SingleThreadProxy::SetNeedsPrepareTilesOnImplThread() {
@@ -358,6 +360,7 @@
   single_thread_client_->RequestScheduleComposite();
   if (scheduler_on_impl_thread_)
     scheduler_on_impl_thread_->SetNeedsBeginMainFrame();
+  commit_requested_ = true;
 }
 
 void SingleThreadProxy::SetVideoNeedsBeginFrames(bool needs_begin_frames) {
@@ -528,6 +531,7 @@
     DCHECK(inside_impl_frame_);
 #endif
     animate_requested_ = false;
+    needs_impl_frame_ = false;
     // Prevent new commits from being requested inside DoBeginMainFrame.
     // Note: We do not want to prevent SetNeedsAnimate from requesting
     // a commit here.
@@ -713,6 +717,7 @@
   }
 
   commit_requested_ = false;
+  needs_impl_frame_ = false;
   animate_requested_ = false;
 
   if (defer_commits_) {
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 0ff0f79..648c860 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -178,6 +178,7 @@
   bool animate_requested_;
   bool commit_requested_;
   bool inside_synchronous_composite_;
+  bool needs_impl_frame_;
 
   // True if a request to the LayerTreeHostClient to create an output surface
   // is still outstanding.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index abbab26..e12b4a2d 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -640,10 +640,6 @@
       "//chrome/common:version_header",
     ]
 
-    if (is_chrome_branded) {
-      deps += [ ":chrome_helpers" ]
-    }
-
     if (enable_stripping) {
       # At link time, preserve the global symbols specified in the .exports
       # file. All other global symbols will be marked as private. The default
@@ -740,18 +736,6 @@
     ]
   }
 
-  if (is_chrome_branded) {
-    bundle_data("chrome_helpers") {
-      sources = [
-        "installer/mac/internal/keychain_reauthorizers/$chrome_mac_bundle_id",
-      ]
-
-      outputs = [
-        "{{bundle_contents_dir}}/Helpers/{{source_file_part}}",
-      ]
-    }
-  }
-
   bundle_data("chrome_versioned_bundle_data") {
     sources = [
       "$root_out_dir/$chrome_framework_name.framework",
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedLoggingBridge.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedLoggingBridge.java
index 35bd1f7b..76d304f 100644
--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedLoggingBridge.java
+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedLoggingBridge.java
@@ -111,8 +111,12 @@
      * @param visitTimeMs Time spent reading the page.
      */
     public void onContentTargetVisited(long visitTimeMs) {
-        assert mNativeFeedLoggingBridge != 0;
-        nativeOnContentTargetVisited(mNativeFeedLoggingBridge, visitTimeMs);
+        // We cannot assume that the |mNativeFeedLoggingBridge| is always available like other
+        // methods. This method is called by objects not controlled by Feed lifetimes, and destroy()
+        // may have already been called if Feed is disabled by policy.
+        if (mNativeFeedLoggingBridge != 0) {
+            nativeOnContentTargetVisited(mNativeFeedLoggingBridge, visitTimeMs);
+        }
     }
 
     /**
@@ -121,8 +125,12 @@
      * @param visitTimeMs Time spent reading the page.
      */
     public void onOfflinePageVisited(long visitTimeMs) {
-        assert mNativeFeedLoggingBridge != 0;
-        nativeOnOfflinePageVisited(mNativeFeedLoggingBridge, visitTimeMs);
+        // We cannot assume that the |mNativeFeedLoggingBridge| is always available like other
+        // methods. This method is called by objects not controlled by Feed lifetimes, and destroy()
+        // may have already been called if Feed is disabled by policy.
+        if (mNativeFeedLoggingBridge != 0) {
+            nativeOnOfflinePageVisited(mNativeFeedLoggingBridge, visitTimeMs);
+        }
     }
 
     private int feedActionToWindowOpenDisposition(@ActionType int actionType) {
diff --git a/chrome/android/java/res/layout/explore_sites_tile_view.xml b/chrome/android/java/res/layout/explore_sites_tile_view.xml
index f93d1160..44d3845 100644
--- a/chrome/android/java/res/layout/explore_sites_tile_view.xml
+++ b/chrome/android/java/res/layout/explore_sites_tile_view.xml
@@ -7,6 +7,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="@dimen/tile_view_width"
     android:layout_height="wrap_content"
+    android:layout_marginHorizontal="@dimen/explore_sites_site_tile_spacing"
     android:minHeight="@dimen/explore_sites_site_tile_min_height"
     android:paddingTop="@dimen/explore_sites_site_tile_padding" >
     <include
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito.xml b/chrome/android/java/res/layout/new_tab_page_incognito.xml
index 824a406..987598ee0 100644
--- a/chrome/android/java/res/layout/new_tab_page_incognito.xml
+++ b/chrome/android/java/res/layout/new_tab_page_incognito.xml
@@ -8,7 +8,10 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/ntp_content"
     android:layout_width="match_parent"
-    android:layout_height="match_parent" >
+    android:layout_height="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
+    android:contentDescription="@string/accessibility_new_incognito_tab_page" >
 
     <org.chromium.chrome.browser.ntp.NewTabPageScrollView
         android:id="@+id/ntp_scrollview"
@@ -17,10 +20,7 @@
         android:layout_height="match_parent"
         android:fadingEdgeLength="9dp"
         android:fillViewport="false"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:requiresFadingEdge="vertical"
-        android:contentDescription="@string/accessibility_new_incognito_tab_page" >
+        android:requiresFadingEdge="vertical" >
 
         <LinearLayout
             android:id="@+id/new_tab_incognito_container"
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito_md.xml b/chrome/android/java/res/layout/new_tab_page_incognito_md.xml
index 082254fb..ff3cc0de 100644
--- a/chrome/android/java/res/layout/new_tab_page_incognito_md.xml
+++ b/chrome/android/java/res/layout/new_tab_page_incognito_md.xml
@@ -8,7 +8,10 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/ntp_content"
     android:layout_width="match_parent"
-    android:layout_height="match_parent" >
+    android:layout_height="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
+    android:contentDescription="@string/accessibility_new_incognito_tab_page" >
 
     <org.chromium.chrome.browser.ntp.NewTabPageScrollView
         android:id="@+id/ntp_scrollview"
@@ -17,10 +20,7 @@
         android:layout_height="match_parent"
         android:fadingEdgeLength="9dp"
         android:fillViewport="false"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:requiresFadingEdge="vertical"
-        android:contentDescription="@string/accessibility_new_incognito_tab_page" >
+        android:requiresFadingEdge="vertical" >
 
         <LinearLayout
             android:id="@+id/new_tab_incognito_container"
@@ -44,7 +44,7 @@
                 android:text="@string/new_tab_otr_title"
                 android:textAppearance="@style/WhiteHeadline" />
 
-            <TextView
+            <org.chromium.ui.widget.TextViewWithClickableSpans
                 android:id="@+id/new_tab_incognito_subtitle"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -78,8 +78,6 @@
                 android:id="@+id/learn_more"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:clickable="true"
-                android:focusable="true"
                 android:text="@string/learn_more"
                 android:textAppearance="@style/TextAppearance.IncognitoNewTabLearnMoreLinkModern"
                 android:lineSpacingExtra="@dimen/md_incognito_ntp_line_spacing" />
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
index 0367dd9..36592a5 100644
--- a/chrome/android/java/res/values/dimens.xml
+++ b/chrome/android/java/res/values/dimens.xml
@@ -57,7 +57,7 @@
          via scrolling. -->
     <dimen name="menu_vertical_fade_distance">15dp</dimen>
     <dimen name="menu_badge_translation_y_distance">6dp</dimen>
-    <dimen name="menu_negative_vertical_offset_not_top_anchored">4dp</dimen>
+    <dimen name="menu_negative_vertical_offset_not_top_anchored">8dp</dimen>
 
     <!-- Menu button dragging related dimensions -->
     <dimen name="auto_scroll_full_velocity">500dp</dimen>
@@ -357,6 +357,7 @@
     <dimen name="explore_sites_page_padding">12dp</dimen>
     <dimen name="explore_sites_site_tile_min_height">88dp</dimen>
     <dimen name="explore_sites_site_tile_padding">16dp</dimen>
+    <dimen name="explore_sites_site_tile_spacing">6dp</dimen>
 
     <!-- Recent tabs page -->
     <dimen name="recent_tabs_visible_separator_padding">8dp</dimen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 759b425..b74518f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -1329,6 +1329,11 @@
             mActivityTabStartupMetricsTracker = null;
         }
 
+        if (mFullscreenManager != null) {
+            mFullscreenManager.destroy();
+            mFullscreenManager = null;
+        }
+
         AccessibilityManager manager = (AccessibilityManager)
                 getBaseContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
         manager.removeAccessibilityStateChangeListener(this);
@@ -1338,6 +1343,8 @@
 
         mActivityTabProvider.destroy();
 
+        mComponent = null;
+
         super.onDestroy();
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
index 2ac4f19..7b61bcc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
@@ -175,7 +175,6 @@
     // TODO(mdjones): Remove CHROME_HOME_SWIPE_VELOCITY_FEATURE or rename.
     public static final String CHROME_HOME_SWIPE_VELOCITY_FEATURE = "ChromeHomeSwipeLogicVelocity";
     public static final String CHROME_MEMEX = "ChromeMemex";
-    public static final String CHROME_MODERN_FULL_ROLL = "ChromeModernFullRoll";
     public static final String CHROME_SMART_SELECTION = "ChromeSmartSelection";
     public static final String CLEAR_OLD_BROWSING_DATA = "ClearOldBrowsingData";
     public static final String CLIPBOARD_CONTENT_SETTING = "ClipboardContentSetting";
@@ -212,6 +211,7 @@
     public static final String DOWNLOAD_HOME_V2 = "DownloadHomeV2";
     public static final String DOWNLOADS_FOREGROUND = "DownloadsForeground";
     public static final String DOWNLOADS_LOCATION_CHANGE = "DownloadsLocationChange";
+    public static final String EPHEMERAL_TAB = "EphemeralTab";
     public static final String EXPERIMENTAL_APP_BANNERS = "ExperimentalAppBanners";
     public static final String EXPERIMENTAL_UI = "ExperimentalUi";
     public static final String EXPLICIT_LANGUAGE_ASK = "ExplicitLanguageAsk";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
index 5e0c4a4..520fe68 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
@@ -224,10 +224,12 @@
     }
 
     @CalledByNative
-    private void onShowDetails(String title, String url, long msSinceEpoch, String description) {
+    private void onShowDetails(String title, String url, String description, int year, int month,
+            int day, int hour, int minute, int second) {
         Date date = null;
-        if (msSinceEpoch > 0) {
-            date = new Date(msSinceEpoch);
+        if (year > 0 && month > 0 && day > 0 && hour >= 0 && minute >= 0 && second >= 0) {
+            // Month in Java Date is 0-based, but the one we receive from the server is 1-based.
+            date = new Date(year, month - 1, day, hour, minute, second);
         }
 
         mUiDelegate.showDetails(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
index b4d1ce66..fc78d67f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
@@ -6,7 +6,8 @@
 
 import android.support.customtabs.CustomTabsService;
 
-import org.chromium.chrome.browser.fullscreen.BrowserStateBrowserControlsVisibilityDelegate;
+import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
+import org.chromium.chrome.browser.fullscreen.FullscreenManager;
 import org.chromium.chrome.browser.snackbar.SnackbarManager;
 import org.chromium.chrome.browser.tab.BrowserControlsVisibilityDelegate;
 import org.chromium.chrome.browser.tab.EmptyTabObserver;
@@ -34,6 +35,8 @@
 
     private boolean mInTrustedWebActivity = true;
 
+    private int mControlsHidingToken = FullscreenManager.INVALID_TOKEN;
+
     /**
      * A delegate for embedders to implement to inject information into this class. The reason for
      * using this instead of passing these dependencies into the constructor is because they may not
@@ -41,11 +44,10 @@
      */
     public interface TrustedWebActivityUiDelegate {
         /**
-         * Provides a {@link BrowserStateBrowserControlsVisibilityDelegate} that is used to
-         * temporarily force showing the browser controls when we leave a trusted origin.
+         * Provides a {@link ChromeFullscreenManager} that is used to control visibility of the
+         * toolbar.
          */
-        BrowserStateBrowserControlsVisibilityDelegate
-            getBrowserStateBrowserControlsVisibilityDelegate();
+        ChromeFullscreenManager getFullscreenManager();
 
         /**
          * Provides the package name of the client for verification.
@@ -156,6 +158,14 @@
         }, packageName, RELATIONSHIP).start(origin);
     }
 
+    public void onPostInflationStartup() {
+        // TODO(pshmakov): Move this over to LifecycleObserver or something similar once available.
+        if (mInTrustedWebActivity) {
+            // Hide Android controls as soon as they are inflated.
+            mControlsHidingToken = mDelegate.getFullscreenManager().hideAndroidControls();
+        }
+    }
+
     /** Notify (for metrics purposes) that the TWA has been resumed. */
     public void onResume() {
         // TODO(peconn): Move this over to LifecycleObserver or something similar once available.
@@ -176,17 +186,22 @@
 
         mInTrustedWebActivity = enabled;
 
+        ChromeFullscreenManager fullscreenManager = mDelegate.getFullscreenManager();
+
         if (enabled) {
+            mControlsHidingToken =
+                    fullscreenManager.hideAndroidControlsAndClearOldToken(mControlsHidingToken);
             mDisclosure.showSnackbarIfNeeded(mDelegate.getSnackbarManager(),
                     mDelegate.getClientPackageName());
 
         } else {
+            fullscreenManager.releaseAndroidControlsHidingToken(mControlsHidingToken);
             // Force showing the controls for a bit when leaving Trusted Web Activity mode.
-            mDelegate.getBrowserStateBrowserControlsVisibilityDelegate().showControlsTransient();
+            fullscreenManager.getBrowserVisibilityDelegate().showControlsTransient();
             mDisclosure.dismissSnackbarIfNeeded(mDelegate.getSnackbarManager());
         }
 
-        // Reflect the browser controls update in the Tab.
+        // Apply the change in the BrowserControlsVisibilityDelegate
         tab.updateFullscreenEnabledState();
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
index a0b62be..6486adc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
@@ -842,7 +842,7 @@
     }
 
     /**
-     * @return Whether or not the layout should permenantly show the browser controls.
+     * @return Whether or not the layout should permanently show the browser controls.
      */
     public boolean forceShowBrowserControlsAndroidView() {
         return false;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java
index ab1727d..f0ddcc1b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java
@@ -103,7 +103,8 @@
 
     // Internal State
     private final SparseArray<LayoutTab> mTabCache = new SparseArray<>();
-    private int mFullscreenToken = FullscreenManager.INVALID_TOKEN;
+    private int mControlsShowingToken = FullscreenManager.INVALID_TOKEN;
+    private int mControlsHidingToken = FullscreenManager.INVALID_TOKEN;
     private boolean mUpdateRequested;
     private final ContextualSearchPanel mContextualSearchPanel;
     private final OverlayPanelManager mOverlayPanelManager;
@@ -468,18 +469,25 @@
     public SceneLayer getUpdatedActiveSceneLayer(LayerTitleCache layerTitleCache,
             TabContentManager tabContentManager, ResourceManager resourceManager,
             ChromeFullscreenManager fullscreenManager) {
-        // Update the android browser controls state.
-        if (fullscreenManager != null) {
-            fullscreenManager.setHideBrowserControlsAndroidView(
-                    mActiveLayout.forceHideBrowserControlsAndroidView());
-        }
-
+        updateControlsHidingState(fullscreenManager);
         getViewportPixel(mCachedVisibleViewport);
         mHost.getWindowViewport(mCachedWindowViewport);
         return mActiveLayout.getUpdatedSceneLayer(mCachedWindowViewport, mCachedVisibleViewport,
                 layerTitleCache, tabContentManager, resourceManager, fullscreenManager);
     }
 
+    private void updateControlsHidingState(ChromeFullscreenManager fullscreenManager) {
+        if (fullscreenManager == null) {
+            return;
+        }
+        if (mActiveLayout.forceHideBrowserControlsAndroidView()) {
+            mControlsHidingToken =
+                    fullscreenManager.hideAndroidControlsAndClearOldToken(mControlsHidingToken);
+        } else {
+            fullscreenManager.releaseAndroidControlsHidingToken(mControlsHidingToken);
+        }
+    }
+
     @Override
     public void releaseOverlayPanelContent() {
         if (getTabModelSelector() == null) return;
@@ -775,13 +783,12 @@
             mPreviousLayoutShowingToolbar = !fullscreenManager.areBrowserControlsOffScreen();
 
             // Release any old fullscreen token we were holding.
-            fullscreenManager.getBrowserVisibilityDelegate().hideControlsPersistent(
-                    mFullscreenToken);
-            mFullscreenToken = FullscreenManager.INVALID_TOKEN;
+            fullscreenManager.getBrowserVisibilityDelegate().releasePersistentShowingToken(
+                    mControlsShowingToken);
 
             // Grab a new fullscreen token if this layout can't be in fullscreen.
             if (getActiveLayout().forceShowBrowserControlsAndroidView()) {
-                mFullscreenToken =
+                mControlsShowingToken =
                         fullscreenManager.getBrowserVisibilityDelegate().showControlsPersistent();
             }
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java
index ced8b66..44ac8f1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java
@@ -515,9 +515,8 @@
         }
         mHelpBubble.addOnDismissListener(() -> {
             tracker.dismissed(FeatureConstants.CONTEXTUAL_SUGGESTIONS_FEATURE);
-            mFullscreenManager.getBrowserVisibilityDelegate().hideControlsPersistent(
+            mFullscreenManager.getBrowserVisibilityDelegate().releasePersistentShowingToken(
                     mFullscreenToken);
-            mFullscreenToken = FullscreenManager.INVALID_TOKEN;
             mHelpBubble = null;
         });
         mFullscreenToken =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionRecorder.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionRecorder.java
index 58349dc..731b5409 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionRecorder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionRecorder.java
@@ -72,6 +72,9 @@
         int QUICK_ACTION_IMPRESSIONS_COUNT = 29;
         int QUICK_ACTIONS_TAKEN_COUNT = 30;
         int QUICK_ACTIONS_IGNORED_COUNT = 31;
+        // UKM CS v5 features (see go/ukm-cs-5, go/ukm-dev-data).
+        int OUTCOME_DOC_ID = 32;
+        int OUTCOME_SNIPPET_HASH = 33;
     }
 
     /**
@@ -134,4 +137,15 @@
      * additional {@link #logFeature} or {@link #logOutcome} calls.
      */
     void writeLogAndReset();
+
+    /**
+     * Records data about the user-viewed document and the associated document in the Search Index
+     * obtained from the server.  This data is for development purposes only, and may contain
+     * encrypted PII.
+     * TODO(donnd): remove before the next release.  See https://crbug.com/894568 for details.
+     *
+     * @param docId The canonical doc ID for this document when located in the Search Index, or 0.
+     * @param snippetHash The hash of a section of text near the word that the user tapped, or 0.
+     */
+    void recordSnippetData(long docId, long snippetHash);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
index e8ac7ba..0415aad3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
@@ -679,17 +679,21 @@
      * @param caption The caption to display.
      * @param quickActionUri The URI for the intent associated with the quick action.
      * @param quickActionCategory The {@link QuickActionCategory} for the quick action.
+     * @param docId The ID of the document identified by the server, or 0 for not known.
+     * @param snippetHash The hash of a snippet from the surrounding text, as identified by the
+     *        server, or 0 for not known.
      */
     @CalledByNative
     public void onSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
             final String searchTerm, final String displayText, final String alternateTerm,
             final String mid, boolean doPreventPreload, int selectionStartAdjust,
             int selectionEndAdjust, final String contextLanguage, final String thumbnailUrl,
-            final String caption, final String quickActionUri, final int quickActionCategory) {
+            final String caption, final String quickActionUri, final int quickActionCategory,
+            final long docId, final long snippetHash) {
         mNetworkCommunicator.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode,
                 searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust,
                 selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri,
-                quickActionCategory);
+                quickActionCategory, docId, snippetHash);
     }
 
     @Override
@@ -697,7 +701,7 @@
             String searchTerm, String displayText, String alternateTerm, String mid,
             boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
             String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
-            int quickActionCategory) {
+            int quickActionCategory, long docId, long snippetHash) {
         if (!mInternalStateController.isStillWorkingOn(InternalState.RESOLVING)) return;
 
         // Show an appropriate message for what to search for.
@@ -789,6 +793,10 @@
             }
         }
 
+        // Tell the interaction recorder about the docId and snippetHash, so we can correlate the
+        // signals and outcomes with this crawled document (when available).
+        mTapSuppressionInteractionRecorder.recordSnippetData(docId, snippetHash);
+
         mInternalStateController.notifyFinishedWorkOn(InternalState.RESOLVING);
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
index 14e6b45e..5fca4e4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java
@@ -4,11 +4,10 @@
 
 package org.chromium.chrome.browser.contextualsearch;
 
+import android.support.annotation.Nullable;
+
 import java.net.URL;
 
-import javax.annotation.Nullable;
-
-
 /**
  * An interface for network communication between the Contextual Search client and server.
  */
@@ -40,12 +39,15 @@
      * @param caption The caption to display.
      * @param quickActionUri The URI for the intent associated with the quick action.
      * @param quickActionCategory The {@link QuickActionCategory} for the quick action.
+     * @param docId The ID of the document identified by the server, or 0 for not known.
+     * @param snippetHash The hash of a snippet from the surrounding text, as identified by the
+     *        server, or 0 for not known.
      */
     void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
             String searchTerm, String displayText, String alternateTerm, String mid,
             boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
-            String contextLanguage, String thumbnailUrl, String caption,
-            String quickActionUri, int quickActionCategory);
+            String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
+            int quickActionCategory, long docId, long snippetHash);
 
     /**
      * @return Whether the device is currently online.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java
index 0fa08fa..d71dd05 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java
@@ -6,8 +6,10 @@
 
 import android.support.annotation.Nullable;
 
+import org.chromium.base.CommandLine;
 import org.chromium.base.Log;
 import org.chromium.base.VisibleForTesting;
+import org.chromium.chrome.browser.ChromeVersionInfo;
 import org.chromium.content_public.browser.WebContents;
 
 import java.util.Collections;
@@ -20,6 +22,13 @@
 public class ContextualSearchRankerLoggerImpl implements ContextualSearchInteractionRecorder {
     private static final String TAG = "ContextualSearch";
 
+    @VisibleForTesting
+    static final String UKM_DEV_DATA_TTS_ENABLE = "ukm-dev-data-tts-enable";
+    // These names are appended to the ones in the maps below.
+    // TODO(donnd): remove before the next release.  See https://crbug.com/894568 for details.
+    private static final String LOW_BITS = "LowBits";
+    private static final String HIGH_BITS = "HighBits";
+
     // Names for all our features and labels.
     // Integer values should contain @Feature values only.
     private static final Map<Integer, String> ALL_NAMES;
@@ -37,6 +46,9 @@
         outcomes.put(Feature.OUTCOME_WAS_QUICK_ANSWER_SEEN, "OutcomeWasQuickAnswerSeen");
         // UKM CS v2 outcomes.
         outcomes.put(Feature.OUTCOME_WAS_CARDS_DATA_SHOWN, "OutcomeWasCardsDataShown");
+        // UKM CS v5 features are technically outcomes, since they are logged after inference.
+        outcomes.put(Feature.OUTCOME_DOC_ID, "OutcomeDocId");
+        outcomes.put(Feature.OUTCOME_SNIPPET_HASH, "OutcomeSnippetHash");
         OUTCOMES = Collections.unmodifiableMap(outcomes);
 
         // NOTE: this list needs to be kept in sync with the white list in
@@ -108,6 +120,12 @@
     private Map<Integer, Object> mFeaturesLoggedForTesting;
     private Map<Integer, Object> mOutcomesLoggedForTesting;
 
+    // Development-only data for this release.  Records encoded data from the server about the text
+    // tapped, which may contain PII, and the search index document ID.
+    // TODO(donnd): remove before the next release.  See https://crbug.com/894568 for details.
+    private long mDocId;
+    private long mSnippetHash;
+
     /**
      * Constructs a Ranker Logger and associated native implementation to write Contextual Search
      * ML data to Ranker.
@@ -194,6 +212,8 @@
         mFeaturesToLog = null;
         mBasePageWebContents = null;
         mAssistRankerPrediction = AssistRankerPrediction.UNDETERMINED;
+        mDocId = 0;
+        mSnippetHash = 0;
     }
 
     @Override
@@ -203,6 +223,7 @@
                     && !mFeaturesToLog.isEmpty()) {
                 assert mIsLoggingReadyForPage;
                 assert mHasInferenceOccurred;
+                logDevelopmentOutcomes();
                 // Only the outcomes will be present, since we logged inference features at
                 // inference time.
                 for (Map.Entry<Integer, Object> entry : mFeaturesToLog.entrySet()) {
@@ -216,6 +237,34 @@
         reset();
     }
 
+    @Override
+    public void recordSnippetData(long docId, long snippetHash) {
+        if (!canRecordSensitiveDataToUkm()) return;
+
+        mDocId = docId;
+        mSnippetHash = snippetHash;
+    }
+
+    /**
+     * @return Whether we can record sensitive data to UKM on this channel due to an enabled
+     *         command-line-flag.
+     */
+    private boolean canRecordSensitiveDataToUkm() {
+        if (!CommandLine.getInstance().hasSwitch(UKM_DEV_DATA_TTS_ENABLE)) return false;
+
+        if (ChromeVersionInfo.isBetaBuild() || ChromeVersionInfo.isStableBuild()) return false;
+
+        return true;
+    }
+
+    /** Writes our development-only outcome data. */
+    private void logDevelopmentOutcomes() {
+        if (!canRecordSensitiveDataToUkm() || mDocId == 0 || mSnippetHash == 0) return;
+
+        logInternal(Feature.OUTCOME_DOC_ID, mDocId);
+        logInternal(Feature.OUTCOME_SNIPPET_HASH, mSnippetHash);
+    }
+
     /**
      * Logs the given feature/value to the internal map that accumulates an entire record (which can
      * be logged by calling writeLogAndReset).
@@ -242,9 +291,9 @@
         if (value instanceof Boolean) {
             logToNative(feature, ((boolean) value ? 1 : 0));
         } else if (value instanceof Integer) {
-            logToNative(feature, Long.valueOf((int) value));
+            logToNative(feature, (int) value);
         } else if (value instanceof Long) {
-            logToNative(feature, (long) value);
+            logLong(feature, (long) value);
         } else if (value instanceof Character) {
             logToNative(feature, Character.getNumericValue((char) value));
         } else {
@@ -259,10 +308,34 @@
      * @param feature The feature to log.
      * @param value The value to log.
      */
-    private void logToNative(@Feature int feature, long value) {
+    private void logToNative(@Feature int feature, int value) {
         String featureName = getFeatureName(feature);
         assert featureName != null : "No Name for feature " + feature;
-        nativeLogLong(mNativePointer, featureName, value);
+        nativeLogInt32(mNativePointer, featureName, value);
+    }
+
+    /**
+     * Logs a {@code Long} value as two separate int32 values, appending to the name to indicate
+     * whether the logged value is the high bits or the low bits.
+     *
+     * @param feature The {@code Feature} to log.  We'll mangle it's name when logging.
+     * @param longValue The {@code Long} value to break up into two ints.
+     */
+    private void logLong(@Feature int feature, long longValue) {
+        String featureName = getFeatureName(feature);
+        nativeLogInt32(mNativePointer, featureName + HIGH_BITS, getHighBits(longValue));
+        nativeLogInt32(mNativePointer, featureName + LOW_BITS, getLowBits(longValue));
+    }
+
+    /** @return the high bits of the given long value as an int32. */
+    private int getHighBits(long longValue) {
+        return (int) (longValue >> 32);
+    }
+
+    /** @return the low bits of the given long value as an int32. */
+    private int getLowBits(long longValue) {
+        // Bitwise AND with the max integer just gets us whatever fits in that int.
+        return (int) longValue & Integer.MAX_VALUE;
     }
 
     /**
@@ -299,8 +372,8 @@
     // ============================================================================================
     private native long nativeInit();
     private native void nativeDestroy(long nativeContextualSearchRankerLoggerImpl);
-    private native void nativeLogLong(
-            long nativeContextualSearchRankerLoggerImpl, String featureString, long value);
+    private native void nativeLogInt32(
+            long nativeContextualSearchRankerLoggerImpl, String featureString, int value);
     private native void nativeSetupLoggingAndRanker(
             long nativeContextualSearchRankerLoggerImpl, WebContents basePageWebContents);
     // Returns an AssistRankerPrediction integer value.
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 9de3cae..681b9aaf 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
@@ -79,7 +79,7 @@
 import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
 import org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl;
 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor;
-import org.chromium.chrome.browser.fullscreen.BrowserStateBrowserControlsVisibilityDelegate;
+import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
 import org.chromium.chrome.browser.fullscreen.ComposedBrowserControlsVisibilityDelegate;
 import org.chromium.chrome.browser.gsa.GSAState;
 import org.chromium.chrome.browser.incognito.IncognitoTabHost;
@@ -313,9 +313,8 @@
         return new TrustedWebActivityUi(
                 new TrustedWebActivityUi.TrustedWebActivityUiDelegate() {
                     @Override
-                    public BrowserStateBrowserControlsVisibilityDelegate
-                    getBrowserStateBrowserControlsVisibilityDelegate() {
-                        return getFullscreenManager().getBrowserVisibilityDelegate();
+                    public ChromeFullscreenManager getFullscreenManager() {
+                        return CustomTabActivity.this.getFullscreenManager();
                     }
 
                     @Override
@@ -486,6 +485,10 @@
                 getFullscreenManager());
         mBottomBarDelegate.showBottomBarIfNecessary();
         mTopBarDelegate = new CustomTabTopBarDelegate(this);
+
+        if (mTrustedWebActivityUi != null) {
+            mTrustedWebActivityUi.onPostInflationStartup();
+        }
     }
 
     @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegate.java
index 7039bc9..70b9d1c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegate.java
@@ -5,15 +5,11 @@
 package org.chromium.chrome.browser.fullscreen;
 
 import android.os.Handler;
-import android.os.Message;
 import android.os.SystemClock;
 
+import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.browser.tab.BrowserControlsVisibilityDelegate;
 
-import java.lang.ref.WeakReference;
-import java.util.HashSet;
-import java.util.Set;
-
 /**
  * Determines the desired visibility of the browser controls based on the current state of the
  * running activity.
@@ -21,40 +17,17 @@
 public class BrowserStateBrowserControlsVisibilityDelegate
         implements BrowserControlsVisibilityDelegate {
 
-    private static final int TRANSIENT_SHOW_MSG_ID = 1;
     /** Minimum duration (in milliseconds) that the controls are shown when requested. */
-    protected static final long MINIMUM_SHOW_DURATION_MS = 3000;
+    @VisibleForTesting
+    static final long MINIMUM_SHOW_DURATION_MS = 3000;
 
     private static boolean sDisableOverridesForTesting;
 
-    private final Set<Integer> mPersistentControlTokens = new HashSet<Integer>();
-    private final Handler mHandler;
-    private final Runnable mStateChangedCallback;
+    private final TokenHolder mTokenHolder;
 
-    private long mCurrentShowTime;
-    private int mPersistentControlsCurrentToken;
+    private final Handler mHandler = new Handler();
 
-    // This static inner class holds a WeakReference to the outer object, to avoid triggering the
-    // lint HandlerLeak warning.
-    private static class VisibilityDelegateHandler extends Handler {
-        private final WeakReference<BrowserStateBrowserControlsVisibilityDelegate> mDelegateRef;
-
-        public VisibilityDelegateHandler(BrowserStateBrowserControlsVisibilityDelegate delegate) {
-            mDelegateRef = new WeakReference<>(delegate);
-        }
-
-        @Override
-        public void handleMessage(Message msg) {
-            if (msg == null) return;
-            BrowserStateBrowserControlsVisibilityDelegate delegate = mDelegateRef.get();
-            if (delegate == null) return;
-            if (msg.what != TRANSIENT_SHOW_MSG_ID) {
-                assert false;
-                return;
-            }
-            delegate.releaseToken(msg.arg1);
-        }
-    }
+    private long mCurrentShowingStartTime;
 
     /**
      * Constructs a BrowserControlsVisibilityDelegate designed to deal with overrides driven by
@@ -64,41 +37,25 @@
      *                             updated based on the state of the browser visibility override.
      */
     public BrowserStateBrowserControlsVisibilityDelegate(Runnable stateChangedCallback) {
-        mHandler = new VisibilityDelegateHandler(this);
-        mStateChangedCallback = stateChangedCallback;
+        mTokenHolder = new TokenHolder(stateChangedCallback);
     }
 
     private void ensureControlsVisibleForMinDuration() {
-        if (mHandler.hasMessages(TRANSIENT_SHOW_MSG_ID)) return;
+        if (mHandler.hasMessages(0)) return; // Messages sent via post/postDelayed have what=0
 
-        long timeDelta = SystemClock.uptimeMillis() - mCurrentShowTime;
-        if (timeDelta >= MINIMUM_SHOW_DURATION_MS) return;
+        long currentShowingTime = SystemClock.uptimeMillis() - mCurrentShowingStartTime;
+        if (currentShowingTime >= MINIMUM_SHOW_DURATION_MS) return;
 
-        Message msg = mHandler.obtainMessage(TRANSIENT_SHOW_MSG_ID);
-        msg.arg1 = generateToken();
-        mHandler.sendMessageDelayed(msg, Math.max(MINIMUM_SHOW_DURATION_MS - timeDelta, 0));
-    }
-
-    private int generateToken() {
-        int token = mPersistentControlsCurrentToken++;
-        mPersistentControlTokens.add(token);
-        if (mPersistentControlTokens.size() == 1) mStateChangedCallback.run();
-        return token;
-    }
-
-    private void releaseToken(int token) {
-        if (mPersistentControlTokens.remove(token)
-                && mPersistentControlTokens.isEmpty()) {
-            mStateChangedCallback.run();
-        }
+        final int temporaryToken = mTokenHolder.acquireToken();
+        mHandler.postDelayed(() -> mTokenHolder.releaseToken(temporaryToken),
+                MINIMUM_SHOW_DURATION_MS - currentShowingTime);
     }
 
     /**
      * Trigger a temporary showing of the browser controls.
      */
     public void showControlsTransient() {
-        if (mPersistentControlTokens.isEmpty()) mCurrentShowTime = SystemClock.uptimeMillis();
-
+        if (!mTokenHolder.hasTokens()) mCurrentShowingStartTime = SystemClock.uptimeMillis();
         ensureControlsVisibleForMinDuration();
     }
 
@@ -107,11 +64,11 @@
      *
      * @return The token that determines whether the requester still needs persistent controls to
      *         be present on the screen.
-     * @see #hideControlsPersistent(int)
+     * @see #releasePersistentShowingToken(int)
      */
     public int showControlsPersistent() {
-        if (mPersistentControlTokens.isEmpty()) mCurrentShowTime = SystemClock.uptimeMillis();
-        return generateToken();
+        if (!mTokenHolder.hasTokens()) mCurrentShowingStartTime = SystemClock.uptimeMillis();
+        return mTokenHolder.acquireToken();
     }
 
     /**
@@ -123,7 +80,7 @@
      */
     public int showControlsPersistentAndClearOldToken(int oldToken) {
         int newToken = showControlsPersistent();
-        if (oldToken != FullscreenManager.INVALID_TOKEN) releaseToken(oldToken);
+        mTokenHolder.releaseToken(oldToken);
         return newToken;
     }
 
@@ -132,12 +89,11 @@
      *
      * @param token The fullscreen token returned from {@link #showControlsPersistent()}.
      */
-    public void hideControlsPersistent(int token) {
-        if (mPersistentControlTokens.isEmpty()) return;
-        if (mPersistentControlTokens.size() == 1 && mPersistentControlTokens.contains(token)) {
+    public void releasePersistentShowingToken(int token) {
+        if (mTokenHolder.containsOnly(token)) {
             ensureControlsVisibleForMinDuration();
         }
-        releaseToken(token);
+        mTokenHolder.releaseToken(token);
     }
 
     @Override
@@ -147,7 +103,7 @@
 
     @Override
     public boolean canAutoHideBrowserControls() {
-        return sDisableOverridesForTesting || mPersistentControlTokens.isEmpty();
+        return sDisableOverridesForTesting || !mTokenHolder.hasTokens();
     }
 
     /**
@@ -156,4 +112,11 @@
     public static void disableForTesting() {
         sDisableOverridesForTesting = true;
     }
+
+    /**
+     * Performs clean-up.
+     */
+    public void destroy() {
+        mHandler.removeCallbacksAndMessages(null);
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
index 4afbd81..7fd88d8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
@@ -22,6 +22,7 @@
 import org.chromium.base.TraceEvent;
 import org.chromium.base.library_loader.LibraryLoader;
 import org.chromium.chrome.browser.fullscreen.FullscreenHtmlApiHandler.FullscreenHtmlApiDelegate;
+import org.chromium.chrome.browser.tab.BrowserControlsVisibilityDelegate;
 import org.chromium.chrome.browser.tab.Tab;
 import org.chromium.chrome.browser.tab.TabBrowserControlsOffsetHelper;
 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
@@ -50,6 +51,7 @@
     private final BrowserStateBrowserControlsVisibilityDelegate mBrowserVisibilityDelegate;
     @ControlsPosition private final int mControlsPosition;
     private final boolean mExitFullscreenOnStop;
+    private final TokenHolder mHidingTokenHolder = new TokenHolder(this::scheduleVisibilityUpdate);
 
     private ControlContainer mControlContainer;
     private int mTopControlContainerHeight;
@@ -69,8 +71,6 @@
     private boolean mInGesture;
     private boolean mContentViewScrolling;
 
-    private boolean mBrowserControlsAndroidViewHidden;
-
     private final ArrayList<FullscreenListener> mListeners = new ArrayList<>();
 
     @IntDef({ControlsPosition.TOP, ControlsPosition.NONE})
@@ -539,18 +539,32 @@
     }
 
     /**
-     * @param hide Whether or not to force the browser controls Android view to hide.  If this is
-     *             {@code false} the browser controls Android view will show/hide based on position,
-     *             if it is {@code true} the browser controls Android view will always be hidden.
+     * Forces the Android controls to hide. While there are acquired tokens the browser controls
+     * Android view will always be hidden, otherwise they will show/hide based on position.
+     *
+     * NB: this only affects the Android controls. For controlling composited toolbar visibility,
+     * implement {@link BrowserControlsVisibilityDelegate#canShowBrowserControls()}.
      */
-    public void setHideBrowserControlsAndroidView(boolean hide) {
-        if (mBrowserControlsAndroidViewHidden == hide) return;
-        mBrowserControlsAndroidViewHidden = hide;
-        scheduleVisibilityUpdate();
+    public int hideAndroidControls() {
+        return mHidingTokenHolder.acquireToken();
+    }
+
+    /** Similar to {@link #hideAndroidControls}, but also replaces an old token */
+    public int hideAndroidControlsAndClearOldToken(int oldToken) {
+        int newToken = hideAndroidControls();
+        mHidingTokenHolder.releaseToken(oldToken);
+        return newToken;
+    }
+
+    /** Release a hiding token. */
+    public void releaseAndroidControlsHidingToken(int token) {
+        mHidingTokenHolder.releaseToken(token);
     }
 
     private boolean shouldShowAndroidControls() {
-        if (mBrowserControlsAndroidViewHidden) return false;
+        if (mHidingTokenHolder.hasTokens()) {
+            return false;
+        }
         if (getTab() != null
                 && TabBrowserControlsOffsetHelper.from(getTab()).isControlsOffsetOverridden()) {
             return true;
@@ -673,4 +687,10 @@
         mContentViewScrolling = scrolling;
         if (!scrolling) updateVisuals();
     }
+
+    @Override
+    public void destroy() {
+        super.destroy();
+        mBrowserVisibilityDelegate.destroy();
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java
index de73edf..93aafc9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java
@@ -188,4 +188,9 @@
      * Called when scrolling state of the ContentView changed.
      */
     public void onContentViewScrollingStateChanged(boolean scrolling) {}
+
+    /**
+     * Destroys the FullscreenManager
+     */
+    public void destroy() {}
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/TokenHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/TokenHolder.java
new file mode 100644
index 0000000..d07674c
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/TokenHolder.java
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.fullscreen;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Helper class for holding tokens, useful when multiple entities need to manipulate the same
+ * boolean state, e.g. visibility of a view.
+ */
+class TokenHolder {
+    private int mNextToken;
+
+    private final Set<Integer> mAcquiredTokens = new HashSet<>();
+    private final Runnable mCallback;
+
+    /**
+     * @param callback is run when the token set becomes empty or non-empty.
+     */
+    TokenHolder(Runnable callback) {
+        mCallback = callback;
+    }
+
+    int acquireToken() {
+        int token = mNextToken++;
+        mAcquiredTokens.add(token);
+        if (mAcquiredTokens.size() == 1) mCallback.run();
+        return token;
+    }
+
+    void releaseToken(int token) {
+        if (mAcquiredTokens.remove(token) && mAcquiredTokens.isEmpty()) {
+            mCallback.run();
+        }
+    }
+
+    boolean hasTokens() {
+        return !mAcquiredTokens.isEmpty();
+    }
+
+    boolean containsOnly(int token) {
+        return mAcquiredTokens.size() == 1 && mAcquiredTokens.contains(token);
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
index dff6104..e0b07ea 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
@@ -319,10 +319,6 @@
     public Map<String, String> toFeedbackMap() {
         Map<String, String> map = new HashMap<>();
         map.put(DATA_REDUCTION_PROXY_ENABLED_KEY, String.valueOf(isDataReductionProxyEnabled()));
-        map.put("Data Reduction Proxy HTTP Proxies",
-                nativeGetHttpProxyList(mNativeDataReductionProxySettings));
-        map.put("Data Reduction Proxy Last Bypass",
-                nativeGetLastBypassEvent(mNativeDataReductionProxySettings));
         return map;
     }
 
@@ -397,8 +393,6 @@
             long nativeDataReductionProxySettingsAndroid);
     private native String nativeMaybeRewriteWebliteUrl(
             long nativeDataReductionProxySettingsAndroid, String url);
-    private native String nativeGetHttpProxyList(long nativeDataReductionProxySettingsAndroid);
-    private native String nativeGetLastBypassEvent(long nativeDataReductionProxySettingsAndroid);
     private native void nativeQueryDataUsage(long nativeDataReductionProxySettingsAndroid,
             List<DataReductionDataUseItem> items, int numDays);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
index 0c951fd..71f5231 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java
@@ -508,7 +508,7 @@
         }
         if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M
                 && (Build.MANUFACTURER.equalsIgnoreCase("samsung")
-                           || Build.MANUFACTURER.equalsIgnoreCase("yulong"))) {
+                || Build.MANUFACTURER.equalsIgnoreCase("yulong"))) {
             // Updating a notification with a bitmap status bar icon leads to a crash on Samsung
             // and Coolpad (Yulong) devices on Marshmallow, see https://crbug.com/829367.
             return false;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java
index e41f1a6..9fd1a791 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java
@@ -54,7 +54,7 @@
         mScrollView = (NewTabPageScrollView) findViewById(R.id.ntp_scrollview);
         mScrollView.setBackgroundColor(
                 ApiCompatibilityUtils.getColor(getResources(), R.color.ntp_bg_incognito));
-        mScrollView.setContentDescription(getResources().getText(
+        setContentDescription(getResources().getText(
                 ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_STRINGS)
                         ? R.string.accessibility_new_private_tab_page
                         : R.string.accessibility_new_incognito_tab_page));
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageViewMD.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageViewMD.java
index 325d6ace..e3675df 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageViewMD.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageViewMD.java
@@ -239,7 +239,6 @@
                 mContext.getResources().getString(R.string.new_tab_otr_subtitle);
         boolean learnMoreInSubtitle = mWidthDp > WIDE_LAYOUT_THRESHOLD_DP;
 
-        mSubtitle.setClickable(learnMoreInSubtitle);
         mLearnMore.setVisibility(learnMoreInSubtitle ? View.GONE : View.VISIBLE);
 
         if (!learnMoreInSubtitle) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/page_info/PageInfoController.java b/chrome/android/java/src/org/chromium/chrome/browser/page_info/PageInfoController.java
index 1ca73d2..ef410a3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/page_info/PageInfoController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/page_info/PageInfoController.java
@@ -56,6 +56,7 @@
 import org.chromium.components.url_formatter.UrlFormatter;
 import org.chromium.content_public.browser.WebContents;
 import org.chromium.content_public.browser.WebContentsObserver;
+import org.chromium.net.GURLUtils;
 import org.chromium.ui.base.DeviceFormFactor;
 import org.chromium.ui.base.WindowAndroid;
 import org.chromium.ui.text.NoUnderlineClickableSpan;
@@ -119,9 +120,8 @@
     // URL'.
     private String mFullUrl;
 
-    // A parsed version of mFullUrl. Is null if the URL is invalid/cannot be
-    // parsed.
-    private URI mParsedUrl;
+    // The scheme of the URL of this page.
+    private String mScheme;
 
     // Whether or not this page is an internal chrome page (e.g. the
     // chrome://settings page).
@@ -198,12 +198,11 @@
         // This can happen if an invalid chrome-distiller:// url was entered.
         if (mFullUrl == null) mFullUrl = "";
 
+        mScheme = GURLUtils.getScheme(mFullUrl);
         try {
-            mParsedUrl = new URI(mFullUrl);
-            mIsInternalPage = UrlUtilities.isInternalScheme(mParsedUrl);
+            mIsInternalPage = UrlUtilities.isInternalScheme(new URI(mFullUrl));
         } catch (URISyntaxException e) {
-            mParsedUrl = null;
-            mIsInternalPage = false;
+            // Ignore exception since this is for displaying some specific content on page info.
         }
 
         String displayUrl = UrlFormatter.formatUrlForCopy(mFullUrl);
@@ -227,7 +226,7 @@
         viewParams.urlOriginLength = OmniboxUrlEmphasizer.getOriginEndIndex(
                 displayUrlBuilder.toString(), mTab.getProfile());
 
-        if (shouldShowSiteSettingsButton(mParsedUrl)) {
+        if (shouldShowSiteSettingsButton()) {
             viewParams.siteSettingsButtonClickCallback = () -> {
                 // Delay while the dialog closes.
                 runAfterDismiss(() -> {
@@ -365,8 +364,7 @@
      */
     private boolean isConnectionDetailsLinkVisible() {
         return mContentPublisher == null && !isShowingOfflinePage() && !isShowingPreview()
-                && mParsedUrl != null && mParsedUrl.getScheme() != null
-                && mParsedUrl.getScheme().equals(UrlConstants.HTTPS_SCHEME);
+                && UrlConstants.HTTPS_SCHEME.equals(mScheme);
     }
 
     /**
@@ -517,21 +515,12 @@
     }
 
     /**
-     *  Whether the site settings button should be displayed for the given URI.
-     *
-     * @param uri The URI used to determine if the site settings button should be displayed.
+     * Whether the site settings button should be displayed for the given URL.
      */
-    private boolean shouldShowSiteSettingsButton(URI uri) {
-        if (uri == null || uri.getScheme() == null) {
-            return false;
-        }
-
-        if (isShowingOfflinePage() || isShowingPreview()) {
-            return false;
-        }
-
-        return uri.getScheme().equals(UrlConstants.HTTP_SCHEME)
-                || uri.getScheme().equals(UrlConstants.HTTPS_SCHEME);
+    private boolean shouldShowSiteSettingsButton() {
+        return !isShowingOfflinePage() && !isShowingPreview()
+                && (UrlConstants.HTTP_SCHEME.equals(mScheme)
+                           || UrlConstants.HTTPS_SCHEME.equals(mScheme));
     }
 
     private boolean isSheet() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
index 16e6432..33daafb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
@@ -153,10 +153,6 @@
         return get().mNativeProfileSyncServiceAndroid;
     }
 
-    public void signOut() {
-        nativeSignOutSync(mNativeProfileSyncServiceAndroid);
-    }
-
     /**
      * Sets the the machine tag used by session sync.
      */
@@ -373,12 +369,6 @@
         nativeSetFirstSetupComplete(mNativeProfileSyncServiceAndroid);
     }
 
-    // TODO(maxbogue): Remove when downstream is updated to use the above.
-    @Deprecated
-    public void setSyncSetupCompleted() {
-        nativeSetFirstSetupComplete(mNativeProfileSyncServiceAndroid);
-    }
-
     public boolean isFirstSetupComplete() {
         return nativeIsFirstSetupComplete(mNativeProfileSyncServiceAndroid);
     }
@@ -455,6 +445,10 @@
         nativeRequestStop(mNativeProfileSyncServiceAndroid);
     }
 
+    public void setSyncAllowedByPlatform(boolean allowed) {
+        nativeSetSyncAllowedByPlatform(mNativeProfileSyncServiceAndroid, allowed);
+    }
+
     /**
      * Flushes the sync directory.
      */
@@ -556,8 +550,9 @@
     private native long nativeInit();
     private native void nativeRequestStart(long nativeProfileSyncServiceAndroid);
     private native void nativeRequestStop(long nativeProfileSyncServiceAndroid);
+    private native void nativeSetSyncAllowedByPlatform(
+            long nativeProfileSyncServiceAndroid, boolean allowed);
     private native void nativeFlushDirectory(long nativeProfileSyncServiceAndroid);
-    private native void nativeSignOutSync(long nativeProfileSyncServiceAndroid);
     private native void nativeSetSyncSessionsId(long nativeProfileSyncServiceAndroid, String tag);
     private native int nativeGetAuthError(long nativeProfileSyncServiceAndroid);
     private native int nativeGetProtocolErrorClientAction(long nativeProfileSyncServiceAndroid);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java
index b09e101..9e28c6f1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java
@@ -146,6 +146,13 @@
      * Updates sync to reflect the state of the Android sync settings.
      */
     private void updateSyncStateFromAndroid() {
+        // Note: |isChromeSyncEnabled| maps to SyncRequested, and
+        // |isMasterSyncEnabled| maps to *both* SyncRequested and
+        // SyncAllowedByPlatform.
+        // TODO(crbug.com/867901): Don't mix these two concepts.
+
+        mProfileSyncService.setSyncAllowedByPlatform(AndroidSyncSettings.isMasterSyncEnabled());
+
         boolean isSyncEnabled = AndroidSyncSettings.isSyncEnabled();
         if (isSyncEnabled == mProfileSyncService.isSyncRequested()) return;
         if (isSyncEnabled) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
index 9f8d5bc..7c8272f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -619,8 +619,8 @@
             public void onFindToolbarHidden() {
                 mToolbar.handleFindToolbarStateChange(false);
                 if (mControlsVisibilityDelegate != null) {
-                    mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenFindInPageToken);
-                    mFullscreenFindInPageToken = FullscreenManager.INVALID_TOKEN;
+                    mControlsVisibilityDelegate.releasePersistentShowingToken(
+                            mFullscreenFindInPageToken);
                 }
             }
         };
@@ -1230,8 +1230,7 @@
                             mControlsVisibilityDelegate.showControlsPersistentAndClearOldToken(
                                     mFullscreenMenuToken);
                 } else {
-                    mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenMenuToken);
-                    mFullscreenMenuToken = FullscreenManager.INVALID_TOKEN;
+                    mControlsVisibilityDelegate.releasePersistentShowingToken(mFullscreenMenuToken);
                 }
             }
 
@@ -1245,8 +1244,8 @@
                             mControlsVisibilityDelegate.showControlsPersistentAndClearOldToken(
                                     mFullscreenHighlightToken);
                 } else {
-                    mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenHighlightToken);
-                    mFullscreenHighlightToken = FullscreenManager.INVALID_TOKEN;
+                    mControlsVisibilityDelegate.releasePersistentShowingToken(
+                            mFullscreenHighlightToken);
                 }
             }
         });
@@ -1365,8 +1364,7 @@
             mFullscreenFocusToken = mControlsVisibilityDelegate
                     .showControlsPersistentAndClearOldToken(mFullscreenFocusToken);
         } else {
-            mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenFocusToken);
-            mFullscreenFocusToken = FullscreenManager.INVALID_TOKEN;
+            mControlsVisibilityDelegate.releasePersistentShowingToken(mFullscreenFocusToken);
         }
 
         mUrlFocusChangedCallback.onResult(hasFocus);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
index 218bf7a..89904b3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
@@ -2947,8 +2947,8 @@
             @Override
             public void onDismiss() {
                 if (mControlsVisibilityDelegate != null) {
-                    mControlsVisibilityDelegate.hideControlsPersistent(mFullscreenCalloutToken);
-                    mFullscreenCalloutToken = FullscreenManager.INVALID_TOKEN;
+                    mControlsVisibilityDelegate.releasePersistentShowingToken(
+                            mFullscreenCalloutToken);
                 }
                 mTabSwitcherCallout = null;
             }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
index 1c26d8c..99c3066 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
@@ -987,7 +987,7 @@
         mIsSheetOpen = false;
 
         // Update the browser controls since they are permanently shown while the sheet is open.
-        mFullscreenManager.getBrowserVisibilityDelegate().hideControlsPersistent(
+        mFullscreenManager.getBrowserVisibilityDelegate().releasePersistentShowingToken(
                 mPersistentControlsToken);
 
         for (BottomSheetObserver o : mObservers) o.onSheetClosed(reason);
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 3911948c..0e08957 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -661,6 +661,7 @@
   "java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java",
   "java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java",
   "java/src/org/chromium/chrome/browser/fullscreen/FullscreenOptions.java",
+  "java/src/org/chromium/chrome/browser/fullscreen/TokenHolder.java",
   "java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClient.java",
   "java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java",
   "java/src/org/chromium/chrome/browser/gcore/ConnectedTask.java",
@@ -2247,6 +2248,7 @@
   "junit/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencerTest.java",
   "junit/src/org/chromium/chrome/browser/firstrun/ToSAckedReceiverTest.java",
   "junit/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegateTest.java",
+  "junit/src/org/chromium/chrome/browser/fullscreen/TokenHolderTest.java",
   "junit/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelperTest.java",
   "junit/src/org/chromium/chrome/browser/incognito/IncognitoTabSnapshotControllerTest.java",
   "junit/src/org/chromium/chrome/browser/infobar/IPHInfoBarSupportTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/MockSafeBrowsingApiHandler.java b/chrome/android/javatests/src/org/chromium/chrome/browser/MockSafeBrowsingApiHandler.java
index ea27c8e..15c43251 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/MockSafeBrowsingApiHandler.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/MockSafeBrowsingApiHandler.java
@@ -36,6 +36,11 @@
 
     @Override
     public boolean init(Observer observer) {
+        return init(observer, false);
+    }
+
+    @Override
+    public boolean init(Observer observer, boolean enableLocalBlacklists) {
         mObserver = observer;
         mResponseMap = new HashMap<String, String>(sResponseMap);
         return true;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
index f23b45e..462f6a2f 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java
@@ -5,6 +5,7 @@
 package org.chromium.chrome.browser.contextualsearch;
 
 import android.net.Uri;
+import android.support.annotation.Nullable;
 
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.browser.ChromeActivity;
@@ -22,8 +23,6 @@
 import java.util.Map;
 import java.util.concurrent.TimeoutException;
 
-import javax.annotation.Nullable;
-
 /**
  * Implements a fake Contextual Search server, for testing purposes.
  * TODO(donnd): add more functionality to this class once the overall approach has been validated.
@@ -33,6 +32,8 @@
 @VisibleForTesting
 class ContextualSearchFakeServer
         implements ContextualSearchNetworkCommunicator, OverlayPanelContentFactory {
+    static final long ARBITRARY_DOC_ID = -12345678901234l;
+    static final long ARBITRARY_SNIPPET_HASH = 12345678901234567l;
 
     private final ContextualSearchPolicy mPolicy;
 
@@ -182,6 +183,8 @@
         private final String mCaption;
         private final String mQuickActionUri;
         private final int mQuickActionCategory;
+        private final long mDocId;
+        private final long mSnippetHash;
 
         boolean mDidStartResolution;
         boolean mDidFinishResolution;
@@ -202,12 +205,14 @@
          * @param caption               The caption to display.
          * @param quickActionUri        The URI for the intent associated with the quick action.
          * @param quickActionCategory   The category for the quick action.
+         * @param docId                 A document ID from the Search crawl.
+         * @param snippetHash           A long hash of some characters tapped.
          */
         FakeTapSearch(String nodeId, boolean isNetworkUnavailable, int responseCode,
                 String searchTerm, String displayText, String alternateTerm, String mid,
                 boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage,
-                String thumbnailUrl, String caption, String quickActionUri,
-                int quickActionCategory) {
+                String thumbnailUrl, String caption, String quickActionUri, int quickActionCategory,
+                long docId, long snippetHash) {
             super(nodeId);
 
             mIsNetworkUnavailable = isNetworkUnavailable;
@@ -224,6 +229,8 @@
             mCaption = caption;
             mQuickActionUri = quickActionUri;
             mQuickActionCategory = quickActionCategory;
+            mDocId = docId;
+            mSnippetHash = snippetHash;
         }
 
         @Override
@@ -295,8 +302,8 @@
                     if (!mDidFinishResolution) {
                         handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode,
                                 mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload,
-                                mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl,
-                                mCaption, mQuickActionUri, mQuickActionCategory);
+                                mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption,
+                                mQuickActionUri, mQuickActionCategory, mDocId, mSnippetHash);
 
                         mActiveFakeTapSearch = null;
                         mDidFinishResolution = true;
@@ -330,15 +337,17 @@
          * @param caption
          * @param quickActionUri
          * @param quickActionCategory
+         * @param docId
+         * @param snippetHash
          */
         FakeSlowResolveSearch(String nodeId, boolean isNetworkUnavailable, int responseCode,
                 String searchTerm, String displayText, String alternateTerm, String mid,
                 boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage,
-                String thumbnailUrl, String caption, String quickActionUri,
-                int quickActionCategory) {
+                String thumbnailUrl, String caption, String quickActionUri, int quickActionCategory,
+                long docId, long snippetHash) {
             super(nodeId, isNetworkUnavailable, responseCode, searchTerm, displayText,
                     alternateTerm, mid, doPreventPreload, startAdjust, endAdjust, contextLanguage,
-                    thumbnailUrl, caption, quickActionUri, quickActionCategory);
+                    thumbnailUrl, caption, quickActionUri, quickActionCategory, docId, snippetHash);
         }
 
         @Override
@@ -564,11 +573,11 @@
             String searchTerm, String displayText, String alternateTerm, String mid,
             boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
             String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
-            int quickActionCategory) {
+            int quickActionCategory, long docId, long snippetHash) {
         mBaseManager.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode,
                 searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust,
                 selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri,
-                quickActionCategory);
+                quickActionCategory, docId, snippetHash);
     }
 
     @Override
@@ -613,28 +622,27 @@
         registerFakeLongPressSearch(new FakeLongPressSearch("term", "Term"));
         registerFakeLongPressSearch(new FakeLongPressSearch("resolution", "Resolution"));
 
-        registerFakeTapSearch(new FakeTapSearch(
-                "search", false, 200, "Search", "Search", "alternate-term", "", false, 0, 0, "",
-                "", "", "", QuickActionCategory.NONE));
-        registerFakeTapSearch(new FakeTapSearch(
-                "term", false, 200, "Term", "Term", "alternate-term", "", false, 0, 0, "",
-                "", "", "", QuickActionCategory.NONE));
+        registerFakeTapSearch(new FakeTapSearch("search", false, 200, "Search", "Search",
+                "alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE, 0, 0));
+        registerFakeTapSearch(new FakeTapSearch("term", false, 200, "Term", "Term",
+                "alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE, 0, 0));
         registerFakeTapSearch(new FakeTapSearch("resolution", false, 200, "Resolution",
                 "Resolution", "alternate-term", "", false, 0, 0, "", "", "", "",
-                QuickActionCategory.NONE));
-        registerFakeTapSearch(new FakeTapSearch("german", false, 200, "Deutsche", "Deutsche",
-                "alternate-term", "", false, 0, 0, "de", "", "", "", QuickActionCategory.NONE));
+                QuickActionCategory.NONE, 0, 0));
+        registerFakeTapSearch(
+                new FakeTapSearch("german", false, 200, "Deutsche", "Deutsche", "alternate-term",
+                        "", false, 0, 0, "de", "", "", "", QuickActionCategory.NONE, 0, 0));
         registerFakeTapSearch(new FakeTapSearch("intelligence", false, 200, "Intelligence",
                 "Intelligence", "alternate-term", "", false, 0, 0, "", "", "", "",
-                QuickActionCategory.NONE));
+                QuickActionCategory.NONE, ARBITRARY_DOC_ID, ARBITRARY_SNIPPET_HASH));
 
         // Register a resolving search of "States" that expands to "United States".
         registerFakeSlowResolveSearch(new FakeSlowResolveSearch("states", false, 200, "States",
                 "States", "alternate-term", "", false, -7, 0, "", "", "", "",
-                QuickActionCategory.NONE));
-        registerFakeSlowResolveSearch(new FakeSlowResolveSearch(
-                "search", false, 200, "Search", "Search", "alternate-term", "", false, 0, 0, "",
-                "", "", "", QuickActionCategory.NONE));
+                QuickActionCategory.NONE, 0, 0));
+        registerFakeSlowResolveSearch(new FakeSlowResolveSearch("search", false, 200, "Search",
+                "Search", "alternate-term", "", false, 0, 0, "", "", "", "",
+                QuickActionCategory.NONE, 0, 0));
     }
 
     /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
index 186c018..8d4c7db 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
@@ -146,6 +146,8 @@
         // Integer values should contain @Feature values only.
         Set<Integer> expectedOutcomes =
                 new HashSet<Integer>(ContextualSearchRankerLoggerImpl.OUTCOMES.keySet());
+        expectedOutcomes.remove(ContextualSearchInteractionRecorder.Feature.OUTCOME_DOC_ID);
+        expectedOutcomes.remove(ContextualSearchInteractionRecorder.Feature.OUTCOME_SNIPPET_HASH);
         // We don't log whether the quick action was clicked unless we actually have a quick action.
         expectedOutcomes.remove(
                 ContextualSearchInteractionRecorder.Feature.OUTCOME_WAS_QUICK_ACTION_CLICKED);
@@ -498,7 +500,7 @@
             mFakeServer.handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode,
                     mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload,
                     mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption,
-                    mQuickActionUri, mQuickActionCategory);
+                    mQuickActionUri, mQuickActionCategory, 0, 0);
         }
     }
 
@@ -3322,4 +3324,39 @@
             }
         });
     }
+
+    private void assertRecordedSensitiveDataToUkm(boolean doAssert)
+            throws InterruptedException, TimeoutException {
+        simulateTapSearch("intelligence");
+        // The panel must be closed for outcomes to be logged.
+        // Close the panel by clicking far away in order to make sure the outcomes get logged by
+        // the hideContextualSearchUi call to writeRankerLoggerOutcomesAndReset.
+        clickWordNode("states-far");
+        waitForPanelToClose();
+        Assert.assertEquals(doAssert,
+                getRankerLogger().getOutcomesLogged().containsKey(
+                        ContextualSearchInteractionRecorder.Feature.OUTCOME_DOC_ID));
+        Assert.assertEquals(doAssert,
+                getRankerLogger().getOutcomesLogged().containsKey(
+                        ContextualSearchInteractionRecorder.Feature.OUTCOME_SNIPPET_HASH));
+    }
+
+    @Test
+    @SmallTest
+    @Feature({"ContextualSearch"})
+    @CommandLineFlags.Add(ContextualSearchRankerLoggerImpl.UKM_DEV_DATA_TTS_ENABLE)
+    @MinAndroidSdkLevel(Build.VERSION_CODES.N)
+    public void testCanRecordSensitiveDataToUkm() throws InterruptedException, TimeoutException {
+        assertRecordedSensitiveDataToUkm(true);
+    }
+
+    @Test
+    @SmallTest
+    @Feature({"ContextualSearch"})
+    @MinAndroidSdkLevel(Build.VERSION_CODES.N)
+    public void testDoesNotRecordSensitiveDataToUkmWithoutCommandLineFlag()
+            throws InterruptedException, TimeoutException {
+        // Same test as above, but without the command-line-flag, does not log.
+        assertRecordedSensitiveDataToUkm(false);
+    }
 }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java
index c04bdb5..c7f6a4c8 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java
@@ -98,9 +98,8 @@
         @Override
         public void startSearchTermResolutionRequest(String selection) {
             // Skip native calls and immediately "resolve" the search term.
-            onSearchTermResolutionResponse(
-                    true, 200, selection, selection, "", "", false, 0, 10, "", "", "", "",
-                    QuickActionCategory.NONE);
+            onSearchTermResolutionResponse(true, 200, selection, selection, "", "", false, 0, 10,
+                    "", "", "", "", QuickActionCategory.NONE, 0, 0);
         }
 
         @Override
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegateTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegateTest.java
index 7829f03..19295572 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegateTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserStateBrowserControlsVisibilityDelegateTest.java
@@ -66,7 +66,7 @@
         // Advance the clock to exceed the minimum show time.
         advanceTime(2 * MINIMUM_SHOW_DURATION_MS);
         assertFalse(mDelegate.canAutoHideBrowserControls());
-        mDelegate.hideControlsPersistent(token);
+        mDelegate.releasePersistentShowingToken(token);
         assertTrue(mDelegate.canAutoHideBrowserControls());
 
         verify(mCallback, times(2)).run();
@@ -78,7 +78,7 @@
         assertTrue(mDelegate.canAutoHideBrowserControls());
         int token = mDelegate.showControlsPersistent();
         assertFalse(mDelegate.canAutoHideBrowserControls());
-        mDelegate.hideControlsPersistent(token);
+        mDelegate.releasePersistentShowingToken(token);
 
         // If the controls are not shown for the mimimum allowed time, then a task is posted to
         // keep them shown for longer.  Ensure the controls can not be hidden until this delayed
@@ -103,7 +103,7 @@
         // At this point, the controls have been shown long enough that the transient request will
         // be a no-op.
         mDelegate.showControlsTransient();
-        mDelegate.hideControlsPersistent(token);
+        mDelegate.releasePersistentShowingToken(token);
         assertTrue(mDelegate.canAutoHideBrowserControls());
 
         verify(mCallback, times(2)).run();
@@ -122,7 +122,7 @@
         // At this point, the controls have not been shown long enough, so the transient request
         // will delay the ability to hide.
         mDelegate.showControlsTransient();
-        mDelegate.hideControlsPersistent(token);
+        mDelegate.releasePersistentShowingToken(token);
         assertFalse(mDelegate.canAutoHideBrowserControls());
 
         // Run the pending tasks on the UI thread, which will include the transient delayed task.
@@ -149,11 +149,11 @@
         advanceTime(2 * MINIMUM_SHOW_DURATION_MS);
         assertFalse(mDelegate.canAutoHideBrowserControls());
 
-        mDelegate.hideControlsPersistent(secondToken);
+        mDelegate.releasePersistentShowingToken(secondToken);
         assertFalse(mDelegate.canAutoHideBrowserControls());
-        mDelegate.hideControlsPersistent(firstToken);
+        mDelegate.releasePersistentShowingToken(firstToken);
         assertFalse(mDelegate.canAutoHideBrowserControls());
-        mDelegate.hideControlsPersistent(thirdToken);
+        mDelegate.releasePersistentShowingToken(thirdToken);
         assertTrue(mDelegate.canAutoHideBrowserControls());
 
         verify(mCallback, times(2)).run();
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/TokenHolderTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/TokenHolderTest.java
new file mode 100644
index 0000000..0d70c13
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/TokenHolderTest.java
@@ -0,0 +1,69 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.fullscreen;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.clearInvocations;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class TokenHolderTest {
+    private final Runnable mCallback = mock(Runnable.class);
+    private final TokenHolder mHolder = new TokenHolder(mCallback);
+
+    @Test
+    public void hasTokens_AfterAddingOne() {
+        mHolder.acquireToken();
+        assertTrue(mHolder.hasTokens());
+    }
+
+    @Test
+    public void hasNoTokens_AfterRemovingTheToken() {
+        int token = mHolder.acquireToken();
+        mHolder.releaseToken(token);
+        assertFalse(mHolder.hasTokens());
+    }
+
+    @Test
+    public void hasNoTokens_AfterAddingAndRemovingTwoTokens() {
+        int token1 = mHolder.acquireToken();
+        int token2 = mHolder.acquireToken();
+        mHolder.releaseToken(token1);
+        mHolder.releaseToken(token2);
+        assertFalse(mHolder.hasTokens());
+    }
+
+    @Test
+    public void hasTokens_AfterTryingToRemoveInvalidToken() {
+        int token1 = mHolder.acquireToken();
+        mHolder.releaseToken(token1 + 1);
+        assertTrue(mHolder.hasTokens());
+    }
+
+    @Test
+    public void callbackIsCalled_whenTokensBecomeEmptyOrNotEmpty() {
+        int token1 = mHolder.acquireToken();
+        verify(mCallback).run();
+
+        clearInvocations(mCallback);
+        int token2 = mHolder.acquireToken();
+        verify(mCallback, never()).run();
+
+        clearInvocations(mCallback);
+        mHolder.releaseToken(token2);
+        verify(mCallback, never()).run();
+
+        clearInvocations(mCallback);
+        mHolder.releaseToken(token1);
+        verify(mCallback).run();
+    }
+}
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt
index 45b4b73..c8b1389 100644
--- a/chrome/android/profiles/newest.txt
+++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@
-chromeos-chrome-amd64-71.0.3577.0_rc-r1.afdo.bz2
\ No newline at end of file
+chromeos-chrome-amd64-71.0.3578.2_rc-r1.afdo.bz2
\ No newline at end of file
diff --git a/chrome/app/framework.order b/chrome/app/framework.order
index 4f8a717..ecf1d08 100644
--- a/chrome/app/framework.order
+++ b/chrome/app/framework.order
@@ -21,8 +21,5 @@
 # Entry point from the app mode loader.
 _ChromeAppModeStart_v4
 
-# Entry point for the keychain reauthorization stub.
-_KeychainReauthorizeIfNeededAtUpdate
-
 # _ChromeMain must be listed last.  That's the whole point of this file.
 _ChromeMain
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index e4051100..0f8c80e 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -4322,9 +4322,6 @@
   <message name="IDS_SETTINGS_CHANGE_PASSWORD_TITLE" desc="Title of the reset password warning.">
     Your password may be compromised
   </message>
-  <message name="IDS_SETTINGS_CHANGE_PASSWORD_DETAIL" desc="Detailed description of the reset password warning.">
-    To protect your personal information, change your password now. Before you can change your password, you’ll be asked to sign in.
-  </message>
   <message name="IDS_SETTINGS_CHANGE_PASSWORD_BUTTON" desc="Label on button that takes user to change password page.">
     Change Password
   </message>
diff --git a/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_BUTTON.png.sha1 b/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_BUTTON.png.sha1
new file mode 100644
index 0000000..4052dbf
--- /dev/null
+++ b/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_BUTTON.png.sha1
@@ -0,0 +1 @@
+c3f3d5fef0ea06434e079a743e48cae4fb8c6b5f
\ No newline at end of file
diff --git a/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS.png.sha1 b/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS.png.sha1
new file mode 100644
index 0000000..4052dbf
--- /dev/null
+++ b/chrome/app/settings_strings_grdp/IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS.png.sha1
@@ -0,0 +1 @@
+c3f3d5fef0ea06434e079a743e48cae4fb8c6b5f
\ No newline at end of file
diff --git a/chrome/app_shim/BUILD.gn b/chrome/app_shim/BUILD.gn
index 06cbaf0..177d3450 100644
--- a/chrome/app_shim/BUILD.gn
+++ b/chrome/app_shim/BUILD.gn
@@ -11,6 +11,10 @@
 # Framework bundle.
 source_set("app_shim") {
   sources = [
+    "app_shim_controller.h",
+    "app_shim_controller.mm",
+    "app_shim_delegate.h",
+    "app_shim_delegate.mm",
     "chrome_main_app_mode_mac.mm",
   ]
 
diff --git a/chrome/app_shim/app_shim_controller.h b/chrome/app_shim/app_shim_controller.h
new file mode 100644
index 0000000..d45db47
--- /dev/null
+++ b/chrome/app_shim/app_shim_controller.h
@@ -0,0 +1,77 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_APP_SHIM_APP_SHIM_CONTROLLER_H_
+#define CHROME_APP_SHIM_APP_SHIM_CONTROLLER_H_
+
+#include "base/files/file_path.h"
+#include "base/mac/scoped_nsobject.h"
+#include "chrome/common/mac/app_mode_common.h"
+#include "chrome/common/mac/app_shim.mojom.h"
+#include "chrome/common/mac/app_shim_param_traits.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/system/isolated_connection.h"
+
+@class AppShimDelegate;
+
+// The AppShimController is responsible for communication with the main Chrome
+// process, and generally controls the lifetime of the app shim process.
+class AppShimController : public chrome::mojom::AppShim {
+ public:
+  explicit AppShimController(const app_mode::ChromeAppModeInfo* app_mode_info);
+  ~AppShimController() override;
+
+  // Called when the main Chrome process responds to the Apple Event ping that
+  // was sent, or when the ping fails (if |success| is false).
+  void OnPingChromeReply(bool success);
+
+  // Called |kPingChromeTimeoutSeconds| after startup, to allow a timeout on the
+  // ping event to be detected.
+  void OnPingChromeTimeout();
+
+  // Connects to Chrome and sends a LaunchApp message.
+  void Init();
+
+  chrome::mojom::AppShimHost* host() const { return host_.get(); }
+
+  // Called when the app is activated, e.g. by clicking on it in the dock, by
+  // dropping a file on the dock icon, or by Cmd+Tabbing to it.
+  // Returns whether the message was sent.
+  bool SendFocusApp(apps::AppShimFocusType focus_type,
+                    const std::vector<base::FilePath>& files);
+
+ private:
+  // Create a channel from |socket_path| and send a LaunchApp message.
+  void CreateChannelAndSendLaunchApp(const base::FilePath& socket_path);
+  // Builds main menu bar items.
+  void SetUpMenu();
+  void ChannelError(uint32_t custom_reason, const std::string& description);
+
+  // chrome::mojom::AppShim implementation.
+  void LaunchAppDone(apps::AppShimLaunchResult result) override;
+  void CreateViewsBridgeFactory(
+      views_bridge_mac::mojom::BridgeFactoryAssociatedRequest request) override;
+  void CreateContentNSViewBridgeFactory(
+      content::mojom::NSViewBridgeFactoryAssociatedRequest request) override;
+  void Hide() override;
+  void UnhideWithoutActivation() override;
+  void SetUserAttention(apps::AppShimAttentionType attention_type) override;
+
+  // Terminates the app shim process.
+  void Close();
+
+  const app_mode::ChromeAppModeInfo* const app_mode_info_;
+  base::FilePath user_data_dir_;
+  mojo::IsolatedConnection mojo_connection_;
+  mojo::Binding<chrome::mojom::AppShim> shim_binding_;
+  chrome::mojom::AppShimHostPtr host_;
+  base::scoped_nsobject<AppShimDelegate> delegate_;
+  bool launch_app_done_;
+  bool ping_chrome_reply_received_;
+  NSInteger attention_request_id_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppShimController);
+};
+
+#endif  // CHROME_APP_SHIM_APP_SHIM_CONTROLLER_H_
diff --git a/chrome/app_shim/app_shim_controller.mm b/chrome/app_shim/app_shim_controller.mm
new file mode 100644
index 0000000..4966033
--- /dev/null
+++ b/chrome/app_shim/app_shim_controller.mm
@@ -0,0 +1,226 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/app_shim/app_shim_controller.h"
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/command_line.h"
+#include "base/files/file_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "chrome/app_shim/app_shim_delegate.h"
+#include "chrome/grit/generated_resources.h"
+#include "content/public/browser/ns_view_bridge_factory_impl.h"
+#include "content/public/common/ns_view_bridge_factory.mojom.h"
+#include "mojo/public/cpp/platform/named_platform_channel.h"
+#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/views_bridge_mac/bridge_factory_impl.h"
+#include "ui/views_bridge_mac/mojo/bridge_factory.mojom.h"
+
+AppShimController::AppShimController(
+    const app_mode::ChromeAppModeInfo* app_mode_info)
+    : app_mode_info_(app_mode_info),
+      shim_binding_(this),
+      delegate_([[AppShimDelegate alloc] init]),
+      launch_app_done_(false),
+      ping_chrome_reply_received_(false),
+      attention_request_id_(0) {
+  // Since AppShimController is created before the main message loop starts,
+  // NSApp will not be set, so use sharedApplication.
+  NSApplication* sharedApplication = [NSApplication sharedApplication];
+  [sharedApplication setDelegate:delegate_];
+}
+
+AppShimController::~AppShimController() {
+  // Un-set the delegate since NSApplication does not retain it.
+  NSApplication* sharedApplication = [NSApplication sharedApplication];
+  [sharedApplication setDelegate:nil];
+}
+
+void AppShimController::OnPingChromeReply(bool success) {
+  ping_chrome_reply_received_ = true;
+  if (!success) {
+    [NSApp terminate:nil];
+    return;
+  }
+
+  Init();
+}
+
+void AppShimController::OnPingChromeTimeout() {
+  if (!ping_chrome_reply_received_)
+    [NSApp terminate:nil];
+}
+
+void AppShimController::Init() {
+  ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
+  SetUpMenu();
+
+  // Chrome will relaunch shims when relaunching apps.
+  [NSApp disableRelaunchOnLogin];
+
+  // The user_data_dir for shims actually contains the app_data_path.
+  // I.e. <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/
+  user_data_dir_ = app_mode_info_->user_data_dir.DirName().DirName().DirName();
+  CHECK(!user_data_dir_.empty());
+
+  base::FilePath symlink_path =
+      user_data_dir_.Append(app_mode::kAppShimSocketSymlinkName);
+
+  base::FilePath socket_path;
+  if (!base::ReadSymbolicLink(symlink_path, &socket_path)) {
+    // The path in the user data dir is not a symlink, try connecting directly.
+    CreateChannelAndSendLaunchApp(symlink_path);
+    return;
+  }
+
+  app_mode::VerifySocketPermissions(socket_path);
+
+  CreateChannelAndSendLaunchApp(socket_path);
+}
+
+void AppShimController::CreateChannelAndSendLaunchApp(
+    const base::FilePath& socket_path) {
+  mojo::ScopedMessagePipeHandle message_pipe = mojo_connection_.Connect(
+      mojo::NamedPlatformChannel::ConnectToServer(socket_path.value()));
+  host_ = chrome::mojom::AppShimHostPtr(
+      chrome::mojom::AppShimHostPtrInfo(std::move(message_pipe), 0));
+
+  chrome::mojom::AppShimPtr app_shim_ptr;
+  shim_binding_.Bind(mojo::MakeRequest(&app_shim_ptr),
+                     ui::WindowResizeHelperMac::Get()->task_runner());
+  shim_binding_.set_connection_error_with_reason_handler(
+      base::BindOnce(&AppShimController::ChannelError, base::Unretained(this)));
+
+  bool launched_by_chrome = base::CommandLine::ForCurrentProcess()->HasSwitch(
+      app_mode::kLaunchedByChromeProcessId);
+  apps::AppShimLaunchType launch_type =
+      launched_by_chrome ? apps::APP_SHIM_LAUNCH_REGISTER_ONLY
+                         : apps::APP_SHIM_LAUNCH_NORMAL;
+
+  [delegate_ setController:this];
+
+  std::vector<base::FilePath> files;
+  [delegate_ getFilesToOpenAtStartup:&files];
+
+  host_->LaunchApp(std::move(app_shim_ptr), app_mode_info_->profile_dir,
+                   app_mode_info_->app_mode_id, launch_type, files);
+}
+
+void AppShimController::SetUpMenu() {
+  NSString* title = base::SysUTF16ToNSString(app_mode_info_->app_mode_name);
+
+  // Create a main menu since [NSApp mainMenu] is nil.
+  base::scoped_nsobject<NSMenu> main_menu([[NSMenu alloc] initWithTitle:title]);
+
+  // The title of the first item is replaced by OSX with the name of the app and
+  // bold styling. Create a dummy item for this and make it hidden.
+  NSMenuItem* dummy_item =
+      [main_menu addItemWithTitle:title action:nil keyEquivalent:@""];
+  base::scoped_nsobject<NSMenu> dummy_submenu(
+      [[NSMenu alloc] initWithTitle:title]);
+  [dummy_item setSubmenu:dummy_submenu];
+  [dummy_item setHidden:YES];
+
+  // Construct an unbolded app menu, to match how it appears in the Chrome menu
+  // bar when the app is focused.
+  NSMenuItem* item =
+      [main_menu addItemWithTitle:title action:nil keyEquivalent:@""];
+  base::scoped_nsobject<NSMenu> submenu([[NSMenu alloc] initWithTitle:title]);
+  [item setSubmenu:submenu];
+
+  // Add a quit entry.
+  NSString* quit_localized_string =
+      l10n_util::GetNSStringF(IDS_EXIT_MAC, app_mode_info_->app_mode_name);
+  [submenu addItemWithTitle:quit_localized_string
+                     action:@selector(terminate:)
+              keyEquivalent:@"q"];
+
+  // Add File, Edit, and Window menus. These are just here to make the
+  // transition smoother, i.e. from another application to the shim then to
+  // Chrome.
+  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_FILE_MENU_MAC)
+                       action:nil
+                keyEquivalent:@""];
+  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_EDIT_MENU_MAC)
+                       action:nil
+                keyEquivalent:@""];
+  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_WINDOW_MENU_MAC)
+                       action:nil
+                keyEquivalent:@""];
+
+  [NSApp setMainMenu:main_menu];
+}
+
+void AppShimController::ChannelError(uint32_t custom_reason,
+                                     const std::string& description) {
+  LOG(ERROR) << "Channel error custom_reason:" << custom_reason
+             << " description: " << description;
+  Close();
+}
+
+void AppShimController::LaunchAppDone(apps::AppShimLaunchResult result) {
+  if (result != apps::APP_SHIM_LAUNCH_SUCCESS) {
+    Close();
+    return;
+  }
+
+  std::vector<base::FilePath> files;
+  if ([delegate_ getFilesToOpenAtStartup:&files])
+    SendFocusApp(apps::APP_SHIM_FOCUS_OPEN_FILES, files);
+
+  launch_app_done_ = true;
+}
+
+void AppShimController::CreateViewsBridgeFactory(
+    views_bridge_mac::mojom::BridgeFactoryAssociatedRequest request) {
+  views_bridge_mac::BridgeFactoryImpl::Get()->BindRequest(std::move(request));
+}
+
+void AppShimController::CreateContentNSViewBridgeFactory(
+    content::mojom::NSViewBridgeFactoryAssociatedRequest request) {
+  content::NSViewBridgeFactoryImpl::Get()->BindRequest(std::move(request));
+}
+
+void AppShimController::Hide() {
+  [NSApp hide:nil];
+}
+
+void AppShimController::UnhideWithoutActivation() {
+  [NSApp unhideWithoutActivation];
+}
+
+void AppShimController::SetUserAttention(
+    apps::AppShimAttentionType attention_type) {
+  switch (attention_type) {
+    case apps::APP_SHIM_ATTENTION_CANCEL:
+      [NSApp cancelUserAttentionRequest:attention_request_id_];
+      attention_request_id_ = 0;
+      break;
+    case apps::APP_SHIM_ATTENTION_CRITICAL:
+      attention_request_id_ = [NSApp requestUserAttention:NSCriticalRequest];
+      break;
+    case apps::APP_SHIM_ATTENTION_INFORMATIONAL:
+      attention_request_id_ =
+          [NSApp requestUserAttention:NSInformationalRequest];
+      break;
+    case apps::APP_SHIM_ATTENTION_NUM_TYPES:
+      NOTREACHED();
+  }
+}
+
+void AppShimController::Close() {
+  [delegate_ terminateNow];
+}
+
+bool AppShimController::SendFocusApp(apps::AppShimFocusType focus_type,
+                                     const std::vector<base::FilePath>& files) {
+  if (launch_app_done_) {
+    host_->FocusApp(focus_type, files);
+    return true;
+  }
+
+  return false;
+}
diff --git a/chrome/app_shim/app_shim_delegate.h b/chrome/app_shim/app_shim_delegate.h
new file mode 100644
index 0000000..46bff46
--- /dev/null
+++ b/chrome/app_shim/app_shim_delegate.h
@@ -0,0 +1,44 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_APP_SHIM_APP_SHIM_DELEGATE_H_
+#define CHROME_APP_SHIM_APP_SHIM_DELEGATE_H_
+
+#import <Cocoa/Cocoa.h>
+#include <vector>
+
+#include "base/files/file_path.h"
+
+class AppShimController;
+
+// An application delegate to catch user interactions and send the appropriate
+// IPC messages to Chrome.
+@interface AppShimDelegate : NSObject<NSApplicationDelegate> {
+ @private
+  AppShimController* appShimController_;  // Weak, initially NULL.
+  BOOL terminateNow_;
+  BOOL terminateRequested_;
+  std::vector<base::FilePath> filesToOpenAtStartup_;
+}
+
+// The controller is initially NULL. Setting it indicates to the delegate that
+// the controller has finished initialization.
+- (void)setController:(AppShimController*)controller;
+
+// Gets files that were queued because the controller was not ready.
+// Returns whether any FilePaths were added to |out|.
+- (BOOL)getFilesToOpenAtStartup:(std::vector<base::FilePath>*)out;
+
+// If the controller is ready, this sends a FocusApp with the files to open.
+// Otherwise, this adds the files to |filesToOpenAtStartup_|.
+// Takes an array of NSString*.
+- (void)openFiles:(NSArray*)filename;
+
+// Terminate immediately. This is necessary as we override terminate: to send
+// a QuitApp message.
+- (void)terminateNow;
+
+@end
+
+#endif  // CHROME_APP_SHIM_APP_SHIM_DELEGATE_H_
diff --git a/chrome/app_shim/app_shim_delegate.mm b/chrome/app_shim/app_shim_delegate.mm
new file mode 100644
index 0000000..e4caba4
--- /dev/null
+++ b/chrome/app_shim/app_shim_delegate.mm
@@ -0,0 +1,99 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/app_shim/app_shim_delegate.h"
+
+#include "base/mac/foundation_util.h"
+#include "chrome/app_shim/app_shim_controller.h"
+
+@implementation AppShimDelegate
+
+- (BOOL)getFilesToOpenAtStartup:(std::vector<base::FilePath>*)out {
+  if (filesToOpenAtStartup_.empty())
+    return NO;
+
+  out->insert(out->end(), filesToOpenAtStartup_.begin(),
+              filesToOpenAtStartup_.end());
+  filesToOpenAtStartup_.clear();
+  return YES;
+}
+
+- (void)setController:(AppShimController*)controller {
+  appShimController_ = controller;
+}
+
+- (void)openFiles:(NSArray*)filenames {
+  std::vector<base::FilePath> filePaths;
+  for (NSString* filename in filenames)
+    filePaths.push_back(base::mac::NSStringToFilePath(filename));
+
+  // If the AppShimController is ready, try to send a FocusApp. If that fails,
+  // (e.g. if launching has not finished), enqueue the files.
+  if (appShimController_ && appShimController_->SendFocusApp(
+                                apps::APP_SHIM_FOCUS_OPEN_FILES, filePaths)) {
+    return;
+  }
+
+  filesToOpenAtStartup_.insert(filesToOpenAtStartup_.end(), filePaths.begin(),
+                               filePaths.end());
+}
+
+- (BOOL)application:(NSApplication*)app openFile:(NSString*)filename {
+  [self openFiles:@[ filename ]];
+  return YES;
+}
+
+- (void)application:(NSApplication*)app openFiles:(NSArray*)filenames {
+  [self openFiles:filenames];
+  [app replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
+}
+
+- (BOOL)applicationOpenUntitledFile:(NSApplication*)app {
+  if (appShimController_) {
+    return appShimController_->SendFocusApp(apps::APP_SHIM_FOCUS_REOPEN,
+                                            std::vector<base::FilePath>());
+  }
+
+  return NO;
+}
+
+- (void)applicationWillBecomeActive:(NSNotification*)notification {
+  if (appShimController_) {
+    appShimController_->SendFocusApp(apps::APP_SHIM_FOCUS_NORMAL,
+                                     std::vector<base::FilePath>());
+  }
+}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:
+    (NSApplication*)sender {
+  if (terminateNow_ || !appShimController_)
+    return NSTerminateNow;
+
+  appShimController_->host()->QuitApp();
+  // Wait for the channel to close before terminating.
+  terminateRequested_ = YES;
+  return NSTerminateLater;
+}
+
+- (void)applicationWillHide:(NSNotification*)notification {
+  if (appShimController_)
+    appShimController_->host()->SetAppHidden(true);
+}
+
+- (void)applicationWillUnhide:(NSNotification*)notification {
+  if (appShimController_)
+    appShimController_->host()->SetAppHidden(false);
+}
+
+- (void)terminateNow {
+  if (terminateRequested_) {
+    [NSApp replyToApplicationShouldTerminate:NSTerminateNow];
+    return;
+  }
+
+  terminateNow_ = YES;
+  [NSApp terminate:nil];
+}
+
+@end
diff --git a/chrome/app_shim/chrome_main_app_mode_mac.mm b/chrome/app_shim/chrome_main_app_mode_mac.mm
index eebc32e..0a888eeb 100644
--- a/chrome/app_shim/chrome_main_app_mode_mac.mm
+++ b/chrome/app_shim/chrome_main_app_mode_mac.mm
@@ -17,38 +17,23 @@
 #include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/mac/bundle_locations.h"
-#include "base/mac/foundation_util.h"
 #import "base/mac/launch_services_util.h"
 #include "base/mac/mac_logging.h"
-#include "base/mac/mac_util.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/mac/scoped_nsobject.h"
-#include "base/mac/sdk_forward_declarations.h"
 #include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/threading/thread.h"
+#include "chrome/app_shim/app_shim_controller.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
-#include "chrome/common/mac/app_mode_common.h"
-#include "chrome/common/mac/app_shim.mojom.h"
-#include "chrome/common/mac/app_shim_param_traits.h"
-#include "chrome/grit/generated_resources.h"
-#include "content/public/browser/ns_view_bridge_factory_impl.h"
-#include "content/public/common/ns_view_bridge_factory.mojom.h"
 #include "mojo/core/embedder/embedder.h"
 #include "mojo/core/embedder/scoped_ipc_support.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/platform/named_platform_channel.h"
-#include "mojo/public/cpp/system/isolated_connection.h"
-#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/views_bridge_mac/bridge_factory_impl.h"
-#include "ui/views_bridge_mac/mojo/bridge_factory.mojom.h"
 
 namespace {
 
@@ -57,416 +42,8 @@
 // documentation, but is no longer supported for asynchronous Apple Events.
 const int kPingChromeTimeoutSeconds = 60;
 
-const app_mode::ChromeAppModeInfo* g_info;
-base::Thread* g_io_thread = NULL;
-
 }  // namespace
 
-class AppShimController;
-
-// An application delegate to catch user interactions and send the appropriate
-// IPC messages to Chrome.
-@interface AppShimDelegate : NSObject<NSApplicationDelegate> {
- @private
-  AppShimController* appShimController_;  // Weak, initially NULL.
-  BOOL terminateNow_;
-  BOOL terminateRequested_;
-  std::vector<base::FilePath> filesToOpenAtStartup_;
-}
-
-// The controller is initially NULL. Setting it indicates to the delegate that
-// the controller has finished initialization.
-- (void)setController:(AppShimController*)controller;
-
-// Gets files that were queued because the controller was not ready.
-// Returns whether any FilePaths were added to |out|.
-- (BOOL)getFilesToOpenAtStartup:(std::vector<base::FilePath>*)out;
-
-// If the controller is ready, this sends a FocusApp with the files to open.
-// Otherwise, this adds the files to |filesToOpenAtStartup_|.
-// Takes an array of NSString*.
-- (void)openFiles:(NSArray*)filename;
-
-// Terminate immediately. This is necessary as we override terminate: to send
-// a QuitApp message.
-- (void)terminateNow;
-
-@end
-
-// The AppShimController is responsible for communication with the main Chrome
-// process, and generally controls the lifetime of the app shim process.
-class AppShimController : public chrome::mojom::AppShim {
- public:
-  AppShimController();
-  ~AppShimController() override;
-
-  // Called when the main Chrome process responds to the Apple Event ping that
-  // was sent, or when the ping fails (if |success| is false).
-  void OnPingChromeReply(bool success);
-
-  // Called |kPingChromeTimeoutSeconds| after startup, to allow a timeout on the
-  // ping event to be detected.
-  void OnPingChromeTimeout();
-
-  // Connects to Chrome and sends a LaunchApp message.
-  void Init();
-
-  // Create a channel from |socket_path| and send a LaunchApp message.
-  void CreateChannelAndSendLaunchApp(const base::FilePath& socket_path);
-
-  // Builds main menu bar items.
-  void SetUpMenu();
-
-  void SendSetAppHidden(bool hidden);
-
-  void SendQuitApp();
-
-  // Called when the app is activated, e.g. by clicking on it in the dock, by
-  // dropping a file on the dock icon, or by Cmd+Tabbing to it.
-  // Returns whether the message was sent.
-  bool SendFocusApp(apps::AppShimFocusType focus_type,
-                    const std::vector<base::FilePath>& files);
-
- private:
-  void ChannelError(uint32_t custom_reason, const std::string& description);
-
-  // chrome::mojom::AppShim implementation.
-  void LaunchAppDone(apps::AppShimLaunchResult result) override;
-  void CreateViewsBridgeFactory(
-      views_bridge_mac::mojom::BridgeFactoryAssociatedRequest request) override;
-  void CreateContentNSViewBridgeFactory(
-      content::mojom::NSViewBridgeFactoryAssociatedRequest request) override;
-  void Hide() override;
-  void UnhideWithoutActivation() override;
-  void SetUserAttention(apps::AppShimAttentionType attention_type) override;
-
-  // Terminates the app shim process.
-  void Close();
-
-  base::FilePath user_data_dir_;
-  mojo::IsolatedConnection mojo_connection_;
-  mojo::Binding<chrome::mojom::AppShim> shim_binding_;
-  chrome::mojom::AppShimHostPtr host_;
-  base::scoped_nsobject<AppShimDelegate> delegate_;
-  bool launch_app_done_;
-  bool ping_chrome_reply_received_;
-  NSInteger attention_request_id_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppShimController);
-};
-
-AppShimController::AppShimController()
-    : shim_binding_(this),
-      delegate_([[AppShimDelegate alloc] init]),
-      launch_app_done_(false),
-      ping_chrome_reply_received_(false),
-      attention_request_id_(0) {
-  // Since AppShimController is created before the main message loop starts,
-  // NSApp will not be set, so use sharedApplication.
-  NSApplication* sharedApplication = [NSApplication sharedApplication];
-  [sharedApplication setDelegate:delegate_];
-}
-
-AppShimController::~AppShimController() {
-  // Un-set the delegate since NSApplication does not retain it.
-  NSApplication* sharedApplication = [NSApplication sharedApplication];
-  [sharedApplication setDelegate:nil];
-}
-
-void AppShimController::OnPingChromeReply(bool success) {
-  ping_chrome_reply_received_ = true;
-  if (!success) {
-    [NSApp terminate:nil];
-    return;
-  }
-
-  Init();
-}
-
-void AppShimController::OnPingChromeTimeout() {
-  if (!ping_chrome_reply_received_)
-    [NSApp terminate:nil];
-}
-
-void AppShimController::Init() {
-  DCHECK(g_io_thread);
-
-  SetUpMenu();
-
-  // Chrome will relaunch shims when relaunching apps.
-  [NSApp disableRelaunchOnLogin];
-
-  // The user_data_dir for shims actually contains the app_data_path.
-  // I.e. <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/
-  user_data_dir_ = g_info->user_data_dir.DirName().DirName().DirName();
-  CHECK(!user_data_dir_.empty());
-
-  base::FilePath symlink_path =
-      user_data_dir_.Append(app_mode::kAppShimSocketSymlinkName);
-
-  base::FilePath socket_path;
-  if (!base::ReadSymbolicLink(symlink_path, &socket_path)) {
-    // The path in the user data dir is not a symlink, try connecting directly.
-    CreateChannelAndSendLaunchApp(symlink_path);
-    return;
-  }
-
-  app_mode::VerifySocketPermissions(socket_path);
-
-  CreateChannelAndSendLaunchApp(socket_path);
-}
-
-void AppShimController::CreateChannelAndSendLaunchApp(
-    const base::FilePath& socket_path) {
-  mojo::ScopedMessagePipeHandle message_pipe = mojo_connection_.Connect(
-      mojo::NamedPlatformChannel::ConnectToServer(socket_path.value()));
-  host_ = chrome::mojom::AppShimHostPtr(
-      chrome::mojom::AppShimHostPtrInfo(std::move(message_pipe), 0));
-
-  chrome::mojom::AppShimPtr app_shim_ptr;
-  shim_binding_.Bind(mojo::MakeRequest(&app_shim_ptr),
-                     ui::WindowResizeHelperMac::Get()->task_runner());
-  shim_binding_.set_connection_error_with_reason_handler(
-      base::BindOnce(&AppShimController::ChannelError, base::Unretained(this)));
-
-  bool launched_by_chrome = base::CommandLine::ForCurrentProcess()->HasSwitch(
-      app_mode::kLaunchedByChromeProcessId);
-  apps::AppShimLaunchType launch_type = launched_by_chrome ?
-          apps::APP_SHIM_LAUNCH_REGISTER_ONLY : apps::APP_SHIM_LAUNCH_NORMAL;
-
-  [delegate_ setController:this];
-
-  std::vector<base::FilePath> files;
-  [delegate_ getFilesToOpenAtStartup:&files];
-
-  host_->LaunchApp(std::move(app_shim_ptr), g_info->profile_dir,
-                   g_info->app_mode_id, launch_type, files);
-}
-
-void AppShimController::SetUpMenu() {
-  NSString* title = base::SysUTF16ToNSString(g_info->app_mode_name);
-
-  // Create a main menu since [NSApp mainMenu] is nil.
-  base::scoped_nsobject<NSMenu> main_menu([[NSMenu alloc] initWithTitle:title]);
-
-  // The title of the first item is replaced by OSX with the name of the app and
-  // bold styling. Create a dummy item for this and make it hidden.
-  NSMenuItem* dummy_item = [main_menu addItemWithTitle:title
-                                                action:nil
-                                         keyEquivalent:@""];
-  base::scoped_nsobject<NSMenu> dummy_submenu(
-      [[NSMenu alloc] initWithTitle:title]);
-  [dummy_item setSubmenu:dummy_submenu];
-  [dummy_item setHidden:YES];
-
-  // Construct an unbolded app menu, to match how it appears in the Chrome menu
-  // bar when the app is focused.
-  NSMenuItem* item = [main_menu addItemWithTitle:title
-                                          action:nil
-                                   keyEquivalent:@""];
-  base::scoped_nsobject<NSMenu> submenu([[NSMenu alloc] initWithTitle:title]);
-  [item setSubmenu:submenu];
-
-  // Add a quit entry.
-  NSString* quit_localized_string =
-      l10n_util::GetNSStringF(IDS_EXIT_MAC, g_info->app_mode_name);
-  [submenu addItemWithTitle:quit_localized_string
-                     action:@selector(terminate:)
-              keyEquivalent:@"q"];
-
-  // Add File, Edit, and Window menus. These are just here to make the
-  // transition smoother, i.e. from another application to the shim then to
-  // Chrome.
-  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_FILE_MENU_MAC)
-                       action:nil
-                keyEquivalent:@""];
-  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_EDIT_MENU_MAC)
-                       action:nil
-                keyEquivalent:@""];
-  [main_menu addItemWithTitle:l10n_util::GetNSString(IDS_WINDOW_MENU_MAC)
-                       action:nil
-                keyEquivalent:@""];
-
-  [NSApp setMainMenu:main_menu];
-}
-
-void AppShimController::SendQuitApp() {
-  host_->QuitApp();
-}
-
-void AppShimController::ChannelError(uint32_t custom_reason,
-                                     const std::string& description) {
-  LOG(ERROR) << "Channel error custom_reason:" << custom_reason
-             << " description: " << description;
-  Close();
-}
-
-void AppShimController::LaunchAppDone(apps::AppShimLaunchResult result) {
-  if (result != apps::APP_SHIM_LAUNCH_SUCCESS) {
-    Close();
-    return;
-  }
-
-  std::vector<base::FilePath> files;
-  if ([delegate_ getFilesToOpenAtStartup:&files])
-    SendFocusApp(apps::APP_SHIM_FOCUS_OPEN_FILES, files);
-
-  launch_app_done_ = true;
-}
-
-void AppShimController::CreateViewsBridgeFactory(
-    views_bridge_mac::mojom::BridgeFactoryAssociatedRequest request) {
-  views_bridge_mac::BridgeFactoryImpl::Get()->BindRequest(std::move(request));
-}
-
-void AppShimController::CreateContentNSViewBridgeFactory(
-    content::mojom::NSViewBridgeFactoryAssociatedRequest request) {
-  content::NSViewBridgeFactoryImpl::Get()->BindRequest(std::move(request));
-}
-
-void AppShimController::Hide() {
-  [NSApp hide:nil];
-}
-
-void AppShimController::UnhideWithoutActivation() {
-  [NSApp unhideWithoutActivation];
-}
-
-void AppShimController::SetUserAttention(
-    apps::AppShimAttentionType attention_type) {
-  switch (attention_type) {
-    case apps::APP_SHIM_ATTENTION_CANCEL:
-      [NSApp cancelUserAttentionRequest:attention_request_id_];
-      attention_request_id_ = 0;
-      break;
-    case apps::APP_SHIM_ATTENTION_CRITICAL:
-      attention_request_id_ = [NSApp requestUserAttention:NSCriticalRequest];
-      break;
-    case apps::APP_SHIM_ATTENTION_INFORMATIONAL:
-      attention_request_id_ =
-          [NSApp requestUserAttention:NSInformationalRequest];
-      break;
-    case apps::APP_SHIM_ATTENTION_NUM_TYPES:
-      NOTREACHED();
-  }
-}
-
-void AppShimController::Close() {
-  [delegate_ terminateNow];
-}
-
-bool AppShimController::SendFocusApp(apps::AppShimFocusType focus_type,
-                                     const std::vector<base::FilePath>& files) {
-  if (launch_app_done_) {
-    host_->FocusApp(focus_type, files);
-    return true;
-  }
-
-  return false;
-}
-
-void AppShimController::SendSetAppHidden(bool hidden) {
-  host_->SetAppHidden(hidden);
-}
-
-@implementation AppShimDelegate
-
-- (BOOL)getFilesToOpenAtStartup:(std::vector<base::FilePath>*)out {
-  if (filesToOpenAtStartup_.empty())
-    return NO;
-
-  out->insert(out->end(),
-              filesToOpenAtStartup_.begin(),
-              filesToOpenAtStartup_.end());
-  filesToOpenAtStartup_.clear();
-  return YES;
-}
-
-- (void)setController:(AppShimController*)controller {
-  appShimController_ = controller;
-}
-
-- (void)openFiles:(NSArray*)filenames {
-  std::vector<base::FilePath> filePaths;
-  for (NSString* filename in filenames)
-    filePaths.push_back(base::mac::NSStringToFilePath(filename));
-
-  // If the AppShimController is ready, try to send a FocusApp. If that fails,
-  // (e.g. if launching has not finished), enqueue the files.
-  if (appShimController_ &&
-      appShimController_->SendFocusApp(apps::APP_SHIM_FOCUS_OPEN_FILES,
-                                       filePaths)) {
-    return;
-  }
-
-  filesToOpenAtStartup_.insert(filesToOpenAtStartup_.end(),
-                               filePaths.begin(),
-                               filePaths.end());
-}
-
-- (BOOL)application:(NSApplication*)app
-           openFile:(NSString*)filename {
-  [self openFiles:@[filename]];
-  return YES;
-}
-
-- (void)application:(NSApplication*)app
-          openFiles:(NSArray*)filenames {
-  [self openFiles:filenames];
-  [app replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
-}
-
-- (BOOL)applicationOpenUntitledFile:(NSApplication*)app {
-  if (appShimController_) {
-    return appShimController_->SendFocusApp(apps::APP_SHIM_FOCUS_REOPEN,
-                                            std::vector<base::FilePath>());
-  }
-
-  return NO;
-}
-
-- (void)applicationWillBecomeActive:(NSNotification*)notification {
-  if (appShimController_) {
-    appShimController_->SendFocusApp(apps::APP_SHIM_FOCUS_NORMAL,
-                                     std::vector<base::FilePath>());
-  }
-}
-
-- (NSApplicationTerminateReply)
-    applicationShouldTerminate:(NSApplication*)sender {
-  if (terminateNow_ || !appShimController_)
-    return NSTerminateNow;
-
-  appShimController_->SendQuitApp();
-  // Wait for the channel to close before terminating.
-  terminateRequested_ = YES;
-  return NSTerminateLater;
-}
-
-- (void)applicationWillHide:(NSNotification*)notification {
-  if (appShimController_)
-    appShimController_->SendSetAppHidden(true);
-}
-
-- (void)applicationWillUnhide:(NSNotification*)notification {
-  if (appShimController_)
-    appShimController_->SendSetAppHidden(false);
-}
-
-- (void)terminateNow {
-  if (terminateRequested_) {
-    [NSApp replyToApplicationShouldTerminate:NSTerminateNow];
-    return;
-  }
-
-  terminateNow_ = YES;
-  [NSApp terminate:nil];
-}
-
-@end
-
-//-----------------------------------------------------------------------------
-
 // A ReplyEventHandler is a helper class to send an Apple Event to a process
 // and call a callback when the reply returns.
 //
@@ -568,8 +145,6 @@
 }
 @end
 
-//-----------------------------------------------------------------------------
-
 extern "C" {
 
 // |ChromeAppModeStart()| is the point of entry into the framework from the app
@@ -601,12 +176,10 @@
     return 1;
   }
 
-  g_info = info;
-
   // Set bundle paths. This loads the bundles.
-  base::mac::SetOverrideOuterBundlePath(g_info->chrome_outer_bundle_path);
+  base::mac::SetOverrideOuterBundlePath(info->chrome_outer_bundle_path);
   base::mac::SetOverrideFrameworkBundlePath(
-      g_info->chrome_versioned_path.Append(chrome::kFrameworkName));
+      info->chrome_versioned_path.Append(chrome::kFrameworkName));
 
   // Calculate the preferred locale used by Chrome.
   // We can't use l10n_util::OverrideLocaleWithCocoaLocale() because it calls
@@ -635,7 +208,6 @@
   io_thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
   base::Thread *io_thread = new base::Thread("CrAppShimIO");
   io_thread->StartWithOptions(io_thread_options);
-  g_io_thread = io_thread;
 
   mojo::core::Init();
   mojo::core::ScopedIPCSupport ipc_support(
@@ -658,10 +230,9 @@
       pid = [[existing_chrome objectAtIndex:0] processIdentifier];
   }
 
-  AppShimController controller;
+  AppShimController controller(info);
   base::MessageLoopForUI main_message_loop;
   base::PlatformThread::SetName("CrAppShimMain");
-  ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
 
   // In tests, launching Chrome does nothing, and we won't get a ping response,
   // so just assume the socket exists.
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index a0d0dd38..9b750bbb 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -630,8 +630,6 @@
     "mac/exception_processor.mm",
     "mac/install_from_dmg.h",
     "mac/install_from_dmg.mm",
-    "mac/keychain_reauthorize.h",
-    "mac/keychain_reauthorize.mm",
     "mac/keystone_glue.h",
     "mac/keystone_glue.mm",
     "mac/keystone_registration.h",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 0faee72..a9d045f1 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -51,7 +51,6 @@
 #include "components/browser_sync/browser_sync_switches.h"
 #include "components/browsing_data/core/features.h"
 #include "components/cloud_devices/common/cloud_devices_switches.h"
-#include "components/content_settings/core/common/features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
 #include "components/dom_distiller/core/dom_distiller_switches.h"
@@ -2116,10 +2115,6 @@
     {"enable-chrome-memex", flag_descriptions::kChromeMemexName,
      flag_descriptions::kChromeMemexDescription, kOsAndroid,
      FEATURE_VALUE_TYPE(chrome::android::kChromeMemexFeature)},
-    {"enable-chrome-modern-full-roll",
-     flag_descriptions::kChromeModernFullRollName,
-     flag_descriptions::kChromeModernFullRollDescription, kOsAndroid,
-     FEATURE_VALUE_TYPE(chrome::android::kChromeModernFullRoll)},
     {"force-enable-home-page-button", flag_descriptions::kHomePageButtonName,
      flag_descriptions::kHomePageButtonDescription, kOsAndroid,
      FEATURE_VALUE_TYPE(chrome::android::kHomePageButtonForceEnabled)},
@@ -2397,6 +2392,9 @@
      SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts)},
 #endif  // OS_WIN
 #if defined(OS_MACOSX)
+    {"mac-v2-sandbox", flag_descriptions::kMacV2SandboxName,
+     flag_descriptions::kMacV2SandboxDescription, kOsMac,
+     FEATURE_VALUE_TYPE(features::kMacV2Sandbox)},
     {"mac-views-task-manager", flag_descriptions::kMacViewsTaskManagerName,
      flag_descriptions::kMacViewsTaskManagerDescription, kOsMac,
      FEATURE_VALUE_TYPE(features::kViewsTaskManager)},
@@ -4192,12 +4190,6 @@
      flag_descriptions::kEnableCSSFragmentIdentifiersDescription, kOsAll,
      FEATURE_VALUE_TYPE(features::kCSSFragmentIdentifiers)},
 
-    {"enable-ephemeral-flash-permission",
-     flag_descriptions::kEnableEphemeralFlashPermissionName,
-     flag_descriptions::kEnableEphemeralFlashPermissionDescription, kOsDesktop,
-     FEATURE_VALUE_TYPE(
-         content_settings::features::kEnableEphemeralFlashPermission)},
-
 #if !defined(OS_ANDROID)
     {"infinite-session-restore", flag_descriptions::kInfiniteSessionRestoreName,
      flag_descriptions::kInfiniteSessionRestoreDescription, kOsDesktop,
@@ -4447,6 +4439,11 @@
     {"fcm-invalidations", flag_descriptions::kFCMInvalidationsName,
      flag_descriptions::kFCMInvalidationsDescription, kOsAll,
      FEATURE_VALUE_TYPE(invalidation::switches::kFCMInvalidations)},
+#if defined(OS_ANDROID)
+    {"enable-ephemeral-tab", flag_descriptions::kEphemeralTabName,
+     flag_descriptions::kEphemeralTabDescription, kOsAndroid,
+     FEATURE_VALUE_TYPE(chrome::android::kEphemeralTab)},
+#endif  // defined(OS_ANDROID)
 
 };
 
diff --git a/chrome/browser/android/autofill_assistant/ui_controller_android.cc b/chrome/browser/android/autofill_assistant/ui_controller_android.cc
index 400c4fa..1c3a257 100644
--- a/chrome/browser/android/autofill_assistant/ui_controller_android.cc
+++ b/chrome/browser/android/autofill_assistant/ui_controller_android.cc
@@ -12,7 +12,6 @@
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/command_line.h"
-#include "base/time/time.h"
 #include "chrome/browser/android/chrome_feature_list.h"
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -41,10 +40,9 @@
     const JavaRef<jobjectArray>& names,
     const JavaRef<jobjectArray>& values) {
   std::vector<std::string> names_vector;
-  base::android::AppendJavaStringArrayToStringVector(env, names.obj(),
-                                                     &names_vector);
+  base::android::AppendJavaStringArrayToStringVector(env, names, &names_vector);
   std::vector<std::string> values_vector;
-  base::android::AppendJavaStringArrayToStringVector(env, values.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, values,
                                                      &values_vector);
   DCHECK_EQ(names_vector.size(), values_vector.size());
   auto parameters = std::make_unique<std::map<std::string, std::string>>();
@@ -215,26 +213,20 @@
 }
 
 void UiControllerAndroid::ShowDetails(const DetailsProto& details) {
-  base::Time time;
-  base::Time::Exploded exploded;
-  exploded.year = details.datetime().date().year();
-  exploded.month = details.datetime().date().month();
-  exploded.day_of_month = details.datetime().date().day();
-  exploded.hour = details.datetime().time().hour();
-  exploded.minute = details.datetime().time().minute();
-  exploded.second = details.datetime().time().second();
-
-  long java_time = 0;
-  if (base::Time::FromUTCExploded(exploded, &time)) {
-    java_time = time.ToJavaTime();
-  }
+  int year = details.datetime().date().year();
+  int month = details.datetime().date().month();
+  int day = details.datetime().date().day();
+  int hour = details.datetime().time().hour();
+  int minute = details.datetime().time().minute();
+  int second = details.datetime().time().second();
 
   JNIEnv* env = AttachCurrentThread();
   Java_AutofillAssistantUiController_onShowDetails(
       env, java_autofill_assistant_ui_controller_,
       base::android::ConvertUTF8ToJavaString(env, details.title()),
-      base::android::ConvertUTF8ToJavaString(env, details.url()), java_time,
-      base::android::ConvertUTF8ToJavaString(env, details.description()));
+      base::android::ConvertUTF8ToJavaString(env, details.url()),
+      base::android::ConvertUTF8ToJavaString(env, details.description()), year,
+      month, day, hour, minute, second);
 }
 
 std::string UiControllerAndroid::GetApiKey() {
diff --git a/chrome/browser/android/browsing_data/browsing_data_bridge.cc b/chrome/browser/android/browsing_data/browsing_data_bridge.cc
index 765b4dd..e84f043 100644
--- a/chrome/browser/android/browsing_data/browsing_data_bridge.cc
+++ b/chrome/browser/android/browsing_data/browsing_data_bridge.cc
@@ -119,13 +119,13 @@
   std::vector<int32_t> excluding_domain_reasons;
   std::vector<std::string> ignoring_domains;
   std::vector<int32_t> ignoring_domain_reasons;
-  base::android::AppendJavaStringArrayToStringVector(
-      env, jexcluding_domains.obj(), &excluding_domains);
-  base::android::JavaIntArrayToIntVector(env, jexcluding_domain_reasons.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, jexcluding_domains,
+                                                     &excluding_domains);
+  base::android::JavaIntArrayToIntVector(env, jexcluding_domain_reasons,
                                          &excluding_domain_reasons);
-  base::android::AppendJavaStringArrayToStringVector(
-      env, jignoring_domains.obj(), &ignoring_domains);
-  base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, jignoring_domains,
+                                                     &ignoring_domains);
+  base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons,
                                          &ignoring_domain_reasons);
   std::unique_ptr<content::BrowsingDataFilterBuilder> filter_builder(
       content::BrowsingDataFilterBuilder::Create(
diff --git a/chrome/browser/android/chrome_backup_agent_unittest.cc b/chrome/browser/android/chrome_backup_agent_unittest.cc
index 8c46de5..4e9ad2c 100644
--- a/chrome/browser/android/chrome_backup_agent_unittest.cc
+++ b/chrome/browser/android/chrome_backup_agent_unittest.cc
@@ -27,6 +27,7 @@
 using base::android::AttachCurrentThread;
 using base::android::ScopedJavaLocalRef;
 using base::android::ToJavaArrayOfStrings;
+using base::android::ToJavaBooleanArray;
 using base::android::JavaParamRef;
 
 class ChromeBackupAgentTest : public ::testing::Test {
@@ -59,7 +60,7 @@
   ScopedJavaLocalRef<jobjectArray> result =
       GetBoolBackupNamesForTesting(env_, JavaParamRef<jobject>(nullptr));
   std::vector<std::string> pref_names;
-  AppendJavaStringArrayToStringVector(AttachCurrentThread(), result.obj(),
+  AppendJavaStringArrayToStringVector(AttachCurrentThread(), result,
                                       &pref_names);
   EXPECT_EQ(expected_pref_names_, pref_names);
 }
@@ -67,11 +68,10 @@
 TEST_F(ChromeBackupAgentTest, GetBoolBackupValues_AllDefault) {
   ScopedJavaLocalRef<jbooleanArray> result =
       GetBoolBackupValuesForTesting(env_, JavaParamRef<jobject>(nullptr));
-  jsize size = env_->GetArrayLength(result.obj());
-  ASSERT_EQ(expected_pref_names_.size(), static_cast<size_t>(size));
-
-  jboolean* values = env_->GetBooleanArrayElements(result.obj(), nullptr);
-  for (int i = 0; i < size; i++) {
+  std::vector<bool> values;
+  JavaBooleanArrayToBoolVector(env_, result, &values);
+  ASSERT_EQ(expected_pref_names_.size(), values.size());
+  for (size_t i = 0; i < values.size(); i++) {
     bool expected_value;
     ASSERT_TRUE(pref_service_->GetDefaultPrefValue(expected_pref_names_[i])
                     ->GetAsBoolean(&expected_value));
@@ -86,10 +86,10 @@
 
   ScopedJavaLocalRef<jbooleanArray> result =
       GetBoolBackupValuesForTesting(env_, JavaParamRef<jobject>(nullptr));
-  jsize size = env_->GetArrayLength(result.obj());
-  ASSERT_EQ(expected_pref_names_.size(), static_cast<size_t>(size));
-  jboolean* values = env_->GetBooleanArrayElements(result.obj(), nullptr);
-  for (int i = 0; i < size; i++) {
+  std::vector<bool> values;
+  JavaBooleanArrayToBoolVector(env_, result, &values);
+  ASSERT_EQ(expected_pref_names_.size(), values.size());
+  for (size_t i = 0; i < values.size(); i++) {
     bool expected_value;
     ASSERT_TRUE(pref_service_->GetDefaultPrefValue(expected_pref_names_[i])
                     ->GetAsBoolean(&expected_value));
@@ -103,11 +103,10 @@
   pref_service_->SetBoolean(expected_pref_names_[3], false);
   ScopedJavaLocalRef<jbooleanArray> result =
       GetBoolBackupValuesForTesting(env_, JavaParamRef<jobject>(nullptr));
-  jsize size = env_->GetArrayLength(result.obj());
-  ASSERT_EQ(expected_pref_names_.size(), static_cast<size_t>(size));
-
-  jboolean* values = env_->GetBooleanArrayElements(result.obj(), nullptr);
-  for (int i = 0; i < size; i++) {
+  std::vector<bool> values;
+  JavaBooleanArrayToBoolVector(env_, result, &values);
+  ASSERT_EQ(expected_pref_names_.size(), values.size());
+  for (size_t i = 0; i < values.size(); i++) {
     EXPECT_EQ(pref_service_->GetBoolean(expected_pref_names_[i]), values[i])
         << "i = " << i << ", " << expected_pref_names_[i];
   }
@@ -116,17 +115,15 @@
 TEST_F(ChromeBackupAgentTest, SetBoolBackupValues) {
   ScopedJavaLocalRef<jobjectArray> narray =
       ToJavaArrayOfStrings(env_, expected_pref_names_);
-  jboolean* values = new jboolean[expected_pref_names_.size()];
+  bool* values = new bool[expected_pref_names_.size()];
   for (size_t i = 0; i < expected_pref_names_.size(); i++) {
     values[i] = false;
   }
   // Set a couple of the values to true.
   values[5] = true;
   values[8] = true;
-  ScopedJavaLocalRef<jbooleanArray> varray(
-      env_, env_->NewBooleanArray(expected_pref_names_.size()));
-  env_->SetBooleanArrayRegion(varray.obj(), 0, expected_pref_names_.size(),
-                              values);
+  ScopedJavaLocalRef<jbooleanArray> varray =
+      ToJavaBooleanArray(env_, values, expected_pref_names_.size());
   SetBoolBackupPrefsForTesting(env_, JavaParamRef<jobject>(nullptr),
                                JavaParamRef<jobjectArray>(env_, narray.obj()),
                                JavaParamRef<jbooleanArray>(env_, varray.obj()));
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
index d46351c..ae0d2a1f 100644
--- a/chrome/browser/android/chrome_feature_list.cc
+++ b/chrome/browser/android/chrome_feature_list.cc
@@ -93,7 +93,6 @@
     &kChromeHomeSwipeLogicVelocity,
     &kChromeSmartSelection,
     &kChromeMemexFeature,
-    &kChromeModernFullRoll,
     &kCommandLineOnNonRooted,
     &kContentSuggestionsScrollToLoad,
     &kContentSuggestionsThumbnailDominantColor,
@@ -108,6 +107,7 @@
     &kDownloadHomeV2,
     &kDownloadHomeShowStorageInfo,
     &data_reduction_proxy::features::kDataReductionMainMenu,
+    &kEphemeralTab,
     &kExploreSites,
     &kFullscreenActivity,
     &kHandleMediaIntents,
@@ -251,9 +251,6 @@
 const base::Feature kChromeMemexFeature{"ChromeMemex",
                                         base::FEATURE_DISABLED_BY_DEFAULT};
 
-const base::Feature kChromeModernFullRoll{"ChromeModernFullRoll",
-                                          base::FEATURE_DISABLED_BY_DEFAULT};
-
 const base::Feature kChromeSmartSelection{"ChromeSmartSelection",
                                           base::FEATURE_ENABLED_BY_DEFAULT};
 
@@ -300,6 +297,9 @@
 const base::Feature kDownloadHomeShowStorageInfo{
     "DownloadHomeShowStorageInfo", base::FEATURE_DISABLED_BY_DEFAULT};
 
+const base::Feature kEphemeralTab{"EphemeralTab",
+                                  base::FEATURE_DISABLED_BY_DEFAULT};
+
 const base::Feature kExploreSites{"ExploreSites",
                                   base::FEATURE_DISABLED_BY_DEFAULT};
 
diff --git a/chrome/browser/android/chrome_feature_list.h b/chrome/browser/android/chrome_feature_list.h
index 00b50b8..bc0e8e0 100644
--- a/chrome/browser/android/chrome_feature_list.h
+++ b/chrome/browser/android/chrome_feature_list.h
@@ -33,7 +33,6 @@
 extern const base::Feature kChromeHomeSwipeLogic;
 extern const base::Feature kChromeHomeSwipeLogicVelocity;
 extern const base::Feature kChromeMemexFeature;
-extern const base::Feature kChromeModernFullRoll;
 extern const base::Feature kChromeSmartSelection;
 extern const base::Feature kCommandLineOnNonRooted;
 extern const base::Feature kContentSuggestionsScrollToLoad;
@@ -49,6 +48,7 @@
 extern const base::Feature kDownloadProgressInfoBar;
 extern const base::Feature kDownloadHomeV2;
 extern const base::Feature kDownloadHomeShowStorageInfo;
+extern const base::Feature kEphemeralTab;
 extern const base::Feature kExploreSites;
 extern const base::Feature kFullscreenActivity;
 extern const base::Feature kHandleMediaIntents;
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
index ec5af60..95ab828 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
@@ -57,6 +57,8 @@
 const char kContextualSearchThumbnail[] = "thumbnail";
 const char kContextualSearchAction[] = "action";
 const char kContextualSearchCategory[] = "category";
+const char kContextualSearchDocIdParam[] = "docid";
+const char kContextualSearchSnippetParam[] = "snippet";
 
 const char kActionCategoryAddress[] = "ADDRESS";
 const char kActionCategoryEmail[] = "EMAIL";
@@ -213,11 +215,14 @@
   std::string caption = "";
   std::string quick_action_uri = "";
   QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE;
+  long long doc_id = 0;
+  long long snippet_hash = 0;
 
   DecodeSearchTermFromJsonResponse(
       json_string, &search_term, &display_text, &alternate_term, &mid,
       &prevent_preload, &mention_start, &mention_end, &context_language,
-      &thumbnail_url, &caption, &quick_action_uri, &quick_action_category);
+      &thumbnail_url, &caption, &quick_action_uri, &quick_action_category,
+      &doc_id, &snippet_hash);
   if (mention_start != 0 || mention_end != 0) {
     // Sanity check that our selection is non-zero and it is less than
     // 100 characters as that would make contextual search bar hide.
@@ -239,7 +244,7 @@
       is_invalid, response_code, search_term, display_text, alternate_term, mid,
       prevent_preload == kDoPreventPreloadValue, start_adjust, end_adjust,
       context_language, thumbnail_url, caption, quick_action_uri,
-      quick_action_category));
+      quick_action_category, doc_id, snippet_hash));
 }
 
 std::string ContextualSearchDelegate::BuildRequestUrl(
@@ -427,7 +432,9 @@
     std::string* thumbnail_url,
     std::string* caption,
     std::string* quick_action_uri,
-    QuickActionCategory* quick_action_category) {
+    QuickActionCategory* quick_action_category,
+    long long* doc_id,
+    long long* snippet_hash) {
   bool contains_xssi_escape =
       base::StartsWith(response, kXssiEscape, base::CompareCase::SENSITIVE);
   const std::string& proper_json =
@@ -499,6 +506,18 @@
     }
   }
 
+  // Check for development-data for the offline click-log.
+  // TODO(donnd): remove before the next release.  See https://crbug.com/894568
+  // for details.
+  std::string doc_id_string;
+  std::string snippet_hash_string;
+  dict->GetString(kContextualSearchDocIdParam, &doc_id_string);
+  dict->GetString(kContextualSearchSnippetParam, &snippet_hash_string);
+  if (!doc_id_string.empty())
+    *doc_id = std::stoll(doc_id_string, nullptr);
+  if (!snippet_hash_string.empty())
+    *snippet_hash = std::stoll(snippet_hash_string, nullptr);
+
   // Any Contextual Cards integration.
   // For testing purposes check if there was a diagnostic from Contextual
   // Cards and output that into the log.
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.h b/chrome/browser/android/contextualsearch/contextual_search_delegate.h
index 55c2050..b6f7e812 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.h
@@ -149,7 +149,9 @@
       std::string* thumbnail_url,
       std::string* caption,
       std::string* quick_action_uri,
-      QuickActionCategory* quick_action_category);
+      QuickActionCategory* quick_action_category,
+      long long* doc_id,
+      long long* snippet_hash);
 
   // Extracts the start and end location from a mentions list, and sets the
   // integers referenced by |startResult| and |endResult|.
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
index 57cc78d..b05e1c5 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
@@ -540,11 +540,14 @@
   std::string caption;
   std::string quick_action_uri;
   QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE;
+  long long doc_id = 0;
+  long long snippet_hash = 0;
 
   delegate_->DecodeSearchTermFromJsonResponse(
-      json_with_escape, &search_term, &display_text, &alternate_term,
-      &mid, &prevent_preload, &mention_start, &mention_end, &context_language,
-      &thumbnail_url, &caption, &quick_action_uri, &quick_action_category);
+      json_with_escape, &search_term, &display_text, &alternate_term, &mid,
+      &prevent_preload, &mention_start, &mention_end, &context_language,
+      &thumbnail_url, &caption, &quick_action_uri, &quick_action_category,
+      &doc_id, &snippet_hash);
 
   EXPECT_EQ("obama", search_term);
   EXPECT_EQ("Barack Obama", display_text);
@@ -556,6 +559,8 @@
   EXPECT_EQ("", caption);
   EXPECT_EQ("", quick_action_uri);
   EXPECT_EQ(QUICK_ACTION_CATEGORY_NONE, quick_action_category);
+  EXPECT_EQ(0ll, doc_id);
+  EXPECT_EQ(0ll, snippet_hash);
 }
 
 TEST_F(ContextualSearchDelegateTest, ResponseWithLanguage) {
diff --git a/chrome/browser/android/contextualsearch/contextual_search_manager.cc b/chrome/browser/android/contextualsearch/contextual_search_manager.cc
index 1bc3e648..f714ae1b 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_manager.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_manager.cc
@@ -186,7 +186,8 @@
       resolved_search_term.selection_start_adjust,
       resolved_search_term.selection_end_adjust, j_context_language,
       j_thumbnail_url, j_caption, j_quick_action_uri,
-      resolved_search_term.quick_action_category);
+      resolved_search_term.quick_action_category, resolved_search_term.doc_id,
+      resolved_search_term.snippet_hash);
 }
 
 void ContextualSearchManager::OnTextSurroundingSelectionAvailable(
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 6864fda..054750f 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.cc
@@ -79,13 +79,13 @@
   features[feature_name].set_int32_value(value);
 }
 
-void ContextualSearchRankerLoggerImpl::LogLong(
+void ContextualSearchRankerLoggerImpl::LogInt32(
     JNIEnv* env,
     jobject obj,
     const base::android::JavaParamRef<jstring>& j_feature,
-    jlong j_long) {
+    jint j_int) {
   std::string feature = base::android::ConvertJavaStringToUTF8(env, j_feature);
-  LogFeature(feature, j_long);
+  LogFeature(feature, j_int);
 }
 
 AssistRankerPrediction ContextualSearchRankerLoggerImpl::RunInference(
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 83d69081..bd952d3 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_ranker_logger_impl.h
@@ -49,11 +49,11 @@
       jobject obj,
       const base::android::JavaParamRef<jobject>& java_web_contents);
 
-  // Logs a long value with the given feature name.
-  void LogLong(JNIEnv* env,
-               jobject obj,
-               const base::android::JavaParamRef<jstring>& j_feature,
-               jlong j_long);
+  // Logs an int32 value with the given feature name.
+  void LogInt32(JNIEnv* env,
+                jobject obj,
+                const base::android::JavaParamRef<jstring>& j_feature,
+                jint j_int);
 
   // Runs the model and returns the inference result as an
   // AssistRankerPrediction enum.
diff --git a/chrome/browser/android/contextualsearch/resolved_search_term.cc b/chrome/browser/android/contextualsearch/resolved_search_term.cc
index f589f18..0ce822e 100644
--- a/chrome/browser/android/contextualsearch/resolved_search_term.cc
+++ b/chrome/browser/android/contextualsearch/resolved_search_term.cc
@@ -20,7 +20,9 @@
       thumbnail_url(""),
       caption(""),
       quick_action_uri(""),
-      quick_action_category(QUICK_ACTION_CATEGORY_NONE) {}
+      quick_action_category(QUICK_ACTION_CATEGORY_NONE),
+      doc_id(0),
+      snippet_hash(0) {}
 
 ResolvedSearchTerm::ResolvedSearchTerm(
     bool is_invalid,
@@ -36,7 +38,9 @@
     const std::string& thumbnail_url,
     const std::string& caption,
     const std::string& quick_action_uri,
-    const QuickActionCategory& quick_action_category)
+    const QuickActionCategory& quick_action_category,
+    long long doc_id,
+    long long snippet_hash)
     : is_invalid(is_invalid),
       response_code(response_code),
       search_term(search_term),
@@ -50,6 +54,8 @@
       thumbnail_url(thumbnail_url),
       caption(caption),
       quick_action_uri(quick_action_uri),
-      quick_action_category(quick_action_category) {}
+      quick_action_category(quick_action_category),
+      doc_id(doc_id),
+      snippet_hash(snippet_hash) {}
 
 ResolvedSearchTerm::~ResolvedSearchTerm() {}
diff --git a/chrome/browser/android/contextualsearch/resolved_search_term.h b/chrome/browser/android/contextualsearch/resolved_search_term.h
index 5569f58..3f415852 100644
--- a/chrome/browser/android/contextualsearch/resolved_search_term.h
+++ b/chrome/browser/android/contextualsearch/resolved_search_term.h
@@ -40,7 +40,9 @@
                      const std::string& thumbnail_url,
                      const std::string& caption,
                      const std::string& quick_action_uri,
-                     const QuickActionCategory& quick_action_category);
+                     const QuickActionCategory& quick_action_category,
+                     long long doc_id,
+                     long long snippet_hash);
   ~ResolvedSearchTerm();
 
   const bool is_invalid;
@@ -58,6 +60,8 @@
   const std::string caption;
   const std::string quick_action_uri;
   const QuickActionCategory quick_action_category;
+  const long long doc_id;
+  const long long snippet_hash;
 
   DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm);
 };
diff --git a/chrome/browser/android/explore_sites/get_catalog_task.cc b/chrome/browser/android/explore_sites/get_catalog_task.cc
index beafc29..816b81c 100644
--- a/chrome/browser/android/explore_sites/get_catalog_task.cc
+++ b/chrome/browser/android/explore_sites/get_catalog_task.cc
@@ -18,9 +18,10 @@
 WHERE version_token = ?
 ORDER BY category_id ASC;)";
 
-static const char kSelectSiteSql[] = R"(SELECT site_id, url, title
+static const char kSelectSiteSql[] = R"(SELECT site_id, sites.url, title
 FROM sites
-WHERE category_id = ?)";
+LEFT JOIN site_blacklist ON (sites.url = site_blacklist.url)
+WHERE category_id = ? AND site_blacklist.url IS NULL;)";
 
 const char kDeleteSiteSql[] = R"(DELETE FROM sites
 WHERE category_id NOT IN
@@ -126,6 +127,7 @@
   if (!category_statement.Succeeded())
     return std::make_pair(GetCatalogStatus::kFailed, nullptr);
 
+  bool found_empty_category = false;
   for (auto& category : *result) {
     sql::Statement site_statement(
         db->GetCachedStatement(SQL_FROM_HERE, kSelectSiteSql));
@@ -139,6 +141,20 @@
     }
     if (!site_statement.Succeeded())
       return std::make_pair(GetCatalogStatus::kFailed, nullptr);
+
+    if (category.sites.empty())
+      found_empty_category = true;
+  }
+
+  // Remove any categories with no sites.
+  if (found_empty_category) {
+    auto new_result = std::make_unique<GetCatalogTask::CategoryList>();
+    for (auto& category : *result) {
+      // Move all categories with sites into the new result
+      if (category.sites.size() > 0)
+        new_result->emplace_back(std::move(category));
+    }
+    result = std::move(new_result);
   }
 
   return std::make_pair(GetCatalogStatus::kSuccess, std::move(result));
diff --git a/chrome/browser/android/explore_sites/get_catalog_task_unittest.cc b/chrome/browser/android/explore_sites/get_catalog_task_unittest.cc
index d47bb70..a210f04 100644
--- a/chrome/browser/android/explore_sites/get_catalog_task_unittest.cc
+++ b/chrome/browser/android/explore_sites/get_catalog_task_unittest.cc
@@ -9,6 +9,7 @@
 #include "base/logging.h"
 #include "base/test/bind_test_util.h"
 #include "base/test/mock_callback.h"
+#include "chrome/browser/android/explore_sites/blacklist_site_task.h"
 #include "chrome/browser/android/explore_sites/explore_sites_schema.h"
 #include "components/offline_pages/task/task.h"
 #include "components/offline_pages/task/task_test_base.h"
@@ -52,6 +53,24 @@
   EXPECT_EQ("example_2", site->title);
 }
 
+// Same as above, categories with no sites left after blacklisting are removed.
+void ValidateBlacklistTestingCatalog(GetCatalogTask::CategoryList* catalog) {
+  EXPECT_FALSE(catalog == nullptr);
+
+  EXPECT_EQ(1U, catalog->size());
+  ExploreSitesCategory* cat = &catalog->at(0);
+  EXPECT_EQ(3, cat->category_id);
+  EXPECT_EQ("5678", cat->version_token);
+  EXPECT_EQ(1, cat->category_type);
+  EXPECT_EQ("label_1", cat->label);
+
+  EXPECT_EQ(1U, cat->sites.size());
+  ExploreSitesSite* site = &cat->sites[0];
+  EXPECT_EQ("https://www.example.com/1", site->url.spec());
+  EXPECT_EQ(3, site->category_id);
+  EXPECT_EQ("example_1", site->title);
+}
+
 void ExpectSuccessGetCatalogResult(
     GetCatalogStatus status,
     std::unique_ptr<GetCatalogTask::CategoryList> catalog) {
@@ -59,6 +78,13 @@
   ValidateTestingCatalog(catalog.get());
 }
 
+void ExpectBlacklistGetCatalogResult(
+    GetCatalogStatus status,
+    std::unique_ptr<GetCatalogTask::CategoryList> catalog) {
+  EXPECT_EQ(GetCatalogStatus::kSuccess, status);
+  ValidateBlacklistTestingCatalog(catalog.get());
+}
+
 void ExpectEmptyGetCatalogResult(
     GetCatalogStatus status,
     std::unique_ptr<GetCatalogTask::CategoryList> catalog) {
@@ -100,6 +126,7 @@
   std::pair<std::string, std::string> GetCurrentAndDownloadingVersion();
   int GetNumberOfCategoriesInDB();
   int GetNumberOfSitesInDB();
+  void BlacklistSite(std::string url);
 
  private:
   std::unique_ptr<ExploreSitesStore> store_;
@@ -199,6 +226,13 @@
   return result;
 }
 
+void ExploreSitesGetCatalogTaskTest::BlacklistSite(std::string url) {
+  BlacklistSiteTask task(store(), url);
+  RunTask(&task);
+  // We don't actively wait for completion, so we rely on the blacklist request
+  // clearing the task queue before the task in the test proper runs.
+}
+
 TEST_F(ExploreSitesGetCatalogTaskTest, StoreFailure) {
   store()->SetInitializationStatusForTest(InitializationStatus::FAILURE);
 
@@ -227,6 +261,16 @@
   EXPECT_EQ(4, GetNumberOfSitesInDB());
 }
 
+// This tests that sites on the blacklist do not show up when we do a get
+// catalog task.
+TEST_F(ExploreSitesGetCatalogTaskTest, BlasklistedSitesDoNotAppear) {
+  BlacklistSite("https://www.example.com/2");
+  PopulateTestingCatalog();
+  GetCatalogTask task(store(), false,
+                      base::BindOnce(&ExpectBlacklistGetCatalogResult));
+  RunTask(&task);
+}
+
 TEST_F(ExploreSitesGetCatalogTaskTest, CatalogWithVersionUpdate) {
   PopulateTestingCatalog();
   // Update the testing catalog so that the older catalog is current and the
diff --git a/chrome/browser/android/explore_sites/image_helper.cc b/chrome/browser/android/explore_sites/image_helper.cc
index 7b417c4..d85887c7 100644
--- a/chrome/browser/android/explore_sites/image_helper.cc
+++ b/chrome/browser/android/explore_sites/image_helper.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/android/explore_sites/image_helper.h"
 
 #include "base/memory/weak_ptr.h"
+#include "base/metrics/histogram_macros.h"
 #include "chrome/browser/android/explore_sites/explore_sites_types.h"
 #include "content/public/common/service_manager_connection.h"
 #include "services/data_decoder/public/cpp/decode_image.h"
@@ -123,11 +124,17 @@
                             std::move(callback));
 }
 
-void ImageHelper::Job::OnDecodeSiteImageDone(const SkBitmap& decoded_image) {
-  DVLOG(1) << "Decoded site image, result "
-           << (decoded_image.isNull() ? "null" : "non-null");
+void RecordImageDecodedUMA(bool decoded) {
+  UMA_HISTOGRAM_BOOLEAN("ExploreSites.ImageDecoded", decoded);
+}
 
-  if (decoded_image.isNull()) {
+void ImageHelper::Job::OnDecodeSiteImageDone(const SkBitmap& decoded_image) {
+  bool decode_success = !decoded_image.isNull();
+  DVLOG(1) << "Decoded site image, result "
+           << (decode_success ? "non-null" : "null");
+  RecordImageDecodedUMA(decode_success);
+
+  if (!decode_success) {
     std::move(bitmap_callback_).Run(nullptr);
   } else {
     std::move(bitmap_callback_).Run(std::make_unique<SkBitmap>(decoded_image));
@@ -137,10 +144,12 @@
 
 void ImageHelper::Job::OnDecodeCategoryImageDone(
     const SkBitmap& decoded_image) {
+  bool decode_success = !decoded_image.isNull();
   DVLOG(1) << "Decoded image for category, result "
-           << (decoded_image.isNull() ? "null" : "non-null");
+           << (decode_success ? "non-null" : "null");
+  RecordImageDecodedUMA(decode_success);
 
-  if (decoded_image.isNull()) {
+  if (!decode_success) {
     num_icons_--;
   } else {
     bitmaps_.push_back(decoded_image);
diff --git a/chrome/browser/android/explore_sites/image_helper_unittest.cc b/chrome/browser/android/explore_sites/image_helper_unittest.cc
index 7b23998..02de1982 100644
--- a/chrome/browser/android/explore_sites/image_helper_unittest.cc
+++ b/chrome/browser/android/explore_sites/image_helper_unittest.cc
@@ -9,6 +9,7 @@
 
 #include "base/bind.h"
 #include "base/test/bind_test_util.h"
+#include "base/test/metrics/histogram_tester.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/test/test_simple_task_runner.h"
 #include "services/data_decoder/public/cpp/test_data_decoder_service.h"
@@ -61,6 +62,8 @@
     });
   }
 
+  const base::HistogramTester& histograms() const { return histogram_tester_; }
+
   std::vector<std::unique_ptr<SkBitmap>> last_bitmap_list;
 
  protected:
@@ -71,6 +74,7 @@
   }
 
   std::unique_ptr<service_manager::TestConnectorFactory> connector_factory_;
+  base::HistogramTester histogram_tester_;
 };
 
 // 1x1 webp image with color value of 0.
@@ -271,4 +275,35 @@
   }
 }
 
+// Test that the ExploreSites.ImageDecoded UMA works.
+TEST_F(ExploreSitesImageHelperTest, TestImageHelper_ImageDecodedUMA) {
+  ImageHelper image_helper;
+
+  // Record one success UMA from CompseSiteImage.
+  image_helper.ComposeSiteImage(StoreBitmap(), GetEncodedImageList(1),
+                                GetConnector());
+  scoped_task_environment_.RunUntilIdle();
+
+  histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 1);
+  histograms().ExpectBucketCount("ExploreSites.ImageDecoded", true, 1);
+
+  // Record one failure UMA from ComposeSiteImage.
+  EncodedImageList image_list;
+  image_list.push_back(std::make_unique<EncodedImageBytes>(kInvalidWebpBytes));
+  image_helper.ComposeSiteImage(StoreBitmap(), std::move(image_list),
+                                GetConnector());
+  scoped_task_environment_.RunUntilIdle();
+
+  histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 2);
+  histograms().ExpectBucketCount("ExploreSites.ImageDecoded", false, 1);
+
+  // Record 2 samples from ComposeCategoryImage.
+  image_helper.ComposeCategoryImage(StoreBitmap(), kIconSize,
+                                    GetEncodedImageList(2), GetConnector());
+  scoped_task_environment_.RunUntilIdle();
+
+  histograms().ExpectTotalCount("ExploreSites.ImageDecoded", 4);
+  histograms().ExpectBucketCount("ExploreSites.ImageDecoded", true, 3);
+}
+
 }  // namespace explore_sites
diff --git a/chrome/browser/android/feed/feed_content_bridge.cc b/chrome/browser/android/feed/feed_content_bridge.cc
index af63ccf5..eca73d9 100644
--- a/chrome/browser/android/feed/feed_content_bridge.cc
+++ b/chrome/browser/android/feed/feed_content_bridge.cc
@@ -120,7 +120,7 @@
     const JavaRef<jobject>& j_success_callback,
     const JavaRef<jobject>& j_failure_callback) {
   std::vector<std::string> keys;
-  AppendJavaStringArrayToStringVector(j_env, j_keys.obj(), &keys);
+  AppendJavaStringArrayToStringVector(j_env, j_keys, &keys);
   ScopedJavaGlobalRef<jobject> success_callback(j_success_callback);
   ScopedJavaGlobalRef<jobject> failure_callback(j_failure_callback);
 
@@ -207,7 +207,7 @@
   DCHECK(content_mutation_);
   std::string key(ConvertJavaStringToUTF8(j_env, j_key));
   std::string data;
-  JavaByteArrayToString(j_env, j_data.obj(), &data);
+  JavaByteArrayToString(j_env, j_data, &data);
 
   content_mutation_->AppendUpsertOperation(key, data);
 }
diff --git a/chrome/browser/android/feed/feed_journal_bridge.cc b/chrome/browser/android/feed/feed_journal_bridge.cc
index 1c32417d..e285438 100644
--- a/chrome/browser/android/feed/feed_journal_bridge.cc
+++ b/chrome/browser/android/feed/feed_journal_bridge.cc
@@ -200,7 +200,7 @@
     const base::android::JavaRef<jbyteArray>& j_value) {
   DCHECK(journal_mutation_);
   std::vector<uint8_t> bytes_vector;
-  JavaByteArrayToByteVector(j_env, j_value.obj(), &bytes_vector);
+  JavaByteArrayToByteVector(j_env, j_value, &bytes_vector);
   journal_mutation_->AddAppendOperation(
       std::string(bytes_vector.begin(), bytes_vector.end()));
 }
diff --git a/chrome/browser/android/feed/feed_network_bridge.cc b/chrome/browser/android/feed/feed_network_bridge.cc
index 3b7b310..01e4144 100644
--- a/chrome/browser/android/feed/feed_network_bridge.cc
+++ b/chrome/browser/android/feed/feed_network_bridge.cc
@@ -74,7 +74,7 @@
   FeedNetworkingHost::ResponseCallback callback =
       base::BindOnce(&OnResult, ScopedJavaGlobalRef<jobject>(env, j_callback));
   std::vector<uint8_t> request_body;
-  base::android::JavaByteArrayToByteVector(env, j_body.obj(), &request_body);
+  base::android::JavaByteArrayToByteVector(env, j_body, &request_body);
 
   networking_host_->Send(url, ConvertJavaStringToUTF8(env, j_request_type),
                          std::move(request_body), std::move(callback));
diff --git a/chrome/browser/android/feed/feed_offline_bridge.cc b/chrome/browser/android/feed/feed_offline_bridge.cc
index 68a55404..b7106c7 100644
--- a/chrome/browser/android/feed/feed_offline_bridge.cc
+++ b/chrome/browser/android/feed/feed_offline_bridge.cc
@@ -87,7 +87,7 @@
                                          const JavaRef<jobjectArray>& j_urls,
                                          const JavaRef<jobject>& j_callback) {
   std::vector<std::string> urls;
-  base::android::AppendJavaStringArrayToStringVector(env, j_urls.obj(), &urls);
+  base::android::AppendJavaStringArrayToStringVector(env, j_urls, &urls);
   ScopedJavaGlobalRef<jobject> callback(j_callback);
   offline_host_->GetOfflineStatus(
       std::move(urls), base::BindOnce(&OnGetOfflineStatus, callback));
@@ -98,7 +98,7 @@
     const base::android::JavaRef<jobject>& j_this,
     const base::android::JavaRef<jobjectArray>& j_urls) {
   std::vector<std::string> urls;
-  base::android::AppendJavaStringArrayToStringVector(env, j_urls.obj(), &urls);
+  base::android::AppendJavaStringArrayToStringVector(env, j_urls, &urls);
   offline_host_->OnContentRemoved(urls);
 }
 
diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
index dab8803c..b46ba4e 100644
--- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
+++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -202,8 +202,7 @@
     base::android::JavaIntArrayToIntVector(
         env,
         Java_ServiceWorkerPaymentAppBridge_getSupportedNetworksFromMethodData(
-            env, element)
-            .obj(),
+            env, element),
         &supported_network_ints);
     ConvertIntsToEnums<BasicCardNetwork>(supported_network_ints,
                                          &method_data_item->supported_networks);
@@ -212,8 +211,7 @@
     base::android::JavaIntArrayToIntVector(
         env,
         Java_ServiceWorkerPaymentAppBridge_getSupportedTypesFromMethodData(
-            env, element)
-            .obj(),
+            env, element),
         &supported_type_ints);
     ConvertIntsToEnums<BasicCardType>(supported_type_ints,
                                       &method_data_item->supported_types);
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index dd13c9a..2956b73 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -1183,9 +1183,9 @@
     std::vector<std::string>* out) {
   JNIEnv* env = AttachCurrentThread();
   base::android::AppendJavaStringArrayToStringVector(
-      env, Java_PrefServiceBridge_getAndroidPermissionsForContentSetting(
-               env, content_type)
-               .obj(),
+      env,
+      Java_PrefServiceBridge_getAndroidPermissionsForContentSetting(
+          env, content_type),
       out);
 }
 
diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc
index a6082f3..0db30554 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -767,7 +767,7 @@
 
   if (!favicon.is_null()) {
     std::vector<uint8_t> bytes;
-    base::android::JavaByteArrayToByteVector(env, favicon.obj(), &bytes);
+    base::android::JavaByteArrayToByteVector(env, favicon, &bytes);
     row->set_favicon(base::RefCountedBytes::TakeVector(&bytes));
   }
 
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index 4b94289a..f0fd40d 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -54,7 +54,7 @@
   ScopedJavaLocalRef<jintArray> java_size_array =
       Java_ShortcutHelper_getHomeScreenIconAndSplashImageSizes(env);
   std::vector<int> sizes;
-  base::android::JavaIntArrayToIntVector(env, java_size_array.obj(), &sizes);
+  base::android::JavaIntArrayToIntVector(env, java_size_array, &sizes);
 
   // Check that the size returned is what is expected.
   DCHECK(sizes.size() == 5);
diff --git a/chrome/browser/android/subresource_filter/test_subresource_filter_publisher.cc b/chrome/browser/android/subresource_filter/test_subresource_filter_publisher.cc
index 1cb170a..8ccf88f4 100644
--- a/chrome/browser/android/subresource_filter/test_subresource_filter_publisher.cc
+++ b/chrome/browser/android/subresource_filter/test_subresource_filter_publisher.cc
@@ -96,7 +96,6 @@
 
   subresource_filter::ContentRulesetService* service =
       g_browser_process->subresource_filter_ruleset_service();
-  service->SetIsAfterStartupForTesting();
   service->SetRulesetPublishedCallbackForTesting(base::BindRepeating(
       &OnPublished, base::Passed(&scoped_temp_dir), service, publisher));
 
diff --git a/chrome/browser/android/webapk/webapk_update_manager.cc b/chrome/browser/android/webapk/webapk_update_manager.cc
index 44d5293..ade0dd5 100644
--- a/chrome/browser/android/webapk/webapk_update_manager.cc
+++ b/chrome/browser/android/webapk/webapk_update_manager.cc
@@ -89,12 +89,12 @@
       GURL(ConvertJavaStringToUTF8(env, java_badge_icon_url));
   info.manifest_url = GURL(ConvertJavaStringToUTF8(env, java_web_manifest_url));
 
-  base::android::AppendJavaStringArrayToStringVector(env, java_icon_urls.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, java_icon_urls,
                                                      &info.icon_urls);
 
   std::vector<std::string> icon_hashes;
-  base::android::AppendJavaStringArrayToStringVector(
-      env, java_icon_hashes.obj(), &icon_hashes);
+  base::android::AppendJavaStringArrayToStringVector(env, java_icon_hashes,
+                                                     &icon_hashes);
 
   std::map<std::string, std::string> icon_url_to_murmur2_hash;
   for (size_t i = 0; i < info.icon_urls.size(); ++i)
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm
index 1835aa3..637ee94c4 100644
--- a/chrome/browser/chrome_browser_main_mac.mm
+++ b/chrome/browser/chrome_browser_main_mac.mm
@@ -24,7 +24,6 @@
 #import "chrome/browser/chrome_browser_application_mac.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/mac/install_from_dmg.h"
-#include "chrome/browser/mac/keychain_reauthorize.h"
 #import "chrome/browser/mac/keystone_glue.h"
 #include "chrome/browser/mac/mac_startup_profiler.h"
 #include "chrome/browser/ui/cocoa/main_menu_builder.h"
@@ -132,17 +131,6 @@
   chrome::BuildMainMenu(NSApp, app_controller);
   [app_controller mainMenuCreated];
 
-  // Do Keychain reauthorization. This gets two chances to run. If the first
-  // try doesn't complete successfully (crashes or is interrupted for any
-  // reason), there will be a second chance. Once this step completes
-  // successfully, it should never have to run again.
-  NSString* const keychain_reauthorize_pref =
-      @"KeychainReauthorizeInAppSpring2017";
-  const int kKeychainReauthorizeMaxTries = 2;
-
-  chrome::KeychainReauthorizeIfNeeded(keychain_reauthorize_pref,
-                                      kKeychainReauthorizeMaxTries);
-
   // Initialize the OSCrypt.
   PrefService* local_state = g_browser_process->local_state();
   DCHECK(local_state);
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 6eb6f84..b57496d 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -80,6 +80,7 @@
 #include "chrome/browser/prerender/prerender_message_filter.h"
 #include "chrome/browser/prerender/prerender_util.h"
 #include "chrome/browser/previews/previews_lite_page_decider.h"
+#include "chrome/browser/previews/previews_lite_page_navigation_throttle.h"
 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_io_data.h"
@@ -2581,11 +2582,13 @@
 
 scoped_refptr<network::SharedURLLoaderFactory>
 ChromeContentBrowserClient::GetSystemSharedURLLoaderFactory() {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  if (!g_browser_process->system_network_context_manager())
+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
+         !BrowserThread::IsThreadInitialized(BrowserThread::UI));
+
+  if (!SystemNetworkContextManager::GetInstance())
     return nullptr;
 
-  return g_browser_process->system_network_context_manager()
+  return SystemNetworkContextManager::GetInstance()
       ->GetSharedURLLoaderFactory();
 }
 
@@ -3263,6 +3266,11 @@
   // chrome: & friends.
   handler->AddHandlerPair(&ChromeContentBrowserClient::HandleWebUI,
                           &ChromeContentBrowserClient::HandleWebUIReverse);
+
+  // Handler to rewrite Preview's Server Lite Page, to show the original URL to
+  // the user.
+  handler->AddHandlerPair(&HandlePreviewsLitePageURLRewrite,
+                          &HandlePreviewsLitePageURLRewriteReverse);
 }
 
 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
diff --git a/chrome/browser/chrome_navigation_browsertest.cc b/chrome/browser/chrome_navigation_browsertest.cc
index 270eed5..9c05238 100644
--- a/chrome/browser/chrome_navigation_browsertest.cc
+++ b/chrome/browser/chrome_navigation_browsertest.cc
@@ -660,11 +660,6 @@
 // commit in the error page process when it is redirected to.
 IN_PROC_BROWSER_TEST_F(ChromeNavigationBrowserTest,
                        RedirectErrorPageReloadToAboutBlank) {
-  // TODO(nasko): Skip running this test with Network Service until
-  // https://crbug.com/894480 is fixed.
-  if (base::FeatureList::IsEnabled(network::features::kNetworkService))
-    return;
-
   content::WebContents* web_contents =
       browser()->tab_strip_model()->GetActiveWebContents();
   GURL url(embedded_test_server()->GetURL("a.com", "/title1.html"));
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index b9a7f71..873b29ac 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -2191,6 +2191,7 @@
     "login/demo_mode/demo_mode_resources_remover_unittest.cc",
     "login/demo_mode/demo_session_unittest.cc",
     "login/demo_mode/demo_setup_controller_unittest.cc",
+    "login/demo_mode/demo_setup_test_utils.cc",
     "login/demo_mode/demo_setup_test_utils.h",
     "login/easy_unlock/easy_unlock_challenge_wrapper_unittest.cc",
     "login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc",
diff --git a/chrome/browser/chromeos/arc/arc_optin_uma.h b/chrome/browser/chromeos/arc/arc_optin_uma.h
index 12f13a7..2542980 100644
--- a/chrome/browser/chromeos/arc/arc_optin_uma.h
+++ b/chrome/browser/chromeos/arc/arc_optin_uma.h
@@ -36,7 +36,10 @@
   // ARC was opted out by user from session.
   SESSION_OPTED_OUT = 9,
 
-  kMaxValue = SESSION_OPTED_OUT,
+  // ARC was opted in due to configuration in OOBE flow.
+  OOBE_OPTED_IN_CONFIGURATION = 10,
+
+  kMaxValue = OOBE_OPTED_IN_CONFIGURATION,
 };
 
 enum class OptInCancelReason {
diff --git a/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc b/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc
index 36382f3..f35bc473 100644
--- a/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc
+++ b/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc
@@ -100,9 +100,16 @@
     // For example, if a user opts-in ARC on OOBE, and later opts-out via
     // settings page, OOBE_OPTED_IN and SESSION_OPTED_OUT will be recorded.
     if (IsArcOobeOptInActive()) {
-      UpdateOptInActionUMA(is_play_store_enabled
-                               ? OptInActionType::OOBE_OPTED_IN
-                               : OptInActionType::OOBE_OPTED_OUT);
+      OptInActionType type;
+      if (IsArcOobeOptInConfigurationBased()) {
+        type = is_play_store_enabled
+                   ? OptInActionType::OOBE_OPTED_IN_CONFIGURATION
+                   : OptInActionType::OOBE_OPTED_OUT;
+      } else {
+        type = is_play_store_enabled ? OptInActionType::OOBE_OPTED_IN
+                                     : OptInActionType::OOBE_OPTED_OUT;
+      }
+      UpdateOptInActionUMA(type);
     } else {
       UpdateOptInActionUMA(is_play_store_enabled
                                ? OptInActionType::SESSION_OPTED_IN
diff --git a/chrome/browser/chromeos/arc/arc_util.cc b/chrome/browser/chromeos/arc/arc_util.cc
index 7bdf54a5..81dc64b 100644
--- a/chrome/browser/chromeos/arc/arc_util.cc
+++ b/chrome/browser/chromeos/arc/arc_util.cc
@@ -23,8 +23,10 @@
 #include "base/threading/scoped_blocking_call.h"
 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
 #include "chrome/browser/chromeos/arc/policy/arc_policy_util.h"
+#include "chrome/browser/chromeos/login/configuration_keys.h"
 #include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
 #include "chrome/browser/chromeos/login/demo_mode/demo_setup_controller.h"
+#include "chrome/browser/chromeos/login/oobe_configuration.h"
 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
 #include "chrome/browser/chromeos/login/user_flow.h"
 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
@@ -450,6 +452,25 @@
   return !IsArcOptInWizardForAssistantActive();
 }
 
+bool IsArcOobeOptInConfigurationBased() {
+  // Ignore if not applicable.
+  if (!IsArcOobeOptInActive())
+    return false;
+  // Check that configuration exist.
+  auto* oobe_configuration = chromeos::OobeConfiguration::Get();
+  if (!oobe_configuration)
+    return false;
+  if (!oobe_configuration->CheckCompleted())
+    return false;
+  // Check configuration value that triggers automatic ARC TOS acceptance.
+  auto& configuration = oobe_configuration->GetConfiguration();
+  auto* auto_accept = configuration.FindKeyOfType(
+      chromeos::configuration::kArcTosAutoAccept, base::Value::Type::BOOLEAN);
+  if (!auto_accept)
+    return false;
+  return auto_accept->GetBool();
+}
+
 bool IsArcOptInWizardForAssistantActive() {
   // Check if Assistant Wizard is currently showing.
   // TODO(b/65861628): Redesign the OptIn flow since there is no longer reason
diff --git a/chrome/browser/chromeos/arc/arc_util.h b/chrome/browser/chromeos/arc/arc_util.h
index 6e6f117..189c6b3f 100644
--- a/chrome/browser/chromeos/arc/arc_util.h
+++ b/chrome/browser/chromeos/arc/arc_util.h
@@ -128,6 +128,9 @@
 // Returns true if ChromeOS OOBE opt-in window is currently showing.
 bool IsArcOobeOptInActive();
 
+// Returns true if opt-in during ChromeOS OOBE is triggered by configuration.
+bool IsArcOobeOptInConfigurationBased();
+
 // Returns true if OPA opt-in window is currently showing and active screen is
 // ARC ToS.
 bool IsArcOptInWizardForAssistantActive();
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index 8b31f902..7ee42977 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -197,9 +197,6 @@
         TestCase("fileSearch"),
         TestCase("fileDisplayWithoutDownloadsVolume"),
         TestCase("fileDisplayWithoutVolumes"),
-        TestCase("fileDisplayWithoutVolumesThenMountDownloads"),
-        TestCase("fileDisplayWithoutVolumesThenMountDrive"),
-        TestCase("fileDisplayWithoutVolumesThenMountDrive").EnableDriveFs(),
         TestCase("fileSearchCaseInsensitive"),
         TestCase("fileSearchNotFound")));
 
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
index e1c31eef..9184e27 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
@@ -828,18 +828,6 @@
     return integration_service_;
   }
 
-  bool Mount(Profile* profile) {
-    if (profile != profile_)
-      return false;
-
-    if (!integration_service_)
-      return false;
-
-    integration_service_->SetEnabled(true);
-    CreateDriveFsConnectionDelegate();
-    return true;
-  }
-
   void Unmount() { integration_service_->SetEnabled(false); }
 
  private:
@@ -1367,11 +1355,6 @@
     return;
   }
 
-  if (name == "mountDrive") {
-    ASSERT_TRUE(drive_volume_->Mount(profile()));
-    return;
-  }
-
   if (name == "mountDownloads") {
     ASSERT_TRUE(local_volume_->Mount(profile()));
     return;
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index 666a4d2..96a4d9c 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -209,6 +209,7 @@
     chromeos::switches::kHasChromeOSKeyboard,
     chromeos::switches::kLoginProfile,
     chromeos::switches::kNaturalScrollDefault,
+    chromeos::switches::kRlzPingDelay,
     chromeos::switches::kSystemInDevMode,
     policy::switches::kDeviceManagementUrl,
     wm::switches::kWindowAnimationsDisabled,
diff --git a/chrome/browser/chromeos/login/configuration_keys.cc b/chrome/browser/chromeos/login/configuration_keys.cc
index dc125e8..68317d4 100644
--- a/chrome/browser/chromeos/login/configuration_keys.cc
+++ b/chrome/browser/chromeos/login/configuration_keys.cc
@@ -18,12 +18,26 @@
 // automatically.
 const char kWelcomeNext[] = "welcomeNext";
 
+// Boolean value indicating if device should automatically run the demo mode
+// setup flow.
+const char kEnableDemoMode[] = "enableDemoMode";
+
+// == Demo mode preferences:
+
+// Boolean value indicating if "Ok" button on Demo mode prefs screen is pressed
+// automatically.
+const char kDemoModePreferencesNext[] = "demoPreferencesNext";
+
 // == Network screen:
 
 // String value specifying GUID of the network that would be automatically
 // selected.
 const char kNetworkSelectGUID[] = "networkSelectGuid";
 
+// Boolean value indicating if "Offline demo mode" should be automatically
+// selected.
+const char kNetworkOfflineDemo[] = "networkOfflineDemo";
+
 // == EULA screen:
 
 // Boolean value indicating if device should send usage statistics.
@@ -32,6 +46,12 @@
 // Boolean value indicating if the EULA is automatically accepted.
 const char kEULAAutoAccept[] = "eulaAutoAccept";
 
+// ARC++ TOS screen:
+
+// Boolean value indicating if ARC++ Terms of service should be accepted
+// automatically.
+const char kArcTosAutoAccept[] = "arcTosAutoAccept";
+
 // == Update screen:
 
 // Boolean value, indicating that all non-critical updates should be skipped.
@@ -89,6 +109,13 @@
      ConfigurationHandlerSide::HANDLER_CPP},
     {kEnrollmentLocation, ValueType::BOOLEAN,
      ConfigurationHandlerSide::HANDLER_CPP},
+    {kEnableDemoMode, ValueType::BOOLEAN, ConfigurationHandlerSide::HANDLER_JS},
+    {kDemoModePreferencesNext, ValueType::BOOLEAN,
+     ConfigurationHandlerSide::HANDLER_JS},
+    {kNetworkOfflineDemo, ValueType::BOOLEAN,
+     ConfigurationHandlerSide::HANDLER_JS},
+    {kArcTosAutoAccept, ValueType::BOOLEAN,
+     ConfigurationHandlerSide::HANDLER_BOTH},
     {"desc", ValueType::STRING, ConfigurationHandlerSide::HANDLER_DOC},
     {"testValue", ValueType::STRING, ConfigurationHandlerSide::HANDLER_BOTH},
 };
diff --git a/chrome/browser/chromeos/login/configuration_keys.h b/chrome/browser/chromeos/login/configuration_keys.h
index 2374186..a0e464b 100644
--- a/chrome/browser/chromeos/login/configuration_keys.h
+++ b/chrome/browser/chromeos/login/configuration_keys.h
@@ -13,14 +13,20 @@
 // Please keep keys grouped by screens and ordered according to OOBE flow.
 
 extern const char kWelcomeNext[];
+extern const char kEnableDemoMode[];
+
+extern const char kDemoModePreferencesNext[];
 
 extern const char kNetworkSelectGUID[];
+extern const char kNetworkOfflineDemo[];
 
 extern const char kDeviceRequisition[];
 
 extern const char kEULASendUsageStatistics[];
 extern const char kEULAAutoAccept[];
 
+extern const char kArcTosAutoAccept[];
+
 extern const char kUpdateSkipUpdate[];
 
 extern const char kWizardAutoEnroll[];
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.cc b/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.cc
new file mode 100644
index 0000000..86bcac6
--- /dev/null
+++ b/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.cc
@@ -0,0 +1,50 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h"
+
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "components/policy/proto/device_management_backend.pb.h"
+
+namespace chromeos {
+
+namespace test {
+
+bool SetupDummyOfflinePolicyDir(const std::string& account_id,
+                                base::ScopedTempDir* temp_dir) {
+  if (!temp_dir->CreateUniqueTempDir()) {
+    LOG(ERROR) << "Failed to create unique tempdir";
+    return false;
+  }
+
+  if (base::WriteFile(temp_dir->GetPath().AppendASCII("device_policy"), "",
+                      0) != 0) {
+    LOG(ERROR) << "Failed to create device_policy file";
+    return false;
+  }
+
+  // We use MockCloudPolicyStore for the device local account policy in the
+  // tests, thus actual policy content can be empty. account_id is specified
+  // since it is used by DemoSetupController to look up the store.
+  std::string policy_blob;
+  if (!account_id.empty()) {
+    enterprise_management::PolicyData policy_data;
+    policy_data.set_username(account_id);
+    enterprise_management::PolicyFetchResponse policy;
+    policy.set_policy_data(policy_data.SerializeAsString());
+    policy_blob = policy.SerializeAsString();
+  }
+  if (base::WriteFile(temp_dir->GetPath().AppendASCII("local_account_policy"),
+                      policy_blob.data(), policy_blob.size()) !=
+      static_cast<int>(policy_blob.size())) {
+    LOG(ERROR) << "Failed to create local_account_policy file";
+    return false;
+  }
+  return true;
+}
+
+}  // namespace test
+
+}  // namespace chromeos
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h b/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h
index d51aa47..9f7cb76 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h
+++ b/chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h
@@ -7,14 +7,11 @@
 
 #include <string>
 
-#include "base/files/file_path.h"
-#include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_mock.h"
 #include "chrome/browser/chromeos/policy/enrollment_config.h"
 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
-#include "components/policy/proto/device_management_backend.pb.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -78,37 +75,7 @@
 
 // Creates fake offline policy directory to be used in tests.
 bool SetupDummyOfflinePolicyDir(const std::string& account_id,
-                                base::ScopedTempDir* temp_dir) {
-  if (!temp_dir->CreateUniqueTempDir()) {
-    LOG(ERROR) << "Failed to create unique tempdir";
-    return false;
-  }
-
-  if (base::WriteFile(temp_dir->GetPath().AppendASCII("device_policy"), "",
-                      0) != 0) {
-    LOG(ERROR) << "Failed to create device_policy file";
-    return false;
-  }
-
-  // We use MockCloudPolicyStore for the device local account policy in the
-  // tests, thus actual policy content can be empty. account_id is specified
-  // since it is used by DemoSetupController to look up the store.
-  std::string policy_blob;
-  if (!account_id.empty()) {
-    enterprise_management::PolicyData policy_data;
-    policy_data.set_username(account_id);
-    enterprise_management::PolicyFetchResponse policy;
-    policy.set_policy_data(policy_data.SerializeAsString());
-    policy_blob = policy.SerializeAsString();
-  }
-  if (base::WriteFile(temp_dir->GetPath().AppendASCII("local_account_policy"),
-                      policy_blob.data(), policy_blob.size()) !=
-      static_cast<int>(policy_blob.size())) {
-    LOG(ERROR) << "Failed to create local_account_policy file";
-    return false;
-  }
-  return true;
-}
+                                base::ScopedTempDir* temp_dir);
 
 }  // namespace test
 
diff --git a/chrome/browser/chromeos/login/easy_unlock/OWNERS b/chrome/browser/chromeos/login/easy_unlock/OWNERS
index 964c9a9d..e4c0750 100644
--- a/chrome/browser/chromeos/login/easy_unlock/OWNERS
+++ b/chrome/browser/chromeos/login/easy_unlock/OWNERS
@@ -1,4 +1,4 @@
-xiyuan@chromium.org
+hansberry@chromium.org
 jhawkins@chromium.org
 
 # COMPONENT: UI>ProximityAuth
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
index e0228d8..4d926077 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
@@ -8,6 +8,8 @@
 #include "base/macros.h"
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/login/demo_mode/demo_setup_controller.h"
+#include "chrome/browser/chromeos/login/demo_mode/demo_setup_test_utils.h"
 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h"
 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.h"
@@ -21,6 +23,7 @@
 #include "chrome/browser/chromeos/login/wizard_controller.h"
 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
+#include "chromeos/chromeos_switches.h"
 #include "chromeos/chromeos_test_utils.h"
 #include "chromeos/dbus/dbus_switches.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -32,6 +35,7 @@
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/test_utils.h"
 
+using chromeos::test::SetupDummyOfflinePolicyDir;
 using testing::_;
 using testing::Invoke;
 using testing::InvokeWithoutArgs;
@@ -602,7 +606,14 @@
     InitializeWebContents();
   }
 
-  void ResetHelper() { enrollment_screen()->enrollment_helper_.reset(); }
+  void SimulateOfflineEnvironment() {
+    DemoSetupController* controller =
+        WizardController::default_controller()->demo_setup_controller();
+
+    // Simulate offline data directory.
+    ASSERT_TRUE(test::SetupDummyOfflinePolicyDir("test", &fake_policy_dir_));
+    controller->SetOfflineDataDirForTest(fake_policy_dir_.GetPath());
+  }
 
   void SetUpInProcessBrowserTestFixture() override {
     OobeConfiguration::set_skip_check_for_testing(true);
@@ -631,6 +642,10 @@
     command_line->AppendSwitchPath(chromeos::switches::kFakeOobeConfiguration,
                                    file);
 
+    command_line->AppendSwitch(chromeos::switches::kEnableOfflineDemoMode);
+    command_line->AppendSwitchASCII(switches::kArcAvailability,
+                                    "officially-supported");
+
     EnterpriseEnrollmentTestBase::SetUpCommandLine(command_line);
   }
 
@@ -656,10 +671,17 @@
     NetworkHandler::Get()->network_state_handler()->SetCheckPortalList("");
   }
 
+  void TearDownOnMainThread() override {
+    enrollment_screen()->enrollment_helper_.reset();
+    EnterpriseEnrollmentTestBase::TearDownOnMainThread();
+  }
+
  protected:
   // Owned by DBusThreadManagerSetter
   chromeos::FakeUpdateEngineClient* fake_update_engine_client_;
 
+  base::ScopedTempDir fake_policy_dir_;
+
  private:
   DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentConfigurationTest);
 };
@@ -906,60 +928,6 @@
   enrollment_screen()->enrollment_helper_.reset();
 }
 
-// Check that configuration lets correctly pass Welcome screen.
-IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
-                       TestLeaveWelcomeScreen) {
-  LoadConfiguration();
-  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_NETWORK).Wait();
-  // We have to remove the enrollment_helper before the dtor gets called.
-  ResetHelper();
-}
-
-// Check that configuration lets correctly select a network by GUID.
-IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
-                       TestSelectNetwork) {
-  LoadConfiguration();
-  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_EULA).Wait();
-  // We have to remove the enrollment_helper before the dtor gets called.
-  ResetHelper();
-}
-
-// Check that when configuration has ONC and EULA, we get to update screen.
-IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest, TestAcceptEula) {
-  UpdateEngineClient::Status status;
-  status.status = UpdateEngineClient::UPDATE_STATUS_DOWNLOADING;
-  status.download_progress = 0.1;
-  fake_update_engine_client_->set_default_status(status);
-
-  LoadConfiguration();
-  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_UPDATE).Wait();
-  // We have to remove the enrollment_helper before the dtor gets called.
-  ResetHelper();
-}
-
-// Check that when configuration has ONC and EULA, we get to update screen.
-IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest, TestSkipUpdate) {
-  LoadConfiguration();
-  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait();
-  EXPECT_TRUE(IsStepDisplayed("signin"));
-  // We have to remove the enrollment_helper before the dtor gets called.
-  ResetHelper();
-}
-
-// Check that when configuration has requisition, it gets applied at the
-// beginning.
-IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
-                       TestDeviceRequisition) {
-  LoadConfiguration();
-  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_EULA).Wait();
-  auto* policy_manager = g_browser_process->platform_part()
-                             ->browser_policy_connector_chromeos()
-                             ->GetDeviceCloudPolicyManager();
-  EXPECT_EQ(policy_manager->GetDeviceRequisition(), "some_requisition");
-  // We have to remove the enrollment_helper before the dtor gets called.
-  ResetHelper();
-}
-
 // Check that configuration for the streamline Active Directory domain join
 // propagates correctly to the Domain Join UI.
 IN_PROC_BROWSER_TEST_F(ActiveDirectoryJoinTest,
@@ -1006,4 +974,97 @@
   enrollment_screen()->enrollment_helper_.reset();
 }
 
+// Check that configuration lets correctly pass Welcome screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestLeaveWelcomeScreen) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_NETWORK).Wait();
+}
+
+// Check that configuration lets correctly start Demo mode setup.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestEnableDemoMode) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_DEMO_PREFERENCES).Wait();
+}
+
+// Check that configuration lets correctly pass through demo preferences.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestDemoModePreferences) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_NETWORK).Wait();
+}
+
+// Check that configuration lets correctly use offline demo mode on network
+// screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestDemoModeOfflineNetwork) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_EULA).Wait();
+}
+
+// Check that configuration lets correctly use offline demo mode on EULA
+// screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestDemoModeAcceptEula) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_ARC_TERMS_OF_SERVICE).Wait();
+}
+
+// Check that configuration lets correctly use offline demo mode on ARC++ ToS
+// screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestDemoModeAcceptArcTos) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_DEMO_PREFERENCES).Wait();
+
+  js_checker().Evaluate(
+      "login.ArcTermsOfServiceScreen.setTosForTesting('Test "
+      "Play Store Terms of Service');");
+  SimulateOfflineEnvironment();
+  js_checker().Evaluate(
+      "$('demo-preferences-content').$$('oobe-dialog')."
+      "querySelector('oobe-text-button').click();");
+
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_DEMO_SETUP).Wait();
+}
+
+// Check that configuration lets correctly select a network by GUID.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestSelectNetwork) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_EULA).Wait();
+}
+
+// Check that when configuration has ONC and EULA, we get to update screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest, TestAcceptEula) {
+  UpdateEngineClient::Status status;
+  status.status = UpdateEngineClient::UPDATE_STATUS_DOWNLOADING;
+  status.download_progress = 0.1;
+  fake_update_engine_client_->set_default_status(status);
+
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_UPDATE).Wait();
+}
+
+// Check that configuration allows to skip Update screen and get to Enrollment
+// screen.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest, TestSkipUpdate) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT).Wait();
+  EXPECT_TRUE(IsStepDisplayed("signin"));
+}
+
+// Check that when configuration has requisition, it gets applied at the
+// beginning.
+IN_PROC_BROWSER_TEST_F(EnterpriseEnrollmentConfigurationTest,
+                       TestDeviceRequisition) {
+  LoadConfiguration();
+  OobeScreenWaiter(OobeScreen::SCREEN_OOBE_EULA).Wait();
+  auto* policy_manager = g_browser_process->platform_part()
+                             ->browser_policy_connector_chromeos()
+                             ->GetDeviceCloudPolicyManager();
+  EXPECT_EQ(policy_manager->GetDeviceRequisition(), "some_requisition");
+}
+
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.cc b/chrome/browser/chromeos/login/lock/views_screen_locker.cc
index 0ab96f0..ae877463 100644
--- a/chrome/browser/chromeos/login/lock/views_screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/views_screen_locker.cc
@@ -13,6 +13,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/i18n/time_formatting.h"
+#include "base/location.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
@@ -44,6 +45,8 @@
 constexpr char kLockDisplay[] = "lock";
 constexpr char kExternalBinaryAuth[] = "external_binary_auth";
 constexpr char kWebCameraDeviceContext[] = "WebCamera: WebCamera";
+constexpr base::TimeDelta kExternalBinaryAuthTimeout =
+    base::TimeDelta::FromSeconds(2);
 
 ash::mojom::FingerprintUnlockState ConvertFromFingerprintState(
     ScreenLocker::FingerprintState state) {
@@ -233,6 +236,10 @@
     const AccountId& account_id,
     AuthenticateUserWithExternalBinaryCallback callback) {
   authenticate_with_external_binary_callback_ = std::move(callback);
+  external_binary_auth_timer_.Start(
+      FROM_HERE, kExternalBinaryAuthTimeout,
+      base::BindOnce(&ViewsScreenLocker::OnExternalBinaryAuthTimeout,
+                     weak_factory_.GetWeakPtr()));
   media_analytics_client_->GetState(base::BindOnce(
       &StartGraphIfNeeded, media_analytics_client_, kExternalBinaryAuth));
 }
@@ -335,17 +342,14 @@
     return;
 
   const mri::FramePerception& frame = media_perception.frame_perception(0);
-  if (frame.frame_id() != 1) {
-    // TODO: implement some sort of auto-retry logic.
-    std::move(authenticate_with_external_binary_callback_)
-        .Run(false /*auth_success*/);
+  if (frame.frame_id() != 1)
     return;
-  }
 
   mri::State new_state;
   new_state.set_status(mri::State::SUSPENDED);
   media_analytics_client_->SetState(new_state, base::DoNothing());
 
+  external_binary_auth_timer_.Stop();
   std::move(authenticate_with_external_binary_callback_)
       .Run(true /*auth_success*/);
   ScreenLocker::Hide();
@@ -376,4 +380,12 @@
       account_id, can_authenticate);
 }
 
+void ViewsScreenLocker::OnExternalBinaryAuthTimeout() {
+  std::move(authenticate_with_external_binary_callback_)
+      .Run(false /*auth_success*/);
+  mri::State new_state;
+  new_state.set_status(mri::State::SUSPENDED);
+  media_analytics_client_->SetState(new_state, base::DoNothing());
+}
+
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.h b/chrome/browser/chromeos/login/lock/views_screen_locker.h
index 75ff2d6..26a063e3 100644
--- a/chrome/browser/chromeos/login/lock/views_screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/views_screen_locker.h
@@ -7,6 +7,7 @@
 
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
+#include "base/timer/timer.h"
 #include "chrome/browser/chromeos/lock_screen_apps/focus_cycler_delegate.h"
 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
 #include "chrome/browser/chromeos/settings/cros_settings.h"
@@ -89,6 +90,7 @@
   void UpdatePinKeyboardState(const AccountId& account_id);
   void OnAllowedInputMethodsChanged();
   void OnPinCanAuthenticate(const AccountId& account_id, bool can_authenticate);
+  void OnExternalBinaryAuthTimeout();
 
   std::unique_ptr<UserBoardViewMojo> user_board_view_mojo_;
   std::unique_ptr<UserSelectionScreen> user_selection_screen_;
@@ -121,6 +123,10 @@
 
   chromeos::MediaAnalyticsClient* media_analytics_client_;
 
+  // Timer for external binary auth attempt. Allows repeated auth attempts up to
+  // a specific timeout.
+  base::OneShotTimer external_binary_auth_timer_;
+
   ScopedObserver<chromeos::MediaAnalyticsClient, ViewsScreenLocker>
       scoped_observer_{this};
 
diff --git a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.cc b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.cc
index 5ae52e9..738fa12 100644
--- a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
 
 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
 #include "components/prefs/pref_registry_simple.h"
 #include "components/prefs/pref_service.h"
@@ -17,17 +18,18 @@
   registry->RegisterIntegerPref(prefs::kQuickUnlockFingerprintRecord, 0);
 }
 
-FingerprintStorage::FingerprintStorage(PrefService* pref_service)
-    : pref_service_(pref_service) {}
+FingerprintStorage::FingerprintStorage(Profile* profile) : profile_(profile) {}
 
 FingerprintStorage::~FingerprintStorage() {}
 
 bool FingerprintStorage::IsFingerprintAvailable() const {
-  return !ExceededUnlockAttempts() && IsFingerprintEnabled() && HasRecord();
+  return !ExceededUnlockAttempts() && IsFingerprintEnabled(profile_) &&
+         HasRecord();
 }
 
 bool FingerprintStorage::HasRecord() const {
-  return pref_service_->GetInteger(prefs::kQuickUnlockFingerprintRecord) != 0;
+  return profile_->GetPrefs()->GetInteger(
+             prefs::kQuickUnlockFingerprintRecord) != 0;
 }
 
 void FingerprintStorage::AddUnlockAttempt() {
diff --git a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h
index 6a4c447..f859f40 100644
--- a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h
+++ b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h
@@ -8,7 +8,7 @@
 #include "base/time/time.h"
 
 class PrefRegistrySimple;
-class PrefService;
+class Profile;
 
 namespace chromeos {
 
@@ -25,7 +25,7 @@
   // Registers profile prefs.
   static void RegisterProfilePrefs(PrefRegistrySimple* registry);
 
-  explicit FingerprintStorage(PrefService* pref_service);
+  explicit FingerprintStorage(Profile* profile);
   ~FingerprintStorage();
 
   // Returns true if fingerprint unlock is currently available.
@@ -50,7 +50,7 @@
   friend class chromeos::FingerprintStorageTestApi;
   friend class QuickUnlockStorage;
 
-  PrefService* pref_service_;
+  Profile* const profile_;
   // Number of fingerprint unlock attempt.
   int unlock_attempt_count_ = 0;
 
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
index 49ccf7c..1d8a796 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.cc
@@ -55,8 +55,7 @@
 
 KeyedService* QuickUnlockFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
-  return new QuickUnlockStorage(
-      Profile::FromBrowserContext(context)->GetPrefs());
+  return new QuickUnlockStorage(Profile::FromBrowserContext(context));
 }
 
 }  // namespace quick_unlock
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc
index 0fccbc4d..7f6aa5b 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.cc
@@ -8,6 +8,7 @@
 
 #include "base/time/time.h"
 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
 #include "components/prefs/pref_service.h"
 
@@ -25,10 +26,9 @@
 
 }  // namespace
 
-QuickUnlockStorage::QuickUnlockStorage(PrefService* pref_service)
-    : pref_service_(pref_service) {
-  fingerprint_storage_ = std::make_unique<FingerprintStorage>(pref_service);
-  pin_storage_prefs_ = std::make_unique<PinStoragePrefs>(pref_service);
+QuickUnlockStorage::QuickUnlockStorage(Profile* profile) : profile_(profile) {
+  fingerprint_storage_ = std::make_unique<FingerprintStorage>(profile);
+  pin_storage_prefs_ = std::make_unique<PinStoragePrefs>(profile->GetPrefs());
 }
 
 QuickUnlockStorage::~QuickUnlockStorage() {}
@@ -42,7 +42,7 @@
 bool QuickUnlockStorage::HasStrongAuth() const {
   if (last_strong_auth_.is_null())
     return false;
-  return TimeSinceLastStrongAuth() < GetStrongAuthTimeout(pref_service_);
+  return TimeSinceLastStrongAuth() < GetStrongAuthTimeout(profile_->GetPrefs());
 }
 
 base::TimeDelta QuickUnlockStorage::TimeSinceLastStrongAuth() const {
@@ -52,7 +52,7 @@
 
 base::TimeDelta QuickUnlockStorage::TimeUntilNextStrongAuth() const {
   DCHECK(!last_strong_auth_.is_null());
-  return GetStrongAuthTimeout(pref_service_) - TimeSinceLastStrongAuth();
+  return GetStrongAuthTimeout(profile_->GetPrefs()) - TimeSinceLastStrongAuth();
 }
 
 bool QuickUnlockStorage::IsFingerprintAuthenticationAvailable() const {
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h
index bb4cdfe0..68ffd59 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h
@@ -11,7 +11,7 @@
 #include "chromeos/login/auth/user_context.h"
 #include "components/keyed_service/core/keyed_service.h"
 
-class PrefService;
+class Profile;
 
 namespace base {
 class Time;
@@ -29,7 +29,7 @@
 // authentication used by Settings).
 class QuickUnlockStorage : public KeyedService {
  public:
-  explicit QuickUnlockStorage(PrefService* pref_service);
+  explicit QuickUnlockStorage(Profile* profile);
   ~QuickUnlockStorage() override;
 
   // Mark that the user has had a strong authentication. This means
@@ -89,7 +89,7 @@
   // KeyedService:
   void Shutdown() override;
 
-  PrefService* pref_service_;
+  Profile* const profile_;
   base::TimeTicks last_strong_auth_;
   std::unique_ptr<FingerprintStorage> fingerprint_storage_;
   std::unique_ptr<PinStoragePrefs> pin_storage_prefs_;
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
index ef3117cc..b9952210 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc
@@ -108,17 +108,15 @@
   return base::FeatureList::IsEnabled(features::kQuickUnlockPin);
 }
 
-bool IsFingerprintEnabled() {
+bool IsFingerprintEnabled(Profile* profile) {
   if (enable_for_testing_)
     return true;
 
-  // Disable fingerprint for secondary user.
-  user_manager::UserManager* user_manager = user_manager::UserManager::Get();
-  if (user_manager->GetActiveUser() != user_manager->GetPrimaryUser())
+  // Disable fingerprint if the profile does not belong to the primary user.
+  if (profile != ProfileManager::GetPrimaryUserProfile())
     return false;
 
-  // Disable fingerprint if forbidden by policy.
-  const Profile* profile = ProfileManager::GetPrimaryUserProfile();
+  // Disable fingerprint if disallowed by policy.
   if (IsFingerprintDisabledByPolicy(profile->GetPrefs()))
     return false;
 
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h
index e34c79f4..5859e31 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h
@@ -11,6 +11,7 @@
 
 class PrefRegistrySimple;
 class PrefService;
+class Profile;
 
 namespace chromeos {
 namespace quick_unlock {
@@ -38,8 +39,8 @@
 // Returns true if the quick unlock feature flag is present.
 bool IsPinEnabled(PrefService* pref_service);
 
-// Returns true if the fingerprint is allowed for the current active user.
-bool IsFingerprintEnabled();
+// Returns true if the fingerprint is allowed for specified profile.
+bool IsFingerprintEnabled(Profile* profile);
 
 // Forcibly enable all quick-unlock modes for testing.
 void EnableForTesting();
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index c139a658..0849485 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -1013,7 +1013,7 @@
 }
 
 void WizardController::OnEulaBack() {
-    ShowNetworkScreen();
+  ShowNetworkScreen();
 }
 
 void WizardController::OnChangedMetricsReportingState(bool enabled) {
@@ -1132,10 +1132,12 @@
 }
 
 void WizardController::OnMarketingOptInFinished() {
-  if (chromeos::quick_unlock::IsFingerprintEnabled())
+  if (chromeos::quick_unlock::IsFingerprintEnabled(
+          ProfileManager::GetActiveUserProfile())) {
     ShowFingerprintSetupScreen();
-  else
+  } else {
     ShowArcTermsOfServiceScreen();
+  }
 }
 
 void WizardController::OnFingerprintSetupFinished() {
diff --git a/chrome/browser/chromeos/tether/tether_service.cc b/chrome/browser/chromeos/tether/tether_service.cc
index 2f0707a1..54162577 100644
--- a/chrome/browser/chromeos/tether/tether_service.cc
+++ b/chrome/browser/chromeos/tether/tether_service.cc
@@ -685,15 +685,6 @@
           kUnavailableSuiteDisabled:
         return BETTER_TOGETHER_SUITE_DISABLED;
       case chromeos::multidevice_setup::mojom::FeatureState::
-          kUnavailableNoVerifiedHost:
-        // Note that because of the early return above after
-        // !HasSyncedTetherHosts, if this point is hit, there are synced tether
-        // hosts available, but the multidevice state is unverified. This switch
-        // case can only occur for legacy Magic Tether hosts, in which case the
-        // service should be enabled.
-        // TODO(crbug.com/894585): Remove this legacy special case after M71.
-        return ENABLED;
-      case chromeos::multidevice_setup::mojom::FeatureState::
           kNotSupportedByChromebook:
         // CryptAuth may not yet know that this device supports
         // MAGIC_TETHER_CLIENT (and the local device metadata is reflecting
@@ -703,6 +694,10 @@
         FALLTHROUGH;
       case chromeos::multidevice_setup::mojom::FeatureState::
           kNotSupportedByPhone:
+        FALLTHROUGH;
+      case chromeos::multidevice_setup::mojom::FeatureState::
+          kUnavailableNoVerifiedHost:
+        no_available_hosts_false_positive_encountered_ = true;
         return NO_AVAILABLE_HOSTS;
       default:
         // Other FeatureStates:
diff --git a/chrome/browser/chromeos/tether/tether_service_unittest.cc b/chrome/browser/chromeos/tether/tether_service_unittest.cc
index 34a3bab7..9a8af8c 100644
--- a/chrome/browser/chromeos/tether/tether_service_unittest.cc
+++ b/chrome/browser/chromeos/tether/tether_service_unittest.cc
@@ -77,9 +77,6 @@
   for (size_t i = 0; i < kNumTestDevices; ++i) {
     list.push_back(cryptauth::RemoteDeviceRefBuilder()
                        .SetSupportsMobileHotspot(true)
-                       .SetSoftwareFeatureState(
-                           cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST,
-                           cryptauth::SoftwareFeatureState::kSupported)
                        .Build());
   }
   return list;
@@ -718,7 +715,6 @@
 
 TEST_F(TetherServiceTest,
        TestMultiDeviceSetupClientInitiallyHasNoVerifiedHost) {
-  fake_tether_host_fetcher_factory_->SetNoInitialDevices();
   base::test::ScopedFeatureList feature_list;
   feature_list.InitWithFeatures(
       {chromeos::features::kMultiDeviceApi,
@@ -737,8 +733,6 @@
           chromeos::NetworkTypePattern::Tether()));
   VerifyTetherActiveStatus(false /* expected_active */);
 
-  fake_tether_host_fetcher_factory_->last_created()->set_tether_hosts(
-      test_devices_);
   fake_multidevice_setup_client_->SetFeatureState(
       chromeos::multidevice_setup::mojom::Feature::kInstantTethering,
       chromeos::multidevice_setup::mojom::FeatureState::kEnabledByUser);
@@ -768,7 +762,6 @@
                 chromeos::NetworkTypePattern::Tether()));
   VerifyTetherActiveStatus(true /* expected_active */);
 
-  fake_tether_host_fetcher_factory_->last_created()->set_tether_hosts({});
   fake_multidevice_setup_client_->SetFeatureState(
       chromeos::multidevice_setup::mojom::Feature::kInstantTethering,
       chromeos::multidevice_setup::mojom::FeatureState::
@@ -780,7 +773,6 @@
           chromeos::NetworkTypePattern::Tether()));
   VerifyTetherActiveStatus(false /* expected_active */);
 
-  mock_timer_->Fire();
   ShutdownTetherService();
   VerifyTetherFeatureStateRecorded(
       TetherService::TetherFeatureState::NO_AVAILABLE_HOSTS,
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index a3691e9..0d782d5 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -26,7 +26,6 @@
 #include "components/content_settings/core/browser/website_settings_info.h"
 #include "components/content_settings/core/browser/website_settings_registry.h"
 #include "components/content_settings/core/common/content_settings_pattern.h"
-#include "components/content_settings/core/common/features.h"
 #include "components/content_settings/core/test/content_settings_test_utils.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/prefs/default_pref_store.h"
@@ -103,6 +102,29 @@
   DISALLOW_COPY_AND_ASSIGN(DeadlockCheckerObserver);
 };
 
+// Synthesizes a plugin content setting exception into |prefs|. Plugin settings
+// are emphemeral as of Chrome M71; this method is used to simulate the scenario
+// where we inherit these legacy values from Chrome versions M70-, when the
+// exceptions were still stored in preferences.
+bool SetLegacyPersistedPluginSetting(
+    PrefService* prefs,
+    const ContentSettingsPattern& primary_pattern,
+    const ContentSettingsPattern& secondary_pattern,
+    const ResourceIdentifier& resource_identifier,
+    base::Value* in_value) {
+  auto* registry = ContentSettingsRegistry::GetInstance();
+  auto* content_setting_info = registry->Get(CONTENT_SETTINGS_TYPE_PLUGINS);
+  PrefChangeRegistrar pref_change_registrar;
+  pref_change_registrar.Init(prefs);
+  ContentSettingsPref content_settings_pref(
+      CONTENT_SETTINGS_TYPE_PLUGINS, prefs, &pref_change_registrar,
+      content_setting_info->website_settings_info()->pref_name(),
+      false /* is_incognito */, base::DoNothing());
+  return content_settings_pref.SetWebsiteSetting(
+      primary_pattern, secondary_pattern, resource_identifier,
+      base::Time::Now(), in_value);
+}
+
 class PrefProviderTest : public testing::Test {
  public:
   PrefProviderTest() {
@@ -371,15 +393,14 @@
     value.release();
   }
 
-  bool flash_is_ephemeral =
-      ContentSettingsRegistry::GetInstance()
-          ->Get(CONTENT_SETTINGS_TYPE_PLUGINS)
-          ->storage_behavior() == ContentSettingsInfo::EPHEMERAL;
-  ContentSetting expectation =
-      flash_is_ephemeral ? CONTENT_SETTING_DEFAULT : CONTENT_SETTING_BLOCK;
-  EXPECT_EQ(expectation, TestUtils::GetContentSetting(
-                             &pref_content_settings_provider, host, host,
-                             CONTENT_SETTINGS_TYPE_PLUGINS, resource1, false));
+  ASSERT_EQ(ContentSettingsInfo::EPHEMERAL,
+            ContentSettingsRegistry::GetInstance()
+                ->Get(CONTENT_SETTINGS_TYPE_PLUGINS)
+                ->storage_behavior());
+  EXPECT_EQ(CONTENT_SETTING_DEFAULT,
+            TestUtils::GetContentSetting(&pref_content_settings_provider, host,
+                                         host, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                         resource1, false));
   EXPECT_EQ(CONTENT_SETTING_DEFAULT,
             TestUtils::GetContentSetting(&pref_content_settings_provider, host,
                                          host, CONTENT_SETTINGS_TYPE_PLUGINS,
@@ -488,7 +509,6 @@
   ContentSettingsPattern wildcard =
       ContentSettingsPattern::FromString("*");
   std::unique_ptr<base::Value> value(new base::Value(CONTENT_SETTING_ALLOW));
-  ResourceIdentifier res_id("abcde");
 
   PrefProvider provider(&prefs, false /* incognito */,
                         true /* store_last_modified */);
@@ -502,23 +522,27 @@
   provider.SetWebsiteSetting(pattern, wildcard,
                              CONTENT_SETTINGS_TYPE_GEOLOCATION,
                              ResourceIdentifier(), value->DeepCopy());
-#if BUILDFLAG(ENABLE_PLUGINS)
-  // Non-empty pattern, plugins, non-empty resource identifier.
-  std::unique_ptr<base::Value> value_copy(value->DeepCopy());
-  if (provider.SetWebsiteSetting(pattern, wildcard,
-                                 CONTENT_SETTINGS_TYPE_PLUGINS, res_id,
-                                 value_copy.get())) {
-    value_copy.release();
-  }
 
-  // Empty pattern, plugins, non-empty resource identifier.
-  value_copy.reset(value->DeepCopy());
-  if (provider.SetWebsiteSetting(wildcard, wildcard,
-                                 CONTENT_SETTINGS_TYPE_PLUGINS, res_id,
-                                 value_copy.get())) {
-    value_copy.release();
-  }
+#if BUILDFLAG(ENABLE_PLUGINS)
+  // Plugin settings became emphemeral as of Chrome M71 and are no longer
+  // persisted into preferences. Here we simulate the scenario where we inherit
+  // legacy, persisted values coming from Chrome versions M70-, to verify the
+  // ability of PrefProvider to delete the legacy plugin settings although those
+  // are no longer handled by it (as opposed to the first section of the test,
+  // which verifies the deletion of regular settings which are still handled by
+  // PrefProvider).
+
+  // Legacy, persisted exception for CONTENT_SETTINGS_TYPE_PLUGINS with a
+  // non-empty pattern, and non-empty resource identifier.
+  ResourceIdentifier res_id("abcde");
+  ASSERT_TRUE(SetLegacyPersistedPluginSetting(&prefs, pattern, wildcard, res_id,
+                                              value->DeepCopy()));
+
+  // Same with an empty pattern and non-empty resource identifier.
+  ASSERT_TRUE(SetLegacyPersistedPluginSetting(&prefs, wildcard, wildcard,
+                                              res_id, value->DeepCopy()));
 #endif
+
   // Non-empty pattern, syncable, empty resource identifier.
   provider.SetWebsiteSetting(pattern, wildcard, CONTENT_SETTINGS_TYPE_COOKIES,
                              ResourceIdentifier(), value->DeepCopy());
@@ -528,15 +552,9 @@
                              CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
                              ResourceIdentifier(), value->DeepCopy());
 
-  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
-  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_GEOLOCATION);
-#if BUILDFLAG(ENABLE_PLUGINS)
-  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_PLUGINS);
-#endif
-
+  // Test that the preferences for images, geolocation and plugins get cleared.
   WebsiteSettingsRegistry* registry = WebsiteSettingsRegistry::GetInstance();
-  // Test that the preferences for images, geolocation and plugins are empty.
-  const char* empty_prefs[] = {
+  const char* cleared_prefs[] = {
     registry->Get(CONTENT_SETTINGS_TYPE_JAVASCRIPT)->pref_name().c_str(),
     registry->Get(CONTENT_SETTINGS_TYPE_GEOLOCATION)->pref_name().c_str(),
 #if BUILDFLAG(ENABLE_PLUGINS)
@@ -544,7 +562,21 @@
 #endif
   };
 
-  for (const char* pref : empty_prefs) {
+  // Expect the prefs are not empty before we trigger clearing them.
+  for (const char* pref : cleared_prefs) {
+    DictionaryPrefUpdate update(&prefs, pref);
+    const base::DictionaryValue* dictionary = update.Get();
+    ASSERT_FALSE(dictionary->empty());
+  }
+
+  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
+  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_GEOLOCATION);
+#if BUILDFLAG(ENABLE_PLUGINS)
+  provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_PLUGINS);
+#endif
+
+  // Ensure they become empty afterwards.
+  for (const char* pref : cleared_prefs) {
     DictionaryPrefUpdate update(&prefs, pref);
     const base::DictionaryValue* dictionary = update.Get();
     EXPECT_TRUE(dictionary->empty());
@@ -634,8 +666,15 @@
       break;
     }
   }
+
+#if BUILDFLAG(ENABLE_PLUGINS)
+  // At the very least, CONTENT_SETTINGS_TYPE_PLUGINS is ephemeral.
+  ASSERT_NE(CONTENT_SETTINGS_NUM_TYPES, ephemeral_type);
+#else
+  // There might be no ephemeral setting if plugins are not supported.
   if (ephemeral_type == CONTENT_SETTINGS_NUM_TYPES)
     return;
+#endif
 
   sync_preferences::TestingPrefServiceSyncable prefs;
   PrefProvider::RegisterProfilePrefs(prefs.registry());
@@ -654,87 +693,5 @@
   provider.ShutdownOnUIThread();
 }
 
-// Tests if PrefProvider clears unsupported (ephemeral) types if they are
-// stored.
-// kEnableEphemeralFlashPermission is not available on Android.
-#if BUILDFLAG(ENABLE_PLUGINS)
-#if !defined(OS_ANDROID)
-TEST_F(PrefProviderTest, ClearingUnsupportedTypes) {
-  sync_preferences::TestingPrefServiceSyncable prefs;
-  PrefProvider::RegisterProfilePrefs(prefs.registry());
-
-  const ContentSettingsPattern site_pattern =
-      ContentSettingsPattern::FromString("https://example.com");
-
-  enum steps {
-    SET_PERMISSION,
-    CHECK_EXISTENCE,
-    CLEAR_PERMISSION,
-    CHECK_DELETION,
-  };
-
-  for (int step = SET_PERMISSION; step <= CHECK_DELETION; step++) {
-    bool ephemeral_flash_permission = (step == CLEAR_PERMISSION);
-
-    // Boilerplate code to set the switch and restart PrefProvider.
-    base::test::ScopedFeatureList feature_list;
-    if (ephemeral_flash_permission) {
-      feature_list.InitAndEnableFeature(
-          features::kEnableEphemeralFlashPermission);
-    } else {
-      feature_list.InitAndDisableFeature(
-          features::kEnableEphemeralFlashPermission);
-    }
-    ContentSettingsRegistry::GetInstance()->ResetForTest();
-    PrefProvider provider(&prefs, false, true);
-
-    switch (step) {
-      case SET_PERMISSION: {
-        // Disable Ephemeral Flash permissions and set permission.
-        ASSERT_FALSE(ephemeral_flash_permission);
-        EXPECT_TRUE(provider.SetWebsiteSetting(
-            site_pattern, site_pattern, CONTENT_SETTINGS_TYPE_PLUGINS,
-            std::string(), new base::Value(CONTENT_SETTING_ALLOW)));
-        EXPECT_NE(nullptr,
-                  provider.GetRuleIterator(CONTENT_SETTINGS_TYPE_PLUGINS,
-                                           std::string(), false));
-        break;
-      }
-      case CHECK_EXISTENCE: {
-        // Reload PrefProvider with persistent Flash permission and ensure the
-        // permission still exists.
-        ASSERT_FALSE(ephemeral_flash_permission);
-        EXPECT_NE(nullptr,
-                  provider.GetRuleIterator(CONTENT_SETTINGS_TYPE_PLUGINS,
-                                           std::string(), false));
-        break;
-      }
-      case CLEAR_PERMISSION: {
-        // Enable Ephemeral Flash permissions and clear permission.
-        ASSERT_TRUE(ephemeral_flash_permission);
-        EXPECT_EQ(nullptr,
-                  provider.GetRuleIterator(CONTENT_SETTINGS_TYPE_PLUGINS,
-                                           std::string(), false));
-
-        provider.ClearAllContentSettingsRules(CONTENT_SETTINGS_TYPE_PLUGINS);
-        break;
-      }
-      case CHECK_DELETION: {
-        // Reload PrefProvider with persistent Flash permission and check if the
-        // permission is gone.
-        ASSERT_FALSE(ephemeral_flash_permission);
-        EXPECT_EQ(nullptr,
-                  provider.GetRuleIterator(CONTENT_SETTINGS_TYPE_PLUGINS,
-                                           std::string(), false));
-        break;
-      }
-    }
-
-    provider.ShutdownOnUIThread();
-  }
-}
-#endif  // !defined(OS_ANDROID)
-
-#endif  // BUILDFLAG(ENABLE_PLUGINS)
 
 }  // namespace content_settings
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index ede78bc..a4d6983 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -30,7 +30,6 @@
 #include "components/content_settings/core/browser/user_modifiable_provider.h"
 #include "components/content_settings/core/browser/website_settings_info.h"
 #include "components/content_settings/core/browser/website_settings_registry.h"
-#include "components/content_settings/core/common/features.h"
 #include "components/content_settings/core/common/pref_names.h"
 #include "components/content_settings/core/test/content_settings_test_utils.h"
 #include "components/prefs/pref_service.h"
@@ -1948,11 +1947,10 @@
       HostContentSettingsMap::EPHEMERAL_PROVIDER);
 }
 
-// Tests if availability of EnableEphemeralFlashPermission switch results in
-// Flash permissions being reset after restarting.
-// The flag is not available on Android.
+// Tests that Flash permissions are reset after restarting.
+// Flash, and consequently, Flash permissions are not available on Android.
 #if !defined(OS_ANDROID)
-TEST_F(HostContentSettingsMapTest, FlashEphemeralPermissionSwitch) {
+TEST_F(HostContentSettingsMapTest, FlashPermissionsAreEphemeral) {
   TestingProfile profile;
   HostContentSettingsMap* map =
       HostContentSettingsMapFactory::GetForProfile(&profile);
@@ -1961,47 +1959,31 @@
   map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
                                 CONTENT_SETTING_ASK);
 
-  for (int ephemeral = 0; ephemeral < 2; ephemeral++) {
-    base::test::ScopedFeatureList feature_list;
-    if (ephemeral) {
-      feature_list.InitAndEnableFeature(
-          content_settings::features::kEnableEphemeralFlashPermission);
-    } else {
-      feature_list.InitAndDisableFeature(
-          content_settings::features::kEnableEphemeralFlashPermission);
-    }
-    content_settings::ContentSettingsRegistry::GetInstance()->ResetForTest();
+  base::test::ScopedFeatureList feature_list;
+  content_settings::ContentSettingsRegistry::GetInstance()->ResetForTest();
 
-    ReloadProviders(profile.GetPrefs(), map);
-    map->SetContentSettingDefaultScope(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
-                                       std::string(), CONTENT_SETTING_ALLOW);
-    EXPECT_EQ(CONTENT_SETTING_ALLOW,
-              map->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
-                                     std::string()));
+  ReloadProviders(profile.GetPrefs(), map);
+  map->SetContentSettingDefaultScope(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                     std::string(), CONTENT_SETTING_ALLOW);
+  EXPECT_EQ(CONTENT_SETTING_ALLOW,
+            map->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                   std::string()));
 
-    ReloadProviders(profile.GetPrefs(), map);
-    ContentSetting expectation =
-        ephemeral ? CONTENT_SETTING_ASK : CONTENT_SETTING_ALLOW;
-
-    EXPECT_EQ(expectation,
-              map->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
-                                     std::string()))
-        << ephemeral;
-  }
+  ReloadProviders(profile.GetPrefs(), map);
+  EXPECT_EQ(CONTENT_SETTING_ASK,
+            map->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                   std::string()));
 }
 #endif  // !defined(OS_ANDROID)
 
-// Tests if restarting only removes ephemeral permissions.
-// kEnableEphemeralFlashPermission is not available on Android.
+// Tests that restarting only removes ephemeral permissions. Flash, and
+// consequently, Flash permissions are not available on Android.
 #if !defined(OS_ANDROID)
 TEST_F(HostContentSettingsMapTest, MixedEphemeralAndPersistentPermissions) {
   TestingProfile profile;
   HostContentSettingsMap* map =
       HostContentSettingsMapFactory::GetForProfile(&profile);
 
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndEnableFeature(
-      content_settings::features::kEnableEphemeralFlashPermission);
   content_settings::ContentSettingsRegistry::GetInstance()->ResetForTest();
   ReloadProviders(profile.GetPrefs(), map);
 
@@ -2052,18 +2034,15 @@
 }
 #endif  // !defined(OS_ANDROID)
 
-// Tests if directly writing a value to PrefProvider doesn't affect ephmeral
-// types.
-// kEnableEphemeralFlashPermission is not available on Android.
+// Test that directly writing a value to PrefProvider doesn't affect ephmeral
+// types. Flash, and consequently, Flash permissions are not available on
+// Android.
 #if !defined(OS_ANDROID)
 TEST_F(HostContentSettingsMapTest, EphemeralTypeDoesntReadFromPrefProvider) {
   TestingProfile profile;
   HostContentSettingsMap* map =
       HostContentSettingsMapFactory::GetForProfile(&profile);
 
-  base::test::ScopedFeatureList feature_list;
-  feature_list.InitAndEnableFeature(
-      content_settings::features::kEnableEphemeralFlashPermission);
   content_settings::ContentSettingsRegistry::GetInstance()->ResetForTest();
   ReloadProviders(profile.GetPrefs(), map);
 
diff --git a/chrome/browser/extensions/api/declarative_content/content_action.cc b/chrome/browser/extensions/api/declarative_content/content_action.cc
index 28c8e52..413ee3d8 100644
--- a/chrome/browser/extensions/api/declarative_content/content_action.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_action.cc
@@ -9,6 +9,7 @@
 #include "base/lazy_instance.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
@@ -25,6 +26,7 @@
 #include "extensions/common/api/declarative/declarative_constants.h"
 #include "extensions/common/extension.h"
 #include "extensions/common/extension_messages.h"
+#include "extensions/common/image_util.h"
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia.h"
 
@@ -43,6 +45,10 @@
     "Can't use declarativeContent.ShowPageAction without a page action";
 const char kNoPageOrBrowserAction[] =
     "Can't use declarativeContent.SetIcon without a page or browser action";
+const char kIconNotSufficientlyVisible[] =
+    "The specified icon is not sufficiently visible";
+
+bool g_allow_invisible_icons_content_action = true;
 
 //
 // The following are concrete actions.
@@ -396,7 +402,7 @@
     type = ActionInfo::TYPE_BROWSER;
   } else {
     *error = kNoPageOrBrowserAction;
-    return std::unique_ptr<ContentAction>();
+    return nullptr;
   }
 
   gfx::ImageSkia icon;
@@ -404,9 +410,20 @@
   if (dict->GetDictionary("imageData", &canvas_set) &&
       !ExtensionAction::ParseIconFromCanvasDictionary(*canvas_set, &icon)) {
     *error = kInvalidIconDictionary;
-    return std::unique_ptr<ContentAction>();
+    return nullptr;
   }
-  return base::WrapUnique(new SetIcon(gfx::Image(icon), type));
+
+  gfx::Image image(icon);
+  const SkBitmap bitmap = image.AsBitmap();
+  const bool is_sufficiently_visible =
+      extensions::image_util::IsIconSufficientlyVisible(bitmap);
+  UMA_HISTOGRAM_BOOLEAN("Extensions.DeclarativeSetIconWasVisible",
+                        is_sufficiently_visible);
+  if (!is_sufficiently_visible && !g_allow_invisible_icons_content_action) {
+    *error = kIconNotSufficientlyVisible;
+    return nullptr;
+  }
+  return base::WrapUnique(new SetIcon(image, type));
 }
 
 //
@@ -441,6 +458,11 @@
   return std::unique_ptr<ContentAction>();
 }
 
+// static
+void ContentAction::SetAllowInvisibleIconsForTest(bool value) {
+  g_allow_invisible_icons_content_action = value;
+}
+
 ContentAction::ContentAction() {}
 
 }  // namespace extensions
diff --git a/chrome/browser/extensions/api/declarative_content/content_action.h b/chrome/browser/extensions/api/declarative_content/content_action.h
index 6b5d0dd3..c16e87c 100644
--- a/chrome/browser/extensions/api/declarative_content/content_action.h
+++ b/chrome/browser/extensions/api/declarative_content/content_action.h
@@ -60,6 +60,8 @@
       const base::Value& json_action,
       std::string* error);
 
+  static void SetAllowInvisibleIconsForTest(bool value);
+
  protected:
   ContentAction();
 };
diff --git a/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc b/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc
index b032ef3..571edb1 100644
--- a/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_action_unittest.cc
@@ -206,6 +206,41 @@
   EXPECT_TRUE(page_action->GetDeclarativeIcon(tab_id).IsEmpty());
 }
 
+TEST(DeclarativeContentActionTest, SetInvisibleIcon) {
+  TestExtensionEnvironment env;
+
+  // Simulate the process of passing ImageData to SetIcon::Create.
+  SkBitmap bitmap;
+  EXPECT_TRUE(bitmap.tryAllocN32Pixels(19, 19));
+  bitmap.eraseARGB(0, 0, 0, 0);
+  uint32_t* pixels = bitmap.getAddr32(0, 0);
+  // Set a single pixel, which isn't enough to consider the icon visible.
+  pixels[0] = SkColorSetARGB(0xFF, 0xFF, 0xFF, 0xFF);
+  IPC::Message bitmap_pickle;
+  IPC::WriteParam(&bitmap_pickle, bitmap);
+  std::string binary_data = std::string(
+      static_cast<const char*>(bitmap_pickle.data()), bitmap_pickle.size());
+  std::string data64;
+  base::Base64Encode(binary_data, &data64);
+
+  std::unique_ptr<base::DictionaryValue> dict =
+      DictionaryBuilder()
+          .Set("instanceType", "declarativeContent.SetIcon")
+          .Set("imageData", DictionaryBuilder().Set("19", data64).Build())
+          .Build();
+
+  // Expect an error and no instance to be created.
+  const Extension* extension = env.MakeExtension(
+      *ParseJson(R"({"page_action": {"default_title": "Extension"}})"));
+  ContentAction::SetAllowInvisibleIconsForTest(false);
+  std::string error;
+  std::unique_ptr<const ContentAction> result =
+      ContentAction::Create(nullptr, extension, *dict, &error);
+  EXPECT_EQ("The specified icon is not sufficiently visible", error);
+  EXPECT_FALSE(result);
+  ContentAction::SetAllowInvisibleIconsForTest(true);
+}
+
 TEST_F(RequestContentScriptTest, MissingScripts) {
   Init();
   std::string error;
diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
index 9a3393baa..2745a560 100644
--- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
@@ -2587,22 +2587,17 @@
 }
 
 TEST_F(ExtensionUpdaterTest, TestDisabledReasons1) {
-  std::vector<int> disabled;
-  disabled.push_back(disable_reason::DISABLE_USER_ACTION);
-  disabled.push_back(disable_reason::DISABLE_PERMISSIONS_INCREASE |
-                     disable_reason::DISABLE_CORRUPTED);
-  TestPingMetrics(1, disabled);
+  TestPingMetrics(1, {disable_reason::DISABLE_USER_ACTION,
+                      disable_reason::DISABLE_PERMISSIONS_INCREASE |
+                          disable_reason::DISABLE_CORRUPTED});
 }
 
 TEST_F(ExtensionUpdaterTest, TestDisabledReasons2) {
-  std::vector<int> disabled;
-  TestPingMetrics(1, disabled);
+  TestPingMetrics(1, {});
 }
 
 TEST_F(ExtensionUpdaterTest, TestDisabledReasons3) {
-  std::vector<int> disabled;
-  disabled.push_back(0);
-  TestPingMetrics(0, disabled);
+  TestPingMetrics(0, {0});
 }
 
 TEST_F(ExtensionUpdaterTest, TestUninstallWhileUpdateCheck) {
@@ -2630,6 +2625,11 @@
 
   service.set_extensions(ExtensionList(), ExtensionList());
   ASSERT_FALSE(service.GetExtensionById(id, false));
+
+  // RunUntilIdle is needed to make sure that the UpdateService instance that
+  // runs the extension update process has a chance to exit gracefully; without
+  // it, the test would crash.
+  RunUntilIdle();
 }
 
 // Tests that we don't get a DCHECK failure when the next check time saved in
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 6988781..41ef3fd 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -479,12 +479,6 @@
 const char kEnableCursorMotionBlurDescription[] =
     "Enable motion blur effect for the cursor.";
 
-const char kEnableEphemeralFlashPermissionName[] =
-    "Enable Ephemeral Flash Permissions";
-const char kEnableEphemeralFlashPermissionDescription[] =
-    "When enabled, Flash plugin permissions are reset at the end of the "
-    "browser session.";
-
 const char kEnableNoScriptPreviewsName[] = "NoScript previews";
 
 const char kEnableNoScriptPreviewsDescription[] =
@@ -2249,10 +2243,6 @@
 const char kChromeHomeSwipeLogicRestrictArea[] = "Restrict swipable area";
 const char kChromeHomeSwipeLogicVelocity[] = "Velocity suppression model";
 
-const char kChromeModernFullRollName[] = "Chrome Modern Full-Roll";
-const char kChromeModernFullRollDescription[] =
-    "Enable modern full-roll animation for Chrome.";
-
 const char kChromeMemexName[] = "Chrome Memex";
 const char kChromeMemexDescription[] =
     "Enables Chrome Memex homepage on Android. Restricted to opted-in "
@@ -2454,6 +2444,10 @@
     "Enable this option to display payment method section above address "
     "section instead of below it.";
 
+const char kEphemeralTabName[] = "An Ephemeral Tab in an Overlay Panel";
+const char kEphemeralTabDescription[] =
+    "Enable a 'sneak peek' at a linked page in an overlay.";
+
 const char kGrantNotificationsToDSEName[] =
     "Grant notifications to the Default Search Engine";
 const char kGrantNotificationsToDSENameDescription[] =
@@ -2985,6 +2979,11 @@
 const char kMacTouchBarName[] = "Hardware Touch Bar";
 const char kMacTouchBarDescription[] = "Control the use of the Touch Bar.";
 
+const char kMacV2SandboxName[] = "Mac V2 Sandbox";
+const char kMacV2SandboxDescription[] =
+    "Eliminates the unsandboxed warmup phase and sandboxes processes for their "
+    "entire life cycle.";
+
 const char kMacViewsNativeAppWindowsName[] = "Toolkit-Views App Windows.";
 const char kMacViewsNativeAppWindowsDescription[] =
     "Controls whether to use Toolkit-Views based Chrome App windows.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index d80c516..6d6f333 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -319,9 +319,6 @@
 extern const char kEnableCursorMotionBlurName[];
 extern const char kEnableCursorMotionBlurDescription[];
 
-extern const char kEnableEphemeralFlashPermissionName[];
-extern const char kEnableEphemeralFlashPermissionDescription[];
-
 extern const char kEnableNoScriptPreviewsName[];
 extern const char kEnableNoScriptPreviewsDescription[];
 
@@ -1363,9 +1360,6 @@
 extern const char kChromeHomeSwipeLogicRestrictArea[];
 extern const char kChromeHomeSwipeLogicVelocity[];
 
-extern const char kChromeModernFullRollName[];
-extern const char kChromeModernFullRollDescription[];
-
 extern const char kChromeMemexName[];
 extern const char kChromeMemexDescription[];
 
@@ -1483,6 +1477,9 @@
 extern const char kEnableWebPaymentsMethodSectionOrderV2Name[];
 extern const char kEnableWebPaymentsMethodSectionOrderV2Description[];
 
+extern const char kEphemeralTabName[];
+extern const char kEphemeralTabDescription[];
+
 extern const char kGrantNotificationsToDSEName[];
 extern const char kGrantNotificationsToDSENameDescription[];
 
@@ -1803,6 +1800,9 @@
 extern const char kMacTouchBarName[];
 extern const char kMacTouchBarDescription[];
 
+extern const char kMacV2SandboxName[];
+extern const char kMacV2SandboxDescription[];
+
 extern const char kMacViewsNativeAppWindowsName[];
 extern const char kMacViewsNativeAppWindowsDescription[];
 
diff --git a/chrome/browser/history/android/sqlite_cursor_unittest.cc b/chrome/browser/history/android/sqlite_cursor_unittest.cc
index 9bf9ecc..1ae5d3e 100644
--- a/chrome/browser/history/android/sqlite_cursor_unittest.cc
+++ b/chrome/browser/history/android/sqlite_cursor_unittest.cc
@@ -210,7 +210,7 @@
   base::android::ScopedJavaLocalRef<jbyteArray> data =
       cursor->GetBlob(env, NULL, 3);
   std::vector<uint8_t> out;
-  base::android::JavaByteArrayToByteVector(env, data.obj(), &out);
+  base::android::JavaByteArrayToByteVector(env, data, &out);
   EXPECT_EQ(data_bytes->data().size(), out.size());
   EXPECT_EQ(data_bytes->data()[0], out[0]);
   cursor->Destroy(env, NULL);
diff --git a/chrome/browser/mac/keychain_reauthorize.h b/chrome/browser/mac/keychain_reauthorize.h
deleted file mode 100644
index d94488f..0000000
--- a/chrome/browser/mac/keychain_reauthorize.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 CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
-#define CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
-
-#ifdef __OBJC__
-@class NSString;
-#else
-class NSString;
-#endif
-
-namespace chrome {
-
-extern "C" {
-
-// Reauthorizes the keychain entry, but only if it's determined that it's
-// necessary. pref_key is looked up in the system's standard user defaults
-// (preferences) and it is associated with both the number of previous attempts,
-// and whether a previous attempt succeeded. Only if a previous attempt did not
-// succeed, and the number of previous tries is less than max_tries, is
-// reauthorization attempted. Before the attempt, the preference is
-// incremented, allowing a finite number of incomplete attempts at performing
-// the operation.
-
-// The system's standard user defaults for the application are used
-// (~/Library/Preferences/com.google.Chrome.plist,
-// com.google.Chrome.canary.plist, etc.) instead of Chrome preferences because
-// Keychain access is tied more closely to the bundle identifier and signed
-// product than it is to any specific profile (--user-data-dir).
-void KeychainReauthorizeIfNeeded(NSString* pref_key, int max_tries);
-
-// A wrapper to call KeychainReauthorizeIfNeeded under a local autorelease pool.
-// This is used by the keychain_reauthorization stub executable, which is run at
-// update time or at browser launch. The name cannot be changed to indicate that
-// it is not only run at update because the stub is already built and signed.
-__attribute__((visibility("default"))) void KeychainReauthorizeIfNeededAtUpdate(
-    NSString* pref_key,
-    int max_tries);
-
-}  // extern "C"
-
-}  // namespace chrome
-
-#endif  // CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
diff --git a/chrome/browser/mac/keychain_reauthorize.mm b/chrome/browser/mac/keychain_reauthorize.mm
deleted file mode 100644
index aa955b1f..0000000
--- a/chrome/browser/mac/keychain_reauthorize.mm
+++ /dev/null
@@ -1,234 +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 "chrome/browser/mac/keychain_reauthorize.h"
-
-#import <Foundation/Foundation.h>
-#include <Security/Security.h>
-
-#include <crt_externs.h>
-#include <errno.h>
-#include <spawn.h>
-#include <string.h>
-
-#include <vector>
-
-#include "base/command_line.h"
-#include "base/files/file_path.h"
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "base/mac/bundle_locations.h"
-#include "base/mac/foundation_util.h"
-#include "base/mac/mac_logging.h"
-#include "base/mac/scoped_cftyperef.h"
-#include "base/metrics/histogram_functions.h"
-#include "base/path_service.h"
-#include "base/posix/eintr_wrapper.h"
-#include "base/scoped_generic.h"
-#include "base/strings/sys_string_conversions.h"
-#include "components/os_crypt/keychain_password_mac.h"
-#include "crypto/apple_keychain.h"
-
-namespace chrome {
-
-namespace {
-
-struct VectorScramblerTraits {
-  static std::vector<uint8_t>* InvalidValue() { return nullptr; }
-
-  static void Free(std::vector<uint8_t>* buf) {
-    memset(buf->data(), 0x11, buf->size());
-    delete buf;
-  }
-};
-
-typedef base::ScopedGeneric<std::vector<uint8_t>*, VectorScramblerTraits>
-    ScopedVectorScrambler;
-
-// Reauthorizes the Safe Storage keychain item, which protects the randomly
-// generated password that encrypts the user's saved passwords. This reads out
-// the keychain item, deletes it, and re-adds it to the keychain. This works
-// because the keychain uses an app's designated requirement as the ACL for
-// reading an item. Chrome will be signed with a designated requirement that
-// accepts both the old and new certificates.
-bool KeychainReauthorize() {
-  base::ScopedCFTypeRef<SecKeychainItemRef> storage_item;
-  UInt32 pw_length = 0;
-  void* password_data = nullptr;
-
-  crypto::AppleKeychain keychain;
-  OSStatus error = keychain.FindGenericPassword(
-      strlen(KeychainPassword::service_name), KeychainPassword::service_name,
-      strlen(KeychainPassword::account_name), KeychainPassword::account_name,
-      &pw_length, &password_data, storage_item.InitializeInto());
-
-  base::ScopedCFTypeRef<SecKeychainItemRef> backup_item;
-  std::string backup_service_name =
-      std::string(KeychainPassword::service_name) + ".bak";
-  if (error != noErr) {
-    // If the main entry does not exist, nor does the backup, exit.
-    if (keychain.FindGenericPassword(
-            backup_service_name.size(), backup_service_name.data(),
-            strlen(KeychainPassword::account_name),
-            KeychainPassword::account_name, &pw_length, &password_data,
-            backup_item.InitializeInto()) != noErr) {
-      OSSTATUS_LOG(ERROR, error)
-          << "KeychainReauthorize failed. Cannot retrieve item.";
-      return false;
-    }
-  }
-
-  // At this point, a password was retrieved, either from the main or backup.
-  ScopedVectorScrambler password;
-  password.reset(new std::vector<uint8_t>(
-      static_cast<uint8_t*>(password_data),
-      static_cast<uint8_t*>(password_data) + pw_length));
-  memset(password_data, 0x11, pw_length);
-  keychain.ItemFreeContent(password_data);
-
-  if (backup_item.get() == nullptr) {
-    // If writing the backup fails, still attempt the re-auth.
-    keychain.AddGenericPassword(
-        backup_service_name.size(), backup_service_name.data(),
-        strlen(KeychainPassword::account_name), KeychainPassword::account_name,
-        password.get()->size(), password.get()->data(),
-        backup_item.InitializeInto());
-  }
-
-  if (storage_item) {
-    error = keychain.ItemDelete(storage_item);
-    if (error != noErr) {
-      OSSTATUS_LOG(WARNING, error)
-          << "KeychainReauthorize failed to delete item.";
-    }
-  }
-
-  error = keychain.AddGenericPassword(
-      strlen(KeychainPassword::service_name), KeychainPassword::service_name,
-      strlen(KeychainPassword::account_name), KeychainPassword::account_name,
-      password.get()->size(), password.get()->data(), nullptr);
-
-  if (error != noErr) {
-    OSSTATUS_LOG(ERROR, error) << "Failed to re-add storage password.";
-    return false;
-  }
-
-  if (backup_item.get() == nullptr) {
-    // Attempt to get the backup entry in case one exists. Ignore return value.
-    // This could happen if Chrome crashed after writing the backup entry and
-    // before deleting the main entry.
-    keychain.FindGenericPassword(
-        backup_service_name.size(), backup_service_name.data(),
-        strlen(KeychainPassword::account_name), KeychainPassword::account_name,
-        &pw_length, &password_data, backup_item.InitializeInto());
-  }
-
-  if (backup_item.get()) {
-    error = keychain.ItemDelete(backup_item);
-    if (error != noErr) {
-      OSSTATUS_LOG(WARNING, error) << "Deleting backup entry failed.";
-    }
-  }
-
-  return true;
-}
-
-// This performs the re-reauthorization from the stub executable.
-void KeychainReauthorizeFromStub(NSString* pref_key) {
-  NSUserDefaults* user_defaults = [NSUserDefaults standardUserDefaults];
-
-  NSString* success_pref_key = [pref_key stringByAppendingString:@"Success"];
-  BOOL success_value = [user_defaults boolForKey:success_pref_key];
-  if (success_value)
-    return;
-
-  bool success = KeychainReauthorize();
-  if (!success)
-    return;
-
-  [user_defaults setBool:YES forKey:success_pref_key];
-  [user_defaults synchronize];
-}
-
-}  // namespace
-
-void KeychainReauthorizeIfNeeded(NSString* pref_key, int max_tries) {
-#if defined(GOOGLE_CHROME_BUILD)
-  // Only launch the stub executable when running in the browser.
-  DCHECK(base::mac::AmIBundled());
-
-  NSUserDefaults* user_defaults = [NSUserDefaults standardUserDefaults];
-  int pref_value = [user_defaults integerForKey:pref_key];
-
-  if (pref_value >= max_tries)
-    return;
-
-  NSString* success_pref_key = [pref_key stringByAppendingString:@"Success"];
-  BOOL success_value = [user_defaults boolForKey:success_pref_key];
-  if (success_value)
-    return;
-
-  if (pref_value > 0) {
-    // Logs the number of previous tries that didn't complete.
-    base::UmaHistogramSparse("OSX.KeychainReauthorizeIfNeeded", pref_value);
-  }
-
-  ++pref_value;
-  [user_defaults setInteger:pref_value forKey:pref_key];
-  [user_defaults synchronize];
-
-  NSBundle* main_bundle = base::mac::OuterBundle();
-  std::string identifier =
-      base::SysNSStringToUTF8([main_bundle bundleIdentifier]);
-  std::string bundle_path = base::SysNSStringToUTF8([main_bundle bundlePath]);
-
-  base::FilePath reauth_binary = base::FilePath(bundle_path)
-                                     .Append("Contents")
-                                     .Append("Helpers")
-                                     .Append(identifier);
-
-  std::string framework_path =
-      base::SysNSStringToUTF8([base::mac::FrameworkBundle() executablePath]);
-
-  std::vector<std::string> argv = {reauth_binary.value(), framework_path};
-  std::vector<char*> argv_cstr;
-  argv_cstr.reserve(argv.size() + 1);
-  for (size_t i = 0; i < argv.size(); ++i) {
-    argv_cstr.push_back(const_cast<char*>(argv[i].c_str()));
-  }
-  argv_cstr.push_back(nullptr);
-
-  pid_t pid;
-  char** new_environ = *_NSGetEnviron();
-  errno = posix_spawn(&pid, reauth_binary.value().c_str(), nullptr, nullptr,
-                      &argv_cstr[0], new_environ);
-  if (errno != 0) {
-    PLOG(ERROR) << "posix_spawn";
-    return;
-  } else {
-    // If execution does not block on the helper stub, there is a
-    // race condition between it and Chrome creating a new keychain entry.
-    int status;
-    if (HANDLE_EINTR(waitpid(pid, &status, 0)) != pid || status != 0) {
-      return;
-    }
-  }
-
-  // Find out if the re-authorization succeeded by querying cfprefs.
-  bool stub_result = [user_defaults boolForKey:success_pref_key];
-  // Logs the try number (1, 2) that succeeded.
-  if (stub_result) {
-    base::UmaHistogramSparse("OSX.KeychainReauthorizeIfNeededSuccess",
-                             pref_value);
-  }
-#endif  // defined(GOOGLE_CHROME_BUILD)
-}
-
-void KeychainReauthorizeIfNeededAtUpdate(NSString* pref_key, int max_tries) {
-  @autoreleasepool {
-    KeychainReauthorizeFromStub(pref_key);
-  }
-}
-
-}  // namespace chrome
diff --git a/chrome/browser/net/net_export_helper.cc b/chrome/browser/net/net_export_helper.cc
index acca731..c241de1f 100644
--- a/chrome/browser/net/net_export_helper.cc
+++ b/chrome/browser/net/net_export_helper.cc
@@ -13,7 +13,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
 #include "extensions/buildflags/buildflags.h"
 
 #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -81,20 +80,6 @@
   return extension_list;
 }
 
-std::unique_ptr<base::DictionaryValue> GetDataReductionProxyInfo(
-    Profile* profile) {
-  DataReductionProxyChromeSettings* data_reduction_proxy_settings =
-      DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
-
-  if (!data_reduction_proxy_settings)
-    return nullptr;
-
-  data_reduction_proxy::DataReductionProxyEventStore* event_store =
-      data_reduction_proxy_settings->GetEventStore();
-
-  return event_store ? event_store->GetSummaryValue() : nullptr;
-}
-
 std::unique_ptr<base::Value> GetSessionNetworkStats(Profile* profile) {
   DataReductionProxyChromeSettings* data_reduction_proxy_settings =
       DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
diff --git a/chrome/browser/net/net_export_helper.h b/chrome/browser/net/net_export_helper.h
index 02394ee0..7303c31 100644
--- a/chrome/browser/net/net_export_helper.h
+++ b/chrome/browser/net/net_export_helper.h
@@ -18,15 +18,13 @@
 
 // Methods for getting Value summaries of net log polled data that need to be
 // retrieved on the UI thread. All functions are expected to run on the UI
-// thread. GetHistoricNetworkStats(), GetDataReductionProxyInfo(), and
-// GetSessionNetworkStats() may return null if the info does not exist; others
-// will always return a Value (possibly empty).
+// thread. GetHistoricNetworkStats() and GetSessionNetworkStats() may return
+// null if the info does not exist; others will always return a Value (possibly
+// empty).
 
 std::unique_ptr<base::DictionaryValue> GetPrerenderInfo(Profile* profile);
 std::unique_ptr<base::Value> GetHistoricNetworkStats(Profile* profile);
 std::unique_ptr<base::ListValue> GetExtensionInfo(Profile* profile);
-std::unique_ptr<base::DictionaryValue> GetDataReductionProxyInfo(
-    Profile* profile);
 std::unique_ptr<base::Value> GetSessionNetworkStats(Profile* profile);
 #if defined(OS_WIN)
 std::unique_ptr<base::DictionaryValue> GetWindowsServiceProviders();
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
index ad22fa7..1a4b72bd 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc
@@ -98,7 +98,7 @@
   std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData>
       data_reduction_proxy_io_data(
           new data_reduction_proxy::DataReductionProxyIOData(
-              DataReductionProxyChromeSettings::GetClient(), prefs, net_log,
+              DataReductionProxyChromeSettings::GetClient(), prefs,
               content::GetNetworkConnectionTracker(), io_task_runner,
               ui_task_runner, enabled, GetUserAgent(),
               version_info::GetChannelString(chrome::GetChannel())));
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
index e73e2c2a..0eb71dc 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
@@ -23,7 +23,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/data_reduction_proxy/core/browser/data_usage_store.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
@@ -231,17 +230,6 @@
   return ScopedJavaLocalRef<jlongArray>(env, result);
 }
 
-ScopedJavaLocalRef<jstring> DataReductionProxySettingsAndroid::GetHttpProxyList(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj) {
-  data_reduction_proxy::DataReductionProxyEventStore* event_store =
-      Settings()->GetEventStore();
-  if (!event_store)
-    return ConvertUTF8ToJavaString(env, std::string());
-
-  return ConvertUTF8ToJavaString(env, event_store->GetHttpProxyList());
-}
-
 DataReductionProxySettings* DataReductionProxySettingsAndroid::Settings() {
   DataReductionProxySettings* settings =
       DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
@@ -250,18 +238,6 @@
   return settings;
 }
 
-ScopedJavaLocalRef<jstring>
-DataReductionProxySettingsAndroid::GetLastBypassEvent(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj) {
-  data_reduction_proxy::DataReductionProxyEventStore* event_store =
-      Settings()->GetEventStore();
-  if (!event_store)
-    return ConvertUTF8ToJavaString(env, std::string());
-
-  return ConvertUTF8ToJavaString(env, event_store->SanitizedLastBypassEvent());
-}
-
 void DataReductionProxySettingsAndroid::QueryDataUsage(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj,
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h
index ad6fc89c..5442516 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h
@@ -99,18 +99,6 @@
       jstring host,
       jstring realm);
 
-  // Returns a Java string of the Data Reduction Proxy proxy list for HTTP
-  // origins as a semi-colon delimited list.
-  base::android::ScopedJavaLocalRef<jstring> GetHttpProxyList(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-
-  // Returns a Java string of the last Data Reduction Proxy bypass event as
-  // a JSON object.
-  base::android::ScopedJavaLocalRef<jstring> GetLastBypassEvent(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-
   // Gets the historical data usage for |numDays| and adds them to a list that
   // groups data use by hostname.
   void QueryDataUsage(JNIEnv* env,
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
index 4628d2c..d96587d 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
@@ -127,7 +127,7 @@
   ASSERT_FALSE(result.is_null());
 
   std::vector<int64_t> result_vector;
-  base::android::JavaLongArrayToInt64Vector(env_, result.obj(), &result_vector);
+  base::android::JavaLongArrayToInt64Vector(env_, result, &result_vector);
 
   std::vector<int64_t> expected_vector;
   for (size_t i = data_reduction_proxy::kNumDaysInHistory; i;)
@@ -143,7 +143,7 @@
   ASSERT_FALSE(result.is_null());
 
   std::vector<int64_t> result_vector;
-  base::android::JavaLongArrayToInt64Vector(env_, result.obj(), &result_vector);
+  base::android::JavaLongArrayToInt64Vector(env_, result, &result_vector);
 
   std::vector<int64_t> expected_vector;
   for (size_t i = data_reduction_proxy::kNumDaysInHistory; i;)
diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrome/browser/offline_pages/android/offline_page_bridge.cc
index ce5b2d00..4adfe0d 100644
--- a/chrome/browser/offline_pages/android/offline_page_bridge.cc
+++ b/chrome/browser/offline_pages/android/offline_page_bridge.cc
@@ -481,10 +481,9 @@
     const JavaParamRef<jobjectArray>& j_ids_array) {
   std::vector<std::string> name_spaces;
   std::vector<std::string> ids;
-  base::android::AppendJavaStringArrayToStringVector(
-      env, j_namespaces_array.obj(), &name_spaces);
-  base::android::AppendJavaStringArrayToStringVector(env, j_ids_array.obj(),
-                                                     &ids);
+  base::android::AppendJavaStringArrayToStringVector(env, j_namespaces_array,
+                                                     &name_spaces);
+  base::android::AppendJavaStringArrayToStringVector(env, j_ids_array, &ids);
   DCHECK_EQ(name_spaces.size(), ids.size());
   std::vector<ClientId> client_ids;
 
diff --git a/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_browsertest.cc
index a905b96..82e333e 100644
--- a/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_browsertest.cc
+++ b/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_browsertest.cc
@@ -194,8 +194,6 @@
 
   ~AdsPageLoadMetricsObserverResourceBrowserTest() override {}
   void SetUpOnMainThread() override {
-    g_browser_process->subresource_filter_ruleset_service()
-        ->SetIsAfterStartupForTesting();
     host_resolver()->AddRule("*", "127.0.0.1");
     SetRulesetWithRules(
         {subresource_filter::testing::CreateSuffixRule("ad_script.js"),
diff --git a/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc b/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc
index 39af512..72f6e44 100644
--- a/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc
+++ b/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc
@@ -59,6 +59,7 @@
           WebFeature::kDocumentDomainBlockedCrossOriginAccess,
           WebFeature::kDocumentDomainEnabledCrossOriginAccess,
           WebFeature::kSuppressHistoryEntryWithoutUserGesture,
+          WebFeature::kCursorImageGT32x32, WebFeature::kCursorImageLE32x32,
       }));
   return opt_in_features->count(feature);
 }
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_observer.h b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
index 1fbf65f..9d842fa 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
@@ -428,7 +428,7 @@
                                        const PageLoadExtraInfo& extra_info) {}
 
   // Invoked when there is data use for loading a resource on the page
-  // acrosss all frames. This only contains resources that have had new
+  // across all frames. This only contains resources that have had new
   // data use since the last callback.
   virtual void OnResourceDataUseObserved(
       const std::vector<mojom::ResourceDataUpdatePtr>& resources) {}
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 35800552..5b3af3b 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -121,8 +121,8 @@
   return nullptr;
 }
 
-const SigninManagerBase* GetSigninManager(Profile* profile) {
-  return SigninManagerFactory::GetForProfile(profile);
+const SigninManagerBase* GetSigninManagerForOriginalProfile(Profile* profile) {
+  return SigninManagerFactory::GetForProfile(profile->GetOriginalProfile());
 }
 
 #if !defined(OS_ANDROID)
@@ -167,9 +167,10 @@
       password_manager_client_bindings_(web_contents, this),
       password_manager_driver_bindings_(web_contents, this),
       observer_(nullptr),
-      credentials_filter_(this,
-                          base::Bind(&GetSyncService, profile_),
-                          base::Bind(&GetSigninManager, profile_)),
+      credentials_filter_(
+          this,
+          base::BindRepeating(&GetSyncService, profile_),
+          base::BindRepeating(&GetSigninManagerForOriginalProfile, profile_)),
       helper_(this) {
   ContentPasswordManagerDriverFactory::CreateForWebContents(web_contents, this,
                                                             autofill_client);
@@ -186,7 +187,7 @@
       password_manager::prefs::kCredentialsEnableService, GetPrefs());
   static base::NoDestructor<password_manager::StoreMetricsReporter> reporter(
       *saving_and_filling_passwords_enabled_, this, GetSyncService(profile_),
-      GetSigninManager(profile_), GetPrefs());
+      GetSigninManagerForOriginalProfile(profile_), GetPrefs());
   driver_factory_->RequestSendLoggingAvailability();
 }
 
diff --git a/chrome/browser/payments/android/payment_manifest_web_data_service_android.cc b/chrome/browser/payments/android/payment_manifest_web_data_service_android.cc
index 07150ac2..4b0cfa0b 100644
--- a/chrome/browser/payments/android/payment_manifest_web_data_service_android.cc
+++ b/chrome/browser/payments/android/payment_manifest_web_data_service_android.cc
@@ -170,8 +170,7 @@
       base::android::ScopedJavaLocalRef<jbyteArray> jfingerprint(
           env, (jbyteArray)env->GetObjectArrayElement(
                    jsection_fingerprints.obj(), j));
-      base::android::JavaByteArrayToByteVector(env, jfingerprint.obj(),
-                                               &fingerprint);
+      base::android::JavaByteArrayToByteVector(env, jfingerprint, &fingerprint);
       section.fingerprints.emplace_back(fingerprint);
     }
 
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index 92967aa3..b9f2c3a3d 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -564,6 +564,9 @@
   { key::kPowerManagementUsesVideoActivity,
     ash::prefs::kPowerUseVideoActivity,
     base::Value::Type::BOOLEAN },
+  { key::kAllowWakeLocks,
+    ash::prefs::kPowerAllowWakeLocks,
+    base::Value::Type::BOOLEAN },
   { key::kAllowScreenWakeLocks,
     ash::prefs::kPowerAllowScreenWakeLocks,
     base::Value::Type::BOOLEAN },
diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py
index d1716c9..bbc0771 100644
--- a/chrome/browser/policy/test/policy_testserver.py
+++ b/chrome/browser/policy/test/policy_testserver.py
@@ -89,7 +89,7 @@
 import device_management_backend_pb2 as dm
 import cloud_policy_pb2 as cp
 
-# Policy for extensions is not supported on Android nor iOS.
+# Policy for extensions is not supported on Android.
 try:
   import chrome_extension_policy_pb2 as ep
 except ImportError:
@@ -592,8 +592,7 @@
               'google/chromeos/device',
               'google/chromeos/publicaccount',
               'google/chromeos/user',
-              'google/chrome/user',
-              'google/ios/user')):
+              'google/chrome/user')):
         fetch_response = response.policy_response.response.add()
         self.ProcessCloudPolicy(request, token_info, fetch_response, username)
       elif (request.policy_type in
@@ -992,8 +991,7 @@
       if msg.policy_type in ('google/android/user',
                              'google/chromeos/publicaccount',
                              'google/chromeos/user',
-                             'google/chrome/user',
-                             'google/ios/user'):
+                             'google/chrome/user'):
         settings = cp.CloudPolicySettings()
         payload = self.server.ReadPolicyFromDataDir(policy_key, settings)
         if payload is None:
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 77f4bb2..897eca5 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -86,6 +86,7 @@
 #include "components/flags_ui/pref_service_flags_storage.h"
 #include "components/gcm_driver/gcm_channel_status_syncer.h"
 #include "components/image_fetcher/core/storage/image_cache.h"
+#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
 #include "components/invalidation/impl/per_user_topic_registration_manager.h"
 #include "components/language/content/browser/geo_language_provider.h"
 #include "components/metrics/metrics_pref_names.h"
@@ -373,6 +374,9 @@
 const char kSupervisedUserCreationAllowed[] =
     "profile.managed_user_creation_allowed";
 
+// Deprecated 10/2018
+const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
+
 // Register prefs used only for migration (clearing or moving to a new key).
 void RegisterProfilePrefsForMigration(
     user_prefs::PrefRegistrySyncable* registry) {
@@ -396,6 +400,8 @@
   registry->RegisterIntegerPref(kOptionsWindowLastTabIndex, 0);
   registry->RegisterStringPref(kTrustedDownloadSources, std::string());
   registry->RegisterBooleanPref(kSupervisedUserCreationAllowed, true);
+
+  registry->RegisterBooleanPref(kReverseAutologinEnabled, true);
 }
 
 }  // namespace
@@ -593,6 +599,7 @@
   sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
   syncer::SyncPrefs::RegisterProfilePrefs(registry);
   syncer::PerUserTopicRegistrationManager::RegisterProfilePrefs(registry);
+  syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
   TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
   translate::TranslatePrefs::RegisterProfilePrefs(registry);
   UINetworkQualityEstimatorService::RegisterProfilePrefs(registry);
@@ -851,4 +858,7 @@
   profile_prefs->ClearPref(kOptionsWindowLastTabIndex);
   profile_prefs->ClearPref(kTrustedDownloadSources);
   profile_prefs->ClearPref(kSupervisedUserCreationAllowed);
+
+  // Added 10/2018
+  profile_prefs->ClearPref(kReverseAutologinEnabled);
 }
diff --git a/chrome/browser/previews/android/previews_android_bridge.cc b/chrome/browser/previews/android/previews_android_bridge.cc
index b5630e9..9893f33 100644
--- a/chrome/browser/previews/android/previews_android_bridge.cc
+++ b/chrome/browser/previews/android/previews_android_bridge.cc
@@ -50,6 +50,9 @@
       content::WebContents::FromJavaWebContents(j_web_contents);
   if (!web_contents)
     return base::android::ScopedJavaLocalRef<jstring>();
+
+  // TODO(crbug.com/894881): Add the Lite Pages URL rewriting during a pending
+  // navigation.
   return base::android::ScopedJavaLocalRef<jstring>(
       base::android::ConvertUTF8ToJavaString(
           env, web_contents->GetVisibleURL().host()));
diff --git a/chrome/browser/previews/previews_lite_page_browsertest.cc b/chrome/browser/previews/previews_lite_page_browsertest.cc
index 6cd21b2..784e910 100644
--- a/chrome/browser/previews/previews_lite_page_browsertest.cc
+++ b/chrome/browser/previews/previews_lite_page_browsertest.cc
@@ -207,37 +207,70 @@
     EXPECT_TRUE(content::ExecuteScript(GetWebContents(), script));
   }
 
-  GURL NavigatedURL() const { return GetWebContents()->GetURL(); }
+  // Returns the loaded, non-virtual URL, of the current visible
+  // NavigationEntry.
+  GURL GetLoadedURL() const {
+    return GetWebContents()->GetController().GetVisibleEntry()->GetURL();
+  }
 
   void VerifyPreviewLoaded() const {
-    const GURL navigated_url = NavigatedURL();
+    // The Virtual URL is set in a WebContentsObserver::OnFinishNavigation.
+    // Since |ui_test_utils::NavigationToURL| uses the same signal to stop
+    // waiting, there is sometimes a race condition between the two, causing
+    // this validation to flake. Waiting for the load stop on the page will
+    // ensure that the Virtual URL has been set.
+    content::WaitForLoadStop(GetWebContents());
+
+    const GURL loaded_url = GetLoadedURL();
     const GURL previews_host = previews_server();
-    EXPECT_TRUE(navigated_url.DomainIs(previews_host.host()) &&
-                navigated_url.EffectiveIntPort() ==
+    EXPECT_TRUE(loaded_url.DomainIs(previews_host.host()) &&
+                loaded_url.EffectiveIntPort() ==
                     previews_host.EffectiveIntPort());
+
+    content::NavigationEntry* entry =
+        GetWebContents()->GetController().GetVisibleEntry();
+    EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
+    const GURL virtual_url = entry->GetVirtualURL();
+
+    // The loaded url should be the previews version of the virtual url.
+    EXPECT_EQ(
+        loaded_url,
+        PreviewsLitePageNavigationThrottle::GetPreviewsURLForURL(virtual_url));
+
+    // The Virtual URL should not be on the previews server.
+    // TODO(crbug.com/894854): Use a different hostname and check that here.
+    EXPECT_FALSE(virtual_url.DomainIs(previews_host.host()) &&
+                 virtual_url.EffectiveIntPort() ==
+                     previews_host.EffectiveIntPort());
   }
 
   void VerifyPreviewNotLoaded() const {
-    const GURL navigated_url = NavigatedURL();
+    // The Virtual URL is set in a |WebContentsObserver::OnFinishNavigation|.
+    // Since |ui_test_utils::NavigationToURL| uses the same signal to stop
+    // waiting, there is sometimes a race condition between the two, causing
+    // this validation to flake. Waiting for the load stop on the page will
+    // ensure that the Virtual URL has been set.
+    content::WaitForLoadStop(GetWebContents());
+
+    const GURL loaded_url = GetLoadedURL();
     const GURL previews_host = previews_server();
-    EXPECT_FALSE(navigated_url.DomainIs(previews_host.host()) &&
-                 navigated_url.EffectiveIntPort() ==
+    EXPECT_FALSE(loaded_url.DomainIs(previews_host.host()) &&
+                 loaded_url.EffectiveIntPort() ==
                      previews_host.EffectiveIntPort());
 
     content::NavigationEntry* entry =
         GetWebContents()->GetController().GetVisibleEntry();
     EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
 
-    // Clear the decider's single bypass map so that future page loads aren't
-    // bypassed for the wrong reason.
-    ClearSingleBypass();
+    // The Virtual URL and the loaded URL should be the same.
+    EXPECT_EQ(loaded_url, entry->GetVirtualURL());
   }
 
   void VerifyErrorPageLoaded() const {
-    const GURL navigated_url = NavigatedURL();
+    const GURL loaded_url = GetLoadedURL();
     const GURL previews_host = previews_server();
-    EXPECT_FALSE(navigated_url.DomainIs(previews_host.host()) &&
-                 navigated_url.EffectiveIntPort() ==
+    EXPECT_FALSE(loaded_url.DomainIs(previews_host.host()) &&
+                 loaded_url.EffectiveIntPort() ==
                      previews_host.EffectiveIntPort());
 
     content::NavigationEntry* entry =
@@ -500,6 +533,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpLitePageURL(kSuccess));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.IneligibleReasons",
         PreviewsLitePageNavigationThrottle::IneligibleReason::kNonHttpsScheme,
@@ -522,6 +556,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), https_media_url());
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.BlacklistReasons",
         PreviewsLitePageNavigationThrottle::BlacklistReason::
@@ -544,6 +579,7 @@
         post_data.data(), post_data.size());
     ui_test_utils::NavigateToURL(&params);
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.IneligibleReasons",
         PreviewsLitePageNavigationThrottle::IneligibleReason::kHttpPost, 1);
@@ -556,7 +592,7 @@
     // server.
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), previews_server());
-    EXPECT_EQ(NavigatedURL(), previews_server());
+    EXPECT_EQ(GetLoadedURL(), previews_server());
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.BlacklistReasons",
         PreviewsLitePageNavigationThrottle::BlacklistReason::
@@ -631,6 +667,7 @@
     ui_test_utils::NavigateToURL(browser(), HttpLitePageURL(kSuccess));
 
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.IneligibleReasons",
         PreviewsLitePageNavigationThrottle::IneligibleReason::kNetworkNotSlow,
@@ -676,6 +713,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kRedirect));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount("Previews.ServerLitePage.Triggered",
                                        true, 1);
     histogram_tester.ExpectBucketCount(
@@ -700,6 +738,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kBypass));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount("Previews.ServerLitePage.Triggered",
                                        true, 1);
     histogram_tester.ExpectTotalCount(
@@ -715,6 +754,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kAuthFailure));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount("Previews.ServerLitePage.Triggered",
                                        true, 1);
     histogram_tester.ExpectTotalCount(
@@ -729,6 +769,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kLoadshed));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount("Previews.ServerLitePage.Triggered",
                                        true, 1);
     histogram_tester.ExpectTotalCount(
@@ -765,10 +806,12 @@
   // duration [1 min, 5 mins).
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kLoadshed));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 
   clock->Advance(base::TimeDelta::FromMinutes(1));
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 
   clock->Advance(base::TimeDelta::FromMinutes(4));
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
@@ -780,9 +823,11 @@
   ui_test_utils::NavigateToURL(browser(),
                                HttpsLitePageURL(kLoadshed, &headers));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 
   clock->Advance(base::TimeDelta::FromSeconds(31));
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
@@ -815,6 +860,45 @@
   EXPECT_EQ(GetDataUsage(), 20U);
 }
 
+// Previews InfoBar (which these tests trigger) does not work on Mac.
+// See https://crbug.com/782322 for detail.
+// Also occasional flakes on win7 (https://crbug.com/789542).
+#if defined(OS_ANDROID) || defined(OS_LINUX)
+#define MAYBE_LitePagePreviewsNavigation LitePagePreviewsNavigation
+#else
+#define MAYBE_LitePagePreviewsNavigation DISABLED_LitePagePreviewsNavigation
+#endif
+IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
+                       MAYBE_LitePagePreviewsNavigation) {
+  ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
+  VerifyPreviewLoaded();
+
+  // Go to a new page that doesn't Preview.
+  ui_test_utils::NavigateToURL(browser(), http_url());
+  VerifyPreviewNotLoaded();
+  ClearSingleBypass();
+
+  // Note: |VerifyPreviewLoaded| calls |content::WaitForLoadStop()| so these are
+  // safe.
+
+  // Navigate back.
+  GetWebContents()->GetController().GoBack();
+  VerifyPreviewLoaded();
+
+  // Navigate forward.
+  GetWebContents()->GetController().GoForward();
+  VerifyPreviewNotLoaded();
+  ClearSingleBypass();
+
+  // Navigate back again.
+  GetWebContents()->GetController().GoBack();
+  VerifyPreviewLoaded();
+
+  // Reload.
+  GetWebContents()->GetController().Reload(content::ReloadType::NORMAL, false);
+  VerifyPreviewLoaded();
+}
+
 class PreviewsLitePageServerTimeoutBrowserTest
     : public PreviewsLitePageServerBrowserTest {
  public:
@@ -846,6 +930,7 @@
     ui_test_utils::NavigateToURL(browser(),
                                  HttpsLitePageURL(kSuccess, nullptr, -1));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectBucketCount(
         "Previews.ServerLitePage.ServerResponse",
         PreviewsLitePageNavigationThrottle::ServerResponse::kTimeout, 1);
@@ -856,6 +941,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), slow_http_url());
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
     histogram_tester.ExpectTotalCount("Previews.ServerLitePage.ServerResponse",
                                       0);
   }
@@ -896,6 +982,7 @@
     base::HistogramTester histogram_tester;
     ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
     VerifyPreviewNotLoaded();
+    ClearSingleBypass();
 
     histogram_tester.ExpectBucketCount("Previews.ServerLitePage.Triggered",
                                        true, 1);
@@ -936,6 +1023,7 @@
   // Verify the preview is not triggered on HTTPS pageloads without DataSaver.
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 }
 
 class PreviewsLitePageServerNoDataSaverHeaderBrowserTest
@@ -972,6 +1060,7 @@
   // Verify the preview is not triggered on HTTPS pageloads without data saver.
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
 }
 
 class PreviewsLitePageNotificationDSEnabledBrowserTest
@@ -1014,6 +1103,7 @@
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
 
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
   EXPECT_EQ(1U, GetInfoBarService()->infobar_count());
   histogram_tester.ExpectBucketCount(
       "Previews.ServerLitePage.IneligibleReasons",
@@ -1070,5 +1160,6 @@
                        MAYBE_LitePagePreviewsInfoBarNonDataSaverUser) {
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
+  ClearSingleBypass();
   EXPECT_EQ(0U, GetInfoBarService()->infobar_count());
 }
diff --git a/chrome/browser/previews/previews_lite_page_navigation_throttle.cc b/chrome/browser/previews/previews_lite_page_navigation_throttle.cc
index 8ab4cef..d1bcf5b 100644
--- a/chrome/browser/previews/previews_lite_page_navigation_throttle.cc
+++ b/chrome/browser/previews/previews_lite_page_navigation_throttle.cc
@@ -18,6 +18,7 @@
 #include "base/strings/string_util.h"
 #include "base/task/post_task.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
@@ -152,6 +153,25 @@
   base::WeakPtrFactory<WebContentsLifetimeHelper> weak_factory_;
 };
 
+bool HandlePreviewsLitePageURLRewrite(
+    GURL* url,
+    content::BrowserContext* browser_context) {
+  // Don't change the |url|, just register our interest in reversing it before
+  // it is displayed to the user in |HandlePreviewsLitePageURLRewriteReverse|.
+  return !!PreviewsLitePageNavigationThrottle::GetOriginalURL(*url, nullptr);
+}
+
+bool HandlePreviewsLitePageURLRewriteReverse(
+    GURL* url,
+    content::BrowserContext* browser_context) {
+  std::string original_url;
+  if (PreviewsLitePageNavigationThrottle::GetOriginalURL(*url, &original_url)) {
+    *url = GURL(original_url);
+    return true;
+  }
+  return false;
+}
+
 PreviewsLitePageNavigationThrottle::PreviewsLitePageNavigationThrottle(
     content::NavigationHandle* handle,
     PreviewsLitePageNavigationThrottleManager* manager)
@@ -256,7 +276,6 @@
 GURL PreviewsLitePageNavigationThrottle::GetPreviewsURLForURL(
     const GURL& original_url) {
   DCHECK(original_url.is_valid());
-  DCHECK(!IsPreviewsDomain(original_url));
 
   std::string origin_hash = base::ToLowerASCII(base32::Base32Encode(
       crypto::SHA256HashString(
@@ -275,6 +294,7 @@
 }
 
 GURL PreviewsLitePageNavigationThrottle::GetPreviewsURL() const {
+  DCHECK(!IsPreviewsDomain(navigation_handle()->GetURL()));
   return GetPreviewsURLForURL(navigation_handle()->GetURL());
 }
 
diff --git a/chrome/browser/previews/previews_lite_page_navigation_throttle.h b/chrome/browser/previews/previews_lite_page_navigation_throttle.h
index f3aa65d..8d87aeb0 100644
--- a/chrome/browser/previews/previews_lite_page_navigation_throttle.h
+++ b/chrome/browser/previews/previews_lite_page_navigation_throttle.h
@@ -11,8 +11,25 @@
 
 namespace content {
 struct OpenURLParams;
+class BrowserContext;
 }
 
+// If the given URL is a LitePage Preview URL, this returns true but does not
+// change the |url|. This will set |update_virtual_url_with_url| on
+// NavigationEntry so that |HandlePreviewsLitePageURLRewriteReverse| is called
+// when the navigation finishes.
+// Note: This means the virtual URL will not be set during the navigation load.
+// This is handled separately in UI on Android.
+bool HandlePreviewsLitePageURLRewrite(GURL* url,
+                                      content::BrowserContext* browser_context);
+
+// Handles translating the given Lite Page URL to the original URL. Returns true
+// if the given |url| was a preview, otherwise returns false and does not change
+// |url|.
+bool HandlePreviewsLitePageURLRewriteReverse(
+    GURL* url,
+    content::BrowserContext* browser_context);
+
 // This class does the actual decision making about when to serve a Lite Page
 // Server Preview, and the legwork to trigger the Preview navigation. When a
 // Preview is triggered, it will cancel the incoming navigation and PostTask a
diff --git a/chrome/browser/profiles/guest_mode_policy_handler.cc b/chrome/browser/profiles/guest_mode_policy_handler.cc
index 2b362217..9f17bce3 100644
--- a/chrome/browser/profiles/guest_mode_policy_handler.cc
+++ b/chrome/browser/profiles/guest_mode_policy_handler.cc
@@ -32,8 +32,10 @@
   const base::Value* browser_signin_value =
       policies.GetValue(key::kBrowserSignin);
   int int_browser_signin_value;
-  if (browser_signin_value &&
-      browser_signin_value->GetAsInteger(&int_browser_signin_value) &&
+  bool is_browser_signin_policy_set =
+      (browser_signin_value &&
+       browser_signin_value->GetAsInteger(&int_browser_signin_value));
+  if (is_browser_signin_policy_set &&
       static_cast<BrowserSigninMode>(int_browser_signin_value) ==
           BrowserSigninMode::kForced) {
     prefs->SetBoolean(prefs::kBrowserGuestModeEnabled, false);
@@ -43,7 +45,7 @@
   const base::Value* force_signin_value =
       policies.GetValue(key::kForceBrowserSignin);
   bool is_force_signin_enabled;
-  if (force_signin_value &&
+  if (!is_browser_signin_policy_set && force_signin_value &&
       force_signin_value->GetAsBoolean(&is_force_signin_enabled) &&
       is_force_signin_enabled) {
     prefs->SetBoolean(prefs::kBrowserGuestModeEnabled, false);
diff --git a/chrome/browser/profiles/guest_mode_policy_handler_unittest.cc b/chrome/browser/profiles/guest_mode_policy_handler_unittest.cc
index d8f8b3d..ea21775 100644
--- a/chrome/browser/profiles/guest_mode_policy_handler_unittest.cc
+++ b/chrome/browser/profiles/guest_mode_policy_handler_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/profiles/guest_mode_policy_handler.h"
 
 #include "base/values.h"
+#include "chrome/browser/policy/browser_signin_policy_handler.h"
 #include "chrome/common/pref_names.h"
 #include "components/policy/core/common/policy_map.h"
 #include "components/policy/policy_constants.h"
@@ -85,4 +86,39 @@
   EXPECT_FALSE(value);
 }
 
+TEST_F(GuestModePolicyHandlerTest, GuestModeDisabledWhenBrowserSigninIsForced) {
+  SetUpPolicy(key::kBrowserSignin,
+              static_cast<int>(BrowserSigninMode::kForced));
+  handler_.ApplyPolicySettings(policies_, &prefs_);
+  bool value = true;
+  EXPECT_TRUE(prefs_.GetBoolean(prefs::kBrowserGuestModeEnabled, &value));
+  EXPECT_FALSE(value);
+}
+
+TEST_F(GuestModePolicyHandlerTest,
+       GuestModeIsNotSetWhenBrowserSigninIsNotForced) {
+  bool value = false;
+  SetUpPolicy(key::kBrowserSignin,
+              static_cast<int>(BrowserSigninMode::kEnabled));
+  handler_.ApplyPolicySettings(policies_, &prefs_);
+  EXPECT_FALSE(prefs_.GetBoolean(prefs::kBrowserGuestModeEnabled, &value));
+
+  SetUpPolicy(key::kBrowserSignin,
+              static_cast<int>(BrowserSigninMode::kDisabled));
+  handler_.ApplyPolicySettings(policies_, &prefs_);
+  EXPECT_FALSE(prefs_.GetBoolean(prefs::kBrowserGuestModeEnabled, &value));
+
+  // Invalid format
+  SetUpPolicy(key::kBrowserSignin, false);
+  handler_.ApplyPolicySettings(policies_, &prefs_);
+  EXPECT_FALSE(prefs_.GetBoolean(prefs::kBrowserGuestModeEnabled, &value));
+
+  // Even with forceBrowserSignin enable.
+  SetUpPolicy(key::kBrowserSignin,
+              static_cast<int>(BrowserSigninMode::kEnabled));
+  SetUpPolicy(key::kForceBrowserSignin, true);
+  handler_.ApplyPolicySettings(policies_, &prefs_);
+  EXPECT_FALSE(prefs_.GetBoolean(prefs::kBrowserGuestModeEnabled, &value));
+}
+
 }  // namespace policy
diff --git a/chrome/browser/resources/chromeos/login/arc_terms_of_service.js b/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
index 62bf462b..946d5323 100644
--- a/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
+++ b/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
@@ -19,6 +19,7 @@
     arcTosButtonsDisabled: {
       type: Boolean,
       value: true,
+      observer: 'buttonsDisabledStateChanged_',
     },
 
     /**
@@ -31,6 +32,28 @@
   },
 
   /**
+   * Flag that ensures that OOBE configuration is applied only once.
+   * @private {boolean}
+   */
+  configuration_applied_: false,
+
+  /**
+   * Flag indicating if screen was shown.
+   * @private {boolean}
+   */
+  is_shown_: false,
+
+  /** Called when dialog is shown */
+  onBeforeShow: function() {
+    this.behaviors.forEach((behavior) => {
+      if (behavior.onBeforeShow)
+        behavior.onBeforeShow.call(this);
+    });
+    this.is_shown_ = true;
+    window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
+  },
+
+  /**
    * Returns element by its id.
    */
   getElement: function(id) {
@@ -45,6 +68,42 @@
   },
 
   /**
+   * Called when dialog is shown for the first time.
+   *
+   * @private
+   */
+  applyOobeConfiguration_: function() {
+    if (this.configuration_applied_)
+      return;
+    var configuration = Oobe.getInstance().getOobeConfiguration();
+    if (!configuration)
+      return;
+    if (this.arcTosButtonsDisabled)
+      return;
+    if (configuration.arcTosAutoAccept) {
+      this.onAccept_();
+    }
+    this.configuration_applied_ = true;
+  },
+
+  /**
+   * Called whenever buttons state is updated.
+   *
+   * @private
+   */
+  buttonsDisabledStateChanged_: function(newValue, oldValue) {
+    // Trigger applyOobeConfiguration_ if buttons are enabled and dialog is
+    // visible.
+    if (this.arcTosButtonsDisabled)
+      return;
+    if (!this.is_shown_)
+      return;
+    if (this.is_configuration_applied_)
+      return;
+    window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
+  },
+
+  /**
    * On-tap event handler for Accept button.
    *
    * @private
diff --git a/chrome/browser/resources/chromeos/login/demo_preferences.js b/chrome/browser/resources/chromeos/login/demo_preferences.js
index 5952902..68a0b67 100644
--- a/chrome/browser/resources/chromeos/login/demo_preferences.js
+++ b/chrome/browser/resources/chromeos/login/demo_preferences.js
@@ -25,6 +25,34 @@
     },
   },
 
+  /**
+   * Flag that ensures that OOBE configuration is applied only once.
+   * @private {boolean}
+   */
+  configuration_applied_: false,
+
+  /** Called when dialog is shown */
+  onBeforeShow: function() {
+    this.behaviors.forEach((behavior) => {
+      if (behavior.onBeforeShow)
+        behavior.onBeforeShow.call(this);
+    });
+    window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
+  },
+
+  /** Called when dialog is shown for the first time */
+  applyOobeConfiguration_: function() {
+    if (this.configuration_applied_)
+      return;
+    var configuration = Oobe.getInstance().getOobeConfiguration();
+    if (!configuration)
+      return;
+    if (configuration.demoPreferencesNext) {
+      this.onNextClicked_();
+    }
+    this.configuration_applied_ = true;
+  },
+
   /** Called after resources are updated. */
   updateLocalizedContent: function() {
     assert(loadTimeData);
diff --git a/chrome/browser/resources/chromeos/login/network_select_login.js b/chrome/browser/resources/chromeos/login/network_select_login.js
index 9de906fc..82851937 100644
--- a/chrome/browser/resources/chromeos/login/network_select_login.js
+++ b/chrome/browser/resources/chromeos/login/network_select_login.js
@@ -215,10 +215,15 @@
       var network =
           networks.find(state => state.GUID == configuration.networkSelectGuid);
       if (network) {
-        this.handleNetworkSelection_(network);
+        window.setTimeout(this.handleNetworkSelection_.bind(this, network), 0);
         this.configuration_applied_ = true;
+        return;
       }
     }
+    if (configuration.networkOfflineDemo && this.isOfflineDemoModeSetup) {
+      window.setTimeout(this.onOfflineDemoSetupClicked_.bind(this), 0);
+      this.configuration_applied_ = true;
+    }
   },
 
   /**
diff --git a/chrome/browser/resources/chromeos/login/oobe_eula.js b/chrome/browser/resources/chromeos/login/oobe_eula.js
index 08302c93..873dcff6 100644
--- a/chrome/browser/resources/chromeos/login/oobe_eula.js
+++ b/chrome/browser/resources/chromeos/login/oobe_eula.js
@@ -74,6 +74,14 @@
       if (behavior.onBeforeShow)
         behavior.onBeforeShow.call(this);
     });
+    window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
+  },
+
+  /**
+   * Called when dialog is shown for the first time.
+   * @private
+   */
+  applyOobeConfiguration_: function() {
     if (this.configuration_applied_)
       return;
     var configuration = Oobe.getInstance().getOobeConfiguration();
diff --git a/chrome/browser/resources/chromeos/login/oobe_types.js b/chrome/browser/resources/chromeos/login/oobe_types.js
index fd4ac25..9033411 100644
--- a/chrome/browser/resources/chromeos/login/oobe_types.js
+++ b/chrome/browser/resources/chromeos/login/oobe_types.js
@@ -70,8 +70,14 @@
  * Keys are also listed in chrome/browser/chromeos/login/configuration_keys.h
  * @typedef {{
  *   welcomeNext: boolean|undefined,
+ *   enableDemoMode: boolean|undefined,
+ *   demoPreferencesNext: boolean|undefined,
  *   networkSelectGuid: string|undefined,
+ *   networkOfflineDemo: boolean|undefined,
+ *   eulaAutoAccept: boolean|undefined,
+ *   eulaSendStatistics: boolean|undefined,
  *   updateSkipNonCritical: boolean|undefined,
+ *   arcTosAutoAccept: boolean|undefined,
  * }}
  */
 OobeTypes.OobeConfiguration;
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome.js b/chrome/browser/resources/chromeos/login/oobe_welcome.js
index 9bac089..f1176db 100644
--- a/chrome/browser/resources/chromeos/login/oobe_welcome.js
+++ b/chrome/browser/resources/chromeos/login/oobe_welcome.js
@@ -77,6 +77,12 @@
     debuggingLinkVisible: Boolean,
   },
 
+  /**
+   * Flag that ensures that OOBE configuration is applied only once.
+   * @private {boolean}
+   */
+  configuration_applied_: false,
+
   /** @override */
   ready: function() {
     this.updateLocalizedContent();
@@ -99,6 +105,8 @@
     let activeScreen = this.getActiveScreen_();
     if (activeScreen.show)
       activeScreen.show();
+
+    window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
   },
 
   /**
@@ -118,9 +126,31 @@
    * @param {!OobeTypes.OobeConfiguration} configuration
    */
   updateOobeConfiguration: function(configuration) {
+    if (!this.is_shown_)
+      return;
+    if (!this.configuration_applied_)
+      window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
+  },
+
+  /**
+   * Called when dialog is shown for the first time.
+   * @private
+   */
+  applyOobeConfiguration_: function() {
     // TODO(antrim): apply a11y options, language selection
+    if (this.configuration_applied_)
+      return;
+    var configuration = Oobe.getInstance().getOobeConfiguration();
+    if (!configuration)
+      return;
+
     if (configuration.welcomeNext)
       this.onWelcomeNextButtonClicked_();
+
+    if (configuration.enableDemoMode)
+      Oobe.getInstance().startDemoModeFlow();
+
+    this.configuration_applied_ = true;
   },
 
   /**
diff --git a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
index f49daa12..b8f325a 100644
--- a/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
+++ b/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
@@ -207,7 +207,8 @@
 
       if (this.language_ && this.language_ == language && this.countryCode_ &&
           this.countryCode_ == countryCode &&
-          !this.classList.contains('error') && !this.usingOfflineTerms_) {
+          !this.classList.contains('error') && !this.usingOfflineTerms_ &&
+          this.tosContent_) {
         this.enableButtons_(true);
         return;
       }
@@ -252,6 +253,8 @@
      */
     setTosForTesting: function(terms) {
       this.tosContent_ = terms;
+      this.usingOfflineTerms_ = true;
+      this.setTermsViewContentLoadedState_();
     },
 
     /**
@@ -333,7 +336,6 @@
           this.getElement_('arc-enable-backup-restore').checked;
       var isLocationServiceEnabled =
           this.getElement_('arc-enable-location-service').checked;
-
       chrome.send(
           'arcTermsOfServiceAccept',
           [isBackupRestoreEnabled, isLocationServiceEnabled, this.tosContent_]);
diff --git a/chrome/browser/resources/easy_unlock/OWNERS b/chrome/browser/resources/easy_unlock/OWNERS
index 5ca3e8b..e4c0750 100644
--- a/chrome/browser/resources/easy_unlock/OWNERS
+++ b/chrome/browser/resources/easy_unlock/OWNERS
@@ -1,5 +1,4 @@
+hansberry@chromium.org
 jhawkins@chromium.org
-tengs@chromium.org
-tbarzic@chromium.org
 
 # COMPONENT: UI>ProximityAuth
diff --git a/chrome/browser/resources/plugin_metadata/plugins_linux.json b/chrome/browser/resources/plugin_metadata/plugins_linux.json
index 6d8269b1..fc44d58 100644
--- a/chrome/browser/resources/plugin_metadata/plugins_linux.json
+++ b/chrome/browser/resources/plugin_metadata/plugins_linux.json
@@ -1,5 +1,5 @@
 {
-  "x-version": 34,
+  "x-version": 35,
   "adobe-flash-player": {
     "mime_types": [
       "application/futuresplash",
@@ -10,9 +10,9 @@
     ],
     "versions": [
       {
-        "version": "31.0.0.108",
+        "version": "31.0.0.122",
         "status": "up_to_date",
-        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-31.html"
+        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-35.html"
       }
     ],
     "lang": "en-US",
diff --git a/chrome/browser/resources/plugin_metadata/plugins_mac.json b/chrome/browser/resources/plugin_metadata/plugins_mac.json
index e9c13ce..70313a2 100644
--- a/chrome/browser/resources/plugin_metadata/plugins_mac.json
+++ b/chrome/browser/resources/plugin_metadata/plugins_mac.json
@@ -1,5 +1,5 @@
 {
-  "x-version": 40,
+  "x-version": 41,
   "adobe-flash-player": {
     "mime_types": [
       "application/futuresplash",
@@ -7,9 +7,9 @@
     ],
     "versions": [
       {
-        "version": "31.0.0.108",
+        "version": "31.0.0.122",
         "status": "requires_authorization",
-        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-31.html"
+        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-35.html"
       }
     ],
     "lang": "en-US",
diff --git a/chrome/browser/resources/plugin_metadata/plugins_win.json b/chrome/browser/resources/plugin_metadata/plugins_win.json
index 850501b7..618e694b 100644
--- a/chrome/browser/resources/plugin_metadata/plugins_win.json
+++ b/chrome/browser/resources/plugin_metadata/plugins_win.json
@@ -1,5 +1,5 @@
 {
-  "x-version": 49,
+  "x-version": 50,
   "adobe-flash-player": {
     "mime_types": [
       "application/futuresplash",
@@ -7,9 +7,9 @@
     ],
     "versions": [
       {
-        "version": "31.0.0.108",
+        "version": "31.0.0.122",
         "status": "requires_authorization",
-        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-31.html"
+        "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-35.html"
       }
     ],
     "lang": "en-US",
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js
index 9b2eef4..ca6219fb 100644
--- a/chrome/browser/resources/print_preview/native_layer.js
+++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -272,12 +272,16 @@
     /**
      * Navigates the user to the Chrome printing setting page to manage local
      * printers and Google cloud printers.
+     * TODO (rbpotter): Delete this when the old Print Preview page is removed.
      */
     managePrinters() {
       chrome.send('managePrinters');
     }
 
-    /** Forces browser to open a new tab with the given URL address. */
+    /**
+     * Forces browser to open a new tab with the given URL address.
+     * TODO (rbpotter): Delete this when the old Print Preview page is removed.
+     */
     forceOpenNewTab(url) {
       chrome.send('forceOpenNewTab', [url]);
     }
diff --git a/chrome/browser/resources/print_preview/new/BUILD.gn b/chrome/browser/resources/print_preview/new/BUILD.gn
index 20bb680..d10860b 100644
--- a/chrome/browser/resources/print_preview/new/BUILD.gn
+++ b/chrome/browser/resources/print_preview/new/BUILD.gn
@@ -308,7 +308,6 @@
 js_library("destination_list") {
   deps = [
     ":destination_list_item",
-    "..:native_layer",
     "../data:destination",
     "//ui/webui/resources/js:i18n_behavior",
     "//ui/webui/resources/js:list_property_update_behavior",
@@ -318,9 +317,7 @@
 js_library("destination_list_item") {
   deps = [
     ":highlight_utils",
-    "..:native_layer",
     "../data:destination",
-    "//ui/webui/resources/js:load_time_data",
   ]
 }
 
diff --git a/chrome/browser/resources/print_preview/new/destination_dialog.html b/chrome/browser/resources/print_preview/new/destination_dialog.html
index 3b97a15f..df15f8c4 100644
--- a/chrome/browser/resources/print_preview/new/destination_dialog.html
+++ b/chrome/browser/resources/print_preview/new/destination_dialog.html
@@ -181,7 +181,7 @@
         </print-preview-destination-list>
         <print-preview-destination-list id="printList"
             destinations="[[destinations_]]"
-            has-action-link loading-destinations="[[loadingDestinations_]]"
+            has-manage-link loading-destinations="[[loadingDestinations_]]"
             search-query="[[searchQuery_]]"
             list-name="$i18n{printDestinationsTitle}"
             on-destination-selected="onDestinationSelected_">
diff --git a/chrome/browser/resources/print_preview/new/destination_list.html b/chrome/browser/resources/print_preview/new/destination_list.html
index 81582d06..2eb653b 100644
--- a/chrome/browser/resources/print_preview/new/destination_list.html
+++ b/chrome/browser/resources/print_preview/new/destination_list.html
@@ -2,12 +2,9 @@
 
 <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
-<link rel="import" href="chrome://resources/html/action_link.html">
-<link rel="import" href="chrome://resources/html/action_link_css.html">
 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
 <link rel="import" href="chrome://resources/html/list_property_update_behavior.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
-<link rel="import" href="../native_layer.html">
 <link rel="import" href="../data/destination.html">
 <link rel="import" href="destination_list_item.html">
 <link rel="import" href="print_preview_shared_css.html">
@@ -16,7 +13,7 @@
 
 <dom-module id="print-preview-destination-list">
   <template>
-    <style include="print-preview-shared action-link cr-hidden-style throbber">
+    <style include="print-preview-shared cr-hidden-style throbber">
       :host {
         display: flex;
         flex-direction: column;
@@ -45,12 +42,12 @@
         padding-bottom: 8px;
       }
 
-      :-webkit-any(.action-link, .total) {
+      :-webkit-any(.link, .total) {
         display: inline;
         padding: 0 4px;
       }
 
-      .action-link {
+      .link {
         margin: 0 2px;
       }
 
@@ -91,8 +88,8 @@
       <span class="total" hidden$="[[!showDestinationsTotal_]]">
         [[i18n('destinationCount', matchingDestinations_.length)]]
       </span>
-      <a is="action-link" class="action-link" hidden$="[[!hasActionLink]]"
-          on-click="onActionLinkClick_">
+      <a href="$i18n{settingsPrintingPage}" target="_none"
+          class="link" hidden$="[[!hasManageLink]]">
         $i18n{manage}
       </a>
       <div class="throbber-container" hidden$="[[!loadingDestinations]]">
diff --git a/chrome/browser/resources/print_preview/new/destination_list.js b/chrome/browser/resources/print_preview/new/destination_list.js
index df9d8581..0b89769 100644
--- a/chrome/browser/resources/print_preview/new/destination_list.js
+++ b/chrome/browser/resources/print_preview/new/destination_list.js
@@ -18,7 +18,7 @@
     searchQuery: Object,
 
     /** @type {boolean} */
-    hasActionLink: {
+    hasManageLink: {
       type: Boolean,
       value: false,
     },
@@ -112,11 +112,6 @@
     this.showDestinationsTotal_ = count > 4;
   },
 
-  /** @private */
-  onActionLinkClick_: function() {
-    print_preview.NativeLayer.getInstance().managePrinters();
-  },
-
   /**
    * @param {!KeyboardEvent} e Event containing the destination and key.
    * @private
@@ -133,6 +128,9 @@
    * @private
    */
   onDestinationSelected_: function(e) {
+    if (e.composedPath()[0].tagName === 'A')
+      return;
+
     this.fire('destination-selected', e.target);
   },
 });
diff --git a/chrome/browser/resources/print_preview/new/destination_list_item.html b/chrome/browser/resources/print_preview/new/destination_list_item.html
index 294788b1..e9407b1 100644
--- a/chrome/browser/resources/print_preview/new/destination_list_item.html
+++ b/chrome/browser/resources/print_preview/new/destination_list_item.html
@@ -3,10 +3,8 @@
 <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
 <link rel="import" href="chrome://resources/html/cr.html">
-<link rel="import" href="chrome://resources/html/load_time_data.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="../icons.html">
-<link rel="import" href="../native_layer.html">
 <link rel="import" href="../data/destination.html">
 <link rel="import" href="highlight_utils.html">
 <link rel="import" href="print_preview_shared_css.html">
@@ -14,7 +12,7 @@
 
 <dom-module id="print-preview-destination-list-item">
   <template>
-    <style include="print-preview-shared action-link cr-hidden-style">
+    <style include="print-preview-shared cr-hidden-style">
       :host {
         align-items: center;
         cursor: default;
@@ -78,9 +76,9 @@
         hidden$="[[!destination.isOfflineOrInvalid]]">
       [[destination.connectionStatusText]]
     </span>
-    <a is="action-link" class="learn-more-link"
-        hidden$="[[!destination.shouldShowInvalidCertificateError]]"
-        on-click="onLearnMoreLinkClick_">
+    <a href="$i18n{gcpCertificateErrorLearnMoreURL}"
+        target="_blank" class="learn-more-link"
+        hidden$="[[!destination.shouldShowInvalidCertificateError]]">
       $i18n{learnMore}
     </a>
     <span class="extension-controlled-indicator"
diff --git a/chrome/browser/resources/print_preview/new/destination_list_item.js b/chrome/browser/resources/print_preview/new/destination_list_item.js
index a57a8132..360f3da 100644
--- a/chrome/browser/resources/print_preview/new/destination_list_item.js
+++ b/chrome/browser/resources/print_preview/new/destination_list_item.js
@@ -74,12 +74,6 @@
     }
   },
 
-  /** @private */
-  onLearnMoreLinkClick_: function() {
-    print_preview.NativeLayer.getInstance().forceOpenNewTab(
-        loadTimeData.getString('gcpCertificateErrorLearnMoreURL'));
-  },
-
   // <if expr="chromeos">
   /**
    * Called if the printer configuration request is accepted. Show the waiting
diff --git a/chrome/browser/resources/print_preview/new/pages_settings.js b/chrome/browser/resources/print_preview/new/pages_settings.js
index cbf808c..e4c48c8 100644
--- a/chrome/browser/resources/print_preview/new/pages_settings.js
+++ b/chrome/browser/resources/print_preview/new/pages_settings.js
@@ -354,11 +354,17 @@
    * @param {!KeyboardEvent} e The keyboard event
    */
   onKeydown_: function(e) {
-    e.stopPropagation();
-    if (e.key == 'Enter') {
+    if (e.key === 'Escape')
+      return;
+
+    if (e.key === 'Enter') {
       this.resetAndUpdate();
       this.resetIfEmpty_();
-    } else if (e.shiftKey && e.key == 'Tab') {
+      return;
+    }
+
+    e.stopPropagation();
+    if (e.shiftKey && e.key === 'Tab') {
       this.$.customRadioButton.focus();
       e.preventDefault();
     }
diff --git a/chrome/browser/resources/print_preview/new/preview_area.html b/chrome/browser/resources/print_preview/new/preview_area.html
index 3ba44b5..a7216e60 100644
--- a/chrome/browser/resources/print_preview/new/preview_area.html
+++ b/chrome/browser/resources/print_preview/new/preview_area.html
@@ -3,7 +3,6 @@
 <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
 <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
-<link rel="import" href="chrome://resources/html/action_link_css.html">
 <link rel="import" href="chrome://resources/html/cr.html">
 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
 <link rel="import" href="chrome://resources/html/util.html">
@@ -26,7 +25,7 @@
 
 <dom-module id="print-preview-preview-area">
   <template>
-    <style include="print-preview-shared action-link cr-hidden-style">
+    <style include="print-preview-shared cr-hidden-style">
       @keyframes dancing-dots-jump {
         0% { top: 0; }
         55% { top: 0; }
@@ -119,9 +118,9 @@
               hidden$="[[!isPreviewLoading_(previewState)]]">
               <span>.</span><span>.</span><span>.</span>
           </span>
-          <a is="action-link" class="learn-more-link"
-              hidden$="[[!shouldShowLearnMoreLink_(previewState)]]"
-              on-click="onGcpErrorLearnMoreClick_">
+          <a href="$i18n{gcpCertificateErrorLearnMoreURL}"
+              target="_blank" class="learn-more-link"
+              hidden$="[[!shouldShowLearnMoreLink_(previewState)]]">
             $i18n{learnMore}
           </a>
         </div>
diff --git a/chrome/browser/resources/print_preview/new/preview_area.js b/chrome/browser/resources/print_preview/new/preview_area.js
index a0561ae..8a53460 100644
--- a/chrome/browser/resources/print_preview/new/preview_area.js
+++ b/chrome/browser/resources/print_preview/new/preview_area.js
@@ -539,17 +539,6 @@
     this.pluginProxy_.setPointerEvents(!e.detail);
   },
 
-  /**
-   * Called when the learn more link for a cloud destination with an invalid
-   * certificate is clicked. Calls nativeLayer to open a new tab with the help
-   * page.
-   * @private
-   */
-  onGcpErrorLearnMoreClick_: function() {
-    this.nativeLayer_.forceOpenNewTab(
-        this.i18n('gcpCertificateErrorLearnMoreURL'));
-  },
-
   /** @private */
   onMarginsChanged_: function() {
     if (this.getSettingValue('margins') !=
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
index 8e1ec4f..3ca1d8b 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -410,12 +410,10 @@
       </template>
       <template is="dom-if" route-path="/content/flash" no-search>
         <settings-subpage page-title="$i18n{siteSettingsFlash}">
-          <template is="dom-if" if="[[enableEphemeralFlashPermission_]]">
-            <a class="settings-box first" tabindex="-1"
-                target="_blank">
-              $i18n{siteSettingsFlashPermissionsEphemeral}
-            </a>
-          </template>
+          <a class="settings-box first" tabindex="-1"
+              target="_blank">
+            $i18n{siteSettingsFlashPermissionsEphemeral}
+          </a>
           <category-default-setting category="{{ContentSettingsTypes.PLUGINS}}"
               toggle-off-label="$i18n{siteSettingsFlashBlock}"
               toggle-on-label="$i18n{siteSettingsFlashAskFirstRecommended}">
@@ -432,8 +430,7 @@
 </if>
           <category-setting-exceptions
               category="{{ContentSettingsTypes.PLUGINS}}"
-              block-header="$i18n{siteSettingsBlock}"
-              read-only-list="[[enableEphemeralFlashPermission_]]">
+              block-header="$i18n{siteSettingsBlock}" read-only-list>
           </category-setting-exceptions>
         </settings-subpage>
       </template>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js
index e2cff828..66e99c1 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -162,14 +162,6 @@
       },
     },
 
-    /** @private */
-    enableEphemeralFlashPermission_: {
-      type: Boolean,
-      value: function() {
-        return loadTimeData.getBoolean('enableEphemeralFlashPermission');
-      },
-    },
-
     // <if expr="not chromeos">
     /** @private */
     showRestart_: Boolean,
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.cc b/chrome/browser/safe_browsing/chrome_password_protection_service.cc
index e03f984..1a7b3c8 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.cc
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.cc
@@ -1035,13 +1035,9 @@
       web_contents_with_unhandled_enterprise_reuses_.erase(web_contents);
       // TODO(jialiul): Remove web_contents pointer when it is closed.
     } else {
-      // Opens chrome://settings page in a new tab.
-      OpenUrl(web_contents, GURL(chrome::kChromeUISettingsURL),
-              content::Referrer(),
+      // Opens accounts.google.com in a new tab.
+      OpenUrl(web_contents, GetDefaultChangePasswordURL(), content::Referrer(),
               /*in_new_tab=*/true);
-      LogWarningAction(WarningUIType::CHROME_SETTINGS, WarningAction::SHOWN,
-                       PasswordReuseEvent::SIGN_IN_PASSWORD,
-                       GetSyncAccountType());
     }
   } else if (action == WarningAction::IGNORE_WARNING) {
     // No need to change state.
@@ -1079,12 +1075,9 @@
       return;
     }
 
-    // For sync password reuse, open chrome://settings page in a new tab.
-    OpenUrl(web_contents, GURL(chrome::kChromeUISettingsURL),
-            content::Referrer(), /*in_new_tab=*/true);
-    LogWarningAction(WarningUIType::CHROME_SETTINGS, WarningAction::SHOWN,
-                     PasswordReuseEvent::SIGN_IN_PASSWORD,
-                     GetSyncAccountType());
+    // For sync password reuse, open accounts.google.com page in a new tab.
+    OpenUrl(web_contents, GetDefaultChangePasswordURL(), content::Referrer(),
+            /*in_new_tab=*/true);
     return;
   }
 
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc b/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
index f8b8543..73be384 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
@@ -184,19 +184,9 @@
   content::TestNavigationObserver observer(new_web_contents,
                                            /*number_of_navigations=*/1);
   observer.Wait();
-  // chrome://settings page should be opened in a new foreground tab.
-  ASSERT_EQ(2, browser()->tab_strip_model()->count());
-  ASSERT_EQ(GURL(chrome::kChromeUISettingsURL),
-            new_web_contents->GetVisibleURL());
-
-  // Simulates clicking "Change password" button on the chrome://settings card.
-  service->OnUserAction(new_web_contents, PasswordReuseEvent::SIGN_IN_PASSWORD,
-                        WarningUIType::CHROME_SETTINGS,
-                        WarningAction::CHANGE_PASSWORD);
-  base::RunLoop().RunUntilIdle();
   // Verify myaccount.google.com or Google signin page should be opened in a
   // new foreground tab.
-  ASSERT_EQ(3, browser()->tab_strip_model()->count());
+  ASSERT_EQ(2, browser()->tab_strip_model()->count());
   ASSERT_TRUE(browser()
                   ->tab_strip_model()
                   ->GetActiveWebContents()
@@ -313,11 +303,14 @@
   content::TestNavigationObserver observer(new_web_contents,
                                            /*number_of_navigations=*/1);
   observer.Wait();
-  // chrome://settings page should be opened in a new foreground tab.
+  // Verify myaccount.google.com or Google signin page should be opened in a
+  // new foreground tab.
   ASSERT_EQ(2, browser()->tab_strip_model()->count());
-  ASSERT_EQ(
-      GURL(chrome::kChromeUISettingsURL),
-      browser()->tab_strip_model()->GetActiveWebContents()->GetVisibleURL());
+  ASSERT_TRUE(browser()
+                  ->tab_strip_model()
+                  ->GetActiveWebContents()
+                  ->GetVisibleURL()
+                  .DomainIs("google.com"));
 }
 
 IN_PROC_BROWSER_TEST_F(ChromePasswordProtectionServiceBrowserTest,
diff --git a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
index 0a511f4..6ab8ee84 100644
--- a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
+++ b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
@@ -51,6 +51,7 @@
   // Load events.
   kLoadRegular,
   kLoadInvalid,
+  kLoadInvalidNoTokenForPrimaryAccount,
 
   kCount
 };
@@ -556,6 +557,8 @@
                      GoogleServiceAuthError::FromInvalidGaiaCredentialsReason(
                          GoogleServiceAuthError::InvalidGaiaCredentialsReason::
                              CREDENTIALS_MISSING));
+    RecordTokenStateTransition(
+        TokenStateTransition::kLoadInvalidNoTokenForPrimaryAccount);
     FireRefreshTokenAvailable(loading_primary_account_id_);
   }
 
diff --git a/chrome/browser/signin/oauth2_token_service_delegate_android.cc b/chrome/browser/signin/oauth2_token_service_delegate_android.cc
index 647e264..e887b00 100644
--- a/chrome/browser/signin/oauth2_token_service_delegate_android.cc
+++ b/chrome/browser/signin/oauth2_token_service_delegate_android.cc
@@ -242,7 +242,7 @@
   ScopedJavaLocalRef<jobjectArray> j_accounts =
       Java_OAuth2TokenService_getAccounts(env);
   // TODO(fgorski): We may decide to filter out some of the accounts.
-  base::android::AppendJavaStringArrayToStringVector(env, j_accounts.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, j_accounts,
                                                      &accounts);
   return accounts;
 }
@@ -253,7 +253,7 @@
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobjectArray> j_accounts =
       Java_OAuth2TokenService_getSystemAccountNames(env);
-  base::android::AppendJavaStringArrayToStringVector(env, j_accounts.obj(),
+  base::android::AppendJavaStringArrayToStringVector(env, j_accounts,
                                                      &account_names);
   return account_names;
 }
diff --git a/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc b/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc
index 5b423ff..686c8c4 100644
--- a/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc
@@ -57,13 +57,6 @@
 }
 
 void SubresourceFilterBrowserTest::SetUpOnMainThread() {
-  // Note: even after startup, tasks posted to be run after startup are
-  // artificially delayed up to 10s. To avoid that delay in tests, just fake
-  // being after startup internally so there is no delay when writing and
-  // publishing rulesets.
-  g_browser_process->subresource_filter_ruleset_service()
-      ->SetIsAfterStartupForTesting();
-
   base::FilePath test_data_dir;
   ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
   embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index e93f595e..653d86b2 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -109,9 +109,6 @@
 bool ProfileSyncServiceAndroid::Init() {
   if (sync_service_) {
     sync_service_->AddObserver(this);
-    sync_service_->SetPlatformSyncAllowedProvider(
-        base::Bind(&ProfileSyncServiceAndroid::IsSyncAllowedByAndroid,
-                   base::Unretained(this)));
     return true;
   } else {
     return false;
@@ -121,8 +118,6 @@
 ProfileSyncServiceAndroid::~ProfileSyncServiceAndroid() {
   if (sync_service_) {
     sync_service_->RemoveObserver(this);
-    sync_service_->SetPlatformSyncAllowedProvider(
-        ProfileSyncService::PlatformSyncAllowedProvider());
   }
 }
 
@@ -163,11 +158,11 @@
   sync_service_->RequestStop(ProfileSyncService::KEEP_DATA);
 }
 
-void ProfileSyncServiceAndroid::SignOutSync(JNIEnv* env,
-                                            const JavaParamRef<jobject>&) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  DCHECK(profile_);
-  sync_service_->RequestStop(ProfileSyncService::CLEAR_DATA);
+void ProfileSyncServiceAndroid::SetSyncAllowedByPlatform(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj,
+    jboolean allowed) {
+  sync_service_->SetSyncAllowedByPlatform(allowed);
 }
 
 jboolean ProfileSyncServiceAndroid::IsSyncActive(
diff --git a/chrome/browser/sync/profile_sync_service_android.h b/chrome/browser/sync/profile_sync_service_android.h
index 4908b648..a6abe012 100644
--- a/chrome/browser/sync/profile_sync_service_android.h
+++ b/chrome/browser/sync/profile_sync_service_android.h
@@ -53,8 +53,9 @@
                     const base::android::JavaParamRef<jobject>& obj);
   void RequestStop(JNIEnv* env,
                    const base::android::JavaParamRef<jobject>& obj);
-  void SignOutSync(JNIEnv* env,
-                   const base::android::JavaParamRef<jobject>& obj);
+  void SetSyncAllowedByPlatform(JNIEnv* env,
+                                const base::android::JavaParamRef<jobject>& obj,
+                                jboolean allowed);
   jboolean IsSyncActive(JNIEnv* env,
                         const base::android::JavaParamRef<jobject>& obj);
   jboolean IsEngineInitialized(JNIEnv* env,
diff --git a/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc b/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
index 63a820e..d8f7455 100644
--- a/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
+++ b/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
@@ -71,14 +71,11 @@
 
 void AutomationManagerAura::HandleEvent(views::View* view,
                                         ax::mojom::Event event_type) {
+  CHECK(view);
+
   if (!enabled_)
     return;
 
-  if (!view) {
-    SendEvent(current_tree_->GetRoot(), event_type);
-    return;
-  }
-
   views::AXAuraObjWrapper* obj =
       views::AXAuraObjCache::GetInstance()->GetOrCreate(view);
   if (!obj)
diff --git a/chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.cc b/chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.cc
index aebc2a5..f9926db 100644
--- a/chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.cc
+++ b/chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.cc
@@ -140,9 +140,7 @@
 
 void X11InputMethodContextImplGtk::SetSurroundingText(
     const base::string16& text,
-    const gfx::Range& selection_range) {
-  NOTIMPLEMENTED_LOG_ONCE();
-}
+    const gfx::Range& selection_range) {}
 
 // private:
 
diff --git a/chrome/browser/ui/settings_window_manager_chromeos.cc b/chrome/browser/ui/settings_window_manager_chromeos.cc
index b530dd5..ce55f02 100644
--- a/chrome/browser/ui/settings_window_manager_chromeos.cc
+++ b/chrome/browser/ui/settings_window_manager_chromeos.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/settings_window_manager_chromeos.h"
 
+#include "ash/public/cpp/app_types.h"
 #include "ash/public/cpp/resources/grit/ash_public_unscaled_resources.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/ash/window_properties.h"
@@ -15,6 +16,7 @@
 #include "chrome/browser/ui/settings_window_manager_observer_chromeos.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "content/public/browser/web_contents.h"
+#include "ui/aura/client/aura_constants.h"
 #include "url/gurl.h"
 
 namespace chrome {
@@ -74,6 +76,8 @@
 
   auto* window = params.browser->window()->GetNativeWindow();
   window->SetProperty(kOverrideWindowIconResourceIdKey, IDR_SETTINGS_LOGO_192);
+  window->SetProperty(aura::client::kAppType,
+                      static_cast<int>(ash::AppType::CHROME_APP));
 
   for (SettingsWindowManagerObserver& observer : observers_)
     observer.OnNewSettingsWindow(params.browser);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index 144b723..5f5bb01 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -157,26 +157,14 @@
   return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id);
 }
 
-gfx::Insets GetInkDropInsets() {
-  // Slight insets are required for older layouts as they use a slightly smaller
-  // 24dp inkdrop.
-  return gfx::Insets(ui::MaterialDesignController::IsNewerMaterialUi() ? 0 : 2);
-}
-
-int GetInkDropCornerRadius(const views::View* host_view) {
-  return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
-      views::EMPHASIS_MAXIMUM, host_view->size());
-}
-
-// Returns a gfx::Path for bookmark inkdrops and focus rings.
-std::unique_ptr<gfx::Path> CreateBookmarkHighlightPath(
+// Returns a |SkPath| for bookmark inkdrops and focus rings.
+std::unique_ptr<SkPath> CreateBookmarkHighlightPath(
     views::InkDropHostView* host_view) {
-  gfx::Rect rect(host_view->size());
-  rect.Inset(GetInkDropInsets());
-
-  auto path = std::make_unique<gfx::Path>();
-  const int radius = GetInkDropCornerRadius(host_view);
-  path->addRoundRect(gfx::RectToSkRect(rect), radius, radius);
+  auto path = std::make_unique<SkPath>();
+  const int radius = ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
+      views::EMPHASIS_MAXIMUM, host_view->size());
+  path->addRoundRect(gfx::RectToSkRect(gfx::Rect(host_view->size())), radius,
+                     radius);
   return path;
 }
 
@@ -186,26 +174,6 @@
   return std::move(ink_drop);
 }
 
-std::unique_ptr<views::InkDropRipple> CreateBookmarkButtonInkDropRipple(
-    const views::InkDropHostView* host_view,
-    const gfx::Point& center_point) {
-  return std::make_unique<views::FloodFillInkDropRipple>(
-      host_view->size(), GetInkDropInsets(), center_point,
-      GetToolbarInkDropBaseColor(host_view),
-      host_view->ink_drop_visible_opacity());
-}
-
-std::unique_ptr<views::InkDropHighlight> CreateBookmarkButtonInkDropHighlight(
-    const views::InkDropHostView* host_view) {
-  std::unique_ptr<views::InkDropHighlight> highlight(
-      new views::InkDropHighlight(
-          host_view->size(), GetInkDropCornerRadius(host_view),
-          gfx::RectF(gfx::Rect(host_view->size())).CenterPoint(),
-          GetToolbarInkDropBaseColor(host_view)));
-  highlight->set_visible_opacity(kToolbarInkDropHighlightVisibleOpacity);
-  return highlight;
-}
-
 std::unique_ptr<views::LabelButtonBorder> CreateBookmarkButtonBorder() {
   std::unique_ptr<LabelButtonBorder> border =
       std::make_unique<LabelButtonBorder>();
@@ -262,14 +230,13 @@
     return CreateBookmarkButtonInkDrop(CreateDefaultFloodFillInkDropImpl());
   }
 
-  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
-    return CreateBookmarkButtonInkDropRipple(
-        this, GetInkDropCenterBasedOnLastEvent());
-  }
-
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override {
-    return CreateBookmarkButtonInkDropHighlight(this);
+    return CreateToolbarInkDropHighlight(this);
+  }
+
+  SkColor GetInkDropBaseColor() const override {
+    return GetToolbarInkDropBaseColor(this);
   }
 
   std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder()
@@ -386,14 +353,13 @@
     return CreateBookmarkButtonInkDrop(CreateDefaultFloodFillInkDropImpl());
   }
 
-  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
-    return CreateBookmarkButtonInkDropRipple(
-        this, GetInkDropCenterBasedOnLastEvent());
-  }
-
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override {
-    return CreateBookmarkButtonInkDropHighlight(this);
+    return CreateToolbarInkDropHighlight(this);
+  }
+
+  SkColor GetInkDropBaseColor() const override {
+    return GetToolbarInkDropBaseColor(this);
   }
 
   std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder()
diff --git a/chrome/browser/ui/views/frame/immersive_context_mus.cc b/chrome/browser/ui/views/frame/immersive_context_mus.cc
index bf8b166..c75e526 100644
--- a/chrome/browser/ui/views/frame/immersive_context_mus.cc
+++ b/chrome/browser/ui/views/frame/immersive_context_mus.cc
@@ -9,8 +9,6 @@
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/window.h"
 #include "ui/views/mus/mus_client.h"
-#include "ui/views/mus/pointer_watcher_event_router.h"
-#include "ui/views/pointer_watcher.h"
 #include "ui/views/widget/desktop_aura/desktop_capture_client.h"
 
 // static
@@ -40,19 +38,6 @@
   return widget->GetWindowBoundsInScreen();
 }
 
-void ImmersiveContextMus::AddPointerWatcher(
-    views::PointerWatcher* watcher,
-    views::PointerWatcherEventTypes events) {
-  // TODO: http://crbug.com/641164
-  views::MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher(
-      watcher, events == views::PointerWatcherEventTypes::MOVES);
-}
-
-void ImmersiveContextMus::RemovePointerWatcher(views::PointerWatcher* watcher) {
-  views::MusClient::Get()->pointer_watcher_event_router()->RemovePointerWatcher(
-      watcher);
-}
-
 bool ImmersiveContextMus::DoesAnyWindowHaveCapture() {
   return views::DesktopCaptureClient::GetCaptureWindowGlobal() != nullptr;
 }
diff --git a/chrome/browser/ui/views/frame/immersive_context_mus.h b/chrome/browser/ui/views/frame/immersive_context_mus.h
index fef4bcc..4018f56e 100644
--- a/chrome/browser/ui/views/frame/immersive_context_mus.h
+++ b/chrome/browser/ui/views/frame/immersive_context_mus.h
@@ -20,9 +20,6 @@
       ash::ImmersiveFullscreenController* controller,
       bool entering) override;
   gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) override;
-  void AddPointerWatcher(views::PointerWatcher* watcher,
-                         views::PointerWatcherEventTypes events) override;
-  void RemovePointerWatcher(views::PointerWatcher* watcher) override;
   bool DoesAnyWindowHaveCapture() override;
   bool IsMouseEventsEnabled() override;
 
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
index 6674e9b..4a6fe748 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
@@ -357,17 +357,7 @@
   return CreateToolbarInkDrop<MenuButton>(this);
 }
 
-std::unique_ptr<views::InkDropRipple>
-BrowserAppMenuButton::CreateInkDropRipple() const {
-  // FIXME: GetInkDropCenterBasedOnLastEvent() will always return the center
-  // of this view. https://crbug.com/819878.
-  return CreateToolbarInkDropRipple<MenuButton>(
-      this, GetInkDropCenterBasedOnLastEvent(),
-      gfx::Insets(0, 0, 0, margin_trailing_));
-}
-
 std::unique_ptr<views::InkDropHighlight>
 BrowserAppMenuButton::CreateInkDropHighlight() const {
-  return CreateToolbarInkDropHighlight<MenuButton>(
-      this, GetMirroredRect(GetContentsBounds()).CenterPoint());
+  return CreateToolbarInkDropHighlight(this);
 }
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
index 66c08d1..ece6d615 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
@@ -98,7 +98,6 @@
   void OnDragExited() override;
   int OnPerformDrop(const ui::DropTargetEvent& event) override;
   std::unique_ptr<views::InkDrop> CreateInkDrop() override;
-  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override;
 
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
index ee204a1..aa3c784e 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
@@ -146,16 +146,9 @@
   return ink_drop;
 }
 
-std::unique_ptr<views::InkDropRipple> ToolbarActionView::CreateInkDropRipple()
-    const {
-  return CreateToolbarInkDropRipple<MenuButton>(
-      this, GetInkDropCenterBasedOnLastEvent(), gfx::Insets());
-}
-
 std::unique_ptr<views::InkDropHighlight>
 ToolbarActionView::CreateInkDropHighlight() const {
-  return CreateToolbarInkDropHighlight<MenuButton>(
-      this, GetMirroredRect(GetContentsBounds()).CenterPoint());
+  return CreateToolbarInkDropHighlight(this);
 }
 
 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.h b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
index 06e4ec7..e0a4f9b 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
@@ -71,7 +71,6 @@
   SkColor GetInkDropBaseColor() const override;
   bool ShouldUseFloodFillInkDrop() const override;
   std::unique_ptr<views::InkDrop> CreateInkDrop() override;
-  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override;
 
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 66b08ad8..2c84ecf4f 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -222,32 +222,9 @@
   return CreateToolbarInkDrop<LabelButton>(this);
 }
 
-std::unique_ptr<views::InkDropRipple> ToolbarButton::CreateInkDropRipple()
-    const {
-  return CreateToolbarInkDropRipple<LabelButton>(
-      this, GetInkDropCenterBasedOnLastEvent(),
-      gfx::Insets(0, leading_margin_, 0, 0));
-}
-
 std::unique_ptr<views::InkDropHighlight> ToolbarButton::CreateInkDropHighlight()
     const {
-  if (highlight_color_) {
-    const int highlight_radius =
-        ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
-            views::EMPHASIS_MAXIMUM, size());
-
-    // TODO(pbos): Unify with CreateToolbarInkDropHighlight which currently
-    // assumes a square inkdrop and uses different bounds for the center point.
-    auto highlight = std::make_unique<views::InkDropHighlight>(
-        size(), highlight_radius,
-        gfx::PointF(GetMirroredRect(GetLocalBounds()).CenterPoint()),
-        GetInkDropBaseColor());
-    highlight->set_visible_opacity(kToolbarInkDropHighlightVisibleOpacity);
-    return highlight;
-  }
-
-  return CreateToolbarInkDropHighlight<LabelButton>(
-      this, GetMirroredRect(GetContentsBounds()).CenterPoint());
+  return CreateToolbarInkDropHighlight(this);
 }
 
 SkColor ToolbarButton::GetInkDropBaseColor() const {
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.h b/chrome/browser/ui/views/toolbar/toolbar_button.h
index 19f1ba6..42d2d3c 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.h
@@ -78,7 +78,6 @@
   void OnGestureEvent(ui::GestureEvent* event) override;
   void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
   std::unique_ptr<views::InkDrop> CreateInkDrop() override;
-  std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override;
   SkColor GetInkDropBaseColor() const override;
diff --git a/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.cc b/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.cc
index dfa9834..632cd81 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.cc
@@ -25,7 +25,7 @@
   return inkdrop_insets;
 }
 
-std::unique_ptr<gfx::Path> CreateToolbarHighlightPath(
+std::unique_ptr<SkPath> CreateToolbarHighlightPath(
     const views::View* host_view,
     const gfx::Insets& margin_insets) {
   gfx::Rect rect(host_view->size());
@@ -34,11 +34,19 @@
   const int radii = ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
       views::EMPHASIS_MAXIMUM, rect.size());
 
-  auto path = std::make_unique<gfx::Path>();
+  auto path = std::make_unique<SkPath>();
   path->addRoundRect(gfx::RectToSkRect(rect), radii, radii);
   return path;
 }
 
+std::unique_ptr<views::InkDropHighlight> CreateToolbarInkDropHighlight(
+    const views::InkDropHostView* host_view) {
+  constexpr float kToolbarInkDropHighlightVisibleOpacity = 0.08f;
+  auto highlight = host_view->views::InkDropHostView::CreateInkDropHighlight();
+  highlight->set_visible_opacity(kToolbarInkDropHighlightVisibleOpacity);
+  return highlight;
+}
+
 SkColor GetToolbarInkDropBaseColor(const views::View* host_view) {
   const auto* theme_provider = host_view->GetThemeProvider();
   // There may be no theme provider in unit tests.
diff --git a/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h b/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h
index c07b8c1..a4b28e19 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h
@@ -15,7 +15,6 @@
 #include "ui/gfx/geometry/insets.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/size.h"
-#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
 #include "ui/views/animation/ink_drop_highlight.h"
 #include "ui/views/animation/ink_drop_impl.h"
 #include "ui/views/animation/ink_drop_mask.h"
@@ -23,7 +22,6 @@
 #include "ui/views/style/platform_style.h"
 
 constexpr float kToolbarInkDropVisibleOpacity = 0.06f;
-constexpr float kToolbarInkDropHighlightVisibleOpacity = 0.08f;
 constexpr SkAlpha kToolbarButtonBackgroundAlpha = 32;
 
 // The below utility functions are templated since we have two different types
@@ -44,7 +42,7 @@
 // focus rings so that they are derived from the same actual SkPath or other
 // shared primitive. That way they would be significantly easier to keep in
 // sync. This method at least reuses GetToolbarInkDropInsets.
-std::unique_ptr<gfx::Path> CreateToolbarHighlightPath(
+std::unique_ptr<SkPath> CreateToolbarHighlightPath(
     const views::View* host_view,
     const gfx::Insets& margin_insets);
 
@@ -69,47 +67,9 @@
   return ink_drop;
 }
 
-// Creates the appropriate ink drop ripple for the calling button. When the
-// newer material UI is not enabled, it uses the default implementation of the
-// calling button's base class (the template argument BaseInkDropHostView).
-// Otherwise, it uses a |FloodFillInkDropRipple|.
-template <class BaseInkDropHostView>
-std::unique_ptr<views::InkDropRipple> CreateToolbarInkDropRipple(
-    const BaseInkDropHostView* host_view,
-    const gfx::Point& center_point,
-    const gfx::Insets& margin_insets) {
-  if (!ui::MaterialDesignController::IsNewerMaterialUi())
-    return host_view->BaseInkDropHostView::CreateInkDropRipple();
-
-  return std::make_unique<views::FloodFillInkDropRipple>(
-      host_view->size(), GetToolbarInkDropInsets(host_view, margin_insets),
-      center_point, host_view->GetInkDropBaseColor(),
-      host_view->ink_drop_visible_opacity());
-}
-
-// Creates the appropriate ink drop highlight for the calling button. When the
-// newer material UI is not enabled, it uses the default implementation of the
-// calling button's base class (the template argument BaseInkDropHostView).
-// Otherwise, it uses a circular highlight with the same height as the location
-// bar.
-template <class BaseInkDropHostView>
+// Creates the default inkdrop highlight but using the toolbar visible opacity.
 std::unique_ptr<views::InkDropHighlight> CreateToolbarInkDropHighlight(
-    const BaseInkDropHostView* host_view,
-    const gfx::Point& center_point) {
-  if (!ui::MaterialDesignController::IsNewerMaterialUi())
-    return host_view->BaseInkDropHostView::CreateInkDropHighlight();
-
-  const int highlight_dimensions = GetLayoutConstant(LOCATION_BAR_HEIGHT);
-  const gfx::Size highlight_size(highlight_dimensions, highlight_dimensions);
-
-  auto highlight = std::make_unique<views::InkDropHighlight>(
-      highlight_size,
-      ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
-          views::EMPHASIS_MAXIMUM, highlight_size),
-      gfx::PointF(center_point), host_view->GetInkDropBaseColor());
-  highlight->set_visible_opacity(kToolbarInkDropHighlightVisibleOpacity);
-  return highlight;
-}
+    const views::InkDropHostView* host_view);
 
 // Returns the ink drop base color that should be used by all toolbar buttons.
 SkColor GetToolbarInkDropBaseColor(const views::View* host_view);
diff --git a/chrome/browser/ui/webui/chromeos/login/discover/discover_window_manager.cc b/chrome/browser/ui/webui/chromeos/login/discover/discover_window_manager.cc
index c883e74..986898a5 100644
--- a/chrome/browser/ui/webui/chromeos/login/discover/discover_window_manager.cc
+++ b/chrome/browser/ui/webui/chromeos/login/discover/discover_window_manager.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/webui/chromeos/login/discover/discover_window_manager.h"
 
+#include "ash/public/cpp/app_types.h"
 #include "ash/public/cpp/resources/grit/ash_public_unscaled_resources.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/ash/window_properties.h"
@@ -17,6 +18,7 @@
 #include "chrome/common/webui_url_constants.h"
 #include "chrome/grit/generated_resources.h"
 #include "content/public/browser/web_contents.h"
+#include "ui/aura/client/aura_constants.h"
 #include "ui/gfx/geometry/rect.h"
 #include "url/gurl.h"
 
@@ -83,6 +85,8 @@
 
   auto* window = params.browser->window()->GetNativeWindow();
   window->SetProperty(kOverrideWindowIconResourceIdKey, IDR_DISCOVER_APP_192);
+  window->SetProperty(aura::client::kAppType,
+                      static_cast<int>(ash::AppType::CHROME_APP));
 
   for (DiscoverWindowManagerObserver& observer : observers_)
     observer.OnNewDiscoverWindow(params.browser);
diff --git a/chrome/browser/ui/webui/net_export_ui.cc b/chrome/browser/ui/webui/net_export_ui.cc
index 38c8ac0..331c3d10 100644
--- a/chrome/browser/ui/webui/net_export_ui.cc
+++ b/chrome/browser/ui/webui/net_export_ui.cc
@@ -250,8 +250,6 @@
       new base::DictionaryValue());
 
   Profile* profile = Profile::FromWebUI(web_ui());
-  SetIfNotNull(ui_thread_polled_data.get(), "dataReductionProxyInfo",
-               chrome_browser_net::GetDataReductionProxyInfo(profile));
   SetIfNotNull(ui_thread_polled_data.get(), "historicNetworkStats",
                chrome_browser_net::GetHistoricNetworkStats(profile));
   SetIfNotNull(ui_thread_polled_data.get(), "prerenderInfo",
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 84859e4..dc351ccc0 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -975,6 +975,7 @@
   token_service_->RequestToken(type, callback_id);
 }
 
+// TODO (rbpotter): Remove this when the old Print Preview page is deleted.
 void PrintPreviewHandler::HandleManagePrinters(const base::ListValue* args) {
   GURL local_printers_manage_url(
       chrome::GetSettingsUrl(chrome::kPrintingSettingsSubPage));
@@ -1050,6 +1051,7 @@
                                      weak_factory_.GetWeakPtr(), callback_id));
 }
 
+// TODO(rbpotter): Remove this when the old Print Preview page is deleted.
 void PrintPreviewHandler::HandleForceOpenNewTab(const base::ListValue* args) {
   std::string url;
   if (!args->GetString(0, &url))
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
index 88a08b47..9ffc03e2 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -229,6 +229,7 @@
 
   // Brings up Chrome printing setting page to allow the user to configure local
   // printers or Google Cloud printers. |args| is unused.
+  // TODO (rbpotter): Remove this when the old Print Preview page is deleted.
   void HandleManagePrinters(const base::ListValue* args);
 
   // Gathers UMA stats when the print preview dialog is about to close.
@@ -246,6 +247,7 @@
   // Javascript's "window.open" opens a new window popup (since initiated from
   // async HTTP request) and worse yet, on Windows and Chrome OS, the opened
   // window opens behind the initiator window.
+  // TODO(rbpotter): Remove this when the old Print Preview page is deleted.
   void HandleForceOpenNewTab(const base::ListValue* args);
 
   void SendInitialSettings(const std::string& callback_id,
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 24f69d8..c3c6f489 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -27,6 +27,7 @@
 #include "chrome/browser/printing/background_printing_manager.h"
 #include "chrome/browser/printing/print_preview_data_service.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/chrome_pages.h"
 #include "chrome/browser/ui/webui/metrics_handler.h"
 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
 #include "chrome/browser/ui/webui/theme_source.h"
@@ -251,6 +252,9 @@
   source->AddString(
       "noDestsPromoLearnMoreUrl",
       chrome::kCloudPrintNoDestinationsLearnMoreURL);
+  source->AddString(
+      "settingsPrintingPage",
+      chrome::GetSettingsUrl(chrome::kPrintingSettingsSubPage).spec());
   source->AddString("gcpCertificateErrorLearnMoreURL",
                     chrome::kCloudPrintCertificateErrorLearnMoreURL);
   source->AddLocalizedString("pageRangeLimitInstruction",
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 af73af5..0a2b094 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
@@ -34,7 +34,6 @@
 #include "components/autofill/core/common/autofill_constants.h"
 #include "components/autofill/core/common/autofill_features.h"
 #include "components/browser_sync/profile_sync_service.h"
-#include "components/content_settings/core/common/features.h"
 #include "components/google/core/common/google_util.h"
 #include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/password_manager/core/common/password_manager_features.h"
@@ -517,7 +516,7 @@
 void AddChangePasswordStrings(content::WebUIDataSource* html_source) {
   LocalizedString localized_strings[] = {
       {"changePasswordPageTitle", IDS_SETTINGS_CHANGE_PASSWORD_TITLE},
-      {"changePasswordPageDetails", IDS_SETTINGS_CHANGE_PASSWORD_DETAIL},
+      {"changePasswordPageDetails", IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS},
       {"changePasswordPageButton", IDS_SETTINGS_CHANGE_PASSWORD_BUTTON},
   };
   AddLocalizedStringsBulk(html_source, localized_strings,
@@ -2607,11 +2606,6 @@
       "enablePaymentHandlerContentSetting",
       base::FeatureList::IsEnabled(features::kServiceWorkerPaymentApps));
 
-  html_source->AddBoolean(
-      "enableEphemeralFlashPermission",
-      base::FeatureList::IsEnabled(
-          content_settings::features::kEnableEphemeralFlashPermission));
-
   if (PluginUtils::ShouldPreferHtmlOverPlugins(
           HostContentSettingsMapFactory::GetForProfile(profile))) {
     LocalizedString flash_strings[] = {
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc
index a04ecb2..3b10506 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -313,8 +313,9 @@
   html_source->AddBoolean(
       "quickUnlockDisabledByPolicy",
       chromeos::quick_unlock::IsPinDisabledByPolicy(profile->GetPrefs()));
-  html_source->AddBoolean("fingerprintUnlockEnabled",
-                          chromeos::quick_unlock::IsFingerprintEnabled());
+  html_source->AddBoolean(
+      "fingerprintUnlockEnabled",
+      chromeos::quick_unlock::IsFingerprintEnabled(profile));
   html_source->AddBoolean("lockScreenNotificationsEnabled",
                           ash::features::IsLockScreenNotificationsEnabled());
   html_source->AddBoolean(
diff --git a/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc b/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
index e6ead2d..908ab81b 100644
--- a/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
@@ -274,7 +274,6 @@
 
   void SetUpSigninManager(const std::string& username);
   void EnableSigninAllowed(bool enable);
-  void EnableOneClick(bool enable);
   void AddEmailToOneClickRejectedList(const std::string& email);
   void AllowSigninCookies(bool enable);
   void SetAllowedUsernamePattern(const std::string& pattern);
@@ -297,11 +296,6 @@
   pref_service->SetBoolean(prefs::kSigninAllowed, enable);
 }
 
-void InlineLoginUIBrowserTest::EnableOneClick(bool enable) {
-  PrefService* pref_service = browser()->profile()->GetPrefs();
-  pref_service->SetBoolean(prefs::kReverseAutologinEnabled, enable);
-}
-
 void InlineLoginUIBrowserTest::AddEmailToOneClickRejectedList(
     const std::string& email) {
   PrefService* pref_service = browser()->profile()->GetPrefs();
@@ -380,13 +374,10 @@
 }
 
 IN_PROC_BROWSER_TEST_F(InlineLoginUIBrowserTest, CanOffer) {
-  EnableOneClick(true);
   EXPECT_TRUE(CanOfferSignin(browser()->profile(),
                              CAN_OFFER_SIGNIN_FOR_ALL_ACCOUNTS, "12345",
                              "user@gmail.com", NULL));
 
-  EnableOneClick(false);
-
   std::string error_message;
 
   EXPECT_TRUE(CanOfferSignin(browser()->profile(),
diff --git a/chrome/common/extensions/manifest_handlers/app_icon_color_info.cc b/chrome/common/extensions/manifest_handlers/app_icon_color_info.cc
index 10a9d620..12b55c1 100644
--- a/chrome/common/extensions/manifest_handlers/app_icon_color_info.cc
+++ b/chrome/common/extensions/manifest_handlers/app_icon_color_info.cc
@@ -6,6 +6,7 @@
 
 #include <memory>
 
+#include "base/no_destructor.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
 #include "extensions/common/image_util.h"
@@ -20,11 +21,11 @@
 namespace {
 
 const AppIconColorInfo& GetAppIconColorInfo(const Extension* extension) {
-  CR_DEFINE_STATIC_LOCAL(const AppIconColorInfo, fallback, ());
+  static const base::NoDestructor<AppIconColorInfo> fallback;
 
   AppIconColorInfo* info = static_cast<AppIconColorInfo*>(
       extension->GetManifestData(keys::kAppIconColor));
-  return info ? *info : fallback;
+  return info ? *info : *fallback;
 }
 
 }  // namespace
diff --git a/chrome/common/net/net_resource_provider.cc b/chrome/common/net/net_resource_provider.cc
index 4628a12..f9cbfd4 100644
--- a/chrome/common/net/net_resource_provider.cc
+++ b/chrome/common/net/net_resource_provider.cc
@@ -7,6 +7,7 @@
 #include <string>
 
 #include "base/i18n/rtl.h"
+#include "base/no_destructor.h"
 #include "base/strings/string_piece.h"
 #include "base/values.h"
 #include "chrome/grit/chromium_strings.h"
@@ -57,10 +58,10 @@
 namespace chrome_common_net {
 
 base::StringPiece NetResourceProvider(int key) {
-  CR_DEFINE_STATIC_LOCAL(LazyDirectoryListerCacher, lazy_dir_lister, ());
+  static base::NoDestructor<LazyDirectoryListerCacher> lazy_dir_lister;
 
   if (IDR_DIR_HEADER_HTML == key)
-    return base::StringPiece(lazy_dir_lister.html_data);
+    return base::StringPiece(lazy_dir_lister->html_data);
 
   return ui::ResourceBundle::GetSharedInstance().GetRawDataResource(key);
 }
diff --git a/chrome/common/profiling.cc b/chrome/common/profiling.cc
index c8016dc..b662327 100644
--- a/chrome/common/profiling.cc
+++ b/chrome/common/profiling.cc
@@ -12,6 +12,7 @@
 #include "base/lazy_instance.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/no_destructor.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread.h"
@@ -21,23 +22,25 @@
 namespace {
 
 std::string GetProfileName() {
-  static const char kDefaultProfileName[] = "chrome-profile-{type}-{pid}";
-  CR_DEFINE_STATIC_LOCAL(std::string, profile_name, ());
+  static base::NoDestructor<std::string> profile_name([]() {
+    std::string profile_name;
 
-  if (profile_name.empty()) {
     const base::CommandLine& command_line =
         *base::CommandLine::ForCurrentProcess();
     if (command_line.HasSwitch(switches::kProfilingFile))
       profile_name = command_line.GetSwitchValueASCII(switches::kProfilingFile);
     else
-      profile_name = std::string(kDefaultProfileName);
+      profile_name = std::string("chrome-profile-{type}-{pid}");
     std::string process_type =
         command_line.GetSwitchValueASCII(switches::kProcessType);
     std::string type = process_type.empty() ?
         std::string("browser") : std::string(process_type);
     base::ReplaceSubstringsAfterOffset(&profile_name, 0, "{type}", type);
-  }
-  return profile_name;
+
+    return profile_name;
+  }());
+
+  return *profile_name;
 }
 
 void FlushProfilingData(base::Thread* thread) {
diff --git a/chrome/installer/mac/BUILD.gn b/chrome/installer/mac/BUILD.gn
index da4b09d2..106fddd 100644
--- a/chrome/installer/mac/BUILD.gn
+++ b/chrome/installer/mac/BUILD.gn
@@ -13,10 +13,6 @@
     ":make_signers",
     "app:mac_installer_app",
   ]
-
-  if (is_chrome_branded) {
-    public_deps += [ ":keychain_reauthorizers" ]
-  }
 }
 
 _packaging_dir = "$root_out_dir/$chrome_product_full_name Packaging"
@@ -118,18 +114,3 @@
     "$_packaging_dir/{{source_file_part}}",
   ]
 }
-
-if (is_chrome_branded) {
-  copy("keychain_reauthorizers") {
-    visibility = [ ":mac" ]
-
-    sources = [
-      "internal/keychain_reauthorizers/com.google.Chrome",
-      "internal/keychain_reauthorizers/com.google.Chrome.canary",
-    ]
-
-    outputs = [
-      "$_packaging_dir/keychain_reauthorizers/{{source_file_part}}",
-    ]
-  }
-}
diff --git a/chrome/installer/mac/dmgdiffer.sh b/chrome/installer/mac/dmgdiffer.sh
index 257f49c..dbdeb9b 100755
--- a/chrome/installer/mac/dmgdiffer.sh
+++ b/chrome/installer/mac/dmgdiffer.sh
@@ -243,18 +243,6 @@
     exit 13
   fi
 
-  local patch_keychain_reauthorize_dir="${patch_fs}/.keychain_reauthorize"
-  if ! mkdir "${patch_keychain_reauthorize_dir}"; then
-    err "could not mkdir patch_keychain_reauthorize_dir"
-    exit 13
-  fi
-
-  if ! cp -p "${SCRIPT_DIR}/keychain_reauthorizers/${old_app_bundleid}" \
-             "${patch_keychain_reauthorize_dir}/${old_app_bundleid}"; then
-    err "could not copy keychain_reauthorize"
-    exit 13
-  fi
-
   local patch_dotpatch_dir="${patch_fs}/.patch"
   if ! mkdir "${patch_dotpatch_dir}"; then
     err "could not mkdir patch_dotpatch_dir"
diff --git a/chrome/installer/mac/sign_app.sh.in b/chrome/installer/mac/sign_app.sh.in
index 4383c82..700faa2 100644
--- a/chrome/installer/mac/sign_app.sh.in
+++ b/chrome/installer/mac/sign_app.sh.in
@@ -24,21 +24,24 @@
 ME="$(basename "${0}")"
 readonly ME
 
-if [[ ${#} -ne 5 && ${#} -ne 6 ]]; then
+if [[ ${#} -eq 4 ]]; then
+  app_path="${1}"
+  codesign_keychain="${2}"
+  codesign_id="${3}"
+  if [[ "${4}" == "--development" ]]; then
+    is_development=1
+  fi
+elif [[ ${#} -ne 5 ]]; then
   echo "usage: ${ME} app_path codesign_keychain codesign_id \
-provisioning_profile entitlements_plist [--development]" >& 2
+provisioning_profile entitlements_plist" >& 2
   exit 1
-fi
-
-app_path="${1}"
-codesign_keychain="${2}"
-codesign_id="${3}"
-provisioning_profile="${4}"
-entitlements_plist="${5}"
-is_development=
-
-if [[ ${#} == 6 && "${6}" == "--development" ]]; then
-  is_development=1
+else
+  app_path="${1}"
+  codesign_keychain="${2}"
+  codesign_id="${3}"
+  provisioning_profile="${4}"
+  entitlements_plist="${5}"
+  is_development=0
 fi
 
 script_dir="$(dirname "${0}")"
@@ -59,7 +62,9 @@
 app_mode_loader="${app_mode_loader_app}/Contents/MacOS/app_mode_loader"
 
 # Embed the supplied provisioning profile.
-cp "${provisioning_profile}" "${contents_dir}/embedded.provisionprofile"
+if [[ -z "${is_development}" ]]; then
+  cp "${provisioning_profile}" "${contents_dir}/embedded.provisionprofile"
+fi
 
 requirement="\
 designated => \
@@ -75,9 +80,9 @@
   "${browser_app}"
   --options "${enforcement_flags_app}"
   --resource-rules "${browser_app_rules}"
-  --entitlements "${entitlements_plist}"
 )
 if [[ -z "${is_development}" ]]; then
+  codesign_cmd+=(--entitlements="${entitlements_plist}")
   codesign_cmd+=( -r="${requirement}" )
 fi
 "${codesign_cmd[@]}"
diff --git a/chrome/installer/mac/variables.sh b/chrome/installer/mac/variables.sh
index 3cb206fd..cb07976 100644
--- a/chrome/installer/mac/variables.sh
+++ b/chrome/installer/mac/variables.sh
@@ -19,6 +19,5 @@
 # contains the hash of the certificate used to sign Chrome. When transitioning
 # signing certs, this may include the hash of both the old and new certificate.
 requirement_suffix="\
-and (certificate leaf = H\"85cee8254216185620ddc8851c7a9fc4dfe120ef\" or \
-certificate leaf = H\"c9a99324ca3fcb23dbcc36bd5fd4f9753305130a\") \
+and certificate leaf = H\"c9a99324ca3fcb23dbcc36bd5fd4f9753305130a\" \
 "
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 2d9e1bbe..337c13ab 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -14,6 +14,7 @@
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/user_metrics_action.h"
+#include "base/no_destructor.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -747,8 +748,8 @@
     ~PluginInfoHostHolder() {}
     chrome::mojom::PluginInfoHostAssociatedPtr plugin_info_host;
   };
-  CR_DEFINE_STATIC_LOCAL(PluginInfoHostHolder, holder, ());
-  return holder.plugin_info_host;
+  static base::NoDestructor<PluginInfoHostHolder> holder;
+  return holder->plugin_info_host;
 }
 
 // static
diff --git a/chrome/renderer/net_benchmarking_extension.cc b/chrome/renderer/net_benchmarking_extension.cc
index 37f75e87..5979ea6 100644
--- a/chrome/renderer/net_benchmarking_extension.cc
+++ b/chrome/renderer/net_benchmarking_extension.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/renderer/net_benchmarking_extension.h"
 
+#include "base/no_destructor.h"
 #include "chrome/common/net_benchmarking.mojom.h"
 #include "content/public/common/service_names.mojom.h"
 #include "content/public/renderer/render_thread.h"
@@ -74,9 +75,9 @@
   }
 
   static chrome::mojom::NetBenchmarking& GetNetBenchmarking() {
-    CR_DEFINE_STATIC_LOCAL(chrome::mojom::NetBenchmarkingPtr, net_benchmarking,
-                           (ConnectToBrowser()));
-    return *net_benchmarking;
+    static base::NoDestructor<chrome::mojom::NetBenchmarkingPtr>
+        net_benchmarking(ConnectToBrowser());
+    return **net_benchmarking;
   }
 
   static chrome::mojom::NetBenchmarkingPtr ConnectToBrowser() {
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 2b76bbc..e4f1249 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -1668,6 +1668,7 @@
         "../browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc",
         "../browser/chromeos/login/demo_mode/demo_session_browsertest.cc",
         "../browser/chromeos/login/demo_mode/demo_setup_browsertest.cc",
+        "../browser/chromeos/login/demo_mode/demo_setup_test_utils.cc",
         "../browser/chromeos/login/demo_mode/demo_setup_test_utils.h",
         "../browser/chromeos/login/enable_debugging_browsertest.cc",
         "../browser/chromeos/login/enrollment/enrollment_screen_browsertest.cc",
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json
index 0390677..35a226c3 100644
--- a/chrome/test/data/policy/policy_test_cases.json
+++ b/chrome/test/data/policy/policy_test_cases.json
@@ -2855,6 +2855,14 @@
     ]
   },
 
+  "AllowWakeLocks": {
+    "os": ["chromeos"],
+    "test_policy": { "AllowWakeLocks": false },
+    "pref_mappings": [
+      { "pref": "power.allow_wake_locks" }
+    ]
+  },
+
   "AllowScreenWakeLocks": {
     "os": ["chromeos"],
     "test_policy": { "AllowScreenWakeLocks": false },
diff --git a/chrome/test/data/webui/print_preview/pages_settings_test.js b/chrome/test/data/webui/print_preview/pages_settings_test.js
index eea4541..72fae7e 100644
--- a/chrome/test/data/webui/print_preview/pages_settings_test.js
+++ b/chrome/test/data/webui/print_preview/pages_settings_test.js
@@ -13,6 +13,7 @@
     ClickingCustomFocusesInput: 'clicking custom focuses input',
     InputNotDisabledOnValidityChange: 'input not disabled on validity change',
     IgnoreInputKeyEvents: 'ignore input key events',
+    EnterOnInputTriggersPrint: 'enter on input triggers print',
   };
 
   const suiteName = 'PagesSettingsTest';
@@ -501,6 +502,49 @@
           });
 
     });
+
+    // Verifies that the enter key event is bubbled to the pages settings
+    // element, so that it will be bubbled to the print preview app to trigger a
+    // print.
+    test(assert(TestNames.EnterOnInputTriggersPrint), function() {
+      const input = pagesSection.$.pageSettingsCustomInput.inputElement;
+      const radioGroup = pagesSection.$$('paper-radio-group');
+      const whenPrintReceived =
+          test_util.eventToPromise('keydown', pagesSection);
+
+      // Setup an empty input by clicking on the custom radio button.
+      const inputFocused = test_util.eventToPromise('focus', input);
+      pagesSection.$.customRadioButton.click();
+      return inputFocused
+          .then(function() {
+            assertEquals(
+                pagesSection.pagesValueEnum_.CUSTOM, radioGroup.selected);
+            MockInteractions.keyEventOn(input, 'keydown', 13, [], 'Enter');
+            return whenPrintReceived;
+          })
+          // All gets automatically selected
+          .then(function() {
+            assertEquals(pagesSection.pagesValueEnum_.ALL, radioGroup.selected);
+            // Refocus the radio group to reset the focused button to "all".
+            // Normally, enter results in print, so this does not need to
+            // happen.
+            radioGroup.focus();
+            return setupInput('1', 3);
+          })
+          // Re-select custom and print again.
+          .then(function() {
+            assertEquals(
+                pagesSection.pagesValueEnum_.CUSTOM, radioGroup.selected);
+            const whenPrintReceived =
+                test_util.eventToPromise('keydown', pagesSection);
+            MockInteractions.keyEventOn(input, 'keydown', 13, [], 'Enter');
+            return whenPrintReceived;
+          })
+          .then(function() {
+            assertEquals(
+                pagesSection.pagesValueEnum_.CUSTOM, radioGroup.selected);
+          });
+    });
   });
 
   return {
diff --git a/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js b/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js
index a93fc7f..cf20837 100644
--- a/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js
+++ b/chrome/test/data/webui/print_preview/print_preview_interactive_ui_tests.js
@@ -159,6 +159,12 @@
   this.runMochaTest(pages_settings_test.TestNames.IgnoreInputKeyEvents);
 });
 
+TEST_F(
+    'PrintPreviewPagesSettingsTest', 'EnterOnInputTriggersPrint', function() {
+      this.runMochaTest(
+          pages_settings_test.TestNames.EnterOnInputTriggersPrint);
+    });
+
 PrintPreviewNumberSettingsSectionInteractiveTest =
     class extends PrintPreviewInteractiveUITest {
   /** @override */
diff --git a/chromecast/media/audio/cast_audio_output_stream.cc b/chromecast/media/audio/cast_audio_output_stream.cc
index 3001061..08d97809 100644
--- a/chromecast/media/audio/cast_audio_output_stream.cc
+++ b/chromecast/media/audio/cast_audio_output_stream.cc
@@ -51,8 +51,8 @@
   void Initialize(const std::string& application_session_id,
                   chromecast::mojom::MultiroomInfoPtr multiroom_info);
   void Start(AudioSourceCallback* source_callback);
-  void Stop(base::OnceClosure closure);
-  void Pause();
+  void Stop();
+  void Close(base::OnceClosure closure);
   void SetVolume(double volume);
 
  private:
@@ -187,8 +187,6 @@
   if (media_thread_state_ == kOpened) {
     media_thread_state_ = kStarted;
     cma_backend_->Start(0);
-  } else {
-    cma_backend_->Resume();
   }
 
   next_push_time_ = base::TimeTicks::Now();
@@ -198,12 +196,23 @@
   }
 }
 
-void CastAudioOutputStream::CmaWrapper::Stop(base::OnceClosure closure) {
+void CastAudioOutputStream::CmaWrapper::Stop() {
+  DCHECK_CALLED_ON_VALID_THREAD(media_thread_checker_);
+  if (cma_backend_ && media_thread_state_ == kStarted) {
+    cma_backend_->Stop();
+  }
+  push_in_progress_ = false;
+  media_thread_state_ = kOpened;
+  source_callback_ = nullptr;
+}
+
+void CastAudioOutputStream::CmaWrapper::Close(base::OnceClosure closure) {
   DCHECK_CALLED_ON_VALID_THREAD(media_thread_checker_);
   // Only stop the backend if it was started.
   if (cma_backend_ && media_thread_state_ == kStarted) {
     cma_backend_->Stop();
   }
+  push_in_progress_ = false;
   media_thread_state_ = kPendingClose;
 
   cma_backend_task_runner_.reset();
@@ -213,16 +222,6 @@
   audio_task_runner_->PostTask(FROM_HERE, std::move(closure));
 }
 
-void CastAudioOutputStream::CmaWrapper::Pause() {
-  DCHECK_CALLED_ON_VALID_THREAD(media_thread_checker_);
-
-  if (cma_backend_) {
-    cma_backend_->Pause();
-  }
-
-  source_callback_ = nullptr;
-}
-
 void CastAudioOutputStream::CmaWrapper::SetVolume(double volume) {
   DCHECK_CALLED_ON_VALID_THREAD(media_thread_checker_);
   if (!audio_decoder_) {
@@ -236,13 +235,15 @@
 
 void CastAudioOutputStream::CmaWrapper::PushBuffer() {
   DCHECK_CALLED_ON_VALID_THREAD(media_thread_checker_);
-  DCHECK(push_in_progress_);
 
+  // It is possible that this function is called when we are stopped.
+  // Return quickly if so.
   if (!source_callback_ || encountered_error_ ||
       media_thread_state_ != kStarted) {
     push_in_progress_ = false;
     return;
   }
+  DCHECK(push_in_progress_);
 
   CmaBackend::AudioDecoder::RenderingDelay rendering_delay =
       audio_decoder_->GetRenderingDelay();
@@ -389,7 +390,7 @@
   base::OnceClosure finish_callback = base::BindOnce(
       &CastAudioOutputStream::FinishClose, audio_weak_factory_.GetWeakPtr());
   if (cma_wrapper_)
-    POST_TO_CMA_WRAPPER(Stop, std::move(finish_callback));
+    POST_TO_CMA_WRAPPER(Close, std::move(finish_callback));
   else
     std::move(finish_callback).Run();
 }
@@ -427,7 +428,7 @@
   pending_start_.Reset();
   pending_volume_.Reset();
   if (cma_wrapper_)
-    POST_TO_CMA_WRAPPER(Pause);
+    POST_TO_CMA_WRAPPER(Stop);
 }
 
 void CastAudioOutputStream::SetVolume(double volume) {
diff --git a/chromecast/media/audio/cast_audio_output_stream.h b/chromecast/media/audio/cast_audio_output_stream.h
index 77c22a9..28f6919 100644
--- a/chromecast/media/audio/cast_audio_output_stream.h
+++ b/chromecast/media/audio/cast_audio_output_stream.h
@@ -60,11 +60,11 @@
 //      |                                           |
 //      |                                           |
 //      v                                           v
-//   [   Opened    ]    --post open-->           [   Opened   ]
-//      |     |  ^                                  |     |
-//      |     |  |                                  |     |
-//      |     | Stop()                              |     |
-//      |     v  |                                  |     v
+//   [   Opened    ]    --post open-->           [   Opened    ]
+//      |     |  ^                                  |     |  ^
+//      |     |  |                                  |     |  |
+//      |     | Stop()  --post stop-->              |     | Stop()
+//      |     v  |                                  |     v  |
 //      |  [ Started ]  --post start-->             |  [ Started ]
 //      |     |                                     |     |
 //      |     |                                     |     |
diff --git a/chromecast/media/audio/cast_audio_output_stream_unittest.cc b/chromecast/media/audio/cast_audio_output_stream_unittest.cc
index da8ea93a..e38441b3 100644
--- a/chromecast/media/audio/cast_audio_output_stream_unittest.cc
+++ b/chromecast/media/audio/cast_audio_output_stream_unittest.cc
@@ -53,10 +53,12 @@
 const int64_t kDelayTimestampUs = 123456789;
 const double kDefaultVolume = 1.0f;
 
+int on_more_data_call_count_ = 0;
 int OnMoreData(base::TimeDelta /* delay */,
                base::TimeTicks /* delay_timestamp */,
                int /* prior_frames_skipped */,
                ::media::AudioBus* dest) {
+  on_more_data_call_count_++;
   dest->Zero();
   return dest->frames();
 }
@@ -464,17 +466,25 @@
   ASSERT_TRUE(stream->Open());
   scoped_task_environment_.RunUntilIdle();
 
+  // Set to busy, so that the OnPushBufferComplete callback is not called after
+  // the backend is stopped.
+  FakeAudioDecoder* audio_decoder = GetAudioDecoder();
+  ASSERT_TRUE(audio_decoder);
+  audio_decoder->set_pipeline_status(FakeAudioDecoder::PIPELINE_STATUS_BUSY);
+
   ::media::MockAudioSourceCallback source_callback;
   EXPECT_CALL(source_callback, OnMoreData(_, _, _, _))
       .WillRepeatedly(Invoke(OnMoreData));
   stream->Start(&source_callback);
   scoped_task_environment_.RunUntilIdle();
   stream->Stop();
+
+  // Ensure we fetch new data when restarting.
+  int last_on_more_data_call_count = on_more_data_call_count_;
   stream->Start(&source_callback);
   scoped_task_environment_.RunUntilIdle();
+  EXPECT_GT(on_more_data_call_count_, last_on_more_data_call_count);
 
-  FakeAudioDecoder* audio_decoder = GetAudioDecoder();
-  EXPECT_TRUE(audio_decoder);
   EXPECT_EQ(FakeCmaBackend::kStateRunning, cma_backend_->state());
 
   stream->Stop();
@@ -559,7 +569,7 @@
 
   stream->Stop();
   scoped_task_environment_.RunUntilIdle();
-  EXPECT_EQ(FakeCmaBackend::kStatePaused, cma_backend_->state());
+  EXPECT_EQ(FakeCmaBackend::kStateStopped, cma_backend_->state());
 
   stream->Close();
 }
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn
index 36fb57c..1d300015 100644
--- a/chromeos/BUILD.gn
+++ b/chromeos/BUILD.gn
@@ -10,15 +10,26 @@
 
 assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
 
+# Used by targets that compile into the implementation.
+config("chromeos_implementation") {
+  defines = [ "CHROMEOS_IMPLEMENTATION" ]
+}
+
 component("chromeos") {
-  configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ]
+  configs += [
+    ":chromeos_implementation",
+    "//build/config/linux/nss:system_nss_no_ssl_config"
+  ]
   public_deps = [
     ":chromeos_constants",
     ":chromeos_export",
     ":login_event_recorder",
+    ":policy_certificate_provider",
+    ":tools",
     "//chromeos/cryptohome",
     "//chromeos/dbus",
     "//chromeos/login",
+    "//chromeos/network",
     "//chromeos/settings",
     "//dbus",
   ]
@@ -43,19 +54,15 @@
     "//base/third_party/dynamic_annotations",
     "//components/account_id",
     "//components/device_event_log",
-    "//components/onc",
     "//components/policy:cloud_policy_proto_generated_compile",
     "//components/policy/proto",
     "//components/pref_registry",
     "//components/prefs",
-    "//components/proxy_config",
-    "//components/url_formatter",
     "//components/user_manager",
     "//crypto:platform",
     "//google_apis",
     "//media/base:video_facing",
     "//services/network/public/cpp:cpp",
-    "//skia",
     "//third_party/protobuf:protobuf_lite",
     "//ui/gfx/geometry",  # For accelerometer.
   ]
@@ -99,142 +106,12 @@
     "geolocation/simple_geolocation_request_test_monitor.h",
     "hugepage_text/hugepage_text.cc",
     "hugepage_text/hugepage_text.h",
-    "network/auto_connect_handler.cc",
-    "network/auto_connect_handler.h",
-    "network/certificate_helper.cc",
-    "network/certificate_helper.h",
-    "network/certificate_pattern.cc",
-    "network/certificate_pattern.h",
-    "network/client_cert_resolver.cc",
-    "network/client_cert_resolver.h",
-    "network/client_cert_util.cc",
-    "network/client_cert_util.h",
-    "network/device_state.cc",
-    "network/device_state.h",
-    "network/dhcp_pac_file_fetcher_chromeos.cc",
-    "network/dhcp_pac_file_fetcher_chromeos.h",
-    "network/dhcp_pac_file_fetcher_factory_chromeos.cc",
-    "network/dhcp_pac_file_fetcher_factory_chromeos.h",
-    "network/firewall_hole.cc",
-    "network/firewall_hole.h",
-    "network/geolocation_handler.cc",
-    "network/geolocation_handler.h",
-    "network/host_resolver_impl_chromeos.cc",
-    "network/host_resolver_impl_chromeos.h",
-    "network/managed_network_configuration_handler.cc",
-    "network/managed_network_configuration_handler.h",
-    "network/managed_network_configuration_handler_impl.cc",
-    "network/managed_network_configuration_handler_impl.h",
-    "network/managed_state.cc",
-    "network/managed_state.h",
-    "network/network_activation_handler.cc",
-    "network/network_activation_handler.h",
-    "network/network_cert_loader.cc",
-    "network/network_cert_loader.h",
-    "network/network_cert_migrator.cc",
-    "network/network_cert_migrator.h",
-    "network/network_certificate_handler.cc",
-    "network/network_certificate_handler.h",
-    "network/network_change_notifier_chromeos.cc",
-    "network/network_change_notifier_chromeos.h",
-    "network/network_change_notifier_factory_chromeos.cc",
-    "network/network_change_notifier_factory_chromeos.h",
-    "network/network_configuration_handler.cc",
-    "network/network_configuration_handler.h",
-    "network/network_configuration_observer.h",
-    "network/network_connect.cc",
-    "network/network_connect.h",
-    "network/network_connection_handler.cc",
-    "network/network_connection_handler.h",
-    "network/network_connection_handler_impl.cc",
-    "network/network_connection_handler_impl.h",
-    "network/network_connection_observer.cc",
-    "network/network_connection_observer.h",
-    "network/network_device_handler.cc",
-    "network/network_device_handler.h",
-    "network/network_device_handler_impl.cc",
-    "network/network_device_handler_impl.h",
-    "network/network_event_log.h",
-    "network/network_handler.cc",
-    "network/network_handler.h",
-    "network/network_handler_callbacks.cc",
-    "network/network_handler_callbacks.h",
-    "network/network_ip_config.cc",
-    "network/network_ip_config.h",
-    "network/network_profile.cc",
-    "network/network_profile.h",
-    "network/network_profile_handler.cc",
-    "network/network_profile_handler.h",
-    "network/network_profile_observer.h",
-    "network/network_sms_handler.cc",
-    "network/network_sms_handler.h",
-    "network/network_state.cc",
-    "network/network_state.h",
-    "network/network_state_handler.cc",
-    "network/network_state_handler.h",
-    "network/network_state_handler_observer.cc",
-    "network/network_state_handler_observer.h",
-    "network/network_type_pattern.cc",
-    "network/network_type_pattern.h",
-    "network/network_ui_data.cc",
-    "network/network_ui_data.h",
-    "network/network_util.cc",
-    "network/network_util.h",
-    "network/onc/onc_certificate_importer.h",
-    "network/onc/onc_certificate_importer_impl.cc",
-    "network/onc/onc_certificate_importer_impl.h",
-    "network/onc/onc_mapper.cc",
-    "network/onc/onc_mapper.h",
-    "network/onc/onc_merger.cc",
-    "network/onc/onc_merger.h",
-    "network/onc/onc_normalizer.cc",
-    "network/onc/onc_normalizer.h",
-    "network/onc/onc_parsed_certificates.cc",
-    "network/onc/onc_parsed_certificates.h",
-    "network/onc/onc_signature.cc",
-    "network/onc/onc_signature.h",
-    "network/onc/onc_translation_tables.cc",
-    "network/onc/onc_translation_tables.h",
-    "network/onc/onc_translator.h",
-    "network/onc/onc_translator_onc_to_shill.cc",
-    "network/onc/onc_translator_shill_to_onc.cc",
-    "network/onc/onc_utils.cc",
-    "network/onc/onc_utils.h",
-    "network/onc/onc_validator.cc",
-    "network/onc/onc_validator.h",
-    "network/policy_applicator.cc",
-    "network/policy_applicator.h",
-    "network/policy_util.cc",
-    "network/policy_util.h",
-    "network/portal_detector/network_portal_detector.cc",
-    "network/portal_detector/network_portal_detector.h",
-    "network/portal_detector/network_portal_detector_strategy.cc",
-    "network/portal_detector/network_portal_detector_strategy.h",
-    "network/portal_detector/network_portal_detector_stub.cc",
-    "network/portal_detector/network_portal_detector_stub.h",
-    "network/prohibited_technologies_handler.cc",
-    "network/prohibited_technologies_handler.h",
-    "network/proxy/proxy_config_handler.cc",
-    "network/proxy/proxy_config_handler.h",
-    "network/proxy/proxy_config_service_impl.cc",
-    "network/proxy/proxy_config_service_impl.h",
-    "network/proxy/ui_proxy_config.cc",
-    "network/proxy/ui_proxy_config.h",
-    "network/proxy/ui_proxy_config_service.cc",
-    "network/proxy/ui_proxy_config_service.h",
-    "network/shill_property_handler.cc",
-    "network/shill_property_handler.h",
-    "network/shill_property_util.cc",
-    "network/shill_property_util.h",
-    "network/tether_constants.cc",
-    "network/tether_constants.h",
     "policy/weekly_time/time_utils.cc",
     "policy/weekly_time/time_utils.h",
     "policy/weekly_time/weekly_time.cc",
     "policy/weekly_time/weekly_time.h",
     "policy/weekly_time/weekly_time_interval.cc",
     "policy/weekly_time/weekly_time_interval.h",
-    "policy_certificate_provider.h",
     "printing/ppd_cache.cc",
     "printing/ppd_cache.h",
     "printing/ppd_line_reader.cc",
@@ -275,8 +152,6 @@
     "timezone/timezone_request.h",
     "timezone/timezone_resolver.cc",
     "timezone/timezone_resolver.h",
-    "tools/variable_expander.cc",
-    "tools/variable_expander.h",
     "tpm/tpm_password_fetcher.cc",
     "tpm/tpm_password_fetcher.h",
     "tpm/tpm_token_info_getter.cc",
@@ -284,9 +159,8 @@
     "tpm/tpm_token_loader.cc",
     "tpm/tpm_token_loader.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
   if (current_cpu == "arm" || current_cpu == "x86") {
-    defines += [ "BINDER_IPC_32BIT" ]
+    defines = [ "BINDER_IPC_32BIT" ]
   }
 }
 
@@ -300,6 +174,7 @@
 }
 
 source_set("chromeos_constants") {
+  configs += [ ":chromeos_implementation" ]
   deps = [
     ":chromeos_export",
     "//base",
@@ -319,10 +194,10 @@
     "chromeos_switches.cc",
     "chromeos_switches.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("login_event_recorder") {
+  configs += [ ":chromeos_implementation" ]
   deps = [
     ":chromeos_export",
     "//base",
@@ -331,7 +206,29 @@
     "login_event_recorder.cc",
     "login_event_recorder.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
+}
+
+source_set("policy_certificate_provider") {
+  configs += [ ":chromeos_implementation" ]
+  deps = [
+    ":chromeos_export",
+    "//base",
+  ]
+  sources = [
+    "policy_certificate_provider.h",
+  ]
+}
+
+source_set("tools") {
+  configs += [ ":chromeos_implementation" ]
+  deps = [
+    ":chromeos_export",
+    "//base",
+  ]
+  sources = [
+    "tools/variable_expander.cc",
+    "tools/variable_expander.h",
+  ]
 }
 
 # This must be a static library instead of a source set because some of the
@@ -427,6 +324,7 @@
     "//chromeos/cryptohome:unit_tests",
     "//chromeos/dbus:unit_tests",
     "//chromeos/login:unit_tests",
+    "//chromeos/network:unit_tests",
     "//chromeos/services:unit_tests",
     "//chromeos/settings:unit_tests",
     "//components/account_id",
@@ -460,36 +358,6 @@
     "disks/disk_unittest.cc",
     "disks/suspend_unmount_manager_unittest.cc",
     "geolocation/simple_geolocation_unittest.cc",
-    "network/auto_connect_handler_unittest.cc",
-    "network/certificate_helper_unittest.cc",
-    "network/client_cert_resolver_unittest.cc",
-    "network/firewall_hole_unittest.cc",
-    "network/geolocation_handler_unittest.cc",
-    "network/host_resolver_impl_chromeos_unittest.cc",
-    "network/managed_network_configuration_handler_unittest.cc",
-    "network/network_cert_loader_unittest.cc",
-    "network/network_cert_migrator_unittest.cc",
-    "network/network_change_notifier_chromeos_unittest.cc",
-    "network/network_configuration_handler_unittest.cc",
-    "network/network_connect_unittest.cc",
-    "network/network_connection_handler_impl_unittest.cc",
-    "network/network_device_handler_unittest.cc",
-    "network/network_sms_handler_unittest.cc",
-    "network/network_state_handler_unittest.cc",
-    "network/network_state_unittest.cc",
-    "network/network_type_pattern_unittest.cc",
-    "network/network_ui_data_unittest.cc",
-    "network/network_util_unittest.cc",
-    "network/onc/onc_certificate_importer_impl_unittest.cc",
-    "network/onc/onc_merger_unittest.cc",
-    "network/onc/onc_normalizer_unittest.cc",
-    "network/onc/onc_parsed_certificates_unittest.cc",
-    "network/onc/onc_translator_unittest.cc",
-    "network/onc/onc_utils_unittest.cc",
-    "network/onc/onc_validator_unittest.cc",
-    "network/prohibited_technologies_handler_unittest.cc",
-    "network/proxy/proxy_config_service_impl_unittest.cc",
-    "network/shill_property_handler_unittest.cc",
     "policy/weekly_time/time_utils_unittest.cc",
     "policy/weekly_time/weekly_time_interval_unittest.cc",
     "policy/weekly_time/weekly_time_unittest.cc",
diff --git a/chromeos/components/drivefs/fake_drivefs.cc b/chromeos/components/drivefs/fake_drivefs.cc
index 8ef597a..d69004e 100644
--- a/chromeos/components/drivefs/fake_drivefs.cc
+++ b/chromeos/components/drivefs/fake_drivefs.cc
@@ -256,8 +256,6 @@
 std::unique_ptr<drivefs::DriveFsHost::MojoConnectionDelegate>
 FakeDriveFs::CreateConnectionDelegate() {
   drivefs::mojom::DriveFsBootstrapPtrInfo bootstrap;
-  if (bootstrap_binding_.is_bound())
-    bootstrap_binding_.Unbind();
   bootstrap_binding_.Bind(mojo::MakeRequest(&bootstrap));
   pending_delegate_request_ = mojo::MakeRequest(&delegate_);
   delegate_->OnMounted();
@@ -289,8 +287,6 @@
                        drivefs::mojom::DriveFsDelegatePtr delegate) {
   mojo::FuseInterface(std::move(pending_delegate_request_),
                       delegate.PassInterface());
-  if (binding_.is_bound())
-    binding_.Unbind();
   binding_.Bind(std::move(drive_fs_request));
 }
 
diff --git a/chromeos/components/tether/tether_host_fetcher_impl.cc b/chromeos/components/tether/tether_host_fetcher_impl.cc
index 1bf2c3a2..de504841 100644
--- a/chromeos/components/tether/tether_host_fetcher_impl.cc
+++ b/chromeos/components/tether/tether_host_fetcher_impl.cc
@@ -15,6 +15,39 @@
 
 namespace tether {
 
+namespace {
+
+enum class TetherHostSource {
+  UNKNOWN,
+  MULTIDEVICE_SETUP_CLIENT,
+  DEVICE_SYNC_CLIENT,
+  REMOTE_DEVICE_PROVIDER
+};
+
+TetherHostSource GetTetherHostSourceBasedOnFlags() {
+  if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
+      base::FeatureList::IsEnabled(
+          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
+    return TetherHostSource::MULTIDEVICE_SETUP_CLIENT;
+  }
+  if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
+      !base::FeatureList::IsEnabled(
+          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
+    return TetherHostSource::DEVICE_SYNC_CLIENT;
+  }
+  if (!base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
+      !base::FeatureList::IsEnabled(
+          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
+    return TetherHostSource::REMOTE_DEVICE_PROVIDER;
+  }
+  NOTREACHED() << "TetherHostFetcherImpl: Unexpected feature flag state of "
+               << "kMultiDeviceApi disabled and kEnableUnifiedMultiDeviceSetup "
+               << "enabled.";
+  return TetherHostSource::UNKNOWN;
+}
+
+}  // namespace
+
 // static
 TetherHostFetcherImpl::Factory*
     TetherHostFetcherImpl::Factory::factory_instance_ = nullptr;
@@ -62,10 +95,6 @@
       break;
     case TetherHostSource::DEVICE_SYNC_CLIENT:
       device_sync_client_->AddObserver(this);
-      if (IsInLegacyHostMode()) {
-        multidevice_setup_client_->AddObserver(this);
-        started_in_legacy_mode_ = true;
-      }
       break;
     case TetherHostSource::REMOTE_DEVICE_PROVIDER:
       remote_device_provider_->AddObserver(this);
@@ -80,13 +109,9 @@
   switch (GetTetherHostSourceBasedOnFlags()) {
     case TetherHostSource::MULTIDEVICE_SETUP_CLIENT:
       multidevice_setup_client_->RemoveObserver(this);
-      if (started_in_legacy_mode_)
-        device_sync_client_->RemoveObserver(this);
       break;
     case TetherHostSource::DEVICE_SYNC_CLIENT:
       device_sync_client_->RemoveObserver(this);
-      if (started_in_legacy_mode_)
-        multidevice_setup_client_->RemoveObserver(this);
       break;
     case TetherHostSource::REMOTE_DEVICE_PROVIDER:
       remote_device_provider_->RemoveObserver(this);
@@ -193,61 +218,6 @@
   return host_list;
 }
 
-bool TetherHostFetcherImpl::IsInLegacyHostMode() {
-  if (!base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi))
-    return false;
-
-  bool has_supported_tether_host = false;
-  for (const cryptauth::RemoteDeviceRef& remote_device_ref :
-       device_sync_client_->GetSyncedDevices()) {
-    cryptauth::SoftwareFeatureState better_together_host_state =
-        remote_device_ref.GetSoftwareFeatureState(
-            cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST);
-    // If there's any valid Better Together host, don't support legacy mode.
-    if (better_together_host_state ==
-            cryptauth::SoftwareFeatureState::kSupported ||
-        better_together_host_state ==
-            cryptauth::SoftwareFeatureState::kEnabled) {
-      return false;
-    }
-
-    cryptauth::SoftwareFeatureState magic_tether_host_state =
-        remote_device_ref.GetSoftwareFeatureState(
-            cryptauth::SoftwareFeature::MAGIC_TETHER_HOST);
-    if (magic_tether_host_state ==
-            cryptauth::SoftwareFeatureState::kSupported ||
-        magic_tether_host_state == cryptauth::SoftwareFeatureState::kEnabled) {
-      has_supported_tether_host = true;
-    }
-  }
-
-  return has_supported_tether_host;
-}
-
-TetherHostFetcherImpl::TetherHostSource
-TetherHostFetcherImpl::GetTetherHostSourceBasedOnFlags() {
-  if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
-      !base::FeatureList::IsEnabled(
-          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
-    return TetherHostSource::DEVICE_SYNC_CLIENT;
-  }
-  if (!base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
-      !base::FeatureList::IsEnabled(
-          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
-    return TetherHostSource::REMOTE_DEVICE_PROVIDER;
-  }
-  if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) &&
-      base::FeatureList::IsEnabled(
-          chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
-    return IsInLegacyHostMode() ? TetherHostSource::DEVICE_SYNC_CLIENT
-                                : TetherHostSource::MULTIDEVICE_SETUP_CLIENT;
-  }
-  NOTREACHED() << "TetherHostFetcherImpl: Unexpected feature flag state of "
-               << "kMultiDeviceApi disabled and kEnableUnifiedMultiDeviceSetup "
-               << "enabled.";
-  return TetherHostSource::UNKNOWN;
-}
-
 }  // namespace tether
 
 }  // namespace chromeos
diff --git a/chromeos/components/tether/tether_host_fetcher_impl.h b/chromeos/components/tether/tether_host_fetcher_impl.h
index e51b75fd..e8d9049 100644
--- a/chromeos/components/tether/tether_host_fetcher_impl.h
+++ b/chromeos/components/tether/tether_host_fetcher_impl.h
@@ -30,11 +30,12 @@
 // Note: TetherHostFetcherImpl, and the Tether feature as a whole, is currently
 // in the middle of a migration from using RemoteDeviceProvider to
 // DeviceSyncClient and eventually to MultiDeviceSetupClient. Its constructor
-// accepts all three objects, but some may be null. (This is controlled at a
-// higher level by features::kMultiDeviceApi and
-// features::kEnableUnifiedMultiDeviceSetup.). Once Tether has been fully
-// migrated, RemoteDeviceProvider and eventually DeviceSyncClient will be ripped
-// out of this class. See https://crbug.com/848956.
+// accepts all three objects, but expects only of one of them to be valid, and
+// the others null. (This is controlled at a higher level by
+// features::kMultiDeviceApi and features::kEnableUnifiedMultiDeviceSetup.).
+// Once Tether has been fully migrated, RemoteDeviceProvider and eventually
+// DeviceSyncClient will be ripped out of this class. See
+// https://crbug.com/848956.
 class TetherHostFetcherImpl
     : public TetherHostFetcher,
       public cryptauth::RemoteDeviceProvider::Observer,
@@ -93,24 +94,9 @@
                             multidevice_setup_client_);
 
  private:
-  enum class TetherHostSource {
-    UNKNOWN,
-    MULTIDEVICE_SETUP_CLIENT,
-    DEVICE_SYNC_CLIENT,
-    REMOTE_DEVICE_PROVIDER
-  };
-
   void CacheCurrentTetherHosts();
   cryptauth::RemoteDeviceRefList GenerateHostDeviceList();
-  TetherHostSource GetTetherHostSourceBasedOnFlags();
-  // This returns true if there is no BETTER_TOGETHER_HOST supported or enabled,
-  // but there *are* MAGIC_TETHER_HOSTs supported or enabled. This can only
-  // happen if the user's phone has not yet fully updated to the new multidevice
-  // world.
-  // TODO(crbug.com/894585): Remove this legacy special case after M71.
-  bool IsInLegacyHostMode();
 
-  bool started_in_legacy_mode_ = false;
   cryptauth::RemoteDeviceProvider* remote_device_provider_;
   device_sync::DeviceSyncClient* device_sync_client_;
   chromeos::multidevice_setup::MultiDeviceSetupClient*
diff --git a/chromeos/components/tether/tether_host_fetcher_impl_unittest.cc b/chromeos/components/tether/tether_host_fetcher_impl_unittest.cc
index a0ff76a..ccbd10c 100644
--- a/chromeos/components/tether/tether_host_fetcher_impl_unittest.cc
+++ b/chromeos/components/tether/tether_host_fetcher_impl_unittest.cc
@@ -122,8 +122,7 @@
         tether_host_source == TetherHostSource::REMOTE_DEVICE_PROVIDER
             ? fake_remote_device_provider_.get()
             : nullptr,
-        tether_host_source == TetherHostSource::DEVICE_SYNC_CLIENT ||
-                tether_host_source == TetherHostSource::MULTIDEVICE_SETUP_CLIENT
+        tether_host_source == TetherHostSource::DEVICE_SYNC_CLIENT
             ? fake_device_sync_client_.get()
             : nullptr,
         tether_host_source == TetherHostSource::MULTIDEVICE_SETUP_CLIENT
@@ -176,9 +175,6 @@
     // Mark the first device enabled instead of supported.
     list[0].software_features[cryptauth::SoftwareFeature::MAGIC_TETHER_HOST] =
         cryptauth::SoftwareFeatureState::kEnabled;
-    list[0]
-        .software_features[cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST] =
-        cryptauth::SoftwareFeatureState::kEnabled;
 
     return list;
   }
@@ -263,17 +259,8 @@
     EXPECT_EQ(2u, test_observer_->num_updates());
   }
 
-  void TestSingleTetherHost(bool use_legacy_mode = false) {
+  void TestSingleTetherHost() {
     InitializeTest();
-    if (use_legacy_mode) {
-      test_remote_device_list_[0]
-          .software_features[cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST] =
-          cryptauth::SoftwareFeatureState::kNotSupported;
-      test_remote_device_ref_list_ =
-          CreateTestRemoteDeviceRefList(test_remote_device_list_);
-      SetSyncedDevices(test_remote_device_list_);
-      NotifyNewDevicesSynced();
-    }
 
     VerifySingleTetherHost(test_remote_device_ref_list_[0].GetDeviceId(),
                            test_remote_device_ref_list_[0]);
@@ -304,7 +291,7 @@
                            base::nullopt);
   }
 
-  void TestFetchAllTetherHosts(bool use_legacy_mode = false) {
+  void TestFetchAllTetherHosts() {
     InitializeTest();
 
     // Create a list of test devices, only some of which are valid tether hosts.
@@ -315,11 +302,6 @@
     test_remote_device_list_[4]
         .software_features[cryptauth::SoftwareFeature::MAGIC_TETHER_HOST] =
         cryptauth::SoftwareFeatureState::kNotSupported;
-    if (use_legacy_mode) {
-      test_remote_device_list_[0]
-          .software_features[cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST] =
-          cryptauth::SoftwareFeatureState::kNotSupported;
-    }
 
     SetSyncedDevices(test_remote_device_list_);
     NotifyNewDevicesSynced();
@@ -327,12 +309,9 @@
     cryptauth::RemoteDeviceRefList expected_host_device_list;
     switch (GetTetherHostSourceBasedOnFlags()) {
       case TetherHostSource::MULTIDEVICE_SETUP_CLIENT:
-        if (!use_legacy_mode) {
-          expected_host_device_list =
-              CreateTestRemoteDeviceRefList({test_remote_device_list_[0]});
-          break;
-        }
-        FALLTHROUGH;
+        expected_host_device_list =
+            CreateTestRemoteDeviceRefList({test_remote_device_list_[0]});
+        break;
       case TetherHostSource::DEVICE_SYNC_CLIENT:
       case TetherHostSource::REMOTE_DEVICE_PROVIDER:
         expected_host_device_list = CreateTestRemoteDeviceRefList(
@@ -395,11 +374,6 @@
   SetOnlyMultiDeviceApiFeatureEnabled();
   TestFetchAllTetherHosts();
 }
-TEST_F(TetherHostFetcherImplTest,
-       TestFetchAllTetherHosts_MultideviceApiAndSetupEnabledInLegacyMode) {
-  SetMultiDeviceApiAndSetupFeaturesEnabled();
-  TestFetchAllTetherHosts(true /* use_legacy_mode */);
-}
 
 // TestSingleTetherHost
 TEST_F(TetherHostFetcherImplTest, TestSingleTetherHost) {
@@ -415,11 +389,6 @@
   SetOnlyMultiDeviceApiFeatureEnabled();
   TestSingleTetherHost();
 }
-TEST_F(TetherHostFetcherImplTest,
-       TestSingleTetherHost_MultideviceApiAndSetupEnabledInLegacyMode) {
-  SetMultiDeviceApiAndSetupFeaturesEnabled();
-  TestSingleTetherHost(true /* use_legacy_mode */);
-}
 
 // TestSingleTetherHost_IdDoesNotCorrespondToDevice
 TEST_F(TetherHostFetcherImplTest,
diff --git a/chromeos/cryptohome/BUILD.gn b/chromeos/cryptohome/BUILD.gn
index 2597786..f38fb2b7 100644
--- a/chromeos/cryptohome/BUILD.gn
+++ b/chromeos/cryptohome/BUILD.gn
@@ -9,6 +9,7 @@
 assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
 
 source_set("cryptohome") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   deps = [
     "//base",
     "//chromeos:chromeos_export",
@@ -31,7 +32,6 @@
     "system_salt_getter.cc",
     "system_salt_getter.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("unit_tests") {
diff --git a/chromeos/dbus/BUILD.gn b/chromeos/dbus/BUILD.gn
index 2a3717c7..1792e43 100644
--- a/chromeos/dbus/BUILD.gn
+++ b/chromeos/dbus/BUILD.gn
@@ -9,6 +9,7 @@
 assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
 
 source_set("dbus") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   public_deps = [
     ":dbus_switches",
   ]
@@ -229,10 +230,10 @@
     "volume_state.cc",
     "volume_state.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("dbus_switches") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   deps = [
     "//base",
     "//chromeos:chromeos_export",
@@ -241,7 +242,6 @@
     "dbus_switches.cc",
     "dbus_switches.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("test_support") {
diff --git a/chromeos/dbus/power_policy_controller.cc b/chromeos/dbus/power_policy_controller.cc
index 634be59..94e59d88 100644
--- a/chromeos/dbus/power_policy_controller.cc
+++ b/chromeos/dbus/power_policy_controller.cc
@@ -108,6 +108,7 @@
       use_video_activity(true),
       ac_brightness_percent(-1.0),
       battery_brightness_percent(-1.0),
+      allow_wake_locks(true),
       allow_screen_wake_locks(true),
       enable_auto_screen_lock(false),
       presentation_screen_dim_delay_factor(1.0),
@@ -260,7 +261,9 @@
   prefs_policy_.set_force_nonzero_brightness_for_user_activity(
       values.force_nonzero_brightness_for_user_activity);
 
-  honor_screen_wake_locks_ = values.allow_screen_wake_locks;
+  honor_wake_locks_ = values.allow_wake_locks;
+  honor_screen_wake_locks_ =
+      honor_wake_locks_ && values.allow_screen_wake_locks;
 
   prefs_were_set_ = true;
   SendCurrentPolicy();
@@ -310,6 +313,7 @@
 PowerPolicyController::PowerPolicyController(PowerManagerClient* client)
     : client_(client),
       prefs_were_set_(false),
+      honor_wake_locks_(true),
       honor_screen_wake_locks_(true),
       next_wake_lock_id_(1),
       chrome_is_exiting_(false),
@@ -346,44 +350,47 @@
   if (prefs_were_set_)
     causes = kPrefsReason;
 
-  bool have_screen_wake_locks = false;
-  bool have_dim_wake_locks = false;
-  bool have_system_wake_locks = false;
-  for (const auto& it : wake_locks_) {
-    // Skip audio and video locks that should be ignored due to policy.
-    if (!IsWakeLockReasonHonored(it.second.reason, policy.use_audio_activity(),
-                                 policy.use_video_activity()))
-      continue;
+  if (honor_wake_locks_) {
+    bool have_screen_wake_locks = false;
+    bool have_dim_wake_locks = false;
+    bool have_system_wake_locks = false;
+    for (const auto& it : wake_locks_) {
+      // Skip audio and video locks that should be ignored due to policy.
+      if (!IsWakeLockReasonHonored(it.second.reason,
+                                   policy.use_audio_activity(),
+                                   policy.use_video_activity()))
+        continue;
 
-    switch (it.second.type) {
-      case WakeLock::TYPE_SCREEN:
-        have_screen_wake_locks = true;
-        break;
-      case WakeLock::TYPE_DIM:
-        have_dim_wake_locks = true;
-        break;
-      case WakeLock::TYPE_SYSTEM:
-        have_system_wake_locks = true;
-        break;
+      switch (it.second.type) {
+        case WakeLock::TYPE_SCREEN:
+          have_screen_wake_locks = true;
+          break;
+        case WakeLock::TYPE_DIM:
+          have_dim_wake_locks = true;
+          break;
+        case WakeLock::TYPE_SYSTEM:
+          have_system_wake_locks = true;
+          break;
+      }
+      causes += (causes.empty() ? "" : ", ") + it.second.description;
     }
-    causes += (causes.empty() ? "" : ", ") + it.second.description;
-  }
 
-  // Downgrade full-brightness and dimmed-brightness locks to system locks if
-  // wake locks aren't allowed to keep the screen on.
-  if (!honor_screen_wake_locks_ &&
-      (have_screen_wake_locks || have_dim_wake_locks)) {
-    have_system_wake_locks = true;
-    have_screen_wake_locks = false;
-    have_dim_wake_locks = false;
-  }
+    // Downgrade full-brightness and dimmed-brightness locks to system locks if
+    // wake locks aren't allowed to keep the screen on.
+    if (!honor_screen_wake_locks_ &&
+        (have_screen_wake_locks || have_dim_wake_locks)) {
+      have_system_wake_locks = true;
+      have_screen_wake_locks = false;
+      have_dim_wake_locks = false;
+    }
 
-  if (have_screen_wake_locks)
-    policy.set_screen_wake_lock(true);
-  if (have_dim_wake_locks)
-    policy.set_dim_wake_lock(true);
-  if (have_system_wake_locks)
-    policy.set_system_wake_lock(true);
+    if (have_screen_wake_locks)
+      policy.set_screen_wake_lock(true);
+    if (have_dim_wake_locks)
+      policy.set_dim_wake_lock(true);
+    if (have_system_wake_locks)
+      policy.set_system_wake_lock(true);
+  }
 
   if (encryption_migration_active_ &&
       policy.lid_closed_action() !=
diff --git a/chromeos/dbus/power_policy_controller.h b/chromeos/dbus/power_policy_controller.h
index 1c55d65..7c486b9 100644
--- a/chromeos/dbus/power_policy_controller.h
+++ b/chromeos/dbus/power_policy_controller.h
@@ -71,6 +71,7 @@
     bool use_video_activity;
     double ac_brightness_percent;
     double battery_brightness_percent;
+    bool allow_wake_locks;
     bool allow_screen_wake_locks;
     bool enable_auto_screen_lock;
     double presentation_screen_dim_delay_factor;
@@ -178,7 +179,11 @@
   // to details about the request.
   WakeLockMap wake_locks_;
 
-  // Should TYPE_SCREEN or TYPE_DIM entries in |wake_locks_| be honored?
+  // Should |wake_locks_| be honored?
+  bool honor_wake_locks_;
+
+  // If wake locks are honored, should TYPE_SCREEN or TYPE_DIM entries in
+  // |wake_locks_| be honored?
   // If false, screen wake locks are just treated as TYPE_SYSTEM instead.
   bool honor_screen_wake_locks_;
 
diff --git a/chromeos/dbus/power_policy_controller_unittest.cc b/chromeos/dbus/power_policy_controller_unittest.cc
index 547035f2..5a57c25 100644
--- a/chromeos/dbus/power_policy_controller_unittest.cc
+++ b/chromeos/dbus/power_policy_controller_unittest.cc
@@ -162,6 +162,18 @@
   EXPECT_EQ(PowerPolicyController::GetPolicyDebugString(expected_policy),
             PowerPolicyController::GetPolicyDebugString(
                 fake_power_client_->policy()));
+
+  // Set the "allow wake locks" pref to false and add a screen wake lock.
+  // It should be ignored.
+  prefs.allow_wake_locks = false;
+  policy_controller_->ApplyPrefs(prefs);
+  policy_controller_->AddScreenWakeLock(PowerPolicyController::REASON_OTHER,
+                                        "Screen");
+  expected_policy.clear_system_wake_lock();
+  expected_policy.set_reason(std::string(PowerPolicyController::kPrefsReason));
+  EXPECT_EQ(PowerPolicyController::GetPolicyDebugString(expected_policy),
+            PowerPolicyController::GetPolicyDebugString(
+                fake_power_client_->policy()));
 }
 
 TEST_F(PowerPolicyControllerTest, SystemWakeLock) {
diff --git a/chromeos/login/BUILD.gn b/chromeos/login/BUILD.gn
index 010211b..7aa4345 100644
--- a/chromeos/login/BUILD.gn
+++ b/chromeos/login/BUILD.gn
@@ -9,6 +9,7 @@
 assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
 
 source_set("login") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   public_deps = [
     ":challenge_response_key",
   ]
@@ -66,10 +67,10 @@
     "login_state.cc",
     "login_state.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("challenge_response_key") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   deps = [
     "//base",
     "//chromeos:chromeos_export",
@@ -78,7 +79,6 @@
     "auth/challenge_response_key.cc",
     "auth/challenge_response_key.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("unit_tests") {
diff --git a/chromeos/network/BUILD.gn b/chromeos/network/BUILD.gn
new file mode 100644
index 0000000..e879cf3
--- /dev/null
+++ b/chromeos/network/BUILD.gn
@@ -0,0 +1,225 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/chromeos/rules.gni")
+import("//testing/test.gni")
+import("//third_party/protobuf/proto_library.gni")
+
+assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
+
+source_set("network") {
+  configs += [ "//chromeos:chromeos_implementation" ]
+  deps = [
+    "//base",
+    "//base:i18n",
+    "//chromeos/dbus",
+    "//chromeos/login",
+    "//chromeos:chromeos_constants",
+    "//chromeos:chromeos_export",
+    "//chromeos:policy_certificate_provider",
+    "//chromeos:tools",
+    "//components/account_id",
+    "//components/device_event_log",
+    "//components/onc",
+    "//components/pref_registry",
+    "//components/prefs",
+    "//components/proxy_config",
+    "//components/url_formatter",
+    "//components/user_manager",
+    "//crypto",
+    "//dbus",
+    "//net",
+    "//skia",
+    "//url",
+  ]
+  sources = [
+    "auto_connect_handler.cc",
+    "auto_connect_handler.h",
+    "certificate_helper.cc",
+    "certificate_helper.h",
+    "certificate_pattern.cc",
+    "certificate_pattern.h",
+    "client_cert_resolver.cc",
+    "client_cert_resolver.h",
+    "client_cert_util.cc",
+    "client_cert_util.h",
+    "device_state.cc",
+    "device_state.h",
+    "dhcp_pac_file_fetcher_chromeos.cc",
+    "dhcp_pac_file_fetcher_chromeos.h",
+    "dhcp_pac_file_fetcher_factory_chromeos.cc",
+    "dhcp_pac_file_fetcher_factory_chromeos.h",
+    "firewall_hole.cc",
+    "firewall_hole.h",
+    "geolocation_handler.cc",
+    "geolocation_handler.h",
+    "host_resolver_impl_chromeos.cc",
+    "host_resolver_impl_chromeos.h",
+    "managed_network_configuration_handler.cc",
+    "managed_network_configuration_handler.h",
+    "managed_network_configuration_handler_impl.cc",
+    "managed_network_configuration_handler_impl.h",
+    "managed_state.cc",
+    "managed_state.h",
+    "network_activation_handler.cc",
+    "network_activation_handler.h",
+    "network_cert_loader.cc",
+    "network_cert_loader.h",
+    "network_cert_migrator.cc",
+    "network_cert_migrator.h",
+    "network_certificate_handler.cc",
+    "network_certificate_handler.h",
+    "network_change_notifier_chromeos.cc",
+    "network_change_notifier_chromeos.h",
+    "network_change_notifier_factory_chromeos.cc",
+    "network_change_notifier_factory_chromeos.h",
+    "network_configuration_handler.cc",
+    "network_configuration_handler.h",
+    "network_configuration_observer.h",
+    "network_connect.cc",
+    "network_connect.h",
+    "network_connection_handler.cc",
+    "network_connection_handler.h",
+    "network_connection_handler_impl.cc",
+    "network_connection_handler_impl.h",
+    "network_connection_observer.cc",
+    "network_connection_observer.h",
+    "network_device_handler.cc",
+    "network_device_handler.h",
+    "network_device_handler_impl.cc",
+    "network_device_handler_impl.h",
+    "network_event_log.h",
+    "network_handler.cc",
+    "network_handler.h",
+    "network_handler_callbacks.cc",
+    "network_handler_callbacks.h",
+    "network_ip_config.cc",
+    "network_ip_config.h",
+    "network_profile.cc",
+    "network_profile.h",
+    "network_profile_handler.cc",
+    "network_profile_handler.h",
+    "network_profile_observer.h",
+    "network_sms_handler.cc",
+    "network_sms_handler.h",
+    "network_state.cc",
+    "network_state.h",
+    "network_state_handler.cc",
+    "network_state_handler.h",
+    "network_state_handler_observer.cc",
+    "network_state_handler_observer.h",
+    "network_type_pattern.cc",
+    "network_type_pattern.h",
+    "network_ui_data.cc",
+    "network_ui_data.h",
+    "network_util.cc",
+    "network_util.h",
+    "onc/onc_certificate_importer.h",
+    "onc/onc_certificate_importer_impl.cc",
+    "onc/onc_certificate_importer_impl.h",
+    "onc/onc_mapper.cc",
+    "onc/onc_mapper.h",
+    "onc/onc_merger.cc",
+    "onc/onc_merger.h",
+    "onc/onc_normalizer.cc",
+    "onc/onc_normalizer.h",
+    "onc/onc_parsed_certificates.cc",
+    "onc/onc_parsed_certificates.h",
+    "onc/onc_signature.cc",
+    "onc/onc_signature.h",
+    "onc/onc_translation_tables.cc",
+    "onc/onc_translation_tables.h",
+    "onc/onc_translator.h",
+    "onc/onc_translator_onc_to_shill.cc",
+    "onc/onc_translator_shill_to_onc.cc",
+    "onc/onc_utils.cc",
+    "onc/onc_utils.h",
+    "onc/onc_validator.cc",
+    "onc/onc_validator.h",
+    "policy_applicator.cc",
+    "policy_applicator.h",
+    "policy_util.cc",
+    "policy_util.h",
+    "portal_detector/network_portal_detector.cc",
+    "portal_detector/network_portal_detector.h",
+    "portal_detector/network_portal_detector_strategy.cc",
+    "portal_detector/network_portal_detector_strategy.h",
+    "portal_detector/network_portal_detector_stub.cc",
+    "portal_detector/network_portal_detector_stub.h",
+    "prohibited_technologies_handler.cc",
+    "prohibited_technologies_handler.h",
+    "proxy/proxy_config_handler.cc",
+    "proxy/proxy_config_handler.h",
+    "proxy/proxy_config_service_impl.cc",
+    "proxy/proxy_config_service_impl.h",
+    "proxy/ui_proxy_config.cc",
+    "proxy/ui_proxy_config.h",
+    "proxy/ui_proxy_config_service.cc",
+    "proxy/ui_proxy_config_service.h",
+    "shill_property_handler.cc",
+    "shill_property_handler.h",
+    "shill_property_util.cc",
+    "shill_property_util.h",
+    "tether_constants.cc",
+    "tether_constants.h",
+  ]
+}
+
+source_set("unit_tests") {
+  testonly = true
+  deps = [
+    ":network",
+    "//base",
+    "//base/test:test_support",
+    "//base:i18n",
+    "//chromeos/dbus",
+    "//chromeos/login",
+    "//chromeos:chromeos_constants",
+    "//chromeos:policy_certificate_provider",
+    "//chromeos:test_support_source_set",
+    "//components/onc",
+    "//components/prefs",
+    "//components/prefs:test_support",
+    "//components/proxy_config",
+    "//crypto",
+    "//crypto:test_support",
+    "//dbus",
+    "//net",
+    "//net:test_support",
+    "//testing/gmock",
+    "//testing/gtest",
+  ]
+  sources = [
+    "auto_connect_handler_unittest.cc",
+    "certificate_helper_unittest.cc",
+    "client_cert_resolver_unittest.cc",
+    "firewall_hole_unittest.cc",
+    "geolocation_handler_unittest.cc",
+    "host_resolver_impl_chromeos_unittest.cc",
+    "managed_network_configuration_handler_unittest.cc",
+    "network_cert_loader_unittest.cc",
+    "network_cert_migrator_unittest.cc",
+    "network_change_notifier_chromeos_unittest.cc",
+    "network_configuration_handler_unittest.cc",
+    "network_connect_unittest.cc",
+    "network_connection_handler_impl_unittest.cc",
+    "network_device_handler_unittest.cc",
+    "network_sms_handler_unittest.cc",
+    "network_state_handler_unittest.cc",
+    "network_state_unittest.cc",
+    "network_type_pattern_unittest.cc",
+    "network_ui_data_unittest.cc",
+    "network_util_unittest.cc",
+    "onc/onc_certificate_importer_impl_unittest.cc",
+    "onc/onc_merger_unittest.cc",
+    "onc/onc_normalizer_unittest.cc",
+    "onc/onc_parsed_certificates_unittest.cc",
+    "onc/onc_translator_unittest.cc",
+    "onc/onc_utils_unittest.cc",
+    "onc/onc_validator_unittest.cc",
+    "prohibited_technologies_handler_unittest.cc",
+    "proxy/proxy_config_service_impl_unittest.cc",
+    "shill_property_handler_unittest.cc",
+  ]
+}
diff --git a/chromeos/settings/BUILD.gn b/chromeos/settings/BUILD.gn
index 599a8972..e07233c 100644
--- a/chromeos/settings/BUILD.gn
+++ b/chromeos/settings/BUILD.gn
@@ -9,6 +9,7 @@
 assert(is_chromeos, "Non-Chrome-OS builds must not depend on //chromeos")
 
 source_set("settings") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   public_deps = [
     ":cros_settings_names",
   ]
@@ -32,10 +33,10 @@
     "timezone_settings_helper.cc",
     "timezone_settings_helper.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("cros_settings_names") {
+  configs += [ "//chromeos:chromeos_implementation" ]
   deps = [
     "//chromeos:chromeos_export",
   ]
@@ -43,7 +44,6 @@
     "cros_settings_names.cc",
     "cros_settings_names.h",
   ]
-  defines = [ "CHROMEOS_IMPLEMENTATION" ]
 }
 
 source_set("unit_tests") {
diff --git a/chromeos/test/data/oobe_configuration/TestDemoModeAcceptArcTos.json b/chromeos/test/data/oobe_configuration/TestDemoModeAcceptArcTos.json
new file mode 100644
index 0000000..d60cf87
--- /dev/null
+++ b/chromeos/test/data/oobe_configuration/TestDemoModeAcceptArcTos.json
@@ -0,0 +1,8 @@
+{
+  "enableDemoMode": true,
+  "desc" : "Do not automatically proceed on Demo Preference screen so that we can set up test components correctly ",
+  "demoPreferencesNext": false,
+  "networkOfflineDemo": true,
+  "eulaAutoAccept": true,
+  "arcTosAutoAccept": true,
+}
\ No newline at end of file
diff --git a/chromeos/test/data/oobe_configuration/TestDemoModeAcceptEula.json b/chromeos/test/data/oobe_configuration/TestDemoModeAcceptEula.json
new file mode 100644
index 0000000..345174b
--- /dev/null
+++ b/chromeos/test/data/oobe_configuration/TestDemoModeAcceptEula.json
@@ -0,0 +1,6 @@
+{
+  "enableDemoMode": true,
+  "demoPreferencesNext": true,
+  "networkOfflineDemo": true,
+  "eulaAutoAccept": true,
+}
\ No newline at end of file
diff --git a/chromeos/test/data/oobe_configuration/TestDemoModeOfflineNetwork.json b/chromeos/test/data/oobe_configuration/TestDemoModeOfflineNetwork.json
new file mode 100644
index 0000000..4fa1e76
--- /dev/null
+++ b/chromeos/test/data/oobe_configuration/TestDemoModeOfflineNetwork.json
@@ -0,0 +1,5 @@
+{
+  "enableDemoMode": true,
+  "demoPreferencesNext": true,
+  "networkOfflineDemo": true,
+}
\ No newline at end of file
diff --git a/chromeos/test/data/oobe_configuration/TestDemoModePreferences.json b/chromeos/test/data/oobe_configuration/TestDemoModePreferences.json
new file mode 100644
index 0000000..fbd44e47
--- /dev/null
+++ b/chromeos/test/data/oobe_configuration/TestDemoModePreferences.json
@@ -0,0 +1,4 @@
+{
+  "enableDemoMode": true,
+  "demoPreferencesNext": true,
+}
\ No newline at end of file
diff --git a/chromeos/test/data/oobe_configuration/TestEnableDemoMode.json b/chromeos/test/data/oobe_configuration/TestEnableDemoMode.json
new file mode 100644
index 0000000..7ace28a
--- /dev/null
+++ b/chromeos/test/data/oobe_configuration/TestEnableDemoMode.json
@@ -0,0 +1,3 @@
+{
+  "enableDemoMode": true,
+}
\ No newline at end of file
diff --git a/components/assist_ranker/predictor_config_definitions.cc b/components/assist_ranker/predictor_config_definitions.cc
index e967f68..6939371 100644
--- a/components/assist_ranker/predictor_config_definitions.cc
+++ b/components/assist_ranker/predictor_config_definitions.cc
@@ -48,8 +48,12 @@
                                        "IsShortWord",
                                        "IsWordEdge",
                                        "OpenCount",
+                                       "OutcomeDocIdHighBits",
+                                       "OutcomeDocIdLowBits",
                                        "OutcomeRankerDidPredict",
                                        "OutcomeRankerPrediction",
+                                       "OutcomeSnippetHashHighBits",
+                                       "OutcomeSnippetHashLowBits",
                                        "OutcomeWasCardsDataShown",
                                        "OutcomeWasPanelOpened",
                                        "OutcomeWasQuickActionClicked",
diff --git a/components/autofill/core/browser/proto/server.proto b/components/autofill/core/browser/proto/server.proto
index 002f479..d0296985 100644
--- a/components/autofill/core/browser/proto/server.proto
+++ b/components/autofill/core/browser/proto/server.proto
@@ -179,7 +179,7 @@
 
 // This message contains information about the field types in a single form.
 // It is sent by the toolbar to contribute to the field type statistics.
-// Next available id: 35
+// Next available id: 36
 message AutofillUploadContents {
   required string client_version = 1;
   required fixed64 form_signature = 2;
@@ -284,9 +284,19 @@
     optional VoteType vote_type = 23;
 
     message AutofillTypeValiditiesPair {
+      // Type of the field, e.g. what type of personal data the user entered in
+      // that field before form submission. A list of all data types can be
+      // found in:
       required int32 type = 1;
+      // The validity of the type, which is determined based on the validity of
+      // the user's profile data. A list of all validity states can be found
+      // here: components/autofill/core/browser/field_types.h
+      // The validity state of a type is used to experiment if only using valid
+      // data would result in better predictions.
       repeated int32 validity = 2;
     }
+    // A list of possible types for the field with their corresponding validity
+    // states based on the user's data.
     repeated AutofillTypeValiditiesPair autofill_type_validities = 35;
   }
   // Signature of the form action host (e.g. Hash64Bit("example.com")).
diff --git a/components/autofill_assistant/OWNERS b/components/autofill_assistant/OWNERS
index 29f06a1d..4080607 100644
--- a/components/autofill_assistant/OWNERS
+++ b/components/autofill_assistant/OWNERS
@@ -1,4 +1,6 @@
 gogerald@chromium.org
+mcarlen@chromium.org
 rouslan@chromium.org
+szermatt@chromium.org
 
-# COMPONENT: UI>Browser>Autofill
\ No newline at end of file
+# COMPONENT: UI>Browser>Autofill
diff --git a/components/autofill_assistant/browser/actions/mock_action_delegate.h b/components/autofill_assistant/browser/actions/mock_action_delegate.h
index 8a8d885..346aff0 100644
--- a/components/autofill_assistant/browser/actions/mock_action_delegate.h
+++ b/components/autofill_assistant/browser/actions/mock_action_delegate.h
@@ -28,9 +28,6 @@
   MOCK_METHOD2(ClickElement,
                void(const std::vector<std::string>& selectors,
                     base::OnceCallback<void(bool)> callback));
-  MOCK_METHOD2(ElementExists,
-               void(const std::vector<std::string>& selectors,
-                    base::OnceCallback<void(bool)> callback));
 
   void ChooseAddress(
       base::OnceCallback<void(const std::string&)> callback) override {
diff --git a/components/autofill_assistant/browser/web_controller.cc b/components/autofill_assistant/browser/web_controller.cc
index 3f33390e..7cce4a38 100644
--- a/components/autofill_assistant/browser/web_controller.cc
+++ b/components/autofill_assistant/browser/web_controller.cc
@@ -113,9 +113,10 @@
 void WebController::ClickElement(const std::vector<std::string>& selectors,
                                  base::OnceCallback<void(bool)> callback) {
   DCHECK(!selectors.empty());
-  FindElement(selectors, base::BindOnce(&WebController::OnFindElementForClick,
-                                        weak_ptr_factory_.GetWeakPtr(),
-                                        std::move(callback)));
+  FindElement(
+      selectors, /* strict_mode= */ true,
+      base::BindOnce(&WebController::OnFindElementForClick,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
 
 void WebController::OnFindElementForClick(
@@ -218,9 +219,12 @@
 void WebController::ElementExists(const std::vector<std::string>& selectors,
                                   base::OnceCallback<void(bool)> callback) {
   DCHECK(!selectors.empty());
-  FindElement(selectors, base::BindOnce(&WebController::OnFindElementForExist,
-                                        weak_ptr_factory_.GetWeakPtr(),
-                                        std::move(callback)));
+  // We don't use strict_mode because we only check for the existence of an
+  // element and we don't act on it.
+  FindElement(
+      selectors, /* strict_mode= */ false,
+      base::BindOnce(&WebController::OnFindElementForExist,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
 
 void WebController::OnFindElementForExist(
@@ -230,15 +234,17 @@
 }
 
 void WebController::FindElement(const std::vector<std::string>& selectors,
+                                bool strict_mode,
                                 FindElementCallback callback) {
   devtools_client_->GetDOM()->Enable();
   devtools_client_->GetDOM()->GetDocument(base::BindOnce(
       &WebController::OnGetDocument, weak_ptr_factory_.GetWeakPtr(), selectors,
-      std::move(callback)));
+      strict_mode, std::move(callback)));
 }
 
 void WebController::OnGetDocument(
     const std::vector<std::string>& selectors,
+    bool strict_mode,
     FindElementCallback callback,
     std::unique_ptr<dom::GetDocumentResult> result) {
   std::unique_ptr<FindElementResult> element_result =
@@ -247,25 +253,29 @@
   element_result->container_frame_selector_index = 0;
   element_result->object_id = "";
   RecursiveFindElement(result->GetRoot()->GetNodeId(), 0, selectors,
-                       std::move(element_result), std::move(callback));
+                       strict_mode, std::move(element_result),
+                       std::move(callback));
 }
 
 void WebController::RecursiveFindElement(
     int node_id,
     size_t index,
     const std::vector<std::string>& selectors,
+    bool strict_mode,
     std::unique_ptr<FindElementResult> element_result,
     FindElementCallback callback) {
   devtools_client_->GetDOM()->QuerySelectorAll(
       node_id, selectors[index],
       base::BindOnce(&WebController::OnQuerySelectorAll,
                      weak_ptr_factory_.GetWeakPtr(), index, selectors,
-                     std::move(element_result), std::move(callback)));
+                     strict_mode, std::move(element_result),
+                     std::move(callback)));
 }
 
 void WebController::OnQuerySelectorAll(
     size_t index,
     const std::vector<std::string>& selectors,
+    bool strict_mode,
     std::unique_ptr<FindElementResult> element_result,
     FindElementCallback callback,
     std::unique_ptr<dom::QuerySelectorAllResult> result) {
@@ -274,7 +284,7 @@
     return;
   }
 
-  if (result->GetNodeIds()->size() != 1) {
+  if (strict_mode && result->GetNodeIds()->size() != 1) {
     DLOG(ERROR) << "Have " << result->GetNodeIds()->size()
                 << " elements exist.";
     std::move(callback).Run(std::move(element_result));
@@ -293,14 +303,17 @@
     return;
   }
 
+  // TODO(crbug.com/806868): Given than now result->GetNodeIds().size() can be
+  // greater than 1, we should fan-out and try all different nodes here instead
+  // of only the first.
   devtools_client_->GetDOM()->DescribeNode(
       dom::DescribeNodeParams::Builder()
           .SetNodeId(result->GetNodeIds()->front())
           .Build(),
-      base::BindOnce(&WebController::OnDescribeNode,
-                     weak_ptr_factory_.GetWeakPtr(),
-                     result->GetNodeIds()->front(), index, selectors,
-                     std::move(element_result), std::move(callback)));
+      base::BindOnce(
+          &WebController::OnDescribeNode, weak_ptr_factory_.GetWeakPtr(),
+          result->GetNodeIds()->front(), index, selectors, strict_mode,
+          std::move(element_result), std::move(callback)));
 }
 
 void WebController::OnResolveNode(
@@ -322,6 +335,7 @@
     int node_id,
     size_t index,
     const std::vector<std::string>& selectors,
+    bool strict_mode,
     std::unique_ptr<FindElementResult> element_result,
     FindElementCallback callback,
     std::unique_ptr<dom::DescribeNodeResult> result) {
@@ -383,12 +397,13 @@
                 .Build(),
             base::BindOnce(&WebController::OnPushNodesByBackendIds,
                            weak_ptr_factory_.GetWeakPtr(), index, selectors,
-                           std::move(element_result), std::move(callback)));
+                           strict_mode, std::move(element_result),
+                           std::move(callback)));
     return;
   }
 
-  RecursiveFindElement(node_id, ++index, selectors, std::move(element_result),
-                       std::move(callback));
+  RecursiveFindElement(node_id, ++index, selectors, strict_mode,
+                       std::move(element_result), std::move(callback));
 }
 
 content::RenderFrameHost* WebController::FindCorrespondingRenderFrameHost(
@@ -409,12 +424,14 @@
 void WebController::OnPushNodesByBackendIds(
     size_t index,
     const std::vector<std::string>& selectors,
+    bool strict_mode,
     std::unique_ptr<FindElementResult> element_result,
     FindElementCallback callback,
     std::unique_ptr<dom::PushNodesByBackendIdsToFrontendResult> result) {
   DCHECK(result->GetNodeIds()->size() == 1);
   RecursiveFindElement(result->GetNodeIds()->front(), ++index, selectors,
-                       std::move(element_result), std::move(callback));
+                       strict_mode, std::move(element_result),
+                       std::move(callback));
 }
 
 void WebController::OnResult(bool result,
@@ -474,6 +491,7 @@
   auto data_to_autofill = std::make_unique<FillFormInputData>();
   data_to_autofill->autofill_data_guid = guid;
   FindElement(selectors,
+              /* strict_mode= */ true,
               base::BindOnce(&WebController::OnFindElementForFillingForm,
                              weak_ptr_factory_.GetWeakPtr(),
                              std::move(data_to_autofill), selectors,
@@ -545,6 +563,7 @@
   data_to_autofill->card = std::move(card);
   data_to_autofill->cvc = cvc;
   FindElement(selectors,
+              /* strict_mode= */ true,
               base::BindOnce(&WebController::OnFindElementForFillingForm,
                              weak_ptr_factory_.GetWeakPtr(),
                              std::move(data_to_autofill), selectors,
@@ -555,6 +574,7 @@
                                  const std::string& selected_option,
                                  base::OnceCallback<void(bool)> callback) {
   FindElement(selectors,
+              /* strict_mode= */ true,
               base::BindOnce(&WebController::OnFindElementForSelectOption,
                              weak_ptr_factory_.GetWeakPtr(), selected_option,
                              std::move(callback)));
@@ -607,6 +627,7 @@
                                      base::OnceCallback<void(bool)> callback) {
   FindElement(
       selectors,
+      /* strict_mode= */ true,
       base::BindOnce(&WebController::OnFindElementForHighlightElement,
                      weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
@@ -655,6 +676,7 @@
   DCHECK(!selectors.empty());
   FindElement(
       selectors,
+      /* strict_mode= */ true,
       base::BindOnce(&WebController::OnFindElementForFocusElement,
                      weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
@@ -664,6 +686,7 @@
     base::OnceCallback<void(bool, const std::string&)> callback) {
   FindElement(
       selectors,
+      /* strict_mode= */ true,
       base::BindOnce(&WebController::OnFindElementForGetFieldValue,
                      weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
@@ -707,6 +730,7 @@
                                   const std::string& value,
                                   base::OnceCallback<void(bool)> callback) {
   FindElement(selectors,
+              /* strict_mode= */ true,
               base::BindOnce(&WebController::OnFindElementForSetFieldValue,
                              weak_ptr_factory_.GetWeakPtr(), value,
                              std::move(callback)));
@@ -750,6 +774,7 @@
     base::OnceCallback<void(bool, const std::string&)> callback) {
   FindElement(
       selectors,
+      /* strict_mode= */ true,
       base::BindOnce(&WebController::OnFindElementForGetOuterHtml,
                      weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
 }
diff --git a/components/autofill_assistant/browser/web_controller.h b/components/autofill_assistant/browser/web_controller.h
index bd3379c..33991ec 100644
--- a/components/autofill_assistant/browser/web_controller.h
+++ b/components/autofill_assistant/browser/web_controller.h
@@ -67,7 +67,8 @@
   virtual void ClickElement(const std::vector<std::string>& selectors,
                             base::OnceCallback<void(bool)> callback);
 
-  // Check whether the element given by |selectors| exists on the web page.
+  // Check whether at least one element given by |selectors| exists on the web
+  // page.
   virtual void ElementExists(const std::vector<std::string>& selectors,
                              base::OnceCallback<void(bool)> callback);
 
@@ -169,18 +170,26 @@
       std::unique_ptr<input::DispatchMouseEventResult> result);
   void OnFindElementForExist(base::OnceCallback<void(bool)> callback,
                              std::unique_ptr<FindElementResult> result);
+
+  // Find the element given by |selectors|. If multiple elements match
+  // |selectors| and if |strict_mode| is false, return the first one that is
+  // found. Otherwise if |strict-mode| is true, do not return any.
   void FindElement(const std::vector<std::string>& selectors,
+                   bool strict_mode,
                    FindElementCallback callback);
   void OnGetDocument(const std::vector<std::string>& selectors,
+                     bool strict_mode,
                      FindElementCallback callback,
                      std::unique_ptr<dom::GetDocumentResult> result);
   void RecursiveFindElement(int node_id,
                             size_t index,
                             const std::vector<std::string>& selectors,
+                            bool strict_mode,
                             std::unique_ptr<FindElementResult> element_result,
                             FindElementCallback callback);
   void OnQuerySelectorAll(size_t index,
                           const std::vector<std::string>& selectors,
+                          bool strict_mode,
                           std::unique_ptr<FindElementResult> element_result,
                           FindElementCallback callback,
                           std::unique_ptr<dom::QuerySelectorAllResult> result);
@@ -190,6 +199,7 @@
   void OnDescribeNode(int node_id,
                       size_t index,
                       const std::vector<std::string>& selectors,
+                      bool strict_mode,
                       std::unique_ptr<FindElementResult> element_result,
                       FindElementCallback callback,
                       std::unique_ptr<dom::DescribeNodeResult> result);
@@ -199,6 +209,7 @@
   void OnPushNodesByBackendIds(
       size_t index,
       const std::vector<std::string>& selectors,
+      bool strict_mode,
       std::unique_ptr<FindElementResult> element_result,
       FindElementCallback callback,
       std::unique_ptr<dom::PushNodesByBackendIdsToFrontendResult> result);
diff --git a/components/autofill_assistant/browser/web_controller_browsertest.cc b/components/autofill_assistant/browser/web_controller_browsertest.cc
index 80b9165c..22593e9 100644
--- a/components/autofill_assistant/browser/web_controller_browsertest.cc
+++ b/components/autofill_assistant/browser/web_controller_browsertest.cc
@@ -71,9 +71,9 @@
     base::RunLoop run_loop;
     web_controller_->ElementExists(
         selectors,
-        base::BindOnce(
-            &WebControllerBrowserTest::OnWaitForElementRemove,
-            base::Unretained(this), run_loop.QuitClosure(), selectors));
+        base::BindOnce(&WebControllerBrowserTest::OnWaitForElementRemove,
+                       base::Unretained(this), run_loop.QuitClosure(),
+                       selectors));
     run_loop.Run();
   }
 
@@ -167,6 +167,7 @@
     base::RunLoop run_loop;
     web_controller_->FindElement(
         selectors,
+        /* strict_mode= */ true,
         base::BindOnce(&WebControllerBrowserTest::OnFindElement,
                        base::Unretained(this), run_loop.QuitClosure(),
                        expected_index, is_main_frame));
diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp
index 556f9cbe..ce97e1e8 100644
--- a/components/autofill_strings.grdp
+++ b/components/autofill_strings.grdp
@@ -440,7 +440,7 @@
     Includes information like phone numbers, email addresses, and shipping addresses
   </message>
   <message name="IDS_AUTOFILL_ENABLE_CREDIT_CARDS_TOGGLE_SUBLABEL" desc="Sublabel for a toggle that allows users to control whether credit cards should be saved and forms should be autofilled with it." formatter_data="android_java">
-    Makes it faster to pay for things online
+    Fills in payment forms with your saved payment methods
   </message>
   <if expr="not is_ios">
     <then>
diff --git a/components/browser_sync/BUILD.gn b/components/browser_sync/BUILD.gn
index fa0d494..d7ea5aad 100644
--- a/components/browser_sync/BUILD.gn
+++ b/components/browser_sync/BUILD.gn
@@ -134,6 +134,7 @@
     "//google_apis",
     "//net:test_support",
     "//services/identity/public/cpp",
+    "//services/identity/public/cpp:test_support",
     "//services/network:test_support",
     "//services/network/public/cpp",
     "//testing/gmock",
diff --git a/components/browser_sync/abstract_profile_sync_service_test.cc b/components/browser_sync/abstract_profile_sync_service_test.cc
index 1552562..2f277b0 100644
--- a/components/browser_sync/abstract_profile_sync_service_test.cc
+++ b/components/browser_sync/abstract_profile_sync_service_test.cc
@@ -20,7 +20,6 @@
 #include "components/sync/engine/test_engine_components_factory.h"
 #include "components/sync/protocol/sync.pb.h"
 #include "components/sync/syncable/test_user_share.h"
-#include "google_apis/gaia/gaia_constants.h"
 #include "services/network/test/test_network_connection_tracker.h"
 
 using syncer::SyncBackendHostImpl;
@@ -85,7 +84,6 @@
           network::TestNetworkConnectionTracker::GetInstance());
   params.credentials.email = "testuser@gmail.com";
   params.credentials.sync_token = "token";
-  params.credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
   params.restored_key_for_bootstrapping.clear();
 
   // It'd be nice if we avoided creating the EngineComponentsFactory in the
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index f837eaf..a3afd40a 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -197,6 +197,7 @@
           std::make_unique<syncer::HttpBridgeNetworkResources>()),
       start_behavior_(init_params.start_behavior),
       passphrase_prompt_triggered_by_version_(false),
+      sync_allowed_by_platform_(true),
       sync_enabled_weak_factory_(this),
       weak_factory_(this) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -1526,10 +1527,10 @@
   return engine_ && engine_->IsCryptographerReady(trans);
 }
 
-void ProfileSyncService::SetPlatformSyncAllowedProvider(
-    const PlatformSyncAllowedProvider& platform_sync_allowed_provider) {
+void ProfileSyncService::SetSyncAllowedByPlatform(bool allowed) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  platform_sync_allowed_provider_ = platform_sync_allowed_provider;
+  sync_allowed_by_platform_ = allowed;
+  // TODO(crbug.com/867901): Start or stop Sync as needed here.
 }
 
 void ProfileSyncService::ConfigureDataTypeManager(
@@ -2023,8 +2024,7 @@
 
 bool ProfileSyncService::IsSyncAllowedByPlatform() const {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  return platform_sync_allowed_provider_.is_null() ||
-         platform_sync_allowed_provider_.Run();
+  return sync_allowed_by_platform_;
 }
 
 void ProfileSyncService::RequestStop(SyncStopDataFate data_fate) {
diff --git a/components/browser_sync/profile_sync_service.h b/components/browser_sync/profile_sync_service.h
index c49bd41..99062d5 100644
--- a/components/browser_sync/profile_sync_service.h
+++ b/components/browser_sync/profile_sync_service.h
@@ -160,7 +160,6 @@
                            public syncer::UnrecoverableErrorHandler,
                            public GaiaCookieManagerService::Observer {
  public:
-  using PlatformSyncAllowedProvider = base::RepeatingCallback<bool()>;
   using SigninScopedDeviceIdCallback = base::RepeatingCallback<std::string()>;
 
   // NOTE: Used in a UMA histogram, do not reorder etc.
@@ -456,9 +455,8 @@
   // SyncPrefs. Will return the empty string if no bootstrap token exists.
   std::string GetCustomPassphraseKey() const;
 
-  // Set the provider for whether sync is currently allowed by the platform.
-  void SetPlatformSyncAllowedProvider(
-      const PlatformSyncAllowedProvider& platform_sync_allowed_provider);
+  // Set whether sync is currently allowed by the platform.
+  void SetSyncAllowedByPlatform(bool allowed);
 
   // Sometimes we need to wait for tasks on the sync thread in tests.
   base::MessageLoop* GetSyncLoopForTest() const;
@@ -754,9 +752,8 @@
   // IsPassphrasePrompted sync preference.
   bool passphrase_prompt_triggered_by_version_;
 
-  // An object that lets us check whether sync is currently allowed on this
-  // platform.
-  PlatformSyncAllowedProvider platform_sync_allowed_provider_;
+  // Whether sync is currently allowed on this platform.
+  bool sync_allowed_by_platform_;
 
   // This weak factory invalidates its issued pointers when Sync is disabled.
   base::WeakPtrFactory<ProfileSyncService> sync_enabled_weak_factory_;
diff --git a/components/browser_sync/profile_sync_service_autofill_unittest.cc b/components/browser_sync/profile_sync_service_autofill_unittest.cc
index 84bfc96..e6c1726 100644
--- a/components/browser_sync/profile_sync_service_autofill_unittest.cc
+++ b/components/browser_sync/profile_sync_service_autofill_unittest.cc
@@ -426,11 +426,9 @@
   }
 
   void StartAutofillProfileSyncService(base::OnceClosure callback) {
-    identity::MakePrimaryAccountAvailable(
-        profile_sync_service_bundle()->signin_manager(),
-        profile_sync_service_bundle()->auth_service(),
-        profile_sync_service_bundle()->identity_manager(),
-        "test_user@gmail.com");
+    profile_sync_service_bundle()
+        ->identity_test_env()
+        ->MakePrimaryAccountAvailable("test_user@gmail.com");
     CreateSyncService(std::move(sync_client_owned_), std::move(callback));
 
     EXPECT_CALL(*profile_sync_service_bundle()->component_factory(),
diff --git a/components/browser_sync/profile_sync_test_util.cc b/components/browser_sync/profile_sync_test_util.cc
index 9e72b16..adbb202 100644
--- a/components/browser_sync/profile_sync_test_util.cc
+++ b/components/browser_sync/profile_sync_test_util.cc
@@ -244,10 +244,10 @@
       gaia_cookie_manager_service_(&auth_service_,
                                    "profile_sync_service_bundle",
                                    &signin_client_),
-      identity_manager_(&signin_manager_,
-                        &auth_service_,
-                        &account_tracker_,
-                        &gaia_cookie_manager_service_) {
+      identity_test_env_(&account_tracker_,
+                         &auth_service_,
+                         &signin_manager_,
+                         &gaia_cookie_manager_service_) {
   RegisterPrefsForProfileSyncService(pref_service_.registry());
   auth_service_.set_auto_post_fetch_response_on_message_loop(true);
   account_tracker_.Initialize(&pref_service_, base::FilePath());
diff --git a/components/browser_sync/profile_sync_test_util.h b/components/browser_sync/profile_sync_test_util.h
index 37915d6..40764de 100644
--- a/components/browser_sync/profile_sync_test_util.h
+++ b/components/browser_sync/profile_sync_test_util.h
@@ -22,7 +22,7 @@
 #include "components/sync/driver/sync_api_component_factory_mock.h"
 #include "components/sync/model/test_model_type_store_service.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
-#include "services/identity/public/cpp/identity_manager.h"
+#include "services/identity/public/cpp/identity_test_environment.h"
 #include "services/network/test/test_url_loader_factory.h"
 
 namespace history {
@@ -131,7 +131,13 @@
 
   FakeSigninManagerType* signin_manager() { return &signin_manager_; }
 
-  identity::IdentityManager* identity_manager() { return &identity_manager_; }
+  identity::IdentityTestEnvironment* identity_test_env() {
+    return &identity_test_env_;
+  }
+
+  identity::IdentityManager* identity_manager() {
+    return identity_test_env_.identity_manager();
+  }
 
   AccountTrackerService* account_tracker() { return &account_tracker_; }
 
@@ -163,7 +169,7 @@
   FakeSigninManagerType signin_manager_;
   FakeProfileOAuth2TokenService auth_service_;
   FakeGaiaCookieManagerService gaia_cookie_manager_service_;
-  identity::IdentityManager identity_manager_;
+  identity::IdentityTestEnvironment identity_test_env_;
   testing::NiceMock<syncer::SyncApiComponentFactoryMock> component_factory_;
   std::unique_ptr<invalidation::ProfileIdentityProvider> identity_provider_;
   invalidation::FakeInvalidationService fake_invalidation_service_;
diff --git a/components/browser_sync/sync_auth_manager.cc b/components/browser_sync/sync_auth_manager.cc
index d0bedf0..42aa561c 100644
--- a/components/browser_sync/sync_auth_manager.cc
+++ b/components/browser_sync/sync_auth_manager.cc
@@ -117,6 +117,7 @@
   DCHECK(partial_token_status_.next_token_request_time.is_null());
 
   syncer::SyncTokenStatus token_status = partial_token_status_;
+  token_status.has_token = !access_token_.empty();
   if (request_access_token_retry_timer_.IsRunning()) {
     base::TimeDelta delta =
         request_access_token_retry_timer_.desired_run_time() -
@@ -135,7 +136,6 @@
   credentials.account_id = account_info.account_id;
   credentials.email = account_info.email;
   credentials.sync_token = access_token_;
-  credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
 
   return credentials;
 }
diff --git a/components/browser_sync/sync_auth_manager.h b/components/browser_sync/sync_auth_manager.h
index 4cc43ec..36458be 100644
--- a/components/browser_sync/sync_auth_manager.h
+++ b/components/browser_sync/sync_auth_manager.h
@@ -180,7 +180,7 @@
 
   // Info about the state of our access token, for display in the internals UI.
   // "Partial" because this instance is not fully populated - in particular,
-  // |next_token_request_time| gets computed on demand.
+  // |have_token| and |next_token_request_time| get computed on demand.
   syncer::SyncTokenStatus partial_token_status_;
 
   base::WeakPtrFactory<SyncAuthManager> weak_ptr_factory_;
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
index 1cc5496..325533c5 100644
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -15,7 +15,6 @@
 #include "components/content_settings/core/browser/content_settings_utils.h"
 #include "components/content_settings/core/browser/website_settings_registry.h"
 #include "components/content_settings/core/common/content_settings.h"
-#include "components/content_settings/core/common/features.h"
 
 namespace content_settings {
 
@@ -150,19 +149,17 @@
            ContentSettingsInfo::INHERIT_IN_INCOGNITO,
            ContentSettingsInfo::PERSISTENT);
 
-  Register(
-      CONTENT_SETTINGS_TYPE_PLUGINS, "plugins",
-      CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, WebsiteSettingsInfo::SYNCABLE,
-      WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
-      ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
-                    CONTENT_SETTING_ASK,
-                    CONTENT_SETTING_DETECT_IMPORTANT_CONTENT),
-      WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
-      WebsiteSettingsRegistry::DESKTOP,
-      ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE,
-      base::FeatureList::IsEnabled(features::kEnableEphemeralFlashPermission)
-          ? ContentSettingsInfo::EPHEMERAL
-          : ContentSettingsInfo::PERSISTENT);
+  Register(CONTENT_SETTINGS_TYPE_PLUGINS, "plugins",
+           CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
+           WebsiteSettingsInfo::SYNCABLE,
+           WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
+           ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
+                         CONTENT_SETTING_ASK,
+                         CONTENT_SETTING_DETECT_IMPORTANT_CONTENT),
+           WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
+           WebsiteSettingsRegistry::DESKTOP,
+           ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE,
+           ContentSettingsInfo::EPHEMERAL);
 
   Register(CONTENT_SETTINGS_TYPE_POPUPS, "popups", CONTENT_SETTING_BLOCK,
            WebsiteSettingsInfo::SYNCABLE,
diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
index c131561..604539c 100644
--- a/components/content_settings/core/browser/host_content_settings_map.cc
+++ b/components/content_settings/core/browser/host_content_settings_map.cc
@@ -35,7 +35,6 @@
 #include "components/content_settings/core/browser/website_settings_registry.h"
 #include "components/content_settings/core/common/content_settings_pattern.h"
 #include "components/content_settings/core/common/content_settings_utils.h"
-#include "components/content_settings/core/common/features.h"
 #include "components/content_settings/core/common/pref_names.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/prefs/pref_service.h"
@@ -533,9 +532,7 @@
 
   // Record stats on Flash permission grants with ephemeral storage.
   if (content_type == CONTENT_SETTINGS_TYPE_PLUGINS &&
-      setting == CONTENT_SETTING_ALLOW &&
-      base::FeatureList::IsEnabled(
-          content_settings::features::kEnableEphemeralFlashPermission)) {
+      setting == CONTENT_SETTING_ALLOW) {
     GURL url(primary_pattern.ToString());
     ContentSettingsPattern temp_patterns[2];
     std::unique_ptr<base::Value> value(GetContentSettingValueAndPatterns(
diff --git a/components/content_settings/core/browser/website_settings_registry.cc b/components/content_settings/core/browser/website_settings_registry.cc
index 8d22b75..c3be04ad 100644
--- a/components/content_settings/core/browser/website_settings_registry.cc
+++ b/components/content_settings/core/browser/website_settings_registry.cc
@@ -10,7 +10,6 @@
 #include "base/memory/ptr_util.h"
 #include "build/build_config.h"
 #include "components/content_settings/core/common/content_settings.h"
-#include "components/content_settings/core/common/features.h"
 
 namespace {
 
@@ -181,17 +180,13 @@
            WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
            DESKTOP | PLATFORM_ANDROID,
            WebsiteSettingsInfo::DONT_INHERIT_IN_INCOGNITO);
-  Register(
-      CONTENT_SETTINGS_TYPE_PLUGINS_DATA, "flash-data", nullptr,
-      // To counteract the reduced usability of the Flash permission
-      // when it becomes ephemeral, we sync the bit indicating that
-      // the Flash permission should be displayed in the page info.
-      base::FeatureList::IsEnabled(features::kEnableEphemeralFlashPermission)
-          ? WebsiteSettingsInfo::SYNCABLE
-          : WebsiteSettingsInfo::UNSYNCABLE,
-      WebsiteSettingsInfo::NOT_LOSSY,
-      WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
-      DESKTOP, WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
+  // To counteract the reduced usability of the Flash permission when it becomes
+  // ephemeral, we sync the bit indicating that the Flash permission should be
+  // displayed in the page info.
+  Register(CONTENT_SETTINGS_TYPE_PLUGINS_DATA, "flash-data", nullptr,
+           WebsiteSettingsInfo::SYNCABLE, WebsiteSettingsInfo::NOT_LOSSY,
+           WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
+           DESKTOP, WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
 }
 
 }  // namespace content_settings
diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn
index f396acdb2..d838eea 100644
--- a/components/content_settings/core/common/BUILD.gn
+++ b/components/content_settings/core/common/BUILD.gn
@@ -18,8 +18,6 @@
     "content_settings_utils.h",
     "cookie_settings_base.cc",
     "cookie_settings_base.h",
-    "features.cc",
-    "features.h",
     "pref_names.cc",
     "pref_names.h",
   ]
diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc
deleted file mode 100644
index e372175f..0000000
--- a/components/content_settings/core/common/features.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defines all the public base::FeatureList features for the chrome
-// module.
-
-#include "components/content_settings/core/common/features.h"
-
-namespace content_settings {
-namespace features {
-
-// Makes Flash plugin permissions persistent only through the current session.
-const base::Feature kEnableEphemeralFlashPermission{
-    "EnableEphemeralFlashPermission", base::FEATURE_ENABLED_BY_DEFAULT};
-
-}  // namespace features
-}  // namespace content_settings
diff --git a/components/content_settings/core/common/features.h b/components/content_settings/core/common/features.h
deleted file mode 100644
index ac2bafd2..0000000
--- a/components/content_settings/core/common/features.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defines all the public base::FeatureList features for the chrome
-// module.
-
-#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_FEATURES_H_
-#define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_FEATURES_H_
-
-#include "base/feature_list.h"
-
-namespace content_settings {
-namespace features {
-
-extern const base::Feature kEnableEphemeralFlashPermission;
-
-}  // namespace features
-}  // namespace content_settings
-
-#endif  // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_FEATURES_H_
diff --git a/components/cronet/BUILD.gn b/components/cronet/BUILD.gn
index 62f209d..bd66714 100644
--- a/components/cronet/BUILD.gn
+++ b/components/cronet/BUILD.gn
@@ -116,7 +116,13 @@
     }
   }
 
+  _cronet_shared_lib_name = "cronet.$chrome_version_full"
+  _cronet_shared_lib_file_name =
+      "$shlib_prefix$_cronet_shared_lib_name$shlib_extension"
+
   shared_library("cronet") {
+    output_name = _cronet_shared_lib_name
+
     deps = [
       "//base",
       "//components/cronet:cronet_common",
@@ -131,7 +137,7 @@
     if (is_mac && !is_component_build) {
       ldflags = [
         "-install_name",
-        "@rpath/lib${target_name}.dylib",
+        "@rpath/$_cronet_shared_lib_file_name",
       ]
       public_configs = [ ":shared_library_public_config" ]
     }
@@ -201,28 +207,16 @@
   # Copy boiler-plate files into the package.
   copy("cronet_package_copy") {
     sources = [
+      "$root_out_dir/$_cronet_shared_lib_file_name",
       "//AUTHORS",
       "//chrome/VERSION",
     ]
-
-    outputs = [
-      "$_package_dir/{{source_file_part}}",
-    ]
-  }
-
-  # Copy shared library adding the version to the file name.
-  copy("cronet_package_shlib") {
-    sources = [
-      "$root_out_dir/${shlib_prefix}cronet${shlib_extension}",
-    ]
-
-    outputs = [
-      "$_package_dir/${shlib_prefix}cronet.${chrome_version_full}${shlib_extension}",
-    ]
-
     deps = [
       ":cronet",
     ]
+    outputs = [
+      "$_package_dir/{{source_file_part}}",
+    ]
   }
 
   # Copy headers.
@@ -238,7 +232,6 @@
     deps = [
       ":cronet_package_copy",
       ":cronet_package_headers",
-      ":cronet_package_shlib",
       ":generate_license",
     ]
   }
diff --git a/components/cronet/tools/cr_cronet.py b/components/cronet/tools/cr_cronet.py
index e85d4b4..3d9d822 100755
--- a/components/cronet/tools/cr_cronet.py
+++ b/components/cronet/tools/cr_cronet.py
@@ -60,6 +60,34 @@
   return run('adb logcat -d | CHROMIUM_OUTPUT_DIR=' + out_dir +
           ' third_party/android_platform/development/scripts/stack')
 
+
+def use_goma:
+  home_goma = os.path.expanduser("~/goma")
+  if os.path.exists(home_goma) or os.environ.get("GOMA_DIR") or \
+     os.environ.get("GOMADIR"):
+    return 'use_goma=true '
+  return ''
+
+def gn_args(target_os, is_release):
+  gn_args = 'target_os="' + target_os + '" enable_websockets=false '+ \
+      'disable_file_support=true disable_ftp_support=true '+ \
+      'disable_brotli_filter=false ' + \
+      'is_component_build=false ' + \
+      'use_crash_key_stubs=true ' + \
+      'ignore_elf32_limitations=true use_partition_alloc=false ' + \
+      'include_transport_security_state_preload_list=false ' + use_goma()
+  if (is_release):
+    gn_args += 'is_debug=false is_official_build=true '
+  return gn_args
+
+
+def gn_args_mac(is_release):
+  return gn_args('mac', is_release) + \
+      'disable_histogram_support=true ' + \
+      'use_platform_icu_alternatives=false ' + \
+      'enable_dsyms=true '
+
+
 def main():
   parser = argparse.ArgumentParser()
   parser.add_argument('command',
@@ -75,8 +103,6 @@
                                'stack',
                                'debug',
                                'build-debug'])
-  parser.add_argument('-g', '--gn', action='store_true',
-                      help='use gn output directory suffix')
   parser.add_argument('-d', '--out_dir', action='store',
                       help='name of the build directory')
   parser.add_argument('-i', '--iphoneos', action='store_true',
@@ -127,22 +153,13 @@
       gn_args += 'is_asan=true is_clang=true is_debug=false '
       out_dir_suffix += '-asan'
 
-  gn_args += 'target_os="' + target_os + '" enable_websockets=false '+ \
-      'disable_file_support=true disable_ftp_support=true '+ \
-      'disable_brotli_filter=false ' + \
-      'use_platform_icu_alternatives=true '+ \
-      'is_component_build=false ' + \
-      'use_crash_key_stubs=true ' + \
-      'ignore_elf32_limitations=true use_partition_alloc=false ' + \
-      'include_transport_security_state_preload_list=false '
+  gn_args += gn_args(target_os, options.release) + \
+      'use_platform_icu_alternatives=true '
 
   extra_options = ' '.join(extra_options_list)
-  if options.gn:
-    out_dir_suffix += "-gn"
 
   if options.release:
     out_dir = 'out/Release' + out_dir_suffix
-    gn_args += 'is_debug=false is_official_build=true '
   else:
     out_dir = 'out/Debug' + out_dir_suffix
 
diff --git a/components/cronet/tools/package_mac.py b/components/cronet/tools/package_mac.py
new file mode 100755
index 0000000..c2bb2881c
--- /dev/null
+++ b/components/cronet/tools/package_mac.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+package_mac.py - Build and Package Release and Debug libraries for Mac OS X.
+"""
+
+import argparse
+import cr_cronet
+import glob
+import os
+import shutil
+import sys
+
+
+def package_mac(out_dir, gn_args, build_config):
+  target_dir = out_dir + '/' + build_config
+  build_dir = "out/build_temp/" + build_config
+  print 'Generating Ninja ' + gn_args
+  gn_result = cr_cronet.run('gn gen %s --args=\'%s\'' % (build_dir, gn_args))
+  if gn_result != 0:
+    return gn_result
+
+  print 'Building ' + build_dir
+  build_result = cr_cronet.run('ninja -C %s cronet_package -j200' % build_dir)
+  if build_result != 0:
+    return build_result
+
+  print 'Copying to ' + target_dir
+  if (not os.path.exists(out_dir)):
+    shutil.copytree(build_dir + "/cronet", out_dir,
+                    ignore=shutil.ignore_patterns('libcronet*'))
+  os.mkdir(target_dir)
+  for libcronet in glob.glob(build_dir + "/cronet/libcronet*"):
+    shutil.copy(libcronet, target_dir)
+
+
+def main():
+  parser = argparse.ArgumentParser()
+  parser.add_argument('out_dir', help='path to output directory')
+  options, _ = parser.parse_known_args()
+
+  out_dir = options.out_dir
+
+  # Make sure that the output directory does not exist
+  if os.path.exists(out_dir):
+    print >>sys.stderr, 'The output directory already exists: ' + out_dir
+    return 1
+
+  return package_mac(out_dir, cr_cronet.gn_args_mac(True), "opt") or \
+         package_mac(out_dir, cr_cronet.gn_args_mac(False), "dbg")
+
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
index 09a7dc2..c67bb400 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
@@ -124,7 +124,7 @@
     DataReductionProxyInterceptor* interceptor =
         new DataReductionProxyInterceptor(
             test_context_->config(), test_context_->io_data()->config_client(),
-            nullptr /* bypass_stats */, test_context_->event_creator());
+            nullptr /* bypass_stats */);
 
     std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory_impl(
         new net::URLRequestJobFactoryImpl());
@@ -290,7 +290,7 @@
     DataReductionProxyInterceptor* interceptor =
         new DataReductionProxyInterceptor(
             test_context_->config(), test_context_->io_data()->config_client(),
-            bypass_stats_.get(), test_context_->event_creator());
+            bypass_stats_.get());
     std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory_impl(
         new net::URLRequestJobFactoryImpl());
     job_factory_.reset(new net::URLRequestInterceptingJobFactory(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
index 3602ea9..f5f8dcf 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
@@ -40,7 +40,6 @@
 #include "net/dns/mock_host_resolver.h"
 #include "net/http/http_response_headers.h"
 #include "net/http/http_util.h"
-#include "net/log/test_net_log.h"
 #include "net/socket/socket_test_util.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
 #include "net/url_request/url_request.h"
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 de2305e..dae1ae2e 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
@@ -30,7 +30,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h"
 #include "components/data_reduction_proxy/core/browser/network_properties_manager.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_config_values.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_type_info.h"
@@ -42,8 +41,8 @@
 #include "net/base/network_change_notifier.h"
 #include "net/base/network_interfaces.h"
 #include "net/base/proxy_server.h"
-#include "net/log/net_log_source_type.h"
 #include "net/nqe/effective_connection_type.h"
+#include "net/proxy_resolution/proxy_resolution_service.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "net/url_request/url_fetcher.h"
 #include "net/url_request/url_fetcher_delegate.h"
@@ -185,26 +184,21 @@
 
 DataReductionProxyConfig::DataReductionProxyConfig(
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-    net::NetLog* net_log,
     network::NetworkConnectionTracker* network_connection_tracker,
     std::unique_ptr<DataReductionProxyConfigValues> config_values,
-    DataReductionProxyConfigurator* configurator,
-    DataReductionProxyEventCreator* event_creator)
+    DataReductionProxyConfigurator* configurator)
     : unreachable_(false),
       enabled_by_user_(false),
       config_values_(std::move(config_values)),
       io_task_runner_(io_task_runner),
-      net_log_(net_log),
       network_connection_tracker_(network_connection_tracker),
       configurator_(configurator),
-      event_creator_(event_creator),
       connection_type_(network::mojom::ConnectionType::CONNECTION_UNKNOWN),
       network_properties_manager_(nullptr),
       weak_factory_(this) {
   DCHECK(io_task_runner_);
   DCHECK(network_connection_tracker_);
   DCHECK(configurator);
-  DCHECK(event_creator);
 
   // Constructed on the UI thread, but should be checked on the IO thread.
   thread_checker_.DetachFromThread();
@@ -586,10 +580,6 @@
     int http_response_code) {
   bool success_response =
       base::StartsWith(response, "OK", base::CompareCase::SENSITIVE);
-  if (event_creator_) {
-    event_creator_->EndSecureProxyCheck(net_log_with_source_, status.error(),
-                                        http_response_code, success_response);
-  }
 
   if (!status.is_success()) {
     if (status.error() == net::ERR_INTERNET_DISCONNECTED) {
@@ -703,13 +693,6 @@
 
 void DataReductionProxyConfig::SecureProxyCheck(
     SecureProxyCheckerCallback fetcher_callback) {
-  net_log_with_source_ = net::NetLogWithSource::Make(
-      net_log_, net::NetLogSourceType::DATA_REDUCTION_PROXY);
-  if (event_creator_) {
-    event_creator_->BeginSecureProxyCheck(net_log_with_source_,
-                                          params::GetSecureProxyCheckURL());
-  }
-
   secure_proxy_checker_->CheckIfSecureProxyIsAllowed(fetcher_callback);
 }
 
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
index e793657..b6cf27f 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
@@ -26,7 +26,6 @@
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_type_info.h"
 #include "components/data_reduction_proxy/proto/client_config.pb.h"
 #include "components/previews/core/previews_experiments.h"
-#include "net/log/net_log_with_source.h"
 #include "net/proxy_resolution/proxy_config.h"
 #include "net/proxy_resolution/proxy_retry_info.h"
 #include "services/network/public/cpp/network_connection_tracker.h"
@@ -36,7 +35,6 @@
 }
 
 namespace net {
-class NetLog;
 class ProxyServer;
 class URLRequest;
 class URLRequestContextGetter;
@@ -47,7 +45,6 @@
 
 class DataReductionProxyConfigValues;
 class DataReductionProxyConfigurator;
-class DataReductionProxyEventCreator;
 class NetworkPropertiesManager;
 class SecureProxyChecker;
 struct DataReductionProxyTypeInfo;
@@ -88,18 +85,14 @@
  public:
   // The caller must ensure that all parameters remain alive for the lifetime
   // of the |DataReductionProxyConfig| instance, with the exception of
-  // |config_values| which is owned by |this|. |event_creator| is used for
-  // logging the start and end of a secure proxy check; |net_log| is used to
-  // create a net::NetLogWithSource for correlating the start and end of the
-  // check. |config_values| contains the Data Reduction Proxy configuration
-  // values. |configurator| is the target for a configuration update.
+  // |config_values| which is owned by |this|. |config_values| contains the Data
+  // Reduction Proxy configuration values. |configurator| is the target for a
+  // configuration update.
   DataReductionProxyConfig(
       scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-      net::NetLog* net_log,
       network::NetworkConnectionTracker* network_connection_tracker,
       std::unique_ptr<DataReductionProxyConfigValues> config_values,
-      DataReductionProxyConfigurator* configurator,
-      DataReductionProxyEventCreator* event_creator);
+      DataReductionProxyConfigurator* configurator);
   ~DataReductionProxyConfig() override;
 
   // Performs initialization on the IO thread.
@@ -324,23 +317,12 @@
   bool get_network_id_asynchronously_ = false;
 #endif
 
-  // The caller must ensure that the |net_log_|, if set, outlives this instance.
-  // It is used to create new instances of |net_log_with_source_| on secure
-  // proxy checks. |net_log_with_source_| permits the correlation of the begin
-  // and end phases of a given secure proxy check, and a new one is created for
-  // each secure proxy check (with |net_log_| as a parameter).
-  net::NetLog* net_log_;
-  net::NetLogWithSource net_log_with_source_;
-
   // Watches for network connection changes.
   network::NetworkConnectionTracker* network_connection_tracker_;
 
   // The caller must ensure that the |configurator_| outlives this instance.
   DataReductionProxyConfigurator* configurator_;
 
-  // The caller must ensure that the |event_creator_| outlives this instance.
-  DataReductionProxyEventCreator* event_creator_;
-
   // Enforce usage on the IO thread.
   base::ThreadChecker thread_checker_;
 
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
index 76f3c91..aefe64a 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
@@ -27,7 +27,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_mutable_config_values.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_util.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
@@ -44,7 +43,6 @@
 #include "net/http/http_request_headers.h"
 #include "net/http/http_response_headers.h"
 #include "net/http/http_status_code.h"
-#include "net/log/net_log_source_type.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -147,17 +145,13 @@
     DataReductionProxyRequestOptions* request_options,
     DataReductionProxyMutableConfigValues* config_values,
     DataReductionProxyConfig* config,
-    DataReductionProxyEventCreator* event_creator,
     DataReductionProxyIOData* io_data,
-    net::NetLog* net_log,
     network::NetworkConnectionTracker* network_connection_tracker,
     ConfigStorer config_storer)
     : request_options_(request_options),
       config_values_(config_values),
       config_(config),
-      event_creator_(event_creator),
       io_data_(io_data),
-      net_log_(net_log),
       network_connection_tracker_(network_connection_tracker),
       config_storer_(config_storer),
       backoff_entry_(&backoff_policy),
@@ -174,9 +168,7 @@
   DCHECK(request_options);
   DCHECK(config_values);
   DCHECK(config);
-  DCHECK(event_creator);
   DCHECK(io_data);
-  DCHECK(net_log);
   DCHECK(config_service_url_.is_valid());
 
   const base::CommandLine& command_line =
@@ -267,15 +259,11 @@
     return;
   }
 
-  net_log_with_source_ = net::NetLogWithSource::Make(
-      net_log_, net::NetLogSourceType::DATA_REDUCTION_PROXY);
   // Strip off query string parameters
   GURL::Replacements replacements;
   replacements.ClearQuery();
   GURL base_config_service_url =
       config_service_url_.ReplaceComponents(replacements);
-  event_creator_->BeginConfigRequest(net_log_with_source_,
-                                     base_config_service_url);
   config_fetch_start_time_ = base::TimeTicks::Now();
 
   RetrieveRemoteConfig();
@@ -560,11 +548,6 @@
       succeeded, refresh_duration, GetBackoffEntry()->GetTimeUntilRelease());
 
   SetConfigRefreshTimer(next_config_refresh_time);
-  event_creator_->EndConfigRequest(
-      net_log_with_source_, status, response_code,
-      GetBackoffEntry()->failure_count(),
-      DataReductionProxyServer::ConvertToNetProxyServers(proxies),
-      refresh_duration, next_config_refresh_time);
 }
 
 bool DataReductionProxyConfigServiceClient::ParseAndApplyProxyConfig(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h
index d837116..6f4d2d7e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h
@@ -17,7 +17,6 @@
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "net/base/backoff_entry.h"
-#include "net/log/net_log_with_source.h"
 #include "services/network/public/cpp/network_connection_tracker.h"
 #include "url/gurl.h"
 
@@ -28,7 +27,6 @@
 namespace net {
 class HttpRequestHeaders;
 class HttpResponseHeaders;
-class NetLog;
 struct LoadTimingInfo;
 class ProxyServer;
 }
@@ -42,7 +40,6 @@
 
 class ClientConfig;
 class DataReductionProxyConfig;
-class DataReductionProxyEventCreator;
 class DataReductionProxyIOData;
 class DataReductionProxyMutableConfigValues;
 class DataReductionProxyRequestOptions;
@@ -92,9 +89,7 @@
       DataReductionProxyRequestOptions* request_options,
       DataReductionProxyMutableConfigValues* config_values,
       DataReductionProxyConfig* config,
-      DataReductionProxyEventCreator* event_creator,
       DataReductionProxyIOData* io_data,
-      net::NetLog* net_log,
       network::NetworkConnectionTracker* network_connection_tracker,
       ConfigStorer config_storer);
 
@@ -201,15 +196,9 @@
   // The caller must ensure that the |config_| outlives this instance.
   DataReductionProxyConfig* config_;
 
-  // The caller must ensure that the |event_creator_| outlives this instance.
-  DataReductionProxyEventCreator* event_creator_;
-
   // The caller must ensure that the |io_data_| outlives this instance.
   DataReductionProxyIOData* io_data_;
 
-  // The caller must ensure that the |net_log_| outlives this instance.
-  net::NetLog* net_log_;
-
   // Watches for network changes.
   network::NetworkConnectionTracker* network_connection_tracker_;
 
@@ -239,9 +228,6 @@
   // A |network::URLLoader| to retrieve the Date Reduction Proxy configuration.
   std::unique_ptr<network::SimpleURLLoader> url_loader_;
 
-  // Used to correlate the start and end of requests.
-  net::NetLogWithSource net_log_with_source_;
-
   // Used to determine the latency in retrieving the Data Reduction Proxy
   // configuration.
   base::TimeTicks config_fetch_start_time_;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc
index b5dcb61..7f970b9c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc
@@ -24,29 +24,21 @@
 
 TestDataReductionProxyConfig::TestDataReductionProxyConfig(
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-    net::NetLog* net_log,
-    DataReductionProxyConfigurator* configurator,
-    DataReductionProxyEventCreator* event_creator)
+    DataReductionProxyConfigurator* configurator)
     : TestDataReductionProxyConfig(
           std::make_unique<TestDataReductionProxyParams>(),
           io_task_runner,
-          net_log,
-          configurator,
-          event_creator) {}
+          configurator) {}
 
 TestDataReductionProxyConfig::TestDataReductionProxyConfig(
     std::unique_ptr<DataReductionProxyConfigValues> config_values,
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-    net::NetLog* net_log,
-    DataReductionProxyConfigurator* configurator,
-    DataReductionProxyEventCreator* event_creator)
+    DataReductionProxyConfigurator* configurator)
     : DataReductionProxyConfig(
           io_task_runner,
-          net_log,
           network::TestNetworkConnectionTracker::GetInstance(),
           std::move(config_values),
-          configurator,
-          event_creator),
+          configurator),
       tick_clock_(nullptr),
       is_captive_portal_(false),
       add_default_proxy_bypass_rules_(true) {}
@@ -144,14 +136,10 @@
 MockDataReductionProxyConfig::MockDataReductionProxyConfig(
     std::unique_ptr<DataReductionProxyConfigValues> config_values,
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-    net::NetLog* net_log,
-    DataReductionProxyConfigurator* configurator,
-    DataReductionProxyEventCreator* event_creator)
+    DataReductionProxyConfigurator* configurator)
     : TestDataReductionProxyConfig(std::move(config_values),
                                    io_task_runner,
-                                   net_log,
-                                   configurator,
-                                   event_creator) {}
+                                   configurator) {}
 
 MockDataReductionProxyConfig::~MockDataReductionProxyConfig() {
 }
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h
index 8c898dd..f552d425 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h
@@ -20,14 +20,9 @@
 class TickClock;
 }
 
-namespace net {
-class NetLog;
-}
-
 namespace data_reduction_proxy {
 
 class DataReductionProxyConfigurator;
-class DataReductionProxyEventCreator;
 class DataReductionProxyMutableConfigValues;
 class TestDataReductionProxyParams;
 
@@ -39,9 +34,7 @@
  public:
   TestDataReductionProxyConfig(
       scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-      net::NetLog* net_log,
-      DataReductionProxyConfigurator* configurator,
-      DataReductionProxyEventCreator* event_creator);
+      DataReductionProxyConfigurator* configurator);
 
   // Creates a |TestDataReductionProxyConfig| with the provided |config_values|.
   // This permits any DataReductionProxyConfigValues to be used (such as
@@ -49,9 +42,7 @@
   TestDataReductionProxyConfig(
       std::unique_ptr<DataReductionProxyConfigValues> config_values,
       scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-      net::NetLog* net_log,
-      DataReductionProxyConfigurator* configurator,
-      DataReductionProxyEventCreator* event_creator);
+      DataReductionProxyConfigurator* configurator);
 
   ~TestDataReductionProxyConfig() override;
 
@@ -143,9 +134,7 @@
   MockDataReductionProxyConfig(
       std::unique_ptr<DataReductionProxyConfigValues> config_values,
       scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
-      net::NetLog* net_log,
-      DataReductionProxyConfigurator* configurator,
-      DataReductionProxyEventCreator* event_creator);
+      DataReductionProxyConfigurator* configurator);
   ~MockDataReductionProxyConfig() override;
 
   MOCK_CONST_METHOD2(WasDataReductionProxyUsed,
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 a7d7fd4..5a44006 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
@@ -36,7 +36,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h"
 #include "components/data_reduction_proxy/core/browser/network_properties_manager.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
@@ -51,7 +50,6 @@
 #include "net/base/network_change_notifier.h"
 #include "net/base/proxy_server.h"
 #include "net/http/http_status_code.h"
-#include "net/log/test_net_log.h"
 #include "net/nqe/effective_connection_type.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
@@ -182,9 +180,8 @@
   std::unique_ptr<DataReductionProxyConfig> BuildConfig(
       std::unique_ptr<DataReductionProxyParams> params) {
     return std::make_unique<DataReductionProxyConfig>(
-        task_runner(), test_context_->net_log(),
-        network::TestNetworkConnectionTracker::GetInstance(), std::move(params),
-        test_context_->configurator(), test_context_->event_creator());
+        task_runner(), network::TestNetworkConnectionTracker::GetInstance(),
+        std::move(params), test_context_->configurator());
   }
 
   MockDataReductionProxyConfig* mock_config() {
@@ -205,12 +202,6 @@
     return expected_params_.get();
   }
 
-  DataReductionProxyEventCreator* event_creator() const {
-    return test_context_->event_creator();
-  }
-
-  net::NetLog* net_log() const { return test_context_->net_log(); }
-
   void SetConnectionType(network::mojom::ConnectionType connection_type) {
     network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
         connection_type);
@@ -429,8 +420,7 @@
                                            "Enabled");
 
     base::CommandLine::ForCurrentProcess()->InitFromArgv(0, nullptr);
-    TestDataReductionProxyConfig config(task_runner(), nullptr,
-                                        configurator(), event_creator());
+    TestDataReductionProxyConfig config(task_runner(), configurator());
 
     NetworkPropertiesManager network_properties_manager(
         base::DefaultClock::GetInstance(), test_context_->pref_service(),
@@ -783,9 +773,8 @@
   ASSERT_LT(0U, expected_proxies.size());
 
   DataReductionProxyConfig config(
-      task_runner(), net_log(),
-      network::TestNetworkConnectionTracker::GetInstance(), std::move(params),
-      configurator(), event_creator());
+      task_runner(), network::TestNetworkConnectionTracker::GetInstance(),
+      std::move(params), configurator());
 
   for (size_t expected_proxy_index = 0U;
        expected_proxy_index < expected_proxies.size(); ++expected_proxy_index) {
@@ -858,9 +847,8 @@
 
   config_values->UpdateValues(proxies_for_http);
   std::unique_ptr<DataReductionProxyConfig> config(new DataReductionProxyConfig(
-      task_runner(), net_log(),
-      network::TestNetworkConnectionTracker::GetInstance(),
-      std::move(config_values), configurator(), event_creator()));
+      task_runner(), network::TestNetworkConnectionTracker::GetInstance(),
+      std::move(config_values), configurator()));
   for (const auto& test : tests) {
     base::Optional<DataReductionProxyTypeInfo> proxy_type_info =
         config->FindConfiguredDataReductionProxy(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc
index c39da909..bce71599 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc
@@ -13,17 +13,11 @@
 #include "base/values.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_util.h"
 #include "components/data_reduction_proxy/core/browser/network_properties_manager.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "net/proxy_resolution/proxy_config.h"
 
 namespace data_reduction_proxy {
 
-DataReductionProxyConfigurator::DataReductionProxyConfigurator(
-    net::NetLog* net_log,
-    DataReductionProxyEventCreator* event_creator)
-    : net_log_(net_log), data_reduction_proxy_event_creator_(event_creator) {
-  DCHECK(net_log);
-  DCHECK(event_creator);
+DataReductionProxyConfigurator::DataReductionProxyConfigurator() {
   // Constructed on the UI thread, but should be checked on the IO thread.
   thread_checker_.DetachFromThread();
 }
@@ -38,9 +32,6 @@
   net::ProxyConfig config =
       CreateProxyConfig(false /* probe_url_config */,
                         network_properties_manager, proxies_for_http);
-  data_reduction_proxy_event_creator_->AddProxyEnabledEvent(
-      net_log_, network_properties_manager.IsSecureProxyDisallowedByCarrier(),
-      DataReductionProxyServer::ConvertToNetProxyServers(proxies_for_http));
   config_ = config;
   if (config_updated_callback_)
     config_updated_callback_.Run();
@@ -110,7 +101,6 @@
 void DataReductionProxyConfigurator::Disable() {
   DCHECK(thread_checker_.CalledOnValidThread());
   net::ProxyConfig config = net::ProxyConfig::CreateDirect();
-  data_reduction_proxy_event_creator_->AddProxyDisabledEvent(net_log_);
   config_ = config;
   if (config_updated_callback_)
     config_updated_callback_.Run();
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h
index 471fabc..4deb17c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h
@@ -16,22 +16,16 @@
 #include "net/proxy_resolution/proxy_config.h"
 
 namespace net {
-class NetLog;
 class ProxyServer;
 }
 
 namespace data_reduction_proxy {
 
-class DataReductionProxyEventCreator;
 class NetworkPropertiesManager;
 
 class DataReductionProxyConfigurator {
  public:
-  // Constructs a configurator. |net_log| and |event_creator| are used to
-  // track network and Data Reduction Proxy events respectively, must not be
-  // null, and must outlive this instance.
-  DataReductionProxyConfigurator(net::NetLog* net_log,
-                                 DataReductionProxyEventCreator* event_creator);
+  DataReductionProxyConfigurator();
 
   ~DataReductionProxyConfigurator();
 
@@ -81,10 +75,6 @@
   // enabled. It should be accessed only on the IO thread.
   net::ProxyConfig config_;
 
-  // Used for logging of network- and Data Reduction Proxy-related events.
-  net::NetLog* net_log_;
-  DataReductionProxyEventCreator* data_reduction_proxy_event_creator_;
-
   base::RepeatingClosure config_updated_callback_;
 
   // Enforce usage on the IO thread.
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
index a964b50..f17a73b 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
@@ -35,8 +35,7 @@
     manager_->OnChangeInNetworkID("test");
 
     test_context_ = DataReductionProxyTestContext::Builder().Build();
-    config_.reset(new DataReductionProxyConfigurator(
-        test_context_->net_log(), test_context_->event_creator()));
+    config_.reset(new DataReductionProxyConfigurator());
   }
 
   void TearDown() override {
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
index f284763f..9ecd823 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
@@ -15,7 +15,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_util.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
 #include "net/base/host_port_pair.h"
@@ -36,20 +35,14 @@
 DataReductionProxyDelegate::DataReductionProxyDelegate(
     DataReductionProxyConfig* config,
     const DataReductionProxyConfigurator* configurator,
-    DataReductionProxyEventCreator* event_creator,
-    DataReductionProxyBypassStats* bypass_stats,
-    net::NetLog* net_log)
+    DataReductionProxyBypassStats* bypass_stats)
     : config_(config),
       configurator_(configurator),
-      event_creator_(event_creator),
       bypass_stats_(bypass_stats),
-      io_data_(nullptr),
-      net_log_(net_log) {
+      io_data_(nullptr) {
   DCHECK(config_);
   DCHECK(configurator_);
-  DCHECK(event_creator_);
   DCHECK(bypass_stats_);
-  DCHECK(net_log_);
   // Constructed on the UI thread, but should be checked on the IO thread.
   thread_checker_.DetachFromThread();
 }
@@ -152,12 +145,6 @@
 void DataReductionProxyDelegate::OnFallback(const net::ProxyServer& bad_proxy,
                                             int net_error) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  if (bad_proxy.is_valid() &&
-      config_->FindConfiguredDataReductionProxy(bad_proxy)) {
-    event_creator_->AddProxyFallbackEvent(net_log_, bad_proxy.ToURI(),
-                                          net_error);
-  }
-
   if (bypass_stats_)
     bypass_stats_->OnProxyFallback(bad_proxy, net_error);
 }
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h
index 5d74b86c..fae9be5 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h
@@ -14,7 +14,6 @@
 #include "url/gurl.h"
 
 namespace net {
-class NetLog;
 class ProxyInfo;
 class ProxyServer;
 }
@@ -24,7 +23,6 @@
 class DataReductionProxyBypassStats;
 class DataReductionProxyConfig;
 class DataReductionProxyConfigurator;
-class DataReductionProxyEventCreator;
 class DataReductionProxyIOData;
 
 class DataReductionProxyDelegate : public net::ProxyDelegate {
@@ -33,9 +31,7 @@
   // outlives this class instance.
   DataReductionProxyDelegate(DataReductionProxyConfig* config,
                              const DataReductionProxyConfigurator* configurator,
-                             DataReductionProxyEventCreator* event_creator,
-                             DataReductionProxyBypassStats* bypass_stats,
-                             net::NetLog* net_log);
+                             DataReductionProxyBypassStats* bypass_stats);
 
   ~DataReductionProxyDelegate() override;
 
@@ -76,13 +72,10 @@
 
   const DataReductionProxyConfig* config_;
   const DataReductionProxyConfigurator* configurator_;
-  DataReductionProxyEventCreator* event_creator_;
   DataReductionProxyBypassStats* bypass_stats_;
 
   DataReductionProxyIOData* io_data_;
 
-  net::NetLog* net_log_;
-
   base::ThreadChecker thread_checker_;
 
   DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate);
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 d96b62b1..60b0f205 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
@@ -84,15 +84,9 @@
   TestDataReductionProxyDelegate(
       DataReductionProxyConfig* config,
       const DataReductionProxyConfigurator* configurator,
-      DataReductionProxyEventCreator* event_creator,
       DataReductionProxyBypassStats* bypass_stats,
-      bool proxy_supports_quic,
-      net::NetLog* net_log)
-      : DataReductionProxyDelegate(config,
-                                   configurator,
-                                   event_creator,
-                                   bypass_stats,
-                                   net_log),
+      bool proxy_supports_quic)
+      : DataReductionProxyDelegate(config, configurator, bypass_stats),
         proxy_supports_quic_(proxy_supports_quic) {}
 
   ~TestDataReductionProxyDelegate() override {}
@@ -475,10 +469,9 @@
 
     params()->SetProxiesForHttpForTesting(proxies_for_http);
 
-    TestDataReductionProxyDelegate delegate(
-        config(), io_data()->configurator(), io_data()->event_creator(),
-        io_data()->bypass_stats(), test.proxy_supports_quic,
-        io_data()->net_log());
+    TestDataReductionProxyDelegate delegate(config(), io_data()->configurator(),
+                                            io_data()->bypass_stats(),
+                                            test.proxy_supports_quic);
 
     base::FieldTrialList field_trial_list(nullptr);
     base::FieldTrialList::CreateFieldTrial(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc
index 342083f..45cf414c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc
@@ -8,7 +8,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "net/base/load_timing_info.h"
@@ -46,14 +45,10 @@
 DataReductionProxyInterceptor::DataReductionProxyInterceptor(
     DataReductionProxyConfig* config,
     DataReductionProxyConfigServiceClient* config_service_client,
-    DataReductionProxyBypassStats* stats,
-    DataReductionProxyEventCreator* event_creator)
+    DataReductionProxyBypassStats* stats)
     : bypass_stats_(stats),
       config_service_client_(config_service_client),
-      event_creator_(event_creator),
-      bypass_protocol_(new DataReductionProxyBypassProtocol(config)) {
-  DCHECK(event_creator_);
-}
+      bypass_protocol_(new DataReductionProxyBypassProtocol(config)) {}
 
 DataReductionProxyInterceptor::~DataReductionProxyInterceptor() {
 }
@@ -145,9 +140,6 @@
 
     if (bypass_stats_ && bypass_type != BYPASS_EVENT_TYPE_MAX)
       bypass_stats_->SetBypassType(bypass_type);
-
-    MaybeAddBypassEvent(request, data_reduction_proxy_info, bypass_type,
-                        should_retry);
   }
 
   DataReductionProxyData* data = DataReductionProxyData::GetData(*request);
@@ -167,23 +159,4 @@
                                                              network_delegate);
 }
 
-void DataReductionProxyInterceptor::MaybeAddBypassEvent(
-    net::URLRequest* request,
-    const DataReductionProxyInfo& data_reduction_proxy_info,
-    DataReductionProxyBypassType bypass_type,
-    bool should_retry) const {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (data_reduction_proxy_info.bypass_action != BYPASS_ACTION_TYPE_NONE) {
-    event_creator_->AddBypassActionEvent(
-        request->net_log(), data_reduction_proxy_info.bypass_action,
-        request->method(), request->url(), should_retry,
-        data_reduction_proxy_info.bypass_duration);
-  } else if (bypass_type != BYPASS_EVENT_TYPE_MAX) {
-    event_creator_->AddBypassTypeEvent(
-        request->net_log(), bypass_type, request->method(), request->url(),
-        should_retry, data_reduction_proxy_info.bypass_duration);
-  }
-}
-
 }  // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h
index 2c4af95..c66ce26 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h
@@ -17,7 +17,6 @@
 class DataReductionProxyBypassStats;
 class DataReductionProxyConfig;
 class DataReductionProxyConfigServiceClient;
-class DataReductionProxyEventCreator;
 
 // Used to intercept responses that contain explicit and implicit signals
 // to bypass the Data Reduction Proxy. If the proxy should be bypassed,
@@ -25,14 +24,13 @@
 // without use of the proxy.
 class DataReductionProxyInterceptor : public net::URLRequestInterceptor {
  public:
-  // Constructs the interceptor. |config|, |config_service_client|, |stats|, and
-  // |event_creator| must outlive |this|. |stats| and |config_service_client|
+  // Constructs the interceptor. |config|, |config_service_client|, and |stats|
+  //  must outlive |this|. |stats| and |config_service_client|
   // may be NULL.
   DataReductionProxyInterceptor(
       DataReductionProxyConfig* config,
       DataReductionProxyConfigServiceClient* config_service_client,
-      DataReductionProxyBypassStats* stats,
-      DataReductionProxyEventCreator* event_creator);
+      DataReductionProxyBypassStats* stats);
 
   // Destroys the interceptor.
   ~DataReductionProxyInterceptor() override;
@@ -64,23 +62,12 @@
   net::URLRequestJob* MaybeInterceptResponseOrRedirect(
       net::URLRequest* request, net::NetworkDelegate* network_delegate) const;
 
-  // If a request is being bypassed, log the bypass event to the
-  // |event_creator_|.
-  void MaybeAddBypassEvent(
-      net::URLRequest* request,
-      const DataReductionProxyInfo& data_reduction_proxy_info,
-      DataReductionProxyBypassType bypass_type,
-      bool should_retry) const;
-
   // Must outlive |this| if non-NULL.
   DataReductionProxyBypassStats* bypass_stats_;
 
   // Must outlive |this| if non-NULL.
   DataReductionProxyConfigServiceClient* config_service_client_;
 
-  // Must outlive |this|.
-  DataReductionProxyEventCreator* event_creator_;
-
   // Object responsible for identifying cases when a response should cause the
   // data reduction proxy to be bypassed, and for triggering proxy bypasses in
   // these cases.
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index 68b39f1e..6e5d41e0 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -30,7 +30,6 @@
 #include "net/base/proxy_server.h"
 #include "net/base/request_priority.h"
 #include "net/http/http_response_headers.h"
-#include "net/log/test_net_log.h"
 #include "net/socket/socket_test_util.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
@@ -128,7 +127,6 @@
             .proxy_server(),
         &default_network_delegate_));
     default_context_->set_network_delegate(&default_network_delegate_);
-    default_context_->set_net_log(test_context_->net_log());
     test_context_->config()->test_params()->UseNonSecureProxiesForHttp();
   }
 
@@ -199,7 +197,6 @@
             base::test::ScopedTaskEnvironment::MainThreadType::IO),
         context_(true) {
     context_.set_network_delegate(&network_delegate_);
-    context_.set_net_log(&net_log_);
   }
 
   ~DataReductionProxyInterceptorWithServerTest() override {
@@ -257,7 +254,6 @@
   base::test::ScopedTaskEnvironment scoped_task_environment_;
 
  private:
-  net::TestNetLog net_log_;
   net::TestNetworkDelegate network_delegate_;
   net::TestURLRequestContext context_;
   net::EmbeddedTestServer proxy_;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
index 47d7ab1..e1c378e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
@@ -25,8 +25,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/data_reduction_proxy/core/browser/network_properties_manager.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
@@ -96,7 +94,6 @@
 DataReductionProxyIOData::DataReductionProxyIOData(
     Client client,
     PrefService* prefs,
-    net::NetLog* net_log,
     network::NetworkConnectionTracker* network_connection_tracker,
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
@@ -104,7 +101,6 @@
     const std::string& user_agent,
     const std::string& channel)
     : client_(client),
-      net_log_(net_log),
       network_connection_tracker_(network_connection_tracker),
       io_task_runner_(io_task_runner),
       ui_task_runner_(ui_task_runner),
@@ -116,12 +112,9 @@
       channel_(channel),
       effective_connection_type_(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN),
       weak_factory_(this) {
-  DCHECK(net_log);
   DCHECK(io_task_runner_);
   DCHECK(ui_task_runner_);
-  event_creator_.reset(new DataReductionProxyEventCreator(this));
-  configurator_.reset(
-      new DataReductionProxyConfigurator(net_log, event_creator_.get()));
+  configurator_.reset(new DataReductionProxyConfigurator());
   configurator_->SetConfigUpdatedCallback(base::BindRepeating(
       &DataReductionProxyIOData::OnProxyConfigUpdated, base::Unretained(this)));
   DataReductionProxyMutableConfigValues* raw_mutable_config = nullptr;
@@ -129,42 +122,40 @@
         std::make_unique<DataReductionProxyMutableConfigValues>();
     raw_mutable_config = mutable_config.get();
     config_.reset(new DataReductionProxyConfig(
-        io_task_runner, net_log, network_connection_tracker_,
-        std::move(mutable_config), configurator_.get(), event_creator_.get()));
-
-  // It is safe to use base::Unretained here, since it gets executed
-  // synchronously on the IO thread, and |this| outlives the caller (since the
-  // caller is owned by |this|.
-  bypass_stats_.reset(new DataReductionProxyBypassStats(
-      config_.get(),
-      base::BindRepeating(&DataReductionProxyIOData::SetUnreachable,
-                          base::Unretained(this)),
-      network_connection_tracker_));
-  request_options_.reset(
-      new DataReductionProxyRequestOptions(client_, config_.get()));
-  request_options_->Init();
-  // It is safe to use base::Unretained here, since it gets executed
-  // synchronously on the IO thread, and |this| outlives the caller (since the
-  // caller is owned by |this|.
-  request_options_->SetUpdateHeaderCallback(
-      base::BindRepeating(&DataReductionProxyIOData::UpdateProxyRequestHeaders,
-                          base::Unretained(this)));
+        io_task_runner, network_connection_tracker_, std::move(mutable_config),
+        configurator_.get()));
 
     // It is safe to use base::Unretained here, since it gets executed
     // synchronously on the IO thread, and |this| outlives the caller (since the
     // caller is owned by |this|.
-  config_client_.reset(new DataReductionProxyConfigServiceClient(
-      GetBackoffPolicy(), request_options_.get(), raw_mutable_config,
-      config_.get(), event_creator_.get(), this, net_log_,
-      network_connection_tracker_,
-      base::BindRepeating(&DataReductionProxyIOData::StoreSerializedConfig,
-                          base::Unretained(this))));
+    bypass_stats_.reset(new DataReductionProxyBypassStats(
+        config_.get(),
+        base::BindRepeating(&DataReductionProxyIOData::SetUnreachable,
+                            base::Unretained(this)),
+        network_connection_tracker_));
+    request_options_.reset(
+        new DataReductionProxyRequestOptions(client_, config_.get()));
+    request_options_->Init();
+    // It is safe to use base::Unretained here, since it gets executed
+    // synchronously on the IO thread, and |this| outlives the caller (since the
+    // caller is owned by |this|.
+    request_options_->SetUpdateHeaderCallback(base::BindRepeating(
+        &DataReductionProxyIOData::UpdateProxyRequestHeaders,
+        base::Unretained(this)));
 
-  proxy_delegate_.reset(new DataReductionProxyDelegate(
-      config_.get(), configurator_.get(), event_creator_.get(),
-      bypass_stats_.get(), net_log_));
-  network_properties_manager_.reset(new NetworkPropertiesManager(
-      base::DefaultClock::GetInstance(), prefs, ui_task_runner_));
+    // It is safe to use base::Unretained here, since it gets executed
+    // synchronously on the IO thread, and |this| outlives the caller (since the
+    // caller is owned by |this|.
+    config_client_.reset(new DataReductionProxyConfigServiceClient(
+        GetBackoffPolicy(), request_options_.get(), raw_mutable_config,
+        config_.get(), this, network_connection_tracker_,
+        base::BindRepeating(&DataReductionProxyIOData::StoreSerializedConfig,
+                            base::Unretained(this))));
+
+    proxy_delegate_.reset(new DataReductionProxyDelegate(
+        config_.get(), configurator_.get(), bypass_stats_.get()));
+    network_properties_manager_.reset(new NetworkPropertiesManager(
+        base::DefaultClock::GetInstance(), prefs, ui_task_runner_));
 }
 
 DataReductionProxyIOData::DataReductionProxyIOData(
@@ -172,7 +163,6 @@
     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
     : client_(Client::UNKNOWN),
-      net_log_(nullptr),
       network_connection_tracker_(nullptr),
       io_task_runner_(io_task_runner),
       ui_task_runner_(ui_task_runner),
@@ -268,8 +258,7 @@
 DataReductionProxyIOData::CreateInterceptor() {
   DCHECK(io_task_runner_->BelongsToCurrentThread());
   return std::make_unique<DataReductionProxyInterceptor>(
-      config_.get(), config_client_.get(), bypass_stats_.get(),
-      event_creator_.get());
+      config_.get(), config_client_.get(), bypass_stats_.get());
 }
 
 std::unique_ptr<DataReductionProxyNetworkDelegate>
@@ -291,8 +280,7 @@
 DataReductionProxyIOData::CreateProxyDelegate() const {
   DCHECK(io_task_runner_->BelongsToCurrentThread());
   return std::make_unique<DataReductionProxyDelegate>(
-      config_.get(), configurator_.get(), event_creator_.get(),
-      bypass_stats_.get(), net_log_);
+      config_.get(), configurator_.get(), bypass_stats_.get());
 }
 
 // TODO(kundaji): Rename this method to something more descriptive.
@@ -374,43 +362,6 @@
                           is_user_traffic, content_type, service_hash_code));
 }
 
-void DataReductionProxyIOData::AddEvent(std::unique_ptr<base::Value> event) {
-  DCHECK(io_task_runner_->BelongsToCurrentThread());
-  ui_task_runner_->PostTask(
-      FROM_HERE, base::BindOnce(&DataReductionProxyService::AddEvent, service_,
-                                std::move(event)));
-}
-
-void DataReductionProxyIOData::AddEnabledEvent(
-    std::unique_ptr<base::Value> event,
-    bool enabled) {
-  DCHECK(io_task_runner_->BelongsToCurrentThread());
-  ui_task_runner_->PostTask(
-      FROM_HERE, base::BindOnce(&DataReductionProxyService::AddEnabledEvent,
-                                service_, std::move(event), enabled));
-}
-
-void DataReductionProxyIOData::AddEventAndSecureProxyCheckState(
-    std::unique_ptr<base::Value> event,
-    SecureProxyCheckState state) {
-  DCHECK(io_task_runner_->BelongsToCurrentThread());
-  ui_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          &DataReductionProxyService::AddEventAndSecureProxyCheckState,
-          service_, std::move(event), state));
-}
-
-void DataReductionProxyIOData::AddAndSetLastBypassEvent(
-    std::unique_ptr<base::Value> event,
-    int64_t expiration_ticks) {
-  DCHECK(io_task_runner_->BelongsToCurrentThread());
-  ui_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&DataReductionProxyService::AddAndSetLastBypassEvent,
-                     service_, std::move(event), expiration_ticks));
-}
-
 void DataReductionProxyIOData::SetUnreachable(bool unreachable) {
   DCHECK(io_task_runner_->BelongsToCurrentThread());
   ui_task_runner_->PostTask(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
index f89c9e48..7e7cde8 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
@@ -21,19 +21,13 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_util.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
 #include "components/data_reduction_proxy/core/common/lofi_decider.h"
 #include "components/data_reduction_proxy/core/common/lofi_ui_service.h"
 #include "components/data_reduction_proxy/core/common/resource_type_provider.h"
 #include "components/data_use_measurement/core/data_use_user_data.h"
 #include "services/network/public/mojom/network_context.mojom.h"
 
-namespace base {
-class Value;
-}
-
 namespace net {
-class NetLog;
 class URLRequestContextGetter;
 class URLRequestInterceptor;
 }
@@ -49,20 +43,18 @@
 class DataReductionProxyConfig;
 class DataReductionProxyConfigServiceClient;
 class DataReductionProxyConfigurator;
-class DataReductionProxyEventCreator;
 class DataReductionProxyService;
 class NetworkPropertiesManager;
 
 // Contains and initializes all Data Reduction Proxy objects that operate on
 // the IO thread.
-class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
+class DataReductionProxyIOData {
  public:
   // Constructs a DataReductionProxyIOData object. |enabled| sets the initial
   // state of the Data Reduction Proxy.
   DataReductionProxyIOData(
       Client client,
       PrefService* prefs,
-      net::NetLog* net_log,
       network::NetworkConnectionTracker* network_connection_tracker,
       scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
@@ -124,16 +116,6 @@
       data_use_measurement::DataUseUserData::DataUseContentType content_type,
       int32_t service_hash_code);
 
-  // Overrides of DataReductionProxyEventStorageDelegate. Bridges to the UI
-  // thread objects.
-  void AddEvent(std::unique_ptr<base::Value> event) override;
-  void AddEnabledEvent(std::unique_ptr<base::Value> event,
-                       bool enabled) override;
-  void AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> event,
-                                        SecureProxyCheckState state) override;
-  void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> event,
-                                int64_t expiration_ticks) override;
-
   // Returns true if the Data Reduction Proxy is enabled and false otherwise.
   bool IsEnabled() const;
 
@@ -178,10 +160,6 @@
     return config_.get();
   }
 
-  DataReductionProxyEventCreator* event_creator() const {
-    return event_creator_.get();
-  }
-
   DataReductionProxyRequestOptions* request_options() const {
     return request_options_.get();
   }
@@ -194,10 +172,6 @@
     return proxy_delegate_.get();
   }
 
-  net::NetLog* net_log() {
-    return net_log_;
-  }
-
   const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner() const {
     return io_task_runner_;
   }
@@ -281,9 +255,6 @@
   // Handles getting the content type of a request.
   std::unique_ptr<ResourceTypeProvider> resource_type_provider_;
 
-  // Creates Data Reduction Proxy-related events for logging.
-  std::unique_ptr<DataReductionProxyEventCreator> event_creator_;
-
   // Setter of the Data Reduction Proxy-specific proxy configuration.
   std::unique_ptr<DataReductionProxyConfigurator> configurator_;
 
@@ -303,9 +274,6 @@
   // Requests new Data Reduction Proxy configurations from a remote service.
   std::unique_ptr<DataReductionProxyConfigServiceClient> config_client_;
 
-  // A net log.
-  net::NetLog* net_log_;
-
   // Watches for network connection changes.
   network::NetworkConnectionTracker* network_connection_tracker_;
 
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
index 0d96a67..8b21faa 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
@@ -26,8 +26,6 @@
 #include "components/prefs/pref_service.h"
 #include "components/prefs/testing_pref_service.h"
 #include "net/http/http_network_session.h"
-#include "net/log/net_log.h"
-#include "net/log/net_log_with_source.h"
 #include "net/proxy_resolution/proxy_info.h"
 #include "net/proxy_resolution/proxy_resolution_service.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
@@ -89,10 +87,6 @@
     return context_;
   }
 
-  net::NetLog* net_log() {
-    return &net_log_;
-  }
-
   PrefService* prefs() {
     return &prefs_;
   }
@@ -103,14 +97,13 @@
  private:
   net::TestDelegate delegate_;
   net::TestURLRequestContext context_;
-  net::NetLog net_log_;
   TestingPrefServiceSimple prefs_;
 };
 
 TEST_F(DataReductionProxyIODataTest, TestConstruction) {
   std::unique_ptr<DataReductionProxyIOData> io_data(
       new DataReductionProxyIOData(
-          Client::UNKNOWN, prefs(), net_log(),
+          Client::UNKNOWN, prefs(),
           network::TestNetworkConnectionTracker::GetInstance(),
           scoped_task_environment_.GetMainThreadTaskRunner(),
           scoped_task_environment_.GetMainThreadTaskRunner(),
@@ -178,13 +171,13 @@
           ->proxy_resolution_service();
   net::ProxyInfo proxy_info;
   proxy_info.UseNamedProxy("http://foo2.com");
-  net::NetLogWithSource net_log_with_source;
   const net::ProxyRetryInfoMap& bad_proxy_list =
       proxy_resolution_service->proxy_retry_info();
 
   // Simulate network error to add proxies to the bad proxy list.
-  proxy_resolution_service->MarkProxiesAsBadUntil(proxy_info, base::TimeDelta::FromDays(1),
-                                       proxies, net_log_with_source);
+  proxy_resolution_service->MarkProxiesAsBadUntil(
+      proxy_info, base::TimeDelta::FromDays(1), proxies,
+      net::NetLogWithSource());
   base::RunLoop().RunUntilIdle();
 
   // Verify that there are 2 proxies in the bad proxies list.
@@ -298,7 +291,7 @@
 TEST_F(DataReductionProxyIODataTest,
        TestCustomProxyConfigUpdatedOnHeaderChange) {
   DataReductionProxyIOData io_data(
-      Client::UNKNOWN, prefs(), net_log(),
+      Client::UNKNOWN, prefs(),
       network::TestNetworkConnectionTracker::GetInstance(),
       scoped_task_environment_.GetMainThreadTaskRunner(),
       scoped_task_environment_.GetMainThreadTaskRunner(), false /* enabled */,
@@ -324,7 +317,7 @@
 TEST_F(DataReductionProxyIODataTest,
        TestCustomProxyConfigUpdatedOnProxyChange) {
   DataReductionProxyIOData io_data(
-      Client::UNKNOWN, prefs(), net_log(),
+      Client::UNKNOWN, prefs(),
       network::TestNetworkConnectionTracker::GetInstance(),
       scoped_task_environment_.GetMainThreadTaskRunner(),
       scoped_task_environment_.GetMainThreadTaskRunner(), false /* enabled */,
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
index b68347d6..30d0cd06 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
@@ -17,8 +17,6 @@
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
 #include "net/base/load_flags.h"
 #include "net/base/proxy_server.h"
-#include "net/log/net_log_source_type.h"
-#include "net/log/net_log_with_source.h"
 #include "net/proxy_resolution/proxy_resolution_service.h"
 #include "net/socket/socket_test_util.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
@@ -207,9 +205,7 @@
           data_reduction_proxy_config.proxy_rules().proxies_for_http);
       EXPECT_TRUE(context.proxy_resolution_service()->MarkProxiesAsBadUntil(
           proxy_info, test_case.bypass_duration,
-          std::vector<net::ProxyServer>(),
-          net::NetLogWithSource::Make(context.net_log(),
-                                      net::NetLogSourceType::NONE)));
+          std::vector<net::ProxyServer>(), net::NetLogWithSource()));
     }
 
     EXPECT_EQ(test_case.expected_request_type,
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
index fcaeffe..e15b8d7 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
@@ -21,7 +21,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service_observer.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/data_reduction_proxy/core/browser/data_store.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
@@ -63,7 +62,6 @@
     compression_stats_.reset(
         new DataReductionProxyCompressionStats(this, prefs_, commit_delay));
   }
-  event_store_.reset(new DataReductionProxyEventStore());
   network_quality_tracker_->AddEffectiveConnectionTypeObserver(this);
   network_quality_tracker_->AddRTTAndThroughputEstimatesObserver(this);
 }
@@ -191,32 +189,6 @@
   }
 }
 
-void DataReductionProxyService::AddEvent(std::unique_ptr<base::Value> event) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  event_store_->AddEvent(std::move(event));
-}
-
-void DataReductionProxyService::AddEnabledEvent(
-    std::unique_ptr<base::Value> event,
-    bool enabled) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  event_store_->AddEnabledEvent(std::move(event), enabled);
-}
-
-void DataReductionProxyService::AddEventAndSecureProxyCheckState(
-    std::unique_ptr<base::Value> event,
-    SecureProxyCheckState state) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  event_store_->AddEventAndSecureProxyCheckState(std::move(event), state);
-}
-
-void DataReductionProxyService::AddAndSetLastBypassEvent(
-    std::unique_ptr<base::Value> event,
-    int64_t expiration_ticks) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  event_store_->AddAndSetLastBypassEvent(std::move(event), expiration_ticks);
-}
-
 void DataReductionProxyService::SetUnreachable(bool unreachable) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   settings_->SetUnreachable(unreachable);
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
index 12b7521..68280f66 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
@@ -19,7 +19,6 @@
 #include "base/sequence_checker.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
 #include "components/data_reduction_proxy/core/browser/db_data_owner.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
 #include "components/data_use_measurement/core/data_use_user_data.h"
 #include "net/nqe/effective_connection_type.h"
 #include "services/network/public/cpp/network_quality_tracker.h"
@@ -31,7 +30,6 @@
 class SequencedTaskRunner;
 class SingleThreadTaskRunner;
 class TimeDelta;
-class Value;
 }
 
 namespace net {
@@ -42,7 +40,6 @@
 namespace data_reduction_proxy {
 
 class DataReductionProxyCompressionStats;
-class DataReductionProxyEventStore;
 class DataReductionProxyIOData;
 class DataReductionProxyPingbackClient;
 class DataReductionProxyServiceObserver;
@@ -51,8 +48,7 @@
 // Contains and initializes all Data Reduction Proxy objects that have a
 // lifetime based on the UI thread.
 class DataReductionProxyService
-    : public DataReductionProxyEventStorageDelegate,
-      public network::NetworkQualityTracker::EffectiveConnectionTypeObserver,
+    : public network::NetworkQualityTracker::EffectiveConnectionTypeObserver,
       public network::NetworkQualityTracker::RTTAndThroughputEstimatesObserver {
  public:
   // The caller must ensure that |settings|, |prefs|, |request_context|, and
@@ -103,15 +99,6 @@
       data_use_measurement::DataUseUserData::DataUseContentType content_type,
       int32_t service_hash_code);
 
-  // Overrides of DataReductionProxyEventStorageDelegate.
-  void AddEvent(std::unique_ptr<base::Value> event) override;
-  void AddEnabledEvent(std::unique_ptr<base::Value> event,
-                       bool enabled) override;
-  void AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> event,
-                                        SecureProxyCheckState state) override;
-  void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> event,
-                                int64_t expiration_ticks) override;
-
   // Records whether the Data Reduction Proxy is unreachable or not.
   void SetUnreachable(bool unreachable);
 
@@ -165,10 +152,6 @@
     return compression_stats_.get();
   }
 
-  DataReductionProxyEventStore* event_store() const {
-    return event_store_.get();
-  }
-
   net::URLRequestContextGetter* url_request_context_getter() const {
     return url_request_context_getter_;
   }
@@ -205,8 +188,6 @@
   // Tracks compression statistics to be displayed to the user.
   std::unique_ptr<DataReductionProxyCompressionStats> compression_stats_;
 
-  std::unique_ptr<DataReductionProxyEventStore> event_store_;
-
   std::unique_ptr<DataReductionProxyPingbackClient> pingback_client_;
 
   DataReductionProxySettings* settings_;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 752116c..e53985e7 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -310,14 +310,6 @@
   observers_.RemoveObserver(observer);
 }
 
-DataReductionProxyEventStore* DataReductionProxySettings::GetEventStore()
-    const {
-  if (data_reduction_proxy_service_)
-    return data_reduction_proxy_service_->event_store();
-
-  return nullptr;
-}
-
 void DataReductionProxySettings::SetCustomProxyConfigClient(
     network::mojom::CustomProxyConfigClientPtrInfo proxy_config_client) {
   DCHECK(!data_reduction_proxy_service_);
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
index 9f448ecc05..4846eab 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
@@ -33,7 +33,6 @@
 namespace data_reduction_proxy {
 
 class DataReductionProxyConfig;
-class DataReductionProxyEventStore;
 class DataReductionProxyIOData;
 class DataReductionProxyService;
 class DataReductionProxyCompressionStats;
@@ -170,10 +169,6 @@
   void RemoveDataReductionProxySettingsObserver(
       DataReductionProxySettingsObserver* observer);
 
-  // Returns the event store being used. May be null if
-  // InitDataReductionProxySettings has not been called.
-  DataReductionProxyEventStore* GetEventStore() const;
-
   // Sets a config client that can be used to update Data Reduction Proxy
   // settings when the network service is enabled.
   void SetCustomProxyConfigClient(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
index a61b9c0d..359d320e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
@@ -16,7 +16,6 @@
 #include "base/time/time.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/prefs/testing_pref_service.h"
-#include "net/log/test_net_log.h"
 #include "net/url_request/test_url_fetcher_factory.h"
 #include "net/url_request/url_request_test_util.h"
 #include "testing/gmock/include/gmock/gmock.h"
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
index 8beb5240..97e6392 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
@@ -220,7 +220,6 @@
 
     drp_test_context->DisableWarmupURLFetch();
 
-    context.set_net_log(drp_test_context->net_log());
     net::MockClientSocketFactory mock_socket_factory;
     context.set_client_socket_factory(&mock_socket_factory);
     context.Init();
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index 5cbc0ed..d291a6f 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -24,9 +24,6 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/data_reduction_proxy/core/browser/data_store.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
@@ -130,18 +127,14 @@
         DataReductionProxyRequestOptions* request_options,
         DataReductionProxyMutableConfigValues* config_values,
         DataReductionProxyConfig* config,
-        DataReductionProxyEventCreator* event_creator,
         DataReductionProxyIOData* io_data,
-        net::NetLog* net_log,
         network::NetworkConnectionTracker* network_connection_tracker,
         ConfigStorer config_storer)
     : DataReductionProxyConfigServiceClient(kTestBackoffPolicy,
                                             request_options,
                                             config_values,
                                             config,
-                                            event_creator,
                                             io_data,
-                                            net_log,
                                             network_connection_tracker,
                                             config_storer),
 #if defined(OS_ANDROID)
@@ -263,10 +256,8 @@
     PrefService* prefs,
     const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
     std::unique_ptr<DataReductionProxyConfig> config,
-    std::unique_ptr<DataReductionProxyEventCreator> event_creator,
     std::unique_ptr<TestDataReductionProxyRequestOptions> request_options,
     std::unique_ptr<DataReductionProxyConfigurator> configurator,
-    net::NetLog* net_log,
     network::NetworkConnectionTracker* network_connection_tracker,
     bool enabled)
     : DataReductionProxyIOData(prefs, task_runner, task_runner),
@@ -276,10 +267,8 @@
   io_task_runner_ = task_runner;
   ui_task_runner_ = task_runner;
   config_ = std::move(config);
-  event_creator_ = std::move(event_creator);
   request_options_ = std::move(request_options);
   configurator_ = std::move(configurator);
-  net_log_ = net_log;
   network_connection_tracker_ = network_connection_tracker;
   bypass_stats_.reset(new DataReductionProxyBypassStats(
       config_.get(),
@@ -442,7 +431,6 @@
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory;
   std::unique_ptr<TestingPrefServiceSimple> pref_service(
       new TestingPrefServiceSimple());
-  std::unique_ptr<net::TestNetLog> net_log(new net::TestNetLog());
   auto* test_network_connection_tracker =
       network::TestNetworkConnectionTracker::GetInstance();
   std::unique_ptr<TestConfigStorer> config_storer(
@@ -469,12 +457,8 @@
         base::MakeRefCounted<network::TestSharedURLLoaderFactory>();
   }
 
-  std::unique_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate(
-      new TestDataReductionProxyEventStorageDelegate());
-  std::unique_ptr<DataReductionProxyEventCreator> event_creator(
-      new DataReductionProxyEventCreator(storage_delegate.get()));
   std::unique_ptr<DataReductionProxyConfigurator> configurator(
-      new DataReductionProxyConfigurator(net_log.get(), event_creator.get()));
+      new DataReductionProxyConfigurator());
 
   std::unique_ptr<TestDataReductionProxyConfig> config;
   std::unique_ptr<DataReductionProxyConfigServiceClient> config_client;
@@ -491,21 +475,18 @@
     }
     raw_mutable_config = mutable_config.get();
     config.reset(new TestDataReductionProxyConfig(
-        std::move(mutable_config), task_runner, net_log.get(),
-        configurator.get(), event_creator.get()));
+        std::move(mutable_config), task_runner, configurator.get()));
   } else if (use_mock_config_) {
     test_context_flags |= USE_MOCK_CONFIG;
     config.reset(new MockDataReductionProxyConfig(
-        std::move(params), task_runner, net_log.get(), configurator.get(),
-        event_creator.get()));
+        std::move(params), task_runner, configurator.get()));
   } else {
     test_context_flags ^= USE_MOCK_CONFIG;
     if (!proxy_servers_.empty()) {
       params->SetProxiesForHttp(proxy_servers_);
     }
     config.reset(new TestDataReductionProxyConfig(
-        std::move(params), task_runner, net_log.get(), configurator.get(),
-        event_creator.get()));
+        std::move(params), task_runner, configurator.get()));
   }
 
   std::unique_ptr<TestDataReductionProxyRequestOptions> request_options;
@@ -537,8 +518,7 @@
   std::unique_ptr<TestDataReductionProxyIOData> io_data(
       new TestDataReductionProxyIOData(
           pref_service.get(), task_runner, std::move(config),
-          std::move(event_creator), std::move(request_options),
-          std::move(configurator), net_log.get(),
+          std::move(request_options), std::move(configurator),
           test_network_connection_tracker, true /* enabled */));
   io_data->SetSimpleURLRequestContextGetter(request_context_getter);
 
@@ -546,30 +526,27 @@
     test_context_flags |= USE_TEST_CONFIG_CLIENT;
     config_client.reset(new TestDataReductionProxyConfigServiceClient(
         std::move(params), io_data->request_options(), raw_mutable_config,
-        io_data->config(), io_data->event_creator(), io_data.get(),
-        net_log.get(), test_network_connection_tracker,
+        io_data->config(), io_data.get(), test_network_connection_tracker,
         base::BindRepeating(&TestConfigStorer::StoreSerializedConfig,
                             base::Unretained(config_storer.get()))));
   } else if (use_config_client_) {
     config_client.reset(new DataReductionProxyConfigServiceClient(
         GetBackoffPolicy(), io_data->request_options(), raw_mutable_config,
-        io_data->config(), io_data->event_creator(), io_data.get(),
-        net_log.get(), test_network_connection_tracker,
+        io_data->config(), io_data.get(), test_network_connection_tracker,
         base::Bind(&TestConfigStorer::StoreSerializedConfig,
                    base::Unretained(config_storer.get()))));
   }
   io_data->set_config_client(std::move(config_client));
 
   io_data->set_proxy_delegate(base::WrapUnique(new DataReductionProxyDelegate(
-      io_data->config(), io_data->configurator(), io_data->event_creator(),
-      io_data->bypass_stats(), net_log.get())));
+      io_data->config(), io_data->configurator(), io_data->bypass_stats())));
 
   std::unique_ptr<DataReductionProxyTestContext> test_context(
       new DataReductionProxyTestContext(
-          task_runner, std::move(pref_service), std::move(net_log),
-          request_context_getter, url_loader_factory, mock_socket_factory_,
-          std::move(io_data), std::move(settings), std::move(storage_delegate),
-          std::move(config_storer), raw_params, test_context_flags));
+          task_runner, std::move(pref_service), request_context_getter,
+          url_loader_factory, mock_socket_factory_, std::move(io_data),
+          std::move(settings), std::move(config_storer), raw_params,
+          test_context_flags));
 
   if (!skip_settings_initialization_)
     test_context->InitSettingsWithoutCheck();
@@ -580,27 +557,22 @@
 DataReductionProxyTestContext::DataReductionProxyTestContext(
     const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
     std::unique_ptr<TestingPrefServiceSimple> simple_pref_service,
-    std::unique_ptr<net::TestNetLog> net_log,
     scoped_refptr<net::URLRequestContextGetter> request_context_getter,
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
     net::MockClientSocketFactory* mock_socket_factory,
     std::unique_ptr<TestDataReductionProxyIOData> io_data,
     std::unique_ptr<DataReductionProxySettings> settings,
-    std::unique_ptr<TestDataReductionProxyEventStorageDelegate>
-        storage_delegate,
     std::unique_ptr<TestConfigStorer> config_storer,
     TestDataReductionProxyParams* params,
     unsigned int test_context_flags)
     : test_context_flags_(test_context_flags),
       task_runner_(task_runner),
       simple_pref_service_(std::move(simple_pref_service)),
-      net_log_(std::move(net_log)),
       request_context_getter_(request_context_getter),
       url_loader_factory_(std::move(url_loader_factory)),
       mock_socket_factory_(mock_socket_factory),
       io_data_(std::move(io_data)),
       settings_(std::move(settings)),
-      storage_delegate_(std::move(storage_delegate)),
       config_storer_(std::move(config_storer)),
       test_network_quality_tracker_(
           std::make_unique<network::TestNetworkQualityTracker>()),
@@ -642,7 +614,6 @@
   // indirectly owned by |settings_|.
   if (settings_) {
     settings_.reset();
-    storage_delegate_->SetStorageDelegate(nullptr);
     RunUntilIdle();
   }
 }
@@ -651,8 +622,6 @@
   settings_->InitDataReductionProxySettings(
       kDataReductionProxyEnabled, simple_pref_service_.get(), io_data_.get(),
       CreateDataReductionProxyServiceInternal(settings_.get()));
-  storage_delegate_->SetStorageDelegate(
-      settings_->data_reduction_proxy_service()->event_store());
   io_data_->SetDataReductionProxyService(
       settings_->data_reduction_proxy_service()->GetWeakPtr());
   settings_->data_reduction_proxy_service()->SetIOData(io_data_->GetWeakPtr());
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
index 9feb599c..8d11b3a 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
@@ -30,7 +30,6 @@
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "net/base/backoff_entry.h"
 #include "net/base/proxy_server.h"
-#include "net/log/test_net_log.h"
 #include "net/url_request/url_request_context_getter.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
@@ -39,7 +38,6 @@
 
 namespace net {
 class MockClientSocketFactory;
-class NetLog;
 class URLRequestContext;
 class URLRequestContextStorage;
 }
@@ -53,14 +51,12 @@
 
 class ClientConfig;
 class DataReductionProxyConfigurator;
-class DataReductionProxyEventCreator;
 class DataReductionProxyMutableConfigValues;
 class DataReductionProxyRequestOptions;
 class DataReductionProxyServer;
 class DataReductionProxySettings;
 class MockDataReductionProxyConfig;
 class TestDataReductionProxyConfig;
-class TestDataReductionProxyEventStorageDelegate;
 class TestDataReductionProxyParams;
 
 // Test version of |DataReductionProxyRequestOptions|.
@@ -107,9 +103,7 @@
       DataReductionProxyRequestOptions* request_options,
       DataReductionProxyMutableConfigValues* config_values,
       DataReductionProxyConfig* config,
-      DataReductionProxyEventCreator* event_creator,
       DataReductionProxyIOData* io_data,
-      net::NetLog* net_log,
       network::NetworkConnectionTracker* network_connection_tracker,
       ConfigStorer config_storer);
 
@@ -222,10 +216,8 @@
       PrefService* prefs,
       const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
       std::unique_ptr<DataReductionProxyConfig> config,
-      std::unique_ptr<DataReductionProxyEventCreator> event_creator,
       std::unique_ptr<TestDataReductionProxyRequestOptions> request_options,
       std::unique_ptr<DataReductionProxyConfigurator> configurator,
-      net::NetLog* net_log,
       network::NetworkConnectionTracker* network_connection_tracker,
       bool enabled);
   ~TestDataReductionProxyIOData() override;
@@ -474,10 +466,6 @@
     return simple_pref_service_.get();
   }
 
-  net::NetLog* net_log() {
-    return net_log_.get();
-  }
-
   net::URLRequestContextGetter* request_context_getter() const {
     return request_context_getter_.get();
   }
@@ -490,10 +478,6 @@
     return io_data_->bypass_stats();
   }
 
-  DataReductionProxyEventCreator* event_creator() const {
-    return io_data_->event_creator();
-  }
-
   DataReductionProxyConfigurator* configurator() const {
     return io_data_->configurator();
   }
@@ -537,14 +521,11 @@
   DataReductionProxyTestContext(
       const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
       std::unique_ptr<TestingPrefServiceSimple> simple_pref_service,
-      std::unique_ptr<net::TestNetLog> net_log,
       scoped_refptr<net::URLRequestContextGetter> request_context_getter,
       scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
       net::MockClientSocketFactory* mock_socket_factory,
       std::unique_ptr<TestDataReductionProxyIOData> io_data,
       std::unique_ptr<DataReductionProxySettings> settings,
-      std::unique_ptr<TestDataReductionProxyEventStorageDelegate>
-          storage_delegate,
       std::unique_ptr<TestConfigStorer> config_storer,
       TestDataReductionProxyParams* params,
       unsigned int test_context_flags);
@@ -556,7 +537,6 @@
 
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   std::unique_ptr<TestingPrefServiceSimple> simple_pref_service_;
-  std::unique_ptr<net::TestNetLog> net_log_;
   scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
   // Non-owned pointer. Will be NULL if |this| was built without specifying a
@@ -565,7 +545,6 @@
 
   std::unique_ptr<TestDataReductionProxyIOData> io_data_;
   std::unique_ptr<DataReductionProxySettings> settings_;
-  std::unique_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate_;
   std::unique_ptr<TestConfigStorer> config_storer_;
   std::unique_ptr<network::TestNetworkQualityTracker>
       test_network_quality_tracker_;
diff --git a/components/data_reduction_proxy/core/common/BUILD.gn b/components/data_reduction_proxy/core/common/BUILD.gn
index 5fa1ee6..c6159e7 100644
--- a/components/data_reduction_proxy/core/common/BUILD.gn
+++ b/components/data_reduction_proxy/core/common/BUILD.gn
@@ -12,11 +12,6 @@
       "data_reduction_proxy_bypass_action_list.h",
       "data_reduction_proxy_bypass_type_list.h",
       "data_reduction_proxy_config_values.h",
-      "data_reduction_proxy_event_creator.cc",
-      "data_reduction_proxy_event_creator.h",
-      "data_reduction_proxy_event_storage_delegate.h",
-      "data_reduction_proxy_event_store.cc",
-      "data_reduction_proxy_event_store.h",
       "data_reduction_proxy_features.cc",
       "data_reduction_proxy_features.h",
       "data_reduction_proxy_headers.cc",
@@ -66,8 +61,6 @@
 static_library("test_support") {
   testonly = true
   sources = [
-    "data_reduction_proxy_event_storage_delegate_test_utils.cc",
-    "data_reduction_proxy_event_storage_delegate_test_utils.h",
     "data_reduction_proxy_headers_test_utils.cc",
     "data_reduction_proxy_headers_test_utils.h",
     "data_reduction_proxy_params_test_utils.cc",
@@ -91,7 +84,6 @@
 source_set("unit_tests") {
   testonly = true
   sources = [
-    "data_reduction_proxy_event_store_unittest.cc",
     "data_reduction_proxy_headers_unittest.cc",
     "data_reduction_proxy_params_unittest.cc",
   ]
@@ -105,7 +97,6 @@
     "//components/prefs:test_support",
 
     # TODO this dependency seems wrong, but
-    # data_reduction_proxy_event_store_unittest.cc includes a file from it.
     "//components/data_reduction_proxy/core/browser",
     "//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
     "//components/variations",
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc
deleted file mode 100644
index 08fe674..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc
+++ /dev/null
@@ -1,370 +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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
-
-#include <memory>
-#include <utility>
-
-#include "base/bind.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/time/time.h"
-#include "base/values.h"
-#include "net/base/proxy_server.h"
-#include "net/log/net_log.h"
-#include "net/log/net_log_entry.h"
-#include "net/log/net_log_source.h"
-#include "net/log/net_log_with_source.h"
-
-namespace data_reduction_proxy {
-
-namespace {
-
-std::unique_ptr<base::Value> BuildDataReductionProxyEvent(
-    net::NetLogEventType type,
-    const net::NetLogSource& source,
-    net::NetLogEventPhase phase,
-    const net::NetLogParametersCallback& parameters_callback) {
-  base::TimeTicks ticks_now = base::TimeTicks::Now();
-  net::NetLogEntryData entry_data(type, source, phase, ticks_now,
-                                  &parameters_callback);
-  net::NetLogEntry entry(&entry_data,
-                         net::NetLogCaptureMode::IncludeSocketBytes());
-  std::unique_ptr<base::Value> entry_value(entry.ToValue());
-
-  return entry_value;
-}
-
-int64_t GetExpirationTicks(int bypass_seconds) {
-  base::TimeTicks expiration_ticks =
-      base::TimeTicks::Now() + base::TimeDelta::FromSeconds(bypass_seconds);
-  return (expiration_ticks - base::TimeTicks()).InMilliseconds();
-}
-
-// A callback which creates a base::Value containing information about enabling
-// the Data Reduction Proxy.
-std::unique_ptr<base::Value> EnableDataReductionProxyCallback(
-    bool secure_transport_restricted,
-    const std::vector<net::ProxyServer>& proxies_for_http,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetBoolean("enabled", true);
-  dict->SetBoolean("secure_transport_restricted", secure_transport_restricted);
-  std::unique_ptr<base::ListValue> http_proxy_list(new base::ListValue());
-  for (const auto& proxy : proxies_for_http)
-    http_proxy_list->AppendString(proxy.ToURI());
-
-  dict->Set("http_proxy_list", std::move(http_proxy_list));
-
-  return std::move(dict);
-}
-
-// A callback which creates a base::Value containing information about disabling
-// the Data Reduction Proxy.
-std::unique_ptr<base::Value> DisableDataReductionProxyCallback(
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetBoolean("enabled", false);
-  return std::move(dict);
-}
-
-// A callback which creates a base::Value containing information about bypassing
-// the Data Reduction Proxy.
-std::unique_ptr<base::Value> UrlBypassActionCallback(
-    DataReductionProxyBypassAction action,
-    const std::string& request_method,
-    const GURL& url,
-    bool should_retry,
-    int bypass_seconds,
-    int64_t expiration_ticks,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetInteger("bypass_action_type", action);
-  dict->SetString("method", request_method);
-  dict->SetString("url", url.spec());
-  dict->SetBoolean("should_retry", should_retry);
-  dict->SetString("bypass_duration_seconds",
-                  base::Int64ToString(bypass_seconds));
-  dict->SetString("expiration", base::Int64ToString(expiration_ticks));
-  return std::move(dict);
-}
-
-// A callback which creates a base::Value containing information about bypassing
-// the Data Reduction Proxy.
-std::unique_ptr<base::Value> UrlBypassTypeCallback(
-    DataReductionProxyBypassType bypass_type,
-    const std::string& request_method,
-    const GURL& url,
-    bool should_retry,
-    int bypass_seconds,
-    int64_t expiration_ticks,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetInteger("bypass_type", bypass_type);
-  dict->SetString("method", request_method);
-  dict->SetString("url", url.spec());
-  dict->SetBoolean("should_retry", should_retry);
-  dict->SetString("bypass_duration_seconds",
-                  base::Int64ToString(bypass_seconds));
-  dict->SetString("expiration", base::Int64ToString(expiration_ticks));
-  return std::move(dict);
-}
-
-// A callback that creates a base::Value containing information about a proxy
-// fallback event for a Data Reduction Proxy.
-std::unique_ptr<base::Value> FallbackCallback(
-    const std::string& proxy_url,
-    int net_error,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetString("proxy", proxy_url);
-  dict->SetInteger("net_error", net_error);
-  return std::move(dict);
-}
-
-// A callback which creates a base::Value containing information about
-// completing the Data Reduction Proxy secure proxy check.
-std::unique_ptr<base::Value> EndCanaryRequestCallback(
-    int net_error,
-    int http_response_code,
-    bool succeeded,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetInteger("net_error", net_error);
-  dict->SetInteger("http_response_code", http_response_code);
-  dict->SetBoolean("check_succeeded", succeeded);
-  return std::move(dict);
-}
-
-// A callback that creates a base::Value containing information about
-// completing the Data Reduction Proxy configuration request.
-std::unique_ptr<base::Value> EndConfigRequestCallback(
-    int net_error,
-    int http_response_code,
-    int failure_count,
-    const std::vector<net::ProxyServer>& proxies_for_http,
-    int64_t refresh_duration_minutes,
-    int64_t expiration_ticks,
-    net::NetLogCaptureMode /* capture_mode */) {
-  std::unique_ptr<base::ListValue> http_proxy_list(new base::ListValue());
-  for (const auto& proxy : proxies_for_http)
-    http_proxy_list->AppendString(proxy.ToURI());
-  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
-  dict->SetInteger("net_error", net_error);
-  dict->SetInteger("http_response_code", http_response_code);
-  dict->SetInteger("failure_count", failure_count);
-  dict->Set("http_proxy_list_in_config", std::move(http_proxy_list));
-  dict->SetString("refresh_duration",
-                  base::Int64ToString(refresh_duration_minutes) + " minutes");
-  dict->SetString("expiration", base::Int64ToString(expiration_ticks));
-  return std::move(dict);
-}
-
-}  // namespace
-
-DataReductionProxyEventCreator::DataReductionProxyEventCreator(
-    DataReductionProxyEventStorageDelegate* storage_delegate)
-    : storage_delegate_(storage_delegate) {
-  DCHECK(storage_delegate);
-  // Constructed on the UI thread, but should be checked on the IO thread.
-  thread_checker_.DetachFromThread();
-}
-
-DataReductionProxyEventCreator::~DataReductionProxyEventCreator() {
-}
-
-void DataReductionProxyEventCreator::AddProxyEnabledEvent(
-    net::NetLog* net_log,
-    bool secure_transport_restricted,
-    const std::vector<net::ProxyServer>& proxies_for_http) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  const net::NetLogParametersCallback& parameters_callback =
-      base::Bind(&EnableDataReductionProxyCallback, secure_transport_restricted,
-                 proxies_for_http);
-  PostEnabledEvent(net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_ENABLED,
-                   true, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::AddProxyDisabledEvent(
-    net::NetLog* net_log) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  const net::NetLogParametersCallback& parameters_callback =
-      base::Bind(&DisableDataReductionProxyCallback);
-  PostEnabledEvent(net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_ENABLED,
-                   false, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::AddBypassActionEvent(
-    const net::NetLogWithSource& net_log,
-    DataReductionProxyBypassAction bypass_action,
-    const std::string& request_method,
-    const GURL& url,
-    bool should_retry,
-    const base::TimeDelta& bypass_duration) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  int64_t expiration_ticks = GetExpirationTicks(bypass_duration.InSeconds());
-  const net::NetLogParametersCallback& parameters_callback =
-      base::Bind(&UrlBypassActionCallback, bypass_action, request_method, url,
-                 should_retry, bypass_duration.InSeconds(), expiration_ticks);
-  PostNetLogWithSourceBypassEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
-      net::NetLogEventPhase::NONE, expiration_ticks, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::AddBypassTypeEvent(
-    const net::NetLogWithSource& net_log,
-    DataReductionProxyBypassType bypass_type,
-    const std::string& request_method,
-    const GURL& url,
-    bool should_retry,
-    const base::TimeDelta& bypass_duration) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  int64_t expiration_ticks = GetExpirationTicks(bypass_duration.InSeconds());
-  const net::NetLogParametersCallback& parameters_callback =
-      base::Bind(&UrlBypassTypeCallback, bypass_type, request_method, url,
-                 should_retry, bypass_duration.InSeconds(), expiration_ticks);
-  PostNetLogWithSourceBypassEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
-      net::NetLogEventPhase::NONE, expiration_ticks, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::AddProxyFallbackEvent(
-    net::NetLog* net_log,
-    const std::string& proxy_url,
-    int net_error) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  const net::NetLogParametersCallback& parameters_callback =
-      base::Bind(&FallbackCallback, proxy_url, net_error);
-  PostEvent(net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_FALLBACK,
-            parameters_callback);
-}
-
-void DataReductionProxyEventCreator::BeginSecureProxyCheck(
-    const net::NetLogWithSource& net_log,
-    const GURL& url) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  // This callback must be invoked synchronously
-  const net::NetLogParametersCallback& parameters_callback =
-      net::NetLog::StringCallback("url", &url.spec());
-  PostNetLogWithSourceSecureProxyCheckEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_CANARY_REQUEST,
-      net::NetLogEventPhase::BEGIN,
-      DataReductionProxyEventStorageDelegate::CHECK_PENDING,
-      parameters_callback);
-}
-
-void DataReductionProxyEventCreator::EndSecureProxyCheck(
-    const net::NetLogWithSource& net_log,
-    int net_error,
-    int http_response_code,
-    bool succeeded) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  const net::NetLogParametersCallback& parameters_callback = base::Bind(
-      &EndCanaryRequestCallback, net_error, http_response_code, succeeded);
-  PostNetLogWithSourceSecureProxyCheckEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_CANARY_REQUEST,
-      net::NetLogEventPhase::END,
-      succeeded ? DataReductionProxyEventStorageDelegate::CHECK_SUCCESS
-                : DataReductionProxyEventStorageDelegate::CHECK_FAILED,
-      parameters_callback);
-}
-
-void DataReductionProxyEventCreator::BeginConfigRequest(
-    const net::NetLogWithSource& net_log,
-    const GURL& url) {
-  // This callback must be invoked synchronously.
-  const net::NetLogParametersCallback& parameters_callback =
-      net::NetLog::StringCallback("url", &url.spec());
-  PostNetLogWithSourceConfigRequestEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_CONFIG_REQUEST,
-      net::NetLogEventPhase::BEGIN, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::EndConfigRequest(
-    const net::NetLogWithSource& net_log,
-    int net_error,
-    int http_response_code,
-    int failure_count,
-    const std::vector<net::ProxyServer>& proxies_for_http,
-    const base::TimeDelta& refresh_duration,
-    const base::TimeDelta& retry_delay) {
-  int64_t refresh_duration_minutes = refresh_duration.InMinutes();
-  int64_t expiration_ticks = GetExpirationTicks(retry_delay.InSeconds());
-  const net::NetLogParametersCallback& parameters_callback = base::Bind(
-      &EndConfigRequestCallback, net_error, http_response_code, failure_count,
-      proxies_for_http, refresh_duration_minutes, expiration_ticks);
-  PostNetLogWithSourceConfigRequestEvent(
-      net_log, net::NetLogEventType::DATA_REDUCTION_PROXY_CONFIG_REQUEST,
-      net::NetLogEventPhase::END, parameters_callback);
-}
-
-void DataReductionProxyEventCreator::PostEvent(
-    net::NetLog* net_log,
-    net::NetLogEventType type,
-    const net::NetLogParametersCallback& callback) {
-  std::unique_ptr<base::Value> event = BuildDataReductionProxyEvent(
-      type, net::NetLogSource(), net::NetLogEventPhase::NONE, callback);
-  if (event)
-    storage_delegate_->AddEvent(std::move(event));
-
-  if (net_log)
-    net_log->AddGlobalEntry(type, callback);
-}
-
-void DataReductionProxyEventCreator::PostEnabledEvent(
-    net::NetLog* net_log,
-    net::NetLogEventType type,
-    bool enabled,
-    const net::NetLogParametersCallback& callback) {
-  std::unique_ptr<base::Value> event = BuildDataReductionProxyEvent(
-      type, net::NetLogSource(), net::NetLogEventPhase::NONE, callback);
-  if (event)
-    storage_delegate_->AddEnabledEvent(std::move(event), enabled);
-
-  if (net_log)
-    net_log->AddGlobalEntry(type, callback);
-}
-
-void DataReductionProxyEventCreator::PostNetLogWithSourceBypassEvent(
-    const net::NetLogWithSource& net_log,
-    net::NetLogEventType type,
-    net::NetLogEventPhase phase,
-    int64_t expiration_ticks,
-    const net::NetLogParametersCallback& callback) {
-  std::unique_ptr<base::Value> event =
-      BuildDataReductionProxyEvent(type, net_log.source(), phase, callback);
-  if (event)
-    storage_delegate_->AddAndSetLastBypassEvent(std::move(event),
-                                                expiration_ticks);
-  net_log.AddEntry(type, phase, callback);
-}
-
-void DataReductionProxyEventCreator::PostNetLogWithSourceSecureProxyCheckEvent(
-    const net::NetLogWithSource& net_log,
-    net::NetLogEventType type,
-    net::NetLogEventPhase phase,
-    DataReductionProxyEventStorageDelegate::SecureProxyCheckState state,
-    const net::NetLogParametersCallback& callback) {
-  std::unique_ptr<base::Value> event(
-      BuildDataReductionProxyEvent(type, net_log.source(), phase, callback));
-  if (event)
-    storage_delegate_->AddEventAndSecureProxyCheckState(std::move(event),
-                                                        state);
-  net_log.AddEntry(type, phase, callback);
-}
-
-void DataReductionProxyEventCreator::PostNetLogWithSourceConfigRequestEvent(
-    const net::NetLogWithSource& net_log,
-    net::NetLogEventType type,
-    net::NetLogEventPhase phase,
-    const net::NetLogParametersCallback& callback) {
-  std::unique_ptr<base::Value> event(
-      BuildDataReductionProxyEvent(type, net_log.source(), phase, callback));
-  if (event) {
-    storage_delegate_->AddEvent(std::move(event));
-    net_log.AddEntry(type, phase, callback);
-  }
-}
-
-}  // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h
deleted file mode 100644
index f85a7d0..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h
+++ /dev/null
@@ -1,160 +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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_CREATOR_H_
-#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_CREATOR_H_
-
-#include <stdint.h>
-
-#include <string>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/threading/thread_checker.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
-#include "net/log/net_log_event_type.h"
-#include "net/log/net_log_parameters_callback.h"
-
-class GURL;
-
-namespace base {
-class TimeDelta;
-}
-
-namespace net {
-class NetLogWithSource;
-class ProxyServer;
-class NetLog;
-}
-
-namespace data_reduction_proxy {
-
-// Central location for creating debug events for the Data Reduction Proxy.
-// This object lives on the IO thread and all of its methods are expected to be
-// called from there.
-class DataReductionProxyEventCreator {
- public:
-  // Constructs a DataReductionProxyEventCreator object. |storage_delegate| must
-  // outlive |this| and can be used to store Data Reduction Proxy events for
-  // debugging without requiring a net::NetLog.
-  explicit DataReductionProxyEventCreator(
-      DataReductionProxyEventStorageDelegate* storage_delegate);
-
-  ~DataReductionProxyEventCreator();
-
-  // Adds the DATA_REDUCTION_PROXY_ENABLED event (with enabled=true) to the
-  // event store.
-  void AddProxyEnabledEvent(
-      net::NetLog* net_log,
-      bool secure_transport_restricted,
-      const std::vector<net::ProxyServer>& proxies_for_http);
-
-  // Adds the DATA_REDUCTION_PROXY_ENABLED event (with enabled=false) to the
-  // event store.
-  void AddProxyDisabledEvent(net::NetLog* net_log);
-
-  // Adds a DATA_REDUCTION_PROXY_BYPASS_REQUESTED event to the event store
-  // when the bypass reason is initiated by the data reduction proxy.
-  void AddBypassActionEvent(const net::NetLogWithSource& net_log,
-                            DataReductionProxyBypassAction bypass_action,
-                            const std::string& request_method,
-                            const GURL& gurl,
-                            bool should_retry,
-                            const base::TimeDelta& bypass_duration);
-
-  // Adds a DATA_REDUCTION_PROXY_BYPASS_REQUESTED event to the event store
-  // when the bypass reason is not initiated by the data reduction proxy, such
-  // as HTTP errors.
-  void AddBypassTypeEvent(const net::NetLogWithSource& net_log,
-                          DataReductionProxyBypassType bypass_type,
-                          const std::string& request_method,
-                          const GURL& gurl,
-                          bool should_retry,
-                          const base::TimeDelta& bypass_duration);
-
-  // Adds a DATA_REDUCTION_PROXY_FALLBACK event to the event store when there
-  // is a network error in attempting to use a Data Reduction Proxy server.
-  void AddProxyFallbackEvent(net::NetLog* net_log,
-                             const std::string& proxy_url,
-                             int net_error);
-
-  // Adds a DATA_REDUCTION_PROXY_CANARY_REQUEST event to the event store
-  // when the secure proxy request has started.
-  void BeginSecureProxyCheck(const net::NetLogWithSource& net_log,
-                             const GURL& gurl);
-
-  // Adds a DATA_REDUCTION_PROXY_CANARY_REQUEST event to the event store
-  // when the secure proxy request has ended.
-  void EndSecureProxyCheck(const net::NetLogWithSource& net_log,
-                           int net_error,
-                           int http_response_code,
-                           bool succeeded);
-
-  // Adds a DATA_REDUCTION_PROXY_CONFIG_REQUEST event to the event store
-  // when the config request has started.
-  void BeginConfigRequest(const net::NetLogWithSource& net_log,
-                          const GURL& url);
-
-  // Adds a DATA_REDUCTION_PROXY_CONFIG_REQUEST event to the event store
-  // when the config request has ended.
-  void EndConfigRequest(const net::NetLogWithSource& net_log,
-                        int net_error,
-                        int http_response_code,
-                        int failure_count,
-                        const std::vector<net::ProxyServer>& proxies_for_http,
-                        const base::TimeDelta& refresh_duration,
-                        const base::TimeDelta& retry_delay);
-
- private:
-  // Prepare and post a generic Data Reduction Proxy event with no additional
-  // parameters.
-  void PostEvent(net::NetLog* net_log,
-                 net::NetLogEventType type,
-                 const net::NetLogParametersCallback& callback);
-
-  // Prepare and post enabling/disabling proxy events for the event store on the
-  // a net::NetLog.
-  void PostEnabledEvent(net::NetLog* net_log,
-                        net::NetLogEventType type,
-                        bool enable,
-                        const net::NetLogParametersCallback& callback);
-
-  // Prepare and post a Data Reduction Proxy bypass event for the event store
-  // on a NetLogWithSource.
-  void PostNetLogWithSourceBypassEvent(
-      const net::NetLogWithSource& net_log,
-      net::NetLogEventType type,
-      net::NetLogEventPhase phase,
-      int64_t expiration_ticks,
-      const net::NetLogParametersCallback& callback);
-
-  // Prepare and post a secure proxy check event for the event store on a
-  // NetLogWithSource.
-  void PostNetLogWithSourceSecureProxyCheckEvent(
-      const net::NetLogWithSource& net_log,
-      net::NetLogEventType type,
-      net::NetLogEventPhase phase,
-      DataReductionProxyEventStorageDelegate::SecureProxyCheckState state,
-      const net::NetLogParametersCallback& callback);
-
-  // Prepare and post a config request event for the event store on a
-  // NetLogWithSource.
-  void PostNetLogWithSourceConfigRequestEvent(
-      const net::NetLogWithSource& net_log,
-      net::NetLogEventType type,
-      net::NetLogEventPhase phase,
-      const net::NetLogParametersCallback& callback);
-
-  // Must outlive |this|. Used for posting calls to the UI thread.
-  DataReductionProxyEventStorageDelegate* storage_delegate_;
-
-  // Enforce usage on the IO thread.
-  base::ThreadChecker thread_checker_;
-
-  DISALLOW_COPY_AND_ASSIGN(DataReductionProxyEventCreator);
-};
-
-}  // namespace data_reduction_proxy
-#endif  // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_CREATOR_H_
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h
deleted file mode 100644
index 978c8e2f..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h
+++ /dev/null
@@ -1,47 +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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORAGE_DELEGATE_H_
-#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORAGE_DELEGATE_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-namespace base {
-class Value;
-}
-
-namespace data_reduction_proxy {
-
-// Defines an interface for storing Data Reduction Proxy events.
-class DataReductionProxyEventStorageDelegate {
- public:
-  enum SecureProxyCheckState {
-    CHECK_UNKNOWN,
-    CHECK_PENDING,
-    CHECK_SUCCESS,
-    CHECK_FAILED,
-  };
-
-  // Stores a DATA_REDUCTION_PROXY event with no parameters.
-  virtual void AddEvent(std::unique_ptr<base::Value> event) = 0;
-
-  // Stores a DATA_REDUCTION_PROXY_ENABLED event.
-  virtual void AddEnabledEvent(std::unique_ptr<base::Value> event,
-                               bool enabled) = 0;
-
-  // Stores a DATA_REDUCTION_PROXY_BYPASS_REQUESTED event.
-  virtual void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> event,
-                                        int64_t expiration_ticks) = 0;
-
-  // Stores a DATA_REDUCTION_PROXY_CANARY_REQUEST event.
-  virtual void AddEventAndSecureProxyCheckState(
-      std::unique_ptr<base::Value> event,
-      SecureProxyCheckState state) = 0;
-};
-
-}  // namespace data_reduction_proxy
-
-#endif  // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORAGE_DELEGATE_H_
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.cc
deleted file mode 100644
index 0f202aa..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.cc
+++ /dev/null
@@ -1,55 +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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h"
-
-#include <utility>
-
-#include "base/values.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
-
-namespace data_reduction_proxy {
-
-TestDataReductionProxyEventStorageDelegate::
-    TestDataReductionProxyEventStorageDelegate()
-    : delegate_(nullptr) {
-}
-
-TestDataReductionProxyEventStorageDelegate::
-    ~TestDataReductionProxyEventStorageDelegate() {
-}
-
-void TestDataReductionProxyEventStorageDelegate::SetStorageDelegate(
-    DataReductionProxyEventStorageDelegate* delegate) {
-  delegate_ = delegate;
-}
-
-void TestDataReductionProxyEventStorageDelegate::AddEvent(
-    std::unique_ptr<base::Value> event) {
-  if (delegate_)
-    delegate_->AddEvent(std::move(event));
-}
-
-void TestDataReductionProxyEventStorageDelegate::AddEnabledEvent(
-    std::unique_ptr<base::Value> event,
-    bool enabled) {
-  if (delegate_)
-    delegate_->AddEnabledEvent(std::move(event), enabled);
-}
-
-void TestDataReductionProxyEventStorageDelegate::AddAndSetLastBypassEvent(
-    std::unique_ptr<base::Value> event,
-    int64_t expiration_ticks) {
-  if (delegate_)
-    delegate_->AddAndSetLastBypassEvent(std::move(event), expiration_ticks);
-}
-
-void TestDataReductionProxyEventStorageDelegate::
-    AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> event,
-                                     SecureProxyCheckState state) {
-  if (delegate_)
-    delegate_->AddEventAndSecureProxyCheckState(std::move(event), state);
-}
-
-}  // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h
deleted file mode 100644
index 795defc..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h
+++ /dev/null
@@ -1,47 +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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_TEST_UTILS_H_
-#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_TEST_UTILS_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
-
-namespace base {
-class Value;
-}
-
-namespace data_reduction_proxy {
-
-class TestDataReductionProxyEventStorageDelegate
-    : public DataReductionProxyEventStorageDelegate {
- public:
-  TestDataReductionProxyEventStorageDelegate();
-
-  virtual ~TestDataReductionProxyEventStorageDelegate();
-
-  // Sets |delegate_| at a later point in time.
-  void SetStorageDelegate(DataReductionProxyEventStorageDelegate* delegate);
-
-  // Overrides of DataReductionProxyEventStorageDelegate:
-  void AddEvent(std::unique_ptr<base::Value> event) override;
-  void AddEnabledEvent(std::unique_ptr<base::Value> event,
-                       bool enabled) override;
-  void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> event,
-                                int64_t expiration_ticks) override;
-  void AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> event,
-                                        SecureProxyCheckState state) override;
-
- private:
-  // If not null, |this| will send DataReductionProxyEventStorageDelegate
-  // calls to |delegate_|.
-  DataReductionProxyEventStorageDelegate* delegate_;
-};
-
-}  // namespace data_reduction_proxy
-
-#endif  // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_TEST_UTILS_H_
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
deleted file mode 100644
index 00ec92cd..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
+++ /dev/null
@@ -1,276 +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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
-
-#include <stddef.h>
-
-#include <utility>
-
-#include "base/json/json_writer.h"
-#include "base/stl_util.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_piece.h"
-#include "base/strings/string_util.h"
-#include "base/time/time.h"
-#include "base/values.h"
-
-namespace {
-
-const size_t kMaxEventsToStore = 100;
-
-// Used by Data Reduction Proxy feedback reports. If the last bypass happened in
-// the last 5 minutes, the url will be cropped to only the host.
-const int kLastBypassTimeDeltaInMinutes = 5;
-
-struct StringToConstant {
-  const char* name;
-  const int constant;
-};
-
-// Creates an associative array of the enum name to enum value for
-// DataReductionProxyBypassType. Ensures that the same enum space is used
-// without having to keep an enum map in sync.
-const StringToConstant kDataReductionProxyBypassEventTypeTable[] = {
-#define BYPASS_EVENT_TYPE(label, value) { \
-    # label, data_reduction_proxy::BYPASS_EVENT_TYPE_ ## label },
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypass_type_list.h"
-#undef BYPASS_EVENT_TYPE
-};
-
-// Creates an associate array of the enum name to enum value for
-// DataReductionProxyBypassAction. Ensures that the same enum space is used
-// without having to keep an enum map in sync.
-const StringToConstant kDataReductionProxyBypassActionTypeTable[] = {
-#define BYPASS_ACTION_TYPE(label, value)                       \
-  { #label, data_reduction_proxy::BYPASS_ACTION_TYPE_##label } \
-  ,
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypass_action_list.h"
-#undef BYPASS_ACTION_TYPE
-};
-
-std::string JoinListValueStrings(base::ListValue* list_value) {
-  std::vector<base::StringPiece> values;
-  for (const auto& value : *list_value) {
-    base::StringPiece value_string;
-    if (!value.GetAsString(&value_string))
-      return std::string();
-
-    values.push_back(value_string);
-  }
-
-  return base::JoinString(values, ";");
-}
-
-}  // namespace
-
-namespace data_reduction_proxy {
-
-// static
-void DataReductionProxyEventStore::AddConstants(
-    base::DictionaryValue* constants_dict) {
-  auto dict = std::make_unique<base::DictionaryValue>();
-  for (size_t i = 0;
-       i < arraysize(kDataReductionProxyBypassEventTypeTable); ++i) {
-    dict->SetInteger(kDataReductionProxyBypassEventTypeTable[i].name,
-                     kDataReductionProxyBypassEventTypeTable[i].constant);
-  }
-
-  constants_dict->Set("dataReductionProxyBypassEventType", std::move(dict));
-
-  dict = std::make_unique<base::DictionaryValue>();
-  for (size_t i = 0; i < arraysize(kDataReductionProxyBypassActionTypeTable);
-       ++i) {
-    dict->SetInteger(kDataReductionProxyBypassActionTypeTable[i].name,
-                     kDataReductionProxyBypassActionTypeTable[i].constant);
-  }
-
-  constants_dict->Set("dataReductionProxyBypassActionType", std::move(dict));
-}
-
-DataReductionProxyEventStore::DataReductionProxyEventStore()
-    : oldest_event_index_(0),
-      enabled_(false),
-      secure_proxy_check_state_(CHECK_UNKNOWN),
-      expiration_ticks_(0) {}
-
-DataReductionProxyEventStore::~DataReductionProxyEventStore() {
-}
-
-std::unique_ptr<base::DictionaryValue>
-DataReductionProxyEventStore::GetSummaryValue() const {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  auto data_reduction_proxy_values = std::make_unique<base::DictionaryValue>();
-  data_reduction_proxy_values->SetBoolean("enabled", enabled_);
-  if (current_configuration_) {
-    data_reduction_proxy_values->SetKey("proxy_config",
-                                        current_configuration_->Clone());
-  }
-
-  switch (secure_proxy_check_state_) {
-    case CHECK_PENDING:
-      data_reduction_proxy_values->SetString("probe", "Pending");
-      break;
-    case CHECK_SUCCESS:
-      data_reduction_proxy_values->SetString("probe", "Success");
-      break;
-    case CHECK_FAILED:
-      data_reduction_proxy_values->SetString("probe", "Failed");
-      break;
-    case CHECK_UNKNOWN:
-      break;
-  }
-
-  base::Value* last_bypass_event = last_bypass_event_.get();
-  if (last_bypass_event) {
-    int current_time_ticks_ms =
-        (base::TimeTicks::Now() - base::TimeTicks()).InMilliseconds();
-    if (expiration_ticks_ > current_time_ticks_ms) {
-      data_reduction_proxy_values->SetKey("last_bypass",
-                                          last_bypass_event->Clone());
-    }
-  }
-
-  auto events_list = std::make_unique<base::ListValue>();
-
-  DCHECK(oldest_event_index_ == 0 ||
-         stored_events_.size() == kMaxEventsToStore);
-  for (size_t i = oldest_event_index_; i < stored_events_.size(); ++i)
-    events_list->Append(stored_events_[i]->CreateDeepCopy());
-  for (size_t i = 0; i < oldest_event_index_; ++i)
-    events_list->Append(stored_events_[i]->CreateDeepCopy());
-
-  data_reduction_proxy_values->Set("events", std::move(events_list));
-  return data_reduction_proxy_values;
-}
-
-void DataReductionProxyEventStore::AddEvent(
-    std::unique_ptr<base::Value> event) {
-  if (stored_events_.size() < kMaxEventsToStore) {
-    stored_events_.push_back(std::move(event));
-    return;
-  }
-  DCHECK_EQ(kMaxEventsToStore, stored_events_.size());
-
-  stored_events_[oldest_event_index_++] = std::move(event);
-  if (oldest_event_index_ >= stored_events_.size())
-    oldest_event_index_ = 0;
-}
-
-void DataReductionProxyEventStore::AddEnabledEvent(
-    std::unique_ptr<base::Value> event,
-    bool enabled) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  enabled_ = enabled;
-  if (enabled)
-    current_configuration_.reset(event->DeepCopy());
-  else
-    current_configuration_.reset();
-  AddEvent(std::move(event));
-}
-
-void DataReductionProxyEventStore::AddEventAndSecureProxyCheckState(
-    std::unique_ptr<base::Value> event,
-    SecureProxyCheckState state) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  secure_proxy_check_state_ = state;
-  AddEvent(std::move(event));
-}
-
-void DataReductionProxyEventStore::AddAndSetLastBypassEvent(
-    std::unique_ptr<base::Value> event,
-    int64_t expiration_ticks) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  last_bypass_event_.reset(event->DeepCopy());
-  expiration_ticks_ = expiration_ticks;
-  AddEvent(std::move(event));
-}
-
-std::string DataReductionProxyEventStore::GetHttpProxyList() const {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  if (!enabled_ || !current_configuration_)
-    return std::string();
-
-  base::DictionaryValue* config_dict;
-  if (!current_configuration_->GetAsDictionary(&config_dict))
-    return std::string();
-
-  base::DictionaryValue* params_dict;
-  if (!config_dict->GetDictionary("params", &params_dict))
-    return std::string();
-
-  base::ListValue* proxy_list;
-  if (!params_dict->GetList("http_proxy_list", &proxy_list))
-    return std::string();
-
-  return JoinListValueStrings(proxy_list);
-}
-
-std::string DataReductionProxyEventStore::SanitizedLastBypassEvent() const {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  if (!enabled_ || !last_bypass_event_)
-    return std::string();
-
-  base::DictionaryValue* bypass_dict;
-  base::DictionaryValue* params_dict;
-  if (!last_bypass_event_->GetAsDictionary(&bypass_dict))
-    return std::string();
-
-  if (!bypass_dict->GetDictionary("params", &params_dict))
-    return std::string();
-
-  // Explicitly add parameters to prevent automatic adding of new parameters.
-  auto last_bypass = std::make_unique<base::DictionaryValue>();
-
-  std::string str_value;
-  int int_value;
-  if (params_dict->GetInteger("bypass_type", &int_value))
-    last_bypass->SetInteger("bypass_type", int_value);
-
-  if (params_dict->GetInteger("bypass_action_type", &int_value))
-    last_bypass->SetInteger("bypass_action", int_value);
-
-  if (params_dict->GetString("bypass_duration_seconds", &str_value))
-    last_bypass->SetString("bypass_seconds", str_value);
-
-  bool truncate_url_to_host = true;
-  if (bypass_dict->GetString("time", &str_value)) {
-    last_bypass->SetString("bypass_time", str_value);
-
-    int64_t bypass_ticks_ms;
-    base::StringToInt64(str_value, &bypass_ticks_ms);
-
-    base::TimeTicks bypass_ticks =
-        base::TimeTicks() + base::TimeDelta::FromMilliseconds(bypass_ticks_ms);
-
-    // If the last bypass happened in the last 5 minutes, don't crop the url to
-    // the host.
-    if (base::TimeTicks::Now() - bypass_ticks <
-        base::TimeDelta::FromMinutes(kLastBypassTimeDeltaInMinutes)) {
-      truncate_url_to_host = false;
-    }
-  }
-
-  if (params_dict->GetString("method", &str_value))
-    last_bypass->SetString("method", str_value);
-
-  if (params_dict->GetString("url", &str_value)) {
-    GURL url(str_value);
-    if (truncate_url_to_host) {
-      last_bypass->SetString("url", url.host());
-    } else {
-      GURL::Replacements replacements;
-      replacements.ClearQuery();
-      GURL clean_url = url.ReplaceComponents(replacements);
-      last_bypass->SetString("url", clean_url.spec());
-    }
-  }
-
-  std::string json;
-  base::JSONWriter::Write(*last_bypass, &json);
-  return json;
-}
-
-}  // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
deleted file mode 100644
index 28584e0..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
+++ /dev/null
@@ -1,98 +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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_H_
-#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_H_
-
-#include <stdint.h>
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/threading/thread_checker.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
-
-namespace base {
-class DictionaryValue;
-class Value;
-}
-
-namespace data_reduction_proxy {
-
-class DataReductionProxyEventStore
-    : public DataReductionProxyEventStorageDelegate {
- public:
-  // Adds data reduction proxy specific constants to the net_internals
-  // constants dictionary.
-  static void AddConstants(base::DictionaryValue* constants_dict);
-
-  // Constructs a DataReductionProxyEventStore object.
-  DataReductionProxyEventStore();
-
-  virtual ~DataReductionProxyEventStore();
-
-  // Creates a Value summary of Data Reduction Proxy related information:
-  // - Whether the proxy is enabled,
-  // - The proxy configuration,
-  // - The state of the last secure proxy check response,
-  // - A stream of the last Data Reduction Proxy related events.
-  std::unique_ptr<base::DictionaryValue> GetSummaryValue() const;
-
-  // Adds DATA_REDUCTION_PROXY event with no parameters to the event store.
-  void AddEvent(std::unique_ptr<base::Value> event) override;
-
-  // Override of DataReductionProxyEventStorageDelegate.
-  // Adds |entry| to the event store and sets |current_configuration_|.
-  void AddEnabledEvent(std::unique_ptr<base::Value> entry,
-                       bool enabled) override;
-
-  // Override of DataReductionProxyEventStorageDelegate.
-  // Adds |entry| to the event store and sets |secure_proxy_check_state_|.
-  void AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> entry,
-                                        SecureProxyCheckState state) override;
-
-  // Override of DataReductionProxyEventStorageDelegate.
-  // Adds |entry| to the event store and sets |last_bypass_event_| and
-  // |expiration_ticks_|.
-  void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> entry,
-                                int64_t expiration_ticks) override;
-
-  // Returns the list of proxy servers for HTTP origins.
-  std::string GetHttpProxyList() const;
-
-  // Returns a sanitized version of the last seen bypass event.
-  std::string SanitizedLastBypassEvent() const;
-
- private:
-  friend class DataReductionProxyEventStoreTest;
-
-  // A vector of data reduction proxy related events. It is used as a circular
-  // buffer to prevent unbounded memory utilization.
-  std::vector<std::unique_ptr<base::Value>> stored_events_;
-  // The index of the oldest event in |stored_events_|.
-  size_t oldest_event_index_;
-
-  // Whether the data reduction proxy is enabled or not.
-  bool enabled_;
-  // The current data reduction proxy configuration.
-  std::unique_ptr<base::Value> current_configuration_;
-  // The state based on the last secure proxy check.
-  SecureProxyCheckState secure_proxy_check_state_;
-  // The last seen data reduction proxy bypass event.
-  std::unique_ptr<base::Value> last_bypass_event_;
-  // The expiration time of the |last_bypass_event_|.
-  int64_t expiration_ticks_;
-
-  // Enforce usage on the UI thread.
-  base::ThreadChecker thread_checker_;
-
-  DISALLOW_COPY_AND_ASSIGN(DataReductionProxyEventStore);
-};
-
-}  // namespace data_reduction_proxy
-
-#endif  // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_STORE_H_
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
deleted file mode 100644
index 8f822f3..0000000
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
+++ /dev/null
@@ -1,331 +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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
-
-#include <stddef.h>
-
-#include <memory>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "base/bind.h"
-#include "base/json/json_writer.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/time/default_clock.h"
-#include "base/time/time.h"
-#include "base/values.h"
-#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h"
-#include "components/data_reduction_proxy/core/browser/network_properties_manager.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
-#include "components/prefs/pref_registry_simple.h"
-#include "components/prefs/testing_pref_service.h"
-#include "net/base/host_port_pair.h"
-#include "net/base/net_errors.h"
-#include "net/base/proxy_server.h"
-#include "net/http/http_status_code.h"
-#include "net/log/net_log.h"
-#include "net/log/net_log_event_type.h"
-#include "net/log/net_log_source_type.h"
-#include "net/log/net_log_with_source.h"
-#include "net/log/test_net_log.h"
-#include "net/log/test_net_log_entry.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace data_reduction_proxy {
-
-class DataReductionProxyEventStoreTest : public testing::Test {
- public:
-  DataReductionProxyEventStoreTest() : net_log_(new net::TestNetLog()) {
-    net_log_with_source_ = net::NetLogWithSource::Make(
-        net_log_.get(), net::NetLogSourceType::DATA_REDUCTION_PROXY);
-  }
-
-  void SetUp() override {
-    event_store_.reset(new DataReductionProxyEventStore());
-    event_creator_.reset(
-        new DataReductionProxyEventCreator(event_store_.get()));
-  }
-
-  net::TestNetLogEntry GetSingleEntry() const {
-    net::TestNetLogEntry::List entries;
-    net_log_->GetEntries(&entries);
-    EXPECT_EQ(1u, entries.size());
-    return entries[0];
-  }
-
-  net::TestNetLogEntry GetLatestEntry() const {
-    net::TestNetLogEntry::List entries;
-    net_log_->GetEntries(&entries);
-    return entries.back();
-  }
-
-  DataReductionProxyEventStore* event_store() { return event_store_.get(); }
-
-  DataReductionProxyEventCreator* event_creator() {
-    return event_creator_.get();
-  }
-
-  net::TestNetLog* net_log() { return net_log_.get(); }
-
-  const net::NetLogWithSource& net_log_with_source() {
-    return net_log_with_source_;
-  }
-
-  size_t event_count() const { return event_store_->stored_events_.size(); }
-
-  DataReductionProxyEventStorageDelegate::SecureProxyCheckState
-  secure_proxy_check_state() const {
-    return event_store_->secure_proxy_check_state_;
-  }
-
-  base::Value* last_bypass_event() const {
-    return event_store_->last_bypass_event_.get();
-  }
-
- private:
-  std::unique_ptr<net::TestNetLog> net_log_;
-  std::unique_ptr<DataReductionProxyEventStore> event_store_;
-  std::unique_ptr<DataReductionProxyEventCreator> event_creator_;
-  net::NetLogWithSource net_log_with_source_;
-};
-
-TEST_F(DataReductionProxyEventStoreTest, TestAddProxyEnabledEvent) {
-  EXPECT_EQ(0u, event_count());
-  std::vector<net::ProxyServer> proxies_for_http;
-  event_creator()->AddProxyEnabledEvent(net_log(), false, proxies_for_http);
-  EXPECT_EQ(1u, event_count());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_ENABLED, entry.type);
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestAddProxyDisabledEvent) {
-  EXPECT_EQ(0u, event_count());
-  event_creator()->AddProxyDisabledEvent(net_log());
-  EXPECT_EQ(1u, event_count());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_ENABLED, entry.type);
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestAddBypassActionEvent) {
-  EXPECT_EQ(0u, event_count());
-  EXPECT_EQ(nullptr, last_bypass_event());
-  event_creator()->AddBypassActionEvent(
-      net_log_with_source(), BYPASS_ACTION_TYPE_BYPASS, "GET", GURL(), false,
-      base::TimeDelta::FromMinutes(1));
-  EXPECT_EQ(1u, event_count());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
-            entry.type);
-  EXPECT_NE(nullptr, last_bypass_event());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestAddBypassTypeEvent) {
-  EXPECT_EQ(0u, event_count());
-  EXPECT_EQ(nullptr, last_bypass_event());
-  event_creator()->AddBypassTypeEvent(net_log_with_source(),
-                                      BYPASS_EVENT_TYPE_LONG, "GET", GURL(),
-                                      false, base::TimeDelta::FromMinutes(1));
-  EXPECT_EQ(1u, event_count());
-  EXPECT_EQ(1u, net_log()->GetSize());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
-            entry.type);
-  EXPECT_NE(nullptr, last_bypass_event());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestAddProxyFallbackEvent) {
-  EXPECT_EQ(0u, event_count());
-  event_creator()->AddProxyFallbackEvent(net_log(), "bad_proxy",
-                                         net::ERR_PROXY_CONNECTION_FAILED);
-  EXPECT_EQ(1u, event_count());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_FALLBACK, entry.type);
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestBeginSecureProxyCheck) {
-  EXPECT_EQ(0u, event_count());
-  EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_UNKNOWN,
-            secure_proxy_check_state());
-  event_creator()->BeginSecureProxyCheck(net_log_with_source(), GURL());
-  EXPECT_EQ(1u, event_count());
-  EXPECT_EQ(1u, net_log()->GetSize());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_CANARY_REQUEST,
-            entry.type);
-  EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_PENDING,
-            secure_proxy_check_state());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestEndSecureProxyCheck) {
-  EXPECT_EQ(0u, event_count());
-  EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_UNKNOWN,
-            secure_proxy_check_state());
-  event_creator()->EndSecureProxyCheck(net_log_with_source(), 0, net::HTTP_OK,
-                                       true);
-  EXPECT_EQ(1u, event_count());
-  EXPECT_EQ(1u, net_log()->GetSize());
-  net::TestNetLogEntry entry = GetSingleEntry();
-  EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_CANARY_REQUEST,
-            entry.type);
-  EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_SUCCESS,
-            secure_proxy_check_state());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestEndSecureProxyCheckFailed) {
-  const struct {
-    const char* test_case;
-    int net_error;
-    int http_response_code;
-    bool secure_proxy_check_succeeded;
-    bool expected_proxy_check_succeeded;
-  } tests[] = {
-      {
-       "Succeeded", net::OK, net::HTTP_OK, true, true,
-      },
-      {
-       "Net failure", net::ERR_CONNECTION_RESET, -1, false, false,
-      },
-      {
-       "HTTP failure", net::OK, net::HTTP_NOT_FOUND, false, false,
-      },
-      {
-       "Bad content", net::OK, net::HTTP_OK, false, false,
-      },
-  };
-  size_t expected_event_count = 0;
-  EXPECT_EQ(expected_event_count, net_log()->GetSize());
-  EXPECT_EQ(expected_event_count++, event_count());
-  EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_UNKNOWN,
-            secure_proxy_check_state());
-  for (const auto& test : tests) {
-    event_creator()->EndSecureProxyCheck(net_log_with_source(), test.net_error,
-                                         test.http_response_code,
-                                         test.secure_proxy_check_succeeded);
-    EXPECT_EQ(expected_event_count, net_log()->GetSize()) << test.test_case;
-    EXPECT_EQ(expected_event_count++, event_count()) << test.test_case;
-    net::TestNetLogEntry entry = GetLatestEntry();
-    EXPECT_EQ(net::NetLogEventType::DATA_REDUCTION_PROXY_CANARY_REQUEST,
-              entry.type)
-        << test.test_case;
-    EXPECT_EQ(test.secure_proxy_check_succeeded
-                  ? DataReductionProxyEventStorageDelegate::CHECK_SUCCESS
-                  : DataReductionProxyEventStorageDelegate::CHECK_FAILED,
-              secure_proxy_check_state())
-        << test.test_case;
-  }
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestFeedbackMethods) {
-  base::MessageLoopForIO loop;
-  TestingPrefServiceSimple test_prefs;
-  test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
-  NetworkPropertiesManager manager(base::DefaultClock::GetInstance(),
-                                   &test_prefs,
-                                   base::ThreadTaskRunnerHandle::Get());
-  DataReductionProxyConfigurator configurator(net_log(), event_creator());
-  EXPECT_EQ(std::string(), event_store()->GetHttpProxyList());
-  EXPECT_EQ(std::string(), event_store()->SanitizedLastBypassEvent());
-
-  std::vector<DataReductionProxyServer> http_proxies;
-  http_proxies.push_back(DataReductionProxyServer(
-      net::ProxyServer(net::ProxyServer::SCHEME_HTTP,
-                       net::HostPortPair("foo.com", 80)),
-      ProxyServer::CORE));
-  http_proxies.push_back(DataReductionProxyServer(
-      net::ProxyServer(net::ProxyServer::SCHEME_HTTPS,
-                       net::HostPortPair("bar.com", 443)),
-      ProxyServer::CORE));
-  configurator.Enable(manager, http_proxies);
-  EXPECT_EQ("foo.com:80;https://bar.com:443",
-            event_store()->GetHttpProxyList());
-
-  configurator.Disable();
-  EXPECT_EQ(std::string(), event_store()->GetHttpProxyList());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestFeedbackLastBypassEventFullURL) {
-  base::MessageLoopForIO loop;
-  TestingPrefServiceSimple test_prefs;
-  test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
-  NetworkPropertiesManager manager(base::DefaultClock::GetInstance(),
-                                   &test_prefs,
-                                   base::ThreadTaskRunnerHandle::Get());
-  DataReductionProxyConfigurator configurator(net_log(), event_creator());
-  std::vector<DataReductionProxyServer> http_proxies;
-  configurator.Enable(manager, http_proxies);
-
-  std::unique_ptr<base::DictionaryValue> bypass_event(
-      new base::DictionaryValue());
-  std::unique_ptr<base::DictionaryValue> bypass_params(
-      new base::DictionaryValue());
-  std::unique_ptr<base::DictionaryValue> sanitized_event(
-      new base::DictionaryValue());
-
-  // Set bypass event time to be 4 minutes ago.
-  std::string time = net::NetLog::TickCountToString(
-      base::TimeTicks::Now() - base::TimeDelta::FromMinutes(4));
-  bypass_event->SetString("time", time);
-  sanitized_event->SetString("bypass_time", time);
-  bypass_params->SetInteger("bypass_type", 4);
-  sanitized_event->SetInteger("bypass_type", 4);
-  bypass_params->SetString("bypass_duration_seconds", "40");
-  sanitized_event->SetString("bypass_seconds", "40");
-  bypass_params->SetString("url", "http://www.foo.com/bar?baz=1234");
-  sanitized_event->SetString("url", "http://www.foo.com/bar");
-  bypass_params->SetString("method", "GET");
-  sanitized_event->SetString("method", "GET");
-
-  bypass_event->Set("params", std::move(bypass_params));
-  std::string sanitized_output;
-  base::JSONWriter::Write(*sanitized_event, &sanitized_output);
-  event_store()->AddAndSetLastBypassEvent(std::move(bypass_event), 0);
-  EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent());
-}
-
-TEST_F(DataReductionProxyEventStoreTest, TestFeedbackLastBypassEventHostOnly) {
-  base::MessageLoopForIO loop;
-  TestingPrefServiceSimple test_prefs;
-  test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
-  NetworkPropertiesManager manager(base::DefaultClock::GetInstance(),
-                                   &test_prefs,
-                                   base::ThreadTaskRunnerHandle::Get());
-  DataReductionProxyConfigurator configurator(net_log(), event_creator());
-  std::vector<DataReductionProxyServer> http_proxies;
-  configurator.Enable(manager, http_proxies);
-
-  std::unique_ptr<base::DictionaryValue> bypass_event(
-      new base::DictionaryValue());
-  std::unique_ptr<base::DictionaryValue> bypass_params(
-      new base::DictionaryValue());
-  std::unique_ptr<base::DictionaryValue> sanitized_event(
-      new base::DictionaryValue());
-
-  // Set bypass event time to be 6 minutes ago.
-  std::string time = net::NetLog::TickCountToString(
-      base::TimeTicks::Now() - base::TimeDelta::FromMinutes(6));
-  bypass_event->SetString("time", time);
-  sanitized_event->SetString("bypass_time", time);
-  bypass_params->SetInteger("bypass_type", 4);
-  sanitized_event->SetInteger("bypass_type", 4);
-  bypass_params->SetString("bypass_duration_seconds", "40");
-  sanitized_event->SetString("bypass_seconds", "40");
-  bypass_params->SetString("url", "http://www.foo.com/bar?baz=1234");
-  sanitized_event->SetString("url", "www.foo.com");
-  bypass_params->SetString("method", "GET");
-  sanitized_event->SetString("method", "GET");
-
-  bypass_event->Set("params", std::move(bypass_params));
-  std::string sanitized_output;
-  base::JSONWriter::Write(*sanitized_event, &sanitized_output);
-  event_store()->AddAndSetLastBypassEvent(std::move(bypass_event), 0);
-  EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent());
-}
-
-}  // namespace data_reduction_proxy
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 aeb892b..a68cafc 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
@@ -17,7 +17,6 @@
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/time/time.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
 #include "net/http/http_response_headers.h"
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc
index 71031e8cff..5cf27c5 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc
@@ -14,8 +14,6 @@
 #include "base/metrics/field_trial.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/test/scoped_feature_list.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers_test_utils.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
@@ -26,24 +24,7 @@
 
 namespace data_reduction_proxy {
 
-class DataReductionProxyHeadersTest : public testing::Test {
- protected:
-  void SetUp() override {
-    storage_delegate_.reset(new TestDataReductionProxyEventStorageDelegate());
-    event_creator_.reset(
-        new DataReductionProxyEventCreator(storage_delegate_.get()));
-  }
-
-  DataReductionProxyEventCreator* event_creator() const {
-    return event_creator_.get();
-  }
-
- private:
-  std::unique_ptr<DataReductionProxyEventCreator> event_creator_;
-  std::unique_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate_;
-};
-
-TEST_F(DataReductionProxyHeadersTest, IsEmptyImagePreview) {
+TEST(DataReductionProxyHeadersTest, IsEmptyImagePreview) {
   const struct {
     const char* headers;
     bool expected_result;
@@ -91,7 +72,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, IsEmptyImagePreviewValue) {
+TEST(DataReductionProxyHeadersTest, IsEmptyImagePreviewValue) {
   const struct {
     const char* chrome_proxy_content_transform_header;
     const char* chrome_proxy_header;
@@ -112,7 +93,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, IsLitePagePreview) {
+TEST(DataReductionProxyHeadersTest, IsLitePagePreview) {
   const struct {
     const char* headers;
     bool expected_result;
@@ -160,7 +141,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, GetDataReductionProxyActionValue) {
+TEST(DataReductionProxyHeadersTest, GetDataReductionProxyActionValue) {
   const struct {
      const char* headers;
      std::string action_key;
@@ -254,7 +235,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, GetProxyBypassInfo) {
+TEST(DataReductionProxyHeadersTest, GetProxyBypassInfo) {
   const struct {
      const char* headers;
      bool expected_result;
@@ -506,7 +487,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, ParseHeadersAndSetProxyInfo) {
+TEST(DataReductionProxyHeadersTest, ParseHeadersAndSetProxyInfo) {
   std::string headers =
       "HTTP/1.1 200 OK\n"
       "connection: keep-alive\n"
@@ -523,7 +504,7 @@
   EXPECT_FALSE(data_reduction_proxy_info.bypass_all);
 }
 
-TEST_F(DataReductionProxyHeadersTest, HasDataReductionProxyViaHeader) {
+TEST(DataReductionProxyHeadersTest, HasDataReductionProxyViaHeader) {
   const struct {
     const char* headers;
     bool expected_result;
@@ -621,7 +602,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, MissingViaHeaderFallback) {
+TEST(DataReductionProxyHeadersTest, MissingViaHeaderFallback) {
   const struct {
     const char* headers;
     bool should_retry;
@@ -666,7 +647,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, BypassMissingViaIfExperiment) {
+TEST(DataReductionProxyHeadersTest, BypassMissingViaIfExperiment) {
   const struct {
     const char* headers;
     std::map<std::string, std::string> feature_parameters;
@@ -716,7 +697,7 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest, GetDataReductionProxyBypassEventType) {
+TEST(DataReductionProxyHeadersTest, GetDataReductionProxyBypassEventType) {
   const struct {
      const char* headers;
      DataReductionProxyBypassType expected_result;
@@ -850,8 +831,8 @@
   }
 }
 
-TEST_F(DataReductionProxyHeadersTest,
-       GetDataReductionProxyBypassEventTypeURLRedirectCycle) {
+TEST(DataReductionProxyHeadersTest,
+     GetDataReductionProxyBypassEventTypeURLRedirectCycle) {
   const struct {
     const char* headers;
     std::vector<GURL> url_chain;
diff --git a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
index db2d88d..933c7ce 100644
--- a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
+++ b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
@@ -111,8 +111,13 @@
 
 }  // namespace
 
+#if defined(OS_WIN)
+#define MAYBE_TestIsDistillablePage DISABLED_TestIsDistillablePage
+#else
+#define MAYBE_TestIsDistillablePage TestIsDistillablePage
+#endif
 IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
-                       TestIsDistillablePage) {
+                       MAYBE_TestIsDistillablePage) {
   std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
   proto->set_num_features(kDerivedFeaturesCount);
   proto->set_num_stumps(1);
@@ -136,8 +141,13 @@
   ASSERT_TRUE(holder.GetResult());
 }
 
+#if defined(OS_WIN)
+#define MAYBE_TestIsNotDistillablePage DISABLED_TestIsNotDistillablePage
+#else
+#define MAYBE_TestIsNotDistillablePage TestIsNotDistillablePage
+#endif
 IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
-                       TestIsNotDistillablePage) {
+                       MAYBE_TestIsNotDistillablePage) {
   std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
   proto->set_num_features(kDerivedFeaturesCount);
   proto->set_num_stumps(1);
diff --git a/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
index 1fb0fad..63536be 100644
--- a/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
+++ b/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
@@ -182,7 +182,13 @@
   bool new_web_contents_created_;
 };
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, BasicDistillationWorks) {
+#if defined(OS_WIN)
+#define MAYBE_BasicDistillationWorks DISABLED_BasicDistillationWorks
+#else
+#define MAYBE_BasicDistillationWorks BasicDistillationWorks
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
+                       MAYBE_BasicDistillationWorks) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -202,7 +208,13 @@
   EXPECT_EQ("", distiller_result_->pagination_info().prev_page());
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, HandlesRelativeLinks) {
+#if defined(OS_WIN)
+#define MAYBE_HandlesRelativeLinks DISABLED_HandlesRelativeLinks
+#else
+#define MAYBE_HandlesRelativeLinks HandlesRelativeLinks
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
+                       MAYBE_HandlesRelativeLinks) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -220,7 +232,13 @@
               HasSubstr("href=\"http://www.google.com/absolutelink.html\""));
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, HandlesRelativeImages) {
+#if defined(OS_WIN)
+#define MAYBE_HandlesRelativeImages DISABLED_HandlesRelativeImages
+#else
+#define MAYBE_HandlesRelativeImages HandlesRelativeImages
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
+                       MAYBE_HandlesRelativeImages) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -238,7 +256,13 @@
               HasSubstr("src=\"http://www.google.com/absoluteimage.png\""));
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, HandlesRelativeVideos) {
+#if defined(OS_WIN)
+#define MAYBE_HandlesRelativeVideos DISABLED_HandlesRelativeVideos
+#else
+#define MAYBE_HandlesRelativeVideos HandlesRelativeVideos
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
+                       MAYBE_HandlesRelativeVideos) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -261,7 +285,13 @@
               HasSubstr("src=\"http://www.google.com/absolute_track_fr.vtt\""));
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, VisibilityDetection) {
+#if defined(OS_WIN)
+#define MAYBE_VisibilityDetection DISABLED_VisibilityDetection
+#else
+#define MAYBE_VisibilityDetection VisibilityDetection
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
+                       MAYBE_VisibilityDetection) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -288,8 +318,14 @@
   }
 }
 
+#if defined(OS_WIN)
+#define MAYBE_UsingCurrentWebContentsWrongUrl \
+  DISABLED_UsingCurrentWebContentsWrongUrl
+#else
+#define MAYBE_UsingCurrentWebContentsWrongUrl UsingCurrentWebContentsWrongUrl
+#endif
 IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       UsingCurrentWebContentsWrongUrl) {
+                       MAYBE_UsingCurrentWebContentsWrongUrl) {
   std::string url("/bogus");
   bool expect_new_web_contents = true;
   bool setup_main_frame_observer = true;
@@ -300,8 +336,15 @@
                                wait_for_document_loaded);
 }
 
+#if defined(OS_WIN)
+#define MAYBE_UsingCurrentWebContentsNoMainFrameObserver \
+  DISABLED_UsingCurrentWebContentsNoMainFrameObserver
+#else
+#define MAYBE_UsingCurrentWebContentsNoMainFrameObserver \
+  UsingCurrentWebContentsNoMainFrameObserver
+#endif
 IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       UsingCurrentWebContentsNoMainFrameObserver) {
+                       MAYBE_UsingCurrentWebContentsNoMainFrameObserver) {
   std::string url(kSimpleArticlePath);
   bool expect_new_web_contents = true;
   bool setup_main_frame_observer = false;
@@ -312,8 +355,15 @@
                                wait_for_document_loaded);
 }
 
+#if defined(OS_WIN)
+#define MAYBE_UsingCurrentWebContentsNotFinishedLoadingYet \
+  DISABLED_UsingCurrentWebContentsNotFinishedLoadingYet
+#else
+#define MAYBE_UsingCurrentWebContentsNotFinishedLoadingYet \
+  UsingCurrentWebContentsNotFinishedLoadingYet
+#endif
 IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       UsingCurrentWebContentsNotFinishedLoadingYet) {
+                       MAYBE_UsingCurrentWebContentsNotFinishedLoadingYet) {
   std::string url(kSimpleArticlePath);
   bool expect_new_web_contents = false;
   bool setup_main_frame_observer = true;
@@ -324,8 +374,15 @@
                                wait_for_document_loaded);
 }
 
+#if defined(OS_WIN)
+#define MAYBE_UsingCurrentWebContentsReadyForDistillation \
+  DISABLED_UsingCurrentWebContentsReadyForDistillation
+#else
+#define MAYBE_UsingCurrentWebContentsReadyForDistillation \
+  UsingCurrentWebContentsReadyForDistillation
+#endif
 IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       UsingCurrentWebContentsReadyForDistillation) {
+                       MAYBE_UsingCurrentWebContentsReadyForDistillation) {
   std::string url(kSimpleArticlePath);
   bool expect_new_web_contents = false;
   bool setup_main_frame_observer = true;
@@ -375,9 +432,15 @@
   EXPECT_EQ("Test Page Title", distiller_result_->title());
 }
 
+#if defined(OS_WIN)
+#define MAYBE_PageDestroyedBeforeFinishDistillation \
+  DISABLED_PageDestroyedBeforeFinishDistillation
+#else
+#define MAYBE_PageDestroyedBeforeFinishDistillation \
+  PageDestroyedBeforeFinishDistillation
+#endif
 IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       PageDestroyedBeforeFinishDistillation) {
-
+                       MAYBE_PageDestroyedBeforeFinishDistillation) {
   content::WebContents* current_web_contents = shell()->web_contents();
 
   dom_distiller::WebContentsMainFrameObserver::CreateForWebContents(
@@ -416,7 +479,12 @@
   run_loop.Run();
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, MarkupInfo) {
+#if defined(OS_WIN)
+#define MAYBE_MarkupInfo DISABLED_MarkupInfo
+#else
+#define MAYBE_MarkupInfo MarkupInfo
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, MAYBE_MarkupInfo) {
   DistillerPageWebContents distiller_page(
       shell()->web_contents()->GetBrowserContext(),
       shell()->web_contents()->GetContainerBounds().size(),
@@ -488,8 +556,12 @@
   }
 }
 
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
-                       TestPinch) {
+#if defined(OS_WIN)
+#define MAYBE_TestPinch DISABLED_TestPinch
+#else
+#define MAYBE_TestPinch TestPinch
+#endif
+IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, MAYBE_TestPinch) {
   // Load the test file in content shell and wait until it has fully loaded.
   content::WebContents* web_contents = shell()->web_contents();
   dom_distiller::WebContentsMainFrameObserver::CreateForWebContents(
diff --git a/components/filename_generation/filename_generation.cc b/components/filename_generation/filename_generation.cc
index f595c37..7367041 100644
--- a/components/filename_generation/filename_generation.cc
+++ b/components/filename_generation/filename_generation.cc
@@ -12,7 +12,6 @@
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/third_party/icu/icu_utf.h"
-#include "base/threading/thread_restrictions.h"
 #include "build/build_config.h"
 #include "components/url_formatter/url_formatter.h"
 #include "net/base/filename_util.h"
@@ -61,8 +60,6 @@
 }
 
 base::FilePath EnsureHtmlExtension(const base::FilePath& name) {
-  base::AssertBlockingAllowed();
-
   base::FilePath::StringType ext = name.Extension();
   if (!ext.empty())
     ext.erase(ext.begin());  // Erase preceding '.'.
@@ -77,8 +74,6 @@
 
 base::FilePath EnsureMimeExtension(const base::FilePath& name,
                                    const std::string& contents_mime_type) {
-  base::AssertBlockingAllowed();
-
   // Start extension at 1 to skip over period if non-empty.
   base::FilePath::StringType ext = name.Extension();
   if (!ext.empty())
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
index bfbb5a29..e870684 100644
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
@@ -4,6 +4,7 @@
 
 package org.chromium.components.gcm_driver.instance_id;
 
+import android.content.Context;
 import android.content.SharedPreferences;
 import android.os.Bundle;
 
@@ -26,6 +27,7 @@
 @JNINamespace("instance_id")
 public class InstanceIDBridge {
     private static final String FCM_LAZY_SUBSCRIPTIONS = "fcm_lazy_subscriptions";
+    private static final String PREF_PACKAGE = "org.chromium.components.gcm_driver.instance_id";
     private final String mSubtype;
     private long mNativeInstanceIDAndroid;
     /**
@@ -47,7 +49,9 @@
     @VisibleForTesting
     public void storeLazinessInformation(final String authorizedEntity, boolean isLazy) {
         if (isLazy) {
-            SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
+            Context context = ContextUtils.getApplicationContext();
+            SharedPreferences sharedPrefs =
+                    context.getSharedPreferences(PREF_PACKAGE, Context.MODE_PRIVATE);
             Set<String> lazyIds = new HashSet<>(
                     sharedPrefs.getStringSet(FCM_LAZY_SUBSCRIPTIONS, Collections.emptySet()));
             lazyIds.add(buildSubscriptionUniqueId(mSubtype, authorizedEntity));
@@ -62,7 +66,9 @@
      * Returns whether the subscription with the |appId| and |senderId| is lazy.
      */
     public static boolean isSubscriptionLazy(final String appId, final String senderId) {
-        SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
+        Context context = ContextUtils.getApplicationContext();
+        SharedPreferences sharedPrefs =
+                context.getSharedPreferences(PREF_PACKAGE, Context.MODE_PRIVATE);
         Set<String> lazyIds = new HashSet<>(
                 sharedPrefs.getStringSet(FCM_LAZY_SUBSCRIPTIONS, Collections.emptySet()));
         return lazyIds.contains(buildSubscriptionUniqueId(appId, senderId));
diff --git a/components/handoff/handoff_manager.mm b/components/handoff/handoff_manager.mm
index faa70a4..d01752c7 100644
--- a/components/handoff/handoff_manager.mm
+++ b/components/handoff/handoff_manager.mm
@@ -99,7 +99,7 @@
   [self.userActivity invalidate];
 
   base::scoped_nsobject<NSUserActivity> userActivity([[NSUserActivity alloc]
-      initWithActivityType:handoff::kChromeHandoffActivityType]);
+      initWithActivityType:NSUserActivityTypeBrowsingWeb]);
   self.userActivity = userActivity;
   self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL);
   NSString* origin = handoff::StringFromOrigin(_origin);
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index 4174e55..cbe9ae2a 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -27,16 +27,12 @@
 #include "base/location.h"
 #include "base/memory/ref_counted.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/no_destructor.h"
 #include "base/single_thread_task_runner.h"
-#include "base/synchronization/lock.h"
 #include "base/task/post_task.h"
 #include "base/task_runner_util.h"
 #include "base/threading/thread.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
-#include "base/trace_event/memory_dump_manager.h"
-#include "base/trace_event/memory_dump_provider.h"
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
 #include "components/history/core/browser/download_row.h"
@@ -103,92 +99,6 @@
   // until this completes.
 }
 
-// Used for debugging 807009. This keeps a static of the number of instances of
-// AddPageMemoryDebuggingTask that have been created but not destroyed. This
-// count corresponds to the number of calls to AddPage() that have not yet been
-// processed by the HistoryBackend.
-class AddPageMemoryDebuggingTask {
- public:
-  // |real_task| is the task to actually call to HistoryBackend.
-  explicit AddPageMemoryDebuggingTask(base::OnceClosure real_task)
-      : real_task_(std::move(real_task)) {
-    base::AutoLock auto_lock(GetLock());
-    ++live_count_;
-  }
-
-  ~AddPageMemoryDebuggingTask() {
-    base::AutoLock auto_lock(GetLock());
-    DCHECK_GT(live_count_, 0);
-    --live_count_;
-  }
-
-  // Called on the background/db-thread to run the closure supplied to the
-  // constructor. The instance is deleted right after this call.
-  void RunOnDbThread() { std::move(real_task_).Run(); }
-
-  static int live_count() {
-    base::AutoLock auto_lock(GetLock());
-    return live_count_;
-  }
-
- private:
-  static base::Lock& GetLock() {
-    static base::NoDestructor<base::Lock> lock;
-    return *lock;
-  }
-
-  // The number of instances waiting to run.
-  static int live_count_;  // Guarded by getLock()
-
-  base::OnceClosure real_task_;
-
-  DISALLOW_COPY_AND_ASSIGN(AddPageMemoryDebuggingTask);
-};
-
-// static
-int AddPageMemoryDebuggingTask::live_count_ = 0;
-
-class HistoryMemoryDumpProvider : public base::trace_event::MemoryDumpProvider {
- public:
-  static HistoryMemoryDumpProvider* Get() {
-    if (!instance_)
-      instance_ = new HistoryMemoryDumpProvider();
-    return instance_;
-  }
-
-  // base::trace_event::MemoryDumpProvider:
-  bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
-                    base::trace_event::ProcessMemoryDump* pmd) override {
-    // NOTE: this may be called on any thread, see constructor.
-    base::trace_event::MemoryAllocatorDump* dump =
-        pmd->CreateAllocatorDump("history/history_service");
-    dump->AddScalar("pending_add_pages",
-                    base::trace_event::MemoryAllocatorDump::kUnitsObjects,
-                    AddPageMemoryDebuggingTask::live_count());
-    return true;
-  }
-
- private:
-  HistoryMemoryDumpProvider() {
-    // NOTE: the nullptr arg means OnMemoryDump() may be called from any
-    // thread.
-    base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
-        this, "HistoryService", nullptr);
-  }
-
-  ~HistoryMemoryDumpProvider() override {
-    base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
-        this);
-  }
-
-  static HistoryMemoryDumpProvider* instance_;
-
-  DISALLOW_COPY_AND_ASSIGN(HistoryMemoryDumpProvider);
-};
-
-// static
-HistoryMemoryDumpProvider* HistoryMemoryDumpProvider::instance_ = nullptr;
-
 }  // namespace
 
 // Sends messages from the backend to us on the main thread. This must be a
@@ -288,10 +198,7 @@
       history_client_(std::move(history_client)),
       visit_delegate_(std::move(visit_delegate)),
       backend_loaded_(false),
-      weak_ptr_factory_(this) {
-  // Make sure the HistoryMemoryDumpProvider is created and registered.
-  HistoryMemoryDumpProvider::Get();
-}
+      weak_ptr_factory_(this) {}
 
 HistoryService::~HistoryService() {
   DCHECK(thread_checker_.CalledOnValidThread());
@@ -502,13 +409,9 @@
     }
   }
 
-  auto real_task =
-      base::BindOnce(&HistoryBackend::AddPage, history_backend_, add_page_args);
-  std::unique_ptr<AddPageMemoryDebuggingTask> debug_task =
-      std::make_unique<AddPageMemoryDebuggingTask>(std::move(real_task));
   ScheduleTask(PRIORITY_NORMAL,
-               base::BindOnce(&AddPageMemoryDebuggingTask::RunOnDbThread,
-                              std::move(debug_task)));
+               base::BindOnce(&HistoryBackend::AddPage, history_backend_,
+                              add_page_args));
 }
 
 void HistoryService::AddPageNoVisitForBookmark(const GURL& url,
diff --git a/components/invalidation/impl/BUILD.gn b/components/invalidation/impl/BUILD.gn
index 32b90362..5da2b03 100644
--- a/components/invalidation/impl/BUILD.gn
+++ b/components/invalidation/impl/BUILD.gn
@@ -25,6 +25,8 @@
     "invalidator.h",
     "invalidator_registrar.cc",
     "invalidator_registrar.h",
+    "invalidator_registrar_with_memory.cc",
+    "invalidator_registrar_with_memory.h",
     "invalidator_storage.cc",
     "invalidator_storage.h",
     "mock_ack_handler.cc",
diff --git a/components/invalidation/impl/fcm_fake_invalidator.cc b/components/invalidation/impl/fcm_fake_invalidator.cc
index 6e99a0b..63d6fc7 100644
--- a/components/invalidation/impl/fcm_fake_invalidator.cc
+++ b/components/invalidation/impl/fcm_fake_invalidator.cc
@@ -16,7 +16,7 @@
 
 bool FCMFakeInvalidator::IsHandlerRegistered(
     InvalidationHandler* handler) const {
-  return registrar_.IsHandlerRegisteredForTest(handler);
+  return registrar_.IsHandlerRegistered(handler);
 }
 
 ObjectIdSet FCMFakeInvalidator::GetRegisteredIds(
diff --git a/components/invalidation/impl/fcm_invalidation_listener.cc b/components/invalidation/impl/fcm_invalidation_listener.cc
index dc466a01..a36b663 100644
--- a/components/invalidation/impl/fcm_invalidation_listener.cc
+++ b/components/invalidation/impl/fcm_invalidation_listener.cc
@@ -52,11 +52,9 @@
 }
 
 void FCMInvalidationListener::UpdateRegisteredTopics(const TopicSet& topics) {
+  ids_update_requested_ = true;
   registered_topics_ = topics;
-  if (ticl_state_ == INVALIDATIONS_ENABLED &&
-      per_user_topic_registration_manager_ && !token_.empty()) {
-    DoRegistrationUpdate();
-  }
+  DoRegistrationUpdate();
 }
 
 void FCMInvalidationListener::Ready(InvalidationClient* client) {
@@ -141,6 +139,11 @@
 }
 
 void FCMInvalidationListener::DoRegistrationUpdate() {
+  if (ticl_state_ != INVALIDATIONS_ENABLED ||
+      !per_user_topic_registration_manager_ || token_.empty() ||
+      !ids_update_requested_) {
+    return;
+  }
   per_user_topic_registration_manager_->UpdateRegisteredTopics(
       registered_topics_, token_);
 
diff --git a/components/invalidation/impl/fcm_invalidation_listener.h b/components/invalidation/impl/fcm_invalidation_listener.h
index e8febad0..1ae08b4 100644
--- a/components/invalidation/impl/fcm_invalidation_listener.h
+++ b/components/invalidation/impl/fcm_invalidation_listener.h
@@ -129,13 +129,18 @@
   // Stored to pass to |per_user_topic_registration_manager_| on start.
   TopicSet registered_topics_;
 
-  // The states of the ticl and FCN channel.
+  // The states of the ticl and FCM channel.
   InvalidatorState ticl_state_;
   InvalidatorState fcm_network_state_;
 
   std::unique_ptr<PerUserTopicRegistrationManager>
       per_user_topic_registration_manager_;
   std::string token_;
+  // Prevents call to DoRegistrationUpdate in cases when
+  // UpdateRegisteredTopics wasn't called. For example, InformTokenRecieved
+  // can trigger DoRegistrationUpdate before any invalidation handler has
+  // requested registration for topics.
+  bool ids_update_requested_ = false;
 
   base::WeakPtrFactory<FCMInvalidationListener> weak_factory_;
 
diff --git a/components/invalidation/impl/fcm_invalidation_service.cc b/components/invalidation/impl/fcm_invalidation_service.cc
index cbf8435e..78236363 100644
--- a/components/invalidation/impl/fcm_invalidation_service.cc
+++ b/components/invalidation/impl/fcm_invalidation_service.cc
@@ -29,12 +29,14 @@
     PrefService* pref_service,
     const syncer::ParseJSONCallback& parse_json,
     network::mojom::URLLoaderFactory* loader_factory)
-    : gcm_driver_(gcm_driver),
+    : invalidator_registrar_(pref_service),
+      gcm_driver_(gcm_driver),
       instance_id_driver_(instance_id_driver),
       identity_provider_(identity_provider),
       pref_service_(pref_service),
       parse_json_(parse_json),
-      loader_factory_(loader_factory) {}
+      loader_factory_(loader_factory),
+      update_was_requested_(false) {}
 
 FCMInvalidationService::~FCMInvalidationService() {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -61,8 +63,7 @@
   invalidator_.reset(invalidator);
 
   invalidator_->RegisterHandler(this);
-  CHECK(invalidator_->UpdateRegisteredIds(
-      this, invalidator_registrar_.GetAllRegisteredIds()));
+  DoUpdateRegisteredIdsIfNeeded();
 }
 
 void FCMInvalidationService::RegisterInvalidationHandler(
@@ -77,14 +78,12 @@
     syncer::InvalidationHandler* handler,
     const syncer::ObjectIdSet& ids) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+  update_was_requested_ = true;
   DVLOG(2) << "Registering ids: " << ids.size();
   syncer::TopicSet topics = ConvertIdsToTopics(ids);
   if (!invalidator_registrar_.UpdateRegisteredTopics(handler, topics))
     return false;
-  if (invalidator_) {
-    CHECK(invalidator_->UpdateRegisteredIds(
-        this, invalidator_registrar_.GetAllRegisteredIds()));
-  }
+  DoUpdateRegisteredIdsIfNeeded();
   logger_.OnUpdateTopics(invalidator_registrar_.GetSanitizedHandlersIdsMap());
   return true;
 }
@@ -94,10 +93,6 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   DVLOG(2) << "Unregistering";
   invalidator_registrar_.UnregisterHandler(handler);
-  if (invalidator_) {
-    CHECK(invalidator_->UpdateRegisteredIds(
-        this, invalidator_registrar_.GetAllRegisteredIds()));
-  }
   logger_.OnUnregistration(handler->GetOwnerName());
 }
 
@@ -190,10 +185,8 @@
   invalidator_ = std::make_unique<syncer::FCMInvalidator>(
       std::move(network), identity_provider_, pref_service_, loader_factory_,
       parse_json_);
-
   invalidator_->RegisterHandler(this);
-  CHECK(invalidator_->UpdateRegisteredIds(
-      this, invalidator_registrar_.GetAllRegisteredIds()));
+  DoUpdateRegisteredIdsIfNeeded();
 }
 
 void FCMInvalidationService::StopInvalidator() {
@@ -233,4 +226,12 @@
   // TODO(meandory): report metric in case of unsucesfull deletion.
 }
 
+void FCMInvalidationService::DoUpdateRegisteredIdsIfNeeded() {
+  if (!invalidator_ || !update_was_requested_)
+    return;
+  auto registered_ids = invalidator_registrar_.GetAllRegisteredIds();
+  CHECK(invalidator_->UpdateRegisteredIds(this, registered_ids));
+  update_was_requested_ = false;
+}
+
 }  // namespace invalidation
diff --git a/components/invalidation/impl/fcm_invalidation_service.h b/components/invalidation/impl/fcm_invalidation_service.h
index 67dcb15..65b1314 100644
--- a/components/invalidation/impl/fcm_invalidation_service.h
+++ b/components/invalidation/impl/fcm_invalidation_service.h
@@ -9,7 +9,7 @@
 #include "base/timer/timer.h"
 #include "components/gcm_driver/instance_id/instance_id.h"
 #include "components/invalidation/impl/invalidation_logger.h"
-#include "components/invalidation/impl/invalidator_registrar.h"
+#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
 #include "components/invalidation/public/identity_provider.h"
 #include "components/invalidation/public/invalidation_handler.h"
 #include "components/invalidation/public/invalidation_service.h"
@@ -93,7 +93,9 @@
   void OnInstanceIdRecieved(const std::string& id);
   void OnDeleteIDCompleted(instance_id::InstanceID::Result);
 
-  syncer::InvalidatorRegistrar invalidator_registrar_;
+  void DoUpdateRegisteredIdsIfNeeded();
+
+  syncer::InvalidatorRegistrarWithMemory invalidator_registrar_;
   std::unique_ptr<syncer::Invalidator> invalidator_;
 
   // The invalidation logger object we use to record state changes
@@ -108,6 +110,7 @@
   PrefService* pref_service_;
   syncer::ParseJSONCallback parse_json_;
   network::mojom::URLLoaderFactory* loader_factory_;
+  bool update_was_requested_ = false;
 
   SEQUENCE_CHECKER(sequence_checker_);
 
diff --git a/components/invalidation/impl/fcm_invalidation_service_unittest.cc b/components/invalidation/impl/fcm_invalidation_service_unittest.cc
index 6cb50c9..edcf1abd 100644
--- a/components/invalidation/impl/fcm_invalidation_service_unittest.cc
+++ b/components/invalidation/impl/fcm_invalidation_service_unittest.cc
@@ -90,6 +90,8 @@
     pref_service_.registry()->RegisterStringPref(
         prefs::kFCMInvalidationClientIDCache,
         /*default_value=*/std::string());
+    syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(
+        pref_service_.registry());
   }
 
   ~FCMInvalidationServiceTestDelegate() {}
diff --git a/components/invalidation/impl/invalidation_service_android.cc b/components/invalidation/impl/invalidation_service_android.cc
index 6377b9e..4f63b2c 100644
--- a/components/invalidation/impl/invalidation_service_android.cc
+++ b/components/invalidation/impl/invalidation_service_android.cc
@@ -94,7 +94,7 @@
 
   // Convert it into a more convenient format for C++.
   std::string id;
-  base::android::JavaByteArrayToString(env, id_bytes_java.obj(), &id);
+  base::android::JavaByteArrayToString(env, id_bytes_java, &id);
 
   return id;
 }
diff --git a/components/invalidation/impl/invalidator_registrar.cc b/components/invalidation/impl/invalidator_registrar.cc
index 45bc920..502c7a60 100644
--- a/components/invalidation/impl/invalidator_registrar.cc
+++ b/components/invalidation/impl/invalidator_registrar.cc
@@ -134,7 +134,7 @@
   return clean_handlers_to_topics;
 }
 
-bool InvalidatorRegistrar::IsHandlerRegisteredForTest(
+bool InvalidatorRegistrar::IsHandlerRegistered(
     const InvalidationHandler* handler) const {
   DCHECK(thread_checker_.CalledOnValidThread());
   return handlers_.HasObserver(handler);
diff --git a/components/invalidation/impl/invalidator_registrar.h b/components/invalidation/impl/invalidator_registrar.h
index d1f28b7..5e816f26 100644
--- a/components/invalidation/impl/invalidator_registrar.h
+++ b/components/invalidation/impl/invalidator_registrar.h
@@ -33,23 +33,24 @@
   // and it must already be registered.
   void RegisterHandler(InvalidationHandler* handler);
 
-  // Updates the set of topics associated with |handler|.  |handler| must
-  // not be NULL, and must already be registered.  A topic must be registered
-  // for at most one handler. If topic is already registered function returns
-  // false.
-  bool UpdateRegisteredTopics(InvalidationHandler* handler,
-                              const TopicSet& topics) WARN_UNUSED_RESULT;
-
   // Stops sending notifications to |handler|.  |handler| must not be NULL, and
   // it must already be registered.  Note that this doesn't unregister the IDs
   // associated with |handler|.
   void UnregisterHandler(InvalidationHandler* handler);
 
-  TopicSet GetRegisteredTopics(InvalidationHandler* handler) const;
+  // Updates the set of topics associated with |handler|.  |handler| must
+  // not be NULL, and must already be registered.  A topic must be registered
+  // for at most one handler. If topic is already registered function returns
+  // false.
+  virtual bool UpdateRegisteredTopics(InvalidationHandler* handler,
+                                      const TopicSet& topics)
+      WARN_UNUSED_RESULT;
+
+  virtual TopicSet GetRegisteredTopics(InvalidationHandler* handler) const;
 
   // Returns the set of all IDs that are registered to some handler (even
   // handlers that have been unregistered).
-  TopicSet GetAllRegisteredIds() const;
+  virtual TopicSet GetAllRegisteredIds() const;
 
   // Sorts incoming invalidations into a bucket for each handler and then
   // dispatches the batched invalidations to the corresponding handler.
@@ -73,7 +74,7 @@
   // to display every registered handlers and its objectsIds.
   std::map<std::string, TopicSet> GetSanitizedHandlersIdsMap();
 
-  bool IsHandlerRegisteredForTest(const InvalidationHandler* handler) const;
+  bool IsHandlerRegistered(const InvalidationHandler* handler) const;
 
   // Needed for death tests.
   void DetachFromThreadForTest();
diff --git a/components/invalidation/impl/invalidator_registrar_with_memory.cc b/components/invalidation/impl/invalidator_registrar_with_memory.cc
new file mode 100644
index 0000000..3bd24df5
--- /dev/null
+++ b/components/invalidation/impl/invalidator_registrar_with_memory.cc
@@ -0,0 +1,82 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
+
+#include <cstddef>
+#include <iterator>
+#include <utility>
+
+#include "base/logging.h"
+#include "components/invalidation/public/object_id_invalidation_map.h"
+#include "components/invalidation/public/topic_invalidation_map.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/scoped_user_pref_update.h"
+
+namespace syncer {
+
+namespace {
+
+const char kTopicsToHandler[] = "invalidation.topics_to_handler";
+
+}  // namespace
+
+// static
+void InvalidatorRegistrarWithMemory::RegisterProfilePrefs(
+    PrefRegistrySimple* registry) {
+  registry->RegisterDictionaryPref(kTopicsToHandler);
+}
+
+InvalidatorRegistrarWithMemory::InvalidatorRegistrarWithMemory(
+    PrefService* local_state)
+    : InvalidatorRegistrar(), local_state_(local_state) {
+  const base::Value* pref_data = local_state_->Get(kTopicsToHandler);
+  for (const auto& it : pref_data->DictItems()) {
+    Topic topic = it.first;
+    std::string handler_name;
+    it.second.GetAsString(&handler_name);
+    handler_name_to_topics_map_[handler_name].insert(topic);
+  }
+}
+
+InvalidatorRegistrarWithMemory::~InvalidatorRegistrarWithMemory() {}
+
+bool InvalidatorRegistrarWithMemory::UpdateRegisteredTopics(
+    InvalidationHandler* handler,
+    const TopicSet& topics) {
+  TopicSet old_topics = GetRegisteredTopics(handler);
+  bool success = InvalidatorRegistrar::UpdateRegisteredTopics(handler, topics);
+  if (!InvalidatorRegistrar::IsHandlerRegistered(handler)) {
+    return success;
+  }
+
+  TopicSet to_unregister;
+  DictionaryPrefUpdate update(local_state_, kTopicsToHandler);
+  std::set_difference(old_topics.begin(), old_topics.end(), topics.begin(),
+                      topics.end(),
+                      std::inserter(to_unregister, to_unregister.begin()));
+  if (!to_unregister.empty()) {
+    for (const auto& topic : to_unregister) {
+      update->RemoveKey(topic);
+      handler_name_to_topics_map_[handler->GetOwnerName()].erase(topic);
+    }
+  }
+
+  for (const auto& topic : topics) {
+    handler_name_to_topics_map_[handler->GetOwnerName()].insert(topic);
+    update->SetKey(topic, base::Value(handler->GetOwnerName()));
+  }
+  return success;
+}
+
+TopicSet InvalidatorRegistrarWithMemory::GetAllRegisteredIds() const {
+  TopicSet registered_topics;
+  for (const auto& handler_to_topic : handler_name_to_topics_map_) {
+    registered_topics.insert(handler_to_topic.second.begin(),
+                             handler_to_topic.second.end());
+  }
+  return registered_topics;
+}
+
+}  // namespace syncer
diff --git a/components/invalidation/impl/invalidator_registrar_with_memory.h b/components/invalidation/impl/invalidator_registrar_with_memory.h
new file mode 100644
index 0000000..a00e421f
--- /dev/null
+++ b/components/invalidation/impl/invalidator_registrar_with_memory.h
@@ -0,0 +1,67 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_REGISTRAR_WITH_MEMORY_H_
+#define COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_REGISTRAR_WITH_MEMORY_H_
+
+#include <map>
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "base/threading/thread_checker.h"
+#include "components/invalidation/impl/invalidator_registrar.h"
+#include "components/invalidation/public/invalidation_export.h"
+#include "components/invalidation/public/invalidation_handler.h"
+#include "components/invalidation/public/invalidation_util.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace syncer {
+
+using HandlerNameTopicsMap = std::map<std::string, TopicSet>;
+
+// A helper class for implementations of the Invalidator interface.  It helps
+// keep track of registered handlers and which object ID registrations are
+// associated with which handlers, so implementors can just reuse the logic
+// here to dispatch invalidations and other interesting notifications.
+class INVALIDATION_EXPORT InvalidatorRegistrarWithMemory
+    : public InvalidatorRegistrar {
+ public:
+  InvalidatorRegistrarWithMemory(PrefService* local_state);
+
+  // It is an error to have registered handlers on destruction.
+  ~InvalidatorRegistrarWithMemory();
+
+  static void RegisterProfilePrefs(PrefRegistrySimple* registry);
+
+  // Updates the set of topics associated with |handler|.  |handler| must
+  // not be NULL, and must already be registered.  A topic must be registered
+  // for at most one handler. If topic is already registered function returns
+  // false.
+  bool UpdateRegisteredTopics(InvalidationHandler* handler,
+                              const TopicSet& topics) override
+      WARN_UNUSED_RESULT;
+
+  // void UnregisterHandler(InvalidationHandler* handler) override;
+  // void RegisterHandler(InvalidationHandler* handler) override;
+
+  // Returns the set of all IDs that are registered to some handler (even
+  // handlers that have been unregistered).
+  TopicSet GetAllRegisteredIds() const override;
+
+ private:
+  std::unordered_map<std::string, InvalidationHandler*>
+      handler_name_to_handler_;
+  HandlerNameTopicsMap handler_name_to_topics_map_;
+  PrefService* local_state_;
+
+  DISALLOW_COPY_AND_ASSIGN(InvalidatorRegistrarWithMemory);
+};
+
+}  // namespace syncer
+
+#endif  // COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_REGISTRAR_WITH_MEMORY_H_
diff --git a/components/invalidation/public/invalidation_util.h b/components/invalidation/public/invalidation_util.h
index 1b444b58..1490f14b 100644
--- a/components/invalidation/public/invalidation_util.h
+++ b/components/invalidation/public/invalidation_util.h
@@ -68,7 +68,8 @@
     ObjectIdCountMap;
 
 using Topic = std::string;
-using TopicSet = std::unordered_set<std::string>;
+// It should be std::set, since std::set_difference is used for it.
+using TopicSet = std::set<std::string>;
 
 // Caller owns the returned DictionaryValue.
 std::unique_ptr<base::DictionaryValue> ObjectIdToValue(
diff --git a/components/leveldb_proto/proto_database_perftest.cc b/components/leveldb_proto/proto_database_perftest.cc
index 4dbc010..420d8aa 100644
--- a/components/leveldb_proto/proto_database_perftest.cc
+++ b/components/leveldb_proto/proto_database_perftest.cc
@@ -68,16 +68,28 @@
 
 static const std::string kSingleDBName = "singledb";
 
+static const int kSmallDataSize = 10;
+static const int kMediumDataSize = 100;
+static const int kLargeDataSize = 1000;
+
+static const int kDefaultNumDBs = 5;
+static const int kSmallNumEntries = 300;
+static const int kLargeNumEntries = 3000;
+
 static const std::vector<TestParams> kFewEntriesDistributionTestParams = {
-    {20, 10, 1, false}, {10, 10, 1, false},  {10, 10, 1, false},
-    {25, 10, 1, false}, {40, 10, 1, false},  {50, 10, 1, false},
-    {80, 10, 1, false}, {100, 10, 1, false}, {100, 10, 1, false},
+    {2, kSmallDataSize, 1, false},  {1, kSmallDataSize, 1, false},
+    {1, kSmallDataSize, 1, false},  {3, kSmallDataSize, 1, false},
+    {4, kSmallDataSize, 1, false},  {5, kSmallDataSize, 1, false},
+    {8, kSmallDataSize, 1, false},  {10, kSmallDataSize, 1, false},
+    {10, kSmallDataSize, 1, false},
 };
 
 static const std::vector<TestParams> kManyEntriesDistributionTestParams = {
-    {200, 10, 1, false}, {100, 10, 1, false},  {100, 10, 1, false},
-    {250, 10, 1, false}, {400, 10, 1, false},  {500, 10, 1, false},
-    {800, 10, 1, false}, {1000, 10, 1, false}, {1000, 10, 1, false},
+    {20, kSmallDataSize, 1, false},  {10, kSmallDataSize, 1, false},
+    {10, kSmallDataSize, 1, false},  {30, kSmallDataSize, 1, false},
+    {40, kSmallDataSize, 1, false},  {50, kSmallDataSize, 1, false},
+    {80, kSmallDataSize, 1, false},  {100, kSmallDataSize, 1, false},
+    {100, kSmallDataSize, 1, false},
 };
 
 class TestDatabase {
@@ -544,56 +556,56 @@
 
 TEST_F(ProtoDBPerfTest, InsertMultipleDBsAlternating_Individual_100b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 100, 1, false};
+  TestParams params = {200, kMediumDataSize, 1, false};
   RunAlternatingInsertTests({params}, "InsertMultipleDBsAlternating_Individual",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertMultipleDBsAlternating_Individual_1000b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 1000, 1, false};
+  TestParams params = {200, kLargeDataSize, 1, false};
   RunAlternatingInsertTests({params}, "InsertMultipleDBsAlternating_Individual",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertSingleDBAlternating_Individual_100b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 100, 1, true};
+  TestParams params = {200, kMediumDataSize, 1, true};
   RunAlternatingInsertTests({params}, "InsertSingleDBAlternating_Individual",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertSingleDBAlternating_Individual_1000b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 1000, 1, true};
+  TestParams params = {200, kLargeDataSize, 1, true};
   RunAlternatingInsertTests({params}, "InsertSingleDBAlternating_Individual",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertMultipleDBsAlternating_LargeBatch_100b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 100, 200, false};
+  TestParams params = {200, kMediumDataSize, 200, false};
   RunAlternatingInsertTests({params}, "InsertMultipleDBsAlternating_LargeBatch",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertMultipleDBsAlternating_LargeBatch_1000b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 1000, 200, false};
+  TestParams params = {200, kLargeDataSize, 200, false};
   RunAlternatingInsertTests({params}, "InsertMultipleDBsAlternating_LargeBatch",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertSingleDBAlternating_LargeBatch_100b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 100, 200, true};
+  TestParams params = {200, kMediumDataSize, 200, true};
   RunAlternatingInsertTests({params}, "InsertSingleDBAlternating_LargeBatch",
                             5);
 }
 
 TEST_F(ProtoDBPerfTest, InsertSingleDBAlternating_LargeBatch_1000b) {
   // num_entries, data_size, batch_size, single_db.
-  TestParams params = {200, 1000, 200, true};
+  TestParams params = {200, kLargeDataSize, 200, true};
   RunAlternatingInsertTests({params}, "InsertSingleDBAlternating_LargeBatch",
                             5);
 }
@@ -608,55 +620,23 @@
                                 kFewEntriesDistributionTestParams, false);
 }
 
-// Times out on Win.  http://crbug.com/879922
-#if defined(OS_WIN)
-#define MAYBE_DistributionTestSmall_ManyEntries_Single \
-  DISABLED_DistributionTestSmall_ManyEntries_Single
-#else
-#define MAYBE_DistributionTestSmall_ManyEntries_Single \
-  DistributionTestSmall_ManyEntries_Single
-#endif
-TEST_F(ProtoDBPerfTest, MAYBE_DistributionTestSmall_ManyEntries_Single) {
+TEST_F(ProtoDBPerfTest, DistributionTestSmall_ManyEntries_Single) {
   RunDistributionTestAndCleanup("DistributionTestSmall_ManyEntries", "Single",
                                 kManyEntriesDistributionTestParams, true);
 }
 
-// Times out on Win.  http://crbug.com/879922
-#if defined(OS_WIN)
-#define MAYBE_DistributionTestSmall_ManyEntries_Multi \
-  DISABLED_DistributionTestSmall_ManyEntries_Multi
-#else
-#define MAYBE_DistributionTestSmall_ManyEntries_Multi \
-  DistributionTestSmall_ManyEntries_Multi
-#endif
-TEST_F(ProtoDBPerfTest, MAYBE_DistributionTestSmall_ManyEntries_Multi) {
+TEST_F(ProtoDBPerfTest, DistributionTestSmall_ManyEntries_Multi) {
   RunDistributionTestAndCleanup("DistributionTestSmall_ManyEntries", "Multi",
                                 kManyEntriesDistributionTestParams, false);
 }
 
-// Times out on Win.  http://crbug.com/879922
-#if defined(OS_WIN)
-#define MAYBE_DistributionTestSmall_ManyEntries_Batch_Single \
-  DISABLED_DistributionTestSmall_ManyEntries_Batch_Single
-#else
-#define MAYBE_DistributionTestSmall_ManyEntries_Batch_Single \
-  DistributionTestSmall_ManyEntries_Batch_Single
-#endif
-TEST_F(ProtoDBPerfTest, MAYBE_DistributionTestSmall_ManyEntries_Batch_Single) {
+TEST_F(ProtoDBPerfTest, DistributionTestSmall_ManyEntries_Batch_Single) {
   RunDistributionTestAndCleanup("DistributionTestSmall_ManyEntries_Batch",
                                 "Single", kManyEntriesDistributionTestParams,
                                 true);
 }
 
-// Times out on Win.  http://crbug.com/879922
-#if defined(OS_WIN)
-#define MAYBE_DistributionTestSmall_ManyEntries_Batch_Multi \
-  DISABLED_DistributionTestSmall_ManyEntries_Batch_Multi
-#else
-#define MAYBE_DistributionTestSmall_ManyEntries_Batch_Multi \
-  DistributionTestSmall_ManyEntries_Batch_Multi
-#endif
-TEST_F(ProtoDBPerfTest, MAYBE_DistributionTestSmall_ManyEntries_Batch_Multi) {
+TEST_F(ProtoDBPerfTest, DistributionTestSmall_ManyEntries_Batch_Multi) {
   RunDistributionTestAndCleanup("DistributionTestSmall_ManyEntries_Batch",
                                 "Multi", kManyEntriesDistributionTestParams,
                                 false);
@@ -664,21 +644,24 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 3000, 10, {}, "LoadEntriesSingle",
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                     kSmallDataSize, {}, "LoadEntriesSingle",
                                      &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 30000, 10, {}, "LoadEntriesSingle",
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                     kSmallDataSize, {}, "LoadEntriesSingle",
                                      &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 30000, 100, {}, "LoadEntriesSingle",
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                     kMediumDataSize, {}, "LoadEntriesSingle",
                                      &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
@@ -687,7 +670,8 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {1}, "LoadEntriesSingle_OnePrefix", &num_entries);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -695,7 +679,8 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 30000, 10, {1}, "LoadEntriesSingle_OnePrefix", &num_entries);
+      kDefaultNumDBs, kLargeNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -703,55 +688,63 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 30000, 100, {1}, "LoadEntriesSingle_OnePrefix", &num_entries);
+      kDefaultNumDBs, kLargeNumEntries, kMediumDataSize, {1},
+      "LoadEntriesSingle_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 3000, 10, {}, "LoadEntriesMulti",
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                    kSmallDataSize, {}, "LoadEntriesMulti",
                                     &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 10, {}, "LoadEntriesMulti",
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kSmallDataSize, {}, "LoadEntriesMulti",
                                     &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 100, {}, "LoadEntriesMulti",
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kMediumDataSize, {}, "LoadEntriesMulti",
                                     &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 3000, 10, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                    kSmallDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 10, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kSmallDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 100, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kMediumDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_SkipReadCache_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 3000, 10, {},
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                     kSmallDataSize, {},
                                      "LoadEntriesSingle_SkipReadCache",
                                      &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -759,7 +752,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 30000, 10, {},
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                     kSmallDataSize, {},
                                      "LoadEntriesSingle_SkipReadCache",
                                      &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -767,7 +761,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_SkipReadCache_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesSingleTestAndCleanup(10, 30000, 100, {},
+  RunLoadEntriesSingleTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                     kMediumDataSize, {},
                                      "LoadEntriesSingle_SkipReadCache",
                                      &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -777,8 +772,9 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {1}, "LoadEntriesSingle_OnePrefix_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -786,8 +782,9 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 30000, 10, {1}, "LoadEntriesSingle_OnePrefix_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs, kLargeNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -795,14 +792,16 @@
   // Load only the entries that start with a particular prefix.
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 30000, 100, {1}, "LoadEntriesSingle_OnePrefix_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs, kLargeNumEntries, kMediumDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_SkipReadCache_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 3000, 10, {},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                    kSmallDataSize, {},
                                     "LoadEntriesMulti_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -810,7 +809,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 10, {},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kSmallDataSize, {},
                                     "LoadEntriesMulti_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -818,7 +818,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_SkipReadCache_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 100, {},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kMediumDataSize, {},
                                     "LoadEntriesMulti_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -826,7 +827,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_SkipReadCache_Small) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 3000, 10, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kSmallNumEntries,
+                                    kSmallDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -834,7 +836,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 10, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kSmallDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -842,7 +845,8 @@
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_SkipReadCache_Large) {
   unsigned int num_entries = 0;
-  RunLoadEntriesMultiTestAndCleanup(10, 30000, 100, {1},
+  RunLoadEntriesMultiTestAndCleanup(kDefaultNumDBs, kLargeNumEntries,
+                                    kMediumDataSize, {1},
                                     "LoadEntriesMulti_OnePrefix_SkipReadCache",
                                     &num_entries, false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -851,48 +855,48 @@
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_OnePrefix_DifferingNumDBs_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {1}, "LoadEntriesSingle_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_OnePrefix_DifferingNumDBs_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      25, 3000, 10, {1}, "LoadEntriesSingle_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_OnePrefix_DifferingNumDBs_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      100, 3000, 10, {1}, "LoadEntriesSingle_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesSingle_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_DifferingNumDBs_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      10, 3000, 10, {1}, "LoadEntriesMulti_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesMulti_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_DifferingNumDBs_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      25, 3000, 10, {1}, "LoadEntriesMulti_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesMulti_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_OnePrefix_DifferingNumDBs_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      100, 3000, 10, {1}, "LoadEntriesMulti_OnePrefix_DifferingNumDBs",
-      &num_entries);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {1},
+      "LoadEntriesMulti_OnePrefix_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -900,7 +904,7 @@
        LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {1},
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -910,7 +914,7 @@
        LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      25, 3000, 10, {1},
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -920,7 +924,7 @@
        LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      100, 3000, 10, {1},
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesSingle_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -930,7 +934,7 @@
        LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      10, 3000, 10, {1},
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -940,7 +944,7 @@
        LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      25, 3000, 10, {1},
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -950,7 +954,7 @@
        LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      100, 3000, 10, {1},
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {1},
       "LoadEntriesMulti_OnePrefix_DifferingNumDBs_SkipReadCache", &num_entries,
       false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
@@ -959,50 +963,57 @@
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_DifferingNumDBs_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_DifferingNumDBs_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      25, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_DifferingNumDBs_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      100, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      10, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      25, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      100, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs", &num_entries);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs", &num_entries);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_DifferingNumDBs_SkipReadCache_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      10, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
@@ -1010,40 +1021,45 @@
        LoadEntriesSingle_DifferingNumDBs_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      25, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesSingle_DifferingNumDBs_SkipReadCache_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesSingleTestAndCleanup(
-      100, 3000, 10, {}, "LoadEntriesSingle_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesSingle_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_SkipReadCache_Small) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      10, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_SkipReadCache_Medium) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      25, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs * 2, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
 TEST_F(ProtoDBPerfTest, LoadEntriesMulti_DifferingNumDBs_SkipReadCache_Large) {
   unsigned int num_entries = 0;
   RunLoadEntriesMultiTestAndCleanup(
-      100, 3000, 10, {}, "LoadEntriesMulti_DifferingNumDBs_SkipReadCache",
-      &num_entries, false /* fill_read_cache */);
+      kDefaultNumDBs * 4, kSmallNumEntries, kSmallDataSize, {},
+      "LoadEntriesMulti_DifferingNumDBs_SkipReadCache", &num_entries,
+      false /* fill_read_cache */);
   ASSERT_NE(num_entries, 0U);
 }
 
diff --git a/components/net_log/chrome_net_log.cc b/components/net_log/chrome_net_log.cc
index 842ba91..8c200ba 100644
--- a/components/net_log/chrome_net_log.cc
+++ b/components/net_log/chrome_net_log.cc
@@ -7,13 +7,13 @@
 #include <memory>
 #include <utility>
 
+#include "base/callback.h"
 #include "base/command_line.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/sys_info.h"
 #include "base/values.h"
 #include "build/build_config.h"
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
 #include "components/version_info/version_info.h"
 #include "net/log/file_net_log_observer.h"
 #include "net/log/net_log_util.h"
@@ -80,9 +80,6 @@
 
   constants_dict->Set("clientInfo", std::move(dict));
 
-  data_reduction_proxy::DataReductionProxyEventStore::AddConstants(
-      constants_dict.get());
-
   return constants_dict;
 }
 
diff --git a/components/offline_pages/content/renovations/test/page_renovator_browsertest.cc b/components/offline_pages/content/renovations/test/page_renovator_browsertest.cc
index ce05d67..7bb9f63 100644
--- a/components/offline_pages/content/renovations/test/page_renovator_browsertest.cc
+++ b/components/offline_pages/content/renovations/test/page_renovator_browsertest.cc
@@ -196,7 +196,12 @@
   base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, quit_task);
 }
 
-IN_PROC_BROWSER_TEST_F(PageRenovatorBrowserTest, CorrectRenovationsRun) {
+#if defined(OS_WIN)
+#define MAYBE_CorrectRenovationsRun DISABLED_CorrectRenovationsRun
+#else
+#define MAYBE_CorrectRenovationsRun CorrectRenovationsRun
+#endif
+IN_PROC_BROWSER_TEST_F(PageRenovatorBrowserTest, MAYBE_CorrectRenovationsRun) {
   Navigate(kTestPagePath);
   InitializeWithTestingRenovations(GURL("http://foo.bar/"));
   // This should run FooPageRenovation and AlwaysRenovation, but not
@@ -221,7 +226,13 @@
   EXPECT_TRUE(alwaysResult->GetBool());
 }
 
-IN_PROC_BROWSER_TEST_F(PageRenovatorBrowserTest, WikipediaRenovationRuns) {
+#if defined(OS_WIN)
+#define MAYBE_WikipediaRenovationRuns DISABLED_WikipediaRenovationRuns
+#else
+#define MAYBE_WikipediaRenovationRuns WikipediaRenovationRuns
+#endif
+IN_PROC_BROWSER_TEST_F(PageRenovatorBrowserTest,
+                       MAYBE_WikipediaRenovationRuns) {
   Navigate(kWikipediaTestPagePath);
   InitializeWithRealRenovations(GURL("http://en.m.wikipedia.org/"));
   page_renovator_->RunRenovations(base::BindOnce(
diff --git a/components/page_info_strings.grdp b/components/page_info_strings.grdp
index 5bee972..f39ea498 100644
--- a/components/page_info_strings.grdp
+++ b/components/page_info_strings.grdp
@@ -383,7 +383,7 @@
       </message>
       <if expr="_google_chrome">
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS" desc="A short paragraph explaining to the user that they has reuse their google password on current website.">
-          You could lose access to your Google Account or experience identity theft. Chrome recommends changing your password now.
+          You could lose access to your Google Account. Chrome recommends changing your password now. You'll be asked to sign in.
         </message>
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
           You could lose access to your organization's account or experience identity theft. Chrome recommends changing your password now.
@@ -394,7 +394,7 @@
       </if>
       <if expr="not _google_chrome">
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS" desc="A short paragraph explaining to the user that they has reuse their google password on current website.">
-          You could lose access to your Google Account or experience identity theft. Chromium recommends changing your password now.
+          You could lose access to your Google Account. Chromium recommends changing your password now. You'll be asked to sign in.
         </message>
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_ENTERPRISE" desc="A short paragraph explaining to the user that they have reused their password on the current website.">
           You could lose access to your organization's account or experience identity theft. Chromium recommends changing your password now.
@@ -406,7 +406,7 @@
 
       <if expr="use_titlecase">
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_BUTTON" desc="In Title Case: The string used in the page info change password button.">
-          Help Me Fix This
+          Change Password
         </message>
         <message name="IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON" desc="In Title Case: The string used in the page info ignore password warning button.">
           Ignore
@@ -414,7 +414,7 @@
       </if>
       <if expr="not use_titlecase">
         <message name="IDS_PAGE_INFO_CHANGE_PASSWORD_BUTTON" desc="The string used in the page info change password button.">
-          Help me fix this
+          Change password
         </message>
         <message name="IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON" desc="The string used in the page info ignore password warning button.">
           Ignore
diff --git a/components/password_manager/core/browser/credentials_filter.h b/components/password_manager/core/browser/credentials_filter.h
index 658ce41..f65c1fb 100644
--- a/components/password_manager/core/browser/credentials_filter.h
+++ b/components/password_manager/core/browser/credentials_filter.h
@@ -42,7 +42,9 @@
   virtual void ReportFormLoginSuccess(
       const PasswordFormManagerInterface& form_manager) const {}
 
-  // If |username| matches Chrome sync account email.
+  // If |username| matches Chrome sync account email. For incognito profile,
+  // it matches |username| against the sync account email used in its original
+  // profile.
   virtual bool IsSyncAccountEmail(const std::string& username) const = 0;
 
  private:
diff --git a/components/password_manager/core/browser/sync_credentials_filter.cc b/components/password_manager/core/browser/sync_credentials_filter.cc
index 19cdebcb..d9531406 100644
--- a/components/password_manager/core/browser/sync_credentials_filter.cc
+++ b/components/password_manager/core/browser/sync_credentials_filter.cc
@@ -77,7 +77,8 @@
 
 bool SyncCredentialsFilter::ShouldSave(
     const autofill::PasswordForm& form) const {
-  return !form.is_gaia_with_skip_save_password_form &&
+  return !client_->IsIncognito() &&
+         !form.is_gaia_with_skip_save_password_form &&
          !sync_util::IsSyncAccountCredential(
              form, sync_service_factory_function_.Run(),
              signin_manager_factory_function_.Run());
@@ -86,7 +87,8 @@
 bool SyncCredentialsFilter::ShouldSaveGaiaPasswordHash(
     const autofill::PasswordForm& form) const {
 #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
-  return sync_util::IsGaiaCredentialPage(form.signon_realm);
+  return !client_->IsIncognito() &&
+         sync_util::IsGaiaCredentialPage(form.signon_realm);
 #else
   return false;
 #endif  // SYNC_PASSWORD_REUSE_DETECTION_ENABLED
@@ -94,8 +96,8 @@
 
 bool SyncCredentialsFilter::ShouldSaveEnterprisePasswordHash(
     const autofill::PasswordForm& form) const {
-  return sync_util::ShouldSaveEnterprisePasswordHash(form,
-                                                     *client_->GetPrefs());
+  return !client_->IsIncognito() && sync_util::ShouldSaveEnterprisePasswordHash(
+                                        form, *client_->GetPrefs());
 }
 
 bool SyncCredentialsFilter::IsSyncAccountEmail(
diff --git a/components/password_manager/core/browser/sync_credentials_filter.h b/components/password_manager/core/browser/sync_credentials_filter.h
index 3c38633..36c0198 100644
--- a/components/password_manager/core/browser/sync_credentials_filter.h
+++ b/components/password_manager/core/browser/sync_credentials_filter.h
@@ -66,6 +66,8 @@
 
   const SyncServiceFactoryFunction sync_service_factory_function_;
 
+  // For incognito profile, |signin_manager_factory_function_| returns the
+  // sign in manager of its original profile.
   const SigninManagerFactoryFunction signin_manager_factory_function_;
 
   DISALLOW_COPY_AND_ASSIGN(SyncCredentialsFilter);
diff --git a/components/password_manager/core/browser/sync_credentials_filter_unittest.cc b/components/password_manager/core/browser/sync_credentials_filter_unittest.cc
index 1b5fed6..e893c0d 100644
--- a/components/password_manager/core/browser/sync_credentials_filter_unittest.cc
+++ b/components/password_manager/core/browser/sync_credentials_filter_unittest.cc
@@ -67,7 +67,8 @@
 class FakePasswordManagerClient : public StubPasswordManagerClient {
  public:
   FakePasswordManagerClient()
-      : password_store_(new testing::NiceMock<MockPasswordStore>) {
+      : password_store_(new testing::NiceMock<MockPasswordStore>),
+        is_incognito_(false) {
 #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
     // Initializes and configures prefs.
     prefs_ = std::make_unique<TestingPrefServiceSimple>();
@@ -99,10 +100,15 @@
   PrefService* GetPrefs() const override { return prefs_.get(); }
 #endif
 
+  bool IsIncognito() const override { return is_incognito_; }
+
+  void SetIsIncognito(bool is_incognito) { is_incognito_ = is_incognito; }
+
  private:
   base::MessageLoop message_loop_;  // For |password_store_|.
   GURL last_committed_entry_url_;
   scoped_refptr<testing::NiceMock<MockPasswordStore>> password_store_;
+  bool is_incognito_;
 #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
   std::unique_ptr<TestingPrefServiceSimple> prefs_;
 #endif  // SYNC_PASSWORD_REUSE_DETECTION_ENABLED
@@ -450,6 +456,15 @@
   EXPECT_FALSE(filter_.ShouldSaveGaiaPasswordHash(other_form));
 }
 
+TEST_F(CredentialsFilterTest, ShouldNotSaveGaiaPasswordHashIncognito) {
+  client_.SetIsIncognito(true);
+  PasswordForm gaia_form = SimpleGaiaForm("user@gmail.org");
+  EXPECT_FALSE(filter_.ShouldSaveGaiaPasswordHash(gaia_form));
+
+  PasswordForm other_form = SimpleNonGaiaForm("user@example.org");
+  EXPECT_FALSE(filter_.ShouldSaveGaiaPasswordHash(other_form));
+}
+
 TEST_F(CredentialsFilterTest, ShouldSaveEnterprisePasswordHash) {
   PasswordForm gaia_form = SimpleGaiaForm("user@gmail.org");
   EXPECT_FALSE(filter_.ShouldSaveEnterprisePasswordHash(gaia_form));
@@ -462,6 +477,19 @@
   EXPECT_TRUE(filter_.ShouldSaveEnterprisePasswordHash(enterprise_form));
 }
 
+TEST_F(CredentialsFilterTest, ShouldNotSaveEnterprisePasswordHashIncognito) {
+  client_.SetIsIncognito(true);
+  PasswordForm gaia_form = SimpleGaiaForm("user@gmail.org");
+  EXPECT_FALSE(filter_.ShouldSaveEnterprisePasswordHash(gaia_form));
+
+  PasswordForm other_form = SimpleNonGaiaForm("user@example.org");
+  EXPECT_FALSE(filter_.ShouldSaveEnterprisePasswordHash(other_form));
+
+  PasswordForm enterprise_form =
+      SimpleNonGaiaForm("user@enterprise.test", kEnterpriseURL);
+  EXPECT_FALSE(filter_.ShouldSaveEnterprisePasswordHash(enterprise_form));
+}
+
 TEST_F(CredentialsFilterTest, IsSyncAccountEmail) {
   FakeSigninAs("user@gmail.com");
   EXPECT_FALSE(filter_.IsSyncAccountEmail("user"));
@@ -471,6 +499,17 @@
   EXPECT_TRUE(filter_.IsSyncAccountEmail("us.er@gmail.com"));
   EXPECT_TRUE(filter_.IsSyncAccountEmail("user@googlemail.com"));
 }
+
+TEST_F(CredentialsFilterTest, IsSyncAccountEmailIncognito) {
+  client_.SetIsIncognito(true);
+  FakeSigninAs("user@gmail.com");
+  EXPECT_FALSE(filter_.IsSyncAccountEmail("user"));
+  EXPECT_FALSE(filter_.IsSyncAccountEmail("user2@gmail.com"));
+  EXPECT_FALSE(filter_.IsSyncAccountEmail("user2@example.com"));
+  EXPECT_TRUE(filter_.IsSyncAccountEmail("user@gmail.com"));
+  EXPECT_TRUE(filter_.IsSyncAccountEmail("us.er@gmail.com"));
+  EXPECT_TRUE(filter_.IsSyncAccountEmail("user@googlemail.com"));
+}
 #endif  // SYNC_PASSWORD_REUSE_DETECTION_ENABLED
 
 }  // namespace password_manager
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index b8503d2..a4a9386 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -560,6 +560,7 @@
         'PowerManagementUsesVideoActivity',
         'PresentationIdleDelayScale',
         'PresentationScreenDimDelayScale',
+        'AllowWakeLocks',
         'AllowScreenWakeLocks',
         'UserActivityScreenDimDelayScale',
         'WaitForInitialUserActivity',
@@ -1607,7 +1608,6 @@
         },
       ],
       'supported_on': ['chrome_os:70-'],
-      'future': True,
       'features': {
         'can_be_recommended': False,
         'dynamic_refresh': True,
@@ -1647,8 +1647,7 @@
           'caption': '''Duplex printing only''',
         },
       ],
-      'supported_on': ['chrome_os:70-'],
-      'future': True,
+      'supported_on': ['chrome_os:71-'],
       'features': {
         'can_be_recommended': False,
         'dynamic_refresh': True,
@@ -1680,7 +1679,7 @@
           'required': ['WidthUm', 'HeightUm'],
         },
       },
-      'supported_on': ['chrome_os:70-'],
+      'supported_on': ['chrome_os:72-'],
       'future': True,
       'features': {
         'can_be_recommended': False,
@@ -1715,7 +1714,7 @@
           'caption': '''Enable monochrome printing''',
         },
       ],
-      'supported_on': ['chrome_os:70-'],
+      'supported_on': ['chrome_os:72-'],
       'future': True,
       'features': {
         'can_be_recommended': False,
@@ -1756,7 +1755,7 @@
           'caption': '''Enable long edge duplex printing''',
         },
       ],
-      'supported_on': ['chrome_os:70-'],
+      'supported_on': ['chrome_os:72-'],
       'future': True,
       'features': {
         'can_be_recommended': False,
@@ -1786,7 +1785,7 @@
         },
         'required': ['WidthUm', 'HeightUm'],
       },
-      'supported_on': ['chrome_os:70-'],
+      'supported_on': ['chrome_os:72-'],
       'future': True,
       'features': {
         'can_be_recommended': False,
@@ -8080,6 +8079,25 @@
           The scale factor must be 100% or more. Values that would make the screen dim delay in presentation mode shorter than the regular screen dim delay are not allowed.''',
     },
     {
+      'name': 'AllowWakeLocks',
+      'type': 'main',
+      'schema': { 'type': 'boolean' },
+      'supported_on': ['chrome_os:71-'],
+      'features': {
+        'dynamic_refresh': True,
+        'per_profile': False,
+      },
+      'example_value': False,
+      'id': 491,
+      'caption': '''Allow wake locks''',
+      'tags': [],
+      'desc': '''Specifies whether wake locks are allowed. Wake locks can be requested by extensions via the power management extension API and by ARC apps.
+
+          If this policy is set to true or left not set, wake locks will be honored for power management.
+
+          If this policy is set to false, wake lock requests will get ignored.''',
+    },
+    {
       'name': 'AllowScreenWakeLocks',
       'type': 'main',
       'schema': { 'type': 'boolean' },
@@ -8092,11 +8110,11 @@
       'id': 203,
       'caption': '''Allow screen wake locks''',
       'tags': [],
-      'desc': '''Specifies whether screen wake locks are allowed. Screen wake locks can be requested by extensions via the power management extension API.
+      'desc': '''Specifies whether screen wake locks are allowed. Screen wake locks can be requested by extensions via the power management extension API and by ARC apps.
 
-          If this policy is set to true or left not set, screen wake locks will be honored for power management.
+          If this policy is set to true or left not set, screen wake locks will be honored for power management, unless AllowWakeLocks is set to false.
 
-          If this policy is set to false, screen wake lock requests will get ignored.''',
+          If this policy is set to false, screen wake lock requests will be demoted to system wake lock requests.''',
     },
     {
       'name': 'UserActivityScreenDimDelayScale',
@@ -13648,5 +13666,5 @@
   },
   'placeholders': [],
   'deleted_policy_ids': [412],
-  'highest_id_currently_used': 490
+  'highest_id_currently_used': 491
 }
diff --git a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java
index 1c09b377..0cf35a8 100644
--- a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java
+++ b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java
@@ -53,7 +53,7 @@
                             long callbackId, int resultStatus, String metadata, long checkDelta) {
                         nativeOnUrlCheckDone(callbackId, resultStatus, metadata, checkDelta);
                     }
-                });
+                }, nativeAreLocalBlacklistsEnabled());
         return initSuccesssful ? handler : null;
     }
 
@@ -67,6 +67,7 @@
         Log.d(TAG, "Done starting request");
     }
 
+    private static native boolean nativeAreLocalBlacklistsEnabled();
     private static native void nativeOnUrlCheckDone(
             long callbackId, int resultStatus, String metadata, long checkDelta);
 }
diff --git a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java
index 232db47d..1e2aba6 100644
--- a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java
+++ b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java
@@ -37,11 +37,26 @@
      * Verifies that SafeBrowsingApiHandler can operate and initializes if feasible.
      * Should be called on the same sequence as |startUriLookup|.
      *
-     * @return the handler if it's usable, or null if the API is not supported.
+     * @param observer The object on which to call the callback functions when URL checking
+     * is complete.
+     *
+     * @return whether Safe Browsing is supported for this installation.
      */
     public boolean init(Observer result);
 
     /**
+     * Verifies that SafeBrowsingApiHandler can operate and initializes if feasible.
+     * Should be called on the same sequence as |startUriLookup|.
+     *
+     * @param observer The object on which to call the callback functions when URL checking
+     * is complete.
+     * @param enableLocalBlacklists specifies if the feature to use local blacklists is enabled.
+     *
+     * @return whether Safe Browsing is supported for this installation.
+     */
+    public boolean init(Observer result, boolean enableLocalBlacklists);
+
+    /**
      * Start a URI-lookup to determine if it matches one of the specified threats.
      * This is called on every URL resource Chrome loads, on the same sequence as |init|.
      */
diff --git a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc
index 896d289..cbe98f6 100644
--- a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc
+++ b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc
@@ -82,6 +82,14 @@
 
 }  // namespace
 
+// Java->Native call, to check whether the feature to use local blacklists is
+// enabled.
+jboolean JNI_SafeBrowsingApiBridge_AreLocalBlacklistsEnabled(
+    JNIEnv* env,
+    const JavaParamRef<jclass>&) {
+  return base::FeatureList::IsEnabled(kUseLocalBlacklistsV2);
+}
+
 // Java->Native call, invoked when a check is done.
 //   |callback_id| is an int form of pointer to a URLCheckCallbackMeta
 //                 that will be called and then deleted here.
diff --git a/components/safe_browsing/features.cc b/components/safe_browsing/features.cc
index 8f3c7ce..a73da63 100644
--- a/components/safe_browsing/features.cc
+++ b/components/safe_browsing/features.cc
@@ -43,7 +43,7 @@
     "ForceEnableResetPasswordWebUI", base::FEATURE_DISABLED_BY_DEFAULT};
 
 const base::Feature kInspectDownloadedRarFiles{
-    "InspectDownloadedRarFiles", base::FEATURE_DISABLED_BY_DEFAULT};
+    "InspectDownloadedRarFiles", base::FEATURE_ENABLED_BY_DEFAULT};
 
 const base::Feature kSuspiciousSiteTriggerQuotaFeature{
     "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/components/security_state/content/content_utils_browsertest.cc b/components/security_state/content/content_utils_browsertest.cc
index 7d87162..70dc4d3 100644
--- a/components/security_state/content/content_utils_browsertest.cc
+++ b/components/security_state/content/content_utils_browsertest.cc
@@ -8,6 +8,7 @@
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "build/build_config.h"
 #include "components/security_state/content/ssl_status_input_event_data.h"
 #include "components/security_state/core/insecure_input_event_data.h"
 #include "components/security_state/core/security_state.h"
@@ -48,10 +49,17 @@
   DISALLOW_COPY_AND_ASSIGN(SecurityStateContentUtilsBrowserTest);
 };
 
+#if defined(OS_WIN)
+#define MAYBE_VisibleSecurityStateNonsecureFormInputs \
+  DISABLED_VisibleSecurityStateNonsecureFormInputs
+#else
+#define MAYBE_VisibleSecurityStateNonsecureFormInputs \
+  VisibleSecurityStateNonsecureFormInputs
+#endif
 // Tests that the NavigationEntry's flags for nonsecure password/credit
 // card inputs are reflected in the VisibleSecurityState.
 IN_PROC_BROWSER_TEST_F(SecurityStateContentUtilsBrowserTest,
-                       VisibleSecurityStateNonsecureFormInputs) {
+                       MAYBE_VisibleSecurityStateNonsecureFormInputs) {
   ASSERT_TRUE(https_server_.Start());
   EXPECT_TRUE(NavigateToURL(shell(), https_server_.GetURL("/hello.html")));
 
@@ -94,9 +102,16 @@
                   .credit_card_field_edited);
 }
 
+#if defined(OS_WIN)
+#define MAYBE_VisibleSecurityStateInsecureFieldEdit \
+  DISABLED_VisibleSecurityStateInsecureFieldEdit
+#else
+#define MAYBE_VisibleSecurityStateInsecureFieldEdit \
+  VisibleSecurityStateInsecureFieldEdit
+#endif
 // Tests that the flags for nonsecure editing are set correctly.
 IN_PROC_BROWSER_TEST_F(SecurityStateContentUtilsBrowserTest,
-                       VisibleSecurityStateInsecureFieldEdit) {
+                       MAYBE_VisibleSecurityStateInsecureFieldEdit) {
   ASSERT_TRUE(https_server_.Start());
   EXPECT_TRUE(NavigateToURL(shell(), https_server_.GetURL("/hello.html")));
 
diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc
index 3f45aab..cdd1f79 100644
--- a/components/signin/core/browser/about_signin_internals.cc
+++ b/components/signin/core/browser/about_signin_internals.cc
@@ -364,7 +364,7 @@
   NotifyObservers();
 }
 
-void AboutSigninInternals::OnTokenRemoved(
+void AboutSigninInternals::OnAccessTokenRemoved(
     const std::string& account_id,
     const OAuth2TokenService::ScopeSet& scopes) {
   for (const std::unique_ptr<TokenInfo>& token :
diff --git a/components/signin/core/browser/about_signin_internals.h b/components/signin/core/browser/about_signin_internals.h
index c76821f..5d24d02 100644
--- a/components/signin/core/browser/about_signin_internals.h
+++ b/components/signin/core/browser/about_signin_internals.h
@@ -181,8 +181,9 @@
                                   const OAuth2TokenService::ScopeSet& scopes,
                                   GoogleServiceAuthError error,
                                   base::Time expiration_time) override;
-  void OnTokenRemoved(const std::string& account_id,
-                      const OAuth2TokenService::ScopeSet& scopes) override;
+  void OnAccessTokenRemoved(
+      const std::string& account_id,
+      const OAuth2TokenService::ScopeSet& scopes) override;
 
   // OAuth2TokenServiceDelegate::Observer implementations.
   void OnRefreshTokensLoaded() override;
diff --git a/components/signin/core/browser/signin_manager.cc b/components/signin/core/browser/signin_manager.cc
index 8b38dc10..3871939 100644
--- a/components/signin/core/browser/signin_manager.cc
+++ b/components/signin/core/browser/signin_manager.cc
@@ -392,10 +392,6 @@
   return possibly_invalid_email_;
 }
 
-void SigninManager::DisableOneClickSignIn(PrefService* prefs) {
-  prefs->SetBoolean(prefs::kReverseAutologinEnabled, false);
-}
-
 void SigninManager::MergeSigninCredentialIntoCookieJar() {
   if (account_consistency_ == signin::AccountConsistencyMethod::kMirror)
     return;
@@ -457,8 +453,6 @@
   signin_metrics::LogSigninProfile(client_->IsFirstRun(),
                                    client_->GetInstallDate());
 
-  DisableOneClickSignIn(client_->GetPrefs());  // Don't ever offer again.
-
   PostSignedIn();
 }
 
diff --git a/components/signin/core/browser/signin_manager.h b/components/signin/core/browser/signin_manager.h
index ded4a94..1ac00f6 100644
--- a/components/signin/core/browser/signin_manager.h
+++ b/components/signin/core/browser/signin_manager.h
@@ -181,11 +181,6 @@
   // authenticated. Returns an empty string if no auth is in progress.
   const std::string& GetUsernameForAuthInProgress() const;
 
-  // Set the preference to turn off one-click sign-in so that it won't ever
-  // show it again for the user associated with |prefs| (even if the user tries
-  // a new account).
-  static void DisableOneClickSignIn(PrefService* prefs);
-
  protected:
   // The sign out process which is started by SigninClient::PreSignOut()
   virtual void OnSignoutDecisionReached(
diff --git a/components/signin/core/browser/signin_manager_base.cc b/components/signin/core/browser/signin_manager_base.cc
index 4089566b..b4f1918 100644
--- a/components/signin/core/browser/signin_manager_base.cc
+++ b/components/signin/core/browser/signin_manager_base.cc
@@ -53,7 +53,6 @@
   registry->RegisterStringPref(prefs::kGoogleServicesUserAccountId,
                                std::string());
   registry->RegisterBooleanPref(prefs::kAutologinEnabled, true);
-  registry->RegisterBooleanPref(prefs::kReverseAutologinEnabled, true);
   registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList,
                              std::make_unique<base::ListValue>());
   registry->RegisterBooleanPref(prefs::kSigninAllowed, true);
diff --git a/components/signin/core/browser/signin_pref_names.cc b/components/signin/core/browser/signin_pref_names.cc
index 0215ef0..8de4ecc 100644
--- a/components/signin/core/browser/signin_pref_names.cc
+++ b/components/signin/core/browser/signin_pref_names.cc
@@ -77,9 +77,6 @@
 const char kGoogleServicesUsernamePattern[] =
     "google.services.username_pattern";
 
-// Boolean identifying whether reverse auto-logins is enabled.
-const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
-
 // List to keep track of emails for which the user has rejected one-click
 // sign-in.
 const char kReverseAutologinRejectedEmailList[] =
diff --git a/components/signin/core/browser/signin_pref_names.h b/components/signin/core/browser/signin_pref_names.h
index 7e6afad..2ebafcb 100644
--- a/components/signin/core/browser/signin_pref_names.h
+++ b/components/signin/core/browser/signin_pref_names.h
@@ -23,7 +23,6 @@
 extern const char kGoogleServicesUserAccountId[];
 extern const char kGoogleServicesUsername[];
 extern const char kGoogleServicesUsernamePattern[];
-extern const char kReverseAutologinEnabled[];
 extern const char kReverseAutologinRejectedEmailList[];
 extern const char kSignedInTime[];
 extern const char kSigninAllowed[];
diff --git a/components/spellcheck/browser/spellchecker_session_bridge_android.cc b/components/spellcheck/browser/spellchecker_session_bridge_android.cc
index 0aa8b72..3a303d4 100644
--- a/components/spellcheck/browser/spellchecker_session_bridge_android.cc
+++ b/components/spellcheck/browser/spellchecker_session_bridge_android.cc
@@ -108,7 +108,7 @@
                  env->GetObjectArrayElement(suggestions_array, i)));
     std::vector<base::string16> suggestions_for_word;
     base::android::AppendJavaStringArrayToStringVector(
-        env, suggestions_for_word_array.obj(), &suggestions_for_word);
+        env, suggestions_for_word_array, &suggestions_for_word);
     results.push_back(SpellCheckResult(SpellCheckResult::SPELLING, offsets[i],
                                        lengths[i], suggestions_for_word));
   }
diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/components/subresource_filter/content/browser/ruleset_service.cc
index 33dd7f0f7..b8a71bf8 100644
--- a/components/subresource_filter/content/browser/ruleset_service.cc
+++ b/components/subresource_filter/content/browser/ruleset_service.cc
@@ -266,14 +266,14 @@
     : local_state_(local_state),
       background_task_runner_(std::move(background_task_runner)),
       delegate_(delegate),
-      is_after_startup_(false),
+      is_initialized_(false),
       indexed_ruleset_base_dir_(indexed_ruleset_base_dir) {
   DCHECK(delegate_);
   DCHECK_NE(local_state_->GetInitializationStatus(),
             PrefService::INITIALIZATION_STATUS_WAITING);
 }
 
-void RulesetService::Initialize() {
+void RulesetService::StartInitialization() {
   IndexedRulesetVersion most_recently_indexed_version;
   most_recently_indexed_version.ReadFromPrefs(local_state_);
   TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("loading"),
@@ -286,8 +286,10 @@
     IndexedRulesetVersion().SaveToPrefs(local_state_);
   }
 
-  delegate_->PostAfterStartupTask(
-      base::BindOnce(&RulesetService::InitializeAfterStartup, AsWeakPtr()));
+  DCHECK(delegate_->BestEffortTaskRunner()->BelongsToCurrentThread());
+  delegate_->BestEffortTaskRunner()->PostTask(
+      FROM_HERE,
+      base::BindOnce(&RulesetService::FinishInitialization, AsWeakPtr()));
 }
 
 RulesetService::~RulesetService() {}
@@ -309,9 +311,9 @@
     return;
   }
 
-  // During start-up, retain information about the most recently supplied
-  // unindexed ruleset, to be processed after start-up is complete.
-  if (!is_after_startup_) {
+  // Before initialization, retain information about the most recently supplied
+  // unindexed ruleset, to be processed during initialization.
+  if (!is_initialized_) {
     queued_unindexed_ruleset_info_ = unindexed_ruleset_info;
     return;
   }
@@ -486,8 +488,8 @@
   return IndexAndWriteRulesetResult::SUCCESS;
 }
 
-void RulesetService::InitializeAfterStartup() {
-  is_after_startup_ = true;
+void RulesetService::FinishInitialization() {
+  is_initialized_ = true;
 
   IndexedRulesetVersion most_recently_indexed_version;
   most_recently_indexed_version.ReadFromPrefs(local_state_);
@@ -556,6 +558,9 @@
     scoped_refptr<base::SequencedTaskRunner> blocking_task_runner)
     : ruleset_dealer_(std::make_unique<VerifiedRulesetDealer::Handle>(
           std::move(blocking_task_runner))) {
+  best_effort_task_runner_ = base::CreateSingleThreadTaskRunnerWithTraits(
+      {content::BrowserThread::UI, base::TaskPriority::BEST_EFFORT});
+  DCHECK(best_effort_task_runner_->BelongsToCurrentThread());
   // Must rely on notifications as RenderProcessHostObserver::RenderProcessReady
   // would only be called after queued IPC messages (potentially triggering a
   // navigation) had already been sent to the new renderer.
@@ -573,14 +578,6 @@
   ruleset_published_callback_ = std::move(callback);
 }
 
-void ContentRulesetService::PostAfterStartupTask(base::OnceClosure task) {
-  content::BrowserThread::PostAfterStartupTask(
-      FROM_HERE,
-      base::CreateSingleThreadTaskRunnerWithTraits(
-          {content::BrowserThread::UI}),
-      std::move(task));
-}
-
 void ContentRulesetService::TryOpenAndSetRulesetFile(
     const base::FilePath& file_path,
     int expected_checksum,
@@ -611,10 +608,15 @@
     std::move(ruleset_published_callback_).Run();
 }
 
+scoped_refptr<base::SingleThreadTaskRunner>
+ContentRulesetService::BestEffortTaskRunner() {
+  return best_effort_task_runner_;
+}
+
 void ContentRulesetService::SetAndInitializeRulesetService(
     std::unique_ptr<RulesetService> ruleset_service) {
   ruleset_service_ = std::move(ruleset_service);
-  ruleset_service_->Initialize();
+  ruleset_service_->StartInitialization();
 }
 
 void ContentRulesetService::IndexAndStoreAndPublishRulesetIfNeeded(
@@ -624,11 +626,6 @@
       unindexed_ruleset_info);
 }
 
-void ContentRulesetService::SetIsAfterStartupForTesting() {
-  DCHECK(ruleset_service_);
-  ruleset_service_->set_is_after_startup_for_testing();
-}
-
 void ContentRulesetService::Observe(
     int type,
     const content::NotificationSource& source,
diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/components/subresource_filter/content/browser/ruleset_service.h
index 72d083bd..e2ed7482 100644
--- a/components/subresource_filter/content/browser/ruleset_service.h
+++ b/components/subresource_filter/content/browser/ruleset_service.h
@@ -206,11 +206,9 @@
   // Get the ruleset version associated with the current local_state_.
   IndexedRulesetVersion GetMostRecentlyIndexedVersion() const;
 
-  // Publishes the most recently indexed version of the ruleset if one is
-  // available according to prefs.
-  void Initialize();
-
-  void set_is_after_startup_for_testing() { is_after_startup_ = true; }
+  // Starts initialization of the RulesetService, performing tasks that won't
+  // slow down Chrome startup, then queues the FinishInitialization task.
+  void StartInitialization();
 
  private:
   friend class SubresourceFilteringRulesetServiceTest;
@@ -258,8 +256,10 @@
   static decltype(&IndexRuleset) g_index_ruleset_func;
   static decltype(&base::ReplaceFile) g_replace_file_func;
 
-  // Performs indexing of the queued unindexed ruleset (if any) after start-up.
-  void InitializeAfterStartup();
+  // Runs as a BEST_EFFORT task to complete portions of the initialization that
+  // could potentially block Chrome startup.  Once this task is reached, the
+  // RulesetService is considered initialized.
+  void FinishInitialization();
 
   // Posts a task to the |background_task_runner| to index and persist the
   // given unindexed ruleset. Then, on success, updates the most recently
@@ -283,7 +283,7 @@
   RulesetServiceDelegate* delegate_;
 
   UnindexedRulesetInfo queued_unindexed_ruleset_info_;
-  bool is_after_startup_;
+  bool is_initialized_;
 
   const base::FilePath indexed_ruleset_base_dir_;
 
@@ -329,13 +329,12 @@
   void SetRulesetPublishedCallbackForTesting(base::OnceClosure callback);
 
   // RulesetServiceDelegate:
-  void PostAfterStartupTask(base::OnceClosure task) override;
   void TryOpenAndSetRulesetFile(
       const base::FilePath& file_path,
       int expected_checksum,
       base::OnceCallback<void(base::File)> callback) override;
-
   void PublishNewRulesetVersion(base::File ruleset_data) override;
+  scoped_refptr<base::SingleThreadTaskRunner> BestEffortTaskRunner() override;
 
   // Sets the ruleset_service_ member and calls its Initialize function.
   void SetAndInitializeRulesetService(
@@ -353,9 +352,6 @@
   VerifiedRulesetDealer::Handle* ruleset_dealer() {
     return ruleset_dealer_.get();
   }
-
-  void SetIsAfterStartupForTesting();
-
  private:
   // content::NotificationObserver:
   void Observe(int type,
@@ -368,6 +364,7 @@
 
   std::unique_ptr<RulesetService> ruleset_service_;
   std::unique_ptr<VerifiedRulesetDealer::Handle> ruleset_dealer_;
+  scoped_refptr<base::SingleThreadTaskRunner> best_effort_task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(ContentRulesetService);
 };
diff --git a/components/subresource_filter/content/browser/ruleset_service_unittest.cc b/components/subresource_filter/content/browser/ruleset_service_unittest.cc
index b8c38bd2..229b714 100644
--- a/components/subresource_filter/content/browser/ruleset_service_unittest.cc
+++ b/components/subresource_filter/content/browser/ruleset_service_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -72,32 +72,6 @@
 using MockClosureTarget =
     ::testing::StrictMock<::testing::MockFunction<void()>>;
 
-class TestContentBrowserClient : public ::content::ContentBrowserClient {
- public:
-  TestContentBrowserClient() {}
-
-  // ::content::ContentBrowserClient:
-  void PostAfterStartupTask(const base::Location&,
-                            const scoped_refptr<base::TaskRunner>& task_runner,
-                            base::OnceClosure task) override {
-    scoped_refptr<base::TaskRunner> ui_task_runner =
-        base::CreateSingleThreadTaskRunnerWithTraits(
-            {content::BrowserThread::UI});
-    EXPECT_EQ(ui_task_runner, task_runner);
-    last_task_ = std::move(task);
-  }
-
-  void RunAfterStartupTask() {
-    if (!last_task_.is_null())
-      std::move(last_task_).Run();
-  }
-
- private:
-  base::OnceClosure last_task_;
-
-  DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient);
-};
-
 class NotifyingMockRenderProcessHost : public content::MockRenderProcessHost {
  public:
   explicit NotifyingMockRenderProcessHost(
@@ -162,24 +136,12 @@
 class MockRulesetServiceDelegate : public RulesetServiceDelegate {
  public:
   explicit MockRulesetServiceDelegate(
-      scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner)
-      : blocking_task_runner_(std::move(blocking_task_runner)) {}
+      scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner,
+      scoped_refptr<base::TestSimpleTaskRunner> best_effort_task_runner)
+      : blocking_task_runner_(std::move(blocking_task_runner)),
+        best_effort_task_runner_(std::move(best_effort_task_runner)) {}
   ~MockRulesetServiceDelegate() override = default;
 
-  void SimulateStartupCompleted() {
-    is_after_startup_ = true;
-    for (auto& task : after_startup_tasks_)
-      std::move(task).Run();
-    after_startup_tasks_.clear();
-  }
-
-  void PostAfterStartupTask(base::OnceClosure task) override {
-    if (is_after_startup_)
-      std::move(task).Run();
-    else
-      after_startup_tasks_.push_back(std::move(task));
-  }
-
   void TryOpenAndSetRulesetFile(
       const base::FilePath& path,
       int expected_checksum,
@@ -197,18 +159,26 @@
     published_rulesets_.push_back(std::move(ruleset_data));
   }
 
+  scoped_refptr<base::SingleThreadTaskRunner> BestEffortTaskRunner() override {
+    return best_effort_task_runner_;
+  }
+
   std::vector<base::File>& published_rulesets() { return published_rulesets_; }
 
+  void RunBestEffortUntilIdle() {
+    best_effort_task_runner_->RunUntilIdle();
+    base::RunLoop().RunUntilIdle();
+  }
+
  private:
   static base::File OpenRulesetFile(base::FilePath file_path) {
     return base::File(file_path, base::File::FLAG_OPEN | base::File::FLAG_READ |
                                      base::File::FLAG_SHARE_DELETE);
   }
 
-  bool is_after_startup_ = false;
-  std::vector<base::OnceClosure> after_startup_tasks_;
   std::vector<base::File> published_rulesets_;
   scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner_;
+  scoped_refptr<base::TestSimpleTaskRunner> best_effort_task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(MockRulesetServiceDelegate);
 };
@@ -244,6 +214,8 @@
       : blocking_task_runner_(
             base::MakeRefCounted<base::TestSimpleTaskRunner>()),
         background_task_runner_(
+            base::MakeRefCounted<base::TestSimpleTaskRunner>()),
+        best_effort_task_runner_(
             base::MakeRefCounted<base::TestSimpleTaskRunner>()) {}
 
  protected:
@@ -270,12 +242,12 @@
   }
 
   void ResetRulesetService() {
-    mock_delegate_ =
-        std::make_unique<MockRulesetServiceDelegate>(blocking_task_runner_);
+    mock_delegate_ = std::make_unique<MockRulesetServiceDelegate>(
+        blocking_task_runner_, best_effort_task_runner_);
     service_ = std::make_unique<RulesetService>(
         &pref_service_, background_task_runner_, mock_delegate_.get(),
         base_dir());
-    service_->Initialize();
+    service_->StartInitialization();
   }
 
   void ClearRulesetService() {
@@ -317,18 +289,11 @@
     RunBlockingUntilIdle();
   }
 
+  // Mark the initialization complete and run task queues until all are empty.
   void SimulateStartupCompletedAndWaitForTasks() {
     DCHECK(mock_delegate());
-
-    mock_delegate()->SimulateStartupCompleted();
-
-    // Wait for |DeleteObsoleteFiles| and possible |IndexAndWriteRuleset|'s on
-    // background task runner.
-    RunBackgroundUntilIdle();
-
-    // Wait for possible |CreateOrOpen| ruleset file for publishing on blocking
-    // task runner.
-    RunBlockingUntilIdle();
+    mock_delegate()->RunBestEffortUntilIdle();
+    RunAllUntilIdle();
   }
 
   bool WriteRuleset(const TestRulesetPair& test_ruleset_pair,
@@ -371,6 +336,16 @@
         GetExpectedVersionDirPath(version));
   }
 
+  void RunAllUntilIdle() {
+    while (best_effort_task_runner_->HasPendingTask() ||
+           blocking_task_runner_->HasPendingTask() ||
+           background_task_runner_->HasPendingTask()) {
+      mock_delegate_->RunBestEffortUntilIdle();
+      RunBlockingUntilIdle();
+      RunBackgroundUntilIdle();
+    }
+  }
+
   void RunBlockingUntilIdle() {
     blocking_task_runner_->RunUntilIdle();
     base::RunLoop().RunUntilIdle();
@@ -429,6 +404,7 @@
 
   scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner_;
   scoped_refptr<base::TestSimpleTaskRunner> background_task_runner_;
+  scoped_refptr<base::TestSimpleTaskRunner> best_effort_task_runner_;
   TestingPrefServiceSimple pref_service_;
 
   TestRulesetCreator ruleset_creator_;
@@ -490,20 +466,17 @@
 class SubresourceFilterContentRulesetServiceTest : public ::testing::Test {
  public:
   SubresourceFilterContentRulesetServiceTest()
-      : old_browser_client_(nullptr), existing_renderer_(&browser_context_) {}
+      : existing_renderer_(&browser_context_) {}
 
  protected:
   void SetUp() override {
     ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
-    old_browser_client_ = content::SetBrowserClientForTesting(&browser_client_);
   }
 
   void TearDown() override {
-    content::SetBrowserClientForTesting(old_browser_client_);
   }
 
   content::TestBrowserContext* browser_context() { return &browser_context_; }
-  TestContentBrowserClient* browser_client() { return &browser_client_; }
 
   base::FilePath scoped_temp_file() const {
     return scoped_temp_dir_.GetPath().AppendASCII("data");
@@ -522,8 +495,6 @@
 
  private:
   base::ScopedTempDir scoped_temp_dir_;
-  TestContentBrowserClient browser_client_;
-  content::ContentBrowserClient* old_browser_client_;
   content::TestBrowserThreadBundle thread_bundle_;
   content::TestBrowserContext browser_context_;
   NotifyingMockRenderProcessHost existing_renderer_;
@@ -578,17 +549,6 @@
       second_renderer.sink().GetMessageAt(0), kTestFileContents));
 }
 
-TEST_F(SubresourceFilterContentRulesetServiceTest, PostAfterStartupTask) {
-  ContentRulesetService service(base::ThreadTaskRunnerHandle::Get());
-
-  MockClosureTarget mock_closure_target;
-  service.PostAfterStartupTask(base::BindOnce(
-      &MockClosureTarget::Call, base::Unretained(&mock_closure_target)));
-
-  EXPECT_CALL(mock_closure_target, Call()).Times(1);
-  browser_client()->RunAfterStartupTask();
-}
-
 TEST_F(SubresourceFilterContentRulesetServiceTest,
        PublishesRulesetInOnePostTask) {
   // Regression test for crbug.com/817308. Test verifies that ruleset is
@@ -937,7 +897,7 @@
 // contents when the same version of the ruleset is fed to the service again.
 TEST_F(SubresourceFilteringRulesetServiceTest,
        NewRuleset_OverwritesBadCopyOfSameVersionOnDisk) {
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
   // Emulate a bad ruleset by writing |test_ruleset_2| into the directory
   // corresponding to |test_ruleset_1| and not updating prefs. This must come
   // after SimulateStartupCompleted, otherwise it gets deleted by the clean-up
@@ -965,7 +925,7 @@
 TEST_F(SubresourceFilteringRulesetServiceTest,
        NewRuleset_SuccessWithUnsupportedRules) {
   base::HistogramTester histogram_tester;
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
 
   // The default field values are considered unsupported.
   url_pattern_index::proto::UrlRule unfilled_rule;
@@ -998,7 +958,7 @@
 TEST_F(SubresourceFilteringRulesetServiceTest,
        NewRuleset_CannotOpenUnindexedRulesetFile) {
   base::HistogramTester histogram_tester;
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
 
   UnindexedRulesetInfo ruleset_info;
   ruleset_info.ruleset_path = base::FilePath();  // Non-existent.
@@ -1028,7 +988,7 @@
 
 TEST_F(SubresourceFilteringRulesetServiceTest, NewRuleset_ParseFailure) {
   base::HistogramTester histogram_tester;
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
 
   const std::string kGarbage(10000, '\xff');
   ASSERT_TRUE(base::AppendToFile(test_ruleset_1().unindexed.path,
@@ -1061,7 +1021,7 @@
 }
 
 TEST_F(SubresourceFilteringRulesetServiceDeathTest, NewRuleset_IndexingCrash) {
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
 #if GTEST_HAS_DEATH_TEST
   auto scoped_override(OverrideFunctionForScope(
       &RulesetService::g_index_ruleset_func, &MockCrashingIndexRuleset));
@@ -1113,7 +1073,7 @@
 
 TEST_F(SubresourceFilteringRulesetServiceTest, NewRuleset_WriteFailure) {
   base::HistogramTester histogram_tester;
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
   auto scoped_override(OverrideFunctionForScope(
       &RulesetService::g_replace_file_func, &MockFailingReplaceFile));
 
@@ -1147,7 +1107,7 @@
 
 TEST_F(SubresourceFilteringRulesetServiceTest,
        NewRulesetTwice_SecondRulesetPrevails) {
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
   WaitForIndexAndStoreAndPublishUpdatedRuleset(test_ruleset_1(),
                                                kTestContentVersion1);
   WaitForIndexAndStoreAndPublishUpdatedRuleset(test_ruleset_2(),
@@ -1170,7 +1130,7 @@
 
 TEST_F(SubresourceFilteringRulesetServiceTest,
        NewRulesetTwiceWithTheSameVersion_SecondIsIgnored) {
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
   WaitForIndexAndStoreAndPublishUpdatedRuleset(test_ruleset_1(),
                                                kTestContentVersion1);
 
@@ -1205,16 +1165,7 @@
 
   SimulateStartupCompletedAndWaitForTasks();
 
-  // Optionally permit the publication of the pre-existing ruleset, but the last
-  // published ruleset must be the one that was set the latest (and with a
-  // different version number than the pre-existing ruleset).
-  ASSERT_LE(1u, mock_delegate()->published_rulesets().size());
-  ASSERT_GE(2u, mock_delegate()->published_rulesets().size());
-  if (mock_delegate()->published_rulesets().size() == 2) {
-    ASSERT_NO_FATAL_FAILURE(AssertValidRulesetFileWithContents(
-        &mock_delegate()->published_rulesets().front(),
-        test_ruleset_1().indexed.contents));
-  }
+  // Make sure the active ruleset is test_ruleset_3.
   ASSERT_NO_FATAL_FAILURE(AssertValidRulesetFileWithContents(
       &mock_delegate()->published_rulesets().back(),
       test_ruleset_3().indexed.contents));
@@ -1288,7 +1239,7 @@
 }
 
 TEST_F(SubresourceFilteringRulesetServiceTest, RulesetIsReadonly) {
-  mock_delegate()->SimulateStartupCompleted();
+  mock_delegate()->RunBestEffortUntilIdle();
   WaitForIndexAndStoreAndPublishUpdatedRuleset(test_ruleset_1(),
                                                kTestContentVersion1);
 
diff --git a/components/subresource_filter/core/browser/ruleset_service_delegate.h b/components/subresource_filter/core/browser/ruleset_service_delegate.h
index d9144ce..21cf0f20 100644
--- a/components/subresource_filter/core/browser/ruleset_service_delegate.h
+++ b/components/subresource_filter/core/browser/ruleset_service_delegate.h
@@ -9,6 +9,7 @@
 #include "base/callback_forward.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
+#include "base/single_thread_task_runner.h"
 
 namespace subresource_filter {
 
@@ -18,9 +19,6 @@
  public:
   virtual ~RulesetServiceDelegate() = default;
 
-  // Posts |task| to be executed on the UI thread after browser start-up.
-  virtual void PostAfterStartupTask(base::OnceClosure task) = 0;
-
   // Schedules file open and use it as ruleset file. In the case of success,
   // the new and valid |base::File| is passed to |callback|. In the case of
   // error an invalid |base::File| is passed to |callback|. The previous
@@ -33,6 +31,12 @@
   // Redistributes the new version of the |ruleset| to all existing consumers,
   // and sets up |ruleset| to be distributed to all future consumers.
   virtual void PublishNewRulesetVersion(base::File ruleset_data) = 0;
+
+  // Task queue for best effort tasks in the thread the object was created in.
+  // Used for tasks triggered on RulesetService instantiation so it doesn't
+  // interfere with startup.  Runs in the UI thread.
+  virtual scoped_refptr<base::SingleThreadTaskRunner>
+  BestEffortTaskRunner() = 0;
 };
 
 }  // namespace subresource_filter
diff --git a/components/sync/driver/about_sync_util.cc b/components/sync/driver/about_sync_util.cc
index d954b8b..5f13a01 100644
--- a/components/sync/driver/about_sync_util.cc
+++ b/components/sync/driver/about_sync_util.cc
@@ -323,12 +323,14 @@
 
   Section* section_identity = section_list.AddSection(kIdentityTitle);
   section_identity->MarkSensitive();
-  Stat<std::string>* sync_id =
+  Stat<std::string>* sync_client_id =
       section_identity->AddStringStat("Sync Client ID");
   Stat<std::string>* invalidator_id =
       section_identity->AddStringStat("Invalidator Client ID");
   Stat<std::string>* username = section_identity->AddStringStat("Username");
   Stat<bool>* user_is_primary = section_identity->AddBoolStat("Is Primary");
+  Stat<std::string>* auth_error = section_identity->AddStringStat("Auth Error");
+  // TODO(treib): Add the *time* of the auth error?
 
   Section* section_credentials = section_list.AddSection("Credentials");
   Stat<std::string>* request_token_time =
@@ -337,6 +339,7 @@
       section_credentials->AddStringStat("Received Token");
   Stat<std::string>* last_token_request_result =
       section_credentials->AddStringStat("Last Token Request Result");
+  Stat<bool>* has_token = section_credentials->AddBoolStat("Has Token");
   Stat<std::string>* next_token_request =
       section_credentials->AddStringStat("Next Token Request");
 
@@ -460,17 +463,20 @@
 
   // Identity.
   if (is_status_valid && !full_status.sync_id.empty())
-    sync_id->Set(full_status.sync_id);
+    sync_client_id->Set(full_status.sync_id);
   if (is_status_valid && !full_status.invalidator_client_id.empty())
     invalidator_id->Set(full_status.invalidator_client_id);
   username->Set(service->GetAuthenticatedAccountInfo().email);
   user_is_primary->Set(service->IsAuthenticatedAccountPrimary());
+  std::string auth_error_str = service->GetAuthError().ToString();
+  auth_error->Set(auth_error_str.empty() ? "None" : auth_error_str);
 
   // Credentials.
   request_token_time->Set(GetTimeStr(token_status.token_request_time, "n/a"));
   receive_token_time->Set(GetTimeStr(token_status.token_receive_time, "n/a"));
   std::string err = token_status.last_get_token_error.error_message();
   last_token_request_result->Set(err.empty() ? "OK" : err);
+  has_token->Set(token_status.has_token);
   next_token_request->Set(
       GetTimeStr(token_status.next_token_request_time, "not scheduled"));
 
diff --git a/components/sync/driver/generic_change_processor.h b/components/sync/driver/generic_change_processor.h
index 273450d..6bebd9d 100644
--- a/components/sync/driver/generic_change_processor.h
+++ b/components/sync/driver/generic_change_processor.h
@@ -14,6 +14,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
 #include "base/sequence_checker.h"
 #include "components/sync/model/change_processor.h"
 #include "components/sync/model/data_type_error_handler.h"
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index 42af545..8d85557 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -149,9 +149,11 @@
   DCHECK(!host_);
 
   if (invalidation_handler_registered_) {
-    bool success =
-        invalidator_->UpdateRegisteredInvalidationIds(this, ObjectIdSet());
-    DCHECK(success);
+    if (reason != BROWSER_SHUTDOWN) {
+      bool success =
+          invalidator_->UpdateRegisteredInvalidationIds(this, ObjectIdSet());
+      DCHECK(success);
+    }
     invalidator_->UnregisterInvalidationHandler(this);
     invalidator_ = nullptr;
   }
diff --git a/components/sync/driver/glue/sync_backend_host_impl_unittest.cc b/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
index c0ad2e87b..b2c5b076 100644
--- a/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
@@ -41,7 +41,6 @@
 #include "components/sync_preferences/pref_service_syncable.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "google/cacheinvalidation/include/types.h"
-#include "google_apis/gaia/gaia_constants.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/test/test_network_connection_tracker.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -184,7 +183,6 @@
     credentials_.account_id = "user@example.com";
     credentials_.email = "user@example.com";
     credentials_.sync_token = "sync_token";
-    credentials_.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
 
     fake_manager_factory_ = std::make_unique<FakeSyncManagerFactory>(
         &fake_manager_, network::TestNetworkConnectionTracker::GetInstance());
diff --git a/components/sync/driver/sync_token_status.cc b/components/sync/driver/sync_token_status.cc
index b89d087..7487116 100644
--- a/components/sync/driver/sync_token_status.cc
+++ b/components/sync/driver/sync_token_status.cc
@@ -6,8 +6,6 @@
 
 namespace syncer {
 
-SyncTokenStatus::SyncTokenStatus()
-    : connection_status(CONNECTION_NOT_ATTEMPTED),
-      last_get_token_error(GoogleServiceAuthError::AuthErrorNone()) {}
+SyncTokenStatus::SyncTokenStatus() = default;
 
 }  // namespace syncer
diff --git a/components/sync/driver/sync_token_status.h b/components/sync/driver/sync_token_status.h
index 4510ef5..a551ae6 100644
--- a/components/sync/driver/sync_token_status.h
+++ b/components/sync/driver/sync_token_status.h
@@ -15,17 +15,22 @@
 struct SyncTokenStatus {
   SyncTokenStatus();
 
-  // Sync server connection status reported by sync engine.
+  // Sync server connection status reported by the sync engine.
   base::Time connection_status_update_time;
-  ConnectionStatus connection_status;
+  ConnectionStatus connection_status = CONNECTION_NOT_ATTEMPTED;
 
-  // Times when OAuth2 access token is requested and received.
+  // The last times when an OAuth2 access token was requested and received.
   base::Time token_request_time;
   base::Time token_receive_time;
 
-  // Error returned by OAuth2TokenService for token request and time when
-  // next request is scheduled.
+  // Whether we currently have an OAuth2 access token.
+  bool has_token = false;
+
+  // The error returned by OAuth2TokenService for the last token request.
   GoogleServiceAuthError last_get_token_error;
+
+  // The time when the next token request is scheduled, or a null time if no
+  // request is scheduled.
   base::Time next_token_request_time;
 };
 
diff --git a/components/sync/engine/sync_credentials.h b/components/sync/engine/sync_credentials.h
index 0473a7e..16b2672 100644
--- a/components/sync/engine/sync_credentials.h
+++ b/components/sync/engine/sync_credentials.h
@@ -7,8 +7,6 @@
 
 #include <string>
 
-#include "google_apis/gaia/oauth2_token_service.h"
-
 namespace syncer {
 
 // Contains everything needed to talk to and identify a user account.
@@ -25,9 +23,6 @@
 
   // The raw authentication token's bytes.
   std::string sync_token;
-
-  // The set of scopes to use when talking to sync server.
-  OAuth2TokenService::ScopeSet scope_set;
 };
 
 }  // namespace syncer
diff --git a/components/sync/engine/sync_engine.h b/components/sync/engine/sync_engine.h
index 97c1342..54ef639 100644
--- a/components/sync/engine/sync_engine.h
+++ b/components/sync/engine/sync_engine.h
@@ -99,8 +99,8 @@
   virtual void TriggerRefresh(const ModelTypeSet& types) = 0;
 
   // Updates the engine's SyncCredentials. The credentials must be fully
-  // specified (account ID, sync token and scope). To invalidate the credentials
-  // use InvalisateCredentials() instead.
+  // specified (account ID, email, and sync token). To invalidate the
+  // credentials, use InvalidateCredentials() instead.
   virtual void UpdateCredentials(const SyncCredentials& credentials) = 0;
 
   // Invalidates the SyncCredentials.
diff --git a/components/sync/engine/sync_manager.h b/components/sync/engine/sync_manager.h
index 34aeaf0b..bfd87b2 100644
--- a/components/sync/engine/sync_manager.h
+++ b/components/sync/engine/sync_manager.h
@@ -31,8 +31,7 @@
 #include "components/sync/engine/sync_status.h"
 #include "components/sync/protocol/sync_protocol_error.h"
 #include "components/sync/syncable/change_record.h"
-
-class GURL;
+#include "url/gurl.h"
 
 namespace base {
 namespace trace_event {
diff --git a/components/sync/engine_impl/cycle/sync_cycle_context.h b/components/sync/engine_impl/cycle/sync_cycle_context.h
index 93e13e0..7ba80b7 100644
--- a/components/sync/engine_impl/cycle/sync_cycle_context.h
+++ b/components/sync/engine_impl/cycle/sync_cycle_context.h
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "base/macros.h"
+#include "base/observer_list.h"
 #include "base/time/time.h"
 #include "components/sync/engine_impl/cycle/debug_info_getter.h"
 #include "components/sync/engine_impl/model_type_registry.h"
diff --git a/components/sync/engine_impl/model_type_registry.h b/components/sync/engine_impl/model_type_registry.h
index 18a88242..260ccbc 100644
--- a/components/sync/engine_impl/model_type_registry.h
+++ b/components/sync/engine_impl/model_type_registry.h
@@ -12,6 +12,7 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
 #include "components/sync/base/model_type.h"
 #include "components/sync/engine/cycle/type_debug_info_observer.h"
 #include "components/sync/engine/model_safe_worker.h"
diff --git a/components/sync/engine_impl/sync_manager_impl.cc b/components/sync/engine_impl/sync_manager_impl.cc
index d36ea73..6495e11 100644
--- a/components/sync/engine_impl/sync_manager_impl.cc
+++ b/components/sync/engine_impl/sync_manager_impl.cc
@@ -201,7 +201,6 @@
   DCHECK(!args->long_poll_interval.is_zero());
   if (!args->enable_local_sync_backend) {
     DCHECK(!args->credentials.account_id.empty());
-    DCHECK(!args->credentials.scope_set.empty());
   }
   DCHECK(args->cancelation_signal);
   DVLOG(1) << "SyncManager starting Init...";
@@ -472,7 +471,6 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   DCHECK(initialized_);
   DCHECK(!credentials.account_id.empty());
-  DCHECK(!credentials.scope_set.empty());
   cycle_context_->set_account_name(credentials.email);
 
   observing_network_connectivity_changes_ = true;
diff --git a/components/sync/engine_impl/sync_manager_impl_unittest.cc b/components/sync/engine_impl/sync_manager_impl_unittest.cc
index 7135203..9c40bd9 100644
--- a/components/sync/engine_impl/sync_manager_impl_unittest.cc
+++ b/components/sync/engine_impl/sync_manager_impl_unittest.cc
@@ -62,7 +62,6 @@
 #include "components/sync/test/engine/fake_model_worker.h"
 #include "components/sync/test/engine/fake_sync_scheduler.h"
 #include "components/sync/test/engine/test_id_factory.h"
-#include "google_apis/gaia/gaia_constants.h"
 #include "services/network/test/test_network_connection_tracker.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -936,9 +935,6 @@
     credentials.account_id = "foo@bar.com";
     credentials.email = "foo@bar.com";
     credentials.sync_token = "sometoken";
-    OAuth2TokenService::ScopeSet scope_set;
-    scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
-    credentials.scope_set = scope_set;
 
     sync_manager_.AddObserver(&manager_observer_);
     EXPECT_CALL(manager_observer_, OnInitializationComplete(_, _, _, _))
diff --git a/components/sync/model_impl/blocking_model_type_store_impl.cc b/components/sync/model_impl/blocking_model_type_store_impl.cc
index 0fb0aed..f309543 100644
--- a/components/sync/model_impl/blocking_model_type_store_impl.cc
+++ b/components/sync/model_impl/blocking_model_type_store_impl.cc
@@ -9,6 +9,7 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/optional.h"
 #include "components/sync/model/model_error.h"
 #include "components/sync/model_impl/model_type_store_backend.h"
@@ -239,6 +240,9 @@
   std::unique_ptr<LevelDbWriteBatch> write_batch_impl(
       static_cast<LevelDbWriteBatch*>(write_batch.release()));
   DCHECK_EQ(write_batch_impl->GetModelType(), type_);
+  UMA_HISTOGRAM_ENUMERATION("Sync.ModelTypeStoreCommitCount",
+                            ModelTypeToHistogramInt(type_),
+                            static_cast<int>(MODEL_TYPE_COUNT));
   return backend_->WriteModifications(
       LevelDbWriteBatch::ToLevelDbWriteBatch(std::move(write_batch_impl)));
 }
diff --git a/components/sync/test/fake_server/android/fake_server_helper_android.cc b/components/sync/test/fake_server/android/fake_server_helper_android.cc
index 50f9e910..356ea01 100644
--- a/components/sync/test/fake_server/android/fake_server_helper_android.cc
+++ b/components/sync/test/fake_server/android/fake_server_helper_android.cc
@@ -198,13 +198,11 @@
 
 void FakeServerHelperAndroid::DeserializeEntitySpecifics(
     JNIEnv* env,
-    jbyteArray serialized_entity_specifics,
+    const JavaParamRef<jbyteArray>& serialized_entity_specifics,
     sync_pb::EntitySpecifics* entity_specifics) {
-  int specifics_bytes_length = env->GetArrayLength(serialized_entity_specifics);
-  jbyte* specifics_bytes =
-      env->GetByteArrayElements(serialized_entity_specifics, nullptr);
-  std::string specifics_string(reinterpret_cast<char*>(specifics_bytes),
-                               specifics_bytes_length);
+  std::string specifics_string;
+  base::android::JavaByteArrayToString(env, serialized_entity_specifics,
+                                       &specifics_string);
 
   if (!entity_specifics->ParseFromString(specifics_string))
     NOTREACHED() << "Could not deserialize EntitySpecifics";
diff --git a/components/sync/test/fake_server/android/fake_server_helper_android.h b/components/sync/test/fake_server/android/fake_server_helper_android.h
index 6578a8c0..5505313a 100644
--- a/components/sync/test/fake_server/android/fake_server_helper_android.h
+++ b/components/sync/test/fake_server/android/fake_server_helper_android.h
@@ -152,7 +152,8 @@
 
   // Deserializes |serialized_entity_specifics| into |entity_specifics|.
   void DeserializeEntitySpecifics(JNIEnv* env,
-                                  jbyteArray serialized_entity_specifics,
+                                  const base::android::JavaParamRef<jbyteArray>&
+                                      serialized_entity_specifics,
                                   sync_pb::EntitySpecifics* entity_specifics);
 
   // Creates a bookmark entity.
diff --git a/components/ukm/content/source_url_recorder_browsertest.cc b/components/ukm/content/source_url_recorder_browsertest.cc
index bb52494..e61b3b2c 100644
--- a/components/ukm/content/source_url_recorder_browsertest.cc
+++ b/components/ukm/content/source_url_recorder_browsertest.cc
@@ -6,6 +6,7 @@
 
 #include "base/files/scoped_temp_dir.h"
 #include "base/test/scoped_feature_list.h"
+#include "build/build_config.h"
 #include "components/ukm/content/source_url_recorder.h"
 #include "components/ukm/test_ukm_recorder.h"
 #include "content/public/browser/web_contents.h"
@@ -82,7 +83,13 @@
   base::ScopedTempDir downloads_directory_;
 };
 
-IN_PROC_BROWSER_TEST_F(SourceUrlRecorderWebContentsObserverBrowserTest, Basic) {
+#if defined(OS_WIN)
+#define MAYBE_Basic DISABLED_Basic
+#else
+#define MAYBE_Basic Basic
+#endif
+IN_PROC_BROWSER_TEST_F(SourceUrlRecorderWebContentsObserverBrowserTest,
+                       MAYBE_Basic) {
   using Entry = ukm::builders::DocumentCreated;
 
   GURL url = embedded_test_server()->GetURL("/title1.html");
@@ -107,8 +114,13 @@
   EXPECT_NE(source->id(), ukm_entries[0]->source_id);
 }
 
+#if defined(OS_WIN)
+#define MAYBE_IgnoreUrlInSubframe DISABLED_IgnoreUrlInSubframe
+#else
+#define MAYBE_IgnoreUrlInSubframe IgnoreUrlInSubframe
+#endif
 IN_PROC_BROWSER_TEST_F(SourceUrlRecorderWebContentsObserverBrowserTest,
-                       IgnoreUrlInSubframe) {
+                       MAYBE_IgnoreUrlInSubframe) {
   using Entry = ukm::builders::DocumentCreated;
 
   GURL main_url = embedded_test_server()->GetURL("/page_with_iframe.html");
diff --git a/components/variations/android/variations_seed_bridge.cc b/components/variations/android/variations_seed_bridge.cc
index cc209c6..e9a5ddc 100644
--- a/components/variations/android/variations_seed_bridge.cc
+++ b/components/variations/android/variations_seed_bridge.cc
@@ -37,7 +37,7 @@
 
   auto seed = std::make_unique<variations::SeedResponse>();
   if (!j_seed_data.is_null()) {
-    base::android::JavaByteArrayToString(env, j_seed_data.obj(), &seed->data);
+    base::android::JavaByteArrayToString(env, j_seed_data, &seed->data);
   }
   seed->signature = ConvertJavaStringToUTF8(j_seed_signature);
   seed->country = ConvertJavaStringToUTF8(j_seed_country);
diff --git a/components/viz/host/host_frame_sink_manager.cc b/components/viz/host/host_frame_sink_manager.cc
index 450f16c..2188faa7 100644
--- a/components/viz/host/host_frame_sink_manager.cc
+++ b/components/viz/host/host_frame_sink_manager.cc
@@ -60,8 +60,10 @@
   bad_message_received_from_gpu_callback_ = std::move(callback);
 }
 
-void HostFrameSinkManager::RegisterFrameSinkId(const FrameSinkId& frame_sink_id,
-                                               HostFrameSinkClient* client) {
+void HostFrameSinkManager::RegisterFrameSinkId(
+    const FrameSinkId& frame_sink_id,
+    HostFrameSinkClient* client,
+    ReportFirstSurfaceActivation report_activation) {
   DCHECK(frame_sink_id.is_valid());
   DCHECK(client);
 
@@ -69,7 +71,9 @@
   DCHECK(!data.IsFrameSinkRegistered());
   DCHECK(!data.has_created_compositor_frame_sink);
   data.client = client;
-  frame_sink_manager_->RegisterFrameSinkId(frame_sink_id);
+  data.report_activation = report_activation;
+  frame_sink_manager_->RegisterFrameSinkId(
+      frame_sink_id, report_activation == ReportFirstSurfaceActivation::kYes);
 }
 
 bool HostFrameSinkManager::IsFrameSinkIdRegistered(
@@ -348,8 +352,11 @@
   for (auto& map_entry : frame_sink_data_map_) {
     const FrameSinkId& frame_sink_id = map_entry.first;
     FrameSinkData& data = map_entry.second;
-    if (data.client)
-      frame_sink_manager_->RegisterFrameSinkId(frame_sink_id);
+    if (data.client) {
+      frame_sink_manager_->RegisterFrameSinkId(
+          frame_sink_id,
+          data.report_activation == ReportFirstSurfaceActivation::kYes);
+    }
     if (!data.synchronization_reporting_label.empty()) {
       frame_sink_manager_->EnableSynchronizationReporting(
           frame_sink_id, data.synchronization_reporting_label);
diff --git a/components/viz/host/host_frame_sink_manager.h b/components/viz/host/host_frame_sink_manager.h
index bd67536..b7a48a01 100644
--- a/components/viz/host/host_frame_sink_manager.h
+++ b/components/viz/host/host_frame_sink_manager.h
@@ -36,6 +36,8 @@
 class FrameSinkManagerImpl;
 class SurfaceInfo;
 
+enum class ReportFirstSurfaceActivation { kYes, kNo };
+
 // Browser side wrapper of mojom::FrameSinkManager, to be used from the
 // UI thread. Manages frame sinks and is intended to replace all usage of
 // FrameSinkManagerImpl.
@@ -75,7 +77,8 @@
   // Registers |frame_sink_id| will be used. This must be called before
   // CreateCompositorFrameSink(Support) is called.
   void RegisterFrameSinkId(const FrameSinkId& frame_sink_id,
-                           HostFrameSinkClient* client);
+                           HostFrameSinkClient* client,
+                           ReportFirstSurfaceActivation report_activation);
 
   // Returns true if RegisterFrameSinkId() was called with |frame_sink_id| and
   // InvalidateFrameSinkId() has not been called.
@@ -206,6 +209,11 @@
     // The client to be notified of changes to this FrameSink.
     HostFrameSinkClient* client = nullptr;
 
+    // Indicates whether or not this client cares to receive
+    // FirstSurfaceActivation notifications.
+    ReportFirstSurfaceActivation report_activation =
+        ReportFirstSurfaceActivation::kYes;
+
     // The label to use whether this client would like reporting for
     // synchronization events.
     std::string synchronization_reporting_label;
diff --git a/components/viz/host/host_frame_sink_manager_unittest.cc b/components/viz/host/host_frame_sink_manager_unittest.cc
index 27b8e7a..703b16d4 100644
--- a/components/viz/host/host_frame_sink_manager_unittest.cc
+++ b/components/viz/host/host_frame_sink_manager_unittest.cc
@@ -75,7 +75,8 @@
   ~MockFrameSinkManagerImpl() override = default;
 
   // mojom::FrameSinkManager:
-  MOCK_METHOD1(RegisterFrameSinkId, void(const FrameSinkId& frame_sink_id));
+  MOCK_METHOD2(RegisterFrameSinkId,
+               void(const FrameSinkId& frame_sink_id, bool report_activation));
   MOCK_METHOD1(InvalidateFrameSinkId, void(const FrameSinkId& frame_sink_id));
   MOCK_METHOD2(SetFrameSinkDebugLabel,
                void(const FrameSinkId& frame_sink_id,
@@ -230,8 +231,10 @@
   FakeHostFrameSinkClient host_client;
 
   // Register then create CompositorFrameSink for child.
-  EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1));
-  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client);
+  EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1,
+                                          true /* report_activation */));
+  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   EXPECT_TRUE(FrameSinkDataExists(kFrameSinkChild1));
 
   EXPECT_CALL(impl(), MockCreateCompositorFrameSink(kFrameSinkChild1));
@@ -240,7 +243,8 @@
   testing::Mock::VerifyAndClearExpectations(&impl());
 
   // Register but don't actually create CompositorFrameSink for parent.
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
 
   // Register should call through to FrameSinkManagerImpl and should work even
   // though |kFrameSinkParent1| was not created yet.
@@ -272,8 +276,10 @@
   FrameSinkId kChildFrameSink1(65563, 0);
   const SurfaceId child_id1 = MakeSurfaceId(kChildFrameSink1, 1);
   const SurfaceId parent_id1 = MakeSurfaceId(kParentFrameSink, 1);
-  host().RegisterFrameSinkId(kParentFrameSink, &host_client_parent);
-  host().RegisterFrameSinkId(kChildFrameSink1, &host_client_child);
+  host().RegisterFrameSinkId(kParentFrameSink, &host_client_parent,
+                             ReportFirstSurfaceActivation::kYes);
+  host().RegisterFrameSinkId(kChildFrameSink1, &host_client_child,
+                             ReportFirstSurfaceActivation::kYes);
   auto support =
       CreateCompositorFrameSinkSupport(kParentFrameSink, true /* is_root */);
 
@@ -307,12 +313,14 @@
 TEST_F(HostFrameSinkManagerLocalTest, CreateCompositorFrameSinkSupport) {
   FakeHostFrameSinkClient host_client;
 
-  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   auto support_child =
       CreateCompositorFrameSinkSupport(kFrameSinkChild1, true /* is_root */);
   EXPECT_TRUE(FrameSinkDataExists(kFrameSinkChild1));
 
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   auto support_parent =
       CreateCompositorFrameSinkSupport(kFrameSinkParent1, true /* is_root */);
   EXPECT_TRUE(FrameSinkDataExists(kFrameSinkParent1));
@@ -348,17 +356,20 @@
 
   // Register two parent and child CompositorFrameSink.
   const FrameSinkId& id_parent1 = kFrameSinkParent1;
-  host().RegisterFrameSinkId(id_parent1, &host_client);
+  host().RegisterFrameSinkId(id_parent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   auto support_parent1 =
       CreateCompositorFrameSinkSupport(id_parent1, true /* is_root */);
 
   const FrameSinkId& id_parent2 = kFrameSinkChild1;
-  host().RegisterFrameSinkId(id_parent2, &host_client);
+  host().RegisterFrameSinkId(id_parent2, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   auto support_parent2 =
       CreateCompositorFrameSinkSupport(id_parent2, true /* is_root */);
 
   const FrameSinkId& id_child = kFrameSinkParent2;
-  host().RegisterFrameSinkId(id_child, &host_client);
+  host().RegisterFrameSinkId(id_child, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   auto support_child =
       CreateCompositorFrameSinkSupport(id_child, false /* is_root */);
 
@@ -385,7 +396,8 @@
 TEST_F(HostFrameSinkManagerLocalTest, HitTestAggregatorQuery) {
   FakeHostFrameSinkClient client;
   EXPECT_FALSE(FrameSinkDataExists(kFrameSinkChild1));
-  host().RegisterFrameSinkId(kFrameSinkChild1, &client);
+  host().RegisterFrameSinkId(kFrameSinkChild1, &client,
+                             ReportFirstSurfaceActivation::kYes);
   EXPECT_TRUE(FrameSinkDataExists(kFrameSinkChild1));
 
   EXPECT_FALSE(DisplayHitTestQueryExists(kFrameSinkChild1));
@@ -409,8 +421,10 @@
 
   // Register two FrameSinkIds, hierarchy between them and create a
   // CompositorFrameSink for one.
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
-  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
+  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   host().RegisterFrameSinkHierarchy(kFrameSinkParent1, kFrameSinkChild1);
 
   EXPECT_FALSE(host().FindRootFrameSinkId(kFrameSinkParent1));
@@ -438,8 +452,10 @@
 
   // Register two FrameSinkIds, hierarchy between them and create a
   // CompositorFrameSink for one.
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
-  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
+  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   host().RegisterFrameSinkHierarchy(kFrameSinkParent1, kFrameSinkChild1);
 
   RootCompositorFrameSinkData root_data;
@@ -457,8 +473,10 @@
   // Verify registration and CompositorFrameSink creation happened.
   {
     base::RunLoop run_loop;
-    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkParent1));
-    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1));
+    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkParent1,
+                                            true /* report_activation */));
+    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1,
+                                            true /* report_activation */));
     EXPECT_CALL(impl(), RegisterFrameSinkHierarchy(kFrameSinkParent1,
                                                    kFrameSinkChild1));
     EXPECT_CALL(impl(), MockCreateRootCompositorFrameSink(kFrameSinkParent1));
@@ -483,8 +501,10 @@
   ConnectToGpu();
   {
     base::RunLoop run_loop;
-    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkParent1));
-    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1));
+    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkParent1,
+                                            true /* report_activation */));
+    EXPECT_CALL(impl(), RegisterFrameSinkId(kFrameSinkChild1,
+                                            true /* report_activation */));
     EXPECT_CALL(impl(),
                 RegisterFrameSinkHierarchy(kFrameSinkParent1, kFrameSinkChild1))
         .WillOnce(InvokeClosure(run_loop.QuitClosure()));
@@ -501,7 +521,8 @@
 
   // Register a FrameSinkId, and create a RootCompositorFrameSink, which should
   // create a HitTestQuery.
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   RootCompositorFrameSinkData root_data;
   host().CreateRootCompositorFrameSink(
       root_data.BuildParams(kFrameSinkParent1));
@@ -534,7 +555,8 @@
   FakeHostFrameSinkClient host_client;
 
   // Register a FrameSinkId, and create a RootCompositorFrameSink.
-  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkParent1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   RootCompositorFrameSinkData root_data1;
   host().CreateRootCompositorFrameSink(
       root_data1.BuildParams(kFrameSinkParent1));
@@ -561,7 +583,8 @@
   FakeHostFrameSinkClient host_client;
 
   // Register a FrameSinkId and create a CompositorFrameSink.
-  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client);
+  host().RegisterFrameSinkId(kFrameSinkChild1, &host_client,
+                             ReportFirstSurfaceActivation::kYes);
   MockCompositorFrameSinkClient compositor_frame_sink_client1;
   mojom::CompositorFrameSinkPtr compositor_frame_sink1;
   host().CreateCompositorFrameSink(
diff --git a/components/viz/service/display/skia_output_surface.h b/components/viz/service/display/skia_output_surface.h
index 9857096..f87a564 100644
--- a/components/viz/service/display/skia_output_surface.h
+++ b/components/viz/service/display/skia_output_surface.h
@@ -43,15 +43,16 @@
   virtual sk_sp<SkImage> MakePromiseSkImage(ResourceMetadata metadata) = 0;
 
   // Make a promise SkImage from the given |metadata| and the |yuv_color_space|.
-  // For YUV format, three resource metadatas should be provided. metadatas[0]
-  // contains pixels from y panel, metadatas[1] contains pixels from u panel,
-  // metadatas[2] contains pixels from v panel.
-  // For NV12 format, two resource metadatas should be provided. metadatas[0]
-  // contains pixels from y panel, metadatas[1] contains pixels from u and v
-  // panels.
+  // For YUV format, at least three resource metadatas should be provided.
+  // metadatas[0] contains pixels from y panel, metadatas[1] contains pixels
+  // from u panel, metadatas[2] contains pixels from v panel. For NV12 format,
+  // at least two resource metadatas should be provided. metadatas[0] contains
+  // pixels from y panel, metadatas[1] contains pixels from u and v panels. If
+  // has_alpha is true, the last item in metadatas contains alpha panel.
   virtual sk_sp<SkImage> MakePromiseSkImageFromYUV(
       std::vector<ResourceMetadata> metadatas,
-      SkYUVColorSpace yuv_color_space) = 0;
+      SkYUVColorSpace yuv_color_space,
+      bool has_alpha) = 0;
 
   // Swaps the current backbuffer to the screen.
   virtual void SkiaSwapBuffers(OutputSurfaceFrame frame) = 0;
diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc
index 58fb3ca..80cd796 100644
--- a/components/viz/service/display/skia_renderer.cc
+++ b/components/viz/service/display/skia_renderer.cc
@@ -107,7 +107,7 @@
       DCHECK(!metadata.mailbox.IsZero());
       image = skia_renderer->skia_output_surface_->MakePromiseSkImage(
           std::move(metadata));
-      DCHECK(image);
+      LOG_IF(ERROR, !image) << "Failed to create the promise sk image.";
     }
     sk_image_ = image.get();
   }
@@ -136,30 +136,35 @@
       auto yuv_color_space = kRec601_SkYUVColorSpace;
       quad->video_color_space.ToSkYUVColorSpace(&yuv_color_space);
 
+      const bool is_i420 =
+          quad->u_plane_resource_id() != quad->v_plane_resource_id();
+      const bool has_alpha = quad->a_plane_resource_id() != kInvalidResourceId;
+      const size_t number_of_textures = (is_i420 ? 3 : 2) + (has_alpha ? 1 : 0);
       std::vector<ResourceMetadata> metadatas;
-      bool is_yuv = quad->u_plane_resource_id() != quad->v_plane_resource_id();
-      metadatas.reserve(is_yuv ? 3 : 2);
+      metadatas.reserve(number_of_textures);
       auto y_metadata = skia_renderer->lock_set_for_external_use_.LockResource(
           quad->y_plane_resource_id());
       metadatas.push_back(std::move(y_metadata));
       auto u_metadata = skia_renderer->lock_set_for_external_use_.LockResource(
           quad->u_plane_resource_id());
       metadatas.push_back(std::move(u_metadata));
-      if (is_yuv) {
+      if (is_i420) {
         auto v_metadata =
             skia_renderer->lock_set_for_external_use_.LockResource(
                 quad->v_plane_resource_id());
         metadatas.push_back(std::move(v_metadata));
       }
 
-      if (quad->a_plane_resource_id() != kInvalidResourceId) {
-        // TODO(penghuang): Handle alpha channel when Skia supports YUVA format.
-        NOTIMPLEMENTED();
+      if (has_alpha) {
+        auto a_metadata =
+            skia_renderer->lock_set_for_external_use_.LockResource(
+                quad->a_plane_resource_id());
+        metadatas.push_back(std::move(a_metadata));
       }
 
       image = skia_renderer->skia_output_surface_->MakePromiseSkImageFromYUV(
-          std::move(metadatas), yuv_color_space);
-      DCHECK(image);
+          std::move(metadatas), yuv_color_space, has_alpha);
+      LOG_IF(ERROR, !image) << "Failed to create the promise sk yuva image.";
     }
     sk_image_ = image.get();
   }
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.cc b/components/viz/service/display_embedder/skia_output_surface_impl.cc
index 576a5d16..720f435 100644
--- a/components/viz/service/display_embedder/skia_output_surface_impl.cc
+++ b/components/viz/service/display_embedder/skia_output_surface_impl.cc
@@ -17,6 +17,7 @@
 #include "components/viz/service/gl/gpu_service_impl.h"
 #include "gpu/command_buffer/common/swap_buffers_complete_params.h"
 #include "gpu/command_buffer/service/scheduler.h"
+#include "third_party/skia/include/core/SkYUVAIndex.h"
 #include "ui/gfx/skia_util.h"
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_context.h"
@@ -43,14 +44,14 @@
 
 }  // namespace
 
-// A helper class for fullfilling promise image on the GPU thread.
-template <class FullfillContextType>
+// A helper class for fulfilling promise image on the GPU thread.
+template <class FulfillContextType>
 class SkiaOutputSurfaceImpl::PromiseTextureHelper {
  public:
-  using HelperType = PromiseTextureHelper<FullfillContextType>;
+  using HelperType = PromiseTextureHelper<FulfillContextType>;
 
   PromiseTextureHelper(base::WeakPtr<SkiaOutputSurfaceImplOnGpu> impl_on_gpu,
-                       FullfillContextType context)
+                       FulfillContextType context)
       : impl_on_gpu_(impl_on_gpu), context_(std::move(context)) {}
   ~PromiseTextureHelper() = default;
 
@@ -64,34 +65,32 @@
       SkColorType color_type,
       SkAlphaType alpha_type,
       sk_sp<SkColorSpace> color_space,
-      FullfillContextType context) {
+      FulfillContextType context) {
     DCHECK_CALLED_ON_VALID_THREAD(impl->thread_checker_);
-    auto helper = std::make_unique<HelperType>(impl->impl_on_gpu_->weak_ptr(),
-                                               std::move(context));
+    // The ownership of the helper will be passed into makePromisTexture(). The
+    // HelperType::Done will always be called. It will delete the helper.
+    auto* helper =
+        new HelperType(impl->impl_on_gpu_->weak_ptr(), std::move(context));
     auto image = recorder->makePromiseTexture(
         backend_format, size.width(), size.height(), mip_mapped, origin,
-        color_type, alpha_type, color_space, HelperType::Fullfill,
-        HelperType::Release, HelperType::Done, helper.get());
-    if (image) {
-      helper->Init(impl);
-      helper.release();
-    }
+        color_type, alpha_type, color_space, HelperType::Fulfill,
+        HelperType::Release, HelperType::Done, helper);
     return image;
   }
 
  private:
-  void Init(SkiaOutputSurfaceImpl* impl);
+  friend class SkiaOutputSurfaceImpl::YUVAPromiseTextureHelper;
 
-  static void Fullfill(void* texture_context,
-                       GrBackendTexture* backend_texture) {
+  static void Fulfill(void* texture_context,
+                      GrBackendTexture* backend_texture) {
     DCHECK(texture_context);
     auto* helper = static_cast<HelperType*>(texture_context);
-    // The fullfill is always called by SkiaOutputSurfaceImplOnGpu::SwapBuffers
+    // The fulfill is always called by SkiaOutputSurfaceImplOnGpu::SwapBuffers
     // or SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass, so impl_on_gpu_
     // should be always valid.
     DCHECK(helper->impl_on_gpu_);
-    helper->impl_on_gpu_->FullfillPromiseTexture(helper->context_,
-                                                 backend_texture);
+    helper->impl_on_gpu_->FulfillPromiseTexture(helper->context_,
+                                                backend_texture);
   }
 
   static void Release(void* texture_context) { DCHECK(texture_context); }
@@ -104,26 +103,83 @@
 
   base::WeakPtr<SkiaOutputSurfaceImplOnGpu> impl_on_gpu_;
 
-  // The data for calling the fullfill methods in SkiaOutputSurfaceImpl.
-  FullfillContextType context_;
+  // The data for calling the fulfill methods in SkiaOutputSurfaceImpl.
+  FulfillContextType context_;
 
   DISALLOW_COPY_AND_ASSIGN(PromiseTextureHelper);
 };
 
-template <class T>
-void SkiaOutputSurfaceImpl::PromiseTextureHelper<T>::Init(
-    SkiaOutputSurfaceImpl* impl) {}
+// A helper class for fulfilling YUVA promise image on the GPU thread.
+class SkiaOutputSurfaceImpl::YUVAPromiseTextureHelper {
+ public:
+  static sk_sp<SkImage> MakeYUVAPromiseSkImage(
+      SkiaOutputSurfaceImpl* impl,
+      SkDeferredDisplayListRecorder* recorder,
+      SkYUVColorSpace yuv_color_space,
+      std::vector<ResourceMetadata> metadatas,
+      bool has_alpha) {
+    DCHECK_CALLED_ON_VALID_THREAD(impl->thread_checker_);
+    DCHECK_LE(metadatas.size(), 4u);
 
-// For YUVResourceMetadata, we need to record the |context_| pointer in
-// |impl->yuv_resource_metadatas_|, because we have to create SkImage from YUV
-// textures before drawing the ddl to a SKSurface.
-// TODO(penghuang): Remove this hack when Skia supports drawing YUV textures
-// directly.
-template <>
-void SkiaOutputSurfaceImpl::PromiseTextureHelper<YUVResourceMetadata>::Init(
-    SkiaOutputSurfaceImpl* impl) {
-  impl->yuv_resource_metadatas_.push_back(&context_);
-}
+    using PlaneHelper = PromiseTextureHelper<ResourceMetadata>;
+    bool is_i420 = has_alpha ? metadatas.size() == 4 : metadatas.size() == 3;
+    auto size = metadatas[0].size;
+
+    GrBackendFormat formats[4];
+    SkYUVAIndex indices[4] = {
+        {-1, SkColorChannel::kR},
+        {-1, SkColorChannel::kR},
+        {-1, SkColorChannel::kR},
+        {-1, SkColorChannel::kR},
+    };
+    SkDeferredDisplayListRecorder::TextureContext contexts[4] = {
+        nullptr, nullptr, nullptr, nullptr};
+
+    // The ownership of the contexts will be passed into
+    // makeYUVAPromisTexture(). The HelperType::Done will always be called. It
+    // will delete contexts.
+    for (size_t i = 0; i < metadatas.size(); i++) {
+      auto& metadata = metadatas[i];
+      formats[i] = metadata.backend_format;
+      contexts[i] =
+          new PlaneHelper(impl->impl_on_gpu_->weak_ptr(), std::move(metadata));
+    }
+
+    if (is_i420) {
+      indices[SkYUVAIndex::kY_Index].fIndex = 0;
+      indices[SkYUVAIndex::kY_Index].fChannel = SkColorChannel::kR;
+      indices[SkYUVAIndex::kU_Index].fIndex = 1;
+      indices[SkYUVAIndex::kU_Index].fChannel = SkColorChannel::kR;
+      indices[SkYUVAIndex::kV_Index].fIndex = 2;
+      indices[SkYUVAIndex::kV_Index].fChannel = SkColorChannel::kR;
+      if (has_alpha) {
+        indices[SkYUVAIndex::kA_Index].fIndex = 3;
+        indices[SkYUVAIndex::kA_Index].fChannel = SkColorChannel::kA;
+      }
+    } else {
+      indices[SkYUVAIndex::kY_Index].fIndex = 0;
+      indices[SkYUVAIndex::kY_Index].fChannel = SkColorChannel::kR;
+      indices[SkYUVAIndex::kU_Index].fIndex = 1;
+      indices[SkYUVAIndex::kU_Index].fChannel = SkColorChannel::kR;
+      indices[SkYUVAIndex::kV_Index].fIndex = 1;
+      indices[SkYUVAIndex::kV_Index].fChannel = SkColorChannel::kG;
+      if (has_alpha) {
+        indices[SkYUVAIndex::kA_Index].fIndex = 2;
+        indices[SkYUVAIndex::kA_Index].fChannel = SkColorChannel::kA;
+      }
+    }
+
+    auto image = recorder->makeYUVAPromiseTexture(
+        yuv_color_space, formats, indices, size.width(), size.height(),
+        kTopLeft_GrSurfaceOrigin, nullptr /* color_space */,
+        PlaneHelper::Fulfill, PlaneHelper::Release, PlaneHelper::Done,
+        contexts);
+    return image;
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(YUVAPromiseTextureHelper);
+};
 
 SkiaOutputSurfaceImpl::SkiaOutputSurfaceImpl(
     GpuServiceImpl* gpu_service,
@@ -319,34 +375,15 @@
 
 sk_sp<SkImage> SkiaOutputSurfaceImpl::MakePromiseSkImageFromYUV(
     std::vector<ResourceMetadata> metadatas,
-    SkYUVColorSpace yuv_color_space) {
+    SkYUVColorSpace yuv_color_space,
+    bool has_alpha) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(recorder_);
-
-  DCHECK(metadatas.size() == 2 || metadatas.size() == 3);
-
-  // TODO(penghuang): Create SkImage from YUV textures directly when it is
-  // supported by Skia.
-  YUVResourceMetadata yuv_metadata(std::move(metadatas), yuv_color_space);
-
-  GrBackendFormat backend_format;
-  if (!gpu_service_->is_using_vulkan()) {
-    // Convert internal format from GLES2 to platform GL.
-    const auto* version_info = impl_on_gpu_->gl_version_info();
-    backend_format = GrBackendFormat::MakeGL(
-        gl::GetInternalFormat(version_info, GL_BGRA8_EXT), GL_TEXTURE_2D);
-  } else {
-#if BUILDFLAG(ENABLE_VULKAN)
-    backend_format = GrBackendFormat::MakeVk(VK_FORMAT_B8G8R8A8_UNORM);
-#else
-    NOTREACHED();
-#endif
-  }
-
-  return PromiseTextureHelper<YUVResourceMetadata>::MakePromiseSkImage(
-      this, &recorder_.value(), backend_format, yuv_metadata.size(),
-      GrMipMapped::kNo, kTopLeft_GrSurfaceOrigin, kBGRA_8888_SkColorType,
-      kPremul_SkAlphaType, nullptr /* color_space */, std::move(yuv_metadata));
+  DCHECK((has_alpha && (metadatas.size() == 3 || metadatas.size() == 4)) ||
+         (!has_alpha && (metadatas.size() == 2 || metadatas.size() == 3)));
+  return YUVAPromiseTextureHelper::MakeYUVAPromiseSkImage(
+      this, &recorder_.value(), yuv_color_space, std::move(metadatas),
+      has_alpha);
 }
 
 void SkiaOutputSurfaceImpl::SkiaSwapBuffers(OutputSurfaceFrame frame) {
@@ -434,16 +471,15 @@
   // SkiaOutputSurfaceImpl::dtor. So it is safe to use base::Unretained.
   base::OnceCallback<void()> callback;
   if (painting_render_pass) {
-    callback =
-        base::BindOnce(&SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass,
-                       base::Unretained(impl_on_gpu_.get()),
-                       current_render_pass_id_, std::move(ddl),
-                       std::move(yuv_resource_metadatas_), sync_fence_release_);
+    callback = base::BindOnce(
+        &SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass,
+        base::Unretained(impl_on_gpu_.get()), current_render_pass_id_,
+        std::move(ddl), sync_fence_release_);
   } else {
     callback =
         base::BindOnce(&SkiaOutputSurfaceImplOnGpu::FinishPaintCurrentFrame,
                        base::Unretained(impl_on_gpu_.get()), std::move(ddl),
-                       std::move(yuv_resource_metadatas_), sync_fence_release_);
+                       sync_fence_release_);
   }
   gpu_service_->scheduler()->ScheduleTask(gpu::Scheduler::Task(
       sequence_id, std::move(callback), std::move(resource_sync_tokens_)));
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.h b/components/viz/service/display_embedder/skia_output_surface_impl.h
index d1c13a7..54122d6 100644
--- a/components/viz/service/display_embedder/skia_output_surface_impl.h
+++ b/components/viz/service/display_embedder/skia_output_surface_impl.h
@@ -26,8 +26,6 @@
 class SkiaOutputSurfaceImplOnGpu;
 class SyntheticBeginFrameSource;
 
-class YUVResourceMetadata;
-
 // The SkiaOutputSurface implementation. It is the output surface for
 // SkiaRenderer. It lives on the compositor thread, but it will post tasks
 // to the GPU thread for initializing. Currently, SkiaOutputSurfaceImpl
@@ -77,7 +75,8 @@
   sk_sp<SkImage> MakePromiseSkImage(ResourceMetadata metadata) override;
   sk_sp<SkImage> MakePromiseSkImageFromYUV(
       std::vector<ResourceMetadata> metadatas,
-      SkYUVColorSpace yuv_color_space) override;
+      SkYUVColorSpace yuv_color_space,
+      bool has_alpha) override;
   void SkiaSwapBuffers(OutputSurfaceFrame frame) override;
   SkCanvas* BeginPaintRenderPass(const RenderPassId& id,
                                  const gfx::Size& surface_size,
@@ -96,6 +95,7 @@
  private:
   template <class T>
   class PromiseTextureHelper;
+  class YUVAPromiseTextureHelper;
   void InitializeOnGpuThread(base::WaitableEvent* event);
   void RecreateRecorder();
   void DidSwapBuffersComplete(gpu::SwapBuffersCompleteParams params,
@@ -122,12 +122,6 @@
   // Sync tokens for resources which are used for the current frame.
   std::vector<gpu::SyncToken> resource_sync_tokens_;
 
-  // YUV resource metadatas for the current frame or the current render pass.
-  // They should be preprocessed for playing recorded frame into a surface.
-  // TODO(penghuang): Remove it when Skia supports drawing YUV textures
-  // directly.
-  std::vector<YUVResourceMetadata*> yuv_resource_metadatas_;
-
   // The task runner for running task on the client (compositor) thread.
   scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_;
 
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
index ede77553..23145a6 100644
--- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
+++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
@@ -39,20 +39,6 @@
 
 }  // namespace
 
-YUVResourceMetadata::YUVResourceMetadata(
-    std::vector<ResourceMetadata> metadatas,
-    SkYUVColorSpace yuv_color_space)
-    : metadatas_(std::move(metadatas)), yuv_color_space_(yuv_color_space) {
-  DCHECK(metadatas_.size() == 2 || metadatas_.size() == 3);
-}
-
-YUVResourceMetadata::YUVResourceMetadata(YUVResourceMetadata&& other) = default;
-
-YUVResourceMetadata::~YUVResourceMetadata() = default;
-
-YUVResourceMetadata& YUVResourceMetadata::operator=(
-    YUVResourceMetadata&& other) = default;
-
 SkiaOutputSurfaceImplOnGpu::SkiaOutputSurfaceImplOnGpu(
     GpuServiceImpl* gpu_service,
     gpu::SurfaceHandle surface_handle,
@@ -183,7 +169,6 @@
 
 void SkiaOutputSurfaceImplOnGpu::FinishPaintCurrentFrame(
     std::unique_ptr<SkDeferredDisplayList> ddl,
-    std::vector<YUVResourceMetadata*> yuv_resource_metadatas,
     uint64_t sync_fence_release) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(ddl);
@@ -195,7 +180,6 @@
     // TODO(penghuang): Handle the failure.
   }
 
-  PreprocessYUVResources(std::move(yuv_resource_metadatas));
   sk_surface_->draw(ddl.get());
   gr_context_->flush();
   sync_point_client_state_->ReleaseFenceSync(sync_fence_release);
@@ -240,7 +224,6 @@
 void SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass(
     RenderPassId id,
     std::unique_ptr<SkDeferredDisplayList> ddl,
-    std::vector<YUVResourceMetadata*> yuv_resource_metadatas,
     uint64_t sync_fence_release) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(ddl);
@@ -251,8 +234,6 @@
     // TODO(penghuang): Handle the failure.
   }
 
-  PreprocessYUVResources(std::move(yuv_resource_metadatas));
-
   auto& surface = offscreen_surfaces_[id];
   SkSurfaceCharacterization characterization;
   // TODO(penghuang): Using characterization != ddl->characterization(), when
@@ -304,7 +285,7 @@
       std::make_unique<CopyOutputSkBitmapResult>(copy_rect, bitmap));
 }
 
-void SkiaOutputSurfaceImplOnGpu::FullfillPromiseTexture(
+void SkiaOutputSurfaceImplOnGpu::FulfillPromiseTexture(
     const ResourceMetadata& metadata,
     GrBackendTexture* backend_texture) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -329,18 +310,7 @@
                        metadata.mip_mapped, texture_info);
 }
 
-void SkiaOutputSurfaceImplOnGpu::FullfillPromiseTexture(
-    const YUVResourceMetadata& yuv_metadata,
-    GrBackendTexture* backend_texture) {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  if (yuv_metadata.image())
-    *backend_texture = yuv_metadata.image()->getBackendTexture(true);
-  DLOG_IF(ERROR, !backend_texture->isValid())
-      << "Failed to full fill the promise texture from yuv resources.";
-}
-
-void SkiaOutputSurfaceImplOnGpu::FullfillPromiseTexture(
+void SkiaOutputSurfaceImplOnGpu::FulfillPromiseTexture(
     const RenderPassId id,
     GrBackendTexture* backend_texture) {
   auto it = offscreen_surfaces_.find(id);
@@ -481,55 +451,6 @@
   }
 }
 
-void SkiaOutputSurfaceImplOnGpu::PreprocessYUVResources(
-    std::vector<YUVResourceMetadata*> yuv_resource_metadatas) {
-  if (gpu_service_->is_using_vulkan()) {
-    // TODO(https://crbug.com/838899): Use VkImage for video.
-    // NOTIMPLEMENTED();
-    return;
-  }
-  // Create SkImage for fullfilling YUV promise image, before drawing the ddl.
-  // TODO(penghuang): Remove the extra step when Skia supports drawing YUV
-  // textures directly.
-  auto* mailbox_manager = gpu_service_->mailbox_manager();
-  for (auto* yuv_metadata : yuv_resource_metadatas) {
-    const auto& metadatas = yuv_metadata->metadatas();
-    DCHECK(metadatas.size() == 2 || metadatas.size() == 3);
-    GrBackendTexture backend_textures[3];
-    size_t i = 0;
-    for (const auto& metadata : metadatas) {
-      auto* texture_base = mailbox_manager->ConsumeTexture(metadata.mailbox);
-      if (!texture_base)
-        break;
-      BindOrCopyTextureIfNecessary(texture_base);
-      GrGLTextureInfo texture_info;
-      texture_info.fTarget = texture_base->target();
-      texture_info.fID = texture_base->service_id();
-      texture_info.fFormat = *metadata.backend_format.getGLFormat();
-      backend_textures[i++] =
-          GrBackendTexture(metadata.size.width(), metadata.size.height(),
-                           GrMipMapped::kNo, texture_info);
-    }
-
-    if (i != metadatas.size())
-      continue;
-
-    sk_sp<SkImage> image;
-    if (metadatas.size() == 2) {
-      image = SkImage::MakeFromNV12TexturesCopy(
-          gr_context_, yuv_metadata->yuv_color_space(), backend_textures,
-          kTopLeft_GrSurfaceOrigin, nullptr /* image_color_space */);
-      DCHECK(image);
-    } else {
-      image = SkImage::MakeFromYUVTexturesCopy(
-          gr_context_, yuv_metadata->yuv_color_space(), backend_textures,
-          kTopLeft_GrSurfaceOrigin, nullptr /* image_color_space */);
-      DCHECK(image);
-    }
-    yuv_metadata->set_image(std::move(image));
-  }
-}
-
 void SkiaOutputSurfaceImplOnGpu::OnSwapBuffers() {
   uint64_t swap_id = swap_id_++;
   gfx::Size pixel_size(sk_surface_->width(), sk_surface_->height());
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
index 507ba3f0..ff24dfb 100644
--- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
+++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
@@ -41,36 +41,6 @@
 
 class GpuServiceImpl;
 
-// Metadata for YUV promise SkImage.
-class YUVResourceMetadata {
- public:
-  YUVResourceMetadata(std::vector<ResourceMetadata> metadatas,
-                      SkYUVColorSpace yuv_color_space);
-  YUVResourceMetadata(YUVResourceMetadata&& other);
-  ~YUVResourceMetadata();
-  YUVResourceMetadata& operator=(YUVResourceMetadata&& other);
-
-  const std::vector<ResourceMetadata>& metadatas() const { return metadatas_; }
-  SkYUVColorSpace yuv_color_space() const { return yuv_color_space_; }
-  const sk_sp<SkImage> image() const { return image_; }
-  void set_image(sk_sp<SkImage> image) { image_ = image; }
-  const gfx::Size size() const { return metadatas_[0].size; }
-
- private:
-  // Metadatas for YUV planes.
-  std::vector<ResourceMetadata> metadatas_;
-
-  SkYUVColorSpace yuv_color_space_;
-
-  // The image copied from YUV textures, it is for fullfilling the promise
-  // image.
-  // TODO(penghuang): Remove it when Skia supports drawing YUV textures
-  // directly.
-  sk_sp<SkImage> image_;
-
-  DISALLOW_COPY_AND_ASSIGN(YUVResourceMetadata);
-};
-
 // The SkiaOutputSurface implementation running on the GPU thread. This class
 // should be created, used and destroyed on the GPU thread.
 class SkiaOutputSurfaceImplOnGpu : public gpu::ImageTransportSurfaceDelegate {
@@ -104,28 +74,23 @@
                base::WaitableEvent* event);
   void FinishPaintCurrentFrame(
       std::unique_ptr<SkDeferredDisplayList> ddl,
-      std::vector<YUVResourceMetadata*> yuv_resource_metadatas,
       uint64_t sync_fence_release);
   void SwapBuffers(OutputSurfaceFrame frame);
   void FinishPaintRenderPass(
       RenderPassId id,
       std::unique_ptr<SkDeferredDisplayList> ddl,
-      std::vector<YUVResourceMetadata*> yuv_resource_metadatas,
       uint64_t sync_fence_release);
   void RemoveRenderPassResource(std::vector<RenderPassId> ids);
   void CopyOutput(RenderPassId id,
                   const gfx::Rect& copy_rect,
                   std::unique_ptr<CopyOutputRequest> request);
 
-  // Fullfill callback for promise SkImage created from a resource.
-  void FullfillPromiseTexture(const ResourceMetadata& metadata,
-                              GrBackendTexture* backend_texture);
-  // Fullfill callback for promise SkImage created from YUV resources.
-  void FullfillPromiseTexture(const YUVResourceMetadata& metadata,
-                              GrBackendTexture* backend_texture);
-  // Fullfill callback for promise SkImage created from a render pass.
-  void FullfillPromiseTexture(const RenderPassId id,
-                              GrBackendTexture* backend_texture);
+  // Fulfill callback for promise SkImage created from a resource.
+  void FulfillPromiseTexture(const ResourceMetadata& metadata,
+                             GrBackendTexture* backend_texture);
+  // Fulfill callback for promise SkImage created from a render pass.
+  void FulfillPromiseTexture(const RenderPassId id,
+                             GrBackendTexture* backend_texture);
 
   sk_sp<GrContextThreadSafeProxy> GetGrContextThreadSafeProxy();
   const gl::GLVersionInfo* gl_version_info() const { return gl_version_info_; }
@@ -148,8 +113,6 @@
   void InitializeForVulkan();
 
   void BindOrCopyTextureIfNecessary(gpu::TextureBase* texture_base);
-  void PreprocessYUVResources(
-      std::vector<YUVResourceMetadata*> yuv_resource_metadatas);
 
   // Generage the next swap ID and push it to our pending swap ID queues.
   void OnSwapBuffers();
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 bc703a09..3c04ecfa1 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
@@ -90,7 +90,8 @@
         consumer_sync_token_(GenTestSyncToken(5)) {
     manager_.SetLocalClient(&frame_sink_manager_client_);
     manager_.surface_manager()->AddObserver(&surface_observer_);
-    manager_.RegisterFrameSinkId(kArbitraryFrameSinkId);
+    manager_.RegisterFrameSinkId(kArbitraryFrameSinkId,
+                                 true /* report_activation */);
     support_ = std::make_unique<CompositorFrameSinkSupport>(
         &fake_support_client_, &manager_, kArbitraryFrameSinkId, kIsRoot,
         kNeedsSyncPoints);
@@ -522,7 +523,8 @@
 }
 
 TEST_F(CompositorFrameSinkSupportTest, AddDuringEviction) {
-  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId);
+  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId,
+                               true /* report_activation */);
   MockCompositorFrameSinkClient mock_client;
   auto support = std::make_unique<CompositorFrameSinkSupport>(
       &mock_client, &manager_, kAnotherArbitraryFrameSinkId, kIsRoot,
@@ -547,7 +549,8 @@
 
 // Verifies that only monotonically increasing LocalSurfaceIds are accepted.
 TEST_F(CompositorFrameSinkSupportTest, MonotonicallyIncreasingLocalSurfaceIds) {
-  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId);
+  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId,
+                               true /* report_activation */);
   MockCompositorFrameSinkClient mock_client;
   auto support = std::make_unique<CompositorFrameSinkSupport>(
       &mock_client, &manager_, kAnotherArbitraryFrameSinkId, kIsRoot,
@@ -627,7 +630,8 @@
 // Verifies that CopyOutputRequests submitted by unprivileged clients are
 // rejected.
 TEST_F(CompositorFrameSinkSupportTest, ProhibitsUnprivilegedCopyRequests) {
-  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId);
+  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId,
+                               true /* report_activation */);
   MockCompositorFrameSinkClient mock_client;
   auto support = std::make_unique<CompositorFrameSinkSupport>(
       &mock_client, &manager_, kAnotherArbitraryFrameSinkId,
@@ -660,7 +664,8 @@
 
 // Tests doing an EvictLastActivatedSurface before shutting down the factory.
 TEST_F(CompositorFrameSinkSupportTest, EvictLastActivatedSurface) {
-  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId);
+  manager_.RegisterFrameSinkId(kAnotherArbitraryFrameSinkId,
+                               true /* report_activation */);
   MockCompositorFrameSinkClient mock_client;
   auto support = std::make_unique<CompositorFrameSinkSupport>(
       &mock_client, &manager_, kAnotherArbitraryFrameSinkId, kIsRoot,
@@ -737,7 +742,8 @@
 TEST_F(CompositorFrameSinkSupportTest, EvictSurfaceWithTemporaryReference) {
   constexpr FrameSinkId parent_frame_sink_id(1234, 5678);
 
-  manager_.RegisterFrameSinkId(parent_frame_sink_id);
+  manager_.RegisterFrameSinkId(parent_frame_sink_id,
+                               true /* report_activation */);
 
   const LocalSurfaceId local_surface_id(5, kArbitraryToken);
   const SurfaceId surface_id(support_->frame_sink_id(), local_surface_id);
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
index 5af675a..1aa96bab2 100644
--- a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
+++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
@@ -33,7 +33,9 @@
 FrameSinkManagerImpl::FrameSinkSourceMapping::operator=(
     FrameSinkSourceMapping&& other) = default;
 
-FrameSinkManagerImpl::FrameSinkData::FrameSinkData() = default;
+FrameSinkManagerImpl::FrameSinkData::FrameSinkData(bool report_activation)
+    : report_activation(report_activation) {}
+
 FrameSinkManagerImpl::FrameSinkData::FrameSinkData(FrameSinkData&& other) =
     default;
 FrameSinkManagerImpl::FrameSinkData::~FrameSinkData() = default;
@@ -92,12 +94,12 @@
   sink_map_.clear();
 }
 
-void FrameSinkManagerImpl::RegisterFrameSinkId(
-    const FrameSinkId& frame_sink_id) {
+void FrameSinkManagerImpl::RegisterFrameSinkId(const FrameSinkId& frame_sink_id,
+                                               bool report_activation) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(!base::ContainsKey(frame_sink_data_, frame_sink_id));
 
-  frame_sink_data_.emplace(std::make_pair(frame_sink_id, FrameSinkData()));
+  frame_sink_data_.emplace(std::make_pair(frame_sink_id, report_activation));
 
   if (video_detector_)
     video_detector_->OnFrameSinkIdRegistered(frame_sink_id);
@@ -287,7 +289,13 @@
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK_GT(surface_info.device_scale_factor(), 0.0f);
 
-  if (client_)
+  auto it = frame_sink_data_.find(surface_info.id().frame_sink_id());
+  if (it == frame_sink_data_.end())
+    return;
+
+  const FrameSinkData& frame_sink_data = it->second;
+
+  if (client_ && frame_sink_data.report_activation)
     client_->OnFirstSurfaceActivation(surface_info);
 }
 
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/components/viz/service/frame_sinks/frame_sink_manager_impl.h
index 03d01a0..913d12c 100644
--- a/components/viz/service/frame_sinks/frame_sink_manager_impl.h
+++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.h
@@ -78,7 +78,8 @@
   void SetLocalClient(mojom::FrameSinkManagerClient* client);
 
   // mojom::FrameSinkManager implementation:
-  void RegisterFrameSinkId(const FrameSinkId& frame_sink_id) override;
+  void RegisterFrameSinkId(const FrameSinkId& frame_sink_id,
+                           bool report_activation) override;
   void InvalidateFrameSinkId(const FrameSinkId& frame_sink_id) override;
   void EnableSynchronizationReporting(
       const FrameSinkId& frame_sink_id,
@@ -195,7 +196,7 @@
 
   // Metadata for a CompositorFrameSink.
   struct FrameSinkData {
-    FrameSinkData();
+    explicit FrameSinkData(bool report_activation);
     FrameSinkData(FrameSinkData&& other);
     ~FrameSinkData();
     FrameSinkData& operator=(FrameSinkData&& other);
@@ -206,6 +207,10 @@
     // Record synchronization events for this FrameSinkId if not empty.
     std::string synchronization_label;
 
+    // Indicates whether the client wishes to receive FirstSurfaceActivation
+    // notification.
+    bool report_activation;
+
    private:
     DISALLOW_COPY_AND_ASSIGN(FrameSinkData);
   };
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_unittest.cc b/components/viz/service/frame_sinks/frame_sink_manager_unittest.cc
index 28d3bccc..f2db83b 100644
--- a/components/viz/service/frame_sinks/frame_sink_manager_unittest.cc
+++ b/components/viz/service/frame_sinks/frame_sink_manager_unittest.cc
@@ -104,7 +104,7 @@
 };
 
 TEST_F(FrameSinkManagerTest, CreateRootCompositorFrameSink) {
-  manager_.RegisterFrameSinkId(kFrameSinkIdRoot);
+  manager_.RegisterFrameSinkId(kFrameSinkIdRoot, true /* report_activation */);
 
   // Create a RootCompositorFrameSinkImpl.
   RootCompositorFrameSinkData root_data;
@@ -118,7 +118,7 @@
 }
 
 TEST_F(FrameSinkManagerTest, CreateCompositorFrameSink) {
-  manager_.RegisterFrameSinkId(kFrameSinkIdA);
+  manager_.RegisterFrameSinkId(kFrameSinkIdA, true /* report_activation */);
 
   // Create a CompositorFrameSinkImpl.
   MockCompositorFrameSinkClient compositor_frame_sink_client;
@@ -134,7 +134,7 @@
 }
 
 TEST_F(FrameSinkManagerTest, CompositorFrameSinkConnectionLost) {
-  manager_.RegisterFrameSinkId(kFrameSinkIdA);
+  manager_.RegisterFrameSinkId(kFrameSinkIdA, true /* report_activation */);
 
   // Create a CompositorFrameSinkImpl.
   MockCompositorFrameSinkClient compositor_frame_sink_client;
@@ -451,7 +451,7 @@
 TEST_F(FrameSinkManagerTest, DebugLabel) {
   const std::string label = "Test Label";
 
-  manager_.RegisterFrameSinkId(kFrameSinkIdA);
+  manager_.RegisterFrameSinkId(kFrameSinkIdA, true /* report_activation */);
   manager_.SetFrameSinkDebugLabel(kFrameSinkIdA, label);
   EXPECT_EQ(label, manager_.GetFrameSinkDebugLabel(kFrameSinkIdA));
 
diff --git a/components/viz/service/frame_sinks/surface_references_unittest.cc b/components/viz/service/frame_sinks/surface_references_unittest.cc
index f82ea76..0e212075 100644
--- a/components/viz/service/frame_sinks/surface_references_unittest.cc
+++ b/components/viz/service/frame_sinks/surface_references_unittest.cc
@@ -65,7 +65,8 @@
       const FrameSinkId& frame_sink_id) {
     auto& support_ptr = supports_[frame_sink_id];
     if (!support_ptr) {
-      manager_->RegisterFrameSinkId(frame_sink_id);
+      manager_->RegisterFrameSinkId(frame_sink_id,
+                                    true /* report_activation */);
       constexpr bool is_root = false;
       constexpr bool needs_sync_points = true;
       support_ptr = std::make_unique<CompositorFrameSinkSupport>(
diff --git a/components/viz/service/frame_sinks/video_detector_unittest.cc b/components/viz/service/frame_sinks/video_detector_unittest.cc
index 977931a7..72e36d9 100644
--- a/components/viz/service/frame_sinks/video_detector_unittest.cc
+++ b/components/viz/service/frame_sinks/video_detector_unittest.cc
@@ -173,7 +173,8 @@
     constexpr bool needs_sync_points = true;
     static uint32_t client_id = 1;
     FrameSinkId frame_sink_id(client_id++, 0);
-    frame_sink_manager_.RegisterFrameSinkId(frame_sink_id);
+    frame_sink_manager_.RegisterFrameSinkId(frame_sink_id,
+                                            true /* report_activation */);
     auto frame_sink = std::make_unique<CompositorFrameSinkSupport>(
         &frame_sink_client_, &frame_sink_manager_, frame_sink_id, is_root,
         needs_sync_points);
diff --git a/components/viz/service/gl/gpu_service_impl.cc b/components/viz/service/gl/gpu_service_impl.cc
index 7a7d21a..142dd65 100644
--- a/components/viz/service/gl/gpu_service_impl.cc
+++ b/components/viz/service/gl/gpu_service_impl.cc
@@ -343,6 +343,7 @@
 
     GrContextOptions options;
     options.fExplicitlyAllocateGPUResources = GrContextOptions::Enable::kYes;
+    options.fSortRenderTargets = GrContextOptions::Enable::kYes;
     options.fUseGLBufferDataNullHint = GrContextOptions::Enable::kYes;
     data.gr_context = GrContext::MakeGL(std::move(native_interface), options);
     DCHECK(data.gr_context);
diff --git a/components/viz/test/data/rotated_drop_shadow_filter_gl.png b/components/viz/test/data/rotated_drop_shadow_filter_gl.png
index e4cf583..ff87f00 100644
--- a/components/viz/test/data/rotated_drop_shadow_filter_gl.png
+++ b/components/viz/test/data/rotated_drop_shadow_filter_gl.png
Binary files differ
diff --git a/components/viz/test/data/rotated_filter_gl.png b/components/viz/test/data/rotated_filter_gl.png
index a4e3cede..1753094 100644
--- a/components/viz/test/data/rotated_filter_gl.png
+++ b/components/viz/test/data/rotated_filter_gl.png
Binary files differ
diff --git a/components/viz/test/test_frame_sink_manager.h b/components/viz/test/test_frame_sink_manager.h
index bc39214e..d606acf 100644
--- a/components/viz/test/test_frame_sink_manager.h
+++ b/components/viz/test/test_frame_sink_manager.h
@@ -21,7 +21,8 @@
 
  private:
   // mojom::FrameSinkManager:
-  void RegisterFrameSinkId(const FrameSinkId& frame_sink_id) override {}
+  void RegisterFrameSinkId(const FrameSinkId& frame_sink_id,
+                           bool report_activation) override {}
   void InvalidateFrameSinkId(const FrameSinkId& frame_sink_id) override {}
   void EnableSynchronizationReporting(
       const FrameSinkId& frame_sink_id,
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc
index d095d80b..f314509b 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter.cc
@@ -56,9 +56,9 @@
     bool internal) {
   std::unique_ptr<AccessibilityTreeFormatter> formatter;
   if (internal)
-    formatter.reset(new AccessibilityTreeFormatterBlink());
+    formatter = std::make_unique<AccessibilityTreeFormatterBlink>();
   else
-    formatter.reset(Create());
+    formatter = Create();
   base::string16 accessibility_contents_utf16;
   std::vector<Filter> filters;
   filters.push_back(Filter(base::ASCIIToUTF16("*"), Filter::ALLOW));
diff --git a/content/browser/accessibility/accessibility_tree_formatter.h b/content/browser/accessibility/accessibility_tree_formatter.h
index 7dc41adf..9e41ca92 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.h
+++ b/content/browser/accessibility/accessibility_tree_formatter.h
@@ -51,7 +51,7 @@
   };
 
   // Create the appropriate native subclass of AccessibilityTreeFormatter.
-  static AccessibilityTreeFormatter* Create();
+  static std::unique_ptr<AccessibilityTreeFormatter> Create();
 
   static bool MatchesFilters(
       const std::vector<Filter>& filters,
diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc
index 96396f0..282de50 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_android.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc
@@ -80,8 +80,9 @@
 };
 
 // static
-AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create() {
-  return new AccessibilityTreeFormatterAndroid();
+std::unique_ptr<AccessibilityTreeFormatter>
+AccessibilityTreeFormatter::Create() {
+  return std::make_unique<AccessibilityTreeFormatterAndroid>();
 }
 
 AccessibilityTreeFormatterAndroid::AccessibilityTreeFormatterAndroid() {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc b/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc
index 91baaa6..da67fa2 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc
@@ -59,8 +59,9 @@
 };
 
 // static
-AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create() {
-  return new AccessibilityTreeFormatterAuraLinux();
+std::unique_ptr<AccessibilityTreeFormatter>
+AccessibilityTreeFormatter::Create() {
+  return std::make_unique<AccessibilityTreeFormatterAuraLinux>();
 }
 
 AccessibilityTreeFormatterAuraLinux::AccessibilityTreeFormatterAuraLinux() {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
index 72b0c91..28d76d87 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
@@ -226,8 +226,9 @@
 };
 
 // static
-AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create() {
-  return new AccessibilityTreeFormatterMac();
+std::unique_ptr<AccessibilityTreeFormatter>
+AccessibilityTreeFormatter::Create() {
+  return std::make_unique<AccessibilityTreeFormatterMac>();
 }
 
 AccessibilityTreeFormatterMac::AccessibilityTreeFormatterMac() {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_stub.cc b/content/browser/accessibility/accessibility_tree_formatter_stub.cc
index 26c8d20..61a74486 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_stub.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_stub.cc
@@ -27,8 +27,9 @@
 
 #if !defined(PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL)
 // static
-AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create() {
-  return new AccessibilityTreeFormatterStub();
+std::unique_ptr<AccessibilityTreeFormatter>
+AccessibilityTreeFormatter::Create() {
+  return std::make_unique<AccessibilityTreeFormatterStub>();
 }
 #endif
 
diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc
index edcd636..91706b9 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_win.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc
@@ -119,9 +119,10 @@
 };
 
 // static
-AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create() {
+std::unique_ptr<AccessibilityTreeFormatter>
+AccessibilityTreeFormatter::Create() {
   base::win::AssertComInitialized();
-  return new AccessibilityTreeFormatterWin();
+  return std::make_unique<AccessibilityTreeFormatterWin>();
 }
 
 AccessibilityTreeFormatterWin::AccessibilityTreeFormatterWin() {
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
index 77b9831..683b5c0 100644
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
@@ -177,10 +177,10 @@
   }
 }
 
-AccessibilityTreeFormatter*
-    DumpAccessibilityTestBase::CreateAccessibilityTreeFormatter() {
+std::unique_ptr<AccessibilityTreeFormatter>
+DumpAccessibilityTestBase::CreateAccessibilityTreeFormatter() {
   if (is_blink_pass_)
-    return new AccessibilityTreeFormatterBlink();
+    return std::make_unique<AccessibilityTreeFormatterBlink>();
   else
     return AccessibilityTreeFormatter::Create();
 }
@@ -199,7 +199,7 @@
 
 void DumpAccessibilityTestBase::RunTestForPlatform(
     const base::FilePath file_path, const char* file_dir) {
-  formatter_.reset(CreateAccessibilityTreeFormatter());
+  formatter_ = CreateAccessibilityTreeFormatter();
 
   // Disable the "hot tracked" state (set when the mouse is hovering over
   // an object) because it makes test output change based on the mouse position.
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.h b/content/browser/accessibility/dump_accessibility_browsertest_base.h
index 35a8e57..e08d8320 100644
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.h
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.h
@@ -97,7 +97,8 @@
       std::vector<std::string>* run_until);
 
   // Create the right AccessibilityTreeFormatter subclass.
-  AccessibilityTreeFormatter* CreateAccessibilityTreeFormatter();
+  std::unique_ptr<AccessibilityTreeFormatter>
+  CreateAccessibilityTreeFormatter();
 
   void RunTestForPlatform(const base::FilePath file_path, const char* file_dir);
 
diff --git a/content/browser/android/app_web_message_port.cc b/content/browser/android/app_web_message_port.cc
index ac0b990..0f4751f 100644
--- a/content/browser/android/app_web_message_port.cc
+++ b/content/browser/android/app_web_message_port.cc
@@ -40,8 +40,7 @@
     const base::android::JavaParamRef<jclass>& jcaller,
     const base::android::JavaParamRef<jbyteArray>& encoded_data) {
   std::vector<uint8_t> encoded_message;
-  base::android::JavaByteArrayToByteVector(env, encoded_data.obj(),
-                                           &encoded_message);
+  base::android::JavaByteArrayToByteVector(env, encoded_data, &encoded_message);
 
   base::string16 message;
   if (!blink::DecodeStringMessage(encoded_message, &message))
diff --git a/content/browser/android/select_popup.cc b/content/browser/android/select_popup.cc
index 404e219..6aba4c8 100644
--- a/content/browser/android/select_popup.cc
+++ b/content/browser/android/select_popup.cc
@@ -139,12 +139,8 @@
     return;
   }
 
-  int selected_count = env->GetArrayLength(indices);
   std::vector<int> selected_indices;
-  jint* indices_ptr = env->GetIntArrayElements(indices, NULL);
-  for (int i = 0; i < selected_count; ++i)
-    selected_indices.push_back(indices_ptr[i]);
-  env->ReleaseIntArrayElements(indices, indices_ptr, JNI_ABORT);
+  base::android::JavaIntArrayToIntVector(env, indices, &selected_indices);
   rfhi->DidSelectPopupMenuItems(selected_indices);
 }
 
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 20471ef5..c8512fd 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -397,9 +397,6 @@
 }
 #endif
 
-const base::Feature kBrowserResponsivenessCalculator{
-    "BrowserResponsivenessCalculator", base::FEATURE_DISABLED_BY_DEFAULT};
-
 std::unique_ptr<base::MemoryPressureMonitor> CreateMemoryPressureMonitor(
     const base::CommandLine& command_line) {
   // Behavior of browser tests should not depend on things outside of their
@@ -1436,10 +1433,10 @@
   SystemHotkeyHelperMac::GetInstance()->DeferredLoadSystemHotkeys();
 #endif  // defined(OS_MACOSX)
 
-  if (base::FeatureList::IsEnabled(kBrowserResponsivenessCalculator)) {
-    responsiveness_watcher_ = new responsiveness::Watcher;
-    responsiveness_watcher_->SetUp();
-  }
+#if !defined(OS_ANDROID)
+  responsiveness_watcher_ = new responsiveness::Watcher;
+  responsiveness_watcher_->SetUp();
+#endif
 
 #if defined(OS_ANDROID)
   media::SetMediaDrmBridgeClient(GetContentClient()->GetMediaDrmBridgeClient());
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index 60a5a64..c1b02ef 100644
--- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -73,8 +73,34 @@
       command_line_->HasSwitch(service_manager::switches::kNoSandbox) ||
       service_manager::IsUnsandboxedSandboxType(sandbox_type);
 
-  bool use_v2 =
-      !no_sandbox && (sandbox_type != service_manager::SANDBOX_TYPE_GPU);
+  // TODO(kerrnel): Delete this switch once the V2 sandbox is always enabled.
+  bool use_v2 = base::FeatureList::IsEnabled(features::kMacV2Sandbox);
+
+  switch (sandbox_type) {
+    case service_manager::SANDBOX_TYPE_NO_SANDBOX:
+      break;
+    case service_manager::SANDBOX_TYPE_CDM:
+    case service_manager::SANDBOX_TYPE_PPAPI:
+    case service_manager::SANDBOX_TYPE_RENDERER:
+    case service_manager::SANDBOX_TYPE_UTILITY:
+    case service_manager::SANDBOX_TYPE_NACL_LOADER:
+    case service_manager::SANDBOX_TYPE_PDF_COMPOSITOR:
+    case service_manager::SANDBOX_TYPE_PROFILING:
+      // If the feature experiment is enabled and this process type supports
+      // the v2 sandbox, use it.
+      use_v2 &= true;
+      break;
+    case service_manager::SANDBOX_TYPE_AUDIO:
+      // The audio service only exists with the v2 sandbox.
+      use_v2 |= true;
+      break;
+    default:
+      // This is a 'break' because the V2 sandbox is not enabled for all
+      // processes yet, and so there are sandbox types like NETWORK that
+      // should not be run under the V2 sandbox.
+      use_v2 = false;
+      break;
+  }
 
   if (use_v2 && !no_sandbox) {
     // Generate the profile string.
@@ -107,16 +133,8 @@
       case service_manager::SANDBOX_TYPE_PROFILING:
         profile += service_manager::kSeatbeltPolicyString_utility;
         break;
-      case service_manager::SANDBOX_TYPE_NETWORK:
-        // Put a separate CHECK() for the network sandbox so that crash reports
-        // will show which invalid case was hit.
+      default:
         CHECK(false);
-        break;
-      case service_manager::SANDBOX_TYPE_INVALID:
-      case service_manager::SANDBOX_TYPE_FIRST_TYPE:
-      case service_manager::SANDBOX_TYPE_AFTER_LAST_TYPE:
-        CHECK(false);
-        break;
     }
 
     // Disable os logging to com.apple.diagnosticd which is a performance
diff --git a/content/browser/devtools/protocol/browser_handler.cc b/content/browser/devtools/protocol/browser_handler.cc
index 193dcdb..a8adc47 100644
--- a/content/browser/devtools/protocol/browser_handler.cc
+++ b/content/browser/devtools/protocol/browser_handler.cc
@@ -138,6 +138,8 @@
     *out_type = PermissionType::CLIPBOARD_WRITE;
   } else if (type == protocol::Browser::PermissionTypeEnum::PaymentHandler) {
     *out_type = PermissionType::PAYMENT_HANDLER;
+  } else if (type == protocol::Browser::PermissionTypeEnum::BackgroundFetch) {
+    *out_type = PermissionType::BACKGROUND_FETCH;
   } else {
     return Response::InvalidParams("Unknown permission type: " + type);
   }
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc
index b1d54ae..1490ddc65 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -260,18 +260,18 @@
       *transformed_point, target_view, transformed_point, source);
 }
 
-void CrossProcessFrameConnector::ForwardAckedTouchpadPinchGestureEvent(
+void CrossProcessFrameConnector::ForwardAckedTouchpadZoomEvent(
     const blink::WebGestureEvent& event,
     InputEventAckState ack_result) {
   auto* root_view = GetRootRenderWidgetHostView();
   if (!root_view)
     return;
 
-  blink::WebGestureEvent pinch_event(event);
+  blink::WebGestureEvent root_event(event);
   const gfx::PointF root_point =
       view_->TransformPointToRootCoordSpaceF(event.PositionInWidget());
-  pinch_event.SetPositionInWidget(root_point);
-  root_view->GestureEventAck(pinch_event, ack_result);
+  root_event.SetPositionInWidget(root_point);
+  root_view->GestureEventAck(root_event, ack_result);
 }
 
 void CrossProcessFrameConnector::BubbleScrollEvent(
diff --git a/content/browser/frame_host/cross_process_frame_connector.h b/content/browser/frame_host/cross_process_frame_connector.h
index d99a64e..79d3565 100644
--- a/content/browser/frame_host/cross_process_frame_connector.h
+++ b/content/browser/frame_host/cross_process_frame_connector.h
@@ -96,9 +96,8 @@
       const viz::SurfaceId& local_surface_id,
       gfx::PointF* transformed_point,
       viz::EventSource source = viz::EventSource::ANY) override;
-  void ForwardAckedTouchpadPinchGestureEvent(
-      const blink::WebGestureEvent& event,
-      InputEventAckState ack_result) override;
+  void ForwardAckedTouchpadZoomEvent(const blink::WebGestureEvent& event,
+                                     InputEventAckState ack_result) override;
   void BubbleScrollEvent(const blink::WebGestureEvent& event) override;
   bool HasFocus() override;
   void FocusRootView() override;
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 96c9cd1..992107d 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -679,24 +679,24 @@
     GetOwnerRenderWidgetHostView()->GestureEventAck(event, ack_result);
   }
 
-  if (blink::WebInputEvent::IsPinchGestureEventType(event.GetType()))
-    ProcessTouchpadPinchAckInRoot(event, ack_result);
+  if (event.IsTouchpadZoomEvent())
+    ProcessTouchpadZoomEventAckInRoot(event, ack_result);
 }
 
-void RenderWidgetHostViewGuest::ProcessTouchpadPinchAckInRoot(
+void RenderWidgetHostViewGuest::ProcessTouchpadZoomEventAckInRoot(
     const blink::WebGestureEvent& event,
     InputEventAckState ack_result) {
-  DCHECK(blink::WebInputEvent::IsPinchGestureEventType(event.GetType()));
+  DCHECK(event.IsTouchpadZoomEvent());
 
   RenderWidgetHostViewBase* root_rwhv = GetRootView(this);
   if (!root_rwhv)
     return;
 
-  blink::WebGestureEvent pinch_event(event);
+  blink::WebGestureEvent root_event(event);
   const gfx::PointF root_point =
       TransformPointToRootCoordSpaceF(event.PositionInWidget());
-  pinch_event.SetPositionInWidget(root_point);
-  root_rwhv->GestureEventAck(pinch_event, ack_result);
+  root_event.SetPositionInWidget(root_point);
+  root_rwhv->GestureEventAck(root_event, ack_result);
 }
 
 InputEventAckState RenderWidgetHostViewGuest::FilterInputEvent(
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 dae838f..8b4d712e 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -188,8 +188,8 @@
                           int browser_plugin_instance_id,
                           const blink::WebInputEvent* event);
 
-  void ProcessTouchpadPinchAckInRoot(const blink::WebGestureEvent& event,
-                                     InputEventAckState ack_result);
+  void ProcessTouchpadZoomEventAckInRoot(const blink::WebGestureEvent& event,
+                                         InputEventAckState ack_result);
 
 #if defined(USE_AURA)
   void OnGotEmbedToken(const base::UnguessableToken& token);
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 972b3ba..53e33e6 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -660,6 +660,8 @@
       in_process_(false),
       kind_(kind),
       process_launched_(false),
+      connection_filter_id_(
+          ServiceManagerConnection::kInvalidConnectionFilterId),
       weak_ptr_factory_(this) {
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kSingleProcess) ||
@@ -774,6 +776,11 @@
   base::PostTaskWithTraits(
       FROM_HERE, {BrowserThread::UI},
       base::BindOnce(&OnGpuProcessHostDestroyedOnUI, host_id_, message));
+
+  if (ServiceManagerConnection::GetForProcess()) {
+    ServiceManagerConnection::GetForProcess()->RemoveConnectionFilter(
+        connection_filter_id_);
+  }
 }
 
 bool GpuProcessHost::Init() {
@@ -783,8 +790,9 @@
 
   // May be null during test execution.
   if (ServiceManagerConnection::GetForProcess()) {
-    ServiceManagerConnection::GetForProcess()->AddConnectionFilter(
-        std::make_unique<ConnectionFilterImpl>(process_->GetData().id));
+    connection_filter_id_ =
+        ServiceManagerConnection::GetForProcess()->AddConnectionFilter(
+            std::make_unique<ConnectionFilterImpl>(process_->GetData().id));
   }
 
   process_->GetHost()->CreateChannelMojo();
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index f8e2062..acd9e663 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -202,6 +202,8 @@
   // Time Init started.  Used to log total GPU process startup time to UMA.
   base::TimeTicks init_start_time_;
 
+  int connection_filter_id_;
+
   // The total number of GPU process crashes.
   static base::subtle::Atomic32 gpu_crash_count_;
   static bool crashed_before_;
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 67b9606..937723b 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -990,7 +990,8 @@
 }
 
 void CompositorImpl::RegisterRootFrameSink() {
-  GetHostFrameSinkManager()->RegisterFrameSinkId(frame_sink_id_, this);
+  GetHostFrameSinkManager()->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
   GetHostFrameSinkManager()->SetFrameSinkDebugLabel(frame_sink_id_,
                                                     "CompositorImpl");
 }
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 36f068e..3bf32f6d 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -50,7 +50,8 @@
   ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
   factory->GetContextFactory()->AddObserver(this);
   DCHECK(host_frame_sink_manager_);
-  host_frame_sink_manager_->RegisterFrameSinkId(frame_sink_id_, this);
+  host_frame_sink_manager_->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
   host_frame_sink_manager_->EnableSynchronizationReporting(
       frame_sink_id_, "Compositing.MainFrameSynchronization.Duration");
   host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_,
diff --git a/content/browser/renderer_host/embedded_frame_sink_impl.cc b/content/browser/renderer_host/embedded_frame_sink_impl.cc
index 0d7a158..60567f0 100644
--- a/content/browser/renderer_host/embedded_frame_sink_impl.cc
+++ b/content/browser/renderer_host/embedded_frame_sink_impl.cc
@@ -25,7 +25,8 @@
       parent_frame_sink_id_(parent_frame_sink_id),
       frame_sink_id_(frame_sink_id) {
   client_.set_connection_error_handler(std::move(destroy_callback));
-  host_frame_sink_manager_->RegisterFrameSinkId(frame_sink_id_, this);
+  host_frame_sink_manager_->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
   host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_,
                                                    "EmbeddedFrameSinkImpl");
 }
diff --git a/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc b/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
index 045779e3..c2b50a31 100644
--- a/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
+++ b/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
@@ -128,8 +128,9 @@
     provider_ = std::make_unique<EmbeddedFrameSinkProviderImpl>(
         host_frame_sink_manager_.get(), kRendererClientId);
 
-    host_frame_sink_manager_->RegisterFrameSinkId(kFrameSinkParent,
-                                                  &host_frame_sink_client_);
+    host_frame_sink_manager_->RegisterFrameSinkId(
+        kFrameSinkParent, &host_frame_sink_client_,
+        viz::ReportFirstSurfaceActivation::kYes);
   }
   void TearDown() override {
     host_frame_sink_manager_->InvalidateFrameSinkId(kFrameSinkParent);
diff --git a/content/browser/renderer_host/frame_connector_delegate.h b/content/browser/renderer_host/frame_connector_delegate.h
index d5f434383..969d54ed 100644
--- a/content/browser/renderer_host/frame_connector_delegate.h
+++ b/content/browser/renderer_host/frame_connector_delegate.h
@@ -144,8 +144,9 @@
       gfx::PointF* transformed_point,
       viz::EventSource source = viz::EventSource::ANY);
 
-  // Pass acked touchpad pinch gesture events to the root view for processing.
-  virtual void ForwardAckedTouchpadPinchGestureEvent(
+  // Pass acked touchpad pinch or double tap gesture events to the root view
+  // for processing.
+  virtual void ForwardAckedTouchpadZoomEvent(
       const blink::WebGestureEvent& event,
       InputEventAckState ack_result) {}
 
diff --git a/content/browser/renderer_host/input/fling_controller.cc b/content/browser/renderer_host/input/fling_controller.cc
index c09268d..3f96e124 100644
--- a/content/browser/renderer_host/input/fling_controller.cc
+++ b/content/browser/renderer_host/input/fling_controller.cc
@@ -43,12 +43,10 @@
 FlingController::Config::Config() {}
 
 FlingController::FlingController(
-    GestureEventQueue* gesture_event_queue,
     FlingControllerEventSenderClient* event_sender_client,
     FlingControllerSchedulerClient* scheduler_client,
     const Config& config)
-    : gesture_event_queue_(gesture_event_queue),
-      event_sender_client_(event_sender_client),
+    : event_sender_client_(event_sender_client),
       scheduler_client_(scheduler_client),
       touchpad_tap_suppression_controller_(
           config.touchpad_tap_suppression_config),
@@ -57,7 +55,6 @@
       fling_in_progress_(false),
       clock_(base::DefaultTickClock::GetInstance()),
       weak_ptr_factory_(this) {
-  DCHECK(gesture_event_queue);
   DCHECK(event_sender_client);
   DCHECK(scheduler_client);
 }
@@ -375,7 +372,6 @@
   fling_curve_.reset();
   has_fling_animation_started_ = false;
   fling_in_progress_ = false;
-  gesture_event_queue_->FlingHasBeenHalted();
 
   // Extract the last event filtered by the fling booster if it exists.
   bool fling_cancellation_is_deferred =
diff --git a/content/browser/renderer_host/input/fling_controller.h b/content/browser/renderer_host/input/fling_controller.h
index 3f02f83..240acba 100644
--- a/content/browser/renderer_host/input/fling_controller.h
+++ b/content/browser/renderer_host/input/fling_controller.h
@@ -19,8 +19,6 @@
 
 namespace content {
 
-class GestureEventQueue;
-
 class FlingController;
 
 // Interface with which the FlingController can forward generated fling progress
@@ -73,8 +71,7 @@
     ActiveFlingParameters() : modifiers(0) {}
   };
 
-  FlingController(GestureEventQueue* gesture_event_queue,
-                  FlingControllerEventSenderClient* event_sender_client,
+  FlingController(FlingControllerEventSenderClient* event_sender_client,
                   FlingControllerSchedulerClient* scheduler_client,
                   const Config& config);
 
@@ -152,8 +149,6 @@
   bool UpdateCurrentFlingState(const blink::WebGestureEvent& fling_start_event,
                                const gfx::Vector2dF& velocity);
 
-  GestureEventQueue* gesture_event_queue_;
-
   FlingControllerEventSenderClient* event_sender_client_;
 
   FlingControllerSchedulerClient* scheduler_client_;
diff --git a/content/browser/renderer_host/input/fling_controller_unittest.cc b/content/browser/renderer_host/input/fling_controller_unittest.cc
index 51e37f8..be0ea893 100644
--- a/content/browser/renderer_host/input/fling_controller_unittest.cc
+++ b/content/browser/renderer_host/input/fling_controller_unittest.cc
@@ -26,21 +26,15 @@
 
 class FakeFlingController : public FlingController {
  public:
-  FakeFlingController(GestureEventQueue* gesture_event_queue,
-
-                      FlingControllerEventSenderClient* event_sender_client,
+  FakeFlingController(FlingControllerEventSenderClient* event_sender_client,
                       FlingControllerSchedulerClient* scheduler_client,
                       const Config& config)
-      : FlingController(gesture_event_queue,
-                        event_sender_client,
-                        scheduler_client,
-                        config) {}
+      : FlingController(event_sender_client, scheduler_client, config) {}
 
   bool FlingBoosted() const { return fling_booster_->fling_boosted(); }
 };
 
-class FlingControllerTest : public GestureEventQueueClient,
-                            public FlingControllerEventSenderClient,
+class FlingControllerTest : public FlingControllerEventSenderClient,
                             public FlingControllerSchedulerClient,
                             public testing::TestWithParam<bool> {
  public:
@@ -53,21 +47,12 @@
   ~FlingControllerTest() override {}
 
   void SetUp() override {
-    queue_ = std::make_unique<GestureEventQueue>(this, this, this,
-                                                 GestureEventQueue::Config());
     fling_controller_ = std::make_unique<FakeFlingController>(
-        queue_.get(), this, this, FlingController::Config());
+        this, this, FlingController::Config());
     fling_controller_->set_clock_for_testing(&mock_clock_);
     AdvanceTime();
   }
 
-  // GestureEventQueueClient
-  void SendGestureEventImmediately(
-      const GestureEventWithLatencyInfo& event) override {}
-  void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
-                         InputEventAckSource ack_source,
-                         InputEventAckState ack_result) override {}
-
   // FlingControllerEventSenderClient
   void SendGeneratedWheelEvent(
       const MouseWheelEventWithLatencyInfo& wheel_event) override {
@@ -159,7 +144,6 @@
 
   bool needs_begin_frame_for_fling_progress_;
   base::test::ScopedTaskEnvironment scoped_task_environment_;
-  std::unique_ptr<GestureEventQueue> queue_;
   DISALLOW_COPY_AND_ASSIGN(FlingControllerTest);
 };
 
diff --git a/content/browser/renderer_host/input/fling_scheduler_unittest.cc b/content/browser/renderer_host/input/fling_scheduler_unittest.cc
index e031a09..392cc8d 100644
--- a/content/browser/renderer_host/input/fling_scheduler_unittest.cc
+++ b/content/browser/renderer_host/input/fling_scheduler_unittest.cc
@@ -46,7 +46,6 @@
 };
 
 class FlingSchedulerTest : public testing::Test,
-                           public GestureEventQueueClient,
                            public FlingControllerEventSenderClient {
  public:
   FlingSchedulerTest() {}
@@ -55,10 +54,8 @@
     widget_host_->SetView(view_);
 
     fling_scheduler_ = std::make_unique<FakeFlingScheduler>(widget_host_);
-    queue_ = std::make_unique<GestureEventQueue>(
-        this, this, fling_scheduler_.get(), GestureEventQueue::Config());
     fling_controller_ = std::make_unique<FlingController>(
-        queue_.get(), this, fling_scheduler_.get(), FlingController::Config());
+        this, fling_scheduler_.get(), FlingController::Config());
   }
 
   void TearDown() override {
@@ -103,13 +100,6 @@
       fling_controller_->ProcessGestureFlingCancel(fling_cancel_with_latency);
   }
 
-  // GestureEventQueueClient
-  void SendGestureEventImmediately(
-      const GestureEventWithLatencyInfo& event) override {}
-  void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
-                         InputEventAckSource ack_source,
-                         InputEventAckState ack_result) override {}
-
   // FlingControllerEventSenderClient
   void SendGeneratedWheelEvent(
       const MouseWheelEventWithLatencyInfo& wheel_event) override {}
@@ -121,7 +111,6 @@
 
  private:
   TestBrowserThreadBundle thread_bundle_;
-  std::unique_ptr<GestureEventQueue> queue_;
   std::unique_ptr<TestBrowserContext> browser_context_;
   RenderWidgetHostImpl* widget_host_;
   MockRenderProcessHost* process_host_;
diff --git a/content/browser/renderer_host/input/gesture_event_queue.cc b/content/browser/renderer_host/input/gesture_event_queue.cc
index 93347d9..6d485b5 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.cc
+++ b/content/browser/renderer_host/input/gesture_event_queue.cc
@@ -30,14 +30,12 @@
     FlingControllerSchedulerClient* fling_scheduler_client,
     const Config& config)
     : client_(client),
-      fling_in_progress_(false),
       scrolling_in_progress_(false),
       ignore_next_ack_(false),
       allow_multiple_inflight_events_(
           base::FeatureList::IsEnabled(features::kVsyncAlignedInputEvents)),
       debounce_interval_(config.debounce_interval),
-      fling_controller_(this,
-                        fling_event_sender_client,
+      fling_controller_(fling_event_sender_client,
                         fling_scheduler_client,
                         config.fling_config) {
   DCHECK(client);
@@ -49,8 +47,9 @@
 
 bool GestureEventQueue::DebounceOrQueueEvent(
     const GestureEventWithLatencyInfo& gesture_event) {
-  // GFS should have been filtered in FlingControllerFilterEvent.
+  // GFS and GFC should have been filtered in FlingControllerFilterEvent.
   DCHECK_NE(gesture_event.event.GetType(), WebInputEvent::kGestureFlingStart);
+  DCHECK_NE(gesture_event.event.GetType(), WebInputEvent::kGestureFlingCancel);
   if (!ShouldForwardForBounceReduction(gesture_event))
     return false;
 
@@ -70,7 +69,6 @@
   // touchscreen and autoscroll) which are handled normally.
   if (gesture_event.event.GetType() == WebInputEvent::kGestureFlingStart) {
     fling_controller_.ProcessGestureFlingStart(gesture_event);
-    fling_in_progress_ = true;
     return true;
   }
 
@@ -78,7 +76,6 @@
   // GestureFlingCancel event should be the same.
   if (gesture_event.event.GetType() == WebInputEvent::kGestureFlingCancel) {
     fling_controller_.ProcessGestureFlingCancel(gesture_event);
-    fling_in_progress_ = false;
     return true;
   }
 
@@ -86,7 +83,6 @@
 }
 
 void GestureEventQueue::StopFling() {
-  fling_in_progress_ = false;
   fling_controller_.StopFling();
 }
 
@@ -98,24 +94,8 @@
   return fling_controller_.CurrentFlingVelocity();
 }
 
-bool GestureEventQueue::ShouldDiscardFlingCancelEvent(
-    const GestureEventWithLatencyInfo& gesture_event) const {
-  // When the GFS is processed by the fling_controller_ the controller handles
-  // GFC filtering as well.
-  DCHECK(!(fling_controller_.fling_in_progress()));
-
-  if (coalesced_gesture_events_.empty() && fling_in_progress_)
-    return false;
-  GestureQueueWithAckState::const_reverse_iterator it =
-      coalesced_gesture_events_.rbegin();
-  while (it != coalesced_gesture_events_.rend()) {
-    if (it->event.GetType() == WebInputEvent::kGestureFlingStart)
-      return false;
-    if (it->event.GetType() == WebInputEvent::kGestureFlingCancel)
-      return true;
-    it++;
-  }
-  return true;
+bool GestureEventQueue::FlingInProgressForTest() const {
+  return fling_controller_.fling_in_progress();
 }
 
 bool GestureEventQueue::ShouldForwardForBounceReduction(
@@ -145,13 +125,6 @@
       debouncing_deferral_queue_.clear();
       return true;
 
-    case WebInputEvent::kGestureFlingStart:
-      // GestureFlingStart shouldn't be debounced because it is a discrete event
-      // signalling the end of a scroll
-      debounce_deferring_timer_.Stop();
-      GestureEventQueue::SendScrollEndingEventsNow();
-      return true;
-
     case WebInputEvent::kGesturePinchBegin:
     case WebInputEvent::kGesturePinchEnd:
     case WebInputEvent::kGesturePinchUpdate:
@@ -169,23 +142,17 @@
 void GestureEventQueue::QueueAndForwardIfNecessary(
     const GestureEventWithLatencyInfo& gesture_event) {
   if (allow_multiple_inflight_events_) {
-    // Event coalescing should be handled in compositor thread event queue.
-    if (gesture_event.event.GetType() == WebInputEvent::kGestureFlingCancel)
-      fling_in_progress_ = false;
-    else if (gesture_event.event.GetType() == WebInputEvent::kGestureFlingStart)
-      fling_in_progress_ = true;
+    // GFS and GFC should have been filtered in FlingControllerFilterEvent to
+    // get handled by fling controller.
+    DCHECK_NE(gesture_event.event.GetType(), WebInputEvent::kGestureFlingStart);
+    DCHECK_NE(gesture_event.event.GetType(),
+              WebInputEvent::kGestureFlingCancel);
     coalesced_gesture_events_.push_back(gesture_event);
     client_->SendGestureEventImmediately(gesture_event);
     return;
   }
 
   switch (gesture_event.event.GetType()) {
-    case WebInputEvent::kGestureFlingCancel:
-      fling_in_progress_ = false;
-      break;
-    case WebInputEvent::kGestureFlingStart:
-      fling_in_progress_ = true;
-      break;
     case WebInputEvent::kGesturePinchUpdate:
     case WebInputEvent::kGestureScrollUpdate:
       QueueScrollOrPinchAndForwardIfNecessary(gesture_event);
@@ -350,10 +317,6 @@
   return fling_controller_.GetTouchpadTapSuppressionController();
 }
 
-void GestureEventQueue::FlingHasBeenHalted() {
-  fling_in_progress_ = false;
-}
-
 void GestureEventQueue::ForwardGestureEvent(
     const GestureEventWithLatencyInfo& gesture_event) {
   QueueAndForwardIfNecessary(gesture_event);
diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h
index 3dec354..98ceda8 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.h
+++ b/content/browser/renderer_host/input/gesture_event_queue.h
@@ -93,10 +93,6 @@
                          blink::WebInputEvent::Type type,
                          const ui::LatencyInfo& latency);
 
-  // Sets the state of the |fling_in_progress_| field to indicate that a fling
-  // is definitely not in progress.
-  void FlingHasBeenHalted();
-
   // Returns the |TouchpadTapSuppressionController| instance.
   TouchpadTapSuppressionController* GetTouchpadTapSuppressionController();
 
@@ -107,11 +103,6 @@
            debouncing_deferral_queue_.empty();
   }
 
-  // Returns |true| if the given GestureFlingCancel should be discarded
-  // as unnecessary.
-  bool ShouldDiscardFlingCancelEvent(
-      const GestureEventWithLatencyInfo& gesture_event) const;
-
   // Calls |fling_controller_.StopFling| to halt an active fling if such exists.
   void StopFling();
 
@@ -182,13 +173,11 @@
   // remain at the head of the queue until ack'ed.
   size_t EventsInFlightCount() const;
 
+  bool FlingInProgressForTest() const;
+
   // The receiver of all forwarded gesture events.
   GestureEventQueueClient* client_;
 
-  // True if a GestureFlingStart is in progress or queued without a subsequent
-  // queued GestureFlingCancel event.
-  bool fling_in_progress_;
-
   // True if a GestureScrollUpdate sequence is in progress.
   bool scrolling_in_progress_;
 
diff --git a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
index 34e5da17..47cd90ed 100644
--- a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
+++ b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
@@ -213,7 +213,7 @@
     return queue()->scrolling_in_progress_;
   }
 
-  bool FlingInProgress() { return queue()->fling_in_progress_; }
+  bool FlingInProgress() { return queue()->FlingInProgressForTest(); }
   bool FlingCancellationIsDeferred() {
     return queue()->FlingCancellationIsDeferred();
   }
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 899b712..2c2a3c3 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -116,7 +116,6 @@
 void InputRouterImpl::SendKeyboardEvent(
     const NativeWebKeyboardEventWithLatencyInfo& key_event) {
   gesture_event_queue_.StopFling();
-  gesture_event_queue_.FlingHasBeenHalted();
   mojom::WidgetInputHandler::DispatchEventCallback callback = base::BindOnce(
       &InputRouterImpl::KeyboardEventHandled, weak_this_, key_event);
   FilterAndSendWebInputEvent(key_event.event, key_event.latency,
@@ -165,8 +164,7 @@
     touch_event_queue_.OnGestureScrollEvent(gesture_event);
   }
 
-  if (blink::WebInputEvent::IsPinchGestureEventType(
-          gesture_event.event.GetType()) &&
+  if (gesture_event.event.IsTouchpadZoomEvent() &&
       gesture_event.event.NeedsWheelEvent()) {
     touchpad_pinch_event_queue_.QueueEvent(gesture_event);
     return;
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 f224ecdd..c1b1069 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -2204,7 +2204,7 @@
   WebGestureEvent BuildGestureEvent(WebInputEvent::Type type,
                                     const gfx::PointF& point) {
     WebGestureEvent event = SyntheticWebGestureEventBuilder::Build(
-        type, blink::kWebGestureDeviceTouchpad);
+        type, blink::kWebGestureDeviceTouchscreen);
     event.SetPositionInWidget(point);
     event.SetPositionInScreen(point);
     return event;
@@ -2213,6 +2213,14 @@
   void TestTap(const std::string& name, WebInputEvent::Type type) {
     SCOPED_TRACE(name);
     const gfx::PointF orig(10, 20), scaled(20, 40);
+
+    WebGestureEvent tap_down =
+        BuildGestureEvent(WebInputEvent::kGestureTapDown, orig);
+    tap_down.data.tap_down.width = 30;
+    tap_down.data.tap_down.height = 40;
+    SimulateGestureEvent(tap_down);
+    FlushGestureEvent(WebInputEvent::kGestureTapDown);
+
     WebGestureEvent event = BuildGestureEvent(type, orig);
     event.data.tap.width = 30;
     event.data.tap.height = 40;
diff --git a/content/browser/renderer_host/input/touchpad_pinch_browsertest.cc b/content/browser/renderer_host/input/touchpad_pinch_browsertest.cc
index 9d60505d..bf2f46d 100644
--- a/content/browser/renderer_host/input/touchpad_pinch_browsertest.cc
+++ b/content/browser/renderer_host/input/touchpad_pinch_browsertest.cc
@@ -5,8 +5,10 @@
 #include "base/run_loop.h"
 #include "base/test/scoped_feature_list.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/content_features.h"
+#include "content/public/common/web_preferences.h"
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/content_browser_test.h"
 #include "content/public/test/content_browser_test_utils.h"
@@ -90,6 +92,9 @@
     observer.Wait();
   }
 
+  void EnsureNoScaleChangeWhenCanceled(
+      base::OnceCallback<void(WebContents*, gfx::Point)> send_events);
+
  private:
   base::test::ScopedFeatureList scoped_feature_list_;
   DISALLOW_COPY_AND_ASSIGN(TouchpadPinchBrowserTest);
@@ -144,11 +149,10 @@
   scale_observer.WaitForPageScaleUpdate();
 }
 
-// If the synthetic wheel event for a touchpad pinch is canceled, we should not
-// change the page scale.
-IN_PROC_BROWSER_TEST_P(TouchpadPinchBrowserTest, WheelListenerPreventingPinch) {
-  LoadURL();
-
+// Ensures that the event(s) sent in |send_events| are cancelable by a
+// wheel event listener and that doing so prevents any scale change.
+void TouchpadPinchBrowserTest::EnsureNoScaleChangeWhenCanceled(
+    base::OnceCallback<void(WebContents*, gfx::Point)> send_events) {
   // Perform an initial pinch so we can figure out the page scale we're
   // starting with for the test proper.
   content::TestPageScaleObserver starting_scale_observer(
@@ -166,8 +170,7 @@
       content::ExecuteScript(shell()->web_contents(), "setListener(true);"));
   SynchronizeThreads();
 
-  SimulateGesturePinchSequence(shell()->web_contents(), pinch_position, 1.5,
-                               blink::kWebGestureDeviceTouchpad);
+  std::move(send_events).Run(shell()->web_contents(), pinch_position);
 
   // Ensure the page handled a wheel event that it was able to cancel.
   bool default_prevented = false;
@@ -179,7 +182,7 @@
       &default_prevented));
   EXPECT_TRUE(default_prevented);
 
-  // We'll check that the previous pinch did not cause a scale change by
+  // We'll check that the previous event(s) did not cause a scale change by
   // performing another pinch that does change the scale.
   ASSERT_TRUE(content::ExecuteScript(shell()->web_contents(),
                                      "reset(); "
@@ -201,4 +204,44 @@
   EXPECT_FLOAT_EQ(starting_scale_factor * 2.0, last_scale_factor);
 }
 
+// If the synthetic wheel event for a touchpad pinch is canceled, we should not
+// change the page scale.
+IN_PROC_BROWSER_TEST_P(TouchpadPinchBrowserTest, WheelListenerPreventingPinch) {
+  LoadURL();
+
+  EnsureNoScaleChangeWhenCanceled(
+      base::BindOnce([](WebContents* web_contents, gfx::Point position) {
+        SimulateGesturePinchSequence(web_contents, position, 1.5,
+                                     blink::kWebGestureDeviceTouchpad);
+      }));
+}
+
+// If the synthetic wheel event for a touchpad double tap is canceled, we
+// should not change the page scale.
+IN_PROC_BROWSER_TEST_P(TouchpadPinchBrowserTest,
+                       WheelListenerPreventingDoubleTap) {
+  LoadURL();
+
+  WebPreferences prefs =
+      shell()->web_contents()->GetRenderViewHost()->GetWebkitPreferences();
+  prefs.double_tap_to_zoom_enabled = true;
+  shell()->web_contents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs);
+
+  EnsureNoScaleChangeWhenCanceled(
+      base::BindOnce([](WebContents* web_contents, gfx::Point position) {
+        blink::WebGestureEvent double_tap_zoom(
+            blink::WebInputEvent::kGestureDoubleTap,
+            blink::WebInputEvent::kNoModifiers,
+            blink::WebInputEvent::GetStaticTimeStampForTests(),
+            blink::kWebGestureDeviceTouchpad);
+        double_tap_zoom.SetPositionInWidget(gfx::PointF(position));
+        double_tap_zoom.SetPositionInScreen(gfx::PointF(position));
+        double_tap_zoom.data.tap.tap_count = 1;
+        double_tap_zoom.SetNeedsWheelEvent(true);
+
+        SimulateGestureEvent(web_contents, double_tap_zoom,
+                             ui::LatencyInfo(ui::SourceEventType::WHEEL));
+      }));
+}
+
 }  // namespace content
diff --git a/content/browser/renderer_host/input/touchpad_pinch_event_queue.cc b/content/browser/renderer_host/input/touchpad_pinch_event_queue.cc
index fa6ca27..ed62b51 100644
--- a/content/browser/renderer_host/input/touchpad_pinch_event_queue.cc
+++ b/content/browser/renderer_host/input/touchpad_pinch_event_queue.cc
@@ -20,7 +20,8 @@
     blink::WebMouseWheelEvent::Phase phase,
     bool cancelable) {
   DCHECK(pinch_event.GetType() == blink::WebInputEvent::kGesturePinchUpdate ||
-         pinch_event.GetType() == blink::WebInputEvent::kGesturePinchEnd);
+         pinch_event.GetType() == blink::WebInputEvent::kGesturePinchEnd ||
+         pinch_event.GetType() == blink::WebInputEvent::kGestureDoubleTap);
   float delta_y = 0.0f;
   float wheel_ticks_y = 0.0f;
 
@@ -172,6 +173,10 @@
     first_event_prevented_.reset();
     phase = blink::WebMouseWheelEvent::kPhaseEnded;
     cancelable = false;
+  } else if (pinch_event_awaiting_ack_->event.GetType() ==
+             blink::WebInputEvent::kGestureDoubleTap) {
+    phase = blink::WebMouseWheelEvent::kPhaseNone;
+    cancelable = true;
   } else {
     DCHECK_EQ(pinch_event_awaiting_ack_->event.GetType(),
               blink::WebInputEvent::kGesturePinchUpdate);
@@ -187,7 +192,6 @@
     }
   }
 
-  DCHECK_NE(phase, blink::WebMouseWheelEvent::kPhaseNone);
   const MouseWheelEventWithLatencyInfo synthetic_wheel(
       CreateSyntheticWheelFromTouchpadPinchEvent(
           pinch_event_awaiting_ack_->event, phase, cancelable),
diff --git a/content/browser/renderer_host/input/touchpad_pinch_event_queue_unittest.cc b/content/browser/renderer_host/input/touchpad_pinch_event_queue_unittest.cc
index e273c29..ec15b4c 100644
--- a/content/browser/renderer_host/input/touchpad_pinch_event_queue_unittest.cc
+++ b/content/browser/renderer_host/input/touchpad_pinch_event_queue_unittest.cc
@@ -88,6 +88,19 @@
     QueueEvent(event);
   }
 
+  void QueueDoubleTap() {
+    blink::WebGestureEvent event(
+        blink::WebInputEvent::kGestureDoubleTap,
+        blink::WebInputEvent::kNoModifiers,
+        blink::WebInputEvent::GetStaticTimeStampForTests(),
+        blink::kWebGestureDeviceTouchpad);
+    event.SetPositionInWidget(gfx::PointF(1, 1));
+    event.SetPositionInScreen(gfx::PointF(1, 1));
+    event.data.tap.tap_count = 1;
+    event.SetNeedsWheelEvent(true);
+    QueueEvent(event);
+  }
+
   void SendWheelEventAck(InputEventAckSource ack_source,
                          InputEventAckState ack_result) {
     queue_->ProcessMouseWheelAck(ack_source, ack_result, ui::LatencyInfo());
@@ -115,6 +128,14 @@
   return arg.event.phase == phase;
 }
 
+MATCHER_P(EventHasScale,
+          expected_scale,
+          std::string(negation ? "does not have" : "has") + " scale " +
+              ::testing::PrintToString(expected_scale)) {
+  const float actual_scale = exp(arg.event.delta_y / 100.0f);
+  return ::testing::Matches(::testing::FloatEq(expected_scale))(actual_scale);
+}
+
 MATCHER(EventHasCtrlModifier,
         std::string(negation ? "does not have" : "has") + " control modifier") {
   return (arg.event.GetModifiers() & blink::WebInputEvent::kControlKey) != 0;
@@ -570,4 +591,24 @@
                     INPUT_EVENT_ACK_STATE_IGNORED);
 }
 
+// Ensure that when the queue receives a touchpad double tap, it sends a
+// synthetic mouse wheel event and acks the double tap back to the client.
+TEST_P(TouchpadPinchEventQueueTest, DoubleTap) {
+  ::testing::InSequence sequence;
+  EXPECT_CALL(mock_client_,
+              SendMouseWheelEventForPinchImmediately(::testing::AllOf(
+                  EventHasCtrlModifier(), EventIsBlocking(),
+                  EventHasPhase(blink::WebMouseWheelEvent::kPhaseNone),
+                  EventHasScale(1.0f))));
+  EXPECT_CALL(
+      mock_client_,
+      OnGestureEventForPinchAck(
+          EventHasType(blink::WebInputEvent::kGestureDoubleTap),
+          InputEventAckSource::MAIN_THREAD, INPUT_EVENT_ACK_STATE_CONSUMED));
+
+  QueueDoubleTap();
+  SendWheelEventAck(InputEventAckSource::MAIN_THREAD,
+                    INPUT_EVENT_ACK_STATE_CONSUMED);
+}
+
 }  // namespace content
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
index cb73466..e59fe2ff 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -550,6 +550,7 @@
       // because the gesture type already encodes that information.
       result.SetType(blink::WebInputEvent::kGestureDoubleTap);
       result.data.tap.tap_count = 1;
+      result.SetNeedsWheelEvent(true);
       break;
     case NSEventTypeBeginGesture:
     case NSEventTypeEndGesture:
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 6d5570f..114b069a 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -951,10 +951,6 @@
   updating_web_preferences_ = false;
 }
 
-void RenderViewHostImpl::DisableScrollbarsForThreshold(const gfx::Size& size) {
-  Send(new ViewMsg_DisableScrollbarsForSmallWindows(GetRoutingID(), size));
-}
-
 void RenderViewHostImpl::EnablePreferredSizeMode() {
   Send(new ViewMsg_EnablePreferredSizeChangedMode(GetRoutingID()));
 }
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index e70977a..6951994 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -94,7 +94,6 @@
   void DirectoryEnumerationFinished(
       int request_id,
       const std::vector<base::FilePath>& files) override;
-  void DisableScrollbarsForThreshold(const gfx::Size& size) override;
   void EnablePreferredSizeMode() override;
   void ExecutePluginActionAtLocation(
       const gfx::Point& location,
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc
index 39b30d84..db3a1e9 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.cc
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -627,7 +627,7 @@
 
 void RenderWidgetHostInputEventRouter::RouteGestureEvent(
     RenderWidgetHostViewBase* root_view,
-    blink::WebGestureEvent* event,
+    const blink::WebGestureEvent* event,
     const ui::LatencyInfo& latency) {
   if (event->IsTargetViewport()) {
     root_view->ProcessGestureEvent(*event, latency);
@@ -1404,7 +1404,7 @@
 
 void RenderWidgetHostInputEventRouter::RouteTouchscreenGestureEvent(
     RenderWidgetHostViewBase* root_view,
-    blink::WebGestureEvent* event,
+    const blink::WebGestureEvent* event,
     const ui::LatencyInfo& latency) {
   DCHECK_EQ(blink::kWebGestureDeviceTouchscreen, event->SourceDevice());
   event_targeter_->FindTargetAndDispatch(root_view, *event, latency);
@@ -1415,7 +1415,8 @@
     RenderWidgetHostViewBase* root_view,
     const blink::WebGestureEvent& event) const {
   if (event.GetType() != blink::WebInputEvent::kGesturePinchBegin &&
-      event.GetType() != blink::WebInputEvent::kGestureFlingCancel) {
+      event.GetType() != blink::WebInputEvent::kGestureFlingCancel &&
+      event.GetType() != blink::WebInputEvent::kGestureDoubleTap) {
     return {nullptr, false, base::nullopt, true, false};
   }
 
@@ -1427,7 +1428,7 @@
 
 void RenderWidgetHostInputEventRouter::RouteTouchpadGestureEvent(
     RenderWidgetHostViewBase* root_view,
-    blink::WebGestureEvent* event,
+    const blink::WebGestureEvent* event,
     const ui::LatencyInfo& latency) {
   DCHECK_EQ(blink::kWebGestureDeviceTouchpad, event->SourceDevice());
   event_targeter_->FindTargetAndDispatch(root_view, *event, latency);
@@ -1505,7 +1506,9 @@
   touchpad_gesture_target_.target->ProcessGestureEvent(gesture_event, latency);
 
   if (touchpad_gesture_event.GetType() ==
-      blink::WebInputEvent::kGesturePinchEnd) {
+          blink::WebInputEvent::kGesturePinchEnd ||
+      touchpad_gesture_event.GetType() ==
+          blink::WebInputEvent::kGestureDoubleTap) {
     touchpad_gesture_target_.target = nullptr;
   }
 }
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h
index e1bf8094..a453fcb 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.h
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -79,7 +79,7 @@
                             blink::WebMouseWheelEvent* event,
                             const ui::LatencyInfo& latency);
   void RouteGestureEvent(RenderWidgetHostViewBase* root_view,
-                         blink::WebGestureEvent* event,
+                         const blink::WebGestureEvent* event,
                          const ui::LatencyInfo& latency);
   void OnHandledTouchStartOrFirstTouchMove(uint32_t unique_touch_event_id);
   void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& event,
@@ -182,14 +182,14 @@
 
   bool IsViewInMap(const RenderWidgetHostViewBase* view) const;
   void RouteTouchscreenGestureEvent(RenderWidgetHostViewBase* root_view,
-                                    blink::WebGestureEvent* event,
+                                    const blink::WebGestureEvent* event,
                                     const ui::LatencyInfo& latency);
 
   RenderWidgetTargetResult FindTouchpadGestureEventTarget(
       RenderWidgetHostViewBase* root_view,
       const blink::WebGestureEvent& event) const;
   void RouteTouchpadGestureEvent(RenderWidgetHostViewBase* root_view,
-                                 blink::WebGestureEvent* event,
+                                 const blink::WebGestureEvent* event,
                                  const ui::LatencyInfo& latency);
   void DispatchTouchpadGestureEvent(
       RenderWidgetHostViewBase* root_view,
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 5cb9060..4e83c93f 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1580,7 +1580,7 @@
     overscroll_controller_->OnGestureEventAck(event, ack_result);
   mouse_wheel_phase_handler_.GestureEventAck(event, ack_result);
 
-  ForwardTouchpadPinchIfNecessary(event, ack_result);
+  ForwardTouchpadZoomEventIfNecessary(event, ack_result);
 
   if (!gesture_listener_manager_)
     return;
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 7d4ada0..930b778c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1038,7 +1038,7 @@
   }
   event_handler_->GestureEventAck(event, ack_result);
 
-  ForwardTouchpadPinchIfNecessary(event, ack_result);
+  ForwardTouchpadZoomEventIfNecessary(event, ack_result);
 }
 
 void RenderWidgetHostViewAura::ProcessAckedTouchEvent(
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 e155153e..73138129 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -384,13 +384,10 @@
     InputEventAckState ack_result) {
 }
 
-void RenderWidgetHostViewBase::ForwardTouchpadPinchIfNecessary(
+void RenderWidgetHostViewBase::ForwardTouchpadZoomEventIfNecessary(
     const blink::WebGestureEvent& event,
     InputEventAckState ack_result) {
-  if (!blink::WebInputEvent::IsPinchGestureEventType(event.GetType()))
-    return;
-  if (event.SourceDevice() !=
-      blink::WebGestureDevice::kWebGestureDeviceTouchpad)
+  if (!event.IsTouchpadZoomEvent())
     return;
   if (!event.NeedsWheelEvent())
     return;
@@ -425,6 +422,18 @@
         host()->ForwardGestureEvent(pinch_end_event);
       }
       break;
+    case blink::WebInputEvent::kGestureDoubleTap:
+      if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) {
+        blink::WebGestureEvent double_tap(event);
+        double_tap.SetNeedsWheelEvent(false);
+        // TODO(mcnee): Support double-tap zoom gesture for OOPIFs. For now,
+        // we naively send this to the main frame. If this is over an OOPIF,
+        // then the iframe element will incorrectly be used for the scale
+        // calculation rather than the element in the OOPIF.
+        // https://crbug.com/758348
+        host()->ForwardGestureEvent(double_tap);
+      }
+      break;
     default:
       NOTREACHED();
   }
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 becc63fa..36afdbb 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -627,10 +627,10 @@
   ws::mojom::WindowTreeClientPtr GetWindowTreeClientFromRenderer();
 #endif
 
-  // If |event| is a touchpad pinch event for which we've sent a synthetic
-  // wheel event, forward the |event| to the renderer, subject to |ack_result|
-  // which is the ACK result of the synthetic wheel.
-  virtual void ForwardTouchpadPinchIfNecessary(
+  // If |event| is a touchpad pinch or double tap event for which we've sent a
+  // synthetic wheel event, forward the |event| to the renderer, subject to
+  // |ack_result| which is the ACK result of the synthetic wheel.
+  virtual void ForwardTouchpadZoomEventIfNecessary(
       const blink::WebGestureEvent& event,
       InputEventAckState ack_result);
 
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 10b41c9..40164dd7 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
@@ -79,7 +79,8 @@
     // until then set ours invalid, as operations using it will be disregarded.
     frame_sink_id_ = viz::FrameSinkId();
   } else {
-    GetHostFrameSinkManager()->RegisterFrameSinkId(frame_sink_id_, this);
+    GetHostFrameSinkManager()->RegisterFrameSinkId(
+        frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
     GetHostFrameSinkManager()->SetFrameSinkDebugLabel(
         frame_sink_id_, "RenderWidgetHostViewChildFrame");
     CreateCompositorFrameSinkSupport();
@@ -519,8 +520,8 @@
   if (!frame_connector_)
     return;
 
-  if (blink::WebInputEvent::IsPinchGestureEventType(event.GetType()))
-    ProcessTouchpadPinchAckInRoot(event, ack_result);
+  if (event.IsTouchpadZoomEvent())
+    ProcessTouchpadZoomEventAckInRoot(event, ack_result);
 
   const bool should_bubble =
       ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED ||
@@ -550,19 +551,19 @@
   }
 }
 
-void RenderWidgetHostViewChildFrame::ProcessTouchpadPinchAckInRoot(
+void RenderWidgetHostViewChildFrame::ProcessTouchpadZoomEventAckInRoot(
     const blink::WebGestureEvent& event,
     InputEventAckState ack_result) {
-  DCHECK(blink::WebInputEvent::IsPinchGestureEventType(event.GetType()));
+  DCHECK(event.IsTouchpadZoomEvent());
 
-  frame_connector_->ForwardAckedTouchpadPinchGestureEvent(event, ack_result);
+  frame_connector_->ForwardAckedTouchpadZoomEvent(event, ack_result);
 }
 
-void RenderWidgetHostViewChildFrame::ForwardTouchpadPinchIfNecessary(
+void RenderWidgetHostViewChildFrame::ForwardTouchpadZoomEventIfNecessary(
     const blink::WebGestureEvent& event,
     InputEventAckState ack_result) {
-  // ACKs of synthetic wheel events for touchpad pinch are processed in the
-  // root RWHV.
+  // ACKs of synthetic wheel events for touchpad pinch or double tap are
+  // processed in the root RWHV.
   NOTREACHED();
 }
 
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 ba8c25a4..a5b862c 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
@@ -305,10 +305,11 @@
   void OnDidUpdateVisualPropertiesComplete(
       const cc::RenderFrameMetadata& metadata);
 
-  void ProcessTouchpadPinchAckInRoot(const blink::WebGestureEvent& event,
-                                     InputEventAckState ack_result);
-  void ForwardTouchpadPinchIfNecessary(const blink::WebGestureEvent& event,
-                                       InputEventAckState ack_result) override;
+  void ProcessTouchpadZoomEventAckInRoot(const blink::WebGestureEvent& event,
+                                         InputEventAckState ack_result);
+  void ForwardTouchpadZoomEventIfNecessary(
+      const blink::WebGestureEvent& event,
+      InputEventAckState ack_result) override;
 
   std::vector<base::OnceClosure> frame_swapped_callbacks_;
 
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 bae1f36..2b6a67e 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -185,14 +185,14 @@
   const viz::LocalSurfaceId& GetLocalSurfaceId() const override;
   // Returns true when we can do SurfaceHitTesting for the event type.
   bool ShouldRouteEvent(const blink::WebInputEvent& event) const;
-  // This method checks |event| to see if a GesturePinch event can be routed
-  // according to ShouldRouteEvent, and if not, sends it directly to the view's
-  // RenderWidgetHost.
-  // By not just defaulting to sending the GesturePinch events to the mainframe,
-  // we allow the events to be targeted to an oopif subframe, in case some
-  // consumer, such as PDF or maps, wants to intercept them and implement a
-  // custom behavior.
-  void SendGesturePinchEvent(blink::WebGestureEvent* event);
+  // This method checks |event| to see if a GesturePinch or double tap event
+  // can be routed according to ShouldRouteEvent, and if not, sends it directly
+  // to the view's RenderWidgetHost.
+  // By not just defaulting to sending events that change the page scale to the
+  // main frame, we allow the events to be targeted to an oopif subframe, in
+  // case some consumer, such as PDF or maps, wants to intercept them and
+  // implement a custom behavior.
+  void SendTouchpadZoomEvent(const blink::WebGestureEvent* event);
 
   // Inject synthetic touch events.
   void InjectTouchEvent(const blink::WebTouchEvent& event,
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 94d6e793..42b0f9d 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1161,7 +1161,7 @@
 
 void RenderWidgetHostViewMac::GestureEventAck(const WebGestureEvent& event,
                                               InputEventAckState ack_result) {
-  ForwardTouchpadPinchIfNecessary(event, ack_result);
+  ForwardTouchpadZoomEventIfNecessary(event, ack_result);
 
   bool consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
   switch (event.GetType()) {
@@ -1229,11 +1229,10 @@
   return host()->delegate() && host()->delegate()->GetInputEventRouter();
 }
 
-void RenderWidgetHostViewMac::SendGesturePinchEvent(WebGestureEvent* event) {
-  DCHECK(WebInputEvent::IsPinchGestureEventType(event->GetType()));
+void RenderWidgetHostViewMac::SendTouchpadZoomEvent(
+    const WebGestureEvent* event) {
+  DCHECK(event->IsTouchpadZoomEvent());
   if (ShouldRouteEvent(*event)) {
-    DCHECK(event->SourceDevice() ==
-           blink::WebGestureDevice::kWebGestureDeviceTouchpad);
     host()->delegate()->GetInputEventRouter()->RouteGestureEvent(
         this, event, ui::LatencyInfo(ui::SourceEventType::TOUCHPAD));
     return;
@@ -1635,27 +1634,27 @@
     begin_event.SetSourceDevice(
         blink::WebGestureDevice::kWebGestureDeviceTouchpad);
     begin_event.SetNeedsWheelEvent(true);
-    SendGesturePinchEvent(&begin_event);
+    SendTouchpadZoomEvent(&begin_event);
     gesture_begin_pinch_sent_ = YES;
   }
 
   // Send a GesturePinchUpdate event.
   update_event.data.pinch_update.zoom_disabled =
       !pinch_has_reached_zoom_threshold_;
-  SendGesturePinchEvent(&update_event);
+  SendTouchpadZoomEvent(&update_event);
 }
 
 void RenderWidgetHostViewMac::GestureEnd(blink::WebGestureEvent end_event) {
   gesture_begin_event_.reset();
   if (gesture_begin_pinch_sent_) {
-    SendGesturePinchEvent(&end_event);
+    SendTouchpadZoomEvent(&end_event);
     gesture_begin_pinch_sent_ = false;
   }
 }
 
 void RenderWidgetHostViewMac::SmartMagnify(
     const blink::WebGestureEvent& smart_magnify_event) {
-  host()->ForwardGestureEvent(smart_magnify_event);
+  SendTouchpadZoomEvent(&smart_magnify_event);
 }
 
 void RenderWidgetHostViewMac::ImeSetComposition(
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 ed5984e8..1492621 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
@@ -223,6 +223,26 @@
   return event;
 }
 
+id MockSmartMagnifyEvent() {
+  id event = [OCMockObject mockForClass:[NSEvent class]];
+  NSEventType type = NSEventTypeSmartMagnify;
+  NSPoint locationInWindow = NSMakePoint(0, 0);
+  CGFloat deltaX = 0;
+  CGFloat deltaY = 0;
+  NSTimeInterval timestamp = 1;
+  NSUInteger modifierFlags = 0;
+
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(type)] type];
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(locationInWindow)]
+      locationInWindow];
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(deltaX)] deltaX];
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(deltaY)] deltaY];
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(timestamp)] timestamp];
+  [(NSEvent*)[[event stub] andReturnValue:OCMOCK_VALUE(modifierFlags)]
+      modifierFlags];
+  return event;
+}
+
 class MockRenderWidgetHostImpl : public RenderWidgetHostImpl {
  public:
   ~MockRenderWidgetHostImpl() override {}
@@ -1582,6 +1602,41 @@
   }
 }
 
+// Tests that the NSEventTypeSmartMagnify event is first offered as a mouse
+// wheel event and is then sent as a GestureDoubleTap to invoke the double-tap
+// to zoom logic.
+TEST_F(RenderWidgetHostViewMacTest, DoubleTapZoom) {
+  NSEvent* smartMagnifyEvent = MockSmartMagnifyEvent();
+  [rwhv_cocoa_ smartMagnifyWithEvent:smartMagnifyEvent];
+  base::RunLoop().RunUntilIdle();
+
+  MockWidgetInputHandler::MessageVector events =
+      host_->GetAndResetDispatchedMessages();
+  EXPECT_EQ("MouseWheel", GetMessageNames(events));
+
+  events[0]->ToEvent()->CallCallback(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS);
+
+  events = host_->GetAndResetDispatchedMessages();
+  EXPECT_EQ("GestureDoubleTap", GetMessageNames(events));
+}
+
+// Tests that the NSEventTypeSmartMagnify event may be consumed by a wheel
+// listener to prevent the scale change.
+TEST_F(RenderWidgetHostViewMacTest, DoubleTapZoomConsumed) {
+  NSEvent* smartMagnifyEvent = MockSmartMagnifyEvent();
+  [rwhv_cocoa_ smartMagnifyWithEvent:smartMagnifyEvent];
+  base::RunLoop().RunUntilIdle();
+
+  MockWidgetInputHandler::MessageVector events =
+      host_->GetAndResetDispatchedMessages();
+  EXPECT_EQ("MouseWheel", GetMessageNames(events));
+
+  events[0]->ToEvent()->CallCallback(INPUT_EVENT_ACK_STATE_CONSUMED);
+
+  events = host_->GetAndResetDispatchedMessages();
+  EXPECT_EQ(0U, events.size());
+}
+
 TEST_F(RenderWidgetHostViewMacTest, EventLatencyOSMouseWheelHistogram) {
   base::HistogramTester histogram_tester;
 
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index 5119d521..37dafa0 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -65,6 +65,7 @@
 #include "services/metrics/metrics_mojo_service.h"
 #include "services/metrics/public/mojom/constants.mojom.h"
 #include "services/network/network_service.h"
+#include "services/network/public/cpp/cross_thread_shared_url_loader_factory_info.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/mojom/network_service_test.mojom.h"
 #include "services/resource_coordinator/public/mojom/service_constants.mojom.h"
@@ -304,6 +305,47 @@
   DISALLOW_COPY_AND_ASSIGN(ServiceBinaryLauncherFactory);
 };
 
+// SharedURLLoaderFactory for device service, backed by
+// GetContentClient()->browser()->GetSystemSharedURLLoaderFactory().
+class DeviceServiceURLLoaderFactory : public network::SharedURLLoaderFactory {
+ public:
+  DeviceServiceURLLoaderFactory() = default;
+
+  // mojom::URLLoaderFactory implementation:
+  void CreateLoaderAndStart(network::mojom::URLLoaderRequest request,
+                            int32_t routing_id,
+                            int32_t request_id,
+                            uint32_t options,
+                            const network::ResourceRequest& url_request,
+                            network::mojom::URLLoaderClientPtr client,
+                            const net::MutableNetworkTrafficAnnotationTag&
+                                traffic_annotation) override {
+    GetContentClient()
+        ->browser()
+        ->GetSystemSharedURLLoaderFactory()
+        ->CreateLoaderAndStart(std::move(request), routing_id, request_id,
+                               options, url_request, std::move(client),
+                               traffic_annotation);
+  }
+
+  // SharedURLLoaderFactory implementation:
+  void Clone(network::mojom::URLLoaderFactoryRequest request) override {
+    GetContentClient()->browser()->GetSystemSharedURLLoaderFactory()->Clone(
+        std::move(request));
+  }
+
+  std::unique_ptr<network::SharedURLLoaderFactoryInfo> Clone() override {
+    return std::make_unique<network::CrossThreadSharedURLLoaderFactoryInfo>(
+        this);
+  }
+
+ private:
+  friend class base::RefCounted<DeviceServiceURLLoaderFactory>;
+  ~DeviceServiceURLLoaderFactory() override = default;
+
+  DISALLOW_COPY_AND_ASSIGN(DeviceServiceURLLoaderFactory);
+};
+
 bool ShouldEnableVizService() {
 #if defined(USE_AURA)
   // aura::Env can be null in tests.
@@ -530,7 +572,7 @@
   device_info.factory = base::Bind(
       &device::CreateDeviceService, device_blocking_task_runner,
       service_manager_thread_task_runner_,
-      GetContentClient()->browser()->GetSystemSharedURLLoaderFactory(),
+      base::MakeRefCounted<DeviceServiceURLLoaderFactory>(),
       GetContentClient()->browser()->GetGeolocationApiKey(),
       GetContentClient()->browser()->ShouldUseGmsCoreGeolocationProvider(),
       base::Bind(&WakeLockContextHost::GetNativeViewForContext),
@@ -541,7 +583,7 @@
   device_info.factory = base::Bind(
       &device::CreateDeviceService, device_blocking_task_runner,
       service_manager_thread_task_runner_,
-      GetContentClient()->browser()->GetSystemSharedURLLoaderFactory(),
+      base::MakeRefCounted<DeviceServiceURLLoaderFactory>(),
       GetContentClient()->browser()->GetGeolocationApiKey(),
       base::Bind(&ContentBrowserClient::OverrideSystemLocationProvider,
                  base::Unretained(GetContentClient()->browser())));
diff --git a/content/browser/site_per_process_hit_test_browsertest.cc b/content/browser/site_per_process_hit_test_browsertest.cc
index 8ff295b6..03fc3cf5 100644
--- a/content/browser/site_per_process_hit_test_browsertest.cc
+++ b/content/browser/site_per_process_hit_test_browsertest.cc
@@ -31,6 +31,7 @@
 #include "content/public/common/content_switches.h"
 #include "content/public/common/screen_info.h"
 #include "content/public/common/use_zoom_for_dsf_policy.h"
+#include "content/public/common/web_preferences.h"
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/content_browser_test_utils.h"
 #include "content/public/test/hit_test_region_observer.h"
@@ -4147,6 +4148,81 @@
 
 #endif  // defined(USE_AURA)
 
+// Tests that performing a touchpad double-tap zoom over an OOPIF offers the
+// synthetic wheel event to the child.
+IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestBrowserTest,
+                       TouchpadDoubleTapZoomOverOOPIF) {
+  GURL main_url(embedded_test_server()->GetURL(
+      "/frame_tree/page_with_positioned_frame.html"));
+  EXPECT_TRUE(NavigateToURL(shell(), main_url));
+
+  WebContentsImpl* contents = web_contents();
+
+  WebPreferences prefs = contents->GetRenderViewHost()->GetWebkitPreferences();
+  prefs.double_tap_to_zoom_enabled = true;
+  contents->GetRenderViewHost()->UpdateWebkitPreferences(prefs);
+
+  RenderFrameSubmissionObserver render_frame_submission_observer(
+      shell()->web_contents());
+
+  FrameTreeNode* root = contents->GetFrameTree()->root();
+  ASSERT_EQ(1U, root->child_count());
+
+  GURL frame_url(
+      embedded_test_server()->GetURL("b.com", "/page_with_wheel_handler.html"));
+  NavigateFrameToURL(root->child_at(0), frame_url);
+  auto* child_frame_host = root->child_at(0)->current_frame_host();
+
+  WaitForHitTestDataOrChildSurfaceReady(child_frame_host);
+
+  auto* root_view = static_cast<RenderWidgetHostViewBase*>(
+      contents->GetRenderWidgetHostView());
+
+  const float scale_factor =
+      render_frame_submission_observer.LastRenderFrameMetadata()
+          .page_scale_factor;
+  const gfx::Point root_location(gfx::ToCeiledInt(100 * scale_factor),
+                                 gfx::ToCeiledInt(100 * scale_factor));
+  blink::WebMouseEvent dummy_event_for_location;
+  SetWebEventPositions(&dummy_event_for_location, root_location, root_view);
+
+  RenderWidgetHostInputEventRouter* router = contents->GetInputEventRouter();
+
+  blink::WebGestureEvent double_tap_zoom(
+      blink::WebInputEvent::kGestureDoubleTap,
+      blink::WebInputEvent::kNoModifiers,
+      blink::WebInputEvent::GetStaticTimeStampForTests(),
+      blink::kWebGestureDeviceTouchpad);
+  double_tap_zoom.SetPositionInWidget(
+      dummy_event_for_location.PositionInWidget());
+  double_tap_zoom.SetPositionInScreen(
+      dummy_event_for_location.PositionInScreen());
+  double_tap_zoom.data.tap.tap_count = 1;
+  double_tap_zoom.SetNeedsWheelEvent(true);
+
+  content::TestPageScaleObserver scale_observer(shell()->web_contents());
+
+  router->RouteGestureEvent(root_view, &double_tap_zoom,
+                            ui::LatencyInfo(ui::SourceEventType::WHEEL));
+
+  // Ensure the child frame saw the wheel event.
+  bool default_prevented = false;
+  ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
+      child_frame_host,
+      "handlerPromise.then(function(e) {"
+      "  window.domAutomationController.send(e.defaultPrevented);"
+      "});",
+      &default_prevented));
+  EXPECT_FALSE(default_prevented);
+
+  // TODO(mcnee): Support double-tap zoom gesture for OOPIFs. For now, we
+  // only test that any scale change still happens in the main frame when
+  // the double tap is performed over the OOPIF. Once this works with OOPIFs,
+  // we should be able to test that the new scale is based on the target
+  // rect of the element in the OOPIF. https://crbug.com/758348
+  scale_observer.WaitForPageScaleUpdate();
+}
+
 // A WebContentsDelegate to capture ContextMenu creation events.
 class ContextMenuObserverDelegate : public WebContentsDelegate {
  public:
diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h
index d08876f..5317a18 100644
--- a/content/browser/web_contents/web_contents_view_mac.h
+++ b/content/browser/web_contents/web_contents_view_mac.h
@@ -19,6 +19,7 @@
 #include "content/browser/web_contents/web_contents_view.h"
 #include "content/common/content_export.h"
 #include "content/common/drag_event_source_info.h"
+#include "content/public/browser/visibility.h"
 #include "content/public/common/web_contents_ns_view_bridge.mojom.h"
 #include "mojo/public/cpp/bindings/associated_binding.h"
 #import "ui/base/cocoa/base_view.h"
@@ -149,6 +150,9 @@
   // CloseTabAfterEventTracking() implementation.
   void CloseTab();
 
+  // Called from Cocoa when window visibility changes.
+  void OnWindowVisibilityChanged(content::Visibility visibility);
+
   WebContentsImpl* web_contents() { return web_contents_; }
   WebContentsViewDelegate* delegate() { return delegate_.get(); }
 
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 3374d2b..5b9a11e 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -446,6 +446,16 @@
   web_contents_->Close(web_contents_->GetRenderViewHost());
 }
 
+void WebContentsViewMac::OnWindowVisibilityChanged(Visibility visibility) {
+  if (!web_contents() || web_contents()->IsBeingDestroyed())
+    return;
+  // TODO(ccameron): Communicate window visibility and occlusion from the remote
+  // process (for now, always treat remote windows as visible).
+  if (ns_view_bridge_remote_)
+    visibility = Visibility::VISIBLE;
+  web_contents()->UpdateWebContentsVisibility(visibility);
+}
+
 std::list<RenderWidgetHostViewMac*> WebContentsViewMac::GetChildViews() {
   // Remove any child NSViews that have been destroyed.
   std::list<RenderWidgetHostViewMac*> result;
@@ -483,6 +493,10 @@
         ns_view_id_, client.PassInterface(), std::move(bridge_request));
 
     ns_view_bridge_remote_->SetParentViewsNSView(views_host_->GetNSViewId());
+
+    // TODO(ccameron): Communicate window visibility and occlusion from the
+    // remote process (for now, always treat remote windows as visible).
+    OnWindowVisibilityChanged(content::Visibility::VISIBLE);
   } else if (factory_host_id != NSViewBridgeFactoryHost::kLocalDirectHostId) {
     LOG(ERROR) << "Failed to look up NSViewBridgeFactoryHost!";
   }
@@ -744,16 +758,17 @@
 }
 
 - (void)updateWebContentsVisibility {
-  WebContentsImpl* webContents = [self webContents];
-  if (!webContents || webContents->IsBeingDestroyed())
+  if (!webContentsView_)
     return;
-
+  content::Visibility visibility = content::Visibility::VISIBLE;
   if ([self isHiddenOrHasHiddenAncestor] || ![self window])
-    webContents->UpdateWebContentsVisibility(content::Visibility::HIDDEN);
+    visibility = content::Visibility::HIDDEN;
   else if ([[self window] occlusionState] & NSWindowOcclusionStateVisible)
-    webContents->UpdateWebContentsVisibility(content::Visibility::VISIBLE);
+    visibility = content::Visibility::VISIBLE;
   else
-    webContents->UpdateWebContentsVisibility(content::Visibility::OCCLUDED);
+    visibility = content::Visibility::OCCLUDED;
+  if (webContentsView_)
+    webContentsView_->OnWindowVisibilityChanged(visibility);
 }
 
 - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
diff --git a/content/common/input/input_event_struct_traits.cc b/content/common/input/input_event_struct_traits.cc
index c88261f..5240e19 100644
--- a/content/common/input/input_event_struct_traits.cc
+++ b/content/common/input/input_event_struct_traits.cc
@@ -219,14 +219,12 @@
       }
     }
 
-    if (blink::WebInputEvent::IsPinchGestureEventType(type)) {
-      gesture_event->SetNeedsWheelEvent(false);
-      if (gesture_data->pinch_data &&
-          type == blink::WebInputEvent::Type::kGesturePinchUpdate) {
-        gesture_event->data.pinch_update.zoom_disabled = false;
-        gesture_event->data.pinch_update.scale =
-            gesture_data->pinch_data->scale;
-      }
+    gesture_event->SetNeedsWheelEvent(false);
+
+    if (gesture_data->pinch_data &&
+        type == blink::WebInputEvent::Type::kGesturePinchUpdate) {
+      gesture_event->data.pinch_update.zoom_disabled = false;
+      gesture_event->data.pinch_update.scale = gesture_data->pinch_data->scale;
     }
 
     if (gesture_data->tap_data) {
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc
index 4961160..dc22dac 100644
--- a/content/common/input/synthetic_web_input_event_builders.cc
+++ b/content/common/input/synthetic_web_input_event_builders.cc
@@ -110,10 +110,10 @@
     result.data.tap.tap_count = 1;
     result.data.tap.width = 10;
     result.data.tap.height = 10;
-  } else if (WebInputEvent::IsPinchGestureEventType(type)) {
-    result.SetNeedsWheelEvent(source_device ==
-                              blink::kWebGestureDeviceTouchpad);
   }
+
+  result.SetNeedsWheelEvent(result.IsTouchpadZoomEvent());
+
   return result;
 }
 
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 32b1f5b1..6239f0a 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -181,11 +181,6 @@
 // Used to instruct the RenderView to send back updates to the preferred size.
 IPC_MESSAGE_ROUTED0(ViewMsg_EnablePreferredSizeChangedMode)
 
-// Used to tell the renderer not to add scrollbars with height and
-// width below a threshold.
-IPC_MESSAGE_ROUTED1(ViewMsg_DisableScrollbarsForSmallWindows,
-                    gfx::Size /* disable_scrollbar_size_limit */)
-
 // Response message to ViewHostMsg_CreateWorker.
 // Sent when the worker has started.
 IPC_MESSAGE_ROUTED0(ViewMsg_WorkerCreated)
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index ce8282a..ec763e72 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -25,7 +25,6 @@
 
 namespace gfx {
 class Point;
-class Size;
 }
 
 namespace content {
@@ -90,10 +89,6 @@
       int request_id,
       const std::vector<base::FilePath>& files) = 0;
 
-  // Tells the renderer not to add scrollbars with height and width below a
-  // threshold.
-  virtual void DisableScrollbarsForThreshold(const gfx::Size& size) = 0;
-
   // Instructs the RenderView to send back updates to the preferred size.
   virtual void EnablePreferredSizeMode() = 0;
 
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 9620a913..2301015 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -656,6 +656,11 @@
 // Enable IOSurface based screen capturer.
 const base::Feature kIOSurfaceCapturer{"IOSurfaceCapturer",
                                        base::FEATURE_ENABLED_BY_DEFAULT};
+
+// The V2 sandbox on MacOS removes the unsandboed warmup phase and sandboxes the
+// entire life of the process.
+const base::Feature kMacV2Sandbox{"MacV2Sandbox",
+                                  base::FEATURE_ENABLED_BY_DEFAULT};
 #endif  // defined(OS_MACOSX)
 
 enum class VideoCaptureServiceConfiguration {
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 9305262..92b0561 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -159,6 +159,7 @@
 #if defined(OS_MACOSX)
 CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
 CONTENT_EXPORT extern const base::Feature kIOSurfaceCapturer;
+CONTENT_EXPORT extern const base::Feature kMacV2Sandbox;
 #endif  // defined(OS_MACOSX)
 
 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
diff --git a/content/public/common/resource_request_body_android.cc b/content/public/common/resource_request_body_android.cc
index 8cfc56e..8b64025 100644
--- a/content/public/common/resource_request_body_android.cc
+++ b/content/public/common/resource_request_body_android.cc
@@ -79,7 +79,7 @@
     return nullptr;
 
   std::vector<uint8_t> encoded;
-  base::android::JavaByteArrayToByteVector(env, j_encoded.obj(), &encoded);
+  base::android::JavaByteArrayToByteVector(env, j_encoded, &encoded);
 
   return DecodeResourceRequestBody(
       reinterpret_cast<const char*>(encoded.data()), encoded.size());
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h
index 4e5b9c8..06bd8dde 100644
--- a/content/public/renderer/render_view.h
+++ b/content/public/renderer/render_view.h
@@ -86,10 +86,6 @@
   // Returns the associated WebFrameWidget.
   virtual blink::WebFrameWidget* GetWebFrameWidget() = 0;
 
-  // Returns true if we should display scrollbars for the given view size and
-  // false if the scrollbars should be hidden.
-  virtual bool ShouldDisplayScrollbars(int width, int height) const = 0;
-
   // Whether content state (such as form state, scroll position and page
   // contents) should be sent to the browser immediately. This is normally
   // false, but set to true by some tests.
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index 1368fe1d..87c3c87 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -336,9 +336,9 @@
   factory_options.disable_sctp_data_channels = false;
   factory_options.disable_encryption =
       cmd_line->HasSwitch(switches::kDisableWebRtcEncryption);
-  factory_options.crypto_options.enable_gcm_crypto_suites =
+  factory_options.crypto_options.srtp.enable_gcm_crypto_suites =
       cmd_line->HasSwitch(switches::kEnableWebRtcSrtpAesGcm);
-  factory_options.crypto_options.enable_encrypted_rtp_header_extensions =
+  factory_options.crypto_options.srtp.enable_encrypted_rtp_header_extensions =
       cmd_line->HasSwitch(switches::kEnableWebRtcSrtpEncryptedHeaders);
   pc_factory_->SetOptions(factory_options);
 
diff --git a/content/renderer/mus/renderer_window_tree_client.cc b/content/renderer/mus/renderer_window_tree_client.cc
index 34d1e28..b8f5d51 100644
--- a/content/renderer/mus/renderer_window_tree_client.cc
+++ b/content/renderer/mus/renderer_window_tree_client.cc
@@ -315,14 +315,12 @@
     ws::Id window_id,
     int64_t display_id,
     std::unique_ptr<ui::Event> event,
-    bool matches_pointer_watcher) {
+    bool matches_event_observer) {
   NOTREACHED();
 }
 
-void RendererWindowTreeClient::OnPointerEventObserved(
-    std::unique_ptr<ui::Event> event,
-    ws::Id window_id,
-    int64_t display_id) {
+void RendererWindowTreeClient::OnObservedInputEvent(
+    std::unique_ptr<ui::Event> event) {
   NOTREACHED();
 }
 
diff --git a/content/renderer/mus/renderer_window_tree_client.h b/content/renderer/mus/renderer_window_tree_client.h
index b76fbac6..cafba8f 100644
--- a/content/renderer/mus/renderer_window_tree_client.h
+++ b/content/renderer/mus/renderer_window_tree_client.h
@@ -169,10 +169,8 @@
                           ws::Id window_id,
                           int64_t display_id,
                           std::unique_ptr<ui::Event> event,
-                          bool matches_pointer_watcher) override;
-  void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
-                              ws::Id window_id,
-                              int64_t display_id) override;
+                          bool matches_event_observer) override;
+  void OnObservedInputEvent(std::unique_ptr<ui::Event> event) override;
   void OnWindowFocused(ws::Id focused_window_id) override;
   void OnWindowCursorChanged(ws::Id window_id, ui::CursorData cursor) override;
   void OnDragDropStart(const base::flat_map<std::string, std::vector<uint8_t>>&
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 5ff531d..b184750 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -492,7 +492,7 @@
   webview()->SetShowFPSCounter(
       command_line.HasSwitch(cc::switches::kShowFPSCounter));
 
-  ApplyWebPreferencesInternal(webkit_preferences_, webview());
+  ApplyWebPreferences(webkit_preferences_, webview());
 
   if (switches::IsTouchDragDropEnabled())
     webview()->GetSettings()->SetTouchDragDropEnabled(true);
@@ -1110,26 +1110,18 @@
 
 void RenderViewImpl::ApplyNewSizeForWidget(const gfx::Size& old_size,
                                            const gfx::Size& new_size) {
-  if (webview()) {
+  if (new_size != old_size) {
     // Only hide popups when the size changes. There are situations (e.g. hiding
     // the ChromeOS virtual keyboard) where we send a resize message with no
     // change in size, but we don't want to close popups.
     // See https://crbug.com/761908.
-    if (new_size != old_size)
-      webview()->HidePopups();
-
-    if (send_preferred_size_changes_ &&
-        webview()->MainFrame()->IsWebLocalFrame()) {
-      webview()->MainFrame()->ToWebLocalFrame()->SetCanHaveScrollbars(
-          ShouldDisplayScrollbars(new_size.width(), new_size.height()));
-    }
+    webview()->HidePopups();
   }
 }
 
 void RenderViewImpl::ApplyNewDisplayModeForWidget(
     const blink::WebDisplayMode& new_display_mode) {
-  if (webview())
-    webview()->SetDisplayMode(new_display_mode);
+  webview()->SetDisplayMode(new_display_mode);
 }
 
 void RenderViewImpl::ApplyAutoResizeLimitsForWidget(const gfx::Size& min_size,
@@ -1194,12 +1186,10 @@
 void RenderViewImpl::SetScreenMetricsEmulationParametersForWidget(
     bool enabled,
     const blink::WebDeviceEmulationParams& params) {
-  if (webview() && GetWidget()->layer_tree_view()) {
-    if (enabled)
-      webview()->EnableDeviceEmulation(params);
-    else
-      webview()->DisableDeviceEmulation();
-  }
+  if (enabled)
+    webview()->EnableDeviceEmulation(params);
+  else
+    webview()->DisableDeviceEmulation();
 }
 
 // IPC message handlers -----------------------------------------
@@ -1270,11 +1260,6 @@
   frames_with_pending_state_.clear();
 }
 
-void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs,
-                                                 blink::WebView* web_view) {
-  ApplyWebPreferences(prefs, web_view);
-}
-
 // IPC::Listener -------------------------------------------------------------
 
 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
@@ -1304,8 +1289,6 @@
     IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
     IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode,
                         OnEnablePreferredSizeChangedMode)
-    IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
-                        OnDisableScrollbarsForSmallWindows)
     IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
     IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt)
 
@@ -1872,12 +1855,6 @@
   return frame_widget_;
 }
 
-bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const {
-  return (!send_preferred_size_changes_ ||
-          (disable_scrollbars_size_limit_.width() <= width ||
-           disable_scrollbars_size_limit_.height() <= height));
-}
-
 bool RenderViewImpl::GetContentStateImmediately() const {
   return send_content_state_immediately_;
 }
@@ -1895,7 +1872,7 @@
 
 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
   webkit_preferences_ = prefs;
-  ApplyWebPreferencesInternal(webkit_preferences_, webview());
+  ApplyWebPreferences(webkit_preferences_, webview());
 }
 
 void RenderViewImpl::OnEnumerateDirectoryResponse(
@@ -1932,11 +1909,6 @@
   UpdatePreferredSize();
 }
 
-void RenderViewImpl::OnDisableScrollbarsForSmallWindows(
-    const gfx::Size& disable_scrollbar_size_limit) {
-  disable_scrollbars_size_limit_ = disable_scrollbar_size_limit;
-}
-
 void RenderViewImpl::OnSetRendererPrefs(
     const RendererPreferences& renderer_prefs) {
   std::string old_accept_languages = renderer_preferences_.accept_languages;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 6e08aba..b8bdab84 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -265,7 +265,6 @@
   void SetWebkitPreferences(const WebPreferences& preferences) override;
   blink::WebView* GetWebView() override;
   blink::WebFrameWidget* GetWebFrameWidget() override;
-  bool ShouldDisplayScrollbars(int width, int height) const override;
   bool GetContentStateImmediately() const override;
   void SetEditCommandForNextKeyEvent(const std::string& name,
                                      const std::string& value) override;
@@ -420,9 +419,6 @@
   static WindowOpenDisposition NavigationPolicyToDisposition(
       blink::WebNavigationPolicy policy);
 
-  void ApplyWebPreferencesInternal(const WebPreferences& prefs,
-                                   blink::WebView* web_view);
-
   // IPC message handlers ------------------------------------------------------
   //
   // The documentation for these functions should be in
@@ -540,17 +536,6 @@
   // to be called.
   bool needs_preferred_size_update_ = true;
 
-  // If non-empty, and |send_preferred_size_changes_| is true, disable drawing
-  // scroll bars on windows smaller than this size.  Used for windows that the
-  // browser resizes to the size of the content, such as browser action popups.
-  // If a render view is set to the minimum size of its content, webkit may add
-  // scroll bars.  This makes sense for fixed sized windows, but it does not
-  // make sense when the size of the view was chosen to fit the content.
-  // This setting ensures that no scroll bars are drawn.  The size limit exists
-  // because if the view grows beyond a size known to the browser, scroll bars
-  // should be drawn.
-  gfx::Size disable_scrollbars_size_limit_;
-
   // Loading state -------------------------------------------------------------
 
   // Timer used to delay the updating of nav state (see
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index f104196..777f7cd 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1594,7 +1594,14 @@
 }
 
 void RenderWidget::Close() {
+  // If the browser has not sent OnDisableDeviceEmulation, we have an emulator
+  // hanging out still. Its destruction is normally part of an IPC and expects
+  // objects to be alive that would be alive while the IPC route is active such
+  // as the |layer_tree_view_|. So we ensure that it is the first thing to be
+  // destroyed here before deleting things from the RenderWidget or the
+  // |owner_delegate_|.
   screen_metrics_emulator_.reset();
+
   CloseWebWidget();
   layer_tree_view_.reset();
   if (owner_delegate_)
diff --git a/content/shell/test_runner/test_interfaces.cc b/content/shell/test_runner/test_interfaces.cc
index f1e39abc..253ad08f 100644
--- a/content/shell/test_runner/test_interfaces.cc
+++ b/content/shell/test_runner/test_interfaces.cc
@@ -32,7 +32,7 @@
   // progress here in a per-directory manner.
   // TODO(xiaochengh): Progressively allow more tests to use innerText.
   // Remove this function once rebaseline is complete.
-  return test_path >= "LayoutTests/a" && test_path < "LayoutTests/css";
+  return false;
 }
 }  // namespace
 
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index 7e35f1e6..6b41e50 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -65,13 +65,15 @@
       did_swap_compositor_frame_(false) {
 #if defined(OS_ANDROID)
   frame_sink_id_ = AllocateFrameSinkId();
-  GetHostFrameSinkManager()->RegisterFrameSinkId(frame_sink_id_, this);
+  GetHostFrameSinkManager()->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
 #else
   default_background_color_ = SK_ColorWHITE;
   // Not all tests initialize or need an image transport factory.
   if (ImageTransportFactory::GetInstance()) {
     frame_sink_id_ = AllocateFrameSinkId();
-    GetHostFrameSinkManager()->RegisterFrameSinkId(frame_sink_id_, this);
+    GetHostFrameSinkManager()->RegisterFrameSinkId(
+        frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
 #if DCHECK_IS_ON()
     GetHostFrameSinkManager()->SetFrameSinkDebugLabel(
         frame_sink_id_, "TestRenderWidgetHostView");
diff --git a/device/vr/openvr/openvr_render_loop.cc b/device/vr/openvr/openvr_render_loop.cc
index 59864032..25ac018 100644
--- a/device/vr/openvr/openvr_render_loop.cc
+++ b/device/vr/openvr/openvr_render_loop.cc
@@ -141,18 +141,13 @@
   openvr_->GetCompositor()->SuspendRendering(false);
 
   // Measure the VrViewerType we are presenting with.
-  using ViewerMap = std::map<std::string, VrViewerType>;
-  CR_DEFINE_STATIC_LOCAL(ViewerMap, viewer_types,
-                         ({
-                             {"Oculus Rift CV1", VrViewerType::OPENVR_RIFT_CV1},
-                             {"Vive MV", VrViewerType::OPENVR_VIVE},
-                         }));
-  VrViewerType type = VrViewerType::OPENVR_UNKNOWN;
   std::string model =
       GetOpenVRString(openvr_->GetSystem(), vr::Prop_ModelNumber_String);
-  auto it = viewer_types.find(model);
-  if (it != viewer_types.end())
-    type = it->second;
+  VrViewerType type = VrViewerType::OPENVR_UNKNOWN;
+  if (model == "Oculus Rift CV1")
+    type = VrViewerType::OPENVR_RIFT_CV1;
+  else if (model == "Vive MV")
+    type = VrViewerType::OPENVR_VIVE;
 
   base::UmaHistogramSparse("VRViewerType", static_cast<int>(type));
 }
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 9f342968..9a901b4f 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -885,8 +885,8 @@
 
 // static
 ExtensionWebRequestEventRouter* ExtensionWebRequestEventRouter::GetInstance() {
-  CR_DEFINE_STATIC_LOCAL(ExtensionWebRequestEventRouter, instance, ());
-  return &instance;
+  static base::NoDestructor<ExtensionWebRequestEventRouter> instance;
+  return instance.get();
 }
 
 ExtensionWebRequestEventRouter::ExtensionWebRequestEventRouter()
diff --git a/extensions/browser/api/web_request/web_request_api.h b/extensions/browser/api/web_request/web_request_api.h
index 0c96184e..694ed6e 100644
--- a/extensions/browser/api/web_request/web_request_api.h
+++ b/extensions/browser/api/web_request/web_request_api.h
@@ -19,6 +19,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
+#include "base/no_destructor.h"
 #include "base/strings/string_util.h"
 #include "base/time/time.h"
 #include "content/public/browser/content_browser_client.h"
@@ -469,6 +470,7 @@
 
  private:
   friend class WebRequestAPI;
+  friend class base::NoDestructor<ExtensionWebRequestEventRouter>;
   FRIEND_TEST_ALL_PREFIXES(ExtensionWebRequestTest,
                            BlockingEventPrecedenceRedirect);
   FRIEND_TEST_ALL_PREFIXES(ExtensionWebRequestTest,
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc
index 66a9044..96e72a8 100644
--- a/extensions/browser/updater/extension_downloader.cc
+++ b/extensions/browser/updater/extension_downloader.cc
@@ -111,7 +111,7 @@
                                 kMaxRetries + 1);                         \
   }
 
-bool ShouldRetryRequest(network::SimpleURLLoader* loader) {
+bool ShouldRetryRequest(const network::SimpleURLLoader* loader) {
   DCHECK(loader);
 
   // Since HTTP errors are now presented as ERR_FAILED by default, this will
@@ -575,7 +575,9 @@
 
 void ExtensionDownloader::OnManifestLoadComplete(
     std::unique_ptr<std::string> response_body) {
-  GURL url = manifest_loader_->GetFinalURL();
+  const GURL url = manifest_loader_->GetFinalURL();
+  DCHECK(manifests_queue_.active_request());
+
   int response_code = -1;
   if (manifest_loader_->ResponseInfo() &&
       manifest_loader_->ResponseInfo()->headers)
@@ -584,13 +586,13 @@
   VLOG(2) << response_code << " " << url;
 
   const base::TimeDelta& backoff_delay = base::TimeDelta::FromMilliseconds(0);
+  const int request_failure_count =
+      manifests_queue_.active_request_failure_count();
 
   // We want to try parsing the manifest, and if it indicates updates are
   // available, we want to fire off requests to fetch those updates.
   if (response_body && !response_body->empty()) {
-    RETRY_HISTOGRAM("ManifestFetchSuccess",
-                    manifests_queue_.active_request_failure_count(),
-                    url);
+    RETRY_HISTOGRAM("ManifestFetchSuccess", request_failure_count, url);
     VLOG(2) << "beginning manifest parse for " << url;
     auto callback = base::BindOnce(&ExtensionDownloader::HandleManifestResults,
                                    weak_ptr_factory_.GetWeakPtr(),
@@ -599,8 +601,28 @@
   } else {
     VLOG(1) << "Failed to fetch manifest '" << url.possibly_invalid_spec()
             << "' response code:" << response_code;
-    if (ShouldRetryRequest(manifest_loader_.get()) &&
-        manifests_queue_.active_request_failure_count() < kMaxRetries) {
+    const auto* loader = manifest_loader_.get();
+    if (request_failure_count == 0) {
+      DCHECK(loader);
+      // This is the first failure for this batch request, record the
+      // http/network error for each extension in the batch request.
+      const int error =
+          response_code == -1 ? loader->NetError() : response_code;
+      const std::string uma_histogram_name =
+          url.DomainIs(kGoogleDotCom)
+              ? std::string(
+                    "Extensions."
+                    "ExtensionUpdaterFirstUpdateCheckErrorsGoogleUrl")
+              : std::string(
+                    "Extensions."
+                    "ExtensionUpdaterFirstUpdateCheckErrorsNonGoogleUrl");
+      const auto& extension_ids =
+          manifests_queue_.active_request()->extension_ids();
+      for (auto it = extension_ids.begin(); it != extension_ids.end(); ++it) {
+        base::UmaHistogramSparse(uma_histogram_name, error);
+      }
+    }
+    if (ShouldRetryRequest(loader) && request_failure_count < kMaxRetries) {
       manifests_queue_.RetryRequest(backoff_delay);
     } else {
       RETRY_HISTOGRAM("ManifestFetchFailure",
diff --git a/extensions/common/extension_l10n_util.cc b/extensions/common/extension_l10n_util.cc
index 2a8fe2c..8304278a 100644
--- a/extensions/common/extension_l10n_util.cc
+++ b/extensions/common/extension_l10n_util.cc
@@ -14,6 +14,7 @@
 #include "base/files/file_util.h"
 #include "base/json/json_file_value_serializer.h"
 #include "base/logging.h"
+#include "base/no_destructor.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -101,8 +102,8 @@
 }
 
 std::string& GetProcessLocale() {
-  CR_DEFINE_STATIC_LOCAL(std::string, locale, ());
-  return locale;
+  static base::NoDestructor<std::string> locale;
+  return *locale;
 }
 
 }  // namespace
diff --git a/extensions/common/file_util.cc b/extensions/common/file_util.cc
index da14e55..70c350da 100644
--- a/extensions/common/file_util.cc
+++ b/extensions/common/file_util.cc
@@ -343,15 +343,6 @@
 
 bool CheckForIllegalFilenames(const base::FilePath& extension_path,
                               std::string* error) {
-  // Reserved underscore names.
-  static const base::FilePath::CharType* const reserved_names[] = {
-      kLocaleFolder, kPlatformSpecificFolder, FILE_PATH_LITERAL("__MACOSX"),
-  };
-  CR_DEFINE_STATIC_LOCAL(
-      std::set<base::FilePath::StringType>,
-      reserved_underscore_names,
-      (reserved_names, reserved_names + arraysize(reserved_names)));
-
   // Enumerate all files and directories in the extension root.
   // There is a problem when using pattern "_*" with FileEnumerator, so we have
   // to cheat with find_first_of and match all.
@@ -363,17 +354,21 @@
   while (!(file = all_files.Next()).empty()) {
     base::FilePath::StringType filename = file.BaseName().value();
 
-    // Skip all that don't start with "_".
+    // Skip all filenames that don't start with "_".
     if (filename.find_first_of(FILE_PATH_LITERAL("_")) != 0)
       continue;
-    if (reserved_underscore_names.find(filename) ==
-        reserved_underscore_names.end()) {
-      *error = base::StringPrintf(
-          "Cannot load extension with file or directory name %s. "
-          "Filenames starting with \"_\" are reserved for use by the system.",
-          file.BaseName().AsUTF8Unsafe().c_str());
-      return false;
+
+    // Some filenames are special and allowed to start with "_".
+    if (filename == kLocaleFolder || filename == kPlatformSpecificFolder ||
+        filename == FILE_PATH_LITERAL("__MACOSX")) {
+      continue;
     }
+
+    *error = base::StringPrintf(
+        "Cannot load extension with file or directory name %s. "
+        "Filenames starting with \"_\" are reserved for use by the system.",
+        file.BaseName().AsUTF8Unsafe().c_str());
+    return false;
   }
 
   return true;
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn
index 677a266c..48c0b14 100644
--- a/extensions/shell/BUILD.gn
+++ b/extensions/shell/BUILD.gn
@@ -374,7 +374,6 @@
   testonly = true
   sources = [
     "browser/api/runtime/runtime_apitest.cc",
-    "browser/geolocation/geolocation_apitest.cc",
     "browser/shell_browsertest.cc",
     "test/shell_apitest.cc",
     "test/shell_apitest.h",
diff --git a/extensions/shell/browser/geolocation/geolocation_apitest.cc b/extensions/shell/browser/geolocation/geolocation_apitest.cc
deleted file mode 100644
index 5079c3f5..0000000
--- a/extensions/shell/browser/geolocation/geolocation_apitest.cc
+++ /dev/null
@@ -1,18 +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 "extensions/shell/test/shell_apitest.h"
-
-namespace extensions {
-
-IN_PROC_BROWSER_TEST_F(ShellApiTest,
-                       ExtensionGeolocationShouldReturnPositionUnavailable) {
-  // app_shell does not implement CreateAccessTokenStore() and the other
-  // bits for proper Geolocation support. We make sure that clients of this
-  // API will always get "permission denied" and won't crash.
-  ASSERT_TRUE(RunAppTest("geolocation/always_position_unavailable"))
-      << message_;
-}
-
-}  // namespace extensions
diff --git a/extensions/test/data/geolocation/always_position_unavailable/main.js b/extensions/test/data/geolocation/always_position_unavailable/main.js
deleted file mode 100644
index ef6af66..0000000
--- a/extensions/test/data/geolocation/always_position_unavailable/main.js
+++ /dev/null
@@ -1,20 +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.
-
-// This API call should always return position unavailable because geolocation
-// implementation is not complete in app_shell.
-
-function checkErrorCode(error) {
-  if (error.code == error.POSITION_UNAVAILABLE)
-    chrome.test.succeed();
-  else
-    chrome.test.fail();
-};
-
-chrome.test.runTests([
-  function geolocation_getCurrentPosition() {
-    navigator.geolocation.getCurrentPosition(chrome.test.fail,
-                                             checkErrorCode);
-  }
-]);
diff --git a/extensions/test/data/geolocation/always_position_unavailable/manifest.json b/extensions/test/data/geolocation/always_position_unavailable/manifest.json
deleted file mode 100644
index 49f6516..0000000
--- a/extensions/test/data/geolocation/always_position_unavailable/manifest.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "manifest_version": 2,
-  "name": "geolocation always returns position unavailable for app_shell",
-  "description": "tests that geolocation always will return position unavailable and won't crash",
-  "version": "1.0",
-  "app": {
-    "background": {
-      "scripts": ["main.js"]
-    }
-  },
-  "permissions": ["geolocation"]
-}
diff --git a/google_apis/gaia/oauth2_token_service.cc b/google_apis/gaia/oauth2_token_service.cc
index ba9461d4..3b901bb 100644
--- a/google_apis/gaia/oauth2_token_service.cc
+++ b/google_apis/gaia/oauth2_token_service.cc
@@ -676,8 +676,8 @@
   if (token_iterator != token_cache_.end() &&
       token_iterator->second.access_token == token_to_remove) {
     for (auto& observer : diagnostics_observer_list_) {
-      observer.OnTokenRemoved(request_parameters.account_id,
-                              request_parameters.scopes);
+      observer.OnAccessTokenRemoved(request_parameters.account_id,
+                                    request_parameters.scopes);
     }
     token_cache_.erase(token_iterator);
     return true;
@@ -704,7 +704,7 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   for (const auto& entry : token_cache_) {
     for (auto& observer : diagnostics_observer_list_)
-      observer.OnTokenRemoved(entry.first.account_id, entry.first.scopes);
+      observer.OnAccessTokenRemoved(entry.first.account_id, entry.first.scopes);
   }
 
   token_cache_.clear();
@@ -717,7 +717,7 @@
        /* iter incremented in body */) {
     if (iter->first.account_id == account_id) {
       for (auto& observer : diagnostics_observer_list_)
-        observer.OnTokenRemoved(account_id, iter->first.scopes);
+        observer.OnAccessTokenRemoved(account_id, iter->first.scopes);
       token_cache_.erase(iter++);
     } else {
       ++iter;
diff --git a/google_apis/gaia/oauth2_token_service.h b/google_apis/gaia/oauth2_token_service.h
index 96db621f..745bf7b 100644
--- a/google_apis/gaia/oauth2_token_service.h
+++ b/google_apis/gaia/oauth2_token_service.h
@@ -142,8 +142,9 @@
                                             const ScopeSet& scopes,
                                             GoogleServiceAuthError error,
                                             base::Time expiration_time) {}
-    virtual void OnTokenRemoved(const std::string& account_id,
-                                const ScopeSet& scopes) {}
+    // Called when an access token was removed.
+    virtual void OnAccessTokenRemoved(const std::string& account_id,
+                                      const ScopeSet& scopes) {}
   };
 
   explicit OAuth2TokenService(
diff --git a/gpu/skia_bindings/grcontext_for_gles2_interface.cc b/gpu/skia_bindings/grcontext_for_gles2_interface.cc
index 03658f3..2126394 100644
--- a/gpu/skia_bindings/grcontext_for_gles2_interface.cc
+++ b/gpu/skia_bindings/grcontext_for_gles2_interface.cc
@@ -38,6 +38,8 @@
   options.fAvoidStencilBuffers = capabilities.avoid_stencil_buffers;
   options.fAllowPathMaskCaching = false;
   options.fSharpenMipmappedTextures = true;
+  options.fExplicitlyAllocateGPUResources = GrContextOptions::Enable::kYes;
+  options.fSortRenderTargets = GrContextOptions::Enable::kYes;
   sk_sp<GrGLInterface> interface(
       skia_bindings::CreateGLES2InterfaceBindings(gl, context_support));
   gr_context_ = GrContext::MakeGL(std::move(interface), options);
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
index a3b300a..0caf1d83 100644
--- a/headless/BUILD.gn
+++ b/headless/BUILD.gn
@@ -852,8 +852,6 @@
   sources = [
     "app/headless_shell.cc",
     "app/headless_shell.h",
-    "lib/utility/headless_content_utility_client.cc",
-    "lib/utility/headless_content_utility_client.h",
     "public/headless_shell.h",
   ]
 
@@ -861,6 +859,8 @@
     sources += [
       "lib/browser/headless_content_browser_client.cc",
       "lib/browser/headless_content_browser_client.h",
+      "lib/utility/headless_content_utility_client.cc",
+      "lib/utility/headless_content_utility_client.h",
     ]
   }
 
diff --git a/headless/lib/browser/headless_browser_impl_mac.mm b/headless/lib/browser/headless_browser_impl_mac.mm
index fef6a41..259ba406 100644
--- a/headless/lib/browser/headless_browser_impl_mac.mm
+++ b/headless/lib/browser/headless_browser_impl_mac.mm
@@ -5,6 +5,7 @@
 #include "headless/lib/browser/headless_browser_impl.h"
 
 #import "base/mac/scoped_objc_class_swizzler.h"
+#include "base/no_destructor.h"
 #include "content/public/browser/web_contents.h"
 #include "headless/lib/browser/headless_web_contents_impl.h"
 #import "ui/base/cocoa/base_view.h"
@@ -33,11 +34,12 @@
 class HeadlessPopUpMethods {
  public:
   static void Init() {
-    CR_DEFINE_STATIC_LOCAL(HeadlessPopUpMethods, swizzler, ());
+    static base::NoDestructor<HeadlessPopUpMethods> swizzler;
     ALLOW_UNUSED_LOCAL(swizzler);
   }
 
  private:
+  friend class base::NoDestructor<HeadlessPopUpMethods>;
   HeadlessPopUpMethods()
       : popup_perform_click_swizzler_([NSPopUpButtonCell class],
                                       [FakeNSPopUpButtonCell class],
diff --git a/ios/build/bots/chromium.fyi/ios12-sdk-xcode-clang.json b/ios/build/bots/chromium.fyi/ios12-sdk-xcode-clang.json
index 2f8510b..68d78a9 100644
--- a/ios/build/bots/chromium.fyi/ios12-sdk-xcode-clang.json
+++ b/ios/build/bots/chromium.fyi/ios12-sdk-xcode-clang.json
@@ -11,7 +11,7 @@
     "ios_enable_code_signing=false",
     "is_component_build=false",
     "is_debug=true",
-    "symbol_level=1",
+    "symbol_level=0",
     "target_cpu=\"x64\"",
     "target_os=\"ios\"",
     "use_goma=true",
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 6d6ac51..0b71d26 100644
--- a/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
+++ b/ios/build/bots/chromium.mac/ios-simulator-xcode-clang.json
@@ -12,7 +12,7 @@
     "ios_enable_code_signing=false",
     "is_component_build=false",
     "is_debug=true",
-    "symbol_level=1",
+    "symbol_level=0",
     "target_cpu=\"x64\"",
     "target_os=\"ios\"",
     "use_goma=true",
diff --git a/ios/build/bots/scripts/run.py b/ios/build/bots/scripts/run.py
index 3d1babaf..ca44ee1f 100755
--- a/ios/build/bots/scripts/run.py
+++ b/ios/build/bots/scripts/run.py
@@ -36,36 +36,55 @@
     os.makedirs(args.out_dir)
 
   try:
-    if args.iossim and args.platform and args.version:
+    if args.replay_path != 'NO_PATH':
+      tr = test_runner.WprProxySimulatorTestRunner(
+          args.app,
+          args.iossim,
+          args.replay_path,
+          args.platform,
+          args.version,
+          args.wpr_tools_path,
+          args.xcode_build_version,
+          args.out_dir,
+          env_vars=args.env_var,
+          mac_toolchain=args.mac_toolchain_cmd,
+          retries=args.retries,
+          shards=args.shards,
+          test_args=test_args,
+          test_cases=args.test_cases,
+          xcode_path=args.xcode_path,
+          xctest=args.xctest,
+      )
+    elif args.iossim and args.platform and args.version:
       tr = test_runner.SimulatorTestRunner(
-        args.app,
-        args.iossim,
-        args.platform,
-        args.version,
-        args.xcode_build_version,
-        args.out_dir,
-        env_vars=args.env_var,
-        mac_toolchain=args.mac_toolchain_cmd,
-        retries=args.retries,
-        shards=args.shards,
-        test_args=test_args,
-        test_cases=args.test_cases,
-        xcode_path=args.xcode_path,
-        xctest=args.xctest,
+          args.app,
+          args.iossim,
+          args.platform,
+          args.version,
+          args.xcode_build_version,
+          args.out_dir,
+          env_vars=args.env_var,
+          mac_toolchain=args.mac_toolchain_cmd,
+          retries=args.retries,
+          shards=args.shards,
+          test_args=test_args,
+          test_cases=args.test_cases,
+          xcode_path=args.xcode_path,
+          xctest=args.xctest,
       )
     else:
       tr = test_runner.DeviceTestRunner(
-        args.app,
-        args.xcode_build_version,
-        args.out_dir,
-        env_vars=args.env_var,
-        mac_toolchain=args.mac_toolchain_cmd,
-        restart=args.restart,
-        retries=args.retries,
-        test_args=test_args,
-        test_cases=args.test_cases,
-        xcode_path=args.xcode_path,
-        xctest=args.xctest,
+          args.app,
+          args.xcode_build_version,
+          args.out_dir,
+          env_vars=args.env_var,
+          mac_toolchain=args.mac_toolchain_cmd,
+          restart=args.restart,
+          retries=args.retries,
+          test_args=test_args,
+          test_cases=args.test_cases,
+          xcode_path=args.xcode_path,
+          xctest=args.xctest,
       )
 
     return 0 if tr.launch() else 1
@@ -173,6 +192,14 @@
     metavar='build_id',
   )
   parser.add_argument(
+    '--replay-path',
+    help=('Path to a directory containing WPR replay and recipe files, for '
+          'use with WprProxySimulatorTestRunner to replay a test suite'
+          ' against multiple saved website interactions. Default: %(default)s'),
+    default='NO_PATH',
+    metavar='replay-path',
+  )
+  parser.add_argument(
     '--xcode-path',
     metavar='PATH',
     help=('Path to <Xcode>.app folder where contents of the app will be '
@@ -188,6 +215,13 @@
     metavar='mac_toolchain',
   )
   parser.add_argument(
+    '--wpr-tools-path',
+    help=('Location of WPR test tools (should be preinstalled, e.g. as part of '
+         'a swarming task requirement). Default: %(default)s.'),
+    default='NO_PATH',
+    metavar='wpr-tools-path',
+  )
+  parser.add_argument(
     '--xctest',
     action='store_true',
     help='Whether or not the given app should be run as an XCTest.',
diff --git a/ios/build/bots/scripts/test_runner.py b/ios/build/bots/scripts/test_runner.py
index 5d12395..b74e1df 100644
--- a/ios/build/bots/scripts/test_runner.py
+++ b/ios/build/bots/scripts/test_runner.py
@@ -9,11 +9,13 @@
 import argparse
 import collections
 import errno
+import glob
 import json
 import os
 import plistlib
 import re
 import shutil
+import signal
 import subprocess
 import sys
 import tempfile
@@ -118,6 +120,26 @@
         'xcode_path is not specified or does not exist: "%s"' % xcode_path)
 
 
+class ReplayPathNotFoundError(TestRunnerError):
+  """The requested app was not found."""
+  def __init__(self, replay_path):
+    super(ReplayPathNotFoundError, self).__init__(
+        'Replay path does not exist: %s' % replay_path)
+
+
+class WprToolsNotFoundError(TestRunnerError):
+  """wpr_tools_path is not specified."""
+  def __init__(self, wpr_tools_path):
+    super(WprToolsNotFoundError, self).__init__(
+        'wpr_tools_path is not specified or not found: "%s"' % wpr_tools_path)
+
+
+class ShardingDisabledError(TestRunnerError):
+  """Temporary error indicating that sharding is not yet implemented."""
+  def __init__(self):
+    super(ShardingDisabledError, self).__init__('Sharding has not been implemented!')
+
+
 def get_kif_test_filter(tests, invert=False):
   """Returns the KIF test filter to filter the given test cases.
 
@@ -802,10 +824,10 @@
       cmd.append(self.xctest_path)
 
     proc = subprocess.Popen(
-      cmd,
-      env=self.get_launch_env(),
-      stdout=subprocess.PIPE,
-      stderr=subprocess.STDOUT,
+        cmd,
+        env=self.get_launch_env(),
+        stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT,
     )
 
     out = []
@@ -911,6 +933,369 @@
       env['NSUnbufferedIO'] = 'YES'
     return env
 
+  def copy_trusted_certificate(self, cert_path):
+    '''Copies a TrustStore file with a trusted HTTPS certificate into all sims.
+
+      This allows the simulators to access HTTPS webpages served through WprGo.
+
+      Args:
+        cert_path: Path to the certificate to copy to all emulators
+    '''
+    trustStores = glob.glob(
+        '{}/Library/Developer/CoreSimulator/Devices/*/data/Library/Keychains/{}'.
+        format(os.path.expanduser('~'), 'TrustStore.sqlite3'))
+    for trustStore in trustStores:
+      print 'Copying TrustStore to {}'.format(trustStore)
+      shutil.copy(cert_path, trustStore)
+
+
+class WprProxySimulatorTestRunner(SimulatorTestRunner):
+  """Class for running simulator tests with WPR against saved website replays"""
+
+  def __init__(
+      self,
+      app_path,
+      iossim_path,
+      replay_path,
+      platform,
+      version,
+      wpr_tools_path,
+      xcode_build_version,
+      out_dir,
+      env_vars=None,
+      mac_toolchain='',
+      retries=None,
+      shards=None,
+      test_args=None,
+      test_cases=None,
+      xcode_path='',
+      xctest=False,
+  ):
+    """Initializes a new instance of this class.
+
+    Args:
+      app_path: Path to the compiled .app or .ipa to run.
+      iossim_path: Path to the compiled iossim binary to use.
+      replay_path: Path to the folder where WPR replay and recipe files live.
+      platform: Name of the platform to simulate. Supported values can be found
+        by running "iossim -l". e.g. "iPhone 5s", "iPad Retina".
+      version: Version of iOS the platform should be running. Supported values
+        can be found by running "iossim -l". e.g. "9.3", "8.2", "7.1".
+      xcode_build_version: Xcode build version to install before running tests.
+      out_dir: Directory to emit test data into.
+      env_vars: List of environment variables to pass to the test itself.
+      mac_toolchain: Command to run `mac_toolchain` tool.
+      retries: Number of times to retry failed test cases.
+      test_args: List of strings to pass as arguments to the test when
+        launching.
+      test_cases: List of tests to be included in the test run. None or [] to
+        include all tests.
+      wpr_tools_path: Path to pre-installed (from CIPD) WPR-related tools
+      xcode_path: Path to Xcode.app folder where its contents will be installed.
+      xctest: Whether or not this is an XCTest.
+
+    Raises:
+      AppNotFoundError: If the given app does not exist.
+      PlugInsNotFoundError: If the PlugIns directory does not exist for XCTests.
+      XcodeVersionNotFoundError: If the given Xcode version does not exist.
+      XCTestPlugInNotFoundError: If the .xctest PlugIn does not exist.
+    """
+    super(WprProxySimulatorTestRunner, self).__init__(
+      app_path,
+      iossim_path,
+      platform,
+      version,
+      xcode_build_version,
+      out_dir,
+      env_vars=env_vars,
+      mac_toolchain=mac_toolchain,
+      retries=retries,
+      shards=shards,
+      test_args=test_args,
+      test_cases=test_cases,
+      xcode_path=xcode_path,
+      xctest=xctest,
+    )
+
+    replay_path = os.path.abspath(replay_path)
+    if not os.path.exists(replay_path):
+      raise ReplayPathNotFoundError(replay_path)
+    self.replay_path = replay_path
+
+    if not os.path.exists(wpr_tools_path):
+      raise WprToolsNotFoundError(wpr_tools_path)
+    self.wpr_tools_path = wpr_tools_path
+
+    self.proxy_process = None
+    self.wprgo_process = None
+
+  def set_up(self):
+    '''Performs setup actions which must occur prior to every test launch.'''
+    super(WprProxySimulatorTestRunner, self).set_up()
+    self.download_replays()
+
+    cert_path = "{}/TrustStore_trust.sqlite3".format(self.wpr_tools_path)
+
+    self.copy_trusted_certificate(cert_path)
+    self.proxy_start()
+
+  def tear_down(self):
+    '''Performs cleanup actions which must occur after every test launch.'''
+    super(WprProxySimulatorTestRunner, self).tear_down()
+    self.proxy_stop()
+    self.wprgo_stop()
+
+  def _run(self, cmd, shards=1):
+    '''Runs the specified command, parsing GTest output.
+
+    Args:
+      cmd: List of strings forming the command to run.
+      NOTE: in the case of WprProxySimulatorTestRunner, cmd
+        is just a descriptor for the test, and not indicative
+        of the actual command we build and execute in _run.
+
+    Returns:
+      GTestResult instance.
+    '''
+
+    result = gtest_utils.GTestResult(cmd)
+    completed_without_failure = True
+    total_returncode = 0
+
+    if shards > 1:
+      # TODO(crbug.com/881096): reimplement sharding in the future
+      raise ShardingDisabledError()
+    else:
+      # TODO(crbug.com/812705): Implement test sharding for unit tests.
+      # TODO(crbug.com/812712): Use thread pool for DeviceTestRunner as well.
+
+      # General algorithm explanation (will clean up later)
+      # For each recipe in the test folder, if there is a matching replay,
+      # Run the test suite on it (similar to how SimulatorTestRunner does)
+      # and record the results for that test into the parser.
+      # I still need to take the results from the parser and change the test
+      # name to be the recipe name (since the test suite name is the same)
+      # before loading those results into the result variable.
+      for recipePath in glob.glob('{}/*.test'.format(self.replay_path)):
+        baseName = os.path.basename(recipePath)
+        testName = os.path.splitext(baseName)[0]
+        replayPath = '{}/{}'.format(self.replay_path, testName)
+
+        if os.path.isfile(replayPath):
+          print 'Running test for recipe {}'.format(recipePath)
+          self.wprgo_start(replayPath)
+
+          # TODO(crbug.com/881096): Consider reusing get_launch_command
+          #  and adding the autofillautomation flag to it
+
+          # TODO(crbug.com/881096): We only run AutofillAutomationTestCase
+          #  as we have other unit tests in the suite which are not related
+          #  to testing website recipe/replays. We should consider moving
+          #  one or the other to a different suite.
+
+          # For the website replay test suite, we need to pass in a single
+          # recipe at a time, with the flag "autofillautomation"
+          recipe_cmd = [
+            self.iossim_path, '-d', self.platform, '-s',
+            self.version, '-t', 'AutofillAutomationTestCase', '-c',
+            '-autofillautomation={}'.format(recipePath)
+          ]
+          for env_var in self.env_vars:
+            recipe_cmd.extend(['-e', env_var])
+
+          for test_arg in self.test_args:
+            recipe_cmd.extend(['-c', test_arg])
+
+          cmd.append(self.app_path)
+          if self.xctest_path:
+            cmd.append(self.xctest_path)
+
+          proc = subprocess.Popen(
+              recipe_cmd,
+              env=self.get_launch_env(),
+              stdout=subprocess.PIPE,
+              stderr=subprocess.STDOUT,
+          )
+
+          if self.xctest_path:
+            parser = xctest_utils.XCTestLogParser()
+          else:
+            parser = gtest_utils.GTestLogParser()
+
+          while True:
+            line = proc.stdout.readline()
+            if not line:
+              break
+            line = line.rstrip()
+            parser.ProcessLine(line)
+            print line
+            sys.stdout.flush()
+
+          proc.wait()
+          sys.stdout.flush()
+
+          self.wprgo_stop()
+
+          for test in parser.FailedTests(include_flaky=True):
+            # All test names will be the same since we re-run the same suite
+            # therefore, to differentiate the results, we append the recipe
+            # name to the test suite.
+            # This is why we create a new parser for each recipe run, since when
+            # ingesting results from xcode, the test suite name is the same.
+            testWithRecipeName = "{}.{}".format(baseName, test)
+
+            # Test cases are named as <test group>.<test case>. If the test case
+            # is prefixed w/"FLAKY_", it should be reported as flaked not failed
+            if '.' in test and test.split(
+                '.', 1)[1].startswith('FLAKY_'):
+              result.flaked_tests[
+                  testWithRecipeName] = parser.FailureDescription(test)
+            else:
+              result.failed_tests[
+                  testWithRecipeName] = parser.FailureDescription(test)
+
+          for test in parser.PassedTests(include_flaky=True):
+            testWithRecipeName = "{}.{}".format(baseName, test)
+            result.passed_tests.extend([testWithRecipeName])
+
+          # Check for runtime errors.
+          if self.xctest_path and parser.SystemAlertPresent():
+            raise SystemAlertPresentError()
+          if proc.returncode != 0:
+            total_returncode = proc.returncode
+          if parser.CompletedWithoutFailure() == False:
+            completed_without_failure = False
+          print '%s test returned %s' % (recipePath, proc.returncode)
+          print
+
+        else:
+          print 'No matching replay file for recipe {}'.format(
+              recipePath)
+
+    # iossim can return 5 if it exits noncleanly even if all tests passed.
+    # Therefore we cannot rely on process exit code to determine success.
+
+    # NOTE: total_returncode is 0 OR the last non-zero return code from a test.
+    result.finalize(total_returncode, completed_without_failure)
+    return result
+
+  def get_launch_command(self, test_filter=[], invert=False):
+    '''Returns the name of the test, instead of the real launch command.
+    We build our own command in _run, which is what this is usually passed to,
+    so instead we just use this for a test descriptor.
+
+    Args:
+      test_filter: List of test cases to filter.
+      invert: Whether to invert the filter or not. Inverted, the filter will
+      match everything except the given test cases.
+
+    Returns:
+      A list of strings forming the command to launch the test.
+    '''
+
+    invert_str = "Inverted" if invert else ""
+    if test_filter:
+      return [
+        '{} WprProxySimulatorTest'.format(invert_str),
+        'Test folder: {}'.format(self.replay_path)
+      ]
+    else:
+      return [
+        '{} WprProxySimulatorTest'.format(invert_str),
+        'Filter: {}'.format(' '.join(test_filter)),
+        'Test folder: {}'.format(self.replay_path)
+      ]
+
+  def proxy_start(self):
+    '''Starts tsproxy and routes the machine's traffic through tsproxy.'''
+
+    # Stops any straggling instances of WPRgo that may hog ports 8080/8081
+    subprocess.check_call('lsof -ti:8080 | xargs kill -9')
+    subprocess.check_call('lsof -ti:8081| xargs kill -9')
+
+    # We route all network adapters through the proxy, since it is easier than
+    # determining which network adapter is being used currently.
+    network_services = subprocess.check_output(
+      ['networksetup', '-listallnetworkservices']).strip().split('\n')
+    if len(network_services) > 1:
+      # We ignore the first line as it is a description of the command's output.
+      network_services = network_services[1:]
+
+      for service in network_services:
+        subprocess.check_call([
+          'networksetup', '-setsocksfirewallproxystate', service,
+          'on'
+        ])
+        subprocess.check_call([
+          'networksetup', '-setsocksfirewallproxy', service,
+          '127.0.0.1', '1080'
+        ])
+
+    self.proxy_process = subprocess.Popen(
+        [
+          'python', 'tsproxy.py', '--port=1080', '--desthost=127.0.0.1',
+          '--mapports=443:8081,*:8080'
+        ],
+        cwd='{}/tsproxy'.format(self.wpr_tools_path),
+        env=self.get_launch_env(),
+        stdout=open('stdout_proxy.txt', 'wb+'),
+        stderr=subprocess.STDOUT,
+    )
+
+  def proxy_stop(self):
+    '''Stops tsproxy and disables the machine's proxy settings.'''
+    if self.proxy_process != None:
+      os.kill(self.proxy_process.pid, signal.SIGINT)
+
+    network_services = subprocess.check_output(
+      ['networksetup', '-listallnetworkservices']).strip().split('\n')
+    if len(network_services) > 1:
+      # We ignore the first line as it is a description of the command's output.
+      network_services = network_services[1:]
+
+      for service in network_services:
+        subprocess.check_call([
+          'networksetup', '-setsocksfirewallproxystate', service,
+          'off'
+        ])
+
+  def wprgo_start(self, replay_path):
+    '''Starts WprGo serving the specified replay file.
+
+      Args:
+        replay_path: Path to the WprGo website replay to use.
+    '''
+    self.wprgo_process = subprocess.Popen(
+        [
+          'wpr', 'run', 'src/wpr.go', 'replay', '--http_port=8080',
+          '--https_port=8081', replay_path
+        ],
+        cwd='{}/web_page_replay_go/'.format(self.wpr_tools_path),
+        env=self.get_launch_env(),
+        stdout=open('stdout_wprgo.txt', 'wb+'),
+        stderr=subprocess.STDOUT,
+    )
+
+  def wprgo_stop(self):
+    '''Stops serving website replays using WprGo.'''
+    if self.wprgo_process != None:
+      os.kill(self.wprgo_process.pid, signal.SIGINT)
+
+  def download_replays(self):
+    '''Downloads the replay files from GCS to the replay path folder.
+
+    We store the website replays in GCS due to size; sha1 files in the
+    replay path folder correspond to each of these replays, and running this
+    script will populate those replay files.'''
+
+    subprocess.check_call(
+      [
+        'download_from_google_storage.py',
+        '--bucket', 'chrome-test-web-page-replay-captures/autofill',
+        '--directory', self.replay_path
+      ],
+      cwd=self.wpr_tools_path)
+
 
 class DeviceTestRunner(TestRunner):
   """Class for running tests on devices."""
diff --git a/ios/build/bots/scripts/test_runner_test.py b/ios/build/bots/scripts/test_runner_test.py
index bd7532a..9619e20e 100755
--- a/ios/build/bots/scripts/test_runner_test.py
+++ b/ios/build/bots/scripts/test_runner_test.py
@@ -6,8 +6,10 @@
 """Unittests for test_runner.py."""
 
 import collections
+import glob
 import json
 import os
+import subprocess
 import sys
 import unittest
 
@@ -345,6 +347,143 @@
     self.assertTrue(tr.logs)
 
 
+class WprProxySimulatorTestRunnerTest(TestCase):
+  """Tests for test_runner.WprProxySimulatorTestRunner."""
+
+  def setUp(self):
+    super(WprProxySimulatorTestRunnerTest, self).setUp()
+
+    def install_xcode(build, mac_toolchain_cmd, xcode_app_path):
+      return True
+
+    self.mock(test_runner, 'get_current_xcode_info', lambda: {
+        'version': 'test version', 'build': 'test build', 'path': 'test/path'})
+    self.mock(test_runner, 'install_xcode', install_xcode)
+    self.mock(test_runner.subprocess, 'check_output',
+              lambda _: 'fake-bundle-id')
+    self.mock(os.path, 'abspath', lambda path: '/abs/path/to/%s' % path)
+    self.mock(os.path, 'exists', lambda _: True)
+
+  def test_replay_path_not_found(self):
+    """Ensures ReplayPathNotFoundError is raised."""
+
+    self.mock(os.path, 'exists', lambda p: not p.endswith('bad-replay-path'))
+
+    with self.assertRaises(test_runner.ReplayPathNotFoundError):
+      test_runner.WprProxySimulatorTestRunner(
+        'fake-app',
+        'fake-iossim',
+        'bad-replay-path',
+        'platform',
+        'os',
+        'wpr-tools-path',
+        'xcode-version',
+        'xcode-build',
+        'out-dir',
+      )
+
+  def test_wpr_tools_not_found(self):
+    """Ensures WprToolsNotFoundError is raised."""
+
+    self.mock(os.path, 'exists', lambda p: not p.endswith('bad-tools-path'))
+
+    with self.assertRaises(test_runner.WprToolsNotFoundError):
+      test_runner.WprProxySimulatorTestRunner(
+        'fake-app',
+        'fake-iossim',
+        'replay-path',
+        'platform',
+        'os',
+        'bad-tools-path',
+        'xcode-version',
+        'xcode-build',
+        'out-dir',
+      )
+
+  def test_init(self):
+    """Ensures instance is created."""
+    tr = test_runner.WprProxySimulatorTestRunner(
+        'fake-app',
+        'fake-iossim',
+        'replay-path',
+        'platform',
+        'os',
+        'wpr-tools-path',
+        'xcode-version',
+        'xcode-build',
+        'out-dir',
+      )
+
+    self.assertTrue(tr)
+
+  def test_run(self):
+    """Ensures the _run method can handle passed and failed tests."""
+
+    class FakeStdout:
+      def __init__(self):
+        self.line_index = 0
+        self.lines = [
+          'Test Case \'-[a 1]\' started.',
+          'Test Case \'-[a 1]\' has uninteresting logs.',
+          'Test Case \'-[a 1]\' passed (0.1 seconds)',
+          'Test Case \'-[b 2]\' started.',
+          'Test Case \'-[b 2]\' passed (0.1 seconds)',
+          'Test Case \'-[c 3]\' started.',
+          'Test Case \'-[c 3]\' has interesting failure info.',
+          'Test Case \'-[c 3]\' failed (0.1 seconds)',
+        ]
+
+      def readline(self):
+        if self.line_index < len(self.lines):
+          return_line = self.lines[self.line_index]
+          self.line_index += 1
+          return return_line
+        else:
+          return None
+
+    class FakeProcess:
+      def __init__(self):
+        self.stdout = FakeStdout()
+        self.returncode = 0
+
+      def stdout(self):
+        return self.stdout
+
+      def wait(self):
+        return
+
+    def popen(recipe_cmd, env, stdout, stderr):
+      return FakeProcess()
+
+    tr = test_runner.WprProxySimulatorTestRunner(
+        'fake-app',
+        'fake-iossim',
+        'replay-path',
+        'platform',
+        'os',
+        'wpr-tools-path',
+        'xcode-version',
+        'xcode-build',
+        'out-dir',
+    )
+    self.mock(test_runner.WprProxySimulatorTestRunner, 'wprgo_start', lambda a,b: None)
+    self.mock(test_runner.WprProxySimulatorTestRunner, 'wprgo_stop', lambda _: None)
+
+    self.mock(os.path, 'isfile', lambda _: True)
+    self.mock(glob, 'glob', lambda _: ["file1", "file2"])
+    self.mock(subprocess, 'Popen', popen)
+
+    tr.xctest_path = 'fake.xctest'
+    cmd = tr.get_launch_command()
+    result = tr._run(cmd=cmd, shards=1)
+    self.assertIn('file1.a/1', result.passed_tests)
+    self.assertIn('file1.b/2', result.passed_tests)
+    self.assertIn('file1.c/3', result.failed_tests)
+    self.assertIn('file2.a/1', result.passed_tests)
+    self.assertIn('file2.b/2', result.passed_tests)
+    self.assertIn('file2.c/3', result.failed_tests)
+
+
 class DeviceTestRunnerTest(TestCase):
   def setUp(self):
     super(DeviceTestRunnerTest, self).setUp()
diff --git a/ios/chrome/browser/autofill/form_structure_browsertest.mm b/ios/chrome/browser/autofill/form_structure_browsertest.mm
index 0a80672..4cc5ec7 100644
--- a/ios/chrome/browser/autofill/form_structure_browsertest.mm
+++ b/ios/chrome/browser/autofill/form_structure_browsertest.mm
@@ -43,10 +43,9 @@
 
 const base::FilePath::CharType kTestName[] = FILE_PATH_LITERAL("heuristics");
 
-const base::FilePath& GetTestDataDir() {
-  CR_DEFINE_STATIC_LOCAL(base::FilePath, dir, ());
-  if (dir.empty())
-    base::PathService::Get(ios::DIR_TEST_DATA, &dir);
+base::FilePath GetTestDataDir() {
+  base::FilePath dir;
+  base::PathService::Get(ios::DIR_TEST_DATA, &dir);
   return dir;
 }
 
diff --git a/ios/chrome/browser/prefs/browser_prefs.mm b/ios/chrome/browser/prefs/browser_prefs.mm
index f1a0702..469e819 100644
--- a/ios/chrome/browser/prefs/browser_prefs.mm
+++ b/ios/chrome/browser/prefs/browser_prefs.mm
@@ -62,6 +62,10 @@
 #error "This file requires ARC support."
 #endif
 
+namespace {
+const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
+}
+
 void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
   BrowserStateInfoCache::RegisterPrefs(registry);
   flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
@@ -164,6 +168,8 @@
 
   // Register prefs used by Clear Browsing Data UI.
   browsing_data::prefs::RegisterBrowserUserPrefs(registry);
+
+  registry->RegisterBooleanPref(kReverseAutologinEnabled, true);
 }
 
 // This method should be periodically pruned of year+ old migrations.
@@ -183,4 +189,7 @@
 
   // Added 8/2018.
   autofill::prefs::MigrateDeprecatedAutofillPrefs(prefs);
+
+  // Added 10/2018.
+  prefs->ClearPref(kReverseAutologinEnabled);
 }
diff --git a/ios/net/cookies/cookie_store_ios.h b/ios/net/cookies/cookie_store_ios.h
index a242723..3215f4fa 100644
--- a/ios/net/cookies/cookie_store_ios.h
+++ b/ios/net/cookies/cookie_store_ios.h
@@ -15,6 +15,7 @@
 
 #include "base/callback.h"
 #include "base/cancelable_callback.h"
+#include "base/containers/linked_list.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
@@ -134,6 +135,21 @@
       base::CallbackList<void(const CanonicalCookie& cookie,
                               CookieChangeCause cause)>;
 
+  class Subscription : public base::LinkNode<Subscription>,
+                       public CookieChangeSubscription {
+   public:
+    explicit Subscription(
+        std::unique_ptr<CookieChangeCallbackList::Subscription> subscription);
+    ~Subscription() override;
+
+    void ResetSubscription();
+
+   private:
+    std::unique_ptr<CookieChangeCallbackList::Subscription> subscription_;
+
+    DISALLOW_COPY_AND_ASSIGN(Subscription);
+  };
+
   // CookieChangeDispatcher implementation that proxies into IOSCookieStore.
   class CookieChangeDispatcherIOS : public CookieChangeDispatcher {
    public:
@@ -270,6 +286,8 @@
            std::unique_ptr<CookieChangeCallbackList>>
       hook_map_;
 
+  base::LinkedList<Subscription> all_subscriptions_;
+
   CookieChangeDispatcherIOS change_dispatcher_;
 
   base::WeakPtrFactory<CookieStoreIOS> weak_factory_;
diff --git a/ios/net/cookies/cookie_store_ios.mm b/ios/net/cookies/cookie_store_ios.mm
index 72d25fd..5bb7c35a 100644
--- a/ios/net/cookies/cookie_store_ios.mm
+++ b/ios/net/cookies/cookie_store_ios.mm
@@ -43,22 +43,6 @@
 
 namespace {
 
-class CookieStoreIOSCookieChangeSubscription : public CookieChangeSubscription {
- public:
-  using CookieChangeCallbackList =
-      base::CallbackList<void(const CanonicalCookie& cookie,
-                              CookieChangeCause cause)>;
-  CookieStoreIOSCookieChangeSubscription(
-      std::unique_ptr<CookieChangeCallbackList::Subscription> subscription)
-      : subscription_(std::move(subscription)) {}
-  ~CookieStoreIOSCookieChangeSubscription() override {}
-
- private:
-  std::unique_ptr<CookieChangeCallbackList::Subscription> subscription_;
-
-  DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSCookieChangeSubscription);
-};
-
 #pragma mark NotificationTrampoline
 
 // NotificationTrampoline dispatches cookie notifications to all the existing
@@ -184,6 +168,30 @@
 
 #pragma mark -
 
+#pragma mark CookieStoreIOS::Subscription
+
+CookieStoreIOS::Subscription::Subscription(
+    std::unique_ptr<CookieChangeCallbackList::Subscription> subscription)
+    : subscription_(std::move(subscription)) {
+  DCHECK(subscription_);
+}
+
+CookieStoreIOS::Subscription::~Subscription() {
+  if (!subscription_) {
+    // |CookieStoreIOS| already destroyed - bail out.
+    return;
+  }
+
+  // |CookieStoreIOS| is alive - unsubscribe.
+  RemoveFromList();
+}
+
+void CookieStoreIOS::Subscription::ResetSubscription() {
+  subscription_.reset();
+}
+
+#pragma mark -
+
 #pragma mark CookieStoreIOS::CookieChangeDispatcherIOS
 
 CookieStoreIOS::CookieChangeDispatcherIOS::CookieChangeDispatcherIOS(
@@ -236,6 +244,12 @@
 
 CookieStoreIOS::~CookieStoreIOS() {
   NotificationTrampoline::GetInstance()->RemoveObserver(this);
+
+  // Reset subscriptions.
+  for (auto* node = all_subscriptions_.head(); node != all_subscriptions_.end();
+       node = node->next()) {
+    node->value()->ResetSubscription();
+  }
 }
 
 // static
@@ -626,8 +640,11 @@
   }
 
   DCHECK(hook_map_.find(key) != hook_map_.end());
-  return std::make_unique<CookieStoreIOSCookieChangeSubscription>(
-      hook_map_[key]->Add(std::move(callback)));
+  auto subscription =
+      std::make_unique<Subscription>(hook_map_[key]->Add(std::move(callback)));
+  all_subscriptions_.Append(subscription.get());
+
+  return subscription;
 }
 
 void CookieStoreIOS::UpdateCacheForCookieFromSystem(
diff --git a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
index cf45a021..0374e547 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
@@ -15,6 +15,7 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
+import android.os.Looper;
 import android.view.Surface;
 
 import org.chromium.base.Log;
@@ -75,6 +76,7 @@
     private boolean mPendingError;
     private boolean mPendingStart;
     private long mNativeMediaCodecBridge;
+    private int mSequenceCounter;
     private Queue<DequeueInputResult> mPendingInputBuffers;
     private Queue<DequeueOutputResult> mPendingOutputBuffers;
 
@@ -273,6 +275,7 @@
         mPendingOutputBuffers.clear();
         mPendingStart = true;
         mCurrentFormat = null;
+        ++mSequenceCounter;
     }
 
     @CalledByNative
@@ -319,6 +322,12 @@
         notifyBuffersAvailable();
     }
 
+    public synchronized void onPendingStartComplete(int sequenceCounter) {
+        // Ignore events from the past.
+        if (mSequenceCounter != sequenceCounter) return;
+        mPendingStart = false;
+    }
+
     void updateLastPresentationTime(MediaCodec.BufferInfo info) {
         if (info.presentationTimeUs < mLastPresentationTimeUs) {
             // TODO(qinmin): return a special code through DequeueOutputResult
@@ -361,8 +370,26 @@
         try {
             if (mUseAsyncApi) {
                 synchronized (this) {
-                    mPendingStart = false;
                     if (mPendingError) return false;
+
+                    class CompletePendingStartTask implements Runnable {
+                        private int mThisSequence;
+                        CompletePendingStartTask(int sequence) {
+                            mThisSequence = sequence;
+                        }
+
+                        @Override
+                        public void run() {
+                            onPendingStartComplete(mThisSequence);
+                        }
+                    };
+
+                    // Ensure any pending indices are ignored until after start
+                    // by trampolining through the handler/looper that the
+                    // notifications are coming from.
+                    Handler h = sCallbackHandler == null ? new Handler(Looper.getMainLooper())
+                                                         : sCallbackHandler;
+                    h.post(new CompletePendingStartTask(mSequenceCounter));
                 }
             }
 
@@ -386,12 +413,7 @@
         if (mUseAsyncApi) {
             synchronized (this) {
                 if (mPendingError) return new DequeueInputResult(MediaCodecStatus.ERROR, -1);
-                if (mPendingStart) {
-                    return new DequeueInputResult(
-                            start() ? MediaCodecStatus.TRY_AGAIN_LATER : MediaCodecStatus.ERROR,
-                            -1);
-                }
-                if (mPendingInputBuffers.isEmpty())
+                if (mPendingStart || mPendingInputBuffers.isEmpty())
                     return new DequeueInputResult(MediaCodecStatus.TRY_AGAIN_LATER, -1);
                 return mPendingInputBuffers.remove();
             }
@@ -423,11 +445,14 @@
             mMediaCodec.flush();
 
             // MediaCodec.flush() invalidates all returned indices, but there
-            // may be some unhandled callbacks when using the async API. So we
-            // need to wait until the next dequeuInputBuffer() before we start
-            // accepting callbacks from MediaCodec again. By that point we can
-            // be sure that the looper / MessageLoop have cycled at least once.
-            if (mUseAsyncApi) prepareAsyncApiForRestart();
+            // may be some unhandled callbacks when using the async API. When
+            // we call prepareAsyncApiForRestart() it will set mPendingStart,
+            // start() will then post a task through the callback handler which
+            // clears mPendingStart to start accepting new buffers.
+            if (mUseAsyncApi) {
+                prepareAsyncApiForRestart();
+                if (!start()) return MediaCodecStatus.ERROR;
+            }
         } catch (Exception e) {
             Log.e(TAG, "Failed to flush MediaCodec", e);
             return MediaCodecStatus.ERROR;
diff --git a/media/base/android/media_codec_util.cc b/media/base/android/media_codec_util.cc
index 41572909..51f3095 100644
--- a/media/base/android/media_codec_util.cc
+++ b/media/base/android/media_codec_util.cc
@@ -222,9 +222,9 @@
   ScopedJavaLocalRef<jintArray> j_color_format_array =
       Java_MediaCodecUtil_getEncoderColorFormatsForMime(env, j_mime);
 
-  if (j_color_format_array.obj()) {
+  if (!j_color_format_array.is_null()) {
     std::vector<int> formats;
-    JavaIntArrayToIntVector(env, j_color_format_array.obj(), &formats);
+    JavaIntArrayToIntVector(env, j_color_format_array, &formats);
     color_formats = std::set<int>(formats.begin(), formats.end());
   }
 
diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc
index ac782a4..9048265 100644
--- a/media/base/android/media_drm_bridge.cc
+++ b/media/base/android/media_drm_bridge.cc
@@ -749,7 +749,7 @@
     ScopedJavaLocalRef<jbyteArray> j_key_id =
         Java_KeyStatus_getKeyId(env, j_key_status);
     std::vector<uint8_t> key_id;
-    JavaByteArrayToByteVector(env, j_key_id.obj(), &key_id);
+    JavaByteArrayToByteVector(env, j_key_id, &key_id);
     DCHECK(!key_id.empty());
 
     jint j_status_code = Java_KeyStatus_getStatusCode(env, j_key_status);
diff --git a/media/base/android/media_drm_storage_bridge.cc b/media/base/android/media_drm_storage_bridge.cc
index de6ed51..d4e6a30 100644
--- a/media/base/android/media_drm_storage_bridge.cc
+++ b/media/base/android/media_drm_storage_bridge.cc
@@ -92,15 +92,14 @@
   DCHECK(impl_);
   std::vector<uint8_t> key_set_id;
   JavaByteArrayToByteVector(
-      env, Java_PersistentInfo_keySetId(env, j_persist_info).obj(),
-      &key_set_id);
+      env, Java_PersistentInfo_keySetId(env, j_persist_info), &key_set_id);
 
   std::string mime = ConvertJavaStringToUTF8(
       env, Java_PersistentInfo_mimeType(env, j_persist_info));
 
   std::string session_id;
-  JavaByteArrayToString(
-      env, Java_PersistentInfo_emeId(env, j_persist_info).obj(), &session_id);
+  JavaByteArrayToString(env, Java_PersistentInfo_emeId(env, j_persist_info),
+                        &session_id);
 
   task_runner_->PostTask(
       FROM_HERE,
diff --git a/media/capture/video/android/photo_capabilities.cc b/media/capture/video/android/photo_capabilities.cc
index 9980c64..8a04c207b 100644
--- a/media/capture/video/android/photo_capabilities.cc
+++ b/media/capture/video/android/photo_capabilities.cc
@@ -27,7 +27,7 @@
   std::vector<PhotoCapabilities::AndroidMeteringMode> modes;
   if (jni_modes.obj()) {
     base::android::JavaIntArrayToIntVector(
-        env, jni_modes.obj(), reinterpret_cast<std::vector<int>*>(&modes));
+        env, jni_modes, reinterpret_cast<std::vector<int>*>(&modes));
   }
   return modes;
 }
@@ -256,7 +256,7 @@
       Java_PhotoCapabilities_getFillLightModes(env, object_);
   if (jni_modes.obj()) {
     base::android::JavaIntArrayToIntVector(
-        env, jni_modes.obj(), reinterpret_cast<std::vector<int>*>(&modes));
+        env, jni_modes, reinterpret_cast<std::vector<int>*>(&modes));
   }
   return modes;
 }
diff --git a/media/capture/video/android/video_capture_device_android.cc b/media/capture/video/android/video_capture_device_android.cc
index b8b0956..e1ebe0a6 100644
--- a/media/capture/video/android/video_capture_device_android.cc
+++ b/media/capture/video/android/video_capture_device_android.cc
@@ -518,7 +518,7 @@
 
   if (data != nullptr) {
     mojom::BlobPtr blob = mojom::Blob::New();
-    base::android::JavaByteArrayToByteVector(env, data.obj(), &blob->data);
+    base::android::JavaByteArrayToByteVector(env, data, &blob->data);
     blob->mime_type = blob->data.empty() ? "" : "image/jpeg";
     std::move(*cb).Run(std::move(blob));
   }
diff --git a/media/midi/usb_midi_device_android.cc b/media/midi/usb_midi_device_android.cc
index 7dbeadd8..4067afe7 100644
--- a/media/midi/usb_midi_device_android.cc
+++ b/media/midi/usb_midi_device_android.cc
@@ -79,8 +79,7 @@
   base::android::ScopedJavaLocalRef<jbyteArray> descriptors =
       Java_UsbMidiDeviceAndroid_getDescriptors(env, raw_device_);
 
-  base::android::JavaByteArrayToByteVector(env, descriptors.obj(),
-                                           &descriptors_);
+  base::android::JavaByteArrayToByteVector(env, descriptors, &descriptors_);
 }
 
 void UsbMidiDeviceAndroid::InitDeviceInfo() {
@@ -113,7 +112,7 @@
       Java_UsbMidiDeviceAndroid_getStringDescriptor(env, raw_device_, index);
 
   std::vector<uint8_t> ret;
-  base::android::JavaByteArrayToByteVector(env, descriptors.obj(), &ret);
+  base::android::JavaByteArrayToByteVector(env, descriptors, &ret);
   return ret;
 }
 
diff --git a/net/android/cert_verify_result_android.cc b/net/android/cert_verify_result_android.cc
index 925e71b..eff90d8b 100644
--- a/net/android/cert_verify_result_android.cc
+++ b/net/android/cert_verify_result_android.cc
@@ -30,8 +30,7 @@
 
   ScopedJavaLocalRef<jobjectArray> chain_byte_array =
       Java_AndroidCertVerifyResult_getCertificateChainEncoded(env, result);
-  JavaArrayOfByteArrayToStringVector(
-      env, chain_byte_array.obj(), verified_chain);
+  JavaArrayOfByteArrayToStringVector(env, chain_byte_array, verified_chain);
 }
 
 }  // namespace android
diff --git a/net/android/keystore.cc b/net/android/keystore.cc
index 8104682e..5c87664 100644
--- a/net/android/keystore.cc
+++ b/net/android/keystore.cc
@@ -46,7 +46,7 @@
     return false;
 
   // Write signature to string.
-  JavaByteArrayToByteVector(env, signature_ref.obj(), signature);
+  JavaByteArrayToByteVector(env, signature_ref, signature);
   return true;
 }
 
diff --git a/net/android/network_change_notifier_delegate_android.cc b/net/android/network_change_notifier_delegate_android.cc
index 88d611b..a659534 100644
--- a/net/android/network_change_notifier_delegate_android.cc
+++ b/net/android/network_change_notifier_delegate_android.cc
@@ -55,7 +55,7 @@
     const JavaRef<jlongArray>& long_array,
     NetworkMap* network_map) {
   std::vector<int64_t> int64_list;
-  base::android::JavaLongArrayToInt64Vector(env, long_array.obj(), &int64_list);
+  base::android::JavaLongArrayToInt64Vector(env, long_array, &int64_list);
   network_map->clear();
   for (auto i = int64_list.begin(); i != int64_list.end(); ++i) {
     NetworkChangeNotifier::NetworkHandle network_handle = *i;
diff --git a/net/android/network_library.cc b/net/android/network_library.cc
index bc6fe9ac..56df365 100644
--- a/net/android/network_library.cc
+++ b/net/android/network_library.cc
@@ -128,8 +128,7 @@
   JNIEnv* env = AttachCurrentThread();
   std::vector<std::string> dns_servers_strings;
   base::android::JavaArrayOfByteArrayToStringVector(
-      env, Java_AndroidNetworkLibrary_getDnsServers(env).obj(),
-      &dns_servers_strings);
+      env, Java_AndroidNetworkLibrary_getDnsServers(env), &dns_servers_strings);
   if (dns_servers_strings.size() == 0)
     return internal::CONFIG_PARSE_POSIX_NO_NAMESERVERS;
   if (dns_servers_strings.size() == 1 && dns_servers_strings[0].size() == 1)
diff --git a/net/cookies/cookie_monster_change_dispatcher.cc b/net/cookies/cookie_monster_change_dispatcher.cc
index a53b1ed..dc9a3f6 100644
--- a/net/cookies/cookie_monster_change_dispatcher.cc
+++ b/net/cookies/cookie_monster_change_dispatcher.cc
@@ -51,7 +51,9 @@
 CookieMonsterChangeDispatcher::Subscription::~Subscription() {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
-  change_dispatcher_->UnlinkSubscription(this);
+  if (change_dispatcher_) {
+    change_dispatcher_->UnlinkSubscription(this);
+  }
 }
 
 void CookieMonsterChangeDispatcher::Subscription::DispatchChange(
diff --git a/net/cookies/cookie_store_change_unittest.h b/net/cookies/cookie_store_change_unittest.h
index 32df87d..2f91d42 100644
--- a/net/cookies/cookie_store_change_unittest.h
+++ b/net/cookies/cookie_store_change_unittest.h
@@ -2660,6 +2660,23 @@
   cookie_changes_2.clear();
 }
 
+TYPED_TEST_P(CookieStoreChangeNamedTest, SubscriptionOutlivesStore) {
+  if (!TypeParam::supports_named_cookie_tracking)
+    return;
+
+  std::vector<CookieChange> cookie_changes;
+  std::unique_ptr<CookieChangeSubscription> subscription =
+      this->GetCookieStore()->GetChangeDispatcher().AddCallbackForCookie(
+          this->http_www_foo_.url(), "abc",
+          base::BindRepeating(
+              &CookieStoreChangeTestBase<TypeParam>::OnCookieChange,
+              base::Unretained(&cookie_changes)));
+  this->ResetCookieStore();
+
+  // |subscription| outlives cookie_store - crash should not happen.
+  subscription.reset();
+}
+
 REGISTER_TYPED_TEST_CASE_P(CookieStoreChangeGlobalTest,
                            NoCookie,
                            InitialCookie,
@@ -2721,7 +2738,8 @@
                            DifferentSubscriptionsNames,
                            DifferentSubscriptionsPaths,
                            DifferentSubscriptionsFiltering,
-                           MultipleSubscriptions);
+                           MultipleSubscriptions,
+                           SubscriptionOutlivesStore);
 
 }  // namespace net
 
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index 4e371a5..1935ac3 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -310,6 +310,9 @@
     return cookie_store_.get();
   }
 
+  // Resets CookieStore.
+  void ResetCookieStore() { cookie_store_.reset(); }
+
   // Compares two cookie lines.
   void MatchCookieLines(const std::string& line1, const std::string& line2) {
     EXPECT_EQ(TokenizeCookieLine(line1), TokenizeCookieLine(line2));
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
index d70a30f4..65b77b7 100644
--- a/net/dns/BUILD.gn
+++ b/net/dns/BUILD.gn
@@ -227,7 +227,7 @@
   # Whitelist-only access so we can keep track of all usage external to the
   # network stack.
   friend = [
-    "//chromeos",
+    "//chromeos/network",
     "//components/cronet/*",
     "//net/*",
   ]
diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h
index 7699719b..2b9af2f 100644
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -2854,88 +2854,6 @@
 // contains no parameters.
 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_END)
 
-// -----------------------------------------------------------------------------
-// Data Reduction Proxy events.
-// -----------------------------------------------------------------------------
-
-// This event is created when the data reduction proxy has been turned on or
-// off. It always contains the parameter:
-//  {
-//    "enabled": <true if the proxy is enabled>
-//  }
-//
-// If it is enabled, it contains additional parameters:
-//  {
-//    "primary_restricted": <Whether the primary proxy is restricted or not>,
-//    "fallback_restricted": <Whether the fallback proxy is restricted or not>,
-//    "primary_origin": <The primary proxy origin address>,
-//    "fallback_origin": <The fallback proxy origin address>,
-//    "ssl_origin": <The SSL proxy origin address>,
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_ENABLED)
-
-// The start/end of a canary request is sent to the data reduction proxy.
-//
-// The BEGIN phase contains the following parameters:
-//  {
-//    "url": <The URL of the canary endpoint>,
-//  }
-//
-// The END phase contains the following parameters:
-//  {
-//    "net_error": <The net_error of the completion of the canary request>,
-//    "http_response_code": <The HTTP response code of the canary request>,
-//    "check_succeeded": <Whether a secure Data Reduction Proxy can be used or
-//                        not>
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_CANARY_REQUEST)
-
-// This event is created when a response to the canary request has been
-// received with the following parameters:
-//  {
-//    "headers": <The list of header:value pairs>,
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_CANARY_RESPONSE_RECEIVED)
-
-// This event is created when a bypass event takes place with the following
-// parameters:
-//  {
-//    "action": <For DRP proxy sourced bypasses in the chrome-proxy header,
-//               the bypass type>,
-//    "bypass_type": <For non-DRP proxy sourced bypasses, the bypass type>,
-//    "url": <The origin URL of the remote endpoint which resulted in the
-//            bypass>,
-//    "bypass_duration_seconds": <The length of time to be in a bypass state>,
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_BYPASS_REQUESTED)
-
-// This event is created when the data reduction proxy configuration changes
-// (i.e. a switch between primary and fallback) with the following parameters:
-//  {
-//    "proxy_server": <The URL of the proxy server no longer being used>,
-//    "net_error": <The net_error encountered when using the proxy server; this
-//                  can be 0 if the proxy server is explicitly skipped>,
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_FALLBACK)
-
-// The start/end of a config request is sent to the Data Saver Config API
-// service.
-//
-// The BEGIN phase contains the following parameters:
-//  {
-//    "url": <The URL of the service endpoint>,
-//  }
-//
-// The END phase contains the following parameters:
-//  {
-//    "net_error": <The net_error of the completion of the config request>,
-//    "http_response_code": <The HTTP response code of the config request>,
-//    "failure_count": <The number of consecutive config request failures>,
-//    "retry_delay_seconds": <The length of time after which another config
-//                            request will be made>,
-//  }
-EVENT_TYPE(DATA_REDUCTION_PROXY_CONFIG_REQUEST)
-
 // Marks start of UploadDataStream that is logged on initialization.
 // The END phase contains the following parameters:
 // {
diff --git a/net/log/net_log_source_type_list.h b/net/log/net_log_source_type_list.h
index f3dd25b0..08819ab 100644
--- a/net/log/net_log_source_type_list.h
+++ b/net/log/net_log_source_type_list.h
@@ -31,7 +31,6 @@
 SOURCE_TYPE(CERT_VERIFIER_JOB)
 SOURCE_TYPE(PROXY_CLIENT_SOCKET)
 SOURCE_TYPE(PROXY_CLIENT_SOCKET_WRAPPER)
-SOURCE_TYPE(DATA_REDUCTION_PROXY)
 SOURCE_TYPE(BIDIRECTIONAL_STREAM)
 SOURCE_TYPE(NETWORK_QUALITY_ESTIMATOR)
 SOURCE_TYPE(HTTP_STREAM_JOB_CONTROLLER)
diff --git a/net/ssl/ssl_client_auth_cache_unittest.cc b/net/ssl/ssl_client_auth_cache_unittest.cc
index 6345619..62fbfac 100644
--- a/net/ssl/ssl_client_auth_cache_unittest.cc
+++ b/net/ssl/ssl_client_auth_cache_unittest.cc
@@ -61,13 +61,13 @@
   EXPECT_FALSE(cache.Lookup(server1, &cached_cert, &cached_pkey));
 
   // Add client certificate for server1.
-  cache.Add(server1, cert1.get(), new MockSSLPrivateKey);
+  cache.Add(server1, cert1.get(), base::MakeRefCounted<MockSSLPrivateKey>());
   cached_cert = nullptr;
   EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
   EXPECT_EQ(cert1, cached_cert);
 
   // Add client certificate for server2.
-  cache.Add(server2, cert2.get(), new MockSSLPrivateKey);
+  cache.Add(server2, cert2.get(), base::MakeRefCounted<MockSSLPrivateKey>());
   cached_cert = nullptr;
   EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
   EXPECT_EQ(cert1.get(), cached_cert.get());
@@ -76,7 +76,7 @@
   EXPECT_EQ(cert2, cached_cert);
 
   // Overwrite the client certificate for server1.
-  cache.Add(server1, cert3.get(), new MockSSLPrivateKey);
+  cache.Add(server1, cert3.get(), base::MakeRefCounted<MockSSLPrivateKey>());
   cached_cert = nullptr;
   EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
   EXPECT_EQ(cert3, cached_cert);
@@ -116,8 +116,8 @@
       ImportCertFromFile(GetTestCertsDirectory(), "expired_cert.pem"));
   ASSERT_TRUE(cert2);
 
-  cache.Add(server1, cert1.get(), new MockSSLPrivateKey);
-  cache.Add(server2, cert2.get(), new MockSSLPrivateKey);
+  cache.Add(server1, cert1.get(), base::MakeRefCounted<MockSSLPrivateKey>());
+  cache.Add(server2, cert2.get(), base::MakeRefCounted<MockSSLPrivateKey>());
 
   scoped_refptr<X509Certificate> cached_cert;
   scoped_refptr<SSLPrivateKey> cached_pkey;
@@ -137,7 +137,7 @@
       ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"));
   ASSERT_TRUE(cert1);
 
-  cache.Add(server1, nullptr, new MockSSLPrivateKey);
+  cache.Add(server1, nullptr, base::MakeRefCounted<MockSSLPrivateKey>());
 
   scoped_refptr<X509Certificate> cached_cert(cert1);
   scoped_refptr<SSLPrivateKey> cached_pkey;
@@ -152,13 +152,13 @@
   EXPECT_FALSE(cache.Lookup(server1, &cached_cert, &cached_pkey));
 
   // Add a new preference for a specific certificate.
-  cache.Add(server1, cert1.get(), new MockSSLPrivateKey);
+  cache.Add(server1, cert1.get(), base::MakeRefCounted<MockSSLPrivateKey>());
   cached_cert = nullptr;
   EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
   EXPECT_EQ(cert1, cached_cert);
 
   // Replace the specific preference with a nullptr certificate.
-  cache.Add(server1, nullptr, new MockSSLPrivateKey);
+  cache.Add(server1, nullptr, base::MakeRefCounted<MockSSLPrivateKey>());
   cached_cert = nullptr;
   EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
   EXPECT_EQ(nullptr, cached_cert.get());
@@ -173,10 +173,10 @@
       ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"));
   ASSERT_TRUE(cert1);
 
-  cache.Add(server1, cert1.get(), new MockSSLPrivateKey);
+  cache.Add(server1, cert1.get(), base::MakeRefCounted<MockSSLPrivateKey>());
 
   HostPortPair server2("foo2", 443);
-  cache.Add(server2, nullptr, new MockSSLPrivateKey);
+  cache.Add(server2, nullptr, base::MakeRefCounted<MockSSLPrivateKey>());
 
   scoped_refptr<X509Certificate> cached_cert;
   scoped_refptr<SSLPrivateKey> cached_pkey;
diff --git a/net/third_party/quic/core/quic_write_blocked_list_test.cc b/net/third_party/quic/core/quic_write_blocked_list_test.cc
index 9e03762..7a7c7e16 100644
--- a/net/third_party/quic/core/quic_write_blocked_list_test.cc
+++ b/net/third_party/quic/core/quic_write_blocked_list_test.cc
@@ -175,7 +175,6 @@
   // Once the higher priority stream is out of the way, id2 will resume its 16k
   // write, with only 1 byte remaining of its guaranteed write allocation.
   EXPECT_EQ(id2, write_blocked_list.PopFront());
-  write_blocked_list.AddStream(id2);
   write_blocked_list.UpdateBytesForStream(id2, 1);
   write_blocked_list.AddStream(id2);
   EXPECT_EQ(2u, write_blocked_list.NumBlockedStreams());
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index 22737da..4f7df1e0 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -14,6 +14,7 @@
 #include "base/files/file_util.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/no_destructor.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/synchronization/lock.h"
 #include "base/values.h"
@@ -227,8 +228,8 @@
 base::FilePath PrintBackendCUPS::GetPPD(const char* name) {
   // cupsGetPPD returns a filename stored in a static buffer in CUPS.
   // Protect this code with lock.
-  CR_DEFINE_STATIC_LOCAL(base::Lock, ppd_lock, ());
-  base::AutoLock ppd_autolock(ppd_lock);
+  static base::NoDestructor<base::Lock> ppd_lock;
+  base::AutoLock ppd_autolock(*ppd_lock);
   base::FilePath ppd_path;
   const char* ppd_file_path = nullptr;
   if (print_server_url_.is_empty()) {  // Use default (local) print server.
diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc
index 167ae20b..81e59c069 100644
--- a/printing/printing_context_android.cc
+++ b/printing/printing_context_android.cc
@@ -46,7 +46,7 @@
                    const JavaRef<jintArray>& int_arr,
                    PageRanges* range_vector) {
   std::vector<int> pages;
-  base::android::JavaIntArrayToIntVector(env, int_arr.obj(), &pages);
+  base::android::JavaIntArrayToIntVector(env, int_arr, &pages);
   for (int page : pages) {
     PageRange range;
     range.from = page;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 7159fcd..d2a53df3 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -1074,8 +1074,8 @@
     url_request_->CancelWithError(net::ERR_SSL_CLIENT_AUTH_CERT_NEEDED);
   } else {
     if (x509_certificate) {
-      scoped_refptr<net::SSLPrivateKey> key(new SSLPrivateKeyInternal(
-          algorithm_preferences, std::move(ssl_private_key)));
+      auto key = base::MakeRefCounted<SSLPrivateKeyInternal>(
+          algorithm_preferences, std::move(ssl_private_key));
       url_request_->ContinueWithCertificate(std::move(x509_certificate),
                                             std::move(key));
     } else {
diff --git a/services/resource_coordinator/public/cpp/resource_coordinator_features.cc b/services/resource_coordinator/public/cpp/resource_coordinator_features.cc
index ab45754..be20e36 100644
--- a/services/resource_coordinator/public/cpp/resource_coordinator_features.cc
+++ b/services/resource_coordinator/public/cpp/resource_coordinator_features.cc
@@ -19,7 +19,7 @@
 namespace features {
 
 const base::Feature kPageAlmostIdle{"PageAlmostIdle",
-                                    base::FEATURE_DISABLED_BY_DEFAULT};
+                                    base::FEATURE_ENABLED_BY_DEFAULT};
 
 // Enables CPU/memory performance measurements on PageAlmostIdle events.
 const base::Feature kPerformanceMeasurement{"PerformanceMeasurement",
@@ -34,7 +34,7 @@
 }
 
 int GetMainThreadTaskLoadLowThreshold() {
-  static const int kDefaultThreshold = 30;
+  static const int kDefaultThreshold = 25;
 
   std::string value_str = base::GetFieldTrialParamValueByFeature(
       features::kPageAlmostIdle, kMainThreadTaskLoadLowThresholdParameterName);
diff --git a/services/service_manager/service_manager.cc b/services/service_manager/service_manager.cc
index 710d95d..d8f8ba4bd 100644
--- a/services/service_manager/service_manager.cc
+++ b/services/service_manager/service_manager.cc
@@ -14,6 +14,7 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
+#include "base/no_destructor.h"
 #include "base/optional.h"
 #include "base/process/process.h"
 #include "base/process/process_handle.h"
@@ -111,8 +112,8 @@
 }
 
 const InterfaceProviderSpec& GetEmptyInterfaceProviderSpec() {
-  CR_DEFINE_STATIC_LOCAL(InterfaceProviderSpec, spec, ());
-  return spec;
+  static base::NoDestructor<InterfaceProviderSpec> spec;
+  return *spec;
 }
 
 bool HasCapability(const InterfaceProviderSpec& spec,
diff --git a/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom b/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
index 5d541e6..4a372f2 100644
--- a/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom
@@ -56,8 +56,10 @@
   // Starts the scope of temporary references tied to this |frame_sink_id|.
   // Temporary references tied to this |frame_sink_id| will be dropped on
   // InvalidateFrameSinkId.This must be called before Create(Root)
-  // CompositorFrameSink() is called.
-  RegisterFrameSinkId(FrameSinkId frame_sink_id);
+  // CompositorFrameSink() is called. |report_activation| indicates whether
+  // the Viz host is interested in FirstSurfaceActivation notifications of
+  // surfaces from this |frame_sink_id|.
+  RegisterFrameSinkId(FrameSinkId frame_sink_id, bool report_activation);
 
   // Invalidates |frame_sink_id| which cleans up any unsatisified surface
   // sequences or dangling temporary references assigned to it. If there is a
diff --git a/services/ws/BUILD.gn b/services/ws/BUILD.gn
index ad1d532..a1446f5 100644
--- a/services/ws/BUILD.gn
+++ b/services/ws/BUILD.gn
@@ -43,12 +43,12 @@
     "embedding.h",
     "event_injector.cc",
     "event_injector.h",
+    "event_observer_helper.cc",
+    "event_observer_helper.h",
     "focus_handler.cc",
     "focus_handler.h",
     "injected_event_handler.cc",
     "injected_event_handler.h",
-    "pointer_watcher.cc",
-    "pointer_watcher.h",
     "remoting_event_injector.cc",
     "remoting_event_injector.h",
     "screen_provider.cc",
diff --git a/services/ws/client_root.cc b/services/ws/client_root.cc
index 808f104..c6b63e0 100644
--- a/services/ws/client_root.cc
+++ b/services/ws/client_root.cc
@@ -60,7 +60,8 @@
       window_->env()->context_factory_private()->GetHostFrameSinkManager();
   viz::FrameSinkId frame_sink_id =
       ServerWindow::GetMayBeNull(window_)->frame_sink_id();
-  host_frame_sink_manager->RegisterFrameSinkId(frame_sink_id, this);
+  host_frame_sink_manager->RegisterFrameSinkId(
+      frame_sink_id, this, viz::ReportFirstSurfaceActivation::kYes);
   window_->SetEmbedFrameSinkId(frame_sink_id);
 
   UpdatePrimarySurfaceId();
diff --git a/services/ws/event_observer_helper.cc b/services/ws/event_observer_helper.cc
new file mode 100644
index 0000000..d6ba03e
--- /dev/null
+++ b/services/ws/event_observer_helper.cc
@@ -0,0 +1,48 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/ws/event_observer_helper.h"
+
+#include "services/ws/window_service.h"
+#include "services/ws/window_tree.h"
+#include "ui/aura/env.h"
+#include "ui/aura/window_event_dispatcher.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/events/event.h"
+
+namespace ws {
+
+EventObserverHelper::EventObserverHelper(WindowTree* tree) : tree_(tree) {
+  tree->window_service()->env()->AddWindowEventDispatcherObserver(this);
+}
+
+EventObserverHelper::~EventObserverHelper() {
+  tree_->window_service()->env()->RemoveWindowEventDispatcherObserver(this);
+}
+
+bool EventObserverHelper::DoesEventMatch(const ui::Event& event) const {
+  return types_.find(event.type()) != types_.end();
+}
+
+void EventObserverHelper::ClearPendingEvent() {
+  pending_event_.reset();
+}
+
+void EventObserverHelper::OnWindowEventDispatcherStartedProcessing(
+    aura::WindowEventDispatcher* dispatcher,
+    const ui::Event& event) {
+  // See |pending_event_|'s comment for why the event isn't sent immediately.
+  if (DoesEventMatch(event))
+    pending_event_ = ui::Event::Clone(event);
+}
+
+void EventObserverHelper::OnWindowEventDispatcherFinishedProcessingEvent(
+    aura::WindowEventDispatcher* dispatcher) {
+  if (pending_event_) {
+    tree_->SendObservedEventToClient(dispatcher->host()->GetDisplayId(),
+                                     std::move(pending_event_));
+  }
+}
+
+}  // namespace ws
diff --git a/services/ws/event_observer_helper.h b/services/ws/event_observer_helper.h
new file mode 100644
index 0000000..dde5983
--- /dev/null
+++ b/services/ws/event_observer_helper.h
@@ -0,0 +1,65 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_WS_EVENT_OBSERVER_HELPER_H_
+#define SERVICES_WS_EVENT_OBSERVER_HELPER_H_
+
+#include <memory>
+#include <set>
+
+#include "base/macros.h"
+#include "ui/aura/window_event_dispatcher_observer.h"
+#include "ui/events/event_constants.h"
+
+namespace ws {
+
+class WindowTree;
+
+// EventObserverHelper is used when a client has requested to observe events
+// that the client would not normally receive. This class observes events by way
+// of aura::WindowEventDispatcherObserver and forwards them to the client.
+// See mojom::WindowTree::ObserveEventTypes() for more information.
+class EventObserverHelper : public aura::WindowEventDispatcherObserver {
+ public:
+  explicit EventObserverHelper(WindowTree* tree);
+  ~EventObserverHelper() override;
+
+  // Returns true if |event| is listed in the set of requested |types_|.
+  bool DoesEventMatch(const ui::Event& event) const;
+
+  void set_types(const std::set<ui::EventType>& types) { types_ = types; }
+
+  // See comment above |pending_event_| for details.
+  void ClearPendingEvent();
+
+ private:
+  // aura::WindowEventDispatcherObserver:
+  void OnWindowEventDispatcherStartedProcessing(
+      aura::WindowEventDispatcher* dispatcher,
+      const ui::Event& event) override;
+  void OnWindowEventDispatcherFinishedProcessingEvent(
+      aura::WindowEventDispatcher* dispatcher) override;
+
+  // The requested types of events to be observed.
+  std::set<ui::EventType> types_;
+
+  WindowTree* tree_;
+
+  // Events matching the requested |types_| are processed in two phases:
+  // . In OnWindowEventDispatcherStartedProcessing() if the event should be
+  //   sent to the client, it's stored in |pending_event_|.
+  // . In OnWindowEventDispatcherFinishedProcessingEvent() if |pending_event_|
+  //   is non-null, |pending_event_| is sent to the client.
+  // During event processing if the event targets the client, then
+  // |pending_event_| is reset. This is done to avoid sending the event twice.
+  // WindowTreeClient::OnWindowInputEvent() indicates if the event matched an
+  // event observer.
+  std::unique_ptr<ui::Event> pending_event_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventObserverHelper);
+};
+
+}  // namespace ws
+
+#endif  // SERVICES_WS_EVENT_OBSERVER_HELPER_H_
diff --git a/services/ws/pointer_watcher.cc b/services/ws/pointer_watcher.cc
deleted file mode 100644
index fd0e1a8..0000000
--- a/services/ws/pointer_watcher.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/ws/pointer_watcher.h"
-
-#include "services/ws/window_service.h"
-#include "services/ws/window_tree.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-
-namespace ws {
-
-// static
-std::unique_ptr<ui::Event> PointerWatcher::CreateEventForClient(
-    const ui::Event& event) {
-  // Client code expects to get PointerEvents.
-  if (event.IsMouseEvent())
-    return std::make_unique<ui::PointerEvent>(*event.AsMouseEvent());
-  if (event.IsTouchEvent())
-    return std::make_unique<ui::PointerEvent>(*event.AsTouchEvent());
-  return ui::Event::Clone(event);
-}
-
-PointerWatcher::PointerWatcher(WindowTree* tree) : tree_(tree) {
-  tree->window_service()->env()->AddWindowEventDispatcherObserver(this);
-}
-
-PointerWatcher::~PointerWatcher() {
-  tree_->window_service()->env()->RemoveWindowEventDispatcherObserver(this);
-}
-
-bool PointerWatcher::DoesEventMatch(const ui::Event& event) const {
-  switch (event.type()) {
-    case ui::ET_MOUSE_PRESSED:
-    case ui::ET_MOUSE_RELEASED:
-    case ui::ET_TOUCH_PRESSED:
-    case ui::ET_TOUCH_RELEASED:
-      return true;
-
-    case ui::ET_MOUSE_MOVED:
-    case ui::ET_TOUCH_MOVED:
-    case ui::ET_MOUSEWHEEL:
-      return types_to_watch_ == TypesToWatch::kUpDownMoveWheel;
-
-    default:
-      break;
-  }
-  return false;
-}
-
-void PointerWatcher::ClearPendingEvent() {
-  pending_event_.reset();
-}
-
-void PointerWatcher::OnWindowEventDispatcherStartedProcessing(
-    aura::WindowEventDispatcher* dispatcher,
-    const ui::Event& event) {
-  if (!DoesEventMatch(event))
-    return;
-
-  // See comment above |pending_event_| for details on why the event isn't sent
-  // immediately.
-  pending_event_ = CreateEventForClient(event);
-}
-
-void PointerWatcher::OnWindowEventDispatcherFinishedProcessingEvent(
-    aura::WindowEventDispatcher* dispatcher) {
-  if (!pending_event_)
-    return;
-
-  tree_->SendPointerWatcherEventToClient(dispatcher->host()->GetDisplayId(),
-                                         std::move(pending_event_));
-}
-
-}  // namespace ws
diff --git a/services/ws/pointer_watcher.h b/services/ws/pointer_watcher.h
deleted file mode 100644
index e1a51c8..0000000
--- a/services/ws/pointer_watcher.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_WS_POINTER_WATCHER_H_
-#define SERVICES_WS_POINTER_WATCHER_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "ui/aura/window_event_dispatcher_observer.h"
-
-namespace ui {
-
-class Event;
-}
-
-namespace ws {
-
-class WindowTree;
-
-// PointerWatcher is used when a client has requested to observe pointer events
-// that the client would not normally receive. PointerWatcher observes events
-// by way of aura::WindowEventDispatcherObserver and forwards them to the
-// client.
-//
-// This class provides the server implementation of
-// mojom::WindowTree::StartPointerWatcher(), see it for more information.
-class PointerWatcher : public aura::WindowEventDispatcherObserver {
- public:
-  enum class TypesToWatch {
-    // Pointer up/down events.
-    kUpDown,
-
-    // Pointer up, down, move (including drag) and wheel events.
-    kUpDownMoveWheel,
-  };
-
-  explicit PointerWatcher(WindowTree* tree);
-  ~PointerWatcher() override;
-
-  // Applies any necessary transformations on the event before sending to the
-  // client.
-  static std::unique_ptr<ui::Event> CreateEventForClient(
-      const ui::Event& event);
-
-  // Returns true if |event| matches the types the PointerWatcher has been
-  // configured to monitor.
-  bool DoesEventMatch(const ui::Event& event) const;
-
-  void set_types_to_watch(TypesToWatch types) { types_to_watch_ = types; }
-
-  // See comment above |pending_event_| for details.
-  void ClearPendingEvent();
-
- private:
-  // aura::WindowEventDispatcherObserver:
-  void OnWindowEventDispatcherStartedProcessing(
-      aura::WindowEventDispatcher* dispatcher,
-      const ui::Event& event) override;
-  void OnWindowEventDispatcherFinishedProcessingEvent(
-      aura::WindowEventDispatcher* dispatcher) override;
-
-  TypesToWatch types_to_watch_ = TypesToWatch::kUpDown;
-
-  WindowTree* tree_;
-
-  // Events matching TypesToWatch are processed in two phases:
-  // . In OnWindowEventDispatcherStartedProcessing() if the event should be
-  //   sent to the client, it's stored in |pending_event_|.
-  // . In OnWindowEventDispatcherFinishedProcessingEvent() if |pending_event_|
-  //   is non-null, |pending_event_| is sent to the client.
-  // During event processing if the event targets the client, then
-  // |pending_event_| is reset. This is done to avoid sending the event twice.
-  // WindowTreeClient::OnWindowInputEvent() indicates if the event matched
-  // an observed pointer event.
-  std::unique_ptr<ui::Event> pending_event_;
-
-  DISALLOW_COPY_AND_ASSIGN(PointerWatcher);
-};
-
-}  // namespace ws
-
-#endif  // SERVICES_WS_POINTER_WATCHER_H_
diff --git a/services/ws/public/mojom/window_tree.mojom b/services/ws/public/mojom/window_tree.mojom
index f771378..809af683 100644
--- a/services/ws/public/mojom/window_tree.mojom
+++ b/services/ws/public/mojom/window_tree.mojom
@@ -40,12 +40,12 @@
 //
 // Event processing happens in the following order:
 // . The event is sent to the accelerator registered for the PRE_TARGET. If
-//   the client consumes the event, matching pointer watchers are notified and
+//   the client consumes the event, matching event observers are notified and
 //   processing stops. If the client does not consume the event processing
 //   continues.
 // . Target window (lookup of the target window depends upon the event type) and
-//   matching pointer watchers are notified at the same time. The target is only
-//   notified once, even if it has a matching pointer watcher registered. If the
+//   matching event observers are notified at the same time. The target is only
+//   notified once, even if it has a matching event observer registered. If the
 //   target consumes the event, processing stops.
 // . Accelerator registered for POST_TARGET. No response is expected from the
 //   client for the POST_TARGET and processing of the next continues
@@ -92,21 +92,16 @@
   // if |window_id| does not currently have capture.
   ReleaseCapture(uint32 change_id, uint64 window_id);
 
-  // Starts the pointer watcher that monitors pointer events (up/down events if
-  // |wants_moves| is false, up/down and move if |wants_moves| is true), even if
-  // they are not targeted at a window in this tree. For pointer events that
-  // would normally be sent to the requesting client (if the event target is
-  // this window tree) OnWindowInputEvent() is called, all other matching
-  // pointer events (if the target is another tree) result in
-  // OnPointerEventObserved(). There is only ever one pointer watcher active at
-  // a given time. The client should prefer |want_moves| to be false, as there's
-  // a system-wide performance/battery penalty for listening to moves.
+  // Start observing global events matching the supplied |types|, even if they
+  // are not targeted at the requesting client. Events that would normally be
+  // sent to the requesting client (ie. the event target is this window tree)
+  // are sent to OnWindowInputEvent() with |matches_event_observer| set to true.
+  //
+  // Clients should limit the requested types and the duration of observation,
+  // as there is a system-wide perf/battery penalty, especially for mouse moves.
   //
   // See class description for details on event delivery.
-  StartPointerWatcher(bool want_moves);
-
-  // Stops the pointer watcher for all events.
-  StopPointerWatcher();
+  ObserveEventTypes(array<ui.mojom.EventType> types);
 
   // Sets the specified bounds of the specified window. The window will paint
   // the frame in the provided |local_frame_id|, if any.
@@ -528,27 +523,22 @@
                                 array<uint8>? new_data);
 
   // Invoked when an event is targeted at the specified window. The client must
-  // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify
+  // call WindowTree::OnWindowInputEventAck() with the same |event_id| to ack
   // that the event has been processed, and with an EventResult value to notify
-  // if the event was consumed. |matches_pointer_watcher| is true if the client
-  // has called StartPointerWatcher() and the event matches the type of events
-  // specified by StartPointerWatcher(). The client will not receive farther
-  // events until the event is ack'ed, regardless of the value of
-  // |matches_pointer_watcher|.
+  // if the event was consumed. |matches_event_observer| is true if the event
+  // also matches the requested types passed via ObserveEventTypes(). The client
+  // must respond to ack these events, regardless of |matches_event_observer|.
   OnWindowInputEvent(uint32 event_id,
                      uint64 window,
                      int64 display_id,
                      ui.mojom.Event event,
-                     bool matches_pointer_watcher);
+                     bool matches_event_observer);
 
-  // Called when a pointer event that would not normally be targeted at this
-  // client is encountered and the client called StartPointerWatcher(). See
-  // StartPointerWatcher() for details. |window_id| is the window id of the
-  // event target, or 0 if the window is not known to this client. The
-  // client should not acknowledge these events.
-  OnPointerEventObserved(ui.mojom.Event event,
-                         uint64 window_id,
-                         int64 display_id);
+  // Called when an event not targeted at this client is observed, matching the
+  // event types passed to ObserveEventTypes(); see that function for details.
+  // Located events are always passed with the locations in screen coordinates.
+  // The client should not respond to ack these events.
+  OnObservedInputEvent(ui.mojom.Event event);
 
   // Called in two distinct cases: when a window known to the connection gains
   // focus, or when focus moves from a window known to the connection to a
@@ -565,29 +555,28 @@
   // occurs every time the mouse enters a window.
   OnDragDropStart(map<string, array<uint8>> drag_data);
 
-  // Called when the mouse cursor enters a window that has opted into
-  // accepting drags through SetAcceptsDrags(), providing a list
-  // of available mime types.  Returns a bitmask of the supported
-  // operations. |screen_position| is in screen coordinates.
+  // Called when the mouse cursor enters a window that has opted into accepting
+  // drags through SetAcceptsDrags(), providing a list of available mime types.
+  // Returns a bitmask of the supported operations.
+  // |screen_position| is in screen coordinates.
   OnDragEnter(uint64 window,
               uint32 key_state,
               gfx.mojom.Point screen_position,
               uint32 effect_bitmask) => (uint32 supported_op_bitmask);
 
-  // Called when the pointer moves over the window after the initial
-  // DragEnter. Returns a bitmask of the supported operations at this
-  // location. |screen_position| is in screen coordinates.
+  // Called when the pointer moves over the window after the initial DragEnter.
+  // Returns a bitmask of the supported operations at this location.
+  // |screen_position| is in screen coordinates.
   OnDragOver(uint64 window,
              uint32 key_state,
              gfx.mojom.Point screen_position,
              uint32 effect_bitmask) => (uint32 supported_op_bitmask);
 
-  // Called when the pointer leaves a window or if the drop is
-  // canceled.
+  // Called when the pointer leaves a window or if the drop is canceled.
   OnDragLeave(uint64 window);
 
-  // Called when the drop occurs on a window. Returns the action
-  // taken. |screen_position| is in screen coordinates.
+  // Called when the drop occurs on a window. Returns the action taken.
+  // |screen_position| is in screen coordinates.
   OnCompleteDrop(uint64 window,
                  uint32 key_state,
                  gfx.mojom.Point screen_position,
diff --git a/services/ws/test_change_tracker.cc b/services/ws/test_change_tracker.cc
index 24cc3f6..6a0b63d 100644
--- a/services/ws/test_change_tracker.cc
+++ b/services/ws/test_change_tracker.cc
@@ -113,15 +113,14 @@
       std::string result = base::StringPrintf(
           "InputEvent window=%s event_action=%d",
           WindowIdToString(change.window_id).c_str(), change.event_action);
-      if (change.matches_pointer_watcher)
-        result += " matches_pointer_watcher";
+      if (change.matches_event_observer)
+        result += " matches_event_observer";
       return result;
     }
 
-    case CHANGE_TYPE_POINTER_WATCHER_EVENT:
-      return base::StringPrintf("PointerWatcherEvent event_action=%d window=%s",
-                                change.event_action,
-                                WindowIdToString(change.window_id).c_str());
+    case CHANGE_TYPE_OBSERVED_EVENT:
+      return base::StringPrintf("ObservedEvent event_action=%d",
+                                change.event_action);
 
     case CHANGE_TYPE_PROPERTY_CHANGED:
       return base::StringPrintf("PropertyChanged window=%s key=%s value=%s",
@@ -267,27 +266,15 @@
   return false;
 }
 
-Change::Change()
-    : type(CHANGE_TYPE_EMBED),
-      window_id(0),
-      window_id2(0),
-      window_id3(0),
-      event_action(0),
-      matches_pointer_watcher(false),
-      direction(mojom::OrderDirection::ABOVE),
-      bool_value(false),
-      float_value(0.f),
-      cursor_type(ui::CursorType::kNull),
-      change_id(0u),
-      display_id(0) {}
+Change::Change() = default;
 
 Change::Change(const Change& other) = default;
 
-Change::~Change() {}
+Change::~Change() = default;
 
-TestChangeTracker::TestChangeTracker() : delegate_(NULL) {}
+TestChangeTracker::TestChangeTracker() : delegate_(nullptr) {}
 
-TestChangeTracker::~TestChangeTracker() {}
+TestChangeTracker::~TestChangeTracker() = default;
 
 void TestChangeTracker::OnEmbed(mojom::WindowDataPtr root, bool drawn) {
   Change change;
@@ -449,12 +436,12 @@
 void TestChangeTracker::OnWindowInputEvent(Id window_id,
                                            const ui::Event& event,
                                            int64_t display_id,
-                                           bool matches_pointer_watcher) {
+                                           bool matches_event_observer) {
   Change change;
   change.type = CHANGE_TYPE_INPUT_EVENT;
   change.window_id = window_id;
   change.event_action = static_cast<int32_t>(event.type());
-  change.matches_pointer_watcher = matches_pointer_watcher;
+  change.matches_event_observer = matches_event_observer;
   change.display_id = display_id;
   if (event.IsLocatedEvent())
     change.location1 = event.AsLocatedEvent()->root_location();
@@ -463,12 +450,10 @@
   AddChange(change);
 }
 
-void TestChangeTracker::OnPointerEventObserved(const ui::Event& event,
-                                               Id window_id) {
+void TestChangeTracker::OnObservedInputEvent(const ui::Event& event) {
   Change change;
-  change.type = CHANGE_TYPE_POINTER_WATCHER_EVENT;
+  change.type = CHANGE_TYPE_OBSERVED_EVENT;
   change.event_action = static_cast<int32_t>(event.type());
-  change.window_id = window_id;
   AddChange(change);
 }
 
@@ -600,11 +585,11 @@
     delegate_->OnChangeAdded();
 }
 
-TestWindow::TestWindow() {}
+TestWindow::TestWindow() = default;
 
 TestWindow::TestWindow(const TestWindow& other) = default;
 
-TestWindow::~TestWindow() {}
+TestWindow::~TestWindow() = default;
 
 std::string TestWindow::ToString() const {
   return base::StringPrintf("window=%s parent=%s",
diff --git a/services/ws/test_change_tracker.h b/services/ws/test_change_tracker.h
index a8da456..cece115 100644
--- a/services/ws/test_change_tracker.h
+++ b/services/ws/test_change_tracker.h
@@ -37,7 +37,7 @@
   CHANGE_TYPE_NODE_DRAWN_STATE_CHANGED,
   CHANGE_TYPE_NODE_DELETED,
   CHANGE_TYPE_INPUT_EVENT,
-  CHANGE_TYPE_POINTER_WATCHER_EVENT,
+  CHANGE_TYPE_OBSERVED_EVENT,
   CHANGE_TYPE_PROPERTY_CHANGED,
   CHANGE_TYPE_FOCUSED,
   CHANGE_TYPE_CURSOR_CHANGED,
@@ -69,9 +69,9 @@
   // Returns a string description that includes visible and drawn.
   std::string ToString2() const;
 
-  Id parent_id;
-  Id window_id;
-  bool visible;
+  Id parent_id = 0;
+  Id window_id = 0;
+  bool visible = false;
   gfx::Rect bounds;
   std::map<std::string, std::vector<uint8_t>> properties;
 };
@@ -83,32 +83,32 @@
   Change(const Change& other);
   ~Change();
 
-  ChangeType type;
+  ChangeType type = CHANGE_TYPE_EMBED;
   std::vector<TestWindow> windows;
-  Id window_id;
-  Id window_id2;
-  Id window_id3;
+  Id window_id = 0;
+  Id window_id2 = 0;
+  Id window_id3 = 0;
   gfx::Rect bounds;
   gfx::Rect bounds2;
   viz::FrameSinkId frame_sink_id;
   base::Optional<viz::LocalSurfaceId> local_surface_id;
-  int32_t event_action;
-  bool matches_pointer_watcher;
+  int32_t event_action = 0;
+  bool matches_event_observer = false;
   std::string embed_url;
   mojom::OrderDirection direction;
-  bool bool_value;
-  float float_value;
+  bool bool_value = false;
+  float float_value = 0.f;
   std::string property_key;
   std::string property_value;
-  ui::CursorType cursor_type;
-  uint32_t change_id;
+  ui::CursorType cursor_type = ui::CursorType::kNull;
+  uint32_t change_id = 0u;
   gfx::Transform transform;
   // Set in OnWindowInputEvent() if the event is a KeyEvent.
   base::flat_map<std::string, std::vector<uint8_t>> key_event_properties;
-  int64_t display_id;
+  int64_t display_id = 0;
   gfx::Point location1;
   base::flat_map<std::string, std::vector<uint8_t>> drag_data;
-  uint32_t drag_drop_action;
+  uint32_t drag_drop_action = 0u;
 };
 
 // The ChangeToDescription related functions convert a Change into a string.
@@ -202,7 +202,8 @@
   void OnWindowInputEvent(Id window_id,
                           const ui::Event& event,
                           int64_t display_id,
-                          bool matches_pointer_watcher);
+                          bool matches_event_observer);
+  void OnObservedInputEvent(const ui::Event& event);
   void OnPointerEventObserved(const ui::Event& event, Id window_id);
   void OnWindowSharedPropertyChanged(
       Id window_id,
diff --git a/services/ws/test_window_tree_client.cc b/services/ws/test_window_tree_client.cc
index 2b917e7..3c4bd67 100644
--- a/services/ws/test_window_tree_client.cc
+++ b/services/ws/test_window_tree_client.cc
@@ -19,13 +19,6 @@
 
 TestWindowTreeClient::InputEvent::~InputEvent() = default;
 
-TestWindowTreeClient::ObservedPointerEvent::ObservedPointerEvent() = default;
-
-TestWindowTreeClient::ObservedPointerEvent::ObservedPointerEvent(
-    ObservedPointerEvent&& other) = default;
-
-TestWindowTreeClient::ObservedPointerEvent::~ObservedPointerEvent() = default;
-
 TestWindowTreeClient::TestWindowTreeClient() {
   tracker_.set_delegate(this);
 }
@@ -45,13 +38,12 @@
   input_events_ = std::queue<InputEvent>();
 }
 
-TestWindowTreeClient::ObservedPointerEvent
-TestWindowTreeClient::PopObservedPointerEvent() {
-  if (observed_pointer_events_.empty())
-    return ObservedPointerEvent();
+std::unique_ptr<ui::Event> TestWindowTreeClient::PopObservedEvent() {
+  if (observed_events_.empty())
+    return nullptr;
 
-  ObservedPointerEvent event = std::move(observed_pointer_events_.front());
-  observed_pointer_events_.pop();
+  std::unique_ptr<ui::Event> event = std::move(observed_events_.front());
+  observed_events_.pop();
   return event;
 }
 
@@ -194,31 +186,26 @@
                                               Id window_id,
                                               int64_t display_id,
                                               std::unique_ptr<ui::Event> event,
-                                              bool matches_pointer_watcher) {
+                                              bool matches_event_observer) {
   tracker_.OnWindowInputEvent(window_id, *event, display_id,
-                              matches_pointer_watcher);
+                              matches_event_observer);
 
   InputEvent input_event;
   input_event.event_id = event_id;
   input_event.window_id = window_id;
   input_event.display_id = display_id;
   input_event.event = std::move(event);
-  input_event.matches_pointer_watcher = matches_pointer_watcher;
+  input_event.matches_event_observer = matches_event_observer;
   input_events_.push(std::move(input_event));
 
   if (tree_)
     tree_->OnWindowInputEventAck(event_id, mojom::EventResult::HANDLED);
 }
 
-void TestWindowTreeClient::OnPointerEventObserved(
-    std::unique_ptr<ui::Event> event,
-    Id window_id,
-    int64_t display_id) {
-  ObservedPointerEvent observed_pointer_event;
-  observed_pointer_event.window_id = window_id;
-  observed_pointer_event.display_id = display_id;
-  observed_pointer_event.event = std::move(event);
-  observed_pointer_events_.push(std::move(observed_pointer_event));
+void TestWindowTreeClient::OnObservedInputEvent(
+    std::unique_ptr<ui::Event> event) {
+  tracker_.OnObservedInputEvent(*event);
+  observed_events_.push(std::move(event));
 }
 
 void TestWindowTreeClient::OnWindowSharedPropertyChanged(
diff --git a/services/ws/test_window_tree_client.h b/services/ws/test_window_tree_client.h
index ed67b4ec2..993582d 100644
--- a/services/ws/test_window_tree_client.h
+++ b/services/ws/test_window_tree_client.h
@@ -34,19 +34,7 @@
     Id window_id;
     int64_t display_id;
     std::unique_ptr<ui::Event> event;
-    bool matches_pointer_watcher;
-  };
-
-  // An ObservedPointerEvent is created for each call to
-  // OnPointerEventObserved()
-  struct ObservedPointerEvent {
-    ObservedPointerEvent();
-    ObservedPointerEvent(ObservedPointerEvent&& other);
-    ~ObservedPointerEvent();
-
-    std::unique_ptr<ui::Event> event;
-    Id window_id = 0;
-    int64_t display_id = 0;
+    bool matches_event_observer;
   };
 
   TestWindowTreeClient();
@@ -54,22 +42,19 @@
 
   std::queue<InputEvent>& input_events() { return input_events_; }
 
-  // Returns the oldest InputEvent that was received by way of
-  // OnWindowInputEvent(). If no events have been observed, |event| in the
-  // returned object is null.
+  // Returns the oldest InputEvent that was received by OnWindowInputEvent().
+  // If no events have been received, |event| in the returned object is null.
   InputEvent PopInputEvent();
 
   // Removes all InputEvents from |input_events_|.
   void ClearInputEvents();
 
-  std::queue<ObservedPointerEvent>& observed_pointer_events() {
-    return observed_pointer_events_;
+  std::queue<std::unique_ptr<ui::Event>>& observed_events() {
+    return observed_events_;
   }
 
-  // Returns the oldest ObservedPointerEvent that was received by way of
-  // OnPointerEventObserved(). If no pointer events have been observed, |event|
-  // in the returned object is null.
-  ObservedPointerEvent PopObservedPointerEvent();
+  // Returns the oldest event received by OnObservedInputEvent(), or null.
+  std::unique_ptr<ui::Event> PopObservedEvent();
 
   // Sets the mojom::WindowTree for this client. Used when creating a client
   // using mojom::WindowTreeFactory.
@@ -151,10 +136,8 @@
                           Id window_id,
                           int64_t display_id,
                           std::unique_ptr<ui::Event> event,
-                          bool matches_pointer_watcher) override;
-  void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
-                              Id window_id,
-                              int64_t display_id) override;
+                          bool matches_event_observer) override;
+  void OnObservedInputEvent(std::unique_ptr<ui::Event> event) override;
   void OnWindowSharedPropertyChanged(
       Id window,
       const std::string& name,
@@ -195,7 +178,7 @@
   Id root_window_id_ = 0;
   bool track_root_bounds_changes_ = false;
   std::queue<InputEvent> input_events_;
-  std::queue<ObservedPointerEvent> observed_pointer_events_;
+  std::queue<std::unique_ptr<ui::Event>> observed_events_;
   TestScreenProviderObserver screen_provider_observer_;
   mojo::AssociatedBinding<mojom::ScreenProviderObserver>
       screen_provider_observer_binding_{&screen_provider_observer_};
diff --git a/services/ws/window_tree.cc b/services/ws/window_tree.cc
index 18bd02d..c7ecf24e 100644
--- a/services/ws/window_tree.cc
+++ b/services/ws/window_tree.cc
@@ -20,7 +20,7 @@
 #include "services/ws/common/util.h"
 #include "services/ws/drag_drop_delegate.h"
 #include "services/ws/embedding.h"
-#include "services/ws/pointer_watcher.h"
+#include "services/ws/event_observer_helper.h"
 #include "services/ws/public/cpp/property_type_converters.h"
 #include "services/ws/server_window.h"
 #include "services/ws/topmost_window_observer.h"
@@ -48,6 +48,7 @@
 #include "ui/display/screen.h"
 #include "ui/events/event_utils.h"
 #include "ui/events/gestures/gesture_recognizer.h"
+#include "ui/events/mojo/event_struct_traits.h"
 #include "ui/gfx/image/image_skia.h"
 #include "ui/wm/core/capture_controller.h"
 #include "ui/wm/core/window_modality_controller.h"
@@ -184,22 +185,22 @@
   // Events should only come to windows connected to displays.
   DCHECK(window->GetHost());
   const int64_t display_id = window->GetHost()->GetDisplayId();
-  const bool matches_pointer_watcher =
-      pointer_watcher_ && pointer_watcher_->DoesEventMatch(event);
-  if (pointer_watcher_)
-    pointer_watcher_->ClearPendingEvent();
+  const bool matches_event_observer =
+      event_observer_helper_ && event_observer_helper_->DoesEventMatch(event);
+  if (event_observer_helper_)
+    event_observer_helper_->ClearPendingEvent();
 
   for (WindowServiceObserver& observer : window_service_->observers())
     observer.OnWillSendEventToClient(client_id_, event_id);
 
   std::unique_ptr<ui::Event> event_to_send = ui::Event::Clone(event);
-  // Translate the root location for located events. Event's root location
-  // should be in the coordinate of the root window, however the root for the
-  // target window in the client can be different from the one in the server,
-  // thus the root location needs to be converted from the original coordinate
-  // to the one used in the client. See also 'WindowTreeTest.EventLocation' test
-  // case.
   if (event.IsLocatedEvent()) {
+    // Translate the root location for located events. Event's root location
+    // should be in the coordinate of the root window, however the root for the
+    // target window in the client can be different from the one in the server,
+    // thus the root location needs to be converted from the original coordinate
+    // to the one used in the client. See also 'WindowTreeTest.EventLocation'
+    // test case.
     ClientRoot* client_root = FindClientRootContaining(window);
     // The |client_root| may have been removed on shutdown.
     if (client_root) {
@@ -215,14 +216,29 @@
            << " event_type=" << ui::EventTypeName(event.type());
   window_tree_client_->OnWindowInputEvent(
       event_id, TransportIdForWindow(window), display_id,
-      std::move(event_to_send), matches_pointer_watcher);
+      std::move(event_to_send), matches_event_observer);
 }
 
-void WindowTree::SendPointerWatcherEventToClient(
-    int64_t display_id,
-    std::unique_ptr<ui::Event> event) {
-  window_tree_client_->OnPointerEventObserved(std::move(event),
-                                              kInvalidTransportId, display_id);
+void WindowTree::SendObservedEventToClient(int64_t display_id,
+                                           std::unique_ptr<ui::Event> event) {
+  if (event->IsLocatedEvent()) {
+    // Send event locations in screen coordinates, since the client will have no
+    // knowledge of the event's target window.
+    ui::LocatedEvent* located_event = event->AsLocatedEvent();
+    gfx::PointF location = located_event->root_location_f();
+    display::Display display;
+    if (located_event->target()) {
+      location = located_event->target()->GetScreenLocationF(*located_event);
+    } else if (display::Screen::GetScreen()->GetDisplayWithDisplayId(
+                   display_id, &display)) {
+      location += display.bounds().OffsetFromOrigin();
+    }
+    located_event->set_location_f(location);
+    located_event->set_root_location_f(location);
+  }
+  DVLOG(4) << "SendObservedEventToClient event_type="
+           << ui::EventTypeName(event->type());
+  window_tree_client_->OnObservedInputEvent(std::move(event));
 }
 
 bool WindowTree::IsTopLevel(aura::Window* window) {
@@ -1458,16 +1474,18 @@
       change_id, ReleaseCaptureImpl(MakeClientWindowId(transport_window_id)));
 }
 
-void WindowTree::StartPointerWatcher(bool want_moves) {
-  if (!pointer_watcher_)
-    pointer_watcher_ = std::make_unique<PointerWatcher>(this);
-  pointer_watcher_->set_types_to_watch(
-      want_moves ? PointerWatcher::TypesToWatch::kUpDownMoveWheel
-                 : PointerWatcher::TypesToWatch::kUpDown);
-}
-
-void WindowTree::StopPointerWatcher() {
-  pointer_watcher_.reset();
+void WindowTree::ObserveEventTypes(
+    const std::vector<ui::mojom::EventType>& types) {
+  if (types.empty()) {
+    event_observer_helper_.reset();
+  } else {
+    if (!event_observer_helper_)
+      event_observer_helper_ = std::make_unique<EventObserverHelper>(this);
+    std::set<ui::EventType> event_types;
+    for (auto type : types)
+      event_types.insert(mojo::ConvertTo<ui::EventType>(type));
+    event_observer_helper_->set_types(event_types);
+  }
 }
 
 void WindowTree::SetWindowBounds(
diff --git a/services/ws/window_tree.h b/services/ws/window_tree.h
index a38ea1f..9a0308d 100644
--- a/services/ws/window_tree.h
+++ b/services/ws/window_tree.h
@@ -35,8 +35,8 @@
 class ClientChangeTracker;
 class ClientRoot;
 class Embedding;
+class EventObserverHelper;
 class FocusHandler;
-class PointerWatcher;
 class ServerWindow;
 class TopmostWindowObserver;
 class WindowManagerInterface;
@@ -82,10 +82,9 @@
   // Notifies the client than an event has been received.
   void SendEventToClient(aura::Window* window, const ui::Event& event);
 
-  // Notifies the client that an event matching a pointer watcher has been
-  // received.
-  void SendPointerWatcherEventToClient(int64_t display_id,
-                                       std::unique_ptr<ui::Event> event);
+  // Notifies the client that an event matching an observer has been received.
+  void SendObservedEventToClient(int64_t display_id,
+                                 std::unique_ptr<ui::Event> event);
 
   // Returns the aura::Window associated with the specified transport id; null
   // if |transport_window_id| is not a valid id for a window.
@@ -374,8 +373,8 @@
   void DeleteWindow(uint32_t change_id, Id transport_window_id) override;
   void SetCapture(uint32_t change_id, Id transport_window_id) override;
   void ReleaseCapture(uint32_t change_id, Id transport_window_id) override;
-  void StartPointerWatcher(bool want_moves) override;
-  void StopPointerWatcher() override;
+  void ObserveEventTypes(
+      const std::vector<ui::mojom::EventType>& types) override;
   void SetWindowBounds(
       uint32_t change_id,
       Id window_id,
@@ -515,9 +514,9 @@
   // Used to track the active change from the client.
   std::unique_ptr<ClientChangeTracker> property_change_tracker_;
 
-  // If non-null the client has requested pointer events the client would not
+  // If non-null, the client requested to observe events the client would not
   // normally get.
-  std::unique_ptr<PointerWatcher> pointer_watcher_;
+  std::unique_ptr<EventObserverHelper> event_observer_helper_;
 
   FocusHandler focus_handler_{this};
 
diff --git a/services/ws/window_tree_client_unittest.cc b/services/ws/window_tree_client_unittest.cc
index 6bbe7ae1..ae4f8de5 100644
--- a/services/ws/window_tree_client_unittest.cc
+++ b/services/ws/window_tree_client_unittest.cc
@@ -372,7 +372,7 @@
                           Id window_id,
                           int64_t display_id,
                           std::unique_ptr<ui::Event> event,
-                          bool matches_pointer_watcher) override {
+                          bool matches_event_observer) override {
     // Ack input events to clear the state on the server. These can be received
     // during test startup. X11Window::DispatchEvent sends a synthetic move
     // event to notify of entry.
@@ -380,9 +380,7 @@
     // Don't log input events as none of the tests care about them and they
     // may come in at random points.
   }
-  void OnPointerEventObserved(std::unique_ptr<ui::Event>,
-                              Id window_id,
-                              int64_t display_id) override {}
+  void OnObservedInputEvent(std::unique_ptr<ui::Event> event) override {}
   void OnWindowSharedPropertyChanged(
       Id window,
       const std::string& name,
diff --git a/services/ws/window_tree_unittest.cc b/services/ws/window_tree_unittest.cc
index 8ba95ab..8c0815a 100644
--- a/services/ws/window_tree_unittest.cc
+++ b/services/ws/window_tree_unittest.cc
@@ -30,6 +30,7 @@
 #include "ui/aura/test/test_window_delegate.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_tracker.h"
+#include "ui/events/mojo/event_constants.mojom.h"
 #include "ui/events/test/event_generator.h"
 #include "ui/wm/core/capture_controller.h"
 #include "ui/wm/core/default_screen_position_client.h"
@@ -886,7 +887,7 @@
                                      window_delegate.PopEvent().get()));
 }
 
-TEST(WindowTreeTest, PointerWatcher) {
+TEST(WindowTreeTest, EventObserver) {
   WindowServiceTestSetup setup;
   TestWindowTreeClient* window_tree_client = setup.window_tree_client();
   aura::Window* top_level =
@@ -896,44 +897,43 @@
       top_level, mojom::EventTargetingPolicy::NONE);
   EXPECT_EQ(mojom::EventTargetingPolicy::NONE,
             top_level->event_targeting_policy());
-  // Start the pointer watcher only for pointer down/up.
-  setup.window_tree_test_helper()->window_tree()->StartPointerWatcher(false);
+  // Start observing mouse press and release.
+  setup.window_tree_test_helper()->window_tree()->ObserveEventTypes(
+      {ui::mojom::EventType::MOUSE_PRESSED_EVENT,
+       ui::mojom::EventType::MOUSE_RELEASED_EVENT});
 
   top_level->Show();
   top_level->SetBounds(gfx::Rect(10, 10, 100, 100));
 
   ui::test::EventGenerator event_generator(setup.root());
   event_generator.MoveMouseTo(50, 50);
-  ASSERT_TRUE(window_tree_client->observed_pointer_events().empty());
+  ASSERT_TRUE(window_tree_client->observed_events().empty());
 
   event_generator.MoveMouseTo(5, 6);
-  ASSERT_TRUE(window_tree_client->observed_pointer_events().empty());
+  ASSERT_TRUE(window_tree_client->observed_events().empty());
 
   event_generator.PressLeftButton();
-  EXPECT_EQ("POINTER_DOWN 5,6",
+  EXPECT_EQ("MOUSE_PRESSED 5,6",
             LocatedEventToEventTypeAndLocation(
-                window_tree_client->PopObservedPointerEvent().event.get()));
+                window_tree_client->PopObservedEvent().get()));
 
   event_generator.ReleaseLeftButton();
-  EXPECT_EQ("POINTER_UP 5,6",
+  EXPECT_EQ("MOUSE_RELEASED 5,6",
             LocatedEventToEventTypeAndLocation(
-                window_tree_client->PopObservedPointerEvent().event.get()));
+                window_tree_client->PopObservedEvent().get()));
 
-  // Enable observing move events.
-  setup.window_tree_test_helper()->window_tree()->StartPointerWatcher(true);
+  // Start also observing mouse move events.
+  setup.window_tree_test_helper()->window_tree()->ObserveEventTypes(
+      {ui::mojom::EventType::MOUSE_PRESSED_EVENT,
+       ui::mojom::EventType::MOUSE_RELEASED_EVENT,
+       ui::mojom::EventType::MOUSE_MOVED_EVENT});
   event_generator.MoveMouseTo(8, 9);
-  EXPECT_EQ("POINTER_MOVED 8,9",
+  EXPECT_EQ("MOUSE_MOVED 8,9",
             LocatedEventToEventTypeAndLocation(
-                window_tree_client->PopObservedPointerEvent().event.get()));
-
-  const int kTouchId = 11;
-  event_generator.MoveTouchId(gfx::Point(2, 3), kTouchId);
-  EXPECT_EQ("POINTER_MOVED 2,3",
-            LocatedEventToEventTypeAndLocation(
-                window_tree_client->PopObservedPointerEvent().event.get()));
+                window_tree_client->PopObservedEvent().get()));
 }
 
-TEST(WindowTreeTest, MatchesPointerWatcherSet) {
+TEST(WindowTreeTest, MatchesEventObserverSet) {
   WindowServiceTestSetup setup;
   TestWindowTreeClient* window_tree_client = setup.window_tree_client();
   aura::Window* top_level =
@@ -941,26 +941,25 @@
   ASSERT_TRUE(top_level);
   top_level->Show();
   top_level->SetBounds(gfx::Rect(10, 10, 100, 100));
-  // Start the pointer watcher only for pointer down/up.
-  setup.window_tree_test_helper()->window_tree()->StartPointerWatcher(false);
+  // Start observing touch press and release.
+  setup.window_tree_test_helper()->window_tree()->ObserveEventTypes(
+      {ui::mojom::EventType::TOUCH_PRESSED,
+       ui::mojom::EventType::TOUCH_RELEASED});
 
   ui::test::EventGenerator event_generator(setup.root());
-  event_generator.MoveMouseTo(50, 50);
-  EXPECT_TRUE(window_tree_client->observed_pointer_events().empty());
-  window_tree_client->ClearInputEvents();
+  event_generator.set_current_location(gfx::Point(50, 50));
+  event_generator.PressTouch();
 
-  event_generator.PressLeftButton();
-  // The client should get the event, and |matches_pointer_watcher| should be
-  // true (because it matched the pointer watcher).
+  // The client should get the input event, and |matches_event_observer| should
+  // be true (because it also matched the event observer).
   TestWindowTreeClient::InputEvent press_input =
       window_tree_client->PopInputEvent();
   ASSERT_TRUE(press_input.event);
-  EXPECT_EQ("MOUSE_PRESSED 40,40",
+  EXPECT_EQ("ET_TOUCH_PRESSED 40,40",
             LocatedEventToEventTypeAndLocation(press_input.event.get()));
-  EXPECT_TRUE(press_input.matches_pointer_watcher);
-  // Because the event matches a pointer event there should be no observed
-  // pointer events.
-  EXPECT_TRUE(window_tree_client->observed_pointer_events().empty());
+  EXPECT_TRUE(press_input.matches_event_observer);
+  // The event targeted the client, so there are no separately observed events.
+  EXPECT_TRUE(window_tree_client->observed_events().empty());
 }
 
 TEST(WindowTreeTest, Capture) {
@@ -2128,8 +2127,9 @@
 
   // Add the window to a parent, which should trigger registering the hierarchy.
   viz::FakeHostFrameSinkClient test_host_frame_sink_client;
-  host_frame_sink_manager->RegisterFrameSinkId(test_frame_sink_id,
-                                               &test_host_frame_sink_client);
+  host_frame_sink_manager->RegisterFrameSinkId(
+      test_frame_sink_id, &test_host_frame_sink_client,
+      viz::ReportFirstSurfaceActivation::kYes);
   EXPECT_EQ(test_frame_sink_id,
             ServerWindow::GetMayBeNull(child_window)->attached_frame_sink_id());
   top_level->AddChild(child_window);
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 595a2418..a1398e9a 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -158,10 +158,6 @@
 // Max. verb count for paths rendered by the edge-AA tessellating path renderer.
 #define GR_AA_TESSELLATOR_MAX_VERB_COUNT 100
 
-#ifndef SK_SUPPORT_LEGACY_THREADED_DAA_BUGS
-#define SK_SUPPORT_LEGACY_THREADED_DAA_BUGS
-#endif
-
 #ifndef SK_SUPPORT_LEGACY_AAA_CHOICE
 #define SK_SUPPORT_LEGACY_AAA_CHOICE
 #endif
diff --git a/sql/recovery.cc b/sql/recovery.cc
index 2304a5d6..a866af2d 100644
--- a/sql/recovery.cc
+++ b/sql/recovery.cc
@@ -719,7 +719,7 @@
 
   // Copy triggers and views directly to sqlite_master.  Any tables they refer
   // to should already exist.
-  static char kCreateMetaItemsSql[] =
+  static const char kCreateMetaItemsSql[] =
       "INSERT INTO main.sqlite_master "
       "SELECT type, name, tbl_name, rootpage, sql "
       "FROM corrupt.sqlite_master WHERE type='view' OR type='trigger'";
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json
index c3dd504..578a342 100644
--- a/testing/buildbot/chromium.android.json
+++ b/testing/buildbot/chromium.android.json
@@ -16667,8 +16667,7 @@
               "device_type": "marlin",
               "os": "Android"
             }
-          ],
-          "hard_timeout": 1800
+          ]
         },
         "test": "chrome_public_test_vr_apk"
       },
@@ -16706,8 +16705,7 @@
               "device_type": "marlin",
               "os": "Android"
             }
-          ],
-          "hard_timeout": 1800
+          ]
         },
         "test": "chrome_public_test_vr_apk"
       },
@@ -16747,8 +16745,7 @@
               "device_type": "marlin",
               "os": "Android"
             }
-          ],
-          "hard_timeout": 1800
+          ]
         },
         "test": "chrome_public_test_vr_apk"
       }
diff --git a/testing/buildbot/filters/mac_window_server_killers.browser_tests.filter b/testing/buildbot/filters/mac_window_server_killers.browser_tests.filter
index d6a78b5..eb8fd653 100644
--- a/testing/buildbot/filters/mac_window_server_killers.browser_tests.filter
+++ b/testing/buildbot/filters/mac_window_server_killers.browser_tests.filter
@@ -234,3 +234,12 @@
 -WebrtcLoggingPrivateApiTest.*
 -WindowAppleScriptTest.*
 -WindowOpenApiTest.*
+
+# Potential 10.13 killers.
+-DisableExtensionsExceptBrowserTest.*
+-ExtensionActionRunnerBrowserTest.*
+-ExtensionFetchTest.*
+-ExtensionTabUtilBrowserTest.*
+-NativeBindingsApiTest.*
+-PasswordManagerBrowserTest.*
+-UpdateServiceTest.*
diff --git a/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter b/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter
index 0eac070..41890b4 100644
--- a/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter
@@ -120,11 +120,7 @@
 -org.chromium.android_webview.test.ClientOnReceivedErrorTest.testOnReceivedErrorOnInvalidUrl
 
 # https://crbug.com/891722
--org.chromium.android_webview.test.ClientOnReceivedHttpErrorTest.testAfterRedirect
--org.chromium.android_webview.test.ClientOnReceivedHttpErrorTest.testForMainResource
--org.chromium.android_webview.test.ClientOnReceivedHttpErrorTest.testForSubresource
 -org.chromium.android_webview.test.ClientOnReceivedHttpErrorTest.testForUserGesture
--org.chromium.android_webview.test.ClientOnReceivedHttpErrorTest.testNotCalledIfNoHttpError
 
 # https://crbug.com/893575
 -org.chromium.android_webview.test.CookieManagerStartupTest.testShouldInterceptRequestDeadlock
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl
index c1cf93be..22e9a9c 100644
--- a/testing/buildbot/waterfalls.pyl
+++ b/testing/buildbot/waterfalls.pyl
@@ -320,7 +320,6 @@
               'os': 'Android',
             },
           ],
-          'hard_timeout': 1800,
         },
         'skip_output_links': True,
         'os_type': 'android',
diff --git a/testing/libfuzzer/README.md b/testing/libfuzzer/README.md
index 3e4211a..c1f494f 100644
--- a/testing/libfuzzer/README.md
+++ b/testing/libfuzzer/README.md
@@ -15,7 +15,7 @@
 
 *** note
 **Requirements:** libFuzzer in Chromium is supported with Linux, Mac, and
-  Windows only.
+Windows only.
 ***
 
 ## Integration Status
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 3c81522a..0dd9421 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -2434,6 +2434,21 @@
             ]
         }
     ],
+    "MacV2Sandbox": [
+        {
+            "platforms": [
+                "mac"
+            ],
+            "experiments": [
+                {
+                    "name": "Enabled",
+                    "enable_features": [
+                        "MacV2Sandbox"
+                    ]
+                }
+            ]
+        }
+    ],
     "MediaFoundationH264Encoding": [
         {
             "platforms": [
@@ -4510,7 +4525,6 @@
                         "mainThreadTaskLoadLowThreshold": "25"
                     },
                     "enable_features": [
-                        "PageAlmostIdle",
                         "PageLifecycle",
                         "ProactiveTabFreezeAndDiscard",
                         "SiteCharacteristicsDatabase",
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 92389fa9..86ae397a 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -25,7 +25,6 @@
 crbug.com/636993 external/wpt/css/css-text-decor/text-decoration-color.html [ Failure ]
 
 # text-overflow:ellipsis and paint fragment
-crbug.com/873957 accessibility/ellipsis-text.html [ Failure Pass ]
 crbug.com/873957 http/tests/devtools/network/network-cookies-pane.js [ Failure ]
 
 # rightsizing-grid.html is truly flaky, show flakiness on reload
@@ -271,7 +270,6 @@
 crbug.com/591099 fast/borders/bidi-002.html [ Failure ]
 crbug.com/859497 fast/borders/bidi-009a.html [ Failure ]
 crbug.com/591099 fast/borders/inline-mask-overlay-image-outset-vertical-rl.html [ Failure ]
-crbug.com/591099 fast/box-sizing/replaced.html [ Failure ]
 crbug.com/591099 fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html [ Failure ]
 crbug.com/591099 fast/css-intrinsic-dimensions/height-positioned.html [ Failure ]
 crbug.com/807708 fast/css-intrinsic-dimensions/width-avoid-floats.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/NeverFixTests b/third_party/WebKit/LayoutTests/NeverFixTests
index 70549451..2478647 100644
--- a/third_party/WebKit/LayoutTests/NeverFixTests
+++ b/third_party/WebKit/LayoutTests/NeverFixTests
@@ -1919,6 +1919,18 @@
 crbug.com/846170 http/tests/lazyload/lazy.html [ WontFix ]
 crbug.com/846170 http/tests/lazyload/attribute.html [ WontFix ]
 crbug.com/846170 http/tests/lazyload/fixed-dimension.html [ WontFix ]
+crbug.com/869492 external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.html [ WontFix ]
+crbug.com/869492 external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html [ WontFix ]
+crbug.com/869492 external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/unified-autoplay/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.html [ WontFix ]
+crbug.com/869492 virtual/unified-autoplay/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/unified-autoplay/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/threaded/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.html [ WontFix ]
+crbug.com/869492 virtual/threaded/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/threaded/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/video-surface-layer/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.html [ WontFix ]
+crbug.com/869492 virtual/video-surface-layer/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html [ WontFix ]
+crbug.com/869492 virtual/video-surface-layer/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html [ WontFix ]
 
 # Tests that are not supported if outofblink-cors feature is enabled.
 # These functionarities should be verified on browser_tests for outofblink-cors.
diff --git a/third_party/WebKit/LayoutTests/VirtualTestSuites b/third_party/WebKit/LayoutTests/VirtualTestSuites
index 9cd79d4..87836a7 100644
--- a/third_party/WebKit/LayoutTests/VirtualTestSuites
+++ b/third_party/WebKit/LayoutTests/VirtualTestSuites
@@ -768,7 +768,7 @@
   {
     "prefix" : "lazyload-policy",
     "base": "external/wpt/feature-policy/experimental-features/lazyload",
-    "args": ["--enable-blink-features=LazyFrameLoading"]
+    "args": ["--enable-blink-features=LazyFrameLoading,LazyImageLoading"]
   },
   {
     "prefix": "display-lock",
diff --git a/third_party/WebKit/LayoutTests/accessibility/accessibility-hit-test-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/accessibility-hit-test-crash-expected.txt
index bf7a395..d3419581 100644
--- a/third_party/WebKit/LayoutTests/accessibility/accessibility-hit-test-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/accessibility-hit-test-crash-expected.txt
@@ -1 +1,3 @@
 PASS: If no crash
+
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/accessibility-node-memory-management-expected.txt b/third_party/WebKit/LayoutTests/accessibility/accessibility-node-memory-management-expected.txt
index 78f5afc..116ba54 100644
--- a/third_party/WebKit/LayoutTests/accessibility/accessibility-node-memory-management-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/accessibility-node-memory-management-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS expectedButtonRole != expectedDetachedRole is true
 PASS canvasButtonRole is expectedButtonRole
 PASS detachedCanvasButtonRole is expectedDetachedRole
diff --git a/third_party/WebKit/LayoutTests/accessibility/accessibility-node-reparent-expected.txt b/third_party/WebKit/LayoutTests/accessibility/accessibility-node-reparent-expected.txt
index e1cdc1a..3583f6c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/accessibility-node-reparent-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/accessibility-node-reparent-expected.txt
@@ -1,7 +1,9 @@
+
 This test makes sure that AccessibilityNodeObjects are properly detached when the node they point to is reparented to a location that allows them to have a renderer.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS expectedButtonRole != expectedDetachedRole is true
 PASS canvasButtonRole is expectedButtonRole
 PASS detachedCanvasButtonRole is expectedDetachedRole
diff --git a/third_party/WebKit/LayoutTests/accessibility/accessibility-object-detached-expected.txt b/third_party/WebKit/LayoutTests/accessibility/accessibility-object-detached-expected.txt
index b2f60e3..183af92 100644
--- a/third_party/WebKit/LayoutTests/accessibility/accessibility-object-detached-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/accessibility-object-detached-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS expectedButtonRole != expectedDetachedRole is true
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/add-to-menu-list-crashes-expected.txt b/third_party/WebKit/LayoutTests/accessibility/add-to-menu-list-crashes-expected.txt
index cdcc8d2a..c962ea3f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/add-to-menu-list-crashes-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/add-to-menu-list-crashes-expected.txt
@@ -7,4 +7,3 @@
 
 TEST COMPLETE
 
-1
diff --git a/third_party/WebKit/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt b/third_party/WebKit/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt
index 1c825a75..09f2314 100644
--- a/third_party/WebKit/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt
@@ -2,11 +2,11 @@
 y
 z
 End of test
-
 Make sure that a debug assert is not triggered when constructing the accessibility tree for this page.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXStaticText "x"
         AXRole: AXInlineTextBox "x"
@@ -17,7 +17,6 @@
         AXRole: AXInlineTextBox "z"
     AXRole: AXGenericContainer
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/adopt-node-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/adopt-node-causes-crash-expected.txt
index 5b33fe3d..7dc42eb6 100644
--- a/third_party/WebKit/LayoutTests/accessibility/adopt-node-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/adopt-node-causes-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/anchor-linked-anonymous-block-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/anchor-linked-anonymous-block-crash-expected.txt
index 0383162..1042c767 100644
--- a/third_party/WebKit/LayoutTests/accessibility/anchor-linked-anonymous-block-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/anchor-linked-anonymous-block-crash-expected.txt
@@ -1 +1,2 @@
 Test passes if it does not crash.
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
index 0e9e4b0..72af1b7 100644
--- a/third_party/WebKit/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt
@@ -2,14 +2,13 @@
 y
 z
 End of test.
-
 This tests that having an anonymous render block in a continuation doesn't cause a crash when walking the accessibility tree.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
 
-
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
index d420eac6..04a4c7a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
@@ -2,11 +2,11 @@
 X
 X
    
-
 This tests that ARIA checkboxes correctly handle the aria-checked attribute.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS checkbox.checked is "false"
 PASS checkbox.checked is "true"
 PASS checkbox.checked is "false"
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
index 9c50c4e..ce06d2a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
@@ -1,9 +1,9 @@
     
-
 Check whether ARIA mixed state is reported properly
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Role: AXRole: AXCheckBox
 Mixed: true
 Role: AXRole: AXMenuItemCheckBox
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-sends-notification-expected.txt
index 023e33cc..f5e05ea 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-sends-notification-expected.txt
@@ -1,9 +1,9 @@
 Test Checkbox
-
 This tests that checking of an aria checkbox sends a notification.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got notification: CheckedStateChanged
 Got notification: CheckedStateChanged
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-controls-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-controls-expected.txt
index 2d55e3a..67e696f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-controls-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-controls-expected.txt
@@ -1,10 +1,10 @@
 Panel 1
 Panel 2
-
 This tests that aria-controls identifies the correct element
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tab_1.ariaControlsElementAtIndex(0).isEqual(panel_1) is true
 PASS tab_1.ariaControlsElementAtIndex(1).isEqual(panel_2) is true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-controls-with-tabs-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-controls-with-tabs-expected.txt
index c2f3dcda..925103a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-controls-with-tabs-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-controls-with-tabs-expected.txt
@@ -3,11 +3,11 @@
 Test
 Select Crust
 Select Crust
-
 This tests that the aria tab item becomes selected if either aria-selected is used, or if aria-controls points to an item that contains KB focus.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tab2.isSelected is true
 PASS tab1.isSelected is false
 PASS tab2.isSelected is false
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-describedby-on-input-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-describedby-on-input-expected.txt
index 50c480a3..416df5c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-describedby-on-input-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-describedby-on-input-expected.txt
@@ -1,4 +1,4 @@
-This computer will self-destruct in  minutes.
+This computer will self-destruct in   minutes.
 Allows you to specify the number of minutes after which the computer will self-destruct.
 
 The accessibility description is "Allows you to specify the number of minutes after which the computer will self-destruct."
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-disabled-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-disabled-expected.txt
index 2b17bd3..015c236 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-disabled-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-disabled-expected.txt
@@ -1,15 +1,15 @@
  
-link submit
+link  submit
 treeitem
 option
 tab
 gridcell
 checkbox
-
 This tests that the aria-disabled attribute works. The text field should not be enabled.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS textField.restriction is "disabled"
 PASS textField.restriction is "none"
 PASS group.restriction is "disabled"
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-fallback-roles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-fallback-roles-expected.txt
index 3aa7347a..1c1166a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-fallback-roles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-fallback-roles-expected.txt
@@ -1,9 +1,9 @@
 test
-
 This tests that aria fallback roles work correctly.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Role should be: AXRole: AXCheckBox
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-flowto-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-flowto-expected.txt
index 59ff98d..ec8b98e 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-flowto-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-flowto-expected.txt
@@ -1,10 +1,10 @@
 Content 2
 Content 3
-
 This tests that aria-flowto identifies the correct element
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS item1.ariaFlowToElementAtIndex(0).isEqual(item2) is true
 PASS item1.ariaFlowToElementAtIndex(1).isEqual(item3) is true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-expected.txt
index 2ba5f96..ab5a792a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-expected.txt
@@ -1,10 +1,10 @@
 h1 test
 h2
-
 This tests that the aria-hidden attribute works correctly with accessibility. The H1 element (and its children) should not appear in the AX hierarchy. The H2 element should be the first child
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS h2.name is 'h2'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-hides-all-elements-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-hides-all-elements-expected.txt
index 5f8aa9c9..b4549a2 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-hides-all-elements-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-hides-all-elements-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS content.childrenCount is 0
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-update-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-update-expected.txt
index de093bf..93ac375 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-update-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-update-expected.txt
@@ -1,11 +1,11 @@
 Button 1
 Button 2
 Button 3
-
 This test makes sure that when aria-hidden changes, the AX hierarchy is updated.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS parent.childAtIndex(0).isEqual(button1) is true
 PASS parent.childAtIndex(1).isEqual(button2) is true
 PASS parent.childAtIndex(2).isEqual(button3) is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-updates-alldescendants-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-updates-alldescendants-expected.txt
index 65356009..2bf47f8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-updates-alldescendants-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-updates-alldescendants-expected.txt
@@ -3,11 +3,11 @@
 Step 1: Do something
 Step 2: Do another thing
 Step 3: Do one last thing
-
 This tests that if aria-hidden changes on an element, all it's existing children will update their children caches
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS main.childrenCount is 1
 PASS main.childrenCount is 2
 PASS main.childAtIndex(1).childrenCount is 1
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-with-elements-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-with-elements-expected.txt
index f8c28a8..c6ab171 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-hidden-with-elements-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-hidden-with-elements-expected.txt
@@ -3,14 +3,13 @@
 cell
 test
 test
-option
-option
-heading
 
+heading
 This tests that aria-hidden works as expected on elements that are subclasses of AccessibilityRenderObject
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS child.childrenCount is 0
 PASS child.role is 'AXRole: AXHeading'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-label-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-label-expected.txt
index d14ec1de..b40bdf41 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-label-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-label-expected.txt
@@ -1,9 +1,9 @@
  test
-
 This tests that the aria-label attribute works. The input and the A tag should return the appropriate description.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS succeeded is true
 PASS succeeded is true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt
index 0cebd098..d165cd40 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt
@@ -1,3 +1,3 @@
-This computer will self-destruct in  minutes.
+This computer will self-destruct in   minutes.
 
 The accessibility description is "Note: This computer will self-destruct in 10 minutes."
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-label-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-label-expected.txt
index 5a9ea38..dd119a1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-label-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-label-expected.txt
@@ -5,3 +5,4 @@
 usingLabel.name: [Gamma]
 usingLabelledby.name: [Epsilon]
 usingLabeledby.name: [Theta]
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt
index e8c34bf..7695254 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt
@@ -4,3 +4,4 @@
 usingLabelledby.name: [Using aria-labelledby]
 usingLabeledby.name: [Using aria-labeledby]
 usingLabeledbyAndLabelledby.name: [Using aria-labelledby]
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
index 57b0073..446dd2f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
@@ -3,11 +3,11 @@
 B
 C
 
-
 This tests that if aria-labelledby is used, then label elements are not used
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axTarget.name is 'A B C'
 PASS axTarget.nameElementCount() is 3
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-list-and-listitem-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-list-and-listitem-expected.txt
index 1c39c22..a758ae3 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-list-and-listitem-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-list-and-listitem-expected.txt
@@ -1,7 +1,10 @@
+
+
 This tests that the ARIA roles of list and listitem map correctly to Mac accessibility roles.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 obj.childAtIndex(0).role = AXRole: AXList
 obj.childAtIndex(0).childAtIndex(0).role = AXRole: AXListItem
 obj.childAtIndex(0).childAtIndex(1).role = AXRole: AXListItem
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-none-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-none-role-expected.txt
index 68842a4..13be9a8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-none-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-none-role-expected.txt
@@ -1,9 +1,9 @@
 Link and text
-
 This tests that the aria 'none' role works by successfully removing the element from the AX tree.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS firstChild.role is 'AXRole: AXLink'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-option-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-option-role-expected.txt
index a7d0396d..3067476 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-option-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-option-role-expected.txt
@@ -1,10 +1,10 @@
 option 1
 option 2
-
 This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 firstChild.role is AXRole: AXListBoxOption
 PASS firstChild.name is 'option 1'
 secondChild.role is AXRole: AXListBoxOption
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-orientation-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-orientation-expected.txt
index 8ea7260..c297ec8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-orientation-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-orientation-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axObject.orientation is element.getAttribute('data-expected-orientation')
 PASS axObject.orientation is element.getAttribute('data-expected-orientation')
 PASS axObject.orientation is element.getAttribute('data-expected-orientation')
@@ -26,7 +27,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 50
 50
 50
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-presentational-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-presentational-role-expected.txt
index 3bd56fd..e98ba3a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-presentational-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-presentational-role-expected.txt
@@ -1,9 +1,9 @@
 Link and text
-
 This tests that the aria 'presentation' role works by successfully removing the element from the AX tree.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS firstChild.role is 'AXRole: AXLink'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-readonly-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-readonly-expected.txt
index 368c28e..f4db404 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-readonly-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-readonly-expected.txt
@@ -1,9 +1,9 @@
      
-
 This tests that the AXValue property is correctly reported for native and non-native text boxes.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS ariaTextBoxIsWritable is true
 PASS ariaReadOnlyAriaTextBoxIsWritable is false
 PASS ariaReadOnlyTextFieldIsWritable is false
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-roles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-roles-expected.txt
index af1f55b9..a701743 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-roles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-roles-expected.txt
@@ -6,11 +6,7 @@
 
 Broccoli
 Asparagus
-
 This test PASSES in DumpRenderTree. The role is AXRole: AXCheckBox
-
-
-
 The following should be a button:
 
 X
@@ -18,9 +14,6 @@
 Actual button:
 
 Hello This test PASSES in DumpRenderTree. The role is AXRole: AXButton
-
-
-
 The following should be a heading:
 
 X
@@ -29,9 +22,6 @@
 
 Hello
 This test PASSES in DumpRenderTree. The role is AXRole: AXHeading
-
-
-
 The following should be a link:
 
 X
@@ -39,9 +29,6 @@
 Actual link:
 
 Hello This test PASSES in DumpRenderTree. The role is AXRole: AXLink
-
-
-
 The following should be a radio button:
 
 X
@@ -50,11 +37,7 @@
 
 Broccoli
 Asparagus
-
 This test PASSES in DumpRenderTree. The role is AXRole: AXRadioButton
-
-
-
 The following should be a text box:
 
 X
@@ -62,19 +45,13 @@
 Actual text box:
 
  This test PASSES in DumpRenderTree. The role is AXRole: AXTextField
-
-
-
 The following should be an image:
 
 X
 
 Actual image:
 
-This test PASSES in DumpRenderTree. The role is AXRole: AXImage
-
-
-
+ This test PASSES in DumpRenderTree. The role is AXRole: AXImage
 The following should be a list:
 
 X
@@ -84,14 +61,10 @@
 Broccoli
 Beets
 This test PASSES in DumpRenderTree. The role is AXRole: AXList
-
-
-
 The following should be a dialog:
 
 X
 
 Actual dialog:
 
-Hello.
-This test PASSES in DumpRenderTree. The role is AXRole: AXDialog
+Hello.This test PASSES in DumpRenderTree. The role is AXRole: AXDialog
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-scrollbar-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-scrollbar-role-expected.txt
index c93f774..654e94ba 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-scrollbar-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-scrollbar-role-expected.txt
@@ -1,10 +1,10 @@
 scrollbar
 scrollbar
-
 This tests that the ARIA scrollbar role works correctly
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS scroller.role is 'AXRole: AXScrollBar'
 PASS scroller.intValue is 55
 PASS scroller.orientation is 'AXOrientation: AXVerticalOrientation'
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-setsize-posinset-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-setsize-posinset-expected.txt
index 14e0457..22f5332 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-setsize-posinset-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-setsize-posinset-expected.txt
@@ -1,9 +1,9 @@
 Radio 1
-
 This tests that aria-posinset and aria-setsize are exposed to accessibility correctly.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS list.childAtIndex(0).setSize is 10
 PASS list.childAtIndex(1).setSize is 10
 PASS list.childAtIndex(0).posInSet is 3
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-tab-roles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-tab-roles-expected.txt
index 242d0f9..3eee612 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-tab-roles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-tab-roles-expected.txt
@@ -1,11 +1,11 @@
 Crust
 Veges
 Select Crust
-
 This tests that the aria roles for tab, tabpanel and tablist work as expected correctly.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 tabList.role = AXRole: AXTabList
 tab1.role = AXRole: AXTab
 PASS tab1.name is 'Crust'
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-tables-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-tables-expected.txt
index 08d817b..075a596 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-tables-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-tables-expected.txt
@@ -7,7 +7,6 @@
 row head
 row head
 col head
-
 End of test
 
 AXRole: AXWebArea
@@ -44,7 +43,6 @@
                     AXRole: AXInlineTextBox "col head"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-text-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-text-role-expected.txt
index 538c962d..e2d7f9a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-text-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-text-role-expected.txt
@@ -1,9 +1,9 @@
 hello world this is a test more test
-
 This tests that you can set an ARIA text role and that it will not have children through hit testing
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS textrole.role is 'AXRole: AXStaticText'
 PASS textrole.name is 'all at once'
 PASS textrole.elementAtPoint(x, y).isEqual(textrole) is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt
index 8d3840c..1b67586 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-toggle-button-with-title-expected.txt
@@ -1,14 +1,13 @@
 Toggle button
 Button title
-
 This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Role: AXRole: AXToggleButton
 PASS tbutton1.name is 'Toggle button'
 Role: AXRole: AXButton
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-used-on-image-maps-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-used-on-image-maps-expected.txt
index b4136cb1..ae1b33eb 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-used-on-image-maps-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-used-on-image-maps-expected.txt
@@ -1,7 +1,9 @@
+
 This tests that you can set an ARIA role on image map elements.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS group.childAtIndex(0).role is 'AXRole: AXButton'
 PASS group.childAtIndex(1).role is 'AXRole: AXButton'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/br-element-has-correct-title-expected.txt b/third_party/WebKit/LayoutTests/accessibility/br-element-has-correct-title-expected.txt
index 06f0e16..c4f13fd7 100644
--- a/third_party/WebKit/LayoutTests/accessibility/br-element-has-correct-title-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/br-element-has-correct-title-expected.txt
@@ -5,6 +5,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS brElement.name is '\n'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt b/third_party/WebKit/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt
index 1f7ce42..f5382f5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/button-title-uses-inner-img-alt-expected.txt
@@ -1,9 +1,9 @@
-Button with image of
-
+Button with image of 
 This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS document.activeElement == button is true
 PASS axButton.name.indexOf('Button with image of cake') >= 0 is true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/calling-accessibility-methods-with-pending-layout-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/calling-accessibility-methods-with-pending-layout-causes-crash-expected.txt
index 9d73323..be7ecc1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/calling-accessibility-methods-with-pending-layout-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/calling-accessibility-methods-with-pending-layout-causes-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/canvas-accessibilitynodeobject-expected.txt b/third_party/WebKit/LayoutTests/accessibility/canvas-accessibilitynodeobject-expected.txt
index 0d456f8..f545e31 100644
--- a/third_party/WebKit/LayoutTests/accessibility/canvas-accessibilitynodeobject-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/canvas-accessibilitynodeobject-expected.txt
@@ -1,12 +1,9 @@
-Link Button    
-1
-2
-ARIA button ARIA link
-
+Link  Button           ARIA button ARIA link
 This test makes sure that AccessibilityNodeObjects are created for elements in a canvas subtree.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axLayoutObjects.length is axNodeObjects.length
 PASS i == 0; axLayoutObject.role == axNodeObject.role is true
 PASS i == 1; axLayoutObject.role == axNodeObject.role is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/canvas-description-and-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/canvas-description-and-role-expected.txt
index c315e501..d8a9116 100644
--- a/third_party/WebKit/LayoutTests/accessibility/canvas-description-and-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/canvas-description-and-role-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axContainer.childrenCount is 2
 Canvas 1 description: Canvas label
 Canvas 1 role: AXRole: AXCanvasWithFallbackContent
diff --git a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt
index 826e11a..a9042733 100644
--- a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt
@@ -1,9 +1,4 @@
-Link Button Button Button      
-1
-2
-1
-2
-
+Link  Button  Button  Button                 
 Focusable
 Heading
 ARIA button
@@ -12,11 +7,11 @@
 ARIA required button
 ARIA toggle button
 ARIA link
-
 This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 link1
 PASS document.activeElement == element1 is true
 link2
@@ -33,7 +28,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 button1
 PASS document.activeElement == element1 is true
 button2
@@ -50,7 +44,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 labeled-button1
 PASS document.activeElement == element1 is true
 labeled-button2
@@ -67,7 +60,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 button-with-title1
 PASS document.activeElement == element1 is true
 button-with-title2
@@ -84,7 +76,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 text1
 PASS document.activeElement == element1 is true
 text2
@@ -101,7 +92,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 checkbox1
 PASS document.activeElement == element1 is true
 checkbox2
@@ -118,7 +108,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 number1
 PASS document.activeElement == element1 is true
 number2
@@ -135,7 +124,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 radio1
 PASS document.activeElement == element1 is true
 radio2
@@ -152,7 +140,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 slider1
 PASS document.activeElement == element1 is true
 slider2
@@ -169,7 +156,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 submit1
 PASS document.activeElement == element1 is true
 submit2
@@ -186,7 +172,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 combobox1
 PASS document.activeElement == element1 is true
 combobox2
@@ -203,7 +188,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 listbox1
 PASS document.activeElement == element1 is true
 listbox2
@@ -220,7 +204,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 textarea1
 PASS document.activeElement == element1 is true
 textarea2
@@ -237,7 +220,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 focusable1
 PASS document.activeElement == element1 is true
 focusable2
@@ -254,7 +236,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 heading1
 PASS document.activeElement == element1 is true
 heading2
@@ -271,7 +252,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-button1
 PASS document.activeElement == element1 is true
 aria-button2
@@ -288,7 +268,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-disabledbutton1
 PASS document.activeElement == element1 is true
 aria-disabledbutton2
@@ -305,7 +284,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-enabledbutton1
 PASS document.activeElement == element1 is true
 aria-enabledbutton2
@@ -322,7 +300,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-requiredbutton1
 PASS document.activeElement == element1 is true
 aria-requiredbutton2
@@ -339,7 +316,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-togglebutton1
 PASS document.activeElement == element1 is true
 aria-togglebutton2
@@ -356,7 +332,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 aria-link1
 PASS document.activeElement == element1 is true
 aria-link2
@@ -373,7 +348,6 @@
 PASS axElement2.minValue is axElement1.minValue
 PASS axElement2.maxValue is axElement1.maxValue
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-expected.txt b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-expected.txt
index ba54482..7590070 100644
--- a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-expected.txt
@@ -1,124 +1,100 @@
-Link Button    
-1
-2
+Link  Button          
 Focusable
 ARIA button
 ARIA link
-
 This test makes sure that focusable elements in canvas fallback content are accessible.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 link1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXLink"
 
-
 button1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 text1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXTextField"
 
-
 checkbox1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXCheckBox"
 
-
 radio1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXRadioButton"
 
-
 submit1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 combobox1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXPopUpButton"
 
-
 focusable1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXGenericContainer"
 
-
 aria-button1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 aria-link1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXLink"
 
-
 link2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXLink"
 
-
 button2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 text2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXTextField"
 
-
 checkbox2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXCheckBox"
 
-
 radio2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXRadioButton"
 
-
 submit2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 combobox2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXPopUpButton"
 
-
 focusable2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXGenericContainer"
 
-
 aria-button2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 aria-link2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXLink"
 
-
 focusable1
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 focusable2
 PASS document.activeElement == element is true
 PASS axElement.role is "AXRole: AXButton"
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-labels-expected.txt b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-labels-expected.txt
index 9d0f96e..dd28050 100644
--- a/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-labels-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/canvas-fallback-content-labels-expected.txt
@@ -2,80 +2,68 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Checking accessibility properties for ids: nothing1, nothing2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: text_label1, text_label2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: text1, text2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: check_label1, check_label2
 PASS axElement1 == null && axElement2 == null is true
 
-
 Checking accessibility properties for ids: check1, check2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: radio_label1, radio_label2
 PASS axElement1 == null && axElement2 == null is true
 
-
 Checking accessibility properties for ids: radio1, radio2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: slider_label1, slider_label2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: slider1, slider2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: list_label1, list_label2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: list1, list2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: label_for1, label_for2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 Checking accessibility properties for ids: text_for1, text_for2
 PASS axElement2.role is axElement1.role
 PASS collapseWhitespace(axElement2.name) is collapseWhitespace(axElement1.name)
 PASS axElement2.nameElementCount() is axElement1.nameElementCount()
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/chromium-only-roles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/chromium-only-roles-expected.txt
index b3a75fa..364a405 100644
--- a/third_party/WebKit/LayoutTests/accessibility/chromium-only-roles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/chromium-only-roles-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axContainer.childAtIndex(0).role is "AXRole: AXSplitter"
 PASS axContainer.childAtIndex(1).role is "AXRole: AXParagraph"
 PASS axContainer.childAtIndex(2).role is "AXRole: AXLabel"
diff --git a/third_party/WebKit/LayoutTests/accessibility/clickable-expected.txt b/third_party/WebKit/LayoutTests/accessibility/clickable-expected.txt
index d91a2ab8..a50510dc 100644
--- a/third_party/WebKit/LayoutTests/accessibility/clickable-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/clickable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS isAXElementClickable('link') is true
 PASS isAXElementClickable('button') is true
 PASS isAXElementClickable('labeled-button') is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/color-well-expected.txt b/third_party/WebKit/LayoutTests/accessibility/color-well-expected.txt
index bdac921..3275e3aa 100644
--- a/third_party/WebKit/LayoutTests/accessibility/color-well-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/color-well-expected.txt
@@ -3,6 +3,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axColorwell.role is "AXRole: AXColorWell"
 PASS axColorwell.colorValue is 4278190080
 PASS axColorwell.stringValue is "AXValue: rgba(0, 0, 0, 1)"
@@ -15,5 +16,4 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-  
+    
diff --git a/third_party/WebKit/LayoutTests/accessibility/computed-name-expected.txt b/third_party/WebKit/LayoutTests/accessibility/computed-name-expected.txt
index c46aa329..aefcdfb 100644
--- a/third_party/WebKit/LayoutTests/accessibility/computed-name-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/computed-name-expected.txt
@@ -1,5 +1,6 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS name is "alert name"
 PASS name is "alertdialog name"
 PASS name is "application name"
diff --git a/third_party/WebKit/LayoutTests/accessibility/computed-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/computed-role-expected.txt
index 25761d7..b9d8a1e 100644
--- a/third_party/WebKit/LayoutTests/accessibility/computed-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/computed-role-expected.txt
@@ -1,5 +1,6 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS roleElement.computedRole is "alert"
 PASS roleElement.computedRole is "alertdialog"
 PASS roleElement.computedRole is "application"
diff --git a/third_party/WebKit/LayoutTests/accessibility/container-node-delete-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/container-node-delete-causes-crash-expected.txt
index 64c6ac14a..f1866803 100644
--- a/third_party/WebKit/LayoutTests/accessibility/container-node-delete-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/container-node-delete-causes-crash-expected.txt
@@ -2,8 +2,9 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Text
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/content-changed-notification-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/content-changed-notification-causes-crash-expected.txt
index 712fb625..689b10a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/content-changed-notification-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/content-changed-notification-causes-crash-expected.txt
@@ -1,12 +1,11 @@
 >>
-
 Ensures that this snippet does not lead to a crash. Bug 86029.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS. WebKit did not crash.
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/contenteditable-hidden-div-expected.txt b/third_party/WebKit/LayoutTests/accessibility/contenteditable-hidden-div-expected.txt
index de5c5bb..b8881d60 100644
--- a/third_party/WebKit/LayoutTests/accessibility/contenteditable-hidden-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/contenteditable-hidden-div-expected.txt
@@ -1,9 +1,9 @@
 test
-
 This tests that a contenteditable element will not be ignored by accessibility.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS accessibilityController.focusedElement.isEqual(editableDiv) is false
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/contenteditable-notifications-expected.txt b/third_party/WebKit/LayoutTests/accessibility/contenteditable-notifications-expected.txt
index d993cb4..69a33496 100644
--- a/third_party/WebKit/LayoutTests/accessibility/contenteditable-notifications-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/contenteditable-notifications-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS Got notification: SelectedTextChanged
 PASS Got notification: SelectedTextChanged
 PASS Got notification: ValueChanged
diff --git a/third_party/WebKit/LayoutTests/accessibility/contenteditable-table-check-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/contenteditable-table-check-causes-crash-expected.txt
index fe71ac1..b9ee65a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/contenteditable-table-check-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/contenteditable-table-check-causes-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/corresponding-control-deleted-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/corresponding-control-deleted-crash-expected.txt
index 34f7082..c32bbfe 100644
--- a/third_party/WebKit/LayoutTests/accessibility/corresponding-control-deleted-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/corresponding-control-deleted-crash-expected.txt
@@ -3,6 +3,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/crash-determining-aria-role-when-label-present-expected.txt b/third_party/WebKit/LayoutTests/accessibility/crash-determining-aria-role-when-label-present-expected.txt
index b16184f..a7d61fea1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/crash-determining-aria-role-when-label-present-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/crash-determining-aria-role-when-label-present-expected.txt
@@ -1,7 +1,9 @@
+
 This tests a crashing scenario where an element with a role attribute is a child of a label that also has a corresponding control.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS input.childrenCount is 1
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/crash-on-accessing-properties-at-initial-state-expected.txt b/third_party/WebKit/LayoutTests/accessibility/crash-on-accessing-properties-at-initial-state-expected.txt
index bec9688d..e2f858a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/crash-on-accessing-properties-at-initial-state-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/crash-on-accessing-properties-at-initial-state-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/crash-with-noelement-selectbox-expected.txt b/third_party/WebKit/LayoutTests/accessibility/crash-with-noelement-selectbox-expected.txt
index b0fe4c7..9a6bdaaf 100644
--- a/third_party/WebKit/LayoutTests/accessibility/crash-with-noelement-selectbox-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/crash-with-noelement-selectbox-expected.txt
@@ -1,7 +1,9 @@
+
 This tests that there's no crash when accessising the stringValue of a menu list that has no elements.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/crashing-a-tag-in-map-expected.txt b/third_party/WebKit/LayoutTests/accessibility/crashing-a-tag-in-map-expected.txt
index 555c613..e2e8902 100644
--- a/third_party/WebKit/LayoutTests/accessibility/crashing-a-tag-in-map-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/crashing-a-tag-in-map-expected.txt
@@ -1,7 +1,9 @@
+
 This tests that a hit test on a image map that has areas and anchors does not crash
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/css-generated-content-expected.txt b/third_party/WebKit/LayoutTests/accessibility/css-generated-content-expected.txt
index 13aa988..16d88b7 100644
--- a/third_party/WebKit/LayoutTests/accessibility/css-generated-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/css-generated-content-expected.txt
@@ -2,12 +2,11 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-
 six seven eight nine ten
diff --git a/third_party/WebKit/LayoutTests/accessibility/css-styles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/css-styles-expected.txt
index 135c1850..838ffd9 100644
--- a/third_party/WebKit/LayoutTests/accessibility/css-styles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/css-styles-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axHeading.backgroundColor is 4278190080
 PASS axHeading.color is 16711680
 PASS axHeading.fontSize is 12
@@ -17,10 +18,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Heading.
-
 Line one.
 Line two.
 
- 
+  
diff --git a/third_party/WebKit/LayoutTests/accessibility/disabled-controls-not-focusable-expected.txt b/third_party/WebKit/LayoutTests/accessibility/disabled-controls-not-focusable-expected.txt
index 114cd9e..5b2d5f49 100644
--- a/third_party/WebKit/LayoutTests/accessibility/disabled-controls-not-focusable-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/disabled-controls-not-focusable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 button
 PASS axElement.isFocusable is true
 PASS axElement.isFocusable is false
diff --git a/third_party/WebKit/LayoutTests/accessibility/div-within-anchors-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/div-within-anchors-causes-crash-expected.txt
index 44279c2..149e66a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/div-within-anchors-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/div-within-anchors-causes-crash-expected.txt
@@ -1,9 +1,9 @@
 End of test
-
 This can cause a crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Before:
 AXRole: AXWebArea
     AXRole: AXLink
@@ -13,7 +13,6 @@
 AXRole: AXWebArea
     AXRole: AXGenericContainer
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/dl-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/dl-role-expected.txt
index 0a30a503..d5096a8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/dl-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/dl-role-expected.txt
@@ -2,12 +2,12 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS dlElement.role is 'AXRole: AXDescriptionList'
 PASS dtElement.role is 'AXRole: AXDescriptionListTerm'
 PASS ddElement.role is 'AXRole: AXDescriptionListDetail'
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 term
 definition
diff --git a/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt b/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt
index 898913e..b7206b0 100644
--- a/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt
@@ -1,4 +1,4 @@
-PASS axButton1.x is 50
+ PASS axButton1.x is 50
 PASS axButton1.y is 50
 PASS axButton1.width is 200
 PASS axButton1.height is 100
diff --git a/third_party/WebKit/LayoutTests/accessibility/duplicate-child-nodes-expected.txt b/third_party/WebKit/LayoutTests/accessibility/duplicate-child-nodes-expected.txt
index c2c4dc02..9b78f2e 100644
--- a/third_party/WebKit/LayoutTests/accessibility/duplicate-child-nodes-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/duplicate-child-nodes-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-focusable-expected.txt b/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-focusable-expected.txt
index 1383452b..62b64cb 100644
--- a/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-focusable-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-focusable-expected.txt
@@ -1,29 +1,18 @@
 Visit Chromium Click the text! Button
 Copyright 2015.
    I have a checkbox  Radio  Button
-  I have a menuItem  Menu  ItemRadio
-Birthday:  Birthday(date and time):  Birthday(datetime-local):  Birthday (month and year):  Select a week:  Select a file:  Min-Max:  Color: Select a time:  
-Pacific
-Atlantic
-Indian
-Southern
-Arctic
-Milk
-Soda
-Coffee
-Water
- 
-0 100 + =
-Blue  Red 
+   I have a menuItem   Menu   ItemRadio
+Birthday:  Birthday(date and time):  Birthday(datetime-local):  Birthday (month and year):  Select a week:  Select a file:  Min-Max:  Color: Select a time:      
+0  100 + =
+Blue   Red  
 Text Input Controls
 Text: 
 Password: 
-
-
 This test make sure that focusable elements are mapped implicitly to AX roles.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 normal_link_id
 PASS elem.role is "AXRole: AXLink"
 mousedown_link_id
diff --git a/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-normal-expected.txt b/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-normal-expected.txt
index d1e583b5..ff5333f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-normal-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/element-role-mapping-normal-expected.txt
@@ -1,7 +1,6 @@
 This is a Header for this page
 Heading
 Division
-
 Paragraph
 
 韓國한국
@@ -12,33 +11,27 @@
 x + a / b
 Most important heading here
 Google Chrome
-
 Google Chrome is a free, open-source web browser developed by Google, released in 2008.
 
 Footer in article
 
 HTML | CSS | JavaScript |
-
 Text that appears under aside
 
 Text in a    pre
 element
-
 Most important heading here
-
 Section
 
 Footer in section
 
 Written by Julie
 Visit us at:www.chromium.org
-
-
-January
-This is an open dialog window
+January This is an open dialog window
 
 Caption
 Cell1	Cell2
+
 Fig1. - Blue Box
 
 This is a footer.
@@ -49,6 +42,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXBanner
         AXRole: AXStaticText "This is a Header for this page"
@@ -193,7 +187,6 @@
                 AXRole: AXInlineTextBox "This is a footer."
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/ellipsis-text-expected.txt b/third_party/WebKit/LayoutTests/accessibility/ellipsis-text-expected.txt
index 018e5ba1..4e6de21 100644
--- a/third_party/WebKit/LayoutTests/accessibility/ellipsis-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/ellipsis-text-expected.txt
@@ -2,11 +2,11 @@
 My Writing Nook for iPad. More text, more text, more text.
 My Writing Nook for iPad. More text, more text, more text.
 text
-
 This test makes sure that the bounds of text that overflows with ellipsis is correct (shortened to the ellipsis that is).
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS clippedWidth < fullWidth is true
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt b/third_party/WebKit/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt
index 56e43b0..174cb6f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt
@@ -1,4 +1,5 @@
 FileChooser: opened; multiple=false directory=false
+
 This tests that when AXPress is used DOMActivate will be handled by the input file type.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt
index ff4e905..f2fc4e19 100644
--- a/third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/first-letter-text-transform-causes-crash-expected.txt
@@ -1,18 +1,17 @@
 Dt
-
 End of test
 
 First letter text transform causes assert and bad type cast. This can cause a crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXDescriptionListTerm
         AXRole: AXStaticText "Dt"
             AXRole: AXInlineTextBox "D"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/focusable-div-expected.txt b/third_party/WebKit/LayoutTests/accessibility/focusable-div-expected.txt
index 3a7bde9..74f98eb 100644
--- a/third_party/WebKit/LayoutTests/accessibility/focusable-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/focusable-div-expected.txt
@@ -6,11 +6,11 @@
 List item
 Initial text before list
 List item
-
 This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS document.activeElement == link is true
 PASS axLink.name is "A"
 PASS document.activeElement == div is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/hang-in-isignored-expected.txt b/third_party/WebKit/LayoutTests/accessibility/hang-in-isignored-expected.txt
index 3d33a46..a004548 100644
--- a/third_party/WebKit/LayoutTests/accessibility/hang-in-isignored-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/hang-in-isignored-expected.txt
@@ -29,11 +29,11 @@
 test	test	test	test
 test	test	test	test
 test	test	test	test
-
 This tests that we will not hang when using accessibility on this page. The idea is that the element tree is deep enough to cause a hang just by accessing elements if something is implemented incorrectly.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/heading-level-expected.txt b/third_party/WebKit/LayoutTests/accessibility/heading-level-expected.txt
index f8167ca..4bd64d5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/heading-level-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/heading-level-expected.txt
@@ -2,28 +2,28 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS: level is 1.
-PASS: level is 2.
-PASS: level is 3.
-PASS: level is 4.
-PASS: level is 5.
-PASS: level is 6.
-PASS: level is 1.
-PASS: level is 2.
-PASS: level is 3.
-PASS: level is 4.
-PASS: level is 5.
-PASS: level is 6.
-PASS: level is 1.
-PASS: level is 2.
-PASS: level is 3.
-PASS: level is 4.
-PASS: level is 5.
-PASS: level is 6.
-PASS: level is 2.
-PASS: level is 2.
-PASS: level is 2.
 
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS: level is 2.
+PASS: level is 2.
+PASS: level is 2.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-link-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-link-expected.txt
index e753d61..fcb0ade 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-link-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-link-expected.txt
@@ -1,7 +1,7 @@
 Image link in the presence of inline continuations
-
 This test checks that the right accessibility tree is generated for a link inside an image
 
+
 Delicious cake
 AXRole: AXLink
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-link-inline-cont-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-link-inline-cont-expected.txt
index e8618f3..71e67e5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-link-inline-cont-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-link-inline-cont-expected.txt
@@ -1,7 +1,8 @@
 Image link in the presence of inline continuations
-
 This test checks that a block inside a link does not unduly disturb the render tree via inline continuations. In particular, it checks that adding <div role=presentation> between a link and its contained image does not alter the accessibility tree at all, other than with respect to size.
 
-PASS: accessibility trees were identical other than size.
+
+
+ PASS: accessibility trees were identical other than size.
 
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map-title-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-map-title-causes-crash-expected.txt
index 3155900..b8255f9 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-map-title-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map-title-causes-crash-expected.txt
@@ -1,9 +1,9 @@
-1
-
+ 1
 Requesting the title of an AccessibilityImageMapLink can cause a crash when the map's area element has been removed.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
index e881d1b..8a956e0 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map-update-parent-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt
index 0383162..c6f20fc 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map-with-indirect-area-crash-expected.txt
@@ -1 +1 @@
-Test passes if it does not crash.
+Test passes if it does not crash. 
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map1-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-map1-expected.txt
index b41347d5..27aa4fd 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-map1-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map1-expected.txt
@@ -1,7 +1,9 @@
+ 
 This tests that you can reach the links within an image map.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS body.childAtIndex(0).role is 'AXRole: AXLink'
 PASS body.childAtIndex(0).name is 'Link1'
 PASS body.childAtIndex(1).role is 'AXRole: AXLink'
diff --git a/third_party/WebKit/LayoutTests/accessibility/image-map2-expected.txt b/third_party/WebKit/LayoutTests/accessibility/image-map2-expected.txt
index d36e7ab..895d84ca 100644
--- a/third_party/WebKit/LayoutTests/accessibility/image-map2-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/image-map2-expected.txt
@@ -11,4 +11,4 @@
 Link2
 AXRole: AXLink
 
-
+ 
diff --git a/third_party/WebKit/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt b/third_party/WebKit/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt
index 5e60a0e..4eccb194 100644
--- a/third_party/WebKit/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt
@@ -2,12 +2,11 @@
 
 
 
-
-
 This tests that images with alt tags that only have white space are not ignored.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS imagesGroup.childrenCount is 6
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt b/third_party/WebKit/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt
index fe03084..8b31f9df 100644
--- a/third_party/WebKit/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt
@@ -1,7 +1,9 @@
+
 This test makes sure that a img acting as an aria button still returns its alt tag as the description
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS imgUIElement.name is 'alternate'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/img-fallsback-to-title-expected.txt b/third_party/WebKit/LayoutTests/accessibility/img-fallsback-to-title-expected.txt
index 6506f2ad..9936e774 100644
--- a/third_party/WebKit/LayoutTests/accessibility/img-fallsback-to-title-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/img-fallsback-to-title-expected.txt
@@ -1,23 +1,19 @@
- 
+  
 test
 test
-
 This tests that images will fallback to using the title attribute if no other descriptive text is present.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Image1 name: test1
 Image1 description: 
-
 Image2 name: alt
 Image2 description: test2
-
 Image3 name: test3
 Image3 description: 
-
 Image4 name: test4
 Image4 description: 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-continuations-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-continuations-expected.txt
index 1315e50..0de572f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-continuations-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-continuations-expected.txt
@@ -2,9 +2,7 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Inline continuations - accessibility tree linkage
-
 This test checks that the right accessibility tree is generated in the presence of inline continuations. Each of the five numbers below should be visited only ones traversing the accessibility tree.
 
 1
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-bidi-bounds-for-range-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-bidi-bounds-for-range-expected.txt
index d014e46..c826f2a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-bidi-bounds-for-range-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-bidi-bounds-for-range-expected.txt
@@ -7,6 +7,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Testing bounds of word one in horizontalParagraph
 PASS axBounds.x is within 2 of rangeBounds.left
 PASS axBounds.y is within 2 of rangeBounds.top
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-change-style-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-change-style-expected.txt
index f89265f..b838734 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-change-style-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-change-style-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axStaticText.childrenCount is 2
 PASS axInlineBefore0.name is 'This paragraph contains '
 PASS axInlineBefore1.name is 'two lines of text.'
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-changes-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-changes-expected.txt
index 98f149d..edc4ceae 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-changes-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-changes-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axStaticText.childrenCount is 2
 PASS axInlineBefore0.name is 'This paragraph contains '
 PASS axInlineBefore1.name is 'two lines of text.'
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-input-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-input-expected.txt
index f814105..a684c010 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-input-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-input-expected.txt
@@ -1,7 +1,9 @@
+
 Demonstrates that accessible inline text boxes can be found within an input type=text.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axInlineTextBox.role is 'AXRole: AXInlineTextBox'
 PASS axInlineTextBox.name is 'Value'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-textarea-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-textarea-expected.txt
index 502256ff..94de442 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-textarea-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-textarea-expected.txt
@@ -1,7 +1,9 @@
+
 Demonstrates that when typing in a textarea, not all of the InlineTextBoxes need to be updated for every character pressed.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS firstInlineTextBoxBefore.isEqual(firstInlineTextBoxAfter) is false
 PASS lastInlineTextBoxBefore.isEqual(lastInlineTextBoxAfter) is true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundaries-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundaries-expected.txt
index d204d02b..9c0a90e 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundaries-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Accessible text: "Ace ten twenty-one thirty-five. xxxxxxxxxxxxxxxxxxx"
 Character 0: 'A' word=(0, 3): 'Ace'
 Character 1: 'c' word=(0, 3): 'Ace'
diff --git a/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundary-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundary-causes-crash-expected.txt
index 1ea67da..5c2f994 100644
--- a/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundary-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/inline-text-word-boundary-causes-crash-expected.txt
@@ -1,9 +1,9 @@
 Heading
-
 Makes sure that accessing the word boundaries of an AXStaticText object doesn't cause a crash when it has an inline text box of length zero.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Word start for index -1: 0
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-aria-required-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-aria-required-expected.txt
index bbe7e34..9565768 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-aria-required-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-aria-required-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS input1.isRequired is true
 PASS input2.isRequired is true
 PASS input3.isRequired is false
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-file-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-file-causes-crash-expected.txt
index 3703f13c..d91026c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-file-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-file-causes-crash-expected.txt
@@ -1,7 +1,9 @@
+
 This can cause a crash if AccessibilityRenderObject assumes that a file input element's renderer must be type LayoutFileUploadControl, but in corner cases (display:run-in) this may not be true.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS title is non-null.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-image-alt-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-image-alt-expected.txt
index 3928647..b3360a5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-image-alt-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-image-alt-expected.txt
@@ -1,7 +1,9 @@
+
 This test makes sure that an input image returns its alt tag as the description
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS img.name is 'Submit'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-type-password-value-and-selection-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-type-password-value-and-selection-expected.txt
index e8c7ce1..0513f308 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-type-password-value-and-selection-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-type-password-value-and-selection-expected.txt
@@ -1,7 +1,9 @@
+
 This tests that AXValue, caret position and text selection are reported correctly for password fields.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axPassword.selectionStart is 0
 PASS axPassword.selectionEnd is 0
 PASS axPassword.selectionStartLineNumber is 0
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-type-range-aria-value-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-type-range-aria-value-expected.txt
index 1975d66..5754f64 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-type-range-aria-value-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-type-range-aria-value-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axRange1.minValue is 1
 PASS axRange1.maxValue is 10
 PASS axRange1.intValue is 5
@@ -12,5 +13,4 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-  
+    
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-type-range-value-change-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-type-range-value-change-expected.txt
index fdd4553..1fdf7d4 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-type-range-value-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-type-range-value-change-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS range1.intValue is 50
 PASS range1.intValue is 51
 PASS range1.intValue is 52
@@ -20,5 +21,4 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
   
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-type-text-caret-position-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-type-text-caret-position-expected.txt
index d98cdc8..77595919 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-type-text-caret-position-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-type-text-caret-position-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS inputAccessible.selectionStart is 0
 PASS inputAccessible.selectionEnd is 0
 PASS inputAccessible.selectionStart is 1
@@ -20,4 +21,3 @@
 
 TEST COMPLETE
 
-
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-type-text-selection-expected.txt b/third_party/WebKit/LayoutTests/accessibility/input-type-text-selection-expected.txt
index 52730b9..d283312d 100644
--- a/third_party/WebKit/LayoutTests/accessibility/input-type-text-selection-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/input-type-text-selection-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS inputAccessible.selectionStart is 0
 PASS inputAccessible.selectionEnd is 6
 PASS inputAccessible.selectionStartLineNumber is 0
@@ -94,4 +95,3 @@
 
 TEST COMPLETE
 
-
diff --git a/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt
index 588c52ec..52b0b50 100644
--- a/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt
@@ -1,2 +1,3 @@
 text
 x
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt
index e78e5cc..461541d1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt
@@ -2,7 +2,8 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+ 
diff --git a/third_party/WebKit/LayoutTests/accessibility/is-ignored-change-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/is-ignored-change-sends-notification-expected.txt
index 488721b..138cb54a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/is-ignored-change-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/is-ignored-change-sends-notification-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS accessibleElementById('hiddenDivContainer') != null is true
 PASS accessibleElementById('hiddenDiv') != null is false
 PASS accessibleElementById('invisibleDivContainer') != null is true
@@ -9,7 +10,6 @@
 PASS accessibleElementById('emptyDiv') != null is true
 PASS accessibleElementById('divWithoutRoleContainer') != null is true
 
-
 Got ChildrenChanged notification on hiddenDivContainer
 PASS accessibleElementById('hiddenDivContainer').childrenCount is 1
 Got ChildrenChanged notification on invisibleDivContainer
diff --git a/third_party/WebKit/LayoutTests/accessibility/is-richly-editable-expected.txt b/third_party/WebKit/LayoutTests/accessibility/is-richly-editable-expected.txt
index 2d2790e0..d5659008 100644
--- a/third_party/WebKit/LayoutTests/accessibility/is-richly-editable-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/is-richly-editable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axElement.isRichlyEditable is true
 PASS axElement.isRichlyEditable is true
 PASS axElement.isRichlyEditable is true
@@ -19,8 +20,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-
 Some text.
 
 Some text.
@@ -29,12 +28,9 @@
  
 
     
-
 Some text.
 
 
-
-
 Some text.
 
 Button
diff --git a/third_party/WebKit/LayoutTests/accessibility/label-element-press-expected.txt b/third_party/WebKit/LayoutTests/accessibility/label-element-press-expected.txt
index bb2a6ca..01ca30c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/label-element-press-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/label-element-press-expected.txt
@@ -1,9 +1,9 @@
 label
-
 This tests that a label element without a corresponding control will perform a press action on itself instead of nothing.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/label-for-control-hittest-expected.txt b/third_party/WebKit/LayoutTests/accessibility/label-for-control-hittest-expected.txt
index b4dd905..7b6c41e7 100644
--- a/third_party/WebKit/LayoutTests/accessibility/label-for-control-hittest-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/label-for-control-hittest-expected.txt
@@ -1,9 +1,9 @@
  This is a lot of repeated text that when a hit test is performed, will return the corresponding checkbox control, because this text is only a label. This is a lot of repeated text that when a hit test is performed, will return the corresponding checkbox control, because this text is only a label. This is a lot of repeated text that when a hit test is performed, will return the corresponding checkbox control, because this text is only a label. This is a lot of repeated text that when a hit test is performed, will return the corresponding checkbox control, because this text is only a label. This is a lot of repeated text that when a hit test is performed, will return the corresponding checkbox control, because this text is only a label.
-
 This tests that a hit test on a label of a control will return the control (instead of nothing).
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS control.role is 'AXRole: AXCheckBox'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/legend-expected.txt b/third_party/WebKit/LayoutTests/accessibility/legend-expected.txt
index 403ca87..e581704 100644
--- a/third_party/WebKit/LayoutTests/accessibility/legend-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/legend-expected.txt
@@ -1,11 +1,11 @@
 Choose a shipping method:
 Overnight
 End of test
-
 This tests that a fieldset's title ui element is the legend.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXGroup "Choose a shipping method:"
         AXRole: AXLegend     << fieldset's titleUIElement
@@ -17,7 +17,6 @@
                 AXRole: AXInlineTextBox "Overnight"
     AXRole: AXGenericContainer
         AXRole: AXStaticText "End of test"
-
 PASS titleUIElement != null is true
 PASS titleUIElementText.name is 'Choose a shipping method:'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt b/third_party/WebKit/LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt
index b03c8c51..00bb1110 100644
--- a/third_party/WebKit/LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS button1.name is 'foo1'
 PASS button2.name is 'foo2'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/link-inside-label-expected.txt b/third_party/WebKit/LayoutTests/accessibility/link-inside-label-expected.txt
index 075bb71a..db9e4d91f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/link-inside-label-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/link-inside-label-expected.txt
@@ -1,5 +1,4 @@
 Row 1  More info Do something
-
 This tests that a link element present inside a label element is accessible when label has more than one child.
 
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/listbox-enabled-states-expected.txt b/third_party/WebKit/LayoutTests/accessibility/listbox-enabled-states-expected.txt
index a157d68..6c29af7b 100644
--- a/third_party/WebKit/LayoutTests/accessibility/listbox-enabled-states-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/listbox-enabled-states-expected.txt
@@ -1,11 +1,7 @@
-Option 1
-Option 2
-Option 3
-Option 4
-Option 5
 
 This tests that we report the correct enabled state on a listbox.
 
+
 PASS axSelectElement.restriction is "none"
 PASS axSelectElement.childAtIndex(0).restriction is "none"
 PASS axSelectElement.childAtIndex(1).restriction is "none"
diff --git a/third_party/WebKit/LayoutTests/accessibility/listitem-presentation-inherited-expected.txt b/third_party/WebKit/LayoutTests/accessibility/listitem-presentation-inherited-expected.txt
index 5b4af7f1..1c6cd4e5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/listitem-presentation-inherited-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/listitem-presentation-inherited-expected.txt
@@ -4,13 +4,13 @@
 Plain Text 1
 Plain Text 2
 Plain Text 3
-
 End of test
 
 This tests that the presentation role is not inherited.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXListItem
         AXRole: AXListMarker "• "
@@ -32,7 +32,6 @@
         AXRole: AXInlineTextBox "Plain Text 3"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/main-element-expected.txt b/third_party/WebKit/LayoutTests/accessibility/main-element-expected.txt
index 22db19b..eefe641 100644
--- a/third_party/WebKit/LayoutTests/accessibility/main-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/main-element-expected.txt
@@ -1,9 +1,9 @@
 main
-
 This tests that the HTML5 main element correctly maps to AXMain.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS main.role is 'AXRole: AXMain'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/media-controls-expected.txt b/third_party/WebKit/LayoutTests/accessibility/media-controls-expected.txt
index 7c548c1..2646740 100644
--- a/third_party/WebKit/LayoutTests/accessibility/media-controls-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/media-controls-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/menu-item-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/menu-item-crash-expected.txt
index 1bf3b6d4..5beedad 100644
--- a/third_party/WebKit/LayoutTests/accessibility/menu-item-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/menu-item-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS - There was no crash when removing the ARIA menu from the DOM.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/menu-list-popup-reuses-objects-expected.txt b/third_party/WebKit/LayoutTests/accessibility/menu-list-popup-reuses-objects-expected.txt
index 161c9683..d52153d 100644
--- a/third_party/WebKit/LayoutTests/accessibility/menu-list-popup-reuses-objects-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/menu-list-popup-reuses-objects-expected.txt
@@ -1,11 +1,9 @@
-Alicia
-Peter
-Kalinda
 
 This test makes sure menu lists fire events on both the option that lost selection and the one that gained selection.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axMenuListPopup.role is "AXRole: AXMenuListPopup"
 PASS axMenuListOption.role is "AXRole: AXMenuListOption"
 PASS element.isEqual(axMenuListOption) is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/menu-list-selection-changed-expected.txt b/third_party/WebKit/LayoutTests/accessibility/menu-list-selection-changed-expected.txt
index 0cf6e01..dd62d355 100644
--- a/third_party/WebKit/LayoutTests/accessibility/menu-list-selection-changed-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/menu-list-selection-changed-expected.txt
@@ -1,11 +1,9 @@
-Alicia
-Peter
-Kalinda
 
 This test makes sure menu lists fire events on both the option that lost selection and the one that gained selection.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got notification on option Alicia isSelected=false
 Got notification on option Kalinda isSelected=true
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/menu-list-sends-change-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/menu-list-sends-change-notification-expected.txt
index a25fa41..969ba0c92 100644
--- a/third_party/WebKit/LayoutTests/accessibility/menu-list-sends-change-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/menu-list-sends-change-notification-expected.txt
@@ -1,15 +1,12 @@
-One
-Two
-Three
 
 This tests that changing the value of a menu list sends a notification even when it's not popped open.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
 Got notification: MenuListValueChanged
 
-
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/meter-value-expected.txt b/third_party/WebKit/LayoutTests/accessibility/meter-value-expected.txt
index bcb13f2a..8d9498d 100644
--- a/third_party/WebKit/LayoutTests/accessibility/meter-value-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/meter-value-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axMeter1.minValue is 0
 PASS axMeter1.maxValue is 10
 PASS axMeter1.intValue is 5
@@ -9,4 +10,3 @@
 
 TEST COMPLETE
 
-
diff --git a/third_party/WebKit/LayoutTests/accessibility/nested-layout-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/nested-layout-crash-expected.txt
index 2707165..71fd715 100644
--- a/third_party/WebKit/LayoutTests/accessibility/nested-layout-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/nested-layout-crash-expected.txt
@@ -1,3 +1,5 @@
 Test for rdar://problem/7050773 Crash at WebCore::LayoutBlockFlow::layoutBlock().
 
 The test passes if it does not crash or cause an assertion failure.
+
+
diff --git a/third_party/WebKit/LayoutTests/accessibility/nochildren-elements-expected.txt b/third_party/WebKit/LayoutTests/accessibility/nochildren-elements-expected.txt
index 944d8eb..ab8f998 100644
--- a/third_party/WebKit/LayoutTests/accessibility/nochildren-elements-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/nochildren-elements-expected.txt
@@ -1,3 +1,4 @@
+
 inside
 inside
 inside
diff --git a/third_party/WebKit/LayoutTests/accessibility/non-data-table-cell-title-ui-element-expected.txt b/third_party/WebKit/LayoutTests/accessibility/non-data-table-cell-title-ui-element-expected.txt
index f9b2b24f..af32fec 100644
--- a/third_party/WebKit/LayoutTests/accessibility/non-data-table-cell-title-ui-element-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/non-data-table-cell-title-ui-element-expected.txt
@@ -1,5 +1,4 @@
 ATS
-
 pass	issue	fail	blocked	skip	test
 Test passed
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/non-native-image-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/non-native-image-crash-expected.txt
index 8b36cc1..7ccded97 100644
--- a/third_party/WebKit/LayoutTests/accessibility/non-native-image-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/non-native-image-crash-expected.txt
@@ -1,9 +1,9 @@
 ======================== ___][_____ * __/ [___]\ ***====___ \ * \___________] I I ------------/
-
 This tests that a non native image (one created through ARIA) does not cause an assert. Test passes if it does not crash in debug builds
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/not-ignore-landmark-roles-expected.txt b/third_party/WebKit/LayoutTests/accessibility/not-ignore-landmark-roles-expected.txt
index cf54848..8991def1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/not-ignore-landmark-roles-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/not-ignore-landmark-roles-expected.txt
@@ -6,11 +6,11 @@
 footer element
 main element
 nav element
-
 This tests that landmark and related roles are not ignored.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS containerNode.childrenCount is 8
 PASS AXObject.role is 'AXRole: AXArticle'
 PASS AXObject.role is 'AXRole: AXRegion'
diff --git a/third_party/WebKit/LayoutTests/accessibility/notification-listeners-expected.txt b/third_party/WebKit/LayoutTests/accessibility/notification-listeners-expected.txt
index 8fe9fb4..efe1f94 100644
--- a/third_party/WebKit/LayoutTests/accessibility/notification-listeners-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/notification-listeners-expected.txt
@@ -2,6 +2,8 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
+
 Slider
 SELECT Blur
 SELECT InvalidStatusChanged
diff --git a/third_party/WebKit/LayoutTests/accessibility/onclick-handlers-expected.txt b/third_party/WebKit/LayoutTests/accessibility/onclick-handlers-expected.txt
index 5c66211..d965e60 100644
--- a/third_party/WebKit/LayoutTests/accessibility/onclick-handlers-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/onclick-handlers-expected.txt
@@ -1,3 +1,2 @@
 Test passed
-
 this is an on click handler
diff --git a/third_party/WebKit/LayoutTests/accessibility/platform-name-expected.txt b/third_party/WebKit/LayoutTests/accessibility/platform-name-expected.txt
index d570f65..18bbddc6 100644
--- a/third_party/WebKit/LayoutTests/accessibility/platform-name-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/platform-name-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Platform name: chromium
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/presentation-owned-elements-expected.txt b/third_party/WebKit/LayoutTests/accessibility/presentation-owned-elements-expected.txt
index a09e421..45f2ba6 100644
--- a/third_party/WebKit/LayoutTests/accessibility/presentation-owned-elements-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/presentation-owned-elements-expected.txt
@@ -19,8 +19,6 @@
  I have a bike   Male  Female
 The option A has a static text role because it has a presentation role and is disabled.
 The option B has option role because it has an explicit role.
-A
-B
 
 End of test
 
@@ -28,6 +26,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXGenericContainer
         AXRole: AXStaticText "These lists have a static text role because they have a presentation role."
@@ -107,7 +106,6 @@
         AXRole: AXListBoxOption "B"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/presentational-elements-with-focus-expected.txt b/third_party/WebKit/LayoutTests/accessibility/presentational-elements-with-focus-expected.txt
index 6054a66..9a1cce5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/presentational-elements-with-focus-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/presentational-elements-with-focus-expected.txt
@@ -6,12 +6,11 @@
 
 
 
-
-
 This tests that the ARIA presentation role is ignored when an element can set focus.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS accessibilityController.focusedElement.childrenCount is 12
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/press-works-on-control-types-expected.txt b/third_party/WebKit/LayoutTests/accessibility/press-works-on-control-types-expected.txt
index 9e754fbf..7800962 100644
--- a/third_party/WebKit/LayoutTests/accessibility/press-works-on-control-types-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/press-works-on-control-types-expected.txt
@@ -6,11 +6,11 @@
 menu item
 menu item checkbox
 menu item radio
-
 This tests that when certain control type elements are pressed, a valid event is sent that references the right element.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS eventSrcElement == document.getElementById('group') is true
 PASS eventSrcElement == document.getElementById('button') is true
 PASS eventSrcElement == document.getElementById('tab') is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label-expected.txt b/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label-expected.txt
index e131249..dc250f65 100644
--- a/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS focusedElement.name is 'LABEL'
 PASS !titleUIElement || titleUIElement.name == '' is true
 PASS focusedElement.name is 'LABEL2a'
@@ -13,9 +14,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Test
-LABEL Test
+LABEL  Test
 LABEL2
 LABEL2a
 Test
diff --git a/third_party/WebKit/LayoutTests/accessibility/readonly-expected.txt b/third_party/WebKit/LayoutTests/accessibility/readonly-expected.txt
index de48040..9a336f92 100644
--- a/third_party/WebKit/LayoutTests/accessibility/readonly-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/readonly-expected.txt
@@ -1,10 +1,4 @@
-Link Button A B C D E F G H I
-1
-2
-J
-1
-2
-K L M
+Link  Button A B C D E F G H I J K L M
 Focusable
 Heading
 Plain div can't be readonly
@@ -14,141 +8,115 @@
 ARIA slider
 ARIA progress meter
 Button
-
 This tests which elements expose themselves as readonly. Readonly here refers to whether the item is not editable, not whether a control value can be changed vs if it's unavailable.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 link1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 button1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 text1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 text-readonly1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is true
 
-
 text-readonly2
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 checkbox1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 number1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 radio1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 slider1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 submit1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 combobox1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 listbox1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 textarea1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 textarea-readonly1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is true
 
-
 focusable1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 heading1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 div1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 aria-button1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 aria-togglebutton1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 aria-link1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 aria-slider1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is true
 
-
 aria-progress1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 contenteditable_root1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 contenteditable_button1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 contenteditable_root-readonly1
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is false
 
-
 contenteditable_root-readonly2
 PASS document.activeElement == element is true
 PASS axElement.isReadOnly is true
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/removed-anonymous-block-child-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/removed-anonymous-block-child-causes-crash-expected.txt
index f66e91c..6412203 100644
--- a/third_party/WebKit/LayoutTests/accessibility/removed-anonymous-block-child-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/removed-anonymous-block-child-causes-crash-expected.txt
@@ -1,10 +1,10 @@
 a
 a
-
 In certain cases removing a descendant from an anonymous block element does not update the parent chain correctly. This can cause a crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/removed-continuation-element-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/removed-continuation-element-causes-crash-expected.txt
index f284bf93..53bffd5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/removed-continuation-element-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/removed-continuation-element-causes-crash-expected.txt
@@ -1,9 +1,9 @@
- asdfasdf
-
+  asdfasdf
 When you have elements that are continuations, and one of those elements is removed, the parent chain is not being updated accordingly. This can cause a crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/role-attribute-expected.txt b/third_party/WebKit/LayoutTests/accessibility/role-attribute-expected.txt
index cacc310..a42f7e2 100644
--- a/third_party/WebKit/LayoutTests/accessibility/role-attribute-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/role-attribute-expected.txt
@@ -4,22 +4,14 @@
 Implicit Item 1
 Implicit Item 2
 Implicit Item 3
-Explicit Option 1
-Explicit Option 2
-Implicit Option 1
-Implicit Option 2
-Explicit dropdown 1
-Explicit dropdown 2
-Implicit dropdown 1
-Implicit dropdown 2
-   
-
+       
 End of test
 
 This tests that the role attribute is not missed.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXRadioGroup
         AXRole: AXRadioButton "Explicit Item 1"
@@ -61,7 +53,6 @@
             AXRole: AXSliderThumb
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-div-horiz-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-div-horiz-sends-notification-expected.txt
index 3e9953a..7242bdc 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-div-horiz-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-div-horiz-sends-notification-expected.txt
@@ -1,9 +1,9 @@
-One Two Three
-
+One  Two  Three
 This test ensures that scrolling the window sends a notification.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got notification on container div
 PASS container.scrollLeft is 500
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-div-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-div-sends-notification-expected.txt
index e7a0c6e..9245508 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-div-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-div-sends-notification-expected.txt
@@ -1,11 +1,11 @@
 One
 Two
 Three
-
 This test ensures that scrolling the window sends a notification.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got notification on container div
 PASS container.scrollTop is 500
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-main-window-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-main-window-expected.txt
index d24c156..d228740 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-main-window-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-main-window-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 5000-pixel box
 Target
 5000-pixel box
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-nested-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-nested-expected.txt
index 0178242..a81a1fd 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-nested-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-global-point-nested-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 5000-pixel box
 5000-pixel box
 5000-pixel box
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt
index 68417c6..b7fafb8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-div-overflow-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Upper Target
 5000-pixel box
 Lower Target
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-main-window-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-main-window-expected.txt
index 9db445cb..9af1499f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-main-window-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-main-window-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Upper Target
 5000-pixel box
 Lower Target
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-2-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-2-expected.txt
index 2781ae62..d78902ee 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-2-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 5000-pixel box
 Target Target Target
 5000-pixel box
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-expected.txt
index b55f151..d3df09f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-nested-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 5000-pixel box
 5000-pixel box
 5000-pixel box
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-with-subfocus-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-with-subfocus-expected.txt
index 2b67384..2fd78163 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-with-subfocus-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-to-make-visible-with-subfocus-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 5000-pixel box
 Target
 PASS window.pageYOffset is 0
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-window-horiz-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-window-horiz-sends-notification-expected.txt
index 0b84dc1e..630bd93 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-window-horiz-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-window-horiz-sends-notification-expected.txt
@@ -1,11 +1,11 @@
 One
 Two
 Three
-
 This test ensures that scrolling the window sends a notification.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS window.pageXOffset is 0
 Got notification on web area
 PASS window.pageXOffset is 500
diff --git a/third_party/WebKit/LayoutTests/accessibility/scroll-window-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/accessibility/scroll-window-sends-notification-expected.txt
index 2ab16ef..1696daa9 100644
--- a/third_party/WebKit/LayoutTests/accessibility/scroll-window-sends-notification-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/scroll-window-sends-notification-expected.txt
@@ -1,11 +1,11 @@
 One
 Two
 Three
-
 This test ensures that scrolling the window sends a notification.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS window.pageYOffset is 0
 Got notification on web area
 PASS window.pageYOffset is 500
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-aria-textbox-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-aria-textbox-expected.txt
index c0948ff..a92351ed 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-aria-textbox-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-aria-textbox-expected.txt
@@ -8,6 +8,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got SelectedTextChanged notification on focusable element with role=textbox.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-contenteditable-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-contenteditable-expected.txt
index 812013f4..d61795c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-contenteditable-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-contenteditable-expected.txt
@@ -8,6 +8,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got SelectedTextChanged notification on contentEditable element.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-input-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-input-expected.txt
index af567b9..562b7f0 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-input-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-input-expected.txt
@@ -1,7 +1,9 @@
+
 Tests that a 'selected text changed' notification fires on an input element when the user moves the cursor.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got SelectedTextChanged notification on input element.
 Got DocumentSelectionChanged notification on root element.
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-statictext-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-statictext-expected.txt
index 60d6fcd..f2b79a5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-statictext-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-statictext-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got SelectedTextChanged notification on root element.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-textarea-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-textarea-expected.txt
index 21c5b7d..68e0ec24 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-textarea-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-change-notification-textarea-expected.txt
@@ -1,7 +1,9 @@
+
 Tests that a 'selected text changed' notification fires on an textarea element when the user moves the cursor.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Got SelectedTextChanged notification on textarea element.
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/selection-states-expected.txt b/third_party/WebKit/LayoutTests/accessibility/selection-states-expected.txt
index b6c3fea..6d3161f2 100644
--- a/third_party/WebKit/LayoutTests/accessibility/selection-states-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/selection-states-expected.txt
@@ -1,9 +1,7 @@
-Option 1
-Option 2
-Option 3
 
 This tests that we report the correct selection-related states.
 
+
 PASS axSelectElement.isMultiSelectable is true
 PASS axSelectElement.childAtIndex(0).isSelectable is true
 PASS axSelectElement.childAtIndex(0).isSelected is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/spinbutton-value-expected.txt b/third_party/WebKit/LayoutTests/accessibility/spinbutton-value-expected.txt
index 8490ccd..3644944 100644
--- a/third_party/WebKit/LayoutTests/accessibility/spinbutton-value-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/spinbutton-value-expected.txt
@@ -1,9 +1,10 @@
-42
 
+42
 This tests that a spin button supports range value attributes.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS endsWith(axSpin.intValue, '5') is true
 PASS endsWith(axSpin.minValue, '1') is true
 PASS endsWith(axSpin.maxValue, '9') is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt b/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt
index 9895655..2608fa8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt
@@ -1,39 +1,34 @@
 Test
-
 This test ensures the accessibility bounds of embedded SVG objects are correct.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 container location: (607, 107)
 Face role: AXRole: AXButton
 Face label: face
 FaceX: 0
 FaceY: 0
 
-
 Eye role: AXRole: AXButton
 Eye label: left-eye
 EyeX: 103
 EyeY: 148
 
-
 Nose role: AXRole: AXButton
 Nose label: nose
 NoseX: 193
 NoseY: 206
 
-
 Mouth role: AXRole: AXButton
 Mouth label: smile
 MouthX: 101
 MouthY: 260
 
-
 Text role: AXRole: AXStaticText
 TextX/10: 15
 TextY/10: 11
 
-
 Image role: AXRole: AXImage
 Image label: Test Image
 ImageX: 21
diff --git a/third_party/WebKit/LayoutTests/accessibility/svg-image-expected.txt b/third_party/WebKit/LayoutTests/accessibility/svg-image-expected.txt
index 7c9fd8e..f04856e7 100644
--- a/third_party/WebKit/LayoutTests/accessibility/svg-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/svg-image-expected.txt
@@ -1,7 +1,9 @@
+ 
 This tests that SVG images are accessible elements and they have the same attributes as real images.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS svgImage.role is realImage.role
 PASS svgImage.name is realImage.name
 SVG Image Role: AXRole: AXImage
diff --git a/third_party/WebKit/LayoutTests/accessibility/svg-path-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/svg-path-crash-expected.txt
index 683ad3d1..00d4734ff 100644
--- a/third_party/WebKit/LayoutTests/accessibility/svg-path-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/svg-path-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 undefined
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-caption-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-caption-expected.txt
index 14f4c642..4020b794 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-caption-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-caption-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS table.childrenCount is 2
 PASS captionText is 'TableCaption'
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-cell-for-column-and-row-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-cell-for-column-and-row-crash-expected.txt
index 18e1ea9..b5c4259 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-cell-for-column-and-row-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-cell-for-column-and-row-crash-expected.txt
@@ -1,10 +1,10 @@
 foo
 bar
-
 This tests that retrieving a cell for a table multiple times doesn't crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axTable.role is 'AXRole: AXTable'
 PASS axCell.role is 'AXRole: AXCell'
 PASS axCell.role is 'AXRole: AXCell'
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-cells-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-cells-expected.txt
index 8cab9fa2..7d632e45 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-cells-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-cells-expected.txt
@@ -1,6 +1,6 @@
 Example #1: Nested Stubs
 Ruritanian
-Population
+Population 
 Survey	All
 Genders	By Gender
 Males	Females
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-cells-with-colspan-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-cells-with-colspan-expected.txt
index 8a6f407..ff9f7f38 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-cells-with-colspan-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-cells-with-colspan-expected.txt
@@ -1,11 +1,11 @@
 data	col heada	data
 data	col head
 col head	col head
-
 Check whether cells with colspan are reported properly
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS table1.columnCount is 3
 PASS cell_0_0.role is 'AXRole: AXCell'
 PASS cell_0_0.columnIndexRange() is '{0, 1}'
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-destroyed-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-destroyed-crash-expected.txt
index 0e0d5b1a7..9aa0afd 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-destroyed-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-destroyed-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-detection-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-detection-expected.txt
index b238c72e2..a4a252ff 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-detection-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-detection-expected.txt
@@ -1,100 +1,76 @@
 
-
 This should be a table because it has a thead.
 
 AXRole: AXTable
 
-
 asdf	asdf
 asdf	asdf
 
-
 This should be a table because cells have borders.
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should not be a table because its cells do not have borders.
 
 AXRole: AXLayoutTable
 
-
 asdf	asdf
 
-
 This should be a table because a cell has a special attribute
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should be a table because a cell has a special attribute.
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should be a table because a cell has a special attribute.
 
 AXRole: AXTable
 
-
 asdf	asdf
 asdf	asdf
 
-
 This should be a table because cells have different colors.
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should not be a table because cells have different but no spacing.
 
 AXRole: AXLayoutTable
 
-
 asdf	asdf
 
-
 This should not be a table because cells have the same colors even though there is spacing.
 
 AXRole: AXLayoutTable
 
-
 asdf	asdf
 
-
 This should be a table because it has the "rules" attr.
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should not be a table because it only has one valid cell (need more than one).
 
 AXRole: AXLayoutTable
 
-
 Contributions
 
-
 This should not be a table because it does not have enough cell borders or background colors
 
 AXRole: AXLayoutTable
 
-
 Politics
 Decision '08
 The debates
@@ -103,88 +79,75 @@
 National Journal
 New York Times
 
-
 This should be a table because it's editable.
 
 AXRole: AXTable
 
-
 asdf	asdf
 
-
 This should be a table because most cells have a top border.
 
 AXRole: AXTable
 
-
 asdf	asdf
 asdf	asdf
 
-
 This should not be a table because cells have different borders.
 
 AXRole: AXLayoutTable
 
-
 asdf	asdf
 asdf	asdf
 
-
 This should be a table because it sets empty-cells: hide on the table.
 
 AXRole: AXTable
 
-
 asdf	asdf
-	asdf
+asdf
 asdf	asdf
 
-
 This should be a table because it sets empty-cells: hide on a cell.
 
 AXRole: AXTable
 
-
 asdf	asdf
-	asdf
+asdf
 asdf	asdf
 
-
 This should be a table because it has a col.
 
 AXRole: AXTable
 
-
 asdf	asdf
 asdf	asdf
 
-
 This should be a table because it has at least 20 rows
 
 AXRole: AXTable
 
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
+asdf
 
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
-asdf
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-header-column-row-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-header-column-row-expected.txt
index 0a030178..9b3b74c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-header-column-row-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-header-column-row-expected.txt
@@ -11,19 +11,19 @@
 column head	column head	column head
 data	data	data
 row header and column header (3)
-	col head
+col head
 col head	col head
 row head	data	data
 row header and column header (4)
 row head	col head
 row head
-
 End of test
 
 This tests that AXRoles for header cells are assigned.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXTable "scope test"
         AXRole: AXCaption
@@ -170,7 +170,6 @@
                     AXRole: AXInlineTextBox "row head"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-headers-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-headers-expected.txt
index 3c5d70e..5822711 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-headers-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-headers-expected.txt
@@ -31,11 +31,11 @@
 row head
 row head
 col head
-
 Check whether column and row headers are reported correctly
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS table.rowHeaderAtIndex(0).isEqual(table.cellForColumnAndRow(0, 1)) is true
 PASS table.rowHeaderAtIndex(1).isEqual(table.cellForColumnAndRow(0, 2)) is true
 PASS table.rowHeaderAtIndex(2).isEqual(table.cellForColumnAndRow(0, 3)) is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-one-cell-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-one-cell-expected.txt
index 8304253..120cd4f1 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-one-cell-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-one-cell-expected.txt
@@ -1,7 +1,5 @@
 Pick Your Location!
-Get specific content for your area.
+Get specific content for your area. 
 http://web.apple.com
 
-
-
 AXRole: AXLayoutTable
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-remove-cell-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-remove-cell-crash-expected.txt
index 635d3aa..e7e4e7f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-remove-cell-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-remove-cell-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-row-with-aria-role-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-row-with-aria-role-expected.txt
index a47af93..aec370a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-row-with-aria-role-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-row-with-aria-role-expected.txt
@@ -1,14 +1,12 @@
 1a	1b
 2a	2b
 Button inside table
-
-
 Button inside table
-
 This makes sure that a table with ARIA roles on the tbody or rows is not treated as a data table.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS list.role is 'AXRole: AXList'
 PASS item1.role is 'AXRole: AXListItem'
 PASS item2.role is 'AXRole: AXListItem'
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-with-empty-thead-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-with-empty-thead-causes-crash-expected.txt
index 84782eab0..d4b06ee8 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-with-empty-thead-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-with-empty-thead-causes-crash-expected.txt
@@ -1,11 +1,11 @@
 1	2
-
 End of test
 
 Construct accessibility objects for a table with an empty thread tag. This can cause a crash.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 AXRole: AXWebArea
     AXRole: AXTable "table"
         AXRole: AXRow
@@ -17,7 +17,6 @@
                     AXRole: AXInlineTextBox "2"
     AXRole: AXParagraph
         AXRole: AXStaticText "End of test"
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-with-hidden-head-section-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-with-hidden-head-section-expected.txt
index b79a2bf..578e29d 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-with-hidden-head-section-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-with-hidden-head-section-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Table1 has a hidden first row. Verify accessing cells works as expected.
 PASS table1.rowCount is 2
 PASS !table1cell1 || !table1cell1.isValid is true
diff --git a/third_party/WebKit/LayoutTests/accessibility/table-with-rules-expected.txt b/third_party/WebKit/LayoutTests/accessibility/table-with-rules-expected.txt
index 7f93b891..36cca5c4 100644
--- a/third_party/WebKit/LayoutTests/accessibility/table-with-rules-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/table-with-rules-expected.txt
@@ -6,7 +6,6 @@
 
 ------------------------------------
 
-
 AXRole: AXTable
 
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/textarea-caret-position-expected.txt b/third_party/WebKit/LayoutTests/accessibility/textarea-caret-position-expected.txt
index 42d20a82..fcfe2b01 100644
--- a/third_party/WebKit/LayoutTests/accessibility/textarea-caret-position-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/textarea-caret-position-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS textareaAccessible.selectionStart is 0
 PASS textareaAccessible.selectionEnd is 0
 PASS textareaAccessible.selectionStartLineNumber is 0
@@ -95,5 +96,4 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
- 
+  
diff --git a/third_party/WebKit/LayoutTests/accessibility/textarea-line-for-index-expected.txt b/third_party/WebKit/LayoutTests/accessibility/textarea-line-for-index-expected.txt
index 973b7d8..7350afc 100644
--- a/third_party/WebKit/LayoutTests/accessibility/textarea-line-for-index-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/textarea-line-for-index-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axArea1.lineForIndex(index) is 0
 PASS axArea1.lineForIndex(index) is 0
 PASS axArea1.lineForIndex(index) is 0
@@ -28,4 +29,3 @@
 
 TEST COMPLETE
 
-
diff --git a/third_party/WebKit/LayoutTests/accessibility/textarea-selection-expected.txt b/third_party/WebKit/LayoutTests/accessibility/textarea-selection-expected.txt
index eda2e9ce..a76bedc 100644
--- a/third_party/WebKit/LayoutTests/accessibility/textarea-selection-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/textarea-selection-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS textareaAccessible.selectionStart is 0
 PASS textareaAccessible.selectionEnd is 25
 PASS textareaAccessible.selectionStartLineNumber is 0
@@ -45,5 +46,4 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
- 
+  
diff --git a/third_party/WebKit/LayoutTests/accessibility/textbox-role-on-contenteditable-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/textbox-role-on-contenteditable-crash-expected.txt
index 013ce33..50bc6a6 100644
--- a/third_party/WebKit/LayoutTests/accessibility/textbox-role-on-contenteditable-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/textbox-role-on-contenteditable-crash-expected.txt
@@ -1,6 +1,5 @@
 This tests a crashing scenario where an element with a textbox role attribute which also contenteditable has its content changed.
 
 
-
 Textbox content.
 PASS
diff --git a/third_party/WebKit/LayoutTests/accessibility/title-ui-element-correctness-expected.txt b/third_party/WebKit/LayoutTests/accessibility/title-ui-element-correctness-expected.txt
index 112bd621..8ba497f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/title-ui-element-correctness-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/title-ui-element-correctness-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS axElement('control1').nameElementAtIndex(0).isEqual(axElement('label1')) is true
 PASS axElement('control2').nameElementAtIndex(0).isEqual(axElement('label2')) is true
 PASS hasTitleUIElement(axElement('control3')) is false
diff --git a/third_party/WebKit/LayoutTests/accessibility/updating-attribute-in-table-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/updating-attribute-in-table-causes-crash-expected.txt
index 63f5d95c..c80c8f8f 100644
--- a/third_party/WebKit/LayoutTests/accessibility/updating-attribute-in-table-causes-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/updating-attribute-in-table-causes-crash-expected.txt
@@ -1,10 +1,10 @@
 1	2
 asdf
-
 This tests for a crash that can occur while altering an attribute on a table cell because it accesses the table when its in a bad state.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/whitespace-in-name-calc-expected.txt b/third_party/WebKit/LayoutTests/accessibility/whitespace-in-name-calc-expected.txt
index 3c577470..7db6a0c5 100644
--- a/third_party/WebKit/LayoutTests/accessibility/whitespace-in-name-calc-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/whitespace-in-name-calc-expected.txt
@@ -1,19 +1,13 @@
 HelloWorld HelloWorld HelloWorld HelloWorld HelloWorld
 HelloWorld
-Hello
-World
- 
-Hello
-World 
-Hello
-World
 
 Hello
 World
+ HelloWorld  HelloWorld
 Hello
 World
-Hello
-World
+HelloWorld
+HelloWorld
 PASS accessibleTitle("n1") is "HelloWorld"
 PASS accessibleTitle("n2") is "HelloWorld"
 PASS accessibleTitle("n3") is "HelloWorld"
diff --git a/third_party/WebKit/LayoutTests/animations/animation-css-rule-types-expected.txt b/third_party/WebKit/LayoutTests/animations/animation-css-rule-types-expected.txt
index 699a35d..4cffd7ac 100644
--- a/third_party/WebKit/LayoutTests/animations/animation-css-rule-types-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/animation-css-rule-types-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS ruleType is 7
 PASS ruleType is 8
 If we got to this point then we did not crash and the test has passed.
diff --git a/third_party/WebKit/LayoutTests/animations/change-in-animation-frame-expected.txt b/third_party/WebKit/LayoutTests/animations/change-in-animation-frame-expected.txt
index 7ef22e9..69cfc5a9 100644
--- a/third_party/WebKit/LayoutTests/animations/change-in-animation-frame-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/change-in-animation-frame-expected.txt
@@ -1 +1,2 @@
 PASS
+
diff --git a/third_party/WebKit/LayoutTests/animations/computed-style-expected.txt b/third_party/WebKit/LayoutTests/animations/computed-style-expected.txt
index 3041495e9..49e5ed1 100644
--- a/third_party/WebKit/LayoutTests/animations/computed-style-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/computed-style-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS test1Style.animationName is 'anim1'
 PASS test2Style.animationName is 'anim2, anim3'
 PASS test3Style.animationName is 'anim1, anim2, anim3'
@@ -17,7 +18,6 @@
 PASS test1Style.animationDirection is 'normal'
 PASS test2Style.animationDirection is 'normal, alternate'
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/animations/display-none-cancel-computedstyle-expected.txt b/third_party/WebKit/LayoutTests/animations/display-none-cancel-computedstyle-expected.txt
index d536070a..f4a6e9e 100644
--- a/third_party/WebKit/LayoutTests/animations/display-none-cancel-computedstyle-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/display-none-cancel-computedstyle-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS getComputedStyle(child).borderWidth is "10px"
 PASS getComputedStyle(child).borderWidth is "5px"
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/animations/events/animation-end-event-short-iterations-expected.txt b/third_party/WebKit/LayoutTests/animations/events/animation-end-event-short-iterations-expected.txt
index 9446983..06c9264 100644
--- a/third_party/WebKit/LayoutTests/animations/events/animation-end-event-short-iterations-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/events/animation-end-event-short-iterations-expected.txt
@@ -1,2 +1,3 @@
 Checks that we still end an animation properly (i.e. fire a animationend event) when using more than one iteration with very short durations.
 PASS: got animationend event
+
diff --git a/third_party/WebKit/LayoutTests/animations/events/animation-events-create-expected.txt b/third_party/WebKit/LayoutTests/animations/events/animation-events-create-expected.txt
index e0c22f7..0a2f59c 100644
--- a/third_party/WebKit/LayoutTests/animations/events/animation-events-create-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/events/animation-events-create-expected.txt
@@ -2,21 +2,19 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS document.createEvent exists
 
+PASS document.createEvent exists
 
 Test creation of AnimationEvent
 PASS typeof(ev) is 'object'
 PASS ev.animationName is ''
 PASS ev.elapsedTime is 0.0
 
-
 Create a MouseEvent and make sure it doesn't have AnimationEvent properties
 PASS typeof(ev) is 'object'
 PASS ev.animationName is undefined
 PASS ev.elapsedTime is undefined
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/animations/events/animation-iteration-event-short-iterations-expected.txt b/third_party/WebKit/LayoutTests/animations/events/animation-iteration-event-short-iterations-expected.txt
index 8d0573d0..4ad240e 100644
--- a/third_party/WebKit/LayoutTests/animations/events/animation-iteration-event-short-iterations-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/events/animation-iteration-event-short-iterations-expected.txt
@@ -1,2 +1,3 @@
 Tests that iteration events are fired when the duration is very short.
 PASS: Got a reasonable number of animationCount events
+
diff --git a/third_party/WebKit/LayoutTests/animations/events/events-with-short-duration-and-delay-expected.txt b/third_party/WebKit/LayoutTests/animations/events/events-with-short-duration-and-delay-expected.txt
index 5b012b8..a027237 100644
--- a/third_party/WebKit/LayoutTests/animations/events/events-with-short-duration-and-delay-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/events/events-with-short-duration-and-delay-expected.txt
@@ -1,3 +1,4 @@
 Test events when the animation has a short duration and is delayed.
 PASS: got animationstart event
 PASS: got animationend event
+
diff --git a/third_party/WebKit/LayoutTests/animations/hit-testing/inline-element-animation-end-hit-test-expected.txt b/third_party/WebKit/LayoutTests/animations/hit-testing/inline-element-animation-end-hit-test-expected.txt
index 2772fc40..7dea6df 100644
--- a/third_party/WebKit/LayoutTests/animations/hit-testing/inline-element-animation-end-hit-test-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/hit-testing/inline-element-animation-end-hit-test-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS document.elementFromPoint(150, 150) === box is true
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/animations/keyframes-rule-expected.txt b/third_party/WebKit/LayoutTests/animations/keyframes-rule-expected.txt
index 7102675..9d8a6799 100644
--- a/third_party/WebKit/LayoutTests/animations/keyframes-rule-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/keyframes-rule-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Constants
 PASS CSSKeyframeRule exists on Window object
 PASS CSSKeyframesRule exists on Window object
@@ -10,7 +11,6 @@
 PASS KEYFRAME_RULE exists on Window.CSSRule object
 PASS KEYFRAMES_RULE exists on Window.CSSRule object
 
-
 Basic queries
 PASS keyframes1.type is window.CSSRule.KEYFRAMES_RULE
 PASS keyframes1.name is 'test1'
@@ -19,7 +19,6 @@
 PASS rules1.item(0).cssText is '0% { left: 10px; }'
 PASS rules1.item(1).cssText is '100% { left: 20px; }'
 
-
 Insert new rules
 PASS rules1.length is 5
 PASS rules1.item(0).cssText is '0% { left: 10px; }'
@@ -28,12 +27,10 @@
 PASS rules1.item(3).cssText is '60% { left: 60px; }'
 PASS rules1.item(4).cssText is '20% { left: 50px; }'
 
-
 Insert invalid rules
 PASS rules2.length is 6
 PASS rules2.item(5).cssText is '10% { left: 30px; }'
 
-
 Keys
 PASS keyframes3.type is window.CSSRule.KEYFRAMES_RULE
 PASS keyframes3.name is 'test3'
@@ -46,19 +43,16 @@
 PASS rules3.item(1).cssText is '50%, 60% { left: 30px; }'
 PASS rules3.item(2).cssText is '90%, 100% { left: 20px; }'
 
-
 Find a rule
 PASS rules3.item(0).style is an instance of CSSStyleDeclaration
 PASS rules3.item(0).style.length is 1
 PASS rule.type is window.CSSRule.KEYFRAME_RULE
 PASS rule.cssText is '0% { left: 10px; }'
 
-
 Find a rule with multiple key values
 PASS rule.type is window.CSSRule.KEYFRAME_RULE
 PASS rule.cssText is '50%, 60% { left: 30px; }'
 
-
 Find a rule using from and to
 PASS keyframes4.type is window.CSSRule.KEYFRAMES_RULE
 PASS rule.type is window.CSSRule.KEYFRAME_RULE
@@ -66,53 +60,45 @@
 PASS rule.type is window.CSSRule.KEYFRAME_RULE
 PASS rule.cssText is '100% { left: 20px; }'
 
-
 Try to find a rule that doesn't exist
 PASS Non-existent rule was not found
 
-
 Delete a rule
 PASS rules5.length is 2
 PASS rules5.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules5.item(0).keyText is '0%'
 PASS rules5.item(1).keyText is '90%, 100%'
 
-
 Delete a from rule
 PASS rules6.length is 2
 PASS rules6.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules6.item(0).keyText is '50%'
 PASS rules6.item(1).keyText is '100%'
 
-
 Delete a rule that doesn't exist
 PASS rules7.length is 2
 PASS rules7.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules7.item(0).keyText is '0%'
 PASS rules7.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key
 PASS rules8.length is 2
 PASS rules8.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules8.item(0).keyText is '70%'
 PASS rules8.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key with 'from'
 PASS rules9.length is 2
 PASS rules9.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules9.item(0).keyText is '0%'
 PASS rules9.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key with multiple values
 PASS rules10.length is 2
 PASS rules10.item(0).type is window.CSSRule.KEYFRAME_RULE
 PASS rules10.item(0).keyText is '0%, 10%, 0%, 20%, 30%, 100%'
 PASS rules10.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key with an out-of-range value
 PASS rules11.item(0).keyText = "40%, -50%, 60%"; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key '40%, -50%, 60%' is invalid and cannot be parsed.
 PASS rules11.length is 2
@@ -120,7 +106,6 @@
 PASS rules11.item(0).keyText is '0%'
 PASS rules11.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key with an invalid value
 PASS rules12.item(0).keyText = "foo"; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key 'foo' is invalid and cannot be parsed.
 PASS rules12.length is 2
@@ -128,7 +113,6 @@
 PASS rules12.item(0).keyText is '0%'
 PASS rules12.item(1).keyText is '90%, 100%'
 
-
 Set a keyframe key with a null value
 PASS rules13.item(0).keyText = null; threw exception SyntaxError: Failed to set the 'keyText' property on 'CSSKeyframeRule': The key 'null' is invalid and cannot be parsed.
 PASS rules13.length is 2
diff --git a/third_party/WebKit/LayoutTests/animations/lazy-detached-animation-stop-expected.txt b/third_party/WebKit/LayoutTests/animations/lazy-detached-animation-stop-expected.txt
index 19740a5..77070adc 100644
--- a/third_party/WebKit/LayoutTests/animations/lazy-detached-animation-stop-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/lazy-detached-animation-stop-expected.txt
@@ -2,8 +2,9 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS document.getAnimations().length is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+ 
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-01-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-01-expected.txt
index b259d6b4..6fc2489 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-01-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-01-expected.txt
@@ -1,2 +1,3 @@
 Tests that prefixed animation events are correctly fired.
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-02-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-02-expected.txt
index b8ce79b7..f3756b9 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-02-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-02-expected.txt
@@ -1,2 +1,3 @@
 Tests that unprefixed animation events are correctly fired when listeners are on both versions.
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-03-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-03-expected.txt
index 1dcdd352..ff12342 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-03-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-prefixed-03-expected.txt
@@ -1,2 +1,3 @@
 Tests that prefixed animation events are correctly fired when using html event listeners.
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-01-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-01-expected.txt
index 4bea785..88de1b2 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-01-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-01-expected.txt
@@ -1,2 +1,3 @@
 Tests that unprefixed animation events are correctly fired.
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-02-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-02-expected.txt
index 2a92bc4..89124c4 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-02-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-02-expected.txt
@@ -1,2 +1,3 @@
 Tests that unprefixed animation events are correctly fired when using html event listeners.
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-03-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-03-expected.txt
index ff7a4008..1ac8fb36 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-03-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-events-unprefixed-03-expected.txt
@@ -1,2 +1,3 @@
 Tests that unprefixed animation events are correctly fired when using html event listeners (only unprefixed should be fired).
 PASS: All events have been received as expected.
+
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/animation-inherit-initial-unprefixed-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/animation-inherit-initial-unprefixed-expected.txt
index a43e25a..1a6c3fc 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/animation-inherit-initial-unprefixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/animation-inherit-initial-unprefixed-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Testing inherit.
 PASS computedStyle.animationName is 'anim'
 PASS computedStyle.webkitAnimationName is 'anim'
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-prefixed-02-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-prefixed-02-expected.txt
index 71cd799a..0298947 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-prefixed-02-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-prefixed-02-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS keyframeRule.toString() is "[object CSSKeyframesRule]"
 PASS keyframeRule.type is 7
 PASS keyframeRule.name is "anim"
diff --git a/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-unprefixed-02-expected.txt b/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-unprefixed-02-expected.txt
index fcbeea1c..d927b67 100644
--- a/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-unprefixed-02-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/prefixed/keyframes-cssom-unprefixed-02-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS keyframeRule.toString() is "[object CSSKeyframesRule]"
 PASS keyframeRule.type is 7
 PASS keyframeRule.name is "anim"
diff --git a/third_party/WebKit/LayoutTests/animations/stability/element-animate-float-crash-expected.txt b/third_party/WebKit/LayoutTests/animations/stability/element-animate-float-crash-expected.txt
index 654ddf7f..514f70b 100644
--- a/third_party/WebKit/LayoutTests/animations/stability/element-animate-float-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/stability/element-animate-float-crash-expected.txt
@@ -1 +1 @@
-This test passes if it does not crash.
+This test passes if it does not crash. 
diff --git a/third_party/WebKit/LayoutTests/animations/stability/empty-keyframes-expected.txt b/third_party/WebKit/LayoutTests/animations/stability/empty-keyframes-expected.txt
index 7a1435c..1724171 100644
--- a/third_party/WebKit/LayoutTests/animations/stability/empty-keyframes-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/stability/empty-keyframes-expected.txt
@@ -1 +1,3 @@
 Test for empty keyframes rule. Should not crash
+
+
diff --git a/third_party/WebKit/LayoutTests/animations/stability/option-element-crash-expected.txt b/third_party/WebKit/LayoutTests/animations/stability/option-element-crash-expected.txt
index 6e870b0..80dd71a 100644
--- a/third_party/WebKit/LayoutTests/animations/stability/option-element-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/stability/option-element-crash-expected.txt
@@ -1,2 +1,3 @@
 CONSOLE WARNING: line 24: Invalid keyframe value for property outlineColor: invert
 This test passes if it does not crash.
+ 
diff --git a/third_party/WebKit/LayoutTests/animations/timing/timing-model-expected.txt b/third_party/WebKit/LayoutTests/animations/timing/timing-model-expected.txt
index a382510..a8dee795 100644
--- a/third_party/WebKit/LayoutTests/animations/timing/timing-model-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/timing/timing-model-expected.txt
@@ -1,7 +1,6 @@
 
 
 
-
 Sanity tests:
 PASS: [1s linear] iteration time was [null] at -1s
 PASS: [1s linear] iteration time was [0] at 0s
diff --git a/third_party/WebKit/LayoutTests/animations/wrong-keyframe-name-expected.txt b/third_party/WebKit/LayoutTests/animations/wrong-keyframe-name-expected.txt
index 549ba22..42106b5 100644
--- a/third_party/WebKit/LayoutTests/animations/wrong-keyframe-name-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/wrong-keyframe-name-expected.txt
@@ -1,2 +1,3 @@
 Tests that an animation does not run when it specifies an incorrect name.
 PASS
+
diff --git a/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt b/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt
index afd9d9d..e65f21a 100644
--- a/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS promise is defined.
 PASS promise.then is defined.
 batteryStatusSuccess invoked
diff --git a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash-expected.txt b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash-expected.txt
index ef9a97e9..e7dfc5c6 100644
--- a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS typeof(nav.getBattery()) == 'object' is true
 PASS nav.getBattery() is undefined.
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt b/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt
index a7c4b35..2ab4cb5 100644
--- a/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 resolution number 1
 PASS batteryInfo is defined.
 PASS lastSetMockBatteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt b/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt
index fee5c41..204660a 100644
--- a/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS promise1 === promise2 is true
 first resolution
 PASS batteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt b/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt
index f6a64c1..63cde94 100644
--- a/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 resolution in window
 PASS batteryInfo is defined.
 PASS lastSetMockBatteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt b/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt
index 1dba5bd1..499434d 100644
--- a/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 first window: page is visible
 resolution in window
 PASS batteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt b/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt
index 879898e3..de03af1 100644
--- a/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS batteryInfo is defined.
 PASS lastSetMockBatteryInfo is defined.
 PASS batteryInfo.charging is lastSetMockBatteryInfo.charging
diff --git a/third_party/WebKit/LayoutTests/battery-status/no-leak-on-detached-use-expected.txt b/third_party/WebKit/LayoutTests/battery-status/no-leak-on-detached-use-expected.txt
index f44fa35..8ac4393 100644
--- a/third_party/WebKit/LayoutTests/battery-status/no-leak-on-detached-use-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/no-leak-on-detached-use-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS DONE
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt b/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt
index 7834101..1d81bec 100644
--- a/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 page is visible
 PASS batteryInfo is defined.
 PASS lastSetMockBatteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt b/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt
index 34e602c..d8c1bc9 100644
--- a/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 batteryStatusSuccess invoked
 PASS batteryInfo is defined.
 PASS lastSetMockBatteryInfo is defined.
diff --git a/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision-expected.txt b/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision-expected.txt
index aa1eddb..6eefaa2 100644
--- a/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision-expected.txt
+++ b/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 batteryStatusSuccess invoked
 PASS battery.level is levelRounded
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/bindings/blink-in-js-asan-crash-expected.txt b/third_party/WebKit/LayoutTests/bindings/blink-in-js-asan-crash-expected.txt
index 6230944..9fad658 100644
--- a/third_party/WebKit/LayoutTests/bindings/blink-in-js-asan-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/bindings/blink-in-js-asan-crash-expected.txt
@@ -1 +1 @@
-Test passes if it does not crash on ASan builds.
+Test passes if it does not crash on ASan builds.  
diff --git a/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest-expected.txt b/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest-expected.txt
index 74d98c0..2553af3 100644
--- a/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest-expected.txt
+++ b/third_party/WebKit/LayoutTests/bindings/idl-dictionary-unittest-expected.txt
@@ -3,6 +3,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Test for setting an empty dictionary
 PASS dict.longMember is undefined.
 PASS dict.longMemberWithDefault is 42
@@ -31,7 +32,6 @@
 PASS dict.anyMember is undefined.
 PASS dict.callbackFunctionMember is undefined.
 
-
 Test for setting undefined
 PASS dict.longMember is undefined.
 PASS dict.longMemberWithDefault is 42
@@ -55,7 +55,6 @@
 PASS dict.anyMember is undefined.
 PASS dict.callbackFunctionMember is undefined.
 
-
 Test for setting valid values
 PASS dict.longMember is 1
 PASS dict.longMemberWithDefault is 2
@@ -85,7 +84,6 @@
 PASS dict.anyMember is 42
 PASS dict.callbackFunctionMember("A", "B") is "Hi A and B"
 
-
 Additional test for union type members
 PASS dict.doubleOrStringMember is "foo"
 PASS dict.doubleOrStringMember is "[object Object]"
@@ -94,7 +92,6 @@
 PASS dict.doubleOrStringMember is undefined.
 PASS dict.internalEnumOrInternalEnumSequenceMember is ["foo", "bar"]
 
-
 Test for explicit undefined or null, and missing members
 PASS dict.enumOrNullMember is null
 PASS dict.longMember is undefined.
@@ -103,7 +100,6 @@
 PASS dict.longOrNullMemberWithDefault is null
 PASS dictionaryTest.set({enumMember: null}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value 'null' is not a valid enum value of type InternalEnum..
 
-
 Test for different values for the any type
 PASS dict.anyMember is ""
 PASS dict.anyMember is 0
@@ -111,28 +107,23 @@
 PASS dict.anyMember is false
 PASS dict.anyMember is null
 
-
 Test for setting invalid member
 PASS dict.invalidMember is undefined.
 
-
 Test for setting invalid double value
 PASS dictionaryTest.set({doubleMember: NaN}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided double value is non-finite..
 PASS dictionaryTest.set({doubleMember: Infinity}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided double value is non-finite..
 PASS dictionaryTest.set({doubleMember: -Infinity}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided double value is non-finite..
 PASS dictionaryTest.set({doubleMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided double value is non-finite..
 
-
 Test for setting invalid ByteString value
 PASS dictionaryTest.set({byteStringMember: 'Ä€'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Value is not a valid ByteString..
 
-
 Test for setting invalid USVString value
 PASS dict.usvStringMember is "_�_�_��_"
 Test for setting invalid enum value
 PASS dictionaryTest.set({enumMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value 'invalid' is not a valid enum value of type InternalEnum..
 
-
 Test for setting invalid enum value in union sequence
 PASS dictionaryTest.set({internalEnumOrInternalEnumSequenceMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value 'invalid' is not a valid enum value of type InternalEnum..
 PASS dictionaryTest.set({internalEnumOrInternalEnumSequenceMember: ['invalid']}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The provided value 'invalid' is not a valid enum value of type InternalEnum..
@@ -140,29 +131,24 @@
 PASS dictionaryTest.set({objectMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member objectMember is not an object..
 PASS dictionaryTest.set({objectMember: 'invalid'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member objectMember is not an object..
 
-
 Test for setting invalid Element value
 PASS dictionaryTest.set({elementMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member elementMember is not of type Element..
 PASS dictionaryTest.set({elementMember: testObject1}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member elementMember is not of type Element..
 PASS dictionaryTest.set({elementMember: []}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member elementMember is not of type Element..
 PASS dictionaryTest.set({elementMember: document}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member elementMember is not of type Element..
 
-
 Test for passing invalid dictionary values
 PASS dictionaryTest.set(42) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': parameter 1 ('testingDictionary') is not an object..
 PASS dictionaryTest.set('string') threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': parameter 1 ('testingDictionary') is not an object..
 
-
 Test for [Clamp] and [EnforceRange] member
 PASS dict.longMember is -2147483648
 PASS dict.longMemberWithClamp is 2147483647
 PASS dictionaryTest.set({ longMemberWithEnforceRange: 2147483648 }) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': Value is outside the 'long' value range..
 
-
 Test for [ImplementedAs] and [DeprecateAs] member
 PASS dict.longMember is 42
 
-
 Test for passing EventTarget
 PASS dict.eventTargetOrNullMember is window
 PASS dict.eventTargetOrNullMember is null
@@ -172,7 +158,6 @@
 PASS dictionaryTest.set({eventTargetOrNullMember: []}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member eventTargetOrNullMember is not of type EventTarget..
 PASS dictionaryTest.set({eventTargetOrNullMember: {}}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': member eventTargetOrNullMember is not of type EventTarget..
 
-
 Test for passing Dictionary (not IDL dictionary)
 PASS properties.foo is "x"
 PASS properties.bar is "y"
@@ -181,7 +166,6 @@
 PASS dictionaryTest.set({dictionaryMember: 42}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The dictionary provided is neither undefined, null nor an Object..
 PASS dictionaryTest.set({dictionaryMember: 'foo'}) threw exception TypeError: Failed to execute 'set' on 'DictionaryTest': The dictionary provided is neither undefined, null nor an Object..
 
-
 Test for derived dictionary
 PASS derived.longMember is undefined.
 PASS derived.longMemberWithDefault is 42
@@ -205,7 +189,6 @@
 PASS derived.derivedStringMemberWithDefault is "derivedDefaultStringValue"
 PASS derived.requiredBooleanMember is true
 
-
 PASS derived.longMember is 1
 PASS derived.stringMemberWithDefault is "modifiedString"
 PASS derived.derivedStringMember is "modifiedString2"
@@ -213,14 +196,12 @@
 PASS derived.invalidMember is undefined.
 PASS derived.requiredBooleanMember is false
 
-
 Test for triple level derived dictionary
 PASS derived.longMember is 1
 PASS derived.derivedStringMember is "modifiedString"
 PASS derived.derivedDerivedStringMember is "modifiedString2"
 PASS derived.requiredBooleanMember is false
 
-
 Test for passing invalid values as derived dictionary
 PASS dictionaryTest.setDerived({objectMember: 42, requiredBooleanMember: false }) threw exception TypeError: Failed to execute 'setDerived' on 'DictionaryTest': member objectMember is not an object..
 PASS dictionaryTest.setDerived({}) threw exception TypeError: Failed to execute 'setDerived' on 'DictionaryTest': required member requiredBooleanMember is undefined..
diff --git a/third_party/WebKit/LayoutTests/bindings/idl-union-type-unittest-expected.txt b/third_party/WebKit/LayoutTests/bindings/idl-union-type-unittest-expected.txt
index 6d76439..c20d176 100644
--- a/third_party/WebKit/LayoutTests/bindings/idl-union-type-unittest-expected.txt
+++ b/third_party/WebKit/LayoutTests/bindings/idl-union-type-unittest-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Tests for attributes
 PASS unionTypesTest.doubleOrStringOrStringSequenceAttribute is 0
 PASS unionTypesTest.doubleOrStringOrStringSequenceAttribute is 3.14
@@ -12,7 +13,6 @@
 PASS JSON.stringify(unionTypesTest.doubleOrStringOrStringSequenceAttribute) is "[]"
 PASS JSON.stringify(unionTypesTest.doubleOrStringOrStringSequenceAttribute) is "[\"a\",\"3.14\"]"
 
-
 Tests for method arguments
 PASS unionTypesTest.doubleOrStringArg(3.14) is "double is passed: 3.14"
 PASS unionTypesTest.doubleOrStringArg("foo") is "string is passed: foo"
@@ -23,7 +23,6 @@
 PASS typeof unionTypesTest.doubleOrStringArg(new Date) is "string"
 PASS unionTypesTest.doubleOrStringArg() threw exception TypeError: Failed to execute 'doubleOrStringArg' on 'UnionTypesTest': 1 argument required, but only 0 present..
 
-
 PASS unionTypesTest.doubleOrInternalEnumArg(3.14) is "double is passed: 3.14"
 PASS unionTypesTest.doubleOrInternalEnumArg("foo") is "InternalEnum is passed: foo"
 PASS unionTypesTest.doubleOrInternalEnumArg("invalid") threw exception TypeError: Failed to execute 'doubleOrInternalEnumArg' on 'UnionTypesTest': The provided value 'invalid' is not a valid enum value of type InternalEnum..
@@ -31,7 +30,6 @@
 PASS unionTypesTest.doubleOrInternalEnumArg({}) threw exception TypeError: Failed to execute 'doubleOrInternalEnumArg' on 'UnionTypesTest': The provided value '[object Object]' is not a valid enum value of type InternalEnum..
 PASS unionTypesTest.doubleOrInternalEnumArg([]) threw exception TypeError: Failed to execute 'doubleOrInternalEnumArg' on 'UnionTypesTest': The provided value '' is not a valid enum value of type InternalEnum..
 
-
 PASS unionTypesTest.doubleOrStringSequenceArg([]) is ""
 PASS unionTypesTest.doubleOrStringSequenceArg([3.14, "foo"]) is "double: 3.14, string: foo"
 PASS unionTypesTest.doubleOrStringSequenceArg([1, "foo", "bar", 2]) is "double: 1, string: foo, string: bar, double: 2"
@@ -40,7 +38,6 @@
 PASS unionTypesTest.doubleOrStringSequenceArg(undefined) threw exception TypeError: Failed to execute 'doubleOrStringSequenceArg' on 'UnionTypesTest': The provided value cannot be converted to a sequence..
 PASS unionTypesTest.doubleOrStringSequenceArg({}) threw exception TypeError: Failed to execute 'doubleOrStringSequenceArg' on 'UnionTypesTest': Iterator getter is not callable..
 
-
 Tests for method arguments with defaults
 PASS unionTypesTest.doubleOrStringDefaultDoubleArg() is "double is passed: 3.14"
 PASS unionTypesTest.doubleOrStringDefaultDoubleArg(undefined) is "double is passed: 3.14"
@@ -54,7 +51,6 @@
 PASS unionTypesTest.doubleOrStringDefaultNullArg(3.14) is "double is passed: 3.14"
 PASS unionTypesTest.doubleOrStringDefaultNullArg("foo") is "string is passed: foo"
 
-
 Tests for nullable method arguments
 PASS unionTypesTest.nodeListOrElementOrNullArg(undefined) is "null or undefined is passed"
 PASS unionTypesTest.nodeListOrElementOrNullArg(null) is "null or undefined is passed"
@@ -69,7 +65,6 @@
 PASS unionTypesTest.nodeListOrElementArg(nodeList) is "nodelist is passed"
 PASS unionTypesTest.nodeListOrElementArg(element) is "element is passed"
 
-
 Tests for method arguments with sequence members
 PASS unionTypesTest.doubleOrStringOrStringSequenceArg() threw exception TypeError: Failed to execute 'doubleOrStringOrStringSequenceArg' on 'UnionTypesTest': 1 argument required, but only 0 present..
 PASS unionTypesTest.doubleOrStringOrStringSequenceArg("abc") is "string: abc"
@@ -81,7 +76,6 @@
 PASS unionTypesTest.doubleOrStringOrStringSequenceArg(["a", 3.14]) is "sequence: [a, 3.14]"
 PASS unionTypesTest.doubleOrStringOrStringSequenceArg(new Array(3)) is "sequence: [undefined, undefined, undefined]"
 
-
 Tests for nullable method arguments with sequence members
 PASS unionTypesTest.doubleOrStringOrStringSequenceNullableArg() threw exception TypeError: Failed to execute 'doubleOrStringOrStringSequenceNullableArg' on 'UnionTypesTest': 1 argument required, but only 0 present..
 PASS unionTypesTest.doubleOrStringOrStringSequenceNullableArg("abc") is "string: abc"
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
index cf0f3c5..d5d1bfb 100644
--- a/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
@@ -2,6 +2,7 @@
 
 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).
diff --git a/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
index cfcbc5c..7751372 100644
--- a/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
@@ -2,6 +2,7 @@
 
 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).
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
index 1709d3f..15877da5e 100644
--- a/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
@@ -2,6 +2,7 @@
 
 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).
diff --git a/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
index b6852b3..fbeb5e0 100644
--- a/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
@@ -2,6 +2,7 @@
 
 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).
diff --git a/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited-expected.txt b/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited-expected.txt
index 2f194393..d686f85 100644
--- a/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/animation/hidden-composited-expected.txt
@@ -2,8 +2,9 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS hiddenLayerIsComposited(documentLayerTree) is true
+
diff --git a/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-image-expected.txt b/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-image-expected.txt
index f36f6064..e220025 100644
--- a/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-image-expected.txt
@@ -1,7 +1,7 @@
-	
-	
 
 
-	
-	
+
+
+
+
 This test is only useful as a pixel test
diff --git a/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-webgl-expected.txt b/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-webgl-expected.txt
index f36f6064..e075492 100644
--- a/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-webgl-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/backface-visibility/backface-visibility-webgl-expected.txt
@@ -1,7 +1 @@
-	
-	
-
-
-	
-	
 This test is only useful as a pixel test
diff --git a/third_party/WebKit/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt
index e872aa7..821de3e4 100644
--- a/third_party/WebKit/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt
@@ -1 +1,3 @@
 This test should not ASSERT in debug builds.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/child-transform-layer-requires-box-expected.txt b/third_party/WebKit/LayoutTests/compositing/child-transform-layer-requires-box-expected.txt
index 514f70b..5106e42 100644
--- a/third_party/WebKit/LayoutTests/compositing/child-transform-layer-requires-box-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/child-transform-layer-requires-box-expected.txt
@@ -1 +1 @@
-This test passes if it does not crash. 
+This test passes if it does not crash.  
diff --git a/third_party/WebKit/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt b/third_party/WebKit/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt
index 162aa2a..13e675fc 100644
--- a/third_party/WebKit/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt
@@ -1 +1,3 @@
 This test should not assert.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/composited-negative-zindex-child-expected.txt b/third_party/WebKit/LayoutTests/compositing/composited-negative-zindex-child-expected.txt
index a80f1306..4ebf1bdb 100644
--- a/third_party/WebKit/LayoutTests/compositing/composited-negative-zindex-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/composited-negative-zindex-child-expected.txt
@@ -1 +1,3 @@
 This test should not assert in debug builds.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/contents-opaque/control-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/contents-opaque/control-layer-expected.txt
index 7ef22e9..aa44e7c 100644
--- a/third_party/WebKit/LayoutTests/compositing/contents-opaque/control-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/contents-opaque/control-layer-expected.txt
@@ -1 +1,2 @@
+
 PASS
diff --git a/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt
index b48440a7..7426a57 100644
--- a/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt
@@ -1,4 +1,4 @@
-{
+ {
   "layers": [
     {
       "name": "LayoutView #document",
diff --git a/third_party/WebKit/LayoutTests/compositing/draws-content/webgl-background-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/draws-content/webgl-background-layer-expected.txt
index 4de6ffc..6f43f1df 100644
--- a/third_party/WebKit/LayoutTests/compositing/draws-content/webgl-background-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/draws-content/webgl-background-layer-expected.txt
@@ -1,4 +1,4 @@
-{
+ {
   "layers": [
     {
       "name": "LayoutView #document",
diff --git a/third_party/WebKit/LayoutTests/compositing/empty-render-surface-crasher-expected.txt b/third_party/WebKit/LayoutTests/compositing/empty-render-surface-crasher-expected.txt
index cc6ae35..f8a23921 100644
--- a/third_party/WebKit/LayoutTests/compositing/empty-render-surface-crasher-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/empty-render-surface-crasher-expected.txt
@@ -1 +1,3 @@
 This page tests that an empty render surface does not crash as reported in this bug. Pass if this does not crash.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/no-overflow-iframe-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/no-overflow-iframe-layer-expected.txt
index 58ba65a..9f85343 100644
--- a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/no-overflow-iframe-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/no-overflow-iframe-layer-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-hidden-iframe-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-hidden-iframe-layer-expected.txt
index 58ba65a..9f85343 100644
--- a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-hidden-iframe-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-hidden-iframe-layer-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-enter-compositing-expected.txt b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-enter-compositing-expected.txt
index be3005b..638a5a93 100644
--- a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-enter-compositing-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-enter-compositing-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-layer-expected.txt
index fa8cede9..96818344 100644
--- a/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-layer-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
index 26e96d9..8dfbbf3d 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
@@ -1,3 +1,5 @@
+
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt
index c3a24b24..4a94af6d 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/clipped-video-controller-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/clipped-video-controller-expected.txt
index 43b8f00..94f55c6 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/clipped-video-controller-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/clipped-video-controller-expected.txt
@@ -1 +1,3 @@
 The video controller should not be visible below
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/empty-embed-rects-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/empty-embed-rects-expected.txt
index 9f35a26..d87ac3e 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/empty-embed-rects-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/empty-embed-rects-expected.txt
@@ -1 +1,4 @@
 This testcase should not fire an assertion related to the clip rects root.
+
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down-expected.txt
index 9026cbfbeb..ac7d3b8 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down-expected.txt
@@ -1,4 +1,2 @@
 TEST
-
-
 TEST
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-expected.txt
index 9026cbfbeb..ac7d3b8 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-expected.txt
@@ -1,4 +1,2 @@
 TEST
-
-
 TEST
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt
index f4c93e7..2b10116 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-scroll-expected.txt
@@ -1,4 +1,2 @@
 This test should not hit an assertion in LayoutGeometryMap in debug builds
-
-
 This test should not hit an assertion in LayoutGeometryMap in debug builds
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.txt
index 1855e92..ac745df 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down-expected.txt
@@ -1,3 +1,2 @@
 TEST
 
-
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.txt
index 1855e92..ac745df 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-expected.txt
@@ -1,3 +1,2 @@
 TEST
 
-
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.txt
index 9026cbfbeb..ac7d3b8 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.txt
@@ -1,4 +1,2 @@
 TEST
-
-
 TEST
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-expected.txt
index 9026cbfbeb..ac7d3b8 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-expected.txt
@@ -1,4 +1,2 @@
 TEST
-
-
 TEST
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
index 7c7ef798..728b584 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
@@ -1,5 +1,4 @@
- 
-
+  
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/geometry-map-scroll-during-layout-assertion-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/geometry-map-scroll-during-layout-assertion-expected.txt
index 64be4e2..0c828886 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/geometry-map-scroll-during-layout-assertion-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/geometry-map-scroll-during-layout-assertion-expected.txt
@@ -1 +1,3 @@
 This test should not hit an assertion in debug builds.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/object-clip-rects-assertion-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/object-clip-rects-assertion-expected.txt
index 022131d..74da4d2 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/object-clip-rects-assertion-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/object-clip-rects-assertion-expected.txt
@@ -1 +1,4 @@
 This testcase should not fire an assertion related to clip rects.
+
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/repaint-foreground-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/repaint-foreground-layer-expected.txt
index 8cb7cb9..5c484c2f 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/repaint-foreground-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/repaint-foreground-layer-expected.txt
@@ -1,2 +1,2 @@
- 
+  
 
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-inline-block-crash-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-inline-block-crash-expected.txt
index 2066125b..83364b62 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-inline-block-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-inline-block-crash-expected.txt
@@ -1 +1,2 @@
 Shoudn't crash
+
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-no-graphics-layer-region-based-multicol-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-no-graphics-layer-region-based-multicol-expected.txt
index 654ddf7f..0163abc 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-no-graphics-layer-region-based-multicol-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-no-graphics-layer-region-based-multicol-expected.txt
@@ -1 +1,2 @@
 This test passes if it does not crash.
+
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.txt
index b6f82aca..7b70c5c 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.txt
@@ -2,9 +2,6 @@
 
 TEST COMPLETE
 
-
-
 Target
 
-
 This test is successful if the rotated box labelled "Target" is covered in a green rectangle.
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt
index aded897..2403f44 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt
@@ -1,8 +1,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Link 1
 Target Link.
-Link 2
-This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
+Link 2 This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.txt
index 1d07593..5c04df2 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.txt
@@ -1,7 +1,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 Link 1
 Target Link.
 Link 2
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-with-squashing-expected.txt b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-with-squashing-expected.txt
index cd95eac8..512f1d8e 100644
--- a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-with-squashing-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-with-squashing-expected.txt
@@ -1 +1,2 @@
 Target Link.
+
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
index 2021656..ab3a4fb 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/become-overlapped-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/become-overlapped-iframe-expected.txt
index f9227d5..a0ca1cd 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/become-overlapped-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/become-overlapped-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/composited-iframe-transition-flicker-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/composited-iframe-transition-flicker-expected.txt
index acc734b..02725c86c 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/composited-iframe-transition-flicker-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/composited-iframe-transition-flicker-expected.txt
@@ -1 +1,2 @@
+
 PASS - layer trees are the same.
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt
index 6ef835a7..34974123 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt
index 2b0056f..56fc6648 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt
@@ -1,3 +1,4 @@
+
 When the parent document becomes composited, the layer trees should get connected together.
 
 {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt
index 4761343..99eeed0 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt
index 749f12a..f576f72 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt
index 94d4b5b..273d795 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/crash-mouse-event-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/crash-mouse-event-expected.txt
index 730ebf6..5689e4d3 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/crash-mouse-event-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/crash-mouse-event-expected.txt
@@ -1 +1,2 @@
+
 This test passes if it doesn't crash.
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt
index 6740182..b8c4d9ea 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-expected.txt
index 7ef22e9..3be5dec 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-expected.txt
@@ -1 +1,2 @@
+ 
 PASS
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-hide-and-show-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-hide-and-show-expected.txt
index d545c05..7274374 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-hide-and-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-composited-scrolling-hide-and-show-expected.txt
@@ -2,10 +2,11 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS internals.nonFastScrollableRects(document).length is 1
 PASS internals.nonFastScrollableRects(document).length is 0
 PASS internals.nonFastScrollableRects(document).length is 1
+
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-resize-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-resize-expected.txt
index d0bbba2..3218c6a 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-resize-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-resize-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-from-zero-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-from-zero-expected.txt
index 980720c..3fc1d9d 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-from-zero-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-from-zero-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-to-zero-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-to-zero-expected.txt
index b97d8217..0d03794 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-to-zero-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/iframe-size-to-zero-expected.txt
@@ -1 +1,2 @@
+
 PASS: Had layers before and after
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
index feaa11f..f5c266c 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/layout-on-compositing-change-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/layout-on-compositing-change-expected.txt
index 214cb27..a33e947 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/layout-on-compositing-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/layout-on-compositing-change-expected.txt
@@ -1,2 +1,2 @@
-Text
+Text  
 PASS: hit target node in iframe
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-expected.txt
index f76bbad9..337c8ded 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
index 368814d..c915ecb 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/resizer-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/resizer-expected.txt
index fde143c..6a316bb 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/resizer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/resizer-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt
index b3aefc4..791f495 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/images/clip-on-directly-composited-image-expected.txt b/third_party/WebKit/LayoutTests/compositing/images/clip-on-directly-composited-image-expected.txt
index 084d67ae..76ea8b3 100644
--- a/third_party/WebKit/LayoutTests/compositing/images/clip-on-directly-composited-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/images/clip-on-directly-composited-image-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/images/content-image-expected.txt b/third_party/WebKit/LayoutTests/compositing/images/content-image-expected.txt
index fc0660cf..d31f6ea 100644
--- a/third_party/WebKit/LayoutTests/compositing/images/content-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/images/content-image-expected.txt
@@ -1 +1,3 @@
 This test should not crash.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/images/direct-image-dynamic-border-draws-content-expected.txt b/third_party/WebKit/LayoutTests/compositing/images/direct-image-dynamic-border-draws-content-expected.txt
index fb9346e9..8d8afad 100644
--- a/third_party/WebKit/LayoutTests/compositing/images/direct-image-dynamic-border-draws-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/images/direct-image-dynamic-border-draws-content-expected.txt
@@ -1,3 +1,4 @@
+
 layer tree before image style change
 
 {
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/animation-overlap-with-children-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/animation-overlap-with-children-expected.txt
index 92a79fe..747061877 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/animation-overlap-with-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/animation-overlap-with-children-expected.txt
@@ -1,5 +1,4 @@
-Should be composited
-Should not be composited
+Should be compositedShould not be composited
 Should be composited
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt
index 0dadb24..f97d6cc 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt
@@ -33,7 +33,6 @@
     }
   ]
 }
-
 Layer tree when the fixed elements are in-view (both fixed elements should have layers):
 {
   "layers": [
@@ -70,7 +69,6 @@
     }
   ]
 }
-
 Layer tree when the fixed elements are out-of-view again (should have just a root layer):
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-view-dynamic-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-view-dynamic-expected.txt
index 7ef22e9..69cfc5a9 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-view-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-in-view-dynamic-expected.txt
@@ -1 +1,2 @@
 PASS
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-invisible-scroll-reasons-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-invisible-scroll-reasons-expected.txt
index 11b9a5f..c927bfb9 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-invisible-scroll-reasons-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-invisible-scroll-reasons-expected.txt
@@ -1 +1,2 @@
 Main thread scrolling reasons should be blank:
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt
index 11b9a5f..c927bfb9 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt
@@ -1 +1,2 @@
 Main thread scrolling reasons should be blank:
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt
index 305e27b..85d5be0 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt
@@ -57,5 +57,4 @@
     }
   ]
 }
-
-Composited box underneath iframe.
+Composited box underneath iframe. 
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-dynamic-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-dynamic-expected.txt
index 7ef22e9..69cfc5a9 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-dynamic-expected.txt
@@ -1 +1,2 @@
 PASS
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-positioning-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-positioning-expected.txt
index ce6f693..647b13d4 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-positioning-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-positioning-expected.txt
@@ -2,7 +2,6 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 The layer trees before and after should be the same, except for the position of the 50x50 sized composited fixed position layer.
 BEFORE:
 {
@@ -54,7 +53,6 @@
     }
   ]
 }
-
 AFTER:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt
index 425897e..fe2a07fc 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt
@@ -54,7 +54,6 @@
     }
   ]
 }
-
 Scale=0.5:
 {
   "layers": [
@@ -111,7 +110,6 @@
     }
   ]
 }
-
 Scale=1.5:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-expected.txt
index 7ef22e9..aa44e7c 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-expected.txt
@@ -1 +1,2 @@
+
 PASS
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll-expected.txt
index 7ef22e9..aa44e7c 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll-expected.txt
@@ -1 +1,2 @@
+
 PASS
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt
index bf761e4..20cc1ac 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt
@@ -73,7 +73,6 @@
     }
   ]
 }
-
 Scale=0.5:
 {
   "layers": [
@@ -149,7 +148,6 @@
     }
   ]
 }
-
 Scale=1.5:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scroll-reason-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scroll-reason-expected.txt
index 11b9a5f..c927bfb9 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scroll-reason-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-out-of-view-scroll-reason-expected.txt
@@ -1 +1,2 @@
 Main thread scrolling reasons should be blank:
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed-expected.txt
index 615b4fc0..6dbe35c 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/iframe-background-attachment-fixed-expected.txt
@@ -1,2 +1,4 @@
 Main frame scrolls on impl
 The iFrame scrolls on main thread, reasons: Has background-attachment:fixed
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-for-non-composited-fixed-position-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-for-non-composited-fixed-position-expected.txt
index cf8f0f74..4b17ce5 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-for-non-composited-fixed-position-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-for-non-composited-fixed-position-expected.txt
@@ -20,5 +20,4 @@
     }
   ]
 }
-
 Has non-layer viewport-constrained objects
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-non-composited-fixed-overflow-hidden-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-non-composited-fixed-overflow-hidden-expected.txt
index 71b4bdf3..3c2a447 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-non-composited-fixed-overflow-hidden-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/main-thread-scrolling-non-composited-fixed-overflow-hidden-expected.txt
@@ -20,5 +20,4 @@
     }
   ]
 }
-
 Has non-layer viewport-constrained objects
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt
index e9c40720..afdcb847 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt
@@ -1,10 +1,4 @@
-1
-2
-3
-4
-5
-6
-Before:
+123456Before:
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/rotate3d-overlap-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/rotate3d-overlap-expected.txt
index 18d762a..a15ea10 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/rotate3d-overlap-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/rotate3d-overlap-expected.txt
@@ -1,7 +1,6 @@
  
  
-
-{
+ {
   "layers": [
     {
       "name": "LayoutView #document",
diff --git a/third_party/WebKit/LayoutTests/compositing/layout-width-change-expected.txt b/third_party/WebKit/LayoutTests/compositing/layout-width-change-expected.txt
index 7100761..d160e94 100644
--- a/third_party/WebKit/LayoutTests/compositing/layout-width-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layout-width-change-expected.txt
@@ -1 +1,3 @@
 There should be no white gap at the right hand side of the box.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children-expected.txt
index 76712a1..c61aaf8 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/avoid-ancestor-clip-for-scroll-children-expected.txt
@@ -2,8 +2,9 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS scrollChildHasNoScrollClip(documentLayerTree) is true
+
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
index 8b13789..139597f9 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
@@ -1 +1,2 @@
 
+
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping-expected.txt
index 162aa2a..71d0fac 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping-expected.txt
@@ -1 +1,4 @@
 This test should not assert.
+
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-nested-scroll-children-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-nested-scroll-children-expected.txt
index b0b4200..0e57acc0 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-nested-scroll-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-nested-scroll-children-expected.txt
@@ -1 +1,2 @@
+
 Pass -- this test passes if it does not crash.
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-scroll-children-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-scroll-children-expected.txt
index b0b4200..70b9cf1 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/iframe-scroll-children-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/iframe-scroll-children-expected.txt
@@ -1 +1,2 @@
+  
 Pass -- this test passes if it does not crash.
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-pointer-events-toggle-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-pointer-events-toggle-expected.txt
index 28ed87a6..ae4d3991 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-pointer-events-toggle-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-pointer-events-toggle-expected.txt
@@ -2,10 +2,10 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS elementSubtreeHasCompositedScrollLayers(scroller) is false
 PASS elementSubtreeHasCompositedScrollLayers(scroller) is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 It should be possible to scroll this div.
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt
index c7b83c1..b2b93e1 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/scrolls-with-respect-to-expected.txt
@@ -1,3 +1,4 @@
+
 This test ensures that Layer::scrollsWithRespectTo always returns the correct answer on relatively "basic" elements as well as fixed- and absolute-positioned elements (ie, those with non-obvious containing blocks), and iframes.
 
 predecessor does not scroll with respect to predecessor
diff --git a/third_party/WebKit/LayoutTests/compositing/scrollbars/custom-composited-add-vertical-then-horizontal-expected.txt b/third_party/WebKit/LayoutTests/compositing/scrollbars/custom-composited-add-vertical-then-horizontal-expected.txt
index 6a87415..99691f0c 100644
--- a/third_party/WebKit/LayoutTests/compositing/scrollbars/custom-composited-add-vertical-then-horizontal-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/scrollbars/custom-composited-add-vertical-then-horizontal-expected.txt
@@ -1 +1,2 @@
 Tests adding composited horizontal custom scrollbar then the vertical scrollbar. Passes if no assertion failure.
+
diff --git a/third_party/WebKit/LayoutTests/compositing/self-painting-layers2-expected.txt b/third_party/WebKit/LayoutTests/compositing/self-painting-layers2-expected.txt
index a80f1306..4ebf1bdb 100644
--- a/third_party/WebKit/LayoutTests/compositing/self-painting-layers2-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/self-painting-layers2-expected.txt
@@ -1 +1,3 @@
 This test should not assert in debug builds.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
index ccf3493..3e4f79ed 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
@@ -50,7 +50,6 @@
     }
   ]
 }
-
 CASE 2, overlap3 gets added:
 {
   "layers": [
@@ -108,7 +107,6 @@
     }
   ]
 }
-
 CASE 3, overlap2 gets removed. Since this does not resize the layer, there should only be a repaint of overlap2:
 {
   "layers": [
@@ -166,7 +164,6 @@
     }
   ]
 }
-
 CASE 4, overlap1 gets removed:
 {
   "layers": [
@@ -229,7 +226,6 @@
     }
   ]
 }
-
 CASE 5, overlap2 gets added back:
 {
   "layers": [
@@ -297,7 +293,6 @@
     }
   ]
 }
-
 CASE 6, overlap1 gets added back, and overlap3 gets removed:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/backing-owner-determines-scroll-parent-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/backing-owner-determines-scroll-parent-expected.txt
index 654ddf7f..0163abc 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/backing-owner-determines-scroll-parent-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/backing-owner-determines-scroll-parent-expected.txt
@@ -1 +1,2 @@
 This test passes if it does not crash.
+
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/clipping-backface-assert-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/clipping-backface-assert-expected.txt
index 730ebf6..5689e4d3 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/clipping-backface-assert-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/clipping-backface-assert-expected.txt
@@ -1 +1,2 @@
+
 This test passes if it doesn't crash.
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/do-not-squash-scroll-child-with-composited-descendants-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/do-not-squash-scroll-child-with-composited-descendants-expected.txt
index e93ccb1..5fe79f2 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/do-not-squash-scroll-child-with-composited-descendants-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/do-not-squash-scroll-child-with-composited-descendants-expected.txt
@@ -2,8 +2,9 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS scrollChildDoesNotSquash(layers) is true
+
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/repaint-child-of-squashed-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/repaint-child-of-squashed-expected.txt
index 730547ae..dfa767d3 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/repaint-child-of-squashed-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/repaint-child-of-squashed-expected.txt
@@ -48,7 +48,6 @@
     }
   ]
 }
-
 CASE 2, change color of "inner" to red
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
index d32f30c4..79a78f7 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
@@ -58,7 +58,6 @@
     }
   ]
 }
-
 CASE 2, scrolling y to 80, new layers will be squashed, so things repaint:
 {
   "layers": [
@@ -156,7 +155,6 @@
     }
   ]
 }
-
 CASE 3, scrolling y to 120, no repaints expected:
 {
   "layers": [
@@ -228,7 +226,6 @@
     }
   ]
 }
-
 CASE 4, scrolling y to 170 new layers will be squashed, so things repaint:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-2-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-2-expected.txt
index 92086f0..10482c6 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-2-expected.txt
@@ -43,7 +43,6 @@
     }
   ]
 }
-
 CASE 2, scrolling y to 80, the "container" element should remain positioned with respect to the scrolled document, the fixed-pos layer compensates for the new scroll position:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-3-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-3-expected.txt
index 5892d44..a3e4f5f 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-3-expected.txt
@@ -62,7 +62,6 @@
     }
   ]
 }
-
 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should scroll properly.
 {
   "layers": [
@@ -148,7 +147,6 @@
     }
   ]
 }
-
 CASE 3, scrolling y further so that "inner" no longer overlaps the fixed-pos layer, then the stacking context of "container" includes the "innerScrolling" layer, and doubles in width:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-compositing-hover-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-compositing-hover-expected.txt
index 23ba0eeb..5bfabd0 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-compositing-hover-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-compositing-hover-expected.txt
@@ -65,7 +65,6 @@
     }
   ]
 }
-
 Case 2: hovering over the "middle" element (causes that div to become its own composited layer)
 {
   "layers": [
@@ -147,7 +146,6 @@
     }
   ]
 }
-
 Case 3: hovering over the "middle2" element (causes that div to become its own composited layer)
 {
   "layers": [
@@ -239,7 +237,6 @@
     }
   ]
 }
-
 Case 4: hovering over the "top" element (causes that div to become its own composited layer)
 {
   "layers": [
@@ -321,7 +318,6 @@
     }
   ]
 }
-
 Case 5: back to situation in case 1
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-child-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-child-expected.txt
index 7267467..1d57dcd 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-child-expected.txt
@@ -48,7 +48,6 @@
     }
   ]
 }
-
 CASE 2, hovering over the outer div
 {
   "layers": [
@@ -106,7 +105,6 @@
     }
   ]
 }
-
 CASE 3, hovering over the inner div
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
index 5a7ca24..90e22ab2 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
@@ -48,7 +48,6 @@
     }
   ]
 }
-
 CASE 2, hovering over the outer div
 {
   "layers": [
@@ -106,7 +105,6 @@
     }
   ]
 }
-
 CASE 3, hovering over the inner div
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
index ba6b31e..f739e97 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
@@ -50,7 +50,6 @@
     }
   ]
 }
-
 CASE 2, The original composited layer is no longer composited, which then also removes all squashing layers. The important point is that there should be an appropriate repaint to the root GraphicsLayer:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
index 0836614..3060765 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-repaints-expected.txt
@@ -50,7 +50,6 @@
     }
   ]
 }
-
 CASE 2, overlap1 changes color:
 {
   "layers": [
@@ -108,7 +107,6 @@
     }
   ]
 }
-
 CASE 3, overlap1 and overlap2 change color:
 {
   "layers": [
@@ -171,7 +169,6 @@
     }
   ]
 }
-
 CASE 4, overlap2 and overlap3 change color:
 {
   "layers": [
@@ -234,7 +231,6 @@
     }
   ]
 }
-
 CASE 5, overlap3 and overlap1 change color:
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/compositing/transitions/opacity-on-inline-expected.txt b/third_party/WebKit/LayoutTests/compositing/transitions/opacity-on-inline-expected.txt
index 381c538..31b94bb2 100644
--- a/third_party/WebKit/LayoutTests/compositing/transitions/opacity-on-inline-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/transitions/opacity-on-inline-expected.txt
@@ -1,3 +1,4 @@
 This should not assert in debug builds
 
 Opacity fade on inline
+
diff --git a/third_party/WebKit/LayoutTests/compositing/visibility/compositing-and-visibility-turned-off-together-expected.txt b/third_party/WebKit/LayoutTests/compositing/visibility/compositing-and-visibility-turned-off-together-expected.txt
index fe71b0c5..7bfa5a8 100644
--- a/third_party/WebKit/LayoutTests/compositing/visibility/compositing-and-visibility-turned-off-together-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/visibility/compositing-and-visibility-turned-off-together-expected.txt
@@ -1 +1,3 @@
 This test verifies no assertion failure is raised when visibility and need for compositing are turned off at same time.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/visibility/hidden-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/visibility/hidden-iframe-expected.txt
index b255f995..f100fee 100644
--- a/third_party/WebKit/LayoutTests/compositing/visibility/hidden-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/visibility/hidden-iframe-expected.txt
@@ -1 +1,3 @@
 PASS: test did not hang.
+
+
diff --git a/third_party/WebKit/LayoutTests/compositing/visibility/visibility-image-layers-expected.txt b/third_party/WebKit/LayoutTests/compositing/visibility/visibility-image-layers-expected.txt
index 8cb7cb9..92371a0 100644
--- a/third_party/WebKit/LayoutTests/compositing/visibility/visibility-image-layers-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/visibility/visibility-image-layers-expected.txt
@@ -1,2 +1,3 @@
  
 
+
diff --git a/third_party/WebKit/LayoutTests/compositing/webgl/webgl-copy-image-expected.txt b/third_party/WebKit/LayoutTests/compositing/webgl/webgl-copy-image-expected.txt
index 742a20ea..b80eb55 100644
--- a/third_party/WebKit/LayoutTests/compositing/webgl/webgl-copy-image-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/webgl/webgl-copy-image-expected.txt
@@ -1,7 +1,6 @@
-PASS successfullyParsed is true
+ PASS successfullyParsed is true
 
 TEST COMPLETE
-
 PASS pixel[0] is within 1 of 255
 PASS pixel[1] is within 1 of 0
 PASS pixel[2] is within 1 of 0
diff --git a/third_party/WebKit/LayoutTests/crypto/array-buffer-view-offset-expected.txt b/third_party/WebKit/LayoutTests/crypto/array-buffer-view-offset-expected.txt
index 874b4185..60943e5 100644
--- a/third_party/WebKit/LayoutTests/crypto/array-buffer-view-offset-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/array-buffer-view-offset-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS bytesToHexString(new Uint8Array(digest)) is '2c7e7c384f7829694282b1e3a6216def8082d055'
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/crypto-gc-expected.txt b/third_party/WebKit/LayoutTests/crypto/crypto-gc-expected.txt
index 66f3b52..0e9b8a9 100644
--- a/third_party/WebKit/LayoutTests/crypto/crypto-gc-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/crypto-gc-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS window.crypto.foo is "bar"
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/gc-2-expected.txt b/third_party/WebKit/LayoutTests/crypto/gc-2-expected.txt
index b33795f..40f7fdff 100644
--- a/third_party/WebKit/LayoutTests/crypto/gc-2-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/gc-2-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS [object Crypto] is defined.
 PASS [object SubtleCrypto] is defined.
 PASS anotherWindowCrypto.subtle.foo is "bar"
diff --git a/third_party/WebKit/LayoutTests/crypto/gc-3-expected.txt b/third_party/WebKit/LayoutTests/crypto/gc-3-expected.txt
index 5e1d4ab..bd2e48b 100644
--- a/third_party/WebKit/LayoutTests/crypto/gc-3-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/gc-3-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS [object Crypto] is defined.
 PASS [object SubtleCrypto] is defined.
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/gc-expected.txt b/third_party/WebKit/LayoutTests/crypto/gc-expected.txt
index 43b925e5..f9c1a72 100644
--- a/third_party/WebKit/LayoutTests/crypto/gc-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/gc-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS window.crypto.subtle.foo is "bar"
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/random-values-expected.txt b/third_party/WebKit/LayoutTests/crypto/random-values-expected.txt
index a72656e1..1334f1f 100644
--- a/third_party/WebKit/LayoutTests/crypto/random-values-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/random-values-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS 'crypto' in self is true
 PASS 'getRandomValues' in self.crypto is true
 PASS self.crypto.__proto__.hasOwnProperty('getRandomValues') is true
diff --git a/third_party/WebKit/LayoutTests/crypto/random-values-limits-expected.txt b/third_party/WebKit/LayoutTests/crypto/random-values-limits-expected.txt
index a486ca19..72d8cc5 100644
--- a/third_party/WebKit/LayoutTests/crypto/random-values-limits-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/random-values-limits-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS 'crypto' in self is true
 PASS 'getRandomValues' in self.crypto is true
 PASS crypto.getRandomValues(almostTooLargeArray) did not throw exception.
diff --git a/third_party/WebKit/LayoutTests/crypto/random-values-types-expected.txt b/third_party/WebKit/LayoutTests/crypto/random-values-types-expected.txt
index 98ad8f3..301192071 100644
--- a/third_party/WebKit/LayoutTests/crypto/random-values-types-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/random-values-types-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS 'crypto' in self is true
 PASS 'getRandomValues' in self.crypto is true
 PASS crypto.getRandomValues() threw exception TypeError: Failed to execute 'getRandomValues' on 'Crypto': 1 argument required, but only 0 present..
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation-expected.txt
index c0edff3..74a911cde 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Worker started
 Worker started
 Worker started
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation2-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation2-expected.txt
index 400bd56..a4a0bff 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation2-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/abandon-crypto-operation2-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Worker started
 Successfully generated AES-CBC key
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/cloneKey-expected.txt
index e89b6b8..3a637070 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b010110031030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -39,7 +39,6 @@
 Serialized key bytes: 5c4b010120032000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -58,7 +57,6 @@
 Serialized key bytes: 5c4b010110451030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -77,7 +75,6 @@
 Serialized key bytes: 5c4b010120452000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -96,7 +93,6 @@
 Serialized key bytes: 5c4b010110c3011030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -115,7 +111,6 @@
 Serialized key bytes: 5c4b010120c3012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -133,7 +128,6 @@
 PASS clonedKey.usages.join(',') is "encrypt"
 Serialized key bytes: 5c4b010110021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -151,7 +145,6 @@
 PASS clonedKey.usages.join(',') is "encrypt"
 Serialized key bytes: 5c4b010120022000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -169,7 +162,6 @@
 PASS clonedKey.usages.join(',') is "decrypt,wrapKey"
 Serialized key bytes: 5c4b010110441030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -187,7 +179,6 @@
 PASS clonedKey.usages.join(',') is "decrypt,wrapKey"
 Serialized key bytes: 5c4b010120442000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -205,7 +196,6 @@
 PASS clonedKey.usages.join(',') is "encrypt,wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010110c2011030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -223,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "encrypt,wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010120c2012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/decrypt-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/decrypt-failures-expected.txt
index 02a88b9..ce29588 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/decrypt-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/decrypt-failures-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS: Decryption succeeded
 error is: OperationError
 PASS: decrypting failed. ciphertext length: 0
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/encrypt-decrypt-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/encrypt-decrypt-expected.txt
index e6faf13..b64d77fa 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/encrypt-decrypt-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/encrypt-decrypt-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/failures-expected.txt
index 7d2d728c..3df8e29 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing AES-CBC key...
 
 encrypt() with iv that is null...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generate-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generate-key-expected.txt
index 7c8f85b..8cace648 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generate-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generate-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key...
 error is: TypeError: AesKeyGenParams: length: Missing required property
 error is: TypeError: AesKeyGenParams: length: Is not a number
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generateKey-failures-expected.txt
index bc44f34..d262cbb 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() with invalid keyUsages value that is -1...
 error is: TypeError: Failed to execute 'generateKey' on 'SubtleCrypto': The provided value cannot be converted to a sequence.
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/import-jwk-expected.txt
index f8e4e24a..f913f82 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/import-jwk-expected.txt
@@ -2,8 +2,8 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-Importing a key...
 
+Importing a key...
 PASS key.type is 'secret'
 PASS key.extractable is false
 PASS key.algorithm.name is 'AES-CBC'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/invalid-length-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/invalid-length-expected.txt
index a6dd91d..7e86d25 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/invalid-length-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/invalid-length-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a raw AES key from string literal...
 error is: DataError: AES key data must be 128 or 256 bits
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-failures-expected.txt
index cb9957f9..c785c7e4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-failures-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing an unwrapping key...
 PASS unwrappingKey.algorithm.name is 'AES-CBC'
 Unwrapping a key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-rsa-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-rsa-expected.txt
index 804decada..c17cd326 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-rsa-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/unwrap-rsa-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing an unwrapping key...
 PASS unwrappingKey.algorithm.name is 'AES-CBC'
 Unwrapping a key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-expected.txt
index 4b4f8fba..3a34fdf 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a key to wrap...
 PASS key.algorithm.name is 'RSASSA-PKCS1-v1_5'
 Importing a key encryption key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-non-extractable-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-non-extractable-expected.txt
index 69becf5..66f06587 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-non-extractable-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrap-rsa-non-extractable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a key to wrap...
 PASS key.algorithm.name is 'RSASSA-PKCS1-v1_5'
 Importing a key encryption key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrong-key-class-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrong-key-class-expected.txt
index b2c27d28..31677a9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrong-key-class-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-cbc/wrong-key-class-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a raw HMAC key from string literal...
 Using the HMAC key for AES-CBC encryption...
 error is: InvalidAccessError: key.algorithm does not match that of operation
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/cloneKey-expected.txt
index 581a002..fd70462 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b010b10c1011030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -39,7 +39,6 @@
 Serialized key bytes: 5c4b010b20c1012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -57,7 +56,6 @@
 PASS clonedKey.usages.join(',') is "wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010b10c0011030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -75,7 +73,6 @@
 PASS clonedKey.usages.join(',') is "wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010b20c0012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/failures-expected.txt
index 042d7e7..39d46d9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing AES-CBC key...
 
 encrypt() with counter null...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/generateKey-failures-expected.txt
index f56f7335..2edd6d9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-ctr/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() without length...
 error is: TypeError: AesKeyGenParams: length: Missing required property
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-export-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-export-key-expected.txt
index 4c028ea..1c6877f6 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-export-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-export-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Failed to execute 'exportKey' on 'SubtleCrypto': 2 arguments required, but only 1 present.
 error is: TypeError: Failed to execute 'exportKey' on 'SubtleCrypto': parameter 2 is not of type 'CryptoKey'.
 error is: TypeError: Failed to execute 'exportKey' on 'SubtleCrypto': parameter 2 is not of type 'CryptoKey'.
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/cloneKey-expected.txt
index ed0bf7e..e21c52d 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b010910031030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -39,7 +39,6 @@
 Serialized key bytes: 5c4b010920032000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -58,7 +57,6 @@
 Serialized key bytes: 5c4b010910451030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -77,7 +75,6 @@
 Serialized key bytes: 5c4b010920452000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -96,7 +93,6 @@
 Serialized key bytes: 5c4b010910c3011030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -115,7 +111,6 @@
 Serialized key bytes: 5c4b010920c3012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -133,7 +128,6 @@
 PASS clonedKey.usages.join(',') is "encrypt"
 Serialized key bytes: 5c4b010910021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -151,7 +145,6 @@
 PASS clonedKey.usages.join(',') is "encrypt"
 Serialized key bytes: 5c4b010920022000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -169,7 +162,6 @@
 PASS clonedKey.usages.join(',') is "decrypt,wrapKey"
 Serialized key bytes: 5c4b010910441030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -187,7 +179,6 @@
 PASS clonedKey.usages.join(',') is "decrypt,wrapKey"
 Serialized key bytes: 5c4b010920442000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -205,7 +196,6 @@
 PASS clonedKey.usages.join(',') is "encrypt,wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010910c2011030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -223,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "encrypt,wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010920c2012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/encrypt-decrypt-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/encrypt-decrypt-expected.txt
index 3245d055..fde0a4cd 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/encrypt-decrypt-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/encrypt-decrypt-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/failures-expected.txt
index f8919a7..947738bb 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-gcm/failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing AES-GCM key...
 
 encrypt() without iv...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-generateKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-generateKey-expected.txt
index 45b3497..64da958 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-generateKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-generateKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS typeof generatedKey.extractable is 'boolean'
 PASS generatedKey.extractable is true
 PASS generatedKey.algorithm.name is "AES-CBC"
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-algorithm-mismatch-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-algorithm-mismatch-expected.txt
index e074475..f5e30cd3 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-algorithm-mismatch-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-algorithm-mismatch-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.algorithm.name is "AES-GCM"
 error is: InvalidAccessError: key.algorithm does not match that of operation
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-usages-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-usages-expected.txt
index 7ebbf61..14667cf 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-usages-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-key-usages-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: InvalidAccessError: key.usages does not permit this operation
 error is: InvalidAccessError: key.usages does not permit this operation
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/cloneKey-expected.txt
index f6d837e..1be6f63 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b010c10c1011030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -39,7 +39,6 @@
 Serialized key bytes: 5c4b010c20c1012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 PASS: Cloned key exported data should be [00112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -57,7 +56,6 @@
 PASS clonedKey.usages.join(',') is "wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010c10c0011030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -75,7 +73,6 @@
 PASS clonedKey.usages.join(',') is "wrapKey,unwrapKey"
 Serialized key bytes: 5c4b010c20c0012000112233445546778899aabbccddeeff000102030405060708090a0b0c0d0e0f
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/generateKey-failures-expected.txt
index 14649f2..de684b6e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() without length...
 SUCCESS (rejected): TypeError: AesKeyGenParams: length: Missing required property
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/key-manipulation-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/key-manipulation-expected.txt
index 690a45b5..05285fb 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/key-manipulation-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/key-manipulation-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Generating a key...
 SUCCESS
 PASS key.toString() is '[object CryptoKey]'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrap-unwrap-aes-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrap-unwrap-aes-expected.txt
index 4d072d8..d63bb55a 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrap-unwrap-aes-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrap-unwrap-aes-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing key encryption key...
 Importing a key to be wrapped...
 Wrapping it...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrapKey-unwrapKey-raw-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrapKey-unwrapKey-raw-expected.txt
index e404b5fb..68f5f7e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrapKey-unwrapKey-raw-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/aes-kw/wrapKey-unwrapKey-raw-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS: Wrapped key data should be [1fa68b0a8112b447aef34bd8fb5a7b829d3e862371d2cfe5] and was
 PASS unwrappedKey.algorithm.name is "HMAC"
 PASS unwrappedKey.algorithm.hash.name is "SHA-1"
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/algorithm-identifier-as-string-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/algorithm-identifier-as-string-expected.txt
index a533487..35f3a76 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/algorithm-identifier-as-string-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/algorithm-identifier-as-string-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.type is "secret"
 PASS key.algorithm.name is "AES-CBC"
 PASS key.algorithm.length is 128
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/cryptokey-interface-is-visible-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/cryptokey-interface-is-visible-expected.txt
index 361c6bdd..e67dc942 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/cryptokey-interface-is-visible-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/cryptokey-interface-is-visible-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys-expected.txt
index cdd3ebf..128edef 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/derive-hkdf-keys-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Derive an HKDF key from ECDH keys
 PASS hkdfKey.algorithm.name is "HKDF"
 PASS typeof hkdfKey.extractable is 'boolean'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/deserialize-legacy-aes-key-empty-usages-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/deserialize-legacy-aes-key-empty-usages-expected.txt
index 71b69cc..c171db9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/deserialize-legacy-aes-key-empty-usages-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/deserialize-legacy-aes-key-empty-usages-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.type is "secret"
 PASS key.extractable is true
 PASS key.algorithm.name is "AES-CBC"
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/digest-arraybuffer-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/digest-arraybuffer-expected.txt
index 16eb8bf..fc7679f0 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/digest-arraybuffer-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/digest-arraybuffer-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS: sha-256 of [0] should be [6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d] and was
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/digest-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/digest-failures-expected.txt
index 04f327f..d3ccbe5 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/digest-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/digest-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 digest() without data argument...
 error is: TypeError: Failed to execute 'digest' on 'SubtleCrypto': 2 arguments required, but only 1 present.
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-private-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-private-key-expected.txt
index d8ea33a..88cee675 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-private-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-private-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing a PKCS8 key...
 
 Exporting the key as JWK...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-public-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-public-key-expected.txt
index 2424f83f..2a40568 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-public-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ec-export-public-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing a SPKI key...
 
 Exporting the key as JWK...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/cloneKey-expected.txt
index 18b20fed..3942bf1 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b050f0101015b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 PASS: Cloned key exported data should be [3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -38,7 +38,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050f0101005b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -57,7 +56,6 @@
 Serialized key bytes: 5c4b050f010201783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 PASS: Cloned key exported data should be [3076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -75,7 +73,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050f010200783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -94,7 +91,6 @@
 Serialized key bytes: 5c4b050f0103019e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 PASS: Cloned key exported data should be [30819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -112,7 +108,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050f0103009e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -131,7 +126,6 @@
 Serialized key bytes: 5c4b050f020181028a01308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6
 PASS: Cloned key exported data should be [308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -149,7 +143,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b050f020180028a01308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -168,7 +161,6 @@
 Serialized key bytes: 5c4b050f02028102b9013081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e
 PASS: Cloned key exported data should be [3081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -186,7 +178,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b050f02028002b9013081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -205,7 +196,6 @@
 Serialized key bytes: 5c4b050f02038102f1013081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d
 PASS: Cloned key exported data should be [3081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -223,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b050f02038002f1013081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-expected.txt
index 42e5772..19a22d4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-expected.txt
@@ -2,12 +2,10 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing the private key...
-
 Importing the public key...
-
 Deriving 521 bits...
-
 PASS: Derived Bytes should be [0117d54d84379d0fd385be068455a77a5366ab534ff172ab0a121f37d180dccd19607abb0c41cb9f6f12b01303ac4a69dc2d1d05180181fd496d9769b46bffec3400] and was
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-failures-expected.txt
index 19038ca3..6d658d2 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveBits-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 deriveBits() without algorithm name or public key...
 error is: TypeError: Algorithm: name: Missing or not a string
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-aes-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-aes-expected.txt
index 5372872f5..c48e2499 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-aes-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-aes-expected.txt
@@ -2,12 +2,10 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing the private key...
-
 Importing the public key...
-
 Deriving an AES 128 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is true
@@ -16,7 +14,6 @@
 PASS key.usages.join(',') is "encrypt"
 PASS: Derived Bytes should be [0117d54d84379d0fd385be068455a77a] and was
 Deriving an AES 256 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is true
@@ -25,7 +22,6 @@
 PASS key.usages.join(',') is "encrypt,decrypt"
 PASS: Derived Bytes should be [0117d54d84379d0fd385be068455a77a5366ab534ff172ab0a121f37d180dccd] and was
 Deriving an AES 256 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-failures-expected.txt
index eff0912..387b498 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-failures-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing the private key...
 Importing the public key...
 
@@ -56,7 +57,6 @@
 Deriving an RSA-OAEP key using ECDH...
 error is: NotSupportedError: RSA-OAEP: Unsupported operation: get key length
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-hmac-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-hmac-expected.txt
index d419c98..e1edbd9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-hmac-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/deriveKey-hmac-expected.txt
@@ -2,12 +2,10 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing the private key...
-
 Importing the public key...
-
 Deriving an HMAC 136 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is true
@@ -17,7 +15,6 @@
 PASS key.usages.join(',') is "sign"
 PASS: Derived Bytes should be [0117d54d84379d0fd385be068455a77a53] and was
 Deriving an HMAC 256 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is true
@@ -27,7 +24,6 @@
 PASS key.usages.join(',') is "sign,verify"
 PASS: Derived Bytes should be [0117d54d84379d0fd385be068455a77a5366ab534ff172ab0a121f37d180dccd19607abb0c41cb9f6f12b01303ac4a69dc2d1d05180181fd496d9769b46bffec] and was
 Deriving an HMAC 256 bit key...
-
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/generate-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/generate-key-expected.txt
index b66a0a7a..f966fa9 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/generate-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/generate-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-export-raw-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-export-raw-expected.txt
index 87686bc..9ef69a168 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-export-raw-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-export-raw-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing raw (uncompressed) public key...
 PASS publicKey.toString() is '[object CryptoKey]'
 PASS publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-jwk-expected.txt
index 128f1ea4..e51538e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdh/import-jwk-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a public key...
 PASS publicKey.toString() is '[object CryptoKey]'
 PASS publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/cloneKey-expected.txt
index 7b979a9..ed88568 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -20,7 +21,6 @@
 Serialized key bytes: 5c4b050e0101015b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 PASS: Cloned key exported data should be [3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -39,7 +39,6 @@
 Serialized key bytes: 5c4b050e0101115b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 PASS: Cloned key exported data should be [3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -57,7 +56,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050e0101005b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -75,7 +73,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b050e0101105b3059301306072a8648ce3d020106082a8648ce3d030107034200049cb0cf69303dafc761d4e4687b4ecf039e6d34ab964af80810d8d558a4a8d6f72d51233a1788920a86ee08a1962c79efa317fb7879e297dad2146db995fa1c78
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -94,7 +91,6 @@
 Serialized key bytes: 5c4b050e010201783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 PASS: Cloned key exported data should be [3076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -113,7 +109,6 @@
 Serialized key bytes: 5c4b050e010211783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 PASS: Cloned key exported data should be [3076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -131,7 +126,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050e010200783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -149,7 +143,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b050e010210783076301006072a8648ce3d020106052b81040022036200040874a2e0b8ff448f0e54321e27f4f1e64d064cdeb7d26f458c32e930120f4e57dc85c2693f977eed4a8ecc8db981b4d91f69446df4f4c6f5de19003f45f891d0ebcd2fffdb5c81c040e8d6994c43c7feedb98a4a31edfb35e89a30013c3b9267
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -168,7 +161,6 @@
 Serialized key bytes: 5c4b050e0103019e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 PASS: Cloned key exported data should be [30819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -187,7 +179,6 @@
 Serialized key bytes: 5c4b050e0103119e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 PASS: Cloned key exported data should be [30819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -205,7 +196,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b050e0103009e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -223,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b050e0103109e0130819b301006072a8648ce3d020106052b81040023038186000400f50a08703250c15f043c8c46e99783435245cf98f4f2694b0e2f8d029a514dd6f0b086d4ed892000cd5590107aae69c4c0a7a95f7cf74e5770a07d5db55bce4ab400f2c770bab8b9be4cdb6ecd3dc26c698da0d2599cebf3d904f7f9ca3a55e64731810d73cd317264e50baba4bc2860857e16d6cbb79501bc9e3a32bd172ea8a71dee
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -242,7 +231,6 @@
 Serialized key bytes: 5c4b050e0201098a01308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6
 PASS: Cloned key exported data should be [308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -260,7 +248,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b050e0201088a01308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104201fe33950c5f461124ae992c2bdfdf1c73b1615f571bd567e60d19aa1f48cdf42a144034200047c110c66dcfda807f6e69e45ddb3c74f69a1484d203e8dc5ada8e9a9dd7cb3c70df448986e51bde5d1576f99901f9c2c6a806a47fd907643a72b835597efc8c6
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -279,7 +266,6 @@
 Serialized key bytes: 5c4b050e020209b9013081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e
 PASS: Cloned key exported data should be [3081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -297,7 +283,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b050e020208b9013081b6020100301006072a8648ce3d020106052b8104002204819e30819b0201010430a492ce8fa90084c227e1a32f7974d39e9ff67a7e8705ec3419b35fb607582bebd461e0b1520ac76ec2dd4e9b63ebae71a16403620004e55fee6c49d8d523f5ce7bf9c0425ce4ff650708b7de5cfb095901523979a7f042602db30854735369813b5c3f5ef86828f59cc5dc509892a988d38a8e2519de3d0c4fd0fbdb0993e38f18506c17606c5e24249246f1ce94983a5361c5be983e
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -316,7 +301,6 @@
 Serialized key bytes: 5c4b050e020309f1013081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d
 PASS: Cloned key exported data should be [3081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -334,7 +318,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b050e020308f1013081ee020100301006072a8648ce3d020106052b810400230481d63081d3020101044201bd56bd106118eda246155bd43b42b8e13f0a6e25dd3bb376026fab4dc92b6157bc6dfec2d15dd3d0cf2a39aa68494042af48ba9601118da82c6f2108a3a203ad74a181890381860004012fbcaeffa6a51f3ee4d3d2b51c5dec6d7c726ca353fc014ea2bf7cfbb9b910d32cbfa6a00fe39b6cdb8946f22775398b2e233c0cf144d78c8a7742b5c7a3bb5d23009cdef823dd7bf9a79e8cceacd2e4527c231d0ae5967af0958e931d7ddccf2805a3e618dc3039fec9febbd33052fe4c0fee98f033106064982d88f4e03549d4a64d
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generate-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generate-key-expected.txt
index 86bc8342..92573e0 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generate-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generate-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generateKey-failures-expected.txt
index a9283421..cfdae52 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() without namedCurve...
 error is: TypeError: EcKeyGenParams: namedCurve: Missing or not a string
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/import-jwk-expected.txt
index 9dd51ef..6aebf3e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/import-jwk-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a public key...
 PASS publicKey.toString() is '[object CryptoKey]'
 PASS publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/sign-verify-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/sign-verify-expected.txt
index 335a9a7f..70ee8f8 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/sign-verify-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/ecdsa/sign-verify-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a public key...
 
 Importing a private key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/encrypt-neutered-data-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/encrypt-neutered-data-expected.txt
index 5f3c82e..e16b8fa 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/encrypt-neutered-data-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/encrypt-neutered-data-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing key...
 
 Encrypting empty plaintext (as a control group)...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-badParameters-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-badParameters-expected.txt
index 8196c9b2..0af84d01 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-badParameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-badParameters-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Failed to execute 'exportKey' on 'SubtleCrypto': parameter 2 is not of type 'CryptoKey'.
 error is: TypeError: Failed to execute 'exportKey' on 'SubtleCrypto': parameter 2 is not of type 'CryptoKey'.
 error is: TypeError: Invalid keyFormat argument
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-unextractable-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-unextractable-expected.txt
index a1890c07..f58d8028 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-unextractable-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/exportKey-unextractable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: InvalidAccessError: key is not extractable
 error is: InvalidAccessError: key is not extractable
 error is: InvalidAccessError: key is not extractable
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/cloneKey-expected.txt
index 657a4052e..29a9be4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/cloneKey-expected.txt
@@ -2,245 +2,6 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b0610800200
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061080020130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b06108002080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061080020b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061080021030112233445566778899aabbccddeeff
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b06102000
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0610200130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b061020080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0610200b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0610201030112233445566778899aabbccddeeff
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0610a00200
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0610a0020130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0610a002080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0610a0020b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "HKDF"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "HKDF"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0610a0021030112233445566778899aabbccddeeff
-
 
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
@@ -257,7 +18,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b0610800200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -273,7 +33,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -289,7 +48,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b06108002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -305,7 +63,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -321,7 +78,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -337,7 +93,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b06102000
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -353,7 +108,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610200130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -369,7 +123,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b061020080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -385,7 +138,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610200b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -401,7 +153,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610201030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -417,7 +168,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a00200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -433,7 +183,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -449,7 +198,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -465,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -481,7 +228,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -497,7 +243,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b0610800200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -513,7 +258,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -529,7 +273,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b06108002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -545,7 +288,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -561,7 +303,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061080021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -577,7 +318,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b06102000
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -593,7 +333,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610200130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -609,7 +348,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b061020080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -625,7 +363,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610200b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -641,7 +378,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0610201030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -657,7 +393,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a00200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -673,7 +408,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -689,7 +423,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -705,7 +438,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -721,6 +453,230 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0610a0021030112233445566778899aabbccddeeff
 
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b0610800200
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061080020130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b06108002080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061080020b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061080021030112233445566778899aabbccddeeff
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b06102000
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0610200130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b061020080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0610200b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0610201030112233445566778899aabbccddeeff
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0610a00200
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0610a0020130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0610a002080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0610a0020b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "HKDF"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "HKDF"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0610a0021030112233445566778899aabbccddeeff
 
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-expected.txt
index 178c976..81b8870 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Derive 0 bits from the HKDF key
 PASS derivedBits.byteLength is 0
 Derive 8 bits from the HKDF key
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-failures-expected.txt
index 4eef151..d405e3c2 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 deriveBits() with an unsupported hash...
 error is: NotSupportedError: HkdfParams: hash: HMAC: Unsupported operation: digest
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-rfc5869-test-vectors-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-rfc5869-test-vectors-expected.txt
index 27b3f07..24efd0c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-rfc5869-test-vectors-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveBits-rfc5869-test-vectors-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveKey-expected.txt
index 984fee7..faf1904 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/deriveKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS derivedKey.type is "secret"
 PASS typeof derivedKey.extractable is 'boolean'
 PASS derivedKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/exportKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/exportKey-expected.txt
index 8096f92..b5e6da4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/exportKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/exportKey-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Calling exportKey() on an HKDF key...
 error is: InvalidAccessError: key is not extractable
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/importKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/importKey-failures-expected.txt
index 06f605f..7e32a657 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/importKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/importKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 importKey() with 'encrypt' usage...
 error is: SyntaxError: Cannot create a key using the specified key usages.
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/unwrapKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/unwrapKey-expected.txt
index ccf7b2fba..c37309a 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/unwrapKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hkdf/unwrapKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS wrappingKey.algorithm.name is "AES-GCM"
 PASS typeof wrappingKey.extractable is 'boolean'
 PASS wrappingKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-empty-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-empty-expected.txt
index 66a55dc..d7293b175 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-empty-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-empty-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-expected.txt
index bfe5cd3..369d520c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -22,7 +23,6 @@
 Serialized key bytes: 5c4b020105090130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -43,7 +43,6 @@
 Serialized key bytes: 5c4b02080509080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -64,7 +63,6 @@
 Serialized key bytes: 5c4b020b05090b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -85,7 +83,6 @@
 Serialized key bytes: 5c4b021005091030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -106,7 +103,6 @@
 Serialized key bytes: 5c4b020105110130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -127,7 +123,6 @@
 Serialized key bytes: 5c4b02080511080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -148,7 +143,6 @@
 Serialized key bytes: 5c4b020b05110b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -169,7 +163,6 @@
 Serialized key bytes: 5c4b021005111030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -190,7 +183,6 @@
 Serialized key bytes: 5c4b020105190130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -211,7 +203,6 @@
 Serialized key bytes: 5c4b02080519080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -232,7 +223,6 @@
 Serialized key bytes: 5c4b020b05190b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -253,7 +243,6 @@
 Serialized key bytes: 5c4b021005191030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -273,7 +262,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020105080130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -293,7 +281,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b02080508080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -313,7 +300,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020b05080b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -333,7 +319,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b021005081030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -353,7 +338,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020105100130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -373,7 +357,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b02080510080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -393,7 +376,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020b05100b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -413,7 +395,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b021005101030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -433,7 +414,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020105180130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -453,7 +433,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b02080518080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -473,7 +452,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020b05180b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -493,7 +471,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b021005181030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -514,7 +491,6 @@
 Serialized key bytes: 5c4b020106090130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -535,7 +511,6 @@
 Serialized key bytes: 5c4b02080609080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -556,7 +531,6 @@
 Serialized key bytes: 5c4b020b06090b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -577,7 +551,6 @@
 Serialized key bytes: 5c4b021006091030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -598,7 +571,6 @@
 Serialized key bytes: 5c4b020106110130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -619,7 +591,6 @@
 Serialized key bytes: 5c4b02080611080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -640,7 +611,6 @@
 Serialized key bytes: 5c4b020b06110b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -661,7 +631,6 @@
 Serialized key bytes: 5c4b021006111030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -682,7 +651,6 @@
 Serialized key bytes: 5c4b020106190130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -703,7 +671,6 @@
 Serialized key bytes: 5c4b02080619080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -724,7 +691,6 @@
 Serialized key bytes: 5c4b020b06190b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -745,7 +711,6 @@
 Serialized key bytes: 5c4b021006191030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -765,7 +730,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020106080130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -785,7 +749,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b02080608080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -805,7 +768,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020b06080b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -825,7 +787,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b021006081030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -845,7 +806,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020106100130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -865,7 +825,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b02080610080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -885,7 +844,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020b06100b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -905,7 +863,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b021006101030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -925,7 +882,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020106180130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -945,7 +901,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b02080618080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -965,7 +920,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020b06180b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -985,7 +939,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b021006181030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1006,7 +959,6 @@
 Serialized key bytes: 5c4b020108090130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1027,7 +979,6 @@
 Serialized key bytes: 5c4b02080809080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1048,7 +999,6 @@
 Serialized key bytes: 5c4b020b08090b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1069,7 +1019,6 @@
 Serialized key bytes: 5c4b021008091030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1090,7 +1039,6 @@
 Serialized key bytes: 5c4b020108110130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1111,7 +1059,6 @@
 Serialized key bytes: 5c4b02080811080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1132,7 +1079,6 @@
 Serialized key bytes: 5c4b020b08110b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1153,7 +1099,6 @@
 Serialized key bytes: 5c4b021008111030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1174,7 +1119,6 @@
 Serialized key bytes: 5c4b020108190130
 PASS: Cloned key exported data should be [30] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1195,7 +1139,6 @@
 Serialized key bytes: 5c4b02080819080011223344554677
 PASS: Cloned key exported data should be [0011223344554677] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1216,7 +1159,6 @@
 Serialized key bytes: 5c4b020b08190b00112233445546778899aa
 PASS: Cloned key exported data should be [00112233445546778899aa] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1237,7 +1179,6 @@
 Serialized key bytes: 5c4b021008191030112233445566778899aabbccddeeff
 PASS: Cloned key exported data should be [30112233445566778899aabbccddeeff] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1257,7 +1198,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020108080130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1277,7 +1217,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b02080808080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1297,7 +1236,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b020b08080b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1317,7 +1255,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b021008081030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1337,7 +1274,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020108100130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1357,7 +1293,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b02080810080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1377,7 +1312,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b020b08100b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1397,7 +1331,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b021008101030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1417,7 +1350,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020108180130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1437,7 +1369,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b02080818080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1457,7 +1388,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b020b08180b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -1477,7 +1407,6 @@
 PASS clonedKey.usages.join(',') is "sign,verify"
 Serialized key bytes: 5c4b021008181030112233445566778899aabbccddeeff
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/export-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/export-key-expected.txt
index 63042d7..058e3e5 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/export-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/export-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a JWK key...
 error is: TypeError: Invalid keyFormat argument
 error is: TypeError: Invalid keyFormat argument
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generate-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generate-key-expected.txt
index 3603b407..b2fd3bbb 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generate-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generate-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Generating a key with default length...
 error is: TypeError: HmacKeyGenParams: hash: Missing or not an AlgorithmIdentifier
 error is: TypeError: HmacKeyGenParams: hash: Missing or not an AlgorithmIdentifier
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generateKey-failures-expected.txt
index 9e4eaa4..54ce913 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() with a length of -3...
 error is: TypeError: HmacKeyGenParams: length: Outside of numeric range
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/import-jwk-expected.txt
index 5942490..ec6d4aa 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/import-jwk-expected.txt
@@ -2,8 +2,8 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-Importing a key...
 
+Importing a key...
 PASS key.type is 'secret'
 PASS key.extractable is false
 PASS key.algorithm.name is 'HMAC'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/legacy-empty-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/legacy-empty-key-expected.txt
index 829ebba1..109ecfa 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/legacy-empty-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/legacy-empty-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Deserializing empty HMAC SHA-1 key...
 PASS key.type is "secret"
 PASS typeof key.extractable is 'boolean'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/sign-verify-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/sign-verify-expected.txt
index 88c7185d..b8632c2 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/hmac/sign-verify-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/hmac/sign-verify-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/import-aes-key-bad-length-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/import-aes-key-bad-length-expected.txt
index 1c5d662f..b4788d5e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/import-aes-key-bad-length-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/import-aes-key-bad-length-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS: Failed to import AES-CBC key of length 0 bytes
 PASS: Failed to import AES-CBC key of length 1 bytes
 PASS: Failed to import AES-CBC key of length 15 bytes
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/import-jwk-expected.txt
index 995836f..91b70dc 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/import-jwk-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: DataError: The required JWK member "kty" was missing
 error is: DataError: The required JWK member "kty" was missing
 error is: DataError: The required JWK member "kty" was missing
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/importKey-badParameters-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/importKey-badParameters-expected.txt
index 02272c4..f3e09a7 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/importKey-badParameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/importKey-badParameters-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Key data must be a BufferSource for non-JWK formats
 error is: TypeError: Key data must be a BufferSource for non-JWK formats
 error is: TypeError: Algorithm: Not an object
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/importKey-normalize-usages-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/importKey-normalize-usages-expected.txt
index afabaeb..eb3926de 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/importKey-normalize-usages-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/importKey-normalize-usages-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.usages.join(',') is "encrypt,decrypt,wrapKey"
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt
index c43bbc0..4737daf 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt
@@ -2,61 +2,51 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 encrypt:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["encrypt"]
 
-
 decrypt:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["decrypt"]
 
-
 encrypt,decrypt:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["encrypt","decrypt"]
 
-
 wrapKey:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["wrapKey"]
 
-
 unwrapKey:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["unwrapKey"]
 
-
 wrapKey,unwrapKey:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["wrapKey","unwrapKey"]
 
-
 encrypt,decrypt,wrapKey:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["encrypt","decrypt","wrapKey"]
 
-
 encrypt,decrypt,wrapKey,unwrapKey:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["encrypt","decrypt","wrapKey","unwrapKey"]
 
-
 sign:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["sign"]
 
-
 verify:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["verify"]
 
-
 sign,verify:
 PASS jwk.use is undefined
 PASS jwk.key_ops is ["sign","verify"]
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt
index 404f34b..9968e76a 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt
@@ -9,87 +9,69 @@
 {"key_ops":["encrypt"]}:
 PASS key.usages is ["encrypt"]
 
-
 {"key_ops":["encrypt"]}:
 Failed importing with decrypt: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["decrypt"]}:
 PASS key.usages is ["decrypt"]
 
-
 {"key_ops":["decrypt"]}:
 Failed importing with encrypt: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["encrypt","decrypt"]}:
 PASS key.usages is ["encrypt","decrypt"]
 
-
 {"key_ops":["encrypt","decrypt"]}:
 PASS key.usages is ["encrypt"]
 
-
 {"key_ops":["encrypt","decrypt"]}:
 Failed importing with unwrapKey: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["wrapKey"]}:
 PASS key.usages is ["wrapKey"]
 
-
 {"key_ops":["wrapKey"]}:
 Failed importing with unwrapKey: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["unwrapKey"]}:
 PASS key.usages is ["unwrapKey"]
 
-
 {"key_ops":["wrapKey","unwrapKey"]}:
 PASS key.usages is ["wrapKey","unwrapKey"]
 
-
 {"key_ops":["encrypt","decrypt","wrapKey"]}:
 PASS key.usages is ["encrypt","decrypt","wrapKey"]
 
-
 {"use":"enc"}:
 PASS key.usages is ["encrypt","decrypt","wrapKey","unwrapKey"]
 
-
 {"use":"enc"}:
 PASS key.usages is ["encrypt","decrypt","unwrapKey"]
 
-
 {"use":"enc"}:
 PASS key.usages is ["encrypt","decrypt","unwrapKey"]
 
-
 {"key_ops":["sign"]}:
 PASS key.usages is ["sign"]
 
-
 {"key_ops":["sign"]}:
 Failed importing with verify: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["verify"]}:
 PASS key.usages is ["verify"]
 
-
 {"key_ops":["verify"]}:
 Failed importing with sign: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"use":"sig"}:
 PASS key.usages is ["sign","verify"]
 
-
 {"use":"sig"}:
 PASS key.usages is ["sign"]
 
-
 {"key_ops":["'encrypt'","decrypt"]}:
 PASS key.usages is ["decrypt"]
 
-
 {"key_ops":["encrypt ","foo","decrypt"]}:
 PASS key.usages is ["decrypt"]
 
-
 {"key_ops":["Encrypt","decrypt"]}:
 PASS key.usages is ["decrypt"]
 
-
 {"key_ops":["'encrypt'","decrypt"]}:
 Failed importing with encrypt: DataError: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
 {"key_ops":["encrypt "]}:
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/modify-encrypt-data-during-normalization-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/modify-encrypt-data-during-normalization-expected.txt
index 4e0cb93..4f7e7bfc 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/modify-encrypt-data-during-normalization-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/modify-encrypt-data-during-normalization-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing key...
 
 Encrypting (as a control group)...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/modify-importKey-data-during-normalization-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/modify-importKey-data-during-normalization-expected.txt
index 42830df..ed10262 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/modify-importKey-data-during-normalization-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/modify-importKey-data-during-normalization-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing key...
 Accessed name property
 Corrupting keyData...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/modify-verify-data-during-normalization-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/modify-verify-data-during-normalization-expected.txt
index 2fa332a..327985e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/modify-verify-data-during-normalization-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/modify-verify-data-during-normalization-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing RSA public key...
 
 Verifying the signature...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/neuter-algorithm-data-during-encrypt-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/neuter-algorithm-data-during-encrypt-expected.txt
index c79a2b4c..8a787f4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/neuter-algorithm-data-during-encrypt-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/neuter-algorithm-data-during-encrypt-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing AES-CTR key...
 
 encrypt() with normal data (control group)...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/neuter-encrypt-data-during-normalization-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/neuter-encrypt-data-during-normalization-expected.txt
index a622f52ba..6c65e03 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/neuter-encrypt-data-during-normalization-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/neuter-encrypt-data-during-normalization-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing key...
 
 Encrypting (as a control group)...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/cloneKey-expected.txt
index 0dc87bb..fe2f14e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/cloneKey-expected.txt
@@ -2,245 +2,6 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b0611800200
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061180020130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b06118002080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061180020b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveBits"
-Serialized key bytes: 5c4b061180021030112233445566778899aabbccddeeff
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b06112000
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0611200130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b061120080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0611200b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey"
-Serialized key bytes: 5c4b0611201030112233445566778899aabbccddeeff
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0611a00200
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0611a0020130
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0611a002080011223344554677
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0611a0020b00112233445546778899aa
-
-
-PASS importedKey.extraProperty is "hi"
-PASS importedKey.type is "secret"
-PASS typeof importedKey.extractable is 'boolean'
-PASS importedKey.extractable is false
-PASS importedKey.algorithm.name is "PBKDF2"
-PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
-PASS importedKey is not clonedKey
-PASS clonedKey.extraProperty is undefined.
-PASS clonedKey.type is "secret"
-PASS typeof clonedKey.extractable is 'boolean'
-PASS clonedKey.extractable is false
-PASS clonedKey.algorithm.name is "PBKDF2"
-PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
-Serialized key bytes: 5c4b0611a0021030112233445566778899aabbccddeeff
-
 
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
@@ -257,7 +18,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b0611800200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -273,7 +33,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -289,7 +48,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b06118002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -305,7 +63,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -321,7 +78,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -337,7 +93,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b06112000
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -353,7 +108,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611200130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -369,7 +123,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b061120080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -385,7 +138,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611200b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -401,7 +153,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611201030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -417,7 +168,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a00200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -433,7 +183,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -449,7 +198,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -465,7 +213,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -481,7 +228,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -497,7 +243,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b0611800200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -513,7 +258,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -529,7 +273,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b06118002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -545,7 +288,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -561,7 +303,6 @@
 PASS clonedKey.usages.join(',') is "deriveBits"
 Serialized key bytes: 5c4b061180021030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -577,7 +318,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b06112000
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -593,7 +333,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611200130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -609,7 +348,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b061120080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -625,7 +363,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611200b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -641,7 +378,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey"
 Serialized key bytes: 5c4b0611201030112233445566778899aabbccddeeff
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -657,7 +393,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a00200
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -673,7 +408,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0020130
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -689,7 +423,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a002080011223344554677
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -705,7 +438,6 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0020b00112233445546778899aa
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "secret"
 PASS typeof importedKey.extractable is 'boolean'
@@ -721,6 +453,230 @@
 PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
 Serialized key bytes: 5c4b0611a0021030112233445566778899aabbccddeeff
 
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b0611800200
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061180020130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b06118002080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061180020b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveBits"
+Serialized key bytes: 5c4b061180021030112233445566778899aabbccddeeff
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b06112000
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0611200130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b061120080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0611200b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey"
+Serialized key bytes: 5c4b0611201030112233445566778899aabbccddeeff
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0611a00200
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0611a0020130
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0611a002080011223344554677
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0611a0020b00112233445546778899aa
+
+PASS importedKey.extraProperty is "hi"
+PASS importedKey.type is "secret"
+PASS typeof importedKey.extractable is 'boolean'
+PASS importedKey.extractable is false
+PASS importedKey.algorithm.name is "PBKDF2"
+PASS importedKey.usages.join(',') is "deriveKey,deriveBits"
+PASS importedKey is not clonedKey
+PASS clonedKey.extraProperty is undefined.
+PASS clonedKey.type is "secret"
+PASS typeof clonedKey.extractable is 'boolean'
+PASS clonedKey.extractable is false
+PASS clonedKey.algorithm.name is "PBKDF2"
+PASS clonedKey.usages.join(',') is "deriveKey,deriveBits"
+Serialized key bytes: 5c4b0611a0021030112233445566778899aabbccddeeff
 
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-expected.txt
index 414d2bc..b949e8ea 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-failures-expected.txt
index 553d7ea..a4318e4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing the password...
 SUCCESS
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-rfc6070-test-vectors-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-rfc6070-test-vectors-expected.txt
index 753e48f6..aa88f3c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-rfc6070-test-vectors-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits-rfc6070-test-vectors-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-aes-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-aes-expected.txt
index 53bf242..5435c1f 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-aes-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-aes-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS tmpKey.type is "secret"
 PASS typeof tmpKey.extractable is 'boolean'
 PASS tmpKey.extractable is false
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-failures-expected.txt
index 51261f4..a65c283 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveKey-failures-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing the password...
 
 Deriving an AES key with no length...
@@ -25,7 +26,6 @@
 Deriving an RSA-OAEP key...
 error is: NotSupportedError: RSA-OAEP: Unsupported operation: get key length
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/importKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/importKey-failures-expected.txt
index 4ed392a..e7c6981 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/importKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/importKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 importKey() with 'encrypt' usage...
 error is: SyntaxError: Cannot create a key using the specified key usages.
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-key-expected.txt
index 73bd3eb..b5e7383e 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing a JWK key...
 error is: TypeError: Invalid keyFormat argument
 error is: TypeError: Invalid keyFormat argument
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt
index c0aa59f..65c33e4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Importing a JWK key...
 
 Exporting the key as JWK...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-importKey-badUsages-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-importKey-badUsages-expected.txt
index d77a824..ed07554 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-importKey-badUsages-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-importKey-badUsages-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: SyntaxError: Cannot create a key using the specified key usages.
 error is: SyntaxError: Cannot create a key using the specified key usages.
 error is: SyntaxError: Cannot create a key using the specified key usages.
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt
index 585abbc..497d386d 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Put key into database successfully
 PASS retrievedKey.type is 'private'
 PASS retrievedKey.extractable is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/encrypt-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/encrypt-failures-expected.txt
index 4adb6757..77cec56 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/encrypt-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/encrypt-failures-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS publicKey.algorithm.name is "RSA-OAEP"
 PASS publicKey.algorithm.hash.name is "SHA-256"
 PASS publicKey.type is "public"
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generate-non-extractable-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generate-non-extractable-key-expected.txt
index 5f450c6..7ec6405 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generate-non-extractable-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generate-non-extractable-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generateKey-failures-expected.txt
index d248d35..7caac2cd 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() with a modulusLength -30...
 error is: TypeError: RsaHashedKeyGenParams: modulusLength: Outside of numeric range
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/key-manipulation-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/key-manipulation-expected.txt
index f4e4f31b..8bed8973 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/key-manipulation-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/key-manipulation-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/plaintext-length-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/plaintext-length-expected.txt
index db913cd..6b6d992 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/plaintext-length-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/plaintext-length-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing RSA keys...
 Encrypting a 214 byte buffer with RSA-OAEP SHA-1, 2048 bit key...
 PASS Succeeded
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/wrap-unwrap-aes-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/wrap-unwrap-aes-expected.txt
index f65f7de..c50bd9ec 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/wrap-unwrap-aes-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-oaep/wrap-unwrap-aes-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing RSA keys...
 Importing an AES key...
 Wrapping it...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-pss/verify-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-pss/verify-expected.txt
index 5cd1362..dcf252c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsa-pss/verify-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsa-pss/verify-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 Verifying known signature...
 PASS verificationResult is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey-expected.txt
index fb21fa4..1ca03c0 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -24,7 +25,6 @@
 Serialized key bytes: 5c4b0403018008030100010501a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -47,7 +47,6 @@
 Serialized key bytes: 5c4b0403018010030100010501a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -70,7 +69,6 @@
 Serialized key bytes: 5c4b0403018008030100010511a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -93,7 +91,6 @@
 Serialized key bytes: 5c4b0403018010030100010511a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -115,7 +112,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018008030100010500a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -137,7 +133,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018010030100010500a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -159,7 +154,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018008030100010510a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -181,7 +175,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018010030100010510a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -204,7 +197,6 @@
 Serialized key bytes: 5c4b0403018008030100010601a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -227,7 +219,6 @@
 Serialized key bytes: 5c4b0403018010030100010601a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -250,7 +241,6 @@
 Serialized key bytes: 5c4b0403018008030100010611a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -273,7 +263,6 @@
 Serialized key bytes: 5c4b0403018010030100010611a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -295,7 +284,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018008030100010600a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -317,7 +305,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018010030100010600a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -339,7 +326,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018008030100010610a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -361,7 +347,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018010030100010610a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -384,7 +369,6 @@
 Serialized key bytes: 5c4b0403018008030100010801a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -407,7 +391,6 @@
 Serialized key bytes: 5c4b0403018010030100010801a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -430,7 +413,6 @@
 Serialized key bytes: 5c4b0403018008030100010811a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 PASS: Cloned key exported data should be [30819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -453,7 +435,6 @@
 Serialized key bytes: 5c4b0403018010030100010811a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 PASS: Cloned key exported data should be [30820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -475,7 +456,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018008030100010800a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -497,7 +477,6 @@
 PASS clonedKey.usages.join(',') is ""
 Serialized key bytes: 5c4b0403018010030100010800a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -519,7 +498,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018008030100010810a20130819f300d06092a864886f70d010101050003818d0030818902818100b289c62ecc3ddf64154817203439eaa0dc07a65954429a7b6098a77235673d96df1f06bd3c1ae73990867199e678bf95b3728fcd4686136e6ee9dd4c09eb490eb7cb953c388668b759263f61d6a7dfcabf27b5c9d6972455b12b66d483843286d6b871f35f912a773c97c1932255fcee05ce7b8af213879f017de4232a306a410203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "public"
 PASS typeof importedKey.extractable is 'boolean'
@@ -541,7 +519,6 @@
 PASS clonedKey.usages.join(',') is "verify"
 Serialized key bytes: 5c4b0403018010030100010810a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100b4c8b631194aef0154b1479ab7a534b60ca878981108680f0ae6b7c88cb6010f6dbf9f665646208410575cb923b26bf874a24b4cd801c9bba967062ae506cdcf307add4380d0d93077a4c1f0fc06d498dc729f811335c530b90fe9bf9f3979ccec050a48e8923045b19368e1e89ea4157538e8059e53320f47c155f1741310a93ed153a7f3af2d46c388b95d82518527a02b7bd9ab7edc4bcb737677f679c5c6de5e1ebed3a29d6b99b8eace2d59ceb533e001cf39c5671495d51d3ee34406ea4fdb0c626dee68da256b8a12f9f65059ccc85a2190ce1385152d62785e00cae702e77c4c597b86a6268adbf043dda68881c790f1517671fb7d198fca5ba97bef0203010001
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -564,7 +541,6 @@
 Serialized key bytes: 5c4b0403028008030100010509f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 PASS: Cloned key exported data should be [30820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -587,7 +563,6 @@
 Serialized key bytes: 5c4b0403028010030100010509c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 PASS: Cloned key exported data should be [308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -609,7 +584,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028008030100010508f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -631,7 +605,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028010030100010508c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -654,7 +627,6 @@
 Serialized key bytes: 5c4b0403028008030100010609f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 PASS: Cloned key exported data should be [30820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -677,7 +649,6 @@
 Serialized key bytes: 5c4b0403028010030100010609c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 PASS: Cloned key exported data should be [308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -699,7 +670,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028008030100010608f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -721,7 +691,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028010030100010608c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -744,7 +713,6 @@
 Serialized key bytes: 5c4b0403028008030100010809f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 PASS: Cloned key exported data should be [30820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -767,7 +735,6 @@
 Serialized key bytes: 5c4b0403028010030100010809c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 PASS: Cloned key exported data should be [308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed] and was
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -789,7 +756,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028008030100010808f90430820275020100300d06092a864886f70d01010105000482025f3082025b02010002818100a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137020301000102818033a5042a90b27d4f5451ca9bbbd0b44771a101af884340aef9885f2a4bbe92e894a724ac3c568c8f97853ad07c0266c8c6a3ca0929f1e8f11231884429fc4d9ae55fee896a10ce707c3ed7e734e44727a39574501a532683109c2abacaba283c31b4bd2f53c3ee37e352cee34f9e503bd80c0622ad79c6dcee883547c6a3b325024100e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443024100b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd024028fa13938655be1f8a159cbaca5a72ea190c30089e19cd274a556f36c4f6e19f554b34c077790427bbdd8dd3ede2448328f385d81b30e8e43b2fffa02786197902401a8b38f398fa712049898d7fb79ee0a77668791299cdfa09efc0e507acb21ed74301ef5bfd48be455eaeb6e1678255827580a8e4e8e14151d1510a82a3f2e729024027156aba4126d24a81f3a528cbfb27f56886f840a9f6e86e17a44b94fe9319584b8e22fdde1e5a2e3bd8aa5ba8d8584194eb2190acf832b847f13a3d24a79f4d
 
-
 PASS importedKey.extraProperty is "hi"
 PASS importedKey.type is "private"
 PASS typeof importedKey.extractable is 'boolean'
@@ -811,7 +777,6 @@
 PASS clonedKey.usages.join(',') is "sign"
 Serialized key bytes: 5c4b0403028010030100010808c109308204bd020100300d06092a864886f70d0101010500048204a7308204a30201000282010100e085e33c42d3f3d63434e0bf1b812c444e790ff6c0becf2cc9de895afa601457bd0fafa81e2b977ab818d086d018491d7ff45be40e916c4c81b3d055ac1803b514e1010b983ff072b77fa228dd47024e65a3c72ab4e2ed02901ba43351dcd87beef92036983c42495d9efec5b4ea1113848b53287099cff1ba58a7829af733f19269101da8c10aa1d5d6b34d381dbb0704e58904c3504a1922f6956e95596780a5db08fe944ff3056ec070eafa66f8c1c5d7dcde4ce2c2694f240aec528eb699089e29f669fb3405c47d6309a609936e8b64e003b5f40743be6b7c2d5673e305cc4e2d154b2a046fba889b60913271b00d5321fd15f82cc41b2894ffc2e54d0b0203010001028201007ae930b59b8bf66f6c130a79f42fa9b117187521caf069f005eeda58c0b9fa48f1c9f58a5e41d4e22c880117dc317f4d33efeca2134b8ef2ef0a25e1d09d30e25fb4b162cc8d2c2f50bf0161c78908fd2bed15aa0e6e2ffb78327998529748b7c7e1ffbd8367718e423f390fb8736eb7b596a4067e65e58d5a4b1020927f03a293d5d3b32931d2a06542e9bbeab7e90085afc9fe145d1c28f44a97f8d9eb8c41913ed9f40261ac5f86806254e26aa8502b92779794a7b08ea299865cbdfeab4dd16307169902b46dbe132b035f7e2742f779f5b39a0b40099434a8af14c78f705abaa7474633a7c6306b2673a97aae35b6a3bf6a5fdd9a6b8d17bd6bbfa1872902818100f2bdbf99a43a4064ac5c85ccff42cccf14fa35250a8d77db6746478d0aea456377dc304688a55b1d2b14c46189ff4f92b078902ff66d144116038667cbbf5bfe80a775aa6eb9885686193debf030eaba00a8cbf26a4fdce1cb433a3a0ccd9696d64448141b0c5d9dfb32bdc29a271594d8e2bc0639daeec705b2cc12419876b702818100ecc964d844657b98dc6b3c6df58a4b5adff0cf5ac1a68679de2baccb4cda1b767f879e441769e5cc0065d8e573f9d728bbd4e25553ee8a2ba779eb219ad0a108daea34e7054d1767e644bdb63880234ac8143a9dda28d3f9196508088e2722ab86a3aa10e599b3caf226e69bee90a1ae7f289b945a34a4fed5e34f9d216b284d028180150ba27afda4174523347a5d459c5309793620396feac8037bb6ba295e52e565345520d25cb2896dc3f86ef64df296c18f0f44e103aa7d610f398b03a0c49c833a404a91563c3bb7d4b4878bd72d468c8dd614a895d30ac180cff952631dc7fa97e51fa2ae9da9d83299399e8fa2e7da19dbbe95839a99ad23af56c6166dd38d02818005da6497c3f90e391519c180a65528cfb2416d9ebcb2b5184619a647d03a83fb45e3c051c692638fcb62b91dd2e4162177a327851c720510572f7854785337e7d4217df547f843dfd99d516333ba5724fe1521edccfabd62a6f20c64c9bec5e89f876428cec421e19e62bfc892f918460bf6a101e5c8ef5b2d46552d792a00f102818100b7d0e59415405a3ce9503e95078078518d381f4273106d67863cfee642d2b82186d9932b7cd921bf1867257473ccd2058d9c88a223701701aa8370b90878df96a6950e3b3ed52326a5cabbf376c97aa644c50fafe38f7496fb9e69efdd138b3525d8b7ac162bd75fe84cb4ce7066d6b786e80c42d5e63059ae939c7bcfa497ed
 
-
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-expected.txt
index b26e8b22..739720c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-with-leading-zeroes-in-exponent-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-with-leading-zeroes-in-exponent-expected.txt
index 9435537..df3d412 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-with-leading-zeroes-in-exponent-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generate-key-with-leading-zeroes-in-exponent-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Generating a key pair...
 PASS keyPair.toString() is '[object Object]'
 PASS keyPair.publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generateKey-failures-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generateKey-failures-expected.txt
index 91b66b2..2ca47212 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generateKey-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/generateKey-failures-expected.txt
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+
 generateKey() with a modulusLength -30...
 error is: TypeError: RsaHashedKeyGenParams: modulusLength: Outside of numeric range
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-expected.txt
index 9f33f1f..61d4688 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a public key...
 PASS publicKey.toString() is '[object CryptoKey]'
 PASS publicKey.type is 'public'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-small-key-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-small-key-expected.txt
index 0f45ae7..bef21aa1 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-small-key-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/import-jwk-small-key-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS key.algorithm.modulusLength is 1024
 PASS key.algorithm.modulusLength is 1024
 PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/sign-verify-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/sign-verify-expected.txt
index dba62c9..3966c8638 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/sign-verify-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/sign-verify-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Importing a public key...
 
 Importing a private key...
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/sha/digest-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/sha/digest-expected.txt
index dc4b2d4b..00cf74b 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/sha/digest-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/sha/digest-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS: SHA-1 of [] should be [da39a3ee5e6b4b0d3255bfef95601890afd80709] and was
 PASS: SHA-256 of [] should be [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855] and was
 PASS: SHA-384 of [] should be [38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b] and was
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/sign-verify-badParameters-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/sign-verify-badParameters-expected.txt
index 31f130c..800d98d 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/sign-verify-badParameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/sign-verify-badParameters-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Failed to execute 'verify' on 'SubtleCrypto': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'
 error is: TypeError: Failed to execute 'verify' on 'SubtleCrypto': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'
 error is: TypeError: Failed to execute 'verify' on 'SubtleCrypto': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-badParameters-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-badParameters-expected.txt
index ef5e4cb..98d8c65 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-badParameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-badParameters-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Failed to execute 'unwrapKey' on 'SubtleCrypto': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'
 error is: TypeError: Failed to execute 'unwrapKey' on 'SubtleCrypto': parameter 3 is not of type 'CryptoKey'.
 error is: TypeError: Failed to execute 'unwrapKey' on 'SubtleCrypto': The provided value cannot be converted to a sequence.
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-lacks-usage-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-lacks-usage-expected.txt
index 8747788..6c68b67a 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-lacks-usage-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/unwrapKey-lacks-usage-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: InvalidAccessError: key.usages does not permit this operation
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/worker-subtle-crypto-concurrent-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/worker-subtle-crypto-concurrent-expected.txt
index 3d7790e..30829c9c 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/worker-subtle-crypto-concurrent-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/worker-subtle-crypto-concurrent-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Thread completed successfully
 Thread completed successfully
 Thread completed successfully
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-badParameters-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-badParameters-expected.txt
index e3d67b6..db36ce4 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-badParameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-badParameters-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: TypeError: Failed to execute 'wrapKey' on 'SubtleCrypto': parameter 2 is not of type 'CryptoKey'.
 error is: TypeError: Failed to execute 'wrapKey' on 'SubtleCrypto': parameter 3 is not of type 'CryptoKey'.
 error is: TypeError: Algorithm: Not an object
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-lacks-usage-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-lacks-usage-expected.txt
index 63c1621..23d445a 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-lacks-usage-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-lacks-usage-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 error is: InvalidAccessError: key.usages does not permit this operation
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-unextractable-expected.txt b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-unextractable-expected.txt
index f571385..c17fe39 100644
--- a/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-unextractable-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/subtle/wrapKey-unextractable-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS typeof key.extractable is 'boolean'
 PASS key.extractable is false
 error is: InvalidAccessError: key is not extractable
diff --git a/third_party/WebKit/LayoutTests/crypto/worker-random-values-concurrent-expected.txt b/third_party/WebKit/LayoutTests/crypto/worker-random-values-concurrent-expected.txt
index ac783b8..7799f1d6 100644
--- a/third_party/WebKit/LayoutTests/crypto/worker-random-values-concurrent-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/worker-random-values-concurrent-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Received random bytes from worker
 Received random bytes from worker
 Received random bytes from worker
diff --git a/third_party/WebKit/LayoutTests/crypto/worker-random-values-expected.txt b/third_party/WebKit/LayoutTests/crypto/worker-random-values-expected.txt
index 588b55a2..47f33e1 100644
--- a/third_party/WebKit/LayoutTests/crypto/worker-random-values-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/worker-random-values-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Starting worker: random-values.js
 PASS [Worker] 'crypto' in self is true
 PASS [Worker] 'getRandomValues' in self.crypto is true
diff --git a/third_party/WebKit/LayoutTests/crypto/worker-random-values-limits-expected.txt b/third_party/WebKit/LayoutTests/crypto/worker-random-values-limits-expected.txt
index bf72beb..db2e07f 100644
--- a/third_party/WebKit/LayoutTests/crypto/worker-random-values-limits-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/worker-random-values-limits-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Starting worker: random-values-limits.js
 PASS [Worker] 'crypto' in self is true
 PASS [Worker] 'getRandomValues' in self.crypto is true
diff --git a/third_party/WebKit/LayoutTests/crypto/worker-random-values-types-expected.txt b/third_party/WebKit/LayoutTests/crypto/worker-random-values-types-expected.txt
index a5d9ca0c..adb75b71 100644
--- a/third_party/WebKit/LayoutTests/crypto/worker-random-values-types-expected.txt
+++ b/third_party/WebKit/LayoutTests/crypto/worker-random-values-types-expected.txt
@@ -2,6 +2,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Starting worker: random-values-types.js
 PASS [Worker] 'crypto' in self is true
 PASS [Worker] 'getRandomValues' in self.crypto is true
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
index d5c6dcf..2549b92 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
@@ -151273,6 +151273,11 @@
      {}
     ]
    ],
+   "feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers": [
+    [
+     {}
+    ]
+   ],
    "feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html.headers": [
     [
      {}
@@ -151328,6 +151333,11 @@
      {}
     ]
    ],
+   "feature-policy/experimental-features/resources/lazyload.png": [
+    [
+     {}
+    ]
+   ],
    "feature-policy/experimental-features/resources/parser-blocking-script.js": [
     [
      {}
@@ -221314,18 +221324,36 @@
      {}
     ]
    ],
+   "feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html": [
+    [
+     "/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html",
+     {}
+    ]
+   ],
    "feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html": [
     [
      "/feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html",
      {}
     ]
    ],
+   "feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html": [
+    [
+     "/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html",
+     {}
+    ]
+   ],
    "feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html": [
     [
      "/feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html",
      {}
     ]
    ],
+   "feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html": [
+    [
+     "/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html",
+     {}
+    ]
+   ],
    "feature-policy/experimental-features/sync-script.tentative.https.sub.html": [
     [
      "/feature-policy/experimental-features/sync-script.tentative.https.sub.html",
@@ -225215,7 +225243,9 @@
    "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [
     [
      "/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html",
-     {}
+     {
+      "timeout": "long"
+     }
     ]
    ],
    "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window.js": [
@@ -336012,7 +336042,7 @@
    "support"
   ],
   "css/css-properties-values-api/typedom.tentative.html": [
-   "51e45e887721a3e32325eefe62d984d3c1966922",
+   "0255b8f7a2d29ea20d4d9abd7212c4284e631935",
    "testharness"
   ],
   "css/css-properties-values-api/unit-cycles.html": [
@@ -362312,7 +362342,7 @@
    "testharness"
   ],
   "css/geometry/interfaces-expected.txt": [
-   "0e6decf1cc9af129823094dcc5cb444d8b76783e",
+   "757d30bebc32a7a7be1eff7f501a9006f4bfe8ff",
    "support"
   ],
   "css/geometry/interfaces.html": [
@@ -374931,6 +374961,14 @@
    "db2dcbc1929b9e1264855e9b80f77dfbda5d4f38",
    "support"
   ],
+  "feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html": [
+   "0d46d2f26625ea0013828c52466c194c8ca1c9e4",
+   "testharness"
+  ],
+  "feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers": [
+   "7974815fc9cc069a3890cec9d09d1c6b3e3f9908",
+   "support"
+  ],
   "feature-policy/experimental-features/lazyload/lazyload-disabled-tentative.sub.html": [
    "5b9034b63841209bd64c5115e91dc2a69a81d90d",
    "testharness"
@@ -374939,6 +374977,10 @@
    "d0bac47e01a7e903d78ffab7b73838f0852852d6",
    "support"
   ],
+  "feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html": [
+   "2dc6a6cc70d3b8d713e7fc0b5c43cb741b706d84",
+   "testharness"
+  ],
   "feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html": [
    "2e0a791f374cecac3eb02c1292ab599535b20d1d",
    "testharness"
@@ -374947,12 +374989,16 @@
    "83b744e2bc4e09b771c7997fc044802f77f65407",
    "support"
   ],
+  "feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html": [
+   "6111e691c82be97a0a040053b673d663cb404eb7",
+   "testharness"
+  ],
   "feature-policy/experimental-features/resources/async-script.js": [
    "3c0ee6d02343891b0234f31c0fb229929ae1b24b",
    "support"
   ],
   "feature-policy/experimental-features/resources/common.js": [
-   "10c28be7741b718794f264c0b720304b8c5b7cb7",
+   "64cfca59d6c801e59dfe2a5684b99780413a8ba6",
    "support"
   ],
   "feature-policy/experimental-features/resources/defer-script.js": [
@@ -374983,6 +375029,10 @@
    "a6e98c24e6add4976571141ad2409e1cce96d173",
    "support"
   ],
+  "feature-policy/experimental-features/resources/lazyload.png": [
+   "fd3da53a29c3e7f55f950611d34694867b0ff0a4",
+   "support"
+  ],
   "feature-policy/experimental-features/resources/parser-blocking-script.js": [
    "c61efee8a0a15801d474fd8b384de01e565e37ce",
    "support"
@@ -380652,7 +380702,7 @@
    "testharness"
   ],
   "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [
-   "85c52e0b42e19bdd78dda120320d66ddbb2103b4",
+   "e6ff4a19d0d7431a7612f2425ab2eaa39639c696",
    "testharness"
   ],
   "html/browsers/windows/auxiliary-browsing-contexts/opener-setter.window-expected.txt": [
@@ -420132,7 +420182,7 @@
    "support"
   ],
   "resources/idlharness.js": [
-   "0f49a725c33736d6ff4cb395234d2bf0c78970f9",
+   "9e6ed236b0a43f32ffaecbbbb2b8fbe7540b83c5",
    "support"
   ],
   "resources/idlharness.js.headers": [
@@ -427260,7 +427310,7 @@
    "testharness"
   ],
   "trusted-types/Document-write.tentative.html": [
-   "79247fb4d68e6724b98c62d3b62a0e6b20784f4d",
+   "87e9e724699efc3f0edde3afade4cf53ec2c9c3e",
    "testharness"
   ],
   "trusted-types/Element-insertAdjacentHTML.tentative.html": [
@@ -427352,7 +427402,7 @@
    "testharness"
   ],
   "trusted-types/block-string-assignment-to-Document-write.tentative.html": [
-   "beb31445b475ca0f68ae82410da0d97700cce697",
+   "5e7039705a82886f369bb7c454b8ed08be25b2d6",
    "testharness"
   ],
   "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/geometry/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/geometry/interfaces-expected.txt
index 0e6decf..757d30b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/geometry/interfaces-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/geometry/interfaces-expected.txt
@@ -29,7 +29,7 @@
 PASS DOMPoint interface: existence and properties of interface object
 PASS DOMPoint interface object length
 PASS DOMPoint interface object name
-FAIL DOMPoint interface: legacy window alias assert_equals: self.SVGPoint should be the same value as the interface object expected function "function DOMPoint() { [native code] }" but got function "function SVGPoint() { [native code] }"
+FAIL DOMPoint interface: legacy window alias assert_equals: self.SVGPoint should be the same value as self.DOMPoint expected function "function DOMPoint() { [native code] }" but got function "function SVGPoint() { [native code] }"
 PASS DOMPoint interface: existence and properties of interface prototype object
 PASS DOMPoint interface: existence and properties of interface prototype object's "constructor" property
 PASS DOMPoint interface: existence and properties of interface prototype object's @@unscopables property
@@ -89,7 +89,7 @@
 PASS DOMRect interface: existence and properties of interface object
 PASS DOMRect interface object length
 PASS DOMRect interface object name
-FAIL DOMRect interface: legacy window alias assert_equals: self.SVGRect should be the same value as the interface object expected function "function DOMRect() { [native code] }" but got function "function SVGRect() { [native code] }"
+FAIL DOMRect interface: legacy window alias assert_equals: self.SVGRect should be the same value as self.DOMRect expected function "function DOMRect() { [native code] }" but got function "function SVGRect() { [native code] }"
 PASS DOMRect interface: existence and properties of interface prototype object
 PASS DOMRect interface: existence and properties of interface prototype object's "constructor" property
 PASS DOMRect interface: existence and properties of interface prototype object's @@unscopables property
@@ -272,7 +272,7 @@
 PASS DOMMatrix interface: existence and properties of interface object
 PASS DOMMatrix interface object length
 PASS DOMMatrix interface object name
-FAIL DOMMatrix interface: legacy window alias assert_equals: self.SVGMatrix should be the same value as the interface object expected function "function DOMMatrix() { [native code] }" but got function "function SVGMatrix() { [native code] }"
+FAIL DOMMatrix interface: legacy window alias assert_equals: self.SVGMatrix should be the same value as self.DOMMatrix expected function "function DOMMatrix() { [native code] }" but got function "function SVGMatrix() { [native code] }"
 PASS DOMMatrix interface: existence and properties of interface prototype object
 PASS DOMMatrix interface: existence and properties of interface prototype object's "constructor" property
 PASS DOMMatrix interface: existence and properties of interface prototype object's @@unscopables property
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html
new file mode 100644
index 0000000..0d46d2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Verify behavior of 'lazyload' attribute state 'OFF' when the feature policy 'lazyload' is
+       disabled.
+</title>
+<link rel="stylesheet" href="/feature-policy/experimental-features/resources/lazyload-image.css">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/feature-policy/experimental-features/resources/common.js"></script>
+<style>
+body {
+  width: 100%;
+  height: 100%;
+}
+
+img {
+  width: 200px;
+  height: 200px;
+  border: solid 1px black;
+}
+
+#image-container {
+  position: absolute;
+  top: 400%;
+}
+</style>
+<body>
+  <p>Image inserted further below.</p>
+  <div id="image-container">
+    <img id="off" lazyload="off" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
+    <img id="auto" lazyload="auto" src="http://{{hosts[alt][www2]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
+  </div>
+  <script>
+    var img_off = document.getElementById("off");
+    var img_auto = document.getElementById("auto");
+    [window, img_off, img_auto].forEach((target) => {
+      target.load_complete = wait_for_load(target).then(() => target.did_load = true );
+    });
+
+    function images_loaded() {
+      return img_off.did_load && img_auto.did_load;
+    }
+
+    function same_load_state() {
+      return img_off.did_load === img_auto.did_load;
+    }
+
+    // Verifies that "off" and "auto" behave the same for out-of-view images.
+    promise_test(async(t) => {
+      await window.load_complete;
+      assert_true(same_load_state(), "Expected same loading state for both images.");
+    }, "When the 'lazyload' feature is disabled, lazyload=OFF and lazyload=AUTO behave the same.");
+
+    // Verifies that images with attributes "off" and "auto" load after the images get into view.
+    promise_test(async(t) => {
+      document.getElementById("image-container").scrollIntoView();
+      await img_off.load_complete;
+      await img_auto.load_complete;
+    },  "Sanity-check: Verify that all images load after they are scrolled into view.");
+  </script>
+</body>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers
new file mode 100644
index 0000000..7974815
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-disabled-image-tentative.sub.html.headers
@@ -0,0 +1,2 @@
+Feature-Policy: lazyload 'none'
+Cache-Control: no-cache, no-store, max-age=0
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html
new file mode 100644
index 0000000..2dc6a6cc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Verify behavior of 'lazyload' attribute state 'OFF' when the feature policy 'lazyload' is
+       enabled.
+</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/feature-policy/experimental-features/resources/common.js"></script>
+<style>
+body {
+  width: 100%;
+  height: 100%;
+}
+
+img {
+  width: 200px;
+  height: 200px;
+  border: solid 1px black;
+}
+
+#image-container {
+  position: absolute;
+  top: 400%;
+}
+</style>
+<body>
+  <p>Image inserted further below.</p>
+  <div id="image-container">
+    <img id="off" lazyload="off" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
+  </div>
+  <script>
+    var img = document.querySelector("img");
+
+    [img, window].forEach((target) => {
+      target.load_complete = wait_for_load(target).then(() => target.did_load = true );
+    });
+
+    // Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the lazyload attribute
+    // value 'OFF' works as expected (images load immediately).
+    promise_test( async(t) => {
+      await window.load_complete;
+      assert_true(img.did_load, "Image should have loaded.");
+    }, "When feature is enabled, lazyload=OFF works as expected.");
+ </script>
+</body>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html
new file mode 100644
index 0000000..6111e69
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/lazyload/lazyload-image-attribute-on-sanity-check-tentative.sub.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Verify behavior of 'lazyload' attribute state 'ON' (sanity-check for lazyload policy tests).
+</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/feature-policy/experimental-features/resources/common.js"></script>
+<style>
+body {
+  width: 100%;
+  height: 100%;
+}
+
+img {
+  width: 200px;
+  height: 200px;
+  border: solid 1px black;
+}
+
+#image-container {
+  position: absolute;
+  top: 400%;
+}
+</style>
+<body>
+  <p>Image inserted further below.</p>
+  <div id="image-container">
+    <img lazyload="on" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"/>
+  </div>
+  <script>
+    var img = document.querySelector("img");
+
+    [img, window].forEach((target) => {
+      target.did_load = false;
+      target.load_complete = wait_for_load(target).then(() => target.did_load = true );
+    });
+
+    // Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the lazyload attribute
+    // value 'OFF' works as expected (images load immediately).
+    promise_test( async(t) => {
+      await window.load_complete;
+      assert_false(img.did_load, "Out-of-viewport image should not have loaded.");
+      img.scrollIntoView();
+      await img.load_complete;
+    }, "Verify 'lazyload' attribute state 'on' works as expected: image loads only when in " +
+       "viewport.");
+ </script>
+</body>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/common.js b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/common.js
index 10c28be..64cfca5 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/common.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/common.js
@@ -58,3 +58,10 @@
   container.appendChild(new_iframe);
   return new_iframe;
 }
+
+// Returns a promise which is resolved when |load| event is dispatched for |e|.
+function wait_for_load(e) {
+  return new Promise((resolve) => {
+    e.addEventListener("load", resolve);
+  });
+}
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/lazyload.png b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/lazyload.png
new file mode 100644
index 0000000..fd3da53
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/experimental-features/resources/lazyload.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
index e2b52f25..a5ea5139 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
@@ -16,13 +16,13 @@
     relative_path;
   const header = 'Feature-Policy allow="picture-in-picture"';
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability(
         'picture-in-picture', t, same_origin_src,
         expect_feature_available_default, 'picture-in-picture');
   }, header + ' allows same-origin navigation in an iframe.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability(
         'picture-in-picture', t, cross_origin_src,
         expect_feature_unavailable_default, 'picture-in-picture');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html
index 0c3897a..b0e160e 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html
@@ -15,13 +15,13 @@
   const feature_name = 'Feature policy "picture-in-picture"';
   const header = 'allow="picture-in-picture" attribute';
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability(
         'picture-in-picture', t, same_origin_src,
         expect_feature_available_default, 'picture-in-picture');
   }, feature_name + ' can be enabled in same-origin iframe using ' + header);
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability(
         'picture-in-picture', t, cross_origin_src,
         expect_feature_available_default, 'picture-in-picture');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html
index 1ecd874..b09335a6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html
@@ -14,18 +14,18 @@
     same_origin_src;
   const header = 'Feature-Policy header: picture-in-picture *';
 
-  async_test(t => {
+  async_pip_test(t => {
     isPictureInPictureAllowed().then(t.step_func_done((result) => {
       assert_true(result);
     }));
   }, header + ' allows the top-level document.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, same_origin_src,
         expect_feature_available_default);
   }, header + ' allows same-origin iframes.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, cross_origin_src,
         expect_feature_available_default);
   }, header + ' allows cross-origin iframes.');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html
index 12bbf7f..477cf7b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html
@@ -14,18 +14,18 @@
     same_origin_src;
   const header = 'Default "picture-in-picture" feature policy [*]';
 
-  async_test(t => {
+  async_pip_test(t => {
     isPictureInPictureAllowed().then(t.step_func_done((result) => {
       assert_true(result);
     }));
   }, header + ' allows the top-level document.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, same_origin_src,
         expect_feature_available_default);
   }, header + ' allows same-origin iframes.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, cross_origin_src,
         expect_feature_available_default);
   }, header + ' allows cross-origin iframes.');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html
index b36afbd..513d04c2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/picture-in-picture-disabled-by-feature-policy.https.sub.html
@@ -14,18 +14,18 @@
     same_origin_src;
   const header = 'Feature-Policy header: picture-in-picture "none"';
 
-  async_test(t => {
+  async_pip_test(t => {
     isPictureInPictureAllowed().then(t.step_func_done((result) => {
       assert_false(result);
     }));
   }, header + ' disallows the top-level document.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, same_origin_src,
         expect_feature_unavailable_default);
   }, header + ' disallows same-origin iframes.');
 
-  async_test(t => {
+  async_pip_test(t => {
     test_feature_availability('picture-in-picture', t, cross_origin_src,
         expect_feature_unavailable_default);
   }, header + ' disallows cross-origin iframes.');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html
index 60e4825..e3cbf10 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html
@@ -6,6 +6,7 @@
     <script src='/resources/testharnessreport.js'></script>
     <script src="/resources/testdriver.js"></script>
     <script src="/resources/testdriver-vendor.js"></script>
+    <script src='../resources/picture-in-picture.js'></script>
   </head>
   <body>
     <script>
@@ -28,7 +29,7 @@
     }, { once: true });
 });
 
-promise_test(async (t) => {
+promise_pip_test(async (t) => {
   const report = new Promise(resolve => {
     new ReportingObserver((reports, observer) => resolve([reports, observer]),
                           {types: ['feature-policy']}).observe();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/picture-in-picture.js b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/picture-in-picture.js
index e245d79..1bf3c1c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/picture-in-picture.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/picture-in-picture.js
@@ -1,7 +1,18 @@
-function isPictureInPictureAllowed() {
-  if (!('pictureInPictureEnabled' in document))
-    return Promise.resolve(false);
+function async_pip_test(func, name) {
+  async_test(t => {
+    assert_true('pictureInPictureEnabled' in document, 'Picture-in-Picture API is available');
+    func(t);
+  }, name);
+}
 
+function promise_pip_test(func, name) {
+  promise_test(async t => {
+    assert_true('pictureInPictureEnabled' in document, 'Picture-in-Picture API is available');
+    return func(t);
+  }, name);
+}
+
+function isPictureInPictureAllowed() {
   return new Promise(resolve => {
     let video = document.createElement('video');
     video.src = getVideoURI('/media/movie_5');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html
index 85c52e0b..e6ff4a19 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html
@@ -2,6 +2,7 @@
 <html>
   <head>
     <title>Auxiliary Browing Contexts: window.opener setter</title>
+    <meta name=timeout content=long>
     <script src="/resources/testharness.js"></script>
     <script src="/resources/testharnessreport.js"></script>
     <script src="/common/PrefixedLocalStorage.js"></script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js b/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js
index 0f49a725..9e6ed23 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/resources/idlharness.js
@@ -1643,7 +1643,7 @@
             if (exposed_in(exposure_set(this, this.exposureSet)) && 'document' in self) {
                 for (alias of aliases) {
                     assert_true(alias in self, alias + " should exist");
-                    assert_equals(self[alias], this.get_interface_object(), "self." + alias + " should be the same value as the interface object");
+                    assert_equals(self[alias], this.get_interface_object(), "self." + alias + " should be the same value as self." + this.get_qualified_name());
                     var desc = Object.getOwnPropertyDescriptor(self, alias);
                     assert_equals(desc.value, this.get_interface_object(), "wrong value in " + alias + " property descriptor");
                     assert_true(desc.writable, alias + " should be writable");
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/Document-write.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/Document-write.tentative.html
index 79247fb..87e9e72 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/Document-write.tentative.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/Document-write.tentative.html
@@ -4,10 +4,11 @@
 <script src="support/helper.sub.js"></script>
 <body>
 <script>
+  // TrustedHTML assignments do not throw.
   test(t => {
     let p = createHTML_policy(window, 1);
     let html = p.createHTML(INPUTS.HTML);
     document.write(html);
-    assert_equals(document.body.innerText, RESULTS.HTML);
-  }, "document.write with html assigned via policy (successful URL transformation).");
+    assert_true(document.body.innerText.indexOf(RESULTS.HTML) !== -1);
+  }, "document.write with html assigned via policy (successful transformation).");
 </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-Document-write.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-Document-write.tentative.html
index beb31445..5e70397 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-Document-write.tentative.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/trusted-types/block-string-assignment-to-Document-write.tentative.html
@@ -9,14 +9,6 @@
 </head>
 <body>
 <script>
-  // TrustedURL assignments do not throw.
-  test(t => {
-    let p = createHTML_policy(window, 1);
-    let html = p.createHTML(INPUTS.HTML);
-    document.write(html);
-    assert_equals(document.body.innerText, RESULTS.HTML);
-  }, "document.write with html assigned via policy (successful URL transformation).");
-
   // String assignments throw.
   test(t => {
     assert_throws(new TypeError(), _ => {
diff --git a/third_party/WebKit/LayoutTests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/WebKit/LayoutTests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png
index 378bdb8..55f3261 100644
--- a/third_party/WebKit/LayoutTests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png
+++ b/third_party/WebKit/LayoutTests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click-expected.txt
deleted file mode 100644
index 7ef72d2ba..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-PASS autoscroll started
-Mouse cursor shape: type=SouthPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click.html
index 4709d84..4afc5ba 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-click.html
@@ -1,33 +1,32 @@
-<html>
-<head>
-<style type="text/css">
-#scrollable {
-    height: 200px;
-    overflow: auto;
-    border: solid 3px #cc0000;
-    font-size: 80px;
-}
-</style>
-<script src="../../resources/js-test.js"></script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
+<style type="text/css">
+#scrollable {
+  height: 200px;
+  overflow: auto;
+  border: solid 3px #cc0000;
+  font-size: 80px;
+}
+</style>
 <script>
-function start()
-{
-    description('Check pan scroll by click mouse');
-    testPanScroll({
-        'clickOrDrag': 'click',
-        'scrollable': $('scrollable'),
-    });
+function start() {
+  testSetUp({
+    'clickOrDrag': 'click',
+    'scrollable': $('scrollable'),
+  });
 }
 </script>
-</head>
+
 <body onload="start()">
 <div id="container">
 <p id="description"></p>
-For manual testing, hold middle button in scrollable and move aroudn mouse pointer for scrolling, then release middle button to stop scrolling.
+For manual testing, click middle button in scrollable and move around mouse pointer for scrolling, then click middle button again to stop scrolling.
 <div id="scrollable"></div>
 </div>
 <div id="console"></div>
 </body>
-</html>
+
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag-expected.txt
deleted file mode 100644
index 7ef72d2ba..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-PASS autoscroll started
-Mouse cursor shape: type=SouthPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag.html
index 90718c76..711190a 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-drag.html
@@ -1,27 +1,26 @@
-<html>
-<head>
-<style type="text/css">
-#scrollable {
-    height: 200px;
-    overflow: auto;
-    border: solid 3px #cc0000;
-    font-size: 80px;
-}
-</style>
-<script src="../../resources/js-test.js"></script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
+<style type="text/css">
+#scrollable {
+  height: 200px;
+  overflow: auto;
+  border: solid 3px #cc0000;
+  font-size: 80px;
+}
+</style>
 <script>
-function start()
-{
-    description('Check pan scroll by drag mouse');
-    testPanScroll({
-        'clickOrDrag': 'drag',
-        'scrollable': $('scrollable'),
-    });
+function start() {
+  testSetUp({
+    'clickOrDrag': 'drag',
+    'scrollable': $('scrollable'),
+  });
 }
 </script>
-</head>
+
 <body onload="start()">
 <div id="container">
 <p id="description"></p>
@@ -30,4 +29,3 @@
 </div>
 <div id="console"></div>
 </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired-expected.txt
deleted file mode 100644
index 7ef72d2ba..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-PASS autoscroll started
-Mouse cursor shape: type=SouthPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired.html
index 3c7f4e6..a3379aa 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-event-fired.html
@@ -1,30 +1,33 @@
-<html>
-<head>
-<style type="text/css">
-#scrollable {
-    height: 200px;
-    overflow: auto;
-    border: solid 3px #cc0000;
-    font-size: 80px;
-}
-</style>
-<script src="../../resources/js-test.js"></script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
+<style type="text/css">
+#scrollable {
+  height: 200px;
+  overflow: auto;
+  border: solid 3px #cc0000;
+  font-size: 80px;
+}
+</style>
 <script>
+var mousedown_fired = false;
 window.addEventListener('mousedown', function(event) {
+  mousedown_fired = true;
 });
 
-function start()
-{
-    description('Check pan scroll with mousedown event handler');
-    testPanScroll({
-        'clickOrDrag': 'drag',
-        'scrollable': $('scrollable'),
-    });
+function start() {
+  testSetUp({
+    'clickOrDrag': 'drag',
+    'scrollable': $('scrollable'),
+    'finishTest': function() {
+      assert_true(mousedown_fired);
+    },
+  });
 }
 </script>
-</head>
 <body onload="start()">
 <div id="container">
 <p id="description"></p>
@@ -35,4 +38,3 @@
 </div>
 <div id="console"></div>
 </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe-expected.txt
deleted file mode 100644
index 7ef72d2ba..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-PASS autoscroll started
-Mouse cursor shape: type=SouthPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe.html
index c2e2f3eb..d84d7876 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-in-iframe.html
@@ -1,32 +1,30 @@
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
 <script>
 function start() {
+  var iframe = $('iframe');
+  var offsetLeft = iframe.offsetLeft;
+  var offsetTop = iframe.offsetTop;
 
-    description('Check pan scroll in iframe');
-    var iframe = $('iframe');
-    var offsetLeft = iframe.offsetLeft;
-    var offsetTop = iframe.offsetTop;
-
-    testPanScroll({
-        'clickOrDrag': 'click',
-        'endX': offsetLeft + 5,
-        'endY': offsetTop + 50,
-        'scrollable': iframe.contentDocument.body,
-        'scrolledObject': iframe.contentWindow,
-        'startX': offsetLeft + 5,
-        'startY': offsetTop + 5,
-    });
+  testSetUp({
+    'clickOrDrag': 'click',
+    'endX': offsetLeft + 5,
+    'endY': offsetTop + 50,
+    'scrollable': iframe.contentDocument.body,
+    'scrolledObject': iframe.contentWindow.document.scrollingElement,
+    'startX': offsetLeft + 5,
+    'startY': offsetTop + 5,
+  });
 }
 </script>
-</head>
+
 <body onload="start()">
 <div id="container">
 <p id="description"></p>
 <iframe id="iframe" width="640" height="100"></iframe>
 </div>
 </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-expected.txt
deleted file mode 100644
index 7ef72d2ba..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-expected.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-PASS autoscroll started
-Mouse cursor shape: type=SouthPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden-expected.txt b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden-expected.txt
deleted file mode 100644
index 8607ed0..0000000
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden-expected.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Top of outer div.
-
-Inner div.
-
-Bottom of outer div.
-
-Test for bug 232965 This tests that vertical pan scrolling does not propagate from the inner div to the outer div when the outer div has no vertical overflow.
-
-PASS autoscroll started
-Mouse cursor shape: type=NorthEastPanning hotSpot=0,0
-PASS autoscroll stopped
-PASS Mouse cursor cleared
-PASS outerdiv.scrollLeft is not 0
-PASS outerdiv.scrollTop is 0
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden.html
index 8214c00d..99af9c3 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs-forbidden.html
@@ -1,36 +1,35 @@
 <!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-div {
-    line-height: 50px;
-}
-#outerdiv {
-    overflow:auto;
-    border: 2px solid #000FFF;
-}
-#innerdiv {
-    overflow:auto;
-    border: 2px solid #000000;
-    width: 121%;
-    padding: 5px;
-}
-</style>
-<script src="../../resources/js-test.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
+<style type="text/css">
+div {
+  line-height: 50px;
+}
+#outerdiv {
+  overflow:auto;
+  border: 2px solid #000FFF;
+}
+#innerdiv {
+  overflow:auto;
+  border: 2px solid #000000;
+  width: 121%;
+  padding: 5px;
+}
+</style>
 <script>
-function start()
-{
+function start() {
   outerdiv = $('outerdiv');
 
-  testPanScroll({
+  testSetUp({
     'clickOrDrag': 'drag',
     'endX': 225,
     'endY': 75,
     'finishTest': function() {
-      shouldNotBe('outerdiv.scrollLeft', '0');
-      shouldBeZero('outerdiv.scrollTop');
+      assert_not_equals(outerdiv.scrollLeft, 0);
+      assert_equals(outerdiv.scrollTop, 0);
     },
     'scrollable': outerdiv,
     'startX': 150,
@@ -38,16 +37,14 @@
   });
 }
 </script>
-</head>
 <body onload="start()">
 <div id="outerdiv">
-    <p>Top of outer div.</p>
-    <div id="innerdiv">
-        <p>Inner div.</p>
-    </div>
-    <p>Bottom of outer div.</p>
+  <p>Top of outer div.</p>
+  <div id="innerdiv">
+    <p>Inner div.</p>
+  </div>
+  <p>Bottom of outer div.</p>
 </div>
 <p>Test for <a href="http://crbug.com/232965">bug 232965</a> This tests that vertical pan scrolling does not propagate from the inner div to the outer div when the outer div has no vertical overflow.</p>
 <div id="console"></div>
 </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs.html b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs.html
index ba51d39c..376a7b5 100644
--- a/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs.html
+++ b/third_party/WebKit/LayoutTests/fast/events/middleClickAutoscroll-nested-divs.html
@@ -1,47 +1,44 @@
-<html>
-<head>
-<style type="text/css">
-#scrollable {
-    width:500px;
-    height:300px;
-    overflow:auto;
-    border:2px solid red;
-    padding:10px;
-}
-</style>
-<script src="../../resources/js-test.js"></script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/gesture-util.js"></script>
 <script src="../../resources/compositor-controls.js"></script>
 <script src="./resources/middleClickAutoscroll.js"></script>
+<style type="text/css">
+#scrollable {
+  width:500px;
+  height:300px;
+  overflow:auto;
+  border:2px solid red;
+  padding:10px;
+}
+</style>
 <script>
-function start()
-{
-    description('Check pan scroll in nested divs');
-    testPanScroll({
-        'clickOrDrag': 'click',
-        'scrollable': $('scrollable'),
-    });
+function start() {
+  testSetUp({
+    'clickOrDrag': 'click',
+    'scrollable': $('scrollable'),
+  });
 }
 </script>
-</head>
+
 <body onload="start()">
 <div id="container">
 <p id="description"></p>
 Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> This tests that pan scrolling
 propagates correctly up the DOM tree. On success, our scroll offset should be non-zero.
 <div id="scrollable">
-    <div style="height:200px; position:relative;">
-        <div style="height:150px; border:1px blue solid; overflow:auto;">
-            Panscrolling starting in the blue box should scroll the outer div.
-        </div>
-        Panscrolling outside the blue boxes should scroll the outer div.
+  <div style="height:200px; position:relative;">
+    <div style="height:150px; border:1px blue solid; overflow:auto;">
+      Panscrolling starting in the blue box should scroll the outer div.
     </div>
-    <div style="height:200px; position:relative;">
-        <div style="height:150px; border:1px blue solid; overflow:auto;">
-            Panscrolling starting in the blue box should scroll the outer div.
-        </div>
+    Panscrolling outside the blue boxes should scroll the outer div.
+  </div>
+  <div style="height:200px; position:relative;">
+    <div style="height:150px; border:1px blue solid; overflow:auto;">
+      Panscrolling starting in the blue box should scroll the outer div.
     </div>
+  </div>
 </div>
 </div>
-<div id="console"></div>
 </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/fast/events/resources/middleClickAutoscroll.js b/third_party/WebKit/LayoutTests/fast/events/resources/middleClickAutoscroll.js
index c06905f..ca9bc5f7 100644
--- a/third_party/WebKit/LayoutTests/fast/events/resources/middleClickAutoscroll.js
+++ b/third_party/WebKit/LayoutTests/fast/events/resources/middleClickAutoscroll.js
@@ -1,99 +1,71 @@
-var autoscrollInterval = 50;
-var middleButton = 1;
 var middleClickAutoscrollRadius = 15; // from FrameView::noPanScrollRadius
+var waitTimeBeforeMoveInSeconds = 0.1;
+var scrollable;
+var scrolledObject;
+var startX;
+var startY;
+var endX;
+var endY;
+var autoscrollParam;
 
-window.jsTestIsAsync = true;
-
-function $(id)
-{
-    return document.getElementById(id);
+function $(id) {
+  return document.getElementById(id);
 }
 
-function testPanScroll(param)
-{
-    // Make sure animations run. This requires compositor-controls.js.
-    setAnimationRequiresRaster();
+function testSetUp(param) {
+  // Make sure animations run. This requires compositor-controls.js.
+  setAnimationRequiresRaster();
 
-    function finishTest()
-    {
-        if ($('container'))
-            $('container').innerHTML = '';
-        if (param.finishTest)
-            param.finishTest();
-        if (window.finishJSTest) {
-            finishJSTest();
-            return;
-        }
-        if (window.testRunner)
-            testRunner.notifyDone();
+  scrollable = param.scrollable;
+  scrolledObject = param.scrolledObject || scrollable;
+  startX = param.startX || scrollable.offsetLeft + 5;
+  startY = param.startY || scrollable.offsetTop + 5;
+  endX = param.endX || scrollable.offsetLeft + 5;
+  endY = param.endY || scrollable.offsetTop + middleClickAutoscrollRadius + 6;
+  autoscrollParam = param;
+  if (!scrollable.innerHTML) {
+    for (var i = 0; i < 100; ++i) {
+      var line = document.createElement('div');
+      line.innerHTML = "line " + i;
+      scrollable.appendChild(line);
+    }
+  }
+  promise_test (async () => {
+    // Wait until layer information has gone from Blink to CC's active tree.
+    await waitForCompositorCommit();
+
+    // Start atuoscrolling.
+    if (autoscrollParam.clickOrDrag == 'click') {
+      await mouseMoveTo(startX, startY);
+      await mouseClickOn(startX, startY, 'middle');
+      await mouseMoveTo(endX, endY);
+    } else {
+      assert_equals('drag', autoscrollParam.clickOrDrag);
+      mouseDragAndDrop(startX, startY, endX, endY, 'middle',
+          waitTimeBeforeMoveInSeconds);
     }
 
-    var scrollable = param.scrollable;
-    var scrolledObject = param.scrolledObject || scrollable;
+    // Wait for some scrolling, then end the autoscroll.
+    await waitFor(() => {
+      return scrolledObject.scrollTop > 0 || scrolledObject.scrollLeft > 0;
+    });
+    if (autoscrollParam.clickOrDrag == 'click')
+      await mouseClickOn(endX, endY, 'middle');
 
-    if (!scrollable.innerHTML) {
-        for (var i = 0; i < 100; ++i) {
-            var line = document.createElement('div');
-            line.innerHTML = "line " + i;
-            scrollable.appendChild(line);
-        }
-    }
+    // Wait for the cursor shape to go back to normal.
+    await waitFor(() => {
+      var cursorInfo = internals.getCurrentCursorInfo();
+      return cursorInfo == "type=Pointer hotSpot=0,0" ||
+          cursorInfo == "type=IBeam hotSpot=0,0";
+    });
 
-    var scrollStarted = false;
-    var scrollEnded = false;
+    finishTest();
+  });
+}
 
-    scrolledObject.onscroll = function() {
-        if (scrollStarted)
-            return;
-        scrollStarted = true;
-        scrollEnded = false;
-        testPassed('autoscroll started');
-        var cursorInfo = internals.getCurrentCursorInfo();
-        debug("Mouse cursor shape: " + cursorInfo);
-
-        // Stop scrolling now
-        if (window.eventSender) {
-            if (param.clickOrDrag == 'click')
-                eventSender.mouseDown(middleButton);
-            eventSender.mouseUp(middleButton);
-        }
-    };
-
-    scrollable.ownerDocument.onmouseup = function(e) {
-        // If we haven't started scrolling yet, do nothing.
-        if (!scrollStarted || e.button != middleButton)
-            return;
-        // Wait a while, then set scrollEnded to true
-        window.setTimeout(function() {
-            scrollEnded = true;
-            // Wait a bit more and make sure it's still true (we didn't keep
-            // scrolling).
-            window.setTimeout(function() {
-                if (scrollEnded) {
-                    testPassed('autoscroll stopped');
-                } else {
-                    testFailed('autoscroll still scrolling');
-                }
-                var cursorInfo = internals.getCurrentCursorInfo();
-                if (cursorInfo == "type=Pointer hotSpot=0,0" || cursorInfo == "type=IBeam hotSpot=0,0")
-                     testPassed('Mouse cursor cleared');
-                else
-                     testFailed('Mouse cursor shape: ' + cursorInfo);
-
-                finishTest();
-            }, autoscrollInterval * 2);
-        }, autoscrollInterval * 2);
-    };
-
-    if (!window.eventSender)
-        return;
-    var startX = param.startX || scrollable.offsetLeft + 5;
-    var startY = param.startY || scrollable.offsetTop + 5;
-    var endX = param.endX || scrollable.offsetLeft + 5;
-    var endY = param.endY || scrollable.offsetTop + middleClickAutoscrollRadius + 6;
-    eventSender.mouseMoveTo(startX, startY);
-    eventSender.mouseDown(middleButton);
-    if (param.clickOrDrag == 'click')
-        eventSender.mouseUp(middleButton);
-    eventSender.mouseMoveTo(endX, endY);
+function finishTest() {
+  if ($('container'))
+    $('container').innerHTML = '';
+  if (autoscrollParam.finishTest)
+    autoscrollParam.finishTest();
 }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/aria-disabled-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/aria-disabled-expected.txt
new file mode 100644
index 0000000..1e36756
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/aria-disabled-expected.txt
@@ -0,0 +1,26 @@
+ 
+link submit
+treeitem
+option
+tab
+gridcell
+checkbox
+This tests that the aria-disabled attribute works. The text field should not be enabled.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textField.restriction is "disabled"
+PASS textField.restriction is "none"
+PASS group.restriction is "disabled"
+PASS link.restriction is "disabled"
+PASS button.restriction is "none"
+PASS treeitem.restriction is "disabled"
+PASS option.restriction is "disabled"
+PASS tab.restriction is "disabled"
+PASS gridcell.restriction is "disabled"
+PASS checkbox.restriction is "disabled"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-accessibilitynodeobject-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-accessibilitynodeobject-expected.txt
new file mode 100644
index 0000000..5864633
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-accessibilitynodeobject-expected.txt
@@ -0,0 +1,22 @@
+Link Button      ARIA button ARIA link
+This test makes sure that AccessibilityNodeObjects are created for elements in a canvas subtree.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS axLayoutObjects.length is axNodeObjects.length
+PASS i == 0; axLayoutObject.role == axNodeObject.role is true
+PASS i == 1; axLayoutObject.role == axNodeObject.role is true
+PASS i == 2; axLayoutObject.role == axNodeObject.role is true
+PASS i == 3; axLayoutObject.role == axNodeObject.role is true
+PASS i == 4; axLayoutObject.role == axNodeObject.role is true
+PASS i == 5; axLayoutObject.role == axNodeObject.role is true
+PASS i == 6; axLayoutObject.role == axNodeObject.role is true
+PASS i == 7; axLayoutObject.role == axNodeObject.role is true
+PASS i == 8; axLayoutObject.role == axNodeObject.role is true
+PASS i == 9; axLayoutObject.role == axNodeObject.role is true
+PASS i == 10; axLayoutObject.role == axNodeObject.role is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt
new file mode 100644
index 0000000..9222bea1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-2-expected.txt
@@ -0,0 +1,354 @@
+Link Button Button Button         
+Focusable
+Heading
+ARIA button
+ARIA disabled button
+ARIA enabled button
+ARIA required button
+ARIA toggle button
+ARIA link
+This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+link1
+PASS document.activeElement == element1 is true
+link2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+button1
+PASS document.activeElement == element1 is true
+button2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+labeled-button1
+PASS document.activeElement == element1 is true
+labeled-button2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+button-with-title1
+PASS document.activeElement == element1 is true
+button-with-title2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+text1
+PASS document.activeElement == element1 is true
+text2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+checkbox1
+PASS document.activeElement == element1 is true
+checkbox2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+number1
+PASS document.activeElement == element1 is true
+number2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+radio1
+PASS document.activeElement == element1 is true
+radio2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+slider1
+PASS document.activeElement == element1 is true
+slider2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+submit1
+PASS document.activeElement == element1 is true
+submit2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+combobox1
+PASS document.activeElement == element1 is true
+combobox2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+listbox1
+PASS document.activeElement == element1 is true
+listbox2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+textarea1
+PASS document.activeElement == element1 is true
+textarea2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+focusable1
+PASS document.activeElement == element1 is true
+focusable2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+heading1
+PASS document.activeElement == element1 is true
+heading2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-button1
+PASS document.activeElement == element1 is true
+aria-button2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-disabledbutton1
+PASS document.activeElement == element1 is true
+aria-disabledbutton2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-enabledbutton1
+PASS document.activeElement == element1 is true
+aria-enabledbutton2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-requiredbutton1
+PASS document.activeElement == element1 is true
+aria-requiredbutton2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-togglebutton1
+PASS document.activeElement == element1 is true
+aria-togglebutton2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+aria-link1
+PASS document.activeElement == element1 is true
+aria-link2
+PASS document.activeElement == element2 is true
+PASS axElement2.role is axElement1.role
+PASS axElement2.roleDescription is axElement1.roleDescription
+PASS axElement2.name is axElement1.name
+PASS axElement2.description is axElement1.description
+PASS axElement2.stringValue is axElement1.stringValue
+PASS axElement2.isEnabled is axElement1.isEnabled
+PASS axElement2.isRequired is axElement1.isRequired
+PASS axElement2.isChecked is axElement1.isChecked
+PASS axElement2.intValue is axElement1.intValue
+PASS axElement2.minValue is axElement1.minValue
+PASS axElement2.maxValue is axElement1.maxValue
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-expected.txt
new file mode 100644
index 0000000..c279677
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/canvas-fallback-content-expected.txt
@@ -0,0 +1,101 @@
+Link Button     
+Focusable
+ARIA button
+ARIA link
+This test makes sure that focusable elements in canvas fallback content are accessible.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+link1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXLink"
+
+button1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+text1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXTextField"
+
+checkbox1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXCheckBox"
+
+radio1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXRadioButton"
+
+submit1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+combobox1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXPopUpButton"
+
+focusable1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXGenericContainer"
+
+aria-button1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+aria-link1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXLink"
+
+link2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXLink"
+
+button2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+text2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXTextField"
+
+checkbox2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXCheckBox"
+
+radio2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXRadioButton"
+
+submit2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+combobox2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXPopUpButton"
+
+focusable2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXGenericContainer"
+
+aria-button2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+aria-link2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXLink"
+
+focusable1
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+focusable2
+PASS document.activeElement == element is true
+PASS axElement.role is "AXRole: AXButton"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/color-well-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/color-well-expected.txt
new file mode 100644
index 0000000..a3bbef3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/color-well-expected.txt
@@ -0,0 +1,19 @@
+CONSOLE WARNING: line 10: The specified value "purple" does not conform to the required format.  The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
+This test ensures that the correct accessibility properties can be retrieved from input elements of type color.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS axColorwell.role is "AXRole: AXColorWell"
+PASS axColorwell.colorValue is 4278190080
+PASS axColorwell.stringValue is "AXValue: rgba(0, 0, 0, 1)"
+PASS axColorwell.role is "AXRole: AXColorWell"
+PASS axColorwell.colorValue is 4294901760
+PASS axColorwell.stringValue is "AXValue: rgba(255, 0, 0, 1)"
+PASS axColorwell.role is "AXRole: AXColorWell"
+PASS axColorwell.colorValue is 4278190080
+PASS axColorwell.stringValue is "AXValue: rgba(0, 0, 0, 1)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+  
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-generated-content-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-generated-content-expected.txt
new file mode 100644
index 0000000..a7e0845
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-generated-content-expected.txt
@@ -0,0 +1,12 @@
+Tests that whitespace is properly collapsed in CSS generate content, and that the concatenation of all of the strings from inline text boxes matches the string value of the text object.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS text is concatenatedInlineText
+PASS text is concatenatedInlineText
+PASS text is concatenatedInlineText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+six seven eight nine ten 
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-styles-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-styles-expected.txt
new file mode 100644
index 0000000..5476e8a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/css-styles-expected.txt
@@ -0,0 +1,25 @@
+This test ensures that various style attributes can be retrieved via the accessibility APIs.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS axHeading.backgroundColor is 4278190080
+PASS axHeading.color is 16711680
+PASS axHeading.fontSize is 12
+PASS axParagraph.backgroundColor is 4278190080
+PASS axParagraph.color is 65280
+PASS axParagraph.fontSize is 14
+PASS axButton.backgroundColor is 4294901760
+PASS axButton.color is 255
+PASS axButton.fontSize is 16
+PASS axText.backgroundColor is 4294901760
+PASS axText.color is 255
+PASS axText.fontSize is 16
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Heading.
+Line one.
+Line two.
+
+ 
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/element-role-mapping-focusable-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/element-role-mapping-focusable-expected.txt
new file mode 100644
index 0000000..9d81e365
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/element-role-mapping-focusable-expected.txt
@@ -0,0 +1,88 @@
+Visit Chromium Click the text! Button
+Copyright 2015.
+   I have a checkbox  Radio  Button
+  I have a menuItem  Menu  ItemRadio
+Birthday:  Birthday(date and time):  Birthday(datetime-local):  Birthday (month and year):  Select a week:  Select a file:  Min-Max:  Color: Select a time:      
+0 100 + =
+Blue  Red 
+Text Input Controls
+Text: 
+Password: 
+This test make sure that focusable elements are mapped implicitly to AX roles.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+normal_link_id
+PASS elem.role is "AXRole: AXLink"
+mousedown_link_id
+PASS elem.role is "AXRole: AXLink"
+button_id
+PASS elem.role is "AXRole: AXButton"
+details_id
+PASS elem.role is "AXRole: AXDetails"
+summary_id
+PASS elem.role is "AXRole: AXDisclosureTriangle"
+input_datalist_id
+PASS elem.role is "AXRole: AXTextFieldWithComboBox"
+input_button_id
+PASS elem.role is "AXRole: AXButton"
+input_checkbox_id
+PASS elem.role is "AXRole: AXCheckBox"
+input_radio_id
+PASS elem.role is "AXRole: AXRadioButton"
+menu_button_id
+PASS elem.role is "AXRole: AXButton"
+menu_checkbox_id
+PASS elem.role is "AXRole: AXMenuItemCheckBox"
+menu_radio_id
+PASS elem.role is "AXRole: AXMenuItemRadio"
+input_date_id
+PASS elem.role is "AXRole: AXDateField"
+input_datetime_id
+PASS elem.role is "AXRole: AXTextField"
+input_datetime-local_id
+PASS elem.role is "AXRole: AXDateTimeField"
+input_month_id
+PASS elem.role is "AXRole: AXDateTimeField"
+input_week_id
+PASS elem.role is "AXRole: AXDateTimeField"
+input_file_id
+PASS elem.role is "AXRole: AXButton"
+input_number_id
+PASS elem.role is "AXRole: AXSpinButton"
+input_range_id
+PASS elem.role is "AXRole: AXSlider"
+input_color_id
+PASS elem.role is "AXRole: AXColorWell"
+input_time_id
+PASS elem.role is "AXRole: AXInputTime"
+input_reset_id
+PASS elem.role is "AXRole: AXButton"
+select_id
+PASS elem.role is "AXRole: AXPopUpButton"
+PASS axMenuListPopup.role is "AXRole: AXMenuListPopup"
+select_option_id
+PASS axMenuListOption.role is "AXRole: AXMenuListOption"
+select_multiple_id
+PASS elem.role is "AXRole: AXListBox"
+select_multiple_option_id
+PASS elem.role is "AXRole: AXListBoxOption"
+textarea_id
+PASS elem.role is "AXRole: AXTextField"
+meter_id
+PASS elem.role is "AXRole: AXMeter"
+output_id
+PASS elem.role is "AXRole: AXStatus"
+input_radio_id
+PASS elem.role is "AXRole: AXRadioButton"
+legend_id
+PASS elem.role is "AXRole: AXLegend"
+input_text_id
+PASS elem.role is "AXRole: AXTextField"
+input_password_id
+PASS elem.role is "AXRole: AXTextField"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-link-inline-cont-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-link-inline-cont-expected.txt
new file mode 100644
index 0000000..9746e451
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-link-inline-cont-expected.txt
@@ -0,0 +1,8 @@
+Image link in the presence of inline continuations
+This test checks that a block inside a link does not unduly disturb the render tree via inline continuations. In particular, it checks that adding <div role=presentation> between a link and its contained image does not alter the accessibility tree at all, other than with respect to size.
+
+
+
+PASS: accessibility trees were identical other than size.
+
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-map1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-map1-expected.txt
new file mode 100644
index 0000000..bd726c03
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/image-map1-expected.txt
@@ -0,0 +1,16 @@
+
+This tests that you can reach the links within an image map.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS body.childAtIndex(0).role is 'AXRole: AXLink'
+PASS body.childAtIndex(0).name is 'Link1'
+PASS body.childAtIndex(1).role is 'AXRole: AXLink'
+PASS body.childAtIndex(1).name is 'Link2'
+PASS body.childAtIndex(2).role is 'AXRole: AXLink'
+PASS body.childAtIndex(2).name is 'Link3'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/img-fallsback-to-title-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/img-fallsback-to-title-expected.txt
new file mode 100644
index 0000000..9c9089f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/img-fallsback-to-title-expected.txt
@@ -0,0 +1,20 @@
+ 
+test
+test
+This tests that images will fallback to using the title attribute if no other descriptive text is present.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Image1 name: test1
+Image1 description: 
+Image2 name: alt
+Image2 description: test2
+Image3 name: test3
+Image3 description: 
+Image4 name: test4
+Image4 description: 
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/input-type-range-aria-value-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/input-type-range-aria-value-expected.txt
new file mode 100644
index 0000000..c4ec2cc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/input-type-range-aria-value-expected.txt
@@ -0,0 +1,16 @@
+This tests that ARIA attributes can be used to override the value of an input type=range even if it doesn't have an ARIA role of slider, because it has an *implicit* ARIA role of slider already. http://www.w3.org/TR/html-aapi/#el-78
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS axRange1.minValue is 1
+PASS axRange1.maxValue is 10
+PASS axRange1.intValue is 5
+PASS axRange2.minValue is 10
+PASS axRange2.maxValue is 100
+PASS axRange2.intValue is 50
+PASS axRange3.valueDescription is 'AXValueDescription: 5 of 10'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+  
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/radio-button-title-label-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/radio-button-title-label-expected.txt
new file mode 100644
index 0000000..a13c0848
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/radio-button-title-label-expected.txt
@@ -0,0 +1,22 @@
+This test checks that radio buttons expose title ui elements correctly under a variety of cirmcumstances. In general, the should disappear and act as the title for the radio button.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS focusedElement.name is 'LABEL'
+PASS !titleUIElement || titleUIElement.name == '' is true
+PASS focusedElement.name is 'LABEL2a'
+PASS focusedElement.description is ''
+PASS !titleUIElement || titleUIElement.name == '' is true
+PASS focusedElement.name is 'radio3'
+PASS focusedElement.description is ''
+PASS !titleUIElement || titleUIElement.name == '' is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Test
+LABEL Test
+LABEL2
+LABEL2a
+Test
+LABEL3
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/removed-continuation-element-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/removed-continuation-element-causes-crash-expected.txt
new file mode 100644
index 0000000..921262f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/removed-continuation-element-causes-crash-expected.txt
@@ -0,0 +1,10 @@
+ asdfasdf
+When you have elements that are continuations, and one of those elements is removed, the parent chain is not being updated accordingly. This can cause a crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/scroll-div-horiz-sends-notification-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/scroll-div-horiz-sends-notification-expected.txt
new file mode 100644
index 0000000..5ab117eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/scroll-div-horiz-sends-notification-expected.txt
@@ -0,0 +1,12 @@
+One Two Three
+This test ensures that scrolling the window sends a notification.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Got notification on container div
+PASS container.scrollLeft is 500
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/table-one-cell-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/table-one-cell-expected.txt
new file mode 100644
index 0000000..d1ff3a6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/table-one-cell-expected.txt
@@ -0,0 +1,5 @@
+Pick Your Location!
+Get specific content for your area.
+http://web.apple.com
+
+AXRole: AXLayoutTable
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-caret-position-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-caret-position-expected.txt
new file mode 100644
index 0000000..0ebc5d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-caret-position-expected.txt
@@ -0,0 +1,99 @@
+This tests that caret position is reported correctly for textarea elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textareaAccessible.selectionStart is 0
+PASS textareaAccessible.selectionEnd is 0
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 1
+PASS textareaAccessible.selectionEnd is 1
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 2
+PASS textareaAccessible.selectionEnd is 2
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 3
+PASS textareaAccessible.selectionEnd is 3
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 4
+PASS textareaAccessible.selectionEnd is 4
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 5
+PASS textareaAccessible.selectionEnd is 5
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 6
+PASS textareaAccessible.selectionEnd is 6
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 0
+PASS textareaAccessible.selectionStart is 7
+PASS textareaAccessible.selectionEnd is 7
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 8
+PASS textareaAccessible.selectionEnd is 8
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 9
+PASS textareaAccessible.selectionEnd is 9
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 10
+PASS textareaAccessible.selectionEnd is 10
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 11
+PASS textareaAccessible.selectionEnd is 11
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 12
+PASS textareaAccessible.selectionEnd is 12
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 13
+PASS textareaAccessible.selectionEnd is 13
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 14
+PASS textareaAccessible.selectionEnd is 14
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 15
+PASS textareaAccessible.selectionEnd is 15
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 16
+PASS textareaAccessible.selectionEnd is 16
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 17
+PASS textareaAccessible.selectionEnd is 17
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 18
+PASS textareaAccessible.selectionEnd is 18
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 19
+PASS textareaAccessible.selectionEnd is 19
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 20
+PASS textareaAccessible.selectionEnd is 20
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 20
+PASS textareaAccessible.selectionEnd is 20
+PASS emptyTextareaAccessible.selectionStart is 0
+PASS emptyTextareaAccessible.selectionEnd is 0
+PASS emptyTextareaAccessible.selectionStart is 0
+PASS emptyTextareaAccessible.selectionEnd is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-selection-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-selection-expected.txt
new file mode 100644
index 0000000..fbc5b1e7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/textarea-selection-expected.txt
@@ -0,0 +1,49 @@
+This tests that text selection is reported correctly for textarea elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textareaAccessible.selectionStart is 0
+PASS textareaAccessible.selectionEnd is 25
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 3
+PASS textareaAccessible.selectionStart is 0
+PASS textareaAccessible.selectionEnd is 7
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 0
+PASS textareaAccessible.selectionEnd is 7
+PASS textareaAccessible.selectionStartLineNumber is 0
+PASS textareaAccessible.selectionEndLineNumber is 1
+PASS textareaAccessible.selectionStart is 7
+PASS textareaAccessible.selectionEnd is 14
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 7
+PASS textareaAccessible.selectionEnd is 14
+PASS textareaAccessible.selectionStartLineNumber is 1
+PASS textareaAccessible.selectionEndLineNumber is 2
+PASS textareaAccessible.selectionStart is 14
+PASS textareaAccessible.selectionEnd is 21
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 3
+PASS textareaAccessible.selectionStart is 14
+PASS textareaAccessible.selectionEnd is 21
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 3
+PASS textareaAccessible.selectionStart is 14
+PASS textareaAccessible.selectionEnd is 21
+PASS textareaAccessible.selectionStartLineNumber is 2
+PASS textareaAccessible.selectionEndLineNumber is 3
+PASS emptyTextareaAccessible.selectionStart is 0
+PASS emptyTextareaAccessible.selectionEnd is 0
+PASS emptyTextareaAccessible.selectionStartLineNumber is 0
+PASS emptyTextareaAccessible.selectionEndLineNumber is 0
+PASS emptyTextareaAccessible.selectionStart is 0
+PASS emptyTextareaAccessible.selectionEnd is 0
+PASS emptyTextareaAccessible.selectionStartLineNumber is 0
+PASS emptyTextareaAccessible.selectionEndLineNumber is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/whitespace-in-name-calc-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/whitespace-in-name-calc-expected.txt
new file mode 100644
index 0000000..86d9d61
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/accessibility/whitespace-in-name-calc-expected.txt
@@ -0,0 +1,26 @@
+HelloWorld HelloWorld HelloWorld HelloWorld HelloWorld
+HelloWorld
+
+Hello
+World
+ HelloWorld HelloWorld
+Hello
+World
+HelloWorld
+HelloWorld
+PASS accessibleTitle("n1") is "HelloWorld"
+PASS accessibleTitle("n2") is "HelloWorld"
+PASS accessibleTitle("n3") is "HelloWorld"
+PASS accessibleTitle("n4") is "HelloWorld"
+PASS accessibleTitle("n5") is "HelloWorld"
+PASS accessibleTitle("n6") is "HelloWorld"
+PASS accessibleTitle("y1") is "Hello World"
+PASS accessibleTitle("y2") is "Hello World"
+PASS accessibleTitle("y3") is "Hello World"
+PASS accessibleTitle("y4") is "Hello World"
+PASS accessibleTitle("y5") is "Hello World"
+PASS accessibleTitle("y6") is "Hello World"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/animations/lazy-detached-animation-stop-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/animations/lazy-detached-animation-stop-expected.txt
new file mode 100644
index 0000000..e78e52e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/animations/lazy-detached-animation-stop-expected.txt
@@ -0,0 +1,10 @@
+Animations should be canceled when an element is removed from the document.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getAnimations().length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/bindings/blink-in-js-asan-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/bindings/blink-in-js-asan-crash-expected.txt
new file mode 100644
index 0000000..6f9790e7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/bindings/blink-in-js-asan-crash-expected.txt
@@ -0,0 +1 @@
+Test passes if it does not crash on ASan builds. 
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/composited-in-columns-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/composited-in-columns-expected.txt
new file mode 100644
index 0000000..9cba55d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/composited-in-columns-expected.txt
@@ -0,0 +1,88 @@
+{
+  "layers": [
+    {
+      "name": "LayoutView #document",
+      "bounds": [800, 600],
+      "drawsContent": false,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "Scrolling Layer",
+      "bounds": [800, 600],
+      "drawsContent": false
+    },
+    {
+      "name": "Scrolling Contents Layer",
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "LayoutBlockFlow DIV class='composited block'",
+      "bounds": [210, 60],
+      "backgroundColor": "#0000FF",
+      "transform": 1
+    },
+    {
+      "name": "LayoutBlockFlow DIV class='composited box'",
+      "bounds": [50, 50],
+      "contentsOpaque": true,
+      "backgroundColor": "#008000",
+      "transform": 2
+    },
+    {
+      "name": "LayoutBlockFlow DIV class='composited block'",
+      "bounds": [210, 60],
+      "backgroundColor": "#0000FF",
+      "transform": 3
+    },
+    {
+      "name": "LayoutBlockFlow DIV class='composited box'",
+      "bounds": [50, 50],
+      "contentsOpaque": true,
+      "backgroundColor": "#008000",
+      "transform": 4
+    }
+  ],
+  "transforms": [
+    {
+      "id": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [14, 164, 0, 1]
+      ]
+    },
+    {
+      "id": 2,
+      "parent": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [5, 5, 0, 1]
+      ]
+    },
+    {
+      "id": 3,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [272, 89, 0, 1]
+      ]
+    },
+    {
+      "id": 4,
+      "parent": 3,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [5, 5, 0, 1]
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/foreground-layer-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/foreground-layer-expected.txt
new file mode 100644
index 0000000..22276b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/foreground-layer-expected.txt
@@ -0,0 +1,125 @@
+ 
+{
+  "layers": [
+    {
+      "name": "LayoutView #document",
+      "bounds": [800, 600],
+      "drawsContent": false,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "Scrolling Layer",
+      "bounds": [800, 600],
+      "drawsContent": false
+    },
+    {
+      "name": "Scrolling Contents Layer",
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='main box'",
+      "bounds": [318, 318],
+      "backgroundColor": "#FF0000",
+      "transform": 1
+    },
+    {
+      "name": "LayoutNGBlockFlow (positioned) DIV class='negative child'",
+      "bounds": [50, 50],
+      "drawsContent": false,
+      "transform": 3
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='main box' (foreground) Layer",
+      "bounds": [318, 318],
+      "transform": 1
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='main box'",
+      "bounds": [318, 318],
+      "backgroundColor": "#FF0000",
+      "transform": 4
+    },
+    {
+      "name": "Child Containment Layer",
+      "position": [59, 59],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 4
+    },
+    {
+      "name": "LayoutNGBlockFlow (positioned) DIV class='negative child'",
+      "bounds": [50, 50],
+      "drawsContent": false,
+      "transform": 6
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='main box' (foreground) Layer",
+      "position": [59, 59],
+      "bounds": [200, 200],
+      "transform": 4
+    }
+  ],
+  "transforms": [
+    {
+      "id": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [19, 89, 0, 1]
+      ]
+    },
+    {
+      "id": 2,
+      "parent": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [59, 59, 0, 1]
+      ]
+    },
+    {
+      "id": 3,
+      "parent": 2,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [0, 0, 1, 1]
+      ]
+    },
+    {
+      "id": 4,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [363, 19, 0, 1]
+      ]
+    },
+    {
+      "id": 5,
+      "parent": 4,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [59, 59, 0, 1]
+      ]
+    },
+    {
+      "id": 6,
+      "parent": 5,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [0, 0, 1, 1]
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt
new file mode 100644
index 0000000..3ea03f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.txt
@@ -0,0 +1,6 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Link 1
+Target Link.
+Link 2This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/layout-on-compositing-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/layout-on-compositing-change-expected.txt
new file mode 100644
index 0000000..09b9ce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/layout-on-compositing-change-expected.txt
@@ -0,0 +1,2 @@
+Text 
+PASS: hit target node in iframe
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt
new file mode 100644
index 0000000..46614a2d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/fixed-position-nonscrollable-iframes-in-scrollable-page-expected.txt
@@ -0,0 +1,60 @@
+In all iframes, the green fixed-position element should not be composited.
+{
+  "layers": [
+    {
+      "name": "LayoutView #document",
+      "bounds": [800, 600],
+      "drawsContent": false,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "Scrolling Layer",
+      "bounds": [785, 600],
+      "drawsContent": false
+    },
+    {
+      "name": "Scrolling Contents Layer",
+      "bounds": [785, 4016],
+      "contentsOpaque": true,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "LayoutNGBlockFlow (positioned) DIV class='composited box'",
+      "bounds": [300, 100],
+      "contentsOpaque": true,
+      "backgroundColor": "#00FFFF",
+      "transform": 1
+    },
+    {
+      "name": "LayoutIFrame (positioned) IFRAME id='iframe2' class='composited'",
+      "bounds": [154, 154],
+      "transform": 2
+    },
+    {
+      "name": "LayoutIFrame (positioned) IFRAME id='iframe3'",
+      "position": [10, 380],
+      "bounds": [154, 154]
+    }
+  ],
+  "transforms": [
+    {
+      "id": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [50, 360, 0, 1]
+      ]
+    },
+    {
+      "id": 2,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [10, 200, 0, 1]
+      ]
+    }
+  ]
+}
+Composited box underneath iframe.
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/rotate3d-overlap-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/rotate3d-overlap-expected.txt
new file mode 100644
index 0000000..20c0e277
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/layer-creation/rotate3d-overlap-expected.txt
@@ -0,0 +1,115 @@
+ 
+ 
+{
+  "layers": [
+    {
+      "name": "LayoutView #document",
+      "bounds": [800, 600],
+      "drawsContent": false,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "Scrolling Layer",
+      "bounds": [800, 600],
+      "drawsContent": false
+    },
+    {
+      "name": "Scrolling Contents Layer",
+      "bounds": [800, 600],
+      "contentsOpaque": true,
+      "backgroundColor": "#FFFFFF"
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='box translateZ'",
+      "bounds": [110, 110],
+      "backgroundColor": "#0000FF",
+      "transform": 1
+    },
+    {
+      "name": "Squashing Containment Layer",
+      "drawsContent": false
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='composited box rotate15'",
+      "bounds": [110, 110],
+      "backgroundColor": "#0000FF",
+      "transform": 3
+    },
+    {
+      "name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (relative positioned) DIV class='box')",
+      "position": [167, 143],
+      "bounds": [110, 110]
+    },
+    {
+      "name": "Squashing Containment Layer",
+      "drawsContent": false
+    },
+    {
+      "name": "LayoutNGBlockFlow (relative positioned) DIV class='composited box rotate45'",
+      "bounds": [110, 110],
+      "backgroundColor": "#0000FF",
+      "transform": 5
+    },
+    {
+      "name": "Squashing Layer (first squashed layer: LayoutNGBlockFlow (relative positioned) DIV class='box')",
+      "position": [311, 143],
+      "bounds": [110, 110]
+    }
+  ],
+  "transforms": [
+    {
+      "id": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [23, 23, 0, 1]
+      ]
+    },
+    {
+      "id": 2,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [167, 23, 0, 1]
+      ],
+      "flattenInheritedTransform": false
+    },
+    {
+      "id": 3,
+      "parent": 2,
+      "transform": [
+        [0.965925826289068, 0.258819045102521, 0, 0],
+        [-0.258819045102521, 0.965925826289068, 0, 0],
+        [0, 0, 1, 0],
+        [0, 0, 0, 1]
+      ],
+      "origin": [55, 55],
+      "flattenInheritedTransform": false
+    },
+    {
+      "id": 4,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [311, 23, 0, 1]
+      ],
+      "flattenInheritedTransform": false
+    },
+    {
+      "id": 5,
+      "parent": 4,
+      "transform": [
+        [0.707106781186548, 0.707106781186548, 0, 0],
+        [-0.707106781186548, 0.707106781186548, 0, 0],
+        [0, 0, 1, 0],
+        [0, 0, 0, 1]
+      ],
+      "origin": [55, 55],
+      "flattenInheritedTransform": false
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/iframe-scroll-children-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/iframe-scroll-children-expected.txt
new file mode 100644
index 0000000..0e57acc0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/iframe-scroll-children-expected.txt
@@ -0,0 +1,2 @@
+
+Pass -- this test passes if it does not crash.
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-child-expected.txt
index 3d7b7e2..e77b326 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-child-expected.txt
@@ -48,7 +48,6 @@
     }
   ]
 }
-
 CASE 2, hovering over the outer div
 {
   "layers": [
@@ -106,7 +105,6 @@
     }
   ]
 }
-
 CASE 3, hovering over the inner div
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
index ecb3a24c..538d10f 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt
@@ -48,7 +48,6 @@
     }
   ]
 }
-
 CASE 2, hovering over the outer div
 {
   "layers": [
@@ -106,7 +105,6 @@
     }
   ]
 }
-
 CASE 3, hovering over the inner div
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/webgl/webgl-copy-image-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/webgl/webgl-copy-image-expected.txt
new file mode 100644
index 0000000..33b0360b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/webgl/webgl-copy-image-expected.txt
@@ -0,0 +1,6 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS pixel[0] is within 1 of 255
+PASS pixel[1] is within 1 of 0
+PASS pixel[2] is within 1 of 0
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/backgroundfetch-origin-trial-interfaces.html b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/backgroundfetch-origin-trial-interfaces.html
index 8cedcb9..af7691b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/backgroundfetch-origin-trial-interfaces.html
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/backgroundfetch-origin-trial-interfaces.html
@@ -18,14 +18,20 @@
     'BackgroundFetchUpdateUIEvent': ['updateUI'],
     'BackgroundFetchFetch': ['request'],
     'BackgroundFetchRegistration': ['id', 'uploadTotal', 'uploaded',
-                                     'downloadTotal', 'downloaded', 'result',
-                                     'failureReason', 'recordsAvailable',
-                                     'onprogress'],
+                                    'downloadTotal', 'downloaded', 'result',
+                                    'failureReason', 'recordsAvailable',
+                                    'onprogress'],
     'ServiceWorkerRegistration': ['backgroundFetch'],
   });
-}, 'BackgroundFetch API interfaces and properties in Origin-Trial enabled document.');
+}, 'Background Fetch API interfaces and properties in Origin-Trial enabled document.');
 
 fetch_tests_from_worker(new Worker('resources/backgroundfetch-origin-trial-interfaces-worker.js'));
 
+// Only run "disabled" tests if the feature is not enabled via runtime flags.
+if (!self.internals.runtimeFlags.backgroundFetchEnabled) {
+  service_worker_test('resources/backgroundfetch-origin-trial-interfaces-serviceworker-disabled.js');
+}
+
+service_worker_test('resources/backgroundfetch-origin-trial-interfaces-serviceworker-enabled.php');
 
 </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-disabled.js b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-disabled.js
new file mode 100644
index 0000000..f3daf16c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-disabled.js
@@ -0,0 +1,12 @@
+importScripts('/resources/testharness.js',
+              '/resources/origin-trials-helper.js');
+
+test(t => {
+  OriginTrialsHelper.check_interfaces_missing(
+    self,
+    ['BackgroundFetchEvent', 'BackgroundFetchFetch', 'BackgroundFetchManager',
+     'BackgroundFetchUpdateUIEvent', 'BackgroundFetchRecord',
+     'BackgroundFetchRegistration', 'BackgroundFetchSettledFetch']);
+}, 'Background Fetch API interfaces in Origin-Trial disabled worker.');
+
+done();
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-enabled.php b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-enabled.php
new file mode 100644
index 0000000..593f02a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-serviceworker-enabled.php
@@ -0,0 +1,35 @@
+<?php
+// Generate token with the command:
+// generate_token.py http://127.0.0.1:8000 BackgroundFetch --expire-timestamp=2000000000
+header('Origin-Trial: AtDl/AukAuUX0Sw7KRz+mrV2vpSYrfDyVS4vdO3I1clqoNgKGqCX5Np5KIhlC6oQl8XcULXJz5bc9Y4CcYj9xA4AAABXeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQmFja2dyb3VuZEZldGNoIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9');
+header('Content-Type: application/javascript');
+?>
+importScripts('/resources/testharness.js',
+              '/resources/origin-trials-helper.js');
+
+test(t => {
+  OriginTrialsHelper.check_properties(this, {
+    'ServiceWorkerRegistration': ['backgroundFetch'],
+    'BackgroundFetchFetch': ['request'],
+    'BackgroundFetchManager': ['fetch', 'get', 'getIds'],
+    'BackgroundFetchEvent': ['registration'],
+    'BackgroundFetchUpdateUIEvent': ['updateUI'],
+    'BackgroundFetchRecord': ['request', 'responseReady'],
+    'BackgroundFetchSettledFetch': ['response'],
+    'BackgroundFetchRegistration': ['id', 'uploadTotal', 'uploaded',
+                                    'downloadTotal', 'downloaded', 'result',
+                                    'failureReason', 'recordsAvailable',
+                                    'onprogress', 'abort', 'match',
+                                    'matchAll'],
+  });
+});
+
+test(t => {
+  assert_true('onbackgroundfetchsuccess' in self, 'onbackgroundfetchsuccess property exists on global');
+  assert_true('onbackgroundfetchfail' in self, 'onbackgroundfetchfail property exists on global');
+  assert_true('onbackgroundfetchabort' in self, 'onbackgroundfetchabort property exists on global');
+  assert_true('onbackgroundfetchclick' in self, 'onbackgroundfetchclick property exists on global');
+
+}, 'Background Fetch API entry points in Origin-Trial enabled serviceworker.');
+
+done();
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-worker.js b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-worker.js
index 6a65225..d14446b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/backgroundfetch-origin-trial-interfaces-worker.js
@@ -12,6 +12,6 @@
                                        'failureReason', 'recordsAvailable',
                                        'onprogress'],
        });
-}, 'Background Fetch API interfaces and properties in Origin-Trial enabled worker.');
+}, 'Background Fetch API interfaces in an Origin-Trial enabled worker.');
 
 done();
diff --git a/third_party/WebKit/LayoutTests/platform/linux/accessibility/css-generated-content-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/accessibility/css-generated-content-expected.txt
index 13aa988..16d88b7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/accessibility/css-generated-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/accessibility/css-generated-content-expected.txt
@@ -2,12 +2,11 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-
 six seven eight nine ten
diff --git a/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-bounds-for-range-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-bounds-for-range-expected.txt
index c27018c..201604b7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-bounds-for-range-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-bounds-for-range-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text.length is 185
 Accessible text: "The Hitchhiker's Guide to the Galaxy has a few things to say on the subject of resumés. A resumé, it says, is about the most massively useful thing an interstellar hitch hiker can have."
 PASS appendedInlineText is text
diff --git a/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-word-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-word-boundaries-expected.txt
index d204d02b..9c0a90e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-word-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/accessibility/inline-text-word-boundaries-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Accessible text: "Ace ten twenty-one thirty-five. xxxxxxxxxxxxxxxxxxx"
 Character 0: 'A' word=(0, 3): 'Ace'
 Character 1: 'c' word=(0, 3): 'Ace'
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
index b55138b8..f75f91fb 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
index e1e3d7d..95ffafe 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png
index 1df3bf1..22104a8c7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/datalist/input-appearance-range-with-transform-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/datalist/input-appearance-range-with-transform-expected.png
index 59d6942..7354c69ff 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/datalist/input-appearance-range-with-transform-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/datalist/input-appearance-range-with-transform-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
index 48fb9ca..d36b1c7 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
index aa5455f1..6f77e973 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
index c79fd71..b8bb366 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
index a9bb40ba..614e134 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
index 408e8404..d6db5e84 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-text-01-b-expected.png
index 735f892..76a0c53e 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-5-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-5-expected.png
index 767a1a6e..e9f41b3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-5-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-5-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/text/textDecoration2-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/text/textDecoration2-expected.png
index 76bdf0b..35b4488 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/text/textDecoration2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/text/textDecoration2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-01-b-expected.png
index edbd2a4..f7a94cd6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.png
index 93be32fd..ba428ae 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
index f34a089..e2689af 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/accessibility/inline-text-bounds-for-range-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/accessibility/inline-text-bounds-for-range-expected.txt
index 498349e8..294ffb8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/accessibility/inline-text-bounds-for-range-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/accessibility/inline-text-bounds-for-range-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text.length is 185
 Accessible text: "The Hitchhiker's Guide to the Galaxy has a few things to say on the subject of resumés. A resumé, it says, is about the most massively useful thing an interstellar hitch hiker can have."
 PASS appendedInlineText is text
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
index 6e1b2da..33b3093 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
@@ -1,3 +1,5 @@
+
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt
index d2683f93..04b0a9e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt
@@ -1,7 +1,4 @@
-  
-   
-  
-{
+ {
   "layers": [
     {
       "name": "LayoutView #document",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/textarea-scroll-touch-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/textarea-scroll-touch-expected.txt
index 6169f1c..e8dc186 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/textarea-scroll-touch-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/textarea-scroll-touch-expected.txt
@@ -1,4 +1,4 @@
- 
+  
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
index 6e47911..d49fc93 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png
index 6cd228bd..c3a44c3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt
index c471993..3a8c197 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt
@@ -1,3 +1,6 @@
+
+
+
 Initial
 {
   "layers": [
@@ -69,7 +72,6 @@
     }
   ]
 }
-
 After step 1
 {
   "layers": [
@@ -157,7 +159,6 @@
     }
   ]
 }
-
 After step 2
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
index 34a0f4cc..972d7e5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
index 04b3028..983d641 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
index 3703878..cf49200c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
index fd87ed12..f6ee5667 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png
index f0b3e605..b1011b8 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-5-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-5-expected.png
index 718b9f9..81bc42d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-5-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-5-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration2-expected.png
index 83fce44..82a4e5a4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textDecoration2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.png
index c078476..9e803e02 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-01-b-expected.png
index 96936f9..0d59058 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-layer-crash-expected.png
new file mode 100644
index 0000000..cf0cebd7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/accessibility/css-generated-content-expected.txt b/third_party/WebKit/LayoutTests/platform/win/accessibility/css-generated-content-expected.txt
index 13aa988..a7e0845 100644
--- a/third_party/WebKit/LayoutTests/platform/win/accessibility/css-generated-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/accessibility/css-generated-content-expected.txt
@@ -2,12 +2,11 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS text is concatenatedInlineText
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
-
-six seven eight nine ten
+six seven eight nine ten 
diff --git a/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-bounds-for-range-expected.txt b/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-bounds-for-range-expected.txt
index 8a0d0ca..d1024c8 100644
--- a/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-bounds-for-range-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-bounds-for-range-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 PASS text.length is 185
 Accessible text: "The Hitchhiker's Guide to the Galaxy has a few things to say on the subject of resumés. A resumé, it says, is about the most massively useful thing an interstellar hitch hiker can have."
 PASS appendedInlineText is text
diff --git a/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-word-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-word-boundaries-expected.txt
index 8ece8841..471c624 100644
--- a/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-word-boundaries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/accessibility/inline-text-word-boundaries-expected.txt
@@ -4,6 +4,7 @@
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
+
 Accessible text: "Ace ten twenty-one thirty-five. xxxxxxxxxxxxxxxxxxx"
 Character 0: 'A' word=(0, 3): 'Ace'
 Character 1: 'c' word=(0, 3): 'Ace'
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
index 98d18ede..241948f1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt
@@ -1,3 +1,5 @@
+
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/composited-in-columns-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/composited-in-columns-expected.txt
index 1701af10..28797b1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/composited-in-columns-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/composited-in-columns-expected.txt
@@ -1,7 +1,4 @@
-  
-   
-  
-{
+ {
   "layers": [
     {
       "name": "LayoutView #document",
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
index 392b2cc1..1532c69 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
@@ -1,3 +1,4 @@
+
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
index 1efe5f9..0ea0c42 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/textarea-scroll-touch-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/textarea-scroll-touch-expected.txt
index a4cc377f..0138d103 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/textarea-scroll-touch-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/textarea-scroll-touch-expected.txt
@@ -1,4 +1,4 @@
- 
+  
 {
   "layers": [
     {
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
index f254eba..364d8468 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
index a8a1df6..d30199a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/visibility/visibility-image-layers-dynamic-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/visibility/visibility-image-layers-dynamic-expected.txt
index 33cd1597..a0e54e99 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/visibility/visibility-image-layers-dynamic-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/visibility/visibility-image-layers-dynamic-expected.txt
@@ -1,3 +1,6 @@
+
+
+
 Initial
 {
   "layers": [
@@ -69,7 +72,6 @@
     }
   ]
 }
-
 After step 1
 {
   "layers": [
@@ -157,7 +159,6 @@
     }
   ]
 }
-
 After step 2
 {
   "layers": [
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/datalist/input-appearance-range-with-transform-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/datalist/input-appearance-range-with-transform-expected.png
index c087144..56392e6 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/datalist/input-appearance-range-with-transform-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/datalist/input-appearance-range-with-transform-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/text/emoticons-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/text/emoticons-expected.png
index cbc4cf8..19805b7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/text/emoticons-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/text/emoticons-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/images/color-profile-layer-filter-expected.png b/third_party/WebKit/LayoutTests/platform/win/images/color-profile-layer-filter-expected.png
new file mode 100644
index 0000000..b7b3e53
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/images/color-profile-layer-filter-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
index 1c1ed78..6a463924 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
index a7ef0a2..c69b566 100644
--- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-svg-as-image-no-fixed-intrinsic-size-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
index b9562aa..5747ee2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
index cf6c392..8a65ea62 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/animate-elem-41-t-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
index 42012a4..8685afbb 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-text-01-b-expected.png
index 8f86af2..33351e7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-5-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-5-expected.png
index 5ca00db6e..de8f1852 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-5-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-5-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textDecoration2-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textDecoration2-expected.png
index 323d704b..fe28bc6 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textDecoration2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textDecoration2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textProperties-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textProperties-expected.png
index 598d33b..8e3bb37c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textProperties-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/batik/text/textProperties-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-01-b-expected.png
index 82335ba..f40565ba 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-01-b-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-text-01-b-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png
index c74aa17f..ade1750 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-layer-crash-expected.png
index 2c7f8c2..f22ae664 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/as-background-image/svg-as-background-5-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/as-background-image/svg-as-background-5-expected.png
index 56a0fd8..15ef475f 100644
--- a/third_party/WebKit/LayoutTests/platform/win7/svg/as-background-image/svg-as-background-5-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win7/svg/as-background-image/svg-as-background-5-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/resources/gesture-util.js b/third_party/WebKit/LayoutTests/resources/gesture-util.js
index 8bedc14..e4408856 100644
--- a/third_party/WebKit/LayoutTests/resources/gesture-util.js
+++ b/third_party/WebKit/LayoutTests/resources/gesture-util.js
@@ -247,7 +247,7 @@
 
 // Simulate a mouse drag and drop. mouse down at {start_x, start_y}, move to
 // {end_x, end_y} and release.
-function mouseDragAndDrop(start_x, start_y, end_x, end_y, button = 'left') {
+function mouseDragAndDrop(start_x, start_y, end_x, end_y, button = 'left', t = 0) {
   return new Promise((resolve, reject) => {
     if (chrome && chrome.gpuBenchmarking) {
       let pointerActions = [{
@@ -255,7 +255,9 @@
         actions: [
           { 'name': 'pointerMove', 'x': start_x, 'y': start_y },
           { 'name': 'pointerDown', 'x': start_x, 'y': start_y, 'button': button },
+          { 'name': 'pause', 'duration': t},
           { 'name': 'pointerMove', 'x': end_x, 'y': end_y },
+          { 'name': 'pause', 'duration': t},
           { 'name': 'pointerUp', 'button': button },
         ]
       }];
diff --git a/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
index 8b13789..139597f9 100644
--- a/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt
@@ -1 +1,2 @@
 
+
diff --git a/third_party/WebKit/LayoutTests/virtual/video-surface-layer/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/virtual/video-surface-layer/media/video-layer-crash-expected.png
deleted file mode 100644
index 9525fa1..0000000
--- a/third_party/WebKit/LayoutTests/virtual/video-surface-layer/media/video-layer-crash-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/common/feature_policy/feature_policy.cc b/third_party/blink/common/feature_policy/feature_policy.cc
index 164578ba..983f691 100644
--- a/third_party/blink/common/feature_policy/feature_policy.cc
+++ b/third_party/blink/common/feature_policy/feature_policy.cc
@@ -6,6 +6,7 @@
 
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
+#include "base/no_destructor.h"
 #include "base/stl_util.h"
 
 namespace blink {
@@ -242,62 +243,62 @@
 // See third_party/blink/public/common/feature_policy/feature_policy.h for
 // status of each feature (in spec, implemented, etc).
 const FeaturePolicy::FeatureList& FeaturePolicy::GetDefaultFeatureList() {
-  CR_DEFINE_STATIC_LOCAL(FeatureList, default_feature_list,
-                         ({{mojom::FeaturePolicyFeature::kAccelerometer,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kAccessibilityEvents,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kAmbientLightSensor,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kAnimations,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kAutoplay,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kCamera,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kDocumentWrite,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kEncryptedMedia,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kFullscreen,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kGeolocation,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kGyroscope,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kImageCompression,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kLazyLoad,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kLegacyImageFormats,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kMagnetometer,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kMaxDownscalingImage,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kMicrophone,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kMidiFeature,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kPayment,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kPictureInPicture,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kSpeaker,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kSyncScript,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kSyncXHR,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kUnsizedMedia,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kUsb,
-                            FeaturePolicy::FeatureDefault::EnableForSelf},
-                           {mojom::FeaturePolicyFeature::kVerticalScroll,
-                            FeaturePolicy::FeatureDefault::EnableForAll},
-                           {mojom::FeaturePolicyFeature::kWebVr,
-                            FeaturePolicy::FeatureDefault::EnableForSelf}}));
-  return default_feature_list;
+  static base::NoDestructor<FeatureList> default_feature_list(
+      {{mojom::FeaturePolicyFeature::kAccelerometer,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kAccessibilityEvents,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kAmbientLightSensor,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kAnimations,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kAutoplay,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kCamera,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kDocumentWrite,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kEncryptedMedia,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kFullscreen,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kGeolocation,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kGyroscope,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kImageCompression,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kLazyLoad,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kLegacyImageFormats,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kMagnetometer,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kMaxDownscalingImage,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kMicrophone,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kMidiFeature,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kPayment,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kPictureInPicture,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kSpeaker,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kSyncScript,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kSyncXHR,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kUnsizedMedia,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kUsb,
+        FeaturePolicy::FeatureDefault::EnableForSelf},
+       {mojom::FeaturePolicyFeature::kVerticalScroll,
+        FeaturePolicy::FeatureDefault::EnableForAll},
+       {mojom::FeaturePolicyFeature::kWebVr,
+        FeaturePolicy::FeatureDefault::EnableForSelf}});
+  return *default_feature_list;
 }
 
 }  // namespace blink
diff --git a/third_party/blink/public/platform/web_gesture_event.h b/third_party/blink/public/platform/web_gesture_event.h
index 4ac43735..9f151e8 100644
--- a/third_party/blink/public/platform/web_gesture_event.h
+++ b/third_party/blink/public/platform/web_gesture_event.h
@@ -60,6 +60,9 @@
       int tap_count;
       float width;
       float height;
+      // |needs_wheel_event| for touchpad GestureDoubleTap has the same
+      // semantics as |needs_wheel_event| for touchpad pinch described below.
+      bool needs_wheel_event;
     } tap;
 
     struct {
@@ -277,7 +280,16 @@
     }
   }
 
+  bool IsTouchpadZoomEvent() const {
+    // Touchpad GestureDoubleTap also causes a page scale change like a touchpad
+    // pinch gesture.
+    return source_device_ == WebGestureDevice::kWebGestureDeviceTouchpad &&
+           (WebInputEvent::IsPinchGestureEventType(type_) ||
+            type_ == kGestureDoubleTap);
+  }
+
   bool NeedsWheelEvent() const {
+    DCHECK(IsTouchpadZoomEvent());
     switch (type_) {
       case kGesturePinchBegin:
         return data.pinch_begin.needs_wheel_event;
@@ -285,6 +297,8 @@
         return data.pinch_update.needs_wheel_event;
       case kGesturePinchEnd:
         return data.pinch_end.needs_wheel_event;
+      case kGestureDoubleTap:
+        return data.tap.needs_wheel_event;
       default:
         NOTREACHED();
         return false;
@@ -292,8 +306,7 @@
   }
 
   void SetNeedsWheelEvent(bool needs_wheel_event) {
-    DCHECK(!needs_wheel_event ||
-           source_device_ == WebGestureDevice::kWebGestureDeviceTouchpad);
+    DCHECK(!needs_wheel_event || IsTouchpadZoomEvent());
     switch (type_) {
       case kGesturePinchBegin:
         data.pinch_begin.needs_wheel_event = needs_wheel_event;
@@ -304,8 +317,11 @@
       case kGesturePinchEnd:
         data.pinch_end.needs_wheel_event = needs_wheel_event;
         break;
+      case kGestureDoubleTap:
+        data.tap.needs_wheel_event = needs_wheel_event;
+        break;
       default:
-        NOTREACHED();
+        break;
     }
   }
 };
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 68b3ae21..2bd1de1 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -744,9 +744,6 @@
   virtual WebSize GetScrollOffset() const = 0;
   virtual void SetScrollOffset(const WebSize&) = 0;
 
-  // If set to false, do not draw scrollbars on this frame's view.
-  virtual void SetCanHaveScrollbars(bool) = 0;
-
   // The size of the document in this frame.
   virtual WebSize DocumentSize() const = 0;
 
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index b9ced29..511d0fe4 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -2501,7 +2501,7 @@
   EXPECT_FALSE(
       view->LayoutViewport()->UserInputScrollable(kHorizontalScrollbar));
 
-  web_view_helper.LocalMainFrame()->SetCanHaveScrollbars(true);
+  web_view_helper.LocalMainFrame()->GetFrameView()->SetCanHaveScrollbars(true);
   EXPECT_FALSE(view->LayoutViewport()->UserInputScrollable(kVerticalScrollbar));
   EXPECT_FALSE(
       view->LayoutViewport()->UserInputScrollable(kHorizontalScrollbar));
diff --git a/third_party/blink/renderer/core/fetch/multipart_parser.cc b/third_party/blink/renderer/core/fetch/multipart_parser.cc
index 43d2a32..befab6a3 100644
--- a/third_party/blink/renderer/core/fetch/multipart_parser.cc
+++ b/third_party/blink/renderer/core/fetch/multipart_parser.cc
@@ -305,7 +305,7 @@
     header_size = buffered_header_bytes_.size();
   }
 
-  size_t end = 0u;
+  wtf_size_t end = 0u;
   if (!ParseMultipartFormHeadersFromBody(header_bytes, header_size,
                                          header_fields, &end)) {
     // Store the current header bytes for the next call unless that has
diff --git a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc
index 388b5db..e6f7955 100644
--- a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc
@@ -140,9 +140,6 @@
   record.total_duration += duration;
   ++record.sample_count;
 
-  // Record the UMA
-  record.uma_counter->CountMicroseconds(duration);
-
   // Just record the duration for ratios. We compute the ratio later
   // when we know the frame time.
   ratio_metric_records_[metric_index].interval_duration += duration;
@@ -167,14 +164,24 @@
   ++primary_metric_.sample_count;
 
   // Compute all the dependent metrics
-  for (auto& record : ratio_metric_records_) {
-    double ratio =
-        record.interval_duration.InMicrosecondsF() / duration.InMicrosecondsF();
-    if (ratio > record.worst_case_ratio)
-      record.worst_case_ratio = ratio;
-    record.total_ratio += ratio;
-    ++record.sample_count;
-    record.interval_duration = TimeDelta();
+  for (int i = 0; i < kCount; ++i) {
+    auto& absolute_record = absolute_metric_records_[i];
+    auto& ratio_record = ratio_metric_records_[i];
+
+    // Record the UMA for the absolute metrics. This enables aggregating UMA
+    // over the entire lifecycle, important for steps (forced style and layout)
+    // that might take place more than once per lifecycle update.
+    absolute_record.uma_counter->CountMicroseconds(
+        ratio_record.interval_duration);
+
+    // Aggregate the UKM ratio information
+    double ratio = ratio_record.interval_duration.InMicrosecondsF() /
+                   duration.InMicrosecondsF();
+    if (ratio > ratio_record.worst_case_ratio)
+      ratio_record.worst_case_ratio = ratio;
+    ratio_record.total_ratio += ratio;
+    ++ratio_record.sample_count;
+    ratio_record.interval_duration = TimeDelta();
   }
 
   has_data_ = true;
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index a7c0e79..68c60ee 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1954,11 +1954,6 @@
   Client()->DidFinishLoad();
 }
 
-void WebLocalFrameImpl::SetCanHaveScrollbars(bool can_have_scrollbars) {
-  if (LocalFrameView* view = GetFrameView())
-    view->SetCanHaveScrollbars(can_have_scrollbars);
-}
-
 void WebLocalFrameImpl::SetInputEventsScaleForEmulation(
     float content_scale_factor) {
   input_events_scale_factor_for_emulation_ = content_scale_factor;
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index e857ff9..264c9e0 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -394,11 +394,6 @@
                WebHistoryCommitType);
   void DidFinish();
 
-  // Sets whether the WebLocalFrameImpl allows its document to be scrolled.
-  // If the parameter is true, allow the document to be scrolled.
-  // Otherwise, disallow scrolling.
-  void SetCanHaveScrollbars(bool) override;
-
   void SetClient(WebLocalFrameClient* client) { client_ = client; }
 
   WebFrameWidgetBase* FrameWidgetImpl() { return frame_widget_; }
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.cc b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.cc
index 4a678fbf..f58f908 100644
--- a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.cc
+++ b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.cc
@@ -31,6 +31,7 @@
 #include "third_party/blink/renderer/core/origin_trials/origin_trials.h"
 #include "third_party/blink/renderer/core/workers/worker_animation_frame_provider.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
+#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/weborigin/security_origin.h"
 
@@ -44,14 +45,17 @@
       creation_attributes_(attrs) {
   // Supported color spaces: srgb-uint8, srgb-f16, p3-f16, rec2020-f16. For wide
   // gamut color spaces, user must explicitly request for float16 storage.
-  // Otherwise, we fall back to srgb-uint8. Invalid requests fall back to
-  // srgb-uint8 too.
-  if (creation_attributes_.pixel_format == kF16CanvasPixelFormatName) {
-    color_params_.SetCanvasPixelFormat(kF16CanvasPixelFormat);
-    if (creation_attributes_.color_space == kRec2020CanvasColorSpaceName)
-      color_params_.SetCanvasColorSpace(kRec2020CanvasColorSpace);
-    else if (creation_attributes_.color_space == kP3CanvasColorSpaceName)
-      color_params_.SetCanvasColorSpace(kP3CanvasColorSpace);
+  // Otherwise, we fall back to srgb-uint8. If GPU compositing is not available,
+  // again we fall back to srgb-uint8. Invalid requests also fall back to
+  // srgb-uint8.
+  if (SharedGpuContext::IsGpuCompositingEnabled()) {
+    if (creation_attributes_.pixel_format == kF16CanvasPixelFormatName) {
+      color_params_.SetCanvasPixelFormat(kF16CanvasPixelFormat);
+      if (creation_attributes_.color_space == kRec2020CanvasColorSpaceName)
+        color_params_.SetCanvasColorSpace(kRec2020CanvasColorSpace);
+      else if (creation_attributes_.color_space == kP3CanvasColorSpaceName)
+        color_params_.SetCanvasColorSpace(kP3CanvasColorSpace);
+    }
   }
 
   if (!creation_attributes_.alpha) {
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third_party/blink/renderer/core/html/html_anchor_element.cc
index 1b45227..aa4f1c5 100644
--- a/third_party/blink/renderer/core/html/html_anchor_element.cc
+++ b/third_party/blink/renderer/core/html/html_anchor_element.cc
@@ -403,6 +403,7 @@
   }
   if (HasRel(kRelationNoOpener))
     frame_request.SetShouldSetOpener(kNeverSetOpener);
+  frame_request.SetHrefTranslate(FastGetAttribute(hreftranslateAttr));
   frame_request.SetTriggeringEventInfo(
       event.isTrusted() ? WebTriggeringEventInfo::kFromTrustedEvent
                         : WebTriggeringEventInfo::kFromUntrustedEvent);
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc
index b7a6fe8..b59ee067 100644
--- a/third_party/blink/renderer/core/html/html_image_element.cc
+++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -313,7 +313,8 @@
         GetLayoutObject()->IsLayoutImage())
       ToLayoutImage(GetLayoutObject())->IntrinsicSizeChanged();
   } else if (name == lazyloadAttr &&
-             EqualIgnoringASCIICase(params.new_value, "off")) {
+             EqualIgnoringASCIICase(params.new_value, "off") &&
+             !GetDocument().IsLazyLoadPolicyEnforced()) {
     GetImageLoader().LoadDeferredImage(referrer_policy_);
   } else {
     HTMLElement::ParseAttribute(params);
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
index 8ff868d..522568d 100644
--- a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
+++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
@@ -220,7 +220,7 @@
       const SegmentedString& source,
       const ClientHintsPreferences& client_hints_preferences,
       const PictureData& picture_data,
-      const ReferrerPolicy document_referrer_policy) {
+      const CachedDocumentParameters& document_parameters) {
     PreloadRequest::RequestType request_type =
         PreloadRequest::kRequestTypePreload;
     base::Optional<ResourceType> type;
@@ -266,8 +266,9 @@
     // The element's 'referrerpolicy' attribute (if present) takes precedence
     // over the document's referrer policy.
     ReferrerPolicy referrer_policy =
-        (referrer_policy_ != kReferrerPolicyDefault) ? referrer_policy_
-                                                     : document_referrer_policy;
+        (referrer_policy_ != kReferrerPolicyDefault)
+            ? referrer_policy_
+            : document_parameters.referrer_policy;
     auto request = PreloadRequest::CreateIfNeeded(
         InitiatorFor(tag_impl_), position, url_to_load_, predicted_base_url,
         type.value(), referrer_policy, PreloadRequest::kDocumentIsReferrer,
@@ -286,7 +287,10 @@
     request->SetCharset(Charset());
     request->SetDefer(defer_);
 
-    if (lazyload_attr_set_to_off_ ||
+    // If the 'lazyload' feature policy is enforced, the attribute value "off"
+    // for the 'lazyload' attribute is considered as 'auto'.
+    if ((lazyload_attr_set_to_off_ &&
+         !document_parameters.lazyload_policy_enforced) ||
         (width_attr_small_absolute_ && height_attr_small_absolute_)) {
       request->SetIsLazyloadImageDisabled(true);
     }
@@ -901,7 +905,7 @@
         scanner.HandlePictureSourceURL(picture_data_);
       std::unique_ptr<PreloadRequest> request = scanner.CreatePreloadRequest(
           predicted_base_element_url_, source, client_hints_preferences_,
-          picture_data_, document_parameters_->referrer_policy);
+          picture_data_, *document_parameters_);
       if (request)
         requests.push_back(std::move(request));
       return;
@@ -988,6 +992,7 @@
                           document->GetSettings()->GetViewportMetaEnabled();
   referrer_policy = document->GetReferrerPolicy();
   integrity_features = SubresourceIntegrityHelper::GetFeatures(document);
+  lazyload_policy_enforced = document->IsLazyLoadPolicyEnforced();
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner.h b/third_party/blink/renderer/core/html/parser/html_preload_scanner.h
index 6002ea8..4905f0c 100644
--- a/third_party/blink/renderer/core/html/parser/html_preload_scanner.h
+++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner.h
@@ -74,6 +74,7 @@
   bool viewport_meta_enabled;
   ReferrerPolicy referrer_policy;
   SubresourceIntegrity::IntegrityFeatures integrity_features;
+  bool lazyload_policy_enforced;
 
  private:
   explicit CachedDocumentParameters(Document*);
diff --git a/third_party/blink/renderer/core/input/mouse_wheel_event_manager.cc b/third_party/blink/renderer/core/input/mouse_wheel_event_manager.cc
index 38e5e84..7f58ccd 100644
--- a/third_party/blink/renderer/core/input/mouse_wheel_event_manager.cc
+++ b/third_party/blink/renderer/core/input/mouse_wheel_event_manager.cc
@@ -56,15 +56,16 @@
     return WebInputEventResult::kNotHandled;
   }
 
+  // Synthetic wheel events generated from GestureDoubleTap are phaseless.
+  // Wheel events generated from plugin and tests may not have phase info.
   bool has_phase_info = event.phase != WebMouseWheelEvent::kPhaseNone ||
                         event.momentum_phase != WebMouseWheelEvent::kPhaseNone;
-  if (!has_phase_info) {
-    // Wheel events generated from plugin and tests may not have phase info.
-    // Send these events to the target under the cursor.
-    wheel_target_ = FindTargetNode(event, doc, view);
-  } else if (event.phase == WebMouseWheelEvent::kPhaseBegan || !wheel_target_) {
-    // Find and save the wheel_target_, this target will be used for the rest
-    // of the current scrolling sequence.
+
+  // Find and save the wheel_target_, this target will be used for the rest
+  // of the current scrolling sequence. In the absence of phase info, send the
+  // event to the target under the cursor.
+  if (event.phase == WebMouseWheelEvent::kPhaseBegan || !wheel_target_ ||
+      !has_phase_info) {
     wheel_target_ = FindTargetNode(event, doc, view);
   }
 
diff --git a/third_party/blink/renderer/core/input/scroll_snap_test.cc b/third_party/blink/renderer/core/input/scroll_snap_test.cc
index ab29a7e..4ad31292 100644
--- a/third_party/blink/renderer/core/input/scroll_snap_test.cc
+++ b/third_party/blink/renderer/core/input/scroll_snap_test.cc
@@ -115,7 +115,7 @@
   event.data.scroll_update.delta_y = delta_y;
   if (is_in_inertial_phase) {
     event.data.scroll_update.inertial_phase = WebGestureEvent::kMomentumPhase;
-    event.SetTimeStamp(base::TimeTicks());
+    event.SetTimeStamp(Compositor().LastFrameTime());
   }
   event.SetFrameScale(1);
   GetDocument().GetFrame()->GetEventHandler().HandleGestureScrollEvent(event);
@@ -190,9 +190,8 @@
   // Fling with an inertial GSU.
   ScrollUpdate(95, 100, -5, 0, true);
   ScrollEnd(90, 100);
-  Compositor().BeginFrame();
   // Animate halfway through the fling.
-  Compositor().BeginFrame(0.2);
+  Compositor().BeginFrame(0.25);
   ASSERT_GT(scroller->scrollLeft(), 150);
   ASSERT_LT(scroller->scrollLeft(), 180);
   ASSERT_EQ(scroller->scrollTop(), 200);
diff --git a/third_party/blink/renderer/core/inspector/browser_protocol.pdl b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
index b63737e1..91596c98 100644
--- a/third_party/blink/renderer/core/inspector/browser_protocol.pdl
+++ b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
@@ -490,6 +490,7 @@
       accessibilityEvents
       audioCapture
       backgroundSync
+      backgroundFetch
       clipboardRead
       clipboardWrite
       durableStorage
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc
index 9e26e570..4ee981c7 100644
--- a/third_party/blink/renderer/core/layout/layout_box.cc
+++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -3765,21 +3765,6 @@
         }
       }
 
-      if (cb->IsOutOfFlowPositioned() && cb->StyleRef().Height().IsAuto() &&
-          !(cb->StyleRef().Top().IsAuto() ||
-            cb->StyleRef().Bottom().IsAuto())) {
-        SECURITY_DCHECK(cb->IsLayoutBlock());
-        LayoutBlock* block = ToLayoutBlock(cb);
-        LogicalExtentComputedValues computed_values;
-        block->ComputeLogicalHeight(block->LogicalHeight(), LayoutUnit(),
-                                    computed_values);
-        LayoutUnit new_content_height = computed_values.extent_ -
-                                        block->BorderAndPaddingLogicalHeight() -
-                                        block->ScrollbarLogicalHeight();
-        return AdjustContentBoxLogicalHeightForBoxSizing(
-            ValueForLength(logical_height, new_content_height));
-      }
-
       LayoutUnit available_height;
       if (IsOutOfFlowPositioned()) {
         available_height = ContainingBlockLogicalHeightForPositioned(
diff --git a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
index 38ccae6..158256f 100644
--- a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
+++ b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
@@ -247,6 +247,12 @@
   return kStatic;
 }
 
+String LayoutNGListItem::MarkerTextWithSuffix() const {
+  StringBuilder text;
+  MarkerText(&text, kWithSuffix);
+  return text.ToString();
+}
+
 String LayoutNGListItem::MarkerTextWithoutSuffix() const {
   StringBuilder text;
   MarkerText(&text, kWithoutSuffix);
diff --git a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h
index a060bb1..204a7ef 100644
--- a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h
+++ b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h
@@ -19,6 +19,7 @@
   ListItemOrdinal& Ordinal() { return ordinal_; }
 
   int Value() const;
+  String MarkerTextWithSuffix() const;
   String MarkerTextWithoutSuffix() const;
 
   LayoutObject* Marker() const { return marker_; }
diff --git a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker.cc b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker.cc
index b7cd49d..2337896 100644
--- a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker.cc
+++ b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker.cc
@@ -66,7 +66,11 @@
 }
 
 String LayoutNGListMarker::TextAlternative() const {
-  return ToLayoutText(FirstChild())->GetText();
+  // Compute from the list item, in the logical order even in RTL, reflecting
+  // speech order.
+  if (LayoutNGListItem* list_item = ListItem())
+    return list_item->MarkerTextWithSuffix();
+  return g_empty_string;
 }
 
 bool LayoutNGListMarker::NeedsOccupyWholeLine() const {
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
index 156f166..708eabe1 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
@@ -964,7 +964,7 @@
   PositionOrPropagateListMarker(*layout_result, &logical_offset);
 
   container_builder_.AddChild(*layout_result, logical_offset);
-  container_builder_.PropagateBreak(layout_result);
+  container_builder_.PropagateBreak(*layout_result);
 
   // The margins we store will be used by e.g. getComputedStyle().
   // When calculating these values, ignore any floats that might have
@@ -1315,7 +1315,7 @@
 
   container_builder_.AddChild(*layout_result, logical_offset);
   if (child.IsBlock())
-    container_builder_.PropagateBreak(layout_result);
+    container_builder_.PropagateBreak(*layout_result);
 
   if (child.IsBlock())
     ToNGBlockNode(child).StoreMargins(ConstraintSpace(), child_data.margins);
@@ -2117,7 +2117,7 @@
 
     container_builder_.AddChild(*positioned_float.layout_result,
                                 logical_offset);
-    container_builder_.PropagateBreak(positioned_float.layout_result);
+    container_builder_.PropagateBreak(*positioned_float.layout_result);
   }
 }
 
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc
index f6a909a..dffd5b17 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.cc
@@ -152,20 +152,20 @@
 }
 
 NGFragmentBuilder& NGFragmentBuilder::PropagateBreak(
-    scoped_refptr<NGLayoutResult> child_layout_result) {
+    const NGLayoutResult& child_layout_result) {
   if (!did_break_)
-    PropagateBreak(child_layout_result->PhysicalFragment());
-  if (child_layout_result->HasForcedBreak())
+    PropagateBreak(*child_layout_result.PhysicalFragment());
+  if (child_layout_result.HasForcedBreak())
     SetHasForcedBreak();
   else
-    PropagateSpaceShortage(child_layout_result->MinimalSpaceShortage());
+    PropagateSpaceShortage(child_layout_result.MinimalSpaceShortage());
   return *this;
 }
 
 NGFragmentBuilder& NGFragmentBuilder::PropagateBreak(
-    scoped_refptr<const NGPhysicalFragment> child_fragment) {
+    const NGPhysicalFragment& child_fragment) {
   if (!did_break_) {
-    const auto* token = child_fragment->BreakToken();
+    const auto* token = child_fragment.BreakToken();
     did_break_ = token && !token->IsFinished();
   }
   return *this;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h
index cf662d0d..830f416 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h
+++ b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h
@@ -79,8 +79,8 @@
   NGFragmentBuilder& AddBreakBeforeLine(int line_number);
 
   // Update if we have fragmented in this flow.
-  NGFragmentBuilder& PropagateBreak(scoped_refptr<NGLayoutResult>);
-  NGFragmentBuilder& PropagateBreak(scoped_refptr<const NGPhysicalFragment>);
+  NGFragmentBuilder& PropagateBreak(const NGLayoutResult&);
+  NGFragmentBuilder& PropagateBreak(const NGPhysicalFragment&);
 
   void AddOutOfFlowLegacyCandidate(NGBlockNode,
                                    const NGStaticPosition&,
diff --git a/third_party/blink/renderer/core/loader/frame_load_request.h b/third_party/blink/renderer/core/loader/frame_load_request.h
index d4a9a59c..e0f85c8 100644
--- a/third_party/blink/renderer/core/loader/frame_load_request.h
+++ b/third_party/blink/renderer/core/loader/frame_load_request.h
@@ -92,6 +92,11 @@
     should_set_opener_ = should_set_opener;
   }
 
+  const AtomicString& HrefTranslate() { return href_translate_; }
+  void SetHrefTranslate(const AtomicString& translate) {
+    href_translate_ = translate;
+  }
+
   ContentSecurityPolicyDisposition ShouldCheckMainWorldContentSecurityPolicy()
       const {
     return should_check_main_world_content_security_policy_;
@@ -131,6 +136,7 @@
   Member<Document> origin_document_;
   ResourceRequest resource_request_;
   AtomicString frame_name_;
+  AtomicString href_translate_;
   ClientRedirectPolicy client_redirect_;
   WebTriggeringEventInfo triggering_event_info_ =
       WebTriggeringEventInfo::kNotFromEvent;
diff --git a/third_party/blink/renderer/core/loader/image_loader.cc b/third_party/blink/renderer/core/loader/image_loader.cc
index d109d3a5..efccc7e 100644
--- a/third_party/blink/renderer/core/loader/image_loader.cc
+++ b/third_party/blink/renderer/core/loader/image_loader.cc
@@ -85,9 +85,10 @@
     return false;
 
   if (EqualIgnoringASCIICase(
-          html_image->FastGetAttribute(HTMLNames::lazyloadAttr), "off"))
+          html_image->FastGetAttribute(HTMLNames::lazyloadAttr), "off") &&
+      !frame->GetDocument()->IsLazyLoadPolicyEnforced()) {
     return false;
-
+  }
   // Avoid lazyloading if width and height attributes are small. This
   // heuristic helps avoid double fetching tracking pixels.
   double width, height;
diff --git a/third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser.cc b/third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser.cc
index 986a3af..f1d2fbde 100644
--- a/third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser.cc
+++ b/third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser.cc
@@ -147,7 +147,7 @@
   for (const auto& header : original_response_.HttpHeaderFields())
     response.AddHTTPHeaderField(header.key, header.value);
 
-  size_t end = 0;
+  wtf_size_t end = 0;
   if (!ParseMultipartHeadersFromBody(data_.data() + pos, data_.size() - pos,
                                      &response, &end))
     return false;
diff --git a/third_party/blink/renderer/core/testing/sim/sim_compositor.cc b/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
index 1fcd0111..30850ca 100644
--- a/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
+++ b/third_party/blink/renderer/core/testing/sim/sim_compositor.cc
@@ -77,6 +77,10 @@
   return canvas.GetCommands();
 }
 
+void SimCompositor::ApplyViewportChanges(const ApplyViewportChangesArgs& args) {
+  web_view_->ApplyViewportChanges(args);
+}
+
 void SimCompositor::RequestNewLayerTreeFrameSink(
     LayerTreeFrameSinkCallback callback) {
   // Make a valid LayerTreeFrameSink so the compositor will generate begin main
diff --git a/third_party/blink/renderer/core/testing/sim/sim_compositor.h b/third_party/blink/renderer/core/testing/sim/sim_compositor.h
index c5484f7..e1b033ee 100644
--- a/third_party/blink/renderer/core/testing/sim/sim_compositor.h
+++ b/third_party/blink/renderer/core/testing/sim/sim_compositor.h
@@ -11,6 +11,7 @@
 #include "content/test/stub_layer_tree_view_delegate.h"
 #include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
 #include "third_party/blink/renderer/core/testing/sim/sim_canvas.h"
+#include "third_party/blink/renderer/platform/graphics/apply_viewport_changes.h"
 
 namespace blink {
 
@@ -75,8 +76,11 @@
     return layer_tree_view_->layer_tree_host()->background_color();
   }
 
+  base::TimeTicks LastFrameTime() const { return last_frame_time_; }
+
  private:
   // content::LayerTreeViewDelegate implementation.
+  void ApplyViewportChanges(const ApplyViewportChangesArgs& args) override;
   void RequestNewLayerTreeFrameSink(
       LayerTreeFrameSinkCallback callback) override;
   void BeginMainFrame(base::TimeTicks frame_time) override;
diff --git a/third_party/blink/renderer/devtools/front_end/sources/module.json b/third_party/blink/renderer/devtools/front_end/sources/module.json
index 451a843..7f51e95 100644
--- a/third_party/blink/renderer/devtools/front_end/sources/module.json
+++ b/third_party/blink/renderer/devtools/front_end/sources/module.json
@@ -27,7 +27,7 @@
             "toggledIconClass": "largeicon-resume",
             "className": "Sources.SourcesPanel.RevealingActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel",
+                "Sources.SourcesView",
                 "UI.ShortcutRegistry.ForwardedShortcut"
             ],
             "options": [
@@ -137,7 +137,7 @@
             "title": "Run snippet",
             "iconClass": "largeicon-play",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -158,7 +158,7 @@
             "toggledIconClass": "largeicon-activate-breakpoints",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "options": [
                 {
@@ -560,7 +560,7 @@
             "actionId": "sources.jump-to-previous-location",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -573,7 +573,7 @@
             "actionId": "sources.jump-to-next-location",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -586,7 +586,7 @@
             "actionId": "sources.close-editor-tab",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -599,7 +599,7 @@
             "actionId": "sources.go-to-line",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -612,7 +612,7 @@
             "actionId": "sources.go-to-member",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -658,7 +658,7 @@
             "actionId": "sources.save",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
@@ -676,7 +676,7 @@
             "actionId": "sources.save-all",
             "className": "Sources.SourcesView.ActionDelegate",
             "contextTypes": [
-                "Sources.SourcesPanel"
+                "Sources.SourcesView"
             ],
             "bindings": [
                 {
diff --git a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
index 45a3ce6..afbf3b6c 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
+++ b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
@@ -711,7 +711,9 @@
       webgl_preferences.max_active_webgl_contexts_on_worker;
 
   int max_sample_count = 0;
-  gl_->GetIntegerv(GL_MAX_SAMPLES_ANGLE, &max_sample_count);
+  if (use_multisampling) {
+    gl_->GetIntegerv(GL_MAX_SAMPLES_ANGLE, &max_sample_count);
+  }
   if (webgl_preferences.anti_aliasing_mode ==
       gpu::kAntialiasingModeUnspecified) {
     if (use_multisampling) {
@@ -727,7 +729,6 @@
       }
     } else {
       anti_aliasing_mode_ = gpu::kAntialiasingModeNone;
-      max_sample_count = 0;
     }
   } else {
     if ((webgl_preferences.anti_aliasing_mode ==
diff --git a/third_party/blink/renderer/platform/network/encoded_form_data.cc b/third_party/blink/renderer/platform/network/encoded_form_data.cc
index 5ae025f..a01dfe7f 100644
--- a/third_party/blink/renderer/platform/network/encoded_form_data.cc
+++ b/third_party/blink/renderer/platform/network/encoded_form_data.cc
@@ -49,7 +49,7 @@
 }
 
 scoped_refptr<EncodedFormData> EncodedFormData::Create(const void* data,
-                                                       size_t size) {
+                                                       wtf_size_t size) {
   scoped_refptr<EncodedFormData> result = Create();
   result->AppendData(data, size);
   return result;
@@ -79,10 +79,8 @@
   form_data->boundary_ = boundary_;
   form_data->contains_password_data_ = contains_password_data_;
 
-  size_t n = elements_.size();
-  form_data->elements_.ReserveInitialCapacity(n);
-  for (size_t i = 0; i < n; ++i) {
-    const FormDataElement& e = elements_[i];
+  form_data->elements_.ReserveInitialCapacity(elements_.size());
+  for (const FormDataElement& e : elements_) {
     switch (e.type_) {
       case FormDataElement::kData:
         form_data->elements_.UncheckedAppend(FormDataElement(e.data_));
@@ -110,11 +108,11 @@
   return form_data;
 }
 
-void EncodedFormData::AppendData(const void* data, size_t size) {
+void EncodedFormData::AppendData(const void* data, wtf_size_t size) {
   if (elements_.IsEmpty() || elements_.back().type_ != FormDataElement::kData)
     elements_.push_back(FormDataElement());
   FormDataElement& e = elements_.back();
-  size_t old_size = e.data_.size();
+  wtf_size_t old_size = e.data_.size();
   e.data_.Grow(old_size + size);
   memcpy(e.data_.data() + old_size, data, size);
 }
@@ -146,11 +144,9 @@
 void EncodedFormData::Flatten(Vector<char>& data) const {
   // Concatenate all the byte arrays, but omit everything else.
   data.clear();
-  size_t n = elements_.size();
-  for (size_t i = 0; i < n; ++i) {
-    const FormDataElement& e = elements_[i];
+  for (const FormDataElement& e : elements_) {
     if (e.type_ == FormDataElement::kData)
-      data.Append(e.data_.data(), static_cast<size_t>(e.data_.size()));
+      data.Append(e.data_.data(), e.data_.size());
   }
 }
 
@@ -163,9 +159,7 @@
 
 unsigned long long EncodedFormData::SizeInBytes() const {
   unsigned size = 0;
-  size_t n = elements_.size();
-  for (size_t i = 0; i < n; ++i) {
-    const FormDataElement& e = elements_[i];
+  for (const FormDataElement& e : elements_) {
     switch (e.type_) {
       case FormDataElement::kData:
         size += e.data_.size();
diff --git a/third_party/blink/renderer/platform/network/encoded_form_data.h b/third_party/blink/renderer/platform/network/encoded_form_data.h
index 3c4e6f61..c112cd5 100644
--- a/third_party/blink/renderer/platform/network/encoded_form_data.h
+++ b/third_party/blink/renderer/platform/network/encoded_form_data.h
@@ -125,14 +125,14 @@
   };
 
   static scoped_refptr<EncodedFormData> Create();
-  static scoped_refptr<EncodedFormData> Create(const void*, size_t);
+  static scoped_refptr<EncodedFormData> Create(const void*, wtf_size_t);
   static scoped_refptr<EncodedFormData> Create(const CString&);
   static scoped_refptr<EncodedFormData> Create(const Vector<char>&);
   scoped_refptr<EncodedFormData> Copy() const;
   scoped_refptr<EncodedFormData> DeepCopy() const;
   ~EncodedFormData();
 
-  void AppendData(const void* data, size_t);
+  void AppendData(const void* data, wtf_size_t);
   void AppendFile(const String& file_path);
   void AppendFileRange(const String& filename,
                        long long start,
diff --git a/third_party/blink/renderer/platform/network/encoded_form_data_test.cc b/third_party/blink/renderer/platform/network/encoded_form_data_test.cc
index 7d8ac97..3349b1cb 100644
--- a/third_party/blink/renderer/platform/network/encoded_form_data_test.cc
+++ b/third_party/blink/renderer/platform/network/encoded_form_data_test.cc
@@ -76,7 +76,7 @@
   // Check pointers are different, i.e. deep-copied.
   ASSERT_NE(original.get(), copy.get());
 
-  for (size_t i = 0; i < 3; ++i) {
+  for (wtf_size_t i = 0; i < 3; ++i) {
     if (copy_elements[i].filename_.Impl()) {
       EXPECT_NE(original_elements[i].filename_.Impl(),
                 copy_elements[i].filename_.Impl());
diff --git a/third_party/blink/renderer/platform/network/form_data_encoder.cc b/third_party/blink/renderer/platform/network/form_data_encoder.cc
index 5711630..c5cca2a 100644
--- a/third_party/blink/renderer/platform/network/form_data_encoder.cc
+++ b/third_party/blink/renderer/platform/network/form_data_encoder.cc
@@ -39,7 +39,7 @@
 }
 
 static inline void Append(Vector<char>& buffer, const char* string) {
-  buffer.Append(string, strlen(string));
+  buffer.Append(string, static_cast<wtf_size_t>(strlen(string)));
 }
 
 static inline void Append(Vector<char>& buffer, const CString& string) {
diff --git a/third_party/blink/renderer/platform/network/http_header_map.cc b/third_party/blink/renderer/platform/network/http_header_map.cc
index 5d63fd0f..a4fa8a20 100644
--- a/third_party/blink/renderer/platform/network/http_header_map.cc
+++ b/third_party/blink/renderer/platform/network/http_header_map.cc
@@ -53,11 +53,8 @@
 
 void HTTPHeaderMap::Adopt(std::unique_ptr<CrossThreadHTTPHeaderMapData> data) {
   Clear();
-  size_t data_size = data->size();
-  for (size_t index = 0; index < data_size; ++index) {
-    std::pair<String, String>& header = (*data)[index];
+  for (const auto& header : *data)
     Set(AtomicString(header.first), AtomicString(header.second));
-  }
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/platform/network/http_header_map.h b/third_party/blink/renderer/platform/network/http_header_map.h
index 12a2e012..d7e0f4b 100644
--- a/third_party/blink/renderer/platform/network/http_header_map.h
+++ b/third_party/blink/renderer/platform/network/http_header_map.h
@@ -60,7 +60,7 @@
   typedef MapType::AddResult AddResult;
   typedef MapType::const_iterator const_iterator;
 
-  size_t size() const { return headers_.size(); }
+  wtf_size_t size() const { return headers_.size(); }
   const_iterator begin() const { return headers_.begin(); }
   const_iterator end() const { return headers_.end(); }
   const_iterator Find(const AtomicString& k) const { return headers_.find(k); }
diff --git a/third_party/blink/renderer/platform/network/http_parsers.cc b/third_party/blink/renderer/platform/network/http_parsers.cc
index ff198ca4..edf455f2 100644
--- a/third_party/blink/renderer/platform/network/http_parsers.cc
+++ b/third_party/blink/renderer/platform/network/http_parsers.cc
@@ -425,10 +425,10 @@
 static void ParseCacheHeader(const String& header,
                              Vector<std::pair<String, String>>& result) {
   const String safe_header = header.RemoveCharacters(IsControlCharacter);
-  unsigned max = safe_header.length();
-  for (unsigned pos = 0; pos < max; /* pos incremented in loop */) {
-    size_t next_comma_position = safe_header.find(',', pos);
-    size_t next_equal_sign_position = safe_header.find('=', pos);
+  wtf_size_t max = safe_header.length();
+  for (wtf_size_t pos = 0; pos < max; /* pos incremented in loop */) {
+    wtf_size_t next_comma_position = safe_header.find(',', pos);
+    wtf_size_t next_equal_sign_position = safe_header.find('=', pos);
     if (next_equal_sign_position != kNotFound &&
         (next_equal_sign_position < next_comma_position ||
          next_comma_position == kNotFound)) {
@@ -442,7 +442,7 @@
       String value = safe_header.Substring(pos, max - pos).StripWhiteSpace();
       if (value[0] == '"') {
         // The value is a quoted string
-        size_t next_double_quote_position = value.find('"', 1);
+        wtf_size_t next_double_quote_position = value.find('"', 1);
         if (next_double_quote_position != kNotFound) {
           // Store the value as a quoted string without quotes
           result.push_back(std::pair<String, String>(
@@ -451,7 +451,7 @@
           pos += (safe_header.find('"', pos) - pos) +
                  next_double_quote_position + 1;
           // Move past next comma, if there is one
-          size_t next_comma_position2 = safe_header.find(',', pos);
+          wtf_size_t next_comma_position2 = safe_header.find(',', pos);
           if (next_comma_position2 != kNotFound)
             pos += next_comma_position2 - pos + 1;
           else
@@ -466,7 +466,7 @@
         }
       } else {
         // The value is a token until the next comma
-        size_t next_comma_position2 = value.find(',');
+        wtf_size_t next_comma_position2 = value.find(',');
         if (next_comma_position2 != kNotFound) {
           // The value is delimited by the next comma
           result.push_back(std::pair<String, String>(
@@ -521,8 +521,8 @@
     Vector<std::pair<String, String>> directives;
     ParseCacheHeader(cache_control_value, directives);
 
-    size_t directives_size = directives.size();
-    for (size_t i = 0; i < directives_size; ++i) {
+    wtf_size_t directives_size = directives.size();
+    for (wtf_size_t i = 0; i < directives_size; ++i) {
       // RFC2616 14.9.1: A no-cache directive with a value is only meaningful
       // for proxy caches.  It should be ignored by a browser level cache.
       if (DeprecatedEqualIgnoringCase(directives[i].first, kNoCacheDirective) &&
@@ -578,9 +578,9 @@
 }
 
 bool ParseMultipartHeadersFromBody(const char* bytes,
-                                   size_t size,
+                                   wtf_size_t size,
                                    ResourceResponse* response,
-                                   size_t* end) {
+                                   wtf_size_t* end) {
   DCHECK(IsMainThread());
 
   int headers_end_pos =
@@ -589,7 +589,7 @@
   if (headers_end_pos < 0)
     return false;
 
-  *end = headers_end_pos;
+  *end = static_cast<wtf_size_t>(headers_end_pos);
 
   // Eat headers and prepend a status line as is required by
   // HttpResponseHeaders.
@@ -597,8 +597,8 @@
   headers.append(bytes, headers_end_pos);
 
   scoped_refptr<net::HttpResponseHeaders> response_headers =
-      new net::HttpResponseHeaders(
-          net::HttpUtil::AssembleRawHeaders(headers.data(), headers.length()));
+      new net::HttpResponseHeaders(net::HttpUtil::AssembleRawHeaders(
+          headers.data(), static_cast<int>(headers.length())));
 
   std::string mime_type, charset;
   response_headers->GetMimeTypeAndCharset(&mime_type, &charset);
@@ -622,27 +622,27 @@
 }
 
 bool ParseMultipartFormHeadersFromBody(const char* bytes,
-                                       size_t size,
+                                       wtf_size_t size,
                                        HTTPHeaderMap* header_fields,
-                                       size_t* end) {
+                                       wtf_size_t* end) {
   DCHECK_EQ(0u, header_fields->size());
 
-  int headersEndPos =
+  int headers_end_pos =
       net::HttpUtil::LocateEndOfAdditionalHeaders(bytes, size, 0);
 
-  if (headersEndPos < 0)
+  if (headers_end_pos < 0)
     return false;
 
-  *end = headersEndPos;
+  *end = static_cast<wtf_size_t>(headers_end_pos);
 
   // Eat headers and prepend a status line as is required by
   // HttpResponseHeaders.
   std::string headers("HTTP/1.1 200 OK\r\n");
-  headers.append(bytes, headersEndPos);
+  headers.append(bytes, headers_end_pos);
 
   scoped_refptr<net::HttpResponseHeaders> responseHeaders =
-      new net::HttpResponseHeaders(
-          net::HttpUtil::AssembleRawHeaders(headers.data(), headers.length()));
+      new net::HttpResponseHeaders(net::HttpUtil::AssembleRawHeaders(
+          headers.data(), static_cast<wtf_size_t>(headers.length())));
 
   // Copy selected header fields.
   const AtomicString* const headerNamePointers[] = {
diff --git a/third_party/blink/renderer/platform/network/http_parsers.h b/third_party/blink/renderer/platform/network/http_parsers.h
index 7232cc3..44f4255 100644
--- a/third_party/blink/renderer/platform/network/http_parsers.h
+++ b/third_party/blink/renderer/platform/network/http_parsers.h
@@ -139,16 +139,16 @@
 // if the headers part ends in |bytes[0..size]|. Returns false otherwise.
 PLATFORM_EXPORT bool ParseMultipartFormHeadersFromBody(
     const char* bytes,
-    size_t,
+    wtf_size_t,
     HTTPHeaderMap* header_fields,
-    size_t* end);
+    wtf_size_t* end);
 
 // Returns true and stores the position of the end of the headers to |*end|
 // if the headers part ends in |bytes[0..size]|. Returns false otherwise.
 PLATFORM_EXPORT bool ParseMultipartHeadersFromBody(const char* bytes,
-                                                   size_t,
+                                                   wtf_size_t,
                                                    ResourceResponse*,
-                                                   size_t* end);
+                                                   wtf_size_t* end);
 
 // Extracts the values in a Content-Range header and returns true if all three
 // values are present and valid for a 206 response; otherwise returns false.
diff --git a/third_party/blink/renderer/platform/network/http_parsers_fuzzer.cc b/third_party/blink/renderer/platform/network/http_parsers_fuzzer.cc
index 7f8de80..1f33e534 100644
--- a/third_party/blink/renderer/platform/network/http_parsers_fuzzer.cc
+++ b/third_party/blink/renderer/platform/network/http_parsers_fuzzer.cc
@@ -18,7 +18,7 @@
   double delay;
   String url;
   blink::ResourceResponse response;
-  size_t end;
+  wtf_size_t end;
   String report_url;
   String failure_reason;
   unsigned failure_position = 0;
diff --git a/third_party/blink/renderer/platform/network/http_parsers_test.cc b/third_party/blink/renderer/platform/network/http_parsers_test.cc
index 358a4cd..04e1da7 100644
--- a/third_party/blink/renderer/platform/network/http_parsers_test.cc
+++ b/third_party/blink/renderer/platform/network/http_parsers_test.cc
@@ -306,9 +306,10 @@
   };
   for (size_t i = 0; i < arraysize(tests); ++i) {
     ResourceResponse response;
-    size_t end = 0;
+    wtf_size_t end = 0;
     bool result = ParseMultipartHeadersFromBody(
-        tests[i].data, strlen(tests[i].data), &response, &end);
+        tests[i].data, static_cast<wtf_size_t>(strlen(tests[i].data)),
+        &response, &end);
     EXPECT_EQ(tests[i].result, result);
     EXPECT_EQ(tests[i].end, end);
   }
@@ -321,7 +322,7 @@
   response.AddHTTPHeaderField("content-length", "999");
 
   const char kData[] = "content-type: image/png\ncontent-length: 10\n\n";
-  size_t end = 0;
+  wtf_size_t end = 0;
   bool result =
       ParseMultipartHeadersFromBody(kData, strlen(kData), &response, &end);
 
@@ -336,7 +337,7 @@
 TEST(HTTPParsersTest, ParseMultipartHeadersContentCharset) {
   ResourceResponse response;
   const char kData[] = "content-type: text/html; charset=utf-8\n\n";
-  size_t end = 0;
+  wtf_size_t end = 0;
   bool result =
       ParseMultipartHeadersFromBody(kData, strlen(kData), &response, &end);
 
diff --git a/third_party/blink/renderer/platform/network/mime/content_type.cc b/third_party/blink/renderer/platform/network/mime/content_type.cc
index a3ddcda..95072e10 100644
--- a/third_party/blink/renderer/platform/network/mime/content_type.cc
+++ b/third_party/blink/renderer/platform/network/mime/content_type.cc
@@ -38,15 +38,15 @@
 
   // a MIME type can have one or more "param=value" after a semi-colon, and
   // separated from each other by semi-colons
-  size_t semi = stripped_type.find(';');
+  wtf_size_t semi = stripped_type.find(';');
   if (semi != kNotFound) {
-    size_t start =
+    wtf_size_t start =
         stripped_type.FindIgnoringASCIICase(parameter_name, semi + 1);
     if (start != kNotFound) {
       start = stripped_type.find('=', start + parameter_name.length());
       if (start != kNotFound) {
-        size_t quote = stripped_type.find('\"', start + 1);
-        size_t end = stripped_type.find('\"', start + 2);
+        wtf_size_t quote = stripped_type.find('\"', start + 1);
+        wtf_size_t end = stripped_type.find('\"', start + 2);
         if (quote != kNotFound && end != kNotFound) {
           start = quote;
         } else {
@@ -67,7 +67,7 @@
   String stripped_type = type_.StripWhiteSpace();
 
   // "type" can have parameters after a semi-colon, strip them
-  size_t semi = stripped_type.find(';');
+  wtf_size_t semi = stripped_type.find(';');
   if (semi != kNotFound)
     stripped_type = stripped_type.Left(semi).StripWhiteSpace();
 
diff --git a/third_party/blink/renderer/platform/network/mime/mime_type_from_url.cc b/third_party/blink/renderer/platform/network/mime/mime_type_from_url.cc
index e1f5c1a..d0a11228 100644
--- a/third_party/blink/renderer/platform/network/mime/mime_type_from_url.cc
+++ b/third_party/blink/renderer/platform/network/mime/mime_type_from_url.cc
@@ -34,7 +34,7 @@
 
 String MimeTypeFromDataURL(const String& url) {
   DCHECK(ProtocolIs(url, "data"));
-  size_t index = url.find(';');
+  wtf_size_t index = url.find(';');
   if (index == kNotFound)
     index = url.find(',');
   if (index != kNotFound) {
diff --git a/third_party/blink/renderer/platform/network/network_state_notifier.cc b/third_party/blink/renderer/platform/network/network_state_notifier.cc
index 91e7ab6..d9f41fa 100644
--- a/third_party/blink/renderer/platform/network/network_state_notifier.cc
+++ b/third_party/blink/renderer/platform/network/network_state_notifier.cc
@@ -301,7 +301,7 @@
 
   observer_list->iterating = true;
 
-  for (size_t i = 0; i < observer_list->observers.size(); ++i) {
+  for (wtf_size_t i = 0; i < observer_list->observers.size(); ++i) {
     // Observers removed during iteration are zeroed out, skip them.
     if (!observer_list->observers[i])
       continue;
@@ -370,7 +370,7 @@
     return;
 
   Vector<NetworkStateObserver*>& observers = observer_list->observers;
-  size_t index = observers.Find(observer);
+  wtf_size_t index = observers.Find(observer);
   if (index != kNotFound) {
     observers[index] = 0;
     observer_list->zeroed_observers.push_back(index);
@@ -398,7 +398,7 @@
 
   // If any observers were removed during the iteration they will have
   // 0 values, clean them up.
-  for (size_t i = 0; i < list->zeroed_observers.size(); ++i)
+  for (wtf_size_t i = 0; i < list->zeroed_observers.size(); ++i)
     list->observers.EraseAt(list->zeroed_observers[i]);
 
   list->zeroed_observers.clear();
diff --git a/third_party/blink/renderer/platform/network/network_state_notifier.h b/third_party/blink/renderer/platform/network/network_state_notifier.h
index 5fb43bd..14e350a 100644
--- a/third_party/blink/renderer/platform/network/network_state_notifier.h
+++ b/third_party/blink/renderer/platform/network/network_state_notifier.h
@@ -306,7 +306,7 @@
     ObserverList() : iterating(false) {}
     bool iterating;
     Vector<NetworkStateObserver*> observers;
-    Vector<size_t> zeroed_observers;  // Indices in observers that are 0.
+    Vector<wtf_size_t> zeroed_observers;  // Indices in observers that are 0.
   };
 
   // This helper scope issues required notifications when mutating the state if
diff --git a/third_party/blink/tools/blinkpy/w3c/test_importer.py b/third_party/blink/tools/blinkpy/w3c/test_importer.py
index 2435d64..7f947fc 100644
--- a/third_party/blink/tools/blinkpy/w3c/test_importer.py
+++ b/third_party/blink/tools/blinkpy/w3c/test_importer.py
@@ -85,6 +85,10 @@
             # Print out the full output when executive.run_command fails.
             self.host.executive.error_output_limit = None
 
+        if options.auto_update and options.auto_upload:
+            _log.error('--auto-upload and --auto-update cannot be used together.')
+            return 1
+
         if not self.checkout_is_okay():
             return 1
 
@@ -164,7 +168,7 @@
         self._commit_changes(commit_message)
         _log.info('Changes imported and committed.')
 
-        if not options.auto_update:
+        if not options.auto_upload and not options.auto_update:
             return 0
 
         self._upload_cl()
@@ -173,6 +177,9 @@
         if not self.update_expectations_for_cl():
             return 1
 
+        if not options.auto_update:
+            return 0
+
         if not self.run_commit_queue_for_cl():
             return 1
 
@@ -277,6 +284,9 @@
             help='do not check for exportable commits that would be clobbered')
         parser.add_argument('-r', '--revision', help='target wpt revision')
         parser.add_argument(
+            '--auto-upload', action='store_true',
+            help='upload a CL, update expectations, but do NOT trigger CQ')
+        parser.add_argument(
             '--auto-update', action='store_true',
             help='upload a CL, update expectations, and trigger CQ')
         parser.add_argument(
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/android.py b/third_party/blink/tools/blinkpy/web_tests/port/android.py
index 574033e..632d46e 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/android.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/android.py
@@ -473,7 +473,7 @@
         super(AndroidPort, self).start_http_server(additional_dirs, number_of_drivers)
 
     def create_driver(self, worker_number, no_timeout=False):
-        return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_option('pixel_tests'),
+        return ChromiumAndroidDriver(self, worker_number,
                                      driver_details=self._driver_details,
                                      android_devices=self._devices,
                                      # Force no timeout to avoid test driver timeouts before NRWT.
@@ -481,7 +481,7 @@
 
     def driver_cmd_line(self):
         # Override to return the actual test driver's command line.
-        return self.create_driver(0)._android_driver_cmd_line(self.get_option('pixel_tests'), [])
+        return self.create_driver(0)._android_driver_cmd_line([])
 
     def clobber_old_port_specific_results(self):
         if not self.get_option('disable_breakpad'):
@@ -643,8 +643,8 @@
 
 class ChromiumAndroidDriver(driver.Driver):
 
-    def __init__(self, port, worker_number, pixel_tests, driver_details, android_devices, no_timeout=False):
-        super(ChromiumAndroidDriver, self).__init__(port, worker_number, pixel_tests, no_timeout)
+    def __init__(self, port, worker_number, driver_details, android_devices, no_timeout=False):
+        super(ChromiumAndroidDriver, self).__init__(port, worker_number, no_timeout)
         self._write_stdin_process = None
         self._read_stdout_process = None
         self._read_stderr_process = None
@@ -802,13 +802,13 @@
         return super(ChromiumAndroidDriver, self)._get_crash_log(
             stdout, stderr, newer_than)
 
-    def cmd_line(self, pixel_tests, per_test_args):
+    def cmd_line(self, per_test_args):
         # The returned command line is used to start _server_process. In our case, it's an interactive 'adb shell'.
         # The command line passed to the driver process is returned by _driver_cmd_line() instead.
         return [self._device.adb.GetAdbPath(), '-s', self._device.serial, 'shell']
 
-    def _android_driver_cmd_line(self, pixel_tests, per_test_args):
-        return driver.Driver.cmd_line(self, pixel_tests, per_test_args)
+    def _android_driver_cmd_line(self, per_test_args):
+        return driver.Driver.cmd_line(self, per_test_args)
 
     @staticmethod
     def _loop_with_timeout(condition, timeout_secs):
@@ -818,10 +818,10 @@
                 return True
         return False
 
-    def start(self, pixel_tests, per_test_args, deadline):
+    def start(self, per_test_args, deadline):
         # We override the default start() so that we can call _android_driver_cmd_line()
         # instead of cmd_line().
-        new_cmd_line = self._android_driver_cmd_line(pixel_tests, per_test_args)
+        new_cmd_line = self._android_driver_cmd_line(per_test_args)
 
         # Since _android_driver_cmd_line() is different than cmd_line() we need to provide
         # our own mechanism for detecting when the process should be stopped.
@@ -831,15 +831,15 @@
             self.stop()
         self._current_android_cmd_line = new_cmd_line
 
-        super(ChromiumAndroidDriver, self).start(pixel_tests, per_test_args, deadline)
+        super(ChromiumAndroidDriver, self).start(per_test_args, deadline)
 
-    def _start(self, pixel_tests, per_test_args):
+    def _start(self, per_test_args):
         if not self._android_devices.is_device_prepared(self._device.serial):
             raise driver.DeviceFailure('%s is not prepared in _start()' % self._device.serial)
 
         for retries in range(3):
             try:
-                if self._start_once(pixel_tests, per_test_args):
+                if self._start_once(per_test_args):
                     return
             except ScriptError as error:
                 self._abort('ScriptError("%s") in _start()' % error)
@@ -849,8 +849,8 @@
             time.sleep(2)
         self._abort('Failed to start the content_shell application multiple times. Giving up.')
 
-    def _start_once(self, pixel_tests, per_test_args):
-        super(ChromiumAndroidDriver, self)._start(pixel_tests, per_test_args, wait_for_ready=False)
+    def _start_once(self, per_test_args):
+        super(ChromiumAndroidDriver, self)._start(per_test_args, wait_for_ready=False)
 
         self._device.adb.Logcat(clear=True)
 
@@ -909,7 +909,7 @@
             '--android-stdin-port=%s' % forwarder.Forwarder.DevicePortForHostPort(stdin_port),
             '--android-stdout-port=%s' % forwarder.Forwarder.DevicePortForHostPort(stdout_port),
         ]
-        cmd_line_contents = self._android_driver_cmd_line(pixel_tests, per_test_args + stream_port_args)
+        cmd_line_contents = self._android_driver_cmd_line(per_test_args + stream_port_args)
         self._device.WriteFile(
             self._driver_details.command_line_file(),
             ' '.join(cmd_line_contents))
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/android_unittest.py b/third_party/blink/tools/blinkpy/web_tests/port/android_unittest.py
index 6a72b6a..ba4f5d1 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/android_unittest.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/android_unittest.py
@@ -153,7 +153,6 @@
         self._driver = android.ChromiumAndroidDriver(
             self._port,
             worker_number=0,
-            pixel_tests=True,
             driver_details=android.ContentShellDriverDetails(),
             android_devices=self._port._devices)  # pylint: disable=protected-access
 
@@ -166,7 +165,7 @@
 
     # The cmd_line() method in the Android port is used for starting a shell, not the test runner.
     def test_cmd_line(self):
-        self.assertEquals(['adb', '-s', '123456789ABCDEF0', 'shell'], self._driver.cmd_line(False, []))
+        self.assertEquals(['adb', '-s', '123456789ABCDEF0', 'shell'], self._driver.cmd_line([]))
 
     # Test that the Chromium Android port can interpret Android's shell output.
     def test_read_prompt(self):
@@ -201,13 +200,13 @@
 
     def test_two_drivers(self):
         port = android.AndroidPort(MockSystemHost(executive=MockExecutive()), 'android')
-        driver0 = android.ChromiumAndroidDriver(port, worker_number=0, pixel_tests=True,
+        driver0 = android.ChromiumAndroidDriver(port, worker_number=0,
                                                 driver_details=android.ContentShellDriverDetails(), android_devices=port._devices)
-        driver1 = android.ChromiumAndroidDriver(port, worker_number=1, pixel_tests=True,
+        driver1 = android.ChromiumAndroidDriver(port, worker_number=1,
                                                 driver_details=android.ContentShellDriverDetails(), android_devices=port._devices)
 
-        self.assertEqual(['adb', '-s', '123456789ABCDEF0', 'shell'], driver0.cmd_line(True, []))
-        self.assertEqual(['adb', '-s', '123456789ABCDEF1', 'shell'], driver1.cmd_line(True, ['anything']))
+        self.assertEqual(['adb', '-s', '123456789ABCDEF0', 'shell'], driver0.cmd_line([]))
+        self.assertEqual(['adb', '-s', '123456789ABCDEF1', 'shell'], driver1.cmd_line(['anything']))
 
 
 class ChromiumAndroidTwoPortsTest(unittest.TestCase):
@@ -263,7 +262,6 @@
         self._driver = android.ChromiumAndroidDriver(
             self._port,
             worker_number=0,
-            pixel_tests=True,
             driver_details=android.ContentShellDriverDetails(),
             android_devices=self._port._devices)  # pylint: disable=protected-access
 
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/base.py b/third_party/blink/tools/blinkpy/web_tests/port/base.py
index 1d982409..25a6c11 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/base.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/base.py
@@ -908,7 +908,7 @@
 
     def driver_cmd_line(self):
         """Prints the DRT (DumpRenderTree) command that will be used."""
-        return self.create_driver(0).cmd_line(self.get_option('pixel_tests'), [])
+        return self.create_driver(0).cmd_line([])
 
     def update_baseline(self, baseline_path, data):
         """Updates the baseline for a test.
@@ -1167,7 +1167,7 @@
         """Returns a newly created Driver subclass for starting/stopping the
         test driver.
         """
-        return self._driver_class()(self, worker_number, pixel_tests=self.get_option('pixel_tests'), no_timeout=no_timeout)
+        return self._driver_class()(self, worker_number, no_timeout=no_timeout)
 
     def requires_http_server(self):
         # Does the port require an HTTP server for running tests? This could
@@ -1721,7 +1721,8 @@
 
         This provides the *default* value for whether a test should run as
         pixel test. When reference files exist (checked by layout_test_runner
-        before calling this method), the test always runs as pixel test.
+        before calling this method), the test always runs as pixel test
+        regardless of this function.
         """
         if not self._options.pixel_tests:
             return False
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver.py b/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver.py
index 492a181..b580a810 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver.py
@@ -32,11 +32,11 @@
 class BrowserTestDriver(Driver):
     """Object for running print preview test(s) using browser_tests."""
 
-    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
+    def __init__(self, port, worker_number, no_timeout=False):
         """Invokes the constructor of Driver."""
-        super(BrowserTestDriver, self).__init__(port, worker_number, pixel_tests, no_timeout)
+        super(BrowserTestDriver, self).__init__(port, worker_number, no_timeout)
 
-    def start(self, pixel_tests, per_test_args, deadline):
+    def start(self, per_test_args, deadline):
         """Same as Driver.start() however, it has an extra step. It waits for
         a path to a file to be used for stdin to be printed by the browser test.
         If a path is found by the deadline test test will open the file and
@@ -45,9 +45,9 @@
         """
         # FIXME(ivandavid): Need to handle case where the layout test doesn't
         # get a file name.
-        new_cmd_line = self.cmd_line(pixel_tests, per_test_args)
+        new_cmd_line = self.cmd_line(per_test_args)
         if not self._server_process or new_cmd_line != self._current_cmd_line:
-            self._start(pixel_tests, per_test_args)
+            self._start(per_test_args)
             self._run_post_start_tasks()
             self._open_stdin_path(deadline)
 
@@ -73,7 +73,7 @@
             return (block.stdin_path, True)
         return (None, False)
 
-    def cmd_line(self, pixel_tests, per_test_args):
+    def cmd_line(self, per_test_args):
         """Command line arguments to run the browser test."""
         cmd = self._command_wrapper(self._port.get_option('wrapper'))
         cmd.append(self._port._path_to_driver())
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver_unittest.py b/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver_unittest.py
index 7a1a827..9f70f05 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver_unittest.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/browser_test_driver_unittest.py
@@ -38,7 +38,7 @@
 
     def test_read_stdin_path(self):
         port = TestPort(MockHost())
-        driver = BrowserTestDriver(port, 0, pixel_tests=True)
+        driver = BrowserTestDriver(port, 0)
         driver._server_process = MockServerProcess(lines=[
             'StdinPath: /foo/bar', '#EOF'])
         content_block = driver._read_block(0)
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/driver.py b/third_party/blink/tools/blinkpy/web_tests/port/driver.py
index 5c1505de..d9185e1 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/driver.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/driver.py
@@ -91,7 +91,7 @@
 class Driver(object):
     """object for running test(s) using content_shell or other driver."""
 
-    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
+    def __init__(self, port, worker_number, no_timeout=False):
         """Initialize a Driver to subsequently run tests.
 
         Typically this routine will spawn content_shell in a config
@@ -156,7 +156,7 @@
         """
         start_time = time.time()
         stdin_deadline = start_time + int(driver_input.timeout) / 2000.0
-        self.start(driver_input.should_run_pixel_test, driver_input.args, stdin_deadline)
+        self.start(driver_input.args, stdin_deadline)
         test_begin_time = time.time()
         self.error_from_test = str()
         self.err_seen_eof = False
@@ -305,10 +305,10 @@
             return True
         return False
 
-    def start(self, pixel_tests, per_test_args, deadline):
-        new_cmd_line = self.cmd_line(pixel_tests, per_test_args)
+    def start(self, per_test_args, deadline):
+        new_cmd_line = self.cmd_line(per_test_args)
         if not self._server_process or new_cmd_line != self._current_cmd_line:
-            self._start(pixel_tests, per_test_args)
+            self._start(per_test_args)
             self._run_post_start_tasks()
 
     def _setup_environ_for_driver(self, environment):
@@ -316,7 +316,7 @@
             environment = self._profiler.adjusted_environment(environment)
         return environment
 
-    def _start(self, pixel_tests, per_test_args, wait_for_ready=True):
+    def _start(self, per_test_args, wait_for_ready=True):
         self.stop()
         self._driver_tempdir = self._port.host.filesystem.mkdtemp(prefix='%s-' % self._port.driver_name())
         server_name = self._port.driver_name()
@@ -326,7 +326,7 @@
         self._crashed_pid = None
         self._leaked = False
         self._leak_log = None
-        cmd_line = self.cmd_line(pixel_tests, per_test_args)
+        cmd_line = self.cmd_line(per_test_args)
         self._server_process = self._port.server_process_constructor(
             self._port, server_name, cmd_line, environment, more_logging=self._port.get_option('driver_logging'))
         self._server_process.start()
@@ -380,7 +380,7 @@
     def _base_cmd_line(self):
         return [self._port._path_to_driver()]  # pylint: disable=protected-access
 
-    def cmd_line(self, pixel_tests, per_test_args):
+    def cmd_line(self, per_test_args):
         cmd = self._command_wrapper(self._port.get_option('wrapper'))
         cmd += self._base_cmd_line()
         if self._no_timeout:
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/driver_unittest.py b/third_party/blink/tools/blinkpy/web_tests/port/driver_unittest.py
index 90c4de5..964deaf3 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/driver_unittest.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/driver_unittest.py
@@ -41,7 +41,7 @@
         return Port(MockSystemHost(), 'test', optparse.Values({'configuration': 'Release'}))
 
     def _assert_wrapper(self, wrapper_string, expected_wrapper):
-        wrapper = Driver(self.make_port(), None, pixel_tests=False)._command_wrapper(wrapper_string)
+        wrapper = Driver(self.make_port(), None)._command_wrapper(wrapper_string)
         self.assertEqual(wrapper, expected_wrapper)
 
     def test_command_wrapper(self):
@@ -55,7 +55,7 @@
 
     def test_test_to_uri(self):
         port = self.make_port()
-        driver = Driver(port, None, pixel_tests=False)
+        driver = Driver(port, None)
         self.assertEqual(driver.test_to_uri('foo/bar.html'), 'file://%s/foo/bar.html' % port.layout_tests_dir())
         self.assertEqual(driver.test_to_uri('http/tests/foo.html'), 'http://127.0.0.1:8000/foo.html')
         self.assertEqual(driver.test_to_uri('http/tests/https/bar.html'), 'https://127.0.0.1:8443/https/bar.html')
@@ -67,7 +67,7 @@
 
     def test_uri_to_test(self):
         port = self.make_port()
-        driver = Driver(port, None, pixel_tests=False)
+        driver = Driver(port, None)
         self.assertEqual(driver.uri_to_test('file://%s/foo/bar.html' % port.layout_tests_dir()), 'foo/bar.html')
         self.assertEqual(driver.uri_to_test('http://127.0.0.1:8000/foo.html'), 'http/tests/foo.html')
         self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/https/bar.html'), 'http/tests/https/bar.html')
@@ -78,7 +78,7 @@
 
     def test_read_block(self):
         port = self.make_port()
-        driver = Driver(port, 0, pixel_tests=False)
+        driver = Driver(port, 0)
         driver._server_process = MockServerProcess(lines=[
             'ActualHash: foobar',
             'Content-Type: my_type',
@@ -94,7 +94,7 @@
 
     def test_read_binary_block(self):
         port = self.make_port()
-        driver = Driver(port, 0, pixel_tests=True)
+        driver = Driver(port, 0)
         driver._server_process = MockServerProcess(lines=[
             'ActualHash: actual',
             'ExpectedHash: expected',
@@ -112,7 +112,7 @@
 
     def test_read_base64_block(self):
         port = self.make_port()
-        driver = Driver(port, 0, pixel_tests=True)
+        driver = Driver(port, 0)
         driver._server_process = MockServerProcess(lines=[
             'ActualHash: actual',
             'ExpectedHash: expected',
@@ -130,15 +130,15 @@
 
     def test_no_timeout(self):
         port = self.make_port()
-        driver = Driver(port, 0, pixel_tests=True, no_timeout=True)
-        cmd_line = driver.cmd_line(True, [])
+        driver = Driver(port, 0, no_timeout=True)
+        cmd_line = driver.cmd_line([])
         self.assertEqual(cmd_line[0], '/mock-checkout/out/Release/content_shell')
         self.assertEqual(cmd_line[-1], '-')
         self.assertIn('--no-timeout', cmd_line)
 
     def test_check_for_driver_crash(self):
         port = self.make_port()
-        driver = Driver(port, 0, pixel_tests=True)
+        driver = Driver(port, 0)
 
         class FakeServerProcess(object):
 
@@ -219,15 +219,15 @@
 
     def test_creating_a_port_does_not_write_to_the_filesystem(self):
         port = self.make_port()
-        Driver(port, 0, pixel_tests=True)
+        Driver(port, 0)
         self.assertEqual(port.host.filesystem.written_files, {})
         self.assertIsNone(port.host.filesystem.last_tmpdir)
 
     def test_stop_cleans_up_properly(self):
         port = self.make_port()
         port.server_process_constructor = MockServerProcess
-        driver = Driver(port, 0, pixel_tests=True)
-        driver.start(True, [], None)
+        driver = Driver(port, 0)
+        driver.start([], None)
         last_tmpdir = port.host.filesystem.last_tmpdir
         self.assertIsNotNone(last_tmpdir)
         driver.stop()
@@ -236,15 +236,15 @@
     def test_two_starts_cleans_up_properly(self):
         port = self.make_port()
         port.server_process_constructor = MockServerProcess
-        driver = Driver(port, 0, pixel_tests=True)
-        driver.start(True, [], None)
+        driver = Driver(port, 0)
+        driver.start([], None)
         last_tmpdir = port.host.filesystem.last_tmpdir
-        driver._start(True, [])
+        driver._start([])
         self.assertFalse(port.host.filesystem.isdir(last_tmpdir))
 
     def test_start_actually_starts(self):
         port = self.make_port()
         port.server_process_constructor = MockServerProcess
-        driver = Driver(port, 0, pixel_tests=True)
-        driver.start(True, [], None)
+        driver = Driver(port, 0)
+        driver.start([], None)
         self.assertTrue(driver._server_process.started)
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py b/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py
index 0083c857..130f53d 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py
@@ -268,9 +268,9 @@
 
 
 class ChromiumFuchsiaDriver(driver.Driver):
-    def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
+    def __init__(self, port, worker_number, no_timeout=False):
         super(ChromiumFuchsiaDriver, self).__init__(
-            port, worker_number, pixel_tests, no_timeout)
+            port, worker_number, no_timeout)
 
     def _base_cmd_line(self):
         return ['run', 'content_shell']
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py b/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
index 77cb9ed8..4be1a900 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/mock_drt.py
@@ -79,9 +79,9 @@
     def _driver_class(self, delegate):
         return self._mocked_driver_maker
 
-    def _mocked_driver_maker(self, port, worker_number, pixel_tests, no_timeout=False):
+    def _mocked_driver_maker(self, port, worker_number, no_timeout=False):
         path_to_this_file = self.host.filesystem.abspath(__file__.replace('.pyc', '.py'))
-        driver = self.__delegate_driver_class()(self, worker_number, pixel_tests, no_timeout)
+        driver = self.__delegate_driver_class()(self, worker_number, no_timeout)
         driver.cmd_line = self._overriding_cmd_line(driver.cmd_line,
                                                     self.__delegate._path_to_driver(),
                                                     sys.executable,
@@ -91,8 +91,8 @@
 
     @staticmethod
     def _overriding_cmd_line(original_cmd_line, driver_path, python_exe, this_file, port_name):
-        def new_cmd_line(pixel_tests, per_test_args):
-            cmd_line = original_cmd_line(pixel_tests, per_test_args)
+        def new_cmd_line(per_test_args):
+            cmd_line = original_cmd_line(per_test_args)
             index = cmd_line.index(driver_path)
             cmd_line[index:index + 1] = [python_exe, this_file, '--platform', port_name]
             return cmd_line
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/test.py b/third_party/blink/tools/blinkpy/web_tests/port/test.py
index 4c8cfdf5..24ef1d7b 100644
--- a/third_party/blink/tools/blinkpy/web_tests/port/test.py
+++ b/third_party/blink/tools/blinkpy/web_tests/port/test.py
@@ -560,9 +560,8 @@
         self.started = False
         self.pid = 0
 
-    def cmd_line(self, pixel_tests, per_test_args):
-        pixel_tests_flag = '-p' if pixel_tests else ''
-        return [self._port._path_to_driver()] + [pixel_tests_flag] + \
+    def cmd_line(self, per_test_args):
+        return [self._port._path_to_driver()] + \
             self._port.get_option('additional_driver_flag', []) + per_test_args
 
     def run_test(self, driver_input, stop_when_done):
diff --git a/third_party/google_input_tools/README.chromium b/third_party/google_input_tools/README.chromium
index 326606d..f0ec0c8 100644
--- a/third_party/google_input_tools/README.chromium
+++ b/third_party/google_input_tools/README.chromium
@@ -23,9 +23,7 @@
 
 builder.py: Python script for building inputview.js.
 closure.gni: GN template for calling the closure builder.
-inputview.gni: Convert build dependencies from gyp to gn format.
-inputview.gyp: Build file for generating inputview.js.
-inputview.gypi: Autogenerated by update script to define sources for inputview.
+inputview.gni: List all the files to be compiled.
 update.py: Python script for updating revision of google-input-tools.
 
 Modified extendedlayout.js to fix size calculations for scrolling of the
diff --git a/third_party/google_input_tools/builder.py b/third_party/google_input_tools/builder.py
index 4e86ec44..cffcb6b 100755
--- a/third_party/google_input_tools/builder.py
+++ b/third_party/google_input_tools/builder.py
@@ -6,9 +6,9 @@
 """Closure builder for Javascript."""
 
 import argparse
-import json
 import os
 import re
+import shlex
 
 _BASE_REGEX_STRING = r'^\s*goog\.%s\(\s*[\'"](.+)[\'"]\s*\)'
 require_regex = re.compile(_BASE_REGEX_STRING % 'require')
@@ -155,35 +155,21 @@
     absolute.  Otherwise, relative paths may be used.
   """
 
-  sources = None
-  if options.json_file:
-    # Optionally load list of source files from a json file. Useful when the
-    # list of files to process is too long for the command line.
-    with open(options.json_file, 'r') as json_file:
-      data = []
-      # Strip leading comments.
-      for line in json_file:
-        if not line.startswith('#'):
-          data.append(line)
-      json_object = json.loads(os.linesep.join(data).replace('\'', '\"'))
-      path = options.json_sources.split('.')
-      sources = json_object
-      for key in path:
-        sources = sources[key]
-      if options.path:
-        sources = [os.path.join(options.path, source) for source in sources]
-  else:
-    sources = options.sources
+  sources = []
+  # Optionally load list of source files from a json file. Useful when the
+  # list of files to process is too long for the command line.
+  with open(options.sources_list[0], 'r') as f:
+    sources = shlex.split(f.read())
+  if options.path:
+    sources = [os.path.join(options.path, source) for source in sources]
   return sources
 
 
 def main():
   """The entrypoint for this script."""
   parser = argparse.ArgumentParser()
-  parser.add_argument('--sources', nargs='*')
+  parser.add_argument('--sources-list', nargs=1)
   parser.add_argument('--target', nargs=1)
-  parser.add_argument('--json_file', nargs='?')
-  parser.add_argument('--json_sources', nargs='?')
   parser.add_argument('--path', nargs='?')
   options = parser.parse_args()
 
diff --git a/third_party/google_input_tools/closure.gni b/third_party/google_input_tools/closure.gni
index 74128440..e4279f51 100644
--- a/third_party/google_input_tools/closure.gni
+++ b/third_party/google_input_tools/closure.gni
@@ -11,26 +11,13 @@
     outputs = [
       invoker.target,
     ]
+    response_file_contents = sources
     args = [
       "--target",
       rebase_path(invoker.target, root_build_dir),
+      "--sources-list",
+      "{{response_file_name}}",
     ]
-    if (defined(invoker.json_file)) {
-      # Optionally parse list of sources from a json file. Useful when the list
-      # is sufficiently long to create problems with length restrictions on the
-      # command line.
-      assert(defined(invoker.json_sources))
-      args += [
-        "--json_file",
-        rebase_path(invoker.json_file, root_build_dir),
-        "--json_sources",
-        invoker.json_sources,
-      ]
-    } else {
-      # If the number of source files is short, they can be directly extracted
-      # from the command line.
-      args += [ "--sources" ] + sources
-    }
     if (defined(invoker.path)) {
       args += [
         "--path",
diff --git a/third_party/google_input_tools/inputview.gni b/third_party/google_input_tools/inputview.gni
index 0c5d836..79fd6c6 100644
--- a/third_party/google_input_tools/inputview.gni
+++ b/third_party/google_input_tools/inputview.gni
@@ -2,8 +2,239 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-inputview_gypi_values = exec_script("//build/gypi_to_gn.py",
-                                    [ rebase_path("inputview.gypi") ],
-                                    "scope",
-                                    [ "inputview.gypi" ])
-inputview_sources = rebase_path(inputview_gypi_values.inputview_sources)
+inputview_sources = rebase_path(
+        [
+          "src/chrome/os/common.js",
+          "src/chrome/os/constant.js",
+          "src/chrome/os/datasource.js",
+          "src/chrome/os/elementtype.js",
+          "src/chrome/os/env.js",
+          "src/chrome/os/events/keycodes.js",
+          "src/chrome/os/featurename.js",
+          "src/chrome/os/featuretracker.js",
+          "src/chrome/os/floatingwindow/floatingwindow.js",
+          "src/chrome/os/floatingwindow/floatingwindowdragger.js",
+          "src/chrome/os/floatingwindow/windowutil.js",
+          "src/chrome/os/inputview/adapter.js",
+          "src/chrome/os/inputview/candidatesinfo.js",
+          "src/chrome/os/inputview/canvas.js",
+          "src/chrome/os/inputview/conditionname.js",
+          "src/chrome/os/inputview/config/compact_letter_characters.js",
+          "src/chrome/os/inputview/config/compact_more_characters.js",
+          "src/chrome/os/inputview/config/compact_numberpad_characters.js",
+          "src/chrome/os/inputview/config/compact_symbol_characters.js",
+          "src/chrome/os/inputview/config/compact_util.js",
+          "src/chrome/os/inputview/config/constants.js",
+          "src/chrome/os/inputview/config/contextlayoututil.js",
+          "src/chrome/os/inputview/config/util.js",
+          "src/chrome/os/inputview/controller.js",
+          "src/chrome/os/inputview/covariance.js",
+          "src/chrome/os/inputview/css.js",
+          "src/chrome/os/inputview/direction.js",
+          "src/chrome/os/inputview/dom.js",
+          "src/chrome/os/inputview/elements/content/altdataview.js",
+          "src/chrome/os/inputview/elements/content/backspacekey.js",
+          "src/chrome/os/inputview/elements/content/candidate.js",
+          "src/chrome/os/inputview/elements/content/candidatebutton.js",
+          "src/chrome/os/inputview/elements/content/candidateview.js",
+          "src/chrome/os/inputview/elements/content/canvasview.js",
+          "src/chrome/os/inputview/elements/content/character.js",
+          "src/chrome/os/inputview/elements/content/characterkey.js",
+          "src/chrome/os/inputview/elements/content/charactermodel.js",
+          "src/chrome/os/inputview/elements/content/compactkey.js",
+          "src/chrome/os/inputview/elements/content/compactkeymodel.js",
+          "src/chrome/os/inputview/elements/content/dragbutton.js",
+          "src/chrome/os/inputview/elements/content/emojikey.js",
+          "src/chrome/os/inputview/elements/content/emojiview.js",
+          "src/chrome/os/inputview/elements/content/enswitcherkey.js",
+          "src/chrome/os/inputview/elements/content/enterkey.js",
+          "src/chrome/os/inputview/elements/content/expandedcandidateview.js",
+          "src/chrome/os/inputview/elements/content/floatingview.js",
+          "src/chrome/os/inputview/elements/content/functionalkey.js",
+          "src/chrome/os/inputview/elements/content/gaussianestimator.js",
+          "src/chrome/os/inputview/elements/content/gesturecanvasview.js",
+          "src/chrome/os/inputview/elements/content/gesturestroke.js",
+          "src/chrome/os/inputview/elements/content/handwritingview.js",
+          "src/chrome/os/inputview/elements/content/keyboardview.js",
+          "src/chrome/os/inputview/elements/content/keysetview.js",
+          "src/chrome/os/inputview/elements/content/menuitem.js",
+          "src/chrome/os/inputview/elements/content/menukey.js",
+          "src/chrome/os/inputview/elements/content/menuview.js",
+          "src/chrome/os/inputview/elements/content/modifierkey.js",
+          "src/chrome/os/inputview/elements/content/morekeysshiftoperation.js",
+          "src/chrome/os/inputview/elements/content/pageindicator.js",
+          "src/chrome/os/inputview/elements/content/point.js",
+          "src/chrome/os/inputview/elements/content/selectview.js",
+          "src/chrome/os/inputview/elements/content/softkey.js",
+          "src/chrome/os/inputview/elements/content/spacekey.js",
+          "src/chrome/os/inputview/elements/content/spanelement.js",
+          "src/chrome/os/inputview/elements/content/swipeview.js",
+          "src/chrome/os/inputview/elements/content/switcherkey.js",
+          "src/chrome/os/inputview/elements/content/tabbarkey.js",
+          "src/chrome/os/inputview/elements/content/toolbarbutton.js",
+          "src/chrome/os/inputview/elements/content/voiceview.js",
+          "src/chrome/os/inputview/elements/element.js",
+          "src/chrome/os/inputview/elements/layout/extendedlayout.js",
+          "src/chrome/os/inputview/elements/layout/handwritinglayout.js",
+          "src/chrome/os/inputview/elements/layout/linearlayout.js",
+          "src/chrome/os/inputview/elements/layout/softkeyview.js",
+          "src/chrome/os/inputview/elements/layout/verticallayout.js",
+          "src/chrome/os/inputview/elements/weightable.js",
+          "src/chrome/os/inputview/emojitype.js",
+          "src/chrome/os/inputview/events.js",
+          "src/chrome/os/inputview/globalsettings.js",
+          "src/chrome/os/inputview/handler/pointeractionbundle.js",
+          "src/chrome/os/inputview/handler/pointerhandler.js",
+          "src/chrome/os/inputview/handler/swipestate.js",
+          "src/chrome/os/inputview/handler/util.js",
+          "src/chrome/os/inputview/hwt_css.js",
+          "src/chrome/os/inputview/hwt_eventtype.js",
+          "src/chrome/os/inputview/hwt_util.js",
+          "src/chrome/os/inputview/imewindows/accents.js",
+          "src/chrome/os/inputview/imewindows/gesturepreviewwindow.js",
+          "src/chrome/os/inputview/inputtool.js",
+          "src/chrome/os/inputview/inputtoolcode.js",
+          "src/chrome/os/inputview/inputtooltype.js",
+          "src/chrome/os/inputview/keyboardcontainer.js",
+          "src/chrome/os/inputview/layouts/compactspacerow.js",
+          "src/chrome/os/inputview/layouts/rowsof101.js",
+          "src/chrome/os/inputview/layouts/rowsof102.js",
+          "src/chrome/os/inputview/layouts/rowsofcompact.js",
+          "src/chrome/os/inputview/layouts/rowsofjp.js",
+          "src/chrome/os/inputview/layouts/rowsofnumberpad.js",
+          "src/chrome/os/inputview/layouts/spacerow.js",
+          "src/chrome/os/inputview/layouts/util.js",
+          "src/chrome/os/inputview/m17nmodel.js",
+          "src/chrome/os/inputview/model.js",
+          "src/chrome/os/inputview/perftracker.js",
+          "src/chrome/os/inputview/pointerconfig.js",
+          "src/chrome/os/inputview/readystate.js",
+          "src/chrome/os/inputview/settings.js",
+          "src/chrome/os/inputview/sizespec.js",
+          "src/chrome/os/inputview/specnodename.js",
+          "src/chrome/os/inputview/statemanager.js",
+          "src/chrome/os/inputview/statetype.js",
+          "src/chrome/os/inputview/strokehandler.js",
+          "src/chrome/os/inputview/swipedirection.js",
+          "src/chrome/os/inputview/util.js",
+          "src/chrome/os/keyboard/eventtype.js",
+          "src/chrome/os/keyboard/layoutevent.js",
+          "src/chrome/os/keyboard/model.js",
+          "src/chrome/os/keyboard/parsedlayout.js",
+          "src/chrome/os/message/contexttype.js",
+          "src/chrome/os/message/name.js",
+          "src/chrome/os/message/source.js",
+          "src/chrome/os/message/type.js",
+          "src/chrome/os/sounds/soundcontroller.js",
+          "src/chrome/os/sounds/sounds.js",
+          "src/chrome/os/statistics.js",
+          "third_party/closure_library/closure/goog/a11y/aria/announcer.js",
+          "third_party/closure_library/closure/goog/a11y/aria/aria.js",
+          "third_party/closure_library/closure/goog/a11y/aria/attributes.js",
+          "third_party/closure_library/closure/goog/a11y/aria/datatables.js",
+          "third_party/closure_library/closure/goog/a11y/aria/roles.js",
+          "third_party/closure_library/closure/goog/array/array.js",
+          "third_party/closure_library/closure/goog/asserts/asserts.js",
+          "third_party/closure_library/closure/goog/async/animationdelay.js",
+          "third_party/closure_library/closure/goog/async/delay.js",
+          "third_party/closure_library/closure/goog/async/freelist.js",
+          "third_party/closure_library/closure/goog/async/nexttick.js",
+          "third_party/closure_library/closure/goog/async/run.js",
+          "third_party/closure_library/closure/goog/async/workqueue.js",
+          "third_party/closure_library/closure/goog/color/color.js",
+          "third_party/closure_library/closure/goog/color/names.js",
+          "third_party/closure_library/closure/goog/debug/debug.js",
+          "third_party/closure_library/closure/goog/debug/entrypointregistry.js",
+          "third_party/closure_library/closure/goog/debug/error.js",
+          "third_party/closure_library/closure/goog/debug/logbuffer.js",
+          "third_party/closure_library/closure/goog/debug/logger.js",
+          "third_party/closure_library/closure/goog/debug/logrecord.js",
+          "third_party/closure_library/closure/goog/disposable/disposable.js",
+          "third_party/closure_library/closure/goog/disposable/idisposable.js",
+          "third_party/closure_library/closure/goog/dom/browserfeature.js",
+          "third_party/closure_library/closure/goog/dom/classlist.js",
+          "third_party/closure_library/closure/goog/dom/dom.js",
+          "third_party/closure_library/closure/goog/dom/nodetype.js",
+          "third_party/closure_library/closure/goog/dom/safe.js",
+          "third_party/closure_library/closure/goog/dom/tagname.js",
+          "third_party/closure_library/closure/goog/dom/tags.js",
+          "third_party/closure_library/closure/goog/dom/vendor.js",
+          "third_party/closure_library/closure/goog/events/browserevent.js",
+          "third_party/closure_library/closure/goog/events/browserfeature.js",
+          "third_party/closure_library/closure/goog/events/event.js",
+          "third_party/closure_library/closure/goog/events/eventhandler.js",
+          "third_party/closure_library/closure/goog/events/eventid.js",
+          "third_party/closure_library/closure/goog/events/events.js",
+          "third_party/closure_library/closure/goog/events/eventtarget.js",
+          "third_party/closure_library/closure/goog/events/eventtype.js",
+          "third_party/closure_library/closure/goog/events/keycodes.js",
+          "third_party/closure_library/closure/goog/events/keyhandler.js",
+          "third_party/closure_library/closure/goog/events/listenable.js",
+          "third_party/closure_library/closure/goog/events/listener.js",
+          "third_party/closure_library/closure/goog/events/listenermap.js",
+          "third_party/closure_library/closure/goog/fs/url.js",
+          "third_party/closure_library/closure/goog/functions/functions.js",
+          "third_party/closure_library/closure/goog/fx/anim/anim.js",
+          "third_party/closure_library/closure/goog/fx/animation.js",
+          "third_party/closure_library/closure/goog/fx/dom.js",
+          "third_party/closure_library/closure/goog/fx/dragger.js",
+          "third_party/closure_library/closure/goog/fx/easing.js",
+          "third_party/closure_library/closure/goog/fx/transition.js",
+          "third_party/closure_library/closure/goog/fx/transitionbase.js",
+          "third_party/closure_library/closure/goog/html/safehtml.js",
+          "third_party/closure_library/closure/goog/html/safescript.js",
+          "third_party/closure_library/closure/goog/html/safestyle.js",
+          "third_party/closure_library/closure/goog/html/safestylesheet.js",
+          "third_party/closure_library/closure/goog/html/safeurl.js",
+          "third_party/closure_library/closure/goog/html/trustedresourceurl.js",
+          "third_party/closure_library/closure/goog/html/uncheckedconversions.js",
+          "third_party/closure_library/closure/goog/i18n/bidi.js",
+          "third_party/closure_library/closure/goog/iter/iter.js",
+          "third_party/closure_library/closure/goog/labs/useragent/browser.js",
+          "third_party/closure_library/closure/goog/labs/useragent/engine.js",
+          "third_party/closure_library/closure/goog/labs/useragent/platform.js",
+          "third_party/closure_library/closure/goog/labs/useragent/util.js",
+          "third_party/closure_library/closure/goog/log/log.js",
+          "third_party/closure_library/closure/goog/math/box.js",
+          "third_party/closure_library/closure/goog/math/coordinate.js",
+          "third_party/closure_library/closure/goog/math/coordinate3.js",
+          "third_party/closure_library/closure/goog/math/math.js",
+          "third_party/closure_library/closure/goog/math/rect.js",
+          "third_party/closure_library/closure/goog/math/size.js",
+          "third_party/closure_library/closure/goog/net/jsloader.js",
+          "third_party/closure_library/closure/goog/object/object.js",
+          "third_party/closure_library/closure/goog/positioning/abstractposition.js",
+          "third_party/closure_library/closure/goog/positioning/anchoredposition.js",
+          "third_party/closure_library/closure/goog/positioning/anchoredviewportposition.js",
+          "third_party/closure_library/closure/goog/positioning/positioning.js",
+          "third_party/closure_library/closure/goog/promise/promise.js",
+          "third_party/closure_library/closure/goog/promise/resolver.js",
+          "third_party/closure_library/closure/goog/promise/thenable.js",
+          "third_party/closure_library/closure/goog/reflect/reflect.js",
+          "third_party/closure_library/closure/goog/string/const.js",
+          "third_party/closure_library/closure/goog/string/string.js",
+          "third_party/closure_library/closure/goog/string/typedstring.js",
+          "third_party/closure_library/closure/goog/structs/collection.js",
+          "third_party/closure_library/closure/goog/structs/map.js",
+          "third_party/closure_library/closure/goog/structs/set.js",
+          "third_party/closure_library/closure/goog/structs/structs.js",
+          "third_party/closure_library/closure/goog/style/bidi.js",
+          "third_party/closure_library/closure/goog/style/style.js",
+          "third_party/closure_library/closure/goog/style/transform.js",
+          "third_party/closure_library/closure/goog/testing/watchers.js",
+          "third_party/closure_library/closure/goog/timer/timer.js",
+          "third_party/closure_library/closure/goog/ui/component.js",
+          "third_party/closure_library/closure/goog/ui/container.js",
+          "third_party/closure_library/closure/goog/ui/containerrenderer.js",
+          "third_party/closure_library/closure/goog/ui/control.js",
+          "third_party/closure_library/closure/goog/ui/controlcontent.js",
+          "third_party/closure_library/closure/goog/ui/controlrenderer.js",
+          "third_party/closure_library/closure/goog/ui/decorate.js",
+          "third_party/closure_library/closure/goog/ui/idgenerator.js",
+          "third_party/closure_library/closure/goog/ui/registry.js",
+          "third_party/closure_library/closure/goog/uri/utils.js",
+          "third_party/closure_library/closure/goog/useragent/product.js",
+          "third_party/closure_library/closure/goog/useragent/product_isversion.js",
+          "third_party/closure_library/closure/goog/useragent/useragent.js",
+          "third_party/closure_library/third_party/closure/goog/mochikit/async/deferred.js",
+        ])
diff --git a/third_party/google_input_tools/inputview.gypi b/third_party/google_input_tools/inputview.gypi
deleted file mode 100644
index a44614b..0000000
--- a/third_party/google_input_tools/inputview.gypi
+++ /dev/null
@@ -1,244 +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.
-
-# This file is auto-generated using update.py.
-{
-  'variables': {
-    'inputview_sources': [
-      'src/chrome/os/common.js',
-      'src/chrome/os/constant.js',
-      'src/chrome/os/datasource.js',
-      'src/chrome/os/elementtype.js',
-      'src/chrome/os/env.js',
-      'src/chrome/os/events/keycodes.js',
-      'src/chrome/os/featurename.js',
-      'src/chrome/os/featuretracker.js',
-      'src/chrome/os/floatingwindow/floatingwindow.js',
-      'src/chrome/os/floatingwindow/floatingwindowdragger.js',
-      'src/chrome/os/floatingwindow/windowutil.js',
-      'src/chrome/os/inputview/adapter.js',
-      'src/chrome/os/inputview/candidatesinfo.js',
-      'src/chrome/os/inputview/canvas.js',
-      'src/chrome/os/inputview/conditionname.js',
-      'src/chrome/os/inputview/config/compact_letter_characters.js',
-      'src/chrome/os/inputview/config/compact_more_characters.js',
-      'src/chrome/os/inputview/config/compact_numberpad_characters.js',
-      'src/chrome/os/inputview/config/compact_symbol_characters.js',
-      'src/chrome/os/inputview/config/compact_util.js',
-      'src/chrome/os/inputview/config/constants.js',
-      'src/chrome/os/inputview/config/contextlayoututil.js',
-      'src/chrome/os/inputview/config/util.js',
-      'src/chrome/os/inputview/controller.js',
-      'src/chrome/os/inputview/covariance.js',
-      'src/chrome/os/inputview/css.js',
-      'src/chrome/os/inputview/direction.js',
-      'src/chrome/os/inputview/dom.js',
-      'src/chrome/os/inputview/elements/content/altdataview.js',
-      'src/chrome/os/inputview/elements/content/backspacekey.js',
-      'src/chrome/os/inputview/elements/content/candidate.js',
-      'src/chrome/os/inputview/elements/content/candidatebutton.js',
-      'src/chrome/os/inputview/elements/content/candidateview.js',
-      'src/chrome/os/inputview/elements/content/canvasview.js',
-      'src/chrome/os/inputview/elements/content/character.js',
-      'src/chrome/os/inputview/elements/content/characterkey.js',
-      'src/chrome/os/inputview/elements/content/charactermodel.js',
-      'src/chrome/os/inputview/elements/content/compactkey.js',
-      'src/chrome/os/inputview/elements/content/compactkeymodel.js',
-      'src/chrome/os/inputview/elements/content/dragbutton.js',
-      'src/chrome/os/inputview/elements/content/emojikey.js',
-      'src/chrome/os/inputview/elements/content/emojiview.js',
-      'src/chrome/os/inputview/elements/content/enswitcherkey.js',
-      'src/chrome/os/inputview/elements/content/enterkey.js',
-      'src/chrome/os/inputview/elements/content/expandedcandidateview.js',
-      'src/chrome/os/inputview/elements/content/floatingview.js',
-      'src/chrome/os/inputview/elements/content/functionalkey.js',
-      'src/chrome/os/inputview/elements/content/gaussianestimator.js',
-      'src/chrome/os/inputview/elements/content/gesturecanvasview.js',
-      'src/chrome/os/inputview/elements/content/gesturestroke.js',
-      'src/chrome/os/inputview/elements/content/handwritingview.js',
-      'src/chrome/os/inputview/elements/content/keyboardview.js',
-      'src/chrome/os/inputview/elements/content/keysetview.js',
-      'src/chrome/os/inputview/elements/content/menuitem.js',
-      'src/chrome/os/inputview/elements/content/menukey.js',
-      'src/chrome/os/inputview/elements/content/menuview.js',
-      'src/chrome/os/inputview/elements/content/modifierkey.js',
-      'src/chrome/os/inputview/elements/content/morekeysshiftoperation.js',
-      'src/chrome/os/inputview/elements/content/pageindicator.js',
-      'src/chrome/os/inputview/elements/content/point.js',
-      'src/chrome/os/inputview/elements/content/selectview.js',
-      'src/chrome/os/inputview/elements/content/softkey.js',
-      'src/chrome/os/inputview/elements/content/spacekey.js',
-      'src/chrome/os/inputview/elements/content/spanelement.js',
-      'src/chrome/os/inputview/elements/content/swipeview.js',
-      'src/chrome/os/inputview/elements/content/switcherkey.js',
-      'src/chrome/os/inputview/elements/content/tabbarkey.js',
-      'src/chrome/os/inputview/elements/content/toolbarbutton.js',
-      'src/chrome/os/inputview/elements/content/voiceview.js',
-      'src/chrome/os/inputview/elements/element.js',
-      'src/chrome/os/inputview/elements/layout/extendedlayout.js',
-      'src/chrome/os/inputview/elements/layout/handwritinglayout.js',
-      'src/chrome/os/inputview/elements/layout/linearlayout.js',
-      'src/chrome/os/inputview/elements/layout/softkeyview.js',
-      'src/chrome/os/inputview/elements/layout/verticallayout.js',
-      'src/chrome/os/inputview/elements/weightable.js',
-      'src/chrome/os/inputview/emojitype.js',
-      'src/chrome/os/inputview/events.js',
-      'src/chrome/os/inputview/globalsettings.js',
-      'src/chrome/os/inputview/handler/pointeractionbundle.js',
-      'src/chrome/os/inputview/handler/pointerhandler.js',
-      'src/chrome/os/inputview/handler/swipestate.js',
-      'src/chrome/os/inputview/handler/util.js',
-      'src/chrome/os/inputview/hwt_css.js',
-      'src/chrome/os/inputview/hwt_eventtype.js',
-      'src/chrome/os/inputview/hwt_util.js',
-      'src/chrome/os/inputview/imewindows/accents.js',
-      'src/chrome/os/inputview/imewindows/gesturepreviewwindow.js',
-      'src/chrome/os/inputview/inputtool.js',
-      'src/chrome/os/inputview/inputtoolcode.js',
-      'src/chrome/os/inputview/inputtooltype.js',
-      'src/chrome/os/inputview/keyboardcontainer.js',
-      'src/chrome/os/inputview/layouts/compactspacerow.js',
-      'src/chrome/os/inputview/layouts/rowsof101.js',
-      'src/chrome/os/inputview/layouts/rowsof102.js',
-      'src/chrome/os/inputview/layouts/rowsofcompact.js',
-      'src/chrome/os/inputview/layouts/rowsofjp.js',
-      'src/chrome/os/inputview/layouts/rowsofnumberpad.js',
-      'src/chrome/os/inputview/layouts/spacerow.js',
-      'src/chrome/os/inputview/layouts/util.js',
-      'src/chrome/os/inputview/m17nmodel.js',
-      'src/chrome/os/inputview/model.js',
-      'src/chrome/os/inputview/perftracker.js',
-      'src/chrome/os/inputview/pointerconfig.js',
-      'src/chrome/os/inputview/readystate.js',
-      'src/chrome/os/inputview/settings.js',
-      'src/chrome/os/inputview/sizespec.js',
-      'src/chrome/os/inputview/specnodename.js',
-      'src/chrome/os/inputview/statemanager.js',
-      'src/chrome/os/inputview/statetype.js',
-      'src/chrome/os/inputview/strokehandler.js',
-      'src/chrome/os/inputview/swipedirection.js',
-      'src/chrome/os/inputview/util.js',
-      'src/chrome/os/keyboard/eventtype.js',
-      'src/chrome/os/keyboard/layoutevent.js',
-      'src/chrome/os/keyboard/model.js',
-      'src/chrome/os/keyboard/parsedlayout.js',
-      'src/chrome/os/message/contexttype.js',
-      'src/chrome/os/message/name.js',
-      'src/chrome/os/message/source.js',
-      'src/chrome/os/message/type.js',
-      'src/chrome/os/sounds/soundcontroller.js',
-      'src/chrome/os/sounds/sounds.js',
-      'src/chrome/os/statistics.js',
-      'third_party/closure_library/closure/goog/a11y/aria/announcer.js',
-      'third_party/closure_library/closure/goog/a11y/aria/aria.js',
-      'third_party/closure_library/closure/goog/a11y/aria/attributes.js',
-      'third_party/closure_library/closure/goog/a11y/aria/datatables.js',
-      'third_party/closure_library/closure/goog/a11y/aria/roles.js',
-      'third_party/closure_library/closure/goog/array/array.js',
-      'third_party/closure_library/closure/goog/asserts/asserts.js',
-      'third_party/closure_library/closure/goog/async/animationdelay.js',
-      'third_party/closure_library/closure/goog/async/delay.js',
-      'third_party/closure_library/closure/goog/async/freelist.js',
-      'third_party/closure_library/closure/goog/async/nexttick.js',
-      'third_party/closure_library/closure/goog/async/run.js',
-      'third_party/closure_library/closure/goog/async/workqueue.js',
-      'third_party/closure_library/closure/goog/color/color.js',
-      'third_party/closure_library/closure/goog/color/names.js',
-      'third_party/closure_library/closure/goog/debug/debug.js',
-      'third_party/closure_library/closure/goog/debug/entrypointregistry.js',
-      'third_party/closure_library/closure/goog/debug/error.js',
-      'third_party/closure_library/closure/goog/debug/logbuffer.js',
-      'third_party/closure_library/closure/goog/debug/logger.js',
-      'third_party/closure_library/closure/goog/debug/logrecord.js',
-      'third_party/closure_library/closure/goog/disposable/disposable.js',
-      'third_party/closure_library/closure/goog/disposable/idisposable.js',
-      'third_party/closure_library/closure/goog/dom/browserfeature.js',
-      'third_party/closure_library/closure/goog/dom/classlist.js',
-      'third_party/closure_library/closure/goog/dom/dom.js',
-      'third_party/closure_library/closure/goog/dom/nodetype.js',
-      'third_party/closure_library/closure/goog/dom/safe.js',
-      'third_party/closure_library/closure/goog/dom/tagname.js',
-      'third_party/closure_library/closure/goog/dom/tags.js',
-      'third_party/closure_library/closure/goog/dom/vendor.js',
-      'third_party/closure_library/closure/goog/events/browserevent.js',
-      'third_party/closure_library/closure/goog/events/browserfeature.js',
-      'third_party/closure_library/closure/goog/events/event.js',
-      'third_party/closure_library/closure/goog/events/eventhandler.js',
-      'third_party/closure_library/closure/goog/events/eventid.js',
-      'third_party/closure_library/closure/goog/events/events.js',
-      'third_party/closure_library/closure/goog/events/eventtarget.js',
-      'third_party/closure_library/closure/goog/events/eventtype.js',
-      'third_party/closure_library/closure/goog/events/keycodes.js',
-      'third_party/closure_library/closure/goog/events/keyhandler.js',
-      'third_party/closure_library/closure/goog/events/listenable.js',
-      'third_party/closure_library/closure/goog/events/listener.js',
-      'third_party/closure_library/closure/goog/events/listenermap.js',
-      'third_party/closure_library/closure/goog/fs/url.js',
-      'third_party/closure_library/closure/goog/functions/functions.js',
-      'third_party/closure_library/closure/goog/fx/anim/anim.js',
-      'third_party/closure_library/closure/goog/fx/animation.js',
-      'third_party/closure_library/closure/goog/fx/dom.js',
-      'third_party/closure_library/closure/goog/fx/dragger.js',
-      'third_party/closure_library/closure/goog/fx/easing.js',
-      'third_party/closure_library/closure/goog/fx/transition.js',
-      'third_party/closure_library/closure/goog/fx/transitionbase.js',
-      'third_party/closure_library/closure/goog/html/safehtml.js',
-      'third_party/closure_library/closure/goog/html/safescript.js',
-      'third_party/closure_library/closure/goog/html/safestyle.js',
-      'third_party/closure_library/closure/goog/html/safestylesheet.js',
-      'third_party/closure_library/closure/goog/html/safeurl.js',
-      'third_party/closure_library/closure/goog/html/trustedresourceurl.js',
-      'third_party/closure_library/closure/goog/html/uncheckedconversions.js',
-      'third_party/closure_library/closure/goog/i18n/bidi.js',
-      'third_party/closure_library/closure/goog/iter/iter.js',
-      'third_party/closure_library/closure/goog/labs/useragent/browser.js',
-      'third_party/closure_library/closure/goog/labs/useragent/engine.js',
-      'third_party/closure_library/closure/goog/labs/useragent/platform.js',
-      'third_party/closure_library/closure/goog/labs/useragent/util.js',
-      'third_party/closure_library/closure/goog/log/log.js',
-      'third_party/closure_library/closure/goog/math/box.js',
-      'third_party/closure_library/closure/goog/math/coordinate.js',
-      'third_party/closure_library/closure/goog/math/coordinate3.js',
-      'third_party/closure_library/closure/goog/math/math.js',
-      'third_party/closure_library/closure/goog/math/rect.js',
-      'third_party/closure_library/closure/goog/math/size.js',
-      'third_party/closure_library/closure/goog/net/jsloader.js',
-      'third_party/closure_library/closure/goog/object/object.js',
-      'third_party/closure_library/closure/goog/positioning/abstractposition.js',
-      'third_party/closure_library/closure/goog/positioning/anchoredposition.js',
-      'third_party/closure_library/closure/goog/positioning/anchoredviewportposition.js',
-      'third_party/closure_library/closure/goog/positioning/positioning.js',
-      'third_party/closure_library/closure/goog/promise/promise.js',
-      'third_party/closure_library/closure/goog/promise/resolver.js',
-      'third_party/closure_library/closure/goog/promise/thenable.js',
-      'third_party/closure_library/closure/goog/reflect/reflect.js',
-      'third_party/closure_library/closure/goog/string/const.js',
-      'third_party/closure_library/closure/goog/string/string.js',
-      'third_party/closure_library/closure/goog/string/typedstring.js',
-      'third_party/closure_library/closure/goog/structs/collection.js',
-      'third_party/closure_library/closure/goog/structs/map.js',
-      'third_party/closure_library/closure/goog/structs/set.js',
-      'third_party/closure_library/closure/goog/structs/structs.js',
-      'third_party/closure_library/closure/goog/style/bidi.js',
-      'third_party/closure_library/closure/goog/style/style.js',
-      'third_party/closure_library/closure/goog/style/transform.js',
-      'third_party/closure_library/closure/goog/testing/watchers.js',
-      'third_party/closure_library/closure/goog/timer/timer.js',
-      'third_party/closure_library/closure/goog/ui/component.js',
-      'third_party/closure_library/closure/goog/ui/container.js',
-      'third_party/closure_library/closure/goog/ui/containerrenderer.js',
-      'third_party/closure_library/closure/goog/ui/control.js',
-      'third_party/closure_library/closure/goog/ui/controlcontent.js',
-      'third_party/closure_library/closure/goog/ui/controlrenderer.js',
-      'third_party/closure_library/closure/goog/ui/decorate.js',
-      'third_party/closure_library/closure/goog/ui/idgenerator.js',
-      'third_party/closure_library/closure/goog/ui/registry.js',
-      'third_party/closure_library/closure/goog/uri/utils.js',
-      'third_party/closure_library/closure/goog/useragent/product.js',
-      'third_party/closure_library/closure/goog/useragent/product_isversion.js',
-      'third_party/closure_library/closure/goog/useragent/useragent.js',
-      'third_party/closure_library/third_party/closure/goog/mochikit/async/deferred.js'
-    ]
-  }
-}
diff --git a/third_party/google_input_tools/update.py b/third_party/google_input_tools/update.py
index 8d6df8e..a9341ab 100755
--- a/third_party/google_input_tools/update.py
+++ b/third_party/google_input_tools/update.py
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# Copyright 2014 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
@@ -17,15 +17,6 @@
 require_regex = re.compile(_BASE_REGEX_STRING % 'require')
 provide_regex = re.compile(_BASE_REGEX_STRING % 'provide')
 
-preamble = [
-    '# 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.',
-    '',
-    '# This file is auto-generated using update.py.',
-    ''
-]
-
 # Entry-points required to build a virtual keyboard.
 namespaces = [
     'i18n.input.chrome.inputview.Controller',
@@ -235,16 +226,15 @@
 
 
 def generate_build_file(target_files):
-  """Updates inputview.gypi.
+  """Updates inputview.json.
 
   Args:
     target_files: List of files required to build inputview.js.
   """
 
   sorted_files = sorted(target_files)
-  with open('inputview.gypi', 'w') as file_handle:
-    file_handle.write(os.linesep.join(preamble))
-    json_data = {'variables': {'inputview_sources': sorted_files}}
+  with open('inputview.json', 'w') as file_handle:
+    json_data = {'inputview_sources': sorted_files}
     json_str = json.dumps(json_data, indent=2, separators=(',', ': '))
     file_handle.write(json_str.replace('\"', '\''))
 
@@ -290,8 +280,8 @@
 
   (options, _) = parser.parse_args()
 
-  input_path = get_google_input_tools_sandbox_from_options(options)
-  closure_library_path = get_closure_library_sandbox_from_options(options)
+  input_path = get_google_input_tools_sandbox_from_options(options)[0]
+  closure_library_path = get_closure_library_sandbox_from_options(options)[0]
 
   if not os.path.isdir(input_path):
     print 'Could not find google-input-tools sandbox.'
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 00998ee..021a2d0 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -1694,6 +1694,7 @@
   <int value="7" label="Opted Out from OOBE"/>
   <int value="8" label="Opted In from session"/>
   <int value="9" label="Opted Out from session"/>
+  <int value="10" label="Opted In from OOBE (Configuration)"/>
 </enum>
 
 <enum name="ArcOptInCancel">
@@ -14680,6 +14681,7 @@
   <int value="488" label="SmartLockSigninAllowed"/>
   <int value="489" label="NTLMShareAuthenticationEnabled"/>
   <int value="490" label="NetworkFileSharesPreconfiguredShares"/>
+  <int value="491" label="AllowWakeLocks"/>
 </enum>
 
 <enum name="EnterprisePolicyInvalidations">
@@ -28770,6 +28772,7 @@
   <int value="-1956747298" label="LayeredAPI:enabled"/>
   <int value="-1956349722" label="disable-smooth-scrolling"/>
   <int value="-1955923385" label="EnableGamepadButtonAxisEvents:enabled"/>
+  <int value="-1953121360" label="EphemeralTab:disabled"/>
   <int value="-1948540128" label="disable-webrtc-hw-encoding (deprecated)"/>
   <int value="-1946595906" label="enable-push-api-background-mode"/>
   <int value="-1946522787" label="VrCustomTabBrowsing:disabled"/>
@@ -28865,7 +28868,6 @@
   <int value="-1817209284" label="PayWithGoogleV1:enabled"/>
   <int value="-1816066138" label="CastAllowAllIPs:enabled"/>
   <int value="-1812579951" label="ContentSuggestionsCategoryRanker:enabled"/>
-  <int value="-1811887751" label="ChromeModernFullRoll:disabled"/>
   <int value="-1811394154" label="disable-webrtc-hw-vp8-encoding"/>
   <int value="-1810294310" label="AndroidPaymentApps:enabled"/>
   <int value="-1809891158" label="WebAuthenticationCable:enabled"/>
@@ -29419,7 +29421,6 @@
   <int value="-812461825" label="AutofillCreditCardSigninPromo:enabled"/>
   <int value="-810684526"
       label="AutofillToolkitViewsCreditCardDialogsMac:disabled"/>
-  <int value="-810373609" label="ChromeModernFullRoll:enabled"/>
   <int value="-808486493" label="NewWallpaperPicker:disabled"/>
   <int value="-803233334" label="AutofillRefreshStyleAndroid:disabled"/>
   <int value="-802348444" label="disable-site-engagement-service"/>
@@ -29833,6 +29834,7 @@
   <int value="27507364" label="apps-keep-chrome-alive"/>
   <int value="29212695" label="OfflineIndicator:enabled"/>
   <int value="31848187" label="ViewsTaskManager:disabled"/>
+  <int value="32488630" label="EphemeralTab:enabled"/>
   <int value="33778663" label="OriginTrials:enabled"/>
   <int value="36422284"
       label="AutofillSaveCardDialogUnlabeledExpirationDate:enabled"/>
@@ -45644,6 +45646,7 @@
   <int value="6" label="Regular to None"/>
   <int value="7" label="Load Regular"/>
   <int value="8" label="Load Invalid"/>
+  <int value="9" label="Load Invalid (no token for primary)"/>
 </enum>
 
 <enum name="SigninTokenTableReadTokenFromDBResult">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 0eb1847..6a2076a 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -28145,6 +28145,11 @@
   </summary>
 </histogram>
 
+<histogram name="ExploreSites.ImageDecoded" units="Boolean">
+  <owner>freedjm@chromium.org</owner>
+  <summary>Tracks the result of image decoding for the favicons.</summary>
+</histogram>
+
 <histogram name="ExploreSites.MonthlyHostCount" units="hosts">
   <owner>dimich@chromium.org</owner>
   <summary>
@@ -29666,6 +29671,18 @@
   <summary>Time spent until rules storage delegate gets ready.</summary>
 </histogram>
 
+<histogram name="Extensions.DeclarativeSetIconWasVisible" enum="BooleanVisible"
+    expires_after="2019-09-07">
+  <owner>dbertoni@chromium.org</owner>
+  <owner>extensions-core@chromium.org</owner>
+  <summary>
+    Reports whether an icon specified in the declarativeContent.SetIcon API is
+    considered visible by our icon analysis code. This stat is emitted when we
+    create the underlying object that sets the icon when the declarative rule is
+    applied.
+  </summary>
+</histogram>
+
 <histogram
     name="Extensions.DeclarativeWebRequest.WebViewRequestDeclarativeRules"
     enum="BooleanDeclarativeRules">
@@ -30171,6 +30188,28 @@
   <summary>An extension has been uninstalled.</summary>
 </histogram>
 
+<histogram name="Extensions.ExtensionUpdaterFirstUpdateCheckErrorsGoogleUrl"
+    enum="CombinedHttpResponseAndNetErrorCode" expires_after="M72">
+  <owner>mxnguyen@chromium.org</owner>
+  <summary>
+    Records the error codes of the extension updater update check errors. These
+    events are triggered only when the extension updater gets an error for the
+    first time (before any retry) in the update check phase for a google.com
+    domain.
+  </summary>
+</histogram>
+
+<histogram name="Extensions.ExtensionUpdaterFirstUpdateCheckErrorsNonGoogleUrl"
+    enum="CombinedHttpResponseAndNetErrorCode" expires_after="M72">
+  <owner>mxnguyen@chromium.org</owner>
+  <summary>
+    Records the error codes of the extension updater update check errors. These
+    events are triggered only when the extension updater gets an error for the
+    first time (before any retry) in the update check phase for a non google.com
+    domain.
+  </summary>
+</histogram>
+
 <histogram name="Extensions.ExtensionUpdaterRawUpdateCalls" units="extensions">
   <owner>mxnguyen@chromium.org</owner>
   <summary>
@@ -106208,9 +106247,18 @@
   </summary>
 </histogram>
 
+<histogram name="Sync.ModelTypeStoreCommitCount" enum="SyncModelTypes"
+    expires_after="2019-03-01">
+  <owner>mastiz@chromium.org</owner>
+  <summary>
+    Records the number of write batches committed to leveldb
+    (ModelTypeStoreBackend) per datatype.
+  </summary>
+</histogram>
+
 <histogram name="Sync.ModelTypeStoreInitResult"
     enum="SyncModelTypeStoreInitResult">
-  <owner>pavely@chromium.org</owner>
+  <owner>mastiz@chromium.org</owner>
   <summary>
     Records the result of ModelTypeStoreBackend initialization. Used to analyze
     frequency and causes of backend initialization failures.
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml
index c87f47b..e5d8c5fe 100644
--- a/tools/metrics/ukm/ukm.xml
+++ b/tools/metrics/ukm/ukm.xml
@@ -979,6 +979,20 @@
       this user since M-69.
     </summary>
   </metric>
+  <metric name="OutcomeDocIdHighBits">
+    <summary>
+      Rarely emits an int32 with the high-order bits of a DocID for the base
+      page. This is development-only data for M-72 excluding Beta and Stable.
+      See go/ukm-dev-data and https://crbug.com/894568 for details.
+    </summary>
+  </metric>
+  <metric name="OutcomeDocIdLowBits">
+    <summary>
+      Rarely emits an int32 with the low-order bits of a DocID for the base
+      page. This is development-only data for M-72 excluding Beta and Stable.
+      See go/ukm-dev-data and https://crbug.com/894568 for details.
+    </summary>
+  </metric>
   <metric name="OutcomeRankerDidPredict">
     <summary>
       Emits a 1 or 0 to indicate whether Ranker was able to make a prediction.
@@ -989,6 +1003,20 @@
       Emits a 1 or 0 to indicate what Ranker's prediction was for this record.
     </summary>
   </metric>
+  <metric name="OutcomeSnippetHashHighBits">
+    <summary>
+      Rarely emits an int32 with the high-order bits of a hashed-snippet from
+      the base page. This is development-only data for M-72 excluding Beta and
+      Stable. See go/ukm-dev-data and https://crbug.com/894568 for details.
+    </summary>
+  </metric>
+  <metric name="OutcomeSnippetHashLowBits">
+    <summary>
+      Rarely emits an int32 with the low-order bits of a hashed-snippet from the
+      base page. Development-only data for M-72 excluding Beta and Stable. See
+      go/ukm-dev-data and https://crbug.com/894568 for details.
+    </summary>
+  </metric>
   <metric name="OutcomeWasCardsDataShown">
     <summary>
       Emits a 1 or 0 to indicate whether any Contextual Cards data was shown in
diff --git a/tools/perf/measurements/rendering_util.py b/tools/perf/measurements/rendering_util.py
index 38acff2..09d07ed75 100644
--- a/tools/perf/measurements/rendering_util.py
+++ b/tools/perf/measurements/rendering_util.py
@@ -31,5 +31,10 @@
     # page_test_results.py for a temporary usecase.
     if 'name' in histogram_dict:
       histogram = histogram_module.Histogram.FromDict(histogram_dict)
-      stat[histogram.name] = histogram.running
+      if histogram.running is None:
+        continue
+      if histogram.name in stat:
+        stat[histogram.name] = stat[histogram.name].Merge(histogram.running)
+      else:
+        stat[histogram.name] = histogram.running
   return stat
diff --git a/tools/perf/page_sets/data/credentials.json.sha1 b/tools/perf/page_sets/data/credentials.json.sha1
index f4677d0..978de0f 100644
--- a/tools/perf/page_sets/data/credentials.json.sha1
+++ b/tools/perf/page_sets/data/credentials.json.sha1
@@ -1 +1 @@
-62bb07f739452c44b3618b9b3f3de6251bf73322
\ No newline at end of file
+6840cad1ab0a693cc418aadd60718c195eb48445
\ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_desktop.json b/tools/perf/page_sets/data/system_health_desktop.json
index dfa2eff9..893ea41 100644
--- a/tools/perf/page_sets/data/system_health_desktop.json
+++ b/tools/perf/page_sets/data/system_health_desktop.json
@@ -12,6 +12,9 @@
         "browse:media:tumblr": {
             "DEFAULT": "system_health_desktop_036.wprgo"
         },
+        "browse:media:tumblr:2018": {
+            "DEFAULT": "system_health_desktop_55cb9dd713.wprgo"
+        },
         "browse:media:youtube": {
             "DEFAULT": "system_health_desktop_026.wprgo",
             "linux": "system_health_desktop_026.wprgo",
@@ -249,6 +252,9 @@
         "load:tools:stackoverflow": {
             "DEFAULT": "system_health_desktop_004.wprgo"
         },
+        "load:tools:stackoverflow:2018": {
+            "DEFAULT": "system_health_desktop_acb5e9444f.wprgo"
+        },
         "load:tools:weather": {
             "DEFAULT": "system_health_desktop_004.wprgo"
         },
diff --git a/tools/perf/page_sets/data/system_health_desktop_55cb9dd713.wprgo.sha1 b/tools/perf/page_sets/data/system_health_desktop_55cb9dd713.wprgo.sha1
new file mode 100644
index 0000000..7be67b22
--- /dev/null
+++ b/tools/perf/page_sets/data/system_health_desktop_55cb9dd713.wprgo.sha1
@@ -0,0 +1 @@
+55cb9dd71364f014e51f4ed50207ac91820a555d
\ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_desktop_acb5e9444f.wprgo.sha1 b/tools/perf/page_sets/data/system_health_desktop_acb5e9444f.wprgo.sha1
new file mode 100644
index 0000000..00d5e97c
--- /dev/null
+++ b/tools/perf/page_sets/data/system_health_desktop_acb5e9444f.wprgo.sha1
@@ -0,0 +1 @@
+acb5e9444fc69f4907f90412da96e27c264ca5ac
\ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile.json b/tools/perf/page_sets/data/system_health_mobile.json
index 3cdbffa7..eda5d1c 100644
--- a/tools/perf/page_sets/data/system_health_mobile.json
+++ b/tools/perf/page_sets/data/system_health_mobile.json
@@ -231,6 +231,9 @@
         "load:tools:stackoverflow": {
             "DEFAULT": "system_health_mobile_004.wprgo"
         },
+        "load:tools:stackoverflow:2018": {
+            "DEFAULT": "system_health_mobile_fea9d8ae01.wprgo"
+        },
         "load:tools:weather": {
             "DEFAULT": "system_health_mobile_004.wprgo"
         },
diff --git a/tools/perf/page_sets/data/system_health_mobile_fea9d8ae01.wprgo.sha1 b/tools/perf/page_sets/data/system_health_mobile_fea9d8ae01.wprgo.sha1
new file mode 100644
index 0000000..443ece4
--- /dev/null
+++ b/tools/perf/page_sets/data/system_health_mobile_fea9d8ae01.wprgo.sha1
@@ -0,0 +1 @@
+fea9d8ae016eb7e2b92ac6b16380c975da13a50a
\ No newline at end of file
diff --git a/tools/perf/page_sets/login_helpers/tumblr_login.py b/tools/perf/page_sets/login_helpers/tumblr_login.py
new file mode 100644
index 0000000..5eff8533
--- /dev/null
+++ b/tools/perf/page_sets/login_helpers/tumblr_login.py
@@ -0,0 +1,31 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from page_sets.login_helpers import login_utils
+
+
+def LoginDesktopAccount(action_runner, credential,
+                 credentials_path=login_utils.DEFAULT_CREDENTIAL_PATH):
+  """Logs in into a Tumblr account."""
+
+  account_name, password = login_utils.GetAccountNameAndPassword(
+      credential, credentials_path=credentials_path)
+
+  action_runner.Navigate('https://www.tumblr.com/login')
+  login_utils.InputWithSelector(
+      action_runner, account_name, 'input[type=email]')
+
+  next_button = '.signup_determine_btn'
+  enter_password_button = '.forgot_password_link'
+  action_runner.WaitForElement(selector=next_button)
+  action_runner.ClickElement(selector=next_button)
+  action_runner.Wait(1)
+  action_runner.WaitForElement(selector=enter_password_button)
+  action_runner.ClickElement(selector=enter_password_button)
+  action_runner.Wait(1)
+  login_utils.InputWithSelector(
+      action_runner, password, 'input[type=password]')
+  action_runner.Wait(1)
+  action_runner.WaitForElement(selector=next_button)
+  action_runner.ClickElement(selector=next_button)
diff --git a/tools/perf/page_sets/system_health/browsing_stories.py b/tools/perf/page_sets/system_health/browsing_stories.py
index b5886e05..7838b30 100644
--- a/tools/perf/page_sets/system_health/browsing_stories.py
+++ b/tools/perf/page_sets/system_health/browsing_stories.py
@@ -15,6 +15,7 @@
 
 from page_sets.login_helpers import facebook_login
 from page_sets.login_helpers import pinterest_login
+from page_sets.login_helpers import tumblr_login
 
 from telemetry.util import js_template
 
@@ -592,6 +593,28 @@
     action_runner.MouseClick(selector='#tumblr_lightbox_center_image')
     action_runner.Wait(1)  # To make browsing more realistic.
 
+
+class TumblrDesktopStory2018(_MediaBrowsingStory):
+  NAME = 'browse:media:tumblr:2018'
+  URL = 'https://tumblr.com/search/gifs'
+  ITEM_SELECTOR = '.post_media'
+  IS_SINGLE_PAGE_APP = True
+  ITEMS_TO_VISIT = 8
+  INCREMENT_INDEX_AFTER_EACH_ITEM = True
+  SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
+  TAGS = [story_tags.YEAR_2018]
+
+  def _Login(self, action_runner):
+    tumblr_login.LoginDesktopAccount(action_runner, 'tumblr')
+    action_runner.Wait(3)
+
+  def _ViewMediaItem(self, action_runner, index):
+    super(TumblrDesktopStory2018, self)._ViewMediaItem(action_runner, index)
+    action_runner.WaitForElement(selector='#tumblr_lightbox')
+    action_runner.MouseClick(selector='#tumblr_lightbox')
+    action_runner.Wait(1)  # To make browsing more realistic.
+
+
 class PinterestDesktopStory(_MediaBrowsingStory):
   NAME = 'browse:media:pinterest'
   URL = 'https://pinterest.com'
diff --git a/tools/perf/page_sets/system_health/loading_stories.py b/tools/perf/page_sets/system_health/loading_stories.py
index e37b50b..81f5bd1 100644
--- a/tools/perf/page_sets/system_health/loading_stories.py
+++ b/tools/perf/page_sets/system_health/loading_stories.py
@@ -425,6 +425,13 @@
       'https://stackoverflow.com/questions/36827659/compiling-an-application-for-use-in-highly-radioactive-environments')
   TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
 
+class LoadStackOverflowStory2018(_LoadingStory):
+  """Load a typical question & answer page of stackoverflow.com"""
+  NAME = 'load:tools:stackoverflow:2018'
+  URL = (
+      'https://stackoverflow.com/questions/36827659/compiling-an-application-for-use-in-highly-radioactive-environments')
+  TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2018]
+
 
 class LoadDropboxStory(_LoadingStory):
   NAME = 'load:tools:dropbox'
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc
index ec85b8ee..44e5695 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -73,7 +73,8 @@
     view_->GetLayer()->AddChild(content_layer_);
   }
 
-  host_frame_sink_manager_->RegisterFrameSinkId(frame_sink_id_, this);
+  host_frame_sink_manager_->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
   host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_,
                                                    "DelegatedFrameHostAndroid");
   CreateCompositorFrameSinkSupport();
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index bbd9140..86d5d2dd 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -7,6 +7,7 @@
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/memory/ptr_util.h"
+#include "base/observer_list_types.h"
 #include "services/ws/public/mojom/window_tree.mojom.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/env_input_state_controller.h"
@@ -24,6 +25,7 @@
 #include "ui/aura/window_occlusion_tracker.h"
 #include "ui/aura/window_port_for_shutdown.h"
 #include "ui/base/ui_base_features.h"
+#include "ui/events/event_observer.h"
 #include "ui/events/event_target_iterator.h"
 #include "ui/events/gestures/gesture_recognizer_impl.h"
 #include "ui/events/platform/platform_event_source.h"
@@ -42,6 +44,47 @@
 
 }  // namespace
 
+// EventObserverAdapter is an aura::Env pre-target handler that forwards
+// read-only events to its observer when they match the requested types.
+class EventObserverAdapter : public ui::EventHandler,
+                             public base::CheckedObserver {
+ public:
+  EventObserverAdapter(ui::EventObserver* observer,
+                       ui::EventTarget* target,
+                       const std::set<ui::EventType>& types)
+      : observer_(observer), target_(target), types_(types) {
+    target_->AddPreTargetHandler(this);
+  }
+
+  ~EventObserverAdapter() override { target_->RemovePreTargetHandler(this); }
+
+  ui::EventObserver* observer() { return observer_; }
+  ui::EventTarget* target() { return target_; }
+  const std::set<ui::EventType>& types() const { return types_; }
+
+  // ui::EventHandler:
+  void OnEvent(ui::Event* event) override {
+    if (types_.count(event->type()) > 0) {
+      std::unique_ptr<ui::Event> cloned_event = ui::Event::Clone(*event);
+      ui::Event::DispatcherApi(cloned_event.get()).set_target(event->target());
+      // The root location of located events should be in screen coordinates.
+      if (cloned_event->IsLocatedEvent() && cloned_event->target()) {
+        ui::LocatedEvent* located_event = cloned_event->AsLocatedEvent();
+        auto root = located_event->target()->GetScreenLocationF(*located_event);
+        located_event->set_root_location_f(root);
+      }
+      observer_->OnEvent(*cloned_event);
+    }
+  }
+
+ private:
+  ui::EventObserver* observer_;
+  ui::EventTarget* target_;
+  const std::set<ui::EventType> types_;
+
+  DISALLOW_COPY_AND_ASSIGN(EventObserverAdapter);
+};
+
 ////////////////////////////////////////////////////////////////////////////////
 // Env, public:
 
@@ -198,6 +241,38 @@
   return window_occlusion_tracker_.get();
 }
 
+void Env::AddEventObserver(ui::EventObserver* observer,
+                           ui::EventTarget* target,
+                           const std::set<ui::EventType>& types) {
+  DCHECK(!types.empty()) << "Observers must observe at least one event type";
+  auto adapter(std::make_unique<EventObserverAdapter>(observer, target, types));
+  event_observer_adapter_list_.AddObserver(adapter.get());
+  event_observer_adapters_.insert(std::move(adapter));
+  if (window_tree_client_ && target == this)
+    window_tree_client_->OnEventObserverAdded(observer, types);
+}
+
+void Env::RemoveEventObserver(ui::EventObserver* observer) {
+  for (auto& adapter : event_observer_adapters_) {
+    if (adapter->observer() == observer) {
+      if (window_tree_client_ && adapter->target() == this)
+        window_tree_client_->OnEventObserverRemoved(observer, adapter->types());
+      event_observer_adapter_list_.RemoveObserver(adapter.get());
+      event_observer_adapters_.erase(adapter);
+      return;
+    }
+  }
+}
+
+void Env::NotifyEventObservers(const ui::Event& event) {
+  for (auto& adapter : event_observer_adapter_list_) {
+    if (adapter.types().count(event.type()) > 0 &&
+        (adapter.target() == event.target() || adapter.target() == this)) {
+      adapter.observer()->OnEvent(event);
+    }
+  }
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // Env, private:
 
@@ -295,7 +370,7 @@
 }
 
 ui::EventTarget* Env::GetParentTarget() {
-  return NULL;
+  return nullptr;
 }
 
 std::unique_ptr<ui::EventTargetIterator> Env::GetChildIterator() const {
@@ -304,7 +379,7 @@
 
 ui::EventTargeter* Env::GetEventTargeter() {
   NOTREACHED();
-  return NULL;
+  return nullptr;
 }
 
 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() {
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 3738281..735f549 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -6,6 +6,7 @@
 #define UI_AURA_ENV_H_
 
 #include <memory>
+#include <set>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
@@ -15,7 +16,6 @@
 #include "mojo/public/cpp/system/buffer.h"
 #include "ui/aura/aura_export.h"
 #include "ui/base/dragdrop/os_exchange_data_provider_factory.h"
-#include "ui/events/event_handler.h"
 #include "ui/events/event_target.h"
 #include "ui/events/system_input_injector.h"
 #include "ui/gfx/geometry/point.h"
@@ -36,6 +36,7 @@
 namespace ui {
 class ContextFactory;
 class ContextFactoryPrivate;
+class EventObserver;
 class GestureRecognizer;
 class PlatformEventSource;
 }  // namespace ui
@@ -54,6 +55,7 @@
 
 class EnvInputStateController;
 class EnvObserver;
+class EventObserverAdapter;
 class InputStateLookup;
 class MouseLocationManager;
 class MusMouseLocationUpdater;
@@ -195,6 +197,17 @@
   // Get WindowOcclusionTracker instance. Create it if it is not yet created.
   WindowOcclusionTracker* GetWindowOcclusionTracker();
 
+  // Add, remove, or notify EventObservers. EventObservers are essentially
+  // pre-target EventHandlers that can not modify the events nor alter dispatch.
+  // On Chrome OS, observers receive system-wide events if |target| is this Env.
+  // On desktop platforms, observers may only receive events targeting Chrome.
+  // Observers must be removed before their target is destroyed.
+  void AddEventObserver(ui::EventObserver* observer,
+                        ui::EventTarget* target,
+                        const std::set<ui::EventType>& types);
+  void RemoveEventObserver(ui::EventObserver* observer);
+  void NotifyEventObservers(const ui::Event& event);
+
  private:
   friend class test::EnvTestHelper;
   friend class test::EnvWindowTreeClientSetter;
@@ -257,6 +270,10 @@
   base::ObserverList<WindowEventDispatcherObserver>::Unchecked
       window_event_dispatcher_observers_;
 
+  // The ObserverList and set of owned EventObserver adapters.
+  base::ObserverList<EventObserverAdapter> event_observer_adapter_list_;
+  std::set<std::unique_ptr<EventObserverAdapter>> event_observer_adapters_;
+
   std::unique_ptr<EnvInputStateController> env_controller_;
   int mouse_button_flags_;
   // Location of last mouse event, in screen coordinates.
diff --git a/ui/aura/local/window_port_local.cc b/ui/aura/local/window_port_local.cc
index 76fb7f0..80cf119b 100644
--- a/ui/aura/local/window_port_local.cc
+++ b/ui/aura/local/window_port_local.cc
@@ -149,7 +149,8 @@
   viz::mojom::CompositorFrameSinkClientPtr client;
   viz::mojom::CompositorFrameSinkClientRequest client_request =
       mojo::MakeRequest(&client);
-  host_frame_sink_manager->RegisterFrameSinkId(frame_sink_id_, this);
+  host_frame_sink_manager->RegisterFrameSinkId(
+      frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
   window_->SetEmbedFrameSinkId(frame_sink_id_);
   host_frame_sink_manager->CreateCompositorFrameSink(
       frame_sink_id_, std::move(sink_request), std::move(client));
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index f28829be..d6ca45c 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -65,6 +65,8 @@
 #include "ui/display/screen.h"
 #include "ui/display/types/display_constants.h"
 #include "ui/events/event.h"
+#include "ui/events/event_observer.h"
+#include "ui/events/mojo/event_struct_traits.h"
 #include "ui/gfx/geometry/dip_util.h"
 #include "ui/gfx/geometry/insets.h"
 #include "ui/gfx/geometry/size.h"
@@ -645,28 +647,11 @@
     window_tree_host->Hide();
 }
 
-void WindowTreeClient::NotifyPointerEventObserved(ui::PointerEvent* event,
-                                                  uint64_t display_id,
-                                                  WindowMus* window_mus) {
-  aura::Window* window = window_mus ? window_mus->GetWindow() : nullptr;
-  gfx::Point location_in_screen;
-  if (window) {
-    location_in_screen = event->location();
-    client::GetScreenPositionClient(window->GetRootWindow())
-        ->ConvertPointToScreen(window, &location_in_screen);
-  } else {
-    // When there is no window force the root and location to be the same.
-    // They may differ if |window| was valid at the time of the event, but
-    // was since deleted.
-    event->set_location_f(event->root_location_f());
-    location_in_screen = event->root_location();
-    display::Display display;
-    if (display::Screen::GetScreen()->GetDisplayWithDisplayId(display_id,
-                                                              &display)) {
-      location_in_screen += display.bounds().OffsetFromOrigin();
-    }
-  }
-  delegate_->OnPointerEventObserved(*event, location_in_screen, window);
+void WindowTreeClient::UpdateObservedEventTypes() {
+  std::vector<ui::mojom::EventType> types;
+  for (auto type : event_type_to_observer_count_)
+    types.push_back(mojo::ConvertTo<ui::mojom::EventType>(type.first));
+  tree_->ObserveEventTypes(types);
 }
 
 void WindowTreeClient::ScheduleInFlightBoundsChange(
@@ -900,17 +885,31 @@
                     static_cast<int16_t>(location & 0xFFFF));
 }
 
-void WindowTreeClient::StartPointerWatcher(bool want_moves) {
-  if (has_pointer_watcher_)
-    StopPointerWatcher();
-  has_pointer_watcher_ = true;
-  tree_->StartPointerWatcher(want_moves);
+void WindowTreeClient::OnEventObserverAdded(
+    ui::EventObserver* observer,
+    const std::set<ui::EventType>& types) {
+  bool requires_update = false;
+  for (auto type : types) {
+    requires_update |= (event_type_to_observer_count_[type] == 0);
+    ++event_type_to_observer_count_[type];
+  }
+  if (requires_update)
+    UpdateObservedEventTypes();
 }
 
-void WindowTreeClient::StopPointerWatcher() {
-  DCHECK(has_pointer_watcher_);
-  tree_->StopPointerWatcher();
-  has_pointer_watcher_ = false;
+void WindowTreeClient::OnEventObserverRemoved(
+    ui::EventObserver* observer,
+    const std::set<ui::EventType>& types) {
+  bool requires_update = false;
+  for (auto type : types) {
+    --event_type_to_observer_count_[type];
+    requires_update |= (event_type_to_observer_count_[type] == 0);
+    DCHECK_GE(event_type_to_observer_count_[type], 0);
+    if (event_type_to_observer_count_[type] <= 0)
+      event_type_to_observer_count_.erase(type);
+  }
+  if (requires_update)
+    UpdateObservedEventTypes();
 }
 
 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) {
@@ -1268,28 +1267,10 @@
                                           ws::Id window_id,
                                           int64_t display_id,
                                           std::unique_ptr<ui::Event> event,
-                                          bool matches_pointer_watcher) {
+                                          bool matches_event_observer) {
   DCHECK(event);
-  WindowMus* window = GetWindowByServerId(window_id);  // May be null.
-
   DCHECK(!event->IsPointerEvent());
-
-  if (matches_pointer_watcher && has_pointer_watcher_) {
-    // TODO(sky): remove this once PointerWatcher doesn't need PointerEvent.
-    // https://crbug.com/865781
-    std::unique_ptr<ui::Event> pointer_event;
-    if (event->IsMouseEvent()) {
-      pointer_event =
-          std::make_unique<ui::PointerEvent>(*event->AsMouseEvent());
-    } else if (event->IsTouchEvent()) {
-      pointer_event =
-          std::make_unique<ui::PointerEvent>(*event->AsTouchEvent());
-    } else {
-      NOTREACHED();
-    }
-    NotifyPointerEventObserved(pointer_event->AsPointerEvent(), display_id,
-                               window);
-  }
+  WindowMus* window = GetWindowByServerId(window_id);  // May be null.
 
   // If the window has already been deleted, use |event| to update event states
   // kept in aura::Env.
@@ -1304,6 +1285,20 @@
     return;
   }
 
+  if (matches_event_observer) {
+    std::unique_ptr<ui::Event> cloned_event(ui::Event::Clone(*event));
+    // Set the window as the event target, so event locations will be useful.
+    aura::Window* aura_window = window ? window->GetWindow() : nullptr;
+    ui::Event::DispatcherApi(cloned_event.get()).set_target(aura_window);
+    // The root location of located events should be in screen coordinates.
+    if (cloned_event->IsLocatedEvent() && cloned_event->target()) {
+      ui::LocatedEvent* located_event = cloned_event->AsLocatedEvent();
+      auto root = located_event->target()->GetScreenLocationF(*located_event);
+      located_event->set_root_location_f(root);
+    }
+    Env::GetInstance()->NotifyEventObservers(*cloned_event);
+  }
+
   if (event->IsKeyEvent()) {
     InputMethodMus* input_method = GetWindowTreeHostMus(window)->input_method();
     if (input_method) {
@@ -1328,16 +1323,9 @@
   ack_handler.set_handled(event->handled());
 }
 
-void WindowTreeClient::OnPointerEventObserved(std::unique_ptr<ui::Event> event,
-                                              ws::Id window_id,
-                                              int64_t display_id) {
+void WindowTreeClient::OnObservedInputEvent(std::unique_ptr<ui::Event> event) {
   DCHECK(event);
-  DCHECK(event->IsPointerEvent());
-  if (!has_pointer_watcher_)
-    return;
-
-  NotifyPointerEventObserved(event->AsPointerEvent(), display_id,
-                             GetWindowByServerId(window_id));
+  Env::GetInstance()->NotifyEventObservers(*event);
 }
 
 void WindowTreeClient::OnWindowFocused(ws::Id focused_window_id) {
diff --git a/ui/aura/mus/window_tree_client.h b/ui/aura/mus/window_tree_client.h
index 9183c78..f7480ed 100644
--- a/ui/aura/mus/window_tree_client.h
+++ b/ui/aura/mus/window_tree_client.h
@@ -48,6 +48,7 @@
 
 namespace ui {
 class ContextFactory;
+class EventObserver;
 struct PropertyData;
 }
 
@@ -190,11 +191,11 @@
   // race the asynchronous initialization; but in that case we return (0, 0).
   gfx::Point GetCursorScreenPoint();
 
-  // See description in window_tree.mojom. When an existing pointer watcher is
-  // updated or cleared then any future events from the server for that watcher
-  // will be ignored.
-  void StartPointerWatcher(bool want_moves);
-  void StopPointerWatcher();
+  // Called when the local aura::Env adds or removes EventObservers.
+  void OnEventObserverAdded(ui::EventObserver* observer,
+                            const std::set<ui::EventType>& types);
+  void OnEventObserverRemoved(ui::EventObserver* observer,
+                              const std::set<ui::EventType>& types);
 
   void AddObserver(WindowTreeClientObserver* observer);
   void RemoveObserver(WindowTreeClientObserver* observer);
@@ -327,9 +328,8 @@
   // TopmostWindowTracker.
   void StopObservingTopmostWindow();
 
-  void NotifyPointerEventObserved(ui::PointerEvent* event,
-                                  uint64_t display_id,
-                                  WindowMus* window_mus);
+  // Updates the set of event types requested for observation.
+  void UpdateObservedEventTypes();
 
   // Called from OnWindowMusBoundsChanged() and SetRootWindowBounds().
   void ScheduleInFlightBoundsChange(WindowMus* window,
@@ -419,10 +419,8 @@
                           ws::Id window_id,
                           int64_t display_id,
                           std::unique_ptr<ui::Event> event,
-                          bool matches_pointer_watcher) override;
-  void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
-                              ws::Id window_id,
-                              int64_t display_id) override;
+                          bool matches_event_observer) override;
+  void OnObservedInputEvent(std::unique_ptr<ui::Event> event) override;
   void OnWindowFocused(ws::Id focused_window_id) override;
   void OnWindowCursorChanged(ws::Id window_id, ui::CursorData cursor) override;
   void OnDragDropStart(const base::flat_map<std::string, std::vector<uint8_t>>&
@@ -550,7 +548,8 @@
 
   base::ObserverList<WindowTreeClientObserver>::Unchecked observers_;
 
-  bool has_pointer_watcher_ = false;
+  // Tracks the number of observers registered for each observed event type.
+  std::map<ui::EventType, int> event_type_to_observer_count_;
 
   // The current change id for the client.
   uint32_t current_move_loop_change_ = 0u;
diff --git a/ui/aura/mus/window_tree_client_delegate.h b/ui/aura/mus/window_tree_client_delegate.h
index 0ac318a..aa73c1b 100644
--- a/ui/aura/mus/window_tree_client_delegate.h
+++ b/ui/aura/mus/window_tree_client_delegate.h
@@ -56,13 +56,6 @@
   // the corresponding WindowTreeClient.
   virtual void OnLostConnection(WindowTreeClient* client) = 0;
 
-  // Called when the WindowTreeClient receives an input event observed via
-  // StartPointerWatcher(). |target| may be null for events that were sent to
-  // windows owned by other processes.
-  virtual void OnPointerEventObserved(const ui::PointerEvent& event,
-                                      const gfx::Point& location_in_screen,
-                                      Window* target) = 0;
-
   virtual PropertyConverter* GetPropertyConverter() = 0;
 
   // See ws::mojom::ScreenProviderObserver for details on this.
diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
index 2ca4cce..041ac12 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -23,7 +23,6 @@
 #include "ui/aura/client/capture_client_observer.h"
 #include "ui/aura/client/default_capture_client.h"
 #include "ui/aura/client/focus_client.h"
-#include "ui/aura/client/screen_position_client.h"
 #include "ui/aura/client/transient_window_client.h"
 #include "ui/aura/mus/capture_synchronizer.h"
 #include "ui/aura/mus/client_surface_embedder.h"
@@ -56,6 +55,7 @@
 #include "ui/display/display_switches.h"
 #include "ui/display/screen.h"
 #include "ui/events/event.h"
+#include "ui/events/event_observer.h"
 #include "ui/events/event_utils.h"
 #include "ui/events/test/test_event_handler.h"
 #include "ui/gfx/geometry/dip_util.h"
@@ -126,41 +126,31 @@
   return mojo::ConvertTo<std::vector<uint8_t>>(value);
 }
 
-class TestScreenPositionClient : public client::ScreenPositionClient {
- public:
-  TestScreenPositionClient() = default;
-  ~TestScreenPositionClient() override = default;
-
- private:
-  // ScreenPositionClient:
-  void ConvertPointToScreen(const Window* window, gfx::PointF* point) override {
-    const Window* root_window = window->GetRootWindow();
-    Window::ConvertPointToTarget(window, root_window, point);
-    gfx::Rect bounds = root_window->GetHost()->GetBoundsInPixels();
-    point->Offset(bounds.x(), bounds.y());
-  }
-  void ConvertPointFromScreen(const Window* window,
-                              gfx::PointF* point) override {
-    // unused.
-  }
-  void ConvertHostPointToScreen(Window* root_window,
-                                gfx::Point* point) override {
-    // unused.
-  }
-  void SetBounds(Window* window,
-                 const gfx::Rect& bounds,
-                 const display::Display& display) override {
-    // unused.
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(TestScreenPositionClient);
-};
-
 void OnWindowMoveDone(int* call_count, bool* last_result, bool result) {
   (*call_count)++;
   *last_result = result;
 }
 
+// A simple event observer that records the last observed event.
+class TestEventObserver : public ui::EventObserver {
+ public:
+  TestEventObserver() = default;
+  ~TestEventObserver() override = default;
+
+  const ui::Event* last_event() const { return last_event_.get(); }
+  void ResetLastEvent() { last_event_.reset(); }
+
+ private:
+  // ui::EventObserver:
+  void OnEvent(const ui::Event& event) override {
+    last_event_ = ui::Event::Clone(event);
+  }
+
+  std::unique_ptr<ui::Event> last_event_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestEventObserver);
+};
+
 }  // namespace
 
 class WindowTreeClientTest : public test::AuraMusClientTestBase {
@@ -231,12 +221,8 @@
 // WindowTreeClientTest with --force-device-scale-factor=2.
 class WindowTreeClientTestHighDPI : public WindowTreeClientTest {
  public:
-  WindowTreeClientTestHighDPI() {}
-  ~WindowTreeClientTestHighDPI() override {}
-
-  const ui::PointerEvent* last_event_observed() const {
-    return last_event_observed_.get();
-  }
+  WindowTreeClientTestHighDPI() = default;
+  ~WindowTreeClientTestHighDPI() override = default;
 
   // WindowTreeClientTest:
   void SetUp() override {
@@ -244,15 +230,8 @@
         switches::kForceDeviceScaleFactor, "2");
     WindowTreeClientTest::SetUp();
   }
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              Window* target) override {
-    last_event_observed_.reset(new ui::PointerEvent(event));
-  }
 
  private:
-  std::unique_ptr<ui::PointerEvent> last_event_observed_;
-
   DISALLOW_COPY_AND_ASSIGN(WindowTreeClientTestHighDPI);
 };
 
@@ -927,7 +906,7 @@
   EXPECT_EQ(event_location_in_child, window_delegate.last_event_location());
 }
 
-TEST_F(WindowTreeClientTest, InputEventPointerEvent) {
+TEST_F(WindowTreeClientTest, InputEventMouse) {
   InputEventBasicTestWindowDelegate window_delegate(window_tree());
   WindowTreeHostMus window_tree_host(
       CreateInitParamsForTopLevel(window_tree_client_impl()));
@@ -1376,91 +1355,42 @@
   EXPECT_FALSE(env->is_touch_down());
 }
 
-class WindowTreeClientPointerObserverTest : public WindowTreeClientTest {
- public:
-  WindowTreeClientPointerObserverTest() {}
-  ~WindowTreeClientPointerObserverTest() override {}
-
-  void DeleteLastEventObserved() { last_event_observed_.reset(); }
-  const ui::PointerEvent* last_event_observed() const {
-    return last_event_observed_.get();
-  }
-  const gfx::Point& last_location_in_screen() const {
-    return last_location_in_screen_;
-  }
-
-  // WindowTreeClientTest:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              Window* target) override {
-    last_event_observed_.reset(new ui::PointerEvent(event));
-    last_location_in_screen_ = location_in_screen;
-  }
-
- protected:
-  client::ScreenPositionClient* screen_position_client() {
-    return &screen_position_client_;
-  }
-
- private:
-  std::unique_ptr<ui::PointerEvent> last_event_observed_;
-  gfx::Point last_location_in_screen_;
-  TestScreenPositionClient screen_position_client_;
-
-  DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPointerObserverTest);
-};
-
-// Tests pointer watchers triggered by events that did not hit a target in this
-// window tree.
-TEST_F(WindowTreeClientPointerObserverTest, OnPointerEventObserved) {
+// Tests observation of events that did not hit a target in this window tree.
+TEST_F(WindowTreeClientTest, OnObservedInputEvent) {
   std::unique_ptr<Window> top_level(std::make_unique<Window>(nullptr));
   top_level->SetType(client::WINDOW_TYPE_NORMAL);
   top_level->Init(ui::LAYER_NOT_DRAWN);
   top_level->SetBounds(gfx::Rect(0, 0, 100, 100));
   top_level->Show();
 
-  // Start a pointer watcher for all events excluding move events.
-  window_tree_client_impl()->StartPointerWatcher(false /* want_moves */);
-
-  const int64_t kDisplayId = 111;
-  test_screen()->display_list().AddDisplay(
-      display::Display(kDisplayId, gfx::Rect(800, 0, 400, 400)),
-      display::DisplayList::Type::NOT_PRIMARY);
+  // Start observing touch press events.
+  TestEventObserver test_event_observer;
+  top_level->env()->AddEventObserver(&test_event_observer, top_level->env(),
+                                     {ui::ET_TOUCH_PRESSED});
 
   // Simulate the server sending an observed event.
-  std::unique_ptr<ui::PointerEvent> pointer_event_down(new ui::PointerEvent(
-      ui::ET_POINTER_DOWN, gfx::Point(), gfx::Point(), ui::EF_CONTROL_DOWN, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks()));
-  window_tree_client()->OnPointerEventObserved(std::move(pointer_event_down),
-                                               0u, kDisplayId);
+  ui::TouchEvent touch_press(
+      ui::ET_TOUCH_PRESSED, gfx::Point(), ui::EventTimeForNow(),
+      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1));
+  window_tree_client()->OnObservedInputEvent(ui::Event::Clone(touch_press));
 
-  // Delegate sensed the event.
-  const ui::PointerEvent* last_event = last_event_observed();
-  ASSERT_TRUE(last_event);
-  EXPECT_EQ(ui::ET_POINTER_DOWN, last_event->type());
-  EXPECT_EQ(ui::EF_CONTROL_DOWN, last_event->flags());
-  EXPECT_EQ(gfx::Point(800, 0), last_location_in_screen());
-  DeleteLastEventObserved();
+  // The observer should have been notified of the event.
+  ASSERT_TRUE(test_event_observer.last_event());
+  EXPECT_EQ(ui::ET_TOUCH_PRESSED, test_event_observer.last_event()->type());
+  test_event_observer.ResetLastEvent();
 
-  // Stop the pointer watcher.
-  window_tree_client_impl()->StopPointerWatcher();
+  // Remove the event observer.
+  top_level->env()->RemoveEventObserver(&test_event_observer);
 
   // Simulate another event from the server.
-  std::unique_ptr<ui::PointerEvent> pointer_event_up(new ui::PointerEvent(
-      ui::ET_POINTER_UP, gfx::Point(), gfx::Point(), ui::EF_CONTROL_DOWN, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks()));
-  window_tree_client()->OnPointerEventObserved(std::move(pointer_event_up), 0u,
-                                               kDisplayId);
+  window_tree_client()->OnObservedInputEvent(ui::Event::Clone(touch_press));
 
-  // No event was sensed.
-  EXPECT_FALSE(last_event_observed());
+  // The observer should not have been notified of the event.
+  EXPECT_FALSE(test_event_observer.last_event());
 }
 
-// Tests pointer watchers triggered by events that hit this window tree.
-TEST_F(WindowTreeClientPointerObserverTest,
-       OnWindowInputEventWithPointerWatcher) {
+// Tests observation of events that did hit a target in this window tree.
+TEST_F(WindowTreeClientTest, OnWindowInputEventWithObserver) {
   WindowTreeHostMus window_tree_host(
       CreateInitParamsForTopLevel(window_tree_client_impl()));
   Window* top_level = window_tree_host.window();
@@ -1469,26 +1399,23 @@
   window_tree_host.InitHost();
   window_tree_host.Show();
   EXPECT_EQ(bounds.size(), top_level->bounds().size());
-  client::SetScreenPositionClient(window_tree_host.window(),
-                                  screen_position_client());
 
-  // Start a pointer watcher for all events excluding move events.
-  window_tree_client_impl()->StartPointerWatcher(false /* want_moves */);
+  // Start observing touch press events.
+  TestEventObserver test_event_observer;
+  top_level->env()->AddEventObserver(&test_event_observer, top_level->env(),
+                                     {ui::ET_TOUCH_PRESSED});
 
   // Simulate the server dispatching an event that also matched the observer.
-  ui::TouchEvent touch_event_down(
+  ui::TouchEvent touch_press(
       ui::ET_TOUCH_PRESSED, gfx::Point(), ui::EventTimeForNow(),
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      ui::EF_CONTROL_DOWN);
-  window_tree_client()->OnWindowInputEvent(
-      1, server_id(top_level), 0, ui::Event::Clone(touch_event_down), true);
+      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1));
+  window_tree_client()->OnWindowInputEvent(1, server_id(top_level), 0,
+                                           ui::Event::Clone(touch_press), true);
 
-  // Delegate sensed the event.
-  const ui::Event* last_event = last_event_observed();
-  ASSERT_TRUE(last_event);
-  EXPECT_EQ(ui::ET_POINTER_DOWN, last_event->type());
-  EXPECT_EQ(ui::EF_CONTROL_DOWN, last_event->flags());
-  EXPECT_EQ(gfx::Point(50, 50), last_location_in_screen());
+  // The observer should have been notified of the event.
+  ASSERT_TRUE(test_event_observer.last_event());
+  EXPECT_EQ(ui::ET_TOUCH_PRESSED, test_event_observer.last_event()->type());
+  top_level->env()->RemoveEventObserver(&test_event_observer);
 }
 
 // Verifies focus is reverted if the server replied that the change failed.
@@ -2489,7 +2416,7 @@
             top_level->GetHost()->GetBoundsInPixels());
 }
 
-TEST_F(WindowTreeClientTestHighDPI, PointerEventsInDip) {
+TEST_F(WindowTreeClientTestHighDPI, ObservedInputEventsInDip) {
   display::Screen* screen = display::Screen::GetScreen();
   const display::Display primary_display = screen->GetPrimaryDisplay();
   ASSERT_EQ(2.0f, primary_display.device_scale_factor());
@@ -2500,26 +2427,23 @@
   top_level->SetBounds(gfx::Rect(0, 0, 100, 100));
   top_level->Show();
 
-  // Start a pointer watcher for all events excluding move events.
-  window_tree_client_impl()->StartPointerWatcher(false /* want_moves */);
+  // Start observing touch press events.
+  TestEventObserver test_event_observer;
+  top_level->env()->AddEventObserver(&test_event_observer, top_level->env(),
+                                     {ui::ET_TOUCH_PRESSED});
 
-  // Simulate the server sending an observed event.
+  // Simulate the server sending an observed event in screen dip coordinates.
   const gfx::Point location(10, 12);
-  const gfx::Point root_location(14, 16);
-  std::unique_ptr<ui::PointerEvent> pointer_event_down(new ui::PointerEvent(
-      ui::ET_POINTER_DOWN, location, root_location, ui::EF_CONTROL_DOWN, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks()));
-  window_tree_client()->OnPointerEventObserved(std::move(pointer_event_down),
-                                               0u, primary_display.id());
+  ui::TouchEvent touch_press(
+      ui::ET_TOUCH_PRESSED, location, ui::EventTimeForNow(),
+      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1));
+  window_tree_client()->OnObservedInputEvent(ui::Event::Clone(touch_press));
 
-  // Delegate received the event in Dips.
-  const ui::PointerEvent* last_event = last_event_observed();
+  // The observer should have received the event in screen dip coordinates.
+  const ui::Event* last_event = test_event_observer.last_event();
   ASSERT_TRUE(last_event);
-  // NOTE: the root and location are the same as there was no window supplied to
-  // OnPointerEventObserved().
-  EXPECT_EQ(root_location, last_event->location());
-  EXPECT_EQ(root_location, last_event->root_location());
+  EXPECT_EQ(location, last_event->AsLocatedEvent()->location());
+  EXPECT_EQ(location, last_event->AsLocatedEvent()->root_location());
 }
 
 TEST_F(WindowTreeClientTestHighDPI, InputEventsInDip) {
diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc
index 3bd37a8..c0dfc3c 100644
--- a/ui/aura/test/aura_test_base.cc
+++ b/ui/aura/test/aura_test_base.cc
@@ -162,13 +162,6 @@
 
 void AuraTestBase::OnLostConnection(WindowTreeClient* client) {}
 
-void AuraTestBase::OnPointerEventObserved(const ui::PointerEvent& event,
-                                          const gfx::Point& location_in_screen,
-                                          Window* target) {
-  observed_pointer_events_.push_back(std::unique_ptr<ui::PointerEvent>(
-      static_cast<ui::PointerEvent*>(ui::Event::Clone(event).release())));
-}
-
 PropertyConverter* AuraTestBase::GetPropertyConverter() {
   return &property_converter_;
 }
diff --git a/ui/aura/test/aura_test_base.h b/ui/aura/test/aura_test_base.h
index e53e386..c185cf86 100644
--- a/ui/aura/test/aura_test_base.h
+++ b/ui/aura/test/aura_test_base.h
@@ -6,7 +6,6 @@
 #define UI_AURA_TEST_AURA_TEST_BASE_H_
 
 #include <memory>
-#include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
@@ -89,18 +88,11 @@
   }
   ws::mojom::WindowTreeClient* window_tree_client();
 
-  std::vector<std::unique_ptr<ui::PointerEvent>>& observed_pointer_events() {
-    return observed_pointer_events_;
-  }
-
   // WindowTreeClientDelegate:
   void OnEmbed(std::unique_ptr<WindowTreeHostMus> window_tree_host) override;
   void OnUnembed(Window* root) override;
   void OnEmbedRootDestroyed(WindowTreeHostMus* window_tree_host) override;
   void OnLostConnection(WindowTreeClient* client) override;
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              Window* target) override;
   PropertyConverter* GetPropertyConverter() override;
 
  private:
@@ -115,7 +107,6 @@
   PropertyConverter property_converter_;
   std::unique_ptr<AuraTestHelper> helper_;
   std::unique_ptr<AuraTestContextFactory> mus_context_factory_;
-  std::vector<std::unique_ptr<ui::PointerEvent>> observed_pointer_events_;
 
   DISALLOW_COPY_AND_ASSIGN(AuraTestBase);
 };
diff --git a/ui/aura/test/event_generator_delegate_aura.cc b/ui/aura/test/event_generator_delegate_aura.cc
index e8301b4..5da0c5cf 100644
--- a/ui/aura/test/event_generator_delegate_aura.cc
+++ b/ui/aura/test/event_generator_delegate_aura.cc
@@ -160,11 +160,6 @@
     if (hosted_target != &event_targeter_)
       EventGeneratorDelegateAura::ConvertPointFromHost(hosted_target, point);
   }
-  void DispatchEventToPointerWatchers(ui::EventTarget* target,
-                                      const ui::PointerEvent& event) override {
-    // Does nothing as events are injected into mus, which should trigger
-    // pointer events to be handled.
-  }
 
  private:
   EventTargeterMus event_targeter_;
@@ -252,23 +247,5 @@
   return window->GetHost()->GetInputMethod()->DispatchKeyEvent(event);
 }
 
-void EventGeneratorDelegateAura::DispatchEventToPointerWatchers(
-    ui::EventTarget* target,
-    const ui::PointerEvent& event) {
-  // In non-mus aura PointerWatchers are handled by system-wide EventHandlers,
-  // for example ash::Shell and ash::PointerWatcherAdapter.
-  if (!Env::GetInstance()->HasWindowTreeClient())
-    return;
-
-  Window* window = static_cast<Window*>(target);
-  if (!WindowPortMus::Get(window))
-    return;
-  // Route the event through WindowTreeClient as in production mus. Does nothing
-  // if there are no PointerWatchers installed.
-  WindowTreeClient* window_tree_client = EnvTestHelper().GetWindowTreeClient();
-  WindowTreeClientPrivate(window_tree_client)
-      .CallOnPointerEventObserved(window, ui::Event::Clone(event));
-}
-
 }  // namespace test
 }  // namespace aura
diff --git a/ui/aura/test/event_generator_delegate_aura.h b/ui/aura/test/event_generator_delegate_aura.h
index 530ab2e..e7533cd 100644
--- a/ui/aura/test/event_generator_delegate_aura.h
+++ b/ui/aura/test/event_generator_delegate_aura.h
@@ -56,8 +56,6 @@
                             gfx::Point* point) const override;
   ui::EventDispatchDetails DispatchKeyEventToIME(ui::EventTarget* target,
                                                  ui::KeyEvent* event) override;
-  void DispatchEventToPointerWatchers(ui::EventTarget* target,
-                                      const ui::PointerEvent& event) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(EventGeneratorDelegateAura);
diff --git a/ui/aura/test/mus/test_window_tree.cc b/ui/aura/test/mus/test_window_tree.cc
index 0ea4d16..85c1df6 100644
--- a/ui/aura/test/mus/test_window_tree.cc
+++ b/ui/aura/test/mus/test_window_tree.cc
@@ -271,9 +271,8 @@
   OnChangeReceived(change_id, WindowTreeChangeType::CAPTURE);
 }
 
-void TestWindowTree::StartPointerWatcher(bool want_moves) {}
-
-void TestWindowTree::StopPointerWatcher() {}
+void TestWindowTree::ObserveEventTypes(
+    const std::vector<ui::mojom::EventType>& types) {}
 
 void TestWindowTree::Embed(ws::Id window_id,
                            ws::mojom::WindowTreeClientPtr client,
diff --git a/ui/aura/test/mus/test_window_tree.h b/ui/aura/test/mus/test_window_tree.h
index 4cd4153..7463b841 100644
--- a/ui/aura/test/mus/test_window_tree.h
+++ b/ui/aura/test/mus/test_window_tree.h
@@ -197,8 +197,8 @@
   void GetWindowTree(ws::Id window_id, GetWindowTreeCallback callback) override;
   void SetCapture(uint32_t change_id, ws::Id window_id) override;
   void ReleaseCapture(uint32_t change_id, ws::Id window_id) override;
-  void StartPointerWatcher(bool want_moves) override;
-  void StopPointerWatcher() override;
+  void ObserveEventTypes(
+      const std::vector<ui::mojom::EventType>& types) override;
   void Embed(ws::Id window_id,
              ws::mojom::WindowTreeClientPtr client,
              uint32_t flags,
diff --git a/ui/aura/test/mus/test_window_tree_client_delegate.cc b/ui/aura/test/mus/test_window_tree_client_delegate.cc
index c93d273b..a38bbda 100644
--- a/ui/aura/test/mus/test_window_tree_client_delegate.cc
+++ b/ui/aura/test/mus/test_window_tree_client_delegate.cc
@@ -24,11 +24,6 @@
 
 void TestWindowTreeClientDelegate::OnLostConnection(WindowTreeClient* client) {}
 
-void TestWindowTreeClientDelegate::OnPointerEventObserved(
-    const ui::PointerEvent& event,
-    const gfx::Point& location_in_screen,
-    Window* target) {}
-
 PropertyConverter* TestWindowTreeClientDelegate::GetPropertyConverter() {
   return property_converter_.get();
 }
diff --git a/ui/aura/test/mus/test_window_tree_client_delegate.h b/ui/aura/test/mus/test_window_tree_client_delegate.h
index 164f9b89..b9a2eff 100644
--- a/ui/aura/test/mus/test_window_tree_client_delegate.h
+++ b/ui/aura/test/mus/test_window_tree_client_delegate.h
@@ -23,9 +23,6 @@
   void OnUnembed(Window* root) override;
   void OnEmbedRootDestroyed(WindowTreeHostMus* window_tree_host) override;
   void OnLostConnection(WindowTreeClient* client) override;
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              Window* target) override;
   PropertyConverter* GetPropertyConverter() override;
 
  private:
diff --git a/ui/aura/test/mus/window_tree_client_private.cc b/ui/aura/test/mus/window_tree_client_private.cc
index 160084b..a096105 100644
--- a/ui/aura/test/mus/window_tree_client_private.cc
+++ b/ui/aura/test/mus/window_tree_client_private.cc
@@ -45,14 +45,9 @@
                                  base::nullopt);
 }
 
-void WindowTreeClientPrivate::CallOnPointerEventObserved(
-    Window* window,
+void WindowTreeClientPrivate::CallOnObservedInputEvent(
     std::unique_ptr<ui::Event> event) {
-  const int64_t display_id = 0;
-  const uint32_t window_id =
-      window ? WindowPortMus::Get(window)->server_id() : 0u;
-  tree_client_impl_->OnPointerEventObserved(std::move(event), window_id,
-                                            display_id);
+  tree_client_impl_->OnObservedInputEvent(std::move(event));
 }
 
 void WindowTreeClientPrivate::CallOnCaptureChanged(Window* new_capture,
@@ -74,8 +69,8 @@
   tree_client_impl_->WindowTreeConnectionEstablished(window_tree);
 }
 
-bool WindowTreeClientPrivate::HasPointerWatcher() {
-  return tree_client_impl_->has_pointer_watcher_;
+bool WindowTreeClientPrivate::HasEventObserver() {
+  return !tree_client_impl_->event_type_to_observer_count_.empty();
 }
 
 Window* WindowTreeClientPrivate::GetWindowByServerId(ws::Id id) {
diff --git a/ui/aura/test/mus/window_tree_client_private.h b/ui/aura/test/mus/window_tree_client_private.h
index 4d0cd2f..b745c2ba 100644
--- a/ui/aura/test/mus/window_tree_client_private.h
+++ b/ui/aura/test/mus/window_tree_client_private.h
@@ -47,9 +47,8 @@
   // Calls OnEmbed() on the WindowTreeClient.
   void OnEmbed(ws::mojom::WindowTree* window_tree);
 
-  // Simulates |event| matching a pointer watcher on the window server.
-  void CallOnPointerEventObserved(Window* window,
-                                  std::unique_ptr<ui::Event> event);
+  // Simulates |event| matching an event observer on the window server.
+  void CallOnObservedInputEvent(std::unique_ptr<ui::Event> event);
 
   void CallOnCaptureChanged(Window* new_capture, Window* old_capture);
 
@@ -60,7 +59,7 @@
   // Sets the WindowTree.
   void SetTree(ws::mojom::WindowTree* window_tree);
 
-  bool HasPointerWatcher();
+  bool HasEventObserver();
 
   Window* GetWindowByServerId(ws::Id id);
 
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index b5ce620..6eed1fc45 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -419,9 +419,10 @@
 
   if (old_capture && old_capture->GetRootWindow() == window() &&
       old_capture->delegate()) {
-    // Send a capture changed event with bogus location data.
-    ui::MouseEvent event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(),
-                         gfx::Point(), ui::EventTimeForNow(), 0, 0);
+    // Send a capture changed event with the most recent mouse screen location.
+    const gfx::Point location = host_->window()->env()->last_mouse_location();
+    ui::MouseEvent event(ui::ET_MOUSE_CAPTURE_CHANGED, location, location,
+                         ui::EventTimeForNow(), 0, 0);
 
     DispatchDetails details = DispatchEvent(old_capture, &event);
     if (details.dispatcher_destroyed)
diff --git a/ui/base/touch/touch_device_android.cc b/ui/base/touch/touch_device_android.cc
index 92febc1..9ba4291c 100644
--- a/ui/base/touch/touch_device_android.cc
+++ b/ui/base/touch/touch_device_android.cc
@@ -24,7 +24,7 @@
   JNIEnv* env = AttachCurrentThread();
   std::vector<int> pointer_and_hover_types;
   base::android::JavaIntArrayToIntVector(
-      env, Java_TouchDevice_availablePointerAndHoverTypes(env).obj(),
+      env, Java_TouchDevice_availablePointerAndHoverTypes(env),
       &pointer_and_hover_types);
   DCHECK_EQ(pointer_and_hover_types.size(), 2u);
   return std::make_pair(pointer_and_hover_types[0], pointer_and_hover_types[1]);
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 8ae7efef..c98b4086 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -80,7 +80,8 @@
   if (context_factory_private) {
     auto* host_frame_sink_manager =
         context_factory_private_->GetHostFrameSinkManager();
-    host_frame_sink_manager->RegisterFrameSinkId(frame_sink_id_, this);
+    host_frame_sink_manager->RegisterFrameSinkId(
+        frame_sink_id_, this, viz::ReportFirstSurfaceActivation::kYes);
     host_frame_sink_manager->SetFrameSinkDebugLabel(frame_sink_id_,
                                                     "Compositor");
   }
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 75bd864..fbc6b93 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -161,6 +161,7 @@
     "event_dispatcher.h",
     "event_handler.h",
     "event_modifiers.h",
+    "event_observer.h",
     "event_processor.h",
     "event_rewriter.h",
     "event_sink.h",
@@ -194,6 +195,7 @@
     "event_source.cc",
     "event_target.cc",
     "event_utils.cc",
+    "events_exports.cc",
     "events_stub.cc",
     "gestures/gesture_recognizer.cc",
     "gestures/gesture_recognizer_impl_mac.cc",
diff --git a/ui/events/blink/blink_event_util.cc b/ui/events/blink/blink_event_util.cc
index 6d3fda8..a3acd34 100644
--- a/ui/events/blink/blink_event_util.cc
+++ b/ui/events/blink/blink_event_util.cc
@@ -754,6 +754,8 @@
       gesture.data.tap.tap_count = details.tap_count();
       gesture.data.tap.width = details.bounding_box_f().width();
       gesture.data.tap.height = details.bounding_box_f().height();
+      gesture.SetNeedsWheelEvent(source_device ==
+                                 blink::kWebGestureDeviceTouchpad);
       break;
     case ET_GESTURE_TAP:
       gesture.SetType(WebInputEvent::kGestureTap);
diff --git a/ui/events/event_observer.h b/ui/events/event_observer.h
new file mode 100644
index 0000000..e5381dea
--- /dev/null
+++ b/ui/events/event_observer.h
@@ -0,0 +1,35 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_EVENT_OBSERVER_H_
+#define UI_EVENTS_EVENT_OBSERVER_H_
+
+#include "base/macros.h"
+#include "ui/events/events_export.h"
+
+namespace ui {
+
+class Event;
+
+// EventObservers are notified of events but are unable to modify the events or
+// mark them as handled before they are dispatched to EventHandlers.
+//
+// Window service clients may use this interface for observation of events that
+// target the window manager or other clients. Clients should limit the types
+// and duration of observation, as there is a system-wide perf/battery penalty,
+// especially for frequently occurring events, like mouse moves. Events with
+// targets outside of the client's scope will have a null target.
+class EVENTS_EXPORT EventObserver {
+ public:
+  // Called for all events matching the requested event types.
+  // The root location of located events is always in screen coordinates.
+  virtual void OnEvent(const Event& event) = 0;
+
+ protected:
+  virtual ~EventObserver() {}
+};
+
+}  // namespace ui
+
+#endif  // UI_EVENTS_EVENT_OBSERVER_H_
diff --git a/ui/views/views_exports.cc b/ui/events/events_exports.cc
similarity index 61%
rename from ui/views/views_exports.cc
rename to ui/events/events_exports.cc
index f1ba3f5..0bc4c729 100644
--- a/ui/views/views_exports.cc
+++ b/ui/events/events_exports.cc
@@ -1,10 +1,10 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 // This file is for including headers that are not included in any other .cc
-// files contained within the ui/views module.  We need to include these here so
+// files contained with the ui/events module.  We need to include these here so
 // that linker will know to include the symbols, defined by these headers, in
 // the resulting dynamic library.
 
-#include "ui/views/pointer_watcher.h"
+#include "ui/events/event_observer.h"
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index c6a4ce9..1355604 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -737,38 +737,12 @@
                                     base::Unretained(this)));
     }
     pending_events_.push_back(std::move(pending_event));
-  } else {
-    MaybeDispatchToPointerWatchers(*event);
-    if (!event->handled()) {
-      ui::EventSource* event_source =
-          delegate()->GetEventSource(current_target_);
-      ui::EventSourceTestApi event_source_test(event_source);
-      ui::EventDispatchDetails details =
-          event_source_test.SendEventToSink(event);
-      if (details.dispatcher_destroyed)
-        current_target_ = nullptr;
-    }
-  }
-}
-
-void EventGenerator::MaybeDispatchToPointerWatchers(const Event& event) {
-  // Regular pointer events can be dispatched directly.
-  if (event.IsPointerEvent()) {
-    delegate()->DispatchEventToPointerWatchers(current_target_,
-                                               *event.AsPointerEvent());
-    return;
-  }
-
-  // PointerWatchers always use pointer events, so mouse and touch events
-  // need to be converted.
-  if (!PointerEvent::CanConvertFrom(event))
-    return;
-  if (event.IsMouseEvent()) {
-    delegate()->DispatchEventToPointerWatchers(
-        current_target_, PointerEvent(*event.AsMouseEvent()));
-  } else if (event.IsTouchEvent()) {
-    delegate()->DispatchEventToPointerWatchers(
-        current_target_, PointerEvent(*event.AsTouchEvent()));
+  } else if (!event->handled()) {
+    ui::EventSource* event_source = delegate()->GetEventSource(current_target_);
+    ui::EventSourceTestApi event_source_test(event_source);
+    ui::EventDispatchDetails details = event_source_test.SendEventToSink(event);
+    if (details.dispatcher_destroyed)
+      current_target_ = nullptr;
   }
 }
 
diff --git a/ui/events/test/event_generator.h b/ui/events/test/event_generator.h
index 35f71e6..fca27dee 100644
--- a/ui/events/test/event_generator.h
+++ b/ui/events/test/event_generator.h
@@ -83,11 +83,6 @@
   virtual ui::EventDispatchDetails DispatchKeyEventToIME(EventTarget* target,
                                                          ui::KeyEvent* event)
       WARN_UNUSED_RESULT = 0;
-
-  // Offers the event to pointer watchers on systems that provide them.
-  // Does not consume the event (pointer watchers cannot consume events).
-  virtual void DispatchEventToPointerWatchers(EventTarget* target,
-                                              const PointerEvent& event) {}
 };
 
 // ui::test::EventGenerator is a tool that generates and dispatches events.
@@ -471,10 +466,6 @@
   void DispatchNextPendingEvent();
   void DoDispatchEvent(Event* event, bool async);
 
-  // Offers event to pointer watchers (via delegate) if the event is a mouse or
-  // touch event.
-  void MaybeDispatchToPointerWatchers(const Event& event);
-
   std::unique_ptr<EventGeneratorDelegate> delegate_;
   gfx::Point current_location_;
   EventTarget* current_target_ = nullptr;
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index c8180c9e..0e10f46c 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -1202,8 +1202,7 @@
   var entry = this.getCurrentDirEntry();
   if (entry && !this.volumeManager_.getVolumeInfo(entry)) {
     this.volumeManager_.getDefaultDisplayRoot(function(displayRoot) {
-      if (displayRoot)
-        this.changeDirectoryEntry(displayRoot);
+      this.changeDirectoryEntry(displayRoot);
     }.bind(this));
   }
 
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
index f73e00b..fd04a2c 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -1426,18 +1426,6 @@
           }.bind(this));
     }.bind(this));
 
-    queue.run((callback) => {
-      // If there is target to be selected, just move to next step.
-      if (nextCurrentDirEntry) {
-        callback();
-        return;
-      }
-
-      // Try to select MyFiles if anything else has failed.
-      nextCurrentDirEntry = this.directoryTree.dataModel.myFilesModel_.entry;
-      callback();
-    });
-
     // Finalize.
     queue.run(function(callback) {
       // Check directory change.
diff --git a/ui/file_manager/integration_tests/file_manager/file_display.js b/ui/file_manager/integration_tests/file_manager/file_display.js
index 2d42b096..d6a7045c 100644
--- a/ui/file_manager/integration_tests/file_manager/file_display.js
+++ b/ui/file_manager/integration_tests/file_manager/file_display.js
@@ -392,101 +392,3 @@
     },
   ]);
 };
-
-/**
- * Tests Files app opening without errors when there are no volumes at all and
- * then mounting Downloads volume which should appear and be able to display its
- * files.
- */
-testcase.fileDisplayWithoutVolumesThenMountDownloads = function() {
-  let appId;
-
-  StepsRunner.run([
-    // Unmount all default volumes.
-    function() {
-      sendTestMessage({name: 'unmountAllVolumes'}).then(this.next);
-    },
-    // Open Files app without specifying the initial directory/root.
-    function() {
-      openNewWindow(null, null, this.next);
-    },
-    // Wait for Files app to finish loading.
-    function(result) {
-      chrome.test.assertTrue(!!result, 'failed to open new window');
-      appId = result;
-      remoteCall.waitFor('isFileManagerLoaded', appId, true).then(this.next);
-    },
-    // Remount Downloads.
-    function() {
-      sendTestMessage({name: 'mountDownloads'}).then(this.next);
-    },
-    // Add an entry to Downloads.
-    function() {
-      addEntries(['local'], [ENTRIES.newlyAdded], this.next);
-    },
-    // Because Downloads is the default volume it will be automatically
-    // selected, so let's wait for its entry to appear.
-    function() {
-      remoteCall.waitForFiles(appId, [ENTRIES.newlyAdded.getExpectedRow()])
-          .then(this.next);
-    },
-    function() {
-      checkIfNoErrorsOccured(this.next);
-    },
-  ]);
-};
-
-/**
- * Tests Files app opening without errors when there are no volumes at all and
- * then mounting Drive volume which should appear and be able to display its
- * files.
- */
-testcase.fileDisplayWithoutVolumesThenMountDrive = function() {
-  let appId;
-  const driveTreeItem = '#directory-tree [entry-label="Google Drive"]';
-
-  StepsRunner.run([
-    // Unmount all default volumes.
-    function() {
-      sendTestMessage({name: 'unmountAllVolumes'}).then(this.next);
-    },
-    // Open Files app without specifying the initial directory/root.
-    function() {
-      openNewWindow(null, null, this.next);
-    },
-    // Wait for Files app to finish loading.
-    function(result) {
-      chrome.test.assertTrue(!!result, 'failed to open new window');
-      appId = result;
-      remoteCall.waitFor('isFileManagerLoaded', appId, true).then(this.next);
-    },
-    // Remount Drive.
-    function() {
-      sendTestMessage({name: 'mountDrive'}).then(this.next);
-    },
-    // Add an entry to Drive.
-    function() {
-      addEntries(['drive'], [ENTRIES.newlyAdded], this.next);
-    },
-    // Wait "Google Drive" to show up in the directory tree.
-    function() {
-      remoteCall.waitForElement(appId, driveTreeItem).then(this.next);
-    },
-    // Select "My Drive" to display its content.
-    function() {
-      const isDriveSubVolume = true;
-      remoteCall
-          .callRemoteTestUtil(
-              'selectInDirectoryTree', appId, [driveTreeItem, isDriveSubVolume])
-          .then(this.next);
-    },
-    // Wait for "My Drive" files to display in the file list.
-    function() {
-      remoteCall.waitForFiles(appId, [ENTRIES.newlyAdded.getExpectedRow()])
-          .then(this.next);
-    },
-    function() {
-      checkIfNoErrorsOccured(this.next);
-    },
-  ]);
-};
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index c8a9af2..9db8e111 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -1786,7 +1786,6 @@
   TRACE_EVENT1("ui", "RenderTextHarfBuzz::ShapeRuns", "run_count", runs.size());
 
   const Font& primary_font = font_list().GetPrimaryFont();
-  Font best_font(primary_font);
 
   for (const Font& font : font_list().GetFonts()) {
     internal::TextRunHarfBuzz::FontParams test_font_params = font_params;
@@ -1816,33 +1815,40 @@
   }
 #endif
 
-  std::vector<Font> fallback_font_list = GetFallbackFonts(primary_font);
+  std::vector<Font> fallback_font_list;
+  {
+    TRACE_EVENT0("ui", "RenderTextHarfBuzz::GetFallbackFonts");
+    fallback_font_list = GetFallbackFonts(primary_font);
 
 #if defined(OS_WIN)
-  // Append fonts in the fallback list of the preferred fallback font.
-  // TODO(tapted): Investigate whether there's a case that benefits from this on
-  // Mac.
-  if (!preferred_fallback_family.empty()) {
-    std::vector<Font> fallback_fonts = GetFallbackFonts(fallback_font);
-    fallback_font_list.insert(fallback_font_list.end(), fallback_fonts.begin(),
-                              fallback_fonts.end());
-  }
+    // Append fonts in the fallback list of the preferred fallback font.
+    // TODO(tapted): Investigate whether there's a case that benefits from this
+    // on Mac.
+    if (!preferred_fallback_family.empty()) {
+      std::vector<Font> fallback_fonts = GetFallbackFonts(fallback_font);
+      fallback_font_list.insert(fallback_font_list.end(),
+                                fallback_fonts.begin(), fallback_fonts.end());
+    }
 
-  // Add Segoe UI and its associated linked fonts to the fallback font list to
-  // ensure that the fallback list covers the basic cases.
-  // http://crbug.com/467459. On some Windows configurations the default font
-  // could be a raster font like System, which would not give us a reasonable
-  // fallback font list.
-  if (!base::LowerCaseEqualsASCII(primary_font.GetFontName(), "segoe ui") &&
-      !base::LowerCaseEqualsASCII(preferred_fallback_family, "segoe ui")) {
-    std::vector<Font> default_fallback_families =
-        GetFallbackFonts(Font("Segoe UI", 13));
-    fallback_font_list.insert(fallback_font_list.end(),
-        default_fallback_families.begin(), default_fallback_families.end());
-  }
+    // Add Segoe UI and its associated linked fonts to the fallback font list to
+    // ensure that the fallback list covers the basic cases.
+    // http://crbug.com/467459. On some Windows configurations the default font
+    // could be a raster font like System, which would not give us a reasonable
+    // fallback font list.
+    if (!base::LowerCaseEqualsASCII(primary_font.GetFontName(), "segoe ui") &&
+        !base::LowerCaseEqualsASCII(preferred_fallback_family, "segoe ui")) {
+      std::vector<Font> default_fallback_families =
+          GetFallbackFonts(Font("Segoe UI", 13));
+      fallback_font_list.insert(fallback_font_list.end(),
+                                default_fallback_families.begin(),
+                                default_fallback_families.end());
+    }
 #endif
+  }
 
   // Use a set to track the fallback fonts and avoid duplicate entries.
+  TRACE_EVENT1("ui", "RenderTextHarfBuzz::ShapeRunsWithFallbackFonts",
+               "fonts_count", fallback_font_list.size());
   std::set<Font, CaseInsensitiveCompare> fallback_fonts;
 
   // Try shaping with the fallback fonts.
@@ -1865,8 +1871,12 @@
     if (test_font_params.SetFontAndRenderParams(font, fallback_render_params)) {
       ShapeRunsWithFont(text, test_font_params, &runs);
     }
-    if (runs.empty())
+    if (runs.empty()) {
+      TRACE_EVENT_INSTANT1("ui", "RenderTextHarfBuzz::FallbackFont",
+                           TRACE_EVENT_SCOPE_THREAD, "font_name",
+                           TRACE_STR_COPY(font_name.c_str()));
       return;
+    }
   }
 
   for (internal::TextRunHarfBuzz*& run : runs) {
diff --git a/ui/gl/android/surface_texture.cc b/ui/gl/android/surface_texture.cc
index 2ddad6c..a781d502 100644
--- a/ui/gl/android/surface_texture.cc
+++ b/ui/gl/android/surface_texture.cc
@@ -59,8 +59,7 @@
   Java_SurfaceTexturePlatformWrapper_getTransformMatrix(env, j_surface_texture_,
                                                         jmatrix);
 
-  jboolean is_copy;
-  jfloat* elements = env->GetFloatArrayElements(jmatrix.obj(), &is_copy);
+  jfloat* elements = env->GetFloatArrayElements(jmatrix.obj(), nullptr);
   for (int i = 0; i < 16; ++i) {
     mtx[i] = static_cast<float>(elements[i]);
   }
diff --git a/ui/keyboard/BUILD.gn b/ui/keyboard/BUILD.gn
index f478b0b..d8eca86 100644
--- a/ui/keyboard/BUILD.gn
+++ b/ui/keyboard/BUILD.gn
@@ -133,9 +133,6 @@
 build_closure("inputview") {
   sources = inputview_sources
   target = "$target_gen_dir/resources/inputview.js"
-  json_file = "//third_party/google_input_tools/inputview.gypi"
-  sources += [ json_file ]
-  json_sources = "variables.inputview_sources"
   path = rebase_path("//third_party/google_input_tools")
 }
 
diff --git a/ui/login/display_manager.js b/ui/login/display_manager.js
index 53ef9909..1319ba2 100644
--- a/ui/login/display_manager.js
+++ b/ui/login/display_manager.js
@@ -502,7 +502,7 @@
       } else if (name == ACCELERATOR_BOOTSTRAPPING_SLAVE) {
         chrome.send('setOobeBootstrappingSlave');
       } else if (name == ACCELERATOR_DEMO_MODE) {
-          this.showEnableDemoModeDialog_();
+        this.startDemoModeFlow();
       } else if (name == ACCELERATOR_SEND_FEEDBACK) {
         chrome.send('sendFeedback');
       }
@@ -917,7 +917,7 @@
     initializeDemoModeMultiTapListener: function() {
       if (this.displayType_ == DISPLAY_TYPE.OOBE) {
         this.demoModeStartListener_ = new MultiTapDetector(
-          $('outer-container'), 10, this.showEnableDemoModeDialog_.bind(this));
+            $('outer-container'), 10, this.startDemoModeFlow.bind(this));
       }
     },
 
@@ -1013,10 +1013,9 @@
     },
 
     /**
-     * Shows the enable demo mode dialog.
-     * @private
+     * Starts demo mode flow. Shows the enable demo mode dialog if needed.
      */
-    showEnableDemoModeDialog_: function() {
+    startDemoModeFlow: function() {
       var isDemoModeEnabled = loadTimeData.getBoolean('isDemoModeEnabled');
       if (!isDemoModeEnabled) {
         console.warn('Cannot setup demo mode, because it is disabled.');
@@ -1035,13 +1034,18 @@
         this.enableDemoModeDialog_.setCancelLabel(
             loadTimeData.getString('enableDemoModeDialogCancel'));
       }
-
-      this.enableDemoModeDialog_.showWithTitle(
-          loadTimeData.getString('enableDemoModeDialogTitle'),
-          loadTimeData.getString('enableDemoModeDialogText'),
-          function() {  // onOk
-            chrome.send('setupDemoMode');
-          });
+      var configuration = Oobe.getInstance().getOobeConfiguration();
+      if (configuration && configuration.enableDemoMode) {
+        // Bypass showing dialog.
+        chrome.send('setupDemoMode');
+      } else {
+        this.enableDemoModeDialog_.showWithTitle(
+            loadTimeData.getString('enableDemoModeDialogTitle'),
+            loadTimeData.getString('enableDemoModeDialogText'),
+            function() {  // onOk
+              chrome.send('setupDemoMode');
+            });
+      }
     },
 
     /**
diff --git a/ui/shell_dialogs/BUILD.gn b/ui/shell_dialogs/BUILD.gn
index 80b4c176..9044f6d 100644
--- a/ui/shell_dialogs/BUILD.gn
+++ b/ui/shell_dialogs/BUILD.gn
@@ -120,4 +120,8 @@
   if (is_mac) {
     deps += [ ":shell_dialogs_unittests_bundle" ]
   }
+
+  if (is_win) {
+    deps += [ "//ui/strings:ui_strings_grit" ]
+  }
 }
diff --git a/ui/shell_dialogs/run_all_unittests.cc b/ui/shell_dialogs/run_all_unittests.cc
index 2e6f713..f6cd8cfe4 100644
--- a/ui/shell_dialogs/run_all_unittests.cc
+++ b/ui/shell_dialogs/run_all_unittests.cc
@@ -4,17 +4,18 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/path_service.h"
 #include "base/test/launcher/unit_test_launcher.h"
 #include "base/test/test_suite.h"
 #include "build/build_config.h"
+#include "ui/base/material_design/material_design_controller.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_paths.h"
 
 #if defined(OS_MACOSX)
 #include "base/files/file_path.h"
 #include "base/mac/bundle_locations.h"
-#include "base/path_service.h"
 #include "base/test/mock_chrome_application_mac.h"
-#include "ui/base/material_design/material_design_controller.h"
-#include "ui/base/resource/resource_bundle.h"
 #endif
 
 namespace {
@@ -47,17 +48,19 @@
   path = path.Append(
       FILE_PATH_LITERAL("shell_dialogs_unittests_bundle.framework"));
   base::mac::SetOverrideFrameworkBundlePath(path);
+#endif
 
   // Setup resource bundle.
   ui::MaterialDesignController::Initialize();
+  ui::RegisterPathProvider();
   ui::ResourceBundle::InitSharedInstanceWithLocale(
       "en-US", nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
-#endif
 }
 
 void ShellDialogsTestSuite::Shutdown() {
-#if defined(OS_MACOSX)
   ui::ResourceBundle::CleanupSharedInstance();
+
+#if defined(OS_MACOSX)
   base::mac::SetOverrideFrameworkBundle(NULL);
 #endif
   base::TestSuite::Shutdown();
diff --git a/ui/shell_dialogs/select_file_dialog_win_unittest.cc b/ui/shell_dialogs/select_file_dialog_win_unittest.cc
index a01ebe8..ad81ea5 100644
--- a/ui/shell_dialogs/select_file_dialog_win_unittest.cc
+++ b/ui/shell_dialogs/select_file_dialog_win_unittest.cc
@@ -4,10 +4,27 @@
 
 #include <stddef.h>
 
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
+#include "base/memory/scoped_refptr.h"
+#include "base/stl_util.h"
+#include "base/strings/string16.h"
+#include "base/strings/stringprintf.h"
+#include "base/test/scoped_task_environment.h"
+#include "base/threading/platform_thread.h"
+#include "base/win/scoped_com_initializer.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/l10n/l10n_util.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 #include "ui/shell_dialogs/select_file_dialog_win.h"
+#include "ui/shell_dialogs/select_file_policy.h"
+#include "ui/strings/grit/ui_strings.h"
 
 TEST(ShellDialogsWin, AppendExtensionIfNeeded) {
   struct AppendExtensionTestCase {
@@ -47,3 +64,485 @@
   }
 }
 
+namespace {
+
+// The default title for the various dialogs.
+constexpr wchar_t kSelectFolderDefaultTitle[] = L"Browse For Folder";
+constexpr wchar_t kSelectFileDefaultTitle[] = L"Open";
+constexpr wchar_t kSaveFileDefaultTitle[] = L"Save As";
+
+// Returns the title of |window|.
+base::string16 GetWindowTitle(HWND window) {
+  wchar_t buffer[256];
+  UINT count = ::GetWindowText(window, buffer, base::size(buffer));
+  return base::string16(buffer, count);
+}
+
+// Waits for a dialog window whose title is |dialog_title| to show and returns
+// its handle.
+HWND WaitForDialogWindow(const base::string16& dialog_title) {
+  // File dialogs uses this class name.
+  static constexpr wchar_t kDialogClassName[] = L"#32770";
+
+  HWND result = nullptr;
+  while (!result) {
+    result = ::FindWindow(kDialogClassName, dialog_title.c_str());
+    base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(20));
+  }
+
+  // Check the name of the dialog specifically. That's because if multiple file
+  // dialogs are opened in quick successions (e.g. from one test to another),
+  // the ::FindWindow() call above will work for both the previous dialog title
+  // and the current.
+  return GetWindowTitle(result) == dialog_title ? result : nullptr;
+}
+
+struct EnumWindowsParam {
+  // The owner of the dialog. This is used to differentiate the dialog prompt
+  // from the file dialog since they could have the same title.
+  HWND owner;
+
+  // Holds the resulting window.
+  HWND result;
+};
+
+BOOL CALLBACK EnumWindowsCallback(HWND hwnd, LPARAM param) {
+  EnumWindowsParam* enum_param = reinterpret_cast<EnumWindowsParam*>(param);
+
+  // Early continue if the current hwnd is the file dialog.
+  if (hwnd == enum_param->owner)
+    return TRUE;
+
+  // Only consider visible windows.
+  if (!::IsWindowVisible(hwnd))
+    return TRUE;
+
+  // If the window doesn't have |enum_param->owner| as the owner, it can't be
+  // the prompt dialog.
+  if (::GetWindow(hwnd, GW_OWNER) != enum_param->owner)
+    return TRUE;
+
+  enum_param->result = hwnd;
+  return FALSE;
+}
+
+HWND WaitForDialogPrompt(HWND owner) {
+  // The dialog prompt could have the same title as the file dialog. This means
+  // that it would not be possible to make sure the right window is found using
+  // ::FindWindow(). Instead enumerate all top-level windows and return the one
+  // whose owner is the file dialog.
+  EnumWindowsParam param = {owner, nullptr};
+
+  while (!param.result) {
+    ::EnumWindows(&EnumWindowsCallback, reinterpret_cast<LPARAM>(&param));
+    base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(20));
+  }
+
+  return param.result;
+}
+
+// Returns the text of the dialog item in |window| whose id is |dialog_item_id|.
+base::string16 GetDialogItemText(HWND window, int dialog_item_id) {
+  if (!window)
+    return base::string16();
+
+  wchar_t buffer[256];
+  UINT count =
+      ::GetDlgItemText(window, dialog_item_id, buffer, base::size(buffer));
+  return base::string16(buffer, count);
+}
+
+// Sends a command to |window| using PostMessage().
+void SendCommand(HWND window, int id) {
+  ASSERT_TRUE(window);
+
+  // Make sure the window is visible first or the WM_COMMAND may not have any
+  // effect.
+  while (!::IsWindowVisible(window))
+    base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(20));
+
+  ::PostMessage(window, WM_COMMAND, id, 0);
+}
+
+}  // namespace
+
+class SelectFileDialogWinTest : public ::testing::Test,
+                                public ui::SelectFileDialog::Listener {
+ public:
+  SelectFileDialogWinTest()
+      : scoped_task_environment_(
+            base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+  ~SelectFileDialogWinTest() override = default;
+
+  // ui::SelectFileDialog::Listener:
+  void FileSelected(const base::FilePath& path,
+                    int index,
+                    void* params) override {
+    selected_paths_.push_back(path);
+  }
+  void MultiFilesSelected(const std::vector<base::FilePath>& files,
+                          void* params) override {
+    selected_paths_ = files;
+  }
+  void FileSelectionCanceled(void* params) override { was_cancelled_ = true; }
+
+  // Runs the scheduler until no tasks are executing anymore.
+  void RunUntilIdle() { scoped_task_environment_.RunUntilIdle(); }
+
+  const std::vector<base::FilePath>& selected_paths() {
+    return selected_paths_;
+  }
+
+  // Return a fake NativeWindow. This will result in the dialog having no
+  // parent window but the tests will still work.
+  static gfx::NativeWindow native_window() {
+    return reinterpret_cast<gfx::NativeWindow>(0);
+  }
+
+  bool was_cancelled() { return was_cancelled_; }
+
+  // Resets the results so that this instance can be reused as a
+  // SelectFileDialog listener.
+  void ResetResults() {
+    was_cancelled_ = false;
+    selected_paths_.clear();
+  }
+
+ private:
+  base::test::ScopedTaskEnvironment scoped_task_environment_;
+
+  std::vector<base::FilePath> selected_paths_;
+  bool was_cancelled_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(SelectFileDialogWinTest);
+};
+
+TEST_F(SelectFileDialogWinTest, CancelAllDialogs) {
+  // Intentionally not testing SELECT_UPLOAD_FOLDER because the dialog is
+  // customized for that case.
+  struct {
+    ui::SelectFileDialog::Type dialog_type;
+    const wchar_t* dialog_title;
+  } kTestCases[] = {
+      {
+          ui::SelectFileDialog::SELECT_FOLDER, kSelectFolderDefaultTitle,
+      },
+      {
+          ui::SelectFileDialog::SELECT_EXISTING_FOLDER,
+          kSelectFolderDefaultTitle,
+      },
+      {
+          ui::SelectFileDialog::SELECT_SAVEAS_FILE, kSaveFileDefaultTitle,
+      },
+      {
+          ui::SelectFileDialog::SELECT_OPEN_FILE, kSelectFileDefaultTitle,
+      },
+      {
+          ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE, kSelectFileDefaultTitle,
+      }};
+
+  for (size_t i = 0; i < base::size(kTestCases); ++i) {
+    SCOPED_TRACE(base::StringPrintf("i=%zu", i));
+
+    const auto& test_case = kTestCases[i];
+
+    scoped_refptr<ui::SelectFileDialog> dialog =
+        ui::SelectFileDialog::Create(this, nullptr);
+
+    std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> file_type_info;
+    int file_type_info_index = 0;
+
+    // The Save As dialog requires a filetype info.
+    if (test_case.dialog_type == ui::SelectFileDialog::SELECT_SAVEAS_FILE) {
+      file_type_info = std::make_unique<ui::SelectFileDialog::FileTypeInfo>();
+      file_type_info->extensions.push_back({L"html"});
+      file_type_info_index = 1;
+    }
+
+    dialog->SelectFile(test_case.dialog_type, base::string16(),
+                       base::FilePath(), file_type_info.get(),
+                       file_type_info_index, base::string16(), native_window(),
+                       nullptr);
+
+    // Accept the default value.
+    HWND window = WaitForDialogWindow(test_case.dialog_title);
+    SendCommand(window, IDCANCEL);
+
+    RunUntilIdle();
+
+    EXPECT_TRUE(was_cancelled());
+    EXPECT_TRUE(selected_paths().empty());
+
+    ResetResults();
+  }
+}
+
+// Folder selection is implemented using a different API. The only difference
+// is that the title can be set but it doesn't change the title of the dialog,
+// but sets an extra text label at the top of the dialog.
+TEST_F(SelectFileDialogWinTest, UploadFolderCheckStrings) {
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+  base::FilePath default_path = scoped_temp_dir.GetPath();
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_UPLOAD_FOLDER,
+                     base::string16(), default_path, nullptr, 0, L"",
+                     native_window(), nullptr);
+
+  // Wait for the window to open. The title of the dialog is still the default.
+  HWND window = WaitForDialogWindow(kSelectFolderDefaultTitle);
+
+  // But the dialog contains a extra text label that contains a custom title
+  // set by Chrome.
+  EXPECT_EQ(GetDialogItemText(window, 0),
+            l10n_util::GetStringUTF16(IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE));
+  // The OK button is also modified to put emphasis on the fact that the whole
+  // folder will be uploaded.
+  EXPECT_EQ(
+      GetDialogItemText(window, 1),
+      l10n_util::GetStringUTF16(IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
+
+  // Close the dialog.
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  ASSERT_EQ(1u, selected_paths().size());
+  EXPECT_EQ(selected_paths()[0], default_path);
+}
+
+// Specifying the title when opening a dialog to select a file, select multiple
+// files or save a file doesn't do anything.
+TEST_F(SelectFileDialogWinTest, SpecifyTitle) {
+  static constexpr wchar_t kTitle[] = L"FooBar Title";
+
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  // Create an existing file since it is required.
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo.txt");
+  std::string contents = "Hello test!";
+  ASSERT_EQ(base::WriteFile(default_path, contents.c_str(), contents.length()),
+            static_cast<int>(contents.length()));
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, kTitle,
+                     default_path, nullptr, 0, L"", native_window(), nullptr);
+
+  // Wait for the window to open. The title is unchanged. Note that if this
+  // hangs, it possibly is because the title changed.
+  HWND window = WaitForDialogWindow(kSelectFileDefaultTitle);
+
+  // Close the dialog and the result doesn't matter.
+  SendCommand(window, IDCANCEL);
+}
+
+// Tests the selection of one file in both the single and multiple case. It's
+// too much trouble to select a different file in the dialog so the default_path
+// is used to pre-select a file and the OK button is clicked as soon as the
+// dialog opens. This tests the default_path parameter and the single file
+// selection.
+TEST_F(SelectFileDialogWinTest, TestSelectFile) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  // Create an existing file since it is required.
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo.txt");
+  std::string contents = "Hello test!";
+  ASSERT_EQ(base::WriteFile(default_path, contents.c_str(), contents.length()),
+            static_cast<int>(contents.length()));
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(),
+                     default_path, nullptr, 0, L"", native_window(), nullptr);
+
+  // Wait for the window to open
+  HWND window = WaitForDialogWindow(kSelectFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  ASSERT_EQ(1u, selected_paths().size());
+  EXPECT_EQ(selected_paths()[0], default_path);
+}
+
+// Tests that the file extension is automatically added.
+TEST_F(SelectFileDialogWinTest, TestSaveFile) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo");
+
+  ui::SelectFileDialog::FileTypeInfo file_type_info;
+  file_type_info.extensions.push_back({L"html"});
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(),
+                     default_path, &file_type_info, 1, L"", native_window(),
+                     nullptr);
+
+  // Wait for the window to open
+  HWND window = WaitForDialogWindow(kSaveFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  ASSERT_EQ(1u, selected_paths().size());
+  EXPECT_EQ(selected_paths()[0], default_path.AddExtension(L"html"));
+}
+
+// Tests that only specifying a basename as the default path works.
+TEST_F(SelectFileDialogWinTest, OnlyBasename) {
+  base::FilePath default_path(L"foobar.html");
+
+  ui::SelectFileDialog::FileTypeInfo file_type_info;
+  file_type_info.extensions.push_back({L"html"});
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(),
+                     default_path, &file_type_info, 1, L"", native_window(),
+                     nullptr);
+
+  // Wait for the window to open
+  HWND window = WaitForDialogWindow(kSaveFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  ASSERT_EQ(1u, selected_paths().size());
+  EXPECT_EQ(selected_paths()[0].BaseName(), default_path);
+}
+
+TEST_F(SelectFileDialogWinTest, SaveAsDifferentExtension) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo.txt");
+
+  ui::SelectFileDialog::FileTypeInfo file_type_info;
+  file_type_info.extensions.push_back({L"exe"});
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(),
+                     default_path, &file_type_info, 1, L"html", native_window(),
+                     nullptr);
+
+  HWND window = WaitForDialogWindow(kSaveFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  EXPECT_EQ(selected_paths()[0], default_path);
+}
+
+TEST_F(SelectFileDialogWinTest, OpenFileDifferentExtension) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo.txt");
+  std::string contents = "Hello test!";
+  ASSERT_EQ(base::WriteFile(default_path, contents.c_str(), contents.length()),
+            static_cast<int>(contents.length()));
+
+  ui::SelectFileDialog::FileTypeInfo file_type_info;
+  file_type_info.extensions.push_back({L"exe"});
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(),
+                     default_path, &file_type_info, 1, L"html", native_window(),
+                     nullptr);
+
+  HWND window = WaitForDialogWindow(kSelectFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  RunUntilIdle();
+
+  EXPECT_FALSE(was_cancelled());
+  EXPECT_EQ(selected_paths()[0], default_path);
+}
+
+TEST_F(SelectFileDialogWinTest, SelectNonExistingFile) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  base::FilePath default_path =
+      scoped_temp_dir.GetPath().Append(L"does-not-exist.html");
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(),
+                     default_path, nullptr, 0, L"", native_window(), nullptr);
+
+  HWND window = WaitForDialogWindow(kSelectFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  // Since selecting a non-existing file is not supported, a error dialog box
+  // should have appeared.
+  HWND error_box = WaitForDialogPrompt(window);
+  SendCommand(error_box, IDOK);
+
+  // Now actually cancel the file dialog box.
+  SendCommand(window, IDCANCEL);
+
+  RunUntilIdle();
+
+  EXPECT_TRUE(was_cancelled());
+  EXPECT_TRUE(selected_paths().empty());
+}
+
+// Tests that selecting an existing file when saving should prompt the user with
+// a dialog to confirm the overwrite.
+TEST_F(SelectFileDialogWinTest, SaveFileOverwritePrompt) {
+  // Create some file in a test folder.
+  base::ScopedTempDir scoped_temp_dir;
+  ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
+
+  base::FilePath default_path = scoped_temp_dir.GetPath().Append(L"foo.txt");
+  std::string contents = "Hello test!";
+  ASSERT_EQ(base::WriteFile(default_path, contents.c_str(), contents.length()),
+            static_cast<int>(contents.length()));
+
+  ui::SelectFileDialog::FileTypeInfo file_type_info;
+  file_type_info.extensions.push_back({L"txt"});
+
+  scoped_refptr<ui::SelectFileDialog> dialog =
+      ui::SelectFileDialog::Create(this, nullptr);
+  dialog->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(),
+                     default_path, &file_type_info, 1, L"", native_window(),
+                     nullptr);
+
+  HWND window = WaitForDialogWindow(kSaveFileDefaultTitle);
+  SendCommand(window, IDOK);
+
+  // Check that the prompt appears and close it. By default, the "no" option is
+  // selected so sending IDOK cancels the operation.
+  HWND error_box = WaitForDialogPrompt(window);
+  SendCommand(error_box, IDOK);
+
+  // Cancel the dialog.
+  SendCommand(window, IDCANCEL);
+
+  RunUntilIdle();
+
+  EXPECT_TRUE(was_cancelled());
+  EXPECT_TRUE(selected_paths().empty());
+}
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index b7fa6d3..e392ad6 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -207,7 +207,6 @@
     "native_theme_delegate.h",
     "paint_info.h",
     "painter.h",
-    "pointer_watcher.h",
     "rect_based_targeting_utils.h",
     "repeat_controller.h",
     "round_rect_painter.h",
@@ -413,7 +412,6 @@
     "view_targeter_delegate.cc",
     "view_tracker.cc",
     "views_delegate.cc",
-    "views_exports.cc",
     "views_switches.cc",
     "views_touch_selection_controller_factory_mac.cc",
     "widget/drop_helper.cc",
@@ -665,6 +663,7 @@
     deps += [
       "//services/ws/public/mojom",
       "//ui/aura",
+      "//ui/events",
       "//ui/platform_window",
       "//ui/platform_window/platform_window_handler",
       "//ui/touch_selection",
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index b98691b..8c51e0f 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -9,6 +9,7 @@
 #include "ui/events/scoped_target_handler.h"
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/geometry/size_conversions.h"
+#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
 #include "ui/views/animation/ink_drop.h"
 #include "ui/views/animation/ink_drop_highlight.h"
 #include "ui/views/animation/ink_drop_impl.h"
@@ -160,18 +161,29 @@
 }
 
 std::unique_ptr<InkDropRipple> InkDropHostView::CreateInkDropRipple() const {
+  if (GetProperty(kHighlightPathKey)) {
+    return std::make_unique<views::FloodFillInkDropRipple>(
+        size(), gfx::Insets(), GetInkDropCenterBasedOnLastEvent(),
+        GetInkDropBaseColor(), ink_drop_visible_opacity());
+  }
+
   return CreateDefaultInkDropRipple(
       GetMirroredRect(GetContentsBounds()).CenterPoint());
 }
 
 std::unique_ptr<InkDropHighlight> InkDropHostView::CreateInkDropHighlight()
     const {
+  if (GetProperty(kHighlightPathKey)) {
+    return std::make_unique<views::InkDropHighlight>(
+        size(), 0, gfx::RectF(GetMirroredRect(GetLocalBounds())).CenterPoint(),
+        GetInkDropBaseColor());
+  }
   return CreateDefaultInkDropHighlight(
       gfx::RectF(GetMirroredRect(GetContentsBounds())).CenterPoint());
 }
 
 std::unique_ptr<views::InkDropMask> InkDropHostView::CreateInkDropMask() const {
-  if (gfx::Path* highlight_path = GetProperty(kHighlightPathKey))
+  if (SkPath* highlight_path = GetProperty(kHighlightPathKey))
     return std::make_unique<views::PathInkDropMask>(size(), *highlight_path);
 
   return nullptr;
diff --git a/ui/views/animation/ink_drop_mask.cc b/ui/views/animation/ink_drop_mask.cc
index 63c93c6..282fbd3 100644
--- a/ui/views/animation/ink_drop_mask.cc
+++ b/ui/views/animation/ink_drop_mask.cc
@@ -78,7 +78,7 @@
 // PathInkDropMask
 
 PathInkDropMask::PathInkDropMask(const gfx::Size& layer_size,
-                                 const gfx::Path& path)
+                                 const SkPath& path)
     : InkDropMask(layer_size), path_(path) {}
 
 void PathInkDropMask::OnPaintLayer(const ui::PaintContext& context) {
diff --git a/ui/views/animation/ink_drop_mask.h b/ui/views/animation/ink_drop_mask.h
index 1a3fa87..6aaf53f 100644
--- a/ui/views/animation/ink_drop_mask.h
+++ b/ui/views/animation/ink_drop_mask.h
@@ -80,13 +80,13 @@
 // An ink-drop mask that paints a specified path.
 class VIEWS_EXPORT PathInkDropMask : public InkDropMask {
  public:
-  PathInkDropMask(const gfx::Size& layer_size, const gfx::Path& path);
+  PathInkDropMask(const gfx::Size& layer_size, const SkPath& path);
 
  private:
   // InkDropMask:
   void OnPaintLayer(const ui::PaintContext& context) override;
 
-  gfx::Path path_;
+  SkPath path_;
 
   DISALLOW_COPY_AND_ASSIGN(PathInkDropMask);
 };
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 02aa4a0..3ac52b0 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -134,7 +134,7 @@
   close_button->SizeToPreferredSize();
 
   // Let the close button use a circular inkdrop shape.
-  auto highlight_path = std::make_unique<gfx::Path>();
+  auto highlight_path = std::make_unique<SkPath>();
   highlight_path->addOval(gfx::RectToSkRect(gfx::Rect(close_button->size())));
   close_button->SetProperty(kHighlightPathKey, highlight_path.release());
 
diff --git a/ui/views/cocoa/bridged_native_widget_host_impl.h b/ui/views/cocoa/bridged_native_widget_host_impl.h
index 5451da8..d1ca353 100644
--- a/ui/views/cocoa/bridged_native_widget_host_impl.h
+++ b/ui/views/cocoa/bridged_native_widget_host_impl.h
@@ -212,9 +212,9 @@
   // views_bridge_mac::mojom::BridgedNativeWidgetHost:
   void OnVisibilityChanged(bool visible) override;
   void OnWindowNativeThemeChanged() override;
-  void SetViewSize(const gfx::Size& new_size) override;
+  void OnViewSizeChanged(const gfx::Size& new_size) override;
   void SetKeyboardAccessible(bool enabled) override;
-  void SetIsFirstResponder(bool is_first_responder) override;
+  void OnIsFirstResponderChanged(bool is_first_responder) override;
   void OnMouseCaptureActiveChanged(bool capture_is_active) override;
   void OnScrollEvent(std::unique_ptr<ui::Event> event) override;
   void OnMouseEvent(std::unique_ptr<ui::Event> event) override;
diff --git a/ui/views/cocoa/bridged_native_widget_host_impl.mm b/ui/views/cocoa/bridged_native_widget_host_impl.mm
index fca63e8..65ad2424 100644
--- a/ui/views/cocoa/bridged_native_widget_host_impl.mm
+++ b/ui/views/cocoa/bridged_native_widget_host_impl.mm
@@ -138,11 +138,17 @@
   bridge_factory_host_ = bridge_factory_host;
   bridge_factory_host_->AddObserver(this);
 
-  // Create the local window with the same parameters as will be used in the
-  // other process.
-  local_window_ =
-      BridgedNativeWidgetImpl::CreateNSWindow(window_create_params.get());
-  [local_window_ setBridgedNativeWidgetId:widget_id_];
+  // Create a local invisible window that will be used as the gfx::NativeWindow
+  // handle to track this window in this process.
+  {
+    auto local_window_create_params =
+        views_bridge_mac::mojom::CreateWindowParams::New();
+    local_window_create_params->style_mask = NSBorderlessWindowMask;
+    local_window_ = BridgedNativeWidgetImpl::CreateNSWindow(
+        local_window_create_params.get());
+    [local_window_ setBridgedNativeWidgetId:widget_id_];
+    [local_window_ setAlphaValue:0.0];
+  }
 
   // Initialize |bridge_ptr_| to point to a bridge created by |factory|.
   views_bridge_mac::mojom::BridgedNativeWidgetHostAssociatedPtr host_ptr;
@@ -544,7 +550,7 @@
   return true;
 }
 
-void BridgedNativeWidgetHostImpl::SetViewSize(const gfx::Size& new_size) {
+void BridgedNativeWidgetHostImpl::OnViewSizeChanged(const gfx::Size& new_size) {
   root_view_->SetSize(new_size);
 }
 
@@ -555,11 +561,17 @@
     focus_manager->SetKeyboardAccessible(enabled);
 }
 
-void BridgedNativeWidgetHostImpl::SetIsFirstResponder(bool is_first_responder) {
-  if (is_first_responder)
+void BridgedNativeWidgetHostImpl::OnIsFirstResponderChanged(
+    bool is_first_responder) {
+  if (is_first_responder) {
     root_view_->GetWidget()->GetFocusManager()->RestoreFocusedView();
-  else
-    root_view_->GetWidget()->GetFocusManager()->StoreFocusedView(true);
+  } else {
+    // Do not call ClearNativeFocus because that will re-make the
+    // BridgedNativeWidget first responder (and this is called to indicate that
+    // it is no longer first responder).
+    root_view_->GetWidget()->GetFocusManager()->StoreFocusedView(
+        false /* clear_native_focus */);
+  }
 }
 
 void BridgedNativeWidgetHostImpl::OnMouseCaptureActiveChanged(bool is_active) {
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 60907bd..3bc3d35 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -28,6 +28,7 @@
 #include "ui/views/layout/layout_provider.h"
 #include "ui/views/painter.h"
 #include "ui/views/style/platform_style.h"
+#include "ui/views/view_properties.h"
 #include "ui/views/window/dialog_delegate.h"
 
 namespace views {
@@ -386,6 +387,10 @@
 }
 
 std::unique_ptr<views::InkDropRipple> LabelButton::CreateInkDropRipple() const {
+  // Views that use a highlight path use the base style and do not need the
+  // overrides in this file.
+  if (GetProperty(views::kHighlightPathKey))
+    return InkDropHostView::CreateInkDropRipple();
   return ShouldUseFloodFillInkDrop()
              ? std::make_unique<views::FloodFillInkDropRipple>(
                    size(), GetInkDropCenterBasedOnLastEvent(),
@@ -396,6 +401,10 @@
 
 std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
     const {
+  // Views that use a highlight path use the base style and do not need the
+  // overrides in this file.
+  if (GetProperty(views::kHighlightPathKey))
+    return InkDropHostView::CreateInkDropHighlight();
   return ShouldUseFloodFillInkDrop()
              ? std::make_unique<views::InkDropHighlight>(
                    size(), ink_drop_small_corner_radius(),
diff --git a/ui/views/controls/focus_ring.cc b/ui/views/controls/focus_ring.cc
index bc95975..f5fbb33e 100644
--- a/ui/views/controls/focus_ring.cc
+++ b/ui/views/controls/focus_ring.cc
@@ -81,7 +81,7 @@
 
   SkPath path = path_;
   if (path.isEmpty()) {
-    gfx::Path* highlight_path = parent()->GetProperty(kHighlightPathKey);
+    SkPath* highlight_path = parent()->GetProperty(kHighlightPathKey);
     if (highlight_path)
       path = *highlight_path;
   }
diff --git a/ui/views/controls/native/native_view_host_mac.mm b/ui/views/controls/native/native_view_host_mac.mm
index d98e6e1..1c5f76f1 100644
--- a/ui/views/controls/native/native_view_host_mac.mm
+++ b/ui/views/controls/native/native_view_host_mac.mm
@@ -68,7 +68,10 @@
   auto* bridge_host = GetBridgedNativeWidgetHost();
   if (bridge_host && bridge_host->bridge_factory_host())
     return bridge_host->bridge_factory_host()->GetHostId();
-  return 0;
+  // This matches content::NSViewBridgeFactoryHost::kLocalDirectHostId,
+  // indicating that this is a local window.
+  constexpr uint64_t kLocalDirectHostId = -1;
+  return kLocalDirectHostId;
 }
 
 uint64_t NativeViewHostMac::GetNSViewId() const {
diff --git a/ui/views/mus/BUILD.gn b/ui/views/mus/BUILD.gn
index 883a69b..899adc7 100644
--- a/ui/views/mus/BUILD.gn
+++ b/ui/views/mus/BUILD.gn
@@ -30,8 +30,6 @@
     "mus_property_mirror.h",
     "mus_views_delegate.cc",
     "mus_views_delegate.h",
-    "pointer_watcher_event_router.cc",
-    "pointer_watcher_event_router.h",
     "screen_mus.cc",
     "screen_mus.h",
     "screen_mus_delegate.h",
@@ -156,7 +154,6 @@
     "ax_remote_host_unittest.cc",
     "ax_tree_source_mus_unittest.cc",
     "desktop_window_tree_host_mus_unittest.cc",
-    "pointer_watcher_event_router_unittest.cc",
     "run_all_unittests_mus.cc",
     "screen_mus_unittest.cc",
   ]
diff --git a/ui/views/mus/ax_remote_host.cc b/ui/views/mus/ax_remote_host.cc
index 01511da2..e2fcba76 100644
--- a/ui/views/mus/ax_remote_host.cc
+++ b/ui/views/mus/ax_remote_host.cc
@@ -99,14 +99,11 @@
 }
 
 void AXRemoteHost::HandleEvent(View* view, ax::mojom::Event event_type) {
+  CHECK(view);
+
   if (!enabled_)
     return;
 
-  if (!view) {
-    SendEvent(tree_source_->GetRoot(), event_type);
-    return;
-  }
-
   // Can return null for views without a widget.
   AXAuraObjWrapper* aura_obj = AXAuraObjCache::GetInstance()->GetOrCreate(view);
   if (!aura_obj)
diff --git a/ui/views/mus/mus_client.cc b/ui/views/mus/mus_client.cc
index 4bed240..105f9f5 100644
--- a/ui/views/mus/mus_client.cc
+++ b/ui/views/mus/mus_client.cc
@@ -28,7 +28,6 @@
 #include "ui/views/mus/ax_remote_host.h"
 #include "ui/views/mus/desktop_window_tree_host_mus.h"
 #include "ui/views/mus/mus_property_mirror.h"
-#include "ui/views/mus/pointer_watcher_event_router.h"
 #include "ui/views/mus/screen_mus.h"
 #include "ui/views/views_delegate.h"
 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
@@ -109,9 +108,6 @@
     window_tree_client_ = params.window_tree_client;
   }
 
-  pointer_watcher_event_router_ =
-      std::make_unique<PointerWatcherEventRouter>(window_tree_client_);
-
   if (connector && !params.running_in_ws_process) {
     input_device_client_ = std::make_unique<ws::InputDeviceClient>();
     ws::mojom::InputDeviceServerPtr input_device_server;
@@ -316,14 +312,12 @@
 
 void MusClient::OnCaptureClientSet(
     aura::client::CaptureClient* capture_client) {
-  pointer_watcher_event_router_->AttachToCaptureClient(capture_client);
   window_tree_client_->capture_synchronizer()->AttachToCaptureClient(
       capture_client);
 }
 
 void MusClient::OnCaptureClientUnset(
     aura::client::CaptureClient* capture_client) {
-  pointer_watcher_event_router_->DetachFromCaptureClient(capture_client);
   window_tree_client_->capture_synchronizer()->DetachFromCaptureClient(
       capture_client);
 }
@@ -376,13 +370,6 @@
       ->ServerDestroyedWindow();
 }
 
-void MusClient::OnPointerEventObserved(const ui::PointerEvent& event,
-                                       const gfx::Point& location_in_screen,
-                                       aura::Window* target) {
-  pointer_watcher_event_router_->OnPointerEventObserved(
-      event, location_in_screen, target);
-}
-
 void MusClient::OnDisplaysChanged(
     std::vector<ws::mojom::WsDisplayPtr> ws_displays,
     int64_t primary_display_id,
diff --git a/ui/views/mus/mus_client.h b/ui/views/mus/mus_client.h
index 0cd4f65..3e8836ab 100644
--- a/ui/views/mus/mus_client.h
+++ b/ui/views/mus/mus_client.h
@@ -51,7 +51,6 @@
 class DesktopNativeWidgetAura;
 class MusClientObserver;
 class MusPropertyMirror;
-class PointerWatcherEventRouter;
 class ScreenMus;
 
 namespace internal {
@@ -123,10 +122,6 @@
 
   aura::WindowTreeClient* window_tree_client() { return window_tree_client_; }
 
-  PointerWatcherEventRouter* pointer_watcher_event_router() {
-    return pointer_watcher_event_router_.get();
-  }
-
   AXRemoteHost* ax_remote_host() { return ax_remote_host_.get(); }
 
   // Creates DesktopNativeWidgetAura with DesktopWindowTreeHostMus. This is
@@ -136,12 +131,8 @@
                                    internal::NativeWidgetDelegate* delegate);
   void OnWidgetInitDone(Widget* widget);
 
-  // Called when the capture client has been set for a window to notify
-  // PointerWatcherEventRouter and CaptureSynchronizer.
+  // Called when the capture client has been set or unset for a window.
   void OnCaptureClientSet(aura::client::CaptureClient* capture_client);
-
-  // Called when the capture client will be unset for a window to notify
-  // PointerWatcherEventRouter and CaptureSynchronizer.
   void OnCaptureClientUnset(aura::client::CaptureClient* capture_client);
 
   void AddObserver(MusClientObserver* observer);
@@ -172,9 +163,6 @@
       std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) override;
   void OnLostConnection(aura::WindowTreeClient* client) override;
   void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override;
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              aura::Window* target) override;
   aura::PropertyConverter* GetPropertyConverter() override;
   void OnDisplaysChanged(std::vector<ws::mojom::WsDisplayPtr> ws_displays,
                          int64_t primary_display_id,
@@ -210,8 +198,6 @@
   // Never null.
   aura::WindowTreeClient* window_tree_client_;
 
-  std::unique_ptr<PointerWatcherEventRouter> pointer_watcher_event_router_;
-
   // Gives services transparent remote access the InputDeviceManager.
   std::unique_ptr<ws::InputDeviceClient> input_device_client_;
 
diff --git a/ui/views/mus/mus_views_delegate.cc b/ui/views/mus/mus_views_delegate.cc
index 6456b0d..e383ac00 100644
--- a/ui/views/mus/mus_views_delegate.cc
+++ b/ui/views/mus/mus_views_delegate.cc
@@ -6,7 +6,6 @@
 
 #include "ui/views/mus/ax_remote_host.h"
 #include "ui/views/mus/mus_client.h"
-#include "ui/views/mus/pointer_watcher_event_router.h"
 
 namespace views {
 
@@ -20,19 +19,4 @@
     MusClient::Get()->ax_remote_host()->HandleEvent(view, event_type);
 }
 
-void MusViewsDelegate::AddPointerWatcher(PointerWatcher* pointer_watcher,
-                                         bool wants_moves) {
-  MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher(
-      pointer_watcher, wants_moves);
-}
-
-void MusViewsDelegate::RemovePointerWatcher(PointerWatcher* pointer_watcher) {
-  MusClient::Get()->pointer_watcher_event_router()->RemovePointerWatcher(
-      pointer_watcher);
-}
-
-bool MusViewsDelegate::IsPointerWatcherSupported() const {
-  return true;
-}
-
 }  // namespace views
diff --git a/ui/views/mus/mus_views_delegate.h b/ui/views/mus/mus_views_delegate.h
index 6346df2..b7d55503 100644
--- a/ui/views/mus/mus_views_delegate.h
+++ b/ui/views/mus/mus_views_delegate.h
@@ -20,10 +20,6 @@
   // ViewsDelegate:
   void NotifyAccessibilityEvent(View* view,
                                 ax::mojom::Event event_type) override;
-  void AddPointerWatcher(PointerWatcher* pointer_watcher,
-                         bool wants_moves) override;
-  void RemovePointerWatcher(PointerWatcher* pointer_watcher) override;
-  bool IsPointerWatcherSupported() const override;
 
  private:
   LayoutProvider layout_provider_;
diff --git a/ui/views/mus/pointer_watcher_event_router.cc b/ui/views/mus/pointer_watcher_event_router.cc
deleted file mode 100644
index 07a1a7e..0000000
--- a/ui/views/mus/pointer_watcher_event_router.cc
+++ /dev/null
@@ -1,175 +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 "ui/views/mus/pointer_watcher_event_router.h"
-
-#include "ui/aura/client/capture_client.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/mus/window_tree_client.h"
-#include "ui/aura/window.h"
-#include "ui/display/screen.h"
-#include "ui/events/base_event_utils.h"
-#include "ui/events/event.h"
-#include "ui/views/pointer_watcher.h"
-#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
-
-namespace views {
-namespace {
-
-bool HasPointerWatcher(
-    base::ObserverList<views::PointerWatcher, true>::Unchecked* observer_list) {
-  return observer_list->begin() != observer_list->end();
-}
-
-}  // namespace
-
-PointerWatcherEventRouter::PointerWatcherEventRouter(
-    aura::WindowTreeClient* window_tree_client)
-    : window_tree_client_(window_tree_client) {
-  window_tree_client->AddObserver(this);
-}
-
-PointerWatcherEventRouter::~PointerWatcherEventRouter() {
-  if (window_tree_client_)
-    window_tree_client_->RemoveObserver(this);
-}
-
-void PointerWatcherEventRouter::AddPointerWatcher(PointerWatcher* watcher,
-                                                  bool wants_moves) {
-  // Pointer watchers cannot be added multiple times.
-  DCHECK(!move_watchers_.HasObserver(watcher));
-  DCHECK(!non_move_watchers_.HasObserver(watcher));
-  if (wants_moves) {
-    move_watchers_.AddObserver(watcher);
-    if (event_types_ != EventTypes::MOVE_EVENTS) {
-      event_types_ = EventTypes::MOVE_EVENTS;
-      const bool wants_moves = true;
-      window_tree_client_->StartPointerWatcher(wants_moves);
-    }
-  } else {
-    non_move_watchers_.AddObserver(watcher);
-    if (event_types_ == EventTypes::NONE) {
-      event_types_ = EventTypes::NON_MOVE_EVENTS;
-      const bool wants_moves = false;
-      window_tree_client_->StartPointerWatcher(wants_moves);
-    }
-  }
-}
-
-void PointerWatcherEventRouter::RemovePointerWatcher(PointerWatcher* watcher) {
-  if (non_move_watchers_.HasObserver(watcher)) {
-    non_move_watchers_.RemoveObserver(watcher);
-  } else {
-    DCHECK(move_watchers_.HasObserver(watcher));
-    move_watchers_.RemoveObserver(watcher);
-  }
-  const EventTypes types = DetermineEventTypes();
-  if (types == event_types_)
-    return;
-
-  event_types_ = types;
-  switch (types) {
-    case EventTypes::NONE:
-      window_tree_client_->StopPointerWatcher();
-      break;
-    case EventTypes::NON_MOVE_EVENTS:
-      window_tree_client_->StartPointerWatcher(false);
-      break;
-    case EventTypes::MOVE_EVENTS:
-      // It isn't possible to remove an observer and transition to wanting move
-      // events. This could only happen if there is a bug in the add logic.
-      NOTREACHED();
-      break;
-  }
-}
-
-void PointerWatcherEventRouter::OnPointerEventObserved(
-    const ui::PointerEvent& event,
-    const gfx::Point& location_in_screen,
-    aura::Window* target) {
-  Widget* target_widget = nullptr;
-  ui::PointerEvent updated_event(event);
-  if (target) {
-    aura::Window* window = target;
-    while (window && !target_widget) {
-      target_widget = Widget::GetWidgetForNativeView(window);
-      if (!target_widget) {
-        // Widget::GetWidgetForNativeView() uses NativeWidgetAura. Views with
-        // aura-mus may also create DesktopNativeWidgetAura.
-        DesktopNativeWidgetAura* desktop_native_widget_aura =
-            DesktopNativeWidgetAura::ForWindow(target);
-        if (desktop_native_widget_aura) {
-          target_widget = static_cast<internal::NativeWidgetPrivate*>(
-                              desktop_native_widget_aura)
-                              ->GetWidget();
-        }
-      }
-      window = window->parent();
-    }
-    if (target_widget) {
-      gfx::Point widget_relative_location(event.location());
-      aura::Window::ConvertPointToTarget(target, target_widget->GetNativeView(),
-                                         &widget_relative_location);
-      updated_event.set_location(widget_relative_location);
-    }
-  }
-
-  for (PointerWatcher& observer : move_watchers_) {
-    observer.OnPointerEventObserved(
-        updated_event, location_in_screen,
-        target_widget ? target_widget->GetNativeWindow() : target);
-  }
-  if (event.type() != ui::ET_POINTER_MOVED) {
-    for (PointerWatcher& observer : non_move_watchers_) {
-      observer.OnPointerEventObserved(
-          updated_event, location_in_screen,
-          target_widget ? target_widget->GetNativeWindow() : target);
-    }
-  }
-}
-
-void PointerWatcherEventRouter::AttachToCaptureClient(
-    aura::client::CaptureClient* capture_client) {
-  capture_client->AddObserver(this);
-}
-
-void PointerWatcherEventRouter::DetachFromCaptureClient(
-    aura::client::CaptureClient* capture_client) {
-  capture_client->RemoveObserver(this);
-}
-
-PointerWatcherEventRouter::EventTypes
-PointerWatcherEventRouter::DetermineEventTypes() {
-  if (HasPointerWatcher(&move_watchers_))
-    return EventTypes::MOVE_EVENTS;
-
-  if (HasPointerWatcher(&non_move_watchers_))
-    return EventTypes::NON_MOVE_EVENTS;
-
-  return EventTypes::NONE;
-}
-
-void PointerWatcherEventRouter::OnCaptureChanged(aura::Window* lost_capture,
-                                                 aura::Window* gained_capture) {
-  const ui::MouseEvent mouse_event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(),
-                                   gfx::Point(), ui::EventTimeForNow(), 0, 0);
-  const ui::PointerEvent event(mouse_event);
-  gfx::Point location_in_screen =
-      display::Screen::GetScreen()->GetCursorScreenPoint();
-  for (PointerWatcher& observer : move_watchers_)
-    observer.OnPointerEventObserved(event, location_in_screen, nullptr);
-  for (PointerWatcher& observer : non_move_watchers_)
-    observer.OnPointerEventObserved(event, location_in_screen, nullptr);
-}
-
-void PointerWatcherEventRouter::OnWillDestroyClient(
-    aura::WindowTreeClient* client) {
-  // We expect that all observers have been removed by this time.
-  DCHECK_EQ(event_types_, EventTypes::NONE);
-  DCHECK_EQ(client, window_tree_client_);
-  window_tree_client_->RemoveObserver(this);
-  window_tree_client_ = nullptr;
-}
-
-}  // namespace views
diff --git a/ui/views/mus/pointer_watcher_event_router.h b/ui/views/mus/pointer_watcher_event_router.h
deleted file mode 100644
index 48cfa969..0000000
--- a/ui/views/mus/pointer_watcher_event_router.h
+++ /dev/null
@@ -1,101 +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 UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
-#define UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
-
-#include <stdint.h>
-
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "ui/aura/client/capture_client_observer.h"
-#include "ui/aura/mus/window_tree_client_observer.h"
-#include "ui/views/mus/mus_export.h"
-
-namespace aura {
-class WindowTreeClient;
-
-namespace client {
-class CaptureClient;
-}
-}
-
-namespace gfx {
-class Point;
-}
-
-namespace ui {
-class PointerEvent;
-}
-
-namespace views {
-
-class PointerWatcher;
-class PointerWatcherEventRouterTest;
-
-// PointerWatcherEventRouter is responsible for maintaining the list of
-// PointerWatchers and notifying appropriately. It is expected the owner of
-// PointerWatcherEventRouter is a WindowTreeClientDelegate and calls
-// OnPointerEventObserved().
-class VIEWS_MUS_EXPORT PointerWatcherEventRouter
-    : public aura::WindowTreeClientObserver,
-      public aura::client::CaptureClientObserver {
- public:
-  // Public solely for tests.
-  enum EventTypes {
-    // No PointerWatchers have been added.
-    NONE,
-
-    // Used when the only PointerWatchers added do not want moves.
-    NON_MOVE_EVENTS,
-
-    // Used when at least one PointerWatcher has been added that wants moves.
-    MOVE_EVENTS,
-  };
-
-  explicit PointerWatcherEventRouter(
-      aura::WindowTreeClient* window_tree_client);
-  ~PointerWatcherEventRouter() override;
-
-  void AddPointerWatcher(PointerWatcher* watcher, bool wants_moves);
-  void RemovePointerWatcher(PointerWatcher* watcher);
-
-  // Called by WindowTreeClientDelegate to notify PointerWatchers appropriately.
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              aura::Window* target);
-
-  // Called when the |capture_client| has been set or will be unset.
-  void AttachToCaptureClient(aura::client::CaptureClient* capture_client);
-  void DetachFromCaptureClient(aura::client::CaptureClient* capture_client);
-
- private:
-  friend class PointerWatcherEventRouterTest;
-
-  // Determines EventTypes based on the number and type of PointerWatchers.
-  EventTypes DetermineEventTypes();
-
-  // aura::WindowTreeClientObserver:
-  void OnWillDestroyClient(aura::WindowTreeClient* client) override;
-
-  // aura::client::CaptureClientObserver:
-  void OnCaptureChanged(aura::Window* lost_capture,
-                        aura::Window* gained_capture) override;
-
-  aura::WindowTreeClient* window_tree_client_;
-  // The true parameter to ObserverList indicates the list must be empty on
-  // destruction. Two sets of observers are maintained, one for observers not
-  // needing moves |non_move_watchers_| and |move_watchers_| for those
-  // observers wanting moves too.
-  base::ObserverList<views::PointerWatcher, true>::Unchecked non_move_watchers_;
-  base::ObserverList<views::PointerWatcher, true>::Unchecked move_watchers_;
-
-  EventTypes event_types_ = EventTypes::NONE;
-
-  DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouter);
-};
-
-}  // namespace views
-
-#endif  // UI_VIEWS_MUS_POINTER_WATCHER_EVENT_ROUTER_H_
diff --git a/ui/views/mus/pointer_watcher_event_router_unittest.cc b/ui/views/mus/pointer_watcher_event_router_unittest.cc
deleted file mode 100644
index 0f6143e..0000000
--- a/ui/views/mus/pointer_watcher_event_router_unittest.cc
+++ /dev/null
@@ -1,240 +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 "ui/views/mus/pointer_watcher_event_router.h"
-
-#include <memory>
-
-#include "base/test/scoped_task_environment.h"
-#include "ui/aura/test/mus/window_tree_client_private.h"
-#include "ui/events/event.h"
-#include "ui/views/mus/mus_client.h"
-#include "ui/views/pointer_watcher.h"
-#include "ui/views/test/views_test_base.h"
-
-namespace views {
-namespace {
-
-class TestPointerWatcher : public PointerWatcher {
- public:
-  TestPointerWatcher() {}
-  ~TestPointerWatcher() override {}
-
-  ui::PointerEvent* last_event_observed() { return last_event_observed_.get(); }
-  gfx::Point last_location_in_screen() { return last_location_in_screen_; }
-
-  void Reset() {
-    last_event_observed_.reset();
-    last_location_in_screen_ = gfx::Point();
-  }
-
-  // PointerWatcher:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              gfx::NativeView target) override {
-    last_event_observed_ = std::make_unique<ui::PointerEvent>(event);
-    last_location_in_screen_ = location_in_screen;
-  }
-
- private:
-  std::unique_ptr<ui::PointerEvent> last_event_observed_;
-  gfx::Point last_location_in_screen_;
-
-  DISALLOW_COPY_AND_ASSIGN(TestPointerWatcher);
-};
-
-}  // namespace
-
-class PointerWatcherEventRouterTest : public views::ViewsTestBase {
- public:
-  PointerWatcherEventRouterTest() = default;
-  ~PointerWatcherEventRouterTest() override = default;
-
-  void OnPointerEventObserved(const ui::PointerEvent& event) {
-    MusClient::Get()->pointer_watcher_event_router()->OnPointerEventObserved(
-        event, event.root_location(), nullptr);
-  }
-
-  PointerWatcherEventRouter::EventTypes event_types() const {
-    return MusClient::Get()->pointer_watcher_event_router()->event_types_;
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(PointerWatcherEventRouterTest);
-};
-
-TEST_F(PointerWatcherEventRouterTest, EventTypes) {
-  TestPointerWatcher pointer_watcher1, pointer_watcher2;
-  PointerWatcherEventRouter* pointer_watcher_event_router =
-      MusClient::Get()->pointer_watcher_event_router();
-  aura::WindowTreeClientPrivate test_api(
-      MusClient::Get()->window_tree_client());
-  EXPECT_FALSE(test_api.HasPointerWatcher());
-
-  // Start with no moves.
-  pointer_watcher_event_router->AddPointerWatcher(&pointer_watcher1, false);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::NON_MOVE_EVENTS,
-            event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Add moves.
-  pointer_watcher_event_router->AddPointerWatcher(&pointer_watcher2, true);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::MOVE_EVENTS, event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Remove no-moves.
-  pointer_watcher_event_router->RemovePointerWatcher(&pointer_watcher1);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::MOVE_EVENTS, event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Remove moves.
-  pointer_watcher_event_router->RemovePointerWatcher(&pointer_watcher2);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::NONE, event_types());
-  EXPECT_FALSE(test_api.HasPointerWatcher());
-
-  // Add moves.
-  pointer_watcher_event_router->AddPointerWatcher(&pointer_watcher2, true);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::MOVE_EVENTS, event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Add no moves.
-  pointer_watcher_event_router->AddPointerWatcher(&pointer_watcher1, false);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::MOVE_EVENTS, event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Remove moves.
-  pointer_watcher_event_router->RemovePointerWatcher(&pointer_watcher2);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::NON_MOVE_EVENTS,
-            event_types());
-  EXPECT_TRUE(test_api.HasPointerWatcher());
-
-  // Remove no-moves.
-  pointer_watcher_event_router->RemovePointerWatcher(&pointer_watcher1);
-  EXPECT_EQ(PointerWatcherEventRouter::EventTypes::NONE, event_types());
-  EXPECT_FALSE(test_api.HasPointerWatcher());
-}
-
-TEST_F(PointerWatcherEventRouterTest, PointerWatcherNoMove) {
-  ASSERT_TRUE(MusClient::Get());
-  PointerWatcherEventRouter* pointer_watcher_event_router =
-      MusClient::Get()->pointer_watcher_event_router();
-  ASSERT_TRUE(pointer_watcher_event_router);
-
-  ui::PointerEvent pointer_event_down(
-      ui::ET_POINTER_DOWN, gfx::Point(), gfx::Point(), ui::EF_NONE, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks());
-  ui::PointerEvent pointer_event_up(
-      ui::ET_POINTER_UP, gfx::Point(), gfx::Point(), ui::EF_NONE, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE, 1),
-      base::TimeTicks());
-  ui::PointerEvent pointer_event_wheel(
-      ui::ET_POINTER_WHEEL_CHANGED, gfx::Point(), gfx::Point(), ui::EF_NONE, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE, 1),
-      base::TimeTicks());
-  ui::PointerEvent pointer_event_capture(
-      ui::ET_POINTER_CAPTURE_CHANGED, gfx::Point(), gfx::Point(), ui::EF_NONE,
-      0, ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE, 1),
-      base::TimeTicks());
-
-  // PointerWatchers receive pointer down events.
-  TestPointerWatcher watcher1;
-  pointer_watcher_event_router->AddPointerWatcher(&watcher1, false);
-  OnPointerEventObserved(pointer_event_down);
-  EXPECT_EQ(ui::ET_POINTER_DOWN, watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // PointerWatchers receive pointer up events.
-  OnPointerEventObserved(pointer_event_up);
-  EXPECT_EQ(ui::ET_POINTER_UP, watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // PointerWatchers receive pointer wheel changed events.
-  OnPointerEventObserved(pointer_event_wheel);
-  EXPECT_EQ(ui::ET_POINTER_WHEEL_CHANGED,
-            watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // PointerWatchers receive pointer capture changed events.
-  OnPointerEventObserved(pointer_event_capture);
-  EXPECT_EQ(ui::ET_POINTER_CAPTURE_CHANGED,
-            watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // Two PointerWatchers can both receive a single observed event.
-  TestPointerWatcher watcher2;
-  pointer_watcher_event_router->AddPointerWatcher(&watcher2, false);
-  OnPointerEventObserved(pointer_event_down);
-  EXPECT_EQ(ui::ET_POINTER_DOWN, watcher1.last_event_observed()->type());
-  EXPECT_EQ(ui::ET_POINTER_DOWN, watcher2.last_event_observed()->type());
-  watcher1.Reset();
-  watcher2.Reset();
-
-  // Removing the first PointerWatcher stops sending events to it.
-  pointer_watcher_event_router->RemovePointerWatcher(&watcher1);
-  OnPointerEventObserved(pointer_event_down);
-  EXPECT_FALSE(watcher1.last_event_observed());
-  EXPECT_EQ(ui::ET_POINTER_DOWN, watcher2.last_event_observed()->type());
-  watcher1.Reset();
-  watcher2.Reset();
-
-  // Removing the last PointerWatcher stops sending events to it.
-  pointer_watcher_event_router->RemovePointerWatcher(&watcher2);
-  OnPointerEventObserved(pointer_event_down);
-  EXPECT_FALSE(watcher1.last_event_observed());
-  EXPECT_FALSE(watcher2.last_event_observed());
-}
-
-TEST_F(PointerWatcherEventRouterTest, PointerWatcherMove) {
-  ASSERT_TRUE(MusClient::Get());
-  PointerWatcherEventRouter* pointer_watcher_event_router =
-      MusClient::Get()->pointer_watcher_event_router();
-  ASSERT_TRUE(pointer_watcher_event_router);
-
-  ui::PointerEvent pointer_event_down(
-      ui::ET_POINTER_DOWN, gfx::Point(), gfx::Point(), ui::EF_NONE, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks());
-  ui::PointerEvent pointer_event_move(
-      ui::ET_POINTER_MOVED, gfx::Point(), gfx::Point(), ui::EF_NONE, 0,
-      ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 1),
-      base::TimeTicks());
-
-  // PointerWatchers receive pointer down events.
-  TestPointerWatcher watcher1;
-  pointer_watcher_event_router->AddPointerWatcher(&watcher1, true);
-  OnPointerEventObserved(pointer_event_down);
-  EXPECT_EQ(ui::ET_POINTER_DOWN, watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // PointerWatchers receive pointer move events.
-  OnPointerEventObserved(pointer_event_move);
-  EXPECT_EQ(ui::ET_POINTER_MOVED, watcher1.last_event_observed()->type());
-  watcher1.Reset();
-
-  // Two PointerWatchers can both receive a single observed event.
-  TestPointerWatcher watcher2;
-  pointer_watcher_event_router->AddPointerWatcher(&watcher2, true);
-  OnPointerEventObserved(pointer_event_move);
-  EXPECT_EQ(ui::ET_POINTER_MOVED, watcher1.last_event_observed()->type());
-  EXPECT_EQ(ui::ET_POINTER_MOVED, watcher2.last_event_observed()->type());
-  watcher1.Reset();
-  watcher2.Reset();
-
-  // Removing the first PointerWatcher stops sending events to it.
-  pointer_watcher_event_router->RemovePointerWatcher(&watcher1);
-  OnPointerEventObserved(pointer_event_move);
-  EXPECT_FALSE(watcher1.last_event_observed());
-  EXPECT_EQ(ui::ET_POINTER_MOVED, watcher2.last_event_observed()->type());
-  watcher1.Reset();
-  watcher2.Reset();
-
-  // Removing the last PointerWatcher stops sending events to it.
-  pointer_watcher_event_router->RemovePointerWatcher(&watcher2);
-  OnPointerEventObserved(pointer_event_move);
-  EXPECT_FALSE(watcher1.last_event_observed());
-  EXPECT_FALSE(watcher2.last_event_observed());
-}
-
-}  // namespace views
diff --git a/ui/views/pointer_watcher.h b/ui/views/pointer_watcher.h
deleted file mode 100644
index 74159af..0000000
--- a/ui/views/pointer_watcher.h
+++ /dev/null
@@ -1,65 +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 UI_VIEWS_POINTER_WATCHER_H_
-#define UI_VIEWS_POINTER_WATCHER_H_
-
-#include "base/macros.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/views/views_export.h"
-
-namespace gfx {
-class Point;
-}
-
-namespace ui {
-class PointerEvent;
-}
-
-namespace views {
-
-// When a PointerWatcher is added the types of events desired is specified by
-// way of PointerWatcherEventTypes.
-enum class PointerWatcherEventTypes {
-  // The PointerWatcher is interested in press, release, capture and mouse
-  // wheel.
-  BASIC,
-  // The PointerWatcher is interested in BASIC events, as well as move
-  // events.
-  MOVES,
-  // The PointerWatcher is interested in MOVE events, as well as drag
-  // events.
-  DRAGS
-};
-
-// An interface for read-only observation of pointer events (in particular, the
-// events cannot be marked as handled). Only certain event types are supported.
-// The |target| is the native window that will receive the event, if any.
-// To reduce IPC traffic from the window server, move events are not provided
-// unless the app specifically requests them.
-// NOTE: On mus this allows observation of events outside of windows owned
-// by the current process, in which case the |target| will be null. On mus
-// event.target() is always null.
-// NOTE: Mouse capture change events are sent through OnPointerEventObserved and
-// its |target| is always null.
-// NOTE: |target| may or may not have an associated views::Widget that may not
-// be a top-level Widget.
-class VIEWS_EXPORT PointerWatcher {
- public:
-  PointerWatcher() {}
-
-  virtual void OnPointerEventObserved(const ui::PointerEvent& event,
-                                      const gfx::Point& location_in_screen,
-                                      gfx::NativeView target) = 0;
-
- protected:
-  virtual ~PointerWatcher() {}
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(PointerWatcher);
-};
-
-}  // namespace views
-
-#endif  // UI_VIEWS_POINTER_WATCHER_H_
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index 5264dfe..96c17365 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -417,18 +417,19 @@
   // Observe client widget moves and resizes to update the selection handles.
   if (client_widget_)
     client_widget_->AddObserver(this);
-  if (ViewsDelegate::GetInstance()->IsPointerWatcherSupported())
-    ViewsDelegate::GetInstance()->AddPointerWatcher(this, true);
-  aura::Env::GetInstance()->AddPreTargetHandler(this);
+
+  // Observe certain event types sent to other event targets, to hide this ui.
+  aura::Env* env = aura::Env::GetInstance();
+  std::set<ui::EventType> types = {ui::ET_MOUSE_PRESSED, ui::ET_MOUSE_MOVED,
+                                   ui::ET_KEY_PRESSED, ui::ET_MOUSEWHEEL};
+  env->AddEventObserver(this, env, types);
 }
 
 TouchSelectionControllerImpl::~TouchSelectionControllerImpl() {
   UMA_HISTOGRAM_BOOLEAN("Event.TouchSelection.EndedWithAction",
                         command_executed_);
   HideQuickMenu();
-  aura::Env::GetInstance()->RemovePreTargetHandler(this);
-  if (ViewsDelegate::GetInstance()->IsPointerWatcherSupported())
-    ViewsDelegate::GetInstance()->RemovePointerWatcher(this);
+  aura::Env::GetInstance()->RemoveEventObserver(this);
   if (client_widget_)
     client_widget_->RemoveObserver(this);
 }
@@ -626,40 +627,23 @@
   SelectionChanged();
 }
 
-void TouchSelectionControllerImpl::OnPointerEventObserved(
-    const ui::PointerEvent& event,
-    const gfx::Point& location_in_screen,
-    gfx::NativeView target) {
-  // Disregard CursorClient::IsMouseEventsEnabled, it is disabled for touch
-  // events in this client, but not re-enabled for mouse events sent elsewhere.
-  if (event.pointer_details().pointer_type ==
-      ui::EventPointerType::POINTER_TYPE_MOUSE) {
+void TouchSelectionControllerImpl::OnEvent(const ui::Event& event) {
+  if (event.IsKeyEvent() || event.IsScrollEvent()) {
     client_view_->DestroyTouchSelection();
+    return;
   }
-}
 
-void TouchSelectionControllerImpl::OnKeyEvent(ui::KeyEvent* event) {
-  client_view_->DestroyTouchSelection();
-}
-
-void TouchSelectionControllerImpl::OnMouseEvent(ui::MouseEvent* event) {
-  aura::client::CursorClient* cursor_client = aura::client::GetCursorClient(
-      client_view_->GetNativeView()->GetRootWindow());
-  if (cursor_client && !cursor_client->IsMouseEventsEnabled())
+  if (event.IsMouseEvent()) {
+    aura::client::CursorClient* cursor_client = aura::client::GetCursorClient(
+        client_view_->GetNativeView()->GetRootWindow());
+    // Disregard IsMouseEventsEnabled on Mus, it is disabled on touch events in
+    // this client, but not re-enabled when mouse events are sent elsewhere.
+    if ((cursor_client && cursor_client->IsMouseEventsEnabled()) ||
+        aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
+      client_view_->DestroyTouchSelection();
+    }
     return;
-
-  // Do not hide handles on mouse-capture-changed event which might occur when a
-  // selection handle is released. Normally, cursor client should report mouse
-  // events as disabled (the above check), but there are crashes on Windows
-  // devices suggesting it is not always the case (see crbug.com/459423).
-  if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
-    return;
-
-  client_view_->DestroyTouchSelection();
-}
-
-void TouchSelectionControllerImpl::OnScrollEvent(ui::ScrollEvent* event) {
-  client_view_->DestroyTouchSelection();
+  }
 }
 
 void TouchSelectionControllerImpl::QuickMenuTimerFired() {
diff --git a/ui/views/touchui/touch_selection_controller_impl.h b/ui/views/touchui/touch_selection_controller_impl.h
index 7e231e1..f749d210 100644
--- a/ui/views/touchui/touch_selection_controller_impl.h
+++ b/ui/views/touchui/touch_selection_controller_impl.h
@@ -8,10 +8,10 @@
 #include "base/macros.h"
 #include "base/timer/timer.h"
 #include "ui/base/touch/touch_editing_controller.h"
+#include "ui/events/event_observer.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/selection_bound.h"
 #include "ui/touch_selection/touch_selection_menu_runner.h"
-#include "ui/views/pointer_watcher.h"
 #include "ui/views/view.h"
 #include "ui/views/views_export.h"
 #include "ui/views/widget/widget_observer.h"
@@ -30,8 +30,7 @@
     : public ui::TouchEditingControllerDeprecated,
       public ui::TouchSelectionMenuClient,
       public WidgetObserver,
-      public PointerWatcher,
-      public ui::EventHandler {
+      public ui::EventObserver {
  public:
   class EditingHandleView;
 
@@ -80,15 +79,8 @@
   void OnWidgetBoundsChanged(Widget* widget,
                              const gfx::Rect& new_bounds) override;
 
-  // PointerWatcher:
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              gfx::NativeView target) override;
-
-  // ui::EventHandler:
-  void OnKeyEvent(ui::KeyEvent* event) override;
-  void OnMouseEvent(ui::MouseEvent* event) override;
-  void OnScrollEvent(ui::ScrollEvent* event) override;
+  // ui::EventObserver:
+  void OnEvent(const ui::Event& event) override;
 
   // Time to show quick menu.
   void QuickMenuTimerFired();
diff --git a/ui/views/view_properties.cc b/ui/views/view_properties.cc
index 2f4f54e..1b19cb4f 100644
--- a/ui/views/view_properties.cc
+++ b/ui/views/view_properties.cc
@@ -20,7 +20,7 @@
 DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT,
                                        views::BubbleDialogDelegateView*);
 
-DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Path*);
+DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, SkPath*);
 
 namespace views {
 
@@ -29,6 +29,6 @@
 DEFINE_UI_CLASS_PROPERTY_KEY(views::BubbleDialogDelegateView*,
                              kAnchoredDialogKey,
                              nullptr);
-DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Path, kHighlightPathKey, nullptr);
+DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(SkPath, kHighlightPathKey, nullptr);
 
 }  // namespace views
diff --git a/ui/views/view_properties.h b/ui/views/view_properties.h
index 5f63c1b..a706ce8 100644
--- a/ui/views/view_properties.h
+++ b/ui/views/view_properties.h
@@ -8,9 +8,10 @@
 #include "ui/base/class_property.h"
 #include "ui/views/views_export.h"
 
+class SkPath;
+
 namespace gfx {
 class Insets;
-class Path;
 }  // namespace gfx
 
 namespace views {
@@ -34,8 +35,7 @@
 // A property to store a highlight path related to the view. This is nominally
 // used by the default inkdrop and focus ring that are both used to highlight
 // the view in different ways.
-VIEWS_EXPORT extern const ui::ClassProperty<gfx::Path*>* const
-    kHighlightPathKey;
+VIEWS_EXPORT extern const ui::ClassProperty<SkPath*>* const kHighlightPathKey;
 
 }  // namespace views
 
@@ -47,5 +47,5 @@
 DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Insets*);
 DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT,
                                         views::BubbleDialogDelegateView*);
-DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Path*);
+DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, SkPath*);
 #endif  // UI_VIEWS_VIEW_PROPERTIES_H_
diff --git a/ui/views/views_delegate.cc b/ui/views/views_delegate.cc
index d580fde..4c73337 100644
--- a/ui/views/views_delegate.cc
+++ b/ui/views/views_delegate.cc
@@ -14,11 +14,12 @@
 #endif
 
 namespace views {
+
 namespace {
 
 ViewsDelegate* views_delegate = nullptr;
 
-}
+}  // namespace
 
 ViewsDelegate::ViewsDelegate()
     : editing_controller_factory_(new ViewsTouchEditingControllerFactory) {
@@ -132,16 +133,4 @@
   return true;
 }
 
-void ViewsDelegate::AddPointerWatcher(PointerWatcher*, bool) {
-  NOTREACHED();
-}
-
-void ViewsDelegate::RemovePointerWatcher(PointerWatcher*) {
-  NOTREACHED();
-}
-
-bool ViewsDelegate::IsPointerWatcherSupported() const {
-  return false;
-}
-
 }  // namespace views
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h
index b5237c3f..bf6718f8 100644
--- a/ui/views/views_delegate.h
+++ b/ui/views/views_delegate.h
@@ -37,7 +37,6 @@
 
 class NativeWidget;
 class NonClientFrameView;
-class PointerWatcher;
 class View;
 class Widget;
 
@@ -126,6 +125,7 @@
                                        gfx::Rect* bounds,
                                        ui::WindowShowState* show_state) const;
 
+  // Handles an event on a |view|. The |view| must not be null.
   virtual void NotifyAccessibilityEvent(View* view,
                                         ax::mojom::Event event_type);
 
@@ -200,13 +200,6 @@
   // opens in the opposite direction.
   virtual bool ShouldMirrorArrowsInRTL() const;
 
-  // Allows lower-level views components to use Mus-only PointerWatcher wiring.
-  // TODO(crbug.com/887725): Support PointerWatcher without mus, refactor.
-  virtual void AddPointerWatcher(PointerWatcher* pointer_watcher,
-                                 bool wants_moves);
-  virtual void RemovePointerWatcher(PointerWatcher* pointer_watcher);
-  virtual bool IsPointerWatcherSupported() const;
-
  protected:
   ViewsDelegate();
 
diff --git a/ui/views_bridge_mac/bridged_content_view.mm b/ui/views_bridge_mac/bridged_content_view.mm
index ad444b0..fb4b545 100644
--- a/ui/views_bridge_mac/bridged_content_view.mm
+++ b/ui/views_bridge_mac/bridged_content_view.mm
@@ -713,14 +713,14 @@
     return NO;
   BOOL result = [super becomeFirstResponder];
   if (result && bridge_)
-    bridge_->host()->SetIsFirstResponder(true);
+    bridge_->host()->OnIsFirstResponderChanged(true);
   return result;
 }
 
 - (BOOL)resignFirstResponder {
   BOOL result = [super resignFirstResponder];
   if (result && bridge_)
-    bridge_->host()->SetIsFirstResponder(false);
+    bridge_->host()->OnIsFirstResponderChanged(false);
   return result;
 }
 
@@ -753,7 +753,8 @@
   [super setFrameSize:newSize];
 
   if (bridge_)
-    bridge_->host()->SetViewSize(gfx::Size(newSize.width, newSize.height));
+    bridge_->host()->OnViewSizeChanged(
+        gfx::Size(newSize.width, newSize.height));
 }
 
 - (BOOL)isOpaque {
@@ -1597,7 +1598,8 @@
 
 - (id)accessibilityAttributeValue:(NSString*)attribute {
   if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
-    return @[ bridge_->host_helper()->GetNativeViewAccessible() ];
+    if (id accessible = bridge_->host_helper()->GetNativeViewAccessible())
+      return @[ accessible ];
   }
 
   return [super accessibilityAttributeValue:attribute];
diff --git a/ui/views_bridge_mac/bridged_native_widget_impl.mm b/ui/views_bridge_mac/bridged_native_widget_impl.mm
index 9485d4a..3589c5b25 100644
--- a/ui/views_bridge_mac/bridged_native_widget_impl.mm
+++ b/ui/views_bridge_mac/bridged_native_widget_impl.mm
@@ -286,6 +286,7 @@
   window_delegate_.reset(
       [[ViewsNSWindowDelegate alloc] initWithBridgedNativeWidget:this]);
   window_ = std::move(window);
+  [window_ setBridgeImpl:this];
   [window_ setBridgedNativeWidgetId:id_];
   [window_ setReleasedWhenClosed:NO];  // Owned by scoped_nsobject.
   [window_ setDelegate:window_delegate_];
@@ -719,6 +720,7 @@
   DCHECK(!show_animation_);
 
   [window_ setDelegate:nil];
+  [window_ setBridgeImpl:nullptr];
 
   // Ensure that |this| cannot be reached by its id while it is being destroyed.
   size_t erased = GetIdToWidgetImplMap().erase(id_);
diff --git a/ui/views_bridge_mac/mojo/bridged_native_widget_host.mojom b/ui/views_bridge_mac/mojo/bridged_native_widget_host.mojom
index cba9a6b..e077352 100644
--- a/ui/views_bridge_mac/mojo/bridged_native_widget_host.mojom
+++ b/ui/views_bridge_mac/mojo/bridged_native_widget_host.mojom
@@ -20,9 +20,10 @@
   // Called when the window's native theme changes.
   OnWindowNativeThemeChanged();
 
-  // Resize the underlying views::View to |new_size|. Note that this will not
-  // necessarily match the content bounds from OnWindowGeometryChanged.
-  SetViewSize(gfx.mojom.Size new_size);
+  // Resize the underlying views::View to |new_size| in response to the NSView's
+  // frame changing size. Note that this will not necessarily match the content
+  // bounds from OnWindowGeometryChanged.
+  OnViewSizeChanged(gfx.mojom.Size new_size);
 
   // Indicate if full keyboard accessibility is needed and update focus if
   // needed.
@@ -30,7 +31,7 @@
 
   // Indicate if the NSView for this widget is the first responder for the
   // NSWindow for this widget.
-  SetIsFirstResponder(bool is_first_responder);
+  OnIsFirstResponderChanged(bool is_first_responder);
 
   // Indicate if mouse capture is active.
   OnMouseCaptureActiveChanged(bool capture_is_active);
diff --git a/ui/views_bridge_mac/native_widget_mac_nswindow.h b/ui/views_bridge_mac/native_widget_mac_nswindow.h
index ef8afe1..30b091b 100644
--- a/ui/views_bridge_mac/native_widget_mac_nswindow.h
+++ b/ui/views_bridge_mac/native_widget_mac_nswindow.h
@@ -11,6 +11,10 @@
 #include "ui/views/views_export.h"
 #include "ui/views/widget/util_mac.h"
 
+namespace views {
+class BridgedNativeWidgetImpl;
+}  // namespace views
+
 @protocol WindowTouchBarDelegate;
 
 // Weak lets Chrome launch even if a future macOS doesn't have the below classes
@@ -51,6 +55,9 @@
 // may be used to look up the BridgedNativeWidgetHostImpl in the browser process
 // or the BridgedNativeWidgetImpl in a display process.
 @property(assign, nonatomic) uint64_t bridgedNativeWidgetId;
+
+// The BridgedNativeWidgetImpl that this will use to call back to the host.
+@property(assign, nonatomic) views::BridgedNativeWidgetImpl* bridgeImpl;
 @end
 
 #endif  // UI_VIEWS_BRIDGE_MAC_NATIVE_WIDGET_MAC_NSWINDOW_H_
diff --git a/ui/views_bridge_mac/native_widget_mac_nswindow.mm b/ui/views_bridge_mac/native_widget_mac_nswindow.mm
index f0e7ac7..954ee2f 100644
--- a/ui/views_bridge_mac/native_widget_mac_nswindow.mm
+++ b/ui/views_bridge_mac/native_widget_mac_nswindow.mm
@@ -32,9 +32,6 @@
 // Private API on NSWindow, determines whether the title is drawn on the title
 // bar. The title is still visible in menus, Expose, etc.
 - (BOOL)_isTitleHidden;
-
-// Retrieve the corresponding views::BridgedNativeWidgetImpl in this process.
-- (views::BridgedNativeWidgetImpl*)bridgeImpl;
 @end
 
 // Use this category to implement mouseDown: on multiple frame view classes
@@ -85,8 +82,10 @@
   base::scoped_nsprotocol<id<UserInterfaceItemCommandHandler>> commandHandler_;
   id<WindowTouchBarDelegate> touchBarDelegate_;  // Weak.
   uint64_t bridgedNativeWidgetId_;
+  views::BridgedNativeWidgetImpl* bridgeImpl_;
 }
 @synthesize bridgedNativeWidgetId = bridgedNativeWidgetId_;
+@synthesize bridgeImpl = bridgeImpl_;
 
 - (instancetype)initWithContentRect:(NSRect)contentRect
                           styleMask:(NSUInteger)windowStyle
@@ -135,18 +134,16 @@
   return base::mac::ObjCCastStrict<ViewsNSWindowDelegate>([self delegate]);
 }
 
-- (views::BridgedNativeWidgetImpl*)bridgeImpl {
-  return views::BridgedNativeWidgetImpl::GetFromId(bridgedNativeWidgetId_);
-}
-
 - (BOOL)hasViewsMenuActive {
   bool hasMenuController = false;
-  [self bridgeImpl]->host()->GetHasMenuController(&hasMenuController);
+  if (bridgeImpl_)
+    bridgeImpl_->host()->GetHasMenuController(&hasMenuController);
   return hasMenuController;
 }
 
 - (id)rootAccessibilityObject {
-  return [self bridgeImpl]->host_helper()->GetNativeViewAccessible();
+  return bridgeImpl_ ? bridgeImpl_->host_helper()->GetNativeViewAccessible()
+                     : nullptr;
 }
 
 // NSWindow overrides.
@@ -164,8 +161,8 @@
 
 - (BOOL)_isTitleHidden {
   bool shouldShowWindowTitle = YES;
-  if ([self bridgeImpl])
-    [self bridgeImpl]->host()->GetShouldShowWindowTitle(&shouldShowWindowTitle);
+  if (bridgeImpl_)
+    bridgeImpl_->host()->GetShouldShowWindowTitle(&shouldShowWindowTitle);
   return !shouldShowWindowTitle;
 }
 
@@ -182,32 +179,30 @@
 // down, so check for a delegate.
 - (BOOL)canBecomeKeyWindow {
   bool canBecomeKey = NO;
-  if ([self bridgeImpl])
-    [self bridgeImpl]->host()->GetCanWindowBecomeKey(&canBecomeKey);
+  if (bridgeImpl_)
+    bridgeImpl_->host()->GetCanWindowBecomeKey(&canBecomeKey);
   return canBecomeKey;
 }
 
 - (BOOL)canBecomeMainWindow {
-  views::BridgedNativeWidgetImpl* bridgeImpl = [self bridgeImpl];
-  if (!bridgeImpl)
+  if (!bridgeImpl_)
     return NO;
 
   // Dialogs and bubbles shouldn't take large shadows away from their parent.
-  if (bridgeImpl->parent())
+  if (bridgeImpl_->parent())
     return NO;
 
   bool canBecomeKey = NO;
-  if (bridgeImpl)
-    bridgeImpl->host()->GetCanWindowBecomeKey(&canBecomeKey);
+  if (bridgeImpl_)
+    bridgeImpl_->host()->GetCanWindowBecomeKey(&canBecomeKey);
   return canBecomeKey;
 }
 
 // Lets the traffic light buttons on the parent window keep their active state.
 - (BOOL)hasKeyAppearance {
-  views::BridgedNativeWidgetImpl* bridgeImpl = [self bridgeImpl];
-  if (bridgeImpl) {
+  if (bridgeImpl_) {
     bool isAlwaysRenderWindowAsKey = NO;
-    bridgeImpl->host()->GetAlwaysRenderWindowAsKey(&isAlwaysRenderWindowAsKey);
+    bridgeImpl_->host()->GetAlwaysRenderWindowAsKey(&isAlwaysRenderWindowAsKey);
     if (isAlwaysRenderWindowAsKey)
       return YES;
   }
@@ -328,11 +323,10 @@
   // properties on the NSWindow and repeats them when focusing an item in the
   // RootView's a11y group. See http://crbug.com/748221.
   id superFocus = [super accessibilityFocusedUIElement];
-  views::BridgedNativeWidgetImpl* bridgeImpl = [self bridgeImpl];
-  if (!bridgeImpl || superFocus != self)
+  if (!bridgeImpl_ || superFocus != self)
     return superFocus;
 
-  return bridgeImpl->host_helper()->GetNativeViewAccessible();
+  return bridgeImpl_->host_helper()->GetNativeViewAccessible();
 }
 
 - (id)accessibilityAttributeValue:(NSString*)attribute {
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc
index 613ecff..0a919401 100644
--- a/ui/wm/test/wm_test_helper.cc
+++ b/ui/wm/test/wm_test_helper.cc
@@ -132,10 +132,6 @@
 
 void WMTestHelper::OnLostConnection(aura::WindowTreeClient* client) {}
 
-void WMTestHelper::OnPointerEventObserved(const ui::PointerEvent& event,
-                                          const gfx::Point& location_in_screen,
-                                          aura::Window* target) {}
-
 aura::PropertyConverter* WMTestHelper::GetPropertyConverter() {
   return property_converter_.get();
 }
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h
index c56ebe5..390953d 100644
--- a/ui/wm/test/wm_test_helper.h
+++ b/ui/wm/test/wm_test_helper.h
@@ -79,9 +79,6 @@
   void OnUnembed(aura::Window* root) override;
   void OnEmbedRootDestroyed(aura::WindowTreeHostMus* window_tree_host) override;
   void OnLostConnection(aura::WindowTreeClient* client) override;
-  void OnPointerEventObserved(const ui::PointerEvent& event,
-                              const gfx::Point& location_in_screen,
-                              aura::Window* target) override;
   aura::PropertyConverter* GetPropertyConverter() override;
   void OnDisplaysChanged(std::vector<ws::mojom::WsDisplayPtr> ws_displays,
                          int64_t primary_display_id,