Merge mozilla-inbound to mozilla-central. a=merge
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 23 Jan 2019 18:51:14 +0200
changeset 455102 4f1ff0e34dd59539c8c0d133ecdff5660ec4e263
parent 455101 2e27f3f1ebc6f38d98ddd42b6955083f637e2b1b (current diff)
parent 454993 38398e4011d7959ea97998d6df34f15519201a0d (diff)
child 455103 309abca54dae664c346136ec2d0be957b39b676c
child 455166 7aa7de375ce27c332c15fb744966e54681b10a5f
push id111397
push useraciure@mozilla.com
push dateWed, 23 Jan 2019 18:56:11 +0000
treeherdermozilla-inbound@309abca54dae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.0a1
first release with
nightly linux32
4f1ff0e34dd5 / 66.0a1 / 20190123165704 / files
nightly linux64
4f1ff0e34dd5 / 66.0a1 / 20190123165704 / files
nightly mac
4f1ff0e34dd5 / 66.0a1 / 20190123165704 / files
nightly win32
4f1ff0e34dd5 / 66.0a1 / 20190123165704 / files
nightly win64
4f1ff0e34dd5 / 66.0a1 / 20190123165704 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-inbound to mozilla-central. a=merge
testing/web-platform/meta/FileAPI/url/multi-global-origin-serialization.sub.html.ini
testing/web-platform/meta/IndexedDB/__dir__.ini
testing/web-platform/meta/content-security-policy/securitypolicyviolation/__dir__.ini
testing/web-platform/meta/css/CSS2/lists/list-style-021.xht.ini
testing/web-platform/meta/css/css-fill-stroke/paint-order-001.tentative.html.ini
testing/web-platform/meta/css/css-fonts/font-display/__dir__.ini
testing/web-platform/meta/css/css-writing-modes/available-size-006.html.ini
testing/web-platform/meta/css/css-writing-modes/available-size-007.html.ini
testing/web-platform/meta/css/css-writing-modes/available-size-008.html.ini
testing/web-platform/meta/css/css-writing-modes/available-size-015.html.ini
testing/web-platform/meta/css/css-writing-modes/available-size-019.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-001b.xhtml.ini
testing/web-platform/meta/encoding/legacy-mb-japanese/shift_jis/__dir__.ini
testing/web-platform/meta/encoding/legacy-mb-korean/euc-kr/__dir__.ini
testing/web-platform/meta/eventsource/eventsource-constructor-document-domain.htm.ini
testing/web-platform/meta/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html.ini
testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_feature_policy.tentative.sub.html.ini
testing/web-platform/meta/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub.html.ini
testing/web-platform/meta/html/semantics/embedded-content/media-elements/event_play_noautoplay.html.ini
testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-same-origin-domain.sub.window.js.ini
testing/web-platform/meta/html/webappapis/scripting/events/event-handler-attributes-window-body.html.ini
testing/web-platform/meta/infrastructure/assumptions/__dir__.ini
testing/web-platform/meta/infrastructure/assumptions/allowed-to-play.html.ini
testing/web-platform/meta/mimesniff/mime-types/__dir__.ini
testing/web-platform/meta/resource-timing/resource_timing_store_and_clear_during_callback.html.ini
testing/web-platform/meta/user-timing/mark-measure-return-null.html.ini
testing/web-platform/meta/wasm/jsapi/imports.wast.any.js.ini
testing/web-platform/meta/wasm/serialization/window-domain-success.sub.html.ini
testing/web-platform/meta/wasm/serialization/window-similar-but-cross-origin-success.sub.html.ini
testing/web-platform/meta/webstorage/document-domain.html.ini
testing/web-platform/meta/workers/importscripts_mime.tentative.any.js.ini
testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-003-ref.html
testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-003.html
testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-005.html
testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-003.html
testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-005.html
testing/web-platform/tests/css/css-text/word-break/reference/word-break-break-all-009-ref.xht
testing/web-platform/tests/css/css-text/word-break/reference/word-break-keep-all-004-ref.xht
testing/web-platform/tests/css/css-text/word-break/word-break-001.html
testing/web-platform/tests/css/css-text/word-break/word-break-002.html
testing/web-platform/tests/css/css-text/word-break/word-break-003.html
testing/web-platform/tests/css/css-text/word-break/word-break-004.html
testing/web-platform/tests/css/css-text/word-break/word-break-break-all-009.xht
testing/web-platform/tests/css/css-text/word-break/word-break-keep-all-004.xht
testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/document-write/048.html
testing/web-platform/tests/html/webappapis/scripting/events/event-handler-attributes-window-body.html
testing/web-platform/tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html
testing/web-platform/tests/resource-timing/resource_timing_store_and_clear_during_callback.html
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/testharness_webdriver.js
testing/web-platform/tests/user-timing/mark-measure-return-null.html
testing/web-platform/tests/workers/importscripts_mime.tentative.any.js
--- a/devtools/client/inspector/rules/components/Declaration.js
+++ b/devtools/client/inspector/rules/components/Declaration.js
@@ -1,41 +1,62 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const { PureComponent } = require("devtools/client/shared/vendor/react");
+const { createRef, PureComponent } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
+const { editableItem } = require("devtools/client/shared/inplace-editor");
 
 const { getStr } = require("../utils/l10n");
 const Types = require("../types");
 
 class Declaration extends PureComponent {
   static get propTypes() {
     return {
       declaration: PropTypes.shape(Types.declaration).isRequired,
+      isUserAgentStyle: PropTypes.bool.isRequired,
       onToggleDeclaration: PropTypes.func.isRequired,
+      showDeclarationNameEditor: PropTypes.func.isRequired,
     };
   }
 
   constructor(props) {
     super(props);
 
     this.state = {
       // Whether or not the computed property list is expanded.
       isComputedListExpanded: false,
     };
 
+    this.nameSpanRef = createRef();
+
     this.onComputedExpanderClick = this.onComputedExpanderClick.bind(this);
     this.onToggleDeclarationClick = this.onToggleDeclarationClick.bind(this);
   }
 
+  componentDidMount() {
+    if (this.props.isUserAgentStyle) {
+      // Declaration is not editable.
+      return;
+    }
+
+    const { declaration } = this.props;
+
+    editableItem({
+      element: this.nameSpanRef.current,
+    }, element => {
+      this.props.showDeclarationNameEditor(element, declaration.ruleId,
+        declaration.id);
+    });
+  }
+
   onComputedExpanderClick(event) {
     event.stopPropagation();
 
     this.setState(prevState => {
       return { isComputedListExpanded: !prevState.isComputedListExpanded };
     });
   }
 
@@ -139,17 +160,24 @@ class Declaration extends PureComponent 
         dom.div({ className: "ruleview-propertycontainer" },
           dom.div({
             className: "ruleview-enableproperty theme-checkbox" +
                         (isEnabled ? " checked" : ""),
             onClick: this.onToggleDeclarationClick,
             tabIndex: -1,
           }),
           dom.span({ className: "ruleview-namecontainer" },
-            dom.span({ className: "ruleview-propertyname theme-fg-color3" }, name),
+            dom.span(
+              {
+                className: "ruleview-propertyname theme-fg-color3",
+                ref: this.nameSpanRef,
+                tabIndex: 0,
+              },
+              name
+            ),
             ": "
           ),
           dom.span({
             className: "ruleview-expander theme-twisty" +
                        (this.state.isComputedListExpanded ? " open" : ""),
             onClick: this.onComputedExpanderClick,
             style: { display: computedProperties.length ? "inline-block" : "none" },
           }),
--- a/devtools/client/inspector/rules/components/Declarations.js
+++ b/devtools/client/inspector/rules/components/Declarations.js
@@ -11,37 +11,43 @@ const PropTypes = require("devtools/clie
 const Declaration = createFactory(require("./Declaration"));
 
 const Types = require("../types");
 
 class Declarations extends PureComponent {
   static get propTypes() {
     return {
       declarations: PropTypes.arrayOf(PropTypes.shape(Types.declaration)).isRequired,
+      isUserAgentStyle: PropTypes.bool.isRequired,
       onToggleDeclaration: PropTypes.func.isRequired,
+      showDeclarationNameEditor: PropTypes.func.isRequired,
     };
   }
 
   render() {
     const {
       declarations,
+      isUserAgentStyle,
       onToggleDeclaration,
+      showDeclarationNameEditor,
     } = this.props;
 
     if (!declarations.length) {
       return null;
     }
 
     return (
       dom.ul({ className: "ruleview-propertylist" },
         declarations.map(declaration => {
           return Declaration({
             key: declaration.id,
             declaration,
+            isUserAgentStyle,
             onToggleDeclaration,
+            showDeclarationNameEditor,
           });
         })
       )
     );
   }
 }
 
 module.exports = Declarations;
--- a/devtools/client/inspector/rules/components/Rule.js
+++ b/devtools/client/inspector/rules/components/Rule.js
@@ -16,25 +16,27 @@ const SourceLink = createFactory(require
 const Types = require("../types");
 
 class Rule extends PureComponent {
   static get propTypes() {
     return {
       onToggleDeclaration: PropTypes.func.isRequired,
       onToggleSelectorHighlighter: PropTypes.func.isRequired,
       rule: PropTypes.shape(Types.rule).isRequired,
+      showDeclarationNameEditor: PropTypes.func.isRequired,
       showSelectorEditor: PropTypes.func.isRequired,
     };
   }
 
   render() {
     const {
       onToggleDeclaration,
       onToggleSelectorHighlighter,
       rule,
+      showDeclarationNameEditor,
       showSelectorEditor,
     } = this.props;
     const {
       declarations,
       id,
       isUnmatched,
       isUserAgentStyle,
       selector,
@@ -65,17 +67,19 @@ class Rule extends PureComponent {
                 selector,
               })
               :
               null,
             dom.span({ className: "ruleview-ruleopen" }, " {")
           ),
           Declarations({
             declarations,
+            isUserAgentStyle,
             onToggleDeclaration,
+            showDeclarationNameEditor,
           }),
           dom.div({ className: "ruleview-ruleclose" }, "}")
         )
       )
     );
   }
 }
 
