Update web-platform-tests to revision e0875f70f4f33a92d8a935e8d0e09a67a45761e8

This commit is contained in:
WPT Sync Bot 2019-10-19 10:24:03 +00:00
parent 175c0d56ca
commit b209ce8d5b
49 changed files with 712 additions and 137 deletions

View file

@ -119097,6 +119097,30 @@
{}
]
],
"css/css-flexbox/flex-minimum-width-flex-items-009.html": [
[
"css/css-flexbox/flex-minimum-width-flex-items-009.html",
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"css/css-flexbox/flex-minimum-width-flex-items-010.html": [
[
"css/css-flexbox/flex-minimum-width-flex-items-010.html",
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"css/css-flexbox/flex-order.html": [
[
"css/css-flexbox/flex-order.html",
@ -268224,6 +268248,9 @@
"html/cross-origin-opener-policy/no-https.html.headers": [
[]
],
"html/cross-origin-opener-policy/popup-redirect-cache.https.html.headers": [
[]
],
"html/cross-origin-opener-policy/popup-same-origin-non-initial-about-blank.https.html.headers": [
[]
],
@ -320264,6 +320291,12 @@
{}
]
],
"css/css-grid/parsing/grid-template-columns-computed-withcontent.html": [
[
"css/css-grid/parsing/grid-template-columns-computed-withcontent.html",
{}
]
],
"css/css-grid/parsing/grid-template-columns-computed.html": [
[
"css/css-grid/parsing/grid-template-columns-computed.html",
@ -320288,6 +320321,12 @@
{}
]
],
"css/css-grid/parsing/grid-template-rows-computed-withcontent.html": [
[
"css/css-grid/parsing/grid-template-rows-computed-withcontent.html",
{}
]
],
"css/css-grid/parsing/grid-template-rows-computed.html": [
[
"css/css-grid/parsing/grid-template-rows-computed.html",
@ -354187,6 +354226,12 @@
{}
]
],
"html/cross-origin-opener-policy/popup-redirect-cache.https.html": [
[
"html/cross-origin-opener-policy/popup-redirect-cache.https.html",
{}
]
],
"html/cross-origin-opener-policy/popup-same-origin-non-initial-about-blank.https.html": [
[
"html/cross-origin-opener-policy/popup-same-origin-non-initial-about-blank.https.html",
@ -417165,7 +417210,9 @@
"url/failure.html": [
[
"url/failure.html",
{}
{
"timeout": "long"
}
]
],
"url/historical.any.js": [
@ -455958,7 +456005,7 @@
},
"paths": {
".azure-pipelines.yml": [
"ff466be667702bc2178cb1f7cf48cb2b1cf4230c",
"33f84974005c89a004e7437193642d017e4449bf",
"support"
],
".codecov.yml": [
@ -459886,7 +459933,7 @@
"testharness"
],
"2dcontext/text-styles/2d.text.font.parse.invalid.html": [
"0cb62e86318bc6cb80f1c417b5fc27e0d180def2",
"9149d4f696f51eb5af075f34881b432f759bca87",
"testharness"
],
"2dcontext/text-styles/2d.text.font.parse.size.percentage.default.html": [
@ -460070,7 +460117,7 @@
"support"
],
"2dcontext/tools/tests2dtext.yaml": [
"c57caee8f199279fc3a2d408d993944bdff0030f",
"6d5f8f660fa3fbc8e2b8b8710070241ccde392d0",
"support"
],
"2dcontext/transformations/2d.transformation.order.html": [
@ -561845,6 +561892,14 @@
"3daa38a450d2044491d73011d3fe3a676cf5ffb0",
"reftest"
],
"css/css-flexbox/flex-minimum-width-flex-items-009.html": [
"1700c4a494c89a6c7f7f2b123f0d673d498cc5c5",
"reftest"
],
"css/css-flexbox/flex-minimum-width-flex-items-010.html": [
"8845b4896e58d47dac4fc8b25b9fc36b8d594521",
"reftest"
],
"css/css-flexbox/flex-order-ref.html": [
"02f0eb35752e805aa2bc0bd339f73ff2b197c99e",
"support"
@ -564298,7 +564353,7 @@
"support"
],
"css/css-flexbox/support/200x200-green.png": [
"1136e7230b51e0b6208fac90a8bb45e34439cb4b",
"1dcc392a6ef71e55302c40d41a547cf3f75a8f24",
"support"
],
"css/css-flexbox/support/300x150-green.png": [
@ -575481,6 +575536,10 @@
"b95914fe3e55bebd04a77f1146279089efd5f964",
"testharness"
],
"css/css-grid/parsing/grid-template-columns-computed-withcontent.html": [
"9b7cd030a7c145a9300ef7d6700ca6a8dd4e3e5e",
"testharness"
],
"css/css-grid/parsing/grid-template-columns-computed.html": [
"f6d0d9721c9dd8ed1c0441a9dd2e2077b71350d3",
"testharness"
@ -575497,6 +575556,10 @@
"03e601acb93191cecaa73b571d5f6cd8e2a6710a",
"testharness"
],
"css/css-grid/parsing/grid-template-rows-computed-withcontent.html": [
"693cf338c0dc42406336ccd99a605b1cf0d4f9be",
"testharness"
],
"css/css-grid/parsing/grid-template-rows-computed.html": [
"40722623aaa1ee805dc6e282951febb0021e2a8a",
"testharness"
@ -640678,11 +640741,11 @@
"testharness"
],
"html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html": [
"b7cac5e3c59b5066c8aea9f592eee57346d632b1",
"78ba5f6e401dadf43034c772118bba466e678131",
"testharness"
],
"html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html": [
"ba28dc2025acf163c25c3cc7c93fbae58f081a23",
"32d1f1f314eb5051e75b2c6c995a18e3025db9f8",
"testharness"
],
"html/browsers/history/the-location-interface/location-protocol-setter-with-colon.sub.html": [
@ -642205,6 +642268,14 @@
"62633457d3f57135658fb4bdf959fce278dc9851",
"testharness"
],
"html/cross-origin-opener-policy/popup-redirect-cache.https.html": [
"519f710596005b5c460e03cfd398fafbb585ce40",
"testharness"
],
"html/cross-origin-opener-policy/popup-redirect-cache.https.html.headers": [
"46ad58d83bf6e98913ca4c564b7acb8f19fa0093",
"support"
],
"html/cross-origin-opener-policy/popup-same-origin-non-initial-about-blank.https.html": [
"65ec3b26aa0c6e7e5df857bde88f67d394af2e9e",
"testharness"
@ -642250,7 +642321,7 @@
"support"
],
"html/cross-origin-opener-policy/resources/coop-coep.py": [
"8b12341be7356c58c41308e073131ad6c8c3fc35",
"8691e1b59d3134ef210259ed9501d123c002f88c",
"support"
],
"html/cross-origin-opener-policy/resources/postback.html": [
@ -647486,7 +647557,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-iframe.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-sharedworker.js": [
@ -647510,7 +647581,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-failure.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html": [
@ -647526,7 +647597,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-messagechannel.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe.html": [
@ -647534,7 +647605,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-popup.html": [
@ -647566,7 +647637,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-1.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-2.html": [
@ -647574,7 +647645,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-2.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-3.html": [
@ -647582,7 +647653,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-3.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-4-incrementer.html": [
@ -647590,7 +647661,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-4-incrementer.html.headers": [
"1528bf05e6368b00600b23c23042bf0d61985917",
"4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-worker-success.js": [
@ -660622,7 +660693,7 @@
"support"
],
"interfaces/paint-timing.idl": [
"a8f065a3dea52974be6b6052604c43efb3f93ccd",
"0bfb422f88872004bf9b189188dff366a123405a",
"support"
],
"interfaces/payment-handler.idl": [
@ -660786,7 +660857,7 @@
"support"
],
"interfaces/web-nfc.idl": [
"5f0dd23a1cde61d4489e60ba82c48ccc74be67dd",
"25354795b259f48b841ac7d7811c2fd1c31600d0",
"support"
],
"interfaces/web-share.idl": [
@ -672786,11 +672857,11 @@
"testharness"
],
"offscreen-canvas/text/2d.text.font.parse.invalid.html": [
"6ed7eb14fb578d250800eaf86479c4cb34ece3a1",
"79860234a56450396c530a901a5ce4691fcbedf4",
"testharness"
],
"offscreen-canvas/text/2d.text.font.parse.invalid.worker.js": [
"9a407c0446f556514e574d1813a2141e3cfbfe4e",
"9be1a6d6a845ebe194e41e985646c52d7e676a15",
"testharness"
],
"offscreen-canvas/text/2d.text.font.parse.system.html": [
@ -673450,7 +673521,7 @@
"support"
],
"offscreen-canvas/tools/tests2d.yaml": [
"4bdf32db6c1be5c6a53b8d7f38a1b662e623f6e8",
"6b1876d803f4e10e25d4f600372d77397d2d9bdb",
"support"
],
"offscreen-canvas/transformations/2d.transformation.order.html": [
@ -689262,7 +689333,7 @@
"support"
],
"resources/chromium/nfc-mock.js": [
"30645fb00dd924085cf2dc83325d2a579dec44ed",
"6ef03b390d8df7df8abd7662e037db6bdf5febce",
"support"
],
"resources/chromium/sensor.mojom.js": [
@ -700102,7 +700173,7 @@
"support"
],
"tools/ci/azure/cleanup_win10.yml": [
"4abb35369de019c458ca6a5bae4a865363336810",
"195cdee8edfb3bd8cd58ac2dc132b63bcb7d531a",
"support"
],
"tools/ci/azure/fyi_hook.yml": [
@ -700118,7 +700189,7 @@
"support"
],
"tools/ci/azure/install_edge.yml": [
"a70dc78e01c7c32c2eb04ae63eff70e4c982dd98",
"e4c425ab7a0f03218d922e7310ea9d8fde0f51aa",
"support"
],
"tools/ci/azure/install_firefox.yml": [
@ -709658,7 +709729,7 @@
"testharness"
],
"url/failure.html": [
"13a90cc8d097c1631022d9cc1ec636fca19b256d",
"bebdb3dcc4df6ba11a16a1b2a2b450fb610c0f76",
"testharness"
],
"url/historical.any.js": [
@ -709686,7 +709757,7 @@
"support"
],
"url/resources/urltestdata.json": [
"bf4e2a7833d17fab604eb634051e627887fe936a",
"32ed1959430c135bf5910b643e553296b8cd3a00",
"support"
],
"url/toascii.window.js": [
@ -711970,7 +712041,7 @@
"testharness"
],
"web-nfc/NFCReader_scan_iframe.https.html": [
"1f29fe4b41d9028a2381210b8b3d9ccba598b9b2",
"31e79b0388aa5f407a7c9a1b591f162b3e42001f",
"testharness"
],
"web-nfc/NFCReadingEvent_constructor.https.html": [

View file

@ -8,6 +8,3 @@
[throws if handleEvent is thruthy and not callable]
expected: FAIL
[doesn't look up handleEvent method on callable event listeners]
expected: FAIL

View file

@ -312,21 +312,24 @@
[<iframe>: separate response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL

View file

@ -56,6 +56,6 @@
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript;charset=windows-1252 text/javascript]
[separate text/javascript error]
expected: FAIL

View file

@ -11,6 +11,9 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
[X-Content-Type-Options%3A%20%22nosniFF%22]
expected: FAIL
[X-Content-Type-Options%3A%20no%0D%0AX-Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_2.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,4 +1,5 @@
[embedded-opener-remove-frame.html]
expected: TIMEOUT
[opener and "removed" embedded documents]
expected: FAIL
@ -6,5 +7,5 @@
expected: FAIL
[opener of discarded auxiliary browsing context]
expected: FAIL
expected: TIMEOUT

View file

@ -1,10 +0,0 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,11 +1,7 @@
[form-submission-algorithm.html]
expected: TIMEOUT
[If form's firing submission events is true, then return; 'submit' event]
expected: FAIL
[If form's firing submission events is true, then return; 'invalid' event]
expected: FAIL
[Cannot navigate (after constructing the entry list)]
expected: TIMEOUT

View file

@ -1,5 +1,5 @@
[nested-context-navigations-iframe.html]
expected: CRASH
expected: TIMEOUT
[Test that iframe navigations are not observable by the parent, even after history navigations by the parent]
expected: FAIL

View file

@ -0,0 +1,19 @@
[a-element-origin-xhtml.xhtml]
[Parsing origin: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing origin: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher://foo:443/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing origin: <gopher:/example.com/> against <about:blank>]
expected: FAIL

View file

@ -0,0 +1,19 @@
[a-element-origin.html]
[Parsing origin: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing origin: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher://foo:443/> against <about:blank>]
expected: FAIL
[Parsing origin: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing origin: <gopher:/example.com/> against <about:blank>]
expected: FAIL

View file

@ -150,3 +150,18 @@
[Parsing: <#x> against <sc://ñ>]
expected: FAIL
[Parsing: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL

View file

@ -150,3 +150,18 @@
[Parsing: <#x> against <sc://ñ>]
expected: FAIL
[Parsing: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL

View file

@ -141,3 +141,18 @@
[Parsing: <#x> against <sc://ñ>]
expected: FAIL
[Parsing: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <about:blank>]
expected: FAIL
[Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL

View file

@ -0,0 +1,19 @@
[url-origin.html]
[Origin parsing: <gopher:example.com/> against <about:blank>]
expected: FAIL
[Origin parsing: <gopher:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Origin parsing: <gopher://foo:70/> against <about:blank>]
expected: FAIL
[Origin parsing: <gopher://foo:443/> against <about:blank>]
expected: FAIL
[Origin parsing: <gopher:example.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Origin parsing: <gopher:/example.com/> against <about:blank>]
expected: FAIL

View file

@ -331,8 +331,8 @@ jobs:
channel: stable
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
# --exclude is a workaround for https://github.com/web-platform-tests/wpt/issues/16229
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info safari --exclude /inert/inert-retargeting.tentative.html --exclude /inert/inert-retargeting-iframe.tentative.html --exclude /web-share/share-sharePromise-internal-slot.https.html
# --exclude is a workaround for https://github.com/web-platform-tests/wpt/issues/18634
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info safari --exclude /inert/inert-retargeting.tentative.html --exclude /inert/inert-retargeting-iframe.tentative.html
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
@ -364,8 +364,7 @@ jobs:
- template: tools/ci/azure/install_safari.yml
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
# --exclude is a workaround for https://github.com/web-platform-tests/wpt/issues/16229
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel preview safari --exclude /inert/inert-retargeting.tentative.html --exclude /inert/inert-retargeting-iframe.tentative.html --exclude /payment-request/ --exclude /web-share/share-sharePromise-internal-slot.https.html
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel preview safari
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'

View file

@ -22,6 +22,10 @@ _addTest(function(canvas, ctx) {
ctx.font = '20px serif';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = '';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = 'bogus';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");

View file

@ -78,6 +78,10 @@
ctx.font = '20px serif';
@assert ctx.font === '20px serif';
ctx.font = '20px serif';
ctx.font = '';
@assert ctx.font === '20px serif';
ctx.font = '20px serif';
ctx.font = 'bogus';
@assert ctx.font === '20px serif';

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<title>CSS Flexible Box Test: Minimum width of flex items</title>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org" />
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto" title="4.5. Implied Minimum Size of Flex Items" />
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta name="assert" content="Implied minimum main content suggestion accounts for minimum cross size when items have an aspect ratio.">
<style type="text/css">
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
#constrained-flex {
display: flex;
width: 10px;
}
#test-flex-item-overlapping-green {
min-height: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div id="constrained-flex">
<img id="test-flex-item-overlapping-green" src="support/60x60-green.png" />
</div>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<title>CSS Flexible Box Test: Minimum width of flex items</title>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org" />
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto" title="4.5. Implied Minimum Size of Flex Items" />
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta name="assert" content="Implied minimum main content suggestion accounts for maximum cross size when items have an aspect ratio.">
<style type="text/css">
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
#constrained-flex {
display: flex;
width: 10px;
}
#test-flex-item-overlapping-green {
max-height: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div id="constrained-flex">
<img id="test-flex-item-overlapping-green" src="support/200x200-green.png" />
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 275 B

Before After
Before After

View file

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-columns">
<meta name="assert" content="grid-template-columns computed value is the keyword none or a computed track list.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#target {
display: grid;
font-size: 40px;
min-width: 200px;
width: 300px;
max-width: 400px;
min-height: 500px;
height: 600px;
max-height: 700px;
}
#child {
min-width: 20px;
width: 30px;
max-width: 40px;
min-height: 50px;
height: 60px;
max-height: 70px;
}
</style>
</head>
<body>
<div id="container">
<div id="target">
<div id="child"></div>
</div>
</div>
<script>
test_computed_value("grid-template-columns", 'none', '300px'); // "none" without #child
// track-size <fixed-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
test_computed_value("grid-template-columns", '20%', '60px'); // 20% * width
test_computed_value("grid-template-columns", 'calc(-0.5em + 10px)', '0px');
test_computed_value("grid-template-columns", 'calc(0.5em + 10px)', '30px');
test_computed_value("grid-template-columns", 'calc(30% + 40px)', '130px'); // 30% * width + 40px
test_computed_value("grid-template-columns", '5fr', '300px'); // width
test_computed_value("grid-template-columns", 'min-content', '30px');
test_computed_value("grid-template-columns", 'max-content', '30px');
test_computed_value("grid-template-columns", 'auto', '300px'); // width
// track-size minmax( <inflexible-breadth> , <track-breadth> )
test_computed_value("grid-template-columns", 'minmax(10px, auto)', '300px'); // width
test_computed_value("grid-template-columns", 'minmax(20%, max-content)', '60px'); // 20% * width
test_computed_value("grid-template-columns", 'minmax(min-content, calc(-0.5em + 10px))', '30px');
test_computed_value("grid-template-columns", 'minmax(auto, 0)', '30px');
// track-size fit-content( <length-percentage> )
test_computed_value("grid-template-columns", 'fit-content(70px)', '30px');
test_computed_value("grid-template-columns", 'fit-content(20%)', '30px');
test_computed_value("grid-template-columns", 'fit-content(calc(-0.5em + 10px))', '30px');
// <track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )
test_computed_value("grid-template-columns", 'repeat(1, 10px)', '10px');
test_computed_value("grid-template-columns", 'repeat(1, [one two] 20%)', '[one two] 60px');
test_computed_value("grid-template-columns", 'repeat(2, minmax(10px, auto))', '160px 140px');
test_computed_value("grid-template-columns", 'repeat(2, fit-content(20%) [three four] 30px 40px [five six])',
'30px [three four] 30px 40px [five six] 0px [three four] 30px 40px [five six]');
// <track-list> = [ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?
test_computed_value("grid-template-columns", 'min-content repeat(5, minmax(10px, auto))',
'30px 54px 54px 54px 54px 54px');
test_computed_value("grid-template-columns", '[] 150px [] 1fr []', '150px 150px');
// <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )
test_computed_value("grid-template-columns", 'repeat(auto-fill, 200px)', '200px');
test_computed_value("grid-template-columns", 'repeat(auto-fit, [one] 20%)',
'[one] 60px [one] 0px [one] 0px [one] 0px [one] 0px');
test_computed_value("grid-template-columns", 'repeat(auto-fill, minmax(100px, 5fr) [two])',
'100px [two] 100px [two] 100px [two]');
test_computed_value("grid-template-columns", 'repeat(auto-fit, [three] minmax(max-content, 6em) [four])',
'[three] 240px [four]');
// <auto-track-list> =
// [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
// <auto-repeat>
// [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
test_computed_value("grid-template-columns", '[one] repeat(2, minmax(50px, auto)) [two] 30px [three] repeat(auto-fill, 10px) 40px [four five] repeat(2, minmax(200px, auto)) [six]',
'[one] 50px 50px [two] 30px [three] 10px 40px [four five] 200px 200px [six]');
</script>
</body>
</html>

View file

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateRows</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-rows">
<meta name="assert" content="grid-template-rows computed value is the keyword none or a computed track list.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#target {
display: grid;
font-size: 40px;
min-width: 200px;
width: 300px;
max-width: 400px;
min-height: 500px;
height: 600px;
max-height: 700px;
}
#child {
min-width: 20px;
width: 30px;
max-width: 40px;
min-height: 50px;
height: 60px;
max-height: 70px;
}
</style>
</head>
<body>
<div id="container">
<div id="target">
<div id="child"></div>
</div>
</div>
<script>
test_computed_value("grid-template-rows", 'none', '600px'); // "none" without #child
// track-size <fixed-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
test_computed_value("grid-template-rows", '20%', '120px'); // 20% * height
test_computed_value("grid-template-rows", 'calc(-0.5em + 10px)', '0px');
test_computed_value("grid-template-rows", 'calc(0.5em + 10px)', '30px');
test_computed_value("grid-template-rows", 'calc(30% + 40px)', '220px'); // 30% * height + 40px
test_computed_value("grid-template-rows", '5fr', '600px'); // height
test_computed_value("grid-template-rows", 'min-content', '60px');
test_computed_value("grid-template-rows", 'max-content', '60px');
test_computed_value("grid-template-rows", 'auto', '600px'); // height
// track-size minmax( <inflexible-breadth> , <track-breadth> )
test_computed_value("grid-template-rows", 'minmax(10px, auto)', '600px'); // height
test_computed_value("grid-template-rows", 'minmax(20%, max-content)', '120px'); // 20% * height
test_computed_value("grid-template-rows", 'minmax(min-content, calc(-0.5em + 10px))', '60px');
test_computed_value("grid-template-rows", 'minmax(auto, 0)', '60px');
// track-size fit-content( <length-percentage> )
test_computed_value("grid-template-rows", 'fit-content(70px)', '60px');
test_computed_value("grid-template-rows", 'fit-content(20%)', '60px');
test_computed_value("grid-template-rows", 'fit-content(calc(-0.5em + 10px))', '60px');
// <track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )
test_computed_value("grid-template-rows", 'repeat(1, 10px)', '10px');
test_computed_value("grid-template-rows", 'repeat(1, [one two] 20%)', '[one two] 120px');
test_computed_value("grid-template-rows", 'repeat(2, minmax(10px, auto))', '325px 275px');
test_computed_value("grid-template-rows", 'repeat(2, fit-content(20%) [three four] 30px 40px [five six])',
'60px [three four] 30px 40px [five six] 0px [three four] 30px 40px [five six]');
// <track-list> = [ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?
test_computed_value("grid-template-rows", 'min-content repeat(5, minmax(10px, auto))',
'60px 108px 108px 108px 108px 108px');
test_computed_value("grid-template-rows", '[] 150px [] 1fr []', '150px 450px');
// <auto-repeat> = repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )
test_computed_value("grid-template-rows", 'repeat(auto-fill, 200px)', '200px 200px 200px');
test_computed_value("grid-template-rows", 'repeat(auto-fit, [one] 20%)',
'[one] 120px [one] 0px [one] 0px [one] 0px [one] 0px');
test_computed_value("grid-template-rows", 'repeat(auto-fill, minmax(100px, 5fr) [two])',
'100px [two] 100px [two] 100px [two] 100px [two] 100px [two] 100px [two]');
test_computed_value("grid-template-rows", 'repeat(auto-fit, [three] minmax(max-content, 6em) [four])',
'[three] 240px [four three] 0px [four]');
// <auto-track-list> =
// [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
// <auto-repeat>
// [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?
test_computed_value("grid-template-rows", '[one] repeat(2, minmax(50px, auto)) [two] 30px [three] repeat(auto-fill, 10px) 40px [four five] repeat(2, minmax(200px, auto)) [six]',
'[one] 50px 50px [two] 30px [three] 10px 10px 10px 40px [four five] 200px 200px [six]');
</script>
</body>
</html>

View file

@ -17,7 +17,6 @@ self.onload = () => {
'data',
'file',
'ftp',
'gopher',
'http+x'
].forEach((val, index) => {
async_test((t) => {

View file

@ -12,7 +12,6 @@ self.onload = () => {
// 'mailto' opens an email client in Firefox...
'file',
'ftp',
'gopher',
'http+x'
].forEach((val) => {
async_test((t) => {

View file

@ -0,0 +1,72 @@
<!doctype html>
<meta charset=utf-8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/common.js"></script>
<script src="/common/utils.js"></script> <!-- Use token() to allow running tests in parallel -->
<div id=log></div>
<script>
function url_test_cache(t, url, channelName, hasOpener) {
const bc = new BroadcastChannel(channelName);
bc.onmessage = t.step_func(event => {
const payload = event.data;
assert_equals(payload.name, hasOpener ? channelName : "");
assert_equals(payload.opener, hasOpener);
bc.close()
// test the same url for cache
url_test(t, url, channelName, hasOpener);
});
const w = window.open(url, channelName);
// w will be closed by its postback iframe. When out of process,
// window.close() does not work.
t.add_cleanup(() => w.close());
}
// Redirect from hostA to hostB with same coop and coep.
// Cache the hostA page if redirectCache is true.
// Cache the hostB page if destCache is true.
function coop_redirect_cache_test(t, hostA, hostB, coop, coep, redirectCache, destCache, channelName, hasOpener) {
let redirectUrl = `${hostA.origin}/html/cross-origin-opener-policy/resources/coop-coep.py`;
let redirectCacheString = redirectCache ? "&cache=1" : "";
let destCacheString = destCache ? "&cache=1" : "";
let destUrl = `${hostB.origin}/html/cross-origin-opener-policy/resources/coop-coep.py?coop=${coop}&coep=${coep}${destCacheString}&channel=${channelName}`;
let url = `${redirectUrl}?coop=${coop}&coep=${coep}${redirectCacheString}&redirect=${encodeURIComponent(destUrl)}`;
url_test_cache(t, url, channelName, hasOpener);
}
function run_redirect_cache_tests(documentCOOPValueTitle, testArray) {
for (const test of tests) {
async_test(t => {
coop_redirect_cache_test(t, test[0], test[1], "same-origin", "require-corp", test[2], test[3], test[4], test[5]);
}, `${documentCOOPValueTitle} document opening popup redirect from ${test[0].origin} to ${test[1].origin} with redirectCache ${test[2]} and destCache ${test[3]}`);
}
}
let tests = [
// popup Origin, final Origin, isCacheRedirect, isCacheDestination, channelName, hasOpener
// Origin A->A->B
[SAME_ORIGIN, CROSS_ORIGIN, true, false, token(), false],
[SAME_ORIGIN, CROSS_ORIGIN, false, true, token(), false],
[SAME_ORIGIN, CROSS_ORIGIN, true, true, token(), false],
// Origin A->B->B
[CROSS_ORIGIN, SAME_ORIGIN, true, false, token(), false],
[CROSS_ORIGIN, SAME_ORIGIN, false, true, token(), false],
[CROSS_ORIGIN, SAME_ORIGIN, true, true, token(), false],
// Origin A->B->C
[SAME_SITE, CROSS_ORIGIN, true, false, token(), false],
[SAME_SITE, CROSS_ORIGIN, false, true, token(), false],
[SAME_SITE, CROSS_ORIGIN, true, true, token(), false],
];
run_redirect_cache_tests("same-origin", tests);
</script>

View file

@ -0,0 +1 @@
Cross-Origin-Opener-Policy: same-origin

View file

@ -6,6 +6,8 @@ def main(request, response):
response.headers.set("Cross-Origin-Opener-Policy", coop)
if coep != "":
response.headers.set("Cross-Origin-Embedder-Policy", coep)
if 'cache' in request.GET:
response.headers.set('Cache-Control', 'max-age=3600')
if redirect != None:
response.status = 302

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -1,2 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Cross-Origin-Resource-Policy: cross-origin

View file

@ -3,4 +3,5 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Paint Timing 1 (https://w3c.github.io/paint-timing/)
[Exposed=Window]
interface PerformancePaintTiming : PerformanceEntry {};

View file

@ -25,9 +25,6 @@ interface NDEFRecord {
readonly attribute USVString? encoding;
readonly attribute USVString? lang;
USVString? text();
[NewObject] ArrayBuffer? arrayBuffer();
[NewObject] any json();
sequence<NDEFRecord> toRecords();
};
@ -45,61 +42,61 @@ dictionary NDEFRecordInit {
typedef (DOMString or BufferSource or NDEFMessageInit) NDEFMessageSource;
[SecureContext, Exposed=Window]
interface NFCWriter {
interface NDEFWriter {
constructor();
Promise<void> push(NDEFMessageSource message, optional NFCPushOptions options={});
Promise<void> push(NDEFMessageSource message, optional NDEFPushOptions options={});
};
[SecureContext, Exposed=Window]
interface NFCReader : EventTarget {
interface NDEFReader : EventTarget {
constructor();
attribute EventHandler onreading;
attribute EventHandler onerror;
void scan(optional NFCScanOptions options={});
void scan(optional NDEFScanOptions options={});
};
[SecureContext, Exposed=Window]
interface NFCReadingEvent : Event {
constructor(DOMString type, NFCReadingEventInit readingEventInitDict);
interface NDEFReadingEvent : Event {
constructor(DOMString type, NDEFReadingEventInit readingEventInitDict);
readonly attribute DOMString serialNumber;
[SameObject] readonly attribute NDEFMessage message;
};
dictionary NFCReadingEventInit : EventInit {
dictionary NDEFReadingEventInit : EventInit {
DOMString? serialNumber = "";
required NDEFMessageInit message;
};
[SecureContext, Exposed=Window]
interface NFCErrorEvent : Event {
constructor(DOMString type, NFCErrorEventInit errorEventInitDict);
interface NDEFErrorEvent : Event {
constructor(DOMString type, NDEFErrorEventInit errorEventInitDict);
readonly attribute DOMException error;
};
dictionary NFCErrorEventInit : EventInit {
dictionary NDEFErrorEventInit : EventInit {
required DOMException error;
};
dictionary NFCPushOptions {
NFCPushTarget target = "any";
dictionary NDEFPushOptions {
NDEFPushTarget target = "any";
unrestricted double timeout = Infinity;
boolean ignoreRead = true;
boolean overwrite = true;
AbortSignal? signal;
};
enum NFCPushTarget {
enum NDEFPushTarget {
"tag",
"peer",
"any"
};
dictionary NFCScanOptions {
dictionary NDEFScanOptions {
USVString id = "";
USVString recordType;
USVString mediaType = "";

View file

@ -19,6 +19,10 @@ var ctx = offscreenCanvas.getContext('2d');
ctx.font = '20px serif';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = '';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = 'bogus';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");

View file

@ -15,6 +15,10 @@ var ctx = offscreenCanvas.getContext('2d');
ctx.font = '20px serif';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = '';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");
ctx.font = '20px serif';
ctx.font = 'bogus';
_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'");

View file

@ -9304,6 +9304,10 @@
ctx.font = '20px serif';
@assert ctx.font === '20px serif';
ctx.font = '20px serif';
ctx.font = '';
@assert ctx.font === '20px serif';
ctx.font = '20px serif';
ctx.font = 'bogus';
@assert ctx.font === '20px serif';

View file

@ -32,7 +32,7 @@ function toMojoNDEFRecord(record) {
}
function toByteArray(data) {
// Convert JS objects to byte array
// Convert JS objects to byte array.
let byteArray = new Uint8Array(0);
let tmpData = data;
@ -49,7 +49,7 @@ function toByteArray(data) {
// Compares NDEFRecords that were provided / received by the mock service.
// TODO: Use different getters to get received record data,
// see spec changes at https://github.com/w3c/web-nfc/pull/243
// see spec changes at https://github.com/w3c/web-nfc/pull/243.
function compareNDEFRecords(providedRecord, receivedRecord) {
assert_equals(providedRecord.recordType, receivedRecord.recordType);
@ -105,7 +105,7 @@ function assertNFCReaderOptionsEqual(provided, received) {
// Checks whether NFCReaderOptions are matched with given message.
function matchesWatchOptions(message, options) {
// Filter by Web NFC id
// Filter by Web NFC id.
if (!matchesWebNfcId(message.url, options.url)) return false;
// Matches any record / media type.
@ -114,7 +114,7 @@ function matchesWatchOptions(message, options) {
return true;
}
// Filter by mediaType and recordType
// Filter by mediaType and recordType.
for (let record of message.records) {
if (options.mediaType != null && options.mediaType !== ""
&& options.mediaType !== record.mediaType) {
@ -175,14 +175,15 @@ var WebNFCTest = (() => {
this.client_ = null;
this.watchers_ = [];
this.reading_messages_ = [];
this.operations_suspended_ = false;
}
// NFC delegate functions
// NFC delegate functions.
async push(message, options) {
let error = this.getHWError();
if (error)
return error;
// Cancel previous pending push operation
// Cancel previous pending push operation.
if (this.pending_promise_func_) {
this.cancelPendingPushOperation();
}
@ -192,9 +193,12 @@ var WebNFCTest = (() => {
return new Promise(resolve => {
this.pending_promise_func_ = resolve;
if (options.timeout && options.timeout !== Infinity &&
// Pend push operation if NFC operation is suspended.
if (this.operations_suspended_) {
// Do nothing, pends push operation.
} else if (options.timeout && options.timeout !== Infinity &&
!this.push_completed_) {
// Resolve with TimeoutError, else pending push operation.
// Resolve with TimeoutError, else pend push operation.
if (this.push_should_timeout_) {
resolve(
createNFCError(device.mojom.NFCErrorType.TIMER_EXPIRED));
@ -226,11 +230,14 @@ var WebNFCTest = (() => {
}
this.watchers_.push({id: id, options: options});
// Triggers onWatch if the new watcher matches existing messages
for (let message of this.reading_messages_) {
if (matchesWatchOptions(message, options)) {
this.client_.onWatch(
[id], fake_tag_serial_number, toMojoNDEFMessage(message));
// Ignore reading if NFC operation is suspended.
if(!this.operations_suspended_) {
// Triggers onWatch if the new watcher matches existing messages.
for (let message of this.reading_messages_) {
if (matchesWatchOptions(message, options)) {
this.client_.onWatch(
[id], fake_tag_serial_number, toMojoNDEFMessage(message));
}
}
}
@ -290,6 +297,7 @@ var WebNFCTest = (() => {
this.push_completed_ = true;
this.watchers_ = [];
this.reading_messages_ = [];
this.operations_suspended_ = false;
this.cancelPendingPushOperation();
this.bindingSet_.closeAllBindings();
this.interceptor_.stop();
@ -311,10 +319,12 @@ var WebNFCTest = (() => {
// Sets message that is used to deliver NFC reading updates.
setReadingMessage(message) {
this.reading_messages_.push(message);
// Ignore reading if NFCPushOptions.ignoreRead is true
// Ignore reading if NFC operation is suspended.
if(this.operations_suspended_) return;
// Ignore reading if NFCPushOptions.ignoreRead is true.
if(this.push_options_ && this.push_options_.ignoreRead)
return;
// Triggers onWatch if the new message matches existing watchers
// Triggers onWatch if the new message matches existing watchers.
for (let watcher of this.watchers_) {
if (matchesWatchOptions(message, watcher.options)) {
this.client_.onWatch(
@ -327,6 +337,31 @@ var WebNFCTest = (() => {
setPushShouldTimeout(result) {
this.push_should_timeout_ = result;
}
// Suspends all pending NFC operations. Could be used when web page
// visibility is lost.
suspendNFCOperations() {
this.operations_suspended_ = true;
}
// Resumes all suspended NFC operations.
resumeNFCOperations() {
this.operations_suspended_ = false;
// Resumes pending NFC reading.
for (let watcher of this.watchers_) {
for (let message of this.reading_messages_) {
if (matchesWatchOptions(message, watcher.options)) {
this.client_.onWatch(
[watcher.id], fake_tag_serial_number,
toMojoNDEFMessage(message));
}
}
}
// Resumes pending push operation.
if (this.pending_promise_func_) {
this.pending_promise_func_(createNFCError(null));
}
}
}
let testInternal = {

View file

@ -9,17 +9,23 @@ steps:
cmd /c taskkill /f /im setup.exe `> nul 2`> nul
if (Test-Path $edgePath) {
$installerPath = Get-ChildItem -PATH $edgePath -Filter "setup.exe" -Recurse | Select -First 1 FullName
if (Test-Path $installerPath.FullName) {
if(-not($installerPath -eq $nul) -and (Test-Path $installerPath.FullName)) {
Write-Host "Uninstall: $($installerPath.FullName) $uninstallArgs"
Start-Process "$($installerPath.FullName)" -ArgumentList $uninstallArgs -Wait
Remove-Item -Path $edgePath -Recurse -Force -ErrorAction SilentlyContinue
} else {
Write-Host "Failed to find setup.exe under $edgePath"
}
}
} catch [Exception] {
Write-Host "Failed to unstall Edge from $edgePath. ERROR= $($_.Exception.Message)" -ForegroundColor Red
Write-Host "Failed to uninstall Edge from $edgePath. ERROR= $($_.Exception.Message)" -ForegroundColor Red
}
}
function IsEdgeRunning() {
return (Get-Process | Where-Object { $_.Name -eq "msedge" }).Length -gt 0
}
# restore hosts file
$hostFile = "$env:systemroot\System32\drivers\etc\hosts"
Copy-Item -Path "$hostFile.back" -Destination $hostFile -Force
@ -32,6 +38,18 @@ steps:
UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev\Application" "--uninstall --msedge-dev --system-level --force-uninstall"
# uninstall Edge Beta channel
UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Beta\Application" "--uninstall --msedge-beta --system-level --force-uninstall"
# Check if Edge is still running and try to close it.
# If we fail to close it, then reboot the system
# as this lingering process can lead to run instability.
if (IsEdgeRunning) {
Write-Host "Found Edge process running, try to close it."
Stop-Process -Name "msedge" -Force
if (IsEdgeRunning) {
Write-Host "Failed to close running Edge process, reboot the system." -ForegroundColor Red
Restart-Computer -Force
}
}
displayName: 'Restore hosts file and cleanup test machine'
condition: always()
errorActionPreference: silentlyContinue

View file

@ -9,12 +9,18 @@ steps:
$edgeInstallerName = 'MicrosoftEdgeSetup.exe'
# Link to Canary channel installer
Start-BitsTransfer -Source 'https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en-us' -Destination MicrosoftEdgeSetup.exe
if (-not (Test-Path $edgeInstallerName)) {
Throw "Failed to download Edge installer to $edgeInstallerName."
}
cmd /c START /WAIT $edgeInstallerName /silent /install
$edgePath = "$env:localappdata\Microsoft\Edge SxS\Application"
if (Test-Path $edgePath) {
Write-Host "##vso[task.prependpath]$edgePath"
Write-Host "Edge Canary installed at $edgePath."
(Get-Item -Path "$edgePath\msedge.exe").VersionInfo | Format-List
} else {
Throw "Failed to install Edge at $edgePath"
Copy-Item -Path "$env:temp\*edge*.log" -Destination $(Build.ArtifactStagingDirectory) -Force
Throw "Failed to install Edge Canary at $edgePath"
}
displayName: 'Install Edge Canary'
- ${{ if eq(parameters.channel, 'dev') }}:
@ -26,7 +32,10 @@ steps:
$edgePath = "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev\Application"
if (Test-Path $edgePath) {
Write-Host "##vso[task.prependpath]$edgePath"
Write-Host "Edge Canary installed at $edgePath."
(Get-Item -Path "$edgePath\msedge.exe").VersionInfo | Format-List
} else {
Throw "Failed to install Edge at $edgePath"
Copy-Item -Path "$env:temp\*edge*.log" -Destination $(Build.ArtifactStagingDirectory) -Force
Throw "Failed to install Edge Dev at $edgePath"
}
displayName: 'Install Edge Dev'

View file

@ -1,6 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<title>Test URL parser failure consistency</title>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>

View file

@ -1076,15 +1076,15 @@
{
"input": "gopher:/example.com/",
"base": "http://example.org/foo/bar",
"href": "gopher://example.com/",
"origin": "gopher://example.com",
"href": "gopher:/example.com/",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"host": "",
"hostname": "",
"port": "",
"pathname": "/",
"pathname": "/example.com/",
"search": "",
"hash": ""
},
@ -1241,15 +1241,15 @@
{
"input": "gopher:example.com/",
"base": "http://example.org/foo/bar",
"href": "gopher://example.com/",
"origin": "gopher://example.com",
"href": "gopher:example.com/",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"host": "",
"hostname": "",
"port": "",
"pathname": "/",
"pathname": "example.com/",
"search": "",
"hash": ""
},
@ -2511,14 +2511,14 @@
{
"input": "gopher://foo:70/",
"base": "about:blank",
"href": "gopher://foo/",
"origin": "gopher://foo",
"href": "gopher://foo:70/",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
"host": "foo",
"host": "foo:70",
"hostname": "foo",
"port": "",
"port": "70",
"pathname": "/",
"search": "",
"hash": ""
@ -2527,7 +2527,7 @@
"input": "gopher://foo:443/",
"base": "about:blank",
"href": "gopher://foo:443/",
"origin": "gopher://foo:443",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
@ -2750,15 +2750,15 @@
{
"input": "gopher:/example.com/",
"base": "about:blank",
"href": "gopher://example.com/",
"origin": "gopher://example.com",
"href": "gopher:/example.com/",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"host": "",
"hostname": "",
"port": "",
"pathname": "/",
"pathname": "/example.com/",
"search": "",
"hash": ""
},
@ -2915,15 +2915,15 @@
{
"input": "gopher:example.com/",
"base": "about:blank",
"href": "gopher://example.com/",
"origin": "gopher://example.com",
"href": "gopher:example.com/",
"origin": "null",
"protocol": "gopher:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"host": "",
"hostname": "",
"port": "",
"pathname": "/",
"pathname": "example.com/",
"search": "",
"hash": ""
},

View file

@ -25,10 +25,13 @@ nfc_test(async (t, mockNFC) => {
const iframeLoadWatcher = new EventWatcher(t, iframe, 'load');
document.body.appendChild(iframe);
await iframeLoadWatcher.wait_for('load');
// Focus on iframe
// Focus on iframe.
iframe.contentWindow.document.getElementById('foo').focus();
assert_true(iframe.contentDocument.hasFocus(), 'iframe gains the focus');
// Suspend NFC operations is async in blink, use setTimeout as a workaround.
// TODO(wanming.lin@intel.com): find a good way to eliminate this race
// condition.
await new Promise(resolve => t.step_timeout(resolve, 0));
mockNFC.setReadingMessage(createMessage([createTextRecord(test_text_data)]));
await promise;