diff --git a/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini b/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini new file mode 100644 index 00000000000..3a956f90011 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini @@ -0,0 +1,4 @@ +[2d.path.isPointInStroke.scaleddashes.html] + [isPointInStroke() should return correct results on dashed paths at high scale factors] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b44d9e9cf..3605e8f3fc9 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: FAIL + expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini similarity index 67% rename from tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini rename to tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini index 4bfb0c2053a..f29da48a2a0 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini @@ -1,4 +1,4 @@ -[hit-test-floats-004.html] +[hit-test-floats-003.html] [Miss float below something else] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini new file mode 100644 index 00000000000..fdf5abac767 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-011.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini new file mode 100644 index 00000000000..098fde40fb1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-012.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini new file mode 100644 index 00000000000..b3b08d61395 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-013.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini new file mode 100644 index 00000000000..61a082b5e0f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-014.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini new file mode 100644 index 00000000000..c1b8824ba0f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-015.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini new file mode 100644 index 00000000000..c329c7f08b9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-016.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 16e4765293e..d1bbeb58882 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -312,15 +312,9 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ + + +assert_implements unittests + diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html new file mode 100644 index 00000000000..4f23e203c57 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html @@ -0,0 +1,43 @@ + + + + + + +assert_implements_optional unittests + diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html index bb3a97e471a..19296b8293f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html @@ -3,29 +3,11 @@ + Assertion functions + diff --git a/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg b/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg new file mode 100644 index 00000000000..909b035ef47 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg @@ -0,0 +1,35 @@ + + isPointInStroke w/dashes works properly at large scale factors + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/tools/ci/run_tc.py b/tests/wpt/web-platform-tests/tools/ci/run_tc.py index 69625710ad9..e8dfa6163e5 100755 --- a/tests/wpt/web-platform-tests/tools/ci/run_tc.py +++ b/tests/wpt/web-platform-tests/tools/ci/run_tc.py @@ -43,6 +43,7 @@ import subprocess import sys import tarfile import tempfile +import time import zipfile from socket import error as SocketError # NOQA: N812 import errno @@ -152,13 +153,12 @@ def install_chrome(channel): dest = os.path.join("/tmp", deb_archive) deb_url = "https://dl.google.com/linux/direct/%s" % deb_archive with open(dest, "w") as f: - if not download_url_to_descriptor(f, deb_url): - raise RuntimeError("Can't download %s. Aborting" % deb_url) - + download_url_to_descriptor(f, deb_url) run(["sudo", "apt-get", "-qqy", "update"]) run(["sudo", "gdebi", "-qn", "/tmp/%s" % deb_archive]) + def install_webkitgtk_from_apt_repository(channel): # Configure webkitgtk.org/debian repository for $channel and pin it with maximum priority run(["sudo", "apt-key", "adv", "--fetch-keys", "https://webkitgtk.org/debian/apt.key"]) @@ -178,12 +178,12 @@ def download_url_to_descriptor(fd, url, max_retries=3): """Download an URL in chunks and saves it to a file descriptor (truncating it) It doesn't close the descriptor, but flushes it on success. It retries the download in case of ECONNRESET up to max_retries.""" - download_succeed = False - if max_retries < 0: - max_retries = 0 - for current_retry in range(max_retries+1): + if max_retries < 1: + max_retries = 1 + wait = 1 + for current_retry in range(1, max_retries+1): try: - print("INFO: Downloading %s Try %d/%d" % (url, current_retry + 1, max_retries)) + print("INFO: Downloading %s Try %d/%d" % (url, current_retry, max_retries)) resp = urlopen(url) # We may come here in a retry, ensure to truncate fd before start writing. fd.seek(0) @@ -194,22 +194,23 @@ def download_url_to_descriptor(fd, url, max_retries=3): break # Download finished fd.write(chunk) fd.flush() - download_succeed = True - break # Sucess + # Success + return except SocketError as e: - if e.errno != errno.ECONNRESET: - raise # Unknown error - if current_retry < max_retries: - print("ERROR: Connection reset by peer. Retrying ...") - continue # Retry - return download_succeed + if current_retry < max_retries and e.errno == errno.ECONNRESET: + # Retry + print("ERROR: Connection reset by peer. Retrying after %ds..." % wait) + time.sleep(wait) + wait *= 2 + else: + # Maximum retries or unknown error + raise def install_webkitgtk_from_tarball_bundle(channel): with tempfile.NamedTemporaryFile(suffix=".tar.xz") as temp_tarball: download_url = "https://webkitgtk.org/built-products/nightly/webkitgtk-nightly-build-last.tar.xz" - if not download_url_to_descriptor(temp_tarball, download_url): - raise RuntimeError("Can't download %s. Aborting" % download_url) + download_url_to_descriptor(temp_tarball, download_url) run(["sudo", "tar", "xfa", temp_tarball.name, "-C", "/"]) # Install dependencies run(["sudo", "apt-get", "-qqy", "update"]) @@ -224,6 +225,7 @@ def install_webkitgtk(channel): else: raise ValueError("Unrecognized release channel: %s" % channel) + def start_xvfb(): start(["sudo", "Xvfb", os.environ["DISPLAY"], "-screen", "0", "%sx%sx%s" % (os.environ["SCREEN_WIDTH"], @@ -267,8 +269,10 @@ def download_artifacts(artifacts): for artifact in artifacts: base_url = task_url(artifact["task"]) if artifact["task"] not in artifact_list_by_task: - resp = urlopen(base_url + "/artifacts") - artifacts_data = json.load(resp) + with tempfile.TemporaryFile() as f: + download_url_to_descriptor(f, base_url + "/artifacts") + f.seek(0) + artifacts_data = json.load(f) artifact_list_by_task[artifact["task"]] = artifacts_data artifacts_data = artifact_list_by_task[artifact["task"]] @@ -428,9 +432,10 @@ def fetch_event_data(): # For example under local testing return None - url = task_url(task_id) - resp = urlopen(url) - task_data = json.load(resp) + with tempfile.TemporaryFile() as f: + download_url_to_descriptor(f, task_url(task_id)) + f.seek(0) + task_data = json.load(f) event_data = task_data.get("extra", {}).get("github_event") if event_data is not None: return json.loads(event_data) diff --git a/tests/wpt/web-platform-tests/tools/docker/README.md b/tests/wpt/web-platform-tests/tools/docker/README.md index 450981f686b..8b0737359ea 100644 --- a/tests/wpt/web-platform-tests/tools/docker/README.md +++ b/tests/wpt/web-platform-tests/tools/docker/README.md @@ -4,7 +4,8 @@ images must be updated as well. To do this, assuming you have docker installed: In this directory, run ```sh -docker build -t . +# --pull forces Docker to get the newest base image. +docker build --pull -t . docker push ``` diff --git a/tests/wpt/web-platform-tests/tools/docker/frontend.py b/tests/wpt/web-platform-tests/tools/docker/frontend.py index 976156cf65a..59a1cff2ebd 100644 --- a/tests/wpt/web-platform-tests/tools/docker/frontend.py +++ b/tests/wpt/web-platform-tests/tools/docker/frontend.py @@ -8,6 +8,7 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) def build(*args, **kwargs): subprocess.check_call(["docker", "build", + "--pull", "--tag", "wpt:local", here]) diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py index 6d329ad38f9..b618d75ec1e 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py @@ -1,5 +1,4 @@ import os -import sys import mock @@ -109,7 +108,7 @@ def manifest_tree(draw): @h.given(manifest_tree()) # FIXME: Workaround for https://github.com/web-platform-tests/wpt/issues/22758 -@h.settings(suppress_health_check=(h.HealthCheck.too_slow,) if sys.version_info.major == 3 else ()) +@h.settings(suppress_health_check=(h.HealthCheck.too_slow,)) @h.example([SourceFileWithTest("a", "0"*40, item.ConformanceCheckerTest)]) def test_manifest_to_json(s): m = manifest.Manifest() @@ -126,7 +125,7 @@ def test_manifest_to_json(s): @h.given(manifest_tree()) # FIXME: Workaround for https://github.com/web-platform-tests/wpt/issues/22758 -@h.settings(suppress_health_check=(h.HealthCheck.too_slow,) if sys.version_info.major == 3 else ()) +@h.settings(suppress_health_check=(h.HealthCheck.too_slow,)) @h.example([SourceFileWithTest("a", "0"*40, item.TestharnessTest)]) @h.example([SourceFileWithTest("a", "0"*40, item.RefTest, references=[("/aa", "==")])]) def test_manifest_idempotent(s): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index c7ddcd75456..9b84e7334bb 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -4,6 +4,6 @@ mozlog==6.0 mozdebug==0.2 # Pillow 7 requires Python 3 pillow==6.2.2 # pyup: <7.0 -urllib3[secure]==1.25.8 +urllib3[secure]==1.25.9 requests==2.23.0 six==1.14.0 diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html index 0f9aa55717c..bfdedb4bec0 100644 --- a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html @@ -36,26 +36,42 @@ async_test(function(t) { async_test(function(t) { let video = document.createElement('video'); - let numberOfCallsLeft = 10; - let lastPresentedFrames = -1; + let maxNumberOfCalls = 10; + let currentCallNumber = 0; + let lastMetadata; - function frameNumberVerifier(time, metadata) { - assert_greater_than(metadata.presentedFrames, lastPresentedFrames, "presentedFrames should be monotonically increasing"); + function verifyMetadata(last, current) { + assert_greater_than(current.presentedFrames, last.presentedFrames, "presentedFrames should be monotonically increasing"); + assert_greater_than(current.presentationTime, last.presentationTime, "presentationTime should be monotonically increasing"); + assert_greater_than(current.expectedDisplayTime, last.expectedDisplayTime, "expectedDisplayTime should be monotonically increasing"); - lastPresentedFrames = metadata.presentedFrames; + // We aren't seeking through the file, so this should be increasing from frame to frame. + assert_greater_than(current.mediaTime, last.mediaTime, "mediaTime should be increasing"); - if (--numberOfCallsLeft) { + // The test video's size doesn't change. + assert_equals(current.width, last.width, "width should remain constant"); + assert_equals(current.height, last.height, "height should remain constant"); + } + + function repeatingCallback(time, metadata) { + // Skip the first call to verifyMetadata. + if (currentCallNumber) + verifyMetadata(lastMetadata, metadata) + + lastMetadata = metadata; + + if (++currentCallNumber > maxNumberOfCalls) { t.done() } else { - video.requestVideoFrameCallback(t.step_func(frameNumberVerifier)); + video.requestVideoFrameCallback(t.step_func(repeatingCallback)); } } - video.requestVideoFrameCallback(t.step_func(frameNumberVerifier)); + video.requestVideoFrameCallback(t.step_func(repeatingCallback)); video.src = getVideoURI('/media/movie_5'); video.play(); -}, 'Test chaining calls to video.rVFC.'); +}, 'Test chaining calls to video.rVFC, and verify the required parameters.'); diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html new file mode 100644 index 00000000000..b6131d6a808 --- /dev/null +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html @@ -0,0 +1,149 @@ + + + + + WebRTC video.requestVideoFrameCallback() test + + + +
+
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html index 743cbc60b54..6660fadeaf4 100644 --- a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html @@ -29,6 +29,24 @@ async_test(function(t) { }, 'Test we can register a video.rVFC callback.'); +async_test(function(t) { + let video = document.createElement('video'); + + video.requestVideoFrameCallback( + t.step_func(video_now => { + // Queue a call to window.rAF, and make sure it is executed within the + // same turn of the event loop (with the same 'time' parameter). + window.requestAnimationFrame( t.step_func_done( window_now => { + assert_equals(video_now, window_now); + })); + }) + ); + + video.src = testVideo.url; + video.play(); + +}, 'Test video.rVFC callbacks run before window.rAF callbacks.'); + async_test(function(t) { let video = document.createElement('video'); diff --git a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js index d92da3d8f34..959859cba21 100644 --- a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js +++ b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js @@ -128,6 +128,7 @@ const ALL_FEATURES = [ 'unbounded', 'hit-test', 'dom-overlay', + 'light-estimation', ]; const TRACKED_IMMERSIVE_DEVICE = { diff --git a/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html b/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html index 0d8e390382f..8f63d5f37aa 100644 --- a/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html +++ b/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html @@ -22,7 +22,7 @@ promise_setup(async () => { }; worker.onerror = () => resolve(false); }); - assert_precondition( + assert_implements( supportsModuleWorkers, "Static import must be supported on module shared worker to run this test." );