From 9c5deb24df7a02dc34158188770972157d65e506 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 3 Oct 2019 05:08:13 +0000 Subject: [PATCH] Bug 1470218 [wpt PR 11610] - [docs] Document subsetTestByKey() utility function, a=testonly Automatic update from web-platform-tests[docs] Document subsetTestByKey() utility function (#11610) Added in https://github.com/web-platform-tests/wpt/pull/11414 -- wpt-commits: 973012935e322f9238878a0246ea9937a68c37b6 wpt-pr: 11610 UltraBlame original commit: 8c42f515c0e37082762d79a2bcc9a5ecd7c0f7db --- testing/web-platform/meta/MANIFEST.json | 2 +- .../tests/docs/_writing-tests/testharness.md | 205 +++++++++++++++++- 2 files changed, 197 insertions(+), 10 deletions(-) diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index f3afe6904840c..6d30da333b0aa 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -3750757,7 +3750757,7 @@ md : [ " -45475b5c261fb5a3fe571fd1c4151e7e3507cf67 +67801e31fa6bf99a22a5407a7e59567e714ee7c3 " " support diff --git a/testing/web-platform/tests/docs/_writing-tests/testharness.md b/testing/web-platform/tests/docs/_writing-tests/testharness.md index c6e79b2395c82..f974eeb958ca5 100644 --- a/testing/web-platform/tests/docs/_writing-tests/testharness.md +++ b/testing/web-platform/tests/docs/_writing-tests/testharness.md @@ -207,11 +207,17 @@ the URL . There -is -a +are +two utility -script +scripts in +that +work +well +together +with +variants / common / @@ -220,12 +226,19 @@ subset tests . js -that -works -well -together -with -variants +and +/ +common +/ +subset +- +tests +- +by +- +key +. +js where a test @@ -415,6 +428,180 @@ name / script > +With +subsetTestByKey +the +key +is +given +as +the +first +argument +and +the +query +string +can +include +or +exclude +a +key +( +will +be +matched +as +a +regular +expression +) +. +< +! +doctype +html +> +< +title +> +Testing +variants +by +key +< +/ +title +> +< +meta +name += +" +variant +" +content += +" +? +include += +Foo +" +> +< +meta +name += +" +variant +" +content += +" +? +include += +Bar +" +> +< +meta +name += +" +variant +" +content += +" +? +exclude += +( +Foo +| +Bar +) +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +script +src += +" +/ +common +/ +subset +- +tests +- +by +- +key +. +js +" +> +< +script +> +subsetTestByKey +( +" +Foo +" +async_test +( +) += +> +{ +. +. +. +} +" +Testing +foo +" +) +; +. +. +. +< +/ +script +> # # Auto