Update web-platform-tests to revision e3d0146264093a389148cc555ee9be69bd75719b

This commit is contained in:
WPT Sync Bot 2019-04-10 21:49:30 -04:00
parent dd2deeabca
commit 7e807a0d1e
37 changed files with 842 additions and 140 deletions

View file

@ -8941,6 +8941,66 @@
{} {}
] ]
], ],
"css/css-text-decor/text-underline-position-019-manual.html": [
[
"css/css-text-decor/text-underline-position-019-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-020-manual.html": [
[
"css/css-text-decor/text-underline-position-020-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-021-manual.html": [
[
"css/css-text-decor/text-underline-position-021-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-022-manual.html": [
[
"css/css-text-decor/text-underline-position-022-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-071-manual.html": [
[
"css/css-text-decor/text-underline-position-071-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-072-manual.html": [
[
"css/css-text-decor/text-underline-position-072-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-073-manual.html": [
[
"css/css-text-decor/text-underline-position-073-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-074-manual.html": [
[
"css/css-text-decor/text-underline-position-074-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-075-manual.html": [
[
"css/css-text-decor/text-underline-position-075-manual.html",
{}
]
],
"css/css-text-decor/text-underline-position-076-manual.html": [
[
"css/css-text-decor/text-underline-position-076-manual.html",
{}
]
],
"css/css-text/hanging-punctuation/hanging-punctuation-allow-end-001.xht": [ "css/css-text/hanging-punctuation/hanging-punctuation-allow-end-001.xht": [
[ [
"css/css-text/hanging-punctuation/hanging-punctuation-allow-end-001.xht", "css/css-text/hanging-punctuation/hanging-punctuation-allow-end-001.xht",
@ -19393,6 +19453,42 @@
{} {}
] ]
], ],
"web-nfc/NFCReader_options_mediaType-manual.https.html": [
[
"web-nfc/NFCReader_options_mediaType-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_recordType_empty-manual.https.html": [
[
"web-nfc/NFCReader_options_recordType_empty-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_recordType_json-manual.https.html": [
[
"web-nfc/NFCReader_options_recordType_json-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_recordType_opaque-manual.https.html": [
[
"web-nfc/NFCReader_options_recordType_opaque-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_recordType_text-manual.https.html": [
[
"web-nfc/NFCReader_options_recordType_text-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_recordType_url-manual.https.html": [
[
"web-nfc/NFCReader_options_recordType_url-manual.https.html",
{}
]
],
"web-nfc/NFCReader_options_url-manual.https.html": [ "web-nfc/NFCReader_options_url-manual.https.html": [
[ [
"web-nfc/NFCReader_options_url-manual.https.html", "web-nfc/NFCReader_options_url-manual.https.html",
@ -19423,36 +19519,6 @@
{} {}
] ]
], ],
"web-nfc/nfc_recordType_empty-manual.https.html": [
[
"web-nfc/nfc_recordType_empty-manual.https.html",
{}
]
],
"web-nfc/nfc_recordType_json-manual.https.html": [
[
"web-nfc/nfc_recordType_json-manual.https.html",
{}
]
],
"web-nfc/nfc_recordType_opaque-manual.https.html": [
[
"web-nfc/nfc_recordType_opaque-manual.https.html",
{}
]
],
"web-nfc/nfc_recordType_text-manual.https.html": [
[
"web-nfc/nfc_recordType_text-manual.https.html",
{}
]
],
"web-nfc/nfc_recordType_url-manual.https.html": [
[
"web-nfc/nfc_recordType_url-manual.https.html",
{}
]
],
"web-share/share-cancel-manual.html": [ "web-share/share-cancel-manual.html": [
[ [
"web-share/share-cancel-manual.html", "web-share/share-cancel-manual.html",
@ -230769,6 +230835,11 @@
{} {}
] ]
], ],
"content-security-policy/generic/eval-typecheck-callout-order.tentative.html.headers": [
[
{}
]
],
"content-security-policy/generic/fail-0_1.js": [ "content-security-policy/generic/fail-0_1.js": [
[ [
{} {}
@ -349494,6 +349565,12 @@
{} {}
] ]
], ],
"content-security-policy/generic/eval-typecheck-callout-order.tentative.html": [
[
"content-security-policy/generic/eval-typecheck-callout-order.tentative.html",
{}
]
],
"content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html": [ "content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html": [
[ [
"content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html", "content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html",
@ -357868,6 +357945,12 @@
{} {}
] ]
], ],
"css/css-position/position-absolute-crash-chrome-005.html": [
[
"css/css-position/position-absolute-crash-chrome-005.html",
{}
]
],
"css/css-position/position-absolute-dynamic-containing-block.html": [ "css/css-position/position-absolute-dynamic-containing-block.html": [
[ [
"css/css-position/position-absolute-dynamic-containing-block.html", "css/css-position/position-absolute-dynamic-containing-block.html",
@ -503780,7 +503863,7 @@
"support" "support"
], ],
"content-security-policy/README.html": [ "content-security-policy/README.html": [
"becc48b65ac0397326aa4cb1cb9e17b29bd473b3", "98fd5c4bf789b99b959bab3fbdadb1ad408db5a0",
"support" "support"
], ],
"content-security-policy/base-uri/base-uri-allow.sub.html": [ "content-security-policy/base-uri/base-uri-allow.sub.html": [
@ -504343,6 +504426,14 @@
"7810533e455968eea8eb0bdf4d8edf62e495f956", "7810533e455968eea8eb0bdf4d8edf62e495f956",
"testharness" "testharness"
], ],
"content-security-policy/generic/eval-typecheck-callout-order.tentative.html": [
"7b3c12e396445ff72480a1e9c7cc77550f93f75c",
"testharness"
],
"content-security-policy/generic/eval-typecheck-callout-order.tentative.html.headers": [
"85de8bd415def35ca45c0abf74590cdfa393d0f4",
"support"
],
"content-security-policy/generic/fail-0_1.js": [ "content-security-policy/generic/fail-0_1.js": [
"5c580273dcfc94eff137a0ae65314bebc9b7b5c0", "5c580273dcfc94eff137a0ae65314bebc9b7b5c0",
"support" "support"
@ -592364,7 +592455,7 @@
"reftest" "reftest"
], ],
"css/css-lists/list-and-block-textarea-001.html": [ "css/css-lists/list-and-block-textarea-001.html": [
"96af38a8adb236bd5004a55fa59a830fbb6576eb", "13f723ac5c0a72be0867af072d50eb5e1b02904d",
"testharness" "testharness"
], ],
"css/css-lists/list-and-flex-001-ref.html": [ "css/css-lists/list-and-flex-001-ref.html": [
@ -596339,6 +596430,10 @@
"cc6de63e0011a3588592bd7bf27d5230ea8d2a48", "cc6de63e0011a3588592bd7bf27d5230ea8d2a48",
"testharness" "testharness"
], ],
"css/css-position/position-absolute-crash-chrome-005.html": [
"e1b469d46c93710c9ee2725be76a28e4f2e5fa61",
"testharness"
],
"css/css-position/position-absolute-dynamic-containing-block.html": [ "css/css-position/position-absolute-dynamic-containing-block.html": [
"3968f685849663574ca213fcb90dc5fb3eaffaa3", "3968f685849663574ca213fcb90dc5fb3eaffaa3",
"testharness" "testharness"
@ -602979,6 +603074,46 @@
"df76952a1fd0e284217d819392e538f5edd95211", "df76952a1fd0e284217d819392e538f5edd95211",
"reftest" "reftest"
], ],
"css/css-text-decor/text-underline-position-019-manual.html": [
"0308fbc8c9ed4b54865a5b382741c148c6853981",
"manual"
],
"css/css-text-decor/text-underline-position-020-manual.html": [
"7602308c8d6c7f7c40eaf896ebe02aff93932d13",
"manual"
],
"css/css-text-decor/text-underline-position-021-manual.html": [
"046e6298cc76ddaf9ae8fce1eaec9c32f9a217ba",
"manual"
],
"css/css-text-decor/text-underline-position-022-manual.html": [
"5ffbad2a056eeea663e43c879d3fcc482b3511a5",
"manual"
],
"css/css-text-decor/text-underline-position-071-manual.html": [
"9605cfd24e9bca94bc0cff30fbabc84b324a2b22",
"manual"
],
"css/css-text-decor/text-underline-position-072-manual.html": [
"3a097f4bb48a816cf54fddc050763163491ae26b",
"manual"
],
"css/css-text-decor/text-underline-position-073-manual.html": [
"ab827e5fcd0804699567d01d2524be5ab47a6503",
"manual"
],
"css/css-text-decor/text-underline-position-074-manual.html": [
"2dc1f42be677d59084b37be4567cc018d83c9a94",
"manual"
],
"css/css-text-decor/text-underline-position-075-manual.html": [
"64d16f2b169dceafbcf98ba5dd9dc837c762af7e",
"manual"
],
"css/css-text-decor/text-underline-position-076-manual.html": [
"00323e53aacbe46fd2be07ed05b2b19db229753a",
"manual"
],
"css/css-text/META.yml": [ "css/css-text/META.yml": [
"e7914c0fc7ff9e6999f8847dc1800968472483f2", "e7914c0fc7ff9e6999f8847dc1800968472483f2",
"support" "support"
@ -709648,7 +709783,7 @@
"support" "support"
], ],
"tools/wptrunner/wptrunner/wptcommandline.py": [ "tools/wptrunner/wptrunner/wptcommandline.py": [
"080b1c6b00aa963a01d62eeafd51377fe43eea49", "d35d8f70d216129666bd6e766e7b6dbbba98e7ef",
"support" "support"
], ],
"tools/wptrunner/wptrunner/wptlogging.py": [ "tools/wptrunner/wptrunner/wptlogging.py": [
@ -713203,8 +713338,32 @@
"5a0e88433f23d0ca8f71df8d9fcd0c7ebe036345", "5a0e88433f23d0ca8f71df8d9fcd0c7ebe036345",
"testharness" "testharness"
], ],
"web-nfc/NFCReader_options_mediaType-manual.https.html": [
"faaf8f39a77ff81bcc037eb8902355b847cd05ba",
"manual"
],
"web-nfc/NFCReader_options_recordType_empty-manual.https.html": [
"995072b260d8759e618f5606bed2231c67c6bc80",
"manual"
],
"web-nfc/NFCReader_options_recordType_json-manual.https.html": [
"4120bc72f308b4711455844340647822738a5f13",
"manual"
],
"web-nfc/NFCReader_options_recordType_opaque-manual.https.html": [
"94ded3e8a0fcba2f0fef86cc6a878f8c5091ac76",
"manual"
],
"web-nfc/NFCReader_options_recordType_text-manual.https.html": [
"72ca3e70d430d1d141a520af0d6b34240ebca9f9",
"manual"
],
"web-nfc/NFCReader_options_recordType_url-manual.https.html": [
"af57610c285a36e68cf4eadfed3293bbcb0ee245",
"manual"
],
"web-nfc/NFCReader_options_url-manual.https.html": [ "web-nfc/NFCReader_options_url-manual.https.html": [
"882d663c65491d9182ee6c4b7c5fb55e0da8923c", "aa0e72b089a1b1c445eb8b7ba8c478158d47173f",
"manual" "manual"
], ],
"web-nfc/NFCReadingEvent_constructor.https.html": [ "web-nfc/NFCReadingEvent_constructor.https.html": [
@ -713239,28 +713398,8 @@
"15e1da50fb3acd9f23f22b6876e2bd5867225fee", "15e1da50fb3acd9f23f22b6876e2bd5867225fee",
"manual" "manual"
], ],
"web-nfc/nfc_recordType_empty-manual.https.html": [
"2ff4d675837260b16110bb71313777bb679fe94d",
"manual"
],
"web-nfc/nfc_recordType_json-manual.https.html": [
"ae0dbdaa2ffb13a2def38fe572fd2970850615e3",
"manual"
],
"web-nfc/nfc_recordType_opaque-manual.https.html": [
"653fc0bf31948856a02a5eee5148da69b0bee328",
"manual"
],
"web-nfc/nfc_recordType_text-manual.https.html": [
"290d08760a001bb6deb247ec1c256a106b1590f7",
"manual"
],
"web-nfc/nfc_recordType_url-manual.https.html": [
"4168898ad47eca829f173a34f7aa430da7b5e48f",
"manual"
],
"web-nfc/resources/nfc_help.js": [ "web-nfc/resources/nfc_help.js": [
"dd336ef3af511a5a1164dd2d30c6caa8e3c7447a", "812d0f071183f53cef973c58fdbbc260e3154296",
"support" "support"
], ],
"web-share/META.yml": [ "web-share/META.yml": [
@ -716028,7 +716167,7 @@
"testharness" "testharness"
], ],
"webrtc/RTCDataChannel-send.html": [ "webrtc/RTCDataChannel-send.html": [
"cb8b4edc3fae1501fe7e717615d60cb54ac003c1", "4b8d0c2f2048d68283a55de7b19eb2e95b166fc8",
"testharness" "testharness"
], ],
"webrtc/RTCDataChannelEvent-constructor.html": [ "webrtc/RTCDataChannelEvent-constructor.html": [
@ -716132,11 +716271,11 @@
"testharness" "testharness"
], ],
"webrtc/RTCPeerConnection-iceConnectionState.https.html": [ "webrtc/RTCPeerConnection-iceConnectionState.https.html": [
"8acabf49766ba08999b8857d8cb6589d1587c843", "768da23ddbf7eeed91bf351f080c12b8338696fa",
"testharness" "testharness"
], ],
"webrtc/RTCPeerConnection-iceGatheringState.html": [ "webrtc/RTCPeerConnection-iceGatheringState.html": [
"e6d8d062701a795a289ad011fa4cfae143a342e9", "e170e4a2f87fc4c3260a7acd323a98e1adfa3726",
"testharness" "testharness"
], ],
"webrtc/RTCPeerConnection-ondatachannel.html": [ "webrtc/RTCPeerConnection-ondatachannel.html": [

View file

@ -320,3 +320,18 @@
[Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%'] [Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%']
expected: FAIL expected: FAIL
[Matching font-weight: '400' should prefer '400' over '450 460']
expected: FAIL
[Matching font-weight: '400' should prefer '450 460' over '500']
expected: FAIL
[Matching font-style: 'normal' should prefer 'normal' over 'oblique 0deg']
expected: FAIL
[Matching font-weight: '399' should prefer '350 399' over '340 360']
expected: FAIL
[Matching font-stretch: '90%' should prefer '110% 140%' over '120% 130%']
expected: FAIL

View file

@ -74,3 +74,6 @@
[opacity end] [opacity end]
expected: FAIL expected: FAIL
[outline-width end]
expected: FAIL

View file

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

View file

@ -11,3 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20'NosniFF']
expected: FAIL

View file

@ -1,5 +0,0 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT

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,10 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,2 +0,0 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT

View file

@ -1,4 +1,5 @@
[realtimeanalyser-fft-scaling.html] [realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.] [X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL expected: FAIL

View file

@ -62,7 +62,7 @@
<p>This code includes three tests. The first one in the script block will generate a failure if it runs. The second one, in the onerror handler for the img which does not exist should also generate a failure if it runs. But for a successful CSP implementation, neither of these tests does run. The final test is run by the link to <span class=code>../support/checkReport.sub.js</span>. It will load some script in the page (make sure its not blocked by your policy!) which contacts the server asynchronously and sees if the expected report was sent. This should always run an generate a positive or negative result even if the inline tests are blocked as we expect.</p> <p>This code includes three tests. The first one in the script block will generate a failure if it runs. The second one, in the onerror handler for the img which does not exist should also generate a failure if it runs. But for a successful CSP implementation, neither of these tests does run. The final test is run by the link to <span class=code>../support/checkReport.sub.js</span>. It will load some script in the page (make sure its not blocked by your policy!) which contacts the server asynchronously and sees if the expected report was sent. This should always run an generate a positive or negative result even if the inline tests are blocked as we expect.</p>
<p>Now, to acutally exercise these tests against a policy, we'll need to set headers. In the same directory we'll place this file:</p> <p>Now, to actually exercise these tests against a policy, we'll need to set headers. In the same directory we'll place this file:</p>
<p class=codeTitle>script-src-1_1.html.sub.headers</p> <p class=codeTitle>script-src-1_1.html.sub.headers</p>
<pre><code class="html"> <pre><code class="html">

View file

@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<html>
<head>
<script src='/resources/testharness.js' nonce='abc'></script>
<script src='/resources/testharnessreport.js' nonce='abc'></script>
<title>Test for order of Type(evalInput) and host callout</title>
</head>
<body>
<div id='log'></div>
<script nonce='abc'>
test(function() {
assert_throws(new EvalError, function() {
eval("0");
}, "eval of a string should reach host callout");
}, "eval of a string should be checked by CSP");
test(function() {
let array = ["0"];
assert_equals(
eval(array),
array,
"eval is identity when applied to non-strings");
}, "eval of a non-string should not be checked by CSP");
</script>
</body>
</html>

View file

@ -0,0 +1 @@
Content-Security-Policy: script-src 'nonce-abc'

View file

@ -8,17 +8,17 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<style> <style>
textarea {
border: 0px; ul, textarea {
padding: 0px; font-size: 16px;
} }
</style> </style>
<div id="log"></div> <div id="log"></div>
<ul> <ul>
<li id="target"> <li id="target1">
<textarea rows="3" cols="20" style="display:block; height:45px"> <textarea id="target2" rows="3" cols="20" style="display:block; height:45px">
hello hello
</textarea> </textarea>
</li> </li>
@ -26,8 +26,9 @@ textarea {
<script> <script>
test(function() { test(function() {
var height = document.getElementById("target").offsetHeight; var height1 = document.getElementById("target1").offsetHeight;
assert_equals(height, 45, "the height of li should be 45px, and no extra line generated") var height2 = document.getElementById("target2").offsetHeight;
assert_equals(height1, height2, "List marker and textarea should be in the same line, no line-break between them.")
}, "list and block textarea"); }, "list and block textarea");
</script> </script>

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<title>CSS Position Absolute: Chrome crash</title>
<link rel="author" href="mailto:atotic@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=949222">
<meta name="assert" content="Dynamic containing block change does not crash">
<style>
.container {
position: relative;
}
.abs {
position: absolute;
width: 50px;
height: 50px;
background: green;
}
@keyframes slidein {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
.animate {
animation: slidein 0.1s linear;
}
.boundary {
overflow: hidden;
width: 100px;
height: 100px;
}
</style>
<!-- LayoutNG currently does not support display:flex.
Propagation of descendants across flex boundaries is error prone -->
<div id="one" class="container" style="">
<div class="boundary">
<div class="boundary">
<div class="boundary">
<div id="intermediate">
<div class="abs"></div>
</div>
</div>
</div>
</div>
</div>
<script>
let t = async_test("Test passes if it does not crash");
let el = document.querySelector("#intermediate");
el.addEventListener("animationend", _ => {
t.step(function() {
document.body.offsetTop;
assert_true(true, "test did not crash");
t.done();
})
});
el.classList.add("animate");
</script>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position auto</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:auto; the underline is placed at or under the alphabetic baseline, unless the script works better with a line further from the baseline">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
:lang(ja) { font-family: "Hiragino Maru Gothic Pro", "MS Mincho", sans-serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:auto;
}</style>
</head>
<body>
<p class="instructions">Test passes if the underline is placed at or under the alphabetic baseline, unless the script works better with a line further from the baseline.</p>
<div id="htmlsrc">
<div>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under; the underline is low enough to avoid crossing the descenders">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
:lang(ja) { font-family: "Hiragino Maru Gothic Pro", "MS Mincho", sans-serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under;
}</style>
</head>
<body>
<p class="instructions">Test passes if the underline is low enough to avoid crossing the descenders.</p>
<div id="htmlsrc">
<div>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under left</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under left; the underline is low enough to avoid crossing the descenders">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
:lang(ja) { font-family: "Hiragino Maru Gothic Pro", "MS Mincho", sans-serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under left;
}</style>
</head>
<body>
<p class="instructions">Test passes if the underline is low enough to avoid crossing the descenders.</p>
<div id="htmlsrc">
<div>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under right</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under right; the underline is low enough to avoid crossing the descenders">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
:lang(ja) { font-family: "Hiragino Maru Gothic Pro", "MS Mincho", sans-serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under right;
}</style>
</head>
<body>
<p class="instructions">Test passes if the underline is low enough to avoid crossing the descenders.</p>
<div id="htmlsrc">
<div>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position tbrl auto vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:auto; the underline is placed alongside the characters, and may or may not cross any descenders">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:auto;
}</style>
</head>
<body>
<p class="instructions">Test passes if the underline is placed alongside the characters - it may or may not cross any descenders.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under; the line is far enough away to avoid crossing any descenders">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under;
}</style>
</head>
<body>
<p class="instructions">Test passes if the line is far enough away to avoid crossing any descenders.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
<p lang="ar"><span>وب جهانی را به‌درس</span><span>تی جهانی سازیم!</span></p>
<p lang="my"><span>အပြည်ပြည်ဆိုင်ရာ</span><span>လှုပ်ရှားမှု၊</span></p>
<p lang="th"><span>กูกินกุ้งปิ้ง</span><span>อยู่ในถ้ำ กูกินกุ้งปิ้งอยู่ในถ้ำ</span></p>
<p lang="bo"><span>འཛམ་གླིང་ཡོངས་འབྲེལ་འདི་ ངོ་མ་འ</span><span>བད་རང་ འཛམ་གླིང་ཡོངས་ལུ་ཁྱབ་ཚུགསཔ་བཟོ་བ།</span></p>
<p lang="hi"><span>वर्ल्ड वाईड वेब को स</span><span>चमुच विश्वव्यापी बना रहें हैं !</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position left vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:left; the line is to the left of the characters for all lines">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:left;
}</style>
</head>
<body>
<p class="instructions">Test passes if the line is to the LEFT of the characters for all lines.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under left vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under left; the line is to the left of the characters for all lines">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under left;
}</style>
</head>
<body>
<p class="instructions">Test passes if the line is to the LEFT of the characters for all lines.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position right vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:right; the line is to the right of the characters for all lines">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:right;
}</style>
</head>
<body>
<p class="instructions">Test passes if the line is to the RIGHT of the characters for all lines.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
</div> </div>
</body>
</html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text-underline-position under right vertical-rl</title>
<meta name="assert" content="text-decoration:underline; text-underline-position:under right; the line is to the right of the characters for all lines">
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#line-decoration">
<!-- cosmetic styling -->
<style>
#htmlsrc { margin: 2em; }
#htmlsrc p {
font-size: 28px;
border-radius: 5px;
line-height: 1.5;
}
.hint { color: brown; font-family: sans-serif; font-size: 90%; }
.hint:before { content: '❗ '; }
:lang(mn) { font-family: "Mongolian Baiti", "Noto sans Mongolian", serif; }
</style>
<!-- the test -->
<style>
div span {
text-decoration:underline;
text-underline-position:under right;
}</style>
</head>
<body>
<p class="instructions">Test passes if the line is to the RIGHT of the characters for all lines.<br/><span class="hint">Skip the test if the text is not vertical.</span></p>
<div id="htmlsrc" style="writing-mode:vertical-rl">
<div>
<p lang="zh"><span>引发网络的全部潜能</span><span>引發網絡的全部潛能</span></p>
<p lang="ja"><span>可能性を最大限に</span><span>導き出すために</span></p>
<p lang="mn"><span>ᠣᠯᠠᠨ ᠦᠨᠳᠦᠰ</span><span>ᠦᠲᠡᠨ ᠦ ᠪᠣᠯᠭᠠᠬᠤ ᠦᠢᠯᠡ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ</span></p>
<p lang="en"><span>The quick brown f</span><span>ox jumps over the lazy dog.</span></p>
</div> </div>
</body>
</html>

View file

@ -53,6 +53,8 @@ scheme host and port.""")
help="Prevent regeneration of the test manifest.") help="Prevent regeneration of the test manifest.")
parser.add_argument("--manifest-download", action="store_true", default=None, parser.add_argument("--manifest-download", action="store_true", default=None,
help="Attempt to download a preexisting manifest when updating.") help="Attempt to download a preexisting manifest when updating.")
parser.add_argument("--no-manifest-download", action="store_false", dest="manifest_download",
help="Prevent download of the test manifest.")
parser.add_argument("--timeout-multiplier", action="store", type=float, default=None, parser.add_argument("--timeout-multiplier", action="store", type=float, default=None,
help="Multiplier relative to standard test timeout to use") help="Multiplier relative to standard test timeout to use")

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Web NFC Test: NFCReader NFCReaderOptions mediaType test</title>
<link rel="author" title="Intel" href="http://www.intel.com"/>
<link rel="help" href="https://w3c.github.io/web-nfc/"/>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/nfc_help.js"></script>
<meta name="flags" content="interact">
<p>Tap an NFC tag to the test device with NFC support.</p>
<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>
<div id="log"></div>
<script>
"use strict";
setup({ explicit_timeout: true });
const desc = "Test that the mediaType of NFCReaderOptions filters relevant data sources correctly.";
const readOptions = {mediaType: "application/octet-stream"};
const unacceptableReadOptions = {mediaType: "application/json"};
const message = createMessage([createOpaqueRecord(test_buffer_data)]);
testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script>

View file

@ -21,14 +21,11 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
const desc = "Test that write and read data succeed when recordType is set to 'empty'."; const desc = "Test that write and read data succeed when NFCReaderOptions's recordType is set to 'empty'.";
const readOptions = { const readOptions = {recordType: "empty"};
recordType: "empty", const unacceptableReadOptions = {recordType: "json"};
mediaType: "",
url: ""
}
const message = createMessage([createRecord('empty', '')]); const message = createMessage([createRecord('empty', '')]);
testNDEFMessage(message, readOptions, desc); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script> </script>

View file

@ -21,14 +21,11 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
const desc = "Test that write and read data succeed when recordType is set to 'json'."; const desc = "Test that write and read data succeed when NFCReaderOptions's recordType is set to 'json'.";
const readOptions = { const readOptions = {recordType: "json"};
recordType : "json", const unacceptableReadOptions = {recordType: "url"};
mediaType : "application/json",
url : ""
}
const message = createMessage([createJsonRecord(test_json_data)]); const message = createMessage([createJsonRecord(test_json_data)]);
testNDEFMessage(message, readOptions, desc); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script> </script>

View file

@ -21,14 +21,11 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
const desc = "Test that write and read data succeed when recordType is set to 'opaque'." const desc = "Test that write and read data succeed when NFCReaderOptions's recordType is set to 'opaque'.";
const readOptions = { const readOptions = {recordType: "opaque"};
recordType : "opaque", const unacceptableReadOptions = {recordType: "json"};
mediaType : "application/octet-stream",
url : ""
}
const message = createMessage([createOpaqueRecord(test_buffer_data)]); const message = createMessage([createOpaqueRecord(test_buffer_data)]);
testNDEFMessage(message, readOptions, desc); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script> </script>

View file

@ -21,14 +21,11 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
const desc = "Test that write and read data succeed when recordType is set to 'text'." const desc = "Test that write and read data succeed when NFCReaderOptions's recordType is set to 'text'.";
const readOptions = { const readOptions = {recordType: "text"};
recordType : "text", const unacceptableReadOptions = {recordType: "json"};
mediaType : "text/plain",
url : ""
}
const message = createMessage([createTextRecord(test_text_data)]); const message = createMessage([createTextRecord(test_text_data)]);
testNDEFMessage(message, readOptions, desc); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script> </script>

View file

@ -21,15 +21,11 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
const test_message_origin = window.location.href.origin; const desc = "Test that write and read data succeed when NFCReaderOptions's recordType is set to 'url'.";
const desc = "Test that write and read data succeed when recordType is set to 'url'."; const readOptions = {recordType: "url"};
const readOptions = { const unacceptableReadOptions = {recordType: "json"};
recordType: "url",
mediaType: "text/plain",
url: test_message_origin
}
const message = createMessage([createUrlRecord(test_url_data)]); const message = createMessage([createUrlRecord(test_url_data)]);
testNDEFMessage(message, readOptions, desc); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
</script> </script>

View file

@ -6,6 +6,7 @@
<meta name="timeout" content="long"> <meta name="timeout" content="long">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="resources/nfc_help.js"></script>
<meta name="flags" content="interact"> <meta name="flags" content="interact">
<p>Tap an NFC tag to the test device with NFC support.</p> <p>Tap an NFC tag to the test device with NFC support.</p>
@ -20,25 +21,14 @@
setup({ explicit_timeout: true }); setup({ explicit_timeout: true });
promise_test(async t => { const desc = "Test that the url of NFCReaderOptions filters relevant data sources correctly.";
const writer = new NFCWriter(); const readOptions = {url: `${location.origin}/custom/path`};
const reader1 = new NFCReader({url: `${location.origin}/custom/invalid`}); const unacceptableReadOptions = {url: `${location.origin}/custom/invalid`};
const reader2 = new NFCReader({url: `${location.origin}/custom/path`}); const message = {
await writer.push({ url: "/custom/path/update",
url: "/custom/path/update", records: [createTextRecord(test_text_data)]
records: [{ recordType: "text", data: "valid" }] }
});
reader1.onreading = t.unreached_func("reading event should not be fired."); testNFCReaderOptions(message, readOptions, unacceptableReadOptions, desc);
reader1.start();
const readerWatcher = new EventWatcher(t, reader2, ["reading", "error"]);
reader2.start();
const event = await readerWatcher.wait_for("reading");
const message = event.message;
assert_equals(message.records[0].recordType, "text");
assert_equals(message.records[0].data, "valid");
assert_equals(message.url, `${location.origin}/custom/path/update`);
}, "Test that the url of NFCReaderOptions filters relevant data sources correctly.");
</script> </script>

View file

@ -48,6 +48,7 @@ function createUrlRecord(url) {
} }
function assertWebNDEFMessagesEqual(a, b) { function assertWebNDEFMessagesEqual(a, b) {
if (b.url) assert_equals(a.url, `${location.origin}${b.url}`);
assert_equals(a.records.length, b.records.length); assert_equals(a.records.length, b.records.length);
for(let i in a.records) { for(let i in a.records) {
let recordA = a.records[i]; let recordA = a.records[i];
@ -59,21 +60,25 @@ function assertWebNDEFMessagesEqual(a, b) {
new Uint8Array(recordB.data)); new Uint8Array(recordB.data));
} else if (typeof recordA.data === 'object') { } else if (typeof recordA.data === 'object') {
assert_object_equals(recordA.data, recordB.data); assert_object_equals(recordA.data, recordB.data);
} } else if (typeof recordA.data === 'number'
if (typeof recordA.data === 'number'
|| typeof recordA.data === 'string') { || typeof recordA.data === 'string') {
assert_true(recordA.data == recordB.data); assert_true(recordA.data == recordB.data);
} }
} }
} }
function testNDEFMessage(pushedMessage, readOptions, desc) { function testNFCReaderOptions(pushedMessage, readOptions, unacceptableReadOptions, desc) {
promise_test(async t => { promise_test(async t => {
const writer = new NFCWriter(); const writer = new NFCWriter();
const reader = new NFCReader(readOptions); const reader1 = new NFCReader(unacceptableReadOptions);
const reader2 = new NFCReader(readOptions);
await writer.push(pushedMessage); await writer.push(pushedMessage);
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
reader.start(); reader1.onreading = t.unreached_func("reading event should not be fired.");
reader1.start();
const readerWatcher = new EventWatcher(t, reader2, ["reading", "error"]);
reader2.start();
const event = await readerWatcher.wait_for("reading"); const event = await readerWatcher.wait_for("reading");
assertWebNDEFMessagesEqual(event.message, pushedMessage); assertWebNDEFMessagesEqual(event.message, pushedMessage);
}, desc); }, desc);

View file

@ -295,5 +295,22 @@
assert_equals(channel.readyState, 'closing'); assert_equals(channel.readyState, 'closing');
channel.send(helloString); channel.send(helloString);
}, 'Calling send() when data channel is in closing state should succeed'); }, 'Calling send() when data channel is in closing state should succeed');
*/ */
promise_test(async t => {
let pc1 = new RTCPeerConnection();
let [channel1, channel2] = await createDataChannelPair(pc1);
let message = 'hello888'; // 8 bytes
while (message.length <= pc1.sctp.maxMessageSize) {
channel1.send(message);
let received_message = await awaitMessage(channel2);
assert_equals(received_message.length, message.length, "Size mismatch");
// Double size
message = message + message;
}
// "send" method step 4:
// If the byte size of "data" exceeds the value of maxMessageSize, throw
// a TypeError.
assert_throws('TypeError', () => channel1.send(message));
}, 'Calling send() up to max size should succeed, above max size should fail');
</script> </script>

View file

@ -148,21 +148,21 @@ async_test(t => {
const { iceConnectionState } = pc1; const { iceConnectionState } = pc1;
if(iceConnectionState === 'checking') { if(iceConnectionState === 'checking') {
const iceTransport = pc1.sctp.transport.transport; const iceTransport = pc1.sctp.transport.iceTransport;
assert_equals(iceTransport.state, 'checking', assert_equals(iceTransport.state, 'checking',
'Expect ICE transport to be in checking state when' + 'Expect ICE transport to be in checking state when' +
' iceConnectionState is checking'); ' iceConnectionState is checking');
} else if(iceConnectionState === 'connected') { } else if(iceConnectionState === 'connected') {
const iceTransport = pc1.sctp.transport.transport; const iceTransport = pc1.sctp.transport.iceTransport;
assert_equals(iceTransport.state, 'connected', assert_equals(iceTransport.state, 'connected',
'Expect ICE transport to be in connected state when' + 'Expect ICE transport to be in connected state when' +
' iceConnectionState is connected'); ' iceConnectionState is connected');
} else if(iceConnectionState === 'completed') { } else if(iceConnectionState === 'completed') {
const iceTransport = pc1.sctp.transport.transport; const iceTransport = pc1.sctp.transport.iceTransport;
assert_equals(iceTransport.state, 'completed', assert_equals(iceTransport.state, 'completed',
'Expect ICE transport to be in connected state when' + 'Expect ICE transport to be in connected state when' +

View file

@ -108,13 +108,13 @@
const { iceGatheringState } = pc2; const { iceGatheringState } = pc2;
if(iceGatheringState === 'gathering') { if(iceGatheringState === 'gathering') {
const iceTransport = pc2.sctp.transport.transport; const iceTransport = pc2.sctp.transport.iceTransport;
assert_equals(iceTransport.gatheringState, 'gathering', assert_equals(iceTransport.gatheringState, 'gathering',
'Expect ICE transport to be in checking gatheringState when iceGatheringState is checking'); 'Expect ICE transport to be in checking gatheringState when iceGatheringState is checking');
} else if(iceGatheringState === 'complete') { } else if(iceGatheringState === 'complete') {
const iceTransport = pc2.sctp.transport.transport; const iceTransport = pc2.sctp.transport.iceTransport;
assert_equals(iceTransport.gatheringState, 'complete', assert_equals(iceTransport.gatheringState, 'complete',
'Expect ICE transport to be in complete gatheringState when iceGatheringState is complete'); 'Expect ICE transport to be in complete gatheringState when iceGatheringState is complete');