--- a/devtools/client/inspector/rules/components/Rules.js
+++ b/devtools/client/inspector/rules/components/Rules.js
@@ -12,33 +12,36 @@ const Rule = createFactory(require("./Ru
 const Types = require("../types");
 
 class Rules extends PureComponent {
   static get propTypes() {
     return {
       onToggleDeclaration: PropTypes.func.isRequired,
       onToggleSelectorHighlighter: PropTypes.func.isRequired,
       rules: PropTypes.arrayOf(PropTypes.shape(Types.rule)).isRequired,
+      showDeclarationNameEditor: PropTypes.func.isRequired,
       showSelectorEditor: PropTypes.func.isRequired,
     };
   }
 
   render() {
     const {
       onToggleDeclaration,
       onToggleSelectorHighlighter,
       rules,
+      showDeclarationNameEditor,
       showSelectorEditor,
     } = this.props;
 
     return rules.map(rule => {
       return Rule({
         key: rule.id,
         onToggleDeclaration,
         onToggleSelectorHighlighter,
         rule,
+        showDeclarationNameEditor,
         showSelectorEditor,
       });
     });
   }
 }
 
 module.exports = Rules;
--- a/devtools/client/inspector/rules/components/RulesApp.js
+++ b/devtools/client/inspector/rules/components/RulesApp.js
@@ -30,24 +30,26 @@ class RulesApp extends PureComponent {
     return {
       onAddClass: PropTypes.func.isRequired,
       onSetClassState: PropTypes.func.isRequired,
       onToggleClassPanelExpanded: PropTypes.func.isRequired,
       onToggleDeclaration: PropTypes.func.isRequired,
       onTogglePseudoClass: PropTypes.func.isRequired,
       onToggleSelectorHighlighter: PropTypes.func.isRequired,
       rules: PropTypes.arrayOf(PropTypes.shape(Types.rule)).isRequired,
+      showDeclarationNameEditor: PropTypes.func.isRequired,
       showSelectorEditor: PropTypes.func.isRequired,
     };
   }
 
   getRuleProps() {
     return {
       onToggleDeclaration: this.props.onToggleDeclaration,
       onToggleSelectorHighlighter: this.props.onToggleSelectorHighlighter,
+      showDeclarationNameEditor: this.props.showDeclarationNameEditor,
       showSelectorEditor: this.props.showSelectorEditor,
     };
   }
 
   renderInheritedRules(rules) {
     if (!rules.length) {
       return null;
     }
--- a/devtools/client/inspector/rules/models/element-style.js
+++ b/devtools/client/inspector/rules/models/element-style.js
@@ -5,16 +5,17 @@
 "use strict";
 
 const promise = require("promise");
 const Rule = require("devtools/client/inspector/rules/models/rule");
 const UserProperties = require("devtools/client/inspector/rules/models/user-properties");
 const { ELEMENT_STYLE } = require("devtools/shared/specs/styles");
 
 loader.lazyRequireGetter(this, "promiseWarn", "devtools/client/inspector/shared/utils", true);
+loader.lazyRequireGetter(this, "parseDeclarations", "devtools/shared/css/parsing-utils", true);
 loader.lazyRequireGetter(this, "isCssVariable", "devtools/shared/fronts/css-properties", true);
 
 /**
  * ElementStyle is responsible for the following:
  *   Keeps track of which properties are overridden.
  *   Maintains a list of Rule objects for a given element.
  *
  * @param  {Element} element
@@ -328,16 +329,52 @@ ElementStyle.prototype = {
       // overridden state has changed for the text property.
       if (this._updatePropertyOverridden(textProp)) {
         textProp.updateEditor();
       }
     }
   },
 
   /**
+   * Given the id of the rule and the new declaration name, modifies the existing
+   * declaration name to the new given value.
+   *
+   * @param  {String} ruleID
+   *         The Rule id of the given CSS declaration.
+   * @param  {String} declarationId
+   *         The TextProperty id for the CSS declaration.
+   * @param  {String} name
+   *         The new declaration name.
+   */
+  modifyDeclarationName: async function(ruleID, declarationId, name) {
+    const rule = this.getRule(ruleID);
+    if (!rule) {
+      return;
+    }
+
+    const declaration = rule.getDeclaration(declarationId);
+    if (!declaration || declaration.name === name) {
+      return;
+    }
+
+    // Adding multiple rules inside of name field overwrites the current
+    // property with the first, then adds any more onto the property list.
+    const declarations = parseDeclarations(this.cssProperties.isKnown, name);
+    if (!declarations.length) {
+      return;
+    }
+
+    await declaration.setName(declarations[0].name);
+
+    if (!declaration.enabled) {
+      await declaration.setEnabled(true);
+    }
+  },
+
+  /**
    * Modifies the existing rule's selector to the new given value.
    *
    * @param {String} ruleId
    *        The id of the Rule to be modified.
    * @param {String} selector
    *        The new selector value.
    */
   modifySelector: async function(ruleId, selector) {
--- a/devtools/client/inspector/rules/models/rule.js
+++ b/devtools/client/inspector/rules/models/rule.js
@@ -382,26 +382,27 @@ Rule.prototype = {
 
   /**
    * Renames a property.
    *
    * @param {TextProperty} property
    *        The property to rename.
    * @param {String} name
    *        The new property name (such as "background" or "border-top").
+   * @return {Promise}
    */
   setPropertyName: function(property, name) {
     if (name === property.name) {
-      return;
+      return Promise.resolve();
     }
 
     const oldName = property.name;
     property.name = name;
     const index = this.textProps.indexOf(property);
-    this.applyProperties((modifications) => {
+    return this.applyProperties(modifications => {
       modifications.renameProperty(index, oldName, name);
     });
   },
 
   /**
    * Sets the value and priority of a property, then reapply all properties.
    *
    * @param {TextProperty} property
@@ -416,17 +417,17 @@ Rule.prototype = {
     if (value === property.value && priority === property.priority) {
       return Promise.resolve();
     }
 
     property.value = value;
     property.priority = priority;
 
     const index = this.textProps.indexOf(property);
-    return this.applyProperties((modifications) => {
+    return this.applyProperties(modifications => {
       modifications.setProperty(index, property.name, value, priority);
     });
   },
 
   /**
    * Just sets the value and priority of a property, in order to preview its
    * effect on the content document.
    *
--- a/devtools/client/inspector/rules/models/text-property.js
+++ b/devtools/client/inspector/rules/models/text-property.js
@@ -157,25 +157,24 @@ TextProperty.prototype = {
    */
   updateValue: function(value) {
     if (value !== this.value) {
       this.value = value;
       this.updateEditor();
     }
   },
 
-  setName: function(name) {
-    const store = this.rule.elementStyle.store;
-
-    if (name !== this.name) {
+  setName: async function(name) {
+    if (name !== this.name && this.editor) {
+      const store = this.rule.elementStyle.store;
       store.userProperties.setProperty(this.rule.domRule, name,
                                        this.editor.committed.value);
     }
 
-    this.rule.setPropertyName(this, name);
+    await this.rule.setPropertyName(this, name);
     this.updateEditor();
   },
 
   setEnabled: function(value) {
     this.rule.setPropertyEnabled(this, value);
     this.updateEditor();
   },
 
--- a/devtools/client/inspector/rules/new-rules.js
+++ b/devtools/client/inspector/rules/new-rules.js
@@ -26,16 +26,17 @@ const {
 
 const RulesApp = createFactory(require("./components/RulesApp"));
 
 const { LocalizationHelper } = require("devtools/shared/l10n");
 const INSPECTOR_L10N =
   new LocalizationHelper("devtools/client/locales/inspector.properties");
 
 loader.lazyRequireGetter(this, "ClassList", "devtools/client/inspector/rules/models/class-list");
+loader.lazyRequireGetter(this, "AutocompletePopup", "devtools/client/shared/autocomplete-popup");
 loader.lazyRequireGetter(this, "InplaceEditor", "devtools/client/shared/inplace-editor", true);
 
 const PREF_UA_STYLES = "devtools.inspector.showUserAgentStyles";
 
 class RulesView {
   constructor(inspector, window) {
     this.cssProperties = inspector.cssProperties;
     this.doc = window.document;
@@ -50,16 +51,17 @@ class RulesView {
 
     this.onAddClass = this.onAddClass.bind(this);
     this.onSelection = this.onSelection.bind(this);
     this.onSetClassState = this.onSetClassState.bind(this);
     this.onToggleClassPanelExpanded = this.onToggleClassPanelExpanded.bind(this);
     this.onToggleDeclaration = this.onToggleDeclaration.bind(this);
     this.onTogglePseudoClass = this.onTogglePseudoClass.bind(this);
     this.onToggleSelectorHighlighter = this.onToggleSelectorHighlighter.bind(this);
+    this.showDeclarationNameEditor = this.showDeclarationNameEditor.bind(this);
     this.showSelectorEditor = this.showSelectorEditor.bind(this);
     this.updateClassList = this.updateClassList.bind(this);
     this.updateRules = this.updateRules.bind(this);
 
     this.inspector.sidebar.on("select", this.onSelection);
     this.selection.on("detached-front", this.onSelection);
     this.selection.on("new-node-front", this.onSelection);
 
@@ -75,16 +77,17 @@ class RulesView {
 
     const rulesApp = RulesApp({
       onAddClass: this.onAddClass,
       onSetClassState: this.onSetClassState,
       onToggleClassPanelExpanded: this.onToggleClassPanelExpanded,
       onToggleDeclaration: this.onToggleDeclaration,
       onTogglePseudoClass: this.onTogglePseudoClass,
       onToggleSelectorHighlighter: this.onToggleSelectorHighlighter,
+      showDeclarationNameEditor: this.showDeclarationNameEditor,
       showSelectorEditor: this.showSelectorEditor,
     });
 
     const provider = createElement(Provider, {
       id: "ruleview",
       key: "ruleview",
       store: this.store,
       title: INSPECTOR_L10N.getStr("inspector.sidebar.ruleViewTitle"),
@@ -94,16 +97,21 @@ class RulesView {
     this.provider = provider;
   }
 
   destroy() {
     this.inspector.sidebar.off("select", this.onSelection);
     this.selection.off("detached-front", this.onSelection);
     this.selection.off("new-node-front", this.onSelection);
 
+    if (this._autocompletePopup) {
+      this._autocompletePopup.destroy();
+      this._autocompletePopup = null;
+    }
+
     if (this._classList) {
       this._classList.off("current-node-class-changed", this.refreshClassList);
       this._classList.destroy();
       this._classList = null;
     }
 
     if (this._selectHighlighter) {
       this._selectorHighlighter.finalize();
@@ -123,16 +131,32 @@ class RulesView {
     this.selection = null;
     this.showUserAgentStyles = null;
     this.store = null;
     this.telemetry = null;
     this.toolbox = null;
   }
 
   /**
+   * Get an instance of the AutocompletePopup.
+   *
+   * @return {AutocompletePopup}
+   */
+  get autocompletePopup() {
+    if (!this._autocompletePopup) {
+      this._autocompletePopup = new AutocompletePopup(this.doc, {
+        autoSelect: true,
+        theme: "auto",
+      });
+    }
+
+    return this._autocompletePopup;
+  }
+
+  /**
    * Get an instance of the ClassList model used to manage the list of CSS classes
    * applied to the element.
    *
    * @return {ClassList} used to manage the list of CSS classes applied to the element.
    */
   get classList() {
     if (!this._classList) {
       this._classList = new ClassList(this.inspector);
@@ -323,16 +347,47 @@ class RulesView {
       this.highlighters.selectorHighlighterShown = null;
       this.store.dispatch(updateHighlightedSelector(""));
       // This event is emitted for testing purposes.
       this.emit("ruleview-selectorhighlighter-toggled", false);
     }
   }
 
   /**
+   * Handler for showing the inplace editor when an editable property name is clicked in
+   * the rules view.
+   *
+   * @param  {DOMNode} element
+   *         The declaration name span element to be edited.
+   * @param  {String} ruleId
+   *         The id of the Rule object to be edited.
+   * @param  {String} declarationId
+   *         The id of the TextProperty object to be edited.
+   */
+  showDeclarationNameEditor(element, ruleId, declarationId) {
+    new InplaceEditor({
+      advanceChars: ":",
+      contentType: InplaceEditor.CONTENT_TYPES.CSS_PROPERTY,
+      cssProperties: this.cssProperties,
+      done: (name, commit) => {
+        if (!commit) {
+          return;
+        }
+
+        this.elementStyle.modifyDeclarationName(ruleId, declarationId, name);
+        this.telemetry.recordEvent("edit_rule", "ruleview", null, {
+          "session_id": this.toolbox.sessionId,
+        });
+      },
+      element,
+      popup: this.autocompletePopup,
+    });
+  }
+
+  /**
    * Shows the inplace editor for the a selector.
    *
    * @param  {DOMNode} element
    *         The selector's span element to show the inplace editor.
    * @param  {String} ruleId
    *         The id of the Rule to be modified.
    */
   showSelectorEditor(element, ruleId) {
--- a/gfx/angle/checkout/out/gen/angle/id/commit.h
+++ b/gfx/angle/checkout/out/gen/angle/id/commit.h
@@ -1,3 +1,3 @@
-#define ANGLE_COMMIT_HASH "790e8e6b4179"
+#define ANGLE_COMMIT_HASH "eff6bfdb1db9"
 #define ANGLE_COMMIT_HASH_SIZE 12
-#define ANGLE_COMMIT_DATE "2018-10-09 17:41:46 -0700"
+#define ANGLE_COMMIT_DATE "2019-01-22 11:11:06 -0800"
--- a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
+++ b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp
@@ -119,18 +119,18 @@ angle::Result PixelTransfer11::loadResou
     return angle::Result::Continue();
 }
 
 void PixelTransfer11::setBufferToTextureCopyParams(const gl::Box &destArea, const gl::Extents &destSize, GLenum internalFormat,
                                                    const gl::PixelUnpackState &unpack, unsigned int offset, CopyShaderParams *parametersOut)
 {
     StructZero(parametersOut);
 
-    float texelCenterX = 0.5f / static_cast<float>(destSize.width - 1);
-    float texelCenterY = 0.5f / static_cast<float>(destSize.height - 1);
+    float texelCenterX = 0.5f / static_cast<float>(destSize.width);
+    float texelCenterY = 0.5f / static_cast<float>(destSize.height);
 
     unsigned int bytesPerPixel   = gl::GetSizedInternalFormatInfo(internalFormat).pixelBytes;
     unsigned int alignmentBytes = static_cast<unsigned int>(unpack.alignment);
     unsigned int alignmentPixels = (alignmentBytes <= bytesPerPixel ? 1 : alignmentBytes / bytesPerPixel);
 
     parametersOut->FirstPixelOffset     = offset / bytesPerPixel;
     parametersOut->PixelsPerRow         = static_cast<unsigned int>((unpack.rowLength > 0) ? unpack.rowLength : destArea.width);
     parametersOut->RowStride            = roundUp(parametersOut->PixelsPerRow, alignmentPixels);
--- a/gfx/angle/cherry_picks.txt
+++ b/gfx/angle/cherry_picks.txt
@@ -1,8 +1,20 @@
+commit eff6bfdb1db99505122a37f2911bdd3b845e19b8
+Author: Jeff Gilbert <jgilbert@mozilla.com>
+Date:   Thu Jan 3 23:38:44 2019 -0800
+
+    In PixelTransfer11, center offset should be 1/size, not 1/(size-1).
+    
+    Bug: angleproject:3039
+    Change-Id: Ie97bfb5aa3cfe7cd2c4b1d22b5b4a8d82a5e5170
+    Reviewed-on: https://chromium-review.googlesource.com/c/1407251
+    Reviewed-by: Jamie Madill <jmadill@chromium.org>
+    Commit-Queue: Jamie Madill <jmadill@chromium.org>
+
 commit 790e8e6b417905eca335d06c16ec54c977188110
 Author: Olli Etuaho <oetuaho@nvidia.com>
 Date:   Thu Sep 20 13:20:50 2018 +0300
 
     Fix using a large vertex attrib divisor on D3D11
     
     A divisor >= 256 used to trigger an assert on the D3D11 backend since
     it couldn't fit into the input layout cache. Increase the space
--- a/gfx/angle/targets/angle_common/moz.build
+++ b/gfx/angle/targets/angle_common/moz.build
@@ -26,16 +26,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -62,36 +63,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -132,12 +146,13 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 
 if CONFIG['OS_ARCH'] not in ('Darwin', 'WINNT'):
     SOURCES += [
         '../../checkout/src/common/system_utils_linux.cpp',
     ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('angle_common')
--- a/gfx/angle/targets/angle_gpu_info_util/moz.build
+++ b/gfx/angle/targets/angle_gpu_info_util/moz.build
@@ -26,16 +26,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -62,36 +63,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -118,12 +132,13 @@ DIRS += [
 ]
 
 OS_LIBS += [
     'setupapi',
 ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('angle_gpu_info_util')
--- a/gfx/angle/targets/angle_image_util/moz.build
+++ b/gfx/angle/targets/angle_image_util/moz.build
@@ -25,16 +25,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -61,36 +62,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -111,12 +125,13 @@ USE_LIBS += [
 ]
 
 DIRS += [
     '../angle_common',
 ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('angle_image_util')
--- a/gfx/angle/targets/libANGLE/moz.build
+++ b/gfx/angle/targets/libANGLE/moz.build
@@ -31,16 +31,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -67,37 +68,50 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4530',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -273,12 +287,13 @@ DIRS += [
 OS_LIBS += [
     'd3d9',
     'dxguid',
     'setupapi',
 ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('libANGLE')
--- a/gfx/angle/targets/libEGL/moz.build
+++ b/gfx/angle/targets/libEGL/moz.build
@@ -28,16 +28,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -63,36 +64,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -144,15 +158,16 @@ OS_LIBS += [
 #    '/DYNAMICBASE',
 #    '/fastfail',
 #    '/FIXED:NO',
 #    '/ignore:4199',
 #    '/ignore:4221',
 #    '/INCREMENTAL',
 #    '/MACHINE:X64',
 #    '/NXCOMPAT',
+#    '/pdbaltpath:%_PDB%',
 #    '/SUBSYSTEM:CONSOLE,5.02',
 #    '/WX',
 #]
 
 DEFFILE = '../../checkout/src/libEGL/libEGL.def'
 RCFILE = '../../checkout/src/libEGL/libEGL.rc'
 GeckoSharedLibrary('libEGL', linkage=None)
--- a/gfx/angle/targets/libGLESv2/moz.build
+++ b/gfx/angle/targets/libGLESv2/moz.build
@@ -32,16 +32,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -68,37 +69,50 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4530',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -162,15 +176,16 @@ OS_LIBS += [
 #    '/DYNAMICBASE',
 #    '/fastfail',
 #    '/FIXED:NO',
 #    '/ignore:4199',
 #    '/ignore:4221',
 #    '/INCREMENTAL',
 #    '/MACHINE:X64',
 #    '/NXCOMPAT',
+#    '/pdbaltpath:%_PDB%',
 #    '/SUBSYSTEM:CONSOLE,5.02',
 #    '/WX',
 #]
 
 DEFFILE = '../../checkout/src/libGLESv2/libGLESv2_autogen.def'
 RCFILE = '../../checkout/src/libGLESv2/libGLESv2.rc'
 GeckoSharedLibrary('libGLESv2', linkage=None)
--- a/gfx/angle/targets/preprocessor/moz.build
+++ b/gfx/angle/targets/preprocessor/moz.build
@@ -25,16 +25,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -61,36 +62,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
 #    '/we4838',
@@ -118,12 +132,13 @@ USE_LIBS += [
 ]
 
 DIRS += [
     '../angle_common',
 ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('preprocessor')
--- a/gfx/angle/targets/translator/moz.build
+++ b/gfx/angle/targets/translator/moz.build
@@ -28,16 +28,17 @@ DEFINES['UNICODE'] = True
 #DEFINES['WINAPI_FAMILY'] = 'WINAPI_FAMILY_DESKTOP_APP'
 #DEFINES['WINVER'] = '0x0A00'
 #DEFINES['WTF_USE_DYNAMIC_ANNOTATIONS'] = '1'
 DEFINES['_ATL_NO_OPENGL'] = True
 DEFINES['_CRT_RAND_S'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 #DEFINES['_DEBUG'] = True
 DEFINES['_HAS_EXCEPTIONS'] = '0'
+#DEFINES['_HAS_ITERATOR_DEBUGGING'] = '0'
 DEFINES['_SCL_SECURE_NO_DEPRECATE'] = True
 DEFINES['_SECURE_ATL'] = True
 DEFINES['_UNICODE'] = True
 #DEFINES['_USING_V110_SDK71_'] = True
 #DEFINES['_WIN32_WINNT'] = '0x0A00'
 #DEFINES['_WINDOWS'] = True
 #DEFINES['__STD_C'] = True
 
@@ -64,36 +65,49 @@ LOCAL_INCLUDES += [
 #    '/TP',
 #    '/utf-8',
 #    '/W4',
 #    '/wd4091',
 #    '/wd4100',
 #    '/wd4117',
 #    '/wd4121',
 #    '/wd4127',
+#    '/wd4200',
+#    '/wd4201',
+#    '/wd4204',
+#    '/wd4221',
 #    '/wd4244',
+#    '/wd4245',
 #    '/wd4251',
+#    '/wd4267',
 #    '/wd4275',
+#    '/wd4305',
 #    '/wd4312',
 #    '/wd4324',
 #    '/wd4351',
 #    '/wd4355',
+#    '/wd4389',
 #    '/wd4456',
 #    '/wd4457',
 #    '/wd4458',
 #    '/wd4459',
 #    '/wd4503',
 #    '/wd4505',
 #    '/wd4510',
 #    '/wd4512',
 #    '/wd4577',
 #    '/wd4589',
 #    '/wd4610',
 #    '/wd4611',
+#    '/wd4661',
+#    '/wd4701',
 #    '/wd4702',
+#    '/wd4703',
+#    '/wd4706',
+#    '/wd4715',
 #    '/wd4718',
 #    '/wd4838',
 #    '/wd4995',
 #    '/wd4996',
 #    '/we4244',
 #    '/we4456',
 #    '/we4458',
 #    '/we4800',
@@ -227,12 +241,13 @@ USE_LIBS += [
 
 DIRS += [
     '../angle_common',
     '../preprocessor',
 ]
 
 #LDFLAGS += [
 #    '/DEBUG',
+#    '/pdbaltpath:%_PDB%',
 #    '/WX',
 #]
 
 Library('translator')
--- a/gfx/angle/update-angle.py
+++ b/gfx/angle/update-angle.py
@@ -229,16 +229,17 @@ IGNORED_INCLUDES = {
     'libANGLE/renderer/gl/cgl/DisplayCGL.h',
     'libANGLE/renderer/gl/egl/ozone/DisplayOzone.h',
     'libANGLE/renderer/gl/egl/android/DisplayAndroid.h',
     'libANGLE/renderer/gl/wgl/DisplayWGL.h',
     'libANGLE/renderer/null/DisplayNULL.h',
     'libANGLE/renderer/vulkan/android/DisplayVkAndroid.h',
     'libANGLE/renderer/vulkan/win32/DisplayVkWin32.h',
     'libANGLE/renderer/vulkan/xcb/DisplayVkXcb.h',
+    'kernel/image.h',
 }
 
 IGNORED_INCLUDE_PREFIXES = {
     'android/',
     'Carbon/',
     'CoreFoundation/',
     'CoreServices/',
     'IOSurface/',
@@ -297,16 +298,17 @@ REGISTERED_DEFINES = {
     'WINAPI_FAMILY': False,
     'WINVER': False,
     'WTF_USE_DYNAMIC_ANNOTATIONS': False,
     '_ATL_NO_OPENGL': True,
     '_CRT_RAND_S': True,
     '_CRT_SECURE_NO_DEPRECATE': True,
     '_DEBUG': False,
     '_HAS_EXCEPTIONS': True,
+    '_HAS_ITERATOR_DEBUGGING': False,
     '_SCL_SECURE_NO_DEPRECATE': True,
     '_SECURE_ATL': True,
     '_UNICODE': True,
     '_USING_V110_SDK71_': False,
     '_WIN32_WINNT': False,
     '_WINDOWS': False,
     '__STD_C': False,
 }
@@ -475,17 +477,17 @@ def export_target(root):
             yield '../../checkout/' + x[2:]
 
     sources_by_config = {}
     extras = dict()
     for x in fixup_paths(accum_desc['sources']):
         (b, e) = x.rsplit('.', 1)
         if e in ['h', 'y', 'l', 'inc', 'inl']:
             continue
-        elif e in ['cpp', 'cc']:
+        elif e in ['cpp', 'cc', 'c']:
             if b.endswith('_win'):
                 config = "CONFIG['OS_ARCH'] == 'WINNT'"
             elif b.endswith('_linux'):
                 # Include these on BSDs too.
                 config = "CONFIG['OS_ARCH'] not in ('Darwin', 'WINNT')"
             elif b.endswith('_mac'):
                 config = "CONFIG['OS_ARCH'] == 'Darwin'"
             else:
--- a/js/src/builtin/DataViewObject.cpp
+++ b/js/src/builtin/DataViewObject.cpp
@@ -928,17 +928,17 @@ JS_FRIEND_API uint32_t JS_GetDataViewByt
     return 0;
   }
   return obj->as<DataViewObject>().byteLength();
 }
 
 JS_FRIEND_API JSObject* JS_NewDataView(JSContext* cx, HandleObject buffer,
                                        uint32_t byteOffset,
                                        int32_t byteLength) {
-  JSProtoKey key = JSCLASS_CACHED_PROTO_KEY(&DataViewObject::class_);
+  JSProtoKey key = JSProto_DataView;
   RootedObject constructor(cx, GlobalObject::getOrCreateConstructor(cx, key));
   if (!constructor) {
     return nullptr;
   }
 
   FixedConstructArgs<3> cargs(cx);
 
   cargs[0].setObject(*buffer);
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -2168,17 +2168,17 @@ static bool FinishObjectClassInit(JSCont
    * Eventually we'd like to have standard classes be there from the start,
    * and thus we would know we were always setting what had previously been a
    * null [[Prototype]], but right now some code assumes it can set the
    * [[Prototype]] before standard classes have been initialized.  For now,
    * only set the [[Prototype]] if it hasn't already been set.
    */
   Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
   if (global->shouldSplicePrototype()) {
-    if (!JSObject::splicePrototype(cx, global, global->getClass(), tagged)) {
+    if (!JSObject::splicePrototype(cx, global, tagged)) {
       return false;
     }
   }
   return true;
 }
 
 static const ClassSpec PlainObjectClassSpec = {
     CreateObjectConstructor, CreateObjectPrototype,
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -7279,60 +7279,53 @@ GCRuntime::IncrementalResult GCRuntime::
 
   if (resetReason != AbortReason::None) {
     return resetIncrementalGC(resetReason);
   }
 
   return IncrementalResult::Ok;
 }
 
-namespace {
-
-class AutoScheduleZonesForGC {
-  JSRuntime* rt_;
-
- public:
-  explicit AutoScheduleZonesForGC(GCRuntime* gc) : rt_(gc->rt) {
-    for (ZonesIter zone(rt_, WithAtoms); !zone.done(); zone.next()) {
-      if (!zone->canCollect()) {
-        continue;
-      }
-
-      if (gc->gcMode() == JSGC_MODE_GLOBAL) {
-        zone->scheduleGC();
-      }
-
-      // To avoid resets, continue to collect any zones that were being
-      // collected in a previous slice.
-      if (gc->isIncrementalGCInProgress() && zone->wasGCStarted()) {
-        zone->scheduleGC();
-      }
-
-      // This is a heuristic to reduce the total number of collections.
-      bool inHighFrequencyMode = gc->schedulingState.inHighFrequencyGCMode();
-      if (zone->zoneSize.gcBytes() >=
-          zone->threshold.eagerAllocTrigger(inHighFrequencyMode)) {
-        zone->scheduleGC();
-      }
-
-      // This ensures we collect zones that have reached the malloc limit.
-      if (zone->shouldTriggerGCForTooMuchMalloc()) {
-        zone->scheduleGC();
-      }
-    }
-  }
-
-  ~AutoScheduleZonesForGC() {
-    for (ZonesIter zone(rt_, WithAtoms); !zone.done(); zone.next()) {
-      zone->unscheduleGC();
-    }
-  }
-};
-
-} /* anonymous namespace */
+static void ScheduleZones(GCRuntime* gc) {
+  JSRuntime* rt = gc->rt;
+
+  for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
+    if (!zone->canCollect()) {
+      continue;
+    }
+
+    if (gc->gcMode() == JSGC_MODE_GLOBAL) {
+      zone->scheduleGC();
+    }
+
+    // To avoid resets, continue to collect any zones that were being
+    // collected in a previous slice.
+    if (gc->isIncrementalGCInProgress() && zone->wasGCStarted()) {
+      zone->scheduleGC();
+    }
+
+    // This is a heuristic to reduce the total number of collections.
+    bool inHighFrequencyMode = gc->schedulingState.inHighFrequencyGCMode();
+    if (zone->zoneSize.gcBytes() >=
+        zone->threshold.eagerAllocTrigger(inHighFrequencyMode)) {
+      zone->scheduleGC();
+    }
+
+    // This ensures we collect zones that have reached the malloc limit.
+    if (zone->shouldTriggerGCForTooMuchMalloc()) {
+      zone->scheduleGC();
+    }
+  }
+}
+
+static void UnScheduleZones(GCRuntime* gc) {
+  for (ZonesIter zone(gc->rt, WithAtoms); !zone.done(); zone.next()) {
+    zone->unscheduleGC();
+  }
+}
 
 class js::gc::AutoCallGCCallbacks {
   GCRuntime& gc_;
 
  public:
   explicit AutoCallGCCallbacks(GCRuntime& gc) : gc_(gc) {
     gc_.maybeCallGCCallback(JSGC_BEGIN);
   }
@@ -7382,16 +7375,17 @@ MOZ_NEVER_INLINE GCRuntime::IncrementalR
 
   // It's ok if threads other than the main thread have suppressGC set, as
   // they are operating on zones which will not be collected from here.
   MOZ_ASSERT(!rt->mainContextFromOwnThread()->suppressGC);
 
   // Note that GC callbacks are allowed to re-enter GC.
   AutoCallGCCallbacks callCallbacks(*this);
 
+  ScheduleZones(this);
   gcstats::AutoGCSlice agc(stats(), scanZonesBeforeGC(), invocationKind, budget,
                            reason);
 
   auto result = budgetIncrementalGC(nonincrementalByAPI, reason, budget);
   if (result == IncrementalResult::ResetIncremental) {
     reason = JS::GCReason::RESET;
   }
 
@@ -7590,17 +7584,16 @@ void GCRuntime::collect(bool nonincremen
   }
 
   stats().writeLogMessage("GC starting in state %s",
                           StateName(incrementalState));
 
   AutoTraceLog logGC(TraceLoggerForCurrentThread(), TraceLogger_GC);
   AutoStopVerifyingBarriers av(rt, IsShutdownGC(reason));
   AutoEnqueuePendingParseTasksAfterGC aept(*this);
-  AutoScheduleZonesForGC asz(this);
 
   bool repeat;
   do {
     IncrementalResult cycleResult =
         gcCycle(nonincrementalByAPI, budget, reason);
 
     if (reason == JS::GCReason::ABORT_GC) {
       MOZ_ASSERT(!isIncrementalGCInProgress());
@@ -7650,16 +7643,18 @@ void GCRuntime::collect(bool nonincremen
     gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::TRACE_HEAP);
     CheckHeapAfterGC(rt);
   }
   if (hasZealMode(ZealMode::CheckGrayMarking) && !isIncrementalGCInProgress()) {
     MOZ_RELEASE_ASSERT(CheckGrayMarkingState(rt));
   }
 #endif
   stats().writeLogMessage("GC ending in state %s", StateName(incrementalState));
+
+  UnScheduleZones(this);
 }
 
 js::AutoEnqueuePendingParseTasksAfterGC::
     ~AutoEnqueuePendingParseTasksAfterGC() {
   if (!OffThreadParsingMustWaitForGC(gc_.rt)) {
     EnqueuePendingParseTasksAfterGC(gc_.rt);
   }
 }
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -3289,18 +3289,17 @@ static bool TryAttachFunCallStub(JSConte
     return true;
   }
 
   return true;
 }
 
 static bool GetTemplateObjectForNative(JSContext* cx, HandleFunction target,
                                        const CallArgs& args,
-                                       MutableHandleObject res,
-                                       bool* skipAttach) {
+                                       MutableHandleObject res) {
   Native native = target->native();
 
   // Check for natives to which template objects can be attached. This is
   // done to provide templates to Ion for inlining these natives later on.
 
   if (native == ArrayConstructor || native == array_construct) {
     // Note: the template array won't be used if its length is inaccurately
     // computed here.  (We allocate here because compilation may occur on a
@@ -3309,26 +3308,16 @@ static bool GetTemplateObjectForNative(J
     if (args.length() != 1) {
       count = args.length();
     } else if (args.length() == 1 && args[0].isInt32() &&
                args[0].toInt32() >= 0) {
       count = args[0].toInt32();
     }
 
     if (count <= ArrayObject::EagerAllocationMaxLength) {
-      ObjectGroup* group =
-          ObjectGroup::callingAllocationSiteGroup(cx, JSProto_Array);
-      if (!group) {
-        return false;
-      }
-      if (group->maybePreliminaryObjectsDontCheckGeneration()) {
-        *skipAttach = true;
-        return true;
-      }
-
       // With this and other array templates, analyze the group so that
       // we don't end up with a template whose structure might change later.
       res.set(NewFullyAllocatedArrayForCallingAllocationSite(cx, count,
                                                              TenuredObject));
       return !!res;
     }
   }
 
@@ -3346,20 +3335,16 @@ static bool GetTemplateObjectForNative(J
       return true;
     }
   }
 
   if (native == js::array_slice) {
     if (args.thisv().isObject()) {
       RootedObject obj(cx, &args.thisv().toObject());
       if (!obj->isSingleton()) {
-        if (obj->group()->maybePreliminaryObjectsDontCheckGeneration()) {
-          *skipAttach = true;
-          return true;
-        }
         res.set(NewFullyAllocatedArrayTryReuseGroup(cx, obj, 0, TenuredObject));
         return !!res;
       }
     }
   }
 
   if (native == StringConstructor) {
     RootedString emptyString(cx, cx->runtime()->emptyString);
@@ -3689,26 +3674,20 @@ static bool TryAttachCallStub(JSContext*
               "  Megamorphic Call_Native stubs. TODO: add Call_AnyNative!");
       return true;
     }
 
     bool isCrossRealm = cx->realm() != fun->realm();
 
     RootedObject templateObject(cx);
     if (MOZ_LIKELY(!isSpread && !isSuper && !isCrossRealm)) {
-      bool skipAttach = false;
       CallArgs args = CallArgsFromVp(argc, vp);
-      if (!GetTemplateObjectForNative(cx, fun, args, &templateObject,
-                                      &skipAttach)) {
+      if (!GetTemplateObjectForNative(cx, fun, args, &templateObject)) {
         return false;
       }
-      if (skipAttach) {
-        *handled = true;
-        return true;
-      }
       MOZ_ASSERT_IF(templateObject,
                     !templateObject->group()
                          ->maybePreliminaryObjectsDontCheckGeneration());
     }
 
     bool ignoresReturnValue =
         op == JSOP_CALL_IGNORES_RV && fun->isNative() && fun->hasJitInfo() &&
         fun->jitInfo()->type() == JSJitInfo::IgnoresReturnValueNative;
@@ -6067,18 +6046,17 @@ static bool DoNewArray(JSContext* cx, Ba
     RootedScript script(cx, frame->script());
     jsbytecode* pc = stub->icEntry()->pc(script);
 
     obj = NewArrayOperation(cx, script, pc, length);
     if (!obj) {
       return false;
     }
 
-    if (!obj->isSingleton() &&
-        !obj->group()->maybePreliminaryObjectsDontCheckGeneration()) {
+    if (!obj->isSingleton()) {
       JSObject* templateObject =
           NewArrayOperation(cx, script, pc, length, TenuredObject);
       if (!templateObject) {
         return false;
       }
       stub->setTemplateObject(templateObject);
     }
   }
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -4976,22 +4976,16 @@ bool CallIRGenerator::tryAttachArrayPush
   }
 
   if (thisobj->hasLazyGroup()) {
     return false;
   }
 
   RootedArrayObject thisarray(cx_, &thisobj->as<ArrayObject>());
 
-  // And the object group for the array is not collecting preliminary objects.
-  AutoSweepObjectGroup sweep(thisobj->group());
-  if (thisobj->group()->maybePreliminaryObjects(sweep)) {
-    return false;
-  }
-
   // Check for other indexed properties or class hooks.
   if (!CanAttachAddElement(thisarray, /* isInit = */ false)) {
     return false;
   }
 
   // Can't add new elements to arrays with non-writable length.
   if (!thisarray->lengthIsWritable()) {
     return false;
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -1836,20 +1836,16 @@ IonBuilder::InliningResult IonBuilder::i
     return resultConstStringSplit;
   }
 
   JSContext* cx = TlsContext.get();
   ObjectGroup* group = ObjectGroupRealm::getStringSplitStringGroup(cx);
   if (!group) {
     return InliningStatus_NotInlined;
   }
-  AutoSweepObjectGroup sweep(group);
-  if (group->maybePreliminaryObjects(sweep)) {
-    return InliningStatus_NotInlined;
-  }
 
   TypeSet::ObjectKey* retKey = TypeSet::ObjectKey::get(group);
   if (retKey->unknownProperties()) {
     return InliningStatus_NotInlined;
   }
 
   HeapTypeSetKey key = retKey->property(JSID_VOID);
   if (!key.maybeTypes()) {
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -114,17 +114,17 @@ JS_FRIEND_API bool JS_SplicePrototype(JS
     /*
      * We can see non-singleton objects when trying to splice prototypes
      * due to mutable __proto__ (ugh).
      */
     return JS_SetPrototype(cx, obj, proto);
   }
 
   Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
-  return JSObject::splicePrototype(cx, obj, obj->getClass(), tagged);
+  return JSObject::splicePrototype(cx, obj, tagged);
 }
 
 JS_FRIEND_API JSObject* JS_NewObjectWithUniqueType(JSContext* cx,
                                                    const JSClass* clasp,
                                                    HandleObject proto) {
   /*
    * Create our object with a null proto and then splice in the correct proto
    * after we setSingleton, so that we don't pollute the default
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -272,16 +272,21 @@ class GlobalObject : public NativeObject
 
  public:
   static GlobalObject* new_(JSContext* cx, const Class* clasp,
                             JSPrincipals* principals,
                             JS::OnNewGlobalHookOption hookOption,
                             const JS::RealmOptions& options);
 
   /*
+   * For bootstrapping, whether to splice a prototype for the global object.
+   */
+  bool shouldSplicePrototype();
+
+  /*
    * Create a constructor function with the specified name and length using
    * ctor, a method which creates objects with the given class.
    */
   static JSFunction* createConstructor(
       JSContext* cx, JSNative ctor, JSAtom* name, unsigned length,
       gc::AllocKind kind = gc::AllocKind::FUNCTION,
       const JSJitInfo* jitInfo = nullptr);
 
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -5228,23 +5228,19 @@ JSObject* js::NewArrayOperation(JSContex
   RootedObjectGroup group(cx);
   if (ObjectGroup::useSingletonForAllocationSite(script, pc, JSProto_Array)) {
     newKind = SingletonObject;
   } else {
     group = ObjectGroup::allocationSiteGroup(cx, script, pc, JSProto_Array);
     if (!group) {
       return nullptr;
     }
+
     AutoSweepObjectGroup sweep(group);
-    if (group->maybePreliminaryObjects(sweep)) {
-      group->maybePreliminaryObjects(sweep)->maybeAnalyze(cx, group);
-    }
-
-    if (group->shouldPreTenure(sweep) ||
-        group->maybePreliminaryObjects(sweep)) {
+    if (group->shouldPreTenure(sweep)) {
       newKind = TenuredObject;
     }
   }
 
   ArrayObject* obj = NewDenseFullyAllocatedArray(cx, length, nullptr, newKind);
   if (!obj) {
     return nullptr;
   }
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -996,18 +996,18 @@ JSObject* js::NewObjectWithGroupCommon(J
   return obj;
 }
 
 bool js::NewObjectScriptedCall(JSContext* cx, MutableHandleObject pobj) {
   jsbytecode* pc;
   RootedScript script(cx, cx->currentScript(&pc));
   gc::AllocKind allocKind = NewObjectGCKind(&PlainObject::class_);
   NewObjectKind newKind = GenericObject;
-  if (script && ObjectGroup::useSingletonForAllocationSite(
-                    script, pc, &PlainObject::class_)) {
+  if (script &&
+      ObjectGroup::useSingletonForAllocationSite(script, pc, JSProto_Object)) {
     newKind = SingletonObject;
   }
   RootedObject obj(
       cx, NewBuiltinClassInstance<PlainObject>(cx, allocKind, newKind));
   if (!obj) {
     return false;
   }
 
@@ -1061,17 +1061,17 @@ static inline JSObject* CreateThisForFun
                             CopyInitializerObject(cx, templateObject, newKind));
       if (!res) {
         return nullptr;
       }
 
       if (newKind == SingletonObject) {
         Rooted<TaggedProto> proto(
             cx, TaggedProto(templateObject->staticPrototype()));
-        if (!JSObject::splicePrototype(cx, res, &PlainObject::class_, proto)) {
+        if (!JSObject::splicePrototype(cx, res, proto)) {
           return nullptr;
         }
       } else {
         res->setGroup(group);
       }
       return res;
     }
 
@@ -2108,17 +2108,17 @@ static NativeObject* DefineConstructorAn
     ctor = fun;
     if (!LinkConstructorAndPrototype(cx, ctor, proto)) {
       goto bad;
     }
 
     /* Bootstrap Function.prototype (see also JS_InitStandardClasses). */
     Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
     if (ctor->getClass() == clasp &&
-        !JSObject::splicePrototype(cx, ctor, clasp, tagged)) {
+        !JSObject::splicePrototype(cx, ctor, tagged)) {
       goto bad;
     }
   }
 
   if (!DefinePropertiesAndFunctions(cx, proto, ps, fs) ||
       (ctor != proto &&
        !DefinePropertiesAndFunctions(cx, ctor, static_ps, static_fs))) {
     goto bad;
@@ -2251,19 +2251,18 @@ static bool ReshapeForProtoMutation(JSCo
     }
 
     pobj = pobj->staticPrototype();
   }
 
   return true;
 }
 
-static bool SetClassAndProto(JSContext* cx, HandleObject obj,
-                             const Class* clasp,
-                             Handle<js::TaggedProto> proto) {
+static bool SetProto(JSContext* cx, HandleObject obj,
+                     Handle<js::TaggedProto> proto) {
   // Regenerate object shape (and possibly prototype shape) to invalidate JIT
   // code that is affected by a prototype mutation.
   if (!ReshapeForProtoMutation(cx, obj)) {
     return false;
   }
 
   if (proto.isObject()) {
     RootedObject protoObj(cx, proto.toObject());
@@ -2272,17 +2271,17 @@ static bool SetClassAndProto(JSContext* 
     }
   }
 
   if (obj->isSingleton()) {
     /*
      * Just splice the prototype, but mark the properties as unknown for
      * consistent behavior.
      */
-    if (!JSObject::splicePrototype(cx, obj, clasp, proto)) {
+    if (!JSObject::splicePrototype(cx, obj, proto)) {
       return false;
     }
     MarkObjectGroupUnknownProperties(cx, obj->group());
     return true;
   }
 
   RootedObjectGroup oldGroup(cx, obj->group());
 
@@ -2294,17 +2293,17 @@ static bool SetClassAndProto(JSContext* 
     MOZ_ASSERT(obj->is<JSFunction>());
     newGroup = ObjectGroupRealm::makeGroup(cx, oldGroup->realm(),
                                            &JSFunction::class_, proto);
     if (!newGroup) {
       return false;
     }
     newGroup->setInterpretedFunction(oldGroup->maybeInterpretedFunction());
   } else {
-    newGroup = ObjectGroup::defaultNewGroup(cx, clasp, proto);
+    newGroup = ObjectGroup::defaultNewGroup(cx, obj->getClass(), proto);
     if (!newGroup) {
       return false;
     }
   }
 
   obj->setGroup(newGroup);
 
   // Add the object's property types to the new group.
@@ -2940,17 +2939,17 @@ bool js::SetPrototype(JSContext* cx, Han
 
   // Convert unboxed objects to their native representations before changing
   // their prototype/group, as they depend on the group for their layout.
   if (!MaybeConvertUnboxedObjectToNative(cx, obj)) {
     return false;
   }
 
   Rooted<TaggedProto> taggedProto(cx, TaggedProto(proto));
-  if (!SetClassAndProto(cx, obj, obj->getClass(), taggedProto)) {
+  if (!SetProto(cx, obj, taggedProto)) {
     return false;
   }
 
   return result.succeed();
 }
 
 bool js::SetPrototype(JSContext* cx, HandleObject obj, HandleObject proto) {
   ObjectOpResult result;
--- a/js/src/vm/JSObject.h
+++ b/js/src/vm/JSObject.h
@@ -387,26 +387,19 @@ class JSObject : public js::gc::Cell {
    * properties.
    */
   inline bool isNewGroupUnknown() const;
   static bool setNewGroupUnknown(JSContext* cx, js::ObjectGroupRealm& realm,
                                  const js::Class* clasp, JS::HandleObject obj);
 
   /* Set a new prototype for an object with a singleton type. */
   static bool splicePrototype(JSContext* cx, js::HandleObject obj,
-                              const js::Class* clasp,
                               js::Handle<js::TaggedProto> proto);
 
   /*
-   * For bootstrapping, whether to splice a prototype for Function.prototype
-   * or the global object.
-   */
-  bool shouldSplicePrototype();
-
-  /*
    * Environment chains.
    *
    * The environment chain of an object is the link in the search path when
    * a script does a name lookup on an environment object. For JS internal
    * environment objects --- Call, LexicalEnvironment, and WithEnvironment
    * --- the chain is stored in the first fixed slot of the object.  For
    * other environment objects, the chain goes directly to the global.
    *
--- a/js/src/vm/ObjectGroup.cpp
+++ b/js/src/vm/ObjectGroup.cpp
@@ -14,16 +14,17 @@
 #include "builtin/DataViewObject.h"
 #include "gc/FreeOp.h"
 #include "gc/HashUtil.h"
 #include "gc/Policy.h"
 #include "gc/StoreBuffer.h"
 #include "js/CharacterEncoding.h"
 #include "js/UniquePtr.h"
 #include "vm/ArrayObject.h"
+#include "vm/GlobalObject.h"
 #include "vm/JSObject.h"
 #include "vm/RegExpObject.h"
 #include "vm/Shape.h"
 #include "vm/TaggedProto.h"
 
 #include "gc/Marking-inl.h"
 #include "vm/TypeInference-inl.h"
 #include "vm/UnboxedObject-inl.h"
@@ -236,54 +237,45 @@ void ObjectGroup::setAddendum(AddendumKi
     if (tn.start <= offset && offset < tn.start + tn.length) {
       return GenericObject;
     }
   }
 
   return SingletonObject;
 }
 
-/* static */ bool ObjectGroup::useSingletonForAllocationSite(
-    JSScript* script, jsbytecode* pc, const Class* clasp) {
-  return useSingletonForAllocationSite(script, pc,
-                                       JSCLASS_CACHED_PROTO_KEY(clasp));
-}
-
 /////////////////////////////////////////////////////////////////////
 // JSObject
 /////////////////////////////////////////////////////////////////////
 
-bool JSObject::shouldSplicePrototype() {
-  /*
-   * During bootstrapping, if inference is enabled we need to make sure not
-   * to splice a new prototype in for Function.prototype or the global
-   * object if their __proto__ had previously been set to null, as this
-   * will change the prototype for all other objects with the same type.
-   */
-  if (staticPrototype() != nullptr) {
-    return false;
-  }
-  return isSingleton();
+bool GlobalObject::shouldSplicePrototype() {
+  // During bootstrapping, we need to make sure not to splice a new prototype in
+  // for the global object if its __proto__ had previously been set to non-null,
+  // as this will change the prototype for all other objects with the same type.
+  return staticPrototype() == nullptr;
 }
 
 /* static */ bool JSObject::splicePrototype(JSContext* cx, HandleObject obj,
-                                            const Class* clasp,
                                             Handle<TaggedProto> proto) {
   MOZ_ASSERT(cx->compartment() == obj->compartment());
 
   /*
    * For singleton groups representing only a single JSObject, the proto
    * can be rearranged as needed without destroying type information for
    * the old or new types.
    */
   MOZ_ASSERT(obj->isSingleton());
 
   // Windows may not appear on prototype chains.
   MOZ_ASSERT_IF(proto.isObject(), !IsWindow(proto.toObject()));
 
+#ifdef DEBUG
+  const Class* oldClass = obj->getClass();
+#endif
+
   if (proto.isObject()) {
     RootedObject protoObj(cx, proto.toObject());
     if (!JSObject::setDelegate(cx, protoObj)) {
       return false;
     }
   }
 
   // Force type instantiation when splicing lazy group.
@@ -295,17 +287,18 @@ bool JSObject::shouldSplicePrototype() {
   if (proto.isObject()) {
     RootedObject protoObj(cx, proto.toObject());
     protoGroup = JSObject::getGroup(cx, protoObj);
     if (!protoGroup) {
       return false;
     }
   }
 
-  group->setClasp(clasp);
+  MOZ_ASSERT(group->clasp() == oldClass,
+             "splicing a prototype doesn't change a group's class");
   group->setProto(proto);
   return true;
 }
 
 /* static */ ObjectGroup* JSObject::makeLazyGroup(JSContext* cx,
                                                   HandleObject obj) {
   MOZ_ASSERT(obj->hasLazyGroup());
   MOZ_ASSERT(cx->compartment() == obj->compartment());
@@ -721,48 +714,29 @@ MOZ_ALWAYS_INLINE ObjectGroup* ObjectGro
 inline const Class* GetClassForProtoKey(JSProtoKey key) {
   switch (key) {
     case JSProto_Null:
     case JSProto_Object:
       return &PlainObject::class_;
     case JSProto_Array:
       return &ArrayObject::class_;
 
-    case JSProto_Number:
-      return &NumberObject::class_;
-    case JSProto_Boolean:
-      return &BooleanObject::class_;
-    case JSProto_String:
-      return &StringObject::class_;
-    case JSProto_Symbol:
-      return &SymbolObject::class_;
-    case JSProto_RegExp:
-      return &RegExpObject::class_;
-
     case JSProto_Int8Array:
     case JSProto_Uint8Array:
     case JSProto_Int16Array:
     case JSProto_Uint16Array:
     case JSProto_Int32Array:
     case JSProto_Uint32Array:
     case JSProto_Float32Array:
     case JSProto_Float64Array:
     case JSProto_Uint8ClampedArray:
       return &TypedArrayObject::classes[key - JSProto_Int8Array];
 
-    case JSProto_ArrayBuffer:
-      return &ArrayBufferObject::class_;
-
-    case JSProto_SharedArrayBuffer:
-      return &SharedArrayBufferObject::class_;
-
-    case JSProto_DataView:
-      return &DataViewObject::class_;
-
     default:
+      // We only expect to see plain objects, arrays, and typed arrays here.
       MOZ_CRASH("Bad proto key");
   }
 }
 
 /* static */ ObjectGroup* ObjectGroup::defaultNewGroup(JSContext* cx,
                                                        JSProtoKey key) {
   JSObject* proto = nullptr;
   if (key != JSProto_Null) {
@@ -1759,25 +1733,23 @@ ObjectGroup* ObjectGroupRealm::getString
   ObjectGroup* group = groups.stringSplitStringGroup.get();
   if (group) {
     return group;
   }
 
   // The following code is a specialized version of the code
   // for ObjectGroup::allocationSiteGroup().
 
-  const Class* clasp = GetClassForProtoKey(JSProto_Array);
-
   JSObject* proto = GlobalObject::getOrCreateArrayPrototype(cx, cx->global());
   if (!proto) {
     return nullptr;
   }
   Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
 
-  group = makeGroup(cx, cx->realm(), clasp, tagged, /* initialFlags = */ 0);
+  group = makeGroup(cx, cx->realm(), &ArrayObject::class_, tagged);
   if (!group) {
     return nullptr;
   }
 
   groups.stringSplitStringGroup.set(group);
   return group;
 }
 
--- a/js/src/vm/ObjectGroup.h
+++ b/js/src/vm/ObjectGroup.h
@@ -516,18 +516,16 @@ class ObjectGroup : public gc::TenuredCe
 
   // Whether to make a singleton when calling 'new' at script/pc.
   static bool useSingletonForNewObject(JSContext* cx, JSScript* script,
                                        jsbytecode* pc);
 
   // Whether to make a singleton object at an allocation site.
   static bool useSingletonForAllocationSite(JSScript* script, jsbytecode* pc,
                                             JSProtoKey key);
-  static bool useSingletonForAllocationSite(JSScript* script, jsbytecode* pc,
-                                            const Class* clasp);
 
   // Static accessors for ObjectGroupRealm NewTable.
 
   static ObjectGroup* defaultNewGroup(JSContext* cx, const Class* clasp,
                                       TaggedProto proto,
                                       JSObject* associated = nullptr);
   static ObjectGroup* lazySingletonGroup(JSContext* cx, ObjectGroup* oldGroup,
                                          const Class* clasp, TaggedProto proto);
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -358,57 +358,54 @@ class TypedArrayObjectTemplate : public 
       setIndex(tarray, index, NativeType(d));
     } else {
       MOZ_ASSERT(sizeof(NativeType) <= 4);
       int32_t n = ToInt32(d);
       setIndex(tarray, index, NativeType(n));
     }
   }
 
+  static TypedArrayObject* newBuiltinClassInstance(JSContext* cx,
+                                                   gc::AllocKind allocKind,
+                                                   NewObjectKind newKind) {
+    JSObject* obj =
+        NewBuiltinClassInstance(cx, instanceClass(), allocKind, newKind);
+    return obj ? &obj->as<TypedArrayObject>() : nullptr;
+  }
+
   static TypedArrayObject* makeProtoInstance(JSContext* cx, HandleObject proto,
                                              gc::AllocKind allocKind) {
     MOZ_ASSERT(proto);
 
     JSObject* obj =
         NewObjectWithGivenProto(cx, instanceClass(), proto, allocKind);
     return obj ? &obj->as<TypedArrayObject>() : nullptr;
   }
 
   static TypedArrayObject* makeTypedInstance(JSContext* cx,
                                              CreateSingleton createSingleton,
                                              gc::AllocKind allocKind) {
-    const Class* clasp = instanceClass();
     if (createSingleton == CreateSingleton::Yes) {
-      JSObject* obj =
-          NewBuiltinClassInstance(cx, clasp, allocKind, SingletonObject);
-      if (!obj) {
-        return nullptr;
-      }
-      return &obj->as<TypedArrayObject>();
+      return newBuiltinClassInstance(cx, allocKind, SingletonObject);
     }
 
     jsbytecode* pc;
     RootedScript script(cx, cx->currentScript(&pc));
-    NewObjectKind newKind = GenericObject;
-    if (script &&
-        ObjectGroup::useSingletonForAllocationSite(script, pc, clasp)) {
-      newKind = SingletonObject;
-    }
-    RootedObject obj(cx,
-                     NewBuiltinClassInstance(cx, clasp, allocKind, newKind));
+    Rooted<TypedArrayObject*> obj(
+        cx, newBuiltinClassInstance(cx, allocKind, GenericObject));
     if (!obj) {
       return nullptr;
     }
 
     if (script && !ObjectGroup::setAllocationSiteObjectGroup(
-                      cx, script, pc, obj, newKind == SingletonObject)) {
+                      cx, script, pc, obj, /* singleton = */ false)) {
       return nullptr;
     }
 
-    return &obj->as<TypedArrayObject>();
+    return obj;
   }
 
   static TypedArrayObject* makeInstance(
       JSContext* cx, Handle<ArrayBufferObjectMaybeShared*> buffer,
       CreateSingleton createSingleton, uint32_t byteOffset, uint32_t len,
       HandleObject proto) {
     MOZ_ASSERT(len < INT32_MAX / BYTES_PER_ELEMENT);
 
@@ -416,18 +413,17 @@ class TypedArrayObjectTemplate : public 
         buffer ? gc::GetGCObjectKind(instanceClass())
                : AllocKindForLazyBuffer(len * BYTES_PER_ELEMENT);
 
     // Subclassing mandates that we hand in the proto every time. Most of
     // the time, though, that [[Prototype]] will not be interesting. If
     // it isn't, we can do some more TI optimizations.
     RootedObject checkProto(cx);
     if (proto) {
-      checkProto = GlobalObject::getOrCreatePrototype(
-          cx, JSCLASS_CACHED_PROTO_KEY(instanceClass()));
+      checkProto = GlobalObject::getOrCreatePrototype(cx, protoKey());
       if (!checkProto) {
         return nullptr;
       }
     }
 
     AutoSetNewObjectMetadata metadata(cx);
     Rooted<TypedArrayObject*> obj(cx);
     if (proto && proto != checkProto) {
@@ -442,44 +438,38 @@ class TypedArrayObjectTemplate : public 
     return obj;
   }
 
   static TypedArrayObject* makeTemplateObject(JSContext* cx, int32_t len) {
     MOZ_ASSERT(len >= 0);
     size_t nbytes;
     MOZ_ALWAYS_TRUE(CalculateAllocSize<NativeType>(len, &nbytes));
     MOZ_ASSERT(nbytes < TypedArrayObject::SINGLETON_BYTE_LENGTH);
-    NewObjectKind newKind = TenuredObject;
     bool fitsInline = nbytes <= INLINE_BUFFER_LIMIT;
-    const Class* clasp = instanceClass();
-    gc::AllocKind allocKind = !fitsInline ? gc::GetGCObjectKind(clasp)
+    gc::AllocKind allocKind = !fitsInline ? gc::GetGCObjectKind(instanceClass())
                                           : AllocKindForLazyBuffer(nbytes);
 
     AutoSetNewObjectMetadata metadata(cx);
     jsbytecode* pc;
     RootedScript script(cx, cx->currentScript(&pc));
-    if (script &&
-        ObjectGroup::useSingletonForAllocationSite(script, pc, clasp)) {
-      newKind = SingletonObject;
-    }
-    JSObject* tmp = NewBuiltinClassInstance(cx, clasp, allocKind, newKind);
-    if (!tmp) {
+    Rooted<TypedArrayObject*> tarray(
+        cx, newBuiltinClassInstance(cx, allocKind, TenuredObject));
+    if (!tarray) {
       return nullptr;
     }
 
-    Rooted<TypedArrayObject*> tarray(cx, &tmp->as<TypedArrayObject>());
     initTypedArraySlots(tarray, len);
 
     // Template objects do not need memory for its elements, since there
     // won't be any elements to store. Therefore, we set the pointer to
     // nullptr and avoid allocating memory that will never be used.
     tarray->initPrivate(nullptr);
 
     if (script && !ObjectGroup::setAllocationSiteObjectGroup(
-                      cx, script, pc, tarray, newKind == SingletonObject)) {
+                      cx, script, pc, tarray, /* singleton = */ false)) {
       return nullptr;
     }
 
     return tarray;
   }
 
   static void initTypedArraySlots(TypedArrayObject* tarray, int32_t len) {
     MOZ_ASSERT(len >= 0);
@@ -782,18 +772,17 @@ class TypedArrayObjectTemplate : public 
                                &length)) {
       return nullptr;
     }
 
     // Make sure to get the [[Prototype]] for the created typed array from
     // this compartment.
     RootedObject protoRoot(cx, proto);
     if (!protoRoot) {
-      protoRoot = GlobalObject::getOrCreatePrototype(
-          cx, JSCLASS_CACHED_PROTO_KEY(instanceClass()));
+      protoRoot = GlobalObject::getOrCreatePrototype(cx, protoKey());
       if (!protoRoot) {
         return nullptr;
       }
     }
 
     RootedObject typedArray(cx);
     {
       JSAutoRealm ar(cx, unwrappedBuffer);
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -1457,19 +1457,17 @@ bool js::TryConvertToUnboxedLayout(JSCon
                                       properties)) {
       return true;
     }
   }
 
   size_t layoutSize = 0;
   if (objectCount <= 1) {
     // If only one of the objects has been created, it is more likely
-    // to have new properties added later. This heuristic is not used
-    // for array objects, where we might want an unboxed representation
-    // even if there is only one large array.
+    // to have new properties added later.
     return true;
   }
 
   for (size_t i = 0; i < templateShape->slotSpan(); i++) {
     // We can't use an unboxed representation if e.g. all the objects have
     // a null value for one of the properties, as we can't decide what type
     // it is supposed to have.
     if (UnboxedTypeSize(properties[i].type) == 0) {
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -10110,31 +10110,43 @@ void nsIPresShell::SetVisualViewportSize
             GetRootScrollFrameAsScrollable()) {
       rootScrollFrame->MarkScrollbarsDirtyForReflow();
     }
     MarkFixedFramesForReflow(nsIPresShell::eResize);
 
     if (auto* window = nsGlobalWindowInner::Cast(mDocument->GetInnerWindow())) {
       window->VisualViewport()->PostResizeEvent();
     }
+
+    if (nsIScrollableFrame* rootScrollFrame =
+            GetRootScrollFrameAsScrollable()) {
+      ScrollAnchorContainer* container = rootScrollFrame->GetAnchor();
+      container->UserScrolled();
+    }
   }
 }
 
 bool nsIPresShell::SetVisualViewportOffset(
     const nsPoint& aScrollOffset, const nsPoint& aPrevLayoutScrollPos) {
   bool didChange = false;
   if (GetVisualViewportOffset() != aScrollOffset) {
     nsPoint prevOffset = GetVisualViewportOffset();
     mVisualViewportOffset = Some(aScrollOffset);
     didChange = true;
 
     if (auto* window = nsGlobalWindowInner::Cast(mDocument->GetInnerWindow())) {
       window->VisualViewport()->PostScrollEvent(prevOffset,
                                                 aPrevLayoutScrollPos);
     }
+
+    if (nsIScrollableFrame* rootScrollFrame =
+            GetRootScrollFrameAsScrollable()) {
+      ScrollAnchorContainer* container = rootScrollFrame->GetAnchor();
+      container->UserScrolled();
+    }
   }
   return didChange;
 }
 
 nsPoint nsIPresShell::GetVisualViewportOffsetRelativeToLayoutViewport() const {
   return GetVisualViewportOffset() - GetLayoutViewportOffset();
 }
 
--- a/layout/generic/ScrollAnchorContainer.cpp
+++ b/layout/generic/ScrollAnchorContainer.cpp
@@ -4,16 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ScrollAnchorContainer.h"
 
 #include "GeckoProfiler.h"
 #include "mozilla/dom/Text.h"
 #include "mozilla/StaticPrefs.h"
+#include "mozilla/ToString.h"
 #include "nsGfxScrollFrame.h"
 #include "nsLayoutUtils.h"
 
 #define ANCHOR_LOG(...)
 // #define ANCHOR_LOG(...) printf_stderr("ANCHOR: " __VA_ARGS__)
 
 namespace mozilla {
 namespace layout {
@@ -158,19 +159,19 @@ void ScrollAnchorContainer::SelectAnchor
   MOZ_ASSERT(mScrollFrame->mScrolledFrame);
   MOZ_ASSERT(mAnchorNodeIsDirty);
 
   if (!StaticPrefs::layout_css_scroll_anchoring_enabled()) {
     return;
   }
 
   AUTO_PROFILER_LABEL("ScrollAnchorContainer::SelectAnchor", LAYOUT);
-  ANCHOR_LOG("Selecting anchor for %p with scroll-port [%d %d x %d %d].\n",
-             this, mScrollFrame->mScrollPort.x, mScrollFrame->mScrollPort.y,
-             mScrollFrame->mScrollPort.width, mScrollFrame->mScrollPort.height);
+  ANCHOR_LOG(
+      "Selecting anchor for %p with scroll-port=%s.\n", this,
+      mozilla::ToString(mScrollFrame->GetVisualOptimalViewingRect()).c_str());
 
   const nsStyleDisplay* disp = Frame()->StyleDisplay();
 
   // Don't select a scroll anchor if the scroll frame has `overflow-anchor:
   // none`.
   bool overflowAnchor =
       disp->mOverflowAnchor == mozilla::StyleOverflowAnchor::Auto;
 
@@ -431,17 +432,18 @@ ScrollAnchorContainer::ExamineAnchorCand
              rect.height);
 
   // Check if this frame is visible in the scroll port. This will exclude rects
   // with zero sized area. The specification is ambiguous about this [1], but
   // this matches Blink's implementation.
   //
   // [1] https://github.com/w3c/csswg-drafts/issues/3483
   nsRect visibleRect;
-  if (!visibleRect.IntersectRect(rect, mScrollFrame->mScrollPort)) {
+  if (!visibleRect.IntersectRect(rect,
+                                 mScrollFrame->GetVisualOptimalViewingRect())) {
     return ExamineResult::Exclude;
   }
 
   // At this point, if canDescend is true, we should only have visible
   // non-anonymous frames that are either:
   //   1. block-outside
   //   2. text nodes
   //
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3978,16 +3978,27 @@ nsSize ScrollFrameHelper::GetVisualViewp
 nsPoint ScrollFrameHelper::GetVisualViewportOffset() const {
   nsIPresShell* presShell = mOuter->PresShell();
   if (mIsRoot && presShell->IsVisualViewportSizeSet()) {
     return presShell->GetVisualViewportOffset();
   }
   return GetScrollPosition();
 }
 
+nsRect ScrollFrameHelper::GetVisualOptimalViewingRect() const {
+  nsIPresShell* presShell = mOuter->PresShell();
+
+  if (mIsRoot && presShell->IsVisualViewportSizeSet() &&
+      presShell->IsVisualViewportOffsetSet()) {
+    return nsRect(presShell->GetVisualViewportOffset(),
+                  presShell->GetVisualViewportSize());
+  }
+  return mScrollPort;
+}
+
 static void AdjustForWholeDelta(int32_t aDelta, nscoord* aCoord) {
   if (aDelta < 0) {
     *aCoord = nscoord_MIN;
   } else if (aDelta > 0) {
     *aCoord = nscoord_MAX;
   }
 }
 
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -215,16 +215,25 @@ class ScrollFrameHelper : public nsIRefl
     return pt;
   }
   nsPoint GetApzScrollPosition() const { return mApzScrollPos; }
   nsRect GetScrollRange() const;
   // Get the scroll range assuming the viewport has size (aWidth, aHeight).
   nsRect GetScrollRange(nscoord aWidth, nscoord aHeight) const;
   nsSize GetVisualViewportSize() const;
   nsPoint GetVisualViewportOffset() const;
+
+  /**
+   * Return the 'optimal viewing region' [1] as a rect suitable for use by
+   * scroll anchoring.
+   *
+   * [1] https://drafts.csswg.org/css-scroll-snap-1/#optimal-viewing-region
+   */
+  nsRect GetVisualOptimalViewingRect() const;
+
   /**
    * For LTR frames, this is the same as GetVisualViewportOffset().
    * For RTL frames, we take the offset from the top right corner of the frame
    * to the top right corner of the visual viewport.
    */
   nsPoint GetLogicalVisualViewportOffset() const {
     nsPoint pt = GetVisualViewportOffset();
     if (!IsPhysicalLTR()) {
--- a/netwerk/protocol/http/TrackingDummyChannel.cpp
+++ b/netwerk/protocol/http/TrackingDummyChannel.cpp
@@ -8,16 +8,17 @@
 #include "TrackingDummyChannel.h"
 
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/net/TrackingDummyChannelChild.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/Preferences.h"
 #include "nsIChannel.h"
 #include "nsIURI.h"
+#include "nsProxyRelease.h"
 
 namespace mozilla {
 namespace net {
 
 /* static */ TrackingDummyChannel::StorageAllowedState
 TrackingDummyChannel::StorageAllowed(
     nsIChannel* aChannel, const std::function<void(bool)>& aCallback) {
   MOZ_ASSERT(!XRE_IsParentProcess());
@@ -79,17 +80,24 @@ TrackingDummyChannel::TrackingDummyChann
       mTopWindowURIResult(aTopWindowURIResult),
       mIsTrackingResource(false) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   SetOriginalURI(aURI);
   SetLoadInfo(aLoadInfo);
 }
 
-TrackingDummyChannel::~TrackingDummyChannel() = default;
+TrackingDummyChannel::~TrackingDummyChannel() {
+  NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mLoadInfo",
+                                    mLoadInfo.forget());
+  NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mURI",
+                                    mURI.forget());
+  NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mTopWindowURI",
+                                    mTopWindowURI.forget());
+}
 
 bool TrackingDummyChannel::IsTrackingResource() const {
   return mIsTrackingResource;
 }
 
 void TrackingDummyChannel::SetIsTrackingResource() {
   mIsTrackingResource = true;
 }
--- a/netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
+++ b/netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
@@ -1,459 +1,779 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set expandtab ts=4 sw=2 sts=2 cin: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "Classifier.h"
 #include "mozilla/ErrorNames.h"
 #include "mozilla/net/AsyncUrlChannelClassifier.h"
 #include "mozilla/net/UrlClassifierCommon.h"
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
 #include "mozilla/net/UrlClassifierFeatureResult.h"
 #include "nsContentUtils.h"
 #include "nsIChannel.h"
 #include "nsIHttpChannel.h"
 #include "nsIHttpChannelInternal.h"
 #include "nsIURIClassifier.h"
+#include "nsIUrlClassifierUtils.h"
 #include "nsNetCID.h"
+#include "nsNetUtil.h"
 #include "nsPrintfCString.h"
+#include "nsProxyRelease.h"
 #include "nsServiceManagerUtils.h"
-#include "nsNetUtil.h"
+#include "nsUrlClassifierDBService.h"
 
 namespace mozilla {
 namespace net {
 
 namespace {
 
-// When we do blacklist/whitelist classification, from a list of features, we
-// need to aggregate them per URI, because not all the features work with the
-// same channel's URI.
-// This struct contains only the features able to deal with a particular URI.
-// See more in GetFeatureTasks().
-struct FeatureTask {
+// Big picture comment
+// -----------------------------------------------------------------------------
+// nsUrlClassifierDBService::channelClassify() classifies a channel using a set
+// of URL-Classifier features. This method minimizes the number of lookups and
+// URI parsing and this is done using the classes here described.
+//
+// The first class is 'FeatureTask' which is able to retrieve the list of
+// features for this channel using the feature-factory. See
+// UrlClassifierFeatureFactory.
+// For each feature, it creates a FeatureData object, which contains the
+// whitelist and blacklist prefs and tables. The reason why we create
+// FeatureData is because:
+// - features are not thread-safe.
+// - we want to store the state of the classification in the FeatureData
+//   object.
+//
+// It can happen that multiple features share the same tables. In order to do
+// the lookup just once, we have TableData class. When multiple features
+// contain the same table, they have references to the same couple TableData +
+// URIData objects.
+//
+// During the classification, the channel's URIs are fragmented. In order to
+// create these fragments just once, we use the URIData class, which is pointed
+// by TableData classes.
+//
+// The creation of these classes happens on the main-thread. The classification
+// happens on the worker thread.
+
+// URIData
+// -----------------------------------------------------------------------------
+
+// In order to avoid multiple URI parsing, we have this class which contains
+// nsIURI and its fragments.
+class URIData {
+ public:
+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(URIData);
+
+  static nsresult Create(nsIURI* aURI, nsIURI* aInnermostURI, URIData** aData);
+
+  bool IsEqual(nsIURI* aURI) const;
+
+  const nsTArray<nsCString>& Fragments();
+
+  nsIURI* URI() const;
+
+ private:
+  URIData();
+  ~URIData();
+
   nsCOMPtr<nsIURI> mURI;
-  // Let's use RefPtr<> here, because this needs to be used with methods which
-  // require it.
-  nsTArray<RefPtr<nsIUrlClassifierFeature>> mFeatures;
+  nsCString mURISpec;
+  nsTArray<nsCString> mFragments;
 };
 
-// Features are able to classify particular URIs from a channel. For instance,
-// tracking-annotation feature uses the top-level URI to whitelist the current
-// channel's URI; flash feature always uses the channel's URI.  Because of
-// this, this function aggregates feature per URI in an array of FeatureTask
-// object.
-nsresult GetFeatureTasks(
-    nsIChannel* aChannel,
-    const nsTArray<nsCOMPtr<nsIUrlClassifierFeature>>& aFeatures,
-    nsIUrlClassifierFeature::listType aListType,
-    nsTArray<FeatureTask>& aTasks) {
-  MOZ_ASSERT(!aFeatures.IsEmpty());
+/* static */ nsresult URIData::Create(nsIURI* aURI, nsIURI* aInnermostURI,
+                                      URIData** aData) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aURI);
+  MOZ_ASSERT(aInnermostURI);
+
+  RefPtr<URIData> data = new URIData();
+  data->mURI = aURI;
+
+  nsCOMPtr<nsIUrlClassifierUtils> utilsService =
+      do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID);
+  if (NS_WARN_IF(!utilsService)) {
+    return NS_ERROR_FAILURE;
+  }
+
+  nsresult rv = utilsService->GetKeyForURI(aInnermostURI, data->mURISpec);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  UC_LOG(("URIData::Create[%p] - new URIData created for spec %s", data.get(),
+          data->mURISpec.get()));
+
+  data.forget(aData);
+  return NS_OK;
+}
+
+URIData::URIData() { MOZ_ASSERT(NS_IsMainThread()); }
+
+URIData::~URIData() {
+  NS_ReleaseOnMainThreadSystemGroup("URIData:mURI", mURI.forget());
+}
+
+bool URIData::IsEqual(nsIURI* aURI) const {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aURI);
+
+  bool isEqual = false;
+  nsresult rv = mURI->Equals(aURI, &isEqual);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return false;
+  }
+
+  return isEqual;
+}
+
+const nsTArray<nsCString>& URIData::Fragments() {
+  MOZ_ASSERT(!NS_IsMainThread());
+
+  if (mFragments.IsEmpty()) {
+    nsresult rv = LookupCache::GetLookupFragments(mURISpec, &mFragments);
+    Unused << NS_WARN_IF(NS_FAILED(rv));
+  }
+
+  return mFragments;
+}
+
+nsIURI* URIData::URI() const {
+  MOZ_ASSERT(NS_IsMainThread());
+  return mURI;
+}
+
+// TableData
+// ----------------------------------------------------------------------------
+
+// In order to avoid multiple lookups on the same table + URI, we have this
+// class.
+class TableData {
+ public:
+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TableData);
+
+  enum State {
+    eUnclassified,
+    eNoMatch,
+    eMatch,
+  };
+
+  TableData(URIData* aURIData, const nsACString& aTable);
+
+  nsIURI* URI() const;
+
+  const nsACString& Table() const;
+
+  State MatchState() const;
+
+  bool IsEqual(URIData* aURIData, const nsACString& aTable) const;
+
+  // Returns true if the table classifies the URI. This method must be called
+  // on hte classifier worker thread.
+  bool DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier);
+
+ private:
+  ~TableData();
+
+  RefPtr<URIData> mURIData;
+  State mState;
+
+  nsCString mTable;
+  LookupResultArray mResults;
+};
+
+TableData::TableData(URIData* aURIData, const nsACString& aTable)
+    : mURIData(aURIData), mState(eUnclassified), mTable(aTable) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aURIData);
+
+  UC_LOG(("TableData CTOR[%p] - new TableData created %s", this,
+          aTable.BeginReading()));
+}
+
+TableData::~TableData() = default;
 
-  // Let's unify features per nsIURI.
-  for (nsIUrlClassifierFeature* feature : aFeatures) {
-    nsCOMPtr<nsIURI> uri;
-    nsresult rv =
-        feature->GetURIByListType(aChannel, aListType, getter_AddRefs(uri));
-    if (NS_WARN_IF(NS_FAILED(rv)) || !uri) {
-      if (UC_LOG_ENABLED()) {
-        nsAutoCString errorName;
-        GetErrorName(rv, errorName);
-        UC_LOG(
-            ("GetFeatureTasks got an unexpected error (rv=%s) while trying to "
-             "create a whitelist URI. Allowing tracker.",
-             errorName.get()));
-      }
-      return rv;
-    }
+nsIURI* TableData::URI() const {
+  MOZ_ASSERT(NS_IsMainThread());
+  return mURIData->URI();
+}
+
+const nsACString& TableData::Table() const {
+  MOZ_ASSERT(NS_IsMainThread());
+  return mTable;
+}
+
+TableData::State TableData::MatchState() const {
+  MOZ_ASSERT(NS_IsMainThread());
+  return mState;
+}
+
+bool TableData::IsEqual(URIData* aURIData, const nsACString& aTable) const {
+  MOZ_ASSERT(NS_IsMainThread());
+  return mURIData == aURIData && mTable == aTable;
+}
+
+bool TableData::DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier) {
+  MOZ_ASSERT(!NS_IsMainThread());
+  MOZ_ASSERT(aWorkerClassifier);
+
+  if (mState == TableData::eUnclassified) {
+    UC_LOG(("TableData::DoLookup[%p] - starting lookup", this));
 
-    MOZ_ASSERT(uri);
+    const nsTArray<nsCString>& fragments = mURIData->Fragments();
+    nsresult rv = aWorkerClassifier->DoSingleLocalLookupWithURIFragments(
+        fragments, mTable, mResults);
+    Unused << NS_WARN_IF(NS_FAILED(rv));
+
+    mState = mResults.IsEmpty() ? TableData::eNoMatch : TableData::eMatch;
+
+    UC_LOG(("TableData::DoLookup[%p] - lookup completed. Matches: %d", this,
+            (int)mResults.Length()));
+  }
+
+  return !mResults.IsEmpty();
+}
+
+// FeatureData
+// ----------------------------------------------------------------------------
+
+class FeatureTask;
+
+// This is class contains all the Feature data.
+class FeatureData {
+  enum State {
+    eUnclassified,
+    eNoMatch,
+    eMatchBlacklist,
+    eMatchWhitelist,
+  };
 
-    bool found = false;
-    for (FeatureTask& task : aTasks) {
-      bool equal = false;
-      rv = task.mURI->Equals(uri, &equal);
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        return rv;
-      }
+ public:
+  FeatureData();
+  ~FeatureData();
+
+  nsresult Initialize(FeatureTask* aTask, nsIChannel* aChannel,
+                      nsIUrlClassifierFeature* aFeature);
+
+  void DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier);
+
+  // Returns true if the next feature should be processed.
+  bool MaybeCompleteClassification(nsIChannel* aChannel);
+
+ private:
+  nsresult InitializeList(FeatureTask* aTask, nsIChannel* aChannel,
+                          nsIUrlClassifierFeature::listType aListType,
+                          nsTArray<RefPtr<TableData>>& aList);
+
+  State mState;
+  nsCOMPtr<nsIUrlClassifierFeature> mFeature;
+
+  nsTArray<RefPtr<TableData>> mBlacklistTables;
+  nsTArray<RefPtr<TableData>> mWhitelistTables;
+
+  // blacklist + whitelist.
+  nsCString mHostInPrefTables[2];
+};
+
+FeatureData::FeatureData() : mState(eUnclassified) {}
 
-      if (equal) {
-        task.mFeatures.AppendElement(feature);
-        found = true;
-        break;
-      }
-    }
+FeatureData::~FeatureData() {
+  NS_ReleaseOnMainThreadSystemGroup("FeatureData:mFeature", mFeature.forget());
+}
+
+nsresult FeatureData::Initialize(FeatureTask* aTask, nsIChannel* aChannel,
+                                 nsIUrlClassifierFeature* aFeature) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aTask);
+  MOZ_ASSERT(aChannel);
+  MOZ_ASSERT(aFeature);
 
-    if (!found) {
-      FeatureTask* task = aTasks.AppendElement();
-      task->mURI = uri;
-      task->mFeatures.AppendElement(feature);
-    }
+  nsAutoCString featureName;
+  aFeature->GetName(featureName);
+  UC_LOG(("FeatureData::Initialize[%p] - Feature %s - Channel %p", this,
+          featureName.get(), aChannel));
+
+  mFeature = aFeature;
+
+  nsresult rv = InitializeList(
+      aTask, aChannel, nsIUrlClassifierFeature::blacklist, mBlacklistTables);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  rv = InitializeList(aTask, aChannel, nsIUrlClassifierFeature::whitelist,
+                      mWhitelistTables);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
   }
 
   return NS_OK;
 }
 
-nsresult TrackerFound(
-    const nsTArray<RefPtr<nsIUrlClassifierFeatureResult>>& aResults,
-    nsIChannel* aChannel, const std::function<void()>& aCallback) {
-  // Let's ask the features to do the magic.
-  for (nsIUrlClassifierFeatureResult* result : aResults) {
-    UrlClassifierFeatureResult* r =
-        static_cast<UrlClassifierFeatureResult*>(result);
+void FeatureData::DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier) {
+  MOZ_ASSERT(!NS_IsMainThread());
+  MOZ_ASSERT(aWorkerClassifier);
+  MOZ_ASSERT(mState == eUnclassified);
+
+  UC_LOG(("FeatureData::DoLookup[%p] - lookup starting", this));
+
+  // This is wrong, but it's fast: we don't want to check if the host is in the
+  // blacklist table if we know that it's going to be whitelisted by pref.
+  // So, also if maybe it's not blacklisted, let's consider it 'whitelisted'.
+  if (!mHostInPrefTables[nsIUrlClassifierFeature::whitelist].IsEmpty()) {
+    UC_LOG(("FeatureData::DoLookup[%p] - whitelisted by pref", this));
+    mState = eMatchWhitelist;
+    return;
+  }
+
+  // Let's check if this feature blacklists the URI.
+
+  bool isBlacklisted =
+      !mHostInPrefTables[nsIUrlClassifierFeature::blacklist].IsEmpty();
+
+  UC_LOG(("FeatureData::DoLookup[%p] - blacklisted by pref: %d", this,
+          isBlacklisted));
+
+  if (isBlacklisted == false) {
+    for (TableData* tableData : mBlacklistTables) {
+      if (tableData->DoLookup(aWorkerClassifier)) {
+        isBlacklisted = true;
+      }
+    }
+  }
+
+  UC_LOG(("FeatureData::DoLookup[%p] - blacklisted before whitelisting: %d",
+          this, isBlacklisted));
+
+  if (!isBlacklisted) {
+    mState = eNoMatch;
+    return;
+  }
+
+  // Now, let's check if we need to whitelist the same URI.
+
+  for (TableData* tableData : mWhitelistTables) {
+    // If one of the whitelist table matches the URI, we don't need to continue
+    // with the others: the feature is whitelisted.
+    if (tableData->DoLookup(aWorkerClassifier)) {
+      UC_LOG(("FeatureData::DoLookup[%p] - whitelisted by table", this));
+      mState = eMatchWhitelist;
+      return;
+    }
+  }
+
+  UC_LOG(("FeatureData::DoLookup[%p] - blacklisted", this));
+  mState = eMatchBlacklist;
+}
+
+bool FeatureData::MaybeCompleteClassification(nsIChannel* aChannel) {
+  MOZ_ASSERT(NS_IsMainThread());
+
+  UC_LOG(
+      ("FeatureData::MaybeCompleteClassification[%p] - completing "
+       "classification for channel %p",
+       this, aChannel));
+
+  switch (mState) {
+    case eNoMatch:
+      UC_LOG(
+          ("FeatureData::MaybeCompleteClassification[%p] - no match. Let's "
+           "move on",
+           this));
+      return true;
+
+    case eMatchWhitelist:
+      UC_LOG(
+          ("FeatureData::MaybeCompleteClassification[%p] - whitelisted. Let's "
+           "move on",
+           this));
+      return true;
+
+    case eMatchBlacklist:
+      UC_LOG(
+          ("FeatureData::MaybeCompleteClassification[%p] - blacklisted", this));
+      break;
+
+    case eUnclassified:
+      MOZ_CRASH("We should not be here!");
+      break;
+  }
+
+  MOZ_ASSERT(mState == eMatchBlacklist);
+
+  // Maybe we have to skip this host
+  nsAutoCString skipList;
+  nsresult rv = mFeature->GetSkipHostList(skipList);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    UC_LOG(
+        ("FeatureData::MaybeCompleteClassification[%p] - error. Let's move on",
+         this));
+    return true;
+  }
+
+  if (nsContentUtils::IsURIInList(mBlacklistTables[0]->URI(), skipList)) {
+    UC_LOG(
+        ("FeatureData::MaybeCompleteClassification[%p] - uri found in skiplist",
+         this));
+    return true;
+  }
+
+  nsAutoCString list;
+  list.Assign(mHostInPrefTables[nsIUrlClassifierFeature::blacklist]);
+
+  for (TableData* tableData : mBlacklistTables) {
+    if (tableData->MatchState() == TableData::eMatch) {
+      if (!list.IsEmpty()) {
+        list.AppendLiteral(",");
+      }
+
+      list.Append(tableData->Table());
+    }
+  }
+
+  UC_LOG(
+      ("FeatureData::MaybeCompleteClassification[%p] - process channel %p with "
+       "list %s",
+       this, aChannel, list.get()));
+
+  bool shouldContinue = false;
+  rv = mFeature->ProcessChannel(aChannel, list, &shouldContinue);
+  Unused << NS_WARN_IF(NS_FAILED(rv));
+
+  return shouldContinue;
+}
+
+// CallbackHolder
+// ----------------------------------------------------------------------------
+
+// This class keeps the callback alive and makes sure that we release it on the
+// correct thread.
+class CallbackHolder final {
+ public:
+  NS_INLINE_DECL_REFCOUNTING(CallbackHolder);
+
+  explicit CallbackHolder(std::function<void()>&& aCallback)
+      : mCallback(std::move(aCallback)) {}
+
+  void Exec() const { mCallback(); }
+
+ private:
+  ~CallbackHolder() = default;
+
+  std::function<void()> mCallback;
+};
+
+// FeatureTask
+// ----------------------------------------------------------------------------
+
+// A FeatureTask is a class that is able to classify a channel using a set of
+// features. The features are grouped by:
+// - URIs - to avoid extra URI parsing.
+// - Tables - to avoid multiple lookup on the same table.
+class FeatureTask {
+ public:
+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FeatureTask);
+
+  static nsresult Create(nsIChannel* aChannel,
+                         std::function<void()>&& aCallback,
+                         FeatureTask** aTask);
 
-    bool shouldContinue = false;
-    nsresult rv =
-        r->Feature()->ProcessChannel(aChannel, r->List(), &shouldContinue);
-    // Don't return here! We want to process all the channel and execute the
-    // callback.
-    Unused << NS_WARN_IF(NS_FAILED(rv));
+  // Called on the classifier thread.
+  void DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier);
+
+  // Called on the main-thread to process the channel.
+  void CompleteClassification();
+
+  nsresult GetOrCreateURIData(nsIURI* aURI, nsIURI* aInnermostURI,
+                              URIData** aData);
+
+  nsresult GetOrCreateTableData(URIData* aURIData, const nsACString& aTable,
+                                TableData** aData);
+
+ private:
+  FeatureTask(nsIChannel* aChannel, std::function<void()>&& aCallback);
+  ~FeatureTask();
+
+  nsCOMPtr<nsIChannel> mChannel;
+  RefPtr<CallbackHolder> mCallbackHolder;
+
+  nsTArray<FeatureData> mFeatures;
+  nsTArray<RefPtr<URIData>> mURIs;
+  nsTArray<RefPtr<TableData>> mTables;
+};
+
+// Features are able to classify particular URIs from a channel. For instance,
+// tracking-annotation feature uses the top-level URI to whitelist the current
+// channel's URI; flash feature always uses the channel's URI.  Because of
+// this, this function aggregates feature per URI and tables.
+/* static */ nsresult FeatureTask::Create(nsIChannel* aChannel,
+                                          std::function<void()>&& aCallback,
+                                          FeatureTask** aTask) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aChannel);
+  MOZ_ASSERT(aTask);
+
+  // We need to obtain the list of nsIUrlClassifierFeature objects able to
+  // classify this channel. If the list is empty, we do an early return.
+  nsTArray<nsCOMPtr<nsIUrlClassifierFeature>> features;
+  UrlClassifierFeatureFactory::GetFeaturesFromChannel(aChannel, features);
+  if (features.IsEmpty()) {
+    UC_LOG(("FeatureTask::Create: Nothing to do for channel %p", aChannel));
+    return NS_ERROR_FAILURE;
+  }
+
+  RefPtr<FeatureTask> task = new FeatureTask(aChannel, std::move(aCallback));
+
+  UC_LOG(("FeatureTask::Create[%p] - FeatureTask created for channel %p",
+          task.get(), aChannel));
+
+  for (nsIUrlClassifierFeature* feature : features) {
+    FeatureData* featureData = task->mFeatures.AppendElement();
+    nsresult rv = featureData->Initialize(task, aChannel, feature);
+    if (NS_WARN_IF(NS_FAILED(rv))) {
+      return rv;
+    }
+  }
+
+  task.forget(aTask);
+  return NS_OK;
+}
+
+FeatureTask::FeatureTask(nsIChannel* aChannel,
+                         std::function<void()>&& aCallback)
+    : mChannel(aChannel) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(mChannel);
+
+  std::function<void()> callback = std::move(aCallback);
+  mCallbackHolder = new CallbackHolder(std::move(callback));
+}
+
+FeatureTask::~FeatureTask() {
+  NS_ReleaseOnMainThreadSystemGroup("FeatureTask::mChannel", mChannel.forget());
+  NS_ReleaseOnMainThreadSystemGroup("FeatureTask::mCallbackHolder",
+                                    mCallbackHolder.forget());
+}
+
+nsresult FeatureTask::GetOrCreateURIData(nsIURI* aURI, nsIURI* aInnermostURI,
+                                         URIData** aData) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aURI);
+  MOZ_ASSERT(aInnermostURI);
+  MOZ_ASSERT(aData);
 
-    if (!shouldContinue) {
+  UC_LOG(
+      ("FeatureTask::GetOrCreateURIData[%p] - Checking if a URIData must be "
+       "created",
+       this));
+
+  for (URIData* data : mURIs) {
+    if (data->IsEqual(aURI)) {
+      UC_LOG(("FeatureTask::GetOrCreateURIData[%p] - Reuse existing URIData %p",
+              this, data));
+
+      RefPtr<URIData> uriData = data;
+      uriData.forget(aData);
+      return NS_OK;
+    }
+  }
+
+  RefPtr<URIData> data;
+  nsresult rv = URIData::Create(aURI, aInnermostURI, getter_AddRefs(data));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  mURIs.AppendElement(data);
+
+  UC_LOG(("FeatureTask::GetOrCreateURIData[%p] - Create new URIData %p", this,
+          data.get()));
+
+  data.forget(aData);
+  return NS_OK;
+}
+
+nsresult FeatureTask::GetOrCreateTableData(URIData* aURIData,
+                                           const nsACString& aTable,
+                                           TableData** aData) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aURIData);
+  MOZ_ASSERT(aData);
+
+  UC_LOG(
+      ("FeatureTask::GetOrCreateTableData[%p] - Checking if TableData must be "
+       "created",
+       this));
+
+  for (TableData* data : mTables) {
+    if (data->IsEqual(aURIData, aTable)) {
+      UC_LOG((
+          "FeatureTask::GetOrCreateTableData[%p] - Reuse existing TableData %p",
+          this, data));
+
+      RefPtr<TableData> tableData = data;
+      tableData.forget(aData);
+      return NS_OK;
+    }
+  }
+
+  RefPtr<TableData> data = new TableData(aURIData, aTable);
+  mTables.AppendElement(data);
+
+  UC_LOG(("FeatureTask::GetOrCreateTableData[%p] - Create new TableData %p",
+          this, data.get()));
+
+  data.forget(aData);
+  return NS_OK;
+}
+
+void FeatureTask::DoLookup(nsUrlClassifierDBServiceWorker* aWorkerClassifier) {
+  MOZ_ASSERT(!NS_IsMainThread());
+  MOZ_ASSERT(aWorkerClassifier);
+
+  UC_LOG(("FeatureTask::DoLookup[%p] - starting lookup", this));
+
+  for (FeatureData& feature : mFeatures) {
+    feature.DoLookup(aWorkerClassifier);
+  }
+
+  UC_LOG(("FeatureTask::DoLookup[%p] - lookup completed", this));
+}
+
+void FeatureTask::CompleteClassification() {
+  MOZ_ASSERT(NS_IsMainThread());
+
+  for (FeatureData& feature : mFeatures) {
+    if (!feature.MaybeCompleteClassification(mChannel)) {
       break;
     }
   }
 
-  aCallback();
-  return NS_OK;
-}
-
-// This class is designed to get the results of checking whitelist.
-class WhitelistClassifierCallback final
-    : public nsIUrlClassifierFeatureCallback {
- public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-  NS_DECL_NSIURLCLASSIFIERFEATURECALLBACK
-
-  WhitelistClassifierCallback(
-      nsIChannel* aChannel,
-      const nsTArray<RefPtr<nsIUrlClassifierFeatureResult>>& aBlacklistResults,
-      std::function<void()>& aCallback)
-      : mChannel(aChannel),
-        mTaskCount(0),
-        mBlacklistResults(aBlacklistResults),
-        mChannelCallback(aCallback) {
-    MOZ_ASSERT(mChannel);
-    MOZ_ASSERT(!mBlacklistResults.IsEmpty());
-  }
-
-  void SetTaskCount(uint32_t aTaskCount) {
-    MOZ_ASSERT(aTaskCount > 0);
-    mTaskCount = aTaskCount;
-  }
-
- private:
-  ~WhitelistClassifierCallback() = default;
-
-  nsresult OnClassifyCompleteInternal();
-
-  nsCOMPtr<nsIChannel> mChannel;
-  nsCOMPtr<nsIURI> mURI;
-  uint32_t mTaskCount;
-  nsTArray<RefPtr<nsIUrlClassifierFeatureResult>> mBlacklistResults;
-  std::function<void()> mChannelCallback;
-
-  nsTArray<RefPtr<nsIUrlClassifierFeatureResult>> mWhitelistResults;
-};
-
-NS_IMPL_ISUPPORTS(WhitelistClassifierCallback, nsIUrlClassifierFeatureCallback)
-
-NS_IMETHODIMP
-WhitelistClassifierCallback::OnClassifyComplete(
-    const nsTArray<RefPtr<nsIUrlClassifierFeatureResult>>& aWhitelistResults) {
-  MOZ_ASSERT(mTaskCount > 0);
-
-  UC_LOG(("WhitelistClassifierCallback[%p]:OnClassifyComplete channel=%p", this,
-          mChannel.get()));
-
-  mWhitelistResults.AppendElements(aWhitelistResults);
-
-  if (--mTaskCount) {
-    // More callbacks will come.
-    return NS_OK;
-  }
-
-  return OnClassifyCompleteInternal();
-}
-
-nsresult WhitelistClassifierCallback::OnClassifyCompleteInternal() {
-  nsTArray<RefPtr<nsIUrlClassifierFeatureResult>> remainingResults;
+  UC_LOG(("FeatureTask::CompleteClassification[%p] - exec callback", this));
 
-  for (nsIUrlClassifierFeatureResult* blacklistResult : mBlacklistResults) {
-    UrlClassifierFeatureResult* result =
-        static_cast<UrlClassifierFeatureResult*>(blacklistResult);
-
-    nsIUrlClassifierFeature* blacklistFeature = result->Feature();
-    MOZ_ASSERT(blacklistFeature);
-
-    bool found = false;
-    for (nsIUrlClassifierFeatureResult* whitelistResult : mWhitelistResults) {
-      // We can do pointer comparison because Features are singletons.
-      if (static_cast<UrlClassifierFeatureResult*>(whitelistResult)
-              ->Feature() == blacklistFeature) {
-        found = true;
-        break;
-      }
-    }
-
-    if (found) {
-      continue;
-    }
-
-    // Maybe we have to skip this host
-    nsAutoCString skipList;
-    nsresult rv = blacklistFeature->GetSkipHostList(skipList);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      continue;
-    }
-
-    if (nsContentUtils::IsURIInList(result->URI(), skipList)) {
-      if (UC_LOG_ENABLED()) {
-        UC_LOG(
-            ("WhitelistClassifierCallback[%p]::OnClassifyComplete uri found in "
-             "skiplist",
-             this));
-      }
-
-      continue;
-    }
-
-    remainingResults.AppendElement(blacklistResult);
-  }
-
-  // Whitelist lookup results
-
-  if (remainingResults.IsEmpty()) {
-    if (UC_LOG_ENABLED()) {
-      UC_LOG(
-          ("WhitelistClassifierCallback[%p]::OnClassifyComplete uri fully "
-           "whitelisted",
-           this));
-    }
-
-    mChannelCallback();
-    return NS_OK;
-  }
-
-  if (UC_LOG_ENABLED()) {
-    UC_LOG(
-        ("WhitelistClassifierCallback[%p]::OnClassifyComplete channel[%p] "
-         "should not be whitelisted",
-         this, mChannel.get()));
-  }
-
-  return TrackerFound(remainingResults, mChannel, mChannelCallback);
+  mCallbackHolder->Exec();
 }
 
-// This class is designed to get the results of checking blacklist.
-class BlacklistClassifierCallback final
-    : public nsIUrlClassifierFeatureCallback {
- public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-  NS_DECL_NSIURLCLASSIFIERFEATURECALLBACK
+nsresult FeatureData::InitializeList(
+    FeatureTask* aTask, nsIChannel* aChannel,
+    nsIUrlClassifierFeature::listType aListType,
+    nsTArray<RefPtr<TableData>>& aList) {
+  MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(aTask);
+  MOZ_ASSERT(aChannel);
+
+  UC_LOG(("FeatureData::InitializeList[%p] - Initialize list %d for channel %p",
+          this, aListType, aChannel));
 
-  BlacklistClassifierCallback(nsIChannel* aChannel,
-                              std::function<void()>&& aCallback)
-      : mChannel(aChannel),
-        mTaskCount(0),
-        mChannelCallback(std::move(aCallback)) {
-    MOZ_ASSERT(mChannel);
-  }
-
-  void SetTaskCount(uint32_t aTaskCount) {
-    MOZ_ASSERT(aTaskCount > 0);
-    mTaskCount = aTaskCount;
+  nsCOMPtr<nsIURI> uri;
+  nsresult rv =
+      mFeature->GetURIByListType(aChannel, aListType, getter_AddRefs(uri));
+  if (NS_WARN_IF(NS_FAILED(rv)) || !uri) {
+    if (UC_LOG_ENABLED()) {
+      nsAutoCString errorName;
+      GetErrorName(rv, errorName);
+      UC_LOG(("FeatureData::InitializeList got an unexpected error (rv=%s)",
+              errorName.get()));
+    }
+    return rv;
   }
 
- private:
-  ~BlacklistClassifierCallback() = default;
-
-  nsresult OnClassifyCompleteInternal();
-
-  nsCOMPtr<nsIChannel> mChannel;
-  uint32_t mTaskCount;
-  std::function<void()> mChannelCallback;
-
-  nsTArray<RefPtr<nsIUrlClassifierFeatureResult>> mResults;
-};
-
-NS_IMPL_ISUPPORTS(BlacklistClassifierCallback, nsIUrlClassifierFeatureCallback)
-
-NS_IMETHODIMP
-BlacklistClassifierCallback::OnClassifyComplete(
-    const nsTArray<RefPtr<nsIUrlClassifierFeatureResult>>& aResults) {
-  MOZ_ASSERT(mTaskCount > 0);
-
-  UC_LOG(("BlacklistClassifierCallback[%p]:OnClassifyComplete - remaining %d",
-          this, mTaskCount));
-
-  mResults.AppendElements(aResults);
-
-  if (--mTaskCount) {
-    // More callbacks will come.
-    return NS_OK;
+  nsCOMPtr<nsIURI> innermostURI = NS_GetInnermostURI(uri);
+  if (NS_WARN_IF(!innermostURI)) {
+    return NS_ERROR_FAILURE;
   }
 
-  return OnClassifyCompleteInternal();
-}
-
-nsresult BlacklistClassifierCallback::OnClassifyCompleteInternal() {
-  // All good! The URL has not been classified.
-  if (mResults.IsEmpty()) {
-    if (UC_LOG_ENABLED()) {
-      UC_LOG(
-          ("BlacklistClassifierCallback[%p]::OnClassifyComplete uri not found "
-           "in blacklist",
-           this));
-    }
-
-    mChannelCallback();
-    return NS_OK;
+  nsAutoCString host;
+  rv = innermostURI->GetHost(host);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
   }
 
-  if (UC_LOG_ENABLED()) {
-    UC_LOG(
-        ("BlacklistClassifierCallback[%p]::OnClassifyComplete uri is in "
-         "blacklist. Start checking whitelist.",
-         this));
-  }
-
-  nsTArray<nsCOMPtr<nsIUrlClassifierFeature>> features;
-  for (nsIUrlClassifierFeatureResult* result : mResults) {
-    features.AppendElement(
-        static_cast<UrlClassifierFeatureResult*>(result)->Feature());
+  bool found = false;
+  nsAutoCString tableName;
+  rv = mFeature->HasHostInPreferences(host, aListType, tableName, &found);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
   }
 
-  nsTArray<FeatureTask> tasks;
-  nsresult rv = GetFeatureTasks(mChannel, features,
-                                nsIUrlClassifierFeature::whitelist, tasks);
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    return TrackerFound(mResults, mChannel, mChannelCallback);
+  if (found) {
+    mHostInPrefTables[aListType] = tableName;
   }
 
-  if (tasks.IsEmpty()) {
-    UC_LOG(
-        ("BlacklistClassifierCallback[%p]:OnClassifyComplete could not create "
-         "a whitelist URI. Ignoring whitelist.",
-         this));
-
-    return TrackerFound(mResults, mChannel, mChannelCallback);
+  RefPtr<URIData> uriData;
+  rv = aTask->GetOrCreateURIData(uri, innermostURI, getter_AddRefs(uriData));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
   }
 
-  RefPtr<WhitelistClassifierCallback> callback =
-      new WhitelistClassifierCallback(mChannel, mResults, mChannelCallback);
-
-  nsCOMPtr<nsIURIClassifier> uriClassifier =
-      do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
+  MOZ_ASSERT(uriData);
 
-  uint32_t pendingCallbacks = 0;
-  for (FeatureTask& task : tasks) {
-    rv = uriClassifier->AsyncClassifyLocalWithFeatures(
-        task.mURI, task.mFeatures, nsIUrlClassifierFeature::whitelist,
-        callback);
+  nsTArray<nsCString> tables;
+  rv = mFeature->GetTables(aListType, tables);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
 
+  for (const nsCString& table : tables) {
+    RefPtr<TableData> data;
+    rv = aTask->GetOrCreateTableData(uriData, table, getter_AddRefs(data));
     if (NS_WARN_IF(NS_FAILED(rv))) {
-      if (UC_LOG_ENABLED()) {
-        nsAutoCString errorName;
-        GetErrorName(rv, errorName);
-        UC_LOG((
-            "BlacklistClassifierCallback[%p]:OnClassifyComplete Failed "
-            "calling AsyncClassifyLocalWithFeatures with rv=%s. Let's move on.",
-            this, errorName.get()));
-      }
-
-      continue;
+      return rv;
     }
 
-    ++pendingCallbacks;
+    MOZ_ASSERT(data);
+    aList.AppendElement(data);
   }
 
-  // All the AsyncClassifyLocalWithFeatures() calls return error. We do not
-  // expect callbacks.
-  if (pendingCallbacks == 0) {
-    if (UC_LOG_ENABLED()) {
-      UC_LOG(
-          ("BlacklistClassifierCallback[%p]:OnClassifyComplete All "
-           "AsyncClassifyLocalWithFeatures() calls return errors. We cannot "
-           "continue.",
-           this));
-    }
-
-    return TrackerFound(mResults, mChannel, mChannelCallback);
-  }
-
-  // Nothing else do here. Let's wait for the WhitelistClassifierCallback.
-  callback->SetTaskCount(pendingCallbacks);
   return NS_OK;
 }
 
 }  // namespace
 
 /* static */ nsresult AsyncUrlChannelClassifier::CheckChannel(
     nsIChannel* aChannel, std::function<void()>&& aCallback) {
   MOZ_ASSERT(XRE_IsParentProcess());
   MOZ_ASSERT(aChannel);
 
   if (!aCallback) {
     return NS_ERROR_INVALID_ARG;
   }
 
-  // We need to obtain the list of nsIUrlClassifierFeature objects able to
-  // classify this channel. If the list is empty, we do an early return.
-  nsTArray<nsCOMPtr<nsIUrlClassifierFeature>> features;
-  UrlClassifierFeatureFactory::GetFeaturesFromChannel(aChannel, features);
-  if (features.IsEmpty()) {
-    UC_LOG(
-        ("AsyncUrlChannelClassifier: Nothing to do for channel %p", aChannel));
-    return NS_ERROR_FAILURE;
-  }
+  UC_LOG(
+      ("AsyncUrlChannelClassifier::CheckChannel starting the classification "
+       "for channel %p",
+       aChannel));
 
-  nsTArray<FeatureTask> tasks;
-  nsresult rv = GetFeatureTasks(aChannel, features,
-                                nsIUrlClassifierFeature::blacklist, tasks);
-  if (NS_WARN_IF(NS_FAILED(rv)) || tasks.IsEmpty()) {
-    return rv;
-  }
-
-  MOZ_ASSERT(!tasks.IsEmpty());
-
-  nsCOMPtr<nsIURIClassifier> uriClassifier =
-      do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) {
+  RefPtr<FeatureTask> task;
+  nsresult rv =
+      FeatureTask::Create(aChannel, std::move(aCallback), getter_AddRefs(task));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
-  RefPtr<BlacklistClassifierCallback> callback =
-      new BlacklistClassifierCallback(aChannel, std::move(aCallback));
-
-  uint32_t pendingCallbacks = 0;
-  for (FeatureTask& task : tasks) {
-    if (UC_LOG_ENABLED()) {
-      nsCString spec = task.mURI->GetSpecOrDefault();
-      spec.Truncate(
-          std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
-      UC_LOG(("AsyncUrlChannelClassifier: Checking blacklist for uri=%s\n",
-              spec.get()));
-    }
-
-    rv = uriClassifier->AsyncClassifyLocalWithFeatures(
-        task.mURI, task.mFeatures, nsIUrlClassifierFeature::blacklist,
-        callback);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      continue;
-    }
-
-    ++pendingCallbacks;
-  }
-
-  // All the AsyncClassifyLocalWithFeatures() calls return error. We do not
-  // expect callbacks.
-  if (pendingCallbacks == 0) {
+  RefPtr<nsUrlClassifierDBServiceWorker> workerClassifier =
+      nsUrlClassifierDBService::GetWorker();
+  if (NS_WARN_IF(!workerClassifier)) {
     return NS_ERROR_FAILURE;
   }
 
-  callback->SetTaskCount(pendingCallbacks);
-  return NS_OK;
+  nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(
+      "AsyncUrlChannelClassifier::CheckChannel",
+      [task, workerClassifier]() -> void {
+        MOZ_ASSERT(!NS_IsMainThread());
+        task->DoLookup(workerClassifier);
+
+        nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(
+            "AsyncUrlChannelClassifier::CheckChannel - return",
+            [task]() -> void { task->CompleteClassification(); });
+
+        NS_DispatchToMainThread(r);
+      });
+
+  return nsUrlClassifierDBService::BackgroundThread()->Dispatch(
+      r, NS_DISPATCH_NORMAL);
 }
 
 }  // namespace net
 }  // namespace mozilla
--- a/testing/mozharness/mozharness/mozilla/structuredlog.py
+++ b/testing/mozharness/mozharness/mozilla/structuredlog.py
@@ -32,25 +32,27 @@ class StructuredOutputParser(OutputParse
             self.strict = kwargs.pop('strict')
         else:
             self.strict = True
 
         self.suite_category = kwargs.pop('suite_category', None)
 
         tbpl_compact = kwargs.pop("log_compact", False)
         super(StructuredOutputParser, self).__init__(**kwargs)
+        self.allow_crashes = kwargs.pop("allow_crashes", False)
 
         mozlog = self._get_mozlog_module()
         self.formatter = mozlog.formatters.TbplFormatter(compact=tbpl_compact)
         self.handler = mozlog.handlers.StatusHandler()
         self.log_actions = mozlog.structuredlog.log_actions()
 
         self.worst_log_level = INFO
         self.tbpl_status = TBPL_SUCCESS
         self.harness_retry_re = TinderBoxPrintRe['harness_error']['retry_regex']
+        self.prev_was_unstructured = False
 
     def _get_mozlog_module(self):
         try:
             import mozlog
         except ImportError:
             self.fatal("A script class using structured logging must inherit "
                        "from the MozbaseMixin to ensure that mozlog is available.")
         return mozlog
@@ -73,23 +75,29 @@ class StructuredOutputParser(OutputParse
             if (isinstance(candidate_data, dict) and
                'action' in candidate_data and candidate_data['action'] in self.log_actions):
                 data = candidate_data
         except ValueError:
             pass
 
         if data is None:
             if self.strict:
-                self.critical(("Test harness output was not a valid structured log message: "
-                              "\n%s") % line)
+                if not self.prev_was_unstructured:
+                    self.critical(("Test harness output was not a valid structured log message: "
+                                   "\n%s") % line)
+                else:
+                    self.critical(line)
                 self.update_levels(TBPL_FAILURE, log.CRITICAL)
+                self.prev_was_unstructured = True
             else:
                 self._handle_unstructured_output(line)
             return
 
+        self.prev_was_unstructured = False
+
         self.handler(data)
 
         action = data["action"]
         if action in ('log', 'process_output'):
             if action == 'log':
                 message = data['message']
                 level = getattr(log, data['level'].upper())
             else:
@@ -167,23 +175,34 @@ class StructuredOutputParser(OutputParse
         else:
             joined_summary = summary
 
         fail_pair = TBPL_WARNING, WARNING
         error_pair = TBPL_FAILURE, ERROR
 
         # These are warning/orange statuses.
         failure_conditions = [
-            sum(summary.unexpected_statuses.values()) > 0,
-            summary.action_counts.get('crash', 0) > summary.expected_statuses.get('CRASH', 0),
-            summary.action_counts.get('valgrind_error', 0) > 0
+            (sum(summary.unexpected_statuses.values()), 0, "statuses", False),
+            (summary.action_counts.get('crash', 0),
+             summary.expected_statuses.get('CRASH', 0), "crashes", self.allow_crashes),
+            (summary.action_counts.get('valgrind_error', 0), 0,
+             "valgrind errors", False)
         ]
-        for condition in failure_conditions:
-            if condition:
-                self.update_levels(*fail_pair)
+        for value, limit, type_name, allow in failure_conditions:
+            if value > limit:
+                msg = "%d unexpected %s" % (value, type_name)
+                if limit != 0:
+                    msg += " expected at most %d" % (limit)
+                if not allow:
+                    self.update_levels(*fail_pair)
+                    msg = "Got " + msg
+                    self.error(msg)
+                else:
+                    msg = "Ignored " + msg
+                    self.warning(msg)
 
         # These are error/red statuses. A message is output here every time something
         # wouldn't otherwise be highlighted in the UI.
         required_actions = {
             'suite_end': 'No suite end message was emitted by this harness.',
             'test_end': 'No checks run.',
         }
         for action, diagnostic_message in required_actions.iteritems():
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -337,17 +337,18 @@ class WebPlatformTest(TestingMixin, Merc
             dest.write(src.read())
 
     def run_tests(self):
         dirs = self.query_abs_dirs()
 
         parser = StructuredOutputParser(config=self.config,
                                         log_obj=self.log_obj,
                                         log_compact=True,
-                                        error_list=BaseErrorList + HarnessErrorList)
+                                        error_list=BaseErrorList + HarnessErrorList,
+                                        allow_crashes=True)
 
         env = {'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']}
         env['RUST_BACKTRACE'] = 'full'
 
         if self.config['allow_software_gl_layers']:
             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
         if self.config['enable_webrender']:
             env['MOZ_WEBRENDER'] = '1'
--- a/testing/web-platform/meta/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html.ini
+++ b/testing/web-platform/meta/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html.ini
@@ -1,3 +1,9 @@
 [2d.text.draw.fontface.notinpage.html]
   disabled:
     if verify: fails in verify mode
+    if debug: true
+  [@font-face fonts should work even if they are not used in the page]
+    expected:
+      if os == "android": PASS
+      FAIL
+
deleted file mode 100644
--- a/testing/web-platform/meta/FileAPI/url/multi-global-origin-serialization.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[multi-global-origin-serialization.sub.html]
-  expected: TIMEOUT
deleted file mode 100644
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/IndexedDB/idbfactory_open4.htm.ini
@@ -0,0 +1,6 @@
+[idbfactory_open4.htm]
+  disabled: true
+  [IDBFactory.open() - new database has default version]
+    expected:
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/IndexedDB/transaction-lifecycle.htm.ini
@@ -0,0 +1,2 @@
+[transaction-lifecycle.htm]
+  disabled: Bug 1519865
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/IndexedDB/transaction-lifetime.htm.ini
@@ -0,0 +1,2 @@
+[transaction-lifetime.htm]
+  disabled: Bug 1519865
--- a/testing/web-platform/meta/async-local-storage/storage-smoke-test.tentative.https.html.ini
+++ b/testing/web-platform/meta/async-local-storage/storage-smoke-test.tentative.https.html.ini
@@ -1,3 +1,8 @@
 [storage-smoke-test.tentative.https.html]
   expected:
-    TIMEOUT
+    if (os == "linux") and debug and not webrender: TIMEOUT
+    if (os == "linux") and debug and webrender: TIMEOUT
+    if (os == "linux") and not debug: TIMEOUT
+    if os == "win": TIMEOUT
+    if os == "android": TIMEOUT
+    if os == "mac": TIMEOUT
--- a/testing/web-platform/meta/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html.ini
+++ b/testing/web-platform/meta/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html.ini
@@ -1,8 +1,11 @@
 [filesystem-urls-do-not-match-self.sub.html]
   expected: TIMEOUT
   [Violation report status OK.]
     expected: FAIL
 
   [filesystem-urls-do-not-match-self]
     expected: NOTRUN
 
+  [Expecting logs: ["violated-directive=script-src-elem"\]]
+    expected: NOTRUN
+
deleted file mode 100644
deleted file mode 100644
--- a/testing/web-platform/meta/css/CSS2/lists/list-style-021.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[list-style-021.xht]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-animations/computed-style-animation-parsing.html.ini
@@ -0,0 +1,13 @@
+[computed-style-animation-parsing.html]
+  [Test an animation name that is the same as a possible animation fill-mode.]
+    expected: FAIL
+
+  [Test an animation name that is the same as a possible running state.]
+    expected: FAIL
+
+  [Test a non-conflicting animation name.]
+    expected: FAIL
+
+  [Test an animation name that is the same as a possible animation direction.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-contain/contain-layout-baseline-005.html.ini
@@ -0,0 +1,2 @@
+[contain-layout-baseline-005.html]
+  expected: FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-device-adapt/documentElement-clientWidth-on-minimum-scale-size.tentative.html.ini
@@ -0,0 +1,5 @@
+[documentElement-clientWidth-on-minimum-scale-size.tentative.html]
+  [documentElement clientWidth should be equal to device-width even if overflow:hidden region is visible]
+    expected:
+      if (os == "android"): FAIL
+
--- a/testing/web-platform/meta/css/css-fill-stroke/paint-order-001.tentative.html.ini
+++ b/testing/web-platform/meta/css/css-fill-stroke/paint-order-001.tentative.html.ini
@@ -2,9 +2,8 @@
   prefs: [layout.css.paint-order.enabled:true]
   disabled:
     if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1520847
   expected:
     if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
     if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
     if debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
     if not debug and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "android": FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-fonts/font-display/__dir__.ini
@@ -0,0 +1,1 @@
+leak-threshold: [tab:409600]
--- a/testing/web-platform/meta/css/css-logical/logical-box-inset.html.ini
+++ b/testing/web-platform/meta/css/css-logical/logical-box-inset.html.ini
@@ -5,8 +5,9 @@
 
   [Test that inset-inline shorthand sets longhands and serializes correctly.]
     expected: FAIL
     bug: https://bugzilla.mozilla.org/show_bug.cgi?id=137688
 
   [Test that inset-block shorthand sets longhands and serializes correctly.]
     expected: FAIL
     bug: https://bugzilla.mozilla.org/show_bug.cgi?id=137688
+
--- a/testing/web-platform/meta/css/css-text/i18n/ja/css-text-line-break-ja-po-loose.html.ini
+++ b/testing/web-platform/meta/css/css-text/i18n/ja/css-text-line-break-ja-po-loose.html.ini
@@ -3,8 +3,13 @@
     expected: FAIL
 
   [FF05  FULLWIDTH PERCENT SIGN may appear at line start if ja and loose]
     expected: FAIL
 
   [FFE0  FULLWIDTH CENT SIGN may appear at line start if ja and loose]
     expected: FAIL
 
+  [2035  REVERSED PRIME may appear at line start if ja and loose]
+    expected:
+      if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+
--- a/testing/web-platform/meta/css/css-writing-modes/available-size-006.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/available-size-006.html.ini
@@ -1,4 +1,7 @@
 [available-size-006.html]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/issues/14933
+
--- a/testing/web-platform/meta/css/css-writing-modes/available-size-007.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/available-size-007.html.ini
@@ -1,4 +1,7 @@
 [available-size-007.html]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/issues/14933
+
--- a/testing/web-platform/meta/css/css-writing-modes/available-size-008.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/available-size-008.html.ini
@@ -1,4 +1,7 @@
 [available-size-008.html]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/issues/14933
+
--- a/testing/web-platform/meta/css/css-writing-modes/available-size-015.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/available-size-015.html.ini
@@ -1,4 +1,7 @@
 [available-size-015.html]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/issues/14933
+
--- a/testing/web-platform/meta/css/css-writing-modes/available-size-019.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/available-size-019.html.ini
@@ -1,4 +1,7 @@
 [available-size-019.html]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/issues/14933
+
--- a/testing/web-platform/meta/css/css-writing-modes/text-orientation-script-001.html.ini
+++ b/testing/web-platform/meta/css/css-writing-modes/text-orientation-script-001.html.ini
@@ -1,9 +1,11 @@
 [text-orientation-script-001.html]
+  disabled:
+    if os == "mac": true
   [Default orientation for vo=R]
     expected:
       if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
       if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
       if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
       if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
       FAIL
 
--- a/testing/web-platform/meta/css/cssom-view/scroll-behavior-smooth.html.ini
+++ b/testing/web-platform/meta/css/cssom-view/scroll-behavior-smooth.html.ini
@@ -1,4 +1,8 @@
 [scroll-behavior-smooth.html]
   [BODY element scroll-behavior should not propagate to viewport]
     expected: FAIL
 
+  [Smooth scrolling while doing history navigation.]
+    expected:
+      if os == "android": FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/cssom/CSSStyleSheet-constructable.html.ini
@@ -0,0 +1,58 @@
+[CSSStyleSheet-constructable.html]
+  [Constructed stylesheet can be used and modified in multiple TreeScopes]
+    expected: FAIL
+
+  [CSSStyleSheet.replaceSync throws exception when there is import rule inside]
+    expected: FAIL
+
+  [Constructed style sheets can be applied on document]
+    expected: FAIL
+
+  [Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet and the AdoptedStyleSheets are in different document trees]
+    expected: FAIL
+
+  [CSSStyleSheet.replaceSync replaces stylesheet text synchronously]
+    expected: FAIL
+
+  [Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet is in the same document tree as the AdoptedStyleSheets]
+    expected: FAIL
+
+  [Stylesheets constructed on the main Document cannot be used in iframes]
+    expected: FAIL
+
+  [CSSStyleSheet.replace allows import rule inside]
+    expected: FAIL
+
+  [Constructed style sheets can be applied on shadow root]
+    expected: FAIL
+
+  [Changes to constructed stylesheets through CSSOM is reflected]
+    expected: FAIL
+
+  [Stylesheet constructed on iframe cannot be used in the main Document]
+    expected: FAIL
+
+  [CSSStyleSheet.replace produces Promise<CSSStyleSheet>]
+    expected: FAIL
+
+  [document.adoptedStyleSheets should initially have length 0.]
+    expected: FAIL
+
+  [Inserting an @import rule through insertRule on a constructed stylesheet throws an exception]
+    expected: FAIL
+
+  [CSSStyleSheet.replace returns rejected promise on failed imports]
+    expected: FAIL
+
+  [new CSSStyleSheet produces empty CSSStyleSheet]
+    expected: FAIL
+
+  [Adopting a shadow host will move adoptedStyleSheets but it is not applied]
+    expected: FAIL
+
+  [Cloning a shadow host will not clone shadow root, and also adoptedStyleSheets]
+    expected: FAIL
+
+  [Importing a shadow host will not copy shadow root, and also adoptedStyleSheets]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/cssom/stylesheet-same-origin.sub.html.ini
+++ b/testing/web-platform/meta/css/cssom/stylesheet-same-origin.sub.html.ini
@@ -1,4 +1,7 @@
 [stylesheet-same-origin.sub.html]
   [Origin-clean check in cross-origin CSSOM Stylesheets (redirect from cross-origin to same-origin)]
     expected: FAIL
 
+  [Origin-clean check in loading error CSSOM Stylesheets]
+    expected: FAIL
+
--- a/testing/web-platform/meta/css/selectors/focus-visible-005.html.ini
+++ b/testing/web-platform/meta/css/selectors/focus-visible-005.html.ini
@@ -1,7 +1,12 @@
 [focus-visible-005.html]
   [Programmatic focus should always match :focus-visible]
     expected: FAIL
 
   [Programmatic focus after click should not match :focus-visible]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
+      if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
+      if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
+      FAIL
 
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-001b.xhtml.ini
+++ b/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-001b.xhtml.ini
@@ -1,4 +1,7 @@
 [flexbox-justify-content-horiz-001b.xhtml]
-  expected: FAIL
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+    FAIL
   disabled:
     if os == "android": https://github.com/web-platform-tests/wpt/pull/14965
+
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/ui3/box-sizing-replaced-003.xht.ini
+++ b/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/ui3/box-sizing-replaced-003.xht.ini
@@ -1,3 +1,3 @@
 [box-sizing-replaced-003.xht]
   disabled:
-    if (os == "mac"): https://bugzilla.mozilla.org/show_bug.cgi?id=1383454
+    if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1383454
--- a/testing/web-platform/meta/editing/run/delete.html.ini
+++ b/testing/web-platform/meta/editing/run/delete.html.ini
@@ -720,16 +720,19 @@
     expected: FAIL
 
   [[["delete",""\]\] "<pre>foo&nbsp; [\]bar</pre>" compare innerHTML]
     expected: FAIL
 
   [[["delete",""\]\] "<div style=white-space:pre>foo&nbsp; [\]bar</div>" compare innerHTML]
     expected: FAIL
 
+  [delete - HTML editing conformance tests]
+    expected: FAIL
+
 
 [delete.html?6001-last]
   [[["delete",""\]\] "<ol><li>fo[o</ol><ol><li>b\]ar</ol>" compare innerHTML]
     expected: FAIL
 
   [[["delete",""\]\] "<ol><li>fo[o</ol><ul><li>b\]ar</ul>" compare innerHTML]
     expected: FAIL
 
deleted file mode 100644
deleted file mode 100644
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-csksc56011987.html.ini
@@ -0,0 +1,38 @@
+[euckr-encode-form-csksc56011987.html?15001-16000]
+
+[euckr-encode-form-csksc56011987.html?6001-7000]
+
+[euckr-encode-form-csksc56011987.html?5001-6000]
+  [csksc56011987 encoding (form)]
+    expected: FAIL
+
+
+[euckr-encode-form-csksc56011987.html?2001-3000]
+
+[euckr-encode-form-csksc56011987.html?12001-13000]
+
+[euckr-encode-form-csksc56011987.html?14001-15000]
+
+[euckr-encode-form-csksc56011987.html?11001-12000]
+
+[euckr-encode-form-csksc56011987.html?8001-9000]
+
+[euckr-encode-form-csksc56011987.html?1-1000]
+
+[euckr-encode-form-csksc56011987.html?10001-11000]
+
+[euckr-encode-form-csksc56011987.html?3001-4000]
+
+[euckr-encode-form-csksc56011987.html?7001-8000]
+
+[euckr-encode-form-csksc56011987.html?13001-14000]
+
+[euckr-encode-form-csksc56011987.html?9001-10000]
+
+[euckr-encode-form-csksc56011987.html?1001-2000]
+
+[euckr-encode-form-csksc56011987.html?4001-5000]
+
+[euckr-encode-form-csksc56011987.html?16001-17000]
+
+[euckr-encode-form-csksc56011987.html?17001-last]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-korean.html.ini
@@ -0,0 +1,38 @@
+[euckr-encode-form-korean.html?13001-14000]
+
+[euckr-encode-form-korean.html?17001-last]
+
+[euckr-encode-form-korean.html?15001-16000]
+
+[euckr-encode-form-korean.html?1001-2000]
+
+[euckr-encode-form-korean.html?12001-13000]
+
+[euckr-encode-form-korean.html?1-1000]
+
+[euckr-encode-form-korean.html?11001-12000]
+
+[euckr-encode-form-korean.html?5001-6000]
+
+[euckr-encode-form-korean.html?2001-3000]
+
+[euckr-encode-form-korean.html?7001-8000]
+
+[euckr-encode-form-korean.html?9001-10000]
+
+[euckr-encode-form-korean.html?16001-17000]
+
+[euckr-encode-form-korean.html?10001-11000]
+
+[euckr-encode-form-korean.html?3001-4000]
+
+[euckr-encode-form-korean.html?4001-5000]
+  [korean encoding (form)]
+    expected: FAIL
+
+
+[euckr-encode-form-korean.html?8001-9000]
+
+[euckr-encode-form-korean.html?14001-15000]
+
+[euckr-encode-form-korean.html?6001-7000]
deleted file mode 100644
--- a/testing/web-platform/meta/eventsource/eventsource-constructor-document-domain.htm.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[eventsource-constructor-document-domain.htm]
-  expected: TIMEOUT
--- a/testing/web-platform/meta/feature-policy/experimental-features/layout-animations-disabled-tentative.html.ini
+++ b/testing/web-platform/meta/feature-policy/experimental-features/layout-animations-disabled-tentative.html.ini
@@ -1,9 +1,11 @@
 [layout-animations-disabled-tentative.html]
+  disabled:
+    if os == "linux" and webrender: true
   [Verify that animations which are not affected by the policy run as expected.]
     expected: TIMEOUT
 
   [Verify that animations which are affected by the policy run as expected.]
     expected: NOTRUN
 
   [Testing property "bottom".Animation between "100px" and "200px" at progress 0.125]
     expected: FAIL
--- a/testing/web-platform/meta/feature-policy/experimental-features/layout-animations-disabled-violation-report-js-tentative.html.ini
+++ b/testing/web-platform/meta/feature-policy/experimental-features/layout-animations-disabled-violation-report-js-tentative.html.ini
@@ -1,10 +1,16 @@
 [layout-animations-disabled-violation-report-js-tentative.html]
-  expected: TIMEOUT
+  expected:
+    if (os == "linux") and not debug and not webrender: TIMEOUT
+    if (os == "linux") and not debug and webrender: TIMEOUT
+    if (os == "linux") and debug: TIMEOUT
+    if os == "win": TIMEOUT
+    if os == "android": TIMEOUT
+    if os == "mac": TIMEOUT
   [layout-animations-disabled-violation-report-js-tentative]
     expected: FAIL
 
   [Verify that when 'layout-animations' is disabled, an 'element.animate' API including a keyframe that uses a blocked property generates violation report (linked scripts).]
     expected: TIMEOUT
 
   [Verify that when 'layout-animations' is disabled, an 'element.animate' API including a keyframe that uses a blocked property generates violation report (inline scripts).]
     expected: NOTRUN
copy from testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
copy to testing/web-platform/meta/feature-policy/reporting/__dir__.ini
--- a/testing/web-platform/meta/fetch/api/basic/__dir__.ini
+++ b/testing/web-platform/meta/fetch/api/basic/__dir__.ini
@@ -1,2 +1,3 @@
 prefs: [javascript.options.streams:true]
-lsan-allowed: [mozilla::dom::FetchStream::Create, mozilla::dom::WorkerPrivate::WorkerPrivate, nsSegmentedBuffer::AppendNewSegment]
+lsan-allowed: [NS_NewInputStreamReadyEvent, mozilla::dom::FetchStream::Create, mozilla::dom::WorkerPrivate::WorkerPrivate, nsSegmentedBuffer::AppendNewSegment]
+leak-threshold: [default:51200]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/fetch/api/cors/__dir__.ini
@@ -0,0 +1,2 @@
+lsan-allowed: [Alloc, Create, EntrySlotOrCreate, FetchDriverObserver, Malloc, NewPage, Realloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::ThrottledEventQueue::Create, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::InternalRequest::GetRequestConstructorCopy, mozilla::dom::Performance::CreateForMainThread, mozilla::dom::PerformanceMainThread::CreateNavigationTimingEntry, mozilla::dom::PerformanceStorageWorker::Create, mozilla::dom::PromiseWorkerProxy::Create, mozilla::dom::WorkerCSPEventListener::Create, mozilla::dom::WorkerFetchResolver::Create, mozilla::net::nsStandardURL::TemplatedMutator]
+leak-threshold: [tab:307200]
--- a/testing/web-platform/meta/fetch/api/headers/headers-no-cors.window.js.ini
+++ b/testing/web-platform/meta/fetch/api/headers/headers-no-cors.window.js.ini
@@ -6,8 +6,17 @@
     expected: FAIL
 
   ["no-cors" Headers object cannot have accept-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss]
     expected: FAIL
 
   ["no-cors" Headers object cannot have content-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss]
     expected: FAIL
 
+  ["no-cors" Headers object cannot have content-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss]
+    expected: FAIL
+
+  ["no-cors" Headers object cannot have accept-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss]
+    expected: FAIL
+
+  ["no-cors" Headers object cannot have accept set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/fetch/api/request/__dir__.ini
@@ -0,0 +1,2 @@
+lsan-allowed: [Alloc, DoCORSChecks, EntrySlotOrCreate, MakeUnique, Malloc, NewChannelFromURIWithProxyFlagsInternal, NewEmptyScopeData, Realloc, __rdl_alloc, __rdl_realloc, js_new, js_pod_calloc, js_pod_malloc, js_pod_realloc, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::FetchDriver::Fetch, mozilla::dom::FetchRequest, mozilla::dom::InternalRequest::GetRequestConstructorCopy, mozilla::dom::Performance::CreateForMainThread, mozilla::net::HttpBaseChannel::HttpBaseChannel, mozilla::net::HttpChannelChild::HttpChannelChild, mozilla::net::nsHttpHandler::NewProxiedChannel2, mozilla::net::nsStandardURL::TemplatedMutator]
+leak-threshold: [tab:768000]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/fetch/corb/__dir__.ini
@@ -0,0 +1,1 @@
+leak-threshold: [default:307200]
--- a/testing/web-platform/meta/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html.ini
+++ b/testing/web-platform/meta/fetch/corb/script-resource-with-json-parser-breaker.tentative.sub.html.ini
@@ -1,11 +1,12 @@
 [script-resource-with-json-parser-breaker.tentative.sub.html]
   disabled:
     if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1499003
+  expected: ERROR
   [CORB-blocks 'application/pdf' that starts with the following JSON parser breaker: {} &&]
     expected: FAIL
 
   [CORB-blocks 'application/zip' that starts with the following JSON parser breaker: {} &&]
     expected: FAIL
 
   [CORB-blocks 'application/zip' that starts with the following JSON parser breaker: {}&&]
     expected: FAIL
--- a/testing/web-platform/meta/html/browsers/browsing-the-web/unloading-documents/prompt-and-unload-script-closeable.html.ini
+++ b/testing/web-platform/meta/html/browsers/browsing-the-web/unloading-documents/prompt-and-unload-script-closeable.html.ini
@@ -1,6 +1,2 @@
 [prompt-and-unload-script-closeable.html]
-  disabled:
-    if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1499003
-  expected:
-    if os == "android": CRASH
-    ERROR
+  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1519417
deleted file mode 100644
--- a/testing/web-platform/meta/html/browsers/history/the-location-interface/location-prototype-setting-same-origin-domain.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[location-prototype-setting-same-origin-domain.sub.html]
-  expected: TIMEOUT
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/browsers/offline/introduction-4/__dir__.ini
@@ -0,0 +1,1 @@
+lsan-allowed: [Alloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc, mozilla::dom::ChromeUtils::GenerateQI]
deleted file mode 100644
--- a/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_feature_policy.tentative.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[document_domain_feature_policy.tentative.sub.html]
-  expected: TIMEOUT
--- a/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/sandboxed-document_domain.html.ini
+++ b/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/sandboxed-document_domain.html.ini
@@ -1,10 +1,9 @@
 [sandboxed-document_domain.html]
-  expected: TIMEOUT
   [Sandboxed document.domain 1]
     expected: FAIL
 
   [Sandboxed document.domain 2]
     expected: FAIL
 
   [Sandboxed document.domain 3]
     expected: FAIL
--- a/testing/web-platform/meta/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.js.ini
+++ b/testing/web-platform/meta/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window.js.ini
@@ -1,15 +1,13 @@
 [no_window_open_when_term_nesting_level_nonzero.window.html]
-  expected:
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
-    ERROR
+  expected: ERROR
   [no popups from synchronously reachable window]
-    expected: FAIL
+    expected:
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+      FAIL
 
   [no popups with frame navigation]
     expected: FAIL
 
   [no popups from another synchronously reachable window]
-    expected:
-      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
-      FAIL
+    expected: FAIL
 
deleted file mode 100644
--- a/testing/web-platform/meta/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-same-origin-domain.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[windowproxy-prototype-setting-same-origin-domain.sub.html]
-  expected: TIMEOUT
--- a/testing/web-platform/meta/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html.ini
+++ b/testing/web-platform/meta/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html.ini
@@ -1,3 +1,3 @@
 [opener-setter.html]
   disabled:
-    if os == 'linux' and bits == 32 and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1483696
+    if (os == "linux") and (bits == 32) and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1483696
--- a/testing/web-platform/meta/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub.html.ini
+++ b/testing/web-platform/meta/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub.html.ini
@@ -1,5 +1,4 @@
 [window-domain-success.sub.html]
-  expected: TIMEOUT
   [postMessaging to a same-origin-domain (but not same-origin) iframe allows them to see each others' modifications]
     expected: FAIL
 
--- a/testing/web-platform/meta/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.sub.html.ini
+++ b/testing/web-platform/meta/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.sub.html.ini
@@ -1,5 +1,4 @@
 [window-similar-but-cross-origin-success.sub.html]
-  expected: TIMEOUT
   [postMessaging to a not same-origin-domain, but similar origin, iframe allows them to see each others' modifications]
     expected: FAIL
 
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini
+++ b/testing/web-platform/meta/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini
@@ -1,4 +1,20 @@
 [fieldset-default-style.html]
   [fieldset default style]
     expected: FAIL
 
+  [border-left-color]
+    expected:
+      if (os == "win") or (os == "mac"): FAIL
+
+  [border-top-color]
+    expected:
+      if (os == "win") or (os == "mac"): FAIL
+
+  [border-bottom-color]
+    expected:
+      if (os == "win") or (os == "mac"): FAIL
+
+  [border-right-color]
+    expected:
+      if (os == "win") or (os == "mac"): FAIL
+
--- a/testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
@@ -1,1 +1,1 @@
-leak-threshold: [default:51200]
+leak-threshold: [default:51200, gpu:51200]
--- a/testing/web-platform/meta/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini
@@ -1,12 +1,12 @@
 [hash-name-reference.html]
   disabled:
     if verify and debug: fails in verify mode
-  max-asserts: 52
+  max-asserts: 154
   [HTML (standards) IMG usemap="#hash-name"]
     expected: FAIL
 
   [HTML (standards) OBJECT usemap="#hash-name"]
     expected: FAIL
 
   [HTML (standards) IMG usemap="#hash-id"]
     expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/event_play_noautoplay.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[event_play_noautoplay.html]
-  [audio events - play]
-    expected:
-      if debug and not webrender and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html.ini
@@ -0,0 +1,2 @@
+[addCue.html]
+  max-asserts: 1848
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html.ini
@@ -0,0 +1,3 @@
+[kind.html]
+  disabled:
+    if os == "linux" and webrender: true
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration.html.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration.html.ini
@@ -1,5 +1,7 @@
 [track-cue-negative-duration.html]
-  expected: TIMEOUT
+  disabled:
+    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
+    TIMEOUT
   [Enter, Exit events for a cue with negative duration]
     expected: TIMEOUT
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/video_loop_base.html.ini
@@ -0,0 +1,3 @@
+[video_loop_base.html]
+  disabled:
+    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/video_loop_base.html.ini~e0ac563c0260... Update metadata	
@@ -0,0 +1,3 @@
+[video_loop_base.html]
+  expected:
+    if (os == "linux") and not debug and webrender: CRASH
copy from testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
copy to testing/web-platform/meta/html/semantics/scripting-1/__dir__.ini
--- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-integrity-classic.sub.html.ini
+++ b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-integrity-classic.sub.html.ini
@@ -1,10 +1,10 @@
 [string-compilation-integrity-classic.sub.html]
-  expected: TIMEOUT
+  expected: ERROR
   [setTimeout should fail to import]
     expected: TIMEOUT
 
   [the Function constructor should fail to import]
     expected: NOTRUN
 
   [eval should fail to import]
     expected: FAIL
--- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-integrity-module.sub.html.ini
+++ b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-integrity-module.sub.html.ini
@@ -1,10 +1,10 @@
 [string-compilation-integrity-module.sub.html]
-  expected: TIMEOUT
+  expected: ERROR
   [setTimeout should fail to import]
     expected: TIMEOUT
 
   [the Function constructor should fail to import]
     expected: NOTRUN
 
   [eval should fail to import]
     expected: FAIL
--- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini
+++ b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini
@@ -6,8 +6,14 @@
     expected: FAIL
 
   [Errors for cross-origin scripts redirected to a same-origin url should be muted]
     expected: FAIL
 
   [Errors for same-origin scripts redirected to a cross-origin url and redirected back to same-origin should be muted]
     expected: FAIL
 
+  [Non-synthetic errors for same-origin scripts redirected to a cross-origin URL and redirected back to same-origin should be muted]
+    expected: FAIL
+
+  [Syntax error for same-origin script redirected to a cross-origin URL and redirected back to same-origin should be muted]
+    expected: FAIL
+
--- a/testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini
+++ b/testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini
@@ -1,12 +1,11 @@
 [abort.sub.window.html]
   disabled:
     if debug and (os == "mac"): https://bugzilla.mozilla.org/show_bug.cgi?id=1495175
-
   expected: TIMEOUT
   [document.open() does not abort documents that are not navigating (image loading)]
     expected: TIMEOUT
 
   [document.open() does not abort documents that are not navigating (XMLHttpRequest)]
     expected: FAIL
 
   [document.open() does not abort documents that are not navigating (already established WebSocket connection)]
--- a/testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-origin.sub.window.js.ini
+++ b/testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-origin.sub.window.js.ini
@@ -1,10 +1,9 @@
 [bailout-exception-vs-return-origin.sub.window.html]
-  expected: TIMEOUT
   [document.open should throw a SecurityError with cross-origin document even when the ignore-opens-during-unload counter is greater than 0 (during unload event)]
     expected: FAIL
 
   [document.open should throw a SecurityError with cross-origin document even when there is an active parser executing script]
     expected: FAIL
 
   [document.open should throw a SecurityError with cross-origin document even when the ignore-opens-during-unload counter is greater than 0 (during pagehide event)]
     expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-same-origin-domain.sub.window.js.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[bailout-side-effects-same-origin-domain.sub.window.html]
-  expected: TIMEOUT
--- a/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini
+++ b/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini
@@ -84,8 +84,54 @@
     expected: FAIL
 
   [shadowed rejectionhandled removal (document.createElement("body"))]
     expected: FAIL
 
   [shadowed unhandledrejection removal (document.createElement("body"))]
     expected: FAIL
 
+  [shadowed rejectionhandled removal (window)]
+    expected: FAIL
+
+  [shadowed unhandledrejection (window)]
+    expected: FAIL
+
+  [not shadowed securitypolicyviolation (window)]
+    expected: FAIL
+
+  [shadowed unhandledrejection removal (window)]
+    expected: FAIL
+
+  [not shadowed cuechange (window)]
+    expected: FAIL
+
+  [not shadowed cancel (window)]
+    expected: FAIL
+
+  [shadowed rejectionhandled (window)]
+    expected: FAIL
+
+  [shadowed unload removal (document.body)]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+
+  [shadowed unload removal (window)]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+
+  [shadowed unload removal (document.createElement("body"))]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini
@@ -0,0 +1,104 @@
+[event-handler-attributes-frameset-window.html]
+  [not shadowed cancel (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed paste (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed cuechange (document.body)]
+    expected: FAIL
+
+  [shadowed rejectionhandled removal (document.body)]
+    expected: FAIL
+
+  [shadowed rejectionhandled (document.body)]
+    expected: FAIL
+
+  [shadowed rejectionhandled removal (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed securitypolicyviolation (document.body)]
+    expected: FAIL
+
+  [not shadowed securitypolicyviolation (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed cuechange (document.createElement("frameset"))]
+    expected: FAIL
+
+  [shadowed unhandledrejection removal (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed cut (document.body)]
+    expected: FAIL
+
+  [not shadowed copy (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed cancel (document.body)]
+    expected: FAIL
+
+  [shadowed unhandledrejection (document.createElement("frameset"))]
+    expected: FAIL
+
+  [shadowed unhandledrejection removal (document.body)]
+    expected: FAIL
+
+  [shadowed rejectionhandled (document.createElement("frameset"))]
+    expected: FAIL
+
+  [not shadowed paste (document.body)]
+    expected: FAIL
+
+  [shadowed unhandledrejection (document.body)]
+    expected: FAIL
+
+  [not shadowed copy (document.body)]
+    expected: FAIL
+
+  [not shadowed cut (document.createElement("frameset"))]
+    expected: FAIL
+
+  [shadowed rejectionhandled removal (window)]
+    expected: FAIL
+
+  [shadowed unhandledrejection (window)]
+    expected: FAIL
+
+  [not shadowed securitypolicyviolation (window)]
+    expected: FAIL
+
+  [shadowed unhandledrejection removal (window)]
+    expected: FAIL
+
+  [not shadowed cuechange (window)]
+    expected: FAIL
+
+  [not shadowed cancel (window)]
+    expected: FAIL
+
+  [shadowed rejectionhandled (window)]
+    expected: FAIL
+
+  [shadowed unload removal (window)]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
+
+  [shadowed unload removal (document.body)]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
+
+  [shadowed unload removal (document.createElement("frameset"))]
+    disabled: Bug 1485887
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
+      if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
+
+
deleted file mode 100644
--- a/testing/web-platform/meta/html/webappapis/scripting/events/event-handler-attributes-window-body.html.ini
+++ /dev/null
@@ -1,28 +0,0 @@
-[event-handler-attributes-window-body.html]
-  [shadowed rejectionhandled]
-    expected: FAIL
-
-  [shadowed unhandledrejection]
-    expected: FAIL
-
-  [not shadowed cancel]
-    expected: FAIL
-
-  [not shadowed cuechange]
-    expected: FAIL
-
-  [not shadowed securitypolicyviolation]
-    expected: FAIL
-
-  [rejectionhandled removal]
-    expected: FAIL
-
-  [unhandledrejection removal]
-    expected: FAIL
-
-  [shadowed rejectionhandled removal]
-    expected: FAIL
-
-  [shadowed unhandledrejection removal]
-    expected: FAIL
-
deleted file mode 100644
deleted file mode 100644
--- a/testing/web-platform/meta/infrastructure/assumptions/allowed-to-play.html.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[allowed-to-play.html]
-  [<video> autoplay]
-    expected:
-      if debug and not webrender and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [<audio> autoplay]
-    expected:
-      if debug and not webrender and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
-
--- a/testing/web-platform/meta/infrastructure/server/__dir__.ini
+++ b/testing/web-platform/meta/infrastructure/server/__dir__.ini
@@ -1,2 +1,2 @@
-lsan-allowed: [Alloc, CreateInner, MakeUnique, PLDHashTable::ChangeTable, mozilla::BasePrincipal::CreateCodebasePrincipal, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::WeakPtr, mozilla::dom::WebSocket::ConstructorCommon, mozilla::dom::WebSocket::WebSocket, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate, nsSupportsWeakReference::GetWeakReference, mozilla::net::nsStandardURL::TemplatedMutator]
+lsan-allowed: [Alloc, Create, CreateInner, MakeUnique, PLDHashTable::ChangeTable, mozilla::BasePrincipal::CreateCodebasePrincipal, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::WeakPtr, mozilla::dom::WebSocket::ConstructorCommon, mozilla::dom::WebSocket::WebSocket, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate, mozilla::net::nsStandardURL::TemplatedMutator, nsSupportsWeakReference::GetWeakReference]
 leak-threshold: [default:51200, tab:51200]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/longtask-timing/supported-longtask-types.any.js.ini
@@ -0,0 +1,15 @@
+[supported-longtask-types.any.html]
+  [supportedEntryTypes contains 'longtask' and 'taskattribution'.]
+    expected: FAIL
+
+  [supportedEntryTypes contains 'longtask' but not 'taskattribution'.]
+    expected: FAIL
+
+
+[supported-longtask-types.any.worker.html]
+  [supportedEntryTypes contains 'longtask' and 'taskattribution'.]
+    expected: FAIL
+
+  [supportedEntryTypes contains 'longtask' but not 'taskattribution'.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/media-capabilities/__dir__.ini
+++ b/testing/web-platform/meta/media-capabilities/__dir__.ini
@@ -1,1 +1,1 @@
-prefs: [media.media-capabilities.enabled:true,media.media-capabilities.screen.enabled:true]
+prefs: [media.media-capabilities.enabled:true, media.media-capabilities.screen.enabled:true]
--- a/testing/web-platform/meta/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html.ini
+++ b/testing/web-platform/meta/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html.ini
@@ -1,9 +1,12 @@
 [MediaStreamTrack-getCapabilities.https.html]
+  disabled:
+    if os == "linux": Bug 1520788
+
   [MediaStreamTrack GetCapabilities]
     expected: FAIL
 
   [Video device getCapabilities() method present.]
     expected: FAIL
 
   [MediaStreamTrack getCapabilities().]
     expected: FAIL
deleted file mode 100644
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mixed-content/video-tag/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.ini
@@ -0,0 +1,3 @@
+[allowed.https.html]
+  disabled:
+    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mixed-content/video-tag/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html.ini
@@ -0,0 +1,3 @@
+[allowed.https.html]
+  disabled:
+    if os == "linux" and webrender: true
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mixed-content/websocket-request/no-opt-in/cross-origin-ws/top-level/no-redirect/blockable/ws-downgrade-blocks.https.html.ini
@@ -0,0 +1,2 @@
+[ws-downgrade-blocks.https.html]
+  max-asserts: 1474
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mixed-content/worklet-animation-top-level/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.ini
@@ -0,0 +1,3 @@
+[opt-in-blocks.https.html]
+  disabled:
+    if os == "linux" and webrender: true
--- a/testing/web-platform/meta/mozilla-sync
+++ b/testing/web-platform/meta/mozilla-sync
@@ -1,2 +1,2 @@
-local: 0f0265268df76d481adc35a5352f046fc04e156c
-upstream: 600dd6cb4295d0bcfc867b8877287d485d3b0e4e
+local: 98affb33e20d59c431485e155552539fcb671bd8
+upstream: 8506febdb9bdce487ef7e4ff91e9b70853019b38
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/navigation-timing/idlharness.window.js.ini
@@ -0,0 +1,2 @@
+[idlharness.window.html]
+  max-asserts: 3762
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/navigation-timing/supported_navigation_type.any.js.ini
@@ -0,0 +1,9 @@
+[supported_navigation_type.any.html]
+  [supportedEntryTypes contains 'navigation'.]
+    expected: FAIL
+
+
+[supported_navigation_type.any.worker.html]
+  [supportedEntryTypes contains 'navigation'.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini
+++ b/testing/web-platform/meta/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini
@@ -1,7 +1,12 @@
 [offscreencanvas.commit.w.html]
+  disabled: true
+  expected:
+    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): ERROR
+    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): ERROR
+    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): ERROR
   [Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.]
     expected: FAIL
 
   [Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception in a worker.]
     expected: FAIL
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/paint-timing/supported-paint-type.any.js.ini
@@ -0,0 +1,9 @@
+[supported-paint-type.any.html]
+  [supportedEntryTypes contains 'paint'.]
+    expected: FAIL
+
+
+[supported-paint-type.any.worker.html]
+  [supportedEntryTypes contains 'paint'.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/payment-handler/__dir__.ini
+++ b/testing/web-platform/meta/payment-handler/__dir__.ini
@@ -1,3 +1,5 @@
 prefs: [dom.payments.request.enabled:true]
 disabled:
   if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
+lsan-allowed: [Alloc, CompareNetwork, EntrySlotOrCreate, MakeUnique, Malloc, NS_NewLoadGroup, NewChannelFromURIWithProxyFlagsInternal, NewPage, PLDHashTable::Add, Realloc, mozilla::dom::cache::CacheOpChild::Recv__delete__, mozilla::dom::serviceWorkerScriptCache::, mozilla::net::HttpBaseChannel::HttpBaseChannel, mozilla::net::HttpChannelChild::HttpChannelChild, mozilla::net::nsHttpHandler::NewProxiedChannel2, mozilla::net::nsStandardURL::TemplatedMutator]
+leak-threshold: [tab:51200]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/performance-timeline/supportedEntryTypes.any.js.ini
@@ -0,0 +1,9 @@
+[supportedEntryTypes.any.html]
+  [supportedEntryTypes exists and returns entries in alphabetical order]
+    expected: FAIL
+
+
+[supportedEntryTypes.any.worker.html]
+  [supportedEntryTypes exists and returns entries in alphabetical order]
+    expected: FAIL
+
--- a/testing/web-platform/meta/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html.ini
+++ b/testing/web-platform/meta/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html.ini
@@ -1,5 +1,17 @@
 [pointerevent_setpointercapture_inactive_button_mouse.html]
-  expected: TIMEOUT
+  disabled: Bug 1520785
+  expected:
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): OK
+    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): OK
+    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): OK
+    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): OK
+    if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): OK
+    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): OK
+    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): OK
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): OK
+    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): OK
+    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): OK
+    TIMEOUT
   [setPointerCapture + inactive button state]
     expected: FAIL
 
copy from testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
copy to testing/web-platform/meta/referrer-policy/origin-when-cross-origin/meta-referrer/__dir__.ini
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-add-after-full-event.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-add-after-full-event.html]
+  expected: TIMEOUT
+  [Test that entry was added to the buffer after a buffer full event]
+    expected: TIMEOUT
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-add-entries-during-callback-that-drop.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-add-entries-during-callback-that-drop.html]
+  expected: TIMEOUT
+  [Test that entries synchronously added to the buffer during the callback are dropped]
+    expected: TIMEOUT
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-add-entries-during-callback.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-add-entries-during-callback.html]
+  expected: TIMEOUT
+  [Test that entries synchronously added to the buffer during the callback don't get dropped if the buffer is increased]
+    expected: TIMEOUT
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-add-then-clear.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-add-then-clear.html]
+  expected: ERROR
+  [Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-inspect-buffer-during-callback.html.ini
@@ -0,0 +1,7 @@
+[buffer-full-inspect-buffer-during-callback.html]
+  expected: ERROR
+  [Test that entries in the secondary buffer are not exposed during the callback and before they are copied to the primary buffer]
+    expected:
+      if debug and not webrender and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
+      TIMEOUT
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-set-to-current-buffer.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-set-to-current-buffer.html]
+  expected: TIMEOUT
+  [Test that entries added and event firing happened in the right sequence]
+    expected: TIMEOUT
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-store-and-clear-during-callback.html.ini
@@ -0,0 +1,4 @@
+[buffer-full-store-and-clear-during-callback.html]
+  [Test that entries overflowing the buffer trigger the buffer full event, can be stored, and find themselves in the primary buffer after it's cleared.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-then-increased.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-then-increased.html]
+  expected: ERROR
+  [Test that overflowing the buffer and immediately increasing its limit does not trigger the resourcetimingbufferfull event]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/buffer-full-when-populate-entries.html.ini
@@ -0,0 +1,5 @@
+[buffer-full-when-populate-entries.html]
+  expected: ERROR
+  [Test that a buffer full event does not bubble and that resourcetimingbufferfull is called only once per overflow]
+    expected: TIMEOUT
+
deleted file mode 100644
--- a/testing/web-platform/meta/resource-timing/resource_timing_store_and_clear_during_callback.html.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[resource_timing_store_and_clear_during_callback.html]
-  [http://web-platform.test:8000/resources/testharnessreport.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
-  [http://web-platform.test:8000/resource-timing/resources/empty_script.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
-  [6 resource timing entries should be moved to global buffer.]
-    expected: FAIL
-
-  [No entry should be stored in resource timing buffer since its cleared once an item arrived.]
-    expected: FAIL
-
-  [http://web-platform.test:8000/resource-timing/resources/webperftestharness.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
-  [http://web-platform.test:8000/resources/testharness.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
-  [http://web-platform.test:8000/resource-timing/resources/resource_timing_test0.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
-  [http://web-platform.test:8000/resource-timing/resources/webperftestharnessextension.js is expected to be in the Resource Timing buffer]
-    expected: FAIL
-
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/resource-timing/supported_resource_type.any.js.ini
@@ -0,0 +1,9 @@
+[supported_resource_type.any.html]
+  [supportedEntryTypes contains 'resource'.]
+    expected: FAIL
+
+
+[supported_resource_type.any.worker.html]
+  [supportedEntryTypes contains 'resource'.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/service-workers/service-worker/__dir__.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/__dir__.ini
@@ -1,2 +1,3 @@
 prefs: [dom.serviceWorkers.enabled:true]
+lsan-allowed: [Alloc, Malloc, Realloc, Then, mozilla::BasePrincipal::CreateCodebasePrincipal, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::dom::ServiceWorkerJobQueue::RunJob, mozilla::dom::ServiceWorkerManager::Unregister, mozilla::dom::ServiceWorkerRegistrationMainThread::Unregister, mozilla::dom::UnregisterCallback::UnregisterCallback, mozilla::net::nsStandardURL::TemplatedMutator, operator]
 leak-threshold: [default:51200, tab:51200]
--- a/testing/web-platform/meta/service-workers/service-worker/clients-matchall-order.https.html.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/clients-matchall-order.https.html.ini
@@ -1,13 +1,13 @@
 [clients-matchall-order.https.html]
   [Clients.matchAll() returns uncontrolled windows in focus order.  Case 1.]
     expected:
-      if os == "android": FAIL
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
 
   [Clients.matchAll() returns controlled windows in focus order.  Case 1.]
     expected:
-      if os == "android": FAIL
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
 
   [Clients.matchAll() returns controlled windows and frames in focus order.]
     expected:
-      if os == "android": FAIL
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
 
--- a/testing/web-platform/meta/service-workers/service-worker/fetch-csp.https.html.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/fetch-csp.https.html.ini
@@ -1,4 +1,11 @@
 [fetch-csp.https.html]
   [Verify CSP control of fetch() in a Service Worker]
     expected:
-        if not sw-e10s: FAIL
+      if (os == "linux") and debug and not webrender and e10s and not sw-e10s: FAIL
+      if (os == "linux") and debug and not webrender and not e10s: FAIL
+      if (os == "linux") and debug and webrender: FAIL
+      if (os == "linux") and not debug: FAIL
+      if os == "win": FAIL
+      if os == "mac": FAIL
+      if os == "android": FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/service-workers/service-worker/navigate-window.https.html.ini
@@ -0,0 +1,4 @@
+[navigate-window.https.html]
+  [Clients.matchAll() should not show an old window after it navigates.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/service-workers/service-worker/navigation-redirect.https.html.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/navigation-redirect.https.html.ini
@@ -1,14 +1,16 @@
 [navigation-redirect.https.html]
   [Service Worker: Navigation redirection]
     expected: FAIL
 
 
 [navigation-redirect.https.html?client]
+  disabled:
+    if os == "mac": true
   [Redirect to same-origin out-scope with opaque redirect response.]
     expected: FAIL
 
   [SW-generated redirect to same-origin out-scope with different hash fragments.]
     expected: FAIL
 
   [Redirect to same-origin out-scope with opaque redirect response which is passed through Cache.]
     expected: FAIL
--- a/testing/web-platform/meta/service-workers/service-worker/performance-timeline.https.html.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/performance-timeline.https.html.ini
@@ -1,6 +1,8 @@
 prefs: [privacy.reduceTimerPrecision:false]
 [performance-timeline.https.html]
+  disabled: true
   [Resource Timing]
-    expected: FAIL
     bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1432758
+    expected:
+      if sw-e10s: FAIL
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/service-workers/service-worker/xsl-base-url.https.html.ini
@@ -0,0 +1,4 @@
+[xsl-base-url.https.html]
+  [base URL when service worker does respondWith(fetch(responseUrl))]
+    expected: FAIL
+
--- a/testing/web-platform/meta/svg/extensibility/foreignObject/properties.svg.ini
+++ b/testing/web-platform/meta/svg/extensibility/foreignObject/properties.svg.ini
@@ -9,8 +9,11 @@
     expected: FAIL
 
   [attributes set properties]
     expected: FAIL
 
   [style rules override attributes]
     expected: FAIL
 
+  [width and height default to auto (which computes to "0px")]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/svg/geometry/parsing/height-computed.svg.ini
@@ -0,0 +1,49 @@
+[height-computed.svg]
+  [SVG Geometry Properties: getComputedStyle().height, <svg> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <rect> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <rect> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <rect> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <foreignObject> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <image> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <svg> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <foreignObject> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <image> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <svg> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <foreignObject> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <rect> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <svg> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <foreignObject> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <image> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().height, <image> presentation attribute]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/svg/geometry/parsing/width-computed.svg.ini
@@ -0,0 +1,49 @@
+[width-computed.svg]
+  [SVG Geometry Properties: getComputedStyle().width, <image> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <rect> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <foreignObject> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <svg> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <rect> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <rect> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <image> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <svg> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <foreignObject> presentation attribute]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <foreignObject> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <rect> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <foreignObject> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <svg> inline style (percentage)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <svg> initial]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <image> inline style (auto)]
+    expected: FAIL
+
+  [SVG Geometry Properties: getComputedStyle().width, <image> presentation attribute]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/svg/geometry/reftests/percentage.svg.ini
@@ -0,0 +1,2 @@
+[percentage.svg]
+  expected: FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/svg/pservers/scripted/stop-color-inheritance-currentcolor.svg.ini
@@ -0,0 +1,4 @@
+[stop-color-inheritance-currentcolor.svg]
+  ["currentcolor" is inherited as a keyword]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/user-timing/mark-measure-feature-detection.html.ini
@@ -0,0 +1,4 @@
+[mark-measure-feature-detection.html]
+  [User Timing: L2 vs L3 feature detection]
+    expected: FAIL
+
deleted file mode 100644
--- a/testing/web-platform/meta/user-timing/mark-measure-return-null.html.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[mark-measure-return-null.html]
-  [L2: performance.measure(name) should return null.]
-    expected: FAIL
-
-  [L2: performance.mark(name) should return null.]
-    expected: FAIL
-
-  [L2: performance.measure(name, param1, param2) should return null.]
-    expected: FAIL
-
-  [L2: performance.measure(name, param1) should return null.]
-    expected: FAIL
-
-  [L2: performance.mark(name, param) should return null.]
-    expected: FAIL
-
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/user-timing/supported-usertiming-types.any.js.ini
@@ -0,0 +1,9 @@
+[supported-usertiming-types.any.html]
+  [supportedEntryTypes contains 'mark' and 'measure'.]
+    expected: FAIL
+
+
+[supported-usertiming-types.any.worker.html]
+  [supportedEntryTypes contains 'mark' and 'measure'.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/visual-viewport/viewport-read-size-causes-layout.html.ini
+++ b/testing/web-platform/meta/visual-viewport/viewport-read-size-causes-layout.html.ini
@@ -1,7 +1,9 @@
 [viewport-read-size-causes-layout.html]
   [Untitled]
     expected: FAIL
 
   [viewport-read-size-causes-layout]
-    expected: FAIL
+    expected:
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+      FAIL
 
--- a/testing/web-platform/meta/visual-viewport/viewport-read-size-in-iframe-causes-layout.html.ini
+++ b/testing/web-platform/meta/visual-viewport/viewport-read-size-in-iframe-causes-layout.html.ini
@@ -1,7 +1,9 @@
 [viewport-read-size-in-iframe-causes-layout.html]
   [Untitled]
     expected: FAIL
 
   [viewport-read-size-in-iframe-causes-layout]
-    expected: FAIL
+    expected:
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+      FAIL
 
--- a/testing/web-platform/meta/visual-viewport/viewport-scrollbars-cause-resize.html.ini
+++ b/testing/web-platform/meta/visual-viewport/viewport-scrollbars-cause-resize.html.ini
@@ -1,4 +1,14 @@
 [viewport-scrollbars-cause-resize.html]
   [Viewport: Scrollbars Cause Resize]
-    expected: FAIL
+    expected:
+      if os == "android": PASS
+      FAIL
 
+  [view size reflects appearance of classic scrollbars]
+    expected:
+      if os == "android": PASS
+      FAIL
+
+  [Resize event was fired at window.visualViewport if, and only if, scrollbars are classic (i.e. affect flow)]
+    disabled: Bug 1515043
+
--- a/testing/web-platform/meta/visual-viewport/viewport-unscaled-size.html.ini
+++ b/testing/web-platform/meta/visual-viewport/viewport-unscaled-size.html.ini
@@ -1,4 +1,6 @@
 [viewport-unscaled-size.html]
   [visualViewport.width should exclude scrollbar.]
-    expected: FAIL
+    expected:
+      if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): PASS
+      FAIL
 
deleted file mode 100644
--- a/testing/web-platform/meta/wasm/jsapi/imports.wast.any.js.ini
+++ /dev/null
@@ -1,191 +0,0 @@
-[imports.wast.any.js]
-  expected: FAIL
-  [#202 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#51 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#100 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#146 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#53 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#73 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#49 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#142 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#178 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#148 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#182 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#77 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#61 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#3 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#79 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#41 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#192 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#154 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#200 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#102 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#152 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#190 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#67 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#83 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#4 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#55 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#204 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#69 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#75 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#59 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#198 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#122 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#65 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#57 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#45 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#108 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#123 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#81 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#63 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#85 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#188 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#150 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#138 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#98 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#94 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#43 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#121 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#96 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#106 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#104 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#228 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#71 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#184 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#5 Test that WebAssembly compilation fails]
-    expected: FAIL
-
-  [#47 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#39 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#144 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#136 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#186 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#196 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#140 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#180 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
-  [#194 Test that a WebAssembly module is unlinkable]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/wasm/serialization/window-domain-success.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[window-domain-success.sub.html]
-  expected: TIMEOUT
deleted file mode 100644
--- a/testing/web-platform/meta/wasm/serialization/window-similar-but-cross-origin-success.sub.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[window-similar-but-cross-origin-success.sub.html]
-  expected: TIMEOUT
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini
@@ -0,0 +1,73 @@
+[realtimeanalyser-fft-scaling.html]
+  [X 1024-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 128-point FFT peak position is not equal to 4. Got 0.]
+    expected: FAIL
+
+  [X 32768-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 64-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 4096-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 64-point FFT peak position is not equal to 2. Got 0.]
+    expected: FAIL
+
+  [X 2048-point FFT peak position is not equal to 64. Got 0.]
+    expected: FAIL
+
+  [< [FFT scaling tests\] 22 out of 22 assertions were failed.]
+    expected: FAIL
+
+  [X 128-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 8192-point FFT peak position is not equal to 256. Got 0.]
+    expected: FAIL
+
+  [X 32-point FFT peak value in dBFS is not greater than or equal to -14.43. Got -1000.]
+    expected: FAIL
+
+  [X 16384-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 256-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 8192-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 1024-point FFT peak position is not equal to 32. Got 0.]
+    expected: FAIL
+
+  [X 512-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 32-point FFT peak position is not equal to 1. Got 0.]
+    expected: FAIL
+
+  [X 16384-point FFT peak position is not equal to 512. Got 0.]
+    expected: FAIL
+
+  [X 2048-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
+    expected: FAIL
+
+  [X 32768-point FFT peak position is not equal to 1024. Got 0.]
+    expected: FAIL
+
+  [X 4096-point FFT peak position is not equal to 128. Got 0.]
+    expected: FAIL
+
+  [X 512-point FFT peak position is not equal to 16. Got 0.]
+    expected: FAIL
+
+  [X 256-point FFT peak position is not equal to 8. Got 0.]
+    expected: FAIL
+
+  [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-convolvernode-interface/convolution-mono-mono.html.ini
@@ -0,0 +1,10 @@
+[convolution-mono-mono.html]
+  [X Deviation (in dB) of triangular portion of convolution is not less than or equal to -124.41. Got 0.]
+    expected: FAIL
+
+  [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+    expected: FAIL
+
+  [< [test\] 1 out of 4 assertions were failed.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-convolvernode-interface/convolver-cascade.html.ini
@@ -0,0 +1,10 @@
+[convolver-cascade.html]
+  [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+    expected: FAIL
+
+  [X Output of cascaded mono convolvers should have contain at least one value different from 0.]
+    expected: FAIL
+
+  [< [cascade-mono\] 1 out of 1 assertions were failed.]
+    expected: FAIL
+
--- a/testing/web-platform/meta/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html.ini
+++ b/testing/web-platform/meta/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html.ini
@@ -66,8 +66,14 @@
     expected: FAIL
 
   [< [1-channel input\] 1 out of 2 assertions were failed.]
     expected: FAIL
 
   [X 1: Channel 1: Expected 0 for all values but found 1279 unexpected values: \n\tIndex\tActual\n\t[1\]\t-2.9802322387695312e-8\n\t[2\]\t0.33110618591308594\n\t[3\]\t0.6248594522476196\n\t[4\]\t0.8481202721595764\n\t...and 1275 more errors.]
     expected: FAIL
 
+  [# AUDIT TASK RUNNER FINISHED: 1 out of 6 tasks were failed.]
+    expected: FAIL
+
+  [X Convolver output does not equal [0,0,0.3311063051223755,0.6248595118522644,0.8481203317642212,0.9757021069526672,0.9932119250297546,0.8986744284629822,0.7027547359466553,0.42755505442619324,0.1041216030716896,-0.23105813562870026,-0.5401715040206909,-0.7883464694023132,-0.9475855827331543,-0.9999247193336487...\] with an element-wise tolerance of {"absoluteThreshold":4.1724e-7,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[2\]\t0.0000000000000000e+0\t3.3110630512237549e-1\t3.3110630512237549e-1\t1.0000000000000000e+0\t4.1724000000000000e-7\n\t[3\]\t0.0000000000000000e+0\t6.2485951185226440e-1\t6.2485951185226440e-1\t1.0000000000000000e+0\t4.1724000000000000e-7\n\t[4\]\t0.0000000000000000e+0\t8.4812033176422119e-1\t8.4812033176422119e-1\t1.0000000000000000e+0\t4.1724000000000000e-7\n\t[5\]\t0.0000000000000000e+0\t9.7570210695266724e-1\t9.7570210695266724e-1\t1.0000000000000000e+0\t4.1724000000000000e-7\n\t[6\]\t0.0000000000000000e+0\t9.9321192502975464e-1\t9.9321192502975464e-1\t1.0000000000000000e+0\t4.1724000000000000e-7\n\t...and 1273 more errors.\n\tMax AbsError of 1.0000000000000000e+0 at index of 257.\n\t[257\]\t0.0000000000000000e+0\t-1.0000000000000000e+0\t1.0000000000000000e+0\t1.0000000000000000e+0\t4.1724000000000000e-7\n\tMax RelError of 1.0000000000000000e+0 at index of 2.\n]
+    expected: FAIL
+
--- a/testing/web-platform/meta/webauthn/__dir__.ini
+++ b/testing/web-platform/meta/webauthn/__dir__.ini
@@ -1,1 +1,2 @@
 prefs: [security.webauth.webauthn:true]
+lsan-allowed: [AddDataProperty, Alloc, AsyncFunctionResume, AtomizeAndCopyChars, AttemptToExecute, Call, CallFromStack, CallJSNative, CompileSourceBuffer, CompileUtf8, DefineAccessorPropertyById, DefineDataProperty, EndDocUpdate, EnsureWebAuthnManager, EnterBaseline, EnterJit, EntrySlotOrCreate, Evaluate, ExecuteInExtensibleLexicalEnvironment, FinishSlowJSInitIfMoreThanOneOwner, Fold, GetOrCreateDOMReflector, GetProperty, GetProtoObjectHandle, GetRefreshDriver, HandleEvent, Interpret, JS::Call, JS::CloneAndExecuteScript, JS::CompileForNonSyntacticScope, JS::CompileUtf8ForNonSyntacticScope, JS::InitSelfHostedCode, JSFunction::createScriptForLazilyInterpretedFunction, JSRuntime::cloneSelfHostedFunctionScript, LeaveMicroTask, LookupOwnPropertyInline, LookupPropertyInline, MaybeReject, MessageLoop::Run, NS_ProcessNextEvent, NativeDefineDataProperty, NativeGetPropertyInline, NewEmptyScopeData, NewObjectWithClassProto, NextEnvironmentShape, PermitUnload, PrepareAndDispatch, Quote, Realloc, RunHandler, RunInternal, SetProperty, ToJSValue, Wrap, WrapObject, XPCConvert::NativeInterface2JSObject, XPCWrappedNative::CallMethod, XRE_InitChildProcess, _$LT$alloc..raw_vec..RawVec$LT$T$C$$u20$A$GT$$GT$::reserve_internal, _$LT$alloc..raw_vec..RawVec$LT$T$C$$u20$A$GT$$GT$::shrink_to_fit, _$LT$alloc..vec..Vec$LT$T$GT$$GT$::reserve, _$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..SpecExtend$LT$T$C$$u20$I$GT$$GT$::from_iter, addDataProperty, alloc::alloc::realloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc::, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc::, atomizeAndCopyChars, callMain, compileIfNecessary, condExpr, createObject, emitLexicalScopeBody, ensureConstructor, getOrCreateArrayIteratorPrototype, getOrCreatePrototype, getOrCreateScript, init, inlinedGetChild, innerFunction, internBodyScope, internScope, js::Atomize, js::AtomizeChars, js::Call, js::CallGetter, js::CloneScriptIntoFunction, js::CreateThisForFunctionWithProto, js::DefineDataProperty, js::DefineFunctions, js::Execute, js::ExecuteKernel, js::FetchName, js::ForwardingProxyHandler::get, js::GetEnvironmentName, js::GetProperty, js::InternalCallOrConstruct, js::LazyScript::Create, js::LazyScript::CreateRaw, js::LookupProperty, js::MapObject::create, js::NativeDefineDataProperty, js::NativeDefineProperty, js::NativeGetExistingProperty, js::NativeGetProperty, js::NativeObject::growSlots, js::ObjectGroup::defaultNewGroup, js::PropertyTree::insertChild, js::ReportErrorNumberVA, js::RunScript, js::Shape::hashify, js::ShapeTable::init, js::ToPrimitiveSlow, js::XDRState, js::detail::OrderedHashTable, js::detail::ThreadTrampoline, js::frontend::BytecodeEmitter::emitAssignment, js::frontend::BytecodeEmitter::emitFunction, js::frontend::BytecodeEmitter::emitFunctionFormalParametersAndBody, js::frontend::BytecodeEmitter::emitLexicalScope, js::frontend::BytecodeEmitter::emitPropertyList, js::frontend::BytecodeEmitter::emitScript, js::frontend::BytecodeEmitter::emitTree, js::frontend::CompileGlobalScript, js::frontend::CompileLazyFunction, js::frontend::EmitterScope::enterFunction, js::frontend::GeneralParser, js::frontend::ParseNodeVisitor, js::frontend::Parser, js::frontend::ScriptCompiler, js::frontend::SourceAwareCompiler, js::frontend::SwitchEmitter::emitLexical, js::frontend::TokenStreamSpecific, js_arena_realloc, main, make_unique, maybeCreateTableForLookup, maybe_pod_malloc, mozJSComponentLoader::Import, mozJSComponentLoader::ImportInto, mozJSComponentLoader::ObjectForLocation, mozilla::EventDispatcher::Dispatch, mozilla::EventListenerManager::HandleEventInternal, mozilla::EventTargetChainItem::HandleEvent, mozilla::PromiseJobRunnable::Run, mozilla::Result, mozilla::SchedulerGroup::Runnable::Run, mozilla::UniquePtr, mozilla::detail::HashTable, mozilla::detail::RunnableMethodImpl, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::ChromeUtils::Import, mozilla::dom::ContentChild::RecvLoadProcessScript, mozilla::dom::CreateGlobal, mozilla::dom::CreateInterfaceObjects, mozilla::dom::DOMException::Create, mozilla::dom::DefineProperties, mozilla::dom::Document::OnPageHide, mozilla::dom::EventListener::HandleEvent, mozilla::dom::EventTarget::DispatchEvent, mozilla::dom::Event_Binding::CreateInterfaceObjects, mozilla::dom::ExecuteCompiledScript, mozilla::dom::Function::Call, mozilla::dom::GetPerInterfaceObjectHandle, mozilla::dom::InitIds, mozilla::dom::MatchPatternSet_Binding::CreateInterfaceObjects, mozilla::dom::MessageListener::ReceiveMessage, mozilla::dom::Navigator::Credentials, mozilla::dom::PBrowserChild::OnMessageReceived, mozilla::dom::PContentChild::OnMessageReceived, mozilla::dom::Performance::CreateForMainThread, mozilla::dom::ScriptLoader::ProcessRequest, mozilla::dom::ScriptLoader::ProcessScriptElement, mozilla::dom::StructuredCloneHolder::ReadFromBuffer, mozilla::dom::TabChild::RecvAsyncMessage, mozilla::dom::TabChild::RecvLoadRemoteScript, mozilla::dom::TabChildBase::GetPresShell, mozilla::dom::TimeoutExecutor::Notify, mozilla::dom::TimeoutManager::RunTimeout, mozilla::dom::WebIDLGlobalNameHash::ResolveForSystemGlobal, mozilla::dom::Window_Binding::ClearCachedDocumentValue, mozilla::dom::Window_Binding::get_document, mozilla::dom::binding_detail::GenericGetter, mozilla::extensions::WebExtensionPolicy::GetURL, mozilla::ipc::MessageChannel::DispatchMessage, mozilla::ipc::MessageChannel::RunMessage, mozilla::net::HttpChannelChild::OnStartRequest, mozilla::net::StartRequestEvent::Run, mozilla::net::nsStandardURL::TemplatedMutator, nsBaseAppShell::Run, nsContentUtils::DispatchEvent, nsDSURIContentListener::DoContent, nsDocLoader::DocLoaderIsEmpty, nsDocLoader::FireOnStateChange, nsDocShell::DoChannelLoad, nsDocShell::DoURILoad, nsDocShell::EnsureContentViewer, nsDocShell::FirePageHideNotificationInternal, nsDocShell::InternalLoad, nsDocShell::LoadURI, nsDocumentOpenInfo::OnStartRequest, nsDocumentOpenInfo::TryContentListener, nsDocumentViewer::Init, nsFrameMessageManager::ReceiveMessage, nsGlobalWindowInner::RunTimeoutHandler, nsHtml5TreeOpExecutor::RunFlushLoop, nsIDocument::DispatchPageTransition, nsIDocument::OnPageShow, nsJSUtils::ExecutionContext::ExecScript, nsMessageManagerScriptExecutor::LoadScriptInternal, nsPIDOMWindowOuter::MaybeCreateDoc, nsTSubstring, nsThread::ProcessNextEvent, nsTimerEvent::Run, nsWebBrowser::SetDocShell, operator, pod_malloc, readString, selectors::parser::parse_functional_pseudo_class, setFilename, start_thread, style::gecko::selector_parser::_$LT$impl$u20$selectors..parser..Parser$LT$$u27$i$GT$$u20$for$u20$style..selector_parser..SelectorParser$LT$$u27$a$GT$$GT$::parse_non_ts_functional_pseudo_class, trySyntaxParseInnerFunction, unknown stack, updateSlotsForSpan, variableStatement, xpc::IfaceID2JSValue, xpc::XrayWrapper]
--- a/testing/web-platform/meta/webrtc-quic/RTCQuicStream.https.html.ini
+++ b/testing/web-platform/meta/webrtc-quic/RTCQuicStream.https.html.ini
@@ -210,8 +210,83 @@
     expected: FAIL
 
   [waitForReadable() promises immediately rejected with InvalidStateError after finish is read out.]
     expected: FAIL
 
   [Pending waitForWriteBufferedAmountBelow() promises rejected after RTCQuicTransport stop().]
     expected: FAIL
 
+  [Stream closed by by reading remote finish, followed by writing a finish: waitForReadable() rejects with InvalidStateError.]
+    expected: FAIL
+
+  [waitForReadable() promise resolves with remote finish]
+    expected: FAIL
+
+  [Reading out finish on stream that has already called write() with a finish  state to 'closed'.]
+    expected: FAIL
+
+  [write() without finish and an empty array throws NotSupportedError.]
+    expected: FAIL
+
+  [write() data with a finish adds to writeBufferedAmount.]
+    expected: FAIL
+
+  [writeBufferedAmount set to 0 after reading remote finish, followed by write() with finish.]
+    expected: FAIL
+
+  [write() with a finish on a stream that has already read out finish changes state to 'closed'.]
+    expected: FAIL
+
+  [write() throws InvalidStateError if write() with finish has been called.]
+    expected: FAIL
+
+  [Stream closed by writing a finish, followed by reading remote finish: readInto() throws InvalidStateError.]
+    expected: FAIL
+
+  [write() with a finish changes state to 'closing'.]
+    expected: FAIL
+
+  [Stream closed by by reading remote finish, followed by writing a finish: waitForWriteBufferedBelow() rejects with InvalidStateError.]
+    expected: FAIL
+
+  [reset() following write with finish changes state to 'closed'.]
+    expected: FAIL
+
+  [waitForWriteBufferedAmountBelow() promises immediately rejected after wrote finish.]
+    expected: FAIL
+
+  [Stream closed by by reading remote finish, followed by writing a finish: write() throws InvalidStateError.]
+    expected: FAIL
+
+  [Stream closed by writing a finish, followed by reading remote finish: waitForWriteBufferedBelow() rejects with InvalidStateError.]
+    expected: FAIL
+
+  [write() with a finish causes quicstream event to fire on the remote transport.]
+    expected: FAIL
+
+  [Stream closed by writing a finish, followed by reading remote finish: write() throws InvalidStateError.]
+    expected: FAIL
+
+  [waitForReadable() resolves with write() with finish.]
+    expected: FAIL
+
+  [writeBufferedAmount maintained after write() with finish has been called.]
+    expected: FAIL
+
+  [Stream closed by by reading remote finish, followed by writing a finish: readInto() throws InvalidStateError.]
+    expected: FAIL
+
+  [Pending waitForWriteBufferedAmountBelow() promises rejected after write() with finish.]
+    expected: FAIL
+
+  [write() with finish twice throws InvalidStateError.]
+    expected: FAIL
+
+  [Stream closed by writing a finish, followed by reading remote finish: waitForReadable() rejects with InvalidStateError.]
+    expected: FAIL
+
+  [write() without finish and no data throws NotSupportedError.]
+    expected: FAIL
+
+  [write() with a finish and an empty array changes state to 'closing'.]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-setDescription-transceiver.html.ini
@@ -0,0 +1,4 @@
+[RTCPeerConnection-setDescription-transceiver.html]
+  [setRemoteDescription should stop the transceiver if its corresponding m section is rejected]
+    expected: FAIL
+
--- a/testing/web-platform/meta/webrtc/RTCPeerConnection-transceivers.https.html.ini
+++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-transceivers.https.html.ini
@@ -1,19 +1,253 @@
 [RTCPeerConnection-transceivers.https.html]
+  disabled: Bug 1515043
+  expected:
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): TIMEOUT
+    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): TIMEOUT
   [addTransceiver(track, init): initialize sendEncodings[0\].active to false]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
 
   [addTrack(0 streams): ontrack fires with no stream]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
 
   [addTrack(2 streams): ontrack fires with corresponding two streams]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
 
   [setRemoteDescription(offer): ontrack's track.id is the same as track.id]
-    expected: FAIL
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      FAIL
 
   [addTransceiver(2 streams): ontrack fires with corresponding two streams]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
 
   [Closing the PC stops the transceivers]
-    expected: FAIL
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
+
+  [setLocalDescription(answer): transceiver.currentDirection is recvonly]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [Can setup two-way call using a single transceiver]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('video'): transceiver.receiver.track.kind == 'video']
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('audio'): transceiver.stopped is false]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [setLocalDescription(answer): transceiver.currentDirection is sendonly]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [Changing transceiver direction to 'sendrecv' makes ontrack fire]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTrack(1 stream): ontrack fires with corresponding stream]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver(track, init): initialize direction to inactive]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver(0 streams): ontrack fires with no stream]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver(1 stream): ontrack fires with corresponding stream]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
 
+  [addTransceiver does not reuse reusable transceivers]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver(track): "transceiver == {sender,receiver}"]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('audio'): transceiver.sender.track == null]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('audio'): creates a transceiver with direction sendrecv]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('audio'): transceiver.currentDirection is null]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver('audio'): transceiver.receiver.track.kind == 'audio']
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [setRemoteDescription(offer): transceiver.stopped is false]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTransceiver(track): creates a transceiver for the track]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [addTrack reuses reusable transceivers]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [setRemoteDescription(offer): transceiver.direction is recvonly]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [setRemoteDescription(offer): transceiver.currentDirection is null]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
--- a/testing/web-platform/meta/webrtc/RTCRtpReceiver-getParameters.html.ini
+++ b/testing/web-platform/meta/webrtc/RTCRtpReceiver-getParameters.html.ini
@@ -1,4 +1,13 @@
 [RTCRtpReceiver-getParameters.html]
   [RTCRtpReceiver.prototype.getParameters]
     expected: FAIL
 
+  [getParameters() with simulcast video receiver]
+    expected: FAIL
+
+  [getParameters() with video receiver]
+    expected: FAIL
+
+  [getParameters() with audio receiver]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webrtc/RTCRtpSender-replaceTrack.https.html.ini
@@ -0,0 +1,2 @@
+[RTCRtpSender-replaceTrack.https.html]
+  disabled: Bug 1515043
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webrtc/RTCRtpSender-transport.https.html.ini
@@ -0,0 +1,16 @@
+[RTCRtpSender-transport.https.html]
+  [RTCRtpSender/receiver.transport at the right time, with bundle policy balanced]
+    expected: FAIL
+
+  [RTCRtpSender/receiver.transport at the right time, with bundle policy max-bundle]
+    expected: FAIL
+
+  [RTCRtpSender/receiver.transport at the right time, with bundle policy max-compat]
+    expected: FAIL
+
+  [RTCRtpSender/receiver.transport has a value when connected]
+    expected: FAIL
+
+  [RTCRtpSender.transport is null when unconnected]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webrtc/RTCRtpTransceiver.https.html.ini
@@ -0,0 +1,122 @@
+[RTCRtpTransceiver.https.html]
+  disabled: Bug 1515043
+  expected:
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): TIMEOUT
+    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): TIMEOUT
+    if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): TIMEOUT
+  [checkStop]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      FAIL
+
+  [checkMsectionReuse]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkRemoteRollback]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkAddTransceiverNoTrackDoesntPair]
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterClose]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterCreateOffer]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkLocalRollback]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkSendrecvWithTracklessStream]
+    expected:
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterCreateAnswer]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterSetLocalAnswer]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterSetRemoteOffer]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkSendrecvWithNoSendTrack]
+    expected:
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkStopAfterSetLocalOffer]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
+  [checkRollbackAndSetRemoteOfferWithDifferentType]
+    expected:
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+      if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): NOTRUN
+      if not debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): NOTRUN
+
--- a/testing/web-platform/meta/webrtc/__dir__.ini
+++ b/testing/web-platform/meta/webrtc/__dir__.ini
@@ -1,2 +1,3 @@
 prefs: [media.navigator.permission.disabled:true, media.navigator.streams.fake:true]
-leak-threshold: [default:51200]
+lsan-allowed: [AddTrack, Alloc, AllocateObjectBuffer, AllocateProtoAndIfaceCache, AsyncFunctionPromiseReactionJob, AsyncFunctionResume, AtomizeAndCopyChars, AtomizeAndCopyCharsFromLookup, AttemptToExecute, Call, CallFromStack, CallGetter, CallJSNative, CallResolveOp, CloneObject, CompileLazyFunctionImpl, CompileSourceBuffer, CopyScopeData, CreateNativeGlobalForInner, Define, DefineDataProperty, DoGetOrCreateDOMReflector, EnsureInnerWindow, EnterJit, EntrySlotOrCreate, Evaluate, ExecuteInExtensibleLexicalEnvironment, ExecuteScript, FinishSlowJSInitIfMoreThanOneOwner, GatherAndConvertResults, GetDocument, GetIDPrototype, GetNameOperation, GetProperty, GetPropertyOperation, GetProtoObjectHandle, HandleEvent, InternalConstruct, Interpret, InvokeMethod, JS::Call, JS::CloneAndExecuteScript, JS::CompileUtf8ForNonSyntacticScope, JS::EvaluateUtf8, JSFunction::createScriptForLazilyInterpretedFunction, JSRuntime::cloneSelfHostedFunctionScript, JSRuntime::initSelfHosting, JSScript::createPrivateScriptData, JSScript::fullyInitFromEmitter, JS_CallFunctionValue, JS_ResolveStandardClass, LookupOwnPropertyInline, MakeFlatStringForAtomization, MakeRefPtr, MakeUnique, Malloc, NS_ProcessNextEvent, NativeDefineDataProperty, NewObjectWithClassProto, NewStringCopyUTF8Z, NewStringDeflated, NextEnvironmentShape, PromiseConstructor, ProtoAndIfaceCache, ReadStructuredClone, Realloc, ReceiveMessage, RunHandler, RunInternal, SetExistingProperty, SetNonexistentProperty, SetRemoteDescription, SharedStub, TraceWholeCell, Wrap, XDRTrailingName, XPCConvert::NativeInterface2JSObject, XPCJSContext::AfterProcessTask, XPCNativeInterface::NewInstance, XPC_WN_Helper_Resolve, XRE_InitChildProcess, XRE_RunAppShell, _M_begin, accept, addDataProperty, alloc::alloc::realloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc, allocate, already_AddRefed, apply, applyImpl, assignExprWithoutYieldOrAwait, callMain, createFrameFromLookup, createObject, createScriptSource, emitInitializer, emitLexicalScopeBody, emitStatementList, ensureConstructor, functionDelazifying, inlinedGetChild, innerFunction, internBodyScope, js::Allocate, js::Call, js::CallSelfHostedFunction, js::CloneFunctionAndScript, js::CloneScriptIntoFunction, js::CreateThisForFunctionWithProto, js::CrossCompartmentWrapper::set, js::DefineDataProperty, js::DefineFunctions, js::Execute, js::ExecuteInJSMEnvironment, js::ExecuteKernel, js::FetchName, js::FunctionScope::create, js::GetEnvironmentName, js::GetProperty, js::GlobalObject::resolveConstructor, js::HashableValue::setValue, js::HelperThread::threadLoop, js::InitMathClass, js::InternalCallOrConstruct, js::LazyScript::CreateRaw, js::LexicalScope::create, js::MapObject::set, js::NativeDefineProperty, js::NativeGetExistingProperty, js::NativeSetProperty, js::ObjectGroup::defaultNewGroup, js::PropertyTree::getChild, js::Proxy::has, js::RunScript, js::SavedStacks::getOrCreateSavedFrame, js::ScriptParseTask::parse, js::SetPropertyIgnoringNamedGetter, js::Shape::hashify, js::StringBuffer::finishAtom, js::WrapAsyncFunction, js::XDRState, js::detail::ThreadTrampoline, js::frontend::BytecodeEmitter::emitArguments, js::frontend::BytecodeEmitter::emitAssignment, js::frontend::BytecodeEmitter::emitCallOrNew, js::frontend::BytecodeEmitter::emitCalleeAndThis, js::frontend::BytecodeEmitter::emitClass, js::frontend::BytecodeEmitter::emitConditionalExpression, js::frontend::BytecodeEmitter::emitExpressionStatement, js::frontend::BytecodeEmitter::emitFunction, js::frontend::BytecodeEmitter::emitFunctionBody, js::frontend::BytecodeEmitter::emitFunctionFormalParametersAndBody, js::frontend::BytecodeEmitter::emitFunctionScript, js::frontend::BytecodeEmitter::emitHoistedFunctionsInList, js::frontend::BytecodeEmitter::emitLexicalScope, js::frontend::BytecodeEmitter::emitObject, js::frontend::BytecodeEmitter::emitPropertyList, js::frontend::BytecodeEmitter::emitScript, js::frontend::BytecodeEmitter::emitSingleDeclaration, js::frontend::BytecodeEmitter::emitTree, js::frontend::CompileGlobalScript, js::frontend::GeneralParser, js::frontend::NameFunctions, js::frontend::ParseNodeVisitor, js::frontend::Parser, js::frontend::ScriptCompiler, js::frontend::SourceAwareCompiler, js::frontend::TokenStreamSpecific, js::fun_call, js::jit::DoGetIntrinsicFallback, js::jit::InterpretResume, js::jit::InvokeFunction, js_arena_realloc, js_pod_arena_malloc, main, make_pod_array, make_unique, maybeCreateTableForLookup, maybe_pod_malloc, maybe_pod_realloc, mozJSComponentLoader::ExtractExports, mozJSComponentLoader::Import, mozJSComponentLoader::ImportInto, mozJSComponentLoader::ObjectForLocation, mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint, mozilla::DOMEventTargetHelper::DispatchEvent, mozilla::EventDispatcher::Dispatch, mozilla::EventTargetChainItem::HandleEvent, mozilla::JsepAudioCodecDescription::Clone, mozilla::JsepSessionImpl::GetTransceiverForRemote, mozilla::JsepTrack::CreateEncodings, mozilla::PeerConnectionImpl::SetLocalDescription, mozilla::PeerConnectionMedia::AddTransceiver, mozilla::PromiseJobRunnable::Run, mozilla::Result, mozilla::SchedulerGroup::Runnable::Run, mozilla::SupportsWeakPtr, mozilla::TransceiverImpl::SyncWithJS, mozilla::WeakPtr, mozilla::dom::, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::ChromeUtils::Import, mozilla::dom::ChromeUtils_Binding::import, mozilla::dom::ContentChild::RecvLoadProcessScript, mozilla::dom::ContentFrameMessageManager_Binding::get_content, mozilla::dom::ContentProcessMessageManager::LoadScript, mozilla::dom::CreateInterfaceObjects, mozilla::dom::Document::UnblockOnload, mozilla::dom::Event::ConstructorInit, mozilla::dom::ExecuteCompiledScript, mozilla::dom::Function::Call, mozilla::dom::GetPerInterfaceObjectHandle, mozilla::dom::InitIds, mozilla::dom::Location_Binding::set_href, mozilla::dom::MessageListener::ReceiveMessage, mozilla::dom::PBrowserChild::OnMessageReceived, mozilla::dom::PContentChild::OnMessageReceived, mozilla::dom::PeerConnectionImpl_Binding::setLocalDescription, mozilla::dom::PeerConnectionObserverJSImpl::OnSetRemoteDescriptionSuccess, mozilla::dom::PeerConnectionObserverJSImpl::OnStateChange, mozilla::dom::Performance::CreateForMainThread, mozilla::dom::Performance::WrapObject, mozilla::dom::PerformanceMainThread::Timing, mozilla::dom::PerformanceTiming::PerformanceTiming, mozilla::dom::PromiseJobCallback::Call, mozilla::dom::RTCPeerConnection::Constructor, mozilla::dom::RTCPeerConnectionJSImpl::AddTrack, mozilla::dom::RTCPeerConnection_Binding::setRemoteDescription_promiseWrapper, mozilla::dom::RTCRtpReceiver::_Create, mozilla::dom::RTCRtpReceiverJSImpl::ProcessTrackAdditionsAndRemovals, mozilla::dom::RTCRtpSender::_Create, mozilla::dom::RTCRtpTransceiver::_Create, mozilla::dom::RTCRtpTransceiverJSImpl::Sync, mozilla::dom::RTCTrackEvent::Constructor, mozilla::dom::ScriptLoader::ProcessInlineScript, mozilla::dom::ScriptLoader::ProcessRequest, mozilla::dom::ScriptLoader::ProcessScriptElement, mozilla::dom::TabChildBase::GetPresShell, mozilla::dom::TimeoutExecutor::MaybeExecute, mozilla::dom::TimeoutManager::RunTimeout, mozilla::dom::ToJSValue, mozilla::dom::WebIDLGlobalNameHash::DefineIfEnabled, mozilla::dom::Window_Binding::ClearCachedDocumentValue, mozilla::dom::ipc::SharedMap::Entry::Read, mozilla::dom::module_getter::ModuleGetter, mozilla::ipc::MessageChannel::DispatchAsyncMessage, mozilla::ipc::MessageChannel::DispatchMessage, mozilla::ipc::MessageChannel::MessageTask::Run, mozilla::ipc::MessageChannel::RunMessage, mozilla::ipc::MessagePump::Run, mozilla::layers::PaintThread::Shutdown, mozilla::net::HttpChannelChild::DoOnStartRequest, mozilla::net::HttpChannelChild::OnStopRequest, mozilla::net::nsLoadGroup::RemoveRequest, mozilla::net::nsStandardURL::TemplatedMutator, nsAppStartupNotifier::NotifyObservers, nsBaseAppShell::Run, nsContentUtils::RemoveScriptBlocker, nsDocLoader::DoFireOnStateChange, nsDocLoader::OnSecurityChange, nsDocLoader::OnStopRequest, nsDocShell::Embed, nsDocShell::EndPageLoad, nsDocShell::EnsureContentViewer, nsDocShell::InternalLoad, nsDocShell::LoadURI, nsDocShell::SetupNewViewer, nsDocumentOpenInfo::DispatchContent, nsDocumentViewer::LoadComplete, nsGlobalWindowInner::InnerSetNewDocument, nsGlobalWindowOuter::SetNewDocument, nsHtml5ExecutorReflusher::Run, nsMessageManagerScriptExecutor::LoadScriptInternal, nsPIDOMWindowOuter::MaybeCreateDoc, nsSecureBrowserUIImpl::OnLocationChange, nsTString, nsThread::ProcessNextEvent, nsWebBrowser::SetDocShell, nsXPCWrappedJSClass::CallMethod, nsXPConnect::InitStatics, onGMPReady, operator, orExpr, peekToken, pod_malloc, putNew, reserve, resolveFun, selectors::parser::parse_compound_selector_list, setLastProperty, start_thread, style::gecko::selector_parser::_$LT$impl$u20$selectors..parser..Parser$LT$$u27$i$GT$$u20$for$u20$style..selector_parser..SelectorParser$LT$$u27$a$GT$$GT$::parse_non_ts_functional_pseudo_class, traceSlots, traverse, trySyntaxParseInnerFunction, unknown stack, updateSlotsForSpan, xpc::CloneInto, xpc::DOMXrayTraits::resolveOwnProperty, xpc::XrayWrapper, xpcModuleCtor]
+leak-threshold: [default:51200, tab:256000]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/websockets/binary/__dir__.ini
@@ -0,0 +1,1 @@
+lsan-allowed: [MakeUnique, mozilla::dom::WebSocket::ConstructorCommon, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/websockets/constructor/__dir__.ini
@@ -0,0 +1,1 @@
+lsan-allowed: [MakeUnique, mozilla::dom::WebSocket::ConstructorCommon, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate]
deleted file mode 100644
--- a/testing/web-platform/meta/webstorage/document-domain.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[document-domain.html]
-  expected: TIMEOUT
--- a/testing/web-platform/meta/webxr/idlharness.https.window.js.ini
+++ b/testing/web-platform/meta/webxr/idlharness.https.window.js.ini
@@ -885,8 +885,50 @@
     expected: FAIL
 
   [XRBoundedReferenceSpace interface: existence and properties of interface prototype object]
     expected: FAIL
 
   [XRSpace interface: existence and properties of interface prototype object's "constructor" property]
     expected: FAIL
 
+  [XRRigidTransform interface object length]
+    expected: FAIL
+
+  [XRRigidTransform interface: existence and properties of interface prototype object's "constructor" property]
+    expected: FAIL
+
+  [XRReferenceSpaceEvent interface: attribute transform]
+    expected: FAIL
+
+  [XRRigidTransform interface: attribute position]
+    expected: FAIL
+
+  [XRRigidTransform interface: existence and properties of interface prototype object]
+    expected: FAIL
+
+  [XRRay interface: attribute matrix]
+    expected: FAIL
+
+  [XRView interface: attribute transform]
+    expected: FAIL
+
+  [XRRigidTransform interface: existence and properties of interface object]
+    expected: FAIL
+
+  [XRInputPose interface: attribute gripTransform]
+    expected: FAIL
+
+  [XRRigidTransform interface object name]
+    expected: FAIL
+
+  [XRRigidTransform interface: existence and properties of interface prototype object's @@unscopables property]
+    expected: FAIL
+
+  [XRViewerPose interface: attribute transform]
+    expected: FAIL
+
+  [XRRigidTransform interface: attribute orientation]
+    expected: FAIL
+
+  [XRRigidTransform interface: attribute matrix]
+    expected: FAIL
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/workers/importscripts_mime.any.js.ini
@@ -0,0 +1,77 @@
+[importscripts_mime.any.serviceworker.html]
+
+[importscripts_mime.any.sharedworker.html]
+  [importScripts() requires scripty MIME types: aaa/aaa is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: Text/html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: zzz/zzz is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: application/octet-stream is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/potato is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: TEXT/HTML is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: potato/text is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/Html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: TeXt/HtMl is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: application/xml is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/plain is blocked.]
+    expected: FAIL
+
+
+[importscripts_mime.any.worker.html]
+  [importScripts() requires scripty MIME types: aaa/aaa is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: Text/html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: zzz/zzz is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: application/octet-stream is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/potato is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: TEXT/HTML is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: potato/text is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/Html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: TeXt/HtMl is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/html is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: application/xml is blocked.]
+    expected: FAIL
+
+  [importScripts() requires scripty MIME types: text/plain is blocked.]
+    expected: FAIL
+
deleted file mode 100644
--- a/testing/web-platform/meta/workers/importscripts_mime.tentative.any.js.ini
+++ /dev/null
@@ -1,74 +0,0 @@
-[importscripts_mime.tentative.any.sharedworker.html]
-  [importScripts() requires scripty MIME types: aaa/aaa is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: Text/html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: zzz/zzz is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: application/octet-stream is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/potato is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: TEXT/HTML is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: potato/text is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/Html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: TeXt/HtMl is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: application/xml is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/plain is blocked.]
-    expected: FAIL
-
-
-[importscripts_mime.tentative.any.worker.html]
-  [importScripts() requires scripty MIME types: aaa/aaa is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: Text/html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: zzz/zzz is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: application/octet-stream is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/potato is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: TEXT/HTML is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: potato/text is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/Html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: TeXt/HtMl is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/html is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: application/xml is blocked.]
-    expected: FAIL
-
-  [importScripts() requires scripty MIME types: text/plain is blocked.]
-    expected: FAIL
copy from testing/web-platform/meta/html/semantics/embedded-content/__dir__.ini
copy to testing/web-platform/meta/worklets/__dir__.ini
--- a/testing/web-platform/meta/worklets/audio-worklet-import.https.html.ini
+++ b/testing/web-platform/meta/worklets/audio-worklet-import.https.html.ini
@@ -1,9 +1,11 @@
 [audio-worklet-import.https.html]
+  disabled:
+    if os == "android": true
   prefs:
     if not release_or_beta: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
   [Importing a script resolves the given promise.]
     expected:
       if release_or_beta: FAIL
 
   [Importing scripts resolves all the given promises.]
     expected:
--- a/testing/web-platform/meta/xhr/responsetype.any.js.ini
+++ b/testing/web-platform/meta/xhr/responsetype.any.js.ini
@@ -9,8 +9,10 @@
     expected: FAIL
 
   [Set responseType to "blob" when readyState is HEADERS_RECEIVED.]
     expected: FAIL
 
   [Set responseType to "text" when readyState is HEADERS_RECEIVED.]
     expected: FAIL
 
+
+[responsetype.any.html]
--- a/testing/web-platform/mozilla/meta/dom/throttling/throttling-webaudio.window.js.ini
+++ b/testing/web-platform/mozilla/meta/dom/throttling/throttling-webaudio.window.js.ini
@@ -1,4 +1,5 @@
 [throttling-webaudio.window.html]
   type: testharness
   disabled:
     if debug: disabled
+
--- a/testing/web-platform/tests/.azure-pipelines.yml
+++ b/testing/web-platform/tests/.azure-pipelines.yml
@@ -8,34 +8,18 @@
 #
 # In addition to this configuration file, the "Build pull requests from forks
 # of this repository" setting must also be enabled in the Azure DevOps project:
 # https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github#validate-contributions-from-forks
 
 trigger: none # disable builds for branches
 
 jobs:
-- job: root
-  displayName: './wpt test-jobs'
-  pool:
-    vmImage: 'ubuntu-16.04'
-  steps:
-  - template: tools/ci/azure/checkout.yml
-  - script: |
-      ./wpt test-jobs | while read job; do
-        echo "$job"
-        echo "##vso[task.setvariable variable=$job;isOutput=true]true";
-      done
-    name: test_jobs
-    displayName: 'Run ./wpt test-jobs'
-
-# Note: the affected tests jobs could depend on test_jobs.stability, but are
-# unconditional for speed, as most PRs have one or more affected tests:
-# https://github.com/web-platform-tests/wpt/issues/13936
-
+# The affected tests jobs are unconditional for speed, as most PRs have one or
+# more affected tests: https://github.com/web-platform-tests/wpt/issues/13936.
 - job: affected_macOS
   displayName: 'affected tests (Safari Technology Preview)'
   pool:
     vmImage: 'macOS-10.13'
   steps:
   - template: tools/ci/azure/affected_tests.yml
     parameters:
       artifactName: 'results'
@@ -46,70 +30,91 @@ jobs:
     vmImage: 'macOS-10.13'
   steps:
   - template: tools/ci/azure/affected_tests.yml
     parameters:
       checkoutCommit: 'HEAD^1'
       affectedRange: 'HEAD@{1}'
       artifactName: 'results-without-changes'
 
+# The decision jobs runs `./wpt test-jobs` to determine which jobs to run,
+# and all following jobs wait for it to finish and depend on its output.
+- job: decision
+  displayName: './wpt test-jobs'
+  pool:
+    vmImage: 'ubuntu-16.04'
+  steps:
+  - template: tools/ci/azure/checkout.yml
+  - script: |
+      ./wpt test-jobs | while read job; do
+        echo "$job"
+        echo "##vso[task.setvariable variable=$job;isOutput=true]true";
+      done
+    name: test_jobs
+    displayName: 'Run ./wpt test-jobs'
+
 - job: infrastructure_macOS
   displayName: 'infrastructure/ tests (macOS)'
-  dependsOn: root
-  condition: dependencies.root.outputs['test_jobs.wptrunner_infrastructure']
+  dependsOn: decision
+  condition: dependencies.decision.outputs['test_jobs.wptrunner_infrastructure']
   pool:
     vmImage: 'macOS-10.13'
   steps:
   - template: tools/ci/azure/checkout.yml
   - template: tools/ci/azure/pip_install.yml
     parameters:
       packages: virtualenv
   - template: tools/ci/azure/install_fonts.yml
   - template: tools/ci/azure/install_certs.yml
   - template: tools/ci/azure/install_chrome.yml
   - template: tools/ci/azure/install_firefox.yml
   - template: tools/ci/azure/install_safari.yml
   - template: tools/ci/azure/update_hosts.yml
   - template: tools/ci/azure/update_manifest.yml
-  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel dev chrome infrastructure/
+  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/chrome.tbpl.log --log-tbpl-level info --channel dev chrome infrastructure/
     displayName: 'Run tests (Chrome Dev)'
-  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel nightly firefox infrastructure/
+  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/firefox.tbpl.log --log-tbpl-level info --channel nightly firefox infrastructure/
     displayName: 'Run tests (Firefox Nightly)'
-  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel preview safari infrastructure/
+  - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/safari.tbpl.log --log-tbpl-level info --channel preview safari infrastructure/
     displayName: 'Run tests (Safari Technology Preview)'
+  - task: PublishBuildArtifacts@1
+    displayName: 'Publish results'
+    inputs:
+      artifactName: 'infrastructure'
+    condition: succeededOrFailed()
 
 - job: tools_unittest_macOS
   displayName: 'tools/ unittests (macOS)'
-  dependsOn: root
-  condition: dependencies.root.outputs['test_jobs.tools_unittest']
+  dependsOn: decision
+  condition: dependencies.decision.outputs['test_jobs.tools_unittest']
   pool:
     vmImage: 'macOS-10.13'
   steps:
   - template: tools/ci/azure/checkout.yml
   - template: tools/ci/azure/tox_pytest.yml
     parameters:
       directory: tools/
       toxenv: py27
 
 - job: wptrunner_unittest_macOS
   displayName: 'tools/wptrunner/ unittests (macOS)'
-  dependsOn: root
-  condition: dependencies.root.outputs['test_jobs.wptrunner_unittest']
+  dependsOn: decision
+  condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
   pool:
     vmImage: 'macOS-10.13'
   steps:
   - template: tools/ci/azure/checkout.yml
   - template: tools/ci/azure/tox_pytest.yml
     parameters:
       directory: tools/wptrunner/
 
 - job: wpt_integration_macOS
   displayName: 'tools/wpt/ tests (macOS)'
-  dependsOn: root
-  condition: dependencies.root.outputs['test_jobs.wpt_integration']
+  dependsOn: decision
+  condition: dependencies.decision.outputs['test_jobs.wpt_integration']
   pool:
     vmImage: 'macOS-10.13'
   steps:
   # full checkout required
   - template: tools/ci/azure/install_chrome.yml
   - template: tools/ci/azure/install_firefox.yml
   - template: tools/ci/azure/update_hosts.yml
   - template: tools/ci/azure/tox_pytest.yml
--- a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html
@@ -1,30 +1,25 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>Async Clipboard write (dt/text) -> read (dt/text) tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
-async_test(function(t) {
-  var test_data = "Clipboard write (dt/text) -> read (dt/text) test data";
-  var cb = navigator.clipboard;
-  var dt = new DataTransfer();
-  dt.items.add(test_data, "text/plain");
+promise_test(async (t) => {
+  const input = "Clipboard write (dt/text) -> read (dt/text) test data";
+  const dt = new DataTransfer();
+  dt.items.add(input, "text/plain");
 
-  cb.write(dt).then(t.step_func(() => {
-    cb.read().then(t.step_func((data) => {
-      assert_equals(data.items.length, 1);
-      data.items[0].getAsString(t.step_func((s) => {
-        assert_equals(s, test_data);
-        t.done();
-      }));
-    }), function() {
-      t.unreached_func("clipboard.read() fail");
-    });
-  }), function() {
-    t.unreached_func("clipboard.write() fail");
+  await navigator.clipboard.write(dt);
+  const output = await navigator.clipboard.read();
+
+  assert_equals(output.items.length, 1);
+  const result_promise = new Promise(resolve => {
+    output.items[0].getAsString(resolve);
   });
+  const string_output = await result_promise;
+  assert_equals(string_output, input);
 }, "Verify write and read clipboard (DataTransfer/text)");
 </script>
 Note: This is a manual test because it writes/reads to the shared system
 clipboard and thus cannot be run async with other tests that might interact
 with the clipboard.
--- a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-text-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-text-manual.https.html
@@ -1,27 +1,20 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>Async Clipboard write (dt/text) -> readText tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
-async_test(function(t) {
-  var test_data = "Clipboard write (dt/text) -> readText test data";
-  var cb = navigator.clipboard;
-  var dt = new DataTransfer();
-  dt.items.add(test_data, "text/plain");
+promise_test(async (t) => {
+  const input = "Clipboard write (dt/text) -> readText test data";
+  const dt = new DataTransfer();
+  dt.items.add(input, "text/plain");
 
-  cb.write(dt).then(t.step_func(() => {
-    cb.readText().then(t.step_func((data) => {
-      assert_equals(data, test_data);
-      t.done();
-    }), function() {
-      t.unreached_func("clipboard.read() fail");
-    });
-  }), function() {
-    t.unreached_func("clipboard.write() fail");
-  });
+  await navigator.clipboard.write(dt);
+  const output = await navigator.clipboard.readText();
+
+  assert_equals(output, input);
 }, "Verify write and read clipboard (DataTransfer/text)");
 </script>
 Note: This is a manual test because it writes/reads to the shared system
 clipboard and thus cannot be run async with other tests that might interact
 with the clipboard.
--- a/testing/web-platform/tests/clipboard-apis/async-write-text-read-dttext-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-text-read-dttext-manual.https.html
@@ -1,27 +1,23 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>Async Clipboard writeText -> read (dt/text) tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
-async_test(function(t) {
-  var test_data = "Clipboard writeText -> read(dt/text) test data";
-  var cb = navigator.clipboard;
-  cb.writeText(test_data).then(t.step_func(() => {
-    cb.read().then(t.step_func((data) => {
-      assert_equals(data.items.length, 1);
-      data.items[0].getAsString(t.step_func((s) => {
-        assert_equals(s, test_data);
-        t.done();
-      }));
-    }), function() {
-      t.unreached_func("clipboard.read() fail");
-    });
-  }), function() {
-    t.unreached_func("clipboard.writeText() fail");
+promise_test(async (t) => {
+  const input = "Clipboard writeText -> read (dt/text) test data";
+
+  await navigator.clipboard.writeText(input);
+  const output = await navigator.clipboard.read();
+
+  assert_equals(output.items.length, 1);
+  const result_promise = new Promise(resolve => {
+    output.items[0].getAsString(resolve);
   });
+  const string_output = await result_promise;
+  assert_equals(string_output, input);
 }, "Verify write and read clipboard (DOMString)");
 </script>
 Note: This is a manual test because it writes/reads to the shared system
 clipboard and thus cannot be run async with other tests that might interact
 with the clipboard.
--- a/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html
@@ -1,24 +1,18 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>Async Clipboard writeText -> readText tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
-async_test(function(t) {
-  var test_data = "Clipboard writeText -> readText test data";
-  var cb = navigator.clipboard;
-  cb.writeText(test_data).then(t.step_func(() => {
-    cb.readText().then(t.step_func((data) => {
-      assert_equals(data, test_data);
-      t.done();
-    }), function() {
-      t.unreached_func("clipboard.readText() fail");
-    });
-  }), function() {
-    t.unreached_func("clipboard.writeText() fail");
-  });
+promise_test(async (t) => {
+  const input = "Clipboard writeText -> readText test data";
+
+  await navigator.clipboard.writeText(input);
+  const output = await navigator.clipboard.readText();
+
+  assert_equals(output, input);
 }, "Verify write and read clipboard (DOMString)");
 </script>
 Note: This is a manual test because it writes/reads to the shared system
 clipboard and thus cannot be run async with other tests that might interact
 with the clipboard.
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/computed-style-animation-parsing.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Animations: parsing computedStyle.animation</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#animation">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="test1"></div>
+<div id="test2"></div>
+<script>
+function testComputedStyle(computedStyle1, computedStyle2, name) {
+  assert_equals(computedStyle1.animationName, name, "computedStyle1.animationName");
+  assert_equals(computedStyle2.animationName, name, "computedStyle2.animationName");
+  assert_equals(computedStyle1.animation, computedStyle2.animation,
+                "computedStyle1 and computedStyle2 should have the same animation");
+}
+
+function testAnimation(input, name) {
+  var style1 = test1.style;
+  var style2 = test2.style;
+  var computedStyle1 = getComputedStyle(test1);
+  var computedStyle2 = getComputedStyle(test2);
+
+  style1.animation = input;
+  style2.animation = style1.animation;
+  testComputedStyle(computedStyle1, computedStyle2, name);
+  style2.animation = computedStyle1.animation;
+  testComputedStyle(computedStyle1, computedStyle2, name);
+}
+
+test(() => {
+  // We are duplicating the logic of testAnimation because the animationName of
+  // the getComputedStyle is "none" when there is no animation.
+  var style1 = test1.style;
+  var style2 = test2.style;
+  var computedStyle1 = getComputedStyle(test1);
+  var computedStyle2 = getComputedStyle(test2);
+
+  style1.animation = "";
+  style2.animation = style1.animation;
+  testComputedStyle(computedStyle1, computedStyle2, "none");
+  style2.animation = computedStyle1.animation;
+  assert_equals(computedStyle2.animationName, "none");
+}, "Test animation name being empty.");
+
+test(() => {
+  testAnimation("myShorthandAnim", "myShorthandAnim");
+}, "Test a non-conflicting animation name.");
+
+test(() => {
+  testAnimation("none", "none");
+  testAnimation("forwards", "none");
+  testAnimation("none forwards", "forwards");
+}, "Test an animation name that is the same as a possible animation fill-mode.");
+
+test(() => {
+  testAnimation("normal", "none");
+  testAnimation("reverse", "none");
+  testAnimation("normal normal", "normal");
+  testAnimation("normal reverse", "reverse");
+}, "Test an animation name that is the same as a possible animation direction.");
+
+test(() => {
+  testAnimation("running", "none");
+  testAnimation("paused", "none");
+  testAnimation("running running", "running");
+  testAnimation("running paused", "paused");
+}, "Test an animation name that is the same as a possible running state.");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/style-animation-parsing.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Animations: parsing style.animation</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#animation">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="test1"></div>
+<div id="test2"></div>
+<script>
+function testStyle(style1, style2, name) {
+  assert_equals(style1.animationName, name, "style1.animationName");
+  assert_equals(style2.animationName, name, "style2.animationName");
+  assert_equals(style1.animation, style2.animation,
+                "style1 and style2 should have the same animation");
+}
+
+function testAnimation(input, name) {
+  var style1 = test1.style;
+  var style2 = test2.style;
+
+  style1.animation = input;
+  style2.animation = style1.animation;
+  testStyle(style1, style2, name);
+}
+
+test(() => {
+  testAnimation("", "");
+}, "Test animation name being empty.");
+
+test(() => {
+  testAnimation("myShorthandAnim", "myShorthandAnim");
+}, "Test a non-conflicting animation name.");
+
+test(() => {
+  testAnimation("none", "none");
+  testAnimation("forwards", "none");
+  testAnimation("none forwards", "forwards");
+}, "Test an animation name that is the same as a possible animation fill-mode.");
+
+test(() => {
+  testAnimation("normal", "none");
+  testAnimation("reverse", "none");
+  testAnimation("normal normal", "normal");
+  testAnimation("normal reverse", "reverse");
+}, "Test an animation name that is the same as a possible animation direction.");
+
+test(() => {
+  testAnimation("running", "none");
+  testAnimation("paused", "none");
+  testAnimation("running running", "running");
+  testAnimation("running paused", "paused");
+}, "Test an animation name that is the same as a possible running state.");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-gradient-subpixel-fills-area.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Background Test: Gradient backgrounds should fill the positioning area</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <link rel="help" href="http://www.w3.org/TR/css3-background">
+  <link rel="match" href="reference/background-gradient-subpixel-fills-area-ref.html">
+  <style>
+    ul {
+      width: 396.875px;
+      overflow: auto;
+      padding: 0;
+      list-style: none;
+      background-color: red;
+    }
+
+    li {
+      float: left;
+    }
+
+    div {
+      display: block;
+      width: 19.6875px;
+      height: 17px;
+      padding: 20px 10px;
+      background: linear-gradient(to bottom, green 0%, darkgreen 100%) darkgreen;
+    }
+  </style>
+</head>
+<body>
+    <ul>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+      <li><div></div></li>
+    </ul>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/background-size-cover-svg.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test: A SVG background should fully cover the positioning area</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <link rel="help" href="http://www.w3.org/TR/css3-background">
+  <link rel="match" href="reference/background-size-cover-svg-ref.html">
+  <style>
+    div {
+      height: 400px;
+      width: 600px;
+      position: relative;
+      background-color: red;
+      background-size: cover;
+      background-repeat: no-repeat;
+      background-position: bottom center;
+      background-image: url("support/rectangle-2560x208.svg");
+    }
+  </style>
+</head>
+
+<body>
+  <div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/reference/background-size-cover-svg-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test Reference</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <style>
+    div {
+      height: 400px;
+      width: 600px;
+      position: relative;
+      background-color: red;
+      background-repeat: repeat;
+      background-position: bottom center;
+      background-image: url("../support/50x50-green.png");
+    }
+  </style>
+</head>
+
+<body>
+  <div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/support/rectangle-2560x208.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2560 208">
+    <rect fill="green" width="2560" height="208"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/reference/background-gradient-subpixel-fills-area-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Background Test Reference</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <style>
+    ul {
+      width: 396.875px;
+      overflow: auto;
+      padding: 0;
+      list-style: none;
+      background-color: red;
+    }
+
+    li {
+      float: left;
+    }
+
+    div {
+      display: block;
+      width: 376.875px;
+      height: 17px;
+      padding: 20px 10px;
+      background: linear-gradient(to bottom, green 0%, darkgreen 100%) darkgreen;
+    }
+  </style>
+</head>
+<body>
+    <ul>
+      <li><div></div></li>
+    </ul>
+</body>
+</html>
--- a/testing/web-platform/tests/css/css-conditional/test_group_insertRule.html
+++ b/testing/web-platform/tests/css/css-conditional/test_group_insertRule.html
@@ -7,17 +7,17 @@
   <link rel="help" href="http://www.w3.org/TR/css3-conditional/#the-cssgroupingrule-interface">
   <meta name="assert" content="requirements in definition of insertRule">
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
 <style id="style">
 @media print {}
 </style>
 </head>
-<body onload="run()">
+<body>
 <div id=log></div>
 <div id="test"></div>
 <script>
 
   var sheet = document.getElementById("style").sheet;
 
   var grouping_rule = sheet.cssRules[0];
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/contain-layout-baseline-005.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Layout containment supress baseline</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
+<link rel="match" href="reference/contain-layout-baseline-005-ref.html">
+<meta name=assert content="This test checks that baseline is suppressed for elements with 'contain: layout', so they are treated as having no baseline (thus its baseline is synthetized).">
+<style>
+.wrapper {
+  height: 110px;
+}
+.wrapper > * {
+  contain: layout;
+  background: cyan;
+  font-size: 20px;
+}
+.wrapper > :nth-child(1) {
+  background: magenta;
+}
+.inline-block {
+  display: inline-block;
+}
+canvas {
+  width: 100px;
+  height: 100px;
+}
+fieldset, details {
+  display: inline-block;
+  width: max-content;
+}
+</style>
+<p>Test passes if it has the same output than the reference (all elements are aligned on the bottom edge).</p>
+<div class="wrapper">
+  <div class="inline-block" style="font-size: 80px;">foo</div>
+  <div class="inline-block">foo</div>
+  <div class="inline-block" style="border: solid thick; padding: 2px;">foo</div>
+  <div style="display: inline-flex;">foo</div>
+  <div style="display: inline-flex; border: solid thick; padding: 2px;">foo</div>
+  <div style="display: inline-grid;">foo</div>
+  <div style="display: inline-grid; border: solid thick; padding: 2px;">foo</div>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <div class="inline-block">foo</div>
+  <button>foo</button>
+  <select><option>foo</option></select>
+  <select multiple style="height: 40px;"><option>foo</option></select>
+  <textarea style="height: 40px;"></textarea>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <input value="foo"></input>
+  <input type="file"></input>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <table style="display: inline-table;"><tr><td>foo</td></tr></table>
+  <canvas></canvas>
+  <fieldset></fieldset>
+  <fieldset><legend>foo</legend></fieldset>
+  <fieldset><legend>foo</legend>foo</fieldset>
+  <details></details>
+  <details><summary>foo</summary>foo</details> <details open="true"><summary>foo</summary>foo</details>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/reference/contain-layout-baseline-005-ref.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<style>
+.wrapper {
+  height: 110px;
+}
+.wrapper > * {
+  vertical-align: bottom;
+  background: cyan;
+  font-size: 20px;
+}
+.wrapper > :nth-child(1) {
+  background: magenta;
+}
+.inline-block {
+  display: inline-block;
+}
+canvas {
+  width: 100px;
+  height: 100px;
+}
+fieldset, details {
+  display: inline-block;
+  width: max-content;
+}
+</style>
+<p>Test passes if it has the same output than the reference (all elements are aligned on the bottom edge).</p>
+<div class="wrapper">
+  <div class="inline-block" style="font-size: 80px;">foo</div>
+  <div class="inline-block">foo</div>
+  <div class="inline-block" style="border: solid thick; padding: 2px;">foo</div>
+  <div style="display: inline-flex;">foo</div>
+  <div style="display: inline-flex; border: solid thick; padding: 2px;">foo</div>
+  <div style="display: inline-grid;">foo</div>
+  <div style="display: inline-grid; border: solid thick; padding: 2px;">foo</div>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <div class="inline-block">foo</div>
+  <button>foo</button>
+  <select><option>foo</option></select>
+  <select multiple style="height: 40px;"><option>foo</option></select>
+  <textarea style="height: 40px;"></textarea>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <input value="foo"></input>
+  <input type="file"></input>
+</div>
+<div class="wrapper">
+  <canvas></canvas>
+  <table style="display: inline-table;"><tr><td>foo</td></tr></table>
+  <canvas></canvas>
+  <fieldset></fieldset>
+  <fieldset><legend>foo</legend></fieldset>
+  <fieldset><legend>foo</legend>foo</fieldset>
+  <details></details>
+  <details><summary>foo</summary>foo</details> <details open="true"><summary>foo</summary>foo</details>
+</div>
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-001.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-001.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap - break-word (basic)</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <link rel="match" href="overflow-wrap-001-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="The 'overflow-wrap' property set 'break-word' breaks the word at an arbitrary point">
 <style>
   #test {
     border: 5px solid orange;
     font: 20px/1 Ahem;
     overflow-wrap: break-word;
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-002.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-002.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap - break-word and white-space - nowrap</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <link rel="help" href="http://www.w3.org/TR/css-text-3/#white-space">
 <link rel="match" href="overflow-wrap-002-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="Test checks that the 'overflow-wrap' property has effect if and only if the 'white-space' allows wrapping">
 <style>
   #ref {
     border: 5px solid orange;
     font: 20px/1 Ahem;
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-003-ref.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test Reference File</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<style>
-  #test {
-    border: 5px solid orange;
-    font: 20px/1 Ahem;
-    width: 20em;
-  }
-</style>
-<body>
-  <p class="instructions">Test passes if the black box displayed in two rows within the orange box.</p>
-  <p id="test">FillerTextFillerText<br>FillerTextFillerText</p>
-</body>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-003.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: overflow-wrap - break-word (white space)</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
-<link rel="match" href="overflow-wrap-003-ref.html">
-<meta name="flags" content="ahem">
-<meta name="assert" content="The 'overflow-wrap' property set 'break-word' breaks line at white space">
-<style>
-  #test {
-    border: 5px solid orange;
-    font: 20px/1 Ahem;
-    overflow-wrap: break-word;
-    width: 20em;
-  }
-</style>
-<body>
-  <p class="instructions">Test passes if the black box displayed in two rows within the orange box.</p>
-  <p id="test">FillerTextFillerText FillerTextFillerText</p>
-</body>
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-004.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-004.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap - normal (basic)</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <link rel="match" href="overflow-wrap-004-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="The 'overflow-wrap' property set 'normal' overflows container">
 <style>
   #test {
     border: 5px solid orange;
     font: 20px/1 Ahem;
     overflow-wrap: normal;
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-005.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: overflow-wrap - normal (white space)</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
-<link rel="match" href="overflow-wrap-003-ref.html">
-<meta name="flags" content="ahem">
-<meta name="assert" content="The 'overflow-wrap' property set 'normal' will break line at white space">
-<style>
-  #test {
-    border: 5px solid orange;
-    font: 20px/1 Ahem;
-    overflow-wrap: normal;
-    width: 20em;
-  }
-</style>
-<body>
-  <p class="instructions">Test passes if the black box displayed in two rows within the orange box.</p>
-  <p id="test">FillerTextFillerText FillerTextFillerText</p>
-</body>
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-break-word-fit-content-001.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/overflow-wrap-break-word-fit-content-001.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap: break-word with fit-content</title>
 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <meta name="flags" content="">
 <link rel="match" href="reference/overflow-wrap-break-word-fit-content-001.html">
-<meta name="assert" content="The 'overflow-wrap: break-word' must not break surrogate pairs">
+<meta name="assert" content="The 'overflow-wrap: break-word' must not break non-BMP characters (which might be represented as surrogate pairs internally)">
 <style>
 .test {
   display: inline-block;
   word-wrap: break-word;
   font-size: 20px;
   line-height: 1;
   margin-bottom: .2em;
 }
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-001.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-001.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: word-wrap - break-word (basic)</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrapproperty">
 <link rel="match" href="overflow-wrap-001-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="The 'word-wrap' property set 'break-word' breaks the word at an arbitrary point">
 <style>
   #test {
     border: 5px solid orange;
     font: 20px/1 Ahem;
     word-wrap: break-word;
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-002.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-002.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: word-wrap - break-word and white-space - nowrap</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <link rel="help" href="http://www.w3.org/TR/css-text-3/#white-space">
 <link rel="match" href="overflow-wrap-002-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="Test checks that the 'word-wrap' property has effect if and only if the 'white-space' allows wrapping">
 <style>
   #ref {
     border: 5px solid orange;
     font: 20px/1 Ahem;
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-003.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-wrap - break-word (white space)</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
-<link rel="match" href="overflow-wrap-003-ref.html">
-<meta name="flags" content="ahem">
-<meta name="assert" content="The 'word-wrap' property set 'break-word' breaks line at white space">
-<style>
-  #test {
-    border: 5px solid orange;
-    font: 20px/1 Ahem;
-    word-wrap: break-word;
-    width: 20em;
-  }
-</style>
-<body>
-  <p class="instructions">Test passes if the black box displayed in two rows within the orange box.</p>
-  <p id="test">FillerTextFillerText FillerTextFillerText</p>
-</body>
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-004.html
+++ b/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-004.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: word-wrap - normal (basic)</title>
 <link rel="author" title="Intel" href="http://www.intel.com">
 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#overflow-wrap-property">
 <link rel="match" href="overflow-wrap-004-ref.html">
 <meta name="flags" content="ahem">
 <meta name="assert" content="The 'word-wrap' property set 'normal' overflows container">
 <style>
   #test {
     border: 5px solid orange;
     font: 20px/1 Ahem;
     word-wrap: normal;
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-005.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-wrap - normal (white space)</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" title="6.2. Overflow Wrapping: the 'word-wrap'/'overflow-wrap' property" href="http://www.w3.org/TR/css-text-3/#overflow-wrap">
-<link rel="match" href="overflow-wrap-003-ref.html">
-<meta name="flags" content="ahem">
-<meta name="assert" content="The 'word-wrap' property set 'normal' will break line at white space">
-<style>
-  #test {
-    border: 5px solid orange;
-    font: 20px/1 Ahem;
-    word-wrap: normal;
-    width: 20em;
-  }
-</style>
-<body>
-  <p class="instructions">Test passes if the black box displayed in two rows within the orange box.</p>
-  <p id="test">FillerTextFillerText FillerTextFillerText</p>
-</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/pre-float-001.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>CSS test preserved spaces and floats interaction</title>
+<link rel="author" title="Koji Ishii" href="kojii@chromium.org">
+<link rel="match" href="reference/pre-float-001-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-property">
+<style>
+html {
+  font-family: Ahem;
+  font-size: 20px;
+  line-height: 1;
+}
+.container {
+  white-space: pre;
+  width: 10ch;
+  margin-bottom: 1em;
+}
+.float {
+  float: left;
+  width: 3ch;
+  height: 2em;
+  background: orange;
+}
+</style>
+<body>
+  <div class="float"></div>
+  <div class="container">123456 <br>123456</div>
+  <div class="float"></div>
+  <div class="container">1234567 <br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567  <br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567   <br>1234567</div>
+  <div class="float"></div>
+  <div class="container">12345678 <br>12345678</div>
+</body>
--- a/testing/web-platform/tests/css/css-text/white-space/pre-wrap-015.html
+++ b/testing/web-platform/tests/css/css-text/white-space/pre-wrap-015.html
@@ -17,16 +17,16 @@ div {
   color: red;
   z-index: -1;
 }
 .test {
   color: green;
   width: 20px;
 
   white-space: pre-wrap;
-  word-break: break-word;
+  word-break: break-all;
 }
 </style>
 <body>
   <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
   <div class="ref">X<span style="color: green">X</span><br>X<span style="color: green">X</span></div>
   <div class="test">X X</div>
 </body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/pre-wrap-float-001.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>CSS test preserved spaces and floats interaction</title>
+<link rel="author" title="Koji Ishii" href="kojii@chromium.org">
+<link rel="match" href="reference/pre-wrap-float-001-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-property">
+<style>
+html {
+  font-family: Ahem;
+  font-size: 20px;
+  line-height: 1;
+}
+.container {
+  white-space: pre-wrap;
+  width: 10ch;
+  margin-bottom: 1em;
+}
+.float {
+  float: left;
+  width: 3ch;
+  height: 2em;
+  background: orange;
+}
+</style>
+<body>
+  <div class="float"></div>
+  <div class="container">123456 123456</div>
+  <div class="float"></div>
+  <div class="container">1234567 1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567  1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567   1234567</div>
+  <div class="float"></div>
+  <div class="container">12345678 12345678</div>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/reference/pre-float-001-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<style>
+html {
+  font-family: Ahem;
+  font-size: 20px;
+  line-height: 1;
+}
+.container {
+  white-space: pre;
+  margin-bottom: 1em;
+}
+.float {
+  float: left;
+  width: 3ch;
+  height: 2em;
+  background: orange;
+}
+</style>
+<body>
+  <div class="float"></div>
+  <div class="container">123456<br>123456</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container">12345678<br>12345678</div>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/reference/pre-wrap-float-001-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<style>
+html {
+  font-family: Ahem;
+  font-size: 20px;
+  line-height: 1;
+}
+.container {
+  white-space: pre;
+  margin-bottom: 1em;
+}
+.float {
+  float: left;
+  width: 3ch;
+  height: 2em;
+  background: orange;
+}
+</style>
+<body>
+  <div class="float"></div>
+  <div class="container">123456<br>123456</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container">1234567<br>1234567</div>
+  <div class="float"></div>
+  <div class="container"><br><br>12345678<br>12345678</div>
+</body>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/reference/word-break-break-all-009-ref.xht
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
-	<head>
-		<title>CSS Test: word-break - break-all - basic cases</title>
-		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
-		<style type="text/css">
-			<![CDATA[
-				.test span {
-					word-break: break-all;
-				}
-				/* the CSS below is not part of the test */
-				p.test, p.control {
-					border: 1px solid gray;
-					color: blue;
-					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
-					width: 10em;
-				}
-				div.wrapper {
-					display: inline-block;
-					border: 1px solid;
-					margin: 10px;
-					padding: 10px;
-				}
-				span.attention {
-					color: red;
-				}
-			]]>
-		</style>
-	</head>
-	<body>
-		<p>
-			Test passes if each pair of upper and lower text in the square box is identical.
-		</p>
-		<div class="wrapper">
-			<p class="test">
-				<span>Filler Text Filler Text Filler Text</span>
-			</p>
-			<p class="control">
-				<span>Filler Text Filler T<br />ext Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字 Filler Text</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字 Fil<br />ler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字満たすための文字</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字満た<br />すための文字</span>
-			</p>
-		</div>
-		<p>
-			<span class="attention">* You will need a Japanese font.</span><br />
-			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
-		</p>
-	</body>
-</html>
--- a/testing/web-platform/tests/css/css-text/word-break/reference/word-break-break-all-014-ref.html
+++ b/testing/web-platform/tests/css/css-text/word-break/reference/word-break-break-all-014-ref.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap: break-all</title>
 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
-<p>Test passes if 2 icons are rendered in a row, matching the reference file.</p>
+<p>Test passes if 2 (different) heart emojis are rendered below each other.</p>
 <div>💖<br>💔</div>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/reference/word-break-keep-all-004-ref.xht
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
-	<head>
-		<title>CSS Test: word-break - keep-all - basic cases Reftest Reference</title>
-		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
-		<style type="text/css">
-			<![CDATA[
-				p.control {
-					border: 1px solid gray;
-					color: blue;
-					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
-					width: 10em;
-				}
-				div.wrapper {
-					display: inline-block;
-					border: 1px solid;
-					margin: 10px;
-					padding: 10px;
-				}
-				span.attention {
-					color: red;
-				}
-				span.no_wrap {
-					white-space: nowrap;
-				}
-			]]>
-		</style>
-	</head>
-	<body>
-		<p>
-			Test passes if each pair of upper and lower text in the square box is identical.
-		</p>
-		<div class="wrapper">
-			<p class="control">
-				<span>Filler Text Filler<br />Text Filler Text</span>
-			</p>
-			<p class="control">
-				<span>Filler Text Filler<br />Text Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="control">
-				<span>満たすための文字<br />Filler Text</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字<br />Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="control">
-				<span class="no_wrap">満たすための文字満たすための文字</span>
-			</p>
-			<p class="control">
-				<span class="no_wrap">満たすための文字満たすための文字</span>
-			</p>
-		</div>
-		<p>
-			<span class="attention">* You will need a Japanese font.</span><br />
-			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
-		</p>
-	</body>
-</html>
--- a/testing/web-platform/tests/css/css-text/word-break/reference/word-break-keep-all-ref-003.html
+++ b/testing/web-platform/tests/css/css-text/word-break/reference/word-break-keep-all-ref-003.html
@@ -7,12 +7,12 @@
 <style type='text/css'>
 .test { word-break: keep-all; }
 /* the CSS below is not part of the test */
 .test, .ref { border: 1px solid orange;  margin: 20px;  padding: 10px; width: 390px; font: 36px/1 sans-serif; }
 </style>
 </head>
 <body>
 <div id='instructions'>Test passes if the two orange boxes are the same.</div>
-<div class="ref" lang="th"><span>แและ แและ<br/>แและ</span></div>
-<div class="ref" lang="th"><span>แและ แและ<br/>แและ</span></div>
+<div class="ref" lang="th"><span>และ และ<br/>และ</span></div>
+<div class="ref" lang="th"><span>และ และ<br/>และ</span></div>
 </body>
-</html>
\ No newline at end of file
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-001.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-break - break-all keyword value</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-break">
-<meta name="flags" content="">
-<meta name="assert" content="Check that 'word-break' with 'break-all' keyword value implies to words break between any two letters without hyphenate.">
-<style>
-  div {
-    border: 2px black solid;
-    color: blue;
-    width: 100px;
-    word-break: break-all;
-  }
-</style>
-<body>
-  <p>Test passes if all the words below are inside the box and break between any two letters without hyphenate.</p>
-  <div>Words in these lines should break between any two letters and be inside the box.</div>
-</body>
-
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-002.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-break - normal keyword value</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-break">
-<meta name="flags" content="">
-<meta name="assert" content="Check that 'word-break' with 'normal' keyword value implies to words break after word.">
-<style>
-  div {
-    border: 2px black solid;
-    color: blue;
-    width: 100px;
-    word-break: normal;
-  }
-</style>
-<body>
-  <p>Test passes if all the words below are within the box and break only after a word.</p>
-  <div>Words in these lines should break after word and be inside the box.</div>
-</body>
-
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-003.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-break - normal keyword value - single word not break</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-break">
-<meta name="flags" content="">
-<meta name="assert" content="Check that 'word-break' with 'normal' keyword value implies to words break after word, so that a single word won't break.">
-<style>
-  div {
-    border: 2px black solid;
-    color: blue;
-    width: 100px;
-    word-break: normal;
-  }
-</style>
-<body>
-  <p>Test passes if there is <strong>no</strong> word break below.</p>
-  <div>ThisWordShouldNotBeBreakedAndMayBeOutOfTheBox</div>
-</body>
-
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-004.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Text Test: word-break - normal keyword value - Chinese words break</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com">
-<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-break">
-<meta name="flags" content="">
-<meta name="assert" content="Check that 'word-break' with 'normal' keyword value implies to words break after word, including Chinese words.">
-<style>
-  div {
-    border: 2px black solid;
-    color: blue;
-    width: 100px;
-    word-break: normal;
-  }
-</style>
-<body>
-  <p>Test passes if all the Chinese words below are inside the box and break normally.</p>
-  <div>这些文字会自动换行,但不会超出黑色框。</div>
-</body>
-
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-break-all-008.html
+++ b/testing/web-platform/tests/css/css-text/word-break/word-break-break-all-008.html
@@ -1,14 +1,22 @@
 <!DOCTYPE html>
 <html  lang="en" >
 <head>
 <meta charset="utf-8">
 <title>word-break: break-all, syllabic cluster</title>
-<meta name="assert" content="[Exploratory test] word-break: break-all means lines may break between any two typographic letter units. An indic syllable cluster should be wrapped as a unit to the next line.">
+<meta name="assert" content="word-break: break-all means lines may break between any two typographic letter units. An indic syllable cluster should be wrapped as a unit to the next line.">
+<meta name="flags" content="should">
+<!--
+  Marking as "should"
+  because while the spec requires this behavior
+  about typographic letter units,
+  it is handwavy about what constitutes one,
+  and appeals to the UA's knowledge of "the right thing to do" for that language.
+-->
 <link rel='help' href='https://drafts.csswg.org/css-text-3/#word-break-property'>
 <link rel='match' href='reference/word-break-break-all-ref-008.html'>
 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
 <style type='text/css'>
 .test { word-break: break-all; }
 /* the CSS below is not part of the test */
 .test, .ref { border: 1px solid orange;  margin: 20px;  padding: 10px; width: 390px; font: 36px/1.5 sans-serif; }
 </style>
@@ -16,14 +24,10 @@
 <body>
 <div id='instructions'>Test passes if the two orange boxes are the same.</div>
 <div class="test" lang="hi"><div id="testdiv"><span id="testspan">हिन्दी हिन्दी हिन्दी</span></div></div>
 <div class="ref" lang="hi"><span>हिन्दी हिन्दी हि<br/>न्दी</span></div>
 <script>
 var sentenceWidth = document.getElementById('testspan').offsetWidth
 document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'
 </script>
-<!--
-Notes:
-This test is exploratory because indic conjuncts containing more than one consonant are not covered by the extended grapheme cluster definition, and therefore constitute more than one typographic unit, as defined in the CSS spec. Nevertheless, people using indic scripts expect the user agent to keep the orthographic syllable as a single unit.
--->
 </body>
-</html>
\ No newline at end of file
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-break-all-009.xht
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
-	<head>
-		<title>CSS Test: word-break - break-all - basic cases</title>
-		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
-		<link rel="help" title="CSS Text Level 3: 5.2. Word Breaking Rules: the ‘word-break’ property" href="http://www.w3.org/TR/css-text-3/#word-break" />
-		<link rel="match" href="reference/word-break-break-all-009-ref.xht"/>
-		<meta name="flags" content="font" />
-		<meta name="assert" content="Lines may break between any two grapheme clusters within words." />
-		<style type="text/css">
-			<![CDATA[
-				.test span {
-					word-break: break-all;
-				}
-				/* the CSS below is not part of the test */
-				p.test, p.control {
-					border: 1px solid gray;
-					color: blue;
-					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
-					width: 10em;
-				}
-				div.wrapper {
-					display: inline-block;
-					border: 1px solid;
-					margin: 10px;
-					padding: 10px;
-				}
-				span.attention {
-					color: red;
-				}
-			]]>
-		</style>
-	</head>
-	<body>
-		<p>
-			Test passes if each pair of upper and lower text in the square box is identical.
-		</p>
-		<div class="wrapper">
-			<p class="test">
-				<span>Filler Text Filler Text Filler Text</span>
-			</p>
-			<p class="control">
-				<span>Filler Text Filler T<br />ext Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字 Filler Text</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字 Fil<br />ler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字満たすための文字</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字満た<br />すための文字</span>
-			</p>
-		</div>
-		<p>
-			<span class="attention">* You will need a Japanese font.</span><br />
-			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
-		</p>
-	</body>
-</html>
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-break-all-014.html
+++ b/testing/web-platform/tests/css/css-text/word-break/word-break-break-all-014.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Test: overflow-wrap: break-all</title>
 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
 <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
-<meta name="flags" content="ahem">
+<meta name="flags" content="">
 <link rel="match" href="reference/word-break-break-all-014-ref.html">
 <meta name="assert" content="The text is wrapped after the first character and no unicode unit is broken.">
 <style>
 div {
   width: 1px;
   word-break: break-all;
 }
 </style>
-<p>Test passes if 2 icons are rendered in a row, matching the reference file.</p>
+<p>Test passes if 2 (different) heart emojis are rendered below each other.</p>
 <div>💖💔</div>
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-keep-all-003.html
+++ b/testing/web-platform/tests/css/css-text/word-break/word-break-keep-all-003.html
@@ -10,16 +10,16 @@
 <style type='text/css'>
 .test { word-break: keep-all; }
 /* the CSS below is not part of the test */
 .test, .ref { border: 1px solid orange;  margin: 20px;  padding: 10px; width: 390px; font: 36px/1 sans-serif; }
 </style>
 </head>
 <body>
 <div id='instructions'>Test passes if the two orange boxes are the same.</div>
-<div class="test" lang="th"><div id="testdiv"><span id="testspan">แและ แและแและ</span></div></div>
-<div class="ref" lang="th"><span>แและ แและ<br/>แและ</span></div>
+<div class="test" lang="th"><div id="testdiv"><span id="testspan">และ และและ</span></div></div>
+<div class="ref" lang="th"><span>และ และ<br/>และ</span></div>
 <script>
 var sentenceWidth = document.getElementById('testspan').offsetWidth
 document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-text/word-break/word-break-keep-all-004.xht
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
-	<head>
-		<title>CSS Test: word-break - keep-all - basic cases</title>
-		<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
-		<link rel="help" title="CSS Text Level 3: 5.2. Word Breaking Rules: the ‘word-break’ property" href="http://www.w3.org/TR/css-text-3/#word-break" />
-		<link rel="match" href="reference/word-break-keep-all-004-ref.xht"/>
-		<meta name="flags" content="font" />
-		<meta name="assert" content="Block characters can no longer create implied break points." />
-		<style type="text/css">
-			<![CDATA[
-				.test span {
-					word-break: keep-all;
-				}
-				/* the CSS below is not part of the test */
-				p.test, p.control {
-					border: 1px solid gray;
-					color: blue;
-					font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック";
-					width: 10em;
-				}
-				div.wrapper {
-					display: inline-block;
-					border: 1px solid;
-					margin: 10px;
-					padding: 10px;
-				}
-				span.attention {
-					color: red;
-				}
-				span.no_wrap {
-					white-space: nowrap;
-				}
-			]]>
-		</style>
-	</head>
-	<body>
-		<p>
-			Test passes if each pair of upper and lower text in the square box is identical.
-		</p>
-		<div class="wrapper">
-			<p class="test">
-				<span>Filler Text Filler Text Filler Text</span>
-			</p>
-			<p class="control">
-				<span>Filler Text Filler<br />Text Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字 Filler Text</span>
-			</p>
-			<p class="control">
-				<span>満たすための文字<br />Filler Text</span>
-			</p>
-		</div>
-		<div class="wrapper">
-			<p class="test">
-				<span>満たすための文字満たすための文字</span>
-			</p>
-			<p class="control">
-				<span class="no_wrap">満たすための文字満たすための文字</span>
-			</p>
-		</div>
-		<p>
-			<span class="attention">* You will need a Japanese font.</span><br />
-			If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page.
-		</p>
-	</body>
-</html>
--- a/testing/web-platform/tests/css/css-transitions/currentcolor-animation-001.html
+++ b/testing/web-platform/tests/css/css-transitions/currentcolor-animation-001.html
@@ -5,17 +5,17 @@
   <link rel="author" title="L. David Baron" href="https://dbaron.org/">
   <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
   <link rel="help" href="http://www.w3.org/TR/css3-transitions/#animatable-types">
   <!-- also see https://www.w3.org/Bugs/Public/show_bug.cgi?id=14605 -->
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
 <style id="style"></style>
 </head>
-<body onload="run()">
+<body>
 <div id=log></div>
 <div id="test"></div>
 <script>
 
  // Transition does not occur when the value is currentColor and color changes
 test(function() {
        var div = document.getElementById("test");
        var cs = getComputedStyle(div, "");
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-transitions/transition-reparented.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Transition should cancel when an element is reparented</title>
+<link rel="help" href="https://www.w3.org/TR/css-transitions-1/#starting">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<style>
+.animated-div {
+  margin-left: 100px;
+  transition: margin-left 10s -5s linear;
+}
+</style>
+
+<div id="parent1">
+  <div id="target" class='animated-div'></div>
+</div>
+
+<div id="parent2"></div>
+
+<script>
+'use strict';
+
+test(t => {
+  assert_equals(getComputedStyle(target).marginLeft, '100px');
+  target.style.marginLeft = '200px';
+
+  // Because the start delay is -50% of the transition duration, we should
+  // immediately be (approximately) at the halfway point. What we really care
+  // about checking is that the transition has started but has not ended.
+  assert_not_equals(getComputedStyle(target).marginLeft, '100px');
+  assert_not_equals(getComputedStyle(target).marginLeft, '200px');
+
+  // Now change the target's parent. This should cancel the transition and
+  // skip straight to the end state.
+  parent2.appendChild(target);
+  assert_equals(getComputedStyle(target).marginLeft, '200px');
+}, 'When an element is reparented, any CSS Transition on it should be cancelled');
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom/CSSStyleSheet-constructable.html
@@ -0,0 +1,515 @@
+<!DOCTYPE html>
+<title>CSSStyleSheet constructor and adoptedStyleSheets</title>
+<link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org">
+<link rel="help" href="https://wicg.github.io/construct-stylesheets/">
+<script src = '/resources/testharness.js'></script>
+<script src = '/resources/testharnessreport.js'></script>
+
+<section id="firstSection">
+  <div>
+    <span class="green"></span>
+    <span class="red"></span>
+    <span class="blue"></span>
+    <span class="white"></span>
+    <span class="yellow"></span>
+  </div>
+</section>
+<section id="secondSection"></section>
+<section id="thirdSection"></section>
+
+<script>
+'use strict';
+const greenStyleText = ".green { color: green; }";
+const redStyleTexts = [".red { color: red; }", ".red + span + span { color: red; }"];
+const blueStyleTexts = [".blue { color: blue; }", ".blue + span + span { color: blue; }"];
+const whiteStyleText = "* { color: white; }";
+const yellowStyleText = ".yellow { color: yellow; }";
+
+const firstDiv = document.querySelector('#firstSection > div');
+const secondDiv = firstDiv.cloneNode(true);
+const shadowRoot = document.querySelector('#secondSection').attachShadow({mode: 'open'});
+shadowRoot.appendChild(secondDiv);
+
+const greenSpan = firstDiv.children[0];
+const redSpan = firstDiv.children[1];
+const blueSpan = firstDiv.children[2];
+const whiteSpan = firstDiv.children[3];
+const yellowSpan = firstDiv.children[4];
+const greenShadowSpan = secondDiv.children[0];
+const redShadowSpan = secondDiv.children[1];
+const blueShadowSpan = secondDiv.children[2];
+const whiteShadowSpan = secondDiv.children[3];
+const yellowShadowSpan = secondDiv.children[4];
+
+test(() => {
+  assert_equals(document.adoptedStyleSheets.length, 0);
+}, "document.adoptedStyleSheets should initially have length 0.");
+
+test(() => {
+  const sheet = new CSSStyleSheet({title: "Red", disabled: true, media: "screen, print"});
+  assert_equals(sheet.title, "Red");
+  assert_equals(sheet.ownerNode, null);
+  assert_equals(sheet.ownerRule, null);
+  assert_equals(sheet.media.length, 2);
+  assert_equals(sheet.media.item(0), "screen");
+  assert_equals(sheet.media.item(1), "print");
+  assert_true(sheet.disabled);
+  assert_equals(sheet.cssRules.length, 0);
+
+  sheet.insertRule(redStyleTexts[0]);
+  assert_equals(sheet.cssRules.length, 1);
+  assert_equals(sheet.cssRules[0].cssText, redStyleTexts[0]);
+
+  sheet.insertRule(redStyleTexts[1]);
+  assert_equals(sheet.cssRules.length, 2);
+  assert_equals(sheet.cssRules[0].cssText, redStyleTexts[1]);
+
+  const sheet2 = new CSSStyleSheet({});
+  assert_equals(sheet2.title, "")
+  assert_equals(sheet2.ownerNode, null);
+  assert_equals(sheet2.ownerRule, null);
+  assert_equals(sheet2.media.length, 0);
+  assert_false(sheet2.disabled);
+  assert_equals(sheet2.cssRules.length, 0);
+
+  sheet2.insertRule(redStyleTexts[1]);
+  assert_equals(sheet2.cssRules.length, 1);
+  assert_equals(sheet2.cssRules[0].cssText, redStyleTexts[1]);
+
+  sheet2.deleteRule(0);
+  assert_equals(sheet2.cssRules.length, 0);
+
+const sheet3 = new CSSStyleSheet();
+  assert_equals(sheet3.title, "")
+  assert_equals(sheet3.ownerNode, null);
+  assert_equals(sheet3.ownerRule, null);
+  assert_equals(sheet3.media.length, 0);
+  assert_false(sheet3.disabled);
+  assert_equals(sheet3.cssRules.length, 0);
+
+  sheet3.insertRule(redStyleTexts[1]);
+  assert_equals(sheet3.cssRules.length, 1);
+  assert_equals(sheet3.cssRules[0].cssText, redStyleTexts[1]);
+
+  sheet3.deleteRule(0);
+  assert_equals(sheet3.cssRules.length, 0);
+}, 'new CSSStyleSheet produces empty CSSStyleSheet');
+
+promise_test(() => {
+  const sheet = new CSSStyleSheet({title: "Red", disabled: true, media: "screen, print"});
+  const promise_sheet = sheet.replace(redStyleTexts[0]);
+  return promise_sheet.then(function(sheet) {
+    assert_equals(sheet.title, "Red");
+    assert_equals(sheet.ownerNode, null);
+    assert_equals(sheet.ownerRule, null);
+    assert_equals(sheet.media.length, 2);
+    assert_equals(sheet.media.item(0), "screen");
+    assert_equals(sheet.media.item(1), "print");
+    assert_true(sheet.disabled);
+    assert_equals(sheet.cssRules.length, 1);
+    assert_equals(sheet.cssRules[0].cssText, redStyleTexts[0]);
+
+    sheet.insertRule(redStyleTexts[1]);
+    assert_equals(sheet.cssRules.length, 2);
+    assert_equals(sheet.cssRules[0].cssText, redStyleTexts[1]);
+  });
+}, 'CSSStyleSheet.replace produces Promise<CSSStyleSheet>');
+
+function createAllSheetsPromise() {
+  const greenSheet = new CSSStyleSheet();
+  const redSheet = new CSSStyleSheet({media: "screen, print"});
+  const blueSheet = new CSSStyleSheet({title: "Blue", disabled: true});
+  const whiteSheet = new CSSStyleSheet({title: "White", alternate: true});
+  const yellowSheet = new CSSStyleSheet({disabled: false});
+
+  const greenPromise = greenSheet.replace(greenStyleText);
+  const redPromise = redSheet.replace(redStyleTexts[0] + redStyleTexts[1]);
+  const bluePromise = blueSheet.replace(blueStyleTexts[0] + blueStyleTexts[1]);
+  const whitePromise = whiteSheet.replace(whiteStyleText);
+  const yellowPromise = yellowSheet.replace(yellowStyleText);
+  return [greenPromise, redPromise, bluePromise, whitePromise, yellowPromise];
+}
+
+promise_test(() => {
+  return Promise.all(createAllSheetsPromise()).then(values => {
+    const greenStyleSheet = values[0];
+    const redStyleSheet = values[1];
+    const blueStyleSheet = values[2];
+    const whiteStyleSheet = values[3];
+    const yellowStyleSheet = values[4];
+
+    // Lists of style sheets can be created, assigned and read.
+    document.adoptedStyleSheets = [whiteStyleSheet];
+    // alternate stylesheets aren't applied when title != current preferable name
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    document.adoptedStyleSheets = [greenStyleSheet, blueStyleSheet];
+    // disabled stylesheets aren't applied
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 128, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    document.adoptedStyleSheets = [redStyleSheet, yellowStyleSheet];
+
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(255, 255, 0)");
+
+    document.adoptedStyleSheets = [redStyleSheet, yellowStyleSheet, greenStyleSheet, blueStyleSheet];
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 128, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(255, 255, 0)");
+  });
+}, 'Constructed style sheets can be applied on document');
+
+promise_test(() => {
+  return Promise.all(createAllSheetsPromise()).then(values => {
+    const greenStyleSheet = values[0];
+    const redStyleSheet = values[1];
+    const blueStyleSheet = values[2];
+    const whiteStyleSheet = values[3];
+    const yellowStyleSheet = values[4];
+    shadowRoot.adoptedStyleSheets = [whiteStyleSheet];
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(0, 0, 0)");
+
+    shadowRoot.adoptedStyleSheets = [greenStyleSheet, blueStyleSheet];
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 128, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(0, 0, 0)");
+
+    shadowRoot.adoptedStyleSheets = [redStyleSheet, yellowStyleSheet];
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(255, 255, 0)");
+
+    shadowRoot.adoptedStyleSheets = [redStyleSheet, yellowStyleSheet, greenStyleSheet, blueStyleSheet];
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 128, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(255, 255, 0)");
+  });
+}, 'Constructed style sheets can be applied on shadow root');
+
+promise_test(() => {
+  const plainSheet = new CSSStyleSheet();
+  const redStyleSheetPromise = plainSheet.replace(redStyleTexts[0]);
+  return redStyleSheetPromise.then(function(redStyleSheet) {
+    document.adoptedStyleSheets = [redStyleSheet];
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    redStyleSheet.insertRule(redStyleTexts[1]);
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    redStyleSheet.deleteRule(1);
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    redStyleSheet.cssRules[0].style.color = "white";
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 255, 255)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+});
+}, 'Changes to constructed stylesheets through CSSOM is reflected');
+
+promise_test(() => {
+  const plainSheet = new CSSStyleSheet();
+  const redStyleSheetPromise = plainSheet.replace(redStyleTexts[0]);
+  return redStyleSheetPromise.then(function(redStyleSheet) {
+    document.adoptedStyleSheets = [redStyleSheet];
+    shadowRoot.adoptedStyleSheets = [redStyleSheet];
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(0, 0, 0)");
+
+    shadowRoot.adoptedStyleSheets[0].insertRule(redStyleTexts[1]);
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    assert_equals(getComputedStyle(greenShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueShadowSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteShadowSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowShadowSpan).color, "rgb(0, 0, 0)");
+});
+}, 'Constructed stylesheet can be used and modified in multiple TreeScopes');
+
+promise_test(() => {
+  const iframe = document.createElement("iframe");
+  document.body.appendChild(iframe);
+  const thirdDiv = firstDiv.cloneNode(true);
+  iframe.contentDocument.body.appendChild(thirdDiv);
+  const greenIframeSpan = thirdDiv.children[0];
+  const redIframeSpan = thirdDiv.children[1];
+  const blueIframeSpan = thirdDiv.children[2];
+  const whiteIframeSpan = thirdDiv.children[3];
+  const yellowIframeSpan = thirdDiv.children[4];
+
+  const plainSheet = new CSSStyleSheet();
+  const redStyleSheetPromise = plainSheet.replace(redStyleTexts[0]);
+  return redStyleSheetPromise.then(function(redStyleSheet) {
+    assert_throws('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [redStyleSheet]; });
+    assert_equals(getComputedStyle(greenIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowIframeSpan).color, "rgb(0, 0, 0)");
+
+    document.adoptedStyleSheets = [redStyleSheet];
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    document.adoptedStyleSheets[0].insertRule(redStyleTexts[1]);
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+  });
+}, 'Stylesheets constructed on the main Document cannot be used in iframes');
+
+promise_test(() => {
+  const iframe = document.createElement("iframe");
+  document.body.appendChild(iframe);
+  const thirdDiv = firstDiv.cloneNode(true);
+  iframe.contentDocument.body.appendChild(thirdDiv);
+  const greenIframeSpan = thirdDiv.children[0];
+  const redIframeSpan = thirdDiv.children[1];
+  const blueIframeSpan = thirdDiv.children[2];
+  const whiteIframeSpan = thirdDiv.children[3];
+  const yellowIframeSpan = thirdDiv.children[4];
+
+  // Make sure both the main Document and the iframe are not styled
+  const emptyStyleSheet = new CSSStyleSheet();
+  document.adoptedStyleSheets = [emptyStyleSheet];
+  assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+  assert_equals(getComputedStyle(greenIframeSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(redIframeSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(blueIframeSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(whiteIframeSpan).color, "rgb(0, 0, 0)");
+  assert_equals(getComputedStyle(yellowIframeSpan).color, "rgb(0, 0, 0)");
+
+  const iframePlainSheet = new iframe.contentWindow.CSSStyleSheet();
+  const iframeRedStyleSheetPromise = iframePlainSheet.replace(redStyleTexts[0]);
+  return iframeRedStyleSheetPromise.then(function(iframeRedStyleSheet) {
+    assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [iframeRedStyleSheet]; });
+    assert_equals(getComputedStyle(greenSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
+
+    iframe.contentDocument.adoptedStyleSheets = [iframeRedStyleSheet];
+    assert_equals(getComputedStyle(greenIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redIframeSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(yellowIframeSpan).color, "rgb(0, 0, 0)");
+
+    iframe.contentDocument.adoptedStyleSheets[0].insertRule(redStyleTexts[1]);
+    assert_equals(getComputedStyle(greenIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(redIframeSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(blueIframeSpan).color, "rgb(0, 0, 0)");
+    assert_equals(getComputedStyle(whiteIframeSpan).color, "rgb(255, 0, 0)");
+    assert_equals(getComputedStyle(yellowIframeSpan).color, "rgb(0, 0, 0)");
+  });
+}, 'Stylesheet constructed on iframe cannot be used in the main Document');
+</script>
+
+<div id="divNonConstructed" class="nonConstructed">
+</div>
+
+<script>
+`use strict`;
+const shadowRootNonConstructed = divNonConstructed.attachShadow({mode:'open'})
+nonConstructedStyle = document.createElement("style");
+shadowRootNonConstructed.appendChild(nonConstructedStyle);
+nonConstructedStyle.sheet.insertRule(".nonConstructed { color: red; }", 0);
+const nonConstructedStyleSheet = nonConstructedStyle.sheet;
+
+test(() => {
+  assert_equals(getComputedStyle(divNonConstructed).color, "rgb(0, 0, 0)");
+  assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [nonConstructedStyleSheet]; });
+}, 'Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet is in the same document tree as the AdoptedStyleSheets');
+
+test(() => {
+  const iframe = document.createElement("iframe");
+  document.body.appendChild(iframe);
+  iframeDiv = iframe.contentDocument.createElement("div");
+  iframeDiv.classList.add("nonConstructed");
+  iframe.contentDocument.body.appendChild(iframeDiv);
+
+  assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
+  assert_throws('NotAllowedError', () => { iframe.contentDocument.adoptedStyleSheets = [nonConstructedStyleSheet]; });
+  assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
+
+  iframeStyle = iframe.contentDocument.createElement("style");
+  iframe.contentDocument.body.appendChild(iframeStyle);
+  iframeStyle.sheet.insertRule(".nonConstructedSpan { color: red; }");
+  const iframeStyleSheet = iframeStyle.sheet;
+  nonConstructedSpan = document.createElement("span");
+  nonConstructedSpan.classList.add(".nonConstructedSpan");
+  divNonConstructed.appendChild(nonConstructedSpan);
+
+  assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
+  assert_throws('NotAllowedError', () => { document.adoptedStyleSheets = [iframeStyleSheet]; });
+  assert_equals(getComputedStyle(iframeDiv).color, "rgb(0, 0, 0)");
+}, 'Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet and the AdoptedStyleSheets are in different document trees');
+
+function attachShadowDiv(host) {
+  const shadowRoot = host.attachShadow({mode: 'open'});
+  const shadowDiv = document.createElement("div");
+  shadowRoot.appendChild(shadowDiv);
+  return shadowDiv;
+}
+
+test(() => {
+  // Attach a div inside a shadow root with the class ".red".
+  const span = document.createElement("span");
+  thirdSection.appendChild(span);
+  const shadowDiv = attachShadowDiv(span);
+  shadowDiv.classList.add("red");
+  // Create empty stylesheet.
+  const sheet = new CSSStyleSheet();
+  span.shadowRoot.adoptedStyleSheets = [sheet];
+  assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
+  // Replace the stylesheet text that will color it red.
+  sheet.replaceSync(redStyleTexts[0]);
+  assert_equals(getComputedStyle(shadowDiv).color, "rgb(255, 0, 0)");
+  assert_equals(sheet.cssRules.length, 1);
+  assert_equals(sheet.cssRules[0].cssText, redStyleTexts[0]);
+  sheet.insertRule(redStyleTexts[1]);
+  assert_equals(sheet.cssRules.length, 2);
+  assert_equals(sheet.cssRules[0].cssText, redStyleTexts[1]);
+}, 'CSSStyleSheet.replaceSync replaces stylesheet text synchronously');
+
+const import_text = '@import url("support/constructable-import.css");';
+
+test(() => {
+  assert_throws("NotAllowedError", () => { (new CSSStyleSheet).replaceSync(import_text) });
+}, 'CSSStyleSheet.replaceSync throws exception when there is import rule inside');
+
+test(() => {
+  assert_throws("NotAllowedError", () => { (new CSSStyleSheet).insertRule(import_text) });
+}, 'Inserting an @import rule through insertRule on a constructed stylesheet throws an exception');
+
+promise_test(() => {
+  const span = document.createElement("span");
+  thirdSection.appendChild(span);
+  const shadowDiv = attachShadowDiv(span);
+  const sheet = new CSSStyleSheet();
+  span.shadowRoot.adoptedStyleSheets = [sheet];
+  assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
+  // Replace and assert that the imported rule is applied.
+  const sheet_promise = sheet.replace(import_text);
+  return sheet_promise.then((sheet) => {
+    assert_equals(sheet.cssRules.length, 1);
+    assert_equals(sheet.cssRules[0].cssText, import_text);
+    assert_equals(getComputedStyle(shadowDiv).color, "rgb(255, 0, 0)");
+  });
+}, 'CSSStyleSheet.replace allows import rule inside');
+
+promise_test(() => {
+  const sheet = new CSSStyleSheet();
+  const sheet_promise = sheet.replace("import url('not-there.css');");
+  return sheet_promise.catch((reason) => {
+    assert_equals(reason.name, "NotAllowedError");
+  });
+}, 'CSSStyleSheet.replace returns rejected promise on failed imports');
+
+test(() => {
+  const span = document.createElement("span");
+  thirdSection.appendChild(span);
+  const shadowDiv = attachShadowDiv(span);
+  const sheet = new CSSStyleSheet();
+  span.shadowRoot.adoptedStyleSheets = [sheet];
+
+  const newSpan = span.cloneNode(true);
+  assert_equals(newSpan.shadowRoot, null);
+}, 'Cloning a shadow host will not clone shadow root, and also adoptedStyleSheets');
+
+test(() => {
+  const span = document.createElement("span");
+  thirdSection.appendChild(span);
+  const shadowDiv = attachShadowDiv(span);
+  const sheet = new CSSStyleSheet();
+  span.shadowRoot.adoptedStyleSheets = [sheet];
+
+  const iframe = document.createElement("iframe");
+  document.body.appendChild(iframe);
+  const newSpan = iframe.contentDocument.importNode(span, true);
+  iframe.contentDocument.body.appendChild(newSpan);
+  assert_equals(newSpan.shadowRoot, null);
+}, 'Importing a shadow host will not copy shadow root, and also adoptedStyleSheets');
+
+test(() => {
+  const span = document.createElement("span");
+  thirdSection.appendChild(span);
+  const shadowDiv = attachShadowDiv(span);
+  const sheet = new CSSStyleSheet();
+  sheet.replaceSync("* { color: red; }");
+  span.shadowRoot.adoptedStyleSheets = [sheet];
+  assert_equals(getComputedStyle(shadowDiv).color, "rgb(255, 0, 0)");
+
+  const iframe = document.createElement("iframe");
+  document.body.appendChild(iframe);
+  iframe.contentDocument.adoptNode(span);
+  iframe.contentDocument.body.appendChild(span);
+  assert_not_equals(span.shadowRoot, null);
+  assert_equals(span.shadowRoot.adoptedStyleSheets.length, 1);
+  assert_equals(span.shadowRoot.adoptedStyleSheets[0], sheet);
+  assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
+}, 'Adopting a shadow host will move adoptedStyleSheets but it is not applied');
+
+</script>
+
--- a/testing/web-platform/tests/css/cssom/stylesheet-same-origin.sub.html
+++ b/testing/web-platform/tests/css/cssom/stylesheet-same-origin.sub.html
@@ -11,21 +11,23 @@
     <link id="sameorigin" href="stylesheet-same-origin.css" rel="stylesheet">
     <link id="sameorigindata" href="data:text/css,.green-text{color:rgb(0, 255, 0)}" rel="stylesheet">
     <link id="redirect-sameorigin-to-crossorigin"
           href="/common/redirect.py?location=http://www1.{{host}}:{{ports[http][1]}}/css/cssom/stylesheet-same-origin.css"
           rel="stylesheet">
     <link id="redirect-crossorigin-to-sameorigin"
           href="http://www1.{{host}}:{{ports[http][1]}}/common/redirect.py?location=http://{{host}}:{{ports[http][0]}}/css/cssom/stylesheet-same-origin.css"
           rel="stylesheet">
+    <link id="loaderror" href="support/malformed-http-response.asis" rel="stylesheet">
 
     <script>
         var crossorigin = document.getElementById("crossorigin").sheet;
         var redirectSameOriginToCrossOrigin = document.getElementById("redirect-sameorigin-to-crossorigin").sheet;
         var redirectCrossOriginToSameOrigin = document.getElementById("redirect-crossorigin-to-sameorigin").sheet;
+        var loadError = document.getElementById("loaderror").sheet;
         var sameorigin = document.getElementById("sameorigin").sheet;
         var sameorigindata = document.getElementById("sameorigindata").sheet;
 
         function doOriginCleanCheck(sheet, name) {
             assert_equals(sheet.cssRules.length, 1, name + " stylesheet.cssRules should be accessible.");
             sheet.insertRule("#test { margin: 10px; }", 1);
             assert_equals(sheet.cssRules.length, 2, name + " stylesheet.insertRule should be accessible.");
             sheet.deleteRule(0);
@@ -58,16 +60,20 @@
         test(function() {
             doOriginDirtyCheck(redirectSameOriginToCrossOrigin);
         }, "Origin-clean check in cross-origin CSSOM Stylesheets (redirect from same-origin to cross-origin)");
 
         test(function() {
             doOriginDirtyCheck(redirectCrossOriginToSameOrigin);
         }, "Origin-clean check in cross-origin CSSOM Stylesheets (redirect from cross-origin to same-origin)");
 
+       test(function() {
+            doOriginDirtyCheck(loadError);
+        }, "Origin-clean check in loading error CSSOM Stylesheets");
+
         test(function() {
             doOriginCleanCheck(sameorigin, "Same-origin");
         }, "Origin-clean check in same-origin CSSOM Stylesheets");
 
         test(function() {
             doOriginCleanCheck(sameorigindata, "data:css");
         }, "Origin-clean check in data:css CSSOM Stylesheets");
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom/support/constructable-import.css
@@ -0,0 +1,3 @@
+* {
+  color: red;
+}
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom/support/malformed-http-response.asis
@@ -0,0 +1,1 @@
+HAHAHA THIS IS NOT HTTP AND THE BROWSER SHOULD CONSIDER IT A NETWORK ERROR
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/filter-effects/reference/green-100x100.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div style="width: 100px; height: 100px; background-color: green"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/filter-effects/svg-sourcegraphic-currentcolor-dynamic-001.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<title>Filter Effects: Dynamic 'currentcolor' in SourceGraphic</title>
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#attr-valuedef-in-sourcegraphic">
+<link rel="match" href="reference/green-100x100.html">
+<style>
+rect {
+  fill: currentColor;
+}
+
+.filtered {
+  filter: url(#filter);
+}
+
+.green {
+  color: green;
+}
+</style>
+<svg style="color: red">
+  <defs>
+    <filter id="filter" color-interpolation-filters="sRGB">
+      <feMerge>
+        <feMergeNode/>
+      </feMerge>
+    </filter>
+  </defs>
+
+  <g class="target filtered">
+    <rect width="50" height="100"/>
+  </g>
+
+  <g class="target">
+    <g class="filtered">
+      <rect x="50" width="50" height="100"/>
+    </g>
+  </g>
+</svg>
+<script>
+document.body.offsetTop;
+requestAnimationFrame(function() {
+  requestAnimationFrame(function() {
+    let targets = document.querySelectorAll('.target');
+    for (let i = 0; i < targets.length; ++i)
+      targets[i].classList.toggle('green');
+    document.documentElement.classList.remove('reftest-wait');
+  });
+});
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/encoding/sniffing.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<title>No (UTF-8) sniffing allowed</title>
+<div id=log></div>
+<div id=content>€€ Hello World! €€</div>
+<script>
+test(() => {
+  assert_equals(document.getElementById("content").textContent, "\u00C2\u20AC\u00C2\u20AC Hello World! \u00C2\u20AC\u00C2\u20AC");
+  assert_equals(document.characterSet, "windows-1252");
+});
+</script>
--- a/testing/web-platform/tests/encoding/textdecoder-fatal.any.js
+++ b/testing/web-platform/tests/encoding/textdecoder-fatal.any.js
@@ -59,8 +59,22 @@ bad.forEach(function(t) {
 
 test(function() {
     assert_true('fatal' in new TextDecoder(), 'The fatal attribute should exist on TextDecoder.');
     assert_equals(typeof  new TextDecoder().fatal, 'boolean', 'The type of the fatal attribute should be boolean.');
     assert_false(new TextDecoder().fatal, 'The fatal attribute should default to false.');
     assert_true(new TextDecoder('utf-8', {fatal: true}).fatal, 'The fatal attribute can be set using an option.');
 
 }, 'The fatal attribute of TextDecoder');
+
+test(() => {
+  const bytes = new Uint8Array([226, 153, 165]);
+  const decoder = new TextDecoder('utf-8', {fatal: true});
+  assert_equals(decoder.decode(new DataView(bytes.buffer, 0, 3)),
+                '♥',
+                'decode() should decode full sequence');
+  assert_throws(new TypeError,
+                () => decoder.decode(new DataView(bytes.buffer, 0, 2)),
+                'decode() should throw on incomplete sequence');
+  assert_equals(decoder.decode(new DataView(bytes.buffer, 0, 3)),
+                '♥',
+                'decode() should not throw on subsequent call');
+}, 'Error seen with fatal does not prevent future decodes');
--- a/testing/web-platform/tests/event-timing/event-timing-bufferbeforeonload.html
+++ b/testing/web-platform/tests/event-timing/event-timing-bufferbeforeonload.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <html>
 <meta charset=utf-8 />
 <title>Event Timing: buffer long-latency events before onload</title>
-<button id='button' onclick='clickDelay()'>Generate a 'click' event</button>
+<button id='button' onmousedown='clickDelay()'>Generate a 'click' event</button>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script src=/resources/testdriver.js></script>
 <script src=/resources/testdriver-vendor.js></script>
 
 <script src=resources/event-timing-support.js></script>
 <img src=resources/slow-image.py>
 
@@ -22,17 +22,17 @@
     if (firstClickStart === 0)
       firstClickStart = onclickStart;
     while(performance.now() < onclickStart + 60) {}
     if (firstClickEnd === 0)
       firstClickEnd = performance.now();
   }
 
   function validateEntries() {
-    const entries = performance.getEntriesByName('click', 'event');
+    const entries = performance.getEntriesByName('mousedown', 'event');
 
     const entriesBeforeOnload = entries.filter(
         e => e.startTime < onloadStart);
     assert_equals(entriesBeforeOnload.length, 1,
         "Long latency events before onload should be buffered.");
     const entry = entriesBeforeOnload[0];
     verifyClickEvent(entry, true);
 
@@ -64,17 +64,18 @@
   */
   async_test(function(t) {
     clickTimeMin = performance.now();
     clickAndBlockMain('button');
     // Use a dummy observer to know when both clicks have been dispatched.
     const observerPromise = new Promise((resolve, reject) => {
       let entryCount = 0;
       new PerformanceObserver(entryList => {
-        entryCount += entryList.getEntries().length;
+        entryCount += entryList.getEntries().filter(
+          entry => entry.name === 'mousedown').length;
         if (entryCount >= 2)
           resolve();
       }).observe({ entryTypes: ['event'] });
     });
     // Event handlers will be dispatched asynchronously, so this will be called
     // before processing begins.
     processingStartMin = performance.now();
     on_event(window, 'load', e => {
--- a/testing/web-platform/tests/event-timing/event-timing-crossiframe.html
+++ b/testing/web-platform/tests/event-timing/event-timing-crossiframe.html
@@ -2,32 +2,32 @@
 <html>
 
 <head>
   <meta charset=utf-8 />
   <title>Event Timing: entries should be observable by its own frame.</title>
 </head>
 
 <body>
-<button id='button' onclick='1'>Generate a 'click' event</button>
+<button id='button'>Generate a 'click' event</button>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script src=/resources/testdriver.js></script>
 <script src=/resources/testdriver-vendor.js></script>
 
 <script src=resources/event-timing-support.js></script>
 <img src=./resources/slow-image.py>
 <iframe src=resources/event-timing-crossiframe-childframe.html></iframe>
 <script>
   let clickTimeMin;
   let processingStartMin;
   let onloadStart;
 
   function validateEntries() {
-    const entries = performance.getEntriesByName('click', 'event');
+    const entries = performance.getEntriesByName('mousedown', 'event');
 
     assert_equals(entries.length, 1,
       "Observer of main frames should only capture main-frame event-timing entries."
     );
     const entry = entries[0];
     verifyClickEvent(entry, true);
 
     assert_greater_than(entry.processingStart, processingStartMin,