diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 6e32ff3c4c1983..f57e9493894c46 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -467,16 +467,6 @@ crbug.com/441840 imported/csswg-test/css-shapes-1/shape-outside/values/shape-out
crbug.com/441840 imported/csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-004.html [ Failure ]
crbug.com/441840 [ Linux Win ] imported/csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html [ Failure ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-block-in-available-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-block-in-fixed-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-block-in-max-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-inline-in-available-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-inline-in-fixed-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-inline-in-max-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-table-in-available-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-table-in-fixed-001.html [ Missing ]
-crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-table-in-max-001.html [ Missing ]
-
crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-003.xht [ Failure ]
crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-005.xht [ Failure ]
crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-011.xht [ Failure ]
@@ -556,6 +546,10 @@ crbug.com/492664 imported/csswg-test/css-writing-modes-3/inline-block-alignment-
crbug.com/492664 imported/csswg-test/css-writing-modes-3/inline-block-alignment-007.xht [ Failure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/inline-table-alignment-003.xht [ Failure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/inline-table-alignment-005.xht [ Failure ]
+crbug.com/492664 imported/csswg-test/css-writing-modes-3/line-box-height-vlr-021.xht [ Failure ]
+crbug.com/492664 imported/csswg-test/css-writing-modes-3/line-box-height-vlr-023.xht [ Failure ]
+crbug.com/492664 imported/csswg-test/css-writing-modes-3/ortho-htb-alongside-vrl-floats-006.xht [ Failure ]
+crbug.com/492664 imported/csswg-test/css-writing-modes-3/ortho-htb-alongside-vrl-floats-014.xht [ Failure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/table-column-order-002.xht [ Failure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/table-column-order-003.xht [ Failure ]
crbug.com/492664 imported/csswg-test/css-writing-modes-3/table-column-order-004.xht [ Failure ]
@@ -941,14 +935,6 @@ crbug.com/613462 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reft
crbug.com/582836 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-font-face-01.html [ Pass Failure ]
crbug.com/582836 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/variables/variable-font-face-02.html [ Pass Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-01a.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-01b.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-02a.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-02b.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-03a.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-03b.html [ Failure ]
-crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-04.html [ Failure ]
-
crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-break-inside-001a.html [ Failure ]
crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-001.html [ Failure ]
crbug.com/553838 imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-combine-upright-compression-002.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/W3CImportExpectations b/third_party/WebKit/LayoutTests/W3CImportExpectations
index cbda763da230e1..43572bbf11b59e 100644
--- a/third_party/WebKit/LayoutTests/W3CImportExpectations
+++ b/third_party/WebKit/LayoutTests/W3CImportExpectations
@@ -9,6 +9,7 @@
# * Change [ Skip ] to [ Pass ]
# * Add a leading comment: ## Owners: user@example.com
+imported/csswg-test/WOFF2-UserAgent [ Skip ]
imported/csswg-test/compositing-1 [ Skip ]
imported/csswg-test/css-align-3 [ Skip ]
imported/csswg-test/css-animations-1 [ Skip ]
@@ -165,6 +166,7 @@ imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/masking [ Sk
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/multicol3 [ Skip ]
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/reftest.list [ Skip ]
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/ruby [ Skip ]
+imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4 [ Skip ]
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/sync-tests-filter [ Skip ]
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh [ Skip ]
imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/text-decor-3 [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/README.md b/third_party/WebKit/LayoutTests/imported/csswg-test/README.md
index 41e833d69a308b..a26af8a30cb60e 100644
--- a/third_party/WebKit/LayoutTests/imported/csswg-test/README.md
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/README.md
@@ -23,6 +23,83 @@ once submitted to the repo, but was not yet ready for review. Since the CSSWG
has adopted the GitHub pull request process, no new files should be landed here.
The subdirectories here are named by test author or contributing organization.
+Running the Tests
+-----------------
+
+The tests are designed to be run from your local computer. The test
+environment requires Python 2.7+ (but not Python 3.x). You will also
+need a copy of OpenSSL. Users on Windows should read the
+[Windows Notes](#windows-notes) section below.
+
+To get the tests running, you need to set up the test domains in your
+[`hosts` file](http://en.wikipedia.org/wiki/Hosts_%28file%29%23Location_in_the_file_system). The
+following entries are required:
+
+```
+127.0.0.1 csswg.test
+127.0.0.1 www.csswg.test
+127.0.0.1 www1.csswg.test
+127.0.0.1 www2.csswg.test
+127.0.0.1 xn--n8j6ds53lwwkrqhv28a.csswg.test
+127.0.0.1 xn--lve-6lad.csswg.test
+0.0.0.0 nonexistent-origin.csswg.test
+```
+
+Because csswg-test uses git submodules, you must ensure that
+these are up to date. In the root of your checkout, run:
+
+```
+git submodule update --init --recursive
+```
+
+The test environment can then be started using
+
+ ./serve
+
+This will start HTTP servers on two ports and a websockets server on
+one port. By default one web server starts on port 8000 and the other
+ports are randomly-chosen free ports. Tests must be loaded from the
+*first* HTTP server in the output. To change the ports, copy the
+`config.default.json` file to `config.json` and edit the new file,
+replacing the part that reads:
+
+```
+"http": [8000, "auto"]
+```
+
+to some port of your choice e.g.
+
+```
+"http": [1234, "auto"]
+```
+
+If you installed OpenSSL in such a way that running `openssl` at a
+command line doesn't work, you also need to adjust the path to the
+OpenSSL binary. This can be done by adding a section to `config.json`
+like:
+
+```
+"ssl": {"openssl": {"binary": "/path/to/openssl"}}
+```
+Windows Notes
+-------------
+
+Running wptserve with SSL enabled on Windows typically requires
+installing an OpenSSL distribution.
+[Shining Light](http://slproweb.com/products/Win32OpenSSL.html)
+provide a convenient installer that is known to work, but requires a
+little extra setup.
+
+After installation ensure that the path to OpenSSL is on your `%Path%`
+environment variable.
+
+Then set the path to the default OpenSSL configuration file (usually
+something like `C:\OpenSSL-Win32\bin\openssl.cfg` in the server
+configuration. To do this copy `config.default.json` in the
+web-platform-tests root to `config.json`. Then edit the JSON so that
+the key `ssl/openssl/base_conf_path` has a value that is the path to
+the OpenSSL config file.
+
Linking Your Tests to Specifications
-----------------------------------
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/config.default.json b/third_party/WebKit/LayoutTests/imported/csswg-test/config.default.json
new file mode 100644
index 00000000000000..e3e6a2832d514e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/config.default.json
@@ -0,0 +1,26 @@
+{"host": "csswg.test",
+ "doc_root": null,
+ "ws_doc_root": null,
+ "external_host": null,
+ "ports":{"http":[8000, "auto"],
+ "https":[8443],
+ "ws":["auto"],
+ "wss":["auto"]},
+ "check_subdomains": true,
+ "log_level":"debug",
+ "bind_hostname": true,
+ "ssl": {"type": "openssl",
+ "encrypt_after_connect": false,
+ "openssl": {
+ "openssl_binary": "openssl",
+ "base_path": "_certs",
+ "force_regenerate": false,
+ "base_conf_path": null
+ },
+ "pregenerated": {
+ "host_key_path": null,
+ "host_cert_path": null
+ },
+ "none": {}
+ }
+}
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-flexbox-1/css-box-justify-content-expected.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-flexbox-1/css-box-justify-content-expected.html
index 0532b34cb9ffa8..e8377473fdef6f 100644
--- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-flexbox-1/css-box-justify-content-expected.html
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-flexbox-1/css-box-justify-content-expected.html
@@ -1,6 +1,6 @@
flexbox |css-box-justify-content
-
+
-
-
Test passes if each pair of boxes are the same,
- including how they look, widths, and horizontal positions.
-
-
Test passes if there are 3 identical blue rectangles with "123456" rotated 90 degrees clockwise. The size of each blue rectangles must be identical and the three "123456" numbers must be enclosed by the three blue borders.