diff --git a/DEPS b/DEPS
index fdfc483..83028855 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': '908a6304467d88447cf9e497581f4c970c09e750',
+  'v8_revision': '35b77a36bca2291526a697cd4dec93d63f13508c',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java
index 9c981b2..1597af0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSites.java
@@ -6,6 +6,8 @@
 
 import org.chromium.base.annotations.CalledByNative;
 
+import javax.annotation.Nullable;
+
 /**
  * Methods to provide most recent urls, titles and thumbnails.
  */
@@ -41,6 +43,30 @@
     }
 
     /**
+     * An interface to provide {@link MostVisitedSites} with platform-specific home page data.
+     */
+    interface HomePageClient {
+        /**
+         * @return True if a home page is active and set.
+         */
+        @CalledByNative("HomePageClient")
+        boolean isHomePageEnabled();
+
+        /**
+         * @return True if the new tab page was set as home page.
+         */
+        @CalledByNative("HomePageClient")
+        boolean isNewTabPageUsedAsHomePage();
+
+        /**
+         * @return The raw URL of the currently set home page.
+         */
+        @CalledByNative("HomePageClient")
+        @Nullable
+        String getHomePageUrl();
+    }
+
+    /**
      * This instance must not be used after calling destroy().
      */
     void destroy();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java
index 78dacb1..5c09910 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java
@@ -4,14 +4,21 @@
 
 package org.chromium.chrome.browser.suggestions;
 
+import android.text.TextUtils;
+
+import org.chromium.base.ContextUtils;
 import org.chromium.base.annotations.JNIAdditionalImport;
+import org.chromium.chrome.browser.ChromeFeatureList;
+import org.chromium.chrome.browser.UrlConstants;
+import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
 import org.chromium.chrome.browser.profiles.Profile;
 
 /**
  * Methods to bridge into native history to provide most recent urls, titles and thumbnails.
  */
 @JNIAdditionalImport(MostVisitedSites.class) // Needed for the Observer usage in the native calls.
-public class MostVisitedSitesBridge implements MostVisitedSites {
+public class MostVisitedSitesBridge
+        implements MostVisitedSites, HomepageManager.HomepageStateListener {
     private long mNativeMostVisitedSitesBridge;
 
     /**
@@ -21,6 +28,27 @@
      */
     public MostVisitedSitesBridge(Profile profile) {
         mNativeMostVisitedSitesBridge = nativeInit(profile);
+        // The first tile replaces the home page button (only) in Chrome Home. To support that,
+        // provide information about the home page.
+        if (ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_HOME)) {
+            nativeSetHomePageClient(mNativeMostVisitedSitesBridge, new HomePageClient() {
+                @Override
+                public boolean isHomePageEnabled() {
+                    return HomepageManager.isHomepageEnabled(ContextUtils.getApplicationContext());
+                }
+
+                @Override
+                public boolean isNewTabPageUsedAsHomePage() {
+                    return TextUtils.equals(getHomePageUrl(), UrlConstants.NTP_URL);
+                }
+
+                @Override
+                public String getHomePageUrl() {
+                    return HomepageManager.getHomepageUri(ContextUtils.getApplicationContext());
+                }
+            });
+            HomepageManager.getInstance(ContextUtils.getApplicationContext()).addListener(this);
+        }
     }
 
     /**
@@ -28,6 +56,8 @@
      */
     @Override
     public void destroy() {
+        // Stop listening even if it was not started in the first place. (Handled without errors.)
+        HomepageManager.getInstance(ContextUtils.getApplicationContext()).removeListener(this);
         assert mNativeMostVisitedSitesBridge != 0;
         nativeDestroy(mNativeMostVisitedSitesBridge);
         mNativeMostVisitedSitesBridge = 0;
@@ -76,10 +106,22 @@
         nativeRecordOpenedMostVisitedItem(mNativeMostVisitedSitesBridge, index, type, source);
     }
 
+    @Override
+    public void onHomepageStateUpdated() {
+        assert mNativeMostVisitedSitesBridge != 0;
+        // Ensure even a blacklisted home page can be set as tile when (re-)enabling it.
+        if (HomepageManager.isHomepageEnabled(ContextUtils.getApplicationContext())) {
+            removeBlacklistedUrl(
+                    HomepageManager.getHomepageUri(ContextUtils.getApplicationContext()));
+        }
+    }
+
     private native long nativeInit(Profile profile);
     private native void nativeDestroy(long nativeMostVisitedSitesBridge);
     private native void nativeSetObserver(
             long nativeMostVisitedSitesBridge, MostVisitedSites.Observer observer, int numSites);
+    private native void nativeSetHomePageClient(
+            long nativeMostVisitedSitesBridge, MostVisitedSites.HomePageClient homePageClient);
     private native void nativeAddOrRemoveBlacklistedUrl(
             long nativeMostVisitedSitesBridge, String url, boolean addUrl);
     private native void nativeRecordPageImpression(
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index e661482..9d6c032 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -9439,6 +9439,15 @@
           <message name="IDS_SYNC_RELOGIN_LINK_LABEL" desc="The text to display on in the hyperlink when the user needs to sign out and sign in again to use sync on Chrome OS.">
             Sign out
           </message>
+          <message name="IDS_ACTIVE_DIRECTORY_PASSWORD_EXPIRED" desc="The text to display on the hyperlink when the user needs to sign out and sign in again to change their password.">
+            Your password has expired. Please sign out then sign in again to change it.
+          </message>
+          <message name="IDS_ACTIVE_DIRECTORY_PASSWORD_CHANGED" desc="The text to display on the hyperlink when the user needs to sign out and sign in again to update local password to cryptohome.">
+            Your password has been changed on the server. Please sign out then sign in again.
+          </message>
+          <message name="IDS_ACTIVE_DIRECTORY_REFRESH_AUTH_TOKEN" desc="The text to display on the hyperlink when the user needs to sign out and sign in again to get authentication token.">
+            Failed to get authentication token. Please sign out then sign in again to try again.
+          </message>
         </if>
         <message name="IDS_OPTIONS_CUSTOMIZE_SYNC_BUTTON_LABEL" desc="The text to display on the button to customize which data types the user is syncing.">
           Advanced sync settings...
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
index 64074f8..f43a562 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -36,6 +36,46 @@
 using ntp_tiles::TileVisualType;
 using ntp_tiles::metrics::TileImpression;
 
+namespace {
+
+class JavaHomePageClient : public MostVisitedSites::HomePageClient {
+ public:
+  JavaHomePageClient(JNIEnv* env, const JavaParamRef<jobject>& obj);
+
+  bool IsHomePageEnabled() const override;
+  bool IsNewTabPageUsedAsHomePage() const override;
+  GURL GetHomepageUrl() const override;
+
+ private:
+  ScopedJavaGlobalRef<jobject> client_;
+
+  DISALLOW_COPY_AND_ASSIGN(JavaHomePageClient);
+};
+
+JavaHomePageClient::JavaHomePageClient(JNIEnv* env,
+                                       const JavaParamRef<jobject>& obj)
+    : client_(env, obj) {}
+
+bool JavaHomePageClient::IsHomePageEnabled() const {
+  return Java_HomePageClient_isHomePageEnabled(AttachCurrentThread(), client_);
+}
+
+bool JavaHomePageClient::IsNewTabPageUsedAsHomePage() const {
+  return Java_HomePageClient_isNewTabPageUsedAsHomePage(AttachCurrentThread(),
+                                                        client_);
+}
+
+GURL JavaHomePageClient::GetHomepageUrl() const {
+  base::android::ScopedJavaLocalRef<jstring> url =
+      Java_HomePageClient_getHomePageUrl(AttachCurrentThread(), client_);
+  if (url.is_null()) {
+    return GURL();
+  }
+  return GURL(ConvertJavaStringToUTF8(url));
+}
+
+}  // namespace
+
 class MostVisitedSitesBridge::JavaObserver : public MostVisitedSites::Observer {
  public:
   JavaObserver(JNIEnv* env, const JavaParamRef<jobject>& obj);
@@ -111,6 +151,14 @@
   most_visited_->SetMostVisitedURLsObserver(java_observer_.get(), num_sites);
 }
 
+void MostVisitedSitesBridge::SetHomePageClient(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj,
+    const base::android::JavaParamRef<jobject>& j_client) {
+  most_visited_->SetHomePageClient(
+      base::MakeUnique<JavaHomePageClient>(env, j_client));
+}
+
 void MostVisitedSitesBridge::AddOrRemoveBlacklistedUrl(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj,
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.h b/chrome/browser/android/ntp/most_visited_sites_bridge.h
index 730ef0cf..3335f5d 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.h
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.h
@@ -30,6 +30,10 @@
                    const base::android::JavaParamRef<jobject>& j_observer,
                    jint num_sites);
 
+  void SetHomePageClient(JNIEnv* env,
+                         const base::android::JavaParamRef<jobject>& obj,
+                         const base::android::JavaParamRef<jobject>& j_client);
+
   void AddOrRemoveBlacklistedUrl(
       JNIEnv* env,
       const base::android::JavaParamRef<jobject>& obj,
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index c5ad2e6a..483145cd 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -53,6 +53,7 @@
     "//chrome/common/safe_browsing:proto",
     "//chromeos",
     "//chromeos:attestation_proto",
+    "//chromeos:authpolicy_proto",
     "//chromeos:cryptohome_proto",
     "//chromeos:cryptohome_signkey_proto",
     "//chromeos/components/tether",
@@ -356,6 +357,8 @@
     "attestation/platform_verification_flow.h",
     "attestation/platform_verification_impl.cc",
     "attestation/platform_verification_impl.h",
+    "authpolicy/auth_policy_credentials_manager.cc",
+    "authpolicy/auth_policy_credentials_manager.h",
     "background/ash_wallpaper_delegate.cc",
     "background/ash_wallpaper_delegate.h",
     "base/file_flusher.cc",
diff --git a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
new file mode 100644
index 0000000..40345b4
--- /dev/null
+++ b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
@@ -0,0 +1,286 @@
+// 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/chromeos/authpolicy/auth_policy_credentials_manager.h"
+
+#include "base/location.h"
+#include "base/memory/singleton.h"
+#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/notifications/notification.h"
+#include "chrome/browser/notifications/notification_delegate.h"
+#include "chrome/browser/notifications/notification_ui_manager.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/grit/chromium_strings.h"
+#include "chrome/grit/generated_resources.h"
+#include "chrome/grit/theme_resources.h"
+#include "chromeos/dbus/auth_policy_client.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/network/network_handler.h"
+#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_state_handler.h"
+#include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+
+namespace {
+
+constexpr base::TimeDelta kGetUserStatusCallsInterval =
+    base::TimeDelta::FromHours(1);
+const char kProfileSigninNotificationId[] = "chrome://settings/signin/";
+
+// A notification delegate for the sign-out button.
+class SigninNotificationDelegate : public NotificationDelegate {
+ public:
+  explicit SigninNotificationDelegate(const std::string& id);
+
+  // NotificationDelegate:
+  void Click() override;
+  void ButtonClick(int button_index) override;
+  std::string id() const override;
+
+ protected:
+  ~SigninNotificationDelegate() override = default;
+
+ private:
+  // Unique id of the notification.
+  const std::string id_;
+
+  DISALLOW_COPY_AND_ASSIGN(SigninNotificationDelegate);
+};
+
+SigninNotificationDelegate::SigninNotificationDelegate(const std::string& id)
+    : id_(id) {}
+
+void SigninNotificationDelegate::Click() {
+  chrome::AttemptUserExit();
+}
+
+void SigninNotificationDelegate::ButtonClick(int button_index) {
+  chrome::AttemptUserExit();
+}
+
+std::string SigninNotificationDelegate::id() const {
+  return id_;
+}
+
+}  // namespace
+
+AuthPolicyCredentialsManager::AuthPolicyCredentialsManager(Profile* profile)
+    : profile_(profile) {
+  const user_manager::User* user =
+      chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
+  CHECK(user && user->IsActiveDirectoryUser());
+  StartObserveNetwork();
+  account_id_ = user->GetAccountId();
+  GetUserStatus();
+}
+
+AuthPolicyCredentialsManager::~AuthPolicyCredentialsManager() {}
+
+void AuthPolicyCredentialsManager::Shutdown() {
+  StopObserveNetwork();
+}
+
+void AuthPolicyCredentialsManager::DefaultNetworkChanged(
+    const chromeos::NetworkState* network) {
+  GetUserStatusIfConnected(network);
+}
+
+void AuthPolicyCredentialsManager::NetworkConnectionStateChanged(
+    const chromeos::NetworkState* network) {
+  GetUserStatusIfConnected(network);
+}
+
+void AuthPolicyCredentialsManager::OnShuttingDown() {
+  StopObserveNetwork();
+}
+
+void AuthPolicyCredentialsManager::GetUserStatus() {
+  DCHECK(!weak_factory_.HasWeakPtrs());
+  rerun_get_status_on_error_ = false;
+  scheduled_get_user_status_call_.Cancel();
+  chromeos::DBusThreadManager::Get()->GetAuthPolicyClient()->GetUserStatus(
+      account_id_.GetObjGuid(),
+      base::BindOnce(&AuthPolicyCredentialsManager::OnGetUserStatusCallback,
+                     weak_factory_.GetWeakPtr()));
+}
+
+void AuthPolicyCredentialsManager::OnGetUserStatusCallback(
+    authpolicy::ErrorType error,
+    const authpolicy::ActiveDirectoryUserStatus& user_status) {
+  DCHECK(weak_factory_.HasWeakPtrs());
+  ScheduleGetUserStatus();
+  last_error_ = error;
+  if (error != authpolicy::ERROR_NONE) {
+    DLOG(ERROR) << "GetUserStatus failed with " << error;
+    if (rerun_get_status_on_error_) {
+      rerun_get_status_on_error_ = false;
+      GetUserStatus();
+    }
+    return;
+  }
+  CHECK(user_status.account_info().account_id() == account_id_.GetObjGuid());
+  rerun_get_status_on_error_ = false;
+  if (user_status.has_account_info())
+    UpdateDisplayAndGivenName(user_status.account_info());
+
+  DCHECK(user_status.has_password_status());
+  switch (user_status.password_status()) {
+    case authpolicy::ActiveDirectoryUserStatus::PASSWORD_VALID:
+      // do nothing
+      break;
+    case authpolicy::ActiveDirectoryUserStatus::PASSWORD_EXPIRED:
+      ShowNotification(IDS_ACTIVE_DIRECTORY_PASSWORD_EXPIRED);
+      return;
+    case authpolicy::ActiveDirectoryUserStatus::PASSWORD_CHANGED:
+      ShowNotification(IDS_ACTIVE_DIRECTORY_PASSWORD_CHANGED);
+      return;
+  }
+
+  DCHECK(user_status.has_tgt_status());
+  switch (user_status.tgt_status()) {
+    case authpolicy::ActiveDirectoryUserStatus::TGT_VALID:
+      // do nothing
+      break;
+    case authpolicy::ActiveDirectoryUserStatus::TGT_EXPIRED:
+    case authpolicy::ActiveDirectoryUserStatus::TGT_NOT_FOUND:
+      ShowNotification(IDS_ACTIVE_DIRECTORY_REFRESH_AUTH_TOKEN);
+      return;
+  }
+  // Everything is ok.
+  user_manager::UserManager::Get()->SaveForceOnlineSignin(account_id_, false);
+}
+
+void AuthPolicyCredentialsManager::ScheduleGetUserStatus() {
+  // Unretained is safe here because it is a CancelableClosure and owned by this
+  // object.
+  scheduled_get_user_status_call_.Reset(base::Bind(
+      &AuthPolicyCredentialsManager::GetUserStatus, base::Unretained(this)));
+  // TODO(rsorokin): This does not re-schedule after wake from sleep
+  // (and thus the maximal interval between two calls can be (sleep time +
+  // kGetUserStatusCallsInterval)) (see crbug.com/726672).
+  base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+      FROM_HERE, scheduled_get_user_status_call_.callback(),
+      kGetUserStatusCallsInterval);
+}
+
+void AuthPolicyCredentialsManager::StartObserveNetwork() {
+  DCHECK(chromeos::NetworkHandler::IsInitialized());
+  if (is_observing_network_)
+    return;
+  is_observing_network_ = true;
+  chromeos::NetworkHandler::Get()->network_state_handler()->AddObserver(
+      this, FROM_HERE);
+}
+
+void AuthPolicyCredentialsManager::StopObserveNetwork() {
+  DCHECK(chromeos::NetworkHandler::IsInitialized());
+  if (!is_observing_network_)
+    return;
+  is_observing_network_ = false;
+  chromeos::NetworkHandler::Get()->network_state_handler()->RemoveObserver(
+      this, FROM_HERE);
+}
+
+void AuthPolicyCredentialsManager::UpdateDisplayAndGivenName(
+    const authpolicy::ActiveDirectoryAccountInfo& account_info) {
+  if (display_name_ == account_info.display_name() &&
+      given_name_ == account_info.given_name()) {
+    return;
+  }
+  display_name_ = account_info.display_name();
+  given_name_ = account_info.given_name();
+  user_manager::UserManager::Get()->UpdateUserAccountData(
+      account_id_,
+      user_manager::UserManager::UserAccountData(
+          base::UTF8ToUTF16(display_name_), base::UTF8ToUTF16(given_name_),
+          std::string() /* locale */));
+}
+
+void AuthPolicyCredentialsManager::ShowNotification(int message_id) {
+  user_manager::UserManager::Get()->SaveForceOnlineSignin(account_id_, true);
+
+  if (shown_notifications_.count(message_id) > 0)
+    return;
+
+  message_center::RichNotificationData data;
+  data.buttons.push_back(message_center::ButtonInfo(
+      l10n_util::GetStringUTF16(IDS_SYNC_RELOGIN_LINK_LABEL)));
+
+  const std::string notification_id = kProfileSigninNotificationId +
+                                      profile_->GetProfileUserName() +
+                                      std::to_string(message_id);
+  // Set the delegate for the notification's sign-out button.
+  SigninNotificationDelegate* delegate =
+      new SigninNotificationDelegate(notification_id);
+
+  message_center::NotifierId notifier_id(
+      message_center::NotifierId::SYSTEM_COMPONENT,
+      kProfileSigninNotificationId);
+
+  // Set |profile_id| for multi-user notification blocker.
+  notifier_id.profile_id = profile_->GetProfileUserName();
+
+  Notification notification(
+      message_center::NOTIFICATION_TYPE_SIMPLE,
+      l10n_util::GetStringUTF16(IDS_SIGNIN_ERROR_BUBBLE_VIEW_TITLE),
+      l10n_util::GetStringUTF16(message_id),
+      ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+          IDR_NOTIFICATION_ALERT),
+      notifier_id,
+      base::string16(),  // display_source
+      GURL(notification_id), notification_id, data, delegate);
+  notification.SetSystemPriority();
+
+  NotificationUIManager* notification_ui_manager =
+      g_browser_process->notification_ui_manager();
+  // Add the notification.
+  notification_ui_manager->Add(notification, profile_);
+  shown_notifications_.insert(message_id);
+}
+
+void AuthPolicyCredentialsManager::GetUserStatusIfConnected(
+    const chromeos::NetworkState* network) {
+  if (!network || !network->IsConnectedState())
+    return;
+  if (weak_factory_.HasWeakPtrs()) {
+    // Another call is in progress.
+    rerun_get_status_on_error_ = true;
+    return;
+  }
+  if (last_error_ != authpolicy::ERROR_NONE)
+    GetUserStatus();
+}
+
+// static
+AuthPolicyCredentialsManagerFactory*
+AuthPolicyCredentialsManagerFactory::GetInstance() {
+  return base::Singleton<AuthPolicyCredentialsManagerFactory>::get();
+}
+
+// static
+void AuthPolicyCredentialsManagerFactory::BuildForProfileIfActiveDirectory(
+    Profile* profile) {
+  const user_manager::User* user =
+      chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
+  if (!user || !user->IsActiveDirectoryUser())
+    return;
+  GetInstance()->GetServiceForBrowserContext(profile, true /* create */);
+}
+
+AuthPolicyCredentialsManagerFactory::AuthPolicyCredentialsManagerFactory()
+    : BrowserContextKeyedServiceFactory(
+          "AuthPolicyCredentialsManager",
+          BrowserContextDependencyManager::GetInstance()) {}
+
+AuthPolicyCredentialsManagerFactory::~AuthPolicyCredentialsManagerFactory() {}
+
+KeyedService* AuthPolicyCredentialsManagerFactory::BuildServiceInstanceFor(
+    content::BrowserContext* context) const {
+  Profile* profile = Profile::FromBrowserContext(context);
+  return new AuthPolicyCredentialsManager(profile);
+}
diff --git a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h
new file mode 100644
index 0000000..0fec7e7
--- /dev/null
+++ b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h
@@ -0,0 +1,115 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_
+#define CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_
+
+#include <set>
+
+#include "base/cancelable_callback.h"
+#include "base/memory/weak_ptr.h"
+#include "chromeos/dbus/authpolicy/active_directory_info.pb.h"
+#include "chromeos/network/network_state_handler_observer.h"
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+#include "components/keyed_service/core/keyed_service.h"
+#include "components/signin/core/account_id/account_id.h"
+#include "third_party/cros_system_api/dbus/service_constants.h"
+
+class Profile;
+
+namespace authpolicy {
+class ActiveDirectoryUserStatus;
+}
+
+namespace base {
+template <typename T>
+struct DefaultSingletonTraits;
+}  // namespace base
+
+// A service responsible for tracking user credential status. Created for each
+// Active Directory user profile.
+class AuthPolicyCredentialsManager
+    : public KeyedService,
+      public chromeos::NetworkStateHandlerObserver {
+ public:
+  explicit AuthPolicyCredentialsManager(Profile* profile);
+  ~AuthPolicyCredentialsManager() override;
+
+  // KeyedService overrides.
+  void Shutdown() override;
+
+  // chromeos::NetworkStateHandlerObserver overrides.
+  void DefaultNetworkChanged(const chromeos::NetworkState* network) override;
+  void NetworkConnectionStateChanged(
+      const chromeos::NetworkState* network) override;
+  void OnShuttingDown() override;
+
+ private:
+  // Calls AuthPolicyClient::GetUserStatus method.
+  void GetUserStatus();
+
+  // See AuthPolicyClient::GetUserStatusCallback.
+  void OnGetUserStatusCallback(
+      authpolicy::ErrorType error,
+      const authpolicy::ActiveDirectoryUserStatus& user_status);
+
+  // Post delayed task to call GetUserStatus in the future.
+  void ScheduleGetUserStatus();
+
+  // Add itself as network observer.
+  void StartObserveNetwork();
+  // Remove itself as network observer.
+  void StopObserveNetwork();
+
+  // Update display and given name in case it has changed.
+  void UpdateDisplayAndGivenName(
+      const authpolicy::ActiveDirectoryAccountInfo& account_info);
+
+  // Shows user notification to sign out/sign in.
+  void ShowNotification(int message_id);
+
+  // Call GetUserStatus if |network_state| is connected and the previous call
+  // failed.
+  void GetUserStatusIfConnected(const chromeos::NetworkState* network_state);
+
+  Profile* const profile_;
+  AccountId account_id_;
+  std::string display_name_;
+  std::string given_name_;
+  bool rerun_get_status_on_error_ = false;
+  bool is_observing_network_ = false;
+
+  // Stores message ids of shown notifications. Each notification is shown at
+  // most once.
+  std::set<int> shown_notifications_;
+  authpolicy::ErrorType last_error_ = authpolicy::ERROR_NONE;
+  base::CancelableClosure scheduled_get_user_status_call_;
+
+  base::WeakPtrFactory<AuthPolicyCredentialsManager> weak_factory_{this};
+  DISALLOW_COPY_AND_ASSIGN(AuthPolicyCredentialsManager);
+};
+
+// Singleton that owns all AuthPolicyCredentialsManagers and associates them
+// with BrowserContexts.
+class AuthPolicyCredentialsManagerFactory
+    : public BrowserContextKeyedServiceFactory {
+ public:
+  static AuthPolicyCredentialsManagerFactory* GetInstance();
+
+  static void BuildForProfileIfActiveDirectory(Profile* profile);
+
+ private:
+  friend struct base::DefaultSingletonTraits<
+      AuthPolicyCredentialsManagerFactory>;
+
+  AuthPolicyCredentialsManagerFactory();
+  ~AuthPolicyCredentialsManagerFactory() override;
+
+  KeyedService* BuildServiceInstanceFor(
+      content::BrowserContext* context) const override;
+
+  DISALLOW_COPY_AND_ASSIGN(AuthPolicyCredentialsManagerFactory);
+};
+
+#endif  // CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_
diff --git a/chrome/browser/password_manager/password_manager_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
index fcd2f186..113bf284 100644
--- a/chrome/browser/password_manager/password_manager_interactive_uitest.cc
+++ b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/password_manager/password_manager_test_base.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_commands.h"
 #include "components/password_manager/core/browser/test_password_store.h"
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/test_utils.h"
@@ -41,43 +41,22 @@
 
 namespace password_manager {
 
-// TODO(crbug.com/616627): Flaky on Mac, CrOS and Linux.
-#if defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_LINUX)
-#define MAYBE_UsernameChanged DISABLED_UsernameChanged
-#else
-#define MAYBE_UsernameChanged UsernameChanged
-#endif
-IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, MAYBE_UsernameChanged) {
+IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, UsernameChanged) {
+  // At first let us save a credential to the password store.
   scoped_refptr<password_manager::TestPasswordStore> password_store =
       static_cast<password_manager::TestPasswordStore*>(
           PasswordStoreFactory::GetForProfile(
               browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS).get());
+  autofill::PasswordForm signin_form;
+  signin_form.signon_realm = embedded_test_server()->base_url().spec();
+  signin_form.origin = embedded_test_server()->base_url();
+  signin_form.username_value = base::ASCIIToUTF16("temp");
+  signin_form.password_value = base::ASCIIToUTF16("random");
+  password_store->AddLogin(signin_form);
 
+  // Load the page to have the saved credentials autofilled.
   NavigateToFile("/password/signup_form.html");
 
-  NavigationObserver observer(WebContents());
-  std::unique_ptr<BubbleObserver> prompt_observer(
-      new BubbleObserver(WebContents()));
-  std::string fill_and_submit =
-      "document.getElementById('username_field').value = 'temp';"
-      "document.getElementById('password_field').value = 'random';"
-      "document.getElementById('input_submit_button').click()";
-  ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit));
-  observer.Wait();
-  EXPECT_TRUE(prompt_observer->IsShowingSavePrompt());
-  prompt_observer->AcceptSavePrompt();
-
-  // Spin the message loop to make sure the password store had a chance to save
-  // the password.
-  base::RunLoop run_loop;
-  run_loop.RunUntilIdle();
-  EXPECT_FALSE(password_store->IsEmpty());
-
-  // Reload the original page to have the saved credentials autofilled.
-  NavigationObserver reload_observer(WebContents());
-  NavigateToFile("/password/signup_form.html");
-  reload_observer.Wait();
-
   // Let the user interact with the page, so that DOM gets modification events,
   // needed for autofilling fields.
   content::SimulateMouseClickAt(
@@ -89,25 +68,25 @@
   // Change username and submit. This should add the characters "ORARY" to the
   // already autofilled username.
   SimulateUserTypingInField(RenderViewHost(), WebContents(), "username_field");
-  // TODO(gcasto): Not sure why this click is required.
-  content::SimulateMouseClickAt(
-      WebContents(), 0, blink::WebMouseEvent::Button::kLeft, gfx::Point(1, 1));
+
+  // Move the focus out of the inputs before waiting because WaitForElementValue
+  // uses "onchange" event. The event is triggered only when the control looses
+  // focus.
+  chrome::FocusLocationBar(browser());
   WaitForElementValue("username_field", "tempORARY");
 
-  NavigationObserver second_observer(WebContents());
-  std::unique_ptr<BubbleObserver> second_prompt_observer(
-      new BubbleObserver(WebContents()));
+  NavigationObserver navigation_observer(WebContents());
+  BubbleObserver prompt_observer(WebContents());
   std::string submit =
       "document.getElementById('input_submit_button').click();";
   ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), submit));
-  second_observer.Wait();
-  EXPECT_TRUE(second_prompt_observer->IsShowingSavePrompt());
-  second_prompt_observer->AcceptSavePrompt();
+  navigation_observer.Wait();
+  EXPECT_TRUE(prompt_observer.IsShowingSavePrompt());
+  prompt_observer.AcceptSavePrompt();
 
   // Spin the message loop to make sure the password store had a chance to save
   // the password.
-  base::RunLoop third_run_loop;
-  third_run_loop.RunUntilIdle();
+  WaitForPasswordStore();
   EXPECT_FALSE(password_store->IsEmpty());
 
   // Verify that there are two saved password, the old password and the new
diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h
index c7043bf..288facf 100644
--- a/chrome/browser/password_manager/password_manager_test_base.h
+++ b/chrome/browser/password_manager/password_manager_test_base.h
@@ -137,6 +137,10 @@
   // waits until the "change" event is fired for the element. This also
   // guarantees that once the real value matches the expected, the JavaScript
   // event loop is spun to allow all other possible events to take place.
+  // WARNING:
+  // - the function waits only for the first "onchange" event.
+  // - "onchange" event is triggered by autofill. However, if user's typing is
+  // simulated then the event is triggered only when control looses focus.
   void WaitForElementValue(const std::string& element_id,
                            const std::string& expected_value);
   // Same as above except the element |element_id| is in iframe |iframe_id|
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index d0d1044..70be446 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -130,6 +130,7 @@
 #include "ui/base/l10n/l10n_util.h"
 
 #if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h"
 #include "chrome/browser/chromeos/locale_change_guard.h"
 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
@@ -472,6 +473,7 @@
   configuration_policy_provider_ =
       policy::UserPolicyManagerFactoryChromeOS::CreateForProfile(
           this, force_immediate_policy_load, sequenced_task_runner);
+  AuthPolicyCredentialsManagerFactory::BuildForProfileIfActiveDirectory(this);
 #else
   configuration_policy_provider_ =
       policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext(
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index 19c2f957..81fe916 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -52,15 +52,13 @@
     SuggestionsService* suggestions,
     std::unique_ptr<PopularSites> popular_sites,
     std::unique_ptr<IconCacher> icon_cacher,
-    std::unique_ptr<MostVisitedSitesSupervisor> supervisor,
-    std::unique_ptr<HomePageClient> home_page_client)
+    std::unique_ptr<MostVisitedSitesSupervisor> supervisor)
     : prefs_(prefs),
       top_sites_(top_sites),
       suggestions_service_(suggestions),
       popular_sites_(std::move(popular_sites)),
       icon_cacher_(std::move(icon_cacher)),
       supervisor_(std::move(supervisor)),
-      home_page_client_(std::move(home_page_client)),
       observer_(nullptr),
       num_sites_(0u),
       top_sites_observer_(this),
@@ -74,21 +72,6 @@
     supervisor_->SetObserver(this);
 }
 
-MostVisitedSites::MostVisitedSites(
-    PrefService* prefs,
-    scoped_refptr<history::TopSites> top_sites,
-    SuggestionsService* suggestions,
-    std::unique_ptr<PopularSites> popular_sites,
-    std::unique_ptr<IconCacher> icon_cacher,
-    std::unique_ptr<MostVisitedSitesSupervisor> supervisor)
-    : MostVisitedSites(prefs,
-                       top_sites,
-                       suggestions,
-                       std::move(popular_sites),
-                       std::move(icon_cacher),
-                       std::move(supervisor),
-                       nullptr) {}
-
 MostVisitedSites::~MostVisitedSites() {
   if (supervisor_)
     supervisor_->SetObserver(nullptr);
@@ -111,6 +94,12 @@
   return false;
 }
 
+void MostVisitedSites::SetHomePageClient(
+    std::unique_ptr<HomePageClient> client) {
+  DCHECK(client);
+  home_page_client_ = std::move(client);
+}
+
 void MostVisitedSites::SetMostVisitedURLsObserver(Observer* observer,
                                                   size_t num_sites) {
   DCHECK(observer);
@@ -491,9 +480,11 @@
 
 bool MostVisitedSites::ShouldAddHomeTile() const {
   return base::FeatureList::IsEnabled(kPinHomePageAsTileFeature) &&
-         num_sites_ > 0u && home_page_client_ &&
+         num_sites_ > 0u &&
+         home_page_client_ &&  // No platform-specific implementation - no tile.
          home_page_client_->IsHomePageEnabled() &&
          !home_page_client_->IsNewTabPageUsedAsHomePage() &&
+         !home_page_client_->GetHomepageUrl().is_empty() &&
          !(top_sites_ &&
            top_sites_->IsBlacklisted(home_page_client_->GetHomepageUrl()));
 }
diff --git a/components/ntp_tiles/most_visited_sites.h b/components/ntp_tiles/most_visited_sites.h
index 271d6084..1da5e182 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -111,16 +111,6 @@
                    suggestions::SuggestionsService* suggestions,
                    std::unique_ptr<PopularSites> popular_sites,
                    std::unique_ptr<IconCacher> icon_cacher,
-                   std::unique_ptr<MostVisitedSitesSupervisor> supervisor,
-                   std::unique_ptr<HomePageClient> home_page_client);
-
-  // TODO(fhorschig): Adjust all factories and delete this.
-  // Constructs a MostVisitedSites instance without HomePageClient.
-  MostVisitedSites(PrefService* prefs,
-                   scoped_refptr<history::TopSites> top_sites,
-                   suggestions::SuggestionsService* suggestions,
-                   std::unique_ptr<PopularSites> popular_sites,
-                   std::unique_ptr<IconCacher> icon_cacher,
                    std::unique_ptr<MostVisitedSitesSupervisor> supervisor);
 
   ~MostVisitedSites() override;
@@ -143,6 +133,11 @@
   // must not be null.
   void SetMostVisitedURLsObserver(Observer* observer, size_t num_sites);
 
+  // Sets the client that provides platform-specific home page preferences.
+  // When used to replace an existing client, the new client will first be used
+  // during the construction of a new tile set.
+  void SetHomePageClient(std::unique_ptr<HomePageClient> client);
+
   // Requests an asynchronous refresh of the suggestions. Notifies the observer
   // if the request resulted in the set of tiles changing.
   void Refresh();
@@ -229,7 +224,7 @@
   std::unique_ptr<PopularSites> const popular_sites_;
   std::unique_ptr<IconCacher> const icon_cacher_;
   std::unique_ptr<MostVisitedSitesSupervisor> supervisor_;
-  std::unique_ptr<HomePageClient> const home_page_client_;
+  std::unique_ptr<HomePageClient> home_page_client_;
 
   Observer* observer_;
 
diff --git a/components/ntp_tiles/most_visited_sites_unittest.cc b/components/ntp_tiles/most_visited_sites_unittest.cc
index 4bd8bc9..c20ff799 100644
--- a/components/ntp_tiles/most_visited_sites_unittest.cc
+++ b/components/ntp_tiles/most_visited_sites_unittest.cc
@@ -213,14 +213,17 @@
 
 class FakeHomePageClient : public MostVisitedSites::HomePageClient {
  public:
-  FakeHomePageClient() : home_page_enabled_(false), ntp_is_homepage_(false) {}
+  FakeHomePageClient()
+      : home_page_enabled_(false),
+        ntp_is_homepage_(false),
+        home_page_url_(kHomePageUrl) {}
   ~FakeHomePageClient() override {}
 
   bool IsHomePageEnabled() const override { return home_page_enabled_; }
 
   bool IsNewTabPageUsedAsHomePage() const override { return ntp_is_homepage_; }
 
-  GURL GetHomepageUrl() const override { return GURL(kHomePageUrl); }
+  GURL GetHomepageUrl() const override { return home_page_url_; }
 
   void SetHomePageEnabled(bool home_page_enabled) {
     home_page_enabled_ = home_page_enabled;
@@ -230,9 +233,12 @@
     ntp_is_homepage_ = ntp_is_homepage;
   }
 
+  void SetHomePageUrl(GURL home_page_url) { home_page_url_ = home_page_url; }
+
  private:
   bool home_page_enabled_;
   bool ntp_is_homepage_;
+  GURL home_page_url_;
 };
 
 class MockIconCacher : public IconCacher {
@@ -367,13 +373,10 @@
           .Times(AtLeast(0));
     }
 
-    auto home_page_client = base::MakeUnique<FakeHomePageClient>();
-    home_page_client_ = home_page_client.get();
-
     most_visited_sites_ = base::MakeUnique<MostVisitedSites>(
         &pref_service_, mock_top_sites_, &mock_suggestions_service_,
         popular_sites_factory_.New(), std::move(icon_cacher),
-        /*supervisor=*/nullptr, std::move(home_page_client));
+        /*supervisor=*/nullptr);
   }
 
   bool IsPopularSitesEnabledViaVariations() const { return GetParam(); }
@@ -392,6 +395,13 @@
     return success;
   }
 
+  FakeHomePageClient* RegisterNewHomePageClient() {
+    auto home_page_client = base::MakeUnique<FakeHomePageClient>();
+    FakeHomePageClient* raw_client_ptr = home_page_client.get();
+    most_visited_sites_->SetHomePageClient(std::move(home_page_client));
+    return raw_client_ptr;
+  }
+
   void DisableRemoteSuggestions() {
     EXPECT_CALL(mock_suggestions_service_, AddCallback(_))
         .Times(AnyNumber())
@@ -415,7 +425,6 @@
   scoped_refptr<StrictMock<MockTopSites>> mock_top_sites_;
   StrictMock<MockSuggestionsService> mock_suggestions_service_;
   StrictMock<MockMostVisitedSitesObserver> mock_observer_;
-  FakeHomePageClient* home_page_client_;
   std::unique_ptr<MostVisitedSites> most_visited_sites_;
   base::test::ScopedFeatureList feature_list_;
   MockIconCacher* icon_cacher_;
@@ -430,7 +439,8 @@
 TEST_P(MostVisitedSitesTest, ShouldIncludeTileForHomePage) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
@@ -445,10 +455,26 @@
   base::RunLoop().RunUntilIdle();
 }
 
+TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageWithoutClient) {
+  base::test::ScopedFeatureList features;
+  features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
+  DisableRemoteSuggestions();
+  EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
+      .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
+  EXPECT_CALL(*mock_top_sites_, SyncWithHistory());
+  EXPECT_CALL(mock_observer_,
+              OnMostVisitedURLsAvailable(Not(Contains(
+                  MatchesTile("", kHomePageUrl, TileSource::HOMEPAGE)))));
+  most_visited_sites_->SetMostVisitedURLsObserver(&mock_observer_,
+                                                  /*num_sites=*/3);
+  base::RunLoop().RunUntilIdle();
+}
+
 TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfFeatureDisabled) {
   base::test::ScopedFeatureList features;
   features.InitAndDisableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
@@ -467,7 +493,8 @@
 TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfNoTileRequested) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
@@ -484,7 +511,8 @@
 TEST_P(MostVisitedSitesTest, ShouldReturnOnlyHomePageIfOneTileRequested) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(
@@ -504,7 +532,8 @@
 TEST_P(MostVisitedSitesTest, ShouldDeduplicateHomePageWithTopSites) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(
@@ -527,8 +556,9 @@
 TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfItIsNewTabPage) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
-  home_page_client_->SetNtpIsHomePage(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
+  home_page_client->SetNtpIsHomePage(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
@@ -547,7 +577,8 @@
 TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfThereIsNone) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(false);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(false);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
@@ -563,10 +594,33 @@
   base::RunLoop().RunUntilIdle();
 }
 
+TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfEmptyUrl) {
+  const std::string kEmptyHomePageUrl;
+  base::test::ScopedFeatureList features;
+  features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
+  home_page_client->SetHomePageUrl(GURL(kEmptyHomePageUrl));
+  DisableRemoteSuggestions();
+  EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
+      .WillRepeatedly(InvokeCallbackArgument<0>(MostVisitedURLList{}));
+  EXPECT_CALL(*mock_top_sites_, SyncWithHistory());
+  EXPECT_CALL(*mock_top_sites_, IsBlacklisted(Eq(kEmptyHomePageUrl)))
+      .Times(AnyNumber())
+      .WillRepeatedly(Return(false));
+  EXPECT_CALL(mock_observer_,
+              OnMostVisitedURLsAvailable(Not(
+                  FirstTileIs("", kEmptyHomePageUrl, TileSource::HOMEPAGE))));
+  most_visited_sites_->SetMostVisitedURLsObserver(&mock_observer_,
+                                                  /*num_sites=*/3);
+  base::RunLoop().RunUntilIdle();
+}
+
 TEST_P(MostVisitedSitesTest, ShouldNotIncludeHomePageIfBlacklisted) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
       .WillRepeatedly(InvokeCallbackArgument<0>(
@@ -591,7 +645,8 @@
 TEST_P(MostVisitedSitesTest, ShouldPinHomePageAgainIfBlacklistingUndone) {
   base::test::ScopedFeatureList features;
   features.InitAndEnableFeature(ntp_tiles::kPinHomePageAsTileFeature);
-  home_page_client_->SetHomePageEnabled(true);
+  FakeHomePageClient* home_page_client = RegisterNewHomePageClient();
+  home_page_client->SetHomePageEnabled(true);
 
   DisableRemoteSuggestions();
   EXPECT_CALL(*mock_top_sites_, GetMostVisitedURLs(_, false))
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 77be448..77b62d4a 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -504,26 +504,6 @@
 bool g_browser_main_loop_shutting_down = false;
 #endif
 
-// For measuring memory usage after each task. Behind a command line flag.
-class BrowserMainLoop::MemoryObserver : public base::MessageLoop::TaskObserver {
- public:
-  MemoryObserver() {}
-  ~MemoryObserver() override {}
-
-  void WillProcessTask(const base::PendingTask& pending_task) override {}
-
-  void DidProcessTask(const base::PendingTask& pending_task) override {
-    std::unique_ptr<base::ProcessMetrics> process_metrics(
-        base::ProcessMetrics::CreateCurrentProcessMetrics());
-    size_t private_bytes;
-    process_metrics->GetMemoryBytes(&private_bytes, NULL);
-    LOCAL_HISTOGRAM_MEMORY_KB("Memory.BrowserUsed", private_bytes >> 10);
-  }
- private:
-  DISALLOW_COPY_AND_ASSIGN(MemoryObserver);
-};
-
-
 // BrowserMainLoop construction / destruction =============================
 
 BrowserMainLoop* BrowserMainLoop::GetInstance() {
@@ -786,12 +766,6 @@
   }
 #endif
 
-  if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) {
-    TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver");
-    memory_observer_.reset(new MemoryObserver());
-    base::MessageLoop::current()->AddTaskObserver(memory_observer_.get());
-  }
-
   if (parsed_command_line_.HasSwitch(
           switches::kEnableAggressiveDOMStorageFlushing)) {
     TRACE_EVENT0("startup",
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index b143867..926fbb6 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -170,8 +170,6 @@
 #endif
 
  private:
-  class MemoryObserver;
-
   void InitializeMainThread();
 
   // Called just before creating the threads
@@ -246,8 +244,6 @@
   std::unique_ptr<ScreenOrientationDelegate> screen_orientation_delegate_;
 #endif
 
-  std::unique_ptr<MemoryObserver> memory_observer_;
-
   // Members initialized in |InitStartupTracingForDuration()| ------------------
   base::FilePath startup_trace_file_;
 
diff --git a/content/browser/renderer_host/media/audio_output_delegate_impl.cc b/content/browser/renderer_host/media/audio_output_delegate_impl.cc
index 3625fcb..2d41e509 100644
--- a/content/browser/renderer_host/media/audio_output_delegate_impl.cc
+++ b/content/browser/renderer_host/media/audio_output_delegate_impl.cc
@@ -12,6 +12,7 @@
 #include "content/browser/media/capture/audio_mirroring_manager.h"
 #include "content/browser/media/media_internals.h"
 #include "content/browser/renderer_host/media/audio_sync_reader.h"
+#include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/media_observer.h"
 #include "media/audio/audio_output_controller.h"
@@ -25,21 +26,24 @@
 class AudioOutputDelegateImpl::ControllerEventHandler
     : public media::AudioOutputController::EventHandler {
  public:
-  explicit ControllerEventHandler(
-      base::WeakPtr<AudioOutputDelegateImpl> delegate);
+  ControllerEventHandler(base::WeakPtr<AudioOutputDelegateImpl> delegate,
+                         int stream_id);
 
  private:
   void OnControllerCreated() override;
   void OnControllerPlaying() override;
   void OnControllerPaused() override;
   void OnControllerError() override;
+  void OnLog(const std::string& message) override;
 
   base::WeakPtr<AudioOutputDelegateImpl> delegate_;
+  const int stream_id_;  // Retained separately for logging.
 };
 
 AudioOutputDelegateImpl::ControllerEventHandler::ControllerEventHandler(
-    base::WeakPtr<AudioOutputDelegateImpl> delegate)
-    : delegate_(std::move(delegate)) {}
+    base::WeakPtr<AudioOutputDelegateImpl> delegate,
+    int stream_id)
+    : delegate_(std::move(delegate)), stream_id_(stream_id) {}
 
 void AudioOutputDelegateImpl::ControllerEventHandler::OnControllerCreated() {
   BrowserThread::PostTask(
@@ -68,6 +72,15 @@
       base::BindOnce(&AudioOutputDelegateImpl::OnError, delegate_));
 }
 
+void AudioOutputDelegateImpl::ControllerEventHandler::OnLog(
+    const std::string& message) {
+  std::ostringstream oss;
+  oss << "[stream_id=" << stream_id_ << "] " << message;
+  const std::string out_message = oss.str();
+  content::MediaStreamManager::SendMessageToNativeLog(out_message);
+  DVLOG(1) << out_message;
+}
+
 std::unique_ptr<media::AudioOutputDelegate> AudioOutputDelegateImpl::Create(
     EventHandler* handler,
     media::AudioManager* audio_manager,
@@ -118,8 +131,8 @@
   // Since the event handler never directly calls functions on |this| but rather
   // posts them to the IO thread, passing a pointer from the constructor is
   // safe.
-  controller_event_handler_ =
-      base::MakeUnique<ControllerEventHandler>(weak_factory_.GetWeakPtr());
+  controller_event_handler_ = base::MakeUnique<ControllerEventHandler>(
+      weak_factory_.GetWeakPtr(), stream_id_);
   audio_log_->OnCreated(stream_id, params, output_device_id);
   controller_ = media::AudioOutputController::Create(
       audio_manager, controller_event_handler_.get(), params, output_device_id,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index dde83fd..d18fd324 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2149,7 +2149,6 @@
     switches::kMainFrameResizesAreOrientationChanges,
     switches::kMaxUntiledLayerWidth,
     switches::kMaxUntiledLayerHeight,
-    switches::kMemoryMetrics,
     switches::kMojoLocalStorage,
     switches::kMSEAudioBufferSizeLimit,
     switches::kMSEVideoBufferSizeLimit,
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 94eaffa8..16abd8c9 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -610,7 +610,7 @@
 
 }  // namespace
 
-WebData BlinkPlatformImpl::LoadResource(const char* name) {
+WebData BlinkPlatformImpl::GetDataResource(const char* name) {
   // Some clients will call into this method with an empty |name| when they have
   // optional resources.  For example, the PopupMenuChromium code can have icons
   // for some Autofill items but not for others.
diff --git a/content/child/blink_platform_impl.h b/content/child/blink_platform_impl.h
index e43acb5..43a4aa5 100644
--- a/content/child/blink_platform_impl.h
+++ b/content/child/blink_platform_impl.h
@@ -84,7 +84,7 @@
   blink::WebThread* CurrentThread() override;
   void RecordAction(const blink::UserMetricsAction&) override;
 
-  blink::WebData LoadResource(const char* name) override;
+  blink::WebData GetDataResource(const char* name) override;
   blink::WebString QueryLocalizedString(
       blink::WebLocalizedString::Name name) override;
   virtual blink::WebString queryLocalizedString(
diff --git a/content/ppapi_plugin/ppapi_blink_platform_impl.cc b/content/ppapi_plugin/ppapi_blink_platform_impl.cc
index e9b8930..6ade0ca 100644
--- a/content/ppapi_plugin/ppapi_blink_platform_impl.cc
+++ b/content/ppapi_plugin/ppapi_blink_platform_impl.cc
@@ -218,7 +218,7 @@
   NOTREACHED();
 }
 
-blink::WebData PpapiBlinkPlatformImpl::LoadResource(const char* name) {
+blink::WebData PpapiBlinkPlatformImpl::GetDataResource(const char* name) {
   NOTREACHED();
   return blink::WebData();
 }
diff --git a/content/ppapi_plugin/ppapi_blink_platform_impl.h b/content/ppapi_plugin/ppapi_blink_platform_impl.h
index 84d29a5a..1db3cf4 100644
--- a/content/ppapi_plugin/ppapi_blink_platform_impl.h
+++ b/content/ppapi_plugin/ppapi_blink_platform_impl.h
@@ -47,7 +47,7 @@
   void GetPluginList(bool refresh,
                      const blink::WebSecurityOrigin& mainFrameOrigin,
                      blink::WebPluginListBuilder*) override;
-  blink::WebData LoadResource(const char* name) override;
+  blink::WebData GetDataResource(const char* name) override;
   std::unique_ptr<blink::WebStorageNamespace> CreateLocalStorageNamespace()
       override;
   virtual void dispatchStorageEvent(const blink::WebString& key,
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 0f91ff0b..22b857bc 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -626,10 +626,6 @@
 const char kMaxUntiledLayerHeight[]         = "max-untiled-layer-height";
 const char kMaxUntiledLayerWidth[]          = "max-untiled-layer-width";
 
-// Sample memory usage with high frequency and store the results to the
-// Renderer.Memory histogram. Used in memory tests.
-const char kMemoryMetrics[]                 = "memory-metrics";
-
 // Sets options for MHTML generator to skip no-store resources:
 //   "skip-nostore-main" - fails to save a page if main frame is 'no-store'
 //   "skip-nostore-all" - also skips no-store subresources.
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index eb66c49e..849e9fd 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -190,7 +190,6 @@
 CONTENT_EXPORT extern const char kMainFrameResizesAreOrientationChanges[];
 extern const char kMaxUntiledLayerHeight[];
 extern const char kMaxUntiledLayerWidth[];
-extern const char kMemoryMetrics[];
 CONTENT_EXPORT extern const char kMHTMLGeneratorOption[];
 CONTENT_EXPORT extern const char kMHTMLSkipNostoreMain[];
 CONTENT_EXPORT extern const char kMHTMLSkipNostoreAll[];
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc
index 2a61ac2f..8a931fb 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.cc
+++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -40,6 +40,8 @@
 using base::ASCIIToUTF16;
 using base::UTF16ToUTF8;
 using blink::WebAXObject;
+using blink::WebAXObjectAttribute;
+using blink::WebAXObjectVectorAttribute;
 using blink::WebDocument;
 using blink::WebElement;
 using blink::WebFloatRect;
@@ -95,13 +97,13 @@
     }
   }
 
-  void AddObjectAttribute(blink::WebAXObjectAttribute attribute,
-                          const blink::WebAXObject& value) override {
+  void AddObjectAttribute(WebAXObjectAttribute attribute,
+                          const WebAXObject& value) override {
     switch (attribute) {
-      case blink::WebAXObjectAttribute::kAriaActiveDescendant:
+      case WebAXObjectAttribute::kAriaActiveDescendant:
         dst_->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, value.AxID());
         break;
-      case blink::WebAXObjectAttribute::kAriaErrorMessage:
+      case WebAXObjectAttribute::kAriaErrorMessage:
         dst_->AddIntAttribute(ui::AX_ATTR_ERRORMESSAGE_ID, value.AxID());
         break;
       default:
@@ -110,18 +112,18 @@
   }
 
   void AddObjectVectorAttribute(
-      blink::WebAXObjectVectorAttribute attribute,
+      WebAXObjectVectorAttribute attribute,
       const blink::WebVector<WebAXObject>& value) override {
     switch (attribute) {
-      case blink::WebAXObjectVectorAttribute::kAriaControls:
+      case WebAXObjectVectorAttribute::kAriaControls:
         AddIntListAttributeFromWebObjects(ui::AX_ATTR_CONTROLS_IDS, value,
                                           dst_);
         break;
-      case blink::WebAXObjectVectorAttribute::kAriaDetails:
+      case WebAXObjectVectorAttribute::kAriaDetails:
         AddIntListAttributeFromWebObjects(ui::AX_ATTR_DETAILS_IDS, value,
                                           dst_);
         break;
-      case blink::WebAXObjectVectorAttribute::kAriaFlowTo:
+      case WebAXObjectVectorAttribute::kAriaFlowTo:
         AddIntListAttributeFromWebObjects(ui::AX_ATTR_FLOWTO_IDS, value, dst_);
         break;
       default:
@@ -217,7 +219,7 @@
   root_ = ComputeRoot();
 
   if (!document_.IsNull())
-    focus_ = document_.FocusedAccessibilityObject();
+    focus_ = WebAXObject::FromWebDocumentFocused(document_);
   else
     focus_ = WebAXObject();
 }
@@ -227,12 +229,12 @@
   frozen_ = false;
 }
 
-void BlinkAXTreeSource::SetRoot(blink::WebAXObject root) {
+void BlinkAXTreeSource::SetRoot(WebAXObject root) {
   CHECK(!frozen_);
   explicit_root_ = root;
 }
 
-bool BlinkAXTreeSource::IsInTree(blink::WebAXObject node) const {
+bool BlinkAXTreeSource::IsInTree(WebAXObject node) const {
   CHECK(frozen_);
   while (IsValid(node)) {
     if (node.Equals(root()))
@@ -295,29 +297,29 @@
   return true;
 }
 
-blink::WebAXObject BlinkAXTreeSource::GetRoot() const {
+WebAXObject BlinkAXTreeSource::GetRoot() const {
   if (frozen_)
     return root_;
   else
     return ComputeRoot();
 }
 
-blink::WebAXObject BlinkAXTreeSource::GetFromId(int32_t id) const {
-  return GetMainDocument().AccessibilityObjectFromID(id);
+WebAXObject BlinkAXTreeSource::GetFromId(int32_t id) const {
+  return WebAXObject::FromWebDocumentByID(GetMainDocument(), id);
 }
 
-int32_t BlinkAXTreeSource::GetId(blink::WebAXObject node) const {
+int32_t BlinkAXTreeSource::GetId(WebAXObject node) const {
   return node.AxID();
 }
 
 void BlinkAXTreeSource::GetChildren(
-    blink::WebAXObject parent,
-    std::vector<blink::WebAXObject>* out_children) const {
+    WebAXObject parent,
+    std::vector<WebAXObject>* out_children) const {
   CHECK(frozen_);
 
   if (parent.Role() == blink::kWebAXRoleStaticText) {
     int32_t focus_id = focus().AxID();
-    blink::WebAXObject ancestor = parent;
+    WebAXObject ancestor = parent;
     while (!ancestor.IsDetached()) {
       if (ancestor.AxID() == accessibility_focus_id_ ||
           (ancestor.AxID() == focus_id && ancestor.IsEditable())) {
@@ -334,7 +336,7 @@
     is_iframe = node.To<WebElement>().HasHTMLTagName("iframe");
 
   for (unsigned i = 0; i < parent.ChildCount(); i++) {
-    blink::WebAXObject child = parent.ChildAt(i);
+    WebAXObject child = parent.ChildAt(i);
 
     // The child may be invalid due to issues in blink accessibility code.
     if (child.IsDetached())
@@ -349,8 +351,7 @@
   }
 }
 
-blink::WebAXObject BlinkAXTreeSource::GetParent(
-    blink::WebAXObject node) const {
+WebAXObject BlinkAXTreeSource::GetParent(WebAXObject node) const {
   CHECK(frozen_);
 
   // Blink returns ignored objects when walking up the parent chain,
@@ -358,27 +359,26 @@
   // element.
   do {
     if (node.Equals(root()))
-      return blink::WebAXObject();
+      return WebAXObject();
     node = node.ParentObject();
   } while (!node.IsDetached() && node.AccessibilityIsIgnored());
 
   return node;
 }
 
-bool BlinkAXTreeSource::IsValid(blink::WebAXObject node) const {
+bool BlinkAXTreeSource::IsValid(WebAXObject node) const {
   return !node.IsDetached();  // This also checks if it's null.
 }
 
-bool BlinkAXTreeSource::IsEqual(blink::WebAXObject node1,
-                                blink::WebAXObject node2) const {
+bool BlinkAXTreeSource::IsEqual(WebAXObject node1, WebAXObject node2) const {
   return node1.Equals(node2);
 }
 
-blink::WebAXObject BlinkAXTreeSource::GetNull() const {
-  return blink::WebAXObject();
+WebAXObject BlinkAXTreeSource::GetNull() const {
+  return WebAXObject();
 }
 
-void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src,
+void BlinkAXTreeSource::SerializeNode(WebAXObject src,
                                       AXContentNodeData* dst) const {
   dst->role = AXRoleFromBlink(src.Role());
   dst->state = AXStateFromBlink(src);
@@ -402,7 +402,7 @@
   src.GetSparseAXAttributes(sparse_attribute_adapter);
 
   blink::WebAXNameFrom nameFrom;
-  blink::WebVector<blink::WebAXObject> nameObjects;
+  blink::WebVector<WebAXObject> nameObjects;
   blink::WebString web_name = src.GetName(nameFrom, nameObjects);
   if ((!web_name.IsEmpty() && !web_name.IsNull()) ||
       nameFrom == blink::kWebAXNameFromAttributeExplicitlyEmpty) {
@@ -413,7 +413,7 @@
   }
 
   blink::WebAXDescriptionFrom descriptionFrom;
-  blink::WebVector<blink::WebAXObject> descriptionObjects;
+  blink::WebVector<WebAXObject> descriptionObjects;
   blink::WebString web_description =
       src.Description(nameFrom, descriptionFrom, descriptionObjects);
   if (!web_description.IsEmpty()) {
@@ -448,7 +448,7 @@
       dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE, src.ColorValue());
 
     if (dst->role == ui::AX_ROLE_LINK) {
-      blink::WebAXObject target = src.InPageLinkTarget();
+      WebAXObject target = src.InPageLinkTarget();
       if (!target.IsNull()) {
         int32_t target_id = target.AxID();
         dst->AddIntAttribute(ui::AX_ATTR_IN_PAGE_LINK_TARGET_ID, target_id);
@@ -889,7 +889,7 @@
 
   WebDocument document = render_frame_->GetWebFrame()->GetDocument();
   if (!document.IsNull())
-    return document.AccessibilityObject();
+    return WebAXObject::FromWebDocument(document);
 
   return WebAXObject();
 }
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index 2e160d5..10a3299 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -118,7 +118,8 @@
     // It's possible that the webview has already loaded a webpage without
     // accessibility being enabled. Initialize the browser's cached
     // accessibility tree by sending it a notification.
-    HandleAXEvent(document.AccessibilityObject(), ui::AX_EVENT_LAYOUT_COMPLETE);
+    HandleAXEvent(WebAXObject::FromWebDocument(document),
+                  ui::AX_EVENT_LAYOUT_COMPLETE);
   }
 }
 
@@ -157,10 +158,10 @@
     // If there are any events in flight, |HandleAXEvent| will refuse to process
     // our new event.
     pending_events_.clear();
-    ui::AXEvent event = document.AccessibilityObject().IsLoaded()
-                            ? ui::AX_EVENT_LOAD_COMPLETE
-                            : ui::AX_EVENT_LAYOUT_COMPLETE;
-    HandleAXEvent(document.AccessibilityObject(), event);
+    auto webax_object = WebAXObject::FromWebDocument(document);
+    ui::AXEvent event = webax_object.IsLoaded() ? ui::AX_EVENT_LOAD_COMPLETE
+                                                : ui::AX_EVENT_LAYOUT_COMPLETE;
+    HandleAXEvent(webax_object, event);
   }
 }
 
@@ -211,7 +212,7 @@
   if (node.IsNull()) {
     // When focus is cleared, implicitly focus the document.
     // TODO(dmazzoni): Make Blink send this notification instead.
-    HandleAXEvent(document.AccessibilityObject(), ui::AX_EVENT_BLUR);
+    HandleAXEvent(WebAXObject::FromWebDocument(document), ui::AX_EVENT_BLUR);
   }
 }
 
@@ -246,9 +247,9 @@
       // TODO(dmazzoni): remove this as soon as
       // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed.
       last_scroll_offset_ = scroll_offset;
-      if (!obj.Equals(document.AccessibilityObject())) {
-        HandleAXEvent(document.AccessibilityObject(),
-                      ui::AX_EVENT_LAYOUT_COMPLETE);
+      auto webax_object = WebAXObject::FromWebDocument(document);
+      if (!obj.Equals(webax_object)) {
+        HandleAXEvent(webax_object, ui::AX_EVENT_LAYOUT_COMPLETE);
       }
     }
   }
@@ -375,7 +376,7 @@
     if (event.event_type == ui::AX_EVENT_LAYOUT_COMPLETE)
       had_layout_complete_messages = true;
 
-    WebAXObject obj = document.AccessibilityObjectFromID(event.id);
+    auto obj = WebAXObject::FromWebDocumentByID(document, event.id);
 
     // Make sure the object still exists.
     if (!obj.UpdateLayoutAndCheckValidity())
@@ -497,13 +498,13 @@
   if (document.IsNull())
     return;
 
-  WebAXObject root = document.AccessibilityObject();
+  auto root = WebAXObject::FromWebDocument(document);
   if (!root.UpdateLayoutAndCheckValidity())
     return;
 
-  WebAXObject target = document.AccessibilityObjectFromID(data.target_node_id);
-  WebAXObject anchor = document.AccessibilityObjectFromID(data.anchor_node_id);
-  WebAXObject focus = document.AccessibilityObjectFromID(data.focus_node_id);
+  auto target = WebAXObject::FromWebDocumentByID(document, data.target_node_id);
+  auto anchor = WebAXObject::FromWebDocumentByID(document, data.anchor_node_id);
+  auto focus = WebAXObject::FromWebDocumentByID(document, data.focus_node_id);
 
   switch (data.action) {
     case ui::AX_ACTION_BLUR:
@@ -589,7 +590,7 @@
   const WebDocument& document = GetMainDocument();
   if (document.IsNull())
     return;
-  WebAXObject root_obj = document.AccessibilityObject();
+  auto root_obj = WebAXObject::FromWebDocument(document);
   if (!root_obj.UpdateLayoutAndCheckValidity())
     return;
 
@@ -661,10 +662,10 @@
   if (!document.IsNull()) {
     // Tree-only mode gets used by the automation extension API which requires a
     // load complete event to invoke listener callbacks.
-    ui::AXEvent evt = document.AccessibilityObject().IsLoaded()
-                          ? ui::AX_EVENT_LOAD_COMPLETE
-                          : ui::AX_EVENT_LAYOUT_COMPLETE;
-    HandleAXEvent(document.AccessibilityObject(), evt);
+    auto webax_object = WebAXObject::FromWebDocument(document);
+    ui::AXEvent evt = webax_object.IsLoaded() ? ui::AX_EVENT_LOAD_COMPLETE
+                                              : ui::AX_EVENT_LAYOUT_COMPLETE;
+    HandleAXEvent(webax_object, evt);
   }
 }
 
@@ -719,7 +720,7 @@
   if (document.IsNull())
     return;
 
-  document.AccessibilityObject().ScrollToMakeVisibleWithSubFocus(
+  WebAXObject::FromWebDocument(document).ScrollToMakeVisibleWithSubFocus(
       WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()));
 }
 
diff --git a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
index 29687e86..d9c4d005 100644
--- a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
+++ b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
@@ -126,7 +126,7 @@
   // we should only send 1 node to the browser.
   sink_->ClearMessages();
   WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
-  WebAXObject root_obj = document.AccessibilityObject();
+  WebAXObject root_obj = WebAXObject::FromWebDocument(document);
   accessibility->HandleAXEvent(
       root_obj,
       ui::AX_EVENT_LAYOUT_COMPLETE);
@@ -144,7 +144,7 @@
   // leak any of the old BrowserTreeNodes.
   LoadHTML(html.c_str());
   document = view()->GetWebView()->MainFrame()->GetDocument();
-  root_obj = document.AccessibilityObject();
+  root_obj = WebAXObject::FromWebDocument(document);
   sink_->ClearMessages();
   accessibility->HandleAXEvent(
       root_obj,
@@ -157,7 +157,7 @@
   // the browser doesn't have the root element.
   LoadHTML(html.c_str());
   document = view()->GetWebView()->MainFrame()->GetDocument();
-  root_obj = document.AccessibilityObject();
+  root_obj = WebAXObject::FromWebDocument(document);
   sink_->ClearMessages();
   const WebAXObject& first_child = root_obj.ChildAt(0);
   accessibility->HandleAXEvent(
@@ -188,7 +188,7 @@
   EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser());
 
   WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
-  WebAXObject root_obj = document.AccessibilityObject();
+  WebAXObject root_obj = WebAXObject::FromWebDocument(document);
   WebAXObject node_a = root_obj.ChildAt(0);
   WebAXObject node_b = node_a.ChildAt(0);
   WebAXObject node_c = node_b.ChildAt(0);
@@ -246,7 +246,7 @@
 
   sink_->ClearMessages();
   WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
-  WebAXObject root_obj = document.AccessibilityObject();
+  WebAXObject root_obj = WebAXObject::FromWebDocument(document);
   WebAXObject node_a = root_obj.ChildAt(0);
   WebAXObject node_b = node_a.ChildAt(0);
   WebAXObject node_c = node_b.ChildAt(0);
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 875bb9d..74ae9287 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -60,7 +60,6 @@
 #include "content/child/blob_storage/blob_message_filter.h"
 #include "content/child/child_histogram_message_filter.h"
 #include "content/child/child_resource_message_filter.h"
-#include "content/child/content_child_helpers.h"
 #include "content/child/db_message_filter.h"
 #include "content/child/indexed_db/indexed_db_dispatcher.h"
 #include "content/child/memory/child_memory_coordinator_impl.h"
@@ -422,22 +421,6 @@
 
 }  // namespace
 
-// For measuring memory usage after each task. Behind a command line flag.
-class MemoryObserver : public base::MessageLoop::TaskObserver {
- public:
-  MemoryObserver() {}
-  ~MemoryObserver() override {}
-
-  void WillProcessTask(const base::PendingTask& pending_task) override {}
-
-  void DidProcessTask(const base::PendingTask& pending_task) override {
-    LOCAL_HISTOGRAM_MEMORY_KB("Memory.RendererUsed", GetMemoryUsageKB());
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(MemoryObserver);
-};
-
 RenderThreadImpl::HistogramCustomizer::HistogramCustomizer() {
   custom_histograms_.insert("V8.MemoryExternalFragmentationTotal");
   custom_histograms_.insert("V8.MemoryHeapSampleTotalCommitted");
@@ -1243,11 +1226,6 @@
   SkGraphics::SetImageGeneratorFromEncodedDataFactory(
       blink::WebImageGenerator::Create);
 
-  if (command_line.HasSwitch(switches::kMemoryMetrics)) {
-    memory_observer_.reset(new MemoryObserver());
-    message_loop()->AddTaskObserver(memory_observer_.get());
-  }
-
   if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
     std::string allowed_ports =
         command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index ca3afbf..5d57ec6 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -127,7 +127,6 @@
 class FrameSwapMessageQueue;
 class IndexedDBDispatcher;
 class InputHandlerManager;
-class MemoryObserver;
 class MidiMessageFilter;
 class P2PSocketDispatcher;
 class PeerConnectionDependencyFactory;
@@ -722,7 +721,6 @@
 
   std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
 
-  std::unique_ptr<MemoryObserver> memory_observer_;
   std::unique_ptr<ChildMemoryCoordinatorImpl> memory_coordinator_;
 
   std::unique_ptr<ui::Gpu> gpu_;
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index a540286..5ac16ec 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -715,12 +715,12 @@
       static_cast<url::Origin>(security_origin));
 }
 
-bool RendererBlinkPlatformImpl::LoadAudioResource(
+bool RendererBlinkPlatformImpl::DecodeAudioFileData(
     blink::WebAudioBus* destination_bus,
     const char* audio_file_data,
     size_t data_size) {
-  return DecodeAudioFileData(
-      destination_bus, audio_file_data, data_size);
+  return content::DecodeAudioFileData(destination_bus, audio_file_data,
+                                      data_size);
 }
 
 //------------------------------------------------------------------------------
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index b931470c..e0821e2 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -151,9 +151,9 @@
       const blink::WebString& input_device_id,
       const blink::WebSecurityOrigin& security_origin) override;
 
-  bool LoadAudioResource(blink::WebAudioBus* destination_bus,
-                         const char* audio_file_data,
-                         size_t data_size) override;
+  bool DecodeAudioFileData(blink::WebAudioBus* destination_bus,
+                           const char* audio_file_data,
+                           size_t data_size) override;
 
   std::unique_ptr<blink::WebMIDIAccessor> CreateMIDIAccessor(
       blink::WebMIDIAccessorClient* client) override;
diff --git a/content/shell/test_runner/accessibility_controller.cc b/content/shell/test_runner/accessibility_controller.cc
index efd270b..e2e26c8 100644
--- a/content/shell/test_runner/accessibility_controller.cc
+++ b/content/shell/test_runner/accessibility_controller.cc
@@ -216,20 +216,22 @@
     return v8::Local<v8::Object>();
 
   blink::WebAXObject focused_element =
-      frame->GetDocument().FocusedAccessibilityObject();
+      blink::WebAXObject::FromWebDocumentFocused(frame->GetDocument());
   if (focused_element.IsNull())
-    focused_element = web_view()->AccessibilityObject();
+    focused_element = blink::WebAXObject::FromWebView(*web_view());
   return elements_.GetOrCreate(focused_element);
 }
 
 v8::Local<v8::Object> AccessibilityController::RootElement() {
-  blink::WebAXObject root_element = web_view()->AccessibilityObject();
+  blink::WebAXObject root_element =
+      blink::WebAXObject::FromWebView(*web_view());
   return elements_.GetOrCreate(root_element);
 }
 
 v8::Local<v8::Object> AccessibilityController::AccessibleElementById(
     const std::string& id) {
-  blink::WebAXObject root_element = web_view()->AccessibilityObject();
+  blink::WebAXObject root_element =
+      blink::WebAXObject::FromWebView(*web_view());
 
   if (!root_element.UpdateLayoutAndCheckValidity())
     return v8::Local<v8::Object>();
diff --git a/extensions/renderer/api/automation/automation_api_helper.cc b/extensions/renderer/api/automation/automation_api_helper.cc
index 45a5d27f..45c6202 100644
--- a/extensions/renderer/api/automation/automation_api_helper.cc
+++ b/extensions/renderer/api/automation/automation_api_helper.cc
@@ -58,7 +58,7 @@
   blink::WebNode start_node = document;
   if (acc_obj_id > 0) {
     blink::WebAXObject start_acc_obj =
-        document.AccessibilityObjectFromID(acc_obj_id);
+        blink::WebAXObject::FromWebDocumentByID(document, acc_obj_id);
     if (start_acc_obj.IsNull()) {
       error.value =
           ExtensionHostMsg_AutomationQuerySelector_Error::kNodeDestroyed;
diff --git a/ios/chrome/browser/sessions/session_service_ios.h b/ios/chrome/browser/sessions/session_service_ios.h
index c37bd8b..ad52b25 100644
--- a/ios/chrome/browser/sessions/session_service_ios.h
+++ b/ios/chrome/browser/sessions/session_service_ios.h
@@ -11,6 +11,8 @@
 
 @class SessionIOS;
 
+using SessionIOSFactory = SessionIOS* (^)();
+
 // A singleton service for saving the current session. Can either save on a
 // delay or immediately. Saving is always performed on a separate thread.
 @interface SessionServiceIOS : NSObject
@@ -24,12 +26,12 @@
     (const scoped_refptr<base::SequencedTaskRunner>&)taskRunner
     NS_DESIGNATED_INITIALIZER;
 
-// Saves the session represented by |session| to |directory|. If |immediately|
+// Saves the session returned by |factory| to |directory|. If |immediately|
 // is NO, the save is done after a delay. If another call is pending, this one
 // is ignored. If YES, the save is done now, cancelling any pending calls.
 // Either way, the save is done on a separate thread to avoid blocking the UI
 // thread.
-- (void)saveSession:(SessionIOS*)sessionWindow
+- (void)saveSession:(SessionIOSFactory)factory
           directory:(NSString*)directory
         immediately:(BOOL)immediately;
 
diff --git a/ios/chrome/browser/sessions/session_service_ios.mm b/ios/chrome/browser/sessions/session_service_ios.mm
index c115856..da0a6b6 100644
--- a/ios/chrome/browser/sessions/session_service_ios.mm
+++ b/ios/chrome/browser/sessions/session_service_ios.mm
@@ -74,7 +74,7 @@
   scoped_refptr<base::SequencedTaskRunner> _taskRunner;
 
   // Maps session path to the pending session for the delayed save behaviour.
-  NSMutableDictionary<NSString*, SessionIOS*>* _pendingSessions;
+  NSMutableDictionary<NSString*, SessionIOSFactory>* _pendingSessions;
 }
 
 #pragma mark - NSObject overrides
@@ -108,12 +108,12 @@
   return self;
 }
 
-- (void)saveSession:(SessionIOS*)session
+- (void)saveSession:(SessionIOSFactory)factory
           directory:(NSString*)directory
         immediately:(BOOL)immediately {
   NSString* sessionPath = [[self class] sessionPathForDirectory:directory];
   BOOL hadPendingSession = [_pendingSessions objectForKey:sessionPath] != nil;
-  [_pendingSessions setObject:session forKey:sessionPath];
+  [_pendingSessions setObject:factory forKey:sessionPath];
   if (immediately) {
     [NSObject cancelPreviousPerformRequestsWithTarget:self];
     [self performSaveToPathInBackground:sessionPath];
@@ -194,8 +194,9 @@
 
   // Serialize to NSData on the main thread to avoid accessing potentially
   // non-threadsafe objects on a background thread.
-  SessionIOS* session = [_pendingSessions objectForKey:sessionPath];
+  SessionIOSFactory factory = [_pendingSessions objectForKey:sessionPath];
   [_pendingSessions removeObjectForKey:sessionPath];
+  SessionIOS* session = factory();
 
   @try {
     NSData* sessionData = [NSKeyedArchiver archivedDataWithRootObject:session];
diff --git a/ios/chrome/browser/sessions/session_service_ios_unittest.mm b/ios/chrome/browser/sessions/session_service_ios_unittest.mm
index 51eede12..9abff44 100644
--- a/ios/chrome/browser/sessions/session_service_ios_unittest.mm
+++ b/ios/chrome/browser/sessions/session_service_ios_unittest.mm
@@ -70,21 +70,24 @@
     return base::SysUTF8ToNSString(session_path.AsUTF8Unsafe());
   }
 
-  // Create a SessionIOS corresponding to |window_count| windows each with
-  // |tab_count| tabs.
-  SessionIOS* CreateSession(NSUInteger window_count, NSUInteger tab_count) {
-    NSMutableArray<SessionWindowIOS*>* windows = [NSMutableArray array];
-    while (windows.count < window_count) {
-      NSMutableArray<CRWSessionStorage*>* tabs = [NSMutableArray array];
-      while (tabs.count < tab_count) {
-        [tabs addObject:[[CRWSessionStorage alloc] init]];
+  // Create a SessionIOSFactory creating a SessionIOS with |window_count|
+  // windows each with |tab_count| tabs.
+  SessionIOSFactory CreateSessionFactory(NSUInteger window_count,
+                                         NSUInteger tab_count) {
+    return ^{
+      NSMutableArray<SessionWindowIOS*>* windows = [NSMutableArray array];
+      while (windows.count < window_count) {
+        NSMutableArray<CRWSessionStorage*>* tabs = [NSMutableArray array];
+        while (tabs.count < tab_count) {
+          [tabs addObject:[[CRWSessionStorage alloc] init]];
+        }
+        [windows addObject:[[SessionWindowIOS alloc]
+                               initWithSessions:[tabs copy]
+                                  selectedIndex:(tabs.count ? tabs.count - 1
+                                                            : NSNotFound)]];
       }
-      [windows addObject:[[SessionWindowIOS alloc]
-                             initWithSessions:[tabs copy]
-                                selectedIndex:(tabs.count ? tabs.count - 1
-                                                          : NSNotFound)]];
-    }
-    return [[SessionIOS alloc] initWithWindows:[windows copy]];
+      return [[SessionIOS alloc] initWithWindows:[windows copy]];
+    };
   }
 
   SessionServiceIOS* session_service() { return session_service_; }
@@ -106,7 +109,7 @@
 }
 
 TEST_F(SessionServiceTest, SaveSessionWindowToPath) {
-  [session_service() saveSession:CreateSession(0u, 0u)
+  [session_service() saveSession:CreateSessionFactory(0u, 0u)
                        directory:directory()
                      immediately:YES];
 
@@ -125,7 +128,7 @@
                                                          attributes:nil
                                                               error:nullptr]);
 
-  [session_service() saveSession:CreateSession(0u, 0u)
+  [session_service() saveSession:CreateSessionFactory(0u, 0u)
                        directory:directory()
                      immediately:YES];
 
@@ -145,7 +148,7 @@
 }
 
 TEST_F(SessionServiceTest, LoadSessionFromDirectory) {
-  [session_service() saveSession:CreateSession(2u, 1u)
+  [session_service() saveSession:CreateSessionFactory(2u, 1u)
                        directory:directory()
                      immediately:YES];
 
@@ -164,7 +167,7 @@
 }
 
 TEST_F(SessionServiceTest, LoadSessionFromPath) {
-  [session_service() saveSession:CreateSession(2u, 1u)
+  [session_service() saveSession:CreateSessionFactory(2u, 1u)
                        directory:directory()
                      immediately:YES];
 
diff --git a/ios/chrome/browser/sessions/test_session_service.mm b/ios/chrome/browser/sessions/test_session_service.mm
index 34f61ed..dd9098d3c 100644
--- a/ios/chrome/browser/sessions/test_session_service.mm
+++ b/ios/chrome/browser/sessions/test_session_service.mm
@@ -19,11 +19,11 @@
   return [super initWithTaskRunner:base::ThreadTaskRunnerHandle::Get()];
 }
 
-- (void)saveSession:(SessionIOS*)session
+- (void)saveSession:(SessionIOSFactory)factory
           directory:(NSString*)directory
         immediately:(BOOL)immediately {
   NSString* sessionPath = [[self class] sessionPathForDirectory:directory];
-  NSData* data = [NSKeyedArchiver archivedDataWithRootObject:session];
+  NSData* data = [NSKeyedArchiver archivedDataWithRootObject:factory()];
   if (self.performIO)
     [self performSaveSessionData:data sessionPath:sessionPath];
 }
diff --git a/ios/chrome/browser/tabs/tab_model.mm b/ios/chrome/browser/tabs/tab_model.mm
index 193dd1f..2fcb7308 100644
--- a/ios/chrome/browser/tabs/tab_model.mm
+++ b/ios/chrome/browser/tabs/tab_model.mm
@@ -376,7 +376,11 @@
     return;
   NSString* statePath =
       base::SysUTF8ToNSString(_browserState->GetStatePath().AsUTF8Unsafe());
-  [_sessionService saveSession:self.sessionForSaving
+  __weak TabModel* weakSelf = self;
+  SessionIOSFactory sessionFactory = ^{
+    return weakSelf.sessionForSaving;
+  };
+  [_sessionService saveSession:sessionFactory
                      directory:statePath
                    immediately:immediately];
 }
diff --git a/ios/chrome/browser/translate/after_translate_infobar_controller.mm b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
index 36d1a4e..e4d57c1c 100644
--- a/ios/chrome/browser/translate/after_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
@@ -15,8 +15,17 @@
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/gfx/image/image.h"
 
+namespace {
+enum AlwaysTranslateSwitchState {
+  ALWAYS_TRANSLATE_SWITCH_NOT_CHANGED,
+  ALWAYS_TRANSLATE_SWITCH_SET_TO_ENABLED,
+  ALWAYS_TRANSLATE_SWITCH_SET_TO_DISABLED,
+};
+}  // namespace
+
 @interface AfterTranslateInfoBarController () {
   translate::TranslateInfoBarDelegate* _translateInfoBarDelegate;  // weak
+  AlwaysTranslateSwitchState _alwaysTranslateSwitchState;
 }
 
 // Action for any of the user defined buttons.
@@ -77,6 +86,7 @@
                    target:self
                    action:@selector(infoBarButtonDidPress:)];
   // Always translate switch.
+  _alwaysTranslateSwitchState = ALWAYS_TRANSLATE_SWITCH_NOT_CHANGED;
   if (_translateInfoBarDelegate->ShouldShowAlwaysTranslateShortcut()) {
     base::string16 alwaysTranslate = l10n_util::GetStringFUTF16(
         IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE, stdOriginal);
@@ -107,6 +117,8 @@
     } else {
       DCHECK(buttonId == TranslateInfoBarIOSTag::AFTER_REVERT ||
              buttonId == TranslateInfoBarIOSTag::AFTER_DONE);
+      if (buttonId == TranslateInfoBarIOSTag::AFTER_DONE)
+        [self saveAlwaysTranslateState];
       self.delegate->InfoBarButtonDidPress(buttonId);
     }
   }
@@ -115,8 +127,23 @@
 - (void)infoBarSwitchDidPress:(id)sender {
   DCHECK_EQ(TranslateInfoBarIOSTag::ALWAYS_TRANSLATE_SWITCH, [sender tag]);
   DCHECK([sender respondsToSelector:@selector(isOn)]);
-  if (_translateInfoBarDelegate->ShouldAlwaysTranslate() != [sender isOn])
-    _translateInfoBarDelegate->ToggleAlwaysTranslate();
+  _alwaysTranslateSwitchState = [sender isOn]
+                                    ? ALWAYS_TRANSLATE_SWITCH_SET_TO_ENABLED
+                                    : ALWAYS_TRANSLATE_SWITCH_SET_TO_DISABLED;
+}
+
+#pragma mark - Private methods
+
+- (void)saveAlwaysTranslateState {
+  if (_alwaysTranslateSwitchState == ALWAYS_TRANSLATE_SWITCH_NOT_CHANGED)
+    return;
+
+  const bool alwaysTranslate =
+      _alwaysTranslateSwitchState == ALWAYS_TRANSLATE_SWITCH_SET_TO_ENABLED;
+  if (alwaysTranslate == _translateInfoBarDelegate->ShouldAlwaysTranslate())
+    return;
+
+  _translateInfoBarDelegate->ToggleAlwaysTranslate();
 }
 
 @end
diff --git a/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.h b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.h
index ed69309..6a0cb29 100644
--- a/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.h
+++ b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.h
@@ -11,6 +11,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/weak_ptr.h"
 #import "ios/shared/chrome/browser/ui/browser_list/browser_list_session_service.h"
 #import "ios/web/public/web_state/web_state.h"
 
@@ -54,6 +55,10 @@
   CreateWebStateCallback create_web_state_;
   std::unique_ptr<BrowserListObserver> observer_;
 
+  // Used to ensure that the block passed to SessionServiceIOS does not access
+  // this object once it has been destroyed.
+  base::WeakPtrFactory<BrowserListSessionServiceImpl> weak_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(BrowserListSessionServiceImpl);
 };
 
diff --git a/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.mm b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.mm
index 4604cdf..b1e164d 100644
--- a/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.mm
+++ b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service_impl.mm
@@ -197,7 +197,8 @@
     : browser_list_(browser_list),
       session_directory_([session_directory copy]),
       session_service_(session_service),
-      create_web_state_(create_web_state) {
+      create_web_state_(create_web_state),
+      weak_factory_(this) {
   DCHECK(browser_list_);
   DCHECK(session_directory_);
   DCHECK(session_service_);
@@ -269,15 +270,25 @@
 void BrowserListSessionServiceImpl::ScheduleSaveSession(bool immediately) {
   DCHECK(browser_list_) << "ScheduleSaveSession called after Shutdown.";
   DCHECK_GE(browser_list_->count(), 0);
-  const int count = browser_list_->count();
-  NSMutableArray<SessionWindowIOS*>* windows =
-      [NSMutableArray arrayWithCapacity:static_cast<NSUInteger>(count)];
-  for (int index = 0; index < count; ++index) {
-    Browser* browser = browser_list_->GetBrowserAtIndex(index);
-    [windows addObject:SerializeWebStateList(&browser->web_state_list())];
-  }
 
-  [session_service_ saveSession:[[SessionIOS alloc] initWithWindows:windows]
+  base::WeakPtr<BrowserListSessionServiceImpl> weak_ptr =
+      weak_factory_.GetWeakPtr();
+  SessionIOSFactory session_factory = ^SessionIOS*() {
+    BrowserListSessionServiceImpl* service = weak_ptr.get();
+    if (!weak_ptr)
+      return nil;
+
+    const int count = service->browser_list_->count();
+    NSMutableArray<SessionWindowIOS*>* windows =
+        [NSMutableArray arrayWithCapacity:static_cast<NSUInteger>(count)];
+    for (int index = 0; index < count; ++index) {
+      Browser* browser = service->browser_list_->GetBrowserAtIndex(index);
+      [windows addObject:SerializeWebStateList(&browser->web_state_list())];
+    }
+    return [[SessionIOS alloc] initWithWindows:windows];
+  };
+
+  [session_service_ saveSession:session_factory
                       directory:session_directory_
                     immediately:immediately];
 }
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc
index 1445790..e4ecaa92 100644
--- a/media/audio/audio_output_controller.cc
+++ b/media/audio/audio_output_controller.cc
@@ -12,6 +12,7 @@
 #include "base/bind.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/numerics/safe_conversions.h"
+#include "base/strings/stringprintf.h"
 #include "base/task_runner_util.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
@@ -21,6 +22,10 @@
 using base::TimeDelta;
 
 namespace media {
+namespace {
+// Time in seconds between two successive measurements of audio power levels.
+constexpr int kPowerMonitorLogIntervalSeconds = 15;
+}  // namespace
 
 AudioOutputController::AudioOutputController(
     AudioManager* audio_manager,
@@ -107,6 +112,8 @@
   DCHECK(message_loop_->BelongsToCurrentThread());
   SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CreateTime");
   TRACE_EVENT0("audio", "AudioOutputController::DoCreate");
+  handler_->OnLog(base::StringPrintf("AOC::DoCreate (for device change: %s)",
+                                     is_for_device_change ? "yes" : "no"));
 
   // Close() can be called before DoCreate() is executed.
   if (state_ == kClosed)
@@ -151,6 +158,7 @@
   DCHECK(message_loop_->BelongsToCurrentThread());
   SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.PlayTime");
   TRACE_EVENT0("audio", "AudioOutputController::DoPlay");
+  handler_->OnLog("AOC::DoPlay");
 
   // We can start from created or paused state.
   if (state_ != kCreated && state_ != kPaused)
@@ -161,6 +169,10 @@
 
   state_ = kPlaying;
 
+  if (will_monitor_audio_levels()) {
+    last_audio_level_log_time_ = base::TimeTicks::Now();
+  }
+
   stream_->Start(this);
 
   // For UMA tracking purposes, start the wedge detection timer.  This allows us
@@ -189,6 +201,10 @@
     wedge_timer_.reset();
     stream_->Stop();
 
+    if (will_monitor_audio_levels()) {
+      LogAudioPowerLevel("StopStream");
+    }
+
     // A stopped stream is silent, and power_montior_.Scan() is no longer being
     // called; so we must reset the power monitor.
     power_monitor_.Reset();
@@ -201,6 +217,7 @@
   DCHECK(message_loop_->BelongsToCurrentThread());
   SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.PauseTime");
   TRACE_EVENT0("audio", "AudioOutputController::DoPause");
+  handler_->OnLog("AOC::DoPause");
 
   StopStream();
 
@@ -219,6 +236,7 @@
   DCHECK(message_loop_->BelongsToCurrentThread());
   SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CloseTime");
   TRACE_EVENT0("audio", "AudioOutputController::DoClose");
+  handler_->OnLog("AOC::DoClose");
 
   if (state_ != kClosed) {
     DoStopCloseAndClearStream();
@@ -282,9 +300,17 @@
             std::move(copy), reference_time));
   }
 
-  if (will_monitor_audio_levels())
+  if (will_monitor_audio_levels()) {
     power_monitor_.Scan(*dest, frames);
 
+    const auto now = base::TimeTicks::Now();
+    if ((now - last_audio_level_log_time_).InSeconds() >
+        kPowerMonitorLogIntervalSeconds) {
+      LogAudioPowerLevel("OnMoreData");
+      last_audio_level_log_time_ = now;
+    }
+  }
+
   return frames;
 }
 
@@ -307,6 +333,13 @@
   (*duplication_targets_.begin())->OnData(std::move(audio_bus), reference_time);
 }
 
+void AudioOutputController::LogAudioPowerLevel(const std::string& call_name) {
+  std::pair<float, bool> power_and_clip =
+      power_monitor_.ReadCurrentPowerAndClip();
+  handler_->OnLog(base::StringPrintf("AOC::%s: average audio level=%.2f dBFS",
+                                     call_name.c_str(), power_and_clip.first));
+}
+
 void AudioOutputController::OnError() {
   {
     base::AutoLock auto_lock(error_lock_);
@@ -353,6 +386,27 @@
   SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.DeviceChangeTime");
   TRACE_EVENT0("audio", "AudioOutputController::OnDeviceChange");
 
+  auto state_to_string = [](State state) {
+    switch (state) {
+      case AudioOutputController::kEmpty:
+        return "empty";
+      case AudioOutputController::kCreated:
+        return "created";
+      case AudioOutputController::kPlaying:
+        return "playing";
+      case AudioOutputController::kPaused:
+        return "paused";
+      case AudioOutputController::kClosed:
+        return "closed";
+      case AudioOutputController::kError:
+        return "error";
+    };
+    return "unknown";
+  };
+
+  handler_->OnLog(base::StringPrintf("AOC::OnDeviceChange while in state: %s",
+                                     state_to_string(state_)));
+
   // TODO(dalecurtis): Notify the renderer side that a device change has
   // occurred.  Currently querying the hardware information here will lead to
   // crashes on OSX.  See http://crbug.com/158170.
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index e67e5d88..19fba1f 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -75,6 +75,7 @@
     virtual void OnControllerPlaying() = 0;
     virtual void OnControllerPaused() = 0;
     virtual void OnControllerError() = 0;
+    virtual void OnLog(const std::string& message) = 0;
 
    protected:
     virtual ~EventHandler() {}
@@ -221,6 +222,9 @@
   void BroadcastDataToDuplicationTargets(std::unique_ptr<AudioBus> audio_bus,
                                          base::TimeTicks reference_time);
 
+  // Log the current average power level measured by power_monitor_.
+  void LogAudioPowerLevel(const std::string& call_name);
+
   AudioManager* const audio_manager_;
   const AudioParameters params_;
   EventHandler* const handler_;
@@ -255,6 +259,9 @@
   // Scans audio samples from OnMoreData() as input to compute power levels.
   AudioPowerMonitor power_monitor_;
 
+  // Updated each time a power measurement is logged.
+  base::TimeTicks last_audio_level_log_time_;
+
   // Flags when we've asked for a stream to start but it never did.
   base::AtomicRefCount on_more_io_data_called_;
   std::unique_ptr<base::OneShotTimer> wedge_timer_;
diff --git a/media/audio/audio_output_controller_unittest.cc b/media/audio/audio_output_controller_unittest.cc
index 84e3c6f..2919808 100644
--- a/media/audio/audio_output_controller_unittest.cc
+++ b/media/audio/audio_output_controller_unittest.cc
@@ -53,6 +53,7 @@
   MOCK_METHOD0(OnControllerPlaying, void());
   MOCK_METHOD0(OnControllerPaused, void());
   MOCK_METHOD0(OnControllerError, void());
+  MOCK_METHOD1(OnLog, void(const std::string&));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockAudioOutputControllerEventHandler);
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
index aabe5bd..2d993c7 100644
--- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
+++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
@@ -53,7 +53,7 @@
     return (internal_bytes + compressed_bytes) / 1024;
   }
 #elif defined(OS_WIN)
-  return os_dump.platform_private_footprint.private_bytes;
+  return os_dump.platform_private_footprint.private_bytes / 1024;
 #else
   return 0;
 #endif
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 2a19876..6e5b1d3 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -122,6 +122,8 @@
 #### external/wpt/css/css-position-3
 crbug.com/702927 external/wpt/css/css-position-3/position-sticky-table-tr-top.html [ Failure ]
 crbug.com/702927 external/wpt/css/css-position-3/position-sticky-table-tr-bottom.html [ Failure ]
+crbug.com/728527 external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom.html [ Failure ]
+crbug.com/728527 external/wpt/css/css-position-3/position-sticky-table-thead-top.html [ Failure ]
 
 # ====== Layout team owned tests from here ======
 
@@ -1333,8 +1335,8 @@
 crbug.com/492664 external/wpt/css/css-writing-modes-3/table-progression-vrl-003.html [ Failure ]
 crbug.com/492664 external/wpt/css/css-writing-modes-3/table-progression-vrl-004.html [ Failure ]
 
-# Test sometimes flakes on most platforms
-crbug.com/571531 external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html [ Pass Failure ]
+# An animated manual test that should not be run
+crbug.com/728522 external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html [ Skip ]
 
 crbug.com/637055 fast/css/outline-offset-large.html [ Skip ]
 
@@ -2127,7 +2129,6 @@
 crbug.com/724251 virtual/threaded/animations/svg-attribute-interpolation/svg-startOffset-interpolation.html [ Failure Pass ]
 
 # ====== New tests from wpt-importer added here ======
-crbug.com/626703 external/wpt/scroll-into-view/check-scroll-position.html [ Timeout ]
 crbug.com/626703 external/wpt/2dcontext/building-paths/canvas_complexshapes_arcto_001.htm [ Failure ]
 crbug.com/626703 external/wpt/2dcontext/building-paths/canvas_complexshapes_beziercurveto_001.htm [ Failure ]
 crbug.com/626703 external/wpt/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_11.html [ Failure ]
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 e7dfc5c6..ab52d16 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
@@ -4,7 +4,7 @@
 
 
 PASS typeof(nav.getBattery()) == 'object' is true
-PASS nav.getBattery() is undefined.
+Error Code is 18
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html
index 3caf6e05..58cbb5d 100644
--- a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html
+++ b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html
@@ -18,8 +18,15 @@
         w.close();
         w = null;
     } else if (event.data == "closed") {
-        shouldBeUndefined("nav.getBattery()");
-        finishJSTest();
+      nav.getBattery().then(battery => {
+        assert_unreachable('getBattery should reject on a closed window');
+      })
+      .catch(error => {
+        // DOMException.SECURITY_ERR = 18.
+        debug('Error Code is ' + error.code);
+        assert_equals(error.code, DOMException.SECURITY_ERR);
+      });
+      setTimeout(finishJSTest, 0);
     }
 }
 
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index 96816a1..2effa99f 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -355,6 +355,12 @@
      {}
     ]
    ],
+   "css/css-flexbox-1/css-flexbox-height-animation-stretch.html": [
+    [
+     "/css/css-flexbox-1/css-flexbox-height-animation-stretch.html",
+     {}
+    ]
+   ],
    "css/css-flexbox-1/interactive/flexbox_interactive_break-after-column-item.html": [
     [
      "/css/css-flexbox-1/interactive/flexbox_interactive_break-after-column-item.html",
@@ -2071,6 +2077,12 @@
      {}
     ]
    ],
+   "fullscreen/model/move-to-iframe-manual.html": [
+    [
+     "/fullscreen/model/move-to-iframe-manual.html",
+     {}
+    ]
+   ],
    "fullscreen/model/remove-child-manual.html": [
     [
      "/fullscreen/model/remove-child-manual.html",
@@ -4281,6 +4293,18 @@
      {}
     ]
    ],
+   "css-font-display/font-display.html": [
+    [
+     "/css-font-display/font-display.html",
+     [
+      [
+       "/css-font-display/font-display-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/CSS2/abspos/abspos-containing-block-initial-001.xht": [
     [
      "/css/CSS2/abspos/abspos-containing-block-initial-001.xht",
@@ -24409,6 +24433,18 @@
      {}
     ]
    ],
+   "css/css-flexbox-1/align-items-006.html": [
+    [
+     "/css/css-flexbox-1/align-items-006.html",
+     [
+      [
+       "/css/css-flexbox-1/reference/align-content-001-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-flexbox-1/align-self-001.html": [
     [
      "/css/css-flexbox-1/align-self-001.html",
@@ -24625,18 +24661,6 @@
      {}
     ]
    ],
-   "css/css-flexbox-1/css-flexbox-height-animation-stretch.html": [
-    [
-     "/css/css-flexbox-1/css-flexbox-height-animation-stretch.html",
-     [
-      [
-       "/css/css-flexbox-1/css-flexbox-height-animation-stretch-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "css/css-flexbox-1/css-flexbox-img-expand-evenly.html": [
     [
      "/css/css-flexbox-1/css-flexbox-img-expand-evenly.html",
@@ -30853,6 +30877,18 @@
      {}
     ]
    ],
+   "css/css-position-3/position-sticky-table-tfoot-bottom.html": [
+    [
+     "/css/css-position-3/position-sticky-table-tfoot-bottom.html",
+     [
+      [
+       "/css/css-position-3/position-sticky-table-tfoot-bottom-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-position-3/position-sticky-table-th-bottom.html": [
     [
      "/css/css-position-3/position-sticky-table-th-bottom.html",
@@ -30901,6 +30937,18 @@
      {}
     ]
    ],
+   "css/css-position-3/position-sticky-table-thead-top.html": [
+    [
+     "/css/css-position-3/position-sticky-table-thead-top.html",
+     [
+      [
+       "/css/css-position-3/position-sticky-table-thead-top-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-position-3/position-sticky-table-tr-bottom.html": [
     [
      "/css/css-position-3/position-sticky-table-tr-bottom.html",
@@ -31045,6 +31093,18 @@
      {}
     ]
    ],
+   "css/css-scoping-1/css-scoping-shadow-host-namespace.html": [
+    [
+     "/css/css-scoping-1/css-scoping-shadow-host-namespace.html",
+     [
+      [
+       "/css/css-scoping-1/reference/green-box.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-scoping-1/css-scoping-shadow-host-rule.html": [
     [
      "/css/css-scoping-1/css-scoping-shadow-host-rule.html",
@@ -65709,6 +65769,16 @@
      {}
     ]
    ],
+   "css-font-display/font-display-ref.html": [
+    [
+     {}
+    ]
+   ],
+   "css-font-display/resources/slow-ahem-loading.py": [
+    [
+     {}
+    ]
+   ],
    "css-timing/cubic-bezier-timing-functions-output-expected.txt": [
     [
      {}
@@ -70929,6 +70999,11 @@
      {}
     ]
    ],
+   "css/css-grid-1/support/check-layout-th.js": [
+    [
+     {}
+    ]
+   ],
    "css/css-position-3/position-sticky-bottom-ref.html": [
     [
      {}
@@ -70944,6 +71019,11 @@
      {}
     ]
    ],
+   "css/css-position-3/position-sticky-table-tfoot-bottom-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-position-3/position-sticky-table-th-bottom-ref.html": [
     [
      {}
@@ -70964,6 +71044,11 @@
      {}
     ]
    ],
+   "css/css-position-3/position-sticky-table-thead-top-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-position-3/position-sticky-table-tr-bottom-ref.html": [
     [
      {}
@@ -91399,11 +91484,6 @@
      {}
     ]
    ],
-   "html/semantics/forms/resetting-a-form/reset-form-2-expected.txt": [
-    [
-     {}
-    ]
-   ],
    "html/semantics/forms/resetting-a-form/reset-form-event-realm-expected.txt": [
     [
      {}
@@ -92024,6 +92104,11 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/crossorigin-common.js": [
     [
      {}
@@ -92079,6 +92164,26 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js": [
     [
      {}
@@ -92164,6 +92269,26 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/export-something-nested.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/export-something.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/fetch-error-2.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/import-something-namespace.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/imports-a.js": [
     [
      {}
@@ -92219,11 +92344,61 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/missing-export-nested.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/missing-export.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/nested-missing-export.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js": [
     [
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/syntaxerror.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/this-nested.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/this.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/throw-nested.js": [
+    [
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/throw.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/resources/cocoa-module.js": [
     [
      {}
@@ -95699,11 +95874,6 @@
      {}
     ]
    ],
-   "payment-request/payment-request-constructor.https-expected.txt": [
-    [
-     {}
-    ]
-   ],
    "payment-request/payment-request-response-id.html": [
     [
      {}
@@ -114815,6 +114985,12 @@
      {}
     ]
    ],
+   "content-security-policy/embedded-enforcement/subsumption_algorithm-nonces.html": [
+    [
+     "/content-security-policy/embedded-enforcement/subsumption_algorithm-nonces.html",
+     {}
+    ]
+   ],
    "content-security-policy/embedded-enforcement/subsumption_algorithm-none.html": [
     [
      "/content-security-policy/embedded-enforcement/subsumption_algorithm-none.html",
@@ -116621,6 +116797,294 @@
      {}
     ]
    ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-001.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-001.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-002.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-002.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-003.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-003.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-004.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-004.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-005.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-005.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-006.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-006.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-007.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-007.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-008.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-008.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-009.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-009.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-010.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-010.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-011.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-011.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-012.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-012.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-013.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-013.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-014.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-014.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-015.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-015.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-016.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-016.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html",
+     {}
+    ]
+   ],
+   "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html": [
+    [
+     "/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html",
+     {}
+    ]
+   ],
    "css/css-grid-1/grid-definition/grid-inline-support-flexible-lengths-001.html": [
     [
      "/css/css-grid-1/grid-definition/grid-inline-support-flexible-lengths-001.html",
@@ -129191,6 +129655,18 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/compilation-error-1.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/compilation-error-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html",
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/crossorigin.html": [
     [
      "/html/semantics/scripting-1/the-script-element/module/crossorigin.html",
@@ -129209,6 +129685,30 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html",
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/execorder.html": [
     [
      "/html/semantics/scripting-1/the-script-element/module/execorder.html",
@@ -129217,6 +129717,24 @@
      }
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/fetch-error-1.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/fetch-error-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html",
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/imports.html": [
     [
      "/html/semantics/scripting-1/the-script-element/module/imports.html",
@@ -129229,12 +129747,72 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/late-namespace-request.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/late-star-export-request.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html",
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/script-for-event.html": [
     [
      "/html/semantics/scripting-1/the-script-element/module/script-for-event.html",
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html",
+     {}
+    ]
+   ],
+   "html/semantics/scripting-1/the-script-element/module/specifier-error.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/specifier-error.html",
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/nomodule-reflect.html": [
     [
      "/html/semantics/scripting-1/the-script-element/nomodule-reflect.html",
@@ -152041,12 +152619,6 @@
      {}
     ]
    ],
-   "scroll-into-view/check-scroll-position.html": [
-    [
-     "/scroll-into-view/check-scroll-position.html",
-     {}
-    ]
-   ],
    "secure-contexts/basic-dedicated-worker.html": [
     [
      "/secure-contexts/basic-dedicated-worker.html",
@@ -162085,7 +162657,7 @@
    "support"
   ],
   "./lint.whitelist": [
-   "bd7dbd60c482c98cdeff4ed8e4a6c31124c0c941",
+   "cfcc4a6cafa1cc4411d5aab437b5fd508dd4faa0",
    "support"
   ],
   "./update-built-tests.sh": [
@@ -171856,6 +172428,10 @@
    "1381a56b34e81c8c91ba4346a4ef439a4fdaa3ae",
    "testharness"
   ],
+  "content-security-policy/embedded-enforcement/subsumption_algorithm-nonces.html": [
+   "442b6a3683f9ca20f8ec38478c664d61538ada44",
+   "testharness"
+  ],
   "content-security-policy/embedded-enforcement/subsumption_algorithm-none.html": [
    "ac13f4c20df8be2d89ac9ca0adff01bf80be2946",
    "testharness"
@@ -171889,7 +172465,7 @@
    "support"
   ],
   "content-security-policy/embedded-enforcement/support/echo-required-csp.py": [
-   "62d9dea4eeff29c6802e854a5eb97cc4ebdcddf1",
+   "3ece10b38406736c7ca5cd0c1b5fb9e8088ef655",
    "support"
   ],
   "content-security-policy/embedded-enforcement/support/testharness-helper.sub.js": [
@@ -173296,6 +173872,18 @@
    "0df70baded35ef70ab7395c8933ba7e1d041aa85",
    "testharness"
   ],
+  "css-font-display/font-display-ref.html": [
+   "26fcc2758c649ce922397cd1c4aa862bdbf1e6a0",
+   "support"
+  ],
+  "css-font-display/font-display.html": [
+   "d83914326318602ce0eef5f248254a391b338df0",
+   "reftest"
+  ],
+  "css-font-display/resources/slow-ahem-loading.py": [
+   "aac16c1e618841ebdd28463adf5688ca837b9d57",
+   "support"
+  ],
   "css-font-loading/fontfacesetloadevent-constructor.html": [
    "ad355c3d5220c1b938182241a8e8abe030ace699",
    "testharness"
@@ -184144,6 +184732,10 @@
    "d5e39cc8afacb90baa48cf7ae41d499f817e7426",
    "reftest"
   ],
+  "css/css-flexbox-1/align-items-006.html": [
+   "b309758484c1b6ec774f47166f97cfbd9258e687",
+   "reftest"
+  ],
   "css/css-flexbox-1/align-self-001.html": [
    "74fad615303053096f9af7ec697f4584dee9900e",
    "reftest"
@@ -184233,8 +184825,8 @@
    "support"
   ],
   "css/css-flexbox-1/css-flexbox-height-animation-stretch.html": [
-   "54d979d8a3f42eb09c2af1080ba9535e56036ae7",
-   "reftest"
+   "920082e81b7c98f1fb8a039d3e47295f3780ef61",
+   "manual"
   ],
   "css/css-flexbox-1/css-flexbox-img-expand-evenly.html": [
    "081f592d13347f9e6c028bf1504787202f6f948e",
@@ -187456,6 +188048,198 @@
    "6446e5dede7383a43ac46b8083b6012b312a8124",
    "reftest"
   ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-001.html": [
+   "4ebbf6afe7452b5a61c9a475b7beb3958dd39ee5",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-002.html": [
+   "a1b58d6358acae0e0a4d48ec2e896b5a86b296bf",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-003.html": [
+   "3d0b16a4ad5d537fa2728e630bf81d8a55303cd4",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-004.html": [
+   "71f1966a0c3f899dd3b2601d225ec5683514e296",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-005.html": [
+   "c95fbde16d02ff01eab5e39a1f9b66ab5d0ca88c",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-006.html": [
+   "3bf926a4638e8a7a36d255e3a54c2b33e978c850",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-007.html": [
+   "00a3a65a3028898decd5b33dc749d1d4b61c05f5",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-008.html": [
+   "f7058e3180965b0b85b83d66cc3623e4d6ed081c",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-009.html": [
+   "c56e42e2c7726204f112bc124adf6bf4e75e1c83",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-010.html": [
+   "cbec5d103a8c29e5af97a54fe856c250ced3ee69",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-011.html": [
+   "b2556efc42d96830190ef6bbe0fdeef7c939cd76",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-012.html": [
+   "7700cff07f4930e4453c7dabef98ff41dd85f04b",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-013.html": [
+   "64c4f341755b5bef5772cc164427033fbf3d44f3",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-014.html": [
+   "e7f19c6990b60e8d527089d600d0b5d585f37d42",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-015.html": [
+   "516f95b9ab855414499423cc0b6354b37735c428",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-016.html": [
+   "4e6a1caea23ac6a54e2e6f5fd9585d574dd615aa",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html": [
+   "ba37dd2cb887de2c6a577e7ad538f588f6c2a6b5",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html": [
+   "2a88930bce761a86b84bc39cbbb9c6c4fb1ade6f",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html": [
+   "1a598d7e5c0a63aedb6fa83a81084707a97082bd",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html": [
+   "aba771e25d3801ea42786fd006e5e444605fed9e",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html": [
+   "45aee24069e89a238c99b61ee905ab516fc1fe4e",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html": [
+   "481ed2e3a960f5e3da1dde22245d1da6f33cd344",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html": [
+   "62b193d96908b1950ad8d7ff994e7f0718b3a9f1",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html": [
+   "55f131bf1a0566068b0882ec90cd37e257b9b28a",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html": [
+   "d2ae2b5839c06f483740ee96fbd718110515d095",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html": [
+   "90cbedb0e00ad7da4b3d9627804d668e160935eb",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html": [
+   "53f3a18185535c7310df5ba9132e63cad8daa651",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html": [
+   "170a800b282312f4f4e35845b4d6009b3e491ca4",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html": [
+   "ec7e80425ea1e5df487f43d62d1bbf8e5774d294",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html": [
+   "66d1929467cee9b75c05c30f1be0b29969646b1d",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html": [
+   "d22228744c0dfab1d541361812317680c8e6db34",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html": [
+   "6a5b4f1e3f8713ec386971b90c152844a1963153",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html": [
+   "f3839a8b379099186f499886a2687d879941e553",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html": [
+   "f2e48ba123603f1617302a842d13b41f8a134791",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html": [
+   "9cf06a6284b8ea46a451b750b634800edf0a263e",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html": [
+   "ee801dc782b31539787b108e2249163648fb9476",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html": [
+   "595f81d3ca4465d53968b1a5e7d2c5ef9364e1d7",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html": [
+   "d824792aa48927230d5d79413d6b31ff9e6a9044",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html": [
+   "7875a1c3f5bd7ed5f9bc6d57ee55a74eae70d08c",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html": [
+   "a91f9d4cd8375f9a3843df68c1699be43464a519",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html": [
+   "b34bf92f1eb907ed1cae789ca5d0526180746a8d",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html": [
+   "923c6fbd83ef1df81c92f3b818d5ed6bc8545eb8",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html": [
+   "30701ba96fd590d43fa4d69e2393493812950a9e",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html": [
+   "eb4d83cc9c0053fd305994ce7eeb7015a75a85d3",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html": [
+   "3d1e1bd37812a4707305255afa4ff94433995771",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html": [
+   "746b1f48171561ad5aacc7ce282592fefbb2ab3e",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html": [
+   "a913de9564b2e44fec43b66177cc6b94cb174a08",
+   "testharness"
+  ],
+  "css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html": [
+   "749d78928a228bb67878b3c088d36bcfd010aa08",
+   "testharness"
+  ],
   "css/css-grid-1/grid-definition/fr-unit-with-percentage.html": [
    "e29ef66eb632f1f9834df3233f741fb51fed5eea",
    "reftest"
@@ -188072,6 +188856,10 @@
    "feb53485e24aeaf9a5f27be5e42cc4a6fc5b8df0",
    "support"
   ],
+  "css/css-grid-1/support/check-layout-th.js": [
+   "a9d8444db24ab38518f07a965a8a537cc6add437",
+   "support"
+  ],
   "css/css-position-3/position-sticky-bottom-ref.html": [
    "726d6e927d84669e9355701ccd948349d377e6fd",
    "support"
@@ -188096,6 +188884,14 @@
    "f79c0e3e99085e483652950b141fe15c3c4d01d8",
    "reftest"
   ],
+  "css/css-position-3/position-sticky-table-tfoot-bottom-ref.html": [
+   "b902bec7e12fd6d9cad02c61f332a44f5818f8ee",
+   "support"
+  ],
+  "css/css-position-3/position-sticky-table-tfoot-bottom.html": [
+   "4caf24ad5f783119598d52b40425ae3433b61da6",
+   "reftest"
+  ],
   "css/css-position-3/position-sticky-table-th-bottom-ref.html": [
    "14d74f652a67cad449bd7ef75ed18bd906ba3bf0",
    "support"
@@ -188128,6 +188924,14 @@
    "2c8ba01d6ac81c8ddeb45a256a8be920e362b149",
    "reftest"
   ],
+  "css/css-position-3/position-sticky-table-thead-top-ref.html": [
+   "a2b03215ddc3aed6bc81ed678f6339d72132d4df",
+   "support"
+  ],
+  "css/css-position-3/position-sticky-table-thead-top.html": [
+   "2c3d4dd8028d7d79f74aa1460c57f10d087a45f0",
+   "reftest"
+  ],
   "css/css-position-3/position-sticky-table-tr-bottom-ref.html": [
    "77fcc16040cff06c53f18cfe96296f495b752c18",
    "support"
@@ -188220,6 +189024,10 @@
    "950840eb2f4e22a4777a0dbc1a66f6f8461914ef",
    "reftest"
   ],
+  "css/css-scoping-1/css-scoping-shadow-host-namespace.html": [
+   "629d0d70c08938c47265cfbe2491a3a1390112d7",
+   "reftest"
+  ],
   "css/css-scoping-1/css-scoping-shadow-host-rule.html": [
    "b37a0c87400f50feaa44718a1e16f298500bcc83",
    "reftest"
@@ -209573,7 +210381,7 @@
    "testharness"
   ],
   "eventsource/eventsource-cross-origin.htm": [
-   "968a3083770ed51e8875e59cde05a1591fb359e6",
+   "6bc3997aa73b5664920a0ca656db5f52538ab771",
    "testharness"
   ],
   "eventsource/eventsource-eventtarget.htm": [
@@ -210805,7 +211613,7 @@
    "testharness"
   ],
   "fullscreen/api/document-exit-fullscreen-manual.html": [
-   "673d72414fab3dbb677d21a05008d9014daf71bf",
+   "398a52fc8728e07771249c017baf0c1867c4ea44",
    "manual"
   ],
   "fullscreen/api/document-exit-fullscreen-nested-in-iframe-manual.html": [
@@ -210893,7 +211701,7 @@
    "testharness"
   ],
   "fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html": [
-   "307a1e92f3bdb16c5da71cf9710eb667b0bd507b",
+   "870575cb59c5a7f76097e19da8b3854120d6cb86",
    "manual"
   ],
   "fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt": [
@@ -210909,7 +211717,7 @@
    "support"
   ],
   "fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html": [
-   "412ea81c4697594c9cc63709ef29ea2abc3c10d7",
+   "d797dc061a01a11ec0d308f3f27b6ba837f52f2f",
    "manual"
   ],
   "fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt": [
@@ -210925,11 +211733,11 @@
    "support"
   ],
   "fullscreen/api/element-request-fullscreen-and-remove-manual.html": [
-   "5153805ee2b098649ddced4ae8f22b37db6600bf",
+   "86c1ac20aa86e860cfa8f05a9873f3a3cddbdcd9",
    "manual"
   ],
   "fullscreen/api/element-request-fullscreen-manual.html": [
-   "6b9c17d77529ea1b49d60317a72eda8cb79f0dd5",
+   "ed7683b3c4a7134b640e07a7329a21361b122402",
    "manual"
   ],
   "fullscreen/api/element-request-fullscreen-non-top-manual.html": [
@@ -210937,7 +211745,7 @@
    "manual"
   ],
   "fullscreen/api/element-request-fullscreen-not-allowed.html": [
-   "6ac16e4af17eaa3f16fa3cb04836fe28edb6016c",
+   "8991e8df530fa7c24a9e084f2ab17fa9c70fb120",
    "testharness"
   ],
   "fullscreen/api/element-request-fullscreen-same-manual.html": [
@@ -211000,24 +211808,28 @@
    "f6f0dbc8a505896a0e7ec7aca2746bbd5c1eb7d9",
    "testharness"
   ],
+  "fullscreen/model/move-to-iframe-manual.html": [
+   "818cb1b5db729db4959591dc75d4bb1ae3c7542d",
+   "manual"
+  ],
   "fullscreen/model/remove-child-manual.html": [
    "b1142930c6c972057213bd477cf116fcc9e7fc2a",
    "manual"
   ],
   "fullscreen/model/remove-first-manual.html": [
-   "1314c7133a51ddfa76fd562775ec7fe40ceb0977",
+   "3de98ae96822370fa80c1b8d61df254910a63ff9",
    "manual"
   ],
   "fullscreen/model/remove-last-manual.html": [
-   "322a0397f483ee04789ccca2bc242364212ec885",
+   "8caa21a892edeaba9996a7f2bf1c670385e0a91b",
    "manual"
   ],
   "fullscreen/model/remove-parent-manual.html": [
-   "895db7a5857479e83ce431b18e499df87e940690",
+   "e5791db04ab5e2b75a00c922457fcc8ba87c7ce7",
    "manual"
   ],
   "fullscreen/model/remove-single-manual.html": [
-   "ddc429f4b1cd9f906ee934ec3bc20f6c17e32622",
+   "c7fc8323d503adb6d7f0c390a8add90c5c9e8082",
    "manual"
   ],
   "fullscreen/trusted-click.js": [
@@ -222324,10 +223136,6 @@
    "2b9329c270fb73a2ab60f5e9549afdfa91a13522",
    "testharness"
   ],
-  "html/semantics/forms/resetting-a-form/reset-form-2-expected.txt": [
-   "1bbdbef29a0de14c8d12ce76c9205c45ecc604a2",
-   "support"
-  ],
   "html/semantics/forms/resetting-a-form/reset-form-2.html": [
    "6f9c1879eab27d8e54273d73eeffe815d0483935",
    "testharness"
@@ -223556,6 +224364,18 @@
    "12842b6e600ac2fc737718d8a9ba3385ed8b678b",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js": [
+   "4014bf8d2c024f3c9bc8d90595fa9af7786fed3e",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/compilation-error-1.html": [
+   "e36eda2e9941e0cfefbfd867d36da6de4dfe7b2e",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/compilation-error-2.html": [
+   "fe3191547b7292f0c486febe0cef930a0a8fa590",
+   "testharness"
+  ],
   "html/semantics/scripting-1/the-script-element/module/crossorigin-common.js": [
    "a58804b6e2495f99ec3f8b7894ff52186a49a427",
    "support"
@@ -223608,6 +224428,22 @@
    "6bd1fff05e91002539688b03eff9d7313e0de9dc",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js": [
+   "00e8e5ec0b5bd3b3e8735bb38ceb5749a5090efa",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js": [
+   "05790f5b907949c6f3cea9f9e2b07c957fbf4c64",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js": [
+   "8754ccc2192b6ff241bdfed2ff4a32c68f096c87",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js": [
+   "32b68baebfa9d82753f186ff34789922b1467e81",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js": [
    "ff9af4e5253db096cd5de8d2e7ed74cd05ed2561",
    "support"
@@ -223644,6 +224480,22 @@
    "ffd411f153c55abf313fba5ab349b6a0cc50ba0f",
    "testharness"
   ],
+  "html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html": [
+   "896463b228f17bac6cac54fc9ec4d786f8e73779",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html": [
+   "20c9cd678fb90c4e7bc5df6355a54f2026f23e92",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html": [
+   "c1b6698493ad56bb8759671f2e515deac4756b7c",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html": [
+   "d80e7d18efba685f2003dc790a5399e8c00541d2",
+   "testharness"
+  ],
   "html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered2.js": [
    "9a7d69437d3dda9d5f5de30cf917365d660b85ac",
    "support"
@@ -223684,6 +224536,34 @@
    "2180793400b87fa0793a9e30ec35608bc156a25e",
    "testharness"
   ],
+  "html/semantics/scripting-1/the-script-element/module/export-something-nested.js": [
+   "83de43bdd4d71d0e350c55df4c70ffbde2711ddd",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/export-something.js": [
+   "9c097dd9b8f8055c18e5c4ab832cd4a18b8dce30",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/fetch-error-1.html": [
+   "8ff8d8764eabdff075cda09743de5eeb26e8d3b8",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/fetch-error-2.html": [
+   "d18b06bd5835cba56ca070637d649e002b1aadbb",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/fetch-error-2.js": [
+   "aeee3b59817843111b37ec65d643a09e1ea7d77a",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/import-something-namespace.js": [
+   "3488bcae45d3094858fad47be6c3b21bfc3ac402",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html": [
+   "ecd62e08242206bfe40c5729e2dc0042e2172e50",
+   "testharness"
+  ],
   "html/semantics/scripting-1/the-script-element/module/imports-a.js": [
    "8188ade38a674e3ac9d4a404f318d499713d4801",
    "support"
@@ -223729,13 +224609,57 @@
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html": [
-   "87e7f790edf2ef9de702f3e9b45a42d6fedae857",
+   "2b4fa3b558dccb50bf0aee12a78e3320501ea1b5",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/instantiation-error-1.js": [
    "f2a20180b6bf5f9c89f5b9541885d55dc8a8ade6",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html": [
+   "70271ef6fbf9f6e4f6e61438691b6fce317137e9",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html": [
+   "80fa90a214bb4839703c36f9db36e07f3a2ca7f2",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/late-namespace-request.html": [
+   "a04ecfd484ada80c436c880c6fb39abba47eac1c",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/late-star-export-request.html": [
+   "2fd8c4ee6fcc66a8ddc2100a0840ebcc324a7d58",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/missing-export-nested.js": [
+   "5c6c1dae178b88b42ce87964e372f7d7db99ba70",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/missing-export.js": [
+   "27cd038ca24450b1aeb9fe52cb9dea85998d108c",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html": [
+   "a7fd504c7bfeefb445de9f2a1212986f27e80465",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html": [
+   "ca5ee235cc345d01e3d98cf3512dc26b9ad1896e",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/nested-missing-export.js": [
+   "4aa0a44e82a72b9a68f2a8ee64c4e10fbf26de42",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html": [
+   "4ce8bcce2537785c41f054175119e39169ed6110",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py": [
+   "f09db3d2acdf3aba3fc8c67b2f089a0ba506c799",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/module/script-for-event.html": [
    "c225684e0c7d09f9628aab589c8673b140994243",
    "testharness"
@@ -223744,6 +224668,42 @@
    "ad9a90f05a7a64901b18474c49d0baa579bfc60d",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html": [
+   "68a2b469c248c5f828159dcd20d1c979badc8985",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html": [
+   "36fdeb10e157db42895dd3ed0337eb5c1f311ae8",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/specifier-error.html": [
+   "4f2beb5f19eaaa26c51bf6be8a1c0fe9081c51fa",
+   "testharness"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js": [
+   "06839d94710ba9f2322a624dbeb60455f194d182",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/syntaxerror.js": [
+   "6febe4088fd80a7d83a8114527ec65f4d0791922",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/this-nested.js": [
+   "cf24b5c168e95e610c2dc3a7008582b6664ab0d4",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/this.js": [
+   "e6f03a1d03faf88a31cdc08eddab26b2d4c029f4",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/throw-nested.js": [
+   "c0672d30dc8a0109b5a1a3e38b9a1b481e36c94a",
+   "support"
+  ],
+  "html/semantics/scripting-1/the-script-element/module/throw.js": [
+   "d071fd2e76896c4b66636f359d4426fe101f6d0f",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/nomodule-reflect.html": [
    "ac2b3c16e9e9263cd4c14de205b63709c14ec2e3",
    "testharness"
@@ -226613,7 +227573,7 @@
    "support"
   ],
   "interfaces/fullscreen.idl": [
-   "5e3b09972043101986b4d4613ac87685281028a8",
+   "fda57b55aabdc54d674851851451c6c69c514ed1",
    "support"
   ],
   "interfaces/geometry.idl": [
@@ -235752,10 +236712,6 @@
    "29af302db74de64e2bd1352ad92092a309d28c92",
    "testharness"
   ],
-  "payment-request/payment-request-constructor.https-expected.txt": [
-   "751dfa73a44bc3d328223c17020c37754a7b700b",
-   "support"
-  ],
   "payment-request/payment-request-constructor.https.html": [
    "12cb2d46800b03554830fb145f2d8dca37043f79",
    "testharness"
@@ -244256,10 +245212,6 @@
    "abf4b19b11f4d1e543cebddb7a52579e0465761b",
    "testharness"
   ],
-  "scroll-into-view/check-scroll-position.html": [
-   "5241579f29d76391075b9066863e5fcb7673ad94",
-   "testharness"
-  ],
   "secure-contexts/basic-dedicated-worker.html": [
    "075f4170b133fe13e282ff5450871ef7960faf50",
    "testharness"
@@ -245205,7 +246157,7 @@
    "testharness"
   ],
   "service-workers/service-worker/indexeddb.https.html": [
-   "6b25a37ebe79c60e3645a1006e61f1f2c272ce86",
+   "2211cdead473877e238cc13ed0ccfa8269bfc7cc",
    "testharness"
   ],
   "service-workers/service-worker/install-event-type.https.html": [
@@ -245945,7 +246897,7 @@
    "support"
   ],
   "service-workers/service-worker/resources/indexeddb-worker.js": [
-   "ed0ff45423ba74ad0b82e46debd865fdae2fbcb6",
+   "444b05736f532dc37ba3887cd02cf75d40f1706e",
    "support"
   ],
   "service-workers/service-worker/resources/install-event-type-worker.js": [
@@ -248649,7 +249601,7 @@
    "testharness"
   ],
   "url/interfaces.any.js": [
-   "8b0f22589fa6da8f55b2ab09aa494ff3de0b429f",
+   "85a047537943e6ca22536bc70d11aaebadd7cd3d",
    "testharness"
   ],
   "url/setters_tests.json": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-iframe.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-iframe.https-expected.txt
deleted file mode 100644
index 13eb105..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-iframe.https-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a testharness.js-based test.
-FAIL throw a 'SecurityError' when invoking navigator.getBattery() within iframe assert_unreached: Should have rejected: undefined Reached unreachable code
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-insecure-context-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-insecure-context-expected.txt
deleted file mode 100644
index 6594edf..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/battery-status/battery-insecure-context-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a testharness.js-based test.
-FAIL navigator.getBattery() shall throw a 'SecurityError' in an insecure context assert_unreached: Should have rejected: undefined Reached unreachable code
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html
index b98184f..7aa16aa 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox-1/css-flexbox-height-animation-stretch.html
@@ -5,7 +5,7 @@
 	<link rel="author" title="Micky Brunetti" href="mailto:micky2be@gmail.com">
 	<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property">
 	<link rel="match" href="css-flexbox-height-animation-stretch-ref.html"/>
-	<meta name="flags" content="">
+	<meta name="flags" content="animated">
 	<meta name="assert" content="Items should stretch vertically in all time">
 	<style>
 		@keyframes resize {
@@ -44,4 +44,4 @@
 </div>
 </div>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-001.html
new file mode 100644
index 0000000..b25b4713
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-001.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="10"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="60"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-002.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-002.html
new file mode 100644
index 0000000..b9a354e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-002.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="90"  data-expected-height="10"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="60"  data-expected-height="130" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="130" data-expected-height="90"  class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-003.html
new file mode 100644
index 0000000..0af4081
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-003.html
@@ -0,0 +1,62 @@
+ <!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 10px 0px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 20px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 20px 10px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="10"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="60"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-004.html
new file mode 100644
index 0000000..ad76f52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-004.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-right: 20px;
+  padding-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="10"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="60"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-005.html
new file mode 100644
index 0000000..68e794bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-005.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="60"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="40"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-006.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-006.html
new file mode 100644
index 0000000..94c65d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-006.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="90"  data-expected-height="60"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="40"  data-expected-height="130" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="130" data-expected-height="90"  class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-007.html
new file mode 100644
index 0000000..8cb459ed9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-007.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.grid > div { writing-mode: vertical-lr; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 10px 0px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 20px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 20px 10px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="60"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="40"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-008.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-008.html
new file mode 100644
index 0000000..52337ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-008.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-right: 20px;
+  padding-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="100" data-expected-height="60"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="40"  data-expected-height="150" class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="0"   data-offset-y="150" data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="150" data-expected-width="150" data-expected-height="100" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-009.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-009.html
new file mode 100644
index 0000000..22bcc707
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-009.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="125" data-expected-height="20"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="0"   data-expected-width="80"  data-expected-height="125" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-010.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-010.html
new file mode 100644
index 0000000..02e138e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-010.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="110" data-expected-height="20"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="80"  data-expected-height="110" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-011.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-011.html
new file mode 100644
index 0000000..060e025
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-011.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 10px 0px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 20px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 20px 10px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="120" data-expected-height="20"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="80"  data-expected-height="130" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="130" data-expected-height="120" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-012.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-012.html
new file mode 100644
index 0000000..422d2eb0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-012.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-right: 20px;
+  padding-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="120" data-expected-height="20"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="80"  data-expected-height="130" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="130" data-expected-height="120" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-013.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-013.html
new file mode 100644
index 0000000..ba88de0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-013.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="125" data-expected-height="80"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="0"   data-expected-width="20"  data-expected-height="125" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-014.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-014.html
new file mode 100644
index 0000000..9b3d64d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-014.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="110" data-expected-height="80"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="20"  data-expected-height="110" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-015.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-015.html
new file mode 100644
index 0000000..c7290f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-015.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.grid > div { writing-mode: vertical-lr; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 10px 0px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 20px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 20px 10px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="120" data-expected-height="80"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="20"  data-expected-height="130" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="130" data-expected-height="120" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-016.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-016.html
new file mode 100644
index 0000000..1365b709
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-016.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+}
+.grid > div { writing-mode: vertical-lr; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-right: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-bottom: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-right: 20px;
+  padding-bottom: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="120" data-expected-height="80"  class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="0"   data-expected-width="20"  data-expected-height="130" class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="130" data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="130" data-expected-width="130" data-expected-height="120" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html
new file mode 100644
index 0000000..ac300a5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-001.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html
new file mode 100644
index 0000000..00e4ca7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-002.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="10"  data-expected-height="90"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="130" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="90"  data-expected-height="130" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html
new file mode 100644
index 0000000..dd96194
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-003.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html
new file mode 100644
index 0000000..8b5882c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-004.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html
new file mode 100644
index 0000000..4b29aa7c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-005.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html
new file mode 100644
index 0000000..a72fbd13
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-006.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="60"  data-expected-height="90"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="130" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="90"  data-expected-height="130" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html
new file mode 100644
index 0000000..ab190d39
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-007.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html
new file mode 100644
index 0000000..5be8653
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-008.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="150" data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html
new file mode 100644
index 0000000..f38ceb6a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-009.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="20"  data-expected-height="125" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="125" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html
new file mode 100644
index 0000000..6744c05
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-010.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="20"  data-expected-height="110" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="110" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="00"  data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html
new file mode 100644
index 0000000..fa50dff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-011.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="20"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="130" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html
new file mode 100644
index 0000000..94773382
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-012.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="20"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="130" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html
new file mode 100644
index 0000000..25baada
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-013.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="80"  data-expected-height="125" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="125" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html
new file mode 100644
index 0000000..19a8ede
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="80"  data-expected-height="110" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="110" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html
new file mode 100644
index 0000000..45c8b75
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-015.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="80"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="130" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html
new file mode 100644
index 0000000..2a47e02
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-016.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-lr;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="0"   data-offset-y="0"   data-expected-width="80"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="130" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="130" data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html
new file mode 100644
index 0000000..1afde93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-001.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="240" data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="90"  data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html
new file mode 100644
index 0000000..a7a1c97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-002.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-left: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-left: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="240" data-offset-y="0"   data-expected-width="10"  data-expected-height="90"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="120" data-offset-y="100" data-expected-width="130" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="90"  data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="10"  data-offset-y="100" data-expected-width="90"  data-expected-height="130" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html
new file mode 100644
index 0000000..96cbad3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-003.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 0px 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 0px 20px 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="240" data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="90"  data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html
new file mode 100644
index 0000000..c93b7b6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-004.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-left: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-left: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="240" data-offset-y="0"   data-expected-width="10"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="60"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="90"  data-offset-y="0"   data-expected-width="10"  data-expected-height="60"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html
new file mode 100644
index 0000000..73f7a6f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-005.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="190" data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html
new file mode 100644
index 0000000..0a6d003f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-006.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="190" data-offset-y="0"   data-expected-width="60"  data-expected-height="90"  class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="130" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="90"  data-expected-height="130" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html
new file mode 100644
index 0000000..ac92314
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-007.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="190" data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html
new file mode 100644
index 0000000..4756ebad
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-008.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on fixed-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  grid-template-columns: 100px 150px;
+  grid-template-rows: 150px 100px;
+  font: 10px/1 Ahem;
+  background: grey;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="190" data-offset-y="0"   data-expected-width="60"  data-expected-height="100" class="firstRowFirstColumn">X XX X</div>
+  <div data-offset-x="100" data-offset-y="100" data-expected-width="150" data-expected-height="40"  class="firstRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="60"  data-expected-height="10"  class="secondRowFirstColumn">X XX X</div>
+  <div data-offset-x="0"   data-offset-y="100" data-expected-width="100" data-expected-height="150" class="secondRowSecondColumn">XX X<br>X XXX<br>X<br>XX XXX</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html
new file mode 100644
index 0000000..4d05c9f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-009.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="230" data-offset-y="0"   data-expected-width="20"  data-expected-height="125" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="105" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html
new file mode 100644
index 0000000..1cb5b8dc7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-010.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-left: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-left: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="230" data-offset-y="0"   data-expected-width="20"  data-expected-height="110" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="140" data-offset-y="120" data-expected-width="110" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="100" data-offset-y="00"  data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="10"  data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html
new file mode 100644
index 0000000..535d57c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-011.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 0px 00px 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 0px 20px 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="230" data-offset-y="0"   data-expected-width="20"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="120" data-expected-width="130" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html
new file mode 100644
index 0000000..8ed59c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-012.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-left: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-left: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="230" data-offset-y="0"   data-expected-width="20"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="120" data-expected-width="130" data-expected-height="80"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="100" data-offset-y="0"   data-expected-width="20"  data-expected-height="80"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html
new file mode 100644
index 0000000..4070c2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-013.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="Orthogonal grid items with 'stretch' value for align-self and/or justify-self are stretched along the column and/or row axis respectively; they will be sized as fit-content otherwise.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="170" data-offset-y="0"   data-expected-width="80"  data-expected-height="125" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="125" data-offset-y="125" data-expected-width="125" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="45"  data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="125" data-expected-width="125" data-expected-height="125" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html
new file mode 100644
index 0000000..d6a6b30
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis respect their defined margin-box's boundaries.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  margin-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  margin-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  margin-bottom: 20px;
+  margin-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="170" data-offset-y="0"   data-expected-width="80"  data-expected-height="110" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="120" data-expected-width="110" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html
new file mode 100644
index 0000000..e6ef67df
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-015.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-align-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined border-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.grid > div { border-style: solid; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  border-width: 0px 0px 10px 0px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  border-width: 0px 20px 0px 0px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+  border-width: 0px 0px 0px 0px;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  border-width: 0px 10px 20px 0px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="170" data-offset-y="0"   data-expected-width="80"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="120" data-expected-width="130" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html
new file mode 100644
index 0000000..5e26d140
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-016.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Self-Alignment and stretch on auto-sized tracks</title>
+<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">
+<link rel="help" href="https://drafts.csswg.org/css-align/#valdef-justify-self-stretch">
+<meta name="assert" content="The stretched orthogonal grid items along the column and/or row axis include their defined padding-box.">
+<style>
+.grid {
+  position: relative;
+  display: inline-grid;
+  font: 20px/1 Ahem;
+  background: grey;
+  width: 250px;
+  height: 250px;
+  writing-mode: vertical-rl;
+}
+.grid > div { writing-mode: horizontal-tb; }
+.firstRowFirstColumn {
+  grid-row: 1;
+  grid-column: 1;
+  background: green;
+  justify-self: stretch;
+  align-self: start;
+  padding-bottom: 10px;
+}
+.firstRowSecondColumn {
+  grid-row: 1;
+  grid-column: 2;
+  background: blue;
+  justify-self: start;
+  align-self: stretch;
+  padding-right: 20px;
+}
+.secondRowFirstColumn {
+  grid-row: 2;
+  grid-column: 1;
+  background: yellow;
+  justify-self: start;
+  align-self: start;
+}
+.secondRowSecondColumn {
+  grid-row: 2;
+  grid-column: 2;
+  background: red;
+  justify-self: stretch;
+  align-self: stretch;
+  padding-bottom: 20px;
+  padding-right: 10px;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div class="grid">
+  <div data-offset-x="170" data-offset-y="0"   data-expected-width="80"  data-expected-height="120" class="firstRowFirstColumn">XX X</div>
+  <div data-offset-x="120" data-offset-y="120" data-expected-width="130" data-expected-height="20"  class="firstRowSecondColumn">XX X</div>
+  <div data-offset-x="40"  data-offset-y="0"   data-expected-width="80"  data-expected-height="20"  class="secondRowFirstColumn">XX X</div>
+  <div data-offset-x="0"   data-offset-y="120" data-expected-width="120" data-expected-height="130" class="secondRowSecondColumn">XX X</div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/support/check-layout-th.js b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/support/check-layout-th.js
new file mode 100644
index 0000000..07f7d5d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/support/check-layout-th.js
@@ -0,0 +1,190 @@
+(function() {
+// Test is initiated from body.onload, so explicit done() call is required.
+setup({ explicit_done: true });
+
+function checkSubtreeExpectedValues(t, parent, prefix)
+{
+    var checkedLayout = checkExpectedValues(t, parent, prefix);
+    Array.prototype.forEach.call(parent.childNodes, function(node) {
+        checkedLayout |= checkSubtreeExpectedValues(t, node, prefix);
+    });
+    return checkedLayout;
+}
+
+function checkAttribute(output, node, attribute)
+{
+    var result = node.getAttribute && node.getAttribute(attribute);
+    output.checked |= !!result;
+    return result;
+}
+
+function assert_tolerance(actual, expected, message)
+{
+    if (isNaN(expected) || Math.abs(actual - expected) >= 1) {
+        assert_equals(actual, Number(expected), message);
+    }
+}
+
+function checkExpectedValues(t, node, prefix)
+{
+    var output = { checked: false };
+
+    var expectedWidth = checkAttribute(output, node, "data-expected-width");
+    if (expectedWidth) {
+        assert_tolerance(node.offsetWidth, expectedWidth, prefix + "width");
+    }
+
+    var expectedHeight = checkAttribute(output, node, "data-expected-height");
+    if (expectedHeight) {
+        assert_tolerance(node.offsetHeight, expectedHeight, prefix + "height");
+    }
+
+    var expectedOffset = checkAttribute(output, node, "data-offset-x");
+    if (expectedOffset) {
+        assert_tolerance(node.offsetLeft, expectedOffset, prefix + "offsetLeft");
+    }
+
+    var expectedOffset = checkAttribute(output, node, "data-offset-y");
+    if (expectedOffset) {
+        assert_tolerance(node.offsetTop, expectedOffset, prefix + "offsetTop");
+    }
+
+    var expectedWidth = checkAttribute(output, node, "data-expected-client-width");
+    if (expectedWidth) {
+        assert_tolerance(node.clientWidth, expectedWidth, prefix + "clientWidth");
+    }
+
+    var expectedHeight = checkAttribute(output, node, "data-expected-client-height");
+    if (expectedHeight) {
+        assert_tolerance(node.clientHeight, expectedHeight, prefix + "clientHeight");
+    }
+
+    var expectedWidth = checkAttribute(output, node, "data-expected-scroll-width");
+    if (expectedWidth) {
+        assert_tolerance(node.scrollWidth, expectedWidth, prefix + "scrollWidth");
+    }
+
+    var expectedHeight = checkAttribute(output, node, "data-expected-scroll-height");
+    if (expectedHeight) {
+        assert_tolerance(node.scrollHeight, expectedHeight, prefix + "scrollHeight");
+    }
+
+    var expectedOffset = checkAttribute(output, node, "data-total-x");
+    if (expectedOffset) {
+        var totalLeft = node.clientLeft + node.offsetLeft;
+        assert_tolerance(totalLeft, expectedOffset, prefix +
+                         "clientLeft+offsetLeft (" + node.clientLeft + " + " + node.offsetLeft + ")");
+    }
+
+    var expectedOffset = checkAttribute(output, node, "data-total-y");
+    if (expectedOffset) {
+        var totalTop = node.clientTop + node.offsetTop;
+        assert_tolerance(totalTop, expectedOffset, prefix +
+                         "clientTop+offsetTop (" + node.clientTop + " + " + node.offsetTop + ")");
+    }
+
+    var expectedDisplay = checkAttribute(output, node, "data-expected-display");
+    if (expectedDisplay) {
+        var actualDisplay = getComputedStyle(node).display;
+        assert_equals(actualDisplay, expectedDisplay, prefix + "display");
+    }
+
+    var expectedPaddingTop = checkAttribute(output, node, "data-expected-padding-top");
+    if (expectedPaddingTop) {
+        var actualPaddingTop = getComputedStyle(node).paddingTop;
+        // Trim the unit "px" from the output.
+        actualPaddingTop = actualPaddingTop.slice(0, -2);
+        assert_equals(actualPaddingTop, expectedPaddingTop, prefix + "padding-top");
+    }
+
+    var expectedPaddingBottom = checkAttribute(output, node, "data-expected-padding-bottom");
+    if (expectedPaddingBottom) {
+        var actualPaddingBottom = getComputedStyle(node).paddingBottom;
+        // Trim the unit "px" from the output.
+        actualPaddingBottom = actualPaddingBottom.slice(0, -2);
+        assert_equals(actualPaddingBottom, expectedPaddingBottom, prefix + "padding-bottom");
+    }
+
+    var expectedPaddingLeft = checkAttribute(output, node, "data-expected-padding-left");
+    if (expectedPaddingLeft) {
+        var actualPaddingLeft = getComputedStyle(node).paddingLeft;
+        // Trim the unit "px" from the output.
+        actualPaddingLeft = actualPaddingLeft.slice(0, -2);
+        assert_equals(actualPaddingLeft, expectedPaddingLeft, prefix + "padding-left");
+    }
+
+    var expectedPaddingRight = checkAttribute(output, node, "data-expected-padding-right");
+    if (expectedPaddingRight) {
+        var actualPaddingRight = getComputedStyle(node).paddingRight;
+        // Trim the unit "px" from the output.
+        actualPaddingRight = actualPaddingRight.slice(0, -2);
+        assert_equals(actualPaddingRight, expectedPaddingRight, prefix + "padding-right");
+    }
+
+    var expectedMarginTop = checkAttribute(output, node, "data-expected-margin-top");
+    if (expectedMarginTop) {
+        var actualMarginTop = getComputedStyle(node).marginTop;
+        // Trim the unit "px" from the output.
+        actualMarginTop = actualMarginTop.slice(0, -2);
+        assert_equals(actualMarginTop, expectedMarginTop, prefix + "margin-top");
+    }
+
+    var expectedMarginBottom = checkAttribute(output, node, "data-expected-margin-bottom");
+    if (expectedMarginBottom) {
+        var actualMarginBottom = getComputedStyle(node).marginBottom;
+        // Trim the unit "px" from the output.
+        actualMarginBottom = actualMarginBottom.slice(0, -2);
+        assert_equals(actualMarginBottom, expectedMarginBottom, prefix + "margin-bottom");
+    }
+
+    var expectedMarginLeft = checkAttribute(output, node, "data-expected-margin-left");
+    if (expectedMarginLeft) {
+        var actualMarginLeft = getComputedStyle(node).marginLeft;
+        // Trim the unit "px" from the output.
+        actualMarginLeft = actualMarginLeft.slice(0, -2);
+        assert_equals(actualMarginLeft, expectedMarginLeft, prefix + "margin-left");
+    }
+
+    var expectedMarginRight = checkAttribute(output, node, "data-expected-margin-right");
+    if (expectedMarginRight) {
+        var actualMarginRight = getComputedStyle(node).marginRight;
+        // Trim the unit "px" from the output.
+        actualMarginRight = actualMarginRight.slice(0, -2);
+        assert_equals(actualMarginRight, expectedMarginRight, prefix + "margin-right");
+    }
+
+    return output.checked;
+}
+
+window.checkLayout = function(selectorList, outputContainer)
+{
+    if (!selectorList) {
+        console.error("You must provide a CSS selector of nodes to check.");
+        return;
+    }
+    var nodes = document.querySelectorAll(selectorList);
+    var testNumber = 0;
+    nodes = Array.prototype.slice.call(nodes);
+    nodes.reverse();
+    var checkedLayout = false;
+    Array.prototype.forEach.call(nodes, function(node) {
+        test(function(t) {
+            var container = node.parentNode.className == 'container' ? node.parentNode : node;
+            var prefix = "\n" + container.outerHTML + "\n";
+            var passed = false;
+            try {
+                checkedLayout |= checkExpectedValues(t, node.parentNode, prefix);
+                checkedLayout |= checkSubtreeExpectedValues(t, node, prefix);
+                passed = true;
+            } finally {
+                checkedLayout |= !passed;
+            }
+        }, selectorList + ' ' + String(++testNumber));
+    });
+    if (!checkedLayout) {
+        console.error("No valid data-* attributes found in selector list : " + selectorList);
+    }
+    done();
+};
+
+})();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom-ref.html
new file mode 100644
index 0000000..a89dd6a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom-ref.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<title>Reference for position:sticky bottom constraint should behave correctly for &lt;tfoot&gt; elements</title>
+
+<style>
+.group {
+  display: inline-block;
+  position: relative;
+  width: 150px;
+  height: 200px;
+}
+
+.scroller {
+  position: relative;
+  width: 100px;
+  height: 150px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.contents {
+  height: 550px;
+}
+
+.indicator {
+  position: absolute;
+  background-color: green;
+  left: 0;
+  height: 50px;
+  width: 50px;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollTop = 0;
+  document.getElementById('scroller2').scrollTop = 75;
+  document.getElementById('scroller3').scrollTop = 200;
+});
+</script>
+
+<div class="group">
+  <div id="scroller1" class="scroller">
+    <div class="indicator" style="top: 100px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller2" class="scroller">
+    <div class="indicator" style="top: 150px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller3" class="scroller">
+    <div class="indicator" style="top: 250px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div>You should see three green boxes above. No red should be visible.</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom.html
new file mode 100644
index 0000000..17fe3599
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-tfoot-bottom.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<title>position:sticky bottom constraint should behave correctly for &lt;tfoot&gt; elements</title>
+<link rel="match" href="position-sticky-table-tfoot-bottom-ref.html" />
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
+<meta name="assert" content="This test checks that the position:sticky bottom constraint behaves correctly for &lt;tfoot&gt; elements" />
+
+<style>
+table {
+  border-collapse:collapse;
+}
+
+td, th {
+  padding: 0;
+}
+
+td > div, th > div {
+  height: 50px;
+  width: 50px;
+}
+
+.group {
+  display: inline-block;
+  position: relative;
+  width: 150px;
+  height: 200px;
+}
+
+.scroller {
+  position: relative;
+  width: 100px;
+  height: 150px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.prepadding {
+  height: 100px;
+}
+
+.postpadding {
+  height: 250px;
+}
+
+.indicator {
+  position: absolute;
+  background-color: red;
+  left: 0;
+  height: 50px;
+  width: 50px;
+}
+
+.sticky {
+  position: sticky;
+  bottom: 25px;
+  background-color: green;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollTop = 0;
+  document.getElementById('scroller2').scrollTop = 75;
+  document.getElementById('scroller3').scrollTop = 200;
+});
+</script>
+
+<div class="group">
+  <div id="scroller1" class="scroller">
+    <div class="indicator" style="top: 100px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+      <tfoot class="sticky">
+        <tr><th><div></div></th></tr>
+      </tfoot>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller2" class="scroller">
+    <div class="indicator" style="top: 150px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+      <tfoot class="sticky">
+        <tr><th><div></div></th></tr>
+      </tfoot>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller3" class="scroller">
+    <div class="indicator" style="top: 250px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+      <tfoot class="sticky">
+        <tr><th><div></div></th></tr>
+      </tfoot>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div>You should see three green boxes above. No red should be visible.</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top-ref.html
new file mode 100644
index 0000000..f313d60
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top-ref.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<title>Reference for position:sticky top constraint should behave correctly for &lt;thead&gt; elements</title>
+
+<style>
+.group {
+  display: inline-block;
+  position: relative;
+  width: 150px;
+  height: 200px;
+}
+
+.scroller {
+  position: relative;
+  width: 100px;
+  height: 150px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.contents {
+  height: 550px;
+}
+
+.indicator {
+  position: absolute;
+  background-color: green;
+  left: 0;
+  height: 50px;
+  width: 50px;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollTop = 50;
+  document.getElementById('scroller2').scrollTop = 125;
+  document.getElementById('scroller3').scrollTop = 250;
+});
+</script>
+
+<div class="group">
+  <div id="scroller1" class="scroller">
+    <div class="indicator" style="top: 100px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller2" class="scroller">
+    <div class="indicator" style="top: 150px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller3" class="scroller">
+    <div class="indicator" style="top: 250px;"></div>
+    <div class="contents"></div>
+  </div>
+</div>
+
+<div>You should see three green boxes above. No red should be visible.</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top.html
new file mode 100644
index 0000000..560a45e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-thead-top.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<title>position:sticky top constraint should behave correctly for &lt;thead&gt; elements</title>
+<link rel="match" href="position-sticky-table-thead-top-ref.html" />
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
+<meta name="assert" content="This test checks that the position:sticky top constraint behaves correctly for &lt;thead&gt; elements" />
+
+<style>
+table {
+  border-collapse:collapse;
+}
+
+td, th {
+  padding: 0;
+}
+
+td > div, th > div {
+  height: 50px;
+  width: 50px;
+}
+
+.group {
+  display: inline-block;
+  position: relative;
+  width: 150px;
+  height: 200px;
+}
+
+.scroller {
+  position: relative;
+  width: 100px;
+  height: 150px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.prepadding {
+  height: 100px;
+}
+
+.postpadding {
+  height: 250px;
+}
+
+.indicator {
+  position: absolute;
+  background-color: red;
+  left: 0;
+  height: 50px;
+  width: 50px;
+}
+
+.sticky {
+  position: sticky;
+  top: 25px;
+  background-color: green;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollTop = 50;
+  document.getElementById('scroller2').scrollTop = 125;
+  document.getElementById('scroller3').scrollTop = 250;
+});
+</script>
+
+<div class="group">
+  <div id="scroller1" class="scroller">
+    <div class="indicator" style="top: 100px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <thead class="sticky">
+        <tr><th><div></div></th></tr>
+      </thead>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller2" class="scroller">
+    <div class="indicator" style="top: 150px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <thead class="sticky">
+        <tr><th><div></div></th></tr>
+      </thead>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div class="group">
+  <div id="scroller3" class="scroller">
+    <div class="indicator" style="top: 250px;"></div>
+    <div class="prepadding"></div>
+    <table>
+      <thead class="sticky">
+        <tr><th><div></div></th></tr>
+      </thead>
+      <tbody>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+        <tr><td><div></div></td></tr>
+      </tbody>
+    </table>
+    <div class="postpadding"></div>
+  </div>
+</div>
+
+<div>You should see three green boxes above. No red should be visible.</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/DOMTokenList-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/DOMTokenList-expected.txt
deleted file mode 100644
index 86e2a00..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/DOMTokenList-expected.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-This is a testharness.js-based test.
-PASS add on DOMTokenList must enqueue an attributeChanged reaction when adding an attribute 
-PASS add on DOMTokenList must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-PASS add on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an existing attribute 
-PASS add on DOMTokenList must not enqueue an attributeChanged reaction when adding a value to an unobserved attribute 
-PASS add on DOMTokenList must enqueue exactly one attributeChanged reaction when adding multiple values to an attribute 
-PASS remove on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute 
-PASS remove on DOMTokenList must enqueue exactly one attributeChanged reaction when removing multiple values to an attribute 
-PASS remove on DOMTokenList must enqueue an attributeChanged reaction even when removing a non-existent value from an attribute 
-PASS remove on DOMTokenList must not enqueue an attributeChanged reaction when removing a value from an unobserved attribute 
-PASS toggle on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an attribute 
-PASS toggle on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute 
-FAIL replace on DOMTokenList must enqueue an attributeChanged reaction when replacing a value in an attribute instance.classList.replace is not a function
-FAIL replace on DOMTokenList must not enqueue an attributeChanged reaction when the token to replace does not exist in the attribute instance.classList.replace is not a function
-FAIL replace on DOMTokenList must not enqueue an attributeChanged reaction when replacing a value in an unobserved attribute instance.classList.replace is not a function
-PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when adding an observed attribute 
-PASS the stringifier of DOMTokenList must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when mutating the value of an observed attribute 
-PASS the stringifier of DOMTokenList must not enqueue an attributeChanged reaction when mutating the value of an unobserved attribute 
-PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when the setter is called with the original value of the attribute 
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/dom/interfaces-expected.txt
index ce44fe68..abb6980 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/dom/interfaces-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/dom/interfaces-expected.txt
@@ -1,5 +1,5 @@
 This is a testharness.js-based test.
-Found 1570 tests; 1565 PASS, 5 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 1570 tests; 1568 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS Test driver 
 PASS Event interface: existence and properties of interface object 
 PASS Event interface object length 
@@ -1550,7 +1550,7 @@
 PASS DOMTokenList interface: operation add(DOMString) 
 PASS DOMTokenList interface: operation remove(DOMString) 
 PASS DOMTokenList interface: operation toggle(DOMString,boolean) 
-FAIL DOMTokenList interface: operation replace(DOMString,DOMString) assert_own_property: interface prototype object missing non-static operation expected property "replace" missing
+PASS DOMTokenList interface: operation replace(DOMString,DOMString) 
 PASS DOMTokenList interface: operation supports(DOMString) 
 PASS DOMTokenList interface: attribute value 
 PASS DOMTokenList interface: stringifier 
@@ -1565,8 +1565,8 @@
 PASS DOMTokenList interface: calling remove(DOMString) on document.body.classList with too few arguments must throw TypeError 
 PASS DOMTokenList interface: document.body.classList must inherit property "toggle" with the proper type (5) 
 PASS DOMTokenList interface: calling toggle(DOMString,boolean) on document.body.classList with too few arguments must throw TypeError 
-FAIL DOMTokenList interface: document.body.classList must inherit property "replace" with the proper type (6) assert_inherits: property "replace" not found in prototype chain
-FAIL DOMTokenList interface: calling replace(DOMString,DOMString) on document.body.classList with too few arguments must throw TypeError assert_inherits: property "replace" not found in prototype chain
+PASS DOMTokenList interface: document.body.classList must inherit property "replace" with the proper type (6) 
+PASS DOMTokenList interface: calling replace(DOMString,DOMString) on document.body.classList with too few arguments must throw TypeError 
 PASS DOMTokenList interface: document.body.classList must inherit property "supports" with the proper type (7) 
 PASS DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError 
 PASS DOMTokenList interface: document.body.classList must inherit property "value" with the proper type (8) 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Element-classlist-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Element-classlist-expected.txt
deleted file mode 100644
index b15d102..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Element-classlist-expected.txt
+++ /dev/null
@@ -1,1529 +0,0 @@
-This is a testharness.js-based test.
-Found 1135 tests; 885 PASS, 250 FAIL, 0 TIMEOUT, 0 NOTRUN.
-PASS Assigning to classList (HTML node) 
-PASS .supports() must throw TypeError (HTML node) 
-PASS classList.length when removed (HTML node) 
-PASS classList.length when set to "" (HTML node) 
-PASS classList.length when set to "   \t  \f" (HTML node) 
-PASS classList.length when set to "a" (HTML node) 
-PASS classList.length when set to "a A" (HTML node) 
-PASS classList.length when set to "\r\na\t\f" (HTML node) 
-PASS classList.length when set to "a a" (HTML node) 
-PASS classList.length when set to "a a a a a a" (HTML node) 
-PASS classList.length when set to "a a b b" (HTML node) 
-PASS classList.length when set to "a A B b" (HTML node) 
-PASS classList.length when set to "a b c c b a a b c c" (HTML node) 
-PASS classList.length when set to "   a  a b" (HTML node) 
-PASS classList.length when set to "a\tb\nc\fd\re f" (HTML node) 
-PASS classList.toString() when removed (HTML node) 
-PASS classList.toString() when set to "foo" (HTML node) 
-PASS classList.toString() when set to "   a  a b" (HTML node) 
-PASS classList.item() when set to null (HTML node) 
-PASS classList.item() when set to "a" (HTML node) 
-PASS classList.item() when set to "aa AA aa" (HTML node) 
-PASS classList.item() when set to "a b" (HTML node) 
-PASS classList.item() when set to "   a  a b" (HTML node) 
-PASS classList.item() when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.contains("a") when set to null (HTML node) 
-PASS classList.contains("") when set to null (HTML node) 
-PASS classList.contains("  ") when set to null (HTML node) 
-PASS classList.contains("a") when set to "" (HTML node) 
-PASS classList.contains("a") when set to "a" (HTML node) 
-PASS classList.contains("aa") when set to "a" (HTML node) 
-PASS classList.contains("b") when set to "a" (HTML node) 
-PASS classList.contains("A") when set to "a" (HTML node) 
-PASS classList.contains("a.") when set to "a" (HTML node) 
-PASS classList.contains("a)") when set to "a" (HTML node) 
-PASS classList.contains(undefined) when set to "a" (HTML node) 
-PASS classList.contains("a'") when set to "a" (HTML node) 
-PASS classList.contains("a\"") when set to "a" (HTML node) 
-PASS classList.contains("a$") when set to "a" (HTML node) 
-PASS classList.contains("a~") when set to "a" (HTML node) 
-PASS classList.contains("a?") when set to "a" (HTML node) 
-PASS classList.contains("a\\") when set to "a" (HTML node) 
-PASS classList.contains("a\t") when set to "a" (HTML node) 
-PASS classList.contains("\ta") when set to "a" (HTML node) 
-PASS classList.contains("a\n") when set to "a" (HTML node) 
-PASS classList.contains("\na") when set to "a" (HTML node) 
-PASS classList.contains("a\f") when set to "a" (HTML node) 
-PASS classList.contains("\fa") when set to "a" (HTML node) 
-PASS classList.contains("a\r") when set to "a" (HTML node) 
-PASS classList.contains("\ra") when set to "a" (HTML node) 
-PASS classList.contains("a ") when set to "a" (HTML node) 
-PASS classList.contains(" a") when set to "a" (HTML node) 
-PASS classList.contains("aa") when set to "aa AA" (HTML node) 
-PASS classList.contains("AA") when set to "aa AA" (HTML node) 
-PASS classList.contains("aA") when set to "aa AA" (HTML node) 
-PASS classList.contains("a") when set to "a a a" (HTML node) 
-PASS classList.contains("aa") when set to "a a a" (HTML node) 
-PASS classList.contains("b") when set to "a a a" (HTML node) 
-PASS classList.contains("a") when set to "a b c" (HTML node) 
-PASS classList.contains("b") when set to "a b c" (HTML node) 
-PASS classList.contains(null) when set to "null undefined" (HTML node) 
-PASS classList.contains(undefined) when set to "null undefined" (HTML node) 
-PASS classList.contains("a") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.contains("b") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.add("") with attribute value null (HTML node) 
-PASS classList.add("a", "") with attribute value null (HTML node) 
-PASS classList.add(" ") with attribute value null (HTML node) 
-PASS classList.add("\ta") with attribute value null (HTML node) 
-PASS classList.add("a\t") with attribute value null (HTML node) 
-PASS classList.add("\na") with attribute value null (HTML node) 
-PASS classList.add("a\n") with attribute value null (HTML node) 
-PASS classList.add("\fa") with attribute value null (HTML node) 
-PASS classList.add("a\f") with attribute value null (HTML node) 
-PASS classList.add("\ra") with attribute value null (HTML node) 
-PASS classList.add("a\r") with attribute value null (HTML node) 
-PASS classList.add(" a") with attribute value null (HTML node) 
-PASS classList.add("a ") with attribute value null (HTML node) 
-PASS classList.add("a", " ") with attribute value null (HTML node) 
-PASS classList.add("a", "aa ") with attribute value null (HTML node) 
-PASS classList.add("a") with attribute value "a" (HTML node) 
-PASS classList.add("AA") with attribute value "aa" (HTML node) 
-PASS classList.add("a") with attribute value "a b c" (HTML node) 
-PASS classList.add("a") with attribute value "a a a  b" (HTML node) 
-PASS classList.add("a") with attribute value null (HTML node) 
-PASS classList.add("a") with attribute value "" (HTML node) 
-PASS classList.add("a") with attribute value " " (HTML node) 
-PASS classList.add("a") with attribute value "   \f" (HTML node) 
-PASS classList.add("b") with attribute value "a" (HTML node) 
-PASS classList.add("d") with attribute value "a b c" (HTML node) 
-PASS classList.add("d") with attribute value "a b c " (HTML node) 
-PASS classList.add("c") with attribute value "   a  a b" (HTML node) 
-PASS classList.add("a") with attribute value "   a  a b" (HTML node) 
-PASS classList.add("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.add("d", "e") with attribute value "a b c " (HTML node) 
-PASS classList.add("a", "a") with attribute value "a b c " (HTML node) 
-PASS classList.add("d", "d") with attribute value "a b c " (HTML node) 
-PASS classList.add() with attribute value "a b c a " (HTML node) 
-PASS classList.add("a", "b") with attribute value null (HTML node) 
-PASS classList.add("a", "b") with attribute value "" (HTML node) 
-PASS classList.add(null) with attribute value null (HTML node) 
-PASS classList.add(undefined) with attribute value null (HTML node) 
-PASS classList.remove("") with attribute value null (HTML node) 
-PASS classList.remove(" ") with attribute value null (HTML node) 
-PASS classList.remove("\ta") with attribute value "\ta" (HTML node) 
-PASS classList.remove("a\t") with attribute value "a\t" (HTML node) 
-PASS classList.remove("\na") with attribute value "\na" (HTML node) 
-PASS classList.remove("a\n") with attribute value "a\n" (HTML node) 
-PASS classList.remove("\fa") with attribute value "\fa" (HTML node) 
-PASS classList.remove("a\f") with attribute value "a\f" (HTML node) 
-PASS classList.remove("\ra") with attribute value "\ra" (HTML node) 
-PASS classList.remove("a\r") with attribute value "a\r" (HTML node) 
-PASS classList.remove(" a") with attribute value " a" (HTML node) 
-PASS classList.remove("a ") with attribute value "a " (HTML node) 
-PASS classList.remove("aa ") with attribute value "aa " (HTML node) 
-PASS classList.remove("a") with attribute value null (HTML node) 
-PASS classList.remove("a") with attribute value "" (HTML node) 
-PASS classList.remove("d") with attribute value "a b  c" (HTML node) 
-PASS classList.remove("A") with attribute value "a b  c" (HTML node) 
-PASS classList.remove("a") with attribute value " a a a " (HTML node) 
-PASS classList.remove("a") with attribute value "a  b" (HTML node) 
-PASS classList.remove("a") with attribute value "a  b  " (HTML node) 
-PASS classList.remove("a") with attribute value "a a b" (HTML node) 
-PASS classList.remove("aa") with attribute value "aa aa bb" (HTML node) 
-PASS classList.remove("a") with attribute value "a a b a a c a a" (HTML node) 
-PASS classList.remove("b") with attribute value "a  b  c" (HTML node) 
-PASS classList.remove("bbb") with attribute value "aaa  bbb  ccc" (HTML node) 
-PASS classList.remove("b") with attribute value " a  b  c " (HTML node) 
-PASS classList.remove("b") with attribute value "a b b b c" (HTML node) 
-PASS classList.remove("c") with attribute value "a  b  c" (HTML node) 
-PASS classList.remove("c") with attribute value " a  b  c " (HTML node) 
-PASS classList.remove("c") with attribute value "a b c c c" (HTML node) 
-PASS classList.remove("a") with attribute value "a b a c a d a" (HTML node) 
-PASS classList.remove("AA") with attribute value "AA BB aa CC AA dd aa" (HTML node) 
-PASS classList.remove("a") with attribute value "\ra\na\ta\f" (HTML node) 
-PASS classList.remove("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.remove("d", "e") with attribute value "a b c " (HTML node) 
-PASS classList.remove("a", "b") with attribute value "a b c " (HTML node) 
-PASS classList.remove("a", "c") with attribute value "a b c " (HTML node) 
-PASS classList.remove("a", "a") with attribute value "a b c " (HTML node) 
-PASS classList.remove("d", "d") with attribute value "a b c " (HTML node) 
-PASS classList.remove() with attribute value "a b c " (HTML node) 
-PASS classList.remove("a", "b") with attribute value null (HTML node) 
-PASS classList.remove("a", "b") with attribute value "" (HTML node) 
-PASS classList.remove() with attribute value "a a" (HTML node) 
-PASS classList.remove(null) with attribute value "null" (HTML node) 
-PASS classList.remove(undefined) with attribute value "undefined" (HTML node) 
-PASS classList.toggle("") with attribute value null (HTML node) 
-PASS classList.toggle("aa ") with attribute value null (HTML node) 
-PASS classList.toggle("a") with attribute value null (HTML node) 
-PASS classList.toggle("a") with attribute value "" (HTML node) 
-PASS classList.toggle("a") with attribute value " " (HTML node) 
-PASS classList.toggle("a") with attribute value "   \f" (HTML node) 
-PASS classList.toggle("b") with attribute value "a" (HTML node) 
-PASS classList.toggle("A") with attribute value "a" (HTML node) 
-PASS classList.toggle("d") with attribute value "a b c" (HTML node) 
-PASS classList.toggle("d") with attribute value "   a  a b" (HTML node) 
-PASS classList.toggle("a") with attribute value "a" (HTML node) 
-PASS classList.toggle("a") with attribute value " a a a " (HTML node) 
-PASS classList.toggle("a") with attribute value " A A A " (HTML node) 
-PASS classList.toggle("b") with attribute value " a b c " (HTML node) 
-PASS classList.toggle("b") with attribute value " a b c b b" (HTML node) 
-PASS classList.toggle("c") with attribute value " a b  c  " (HTML node) 
-PASS classList.toggle("a") with attribute value " a b c " (HTML node) 
-PASS classList.toggle("b") with attribute value "   a  a b" (HTML node) 
-PASS classList.toggle("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.toggle("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) 
-PASS classList.toggle(null) with attribute value "null" (HTML node) 
-PASS classList.toggle(null) with attribute value "" (HTML node) 
-PASS classList.toggle(undefined) with attribute value "undefined" (HTML node) 
-PASS classList.toggle(undefined) with attribute value "" (HTML node) 
-PASS classList.toggle("a", true) with attribute value "" (HTML node) 
-PASS classList.toggle("a", true) with attribute value "a" (HTML node) 
-PASS classList.toggle("b", true) with attribute value "a" (HTML node) 
-PASS classList.toggle("b", true) with attribute value "a b" (HTML node) 
-PASS classList.toggle("a", false) with attribute value "" (HTML node) 
-PASS classList.toggle("a", false) with attribute value "a" (HTML node) 
-PASS classList.toggle("b", false) with attribute value "a" (HTML node) 
-PASS classList.toggle("b", false) with attribute value "a b" (HTML node) 
-FAIL classList.replace("", "a") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("", " ") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "a") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ta", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\t", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\na", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\n", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\fa", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\f", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ra", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\r", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace(" a", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a ", "b") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("a", " ") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ta") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\t") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\na") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\n") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\fa") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\f") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ra") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\r") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", " a") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a ") with attribute value null (HTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "a") with attribute value "a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("A", "b") with attribute value "a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "A") with attribute value "a b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("d", "e") with attribute value "a b c" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "a") with attribute value "a a a  b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "d") with attribute value "a a a  b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value null (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " " (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " a  \f" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "d") with attribute value "a b c" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "a b c" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "c b a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "a b a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "a b a" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "   a  a b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "   a  a b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(null, "b") with attribute value "a null" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", null) with attribute value "a b" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(undefined, "b") with attribute value "a undefined" (HTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", undefined) with attribute value "a b" (HTML node) Cannot read property 'apply' of undefined
-PASS Assigning to classList (XHTML node) 
-PASS .supports() must throw TypeError (XHTML node) 
-PASS classList.length when removed (XHTML node) 
-PASS classList.length when set to "" (XHTML node) 
-PASS classList.length when set to "   \t  \f" (XHTML node) 
-PASS classList.length when set to "a" (XHTML node) 
-PASS classList.length when set to "a A" (XHTML node) 
-PASS classList.length when set to "\r\na\t\f" (XHTML node) 
-PASS classList.length when set to "a a" (XHTML node) 
-PASS classList.length when set to "a a a a a a" (XHTML node) 
-PASS classList.length when set to "a a b b" (XHTML node) 
-PASS classList.length when set to "a A B b" (XHTML node) 
-PASS classList.length when set to "a b c c b a a b c c" (XHTML node) 
-PASS classList.length when set to "   a  a b" (XHTML node) 
-PASS classList.length when set to "a\tb\nc\fd\re f" (XHTML node) 
-PASS classList.toString() when removed (XHTML node) 
-PASS classList.toString() when set to "foo" (XHTML node) 
-PASS classList.toString() when set to "   a  a b" (XHTML node) 
-PASS classList.item() when set to null (XHTML node) 
-PASS classList.item() when set to "a" (XHTML node) 
-PASS classList.item() when set to "aa AA aa" (XHTML node) 
-PASS classList.item() when set to "a b" (XHTML node) 
-PASS classList.item() when set to "   a  a b" (XHTML node) 
-PASS classList.item() when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.contains("a") when set to null (XHTML node) 
-PASS classList.contains("") when set to null (XHTML node) 
-PASS classList.contains("  ") when set to null (XHTML node) 
-PASS classList.contains("a") when set to "" (XHTML node) 
-PASS classList.contains("a") when set to "a" (XHTML node) 
-PASS classList.contains("aa") when set to "a" (XHTML node) 
-PASS classList.contains("b") when set to "a" (XHTML node) 
-PASS classList.contains("A") when set to "a" (XHTML node) 
-PASS classList.contains("a.") when set to "a" (XHTML node) 
-PASS classList.contains("a)") when set to "a" (XHTML node) 
-PASS classList.contains(undefined) when set to "a" (XHTML node) 
-PASS classList.contains("a'") when set to "a" (XHTML node) 
-PASS classList.contains("a\"") when set to "a" (XHTML node) 
-PASS classList.contains("a$") when set to "a" (XHTML node) 
-PASS classList.contains("a~") when set to "a" (XHTML node) 
-PASS classList.contains("a?") when set to "a" (XHTML node) 
-PASS classList.contains("a\\") when set to "a" (XHTML node) 
-PASS classList.contains("a\t") when set to "a" (XHTML node) 
-PASS classList.contains("\ta") when set to "a" (XHTML node) 
-PASS classList.contains("a\n") when set to "a" (XHTML node) 
-PASS classList.contains("\na") when set to "a" (XHTML node) 
-PASS classList.contains("a\f") when set to "a" (XHTML node) 
-PASS classList.contains("\fa") when set to "a" (XHTML node) 
-PASS classList.contains("a\r") when set to "a" (XHTML node) 
-PASS classList.contains("\ra") when set to "a" (XHTML node) 
-PASS classList.contains("a ") when set to "a" (XHTML node) 
-PASS classList.contains(" a") when set to "a" (XHTML node) 
-PASS classList.contains("aa") when set to "aa AA" (XHTML node) 
-PASS classList.contains("AA") when set to "aa AA" (XHTML node) 
-PASS classList.contains("aA") when set to "aa AA" (XHTML node) 
-PASS classList.contains("a") when set to "a a a" (XHTML node) 
-PASS classList.contains("aa") when set to "a a a" (XHTML node) 
-PASS classList.contains("b") when set to "a a a" (XHTML node) 
-PASS classList.contains("a") when set to "a b c" (XHTML node) 
-PASS classList.contains("b") when set to "a b c" (XHTML node) 
-PASS classList.contains(null) when set to "null undefined" (XHTML node) 
-PASS classList.contains(undefined) when set to "null undefined" (XHTML node) 
-PASS classList.contains("a") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.contains("b") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.add("") with attribute value null (XHTML node) 
-PASS classList.add("a", "") with attribute value null (XHTML node) 
-PASS classList.add(" ") with attribute value null (XHTML node) 
-PASS classList.add("\ta") with attribute value null (XHTML node) 
-PASS classList.add("a\t") with attribute value null (XHTML node) 
-PASS classList.add("\na") with attribute value null (XHTML node) 
-PASS classList.add("a\n") with attribute value null (XHTML node) 
-PASS classList.add("\fa") with attribute value null (XHTML node) 
-PASS classList.add("a\f") with attribute value null (XHTML node) 
-PASS classList.add("\ra") with attribute value null (XHTML node) 
-PASS classList.add("a\r") with attribute value null (XHTML node) 
-PASS classList.add(" a") with attribute value null (XHTML node) 
-PASS classList.add("a ") with attribute value null (XHTML node) 
-PASS classList.add("a", " ") with attribute value null (XHTML node) 
-PASS classList.add("a", "aa ") with attribute value null (XHTML node) 
-PASS classList.add("a") with attribute value "a" (XHTML node) 
-PASS classList.add("AA") with attribute value "aa" (XHTML node) 
-PASS classList.add("a") with attribute value "a b c" (XHTML node) 
-PASS classList.add("a") with attribute value "a a a  b" (XHTML node) 
-PASS classList.add("a") with attribute value null (XHTML node) 
-PASS classList.add("a") with attribute value "" (XHTML node) 
-PASS classList.add("a") with attribute value " " (XHTML node) 
-PASS classList.add("a") with attribute value "   \f" (XHTML node) 
-PASS classList.add("b") with attribute value "a" (XHTML node) 
-PASS classList.add("d") with attribute value "a b c" (XHTML node) 
-PASS classList.add("d") with attribute value "a b c " (XHTML node) 
-PASS classList.add("c") with attribute value "   a  a b" (XHTML node) 
-PASS classList.add("a") with attribute value "   a  a b" (XHTML node) 
-PASS classList.add("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.add("d", "e") with attribute value "a b c " (XHTML node) 
-PASS classList.add("a", "a") with attribute value "a b c " (XHTML node) 
-PASS classList.add("d", "d") with attribute value "a b c " (XHTML node) 
-PASS classList.add() with attribute value "a b c a " (XHTML node) 
-PASS classList.add("a", "b") with attribute value null (XHTML node) 
-PASS classList.add("a", "b") with attribute value "" (XHTML node) 
-PASS classList.add(null) with attribute value null (XHTML node) 
-PASS classList.add(undefined) with attribute value null (XHTML node) 
-PASS classList.remove("") with attribute value null (XHTML node) 
-PASS classList.remove(" ") with attribute value null (XHTML node) 
-PASS classList.remove("\ta") with attribute value "\ta" (XHTML node) 
-PASS classList.remove("a\t") with attribute value "a\t" (XHTML node) 
-PASS classList.remove("\na") with attribute value "\na" (XHTML node) 
-PASS classList.remove("a\n") with attribute value "a\n" (XHTML node) 
-PASS classList.remove("\fa") with attribute value "\fa" (XHTML node) 
-PASS classList.remove("a\f") with attribute value "a\f" (XHTML node) 
-PASS classList.remove("\ra") with attribute value "\ra" (XHTML node) 
-PASS classList.remove("a\r") with attribute value "a\r" (XHTML node) 
-PASS classList.remove(" a") with attribute value " a" (XHTML node) 
-PASS classList.remove("a ") with attribute value "a " (XHTML node) 
-PASS classList.remove("aa ") with attribute value "aa " (XHTML node) 
-PASS classList.remove("a") with attribute value null (XHTML node) 
-PASS classList.remove("a") with attribute value "" (XHTML node) 
-PASS classList.remove("d") with attribute value "a b  c" (XHTML node) 
-PASS classList.remove("A") with attribute value "a b  c" (XHTML node) 
-PASS classList.remove("a") with attribute value " a a a " (XHTML node) 
-PASS classList.remove("a") with attribute value "a  b" (XHTML node) 
-PASS classList.remove("a") with attribute value "a  b  " (XHTML node) 
-PASS classList.remove("a") with attribute value "a a b" (XHTML node) 
-PASS classList.remove("aa") with attribute value "aa aa bb" (XHTML node) 
-PASS classList.remove("a") with attribute value "a a b a a c a a" (XHTML node) 
-PASS classList.remove("b") with attribute value "a  b  c" (XHTML node) 
-PASS classList.remove("bbb") with attribute value "aaa  bbb  ccc" (XHTML node) 
-PASS classList.remove("b") with attribute value " a  b  c " (XHTML node) 
-PASS classList.remove("b") with attribute value "a b b b c" (XHTML node) 
-PASS classList.remove("c") with attribute value "a  b  c" (XHTML node) 
-PASS classList.remove("c") with attribute value " a  b  c " (XHTML node) 
-PASS classList.remove("c") with attribute value "a b c c c" (XHTML node) 
-PASS classList.remove("a") with attribute value "a b a c a d a" (XHTML node) 
-PASS classList.remove("AA") with attribute value "AA BB aa CC AA dd aa" (XHTML node) 
-PASS classList.remove("a") with attribute value "\ra\na\ta\f" (XHTML node) 
-PASS classList.remove("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.remove("d", "e") with attribute value "a b c " (XHTML node) 
-PASS classList.remove("a", "b") with attribute value "a b c " (XHTML node) 
-PASS classList.remove("a", "c") with attribute value "a b c " (XHTML node) 
-PASS classList.remove("a", "a") with attribute value "a b c " (XHTML node) 
-PASS classList.remove("d", "d") with attribute value "a b c " (XHTML node) 
-PASS classList.remove() with attribute value "a b c " (XHTML node) 
-PASS classList.remove("a", "b") with attribute value null (XHTML node) 
-PASS classList.remove("a", "b") with attribute value "" (XHTML node) 
-PASS classList.remove() with attribute value "a a" (XHTML node) 
-PASS classList.remove(null) with attribute value "null" (XHTML node) 
-PASS classList.remove(undefined) with attribute value "undefined" (XHTML node) 
-PASS classList.toggle("") with attribute value null (XHTML node) 
-PASS classList.toggle("aa ") with attribute value null (XHTML node) 
-PASS classList.toggle("a") with attribute value null (XHTML node) 
-PASS classList.toggle("a") with attribute value "" (XHTML node) 
-PASS classList.toggle("a") with attribute value " " (XHTML node) 
-PASS classList.toggle("a") with attribute value "   \f" (XHTML node) 
-PASS classList.toggle("b") with attribute value "a" (XHTML node) 
-PASS classList.toggle("A") with attribute value "a" (XHTML node) 
-PASS classList.toggle("d") with attribute value "a b c" (XHTML node) 
-PASS classList.toggle("d") with attribute value "   a  a b" (XHTML node) 
-PASS classList.toggle("a") with attribute value "a" (XHTML node) 
-PASS classList.toggle("a") with attribute value " a a a " (XHTML node) 
-PASS classList.toggle("a") with attribute value " A A A " (XHTML node) 
-PASS classList.toggle("b") with attribute value " a b c " (XHTML node) 
-PASS classList.toggle("b") with attribute value " a b c b b" (XHTML node) 
-PASS classList.toggle("c") with attribute value " a b  c  " (XHTML node) 
-PASS classList.toggle("a") with attribute value " a b c " (XHTML node) 
-PASS classList.toggle("b") with attribute value "   a  a b" (XHTML node) 
-PASS classList.toggle("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.toggle("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) 
-PASS classList.toggle(null) with attribute value "null" (XHTML node) 
-PASS classList.toggle(null) with attribute value "" (XHTML node) 
-PASS classList.toggle(undefined) with attribute value "undefined" (XHTML node) 
-PASS classList.toggle(undefined) with attribute value "" (XHTML node) 
-PASS classList.toggle("a", true) with attribute value "" (XHTML node) 
-PASS classList.toggle("a", true) with attribute value "a" (XHTML node) 
-PASS classList.toggle("b", true) with attribute value "a" (XHTML node) 
-PASS classList.toggle("b", true) with attribute value "a b" (XHTML node) 
-PASS classList.toggle("a", false) with attribute value "" (XHTML node) 
-PASS classList.toggle("a", false) with attribute value "a" (XHTML node) 
-PASS classList.toggle("b", false) with attribute value "a" (XHTML node) 
-PASS classList.toggle("b", false) with attribute value "a b" (XHTML node) 
-FAIL classList.replace("", "a") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("", " ") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "a") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ta", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\t", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\na", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\n", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\fa", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\f", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ra", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\r", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace(" a", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a ", "b") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("a", " ") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ta") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\t") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\na") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\n") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\fa") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\f") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ra") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\r") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", " a") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a ") with attribute value null (XHTML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "a") with attribute value "a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("A", "b") with attribute value "a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "A") with attribute value "a b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("d", "e") with attribute value "a b c" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "a") with attribute value "a a a  b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "d") with attribute value "a a a  b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value null (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " " (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " a  \f" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "d") with attribute value "a b c" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "a b c" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "c b a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "a b a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "a b a" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "   a  a b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "   a  a b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(null, "b") with attribute value "a null" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", null) with attribute value "a b" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(undefined, "b") with attribute value "a undefined" (XHTML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", undefined) with attribute value "a b" (XHTML node) Cannot read property 'apply' of undefined
-PASS Assigning to classList (MathML node) 
-PASS .supports() must throw TypeError (MathML node) 
-PASS classList.length when removed (MathML node) 
-PASS classList.length when set to "" (MathML node) 
-PASS classList.length when set to "   \t  \f" (MathML node) 
-PASS classList.length when set to "a" (MathML node) 
-PASS classList.length when set to "a A" (MathML node) 
-PASS classList.length when set to "\r\na\t\f" (MathML node) 
-PASS classList.length when set to "a a" (MathML node) 
-PASS classList.length when set to "a a a a a a" (MathML node) 
-PASS classList.length when set to "a a b b" (MathML node) 
-PASS classList.length when set to "a A B b" (MathML node) 
-PASS classList.length when set to "a b c c b a a b c c" (MathML node) 
-PASS classList.length when set to "   a  a b" (MathML node) 
-PASS classList.length when set to "a\tb\nc\fd\re f" (MathML node) 
-PASS classList.toString() when removed (MathML node) 
-PASS classList.toString() when set to "foo" (MathML node) 
-PASS classList.toString() when set to "   a  a b" (MathML node) 
-PASS classList.item() when set to null (MathML node) 
-PASS classList.item() when set to "a" (MathML node) 
-PASS classList.item() when set to "aa AA aa" (MathML node) 
-PASS classList.item() when set to "a b" (MathML node) 
-PASS classList.item() when set to "   a  a b" (MathML node) 
-PASS classList.item() when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.contains("a") when set to null (MathML node) 
-PASS classList.contains("") when set to null (MathML node) 
-PASS classList.contains("  ") when set to null (MathML node) 
-PASS classList.contains("a") when set to "" (MathML node) 
-PASS classList.contains("a") when set to "a" (MathML node) 
-PASS classList.contains("aa") when set to "a" (MathML node) 
-PASS classList.contains("b") when set to "a" (MathML node) 
-PASS classList.contains("A") when set to "a" (MathML node) 
-PASS classList.contains("a.") when set to "a" (MathML node) 
-PASS classList.contains("a)") when set to "a" (MathML node) 
-PASS classList.contains(undefined) when set to "a" (MathML node) 
-PASS classList.contains("a'") when set to "a" (MathML node) 
-PASS classList.contains("a\"") when set to "a" (MathML node) 
-PASS classList.contains("a$") when set to "a" (MathML node) 
-PASS classList.contains("a~") when set to "a" (MathML node) 
-PASS classList.contains("a?") when set to "a" (MathML node) 
-PASS classList.contains("a\\") when set to "a" (MathML node) 
-PASS classList.contains("a\t") when set to "a" (MathML node) 
-PASS classList.contains("\ta") when set to "a" (MathML node) 
-PASS classList.contains("a\n") when set to "a" (MathML node) 
-PASS classList.contains("\na") when set to "a" (MathML node) 
-PASS classList.contains("a\f") when set to "a" (MathML node) 
-PASS classList.contains("\fa") when set to "a" (MathML node) 
-PASS classList.contains("a\r") when set to "a" (MathML node) 
-PASS classList.contains("\ra") when set to "a" (MathML node) 
-PASS classList.contains("a ") when set to "a" (MathML node) 
-PASS classList.contains(" a") when set to "a" (MathML node) 
-PASS classList.contains("aa") when set to "aa AA" (MathML node) 
-PASS classList.contains("AA") when set to "aa AA" (MathML node) 
-PASS classList.contains("aA") when set to "aa AA" (MathML node) 
-PASS classList.contains("a") when set to "a a a" (MathML node) 
-PASS classList.contains("aa") when set to "a a a" (MathML node) 
-PASS classList.contains("b") when set to "a a a" (MathML node) 
-PASS classList.contains("a") when set to "a b c" (MathML node) 
-PASS classList.contains("b") when set to "a b c" (MathML node) 
-PASS classList.contains(null) when set to "null undefined" (MathML node) 
-PASS classList.contains(undefined) when set to "null undefined" (MathML node) 
-PASS classList.contains("a") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.contains("b") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.add("") with attribute value null (MathML node) 
-PASS classList.add("a", "") with attribute value null (MathML node) 
-PASS classList.add(" ") with attribute value null (MathML node) 
-PASS classList.add("\ta") with attribute value null (MathML node) 
-PASS classList.add("a\t") with attribute value null (MathML node) 
-PASS classList.add("\na") with attribute value null (MathML node) 
-PASS classList.add("a\n") with attribute value null (MathML node) 
-PASS classList.add("\fa") with attribute value null (MathML node) 
-PASS classList.add("a\f") with attribute value null (MathML node) 
-PASS classList.add("\ra") with attribute value null (MathML node) 
-PASS classList.add("a\r") with attribute value null (MathML node) 
-PASS classList.add(" a") with attribute value null (MathML node) 
-PASS classList.add("a ") with attribute value null (MathML node) 
-PASS classList.add("a", " ") with attribute value null (MathML node) 
-PASS classList.add("a", "aa ") with attribute value null (MathML node) 
-PASS classList.add("a") with attribute value "a" (MathML node) 
-PASS classList.add("AA") with attribute value "aa" (MathML node) 
-PASS classList.add("a") with attribute value "a b c" (MathML node) 
-PASS classList.add("a") with attribute value "a a a  b" (MathML node) 
-PASS classList.add("a") with attribute value null (MathML node) 
-PASS classList.add("a") with attribute value "" (MathML node) 
-PASS classList.add("a") with attribute value " " (MathML node) 
-PASS classList.add("a") with attribute value "   \f" (MathML node) 
-PASS classList.add("b") with attribute value "a" (MathML node) 
-PASS classList.add("d") with attribute value "a b c" (MathML node) 
-PASS classList.add("d") with attribute value "a b c " (MathML node) 
-PASS classList.add("c") with attribute value "   a  a b" (MathML node) 
-PASS classList.add("a") with attribute value "   a  a b" (MathML node) 
-PASS classList.add("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.add("d", "e") with attribute value "a b c " (MathML node) 
-PASS classList.add("a", "a") with attribute value "a b c " (MathML node) 
-PASS classList.add("d", "d") with attribute value "a b c " (MathML node) 
-PASS classList.add() with attribute value "a b c a " (MathML node) 
-PASS classList.add("a", "b") with attribute value null (MathML node) 
-PASS classList.add("a", "b") with attribute value "" (MathML node) 
-PASS classList.add(null) with attribute value null (MathML node) 
-PASS classList.add(undefined) with attribute value null (MathML node) 
-PASS classList.remove("") with attribute value null (MathML node) 
-PASS classList.remove(" ") with attribute value null (MathML node) 
-PASS classList.remove("\ta") with attribute value "\ta" (MathML node) 
-PASS classList.remove("a\t") with attribute value "a\t" (MathML node) 
-PASS classList.remove("\na") with attribute value "\na" (MathML node) 
-PASS classList.remove("a\n") with attribute value "a\n" (MathML node) 
-PASS classList.remove("\fa") with attribute value "\fa" (MathML node) 
-PASS classList.remove("a\f") with attribute value "a\f" (MathML node) 
-PASS classList.remove("\ra") with attribute value "\ra" (MathML node) 
-PASS classList.remove("a\r") with attribute value "a\r" (MathML node) 
-PASS classList.remove(" a") with attribute value " a" (MathML node) 
-PASS classList.remove("a ") with attribute value "a " (MathML node) 
-PASS classList.remove("aa ") with attribute value "aa " (MathML node) 
-PASS classList.remove("a") with attribute value null (MathML node) 
-PASS classList.remove("a") with attribute value "" (MathML node) 
-PASS classList.remove("d") with attribute value "a b  c" (MathML node) 
-PASS classList.remove("A") with attribute value "a b  c" (MathML node) 
-PASS classList.remove("a") with attribute value " a a a " (MathML node) 
-PASS classList.remove("a") with attribute value "a  b" (MathML node) 
-PASS classList.remove("a") with attribute value "a  b  " (MathML node) 
-PASS classList.remove("a") with attribute value "a a b" (MathML node) 
-PASS classList.remove("aa") with attribute value "aa aa bb" (MathML node) 
-PASS classList.remove("a") with attribute value "a a b a a c a a" (MathML node) 
-PASS classList.remove("b") with attribute value "a  b  c" (MathML node) 
-PASS classList.remove("bbb") with attribute value "aaa  bbb  ccc" (MathML node) 
-PASS classList.remove("b") with attribute value " a  b  c " (MathML node) 
-PASS classList.remove("b") with attribute value "a b b b c" (MathML node) 
-PASS classList.remove("c") with attribute value "a  b  c" (MathML node) 
-PASS classList.remove("c") with attribute value " a  b  c " (MathML node) 
-PASS classList.remove("c") with attribute value "a b c c c" (MathML node) 
-PASS classList.remove("a") with attribute value "a b a c a d a" (MathML node) 
-PASS classList.remove("AA") with attribute value "AA BB aa CC AA dd aa" (MathML node) 
-PASS classList.remove("a") with attribute value "\ra\na\ta\f" (MathML node) 
-PASS classList.remove("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.remove("d", "e") with attribute value "a b c " (MathML node) 
-PASS classList.remove("a", "b") with attribute value "a b c " (MathML node) 
-PASS classList.remove("a", "c") with attribute value "a b c " (MathML node) 
-PASS classList.remove("a", "a") with attribute value "a b c " (MathML node) 
-PASS classList.remove("d", "d") with attribute value "a b c " (MathML node) 
-PASS classList.remove() with attribute value "a b c " (MathML node) 
-PASS classList.remove("a", "b") with attribute value null (MathML node) 
-PASS classList.remove("a", "b") with attribute value "" (MathML node) 
-PASS classList.remove() with attribute value "a a" (MathML node) 
-PASS classList.remove(null) with attribute value "null" (MathML node) 
-PASS classList.remove(undefined) with attribute value "undefined" (MathML node) 
-PASS classList.toggle("") with attribute value null (MathML node) 
-PASS classList.toggle("aa ") with attribute value null (MathML node) 
-PASS classList.toggle("a") with attribute value null (MathML node) 
-PASS classList.toggle("a") with attribute value "" (MathML node) 
-PASS classList.toggle("a") with attribute value " " (MathML node) 
-PASS classList.toggle("a") with attribute value "   \f" (MathML node) 
-PASS classList.toggle("b") with attribute value "a" (MathML node) 
-PASS classList.toggle("A") with attribute value "a" (MathML node) 
-PASS classList.toggle("d") with attribute value "a b c" (MathML node) 
-PASS classList.toggle("d") with attribute value "   a  a b" (MathML node) 
-PASS classList.toggle("a") with attribute value "a" (MathML node) 
-PASS classList.toggle("a") with attribute value " a a a " (MathML node) 
-PASS classList.toggle("a") with attribute value " A A A " (MathML node) 
-PASS classList.toggle("b") with attribute value " a b c " (MathML node) 
-PASS classList.toggle("b") with attribute value " a b c b b" (MathML node) 
-PASS classList.toggle("c") with attribute value " a b  c  " (MathML node) 
-PASS classList.toggle("a") with attribute value " a b c " (MathML node) 
-PASS classList.toggle("b") with attribute value "   a  a b" (MathML node) 
-PASS classList.toggle("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.toggle("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) 
-PASS classList.toggle(null) with attribute value "null" (MathML node) 
-PASS classList.toggle(null) with attribute value "" (MathML node) 
-PASS classList.toggle(undefined) with attribute value "undefined" (MathML node) 
-PASS classList.toggle(undefined) with attribute value "" (MathML node) 
-PASS classList.toggle("a", true) with attribute value "" (MathML node) 
-PASS classList.toggle("a", true) with attribute value "a" (MathML node) 
-PASS classList.toggle("b", true) with attribute value "a" (MathML node) 
-PASS classList.toggle("b", true) with attribute value "a b" (MathML node) 
-PASS classList.toggle("a", false) with attribute value "" (MathML node) 
-PASS classList.toggle("a", false) with attribute value "a" (MathML node) 
-PASS classList.toggle("b", false) with attribute value "a" (MathML node) 
-PASS classList.toggle("b", false) with attribute value "a b" (MathML node) 
-FAIL classList.replace("", "a") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("", " ") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "a") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ta", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\t", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\na", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\n", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\fa", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\f", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ra", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\r", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace(" a", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a ", "b") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("a", " ") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ta") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\t") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\na") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\n") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\fa") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\f") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ra") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\r") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", " a") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a ") with attribute value null (MathML node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "a") with attribute value "a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("A", "b") with attribute value "a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "A") with attribute value "a b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("d", "e") with attribute value "a b c" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "a") with attribute value "a a a  b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "d") with attribute value "a a a  b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value null (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " " (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " a  \f" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "d") with attribute value "a b c" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "a b c" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "c b a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "a b a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "a b a" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "   a  a b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "   a  a b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(null, "b") with attribute value "a null" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", null) with attribute value "a b" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace(undefined, "b") with attribute value "a undefined" (MathML node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", undefined) with attribute value "a b" (MathML node) Cannot read property 'apply' of undefined
-PASS Assigning to classList (XML node with null namespace) 
-PASS .supports() must throw TypeError (XML node with null namespace) 
-PASS classList.length when removed (XML node with null namespace) 
-PASS classList.length when set to "" (XML node with null namespace) 
-PASS classList.length when set to "   \t  \f" (XML node with null namespace) 
-PASS classList.length when set to "a" (XML node with null namespace) 
-PASS classList.length when set to "a A" (XML node with null namespace) 
-PASS classList.length when set to "\r\na\t\f" (XML node with null namespace) 
-PASS classList.length when set to "a a" (XML node with null namespace) 
-PASS classList.length when set to "a a a a a a" (XML node with null namespace) 
-PASS classList.length when set to "a a b b" (XML node with null namespace) 
-PASS classList.length when set to "a A B b" (XML node with null namespace) 
-PASS classList.length when set to "a b c c b a a b c c" (XML node with null namespace) 
-PASS classList.length when set to "   a  a b" (XML node with null namespace) 
-PASS classList.length when set to "a\tb\nc\fd\re f" (XML node with null namespace) 
-PASS classList.toString() when removed (XML node with null namespace) 
-PASS classList.toString() when set to "foo" (XML node with null namespace) 
-PASS classList.toString() when set to "   a  a b" (XML node with null namespace) 
-PASS classList.item() when set to null (XML node with null namespace) 
-PASS classList.item() when set to "a" (XML node with null namespace) 
-PASS classList.item() when set to "aa AA aa" (XML node with null namespace) 
-PASS classList.item() when set to "a b" (XML node with null namespace) 
-PASS classList.item() when set to "   a  a b" (XML node with null namespace) 
-PASS classList.item() when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.contains("a") when set to null (XML node with null namespace) 
-PASS classList.contains("") when set to null (XML node with null namespace) 
-PASS classList.contains("  ") when set to null (XML node with null namespace) 
-PASS classList.contains("a") when set to "" (XML node with null namespace) 
-PASS classList.contains("a") when set to "a" (XML node with null namespace) 
-PASS classList.contains("aa") when set to "a" (XML node with null namespace) 
-PASS classList.contains("b") when set to "a" (XML node with null namespace) 
-PASS classList.contains("A") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a.") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a)") when set to "a" (XML node with null namespace) 
-PASS classList.contains(undefined) when set to "a" (XML node with null namespace) 
-PASS classList.contains("a'") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\"") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a$") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a~") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a?") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\\") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\t") when set to "a" (XML node with null namespace) 
-PASS classList.contains("\ta") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\n") when set to "a" (XML node with null namespace) 
-PASS classList.contains("\na") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\f") when set to "a" (XML node with null namespace) 
-PASS classList.contains("\fa") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a\r") when set to "a" (XML node with null namespace) 
-PASS classList.contains("\ra") when set to "a" (XML node with null namespace) 
-PASS classList.contains("a ") when set to "a" (XML node with null namespace) 
-PASS classList.contains(" a") when set to "a" (XML node with null namespace) 
-PASS classList.contains("aa") when set to "aa AA" (XML node with null namespace) 
-PASS classList.contains("AA") when set to "aa AA" (XML node with null namespace) 
-PASS classList.contains("aA") when set to "aa AA" (XML node with null namespace) 
-PASS classList.contains("a") when set to "a a a" (XML node with null namespace) 
-PASS classList.contains("aa") when set to "a a a" (XML node with null namespace) 
-PASS classList.contains("b") when set to "a a a" (XML node with null namespace) 
-PASS classList.contains("a") when set to "a b c" (XML node with null namespace) 
-PASS classList.contains("b") when set to "a b c" (XML node with null namespace) 
-PASS classList.contains(null) when set to "null undefined" (XML node with null namespace) 
-PASS classList.contains(undefined) when set to "null undefined" (XML node with null namespace) 
-PASS classList.contains("a") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.contains("b") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.add("") with attribute value null (XML node with null namespace) 
-PASS classList.add("a", "") with attribute value null (XML node with null namespace) 
-PASS classList.add(" ") with attribute value null (XML node with null namespace) 
-PASS classList.add("\ta") with attribute value null (XML node with null namespace) 
-PASS classList.add("a\t") with attribute value null (XML node with null namespace) 
-PASS classList.add("\na") with attribute value null (XML node with null namespace) 
-PASS classList.add("a\n") with attribute value null (XML node with null namespace) 
-PASS classList.add("\fa") with attribute value null (XML node with null namespace) 
-PASS classList.add("a\f") with attribute value null (XML node with null namespace) 
-PASS classList.add("\ra") with attribute value null (XML node with null namespace) 
-PASS classList.add("a\r") with attribute value null (XML node with null namespace) 
-PASS classList.add(" a") with attribute value null (XML node with null namespace) 
-PASS classList.add("a ") with attribute value null (XML node with null namespace) 
-PASS classList.add("a", " ") with attribute value null (XML node with null namespace) 
-PASS classList.add("a", "aa ") with attribute value null (XML node with null namespace) 
-PASS classList.add("a") with attribute value "a" (XML node with null namespace) 
-PASS classList.add("AA") with attribute value "aa" (XML node with null namespace) 
-PASS classList.add("a") with attribute value "a b c" (XML node with null namespace) 
-PASS classList.add("a") with attribute value "a a a  b" (XML node with null namespace) 
-PASS classList.add("a") with attribute value null (XML node with null namespace) 
-PASS classList.add("a") with attribute value "" (XML node with null namespace) 
-PASS classList.add("a") with attribute value " " (XML node with null namespace) 
-PASS classList.add("a") with attribute value "   \f" (XML node with null namespace) 
-PASS classList.add("b") with attribute value "a" (XML node with null namespace) 
-PASS classList.add("d") with attribute value "a b c" (XML node with null namespace) 
-PASS classList.add("d") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.add("c") with attribute value "   a  a b" (XML node with null namespace) 
-PASS classList.add("a") with attribute value "   a  a b" (XML node with null namespace) 
-PASS classList.add("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.add("d", "e") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.add("a", "a") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.add("d", "d") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.add() with attribute value "a b c a " (XML node with null namespace) 
-PASS classList.add("a", "b") with attribute value null (XML node with null namespace) 
-PASS classList.add("a", "b") with attribute value "" (XML node with null namespace) 
-PASS classList.add(null) with attribute value null (XML node with null namespace) 
-PASS classList.add(undefined) with attribute value null (XML node with null namespace) 
-PASS classList.remove("") with attribute value null (XML node with null namespace) 
-PASS classList.remove(" ") with attribute value null (XML node with null namespace) 
-PASS classList.remove("\ta") with attribute value "\ta" (XML node with null namespace) 
-PASS classList.remove("a\t") with attribute value "a\t" (XML node with null namespace) 
-PASS classList.remove("\na") with attribute value "\na" (XML node with null namespace) 
-PASS classList.remove("a\n") with attribute value "a\n" (XML node with null namespace) 
-PASS classList.remove("\fa") with attribute value "\fa" (XML node with null namespace) 
-PASS classList.remove("a\f") with attribute value "a\f" (XML node with null namespace) 
-PASS classList.remove("\ra") with attribute value "\ra" (XML node with null namespace) 
-PASS classList.remove("a\r") with attribute value "a\r" (XML node with null namespace) 
-PASS classList.remove(" a") with attribute value " a" (XML node with null namespace) 
-PASS classList.remove("a ") with attribute value "a " (XML node with null namespace) 
-PASS classList.remove("aa ") with attribute value "aa " (XML node with null namespace) 
-PASS classList.remove("a") with attribute value null (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "" (XML node with null namespace) 
-PASS classList.remove("d") with attribute value "a b  c" (XML node with null namespace) 
-PASS classList.remove("A") with attribute value "a b  c" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value " a a a " (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "a  b" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "a  b  " (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "a a b" (XML node with null namespace) 
-PASS classList.remove("aa") with attribute value "aa aa bb" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "a a b a a c a a" (XML node with null namespace) 
-PASS classList.remove("b") with attribute value "a  b  c" (XML node with null namespace) 
-PASS classList.remove("bbb") with attribute value "aaa  bbb  ccc" (XML node with null namespace) 
-PASS classList.remove("b") with attribute value " a  b  c " (XML node with null namespace) 
-PASS classList.remove("b") with attribute value "a b b b c" (XML node with null namespace) 
-PASS classList.remove("c") with attribute value "a  b  c" (XML node with null namespace) 
-PASS classList.remove("c") with attribute value " a  b  c " (XML node with null namespace) 
-PASS classList.remove("c") with attribute value "a b c c c" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "a b a c a d a" (XML node with null namespace) 
-PASS classList.remove("AA") with attribute value "AA BB aa CC AA dd aa" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "\ra\na\ta\f" (XML node with null namespace) 
-PASS classList.remove("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.remove("d", "e") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove("a", "b") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove("a", "c") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove("a", "a") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove("d", "d") with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove() with attribute value "a b c " (XML node with null namespace) 
-PASS classList.remove("a", "b") with attribute value null (XML node with null namespace) 
-PASS classList.remove("a", "b") with attribute value "" (XML node with null namespace) 
-PASS classList.remove() with attribute value "a a" (XML node with null namespace) 
-PASS classList.remove(null) with attribute value "null" (XML node with null namespace) 
-PASS classList.remove(undefined) with attribute value "undefined" (XML node with null namespace) 
-PASS classList.toggle("") with attribute value null (XML node with null namespace) 
-PASS classList.toggle("aa ") with attribute value null (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value null (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value "" (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value " " (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value "   \f" (XML node with null namespace) 
-PASS classList.toggle("b") with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("A") with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("d") with attribute value "a b c" (XML node with null namespace) 
-PASS classList.toggle("d") with attribute value "   a  a b" (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value " a a a " (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value " A A A " (XML node with null namespace) 
-PASS classList.toggle("b") with attribute value " a b c " (XML node with null namespace) 
-PASS classList.toggle("b") with attribute value " a b c b b" (XML node with null namespace) 
-PASS classList.toggle("c") with attribute value " a b  c  " (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value " a b c " (XML node with null namespace) 
-PASS classList.toggle("b") with attribute value "   a  a b" (XML node with null namespace) 
-PASS classList.toggle("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.toggle("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) 
-PASS classList.toggle(null) with attribute value "null" (XML node with null namespace) 
-PASS classList.toggle(null) with attribute value "" (XML node with null namespace) 
-PASS classList.toggle(undefined) with attribute value "undefined" (XML node with null namespace) 
-PASS classList.toggle(undefined) with attribute value "" (XML node with null namespace) 
-PASS classList.toggle("a", true) with attribute value "" (XML node with null namespace) 
-PASS classList.toggle("a", true) with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("b", true) with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("b", true) with attribute value "a b" (XML node with null namespace) 
-PASS classList.toggle("a", false) with attribute value "" (XML node with null namespace) 
-PASS classList.toggle("a", false) with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("b", false) with attribute value "a" (XML node with null namespace) 
-PASS classList.toggle("b", false) with attribute value "a b" (XML node with null namespace) 
-FAIL classList.replace("", "a") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("", " ") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "a") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ta", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\t", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\na", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\n", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\fa", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\f", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ra", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\r", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace(" a", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a ", "b") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("a", " ") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ta") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\t") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\na") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\n") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\fa") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\f") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ra") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\r") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", " a") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a ") with attribute value null (XML node with null namespace) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "a") with attribute value "a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("A", "b") with attribute value "a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "A") with attribute value "a b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("d", "e") with attribute value "a b c" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "a") with attribute value "a a a  b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "d") with attribute value "a a a  b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value null (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " " (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " a  \f" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "d") with attribute value "a b c" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "a b c" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "c b a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "a b a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "a b a" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "   a  a b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "   a  a b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace(null, "b") with attribute value "a null" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", null) with attribute value "a b" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace(undefined, "b") with attribute value "a undefined" (XML node with null namespace) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", undefined) with attribute value "a b" (XML node with null namespace) Cannot read property 'apply' of undefined
-PASS Assigning to classList (foo node) 
-PASS .supports() must throw TypeError (foo node) 
-PASS classList.length when removed (foo node) 
-PASS classList.length when set to "" (foo node) 
-PASS classList.length when set to "   \t  \f" (foo node) 
-PASS classList.length when set to "a" (foo node) 
-PASS classList.length when set to "a A" (foo node) 
-PASS classList.length when set to "\r\na\t\f" (foo node) 
-PASS classList.length when set to "a a" (foo node) 
-PASS classList.length when set to "a a a a a a" (foo node) 
-PASS classList.length when set to "a a b b" (foo node) 
-PASS classList.length when set to "a A B b" (foo node) 
-PASS classList.length when set to "a b c c b a a b c c" (foo node) 
-PASS classList.length when set to "   a  a b" (foo node) 
-PASS classList.length when set to "a\tb\nc\fd\re f" (foo node) 
-PASS classList.toString() when removed (foo node) 
-PASS classList.toString() when set to "foo" (foo node) 
-PASS classList.toString() when set to "   a  a b" (foo node) 
-PASS classList.item() when set to null (foo node) 
-PASS classList.item() when set to "a" (foo node) 
-PASS classList.item() when set to "aa AA aa" (foo node) 
-PASS classList.item() when set to "a b" (foo node) 
-PASS classList.item() when set to "   a  a b" (foo node) 
-PASS classList.item() when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.contains("a") when set to null (foo node) 
-PASS classList.contains("") when set to null (foo node) 
-PASS classList.contains("  ") when set to null (foo node) 
-PASS classList.contains("a") when set to "" (foo node) 
-PASS classList.contains("a") when set to "a" (foo node) 
-PASS classList.contains("aa") when set to "a" (foo node) 
-PASS classList.contains("b") when set to "a" (foo node) 
-PASS classList.contains("A") when set to "a" (foo node) 
-PASS classList.contains("a.") when set to "a" (foo node) 
-PASS classList.contains("a)") when set to "a" (foo node) 
-PASS classList.contains(undefined) when set to "a" (foo node) 
-PASS classList.contains("a'") when set to "a" (foo node) 
-PASS classList.contains("a\"") when set to "a" (foo node) 
-PASS classList.contains("a$") when set to "a" (foo node) 
-PASS classList.contains("a~") when set to "a" (foo node) 
-PASS classList.contains("a?") when set to "a" (foo node) 
-PASS classList.contains("a\\") when set to "a" (foo node) 
-PASS classList.contains("a\t") when set to "a" (foo node) 
-PASS classList.contains("\ta") when set to "a" (foo node) 
-PASS classList.contains("a\n") when set to "a" (foo node) 
-PASS classList.contains("\na") when set to "a" (foo node) 
-PASS classList.contains("a\f") when set to "a" (foo node) 
-PASS classList.contains("\fa") when set to "a" (foo node) 
-PASS classList.contains("a\r") when set to "a" (foo node) 
-PASS classList.contains("\ra") when set to "a" (foo node) 
-PASS classList.contains("a ") when set to "a" (foo node) 
-PASS classList.contains(" a") when set to "a" (foo node) 
-PASS classList.contains("aa") when set to "aa AA" (foo node) 
-PASS classList.contains("AA") when set to "aa AA" (foo node) 
-PASS classList.contains("aA") when set to "aa AA" (foo node) 
-PASS classList.contains("a") when set to "a a a" (foo node) 
-PASS classList.contains("aa") when set to "a a a" (foo node) 
-PASS classList.contains("b") when set to "a a a" (foo node) 
-PASS classList.contains("a") when set to "a b c" (foo node) 
-PASS classList.contains("b") when set to "a b c" (foo node) 
-PASS classList.contains(null) when set to "null undefined" (foo node) 
-PASS classList.contains(undefined) when set to "null undefined" (foo node) 
-PASS classList.contains("a") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.contains("b") when set to "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.add("") with attribute value null (foo node) 
-PASS classList.add("a", "") with attribute value null (foo node) 
-PASS classList.add(" ") with attribute value null (foo node) 
-PASS classList.add("\ta") with attribute value null (foo node) 
-PASS classList.add("a\t") with attribute value null (foo node) 
-PASS classList.add("\na") with attribute value null (foo node) 
-PASS classList.add("a\n") with attribute value null (foo node) 
-PASS classList.add("\fa") with attribute value null (foo node) 
-PASS classList.add("a\f") with attribute value null (foo node) 
-PASS classList.add("\ra") with attribute value null (foo node) 
-PASS classList.add("a\r") with attribute value null (foo node) 
-PASS classList.add(" a") with attribute value null (foo node) 
-PASS classList.add("a ") with attribute value null (foo node) 
-PASS classList.add("a", " ") with attribute value null (foo node) 
-PASS classList.add("a", "aa ") with attribute value null (foo node) 
-PASS classList.add("a") with attribute value "a" (foo node) 
-PASS classList.add("AA") with attribute value "aa" (foo node) 
-PASS classList.add("a") with attribute value "a b c" (foo node) 
-PASS classList.add("a") with attribute value "a a a  b" (foo node) 
-PASS classList.add("a") with attribute value null (foo node) 
-PASS classList.add("a") with attribute value "" (foo node) 
-PASS classList.add("a") with attribute value " " (foo node) 
-PASS classList.add("a") with attribute value "   \f" (foo node) 
-PASS classList.add("b") with attribute value "a" (foo node) 
-PASS classList.add("d") with attribute value "a b c" (foo node) 
-PASS classList.add("d") with attribute value "a b c " (foo node) 
-PASS classList.add("c") with attribute value "   a  a b" (foo node) 
-PASS classList.add("a") with attribute value "   a  a b" (foo node) 
-PASS classList.add("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.add("d", "e") with attribute value "a b c " (foo node) 
-PASS classList.add("a", "a") with attribute value "a b c " (foo node) 
-PASS classList.add("d", "d") with attribute value "a b c " (foo node) 
-PASS classList.add() with attribute value "a b c a " (foo node) 
-PASS classList.add("a", "b") with attribute value null (foo node) 
-PASS classList.add("a", "b") with attribute value "" (foo node) 
-PASS classList.add(null) with attribute value null (foo node) 
-PASS classList.add(undefined) with attribute value null (foo node) 
-PASS classList.remove("") with attribute value null (foo node) 
-PASS classList.remove(" ") with attribute value null (foo node) 
-PASS classList.remove("\ta") with attribute value "\ta" (foo node) 
-PASS classList.remove("a\t") with attribute value "a\t" (foo node) 
-PASS classList.remove("\na") with attribute value "\na" (foo node) 
-PASS classList.remove("a\n") with attribute value "a\n" (foo node) 
-PASS classList.remove("\fa") with attribute value "\fa" (foo node) 
-PASS classList.remove("a\f") with attribute value "a\f" (foo node) 
-PASS classList.remove("\ra") with attribute value "\ra" (foo node) 
-PASS classList.remove("a\r") with attribute value "a\r" (foo node) 
-PASS classList.remove(" a") with attribute value " a" (foo node) 
-PASS classList.remove("a ") with attribute value "a " (foo node) 
-PASS classList.remove("aa ") with attribute value "aa " (foo node) 
-PASS classList.remove("a") with attribute value null (foo node) 
-PASS classList.remove("a") with attribute value "" (foo node) 
-PASS classList.remove("d") with attribute value "a b  c" (foo node) 
-PASS classList.remove("A") with attribute value "a b  c" (foo node) 
-PASS classList.remove("a") with attribute value " a a a " (foo node) 
-PASS classList.remove("a") with attribute value "a  b" (foo node) 
-PASS classList.remove("a") with attribute value "a  b  " (foo node) 
-PASS classList.remove("a") with attribute value "a a b" (foo node) 
-PASS classList.remove("aa") with attribute value "aa aa bb" (foo node) 
-PASS classList.remove("a") with attribute value "a a b a a c a a" (foo node) 
-PASS classList.remove("b") with attribute value "a  b  c" (foo node) 
-PASS classList.remove("bbb") with attribute value "aaa  bbb  ccc" (foo node) 
-PASS classList.remove("b") with attribute value " a  b  c " (foo node) 
-PASS classList.remove("b") with attribute value "a b b b c" (foo node) 
-PASS classList.remove("c") with attribute value "a  b  c" (foo node) 
-PASS classList.remove("c") with attribute value " a  b  c " (foo node) 
-PASS classList.remove("c") with attribute value "a b c c c" (foo node) 
-PASS classList.remove("a") with attribute value "a b a c a d a" (foo node) 
-PASS classList.remove("AA") with attribute value "AA BB aa CC AA dd aa" (foo node) 
-PASS classList.remove("a") with attribute value "\ra\na\ta\f" (foo node) 
-PASS classList.remove("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.remove("d", "e") with attribute value "a b c " (foo node) 
-PASS classList.remove("a", "b") with attribute value "a b c " (foo node) 
-PASS classList.remove("a", "c") with attribute value "a b c " (foo node) 
-PASS classList.remove("a", "a") with attribute value "a b c " (foo node) 
-PASS classList.remove("d", "d") with attribute value "a b c " (foo node) 
-PASS classList.remove() with attribute value "a b c " (foo node) 
-PASS classList.remove("a", "b") with attribute value null (foo node) 
-PASS classList.remove("a", "b") with attribute value "" (foo node) 
-PASS classList.remove() with attribute value "a a" (foo node) 
-PASS classList.remove(null) with attribute value "null" (foo node) 
-PASS classList.remove(undefined) with attribute value "undefined" (foo node) 
-PASS classList.toggle("") with attribute value null (foo node) 
-PASS classList.toggle("aa ") with attribute value null (foo node) 
-PASS classList.toggle("a") with attribute value null (foo node) 
-PASS classList.toggle("a") with attribute value "" (foo node) 
-PASS classList.toggle("a") with attribute value " " (foo node) 
-PASS classList.toggle("a") with attribute value "   \f" (foo node) 
-PASS classList.toggle("b") with attribute value "a" (foo node) 
-PASS classList.toggle("A") with attribute value "a" (foo node) 
-PASS classList.toggle("d") with attribute value "a b c" (foo node) 
-PASS classList.toggle("d") with attribute value "   a  a b" (foo node) 
-PASS classList.toggle("a") with attribute value "a" (foo node) 
-PASS classList.toggle("a") with attribute value " a a a " (foo node) 
-PASS classList.toggle("a") with attribute value " A A A " (foo node) 
-PASS classList.toggle("b") with attribute value " a b c " (foo node) 
-PASS classList.toggle("b") with attribute value " a b c b b" (foo node) 
-PASS classList.toggle("c") with attribute value " a b  c  " (foo node) 
-PASS classList.toggle("a") with attribute value " a b c " (foo node) 
-PASS classList.toggle("b") with attribute value "   a  a b" (foo node) 
-PASS classList.toggle("a") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.toggle("c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) 
-PASS classList.toggle(null) with attribute value "null" (foo node) 
-PASS classList.toggle(null) with attribute value "" (foo node) 
-PASS classList.toggle(undefined) with attribute value "undefined" (foo node) 
-PASS classList.toggle(undefined) with attribute value "" (foo node) 
-PASS classList.toggle("a", true) with attribute value "" (foo node) 
-PASS classList.toggle("a", true) with attribute value "a" (foo node) 
-PASS classList.toggle("b", true) with attribute value "a" (foo node) 
-PASS classList.toggle("b", true) with attribute value "a b" (foo node) 
-PASS classList.toggle("a", false) with attribute value "" (foo node) 
-PASS classList.toggle("a", false) with attribute value "a" (foo node) 
-PASS classList.toggle("b", false) with attribute value "a" (foo node) 
-PASS classList.toggle("b", false) with attribute value "a b" (foo node) 
-FAIL classList.replace("", "a") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("", " ") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "a") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ta", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\t", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\na", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\n", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\fa", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\f", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("\ra", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a\r", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace(" a", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a ", "b") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace(" ", "") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
-FAIL classList.replace("a", " ") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ta") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\t") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\na") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\n") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\fa") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\f") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "\ra") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a\r") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", " a") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("b", "a ") with attribute value null (foo node) assert_throws: function "function () {
-        var list = e.classList;
-        var res = list[funcName].apply(list, args);
-      }" threw object "TypeError: Cannot read property 'apply' of undefined" that is not a DOMException InvalidCharacterError: property "code" is equal to undefined, expected 5
-FAIL classList.replace("a", "a") with attribute value "a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("A", "b") with attribute value "a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "A") with attribute value "a b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("d", "e") with attribute value "a b c" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "a") with attribute value "a a a  b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "d") with attribute value "a a a  b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value null (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value "" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " " (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "b") with attribute value " a  \f" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "d") with attribute value "a b c" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "a b c" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("c", "a") with attribute value "c b a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "a b a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "a b a" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "   a  a b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "   a  a b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("b", "c") with attribute value "\t\n\f\r a\t\n\f\r b\t\n\f\r " (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace(null, "b") with attribute value "a null" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", null) with attribute value "a b" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace(undefined, "b") with attribute value "a undefined" (foo node) Cannot read property 'apply' of undefined
-FAIL classList.replace("a", undefined) with attribute value "a b" (foo node) Cannot read property 'apply' of undefined
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/eventsource/eventsource-cross-origin.htm b/third_party/WebKit/LayoutTests/external/wpt/eventsource/eventsource-cross-origin.htm
index b753bad..c1c310e 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/eventsource/eventsource-cross-origin.htm
+++ b/third_party/WebKit/LayoutTests/external/wpt/eventsource/eventsource-cross-origin.htm
@@ -10,17 +10,17 @@
   <body>
     <div id="log"></div>
     <script>
-      var crossdomain = location.href
-                    .replace('://', '://www2.')
-                    .replace(/\/[^\/]*$/, '/')
+      const crossdomain = location.href.replace('://', '://élève.').replace(/\/[^\/]*$/, '/'),
+            origin = location.origin.replace('://', '://xn--lve-6lad.');
+
 
       function doCORS(url, title) {
         async_test(document.title + " " + title).step(function() {
           var source = new EventSource(url, { withCredentials: true })
-          source.onmessage = this.step_func(function(e) {
-            assert_equals(e.data, "data")
-            source.close()
-            this.done()
+          source.onmessage = this.step_func_done(e => {
+            assert_equals(e.data, "data");
+            assert_equals(e.origin, origin);
+            source.close();
           })
         })
       }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt
new file mode 100644
index 0000000..aff38e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Document#exitFullscreen() assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual.html
index a3ac2ff..ebe7ea2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-manual.html
@@ -7,16 +7,18 @@
 <script>
 async_test(function(t)
 {
-    trusted_request(t, document.querySelector("div"));
+    var div = document.querySelector("div");
+    trusted_request(t, div);
 
     document.addEventListener("fullscreenchange", t.step_func(function(event)
     {
         if (document.fullscreenElement) {
             document.exitFullscreen();
         } else {
-            assert_equals(event.target, document, "event.target");
-            assert_false(event.bubbles, "event.bubbles");
+            assert_equals(event.target, div, "event.target");
+            assert_true(event.bubbles, "event.bubbles");
             assert_false(event.cancelable, "event.cancelable");
+            assert_true(event.composed, "event.composed");
             t.done();
         }
     }));
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt
new file mode 100644
index 0000000..1ceed0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Element#requestFullscreen() and Document#exitFullscreen() in iframe assert_equals: event target expected Element node <iframe allowfullscreen=""></iframe> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
index 0a6d3cb8..40ca3ce 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-exit-iframe-manual.html
@@ -16,7 +16,7 @@
     count++;
     assert_between_inclusive(count, 1, 4, 'number of fullscreenchange events');
     const expected = {
-      target: count == 1 || count == 4 ? document : iframeDoc,
+      target: count == 1 || count == 4 ? iframe : iframeBody,
       outerFullscreenElement: count <= 2 ? iframe : null,
       innerFullscreenElement: count <= 2 ? iframeBody : null,
     };
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html
index 28832824..6792262 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html
@@ -15,8 +15,9 @@
   iframeDoc.onfullscreenerror = t.unreached_func("fullscreenerror event in iframe");
   document.onfullscreenchange = t.unreached_func("fullscreenchange event");
   document.onfullscreenerror = t.step_func_done(() => {
-    assert_equals(document.fullscreenElement, null);
-    assert_equals(iframeDoc.fullscreenElement, null);
+    assert_equals(document.fullscreenElement, null, "outer fullscreen element");
+    assert_equals(iframeDoc.fullscreenElement, null, "inner fullscreen element");
+    assert_equals(event.target, document, "event target");
   });
 
   trusted_click(t, () => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual.html
index 03c38cc..89e77b5f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual.html
@@ -10,8 +10,9 @@
   const target = document.getElementById("target");
 
   document.onfullscreenchange = t.unreached_func("fullscreenchange event");
-  document.onfullscreenerror = t.step_func_done(() => {
-    assert_equals(document.fullscreenElement, null);
+  document.onfullscreenerror = t.step_func_done(event => {
+    assert_equals(document.fullscreenElement, null, "fullscreen element");
+    assert_equals(event.target, document, "event target");
   });
 
   trusted_click(t, () => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt
new file mode 100644
index 0000000..945809d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Element#requestFullscreen() assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual.html
index 12f0a32..7563790 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-manual.html
@@ -11,9 +11,10 @@
 
     document.addEventListener("fullscreenchange", t.step_func(function(event)
     {
-        assert_equals(event.target, document, "event.target");
-        assert_false(event.bubbles, "event.bubbles");
+        assert_equals(event.target, div, "event.target");
+        assert_true(event.bubbles, "event.bubbles");
         assert_false(event.cancelable, "event.cancelable");
+        assert_true(event.composed, "event.composed");
         t.done();
     }));
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt
new file mode 100644
index 0000000..1ab3134
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Element#requestFullscreen() when not allowed to request fullscreen assert_equals: event.target expected Element node <div id="log"></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed.html
index 041a458..eb9e23b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/element-request-fullscreen-not-allowed.html
@@ -8,9 +8,10 @@
   const div = document.querySelector("div");
 
   document.addEventListener("fullscreenerror", t.step_func_done(event => {
-    assert_equals(event.target, document, "event.target");
-    assert_false(event.bubbles, "event.bubbles");
+    assert_equals(event.target, div, "event.target");
+    assert_true(event.bubbles, "event.bubbles");
     assert_false(event.cancelable, "event.cancelable");
+    assert_true(event.composed, "event.composed");
   }));
 
   div.requestFullscreen();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt
index 2787f89..e11ab7b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/interfaces-expected.txt
@@ -16,8 +16,12 @@
 PASS Document interface: new Document must inherit property "fullscreenElement" with the proper type (35) 
 FAIL ShadowRoot interface: attribute fullscreenElement assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
 FAIL Element interface: operation requestFullscreen() assert_unreached: Throws "TypeError: Illegal invocation" instead of rejecting promise Reached unreachable code
+FAIL Element interface: attribute onfullscreenchange assert_true: The prototype object must have a property "onfullscreenchange" expected true got false
+FAIL Element interface: attribute onfullscreenerror assert_true: The prototype object must have a property "onfullscreenerror" expected true got false
 PASS Element must be primary interface of document.createElementNS(null, "test") 
 PASS Stringification of document.createElementNS(null, "test") 
 PASS Element interface: document.createElementNS(null, "test") must inherit property "requestFullscreen" with the proper type (34) 
+FAIL Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenchange" with the proper type (35) assert_inherits: property "onfullscreenchange" not found in prototype chain
+FAIL Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type (36) assert_inherits: property "onfullscreenerror" not found in prototype chain
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt
new file mode 100644
index 0000000..a2b4673
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Move the fullscreen element to another document assert_equals: expected Element node <div></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual.html
new file mode 100644
index 0000000..1d388ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/move-to-iframe-manual.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Move the fullscreen element to another document</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../trusted-click.js"></script>
+<div></div>
+<iframe></iframe>
+<script>
+async_test(t => {
+  const div = document.querySelector("div");
+  const iframe = document.querySelector("iframe");
+  document.onfullscreenchange = t.step_func(event => {
+    assert_equals(document.fullscreenElement, div);
+    assert_equals(event.target, div);
+
+    assert_equals(div.ownerDocument, document);
+    iframe.contentDocument.body.appendChild(div);
+    assert_not_equals(div.ownerDocument, document);
+
+    div.onfullscreenchange = t.unreached_func("fullscreenchange fired on element");
+    iframe.contentDocument.onfullscreenchange = t.unreached_func("fullscreenchange fired on other document");
+    document.onfullscreenchange = t.step_func_done(event => {
+      assert_equals(document.fullscreenElement, null);
+      assert_equals(event.target, document);
+    });
+  });
+  trusted_request(t, div);
+});
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt
new file mode 100644
index 0000000..b7fc9f1b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual-expected.txt
@@ -0,0 +1,6 @@
+This is a testharness.js-based test.
+FAIL Remove the first element on the fullscreen element stack assert_equals: expected Element node <div id="first">
+    <div id="last"></div>
+</div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual.html
index 861dc69..16ef298f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-first-manual.html
@@ -12,19 +12,21 @@
 {
     var first = document.getElementById("first");
     trusted_request(t, first);
-    document.onfullscreenchange = t.step_func(function()
+    document.onfullscreenchange = t.step_func(function(event)
     {
         assert_equals(document.fullscreenElement, first);
+        assert_equals(event.target, first);
         var last = document.getElementById("last");
         trusted_request(t, last);
-        document.onfullscreenchange = t.step_func(function()
+        document.onfullscreenchange = t.step_func(function(event)
         {
             assert_equals(document.fullscreenElement, last);
+            assert_equals(event.target, last);
             first.remove();
-            document.onfullscreenchange = t.step_func(function()
+            document.onfullscreenchange = t.step_func_done(function(event)
             {
                 assert_equals(document.fullscreenElement, null);
-                t.done();
+                assert_equals(event.target, document);
             });
         });
     });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt
new file mode 100644
index 0000000..477882ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual-expected.txt
@@ -0,0 +1,6 @@
+This is a testharness.js-based test.
+FAIL Remove the last element on the fullscreen element stack assert_equals: expected Element node <div id="first">
+    <div id="last"></div>
+</div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual.html
index 3837439..a7c54b6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-last-manual.html
@@ -12,19 +12,21 @@
 {
     var first = document.getElementById("first");
     trusted_request(t, first);
-    document.onfullscreenchange = t.step_func(function()
+    document.onfullscreenchange = t.step_func(function(event)
     {
         assert_equals(document.fullscreenElement, first);
+        assert_equals(event.target, first);
         var last = document.getElementById("last");
         trusted_request(t, last);
-        document.onfullscreenchange = t.step_func(function()
+        document.onfullscreenchange = t.step_func(function(event)
         {
             assert_equals(document.fullscreenElement, last);
+            assert_equals(event.target, last);
             last.remove();
-            document.onfullscreenchange = t.step_func(function()
+            document.onfullscreenchange = t.step_func_done(function(event)
             {
                 assert_equals(document.fullscreenElement, first);
-                t.done();
+                assert_equals(event.target, document);
             });
         });
     });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt
new file mode 100644
index 0000000..1fba999c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Remove the parent of the fullscreen element assert_equals: expected Element node <div id="child"></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual.html
index a284fc6..01796f3 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-parent-manual.html
@@ -12,14 +12,15 @@
 {
     var child = document.getElementById("child");
     trusted_request(t, child);
-    document.onfullscreenchange = t.step_func(function()
+    document.onfullscreenchange = t.step_func(function(event)
     {
         assert_equals(document.fullscreenElement, child);
+        assert_equals(event.target, child);
         child.parentNode.remove();
-        document.onfullscreenchange = t.step_func(function()
+        document.onfullscreenchange = t.step_func_done(function(event)
         {
             assert_equals(document.fullscreenElement, null);
-            t.done();
+            assert_equals(event.target, document);
         });
     });
 });
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt
new file mode 100644
index 0000000..4aefca7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL Remove the single element on the fullscreen element stack assert_equals: expected Element node <div id="single"></div> but got Document node with 2 children
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual.html b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual.html
index 9a57d93..ed0a6b7f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fullscreen/model/remove-single-manual.html
@@ -9,14 +9,15 @@
 async_test(function(t)
 {
     var single = document.getElementById("single");
-    document.onfullscreenchange = t.step_func(function()
+    document.onfullscreenchange = t.step_func(function(event)
     {
         assert_equals(document.fullscreenElement, single);
+        assert_equals(event.target, single);
         single.remove();
-        document.onfullscreenchange = t.step_func(function()
+        document.onfullscreenchange = t.step_func_done(function(event)
         {
             assert_equals(document.fullscreenElement, null);
-            t.done();
+            assert_equals(event.target, document);
         });
     });
     trusted_request(t, single);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html
new file mode 100644
index 0000000..4911a071
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script type="module">
+import { delayedLoaded }  from "./resources/delayed-modulescript.py";
+import { A } from "./404.js";
+window.loadSuccess = delayedLoaded;
+</script>
+<script type="module">
+test(function () {
+    assert_equals(window.loadSuccess, undefined,
+      "module tree w/ its sub graph 404 should fail to load without crashing");
+}, "Import a module graph w/ sub-graph 404.");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py
new file mode 100644
index 0000000..6ed1621
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py
@@ -0,0 +1,7 @@
+import time
+
+def main(request, response):
+    delay = float(request.GET.first("ms", 500))
+    time.sleep(delay / 1E3);
+
+    return [("Content-type", "text/javascript")], "export let delayedLoaded = true;"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/fullscreen.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/fullscreen.idl
index 43ffa6a..61710f0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/fullscreen.idl
+++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/fullscreen.idl
@@ -1,5 +1,8 @@
 partial interface Element {
   Promise<void> requestFullscreen();
+
+  attribute EventHandler onfullscreenchange;
+  attribute EventHandler onfullscreenerror;
 };
 
 partial interface Document {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist b/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
index 1984b0f..97b57c60 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
+++ b/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
@@ -151,6 +151,7 @@
 SET TIMEOUT: common/reftest-wait.js
 SET TIMEOUT: conformance-checkers/*
 SET TIMEOUT: content-security-policy/*
+SET TIMEOUT: css-font-display/font-display.html
 SET TIMEOUT: encrypted-media/Google/migrated_to_root_disabled/encrypted-media-utils.js
 SET TIMEOUT: encrypted-media/polyfill/chrome-polyfill.js
 SET TIMEOUT: encrypted-media/polyfill/clearkey-polyfill.js
@@ -388,7 +389,7 @@
 
 
 ## Things we're stopping from getting worse
-CONSOLE: css/css-flexbox-1/support/check-layout-th.js
+CONSOLE: css/*/support/check-layout-th.js
 CONSOLE: css/css-regions-1/elements/support/Three.js
 CONSOLE: css/css-regions-1/interactivity/selection/support/js/selection-test-helper.js
 CONSOLE: css/css-regions-1/stacking-context/javascript-stacking-context-002.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html b/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html
deleted file mode 100644
index 200491a5..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE HTML>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<title> Check End Position of ScrollIntoView</title>
-<div id='container' style='height: 2500px; width: 2500px;'>
-  <div id='content' style='height: 500px; width: 500px;margin-left: 1000px; margin-right: 1000px; margin-top: 1000px;margin-bottom: 1000px'>
-  </div>
-</div>
-<script>
-
-var frames = 0;
-var content_height = 500;
-var content_width = 500;
-var window_height = document.documentElement.clientHeight;
-var window_width = document.documentElement.clientWidth;
-var content = document.getElementById('content');
-
-function animate (funct, x, y, next) {
-  if (frames < 500) {
-    ++frames;
-    requestAnimationFrame(animate.bind(null, funct, x, y, next));
-  } else {
-    funct.step(function() {
-      assert_approx_equals(window.scrollX, x, 1);
-      assert_approx_equals(window.scrollY, y, 1);
-      funct.done();
-      if (next)
-        next();
-    });
-  }
-}
-
-var checkNearest = async_test("Smooth ScrollIntoView should scroll the element to the 'nearest' position");
-checkNearest.step(function() {
-  content.scrollIntoView(
-    {behavior: 'smooth', block: 'nearest', inlinePosition: 'nearest'});
-  frames = 0;
-  var x = content.offsetLeft + content_width - window_width;
-  var y = content.offsetTop + content_height - window_height;
-  animate(checkNearest, x, y, test2);
-});
-
-var checkStart = async_test("Smooth ScrollIntoView should scroll the element to the 'start' position");
-function test2() {
-  checkStart.step(function() {
-    content.scrollIntoView(
-      {behavior: 'smooth', block: 'start', inlinePosition: 'start'});
-    frames = 0;
-    animate(checkStart, content.offsetLeft, content.offsetTop, test3);
-  });
-}
-
-var checkCenter = async_test("Smooth ScrollIntoView should scroll the element to the 'center' position");
-function test3() {
-  checkCenter.step(function() {
-    content.scrollIntoView(
-      {behavior: 'smooth', block: 'center', inlinePosition: 'center'});
-    frames = 0;
-    var x = content.offsetLeft + (content_width - window_width) / 2;
-    var y = content.offsetTop + (content_height - window_height) / 2;
-    animate(checkCenter, x, y, test4);
-  });
-}
-
-var checkEnd = async_test("Smooth ScrollIntoView should scroll the element to the 'end' position");
-function test4() {
-  checkEnd.step(function() {
-    content.scrollIntoView(
-      {behavior: 'smooth', block: 'end', inlinePosition: 'end'});
-    frames = 0;
-    var x = content.offsetLeft + content_width - window_width;
-    var y = content.offsetTop + content_height - window_height;
-    animate(checkEnd, x, y, null);
-  });
-}
-
-</script>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/url/interfaces.any.js b/third_party/WebKit/LayoutTests/external/wpt/url/interfaces.any.js
index 5e330d1..aa5d5c8 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/url/interfaces.any.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/url/interfaces.any.js
@@ -3,7 +3,8 @@
 
 let idlArray,
     idl = `[Constructor(USVString url, optional USVString base),
- Exposed=(Window,Worker)]
+ Exposed=(Window,Worker),
+ LegacyWindowAlias=webkitURL]
 interface URL {
   stringifier attribute USVString href;
   readonly attribute USVString origin;
@@ -15,7 +16,7 @@
            attribute USVString port;
            attribute USVString pathname;
            attribute USVString search;
-  readonly attribute URLSearchParams searchParams;
+  [SameObject] readonly attribute URLSearchParams searchParams;
            attribute USVString hash;
 
   USVString toJSON();
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
index 1c62615..17043d4a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -754,6 +754,7 @@
     method item
     method keys
     method remove
+    method replace
     method supports
     method toString
     method toggle
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
index 6ee660b3..ef2bb83e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -683,6 +683,7 @@
     method item
     method keys
     method remove
+    method replace
     method supports
     method toString
     method toggle
diff --git a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
index 0591229..60ded4ee 100644
--- a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
@@ -1287,6 +1287,7 @@
     method item
     method keys
     method remove
+    method replace
     method supports
     method toString
     method toggle
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index 844f5a8..d2dd3d1 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -1287,6 +1287,7 @@
     method item
     method keys
     method remove
+    method replace
     method supports
     method toString
     method toggle
diff --git a/third_party/WebKit/Source/bindings/core/v8/BUILD.gn b/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
index 6708cbef..b8a25c6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
+++ b/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
@@ -10,165 +10,6 @@
 
 visibility = [ "//third_party/WebKit/Source/*" ]
 
-generated_core_dictionary_files = [
-  "$blink_core_output_dir/animation/AnimationEffectTimingProperties.cpp",
-  "$blink_core_output_dir/animation/AnimationEffectTimingProperties.h",
-  "$blink_core_output_dir/animation/ComputedTimingProperties.cpp",
-  "$blink_core_output_dir/animation/ComputedTimingProperties.h",
-  "$blink_core_output_dir/animation/KeyframeAnimationOptions.cpp",
-  "$blink_core_output_dir/animation/KeyframeAnimationOptions.h",
-  "$blink_core_output_dir/animation/KeyframeEffectOptions.cpp",
-  "$blink_core_output_dir/animation/KeyframeEffectOptions.h",
-  "$blink_core_output_dir/css/FontFaceDescriptors.cpp",
-  "$blink_core_output_dir/css/FontFaceDescriptors.h",
-  "$blink_core_output_dir/css/FontFaceSetLoadEventInit.cpp",
-  "$blink_core_output_dir/css/FontFaceSetLoadEventInit.h",
-  "$blink_core_output_dir/css/MediaQueryListEventInit.cpp",
-  "$blink_core_output_dir/css/MediaQueryListEventInit.h",
-  "$blink_core_output_dir/css/PropertyDescriptor.cpp",
-  "$blink_core_output_dir/css/PropertyDescriptor.h",
-  "$blink_core_output_dir/css/cssom/CSSCalcDictionary.cpp",
-  "$blink_core_output_dir/css/cssom/CSSCalcDictionary.h",
-  "$blink_core_output_dir/dom/ElementCreationOptions.cpp",
-  "$blink_core_output_dir/dom/ElementCreationOptions.h",
-  "$blink_core_output_dir/dom/ElementDefinitionOptions.cpp",
-  "$blink_core_output_dir/dom/ElementDefinitionOptions.h",
-  "$blink_core_output_dir/dom/ElementRegistrationOptions.cpp",
-  "$blink_core_output_dir/dom/ElementRegistrationOptions.h",
-  "$blink_core_output_dir/dom/GetRootNodeOptions.cpp",
-  "$blink_core_output_dir/dom/GetRootNodeOptions.h",
-  "$blink_core_output_dir/dom/IdleRequestOptions.cpp",
-  "$blink_core_output_dir/dom/IdleRequestOptions.h",
-  "$blink_core_output_dir/dom/IntersectionObserverInit.cpp",
-  "$blink_core_output_dir/dom/IntersectionObserverInit.h",
-  "$blink_core_output_dir/dom/MutationObserverInit.cpp",
-  "$blink_core_output_dir/dom/MutationObserverInit.h",
-  "$blink_core_output_dir/dom/shadow/ShadowRootInit.cpp",
-  "$blink_core_output_dir/dom/shadow/ShadowRootInit.h",
-  "$blink_core_output_dir/dom/TouchInit.cpp",
-  "$blink_core_output_dir/dom/TouchInit.h",
-  "$blink_core_output_dir/events/AddEventListenerOptions.cpp",
-  "$blink_core_output_dir/events/AddEventListenerOptions.h",
-  "$blink_core_output_dir/events/AnimationEventInit.cpp",
-  "$blink_core_output_dir/events/AnimationEventInit.h",
-  "$blink_core_output_dir/events/AnimationPlaybackEventInit.cpp",
-  "$blink_core_output_dir/events/AnimationPlaybackEventInit.h",
-  "$blink_core_output_dir/events/ApplicationCacheErrorEventInit.cpp",
-  "$blink_core_output_dir/events/ApplicationCacheErrorEventInit.h",
-  "$blink_core_output_dir/events/ClipboardEventInit.cpp",
-  "$blink_core_output_dir/events/ClipboardEventInit.h",
-  "$blink_core_output_dir/events/CompositionEventInit.cpp",
-  "$blink_core_output_dir/events/CompositionEventInit.h",
-  "$blink_core_output_dir/events/CustomEventInit.cpp",
-  "$blink_core_output_dir/events/CustomEventInit.h",
-  "$blink_core_output_dir/events/DragEventInit.cpp",
-  "$blink_core_output_dir/events/DragEventInit.h",
-  "$blink_core_output_dir/events/ErrorEventInit.cpp",
-  "$blink_core_output_dir/events/ErrorEventInit.h",
-  "$blink_core_output_dir/events/EventInit.cpp",
-  "$blink_core_output_dir/events/EventInit.h",
-  "$blink_core_output_dir/events/EventListenerOptions.cpp",
-  "$blink_core_output_dir/events/EventListenerOptions.h",
-  "$blink_core_output_dir/events/EventModifierInit.cpp",
-  "$blink_core_output_dir/events/EventModifierInit.h",
-  "$blink_core_output_dir/events/FocusEventInit.cpp",
-  "$blink_core_output_dir/events/FocusEventInit.h",
-  "$blink_core_output_dir/events/HashChangeEventInit.cpp",
-  "$blink_core_output_dir/events/HashChangeEventInit.h",
-  "$blink_core_output_dir/events/InputEventInit.cpp",
-  "$blink_core_output_dir/events/InputEventInit.h",
-  "$blink_core_output_dir/events/KeyboardEventInit.cpp",
-  "$blink_core_output_dir/events/KeyboardEventInit.h",
-  "$blink_core_output_dir/events/MessageEventInit.cpp",
-  "$blink_core_output_dir/events/MessageEventInit.h",
-  "$blink_core_output_dir/events/MouseEventInit.cpp",
-  "$blink_core_output_dir/events/MouseEventInit.h",
-  "$blink_core_output_dir/events/PageTransitionEventInit.cpp",
-  "$blink_core_output_dir/events/PageTransitionEventInit.h",
-  "$blink_core_output_dir/events/PointerEventInit.cpp",
-  "$blink_core_output_dir/events/PointerEventInit.h",
-  "$blink_core_output_dir/events/PopStateEventInit.cpp",
-  "$blink_core_output_dir/events/PopStateEventInit.h",
-  "$blink_core_output_dir/events/ProgressEventInit.cpp",
-  "$blink_core_output_dir/events/ProgressEventInit.h",
-  "$blink_core_output_dir/events/PromiseRejectionEventInit.cpp",
-  "$blink_core_output_dir/events/PromiseRejectionEventInit.h",
-  "$blink_core_output_dir/events/SecurityPolicyViolationEventInit.cpp",
-  "$blink_core_output_dir/events/SecurityPolicyViolationEventInit.h",
-  "$blink_core_output_dir/events/TouchEventInit.cpp",
-  "$blink_core_output_dir/events/TouchEventInit.h",
-  "$blink_core_output_dir/events/TransitionEventInit.cpp",
-  "$blink_core_output_dir/events/TransitionEventInit.h",
-  "$blink_core_output_dir/events/UIEventInit.cpp",
-  "$blink_core_output_dir/events/UIEventInit.h",
-  "$blink_core_output_dir/events/WheelEventInit.cpp",
-  "$blink_core_output_dir/events/WheelEventInit.h",
-  "$blink_core_output_dir/fileapi/BlobPropertyBag.cpp",
-  "$blink_core_output_dir/fileapi/BlobPropertyBag.h",
-  "$blink_core_output_dir/fileapi/FilePropertyBag.cpp",
-  "$blink_core_output_dir/fileapi/FilePropertyBag.h",
-  "$blink_core_output_dir/frame/ScrollOptions.cpp",
-  "$blink_core_output_dir/frame/ScrollOptions.h",
-  "$blink_core_output_dir/frame/ScrollToOptions.cpp",
-  "$blink_core_output_dir/frame/ScrollToOptions.h",
-  "$blink_core_output_dir/geometry/DOMMatrixInit.cpp",
-  "$blink_core_output_dir/geometry/DOMMatrixInit.h",
-  "$blink_core_output_dir/geometry/DOMPointInit.cpp",
-  "$blink_core_output_dir/geometry/DOMPointInit.h",
-  "$blink_core_output_dir/geometry/DOMQuadInit.cpp",
-  "$blink_core_output_dir/geometry/DOMQuadInit.h",
-  "$blink_core_output_dir/geometry/DOMRectInit.cpp",
-  "$blink_core_output_dir/geometry/DOMRectInit.h",
-  "$blink_core_output_dir/html/AssignedNodesOptions.cpp",
-  "$blink_core_output_dir/html/AssignedNodesOptions.h",
-  "$blink_core_output_dir/html/ImageDataColorSettings.cpp",
-  "$blink_core_output_dir/html/ImageDataColorSettings.h",
-  "$blink_core_output_dir/html/canvas/CanvasContextCreationAttributes.cpp",
-  "$blink_core_output_dir/html/canvas/CanvasContextCreationAttributes.h",
-  "$blink_core_output_dir/html/track/TrackEventInit.cpp",
-  "$blink_core_output_dir/html/track/TrackEventInit.h",
-  "$blink_core_output_dir/imagebitmap/ImageBitmapOptions.cpp",
-  "$blink_core_output_dir/imagebitmap/ImageBitmapOptions.h",
-  "$blink_core_output_dir/input/InputDeviceCapabilitiesInit.cpp",
-  "$blink_core_output_dir/input/InputDeviceCapabilitiesInit.h",
-  "$blink_core_output_dir/mojo/MojoCreateDataPipeOptions.cpp",
-  "$blink_core_output_dir/mojo/MojoCreateDataPipeOptions.h",
-  "$blink_core_output_dir/mojo/MojoCreateDataPipeResult.cpp",
-  "$blink_core_output_dir/mojo/MojoCreateDataPipeResult.h",
-  "$blink_core_output_dir/mojo/MojoCreateMessagePipeResult.cpp",
-  "$blink_core_output_dir/mojo/MojoCreateMessagePipeResult.h",
-  "$blink_core_output_dir/mojo/MojoCreateSharedBufferResult.cpp",
-  "$blink_core_output_dir/mojo/MojoCreateSharedBufferResult.h",
-  "$blink_core_output_dir/mojo/MojoDiscardDataOptions.cpp",
-  "$blink_core_output_dir/mojo/MojoDiscardDataOptions.h",
-  "$blink_core_output_dir/mojo/MojoDuplicateBufferHandleOptions.cpp",
-  "$blink_core_output_dir/mojo/MojoDuplicateBufferHandleOptions.h",
-  "$blink_core_output_dir/mojo/MojoHandleSignals.cpp",
-  "$blink_core_output_dir/mojo/MojoHandleSignals.h",
-  "$blink_core_output_dir/mojo/MojoMapBufferResult.cpp",
-  "$blink_core_output_dir/mojo/MojoMapBufferResult.h",
-  "$blink_core_output_dir/mojo/MojoReadDataOptions.cpp",
-  "$blink_core_output_dir/mojo/MojoReadDataOptions.h",
-  "$blink_core_output_dir/mojo/MojoReadDataResult.cpp",
-  "$blink_core_output_dir/mojo/MojoReadDataResult.h",
-  "$blink_core_output_dir/mojo/MojoReadMessageFlags.cpp",
-  "$blink_core_output_dir/mojo/MojoReadMessageFlags.h",
-  "$blink_core_output_dir/mojo/MojoReadMessageResult.cpp",
-  "$blink_core_output_dir/mojo/MojoReadMessageResult.h",
-  "$blink_core_output_dir/mojo/MojoWriteDataOptions.cpp",
-  "$blink_core_output_dir/mojo/MojoWriteDataOptions.h",
-  "$blink_core_output_dir/mojo/MojoWriteDataResult.cpp",
-  "$blink_core_output_dir/mojo/MojoWriteDataResult.h",
-  "$blink_core_output_dir/offscreencanvas/ImageEncodeOptions.cpp",
-  "$blink_core_output_dir/offscreencanvas/ImageEncodeOptions.h",
-  "$blink_core_output_dir/page/scrolling/ScrollStateInit.cpp",
-  "$blink_core_output_dir/page/scrolling/ScrollStateInit.h",
-  "$blink_core_output_dir/timing/PerformanceObserverInit.cpp",
-  "$blink_core_output_dir/timing/PerformanceObserverInit.h",
-  "$blink_core_output_dir/workers/WorkletOptions.cpp",
-  "$blink_core_output_dir/workers/WorkletOptions.h",
-]
-
 bindings_core_generated_union_type_files = [
   "$bindings_core_v8_output_dir/AddEventListenerOptionsOrBoolean.cpp",
   "$bindings_core_v8_output_dir/AddEventListenerOptionsOrBoolean.h",
@@ -244,15 +85,6 @@
   "$bindings_core_v8_output_dir/VideoTrackOrAudioTrackOrTextTrack.h",
 ]
 
-generated_core_testing_dictionary_files = [
-  "$blink_core_output_dir/testing/InternalDictionary.cpp",
-  "$blink_core_output_dir/testing/InternalDictionary.h",
-  "$blink_core_output_dir/testing/InternalDictionaryDerived.cpp",
-  "$blink_core_output_dir/testing/InternalDictionaryDerived.h",
-  "$blink_core_output_dir/testing/InternalDictionaryDerivedDerived.cpp",
-  "$blink_core_output_dir/testing/InternalDictionaryDerivedDerived.h",
-]
-
 generated_core_testing_callback_function_files = [
   "$bindings_core_v8_output_dir/TestCallback.cpp",
   "$bindings_core_v8_output_dir/TestCallback.h",
@@ -322,22 +154,32 @@
 }
 
 idl_impl("bindings_core_impl_generated") {
-  sources = core_dictionary_idl_files + core_testing_dictionary_idl_files
-  outputs = bindings_core_generated_union_type_files +
-            generated_core_dictionary_files +
-            generated_core_testing_dictionary_files +
-            generated_core_testing_callback_function_files +
-            generated_core_callback_function_files
-  output_dir = bindings_core_v8_output_dir
+  dict_idls = core_dictionary_idl_files + core_testing_dictionary_idl_files
+  non_dict_outputs = bindings_core_generated_union_type_files +
+                     generated_core_testing_callback_function_files +
+                     generated_core_callback_function_files
+  non_dict_output_dir = bindings_core_v8_output_dir
   target_component = "core"
 }
 
+# Even though the idl_impl() call above generates .cpp and .h files for both
+# |core_dictionary_idl_files| and |core_testing_dictionary_idl_files|, we need
+# to do some manual processing because the generated files are used in
+# different targets.
+generated_core_testing_dictionary_files =
+    process_file_template(
+        core_testing_dictionary_idl_files,
+        [
+          "$blink_core_output_dir/testing/{{source_name_part}}.cpp",
+          "$blink_core_output_dir/testing/{{source_name_part}}.h",
+        ])
+
 # Compile the non-test sources generated above.
 blink_core_sources("bindings_core_impl") {
-  sources = bindings_core_generated_union_type_files +
-            generated_core_dictionary_files +
-            bindings_core_generated_interface_files +
-            generated_core_callback_function_files
+  _non_testing_sources = get_target_outputs(":bindings_core_impl_generated") -
+                         generated_core_testing_dictionary_files -
+                         generated_core_testing_callback_function_files
+  sources = _non_testing_sources + bindings_core_generated_interface_files
 
   deps = [
     ":bindings_core_v8_generated",
diff --git a/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn b/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn
index 82d9b97d..10eaaa9c 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn
+++ b/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn
@@ -15,6 +15,7 @@
     ":bindings_modules_v8_generated_init_partial",
     ":generate_bindings_modules_v8_interfaces",
     ":generate_bindings_modules_v8_partial_interfaces",
+    ":generate_bindings_modules_v8_partial_interfaces_for_testing",
   ]
 }
 
@@ -26,17 +27,22 @@
 }
 
 idl_impl("bindings_modules_impl_generated") {
-  sources = modules_dictionary_idl_files
-  outputs = bindings_modules_generated_union_type_files +
-            generated_modules_dictionary_files +
-            generated_modules_callback_function_files
-  output_dir = bindings_modules_v8_output_dir
+  dict_idls = modules_dictionary_idl_files
+  non_dict_outputs = bindings_modules_generated_union_type_files +
+                     generated_modules_callback_function_files
+  non_dict_output_dir = bindings_modules_v8_output_dir
   target_component = "modules"
 }
 
 idl_compiler("generate_bindings_modules_v8_partial_interfaces") {
-  sources = core_idl_with_modules_dependency_files +
-            webcore_testing_idl_with_modules_dependency_files
+  sources = core_idl_with_modules_dependency_files
+  output_dir = bindings_modules_v8_output_dir
+  output_name_suffix = "Partial"
+  target_component = "modules"
+}
+
+idl_compiler("generate_bindings_modules_v8_partial_interfaces_for_testing") {
+  sources = webcore_testing_idl_with_modules_dependency_files
   output_dir = bindings_modules_v8_output_dir
   output_name_suffix = "Partial"
   target_component = "modules"
@@ -68,3 +74,17 @@
     "//third_party/WebKit/Source/bindings/modules:interfaces_info",
   ]
 }
+
+blink_modules_sources("bindings_modules_impl") {
+  # ":generate_bindings_modules_v8_partial_interfaces_for_testing" is not
+  # included here.
+  sources =
+      get_target_outputs(":generate_bindings_modules_v8_interfaces") +
+      get_target_outputs(":bindings_modules_impl_generated") +
+      get_target_outputs(":generate_bindings_modules_v8_partial_interfaces") +
+      get_target_outputs(":bindings_modules_v8_generated_init_partial")
+
+  deps = [
+    ":bindings_modules_generated",
+  ]
+}
diff --git a/third_party/WebKit/Source/bindings/modules/v8/generated.gni b/third_party/WebKit/Source/bindings/modules/v8/generated.gni
index fda0235..bf4e8da5 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/generated.gni
+++ b/third_party/WebKit/Source/bindings/modules/v8/generated.gni
@@ -82,19 +82,3 @@
   "$bindings_modules_v8_output_dir/RemotePlaybackAvailabilityCallback.cpp",
   "$bindings_modules_v8_output_dir/RemotePlaybackAvailabilityCallback.h",
 ]
-
-bindings_modules_generated_interface_files =
-    process_file_template(
-        modules_definition_idl_files,
-        [
-          "$bindings_modules_v8_output_dir/V8{{source_name_part}}.cpp",
-          "$bindings_modules_v8_output_dir/V8{{source_name_part}}.h",
-        ])
-
-bindings_modules_generated_partial_interface_files =
-    process_file_template(
-        core_idl_with_modules_dependency_files,
-        [
-          "$bindings_modules_v8_output_dir/V8{{source_name_part}}Partial.cpp",
-          "$bindings_modules_v8_output_dir/V8{{source_name_part}}Partial.h",
-        ])
diff --git a/third_party/WebKit/Source/bindings/scripts/scripts.gni b/third_party/WebKit/Source/bindings/scripts/scripts.gni
index fc7b26c..9fefa29 100644
--- a/third_party/WebKit/Source/bindings/scripts/scripts.gni
+++ b/third_party/WebKit/Source/bindings/scripts/scripts.gni
@@ -245,12 +245,17 @@
   }
 }
 
-# Runs the idl_compiler to generate IDL dictionary and union impl files.
+# Runs idl_compiler.py to generate IDL dictionary impl files, unions and
+# callback functions.
 #
 # Parameters:
-#   sources = a list of IDL files to process
-#   outputs = a list of files to write to
-#   output_dir = the directory to put the output files
+#   dict_idls = a list of dictionary IDL files to process. the callback and
+#               union IDL file names are already known and do not need to be
+#               specified.
+#   non_dict_outputs = a list of files generated from callback functions and
+#                      unions. the list of files generated from |dict_idls| is
+#                      added automatically and does not need to be specified.
+#   non_dict_output_dir = the directory to put the non-dict output files.
 #   target_component = component to generate code for
 template("idl_impl") {
   dictionary_impl_output_dir = "$root_gen_dir/blink/"
@@ -258,7 +263,7 @@
   action(target_name) {
     script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py"
     idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
-    write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
+    write_file(idl_files_list, rebase_path(invoker.dict_idls, root_build_dir))
 
     inputs = idl_lexer_parser_files + idl_compiler_files  # to be explicit (covered by parsetab)
     inputs += [
@@ -267,14 +272,27 @@
       "$bindings_scripts_output_dir/cached_jinja_templates.stamp",
       "$bindings_dir/IDLExtendedAttributes.txt",
     ]
-    inputs += [ idl_files_list ] + invoker.sources
-    outputs = invoker.outputs
+    inputs += [ idl_files_list ] + invoker.dict_idls
+    outputs = invoker.non_dict_outputs
+
+    # Derive the names of the generated dictionary impl files. Contrary to
+    # generated interfaces, callbacks and unions, these files go to
+    # $root_gen_dir/blink/{core,modules}/<module name>/<IDLName>.{cpp,h}.
+    foreach(dict_idl, invoker.dict_idls) {
+      rel_path = rebase_path(dict_idl, "//third_party/WebKit/Source")
+      impl_dir = get_path_info(rel_path, "dir")
+      idl_name = get_path_info(rel_path, "name")
+      outputs += [
+        "${dictionary_impl_output_dir}$impl_dir/$idl_name.cpp",
+        "${dictionary_impl_output_dir}$impl_dir/$idl_name.h",
+      ]
+    }
 
     args = [
       "--cache-dir",
       rebase_path(bindings_scripts_output_dir, root_build_dir),
       "--output-dir",
-      rebase_path(invoker.output_dir, root_build_dir),
+      rebase_path(invoker.non_dict_output_dir, root_build_dir),
       "--impl-output-dir",
       rebase_path(dictionary_impl_output_dir, root_build_dir),
       "--info-dir",
diff --git a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp
index 694cc60..a587637 100644
--- a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp
+++ b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp
@@ -38,7 +38,7 @@
 #include "core/html/HTMLAnchorElement.h"
 #include "core/html/HTMLHtmlElement.h"
 #include "core/layout/LayoutTheme.h"
-#include "platform/PlatformResourceLoader.h"
+#include "platform/DataResourceHelper.h"
 #include "platform/wtf/LeakAnnotations.h"
 
 namespace blink {
@@ -79,14 +79,14 @@
   default_quirks_style_ = RuleSet::Create();
 
   // Strict-mode rules.
-  String default_rules = LoadResourceAsASCIIString("html.css") +
+  String default_rules = GetDataResourceAsASCIIString("html.css") +
                          LayoutTheme::GetTheme().ExtraDefaultStyleSheet();
   default_style_sheet_ = ParseUASheet(default_rules);
   default_style_->AddRulesFromSheet(DefaultStyleSheet(), ScreenEval());
   default_print_style_->AddRulesFromSheet(DefaultStyleSheet(), PrintEval());
 
   // Quirks-mode rules.
-  String quirks_rules = LoadResourceAsASCIIString("quirks.css") +
+  String quirks_rules = GetDataResourceAsASCIIString("quirks.css") +
                         LayoutTheme::GetTheme().ExtraQuirksStyleSheet();
   quirks_style_sheet_ = ParseUASheet(quirks_rules);
   default_quirks_style_->AddRulesFromSheet(QuirksStyleSheet(), ScreenEval());
@@ -106,7 +106,7 @@
     default_view_source_style_ = RuleSet::Create();
     // Loaded stylesheet is leaked on purpose.
     StyleSheetContents* stylesheet =
-        ParseUASheet(LoadResourceAsASCIIString("view-source.css"));
+        ParseUASheet(GetDataResourceAsASCIIString("view-source.css"));
     default_view_source_style_->AddRulesFromSheet(stylesheet, ScreenEval());
   }
   return default_view_source_style_;
@@ -114,24 +114,27 @@
 
 StyleSheetContents*
 CSSDefaultStyleSheets::EnsureXHTMLMobileProfileStyleSheet() {
-  if (!xhtml_mobile_profile_style_sheet_)
+  if (!xhtml_mobile_profile_style_sheet_) {
     xhtml_mobile_profile_style_sheet_ =
-        ParseUASheet(LoadResourceAsASCIIString("xhtmlmp.css"));
+        ParseUASheet(GetDataResourceAsASCIIString("xhtmlmp.css"));
+  }
   return xhtml_mobile_profile_style_sheet_;
 }
 
 StyleSheetContents* CSSDefaultStyleSheets::EnsureMobileViewportStyleSheet() {
-  if (!mobile_viewport_style_sheet_)
+  if (!mobile_viewport_style_sheet_) {
     mobile_viewport_style_sheet_ =
-        ParseUASheet(LoadResourceAsASCIIString("viewportAndroid.css"));
+        ParseUASheet(GetDataResourceAsASCIIString("viewportAndroid.css"));
+  }
   return mobile_viewport_style_sheet_;
 }
 
 StyleSheetContents*
 CSSDefaultStyleSheets::EnsureTelevisionViewportStyleSheet() {
-  if (!television_viewport_style_sheet_)
+  if (!television_viewport_style_sheet_) {
     television_viewport_style_sheet_ =
-        ParseUASheet(LoadResourceAsASCIIString("viewportTelevision.css"));
+        ParseUASheet(GetDataResourceAsASCIIString("viewportTelevision.css"));
+  }
   return television_viewport_style_sheet_;
 }
 
@@ -140,7 +143,7 @@
   bool changed_default_style = false;
   // FIXME: We should assert that the sheet only styles SVG elements.
   if (element.IsSVGElement() && !svg_style_sheet_) {
-    svg_style_sheet_ = ParseUASheet(LoadResourceAsASCIIString("svg.css"));
+    svg_style_sheet_ = ParseUASheet(GetDataResourceAsASCIIString("svg.css"));
     default_style_->AddRulesFromSheet(SvgStyleSheet(), ScreenEval());
     default_print_style_->AddRulesFromSheet(SvgStyleSheet(), PrintEval());
     changed_default_style = true;
@@ -149,7 +152,8 @@
   // FIXME: We should assert that the sheet only styles MathML elements.
   if (element.namespaceURI() == MathMLNames::mathmlNamespaceURI &&
       !mathml_style_sheet_) {
-    mathml_style_sheet_ = ParseUASheet(LoadResourceAsASCIIString("mathml.css"));
+    mathml_style_sheet_ =
+        ParseUASheet(GetDataResourceAsASCIIString("mathml.css"));
     default_style_->AddRulesFromSheet(MathmlStyleSheet(), ScreenEval());
     default_print_style_->AddRulesFromSheet(MathmlStyleSheet(), PrintEval());
     changed_default_style = true;
@@ -159,7 +163,7 @@
   // <audio>.
   if (!media_controls_style_sheet_ &&
       (isHTMLVideoElement(element) || isHTMLAudioElement(element))) {
-    String media_rules = LoadResourceAsASCIIString("mediaControls.css") +
+    String media_rules = GetDataResourceAsASCIIString("mediaControls.css") +
                          LayoutTheme::GetTheme().ExtraMediaControlsStyleSheet();
     media_controls_style_sheet_ = ParseUASheet(media_rules);
     default_style_->AddRulesFromSheet(MediaControlsStyleSheet(), ScreenEval());
@@ -177,7 +181,7 @@
   if (fullscreen_style_sheet_)
     return;
 
-  String fullscreen_rules = LoadResourceAsASCIIString("fullscreen.css") +
+  String fullscreen_rules = GetDataResourceAsASCIIString("fullscreen.css") +
                             LayoutTheme::GetTheme().ExtraFullscreenStyleSheet();
   fullscreen_style_sheet_ = ParseUASheet(fullscreen_rules);
   default_style_->AddRulesFromSheet(FullscreenStyleSheet(), ScreenEval());
diff --git a/third_party/WebKit/Source/core/dom/DOMTokenList.cpp b/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
index 2b8060f3..df83eeb 100644
--- a/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
@@ -33,6 +33,29 @@
 
 namespace blink {
 
+namespace {
+
+bool CheckEmptyToken(const String& token, ExceptionState& exception_state) {
+  if (!token.IsEmpty())
+    return true;
+  exception_state.ThrowDOMException(kSyntaxError,
+                                    "The token provided must not be empty.");
+  return false;
+}
+
+bool CheckTokenWithWhitespace(const String& token,
+                              ExceptionState& exception_state) {
+  if (token.Find(IsHTMLSpace) == kNotFound)
+    return true;
+  exception_state.ThrowDOMException(kInvalidCharacterError,
+                                    "The token provided ('" + token +
+                                        "') contains HTML space characters, "
+                                        "which are not valid in tokens.");
+  return false;
+}
+
+}  // anonymous namespace
+
 DEFINE_TRACE(DOMTokenList) {
   visitor->Trace(element_);
 }
@@ -45,23 +68,12 @@
 bool DOMTokenList::ValidateToken(const String& token,
                                  ExceptionState& exception_state) const {
   // 1. If token is the empty string, then throw a SyntaxError.
-  if (token.IsEmpty()) {
-    exception_state.ThrowDOMException(kSyntaxError,
-                                      "The token provided must not be empty.");
+  if (!CheckEmptyToken(token, exception_state))
     return false;
-  }
 
   // 2. If token contains any ASCII whitespace, then throw an
   // InvalidCharacterError.
-  if (token.Find(IsHTMLSpace) != kNotFound) {
-    exception_state.ThrowDOMException(kInvalidCharacterError,
-                                      "The token provided ('" + token +
-                                          "') contains HTML space characters, "
-                                          "which are not valid in tokens.");
-    return false;
-  }
-
-  return true;
+  return CheckTokenWithWhitespace(token, exception_state);
 }
 
 bool DOMTokenList::ValidateTokens(const Vector<String>& tokens,
@@ -162,6 +174,60 @@
   return force;
 }
 
+// https://dom.spec.whatwg.org/#dom-domtokenlist-replace
+void DOMTokenList::replace(const AtomicString& token,
+                           const AtomicString& new_token,
+                           ExceptionState& exception_state) {
+  // 1. If either token or newToken is the empty string, then throw a
+  // SyntaxError.
+  if (!CheckEmptyToken(token, exception_state) ||
+      !CheckEmptyToken(new_token, exception_state))
+    return;
+
+  // 2. If either token or newToken contains any ASCII whitespace, then throw an
+  // InvalidCharacterError.
+  if (!CheckTokenWithWhitespace(token, exception_state) ||
+      !CheckTokenWithWhitespace(new_token, exception_state))
+    return;
+
+  // https://infra.spec.whatwg.org/#set-replace
+  // To replace within an ordered set set, given item and replacement: if set
+  // contains item or replacement, then replace the first instance of either
+  // with replacement and remove all other instances.
+  bool found_old_token = false;
+  bool found_new_token = false;
+  bool did_update = false;
+  for (size_t i = 0; i < tokens_.size(); ++i) {
+    const AtomicString& existing_token = tokens_[i];
+    if (found_old_token) {
+      if (existing_token == new_token) {
+        tokens_.Remove(i);
+        break;
+      }
+    } else if (found_new_token) {
+      if (existing_token == token) {
+        tokens_.Remove(i);
+        did_update = true;
+        break;
+      }
+    } else if (existing_token == token) {
+      found_old_token = true;
+      tokens_.ReplaceAt(i, new_token);
+      did_update = true;
+    } else if (existing_token == new_token) {
+      found_new_token = true;
+    }
+  }
+
+  // TODO(tkent): This check doesn't conform to the DOM specification, but it's
+  // interoperable with Firefox and Safari.
+  // https://github.com/whatwg/dom/issues/462
+  if (!did_update)
+    return;
+
+  UpdateWithTokenSet(tokens_);
+}
+
 bool DOMTokenList::supports(const AtomicString& token,
                             ExceptionState& exception_state) {
   return ValidateTokenValue(token, exception_state);
diff --git a/third_party/WebKit/Source/core/dom/DOMTokenList.h b/third_party/WebKit/Source/core/dom/DOMTokenList.h
index f5eac95a..8018ef1 100644
--- a/third_party/WebKit/Source/core/dom/DOMTokenList.h
+++ b/third_party/WebKit/Source/core/dom/DOMTokenList.h
@@ -57,6 +57,9 @@
   void remove(const Vector<String>&, ExceptionState&);
   bool toggle(const AtomicString&, ExceptionState&);
   bool toggle(const AtomicString&, bool force, ExceptionState&);
+  void replace(const AtomicString& token,
+               const AtomicString& new_token,
+               ExceptionState&);
   bool supports(const AtomicString&, ExceptionState&);
   const AtomicString& value() const { return value_; }
   void setValue(const AtomicString&);
diff --git a/third_party/WebKit/Source/core/dom/DOMTokenList.idl b/third_party/WebKit/Source/core/dom/DOMTokenList.idl
index 6b7ddc5b..d48bc30 100644
--- a/third_party/WebKit/Source/core/dom/DOMTokenList.idl
+++ b/third_party/WebKit/Source/core/dom/DOMTokenList.idl
@@ -34,6 +34,7 @@
     [RaisesException, CEReactions, CustomElementCallbacks] void add(DOMString... tokens);
     [RaisesException, CEReactions, CustomElementCallbacks] void remove(DOMString... tokens);
     [RaisesException, CEReactions, CustomElementCallbacks] boolean toggle(DOMString token, optional boolean force);
+    [RaisesException, CEReactions] void replace(DOMString token, DOMString newToken);
     [RaisesException, CustomElementCallbacks] boolean supports(DOMString token);
     [CEReactions] attribute DOMString value;
     stringifier;
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 9f5222e9..071ff8f9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2280,10 +2280,9 @@
 
 void Document::LayoutUpdated() {
   // Plugins can run script inside layout which can detach the page.
-  // TODO(esprehn): Can this still happen now that all plugins are out of
-  // process?
-  if (GetFrame() && GetFrame()->GetPage())
-    GetFrame()->GetPage()->GetChromeClient().LayoutUpdated(GetFrame());
+  // TODO(dcheng): Does it make sense to do any of this work if detached?
+  if (GetFrame() && GetFrame()->IsMainFrame())
+    GetFrame()->GetPage()->GetChromeClient().LayoutUpdated();
 
   Markers().InvalidateRectsForAllTextMatchMarkers();
 
diff --git a/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp b/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
index 0a95059..4bfdd31 100644
--- a/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
+++ b/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
@@ -138,6 +138,18 @@
   return changed;
 }
 
+void SpaceSplitString::Remove(size_t index) {
+  DCHECK_LT(index, size());
+  EnsureUnique();
+  data_->Remove(index);
+}
+
+void SpaceSplitString::ReplaceAt(size_t index, const AtomicString& token) {
+  DCHECK_LT(index, size());
+  EnsureUnique();
+  (*data_)[index] = token;
+}
+
 SpaceSplitString::DataMap& SpaceSplitString::SharedDataMap() {
   DEFINE_STATIC_LOCAL(DataMap, map, ());
   return map;
diff --git a/third_party/WebKit/Source/core/dom/SpaceSplitString.h b/third_party/WebKit/Source/core/dom/SpaceSplitString.h
index 01823799..8664f08 100644
--- a/third_party/WebKit/Source/core/dom/SpaceSplitString.h
+++ b/third_party/WebKit/Source/core/dom/SpaceSplitString.h
@@ -51,6 +51,8 @@
   }
   void Add(const AtomicString&);
   bool Remove(const AtomicString&);
+  void Remove(size_t index);
+  void ReplaceAt(size_t index, const AtomicString&);
 
   size_t size() const { return data_ ? data_->size() : 0; }
   bool IsNull() const { return !data_; }
@@ -79,7 +81,8 @@
 
     bool IsUnique() const { return key_string_.IsNull(); }
     size_t size() const { return vector_.size(); }
-    const AtomicString& operator[](size_t i) { return vector_[i]; }
+    const AtomicString& operator[](size_t i) const { return vector_[i]; }
+    AtomicString& operator[](size_t i) { return vector_[i]; }
 
    private:
     explicit Data(const AtomicString&);
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
index c9b0047..1b9a0dad0 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -31,6 +31,7 @@
 #include "core/dom/LayoutTreeBuilderTraversal.h"
 #include "core/dom/NodeComputedStyle.h"
 #include "core/dom/NodeTraversal.h"
+#include "core/dom/shadow/ElementShadow.h"
 #include "core/dom/shadow/ShadowRoot.h"
 #include "core/events/ScopedEventQueue.h"
 #include "core/layout/LayoutText.h"
@@ -446,6 +447,11 @@
                                           *text_layout_object->Parent())) {
     return true;
   }
+  // Check whether this node may be about to be redistributed.
+  if (text_node.ParentElementShadow() &&
+      text_node.ParentElementShadow()->NeedsDistributionRecalc()) {
+    return true;
+  }
   if (text_layout_object->IsTextFragment()) {
     // Changes of |textNode| may change first letter part, so we should
     // reattach.
diff --git a/third_party/WebKit/Source/core/exported/WebViewBase.h b/third_party/WebKit/Source/core/exported/WebViewBase.h
index 1a98e39..be06f39 100644
--- a/third_party/WebKit/Source/core/exported/WebViewBase.h
+++ b/third_party/WebKit/Source/core/exported/WebViewBase.h
@@ -132,13 +132,16 @@
   virtual LocalDOMWindow* PagePopupWindow() const = 0;
 
   virtual void InvalidateRect(const IntRect&) = 0;
-  // Indicates two things:
+
+  // These functions only apply to the main frame.
+  //
+  // LayoutUpdated() indicates two things:
   //   1) This view may have a new layout now.
-  //   2) Calling updateAllLifecyclePhases() is a no-op.
-  // After calling WebWidget::updateAllLifecyclePhases(), expect to get this
+  //   2) Calling UpdateAllLifecyclePhases() is a now a no-op.
+  // After calling WebWidget::UpdateAllLifecyclePhases(), expect to get this
   // notification unless the view did not need a layout.
-  virtual void LayoutUpdated(WebLocalFrameBase*) = 0;
-  virtual void ResizeAfterLayout(WebLocalFrameBase*) = 0;
+  virtual void LayoutUpdated() = 0;
+  virtual void ResizeAfterLayout() = 0;
 
   virtual void UpdatePageDefinedViewportConstraints(
       const ViewportDescription&) = 0;
diff --git a/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.cpp b/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.cpp
index ca19c476d..a03e92fc 100644
--- a/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.cpp
+++ b/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.cpp
@@ -13,7 +13,7 @@
 
 namespace blink {
 
-void ResizeViewportAnchor::ResizeFrameView(IntSize size) {
+void ResizeViewportAnchor::ResizeFrameView(const IntSize& size) {
   LocalFrameView* frame_view = RootFrameView();
   if (!frame_view)
     return;
diff --git a/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.h b/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.h
index 869af11f..179e454 100644
--- a/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.h
+++ b/third_party/WebKit/Source/core/frame/ResizeViewportAnchor.h
@@ -40,7 +40,7 @@
     Member<ResizeViewportAnchor> anchor_;
   };
 
-  void ResizeFrameView(IntSize);
+  void ResizeFrameView(const IntSize&);
 
   DEFINE_INLINE_TRACE() { visitor->Trace(page_); }
 
diff --git a/third_party/WebKit/Source/core/html/forms/DateTimeChooserImpl.cpp b/third_party/WebKit/Source/core/html/forms/DateTimeChooserImpl.cpp
index 47fe8e9..64fd966 100644
--- a/third_party/WebKit/Source/core/html/forms/DateTimeChooserImpl.cpp
+++ b/third_party/WebKit/Source/core/html/forms/DateTimeChooserImpl.cpp
@@ -125,10 +125,10 @@
   }
 
   AddString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
-  data->Append(Platform::Current()->LoadResource("pickerCommon.css"));
-  data->Append(Platform::Current()->LoadResource("pickerButton.css"));
-  data->Append(Platform::Current()->LoadResource("suggestionPicker.css"));
-  data->Append(Platform::Current()->LoadResource("calendarPicker.css"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.css"));
+  data->Append(Platform::Current()->GetDataResource("pickerButton.css"));
+  data->Append(Platform::Current()->GetDataResource("suggestionPicker.css"));
+  data->Append(Platform::Current()->GetDataResource("calendarPicker.css"));
   AddString(
       "</style></head><body><div id=main>Loading...</div><script>\n"
       "window.dialogArguments = {\n",
@@ -208,9 +208,9 @@
   }
   AddString("}\n", data);
 
-  data->Append(Platform::Current()->LoadResource("pickerCommon.js"));
-  data->Append(Platform::Current()->LoadResource("suggestionPicker.js"));
-  data->Append(Platform::Current()->LoadResource("calendarPicker.js"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.js"));
+  data->Append(Platform::Current()->GetDataResource("suggestionPicker.js"));
+  data->Append(Platform::Current()->GetDataResource("calendarPicker.js"));
   AddString("</script></body>\n", data);
 }
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index 56ad5f63..25c823da 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -59,7 +59,6 @@
 #include "core/loader/resource/ScriptResource.h"
 #include "core/page/Page.h"
 #include "core/probe/CoreProbes.h"
-#include "platform/PlatformResourceLoader.h"
 #include "platform/bindings/DOMWrapperWorld.h"
 #include "platform/loader/fetch/MemoryCache.h"
 #include "platform/loader/fetch/Resource.h"
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp b/third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp
index 11c221b..b6f90866 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp
@@ -28,9 +28,9 @@
 #include "core/layout/LayoutThemeFontProvider.h"
 #include "core/paint/MediaControlsPainter.h"
 #include "core/style/ComputedStyle.h"
+#include "platform/DataResourceHelper.h"
 #include "platform/LayoutTestSupport.h"
 #include "platform/PlatformChromeClient.h"
-#include "platform/PlatformResourceLoader.h"
 #include "platform/graphics/Color.h"
 #include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/Platform.h"
@@ -93,9 +93,9 @@
   String extra_style_sheet = LayoutTheme::ExtraDefaultStyleSheet();
   String multiple_fields_style_sheet =
       RuntimeEnabledFeatures::inputMultipleFieldsUIEnabled()
-          ? LoadResourceAsASCIIString("themeInputMultipleFields.css")
+          ? GetDataResourceAsASCIIString("themeInputMultipleFields.css")
           : String();
-  String windows_style_sheet = LoadResourceAsASCIIString("themeWin.css");
+  String windows_style_sheet = GetDataResourceAsASCIIString("themeWin.css");
   StringBuilder builder;
   builder.ReserveCapacity(extra_style_sheet.length() +
                           multiple_fields_style_sheet.length() +
@@ -107,7 +107,7 @@
 }
 
 String LayoutThemeDefault::ExtraQuirksStyleSheet() {
-  return LoadResourceAsASCIIString("themeWinQuirks.css");
+  return GetDataResourceAsASCIIString("themeWinQuirks.css");
 }
 
 Color LayoutThemeDefault::ActiveListBoxSelectionBackgroundColor() const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeLinux.cpp b/third_party/WebKit/Source/core/layout/LayoutThemeLinux.cpp
index d3f2e341..0d8a5e1 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeLinux.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeLinux.cpp
@@ -4,7 +4,7 @@
 
 #include "core/layout/LayoutThemeLinux.h"
 
-#include "platform/PlatformResourceLoader.h"
+#include "platform/DataResourceHelper.h"
 
 namespace blink {
 
@@ -19,7 +19,7 @@
 
 String LayoutThemeLinux::ExtraDefaultStyleSheet() {
   return LayoutThemeDefault::ExtraDefaultStyleSheet() +
-         LoadResourceAsASCIIString("themeChromiumLinux.css");
+         GetDataResourceAsASCIIString("themeChromiumLinux.css");
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
index fd62e03..c7cbf67 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
@@ -31,8 +31,8 @@
 #import "core/layout/LayoutView.h"
 #import "core/paint/MediaControlsPainter.h"
 #import "core/style/ShadowList.h"
+#import "platform/DataResourceHelper.h"
 #import "platform/LayoutTestSupport.h"
-#import "platform/PlatformResourceLoader.h"
 #import "platform/RuntimeEnabledFeatures.h"
 #import "platform/Theme.h"
 #import "platform/graphics/BitmapImage.h"
@@ -1083,8 +1083,8 @@
 
 String LayoutThemeMac::ExtraDefaultStyleSheet() {
   return LayoutTheme::ExtraDefaultStyleSheet() +
-         LoadResourceAsASCIIString("themeInputMultipleFields.css") +
-         LoadResourceAsASCIIString("themeMac.css");
+         GetDataResourceAsASCIIString("themeInputMultipleFields.css") +
+         GetDataResourceAsASCIIString("themeMac.css");
 }
 
 bool LayoutThemeMac::ThemeDrawsFocusRing(const ComputedStyle& style) const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp b/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
index 558afbcf..6755215 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
@@ -26,8 +26,8 @@
 #include "core/layout/LayoutThemeMobile.h"
 
 #include "core/style/ComputedStyle.h"
+#include "platform/DataResourceHelper.h"
 #include "platform/LayoutTestSupport.h"
-#include "platform/PlatformResourceLoader.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebThemeEngine.h"
 
@@ -41,16 +41,16 @@
 
 String LayoutThemeMobile::ExtraDefaultStyleSheet() {
   return LayoutThemeDefault::ExtraDefaultStyleSheet() +
-         LoadResourceAsASCIIString("themeChromiumLinux.css") +
-         LoadResourceAsASCIIString("themeChromiumAndroid.css");
+         GetDataResourceAsASCIIString("themeChromiumLinux.css") +
+         GetDataResourceAsASCIIString("themeChromiumAndroid.css");
 }
 
 String LayoutThemeMobile::ExtraMediaControlsStyleSheet() {
-  return LoadResourceAsASCIIString("mediaControlsAndroid.css");
+  return GetDataResourceAsASCIIString("mediaControlsAndroid.css");
 }
 
 String LayoutThemeMobile::ExtraFullscreenStyleSheet() {
-  return LoadResourceAsASCIIString("fullscreenAndroid.css");
+  return GetDataResourceAsASCIIString("fullscreenAndroid.css");
 }
 
 void LayoutThemeMobile::AdjustInnerSpinButtonStyle(ComputedStyle& style) const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 2d1b3c2d..cdd7bf2d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -797,7 +797,8 @@
   LocalFrame& frame = GetFrameView()->GetFrame();
   if (!GetDocument().Printing())
     GetFrameView()->AdjustViewSize();
-  frame.GetChromeClient().ResizeAfterLayout(&frame);
+  if (frame.IsMainFrame())
+    frame.GetChromeClient().ResizeAfterLayout();
   LayoutBlockFlow::UpdateAfterLayout();
 }
 
diff --git a/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp b/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
index e9ce483..7738547a 100644
--- a/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
@@ -9,7 +9,6 @@
 #include "core/loader/MixedContentChecker.h"
 #include "core/timing/WorkerGlobalScopePerformance.h"
 #include "core/workers/WorkerClients.h"
-#include "core/workers/WorkerGlobalScope.h"
 #include "platform/Supplementable.h"
 #include "platform/WebTaskRunner.h"
 #include "platform/exported/WrappedResourceRequest.h"
@@ -61,9 +60,10 @@
 WorkerFetchContext::~WorkerFetchContext() {}
 
 WorkerFetchContext* WorkerFetchContext::Create(
-    WorkerGlobalScope& worker_global_scope) {
-  DCHECK(worker_global_scope.IsContextThread());
-  WorkerClients* worker_clients = worker_global_scope.Clients();
+    WorkerOrWorkletGlobalScope& global_scope) {
+  DCHECK(global_scope.IsContextThread());
+  DCHECK(!global_scope.IsMainThreadWorkletGlobalScope());
+  WorkerClients* worker_clients = global_scope.Clients();
   DCHECK(worker_clients);
   WorkerFetchContextHolder* holder =
       static_cast<WorkerFetchContextHolder*>(Supplement<WorkerClients>::From(
@@ -72,13 +72,13 @@
     return nullptr;
   std::unique_ptr<WebWorkerFetchContext> web_context = holder->TakeContext();
   DCHECK(web_context);
-  return new WorkerFetchContext(worker_global_scope, std::move(web_context));
+  return new WorkerFetchContext(global_scope, std::move(web_context));
 }
 
 WorkerFetchContext::WorkerFetchContext(
-    WorkerGlobalScope& worker_global_scope,
+    WorkerOrWorkletGlobalScope& global_scope,
     std::unique_ptr<WebWorkerFetchContext> web_context)
-    : worker_global_scope_(worker_global_scope),
+    : global_scope_(global_scope),
       web_context_(std::move(web_context)),
       loading_task_runner_(Platform::Current()
                                ->CurrentThread()
@@ -139,11 +139,11 @@
 }
 
 void WorkerFetchContext::CountUsage(UseCounter::Feature feature) const {
-  UseCounter::Count(worker_global_scope_, feature);
+  UseCounter::Count(global_scope_, feature);
 }
 
 void WorkerFetchContext::CountDeprecation(UseCounter::Feature feature) const {
-  Deprecation::CountDeprecation(worker_global_scope_, feature);
+  Deprecation::CountDeprecation(global_scope_, feature);
 }
 
 bool WorkerFetchContext::ShouldBlockFetchByMixedContentCheck(
@@ -152,20 +152,20 @@
     SecurityViolationReportingPolicy reporting_policy) const {
   // TODO(horo): We need more detailed check which is implemented in
   // MixedContentChecker::ShouldBlockFetch().
-  return MixedContentChecker::IsMixedContent(
-      worker_global_scope_->GetSecurityOrigin(), url);
+  return MixedContentChecker::IsMixedContent(global_scope_->GetSecurityOrigin(),
+                                             url);
 }
 
 ReferrerPolicy WorkerFetchContext::GetReferrerPolicy() const {
-  return worker_global_scope_->GetReferrerPolicy();
+  return global_scope_->GetReferrerPolicy();
 }
 
 String WorkerFetchContext::GetOutgoingReferrer() const {
-  return worker_global_scope_->OutgoingReferrer();
+  return global_scope_->OutgoingReferrer();
 }
 
 const KURL& WorkerFetchContext::Url() const {
-  return worker_global_scope_->Url();
+  return global_scope_->Url();
 }
 
 const SecurityOrigin* WorkerFetchContext::GetParentSecurityOrigin() const {
@@ -177,21 +177,20 @@
 }
 
 Optional<WebAddressSpace> WorkerFetchContext::GetAddressSpace() const {
-  return WTF::make_optional(
-      worker_global_scope_->GetSecurityContext().AddressSpace());
+  return WTF::make_optional(global_scope_->GetSecurityContext().AddressSpace());
 }
 
 const ContentSecurityPolicy* WorkerFetchContext::GetContentSecurityPolicy()
     const {
-  return worker_global_scope_->GetContentSecurityPolicy();
+  return global_scope_->GetContentSecurityPolicy();
 }
 
 void WorkerFetchContext::AddConsoleMessage(ConsoleMessage* message) const {
-  return worker_global_scope_->AddConsoleMessage(message);
+  return global_scope_->AddConsoleMessage(message);
 }
 
 SecurityOrigin* WorkerFetchContext::GetSecurityOrigin() const {
-  return worker_global_scope_->GetSecurityOrigin();
+  return global_scope_->GetSecurityOrigin();
 }
 
 std::unique_ptr<WebURLLoader> WorkerFetchContext::CreateURLLoader(
@@ -244,7 +243,11 @@
 }
 
 void WorkerFetchContext::AddResourceTiming(const ResourceTimingInfo& info) {
-  WorkerGlobalScopePerformance::performance(*worker_global_scope_)
+  // TODO(nhiroki): Add ResourceTiming API support once it's spec'ed for
+  // worklets.
+  if (global_scope_->IsWorkletGlobalScope())
+    return;
+  WorkerGlobalScopePerformance::performance(*ToWorkerGlobalScope(global_scope_))
       ->AddResourceTiming(info);
 }
 
@@ -271,7 +274,7 @@
 }
 
 DEFINE_TRACE(WorkerFetchContext) {
-  visitor->Trace(worker_global_scope_);
+  visitor->Trace(global_scope_);
   visitor->Trace(resource_fetcher_);
   BaseFetchContext::Trace(visitor);
 }
diff --git a/third_party/WebKit/Source/core/loader/WorkerFetchContext.h b/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
index a4c9c63..54f5cb38 100644
--- a/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
+++ b/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
@@ -16,20 +16,21 @@
 class WebTaskRunner;
 class WebURLLoader;
 class WebWorkerFetchContext;
-class WorkerGlobalScope;
 class WorkerClients;
+class WorkerOrWorkletGlobalScope;
 
 CORE_EXPORT void ProvideWorkerFetchContextToWorker(
     WorkerClients*,
     std::unique_ptr<WebWorkerFetchContext>);
 
 // The WorkerFetchContext is a FetchContext for workers (dedicated, shared and
-// service workers). This class is used only when off-main-thread-fetch is
-// enabled, and is still under development.
+// service workers) and threaded worklets (animation and audio worklets). This
+// class is used only when off-main-thread-fetch is enabled, and is still under
+// development.
 // TODO(horo): Implement all methods of FetchContext. crbug.com/443374
 class WorkerFetchContext final : public BaseFetchContext {
  public:
-  static WorkerFetchContext* Create(WorkerGlobalScope&);
+  static WorkerFetchContext* Create(WorkerOrWorkletGlobalScope&);
   virtual ~WorkerFetchContext();
 
   ResourceFetcher* GetResourceFetcher();
@@ -89,10 +90,10 @@
   DECLARE_VIRTUAL_TRACE();
 
  private:
-  WorkerFetchContext(WorkerGlobalScope&,
+  WorkerFetchContext(WorkerOrWorkletGlobalScope&,
                      std::unique_ptr<WebWorkerFetchContext>);
 
-  Member<WorkerGlobalScope> worker_global_scope_;
+  Member<WorkerOrWorkletGlobalScope> global_scope_;
   std::unique_ptr<WebWorkerFetchContext> web_context_;
   Member<ResourceFetcher> resource_fetcher_;
   RefPtr<WebTaskRunner> loading_task_runner_;
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h
index ee131638..de24ec3 100644
--- a/third_party/WebKit/Source/core/page/ChromeClient.h
+++ b/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -214,8 +214,8 @@
     return scale;
   }
   virtual void MainFrameScrollOffsetChanged() const {}
-  virtual void ResizeAfterLayout(LocalFrame*) const {}
-  virtual void LayoutUpdated(LocalFrame*) const {}
+  virtual void ResizeAfterLayout() const {}
+  virtual void LayoutUpdated() const {}
 
   void MouseDidMoveOverElement(LocalFrame&, const HitTestResult&);
   virtual void SetToolTip(LocalFrame&, const String&, TextDirection) = 0;
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index c779e6d..ec1b951e 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -68,9 +68,8 @@
     ExecutionContext* execution_context,
     InProcessWorkerBase* worker_object,
     WorkerClients* worker_clients)
-    : ThreadedMessagingProxyBase(execution_context),
+    : ThreadedMessagingProxyBase(execution_context, worker_clients),
       worker_object_(worker_object),
-      worker_clients_(worker_clients),
       weak_ptr_factory_(this) {
   worker_object_proxy_ = InProcessWorkerObjectProxy::Create(
       weak_ptr_factory_.CreateWeakPtr(), GetParentFrameTaskRunners());
@@ -114,7 +113,7 @@
       WorkerThreadStartupData::Create(
           script_url, user_agent, source_code, nullptr, start_mode,
           csp->Headers().get(), referrer_policy, starter_origin,
-          worker_clients_.Release(), document->AddressSpace(),
+          ReleaseWorkerClients(), document->AddressSpace(),
           OriginTrialContext::GetTokens(document).get(),
           std::move(worker_settings), worker_v8_settings);
 
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
index 6eff0f72..a4fc03db 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h
@@ -97,7 +97,6 @@
 
   std::unique_ptr<InProcessWorkerObjectProxy> worker_object_proxy_;
   WeakPersistent<InProcessWorkerBase> worker_object_;
-  Persistent<WorkerClients> worker_clients_;
 
   // Tasks are queued here until there's a thread object created.
   struct QueuedTask;
diff --git a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
index d2e7baf..209069d 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
@@ -25,7 +25,11 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate)
-    : WorkletGlobalScope(url, user_agent, std::move(security_origin), isolate),
+    : WorkletGlobalScope(url,
+                         user_agent,
+                         std::move(security_origin),
+                         isolate,
+                         nullptr /* worker_clients */),
       ContextClient(frame) {}
 
 MainThreadWorkletGlobalScope::~MainThreadWorkletGlobalScope() {}
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
index beed666..8092a55 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
@@ -8,11 +8,16 @@
 #include "core/dom/Document.h"
 #include "core/dom/TaskRunnerHelper.h"
 #include "core/frame/Deprecation.h"
+#include "core/frame/WebLocalFrameBase.h"
 #include "core/loader/DocumentLoader.h"
 #include "core/loader/ThreadableLoadingContext.h"
+#include "core/loader/WorkerFetchContext.h"
 #include "core/workers/WorkerInspectorProxy.h"
 #include "core/workers/WorkerThreadStartupData.h"
+#include "platform/RuntimeEnabledFeatures.h"
 #include "platform/wtf/CurrentTime.h"
+#include "public/platform/WebWorkerFetchContext.h"
+#include "public/web/WebFrameClient.h"
 
 namespace blink {
 
@@ -23,8 +28,10 @@
 }  // namespace
 
 ThreadedMessagingProxyBase::ThreadedMessagingProxyBase(
-    ExecutionContext* execution_context)
+    ExecutionContext* execution_context,
+    WorkerClients* worker_clients)
     : execution_context_(execution_context),
+      worker_clients_(worker_clients),
       worker_inspector_proxy_(WorkerInspectorProxy::Create()),
       parent_frame_task_runners_(ParentFrameTaskRunners::Create(
           ToDocument(execution_context_.Get())->GetFrame())),
@@ -32,6 +39,21 @@
       asked_to_terminate_(false) {
   DCHECK(IsParentContextThread());
   g_live_messaging_proxy_count++;
+
+  if (RuntimeEnabledFeatures::offMainThreadFetchEnabled()) {
+    Document* document = ToDocument(execution_context_);
+    WebLocalFrameBase* web_frame =
+        WebLocalFrameBase::FromFrame(document->GetFrame());
+    std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
+        web_frame->Client()->CreateWorkerFetchContext();
+    DCHECK(web_worker_fetch_context);
+    // TODO(horo): Set more information about the context (ex:
+    // AppCacheHostID) to |web_worker_fetch_context|.
+    web_worker_fetch_context->SetDataSaverEnabled(
+        document->GetFrame()->GetSettings()->GetDataSaverEnabled());
+    ProvideWorkerFetchContextToWorker(worker_clients,
+                                      std::move(web_worker_fetch_context));
+  }
 }
 
 ThreadedMessagingProxyBase::~ThreadedMessagingProxyBase() {
@@ -152,6 +174,10 @@
     worker_inspector_proxy_->DispatchMessageFromWorker(message);
 }
 
+WorkerClients* ThreadedMessagingProxyBase::ReleaseWorkerClients() {
+  return worker_clients_.Release();
+}
+
 bool ThreadedMessagingProxyBase::IsParentContextThread() const {
   // TODO(nhiroki): Nested worker is not supported yet, so the parent context
   // thread should be equal to the main thread (http://crbug.com/31666).
diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
index 30837e6..6c7e09a 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
@@ -9,6 +9,7 @@
 #include "core/frame/UseCounter.h"
 #include "core/inspector/ConsoleTypes.h"
 #include "core/workers/ParentFrameTaskRunners.h"
+#include "core/workers/WorkerClients.h"
 #include "platform/wtf/Forward.h"
 
 namespace blink {
@@ -58,7 +59,7 @@
   void SetWorkerThreadForTest(std::unique_ptr<WorkerThread>);
 
  protected:
-  ThreadedMessagingProxyBase(ExecutionContext*);
+  ThreadedMessagingProxyBase(ExecutionContext*, WorkerClients*);
   virtual ~ThreadedMessagingProxyBase();
 
   void InitializeWorkerThread(std::unique_ptr<WorkerThreadStartupData>);
@@ -69,6 +70,8 @@
 
   bool AskedToTerminate() const { return asked_to_terminate_; }
 
+  WorkerClients* ReleaseWorkerClients();
+
   WorkerInspectorProxy* GetWorkerInspectorProxy() const {
     return worker_inspector_proxy_.Get();
   }
@@ -85,7 +88,9 @@
   void ParentObjectDestroyedInternal();
 
   Persistent<ExecutionContext> execution_context_;
+  Persistent<WorkerClients> worker_clients_;
   Persistent<WorkerInspectorProxy> worker_inspector_proxy_;
+
   // Accessed cross-thread when worker thread posts tasks to the parent.
   CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_;
 
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp
index f3a1a74..77c7520 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp
@@ -22,8 +22,13 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate,
-    WorkerThread* thread)
-    : WorkletGlobalScope(url, user_agent, std::move(security_origin), isolate),
+    WorkerThread* thread,
+    WorkerClients* worker_clients)
+    : WorkletGlobalScope(url,
+                         user_agent,
+                         std::move(security_origin),
+                         isolate,
+                         worker_clients),
       thread_(thread) {}
 
 ThreadedWorkletGlobalScope::~ThreadedWorkletGlobalScope() {
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h
index 81ae12b..116c79e 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h
@@ -32,7 +32,8 @@
                              const String& user_agent,
                              PassRefPtr<SecurityOrigin>,
                              v8::Isolate*,
-                             WorkerThread*);
+                             WorkerThread*,
+                             WorkerClients*);
 
  private:
   friend class ThreadedWorkletThreadForTest;
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
index 83d35477..82381cf 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
@@ -75,8 +75,10 @@
 };
 
 ThreadedWorkletMessagingProxy::ThreadedWorkletMessagingProxy(
-    ExecutionContext* execution_context)
-    : ThreadedMessagingProxyBase(execution_context), weak_ptr_factory_(this) {
+    ExecutionContext* execution_context,
+    WorkerClients* worker_clients)
+    : ThreadedMessagingProxyBase(execution_context, worker_clients),
+      weak_ptr_factory_(this) {
   worklet_object_proxy_ = ThreadedWorkletObjectProxy::Create(
       weak_ptr_factory_.CreateWeakPtr(), GetParentFrameTaskRunners());
 }
@@ -103,7 +105,7 @@
       WorkerThreadStartupData::Create(
           script_url, document->UserAgent(), String(), nullptr, start_mode,
           csp->Headers().get(), /* referrerPolicy */ String(), starter_origin,
-          nullptr, document->AddressSpace(),
+          ReleaseWorkerClients(), document->AddressSpace(),
           OriginTrialContext::GetTokens(document).get(),
           std::move(worker_settings), WorkerV8Settings::Default());
 
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h
index a096d09..eabafbb 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h
@@ -31,7 +31,7 @@
   void Initialize();
 
  protected:
-  explicit ThreadedWorkletMessagingProxy(ExecutionContext*);
+  ThreadedWorkletMessagingProxy(ExecutionContext*, WorkerClients*);
 
   ThreadedWorkletObjectProxy& WorkletObjectProxy() {
     return *worklet_object_proxy_;
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
index 2fd70cb..9d625714 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
@@ -71,7 +71,8 @@
         SecurityOrigin::Create(startup_data->script_url_);
     return new ThreadedWorkletGlobalScope(
         startup_data->script_url_, startup_data->user_agent_,
-        security_origin.Release(), this->GetIsolate(), this);
+        security_origin.Release(), this->GetIsolate(), this,
+        startup_data->worker_clients_);
   }
 
   bool IsOwningBackingThread() const final { return false; }
@@ -115,8 +116,9 @@
 class ThreadedWorkletMessagingProxyForTest
     : public ThreadedWorkletMessagingProxy {
  public:
-  ThreadedWorkletMessagingProxyForTest(ExecutionContext* execution_context)
-      : ThreadedWorkletMessagingProxy(execution_context) {
+  ThreadedWorkletMessagingProxyForTest(ExecutionContext* execution_context,
+                                       WorkerClients* worker_clients)
+      : ThreadedWorkletMessagingProxy(execution_context, worker_clients) {
     worklet_object_proxy_ = WTF::MakeUnique<ThreadedWorkletObjectProxyForTest>(
         weak_ptr_factory_.CreateWeakPtr(), GetParentFrameTaskRunners());
     worker_thread_ =
@@ -168,7 +170,7 @@
   void SetUp() override {
     page_ = DummyPageHolder::Create();
     messaging_proxy_ = WTF::MakeUnique<ThreadedWorkletMessagingProxyForTest>(
-        &page_->GetDocument());
+        &page_->GetDocument(), WorkerClients::Create());
   }
 
   ThreadedWorkletMessagingProxyForTest* MessagingProxy() {
diff --git a/third_party/WebKit/Source/core/workers/WorkerClients.h b/third_party/WebKit/Source/core/workers/WorkerClients.h
index ab4ec23..35ecdff 100644
--- a/third_party/WebKit/Source/core/workers/WorkerClients.h
+++ b/third_party/WebKit/Source/core/workers/WorkerClients.h
@@ -40,8 +40,9 @@
 class WorkerClients;
 
 // This is created on the main thread, passed to the worker thread and
-// attached to WorkerGlobalScope when it is created.
-// This class can be used to provide "client" implementations to Workers.
+// attached to WorkerOrWorkletGlobalScope when it is created.
+// This class can be used to provide "client" implementations to workers or
+// worklets.
 class CORE_EXPORT WorkerClients final : public GarbageCollected<WorkerClients>,
                                         public Supplementable<WorkerClients> {
   USING_GARBAGE_COLLECTED_MIXIN(WorkerClients);
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index e4e5fc8..88095e9c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -42,10 +42,8 @@
 #include "core/inspector/ConsoleMessageStorage.h"
 #include "core/inspector/WorkerInspectorController.h"
 #include "core/inspector/WorkerThreadDebugger.h"
-#include "core/loader/WorkerFetchContext.h"
 #include "core/loader/WorkerThreadableLoader.h"
 #include "core/probe/CoreProbes.h"
-#include "core/workers/WorkerClients.h"
 #include "core/workers/WorkerLocation.h"
 #include "core/workers/WorkerNavigator.h"
 #include "core/workers/WorkerReportingProxy.h"
@@ -53,7 +51,6 @@
 #include "core/workers/WorkerThread.h"
 #include "platform/CrossThreadFunctional.h"
 #include "platform/InstanceCounters.h"
-#include "platform/RuntimeEnabledFeatures.h"
 #include "platform/loader/fetch/MemoryCache.h"
 #include "platform/network/ContentSecurityPolicyParsers.h"
 #include "platform/scheduler/child/web_scheduler.h"
@@ -297,14 +294,6 @@
   return const_cast<WorkerGlobalScope*>(this);
 }
 
-WorkerFetchContext* WorkerGlobalScope::GetFetchContext() {
-  DCHECK(RuntimeEnabledFeatures::offMainThreadFetchEnabled());
-  if (fetch_context_)
-    return fetch_context_;
-  fetch_context_ = WorkerFetchContext::Create(*this);
-  return fetch_context_;
-}
-
 WorkerGlobalScope::WorkerGlobalScope(
     const KURL& url,
     const String& user_agent,
@@ -313,13 +302,12 @@
     std::unique_ptr<SecurityOrigin::PrivilegeData>
         starter_origin_privilage_data,
     WorkerClients* worker_clients)
-    : WorkerOrWorkletGlobalScope(thread->GetIsolate()),
+    : WorkerOrWorkletGlobalScope(thread->GetIsolate(), worker_clients),
       url_(url),
       user_agent_(user_agent),
       v8_cache_options_(kV8CacheOptionsDefault),
       thread_(thread),
       event_queue_(WorkerEventQueue::Create(this)),
-      worker_clients_(worker_clients),
       timers_(TaskRunnerHelper::Get(TaskType::kTimer, this)),
       time_origin_(time_origin) {
   InstanceCounters::IncrementCounter(
@@ -328,9 +316,6 @@
   if (starter_origin_privilage_data)
     GetSecurityOrigin()->TransferPrivilegesFrom(
         std::move(starter_origin_privilage_data));
-
-  if (worker_clients_)
-    worker_clients_->ReattachThread();
 }
 
 void WorkerGlobalScope::ApplyContentSecurityPolicyFromVector(
@@ -376,7 +361,6 @@
   visitor->Trace(timers_);
   visitor->Trace(event_listeners_);
   visitor->Trace(pending_error_events_);
-  visitor->Trace(fetch_context_);
   EventTargetWithInlineData::Trace(visitor);
   SecurityContext::Trace(visitor);
   WorkerOrWorkletGlobalScope::Trace(visitor);
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
index 62a1d199..1490c35 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
@@ -49,8 +49,6 @@
 class ConsoleMessage;
 class ExceptionState;
 class V8AbstractEventListener;
-class WorkerClients;
-class WorkerFetchContext;
 class WorkerLocation;
 class WorkerNavigator;
 class WorkerThread;
@@ -144,10 +142,6 @@
 
   double TimeOrigin() const { return time_origin_; }
   WorkerSettings* GetWorkerSettings() const { return worker_settings_.get(); }
-  WorkerClients* Clients() const { return worker_clients_.Get(); }
-
-  // Available only when off-main-thread-fetch is enabled.
-  WorkerFetchContext* GetFetchContext();
 
   DECLARE_VIRTUAL_TRACE();
 
@@ -193,8 +187,6 @@
 
   Member<WorkerEventQueue> event_queue_;
 
-  CrossThreadPersistent<WorkerClients> worker_clients_;
-
   DOMTimerCoordinator timers_;
 
   const double time_origin_;
@@ -203,8 +195,6 @@
 
   HeapHashMap<int, Member<ErrorEvent>> pending_error_events_;
   int last_pending_error_event_id_ = 0;
-
-  Member<WorkerFetchContext> fetch_context_;
 };
 
 DEFINE_TYPE_CASTS(WorkerGlobalScope,
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
index fc8d402de..bb502e3b 100644
--- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
@@ -13,14 +13,21 @@
 #include "core/workers/WorkerReportingProxy.h"
 #include "core/workers/WorkerThread.h"
 #include "platform/CrossThreadFunctional.h"
+#include "platform/RuntimeEnabledFeatures.h"
 #include "platform/wtf/Functional.h"
 
 namespace blink {
 
-WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope(v8::Isolate* isolate)
-    : script_controller_(
+WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope(
+    v8::Isolate* isolate,
+    WorkerClients* worker_clients)
+    : worker_clients_(worker_clients),
+      script_controller_(
           WorkerOrWorkletScriptController::Create(this, isolate)),
-      used_features_(UseCounter::kNumberOfFeatures) {}
+      used_features_(UseCounter::kNumberOfFeatures) {
+  if (worker_clients_)
+    worker_clients_->ReattachThread();
+}
 
 WorkerOrWorkletGlobalScope::~WorkerOrWorkletGlobalScope() = default;
 
@@ -49,6 +56,15 @@
   ReportDeprecation(feature);
 }
 
+WorkerFetchContext* WorkerOrWorkletGlobalScope::GetFetchContext() {
+  DCHECK(RuntimeEnabledFeatures::offMainThreadFetchEnabled());
+  DCHECK(!IsMainThreadWorkletGlobalScope());
+  if (fetch_context_)
+    return fetch_context_;
+  fetch_context_ = WorkerFetchContext::Create(*this);
+  return fetch_context_;
+}
+
 bool WorkerOrWorkletGlobalScope::IsJSExecutionForbidden() const {
   return script_controller_->IsExecutionForbidden();
 }
@@ -89,6 +105,7 @@
 }
 
 DEFINE_TRACE(WorkerOrWorkletGlobalScope) {
+  visitor->Trace(fetch_context_);
   visitor->Trace(script_controller_);
   ExecutionContext::Trace(visitor);
 }
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
index 50300dd..3b8c01b 100644
--- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
@@ -7,6 +7,8 @@
 
 #include "core/dom/ExecutionContext.h"
 #include "core/frame/UseCounter.h"
+#include "core/loader/WorkerFetchContext.h"
+#include "core/workers/WorkerClients.h"
 
 namespace blink {
 
@@ -16,7 +18,7 @@
 
 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
  public:
-  explicit WorkerOrWorkletGlobalScope(v8::Isolate*);
+  WorkerOrWorkletGlobalScope(v8::Isolate*, WorkerClients*);
   virtual ~WorkerOrWorkletGlobalScope();
 
   // ExecutionContext
@@ -53,6 +55,11 @@
   // MainThreadWorkletGlobalScope) or after dispose() is called.
   virtual WorkerThread* GetThread() const = 0;
 
+  // Available only when off-main-thread-fetch is enabled.
+  WorkerFetchContext* GetFetchContext();
+
+  WorkerClients* Clients() const { return worker_clients_.Get(); }
+
   WorkerOrWorkletScriptController* ScriptController() {
     return script_controller_.Get();
   }
@@ -66,6 +73,8 @@
  private:
   void RunTask(std::unique_ptr<ExecutionContextTask>, bool is_instrumented);
 
+  CrossThreadPersistent<WorkerClients> worker_clients_;
+  Member<WorkerFetchContext> fetch_context_;
   Member<WorkerOrWorkletScriptController> script_controller_;
 
   // This is the set of features that this worker has used.
diff --git a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
index ebff7ee..4b3443a9 100644
--- a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
@@ -16,8 +16,11 @@
     const KURL& url,
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
-    v8::Isolate* isolate)
-    : WorkerOrWorkletGlobalScope(isolate), url_(url), user_agent_(user_agent) {
+    v8::Isolate* isolate,
+    WorkerClients* worker_clients)
+    : WorkerOrWorkletGlobalScope(isolate, worker_clients),
+      url_(url),
+      user_agent_(user_agent) {
   SetSecurityOrigin(std::move(security_origin));
 }
 
diff --git a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.h
index c0947f6..e3b7e4c 100644
--- a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.h
@@ -73,7 +73,8 @@
   WorkletGlobalScope(const KURL&,
                      const String& user_agent,
                      PassRefPtr<SecurityOrigin>,
-                     v8::Isolate*);
+                     v8::Isolate*,
+                     WorkerClients*);
 
  private:
   const KURL& VirtualURL() const final { return url_; }
diff --git a/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp b/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp
index 67fec11..a5c583d1 100644
--- a/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp
+++ b/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp
@@ -9,15 +9,16 @@
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/frame/LocalFrame.h"
-#include "platform/PlatformResourceLoader.h"
+#include "platform/DataResourceHelper.h"
 #include "platform/bindings/DOMWrapperWorld.h"
 #include "platform/bindings/V8PerIsolateData.h"
 
 namespace blink {
 
 void TransformDocumentToXMLTreeView(Document& document) {
-  String script_string = LoadResourceAsASCIIString("DocumentXMLTreeViewer.js");
-  String css_string = LoadResourceAsASCIIString("DocumentXMLTreeViewer.css");
+  String script_string =
+      GetDataResourceAsASCIIString("DocumentXMLTreeViewer.js");
+  String css_string = GetDataResourceAsASCIIString("DocumentXMLTreeViewer.css");
 
   HeapVector<ScriptSourceCode> sources;
   sources.push_back(ScriptSourceCode(script_string));
diff --git a/third_party/WebKit/Source/modules/BUILD.gn b/third_party/WebKit/Source/modules/BUILD.gn
index a652254..4305c7aa 100644
--- a/third_party/WebKit/Source/modules/BUILD.gn
+++ b/third_party/WebKit/Source/modules/BUILD.gn
@@ -62,21 +62,10 @@
     "ModulesInitializer.h",
   ]
 
-  sources += generated_modules_dictionary_files
-  sources += generated_modules_callback_function_files
-
   # Compile sources generated by module_names script.
   sources += get_target_outputs(":module_names")
 
   sources += bindings_modules_v8_files
-  sources += rebase_path(bindings_modules_generated_interface_files, ".", "//")
-  sources += rebase_path(bindings_modules_generated_union_type_files, ".", "//")
-  sources +=
-      rebase_path(bindings_modules_generated_partial_interface_files, ".", "//")
-  sources +=
-      rebase_path([ bindings_modules_generated_init_partial_interfaces_file ],
-                  ".",
-                  "//")
 
   configs += [
     ":modules_implementation",
@@ -94,6 +83,7 @@
     ":module_names",
     "//device/geolocation/public/interfaces:interfaces_blink",
     "//third_party/WebKit/Source/bindings/modules:generated",
+    "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_impl",
     "//third_party/WebKit/Source/core",
     "//third_party/WebKit/Source/modules/accessibility",
     "//third_party/WebKit/Source/modules/app_banner",
diff --git a/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp b/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp
index 5f6423f..a6c7351 100644
--- a/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp
+++ b/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp
@@ -4,8 +4,10 @@
 
 #include "modules/battery/NavigatorBattery.h"
 
-#include "core/dom/ExecutionContext.h"
-#include "core/frame/LocalFrame.h"
+#include "core/dom/DOMException.h"
+#include "core/dom/Document.h"
+#include "core/dom/ExceptionCode.h"
+#include "core/frame/LocalDOMWindow.h"
 #include "modules/battery/BatteryManager.h"
 
 namespace blink {
@@ -19,10 +21,26 @@
 }
 
 ScriptPromise NavigatorBattery::getBattery(ScriptState* script_state) {
-  if (!battery_manager_) {
-    battery_manager_ =
-        BatteryManager::Create(ExecutionContext::From(script_state));
+  ExecutionContext* execution_context = ExecutionContext::From(script_state);
+
+  // Check secure context.
+  String error_message;
+  if (!execution_context->IsSecureContext(error_message)) {
+    return ScriptPromise::RejectWithDOMException(
+        script_state, DOMException::Create(kSecurityError, error_message));
   }
+
+  // Check top-level browsing context.
+  if (!ToDocument(execution_context)->domWindow()->GetFrame() ||
+      !ToDocument(execution_context)->GetFrame()->IsMainFrame()) {
+    return ScriptPromise::RejectWithDOMException(
+        script_state, DOMException::Create(
+                          kSecurityError, "Not a top-level browsing context."));
+  }
+
+  if (!battery_manager_)
+    battery_manager_ = BatteryManager::Create(execution_context);
+
   return battery_manager_->StartRequest(script_state);
 }
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
index 46b241a9..7d1032e 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
@@ -9,6 +9,7 @@
 #include "core/dom/Document.h"
 #include "core/frame/LocalFrame.h"
 #include "core/page/ChromeClient.h"
+#include "core/workers/WorkerClients.h"
 #include "modules/compositorworker/AnimationWorkletMessagingProxy.h"
 #include "modules/compositorworker/AnimationWorkletThread.h"
 
@@ -37,8 +38,9 @@
       document->GetFrame()->GetChromeClient().CreateAnimationWorkletProxyClient(
           document->GetFrame());
 
-  worklet_messaging_proxy_ =
-      new AnimationWorkletMessagingProxy(GetExecutionContext(), proxy_client);
+  WorkerClients* worker_clients = WorkerClients::Create();
+  worklet_messaging_proxy_ = new AnimationWorkletMessagingProxy(
+      GetExecutionContext(), worker_clients, proxy_client);
   worklet_messaging_proxy_->Initialize();
 }
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp
index 5266de0..a307e66 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp
@@ -21,9 +21,11 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate,
-    WorkerThread* thread) {
-  return new AnimationWorkletGlobalScope(
-      url, user_agent, std::move(security_origin), isolate, thread);
+    WorkerThread* thread,
+    WorkerClients* worker_clients) {
+  return new AnimationWorkletGlobalScope(url, user_agent,
+                                         std::move(security_origin), isolate,
+                                         thread, worker_clients);
 }
 
 AnimationWorkletGlobalScope::AnimationWorkletGlobalScope(
@@ -31,12 +33,14 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate,
-    WorkerThread* thread)
+    WorkerThread* thread,
+    WorkerClients* worker_clients)
     : ThreadedWorkletGlobalScope(url,
                                  user_agent,
                                  std::move(security_origin),
                                  isolate,
-                                 thread) {}
+                                 thread,
+                                 worker_clients) {}
 
 AnimationWorkletGlobalScope::~AnimationWorkletGlobalScope() {}
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
index e9fabbd5..cf39c13 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
@@ -22,7 +22,8 @@
                                              const String& user_agent,
                                              PassRefPtr<SecurityOrigin>,
                                              v8::Isolate*,
-                                             WorkerThread*);
+                                             WorkerThread*,
+                                             WorkerClients*);
   ~AnimationWorkletGlobalScope() override;
   DECLARE_TRACE();
 
@@ -39,7 +40,8 @@
                               const String& user_agent,
                               PassRefPtr<SecurityOrigin>,
                               v8::Isolate*,
-                              WorkerThread*);
+                              WorkerThread*,
+                              WorkerClients*);
 
   typedef HeapHashMap<String, Member<AnimatorDefinition>> DefinitionMap;
   DefinitionMap m_animatorDefinitions;
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp
index 85fb75ed..efd8f96 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp
@@ -11,8 +11,9 @@
 
 AnimationWorkletMessagingProxy::AnimationWorkletMessagingProxy(
     ExecutionContext* execution_context,
+    WorkerClients* worker_clients,
     AnimationWorkletProxyClient* proxy_client)
-    : ThreadedWorkletMessagingProxy(execution_context),
+    : ThreadedWorkletMessagingProxy(execution_context, worker_clients),
       proxy_client_(proxy_client) {}
 
 AnimationWorkletMessagingProxy::~AnimationWorkletMessagingProxy() {}
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
index be3f822..c94d94c 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
@@ -21,6 +21,7 @@
 
  public:
   AnimationWorkletMessagingProxy(ExecutionContext*,
+                                 WorkerClients*,
                                  AnimationWorkletProxyClient*);
 
  protected:
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
index 0952160..0a84d9b 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
@@ -40,11 +40,11 @@
     security_origin->TransferPrivilegesFrom(
         std::move(startup_data->starter_origin_privilege_data_));
 
-  // TODO(ikilpatrick): The AnimationWorkletGlobalScope will need to store a
-  // WorkerClients object for using a CompositorWorkerProxyClient object.
+  // TODO(ikilpatrick): Provide CompositorWorkerProxyClient to WorkerClients.
   return AnimationWorkletGlobalScope::Create(
       startup_data->script_url_, startup_data->user_agent_,
-      std::move(security_origin), this->GetIsolate(), this);
+      std::move(security_origin), this->GetIsolate(), this,
+      startup_data->worker_clients_);
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/modules_idl_files.gni b/third_party/WebKit/Source/modules/modules_idl_files.gni
index f6d59f9..13f3379 100644
--- a/third_party/WebKit/Source/modules/modules_idl_files.gni
+++ b/third_party/WebKit/Source/modules/modules_idl_files.gni
@@ -698,349 +698,3 @@
 # collision
 modules_all_dependency_idl_files =
     modules_static_dependency_idl_files + modules_generated_dependency_idl_files
-
-# Source files generated from IDL.
-generated_modules_dictionary_files = [
-  # TODO ideally this would not be listed explicitly. Rather, we would have
-  # different categories of .idl files that produce certain patterns of
-  # source files. Then these sources files can be programatically expanded
-  # from the .idl file list(s).
-  "$blink_modules_output_dir/app_banner/BeforeInstallPromptEventInit.cpp",
-  "$blink_modules_output_dir/app_banner/BeforeInstallPromptEventInit.h",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchClickEventInit.cpp",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchClickEventInit.h",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchEventInit.cpp",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchEventInit.h",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchFailEventInit.cpp",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchFailEventInit.h",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchOptions.cpp",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchOptions.h",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchedEventInit.cpp",
-  "$blink_modules_output_dir/background_fetch/BackgroundFetchedEventInit.h",
-  "$blink_modules_output_dir/background_fetch/IconDefinition.cpp",
-  "$blink_modules_output_dir/background_fetch/IconDefinition.h",
-  "$blink_modules_output_dir/background_sync/SyncEventInit.cpp",
-  "$blink_modules_output_dir/background_sync/SyncEventInit.h",
-  "$blink_modules_output_dir/bluetooth/BluetoothLEScanFilterInit.cpp",
-  "$blink_modules_output_dir/bluetooth/BluetoothLEScanFilterInit.h",
-  "$blink_modules_output_dir/bluetooth/RequestDeviceOptions.cpp",
-  "$blink_modules_output_dir/bluetooth/RequestDeviceOptions.h",
-  "$blink_modules_output_dir/cachestorage/CacheQueryOptions.cpp",
-  "$blink_modules_output_dir/cachestorage/CacheQueryOptions.h",
-  "$blink_modules_output_dir/canvas2d/CanvasRenderingContext2DSettings.cpp",
-  "$blink_modules_output_dir/canvas2d/CanvasRenderingContext2DSettings.h",
-  "$blink_modules_output_dir/canvas2d/HitRegionOptions.cpp",
-  "$blink_modules_output_dir/canvas2d/HitRegionOptions.h",
-  "$blink_modules_output_dir/credentialmanager/CredentialData.cpp",
-  "$blink_modules_output_dir/credentialmanager/CredentialData.h",
-  "$blink_modules_output_dir/credentialmanager/CredentialCreationOptions.cpp",
-  "$blink_modules_output_dir/credentialmanager/CredentialCreationOptions.h",
-  "$blink_modules_output_dir/credentialmanager/CredentialRequestOptions.cpp",
-  "$blink_modules_output_dir/credentialmanager/CredentialRequestOptions.h",
-  "$blink_modules_output_dir/credentialmanager/FederatedCredentialInit.cpp",
-  "$blink_modules_output_dir/credentialmanager/FederatedCredentialInit.h",
-  "$blink_modules_output_dir/credentialmanager/FederatedCredentialRequestOptions.cpp",
-  "$blink_modules_output_dir/credentialmanager/FederatedCredentialRequestOptions.h",
-  "$blink_modules_output_dir/credentialmanager/FormDataOptions.cpp",
-  "$blink_modules_output_dir/credentialmanager/FormDataOptions.h",
-  "$blink_modules_output_dir/credentialmanager/PasswordCredentialData.cpp",
-  "$blink_modules_output_dir/credentialmanager/PasswordCredentialData.h",
-  "$blink_modules_output_dir/device_orientation/DeviceAccelerationInit.cpp",
-  "$blink_modules_output_dir/device_orientation/DeviceAccelerationInit.h",
-  "$blink_modules_output_dir/device_orientation/DeviceMotionEventInit.cpp",
-  "$blink_modules_output_dir/device_orientation/DeviceMotionEventInit.h",
-  "$blink_modules_output_dir/device_orientation/DeviceOrientationEventInit.cpp",
-  "$blink_modules_output_dir/device_orientation/DeviceOrientationEventInit.h",
-  "$blink_modules_output_dir/device_orientation/DeviceRotationRateInit.cpp",
-  "$blink_modules_output_dir/device_orientation/DeviceRotationRateInit.h",
-  "$blink_modules_output_dir/encoding/TextDecodeOptions.cpp",
-  "$blink_modules_output_dir/encoding/TextDecodeOptions.h",
-  "$blink_modules_output_dir/encoding/TextDecoderOptions.cpp",
-  "$blink_modules_output_dir/encoding/TextDecoderOptions.h",
-  "$blink_modules_output_dir/encryptedmedia/MediaEncryptedEventInit.cpp",
-  "$blink_modules_output_dir/encryptedmedia/MediaEncryptedEventInit.h",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeyMessageEventInit.cpp",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeyMessageEventInit.h",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeySystemConfiguration.cpp",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeySystemConfiguration.h",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeySystemMediaCapability.cpp",
-  "$blink_modules_output_dir/encryptedmedia/MediaKeySystemMediaCapability.h",
-  "$blink_modules_output_dir/eventsource/EventSourceInit.cpp",
-  "$blink_modules_output_dir/eventsource/EventSourceInit.h",
-  "$blink_modules_output_dir/fetch/ResponseInit.cpp",
-  "$blink_modules_output_dir/fetch/ResponseInit.h",
-  "$blink_modules_output_dir/filesystem/FileSystemFlags.cpp",
-  "$blink_modules_output_dir/filesystem/FileSystemFlags.h",
-  "$blink_modules_output_dir/gamepad/GamepadEventInit.cpp",
-  "$blink_modules_output_dir/gamepad/GamepadEventInit.h",
-  "$blink_modules_output_dir/geolocation/PositionOptions.cpp",
-  "$blink_modules_output_dir/geolocation/PositionOptions.h",
-  "$blink_modules_output_dir/imagecapture/ConstrainPoint2DParameters.cpp",
-  "$blink_modules_output_dir/imagecapture/ConstrainPoint2DParameters.h",
-  "$blink_modules_output_dir/imagecapture/PhotoSettings.cpp",
-  "$blink_modules_output_dir/imagecapture/PhotoSettings.h",
-  "$blink_modules_output_dir/imagecapture/Point2D.cpp",
-  "$blink_modules_output_dir/imagecapture/Point2D.h",
-  "$blink_modules_output_dir/indexeddb/IDBIndexParameters.cpp",
-  "$blink_modules_output_dir/indexeddb/IDBIndexParameters.h",
-  "$blink_modules_output_dir/indexeddb/IDBObjectStoreParameters.cpp",
-  "$blink_modules_output_dir/indexeddb/IDBObjectStoreParameters.h",
-  "$blink_modules_output_dir/indexeddb/IDBObserverInit.cpp",
-  "$blink_modules_output_dir/indexeddb/IDBObserverInit.h",
-  "$blink_modules_output_dir/indexeddb/IDBVersionChangeEventInit.cpp",
-  "$blink_modules_output_dir/indexeddb/IDBVersionChangeEventInit.h",
-  "$blink_modules_output_dir/media_capabilities/AudioConfiguration.cpp",
-  "$blink_modules_output_dir/media_capabilities/AudioConfiguration.h",
-  "$blink_modules_output_dir/media_capabilities/MediaConfiguration.cpp",
-  "$blink_modules_output_dir/media_capabilities/MediaConfiguration.h",
-  "$blink_modules_output_dir/media_capabilities/MediaDecodingConfiguration.cpp",
-  "$blink_modules_output_dir/media_capabilities/MediaDecodingConfiguration.h",
-  "$blink_modules_output_dir/media_capabilities/MediaEncodingConfiguration.cpp",
-  "$blink_modules_output_dir/media_capabilities/MediaEncodingConfiguration.h",
-  "$blink_modules_output_dir/media_capabilities/VideoConfiguration.cpp",
-  "$blink_modules_output_dir/media_capabilities/VideoConfiguration.h",
-  "$blink_modules_output_dir/mediarecorder/BlobEventInit.cpp",
-  "$blink_modules_output_dir/mediarecorder/BlobEventInit.h",
-  "$blink_modules_output_dir/mediarecorder/MediaRecorderOptions.cpp",
-  "$blink_modules_output_dir/mediarecorder/MediaRecorderOptions.h",
-  "$blink_modules_output_dir/mediasession/MediaImage.cpp",
-  "$blink_modules_output_dir/mediasession/MediaImage.h",
-  "$blink_modules_output_dir/mediasession/MediaMetadataInit.cpp",
-  "$blink_modules_output_dir/mediasession/MediaMetadataInit.h",
-  "$blink_modules_output_dir/mediastream/ConstrainBooleanParameters.cpp",
-  "$blink_modules_output_dir/mediastream/ConstrainBooleanParameters.h",
-  "$blink_modules_output_dir/mediastream/ConstrainDOMStringParameters.cpp",
-  "$blink_modules_output_dir/mediastream/ConstrainDOMStringParameters.h",
-  "$blink_modules_output_dir/mediastream/ConstrainDoubleRange.cpp",
-  "$blink_modules_output_dir/mediastream/ConstrainDoubleRange.h",
-  "$blink_modules_output_dir/mediastream/ConstrainLongRange.cpp",
-  "$blink_modules_output_dir/mediastream/ConstrainLongRange.h",
-  "$blink_modules_output_dir/mediastream/DoubleRange.cpp",
-  "$blink_modules_output_dir/mediastream/DoubleRange.h",
-  "$blink_modules_output_dir/mediastream/LongRange.cpp",
-  "$blink_modules_output_dir/mediastream/LongRange.h",
-  "$blink_modules_output_dir/mediastream/MediaStreamConstraints.cpp",
-  "$blink_modules_output_dir/mediastream/MediaStreamConstraints.h",
-  "$blink_modules_output_dir/mediastream/MediaStreamEventInit.cpp",
-  "$blink_modules_output_dir/mediastream/MediaStreamEventInit.h",
-  "$blink_modules_output_dir/mediastream/MediaStreamTrackEventInit.cpp",
-  "$blink_modules_output_dir/mediastream/MediaStreamTrackEventInit.h",
-  "$blink_modules_output_dir/mediastream/MediaTrackCapabilities.cpp",
-  "$blink_modules_output_dir/mediastream/MediaTrackCapabilities.h",
-  "$blink_modules_output_dir/mediastream/MediaTrackConstraintSet.cpp",
-  "$blink_modules_output_dir/mediastream/MediaTrackConstraintSet.h",
-  "$blink_modules_output_dir/mediastream/MediaTrackConstraints.cpp",
-  "$blink_modules_output_dir/mediastream/MediaTrackConstraints.h",
-  "$blink_modules_output_dir/mediastream/MediaTrackSettings.cpp",
-  "$blink_modules_output_dir/mediastream/MediaTrackSettings.h",
-  "$blink_modules_output_dir/mediastream/MediaTrackSupportedConstraints.cpp",
-  "$blink_modules_output_dir/mediastream/MediaTrackSupportedConstraints.h",
-  "$blink_modules_output_dir/nfc/NFCMessage.cpp",
-  "$blink_modules_output_dir/nfc/NFCMessage.h",
-  "$blink_modules_output_dir/nfc/NFCPushOptions.cpp",
-  "$blink_modules_output_dir/nfc/NFCPushOptions.h",
-  "$blink_modules_output_dir/nfc/NFCRecord.cpp",
-  "$blink_modules_output_dir/nfc/NFCRecord.h",
-  "$blink_modules_output_dir/nfc/NFCWatchOptions.cpp",
-  "$blink_modules_output_dir/nfc/NFCWatchOptions.h",
-  "$blink_modules_output_dir/notifications/GetNotificationOptions.cpp",
-  "$blink_modules_output_dir/notifications/GetNotificationOptions.h",
-  "$blink_modules_output_dir/notifications/NotificationAction.cpp",
-  "$blink_modules_output_dir/notifications/NotificationAction.h",
-  "$blink_modules_output_dir/notifications/NotificationEventInit.cpp",
-  "$blink_modules_output_dir/notifications/NotificationEventInit.h",
-  "$blink_modules_output_dir/notifications/NotificationOptions.cpp",
-  "$blink_modules_output_dir/notifications/NotificationOptions.h",
-  "$blink_modules_output_dir/payments/AndroidPayMethodData.cpp",
-  "$blink_modules_output_dir/payments/AndroidPayMethodData.h",
-  "$blink_modules_output_dir/payments/AndroidPayTokenization.cpp",
-  "$blink_modules_output_dir/payments/AndroidPayTokenization.h",
-  "$blink_modules_output_dir/payments/BasicCardRequest.cpp",
-  "$blink_modules_output_dir/payments/BasicCardRequest.h",
-  "$blink_modules_output_dir/payments/PaymentAppResponse.cpp",
-  "$blink_modules_output_dir/payments/PaymentAppResponse.h",
-  "$blink_modules_output_dir/payments/PaymentAppRequest.cpp",
-  "$blink_modules_output_dir/payments/PaymentAppRequest.h",
-  "$blink_modules_output_dir/payments/PaymentCurrencyAmount.cpp",
-  "$blink_modules_output_dir/payments/PaymentCurrencyAmount.h",
-  "$blink_modules_output_dir/payments/PaymentDetailsBase.cpp",
-  "$blink_modules_output_dir/payments/PaymentDetailsBase.h",
-  "$blink_modules_output_dir/payments/PaymentDetailsInit.cpp",
-  "$blink_modules_output_dir/payments/PaymentDetailsInit.h",
-  "$blink_modules_output_dir/payments/PaymentDetailsModifier.cpp",
-  "$blink_modules_output_dir/payments/PaymentDetailsModifier.h",
-  "$blink_modules_output_dir/payments/PaymentDetailsUpdate.cpp",
-  "$blink_modules_output_dir/payments/PaymentDetailsUpdate.h",
-  "$blink_modules_output_dir/payments/PaymentItem.cpp",
-  "$blink_modules_output_dir/payments/PaymentItem.h",
-  "$blink_modules_output_dir/payments/PaymentMethodData.cpp",
-  "$blink_modules_output_dir/payments/PaymentMethodData.h",
-  "$blink_modules_output_dir/payments/PaymentOptions.cpp",
-  "$blink_modules_output_dir/payments/PaymentOptions.h",
-  "$blink_modules_output_dir/payments/PaymentInstrument.cpp",
-  "$blink_modules_output_dir/payments/PaymentInstrument.h",
-  "$blink_modules_output_dir/payments/PaymentRequestUpdateEventInit.cpp",
-  "$blink_modules_output_dir/payments/PaymentRequestUpdateEventInit.h",
-  "$blink_modules_output_dir/payments/PaymentShippingOption.cpp",
-  "$blink_modules_output_dir/payments/PaymentShippingOption.h",
-  "$blink_modules_output_dir/peerconnection/RTCAnswerOptions.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCAnswerOptions.h",
-  "$blink_modules_output_dir/peerconnection/RTCConfiguration.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCConfiguration.h",
-  "$blink_modules_output_dir/peerconnection/RTCDataChannelEventInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCDataChannelEventInit.h",
-  "$blink_modules_output_dir/peerconnection/RTCDTMFToneChangeEventInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCDTMFToneChangeEventInit.h",
-  "$blink_modules_output_dir/peerconnection/RTCDataChannelInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCDataChannelInit.h",
-  "$blink_modules_output_dir/peerconnection/RTCIceCandidateInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCIceCandidateInit.h",
-  "$blink_modules_output_dir/peerconnection/RTCIceServer.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCIceServer.h",
-  "$blink_modules_output_dir/peerconnection/RTCOfferAnswerOptions.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCOfferAnswerOptions.h",
-  "$blink_modules_output_dir/peerconnection/RTCOfferOptions.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCOfferOptions.h",
-  "$blink_modules_output_dir/peerconnection/RTCPeerConnectionIceEventInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCPeerConnectionIceEventInit.h",
-  "$blink_modules_output_dir/peerconnection/RTCSessionDescriptionInit.cpp",
-  "$blink_modules_output_dir/peerconnection/RTCSessionDescriptionInit.h",
-  "$blink_modules_output_dir/permissions/MidiPermissionDescriptor.cpp",
-  "$blink_modules_output_dir/permissions/MidiPermissionDescriptor.h",
-  "$blink_modules_output_dir/permissions/PermissionDescriptor.cpp",
-  "$blink_modules_output_dir/permissions/PermissionDescriptor.h",
-  "$blink_modules_output_dir/permissions/PushPermissionDescriptor.cpp",
-  "$blink_modules_output_dir/permissions/PushPermissionDescriptor.h",
-  "$blink_modules_output_dir/presentation/PresentationConnectionAvailableEventInit.cpp",
-  "$blink_modules_output_dir/presentation/PresentationConnectionAvailableEventInit.h",
-  "$blink_modules_output_dir/presentation/PresentationConnectionCloseEventInit.cpp",
-  "$blink_modules_output_dir/presentation/PresentationConnectionCloseEventInit.h",
-  "$blink_modules_output_dir/push_messaging/PushEventInit.cpp",
-  "$blink_modules_output_dir/push_messaging/PushEventInit.h",
-  "$blink_modules_output_dir/push_messaging/PushSubscriptionOptionsInit.cpp",
-  "$blink_modules_output_dir/push_messaging/PushSubscriptionOptionsInit.h",
-  "$blink_modules_output_dir/quota/StorageEstimate.cpp",
-  "$blink_modules_output_dir/quota/StorageEstimate.h",
-  "$blink_modules_output_dir/sensor/SensorErrorEventInit.cpp",
-  "$blink_modules_output_dir/sensor/SensorErrorEventInit.h",
-  "$blink_modules_output_dir/sensor/SensorOptions.cpp",
-  "$blink_modules_output_dir/sensor/SensorOptions.h",
-  "$blink_modules_output_dir/serviceworkers/ClientQueryOptions.cpp",
-  "$blink_modules_output_dir/serviceworkers/ClientQueryOptions.h",
-  "$blink_modules_output_dir/serviceworkers/ExtendableEventInit.cpp",
-  "$blink_modules_output_dir/serviceworkers/ExtendableEventInit.h",
-  "$blink_modules_output_dir/serviceworkers/ExtendableMessageEventInit.cpp",
-  "$blink_modules_output_dir/serviceworkers/ExtendableMessageEventInit.h",
-  "$blink_modules_output_dir/serviceworkers/FetchEventInit.cpp",
-  "$blink_modules_output_dir/serviceworkers/FetchEventInit.h",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchEventInit.cpp",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchEventInit.h",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchOptions.cpp",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchOptions.h",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchResponse.cpp",
-  "$blink_modules_output_dir/serviceworkers/ForeignFetchResponse.h",
-  "$blink_modules_output_dir/serviceworkers/NavigationPreloadState.cpp",
-  "$blink_modules_output_dir/serviceworkers/NavigationPreloadState.h",
-  "$blink_modules_output_dir/serviceworkers/RegistrationOptions.cpp",
-  "$blink_modules_output_dir/serviceworkers/RegistrationOptions.h",
-  "$blink_modules_output_dir/shapedetection/FaceDetectorOptions.cpp",
-  "$blink_modules_output_dir/shapedetection/FaceDetectorOptions.h",
-  "$blink_modules_output_dir/shapedetection/Landmark.cpp",
-  "$blink_modules_output_dir/shapedetection/Landmark.h",
-  "$blink_modules_output_dir/speech/SpeechRecognitionErrorInit.cpp",
-  "$blink_modules_output_dir/speech/SpeechRecognitionErrorInit.h",
-  "$blink_modules_output_dir/speech/SpeechRecognitionEventInit.cpp",
-  "$blink_modules_output_dir/speech/SpeechRecognitionEventInit.h",
-  "$blink_modules_output_dir/storage/StorageEventInit.cpp",
-  "$blink_modules_output_dir/storage/StorageEventInit.h",
-  "$blink_modules_output_dir/vr/VRDisplayEventInit.cpp",
-  "$blink_modules_output_dir/vr/VRDisplayEventInit.h",
-  "$blink_modules_output_dir/vr/VRLayer.cpp",
-  "$blink_modules_output_dir/vr/VRLayer.h",
-  "$blink_modules_output_dir/webaudio/AnalyserOptions.cpp",
-  "$blink_modules_output_dir/webaudio/AnalyserOptions.h",
-  "$blink_modules_output_dir/webaudio/AudioBufferOptions.cpp",
-  "$blink_modules_output_dir/webaudio/AudioBufferOptions.h",
-  "$blink_modules_output_dir/webaudio/AudioBufferSourceOptions.cpp",
-  "$blink_modules_output_dir/webaudio/AudioBufferSourceOptions.h",
-  "$blink_modules_output_dir/webaudio/AudioContextOptions.cpp",
-  "$blink_modules_output_dir/webaudio/AudioContextOptions.h",
-  "$blink_modules_output_dir/webaudio/AudioNodeOptions.cpp",
-  "$blink_modules_output_dir/webaudio/AudioNodeOptions.h",
-  "$blink_modules_output_dir/webaudio/AudioProcessingEventInit.cpp",
-  "$blink_modules_output_dir/webaudio/AudioProcessingEventInit.h",
-  "$blink_modules_output_dir/webaudio/AudioTimestamp.cpp",
-  "$blink_modules_output_dir/webaudio/AudioTimestamp.h",
-  "$blink_modules_output_dir/webaudio/BiquadFilterOptions.cpp",
-  "$blink_modules_output_dir/webaudio/BiquadFilterOptions.h",
-  "$blink_modules_output_dir/webaudio/ChannelMergerOptions.cpp",
-  "$blink_modules_output_dir/webaudio/ChannelMergerOptions.h",
-  "$blink_modules_output_dir/webaudio/ChannelSplitterOptions.cpp",
-  "$blink_modules_output_dir/webaudio/ChannelSplitterOptions.h",
-  "$blink_modules_output_dir/webaudio/ConstantSourceOptions.cpp",
-  "$blink_modules_output_dir/webaudio/ConstantSourceOptions.h",
-  "$blink_modules_output_dir/webaudio/ConvolverOptions.cpp",
-  "$blink_modules_output_dir/webaudio/ConvolverOptions.h",
-  "$blink_modules_output_dir/webaudio/DelayOptions.cpp",
-  "$blink_modules_output_dir/webaudio/DelayOptions.h",
-  "$blink_modules_output_dir/webaudio/DynamicsCompressorOptions.cpp",
-  "$blink_modules_output_dir/webaudio/DynamicsCompressorOptions.h",
-  "$blink_modules_output_dir/webaudio/GainOptions.cpp",
-  "$blink_modules_output_dir/webaudio/GainOptions.h",
-  "$blink_modules_output_dir/webaudio/IIRFilterOptions.cpp",
-  "$blink_modules_output_dir/webaudio/IIRFilterOptions.h",
-  "$blink_modules_output_dir/webaudio/MediaElementAudioSourceOptions.cpp",
-  "$blink_modules_output_dir/webaudio/MediaElementAudioSourceOptions.h",
-  "$blink_modules_output_dir/webaudio/MediaStreamAudioSourceOptions.cpp",
-  "$blink_modules_output_dir/webaudio/MediaStreamAudioSourceOptions.h",
-  "$blink_modules_output_dir/webaudio/PannerOptions.cpp",
-  "$blink_modules_output_dir/webaudio/PannerOptions.h",
-  "$blink_modules_output_dir/webaudio/PeriodicWaveConstraints.cpp",
-  "$blink_modules_output_dir/webaudio/PeriodicWaveConstraints.h",
-  "$blink_modules_output_dir/webaudio/PeriodicWaveOptions.cpp",
-  "$blink_modules_output_dir/webaudio/PeriodicWaveOptions.h",
-  "$blink_modules_output_dir/webaudio/OfflineAudioCompletionEventInit.cpp",
-  "$blink_modules_output_dir/webaudio/OfflineAudioCompletionEventInit.h",
-  "$blink_modules_output_dir/webaudio/OscillatorOptions.cpp",
-  "$blink_modules_output_dir/webaudio/OscillatorOptions.h",
-  "$blink_modules_output_dir/webaudio/StereoPannerOptions.cpp",
-  "$blink_modules_output_dir/webaudio/StereoPannerOptions.h",
-  "$blink_modules_output_dir/webaudio/WaveShaperOptions.cpp",
-  "$blink_modules_output_dir/webaudio/WaveShaperOptions.h",
-  "$blink_modules_output_dir/webauth/RelyingPartyAccount.cpp",
-  "$blink_modules_output_dir/webauth/RelyingPartyAccount.h",
-  "$blink_modules_output_dir/webauth/AuthenticationAssertionOptions.cpp",
-  "$blink_modules_output_dir/webauth/AuthenticationAssertionOptions.h",
-  "$blink_modules_output_dir/webauth/AuthenticationClientData.cpp",
-  "$blink_modules_output_dir/webauth/AuthenticationClientData.h",
-  "$blink_modules_output_dir/webauth/ScopedCredentialDescriptor.cpp",
-  "$blink_modules_output_dir/webauth/ScopedCredentialDescriptor.h",
-  "$blink_modules_output_dir/webauth/ScopedCredentialOptions.cpp",
-  "$blink_modules_output_dir/webauth/ScopedCredentialOptions.h",
-  "$blink_modules_output_dir/webauth/ScopedCredentialParameters.cpp",
-  "$blink_modules_output_dir/webauth/ScopedCredentialParameters.h",
-  "$blink_modules_output_dir/webauth/AuthenticationExtensions.cpp",
-  "$blink_modules_output_dir/webauth/AuthenticationExtensions.h",
-  "$blink_modules_output_dir/webgl/WebGLContextAttributes.cpp",
-  "$blink_modules_output_dir/webgl/WebGLContextAttributes.h",
-  "$blink_modules_output_dir/webgl/WebGLContextEventInit.cpp",
-  "$blink_modules_output_dir/webgl/WebGLContextEventInit.h",
-  "$blink_modules_output_dir/webmidi/MIDIConnectionEventInit.cpp",
-  "$blink_modules_output_dir/webmidi/MIDIConnectionEventInit.h",
-  "$blink_modules_output_dir/webmidi/MIDIMessageEventInit.h",
-  "$blink_modules_output_dir/webmidi/MIDIMessageEventInit.cpp",
-  "$blink_modules_output_dir/webmidi/MIDIOptions.cpp",
-  "$blink_modules_output_dir/webmidi/MIDIOptions.h",
-  "$blink_modules_output_dir/webshare/ShareData.cpp",
-  "$blink_modules_output_dir/webshare/ShareData.h",
-  "$blink_modules_output_dir/websockets/CloseEventInit.cpp",
-  "$blink_modules_output_dir/websockets/CloseEventInit.h",
-  "$blink_modules_output_dir/webusb/USBConnectionEventInit.cpp",
-  "$blink_modules_output_dir/webusb/USBConnectionEventInit.h",
-  "$blink_modules_output_dir/webusb/USBControlTransferParameters.cpp",
-  "$blink_modules_output_dir/webusb/USBControlTransferParameters.h",
-  "$blink_modules_output_dir/webusb/USBDeviceFilter.cpp",
-  "$blink_modules_output_dir/webusb/USBDeviceFilter.h",
-  "$blink_modules_output_dir/webusb/USBDeviceRequestOptions.cpp",
-  "$blink_modules_output_dir/webusb/USBDeviceRequestOptions.h",
-]
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
index c20f22d..4405c059 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
@@ -7,6 +7,7 @@
 #include "bindings/core/v8/V8BindingForCore.h"
 #include "core/dom/Document.h"
 #include "core/frame/LocalFrame.h"
+#include "core/workers/WorkerClients.h"
 #include "modules/webaudio/AudioWorkletMessagingProxy.h"
 #include "modules/webaudio/AudioWorkletThread.h"
 
@@ -30,8 +31,9 @@
   DCHECK(!worklet_messaging_proxy_);
   DCHECK(GetExecutionContext());
 
+  WorkerClients* worker_clients = WorkerClients::Create();
   worklet_messaging_proxy_ =
-      new AudioWorkletMessagingProxy(GetExecutionContext());
+      new AudioWorkletMessagingProxy(GetExecutionContext(), worker_clients);
   worklet_messaging_proxy_->Initialize();
 }
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp
index 3454e6b..f97e28ee 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp
@@ -22,9 +22,11 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate,
-    WorkerThread* thread) {
-  return new AudioWorkletGlobalScope(
-      url, user_agent, std::move(security_origin), isolate, thread);
+    WorkerThread* thread,
+    WorkerClients* worker_clients) {
+  return new AudioWorkletGlobalScope(url, user_agent,
+                                     std::move(security_origin), isolate,
+                                     thread, worker_clients);
 }
 
 AudioWorkletGlobalScope::AudioWorkletGlobalScope(
@@ -32,12 +34,14 @@
     const String& user_agent,
     PassRefPtr<SecurityOrigin> security_origin,
     v8::Isolate* isolate,
-    WorkerThread* thread)
+    WorkerThread* thread,
+    WorkerClients* worker_clients)
     : ThreadedWorkletGlobalScope(url,
                                  user_agent,
                                  std::move(security_origin),
                                  isolate,
-                                 thread) {}
+                                 thread,
+                                 worker_clients) {}
 
 AudioWorkletGlobalScope::~AudioWorkletGlobalScope() {}
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
index e22a252..78b0643 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
@@ -28,7 +28,8 @@
                                          const String& user_agent,
                                          PassRefPtr<SecurityOrigin>,
                                          v8::Isolate*,
-                                         WorkerThread*);
+                                         WorkerThread*,
+                                         WorkerClients*);
   ~AudioWorkletGlobalScope() override;
   void Dispose() final;
   bool IsAudioWorkletGlobalScope() const final { return true; }
@@ -56,7 +57,8 @@
                           const String& user_agent,
                           PassRefPtr<SecurityOrigin>,
                           v8::Isolate*,
-                          WorkerThread*);
+                          WorkerThread*,
+                          WorkerClients*);
 
   typedef HeapHashMap<String, Member<AudioWorkletProcessorDefinition>>
       ProcessorDefinitionMap;
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
index d351325..942252a3 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
@@ -10,8 +10,9 @@
 namespace blink {
 
 AudioWorkletMessagingProxy::AudioWorkletMessagingProxy(
-    ExecutionContext* execution_context)
-    : ThreadedWorkletMessagingProxy(execution_context) {}
+    ExecutionContext* execution_context,
+    WorkerClients* worker_clients)
+    : ThreadedWorkletMessagingProxy(execution_context, worker_clients) {}
 
 AudioWorkletMessagingProxy::~AudioWorkletMessagingProxy() {}
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
index b294297..ae16cf6 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
@@ -18,7 +18,7 @@
   USING_FAST_MALLOC(AudioWorkletMessagingProxy);
 
  public:
-  explicit AudioWorkletMessagingProxy(ExecutionContext*);
+  AudioWorkletMessagingProxy(ExecutionContext*, WorkerClients*);
 
  protected:
   ~AudioWorkletMessagingProxy() override;
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
index 3c031900..2597438 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
@@ -88,7 +88,8 @@
 
   return AudioWorkletGlobalScope::Create(
       startup_data->script_url_, startup_data->user_agent_,
-      std::move(security_origin), this->GetIsolate(), this);
+      std::move(security_origin), this->GetIsolate(), this,
+      startup_data->worker_clients_);
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index 09af57c1..d2b9698 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn
+++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -146,8 +146,8 @@
 
   outputs = [
     "$blink_platform_output_dir/PlatformProbeSink.h",
-    "$blink_platform_output_dir/PlatformProbesInl.h",
     "$blink_platform_output_dir/PlatformProbesImpl.cpp",
+    "$blink_platform_output_dir/PlatformProbesInl.h",
   ]
 
   args = [
@@ -244,6 +244,8 @@
     "CryptoResult.h",
     "Cursor.cpp",
     "Cursor.h",
+    "DataResourceHelper.cpp",
+    "DataResourceHelper.h",
     "DateComponents.cpp",
     "DateComponents.h",
     "Decimal.cpp",
@@ -297,8 +299,6 @@
     "PlatformChromeClient.h",
     "PlatformExport.h",
     "PlatformFrameView.h",
-    "PlatformResourceLoader.cpp",
-    "PlatformResourceLoader.h",
     "PluginScriptForbiddenScope.cpp",
     "PluginScriptForbiddenScope.h",
     "PopupMenu.h",
diff --git a/third_party/WebKit/Source/platform/PlatformResourceLoader.cpp b/third_party/WebKit/Source/platform/DataResourceHelper.cpp
similarity index 71%
rename from third_party/WebKit/Source/platform/PlatformResourceLoader.cpp
rename to third_party/WebKit/Source/platform/DataResourceHelper.cpp
index 441574f..1204f41 100644
--- a/third_party/WebKit/Source/platform/PlatformResourceLoader.cpp
+++ b/third_party/WebKit/Source/platform/DataResourceHelper.cpp
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "platform/PlatformResourceLoader.h"
+#include "platform/DataResourceHelper.h"
 
 #include "public/platform/Platform.h"
 #include "public/platform/WebData.h"
 
 namespace blink {
 
-String LoadResourceAsASCIIString(const char* resource) {
-  const WebData& resource_data = Platform::Current()->LoadResource(resource);
+String GetDataResourceAsASCIIString(const char* resource) {
+  const WebData& resource_data = Platform::Current()->GetDataResource(resource);
   String data_string(resource_data.Data(), resource_data.size());
   DCHECK(!data_string.IsEmpty());
   DCHECK(data_string.ContainsOnlyASCII());
diff --git a/third_party/WebKit/Source/platform/PlatformResourceLoader.h b/third_party/WebKit/Source/platform/DataResourceHelper.h
similarity index 62%
rename from third_party/WebKit/Source/platform/PlatformResourceLoader.h
rename to third_party/WebKit/Source/platform/DataResourceHelper.h
index 5ef4869..bfd031c 100644
--- a/third_party/WebKit/Source/platform/PlatformResourceLoader.h
+++ b/third_party/WebKit/Source/platform/DataResourceHelper.h
@@ -2,16 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef PlatformResourceLoader_h
-#define PlatformResourceLoader_h
+#ifndef DataResourceHelper_h
+#define DataResourceHelper_h
 
 #include "platform/PlatformExport.h"
 #include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
-PLATFORM_EXPORT String LoadResourceAsASCIIString(const char* resource);
+PLATFORM_EXPORT String GetDataResourceAsASCIIString(const char* resource);
 
 }  // namespace blink
 
-#endif  // PlatformResourceLoader_h
+#endif  // DataResourceHelper_h
diff --git a/third_party/WebKit/Source/platform/audio/AudioBus.cpp b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
index 0b58e93..50488ee 100644
--- a/third_party/WebKit/Source/platform/audio/AudioBus.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
@@ -740,14 +740,14 @@
 
 PassRefPtr<AudioBus> DecodeAudioFileData(const char* data, size_t size) {
   WebAudioBus web_audio_bus;
-  if (Platform::Current()->LoadAudioResource(&web_audio_bus, data, size))
+  if (Platform::Current()->DecodeAudioFileData(&web_audio_bus, data, size))
     return web_audio_bus.Release();
   return nullptr;
 }
 
-PassRefPtr<AudioBus> AudioBus::LoadPlatformResource(const char* name,
-                                                    float sample_rate) {
-  const WebData& resource = Platform::Current()->LoadResource(name);
+PassRefPtr<AudioBus> AudioBus::GetDataResource(const char* name,
+                                               float sample_rate) {
+  const WebData& resource = Platform::Current()->GetDataResource(name);
   if (resource.IsEmpty())
     return nullptr;
 
diff --git a/third_party/WebKit/Source/platform/audio/AudioBus.h b/third_party/WebKit/Source/platform/audio/AudioBus.h
index b5992d4..546d54d 100644
--- a/third_party/WebKit/Source/platform/audio/AudioBus.h
+++ b/third_party/WebKit/Source/platform/audio/AudioBus.h
@@ -169,8 +169,8 @@
   // Makes maximum absolute value == 1.0 (if possible).
   void Normalize();
 
-  static PassRefPtr<AudioBus> LoadPlatformResource(const char* name,
-                                                   float sample_rate);
+  static PassRefPtr<AudioBus> GetDataResource(const char* name,
+                                              float sample_rate);
 
  protected:
   AudioBus() {}
diff --git a/third_party/WebKit/Source/platform/audio/HRTFElevation.cpp b/third_party/WebKit/Source/platform/audio/HRTFElevation.cpp
index 79566dc..8d741278 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFElevation.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFElevation.cpp
@@ -75,9 +75,8 @@
   RefPtr<AudioBus> bus;
   AudioBusMap::iterator iterator = audio_bus_map.find(subject_name);
   if (iterator == audio_bus_map.end()) {
-    RefPtr<AudioBus> concatenated_impulse_responses(
-        AudioBus::LoadPlatformResource(subject_name.Utf8().data(),
-                                       kResponseSampleRate));
+    RefPtr<AudioBus> concatenated_impulse_responses(AudioBus::GetDataResource(
+        subject_name.Utf8().data(), kResponseSampleRate));
     DCHECK(concatenated_impulse_responses);
     if (!concatenated_impulse_responses)
       return nullptr;
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index f4bb7ec..b3e3178 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -65,7 +65,7 @@
 }
 
 PassRefPtr<Image> Image::LoadPlatformResource(const char* name) {
-  const WebData& resource = Platform::Current()->LoadResource(name);
+  const WebData& resource = Platform::Current()->GetDataResource(name);
   if (resource.IsEmpty())
     return Image::NullImage();
 
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
index 40d9239a..f217785 100644
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
@@ -194,8 +194,8 @@
   return old_platform_ ? old_platform_->CreateURLLoader() : nullptr;
 }
 
-WebData TestingPlatformSupport::LoadResource(const char* name) {
-  return old_platform_ ? old_platform_->LoadResource(name) : WebData();
+WebData TestingPlatformSupport::GetDataResource(const char* name) {
+  return old_platform_ ? old_platform_->GetDataResource(name) : WebData();
 }
 
 WebURLError TestingPlatformSupport::CancelledError(const WebURL& url) const {
diff --git a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
index a7ade83..9dcfbf25 100644
--- a/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
+++ b/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
@@ -113,7 +113,7 @@
   WebIDBFactory* IdbFactory() override;
   WebURLLoaderMockFactory* GetURLLoaderMockFactory() override;
   std::unique_ptr<blink::WebURLLoader> CreateURLLoader() override;
-  WebData LoadResource(const char* name) override;
+  WebData GetDataResource(const char* name) override;
   WebURLError CancelledError(const WebURL&) const override;
   InterfaceProvider* GetInterfaceProvider() override;
 
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 3c8a527..7a6cbf3 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -628,12 +628,12 @@
   return web_view_->ClampPageScaleFactorToLimits(scale);
 }
 
-void ChromeClientImpl::ResizeAfterLayout(LocalFrame* frame) const {
-  web_view_->ResizeAfterLayout(WebLocalFrameImpl::FromFrame(frame));
+void ChromeClientImpl::ResizeAfterLayout() const {
+  web_view_->ResizeAfterLayout();
 }
 
-void ChromeClientImpl::LayoutUpdated(LocalFrame* frame) const {
-  web_view_->LayoutUpdated(WebLocalFrameImpl::FromFrame(frame));
+void ChromeClientImpl::LayoutUpdated() const {
+  web_view_->LayoutUpdated();
 }
 
 void ChromeClientImpl::ShowMouseOverURL(const HitTestResult& result) {
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.h b/third_party/WebKit/Source/web/ChromeClientImpl.h
index d2ff38ea..20b7e22 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.h
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.h
@@ -120,8 +120,8 @@
   void PageScaleFactorChanged() const override;
   float ClampPageScaleFactorToLimits(float scale) const override;
   void MainFrameScrollOffsetChanged() const override;
-  void ResizeAfterLayout(LocalFrame*) const override;
-  void LayoutUpdated(LocalFrame*) const override;
+  void ResizeAfterLayout() const override;
+  void LayoutUpdated() const override;
   void ShowMouseOverURL(const HitTestResult&) override;
   void SetToolTip(LocalFrame&, const String&, TextDirection) override;
   void DispatchViewportPropertiesDidChange(
diff --git a/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp b/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
index 1becf19..6f58ee7 100644
--- a/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
+++ b/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
@@ -93,8 +93,9 @@
 
   PagePopupClient::AddString(
       "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
-  data->Append(Platform::Current()->LoadResource("pickerCommon.css"));
-  data->Append(Platform::Current()->LoadResource("colorSuggestionPicker.css"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.css"));
+  data->Append(
+      Platform::Current()->GetDataResource("colorSuggestionPicker.css"));
   PagePopupClient::AddString(
       "</style></head><body><div id=main>Loading...</div><script>\n"
       "window.dialogArguments = {\n",
@@ -106,8 +107,9 @@
   AddProperty("anchorRectInScreen", anchor_rect_in_screen, data);
   AddProperty("zoomFactor", ZoomFactor(), data);
   PagePopupClient::AddString("};\n", data);
-  data->Append(Platform::Current()->LoadResource("pickerCommon.js"));
-  data->Append(Platform::Current()->LoadResource("colorSuggestionPicker.js"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.js"));
+  data->Append(
+      Platform::Current()->GetDataResource("colorSuggestionPicker.js"));
   PagePopupClient::AddString("</script></body>\n", data);
 }
 
diff --git a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
index 798c9f1..6f8c9c5 100644
--- a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
+++ b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
@@ -38,12 +38,10 @@
 #include "core/workers/Worker.h"
 #include "core/workers/WorkerClients.h"
 #include "core/workers/WorkerContentSettingsClient.h"
-#include "platform/RuntimeEnabledFeatures.h"
 #include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebContentSettingsClient.h"
 #include "public/platform/WebString.h"
-#include "public/platform/WebWorkerFetchContext.h"
 #include "public/web/WebFrameClient.h"
 #include "public/web/WebWorkerContentSettingsClientProxy.h"
 #include "web/IndexedDBClientImpl.h"
@@ -71,17 +69,7 @@
         worker_clients,
         WTF::WrapUnique(
             web_frame->Client()->CreateWorkerContentSettingsClientProxy()));
-    if (RuntimeEnabledFeatures::offMainThreadFetchEnabled()) {
-      std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
-          web_frame->Client()->CreateWorkerFetchContext();
-      DCHECK(web_worker_fetch_context);
-      // TODO(horo): Set more information about the context (ex:
-      // AppCacheHostID) to |web_worker_fetch_context|.
-      web_worker_fetch_context->SetDataSaverEnabled(
-          document->GetFrame()->GetSettings()->GetDataSaverEnabled());
-      ProvideWorkerFetchContextToWorker(worker_clients,
-                                        std::move(web_worker_fetch_context));
-    }
+
     // FIXME: call provideServiceWorkerContainerClientToWorker here when we
     // support ServiceWorker in dedicated workers (http://crbug.com/371690)
     return new DedicatedWorkerMessagingProxy(worker, worker_clients);
diff --git a/third_party/WebKit/Source/web/InspectorOverlayAgent.cpp b/third_party/WebKit/Source/web/InspectorOverlayAgent.cpp
index 622b72e..2b0d46e 100644
--- a/third_party/WebKit/Source/web/InspectorOverlayAgent.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlayAgent.cpp
@@ -835,7 +835,7 @@
   frame->View()->SetBaseBackgroundColor(Color::kTransparent);
 
   const WebData& overlay_page_html_resource =
-      Platform::Current()->LoadResource("InspectorOverlayPage.html");
+      Platform::Current()->GetDataResource("InspectorOverlayPage.html");
   loader.Load(
       FrameLoadRequest(0, ResourceRequest(BlankURL()),
                        SubstituteData(overlay_page_html_resource, "text/html",
diff --git a/third_party/WebKit/Source/web/PopupMenuImpl.cpp b/third_party/WebKit/Source/web/PopupMenuImpl.cpp
index 93a3f1aa..179e8a69 100644
--- a/third_party/WebKit/Source/web/PopupMenuImpl.cpp
+++ b/third_party/WebKit/Source/web/PopupMenuImpl.cpp
@@ -267,8 +267,8 @@
   float scale_factor = chrome_client_->WindowToViewportScalar(1.f);
   PagePopupClient::AddString(
       "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
-  data->Append(Platform::Current()->LoadResource("pickerCommon.css"));
-  data->Append(Platform::Current()->LoadResource("listPicker.css"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.css"));
+  data->Append(Platform::Current()->GetDataResource("listPicker.css"));
   if (!RuntimeEnabledFeatures::forceTallerSelectPopupEnabled())
     PagePopupClient::AddString("@media (any-pointer:coarse) {", data);
   int padding = static_cast<int>(roundf(4 * scale_factor));
@@ -323,8 +323,8 @@
                      : owner_element.ClientPaddingLeft().ToDouble(),
               data);
   PagePopupClient::AddString("};\n", data);
-  data->Append(Platform::Current()->LoadResource("pickerCommon.js"));
-  data->Append(Platform::Current()->LoadResource("listPicker.js"));
+  data->Append(Platform::Current()->GetDataResource("pickerCommon.js"));
+  data->Append(Platform::Current()->GetDataResource("listPicker.js"));
   PagePopupClient::AddString("</script></body>\n", data);
 }
 
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index 7320af9a..10a25fe1 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -41,6 +41,9 @@
 #include "core/frame/VisualViewport.h"
 #include "core/frame/WebLocalFrameBase.h"
 #include "core/input/KeyboardEventManager.h"
+#include "core/layout/LayoutObject.h"
+#include "core/layout/api/LayoutAPIShim.h"
+#include "core/layout/api/LayoutViewItem.h"
 #include "core/page/Page.h"
 #include "core/style/ComputedStyle.h"
 #include "modules/accessibility/AXObjectCacheImpl.h"
@@ -58,6 +61,7 @@
 #include "public/web/WebDocument.h"
 #include "public/web/WebElement.h"
 #include "public/web/WebNode.h"
+#include "public/web/WebView.h"
 
 namespace blink {
 
@@ -1569,4 +1573,40 @@
   return cache ? WebAXObject(cache->Get(node)) : WebAXObject();
 }
 
+// static
+WebAXObject WebAXObject::FromWebView(WebView& web_view) {
+  auto main_frame = web_view.MainFrame();
+  if (!main_frame)
+    return WebAXObject();
+
+  Document* document = main_frame->GetDocument();
+  return WebAXObject(ToAXObjectCacheImpl(document->AxObjectCache())->Root());
+}
+
+// static
+WebAXObject WebAXObject::FromWebDocument(const WebDocument& web_document) {
+  const Document* document = web_document.ConstUnwrap<Document>();
+  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
+  return cache ? WebAXObject(cache->GetOrCreate(
+                     ToLayoutView(LayoutAPIShim::LayoutObjectFrom(
+                         document->GetLayoutViewItem()))))
+               : WebAXObject();
+}
+
+// static
+WebAXObject WebAXObject::FromWebDocumentByID(const WebDocument& web_document,
+                                             int ax_id) {
+  const Document* document = web_document.ConstUnwrap<Document>();
+  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
+  return cache ? WebAXObject(cache->ObjectFromAXID(ax_id)) : WebAXObject();
+}
+
+// static
+WebAXObject WebAXObject::FromWebDocumentFocused(
+    const WebDocument& web_document) {
+  const Document* document = web_document.ConstUnwrap<Document>();
+  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
+  return cache ? WebAXObject(cache->FocusedObject()) : WebAXObject();
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/web/WebDocument.cpp b/third_party/WebKit/Source/web/WebDocument.cpp
index 0146652e2..650132cf 100644
--- a/third_party/WebKit/Source/web/WebDocument.cpp
+++ b/third_party/WebKit/Source/web/WebDocument.cpp
@@ -59,7 +59,6 @@
 #include "platform/wtf/PassRefPtr.h"
 #include "public/platform/WebDistillability.h"
 #include "public/platform/WebURL.h"
-#include "public/web/WebAXObject.h"
 #include "public/web/WebDOMEvent.h"
 #include "public/web/WebElement.h"
 #include "public/web/WebElementCollection.h"
@@ -213,27 +212,6 @@
   return WebString(Unwrap<Document>()->OutgoingReferrer());
 }
 
-WebAXObject WebDocument::AccessibilityObject() const {
-  const Document* document = ConstUnwrap<Document>();
-  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
-  return cache ? WebAXObject(cache->GetOrCreate(
-                     ToLayoutView(LayoutAPIShim::LayoutObjectFrom(
-                         document->GetLayoutViewItem()))))
-               : WebAXObject();
-}
-
-WebAXObject WebDocument::AccessibilityObjectFromID(int ax_id) const {
-  const Document* document = ConstUnwrap<Document>();
-  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
-  return cache ? WebAXObject(cache->ObjectFromAXID(ax_id)) : WebAXObject();
-}
-
-WebAXObject WebDocument::FocusedAccessibilityObject() const {
-  const Document* document = ConstUnwrap<Document>();
-  AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
-  return cache ? WebAXObject(cache->FocusedObject()) : WebAXObject();
-}
-
 WebVector<WebDraggableRegion> WebDocument::DraggableRegions() const {
   WebVector<WebDraggableRegion> draggable_regions;
   const Document* document = ConstUnwrap<Document>();
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index b802dab..3dfa0a3 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3460,14 +3460,6 @@
   dev_tools_emulator_->DisableDeviceEmulation();
 }
 
-WebAXObject WebViewImpl::AccessibilityObject() {
-  if (!MainFrameImpl())
-    return WebAXObject();
-
-  Document* document = MainFrameImpl()->GetFrame()->GetDocument();
-  return WebAXObject(ToAXObjectCacheImpl(document->AxObjectCache())->Root());
-}
-
 void WebViewImpl::PerformCustomContextMenuAction(unsigned action) {
   if (!page_)
     return;
@@ -3621,19 +3613,20 @@
   EndActiveFlingAnimation();
 }
 
-void WebViewImpl::ResizeAfterLayout(WebLocalFrameBase* webframe) {
-  LocalFrame* frame = webframe->GetFrame();
-  if (!client_ || !client_->CanUpdateLayout() || !frame->IsMainFrame())
+void WebViewImpl::ResizeAfterLayout() {
+  DCHECK(MainFrameImpl());
+  if (!client_ || !client_->CanUpdateLayout())
     return;
 
   if (should_auto_resize_) {
-    WebSize frame_size = frame->View()->FrameRect().Size();
+    LocalFrameView* view = MainFrameImpl()->GetFrame()->View();
+    WebSize frame_size = view->FrameRect().Size();
     if (frame_size != size_) {
       size_ = frame_size;
 
       GetPage()->GetVisualViewport().SetSize(size_);
       GetPageScaleConstraintsSet().DidChangeInitialContainingBlockSize(size_);
-      frame->View()->SetInitialViewportSize(size_);
+      view->SetInitialViewportSize(size_);
 
       client_->DidAutoResize(size_);
       SendResizeEventAndRepaint();
@@ -3646,9 +3639,9 @@
   resize_viewport_anchor_->ResizeFrameView(MainFrameSize());
 }
 
-void WebViewImpl::LayoutUpdated(WebLocalFrameBase* webframe) {
-  LocalFrame* frame = webframe->GetFrame();
-  if (!client_ || !frame->IsMainFrame())
+void WebViewImpl::LayoutUpdated() {
+  DCHECK(MainFrameImpl());
+  if (!client_)
     return;
 
   UpdatePageOverlays();
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h
index 6e47532..40e1e6a 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.h
+++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -223,7 +223,6 @@
   unsigned long CreateUniqueIdentifierForRequest() override;
   void EnableDeviceEmulation(const WebDeviceEmulationParams&) override;
   void DisableDeviceEmulation() override;
-  WebAXObject AccessibilityObject() override;
   void SetSelectionColors(unsigned active_background_color,
                           unsigned active_foreground_color,
                           unsigned inactive_background_color,
@@ -346,8 +345,8 @@
   //   2) Calling updateAllLifecyclePhases() is a no-op.
   // After calling WebWidget::updateAllLifecyclePhases(), expect to get this
   // notification unless the view did not need a layout.
-  void LayoutUpdated(WebLocalFrameBase*) override;
-  void ResizeAfterLayout(WebLocalFrameBase*) override;
+  void LayoutUpdated() override;
+  void ResizeAfterLayout() override;
 
   void DidChangeContentsSize() override;
   void PageScaleFactorChanged() override;
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 121a4c2d..951583e 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1890,7 +1890,7 @@
   // Because of where the visual viewport is located, this should hit the bottom
   // right target (target 4).
   WebAXObject hitNode =
-      web_doc.AccessibilityObject().HitTest(WebPoint(154, 165));
+      WebAXObject::FromWebDocument(web_doc).HitTest(WebPoint(154, 165));
   WebAXNameFrom name_from;
   WebVector<WebAXObject> name_objects;
   EXPECT_EQ(std::string("Target4"),
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index a28fe61..f5dc4e0 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -90,7 +90,6 @@
 #include "platform/Cursor.h"
 #include "platform/DragImage.h"
 #include "platform/KeyboardCodes.h"
-#include "platform/PlatformResourceLoader.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/geometry/FloatRect.h"
 #include "platform/graphics/GraphicsLayer.h"
diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
index f7360bf6..f65d73f 100644
--- a/third_party/WebKit/public/platform/Platform.h
+++ b/third_party/WebKit/public/platform/Platform.h
@@ -403,15 +403,15 @@
   // Resources -----------------------------------------------------------
 
   // Returns a blob of data corresponding to the named resource.
-  virtual WebData LoadResource(const char* name) { return WebData(); }
+  virtual WebData GetDataResource(const char* name) { return WebData(); }
 
   // Decodes the in-memory audio file data and returns the linear PCM audio data
   // in the destinationBus.  A sample-rate conversion to sampleRate will occur
   // if the file data is at a different sample-rate.
   // Returns true on success.
-  virtual bool LoadAudioResource(WebAudioBus* destination_bus,
-                                 const char* audio_file_data,
-                                 size_t data_size) {
+  virtual bool DecodeAudioFileData(WebAudioBus* destination_bus,
+                                   const char* audio_file_data,
+                                   size_t data_size) {
     return false;
   }
 
diff --git a/third_party/WebKit/public/web/WebAXObject.h b/third_party/WebKit/public/web/WebAXObject.h
index 37d0d43..8565c87f 100644
--- a/third_party/WebKit/public/web/WebAXObject.h
+++ b/third_party/WebKit/public/web/WebAXObject.h
@@ -50,6 +50,7 @@
 class WebDocument;
 class WebString;
 class WebURL;
+class WebView;
 struct WebFloatRect;
 struct WebPoint;
 struct WebRect;
@@ -94,6 +95,10 @@
   }
 
   BLINK_EXPORT static WebAXObject FromWebNode(WebNode&);
+  BLINK_EXPORT static WebAXObject FromWebView(WebView&);
+  BLINK_EXPORT static WebAXObject FromWebDocument(const WebDocument&);
+  BLINK_EXPORT static WebAXObject FromWebDocumentByID(const WebDocument&, int);
+  BLINK_EXPORT static WebAXObject FromWebDocumentFocused(const WebDocument&);
 
   BLINK_EXPORT void Reset();
   BLINK_EXPORT void Assign(const WebAXObject&);
diff --git a/third_party/WebKit/public/web/WebDocument.h b/third_party/WebKit/public/web/WebDocument.h
index eb10068..7534ea0f 100644
--- a/third_party/WebKit/public/web/WebDocument.h
+++ b/third_party/WebKit/public/web/WebDocument.h
@@ -49,7 +49,6 @@
 namespace blink {
 
 class Document;
-class WebAXObject;
 class WebElement;
 class WebFormElement;
 class WebElementCollection;
@@ -109,19 +108,6 @@
   BLINK_EXPORT WebReferrerPolicy GetReferrerPolicy() const;
   BLINK_EXPORT WebString OutgoingReferrer();
 
-  // Accessibility support. These methods should only be called on the
-  // top-level document, because one accessibility cache spans all of
-  // the documents on the page.
-
-  // Gets the accessibility object for this document.
-  BLINK_EXPORT WebAXObject AccessibilityObject() const;
-
-  // Gets the accessibility object for an object on this page by ID.
-  BLINK_EXPORT WebAXObject AccessibilityObjectFromID(int ax_id) const;
-
-  // Gets the accessibility object that has focus.
-  BLINK_EXPORT WebAXObject FocusedAccessibilityObject() const;
-
   // Inserts the given CSS source code as a stylesheet in the document, and
   // return its id.
   BLINK_EXPORT WebStyleSheetId InsertStyleSheet(const WebString& source_code);
diff --git a/third_party/WebKit/public/web/WebView.h b/third_party/WebKit/public/web/WebView.h
index d65c955..4670997 100644
--- a/third_party/WebKit/public/web/WebView.h
+++ b/third_party/WebKit/public/web/WebView.h
@@ -46,7 +46,6 @@
 
 namespace blink {
 
-class WebAXObject;
 class WebCredentialManagerClient;
 class WebFrame;
 class WebHitTestResult;
@@ -370,10 +369,6 @@
   // Cancel emulation started via |enableDeviceEmulation| call.
   virtual void DisableDeviceEmulation() = 0;
 
-  // Accessibility -------------------------------------------------------
-
-  // Returns the accessibility object for this view.
-  virtual WebAXObject AccessibilityObject() = 0;
 
   // Context menu --------------------------------------------------------
 
diff --git a/tools/perf/page_sets/system_health/browsing_stories.py b/tools/perf/page_sets/system_health/browsing_stories.py
index a8967213..795efcc 100644
--- a/tools/perf/page_sets/system_health/browsing_stories.py
+++ b/tools/perf/page_sets/system_health/browsing_stories.py
@@ -898,6 +898,7 @@
   TAGS = [story_tags.INFINITE_SCROLL]
 
 
+@decorators.Disabled('android-webview')  # crbug.com/728528
 class PinterestMobileStory(_InfiniteScrollStory):
   NAME = 'browse:social:pinterest_infinite_scroll'
   URL = 'https://www.pinterest.com/all'
@@ -911,6 +912,7 @@
   TAGS = [story_tags.INFINITE_SCROLL]
 
 
+@decorators.Disabled('win')  # crbug.com/728464
 class TwitterScrollDesktopStory(_InfiniteScrollStory):
   NAME = 'browse:social:twitter_infinite_scroll'
   URL = 'https://twitter.com/taylorswift13'