mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 3488a5a845bec08943f66974e9f0df4ffe96774a
This commit is contained in:
parent
0d142bea9a
commit
cc9937a2b0
26 changed files with 302 additions and 147 deletions
|
@ -134637,6 +134637,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-multicol/change-intrinsic-width.html": [
|
||||
[
|
||||
"css/css-multicol/change-intrinsic-width.html",
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-multicol/column-count-used-001.html": [
|
||||
[
|
||||
"css/css-multicol/column-count-used-001.html",
|
||||
|
@ -338168,6 +338180,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/cssom-view/getClientRects-inline-inline-child.html": [
|
||||
[
|
||||
"css/cssom-view/getClientRects-inline-inline-child.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/cssom-view/historical.html": [
|
||||
[
|
||||
"css/cssom-view/historical.html",
|
||||
|
@ -588279,6 +588297,10 @@
|
|||
"434dc52ea3d731bd1393270372294cd007382e59",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-multicol/change-intrinsic-width.html": [
|
||||
"3df3e1ebc8f9b5780dc858a878bca13dbedcdb35",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-multicol/column-count-used-001.html": [
|
||||
"2949a1996ebae0c48329906ea7ef34c83080e90f",
|
||||
"reftest"
|
||||
|
@ -625603,6 +625625,10 @@
|
|||
"f1f6fc5abc679d087d221573456eb9219d1a405c",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom-view/getClientRects-inline-inline-child.html": [
|
||||
"9a03ccdbccc80d8a0ce6f701aeaa802b1b4715e4",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom-view/getClientRects-inline.html": [
|
||||
"415e34a6f0430e08441ee32b3f7c0ca8cd11a692",
|
||||
"reftest"
|
||||
|
@ -664512,11 +664538,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/constraints/form-validation-validity-valid.html": [
|
||||
"cec5dcbf0d5cfb340e100a82e723e1d620d16399",
|
||||
"03655ffd2f5ba24b30e6864c8393ecbf36230aef",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/constraints/form-validation-validity-valueMissing.html": [
|
||||
"3c9e4c4cb096bbe93b540c3f704d0d116a055aba",
|
||||
"2e1c666436a19bc759026ebf55df4a17073ecb5d",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/constraints/form-validation-willValidate.html": [
|
||||
|
@ -664532,7 +664558,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/constraints/support/validator.js": [
|
||||
"48c3a5b40e6bbe06b18dde7f473188a827b7de6a",
|
||||
"33508fb3289be3736f6f467957dc6614bec2bc9b",
|
||||
"support"
|
||||
],
|
||||
"html/semantics/forms/constraints/tooLong-input-email-delete-manual.html": [
|
||||
|
@ -701572,7 +701598,7 @@
|
|||
"support"
|
||||
],
|
||||
"resources/chromium/nfc-mock.js": [
|
||||
"4bafc9b0ad8f7f8ad4185914fffef16949695ab3",
|
||||
"2c1724b7592eb1d6e66177544998abbec70fbfe6",
|
||||
"support"
|
||||
],
|
||||
"resources/chromium/sensor.mojom.js": [
|
||||
|
@ -717860,7 +717886,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/browsers/firefox_android.py": [
|
||||
"33b5d51e54e82adb6cdbe4612263bc30883dd108",
|
||||
"fee528071f68843ab056f513295146685f8f78f4",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/browsers/ie.py": [
|
||||
|
@ -717936,7 +717962,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/executormarionette.py": [
|
||||
"59f7e865a5b8711fa71c9c8955eca731e0048c3f",
|
||||
"01306397db7944cd0dfadf8f1bf0327dbacf94d6",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/executoropera.py": [
|
||||
|
@ -717992,7 +718018,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/test-wait.js": [
|
||||
"8a7edb79d62256eef63c71eabd450d42bce7c4d2",
|
||||
"ad08ad7d76fb0299aadedb572193c38c5055e654",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/executors/testharness_servodriver.js": [
|
||||
|
@ -718012,7 +718038,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/font.py": [
|
||||
"6647a8580be7ab4050bbd37593b2e6595bc3ac72",
|
||||
"daf0a1c1bfa221aa47981d93239021e4aefa74a9",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/formatters/__init__.py": [
|
||||
|
@ -718244,7 +718270,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptrunner.py": [
|
||||
"7409dc26560af0be3a397bb73184137d8715811f",
|
||||
"75ce104c7cee335afa2e86592caa2c4caa473bcf",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wpttest.py": [
|
||||
|
@ -724608,7 +724634,7 @@
|
|||
"manual"
|
||||
],
|
||||
"web-nfc/NDEFReader_scan.https.html": [
|
||||
"a9b1d7516173418243c630817eea22fd0bed2046",
|
||||
"17b9fdb8569db230c3a3ded22e0258e4f73a69fc",
|
||||
"testharness"
|
||||
],
|
||||
"web-nfc/NDEFReader_scan_filter.https.html": [
|
||||
|
@ -724632,7 +724658,7 @@
|
|||
"manual"
|
||||
],
|
||||
"web-nfc/NDEFWriter_push.https.html": [
|
||||
"4ff0af8fb0b3947595bdf48015ebabce165003ba",
|
||||
"cb6b3941410035c5c5736e13d59fbbfb85f0d4cc",
|
||||
"testharness"
|
||||
],
|
||||
"web-nfc/README.md": [
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[elementFromPoint-001.html]
|
||||
[CSSOM View - 5 - extensions to the Document interface]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[getClientRects-inline-inline-child.html]
|
||||
[sub element in a child inline box should not be included]
|
||||
expected: FAIL
|
||||
|
|
@ -309,9 +309,6 @@
|
|||
[<iframe>: separate response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -324,15 +321,15 @@
|
|||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[fetch(): separate response Content-Type: text/plain ]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20'NosniFF']
|
||||
[X-Content-Type-Options%3A%20%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,8 +8,11 @@
|
|||
expected: FAIL
|
||||
|
||||
[Embedded credentials are treated as network errors in new windows.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: FAIL
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[creating_browsing_context_test_01.html]
|
||||
[first argument: absolute url]
|
||||
expected: FAIL
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
[skip-document-with-fragment.html]
|
||||
expected: TIMEOUT
|
||||
[Autofocus elements in iframed documents with URL fragments should be skipped.]
|
||||
expected: FAIL
|
||||
|
||||
[Autofocus elements in top-level browsing context's documents with URI fragments should be skipped.]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -10,6 +10,3 @@
|
|||
[Verifies the resolution of entry.startTime is at least 20 microseconds.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Verifies the resolution of performance.now() is at least 5 microseconds.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[crossorigin-sandwich-TAO.sub.html]
|
||||
expected: ERROR
|
||||
[There should be one entry.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[005.html]
|
||||
expected: ERROR
|
||||
[dedicated worker in shared worker in dedicated worker]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#pseudo-algorithm">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1037790">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="columns:2; column-fill:auto; column-gap:0; width:fit-content; height:100px; background:red;">
|
||||
<div id="firstChild" style="width:200px; height:100px; background:green;"></div>
|
||||
<div style="width:50px; height:100px; background:green;"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
firstChild.style.width = "50px";
|
||||
</script>
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects">
|
||||
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<div>
|
||||
<span>test</span>
|
||||
<span id="vertical-align-sub-as-grand-child"
|
||||
title="sub element in a child inline box should not be included">
|
||||
<span>
|
||||
<sub class="not-include" style="vertical-align: sub">subscript</sub>
|
||||
</span>
|
||||
</span>
|
||||
<span>test</span>
|
||||
</div>
|
||||
<script>
|
||||
testTargetDoesNotInclude('vertical-align-sub-as-grand-child');
|
||||
|
||||
function testTargetDoesNotInclude(target) {
|
||||
target = document.getElementById(target);
|
||||
test(() => {
|
||||
let target_rects = target.getClientRects();
|
||||
|
||||
let not_include_rects = [];
|
||||
for (let element of target.querySelectorAll('.not-include')) {
|
||||
for (let rect of element.getClientRects())
|
||||
not_include_rects.push(rect);
|
||||
}
|
||||
for (let rect of target_rects) {
|
||||
for (let not_include_rect of not_include_rects) {
|
||||
assert_rect_not_equals(rect, not_include_rect);
|
||||
}
|
||||
}
|
||||
}, target.title);
|
||||
}
|
||||
|
||||
function assert_rect_not_equals(rect1, rect2) {
|
||||
assert_false(rectEquals(rect1, rect2),
|
||||
`${rectToString(rect1)} and ${rectToString(rect2)} are not equal`);
|
||||
}
|
||||
|
||||
function rectEquals(rect1, rect2) {
|
||||
return rect1.x === rect2.x && rect1.y === rect2.y &&
|
||||
rect1.width === rect2.width && rect1.height === rect2.height;
|
||||
}
|
||||
|
||||
function rectToString(rect) {
|
||||
return `{${rect.x}, ${rect.y} ${rect.width}x${rect.height}}`;
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -15,7 +15,7 @@
|
|||
types: ["text", "search", "tel", "password"],
|
||||
testData: [
|
||||
{conditions: {pattern: "[A-Z]", value: "abc"}, expected: false, name: "[target] validity.valid must be false if validity.patternMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
|||
testData: [
|
||||
{conditions: {pattern: "http://www.example.com", value: "http://www.example.net"}, expected: false, name: "[target] validity.valid must be false if validity.patternMismatch is true"},
|
||||
{conditions: {value: "abc"}, expected: false, name: "[target] validity.valid must be false if validity.typeMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
|||
testData: [
|
||||
{conditions: {pattern: "test@example.com", value: "test@example.net"}, expected: false, name: "[target] validity.valid must be false if validity.patternMismatch is true"},
|
||||
{conditions: {value: "abc"}, expected: false, name: "[target] validity.valid must be false if validity.typeMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -43,7 +43,7 @@
|
|||
{conditions: {max: "2000-01-01T12:00:00", value: "2001-01-01T12:00:00"}, expected: false, name: "[target] validity.valid must be false if validity.rangeOverflow is true"},
|
||||
{conditions: {min: "2001-01-01T12:00:00", value: "2000-01-01T12:00:00"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
{conditions: {step: 2 * 60 * 1000, value: "2001-01-01T12:03:00"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -53,7 +53,7 @@
|
|||
{conditions: {max: "2000-01-01", value: "2001-01-01"}, expected: false, name: "[target] validity.valid must be false if validity.rangeOverflow is true"},
|
||||
{conditions: {min: "2001-01-01", value: "2000-01-01"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
{conditions: {step: 2 * 1 * 86400000, value: "2000-01-03"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -64,7 +64,7 @@
|
|||
{conditions: {min: "2001-01", value: "2000-01"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
// Step checks that "months since Jan 1970" is evenly divisible by `step`
|
||||
{conditions: {step: 3, value: "2001-02"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -74,7 +74,7 @@
|
|||
{conditions: {max: "2000-W01", value: "2001-W01"}, expected: false, name: "[target] validity.valid must be false if validity.rangeOverflow is true"},
|
||||
{conditions: {min: "2001-W01", value: "2000-W01"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
{conditions: {step: 2 * 1 * 604800000, value: "2001-W03"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -84,7 +84,7 @@
|
|||
{conditions: {max: "12:00:00", value: "13:00:00"}, expected: false, name: "[target] validity.valid must be false if validity.rangeOverflow is true"},
|
||||
{conditions: {min: "12:00:00", value: "11:00:00"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
{conditions: {step: 2 * 60 * 1000, value: "12:03:00"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -94,7 +94,7 @@
|
|||
{conditions: {max: "5", value: "6"}, expected: false, name: "[target] validity.valid must be false if validity.rangeOverflow is true"},
|
||||
{conditions: {min: "5", value: "4"}, expected: false, name: "[target] validity.valid must be false if validity.rangeUnderflow is true"},
|
||||
{conditions: {step: 2 * 1 * 1, value: "3"}, expected: false, name: "[target] validity.valid must be false if validity.stepMismatch is true"},
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -122,7 +122,7 @@
|
|||
tag: "textarea",
|
||||
types: [],
|
||||
testData: [
|
||||
{conditions: {required: true, value: ""}, expected: false, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
{conditions: {required: true, value: ""}, expected: false, expectedImmutable: true, name: "[target] validity.valid must be false if validity.valueMissing is true"}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
testData: [
|
||||
{conditions: {required: false, value: ""}, expected: false, name: "[target] The required attribute is not set"},
|
||||
{conditions: {required: true, value: "abc"}, expected: false, name: "[target] The value is not empty and required is true"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value is empty and required is true"}
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value is empty and required is true"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -27,13 +27,13 @@
|
|||
{conditions: {required: true, value: "2000-12-10T12:00:00"}, expected: false, name: "[target] Valid local date and time string(2000-12-10T12:00:00)"},
|
||||
{conditions: {required: true, value: "2000-12-10 12:00"}, expected: false, name: "[target] Valid local date and time string(2000-12-10 12:00)"},
|
||||
{conditions: {required: true, value: "1979-10-14T12:00:00.001"}, expected: false, name: "[target] Valid local date and time string(1979-10-14T12:00:00.001)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "1979-10-99 99:99"}, expected: true, name: "[target] Invalid local date and time string(1979-10-99 99:99)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "1979-10-99 99:99"}, expected: true, expectedImmutable: false, name: "[target] Invalid local date and time string(1979-10-99 99:99)"},
|
||||
{conditions: {required: true, value: "1979-10-14 12:00:00"}, expected: false, name: "[target] Valid local date and time string(1979-10-14 12:00:00)"},
|
||||
{conditions: {required: true, value: "2001-12-21 12:00"}, expected: true, name: "[target] Invalid local date and time string(2001-12-21 12:00)-two white space"},
|
||||
{conditions: {required: true, value: "abc"}, expected: true, name: "[target] the value attribute is a string(abc)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: "2001-12-21 12:00"}, expected: true, expectedImmutable: false, name: "[target] Invalid local date and time string(2001-12-21 12:00)-two white space"},
|
||||
{conditions: {required: true, value: "abc"}, expected: true, expectedImmutable: false, name: "[target] the value attribute is a string(abc)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -43,12 +43,12 @@
|
|||
{conditions: {required: false, value: ""}, expected: false, name: "[target] The required attribute is not set"},
|
||||
{conditions: {required: true, value: "2000-12-10"}, expected: false, name: "[target] Valid date string(2000-12-10)"},
|
||||
{conditions: {required: true, value: "9999-01-01"}, expected: false, name: "[target] Valid date string(9999-01-01)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "9999-99-99"}, expected: true, name: "[target] Invalid date string(9999-99-99)"},
|
||||
{conditions: {required: true, value: "37/01/01"}, expected: true, name: "[target] Invalid date string(37-01-01)"},
|
||||
{conditions: {required: true, value: "2000/01/01"}, expected: true, name: "[target] Invalid date string(2000/01/01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: 1234567}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "9999-99-99"}, expected: true, expectedImmutable: false, name: "[target] Invalid date string(9999-99-99)"},
|
||||
{conditions: {required: true, value: "37/01/01"}, expected: true, expectedImmutable: false, name: "[target] Invalid date string(37-01-01)"},
|
||||
{conditions: {required: true, value: "2000/01/01"}, expected: true, expectedImmutable: false, name: "[target] Invalid date string(2000/01/01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -58,12 +58,12 @@
|
|||
{conditions: {required: false, value: ""}, expected: false, name: "[target] The required attribute is not set"},
|
||||
{conditions: {required: true, value: "2000-12"}, expected: false, name: "[target] Valid month string(2000-12)"},
|
||||
{conditions: {required: true, value: "9999-01"}, expected: false, name: "[target] Valid month string(9999-01)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "2000-99"}, expected: true, name: "[target] Invalid month string(2000-99)"},
|
||||
{conditions: {required: true, value: "37-01"}, expected: true, name: "[target] Invalid month string(37-01)"},
|
||||
{conditions: {required: true, value: "2000/01"}, expected: true, name: "[target] Invalid month string(2000/01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: 1234567}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "2000-99"}, expected: true, expectedImmutable: false, name: "[target] Invalid month string(2000-99)"},
|
||||
{conditions: {required: true, value: "37-01"}, expected: true, expectedImmutable: false, name: "[target] Invalid month string(37-01)"},
|
||||
{conditions: {required: true, value: "2000/01"}, expected: true, expectedImmutable: false, name: "[target] Invalid month string(2000/01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -73,12 +73,12 @@
|
|||
{conditions: {required: false, value: ""}, expected: false, name: "[target] The required attribute is not set"},
|
||||
{conditions: {required: true, value: "2000-W12"}, expected: false, name: "[target] Valid week string(2000-W12)"},
|
||||
{conditions: {required: true, value: "9999-W01"}, expected: false, name: "[target] Valid week string(9999-W01)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "2000-W99"}, expected: true, name: "[target] Invalid week string(2000-W99)"},
|
||||
{conditions: {required: true, value: "2000-W00"}, expected: true, name: "[target] invalid week string(2000-W00)"},
|
||||
{conditions: {required: true, value: "2000-w01"}, expected: true, name: "[target] invalid week string(2000-w01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: 1234567}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a Date object"},
|
||||
{conditions: {required: true, value: "2000-W99"}, expected: true, expectedImmutable: false, name: "[target] Invalid week string(2000-W99)"},
|
||||
{conditions: {required: true, value: "2000-W00"}, expected: true, expectedImmutable: false, name: "[target] invalid week string(2000-W00)"},
|
||||
{conditions: {required: true, value: "2000-w01"}, expected: true, expectedImmutable: false, name: "[target] invalid week string(2000-w01)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -91,13 +91,13 @@
|
|||
{conditions: {required: true, value: "12:00:00.001"}, expected: false, name: "[target] Valid time string(12:00:60.001)"},
|
||||
{conditions: {required: true, value: "12:00:00.01"}, expected: false, name: "[target] Valid time string(12:00:60.01)"},
|
||||
{conditions: {required: true, value: "12:00:00.1"}, expected: false, name: "[target] Valid time string(12:00:60.1)"},
|
||||
{conditions: {required: true, value: 1234567}, expected: true, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, name: "[target] The value attribute is a time object"},
|
||||
{conditions: {required: true, value: "25:00:00"}, expected: true, name: "[target] Invalid time string(25:00:00)"},
|
||||
{conditions: {required: true, value: "12:60:00"}, expected: true, name: "[target] Invalid time string(12:60:00)"},
|
||||
{conditions: {required: true, value: "12:00:60"}, expected: true, name: "[target] Invalid time string(12:00:60)"},
|
||||
{conditions: {required: true, value: "12:00:00:001"}, expected: true, name: "[target] Invalid time string(12:00:00:001)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: 1234567}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a number(1234567)"},
|
||||
{conditions: {required: true, value: new Date()}, expected: true, expectedImmutable: false, name: "[target] The value attribute is a time object"},
|
||||
{conditions: {required: true, value: "25:00:00"}, expected: true, expectedImmutable: false, name: "[target] Invalid time string(25:00:00)"},
|
||||
{conditions: {required: true, value: "12:60:00"}, expected: true, expectedImmutable: false, name: "[target] Invalid time string(12:60:00)"},
|
||||
{conditions: {required: true, value: "12:00:60"}, expected: true, expectedImmutable: false, name: "[target] Invalid time string(12:00:60)"},
|
||||
{conditions: {required: true, value: "12:00:00:001"}, expected: true, expectedImmutable: false, name: "[target] Invalid time string(12:00:00:001)"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -110,11 +110,11 @@
|
|||
{conditions: {required: true, value: "123.01e-10"}, expected: false, name: "[target] Value is a number in scientific notation form(e is in lowercase)"},
|
||||
{conditions: {required: true, value: "123.01E+10"}, expected: false, name: "[target] Value is a number in scientific notation form(E is in uppercase)"},
|
||||
{conditions: {required: true, value: "-0"}, expected: false, name: "[target] Value is -0"},
|
||||
{conditions: {required: true, value: " 123 "}, expected: true, name: "[target] Value is a number with some white spaces"},
|
||||
{conditions: {required: true, value: Math.pow(2, 1024)}, expected: true, name: "[target] Value is Math.pow(2, 1024)"},
|
||||
{conditions: {required: true, value: Math.pow(-2, 1024)}, expected: true, name: "[target] Value is Math.pow(-2, 1024)"},
|
||||
{conditions: {required: true, value: "abc"}, expected: true, name: "[target] Value is a string that cannot be converted to a number"},
|
||||
{conditions: {required: true, value: ""}, expected: true, name: "[target] The value attribute is empty string"}
|
||||
{conditions: {required: true, value: " 123 "}, expected: true, expectedImmutable: false, name: "[target] Value is a number with some white spaces"},
|
||||
{conditions: {required: true, value: Math.pow(2, 1024)}, expected: true, expectedImmutable: false, name: "[target] Value is Math.pow(2, 1024)"},
|
||||
{conditions: {required: true, value: Math.pow(-2, 1024)}, expected: true, expectedImmutable: false, name: "[target] Value is Math.pow(-2, 1024)"},
|
||||
{conditions: {required: true, value: "abc"}, expected: true, expectedImmutable: false, name: "[target] Value is a string that cannot be converted to a number"},
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value attribute is empty string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -159,7 +159,7 @@
|
|||
testData: [
|
||||
{conditions: {required: false, value: ""}, expected: false, name: "[target] The required attribute is not set"},
|
||||
{conditions: {required: true, value: "abc"}, expected: false, name: "[target] The value is not empty"},
|
||||
{conditions: {required: true, value: ""}, expected: true , name: "[target] The value is empty"}
|
||||
{conditions: {required: true, value: ""}, expected: true, expectedImmutable: false, name: "[target] The value is empty"}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -5,8 +5,8 @@ var validator = {
|
|||
test(function() {
|
||||
self.pre_check(ctl, 'tooLong');
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.tooLong,
|
||||
'The validity.tooLong should be true' + condStr);
|
||||
|
@ -23,8 +23,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "tooShort");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.tooShort,
|
||||
'The validity.tooShort should be true' + condStr);
|
||||
|
@ -41,8 +41,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "patternMismatch");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.patternMismatch,
|
||||
'The validity.patternMismatch should be true' + condStr);
|
||||
|
@ -59,8 +59,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "valueMissing");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.valueMissing,
|
||||
'The validity.valueMissing should be true' + condStr);
|
||||
|
@ -77,8 +77,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "typeMismatch");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.typeMismatch,
|
||||
'The validity.typeMismatch should be true' + condStr);
|
||||
|
@ -95,8 +95,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "rangeOverflow");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.rangeOverflow,
|
||||
'The validity.rangeOverflow should be true' + condStr);
|
||||
|
@ -113,8 +113,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "rangeUnderflow");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.rangeUnderflow,
|
||||
'The validity.rangeUnderflow should be true' + condStr);
|
||||
|
@ -131,8 +131,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "stepMismatch");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.stepMismatch,
|
||||
'The validity.stepMismatch should be true' + condStr);
|
||||
|
@ -149,8 +149,8 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "badInput");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.badInput,
|
||||
'The validity.badInput should be true' + condStr);
|
||||
|
@ -167,14 +167,14 @@ var validator = {
|
|||
test(function () {
|
||||
self.pre_check(ctl, "customError");
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected) {
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected) {
|
||||
assert_true(
|
||||
ctl.validity.customError,
|
||||
'The validity.customError attribute should be true' + condStr);
|
||||
// validationMessage returns the empty string if ctl is barred from
|
||||
// constraint validation, which happens if ctl is disabled.
|
||||
if (ctl.disabled) {
|
||||
// constraint validation, which happens if ctl is disabled or readOnly.
|
||||
if (ctl.disabled || ctl.readOnly) {
|
||||
assert_equals(
|
||||
ctl.validationMessage, '',
|
||||
'The validationMessage attribute must be empty' + condStr);
|
||||
|
@ -200,8 +200,8 @@ var validator = {
|
|||
var self = this;
|
||||
test(function () {
|
||||
self.iterate_over(ctl, data).forEach(function(val) {
|
||||
const {ctl, data, condStr} = val;
|
||||
if (data.expected)
|
||||
const {ctl, expected, condStr} = val;
|
||||
if (expected)
|
||||
assert_true(
|
||||
ctl.validity.valid,
|
||||
'The validity.valid should be true' + condStr);
|
||||
|
@ -389,39 +389,54 @@ var validator = {
|
|||
},
|
||||
|
||||
iterate_over: function(ctl, data) {
|
||||
// Iterate over normal, disabled, readonly, and both.
|
||||
// Iterate over normal, disabled, readonly, and both (if applicable).
|
||||
var ctlNormal = ctl.cloneNode(true);
|
||||
this.set_conditions(ctlNormal, data.conditions);
|
||||
if (data.dirty)
|
||||
this.set_dirty(ctlNormal);
|
||||
|
||||
var ctlDisabled = ctl.cloneNode(true);
|
||||
this.set_conditions(ctlDisabled, data.conditions);
|
||||
if (data.dirty)
|
||||
this.set_dirty(ctlDisabled);
|
||||
ctlDisabled.disabled = true;
|
||||
|
||||
var expectedImmutable =
|
||||
data.expectedImmutable !== undefined ? data.expectedImmutable : data.expected;
|
||||
|
||||
var variants = [
|
||||
{ctl: ctlNormal, expected: data.expected, condStr: '.'},
|
||||
{ctl: ctlDisabled, expected: expectedImmutable, condStr: ', when control is disabled.'},
|
||||
];
|
||||
|
||||
if ('readOnly' in ctl) {
|
||||
var ctlReadonly = ctl.cloneNode(true);
|
||||
this.set_conditions(ctlReadonly, data.conditions);
|
||||
if (data.dirty)
|
||||
this.set_dirty(ctlReadonly);
|
||||
ctlReadonly.readonly = true;
|
||||
ctlReadonly.readOnly = true;
|
||||
|
||||
var ctlBoth = ctl.cloneNode(true);
|
||||
this.set_conditions(ctlBoth, data.conditions);
|
||||
if (data.dirty)
|
||||
this.set_dirty(ctlBoth);
|
||||
ctlBoth.disabled = true;
|
||||
ctlBoth.readonly = true;
|
||||
ctlBoth.readOnly = true;
|
||||
|
||||
ctl = ctl.cloneNode(true);
|
||||
this.set_conditions(ctl, data.conditions);
|
||||
variants.push({
|
||||
ctl: ctlReadonly,
|
||||
expected: expectedImmutable,
|
||||
condStr: ', when control is readonly.'
|
||||
});
|
||||
|
||||
return [
|
||||
{ctl: ctl, data: data, condStr: '.'},
|
||||
{ctl: ctlDisabled, data: data, condStr: ', when control is disabled.'},
|
||||
{ctl: ctlReadonly, data: data, condStr: ', when control is readonly.'},
|
||||
{
|
||||
variants.push({
|
||||
ctl: ctlBoth,
|
||||
data: data,
|
||||
expected: expectedImmutable,
|
||||
condStr: ', when control is disabled & readonly.'
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return variants;
|
||||
},
|
||||
|
||||
run_test: function(testee, method) {
|
||||
|
|
|
@ -170,6 +170,7 @@ var WebNFCTest = (() => {
|
|||
this.reading_messages_ = [];
|
||||
this.operations_suspended_ = false;
|
||||
this.is_formatted_tag_ = false;
|
||||
this.data_transfer_failed_ = false;
|
||||
}
|
||||
|
||||
// NFC delegate functions.
|
||||
|
@ -192,6 +193,9 @@ var WebNFCTest = (() => {
|
|||
// Resolves with NotAllowedError if there are NDEF records on the device
|
||||
// and overwrite is false.
|
||||
resolve(createNDEFError(device.mojom.NDEFErrorType.NOT_ALLOWED));
|
||||
} else if (this.data_transfer_failed_) {
|
||||
// Resolves with NetworkError if data transfer fails.
|
||||
resolve(createNDEFError(device.mojom.NDEFErrorType.IO_ERROR));
|
||||
} else {
|
||||
resolve(createNDEFError(null));
|
||||
}
|
||||
|
@ -290,6 +294,7 @@ var WebNFCTest = (() => {
|
|||
this.operations_suspended_ = false;
|
||||
this.cancelPendingPushOperation();
|
||||
this.is_formatted_tag_ = false;
|
||||
this.data_transfer_failed_ = false;
|
||||
}
|
||||
|
||||
cancelPendingPushOperation() {
|
||||
|
@ -365,6 +370,10 @@ var WebNFCTest = (() => {
|
|||
setIsFormattedTag(isFormatted) {
|
||||
this.is_formatted_tag_ = isFormatted;
|
||||
}
|
||||
|
||||
simulateDataTransferFails() {
|
||||
this.data_transfer_failed_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
let testInternal = {
|
||||
|
|
|
@ -8,7 +8,8 @@ from .base import (get_free_port,
|
|||
cmd_arg,
|
||||
browser_command)
|
||||
from ..executors.executormarionette import (MarionetteTestharnessExecutor, # noqa: F401
|
||||
MarionetteRefTestExecutor) # noqa: F401
|
||||
MarionetteRefTestExecutor, # noqa: F401
|
||||
MarionetteCrashtestExecutor) # noqa: F401
|
||||
from .firefox import (get_timeout_multiplier, # noqa: F401
|
||||
run_info_extras as fx_run_info_extras,
|
||||
update_properties, # noqa: F401
|
||||
|
@ -20,7 +21,8 @@ __wptrunner__ = {"product": "firefox_android",
|
|||
"check_args": "check_args",
|
||||
"browser": "FirefoxAndroidBrowser",
|
||||
"executor": {"testharness": "MarionetteTestharnessExecutor",
|
||||
"reftest": "MarionetteRefTestExecutor"},
|
||||
"reftest": "MarionetteRefTestExecutor",
|
||||
"crashtest": "MarionetteCrashtestExecutor"},
|
||||
"browser_kwargs": "browser_kwargs",
|
||||
"executor_kwargs": "executor_kwargs",
|
||||
"env_extras": "env_extras",
|
||||
|
|
|
@ -991,15 +991,16 @@ class MarionetteCrashtestExecutor(CrashtestExecutor):
|
|||
if not success:
|
||||
status = data[0]
|
||||
|
||||
extra = None
|
||||
if self.debug and (success or status not in ("CRASH", "INTERNAL-ERROR")):
|
||||
assertion_count = self.protocol.asserts.get()
|
||||
if assertion_count is not None:
|
||||
data["extra"] = {"assertion_count": assertion_count}
|
||||
extra = {"assertion_count": assertion_count}
|
||||
|
||||
if success:
|
||||
return self.convert_result(test, data)
|
||||
|
||||
return (test.result_cls(**data), [])
|
||||
return (test.result_cls(extra=extra, *data), [])
|
||||
|
||||
def do_crashtest(self, protocol, url, timeout):
|
||||
if self.protocol.coverage.is_enabled:
|
||||
|
|
|
@ -32,7 +32,8 @@ function wait_paints() {
|
|||
}
|
||||
|
||||
function screenshot_if_ready() {
|
||||
if (root.classList.contains("%(classname)s") &&
|
||||
if (root &&
|
||||
root.classList.contains("%(classname)s") &&
|
||||
observer === null) {
|
||||
observer = new MutationObserver(wait_paints);
|
||||
observer.observe(root, {attributes: true});
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ctypes
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import plistlib
|
||||
|
@ -12,7 +11,8 @@ SYSTEM = platform.system().lower()
|
|||
|
||||
|
||||
class FontInstaller(object):
|
||||
def __init__(self, font_dir=None, **fonts):
|
||||
def __init__(self, logger, font_dir=None, **fonts):
|
||||
self.logger = logger
|
||||
self.font_dir = font_dir
|
||||
self.installed_fonts = False
|
||||
self.created_dir = False
|
||||
|
@ -26,14 +26,13 @@ class FontInstaller(object):
|
|||
font_name = font_path.split('/')[-1]
|
||||
install = getattr(self, 'install_%s_font' % SYSTEM, None)
|
||||
if not install:
|
||||
logging.warning('Font installation not supported on %s',
|
||||
SYSTEM)
|
||||
self.logger.warning('Font installation not supported on %s' % SYSTEM)
|
||||
return False
|
||||
if install(font_name, font_path):
|
||||
self.installed_fonts = True
|
||||
logging.info('Installed font: %s', font_name)
|
||||
self.logger.info('Installed font: %s' % font_name)
|
||||
else:
|
||||
logging.warning('Unable to install font: %s', font_name)
|
||||
self.logger.warning('Unable to install font: %s' % font_name)
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
if not self.installed_fonts:
|
||||
|
@ -43,12 +42,12 @@ class FontInstaller(object):
|
|||
font_name = font_path.split('/')[-1]
|
||||
remove = getattr(self, 'remove_%s_font' % SYSTEM, None)
|
||||
if not remove:
|
||||
logging.warning('Font removal not supported on %s', SYSTEM)
|
||||
self.logger.warning('Font removal not supported on %s' % SYSTEM)
|
||||
return False
|
||||
if remove(font_name, font_path):
|
||||
logging.info('Removed font: %s', font_name)
|
||||
self.logger.info('Removed font: %s' % font_name)
|
||||
else:
|
||||
logging.warning('Unable to remove font: %s', font_name)
|
||||
self.logger.warning('Unable to remove font: %s' % font_name)
|
||||
|
||||
def install_linux_font(self, font_name, font_path):
|
||||
if not self.font_dir:
|
||||
|
@ -62,7 +61,7 @@ class FontInstaller(object):
|
|||
fc_cache_returncode = call('fc-cache')
|
||||
return not fc_cache_returncode
|
||||
except OSError: # If fontconfig doesn't exist, return False
|
||||
logging.error('fontconfig not available on this Linux system.')
|
||||
self.logger.error('fontconfig not available on this Linux system.')
|
||||
return False
|
||||
|
||||
def install_darwin_font(self, font_name, font_path):
|
||||
|
@ -110,7 +109,7 @@ class FontInstaller(object):
|
|||
fc_cache_returncode = call('fc-cache')
|
||||
return not fc_cache_returncode
|
||||
except OSError: # If fontconfig doesn't exist, return False
|
||||
logging.error('fontconfig not available on this Linux system.')
|
||||
self.logger.error('fontconfig not available on this Linux system.')
|
||||
return False
|
||||
|
||||
def remove_darwin_font(self, font_name, _):
|
||||
|
|
|
@ -150,6 +150,7 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
|
||||
if kwargs["install_fonts"]:
|
||||
env_extras.append(FontInstaller(
|
||||
logger,
|
||||
font_dir=kwargs["font_dir"],
|
||||
ahem=os.path.join(test_paths["/"]["tests_path"], "fonts/Ahem.ttf")
|
||||
))
|
||||
|
|
|
@ -207,4 +207,27 @@ nfc_test(async (t, mockNFC) => {
|
|||
}, "Test that NDEFReader.onreading should be fired on an unformatted NFC tag \
|
||||
with empty records array for NDEFMessage.");
|
||||
|
||||
nfc_test(async (t, mockNFC) => {
|
||||
const reader = new NDEFReader();
|
||||
const controller = new AbortController();
|
||||
const message = createMessage([createTextRecord(test_text_data),
|
||||
createMimeRecordFromJson(test_json_data),
|
||||
createMimeRecord(test_buffer_data),
|
||||
createUnknownRecord(test_buffer_data),
|
||||
createUrlRecord(test_url_data),
|
||||
createUrlRecord(test_url_data, true),
|
||||
createRecord('w3.org:xyz', test_buffer_data)],
|
||||
test_message_origin);
|
||||
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
|
||||
const promise = readerWatcher.wait_for("reading").then(event => {
|
||||
assert_equals(event.serialNumber, fake_tag_serial_number);
|
||||
assertWebNDEFMessagesEqual(event.message, new NDEFMessage(message));
|
||||
controller.abort();
|
||||
});
|
||||
await reader.scan({signal : controller.signal});
|
||||
|
||||
mockNFC.setReadingMessage(message);
|
||||
await promise;
|
||||
}, "Test that reading message with multiple records should succeed.");
|
||||
|
||||
</script>
|
||||
|
|
|
@ -276,7 +276,7 @@ nfc_test(async () => {
|
|||
|
||||
nfc_test(async (t, mockNFC) => {
|
||||
const writer = new NDEFWriter();
|
||||
let message = createMessage([createTextRecord(test_text_data),
|
||||
const message = createMessage([createTextRecord(test_text_data),
|
||||
createMimeRecordFromJson(test_json_data),
|
||||
createMimeRecord(test_buffer_data),
|
||||
createUnknownRecord(test_buffer_data),
|
||||
|
@ -308,9 +308,12 @@ nfc_test(async (t, mockNFC) => {
|
|||
assertNDEFMessagesEqual(buffer_view, mockNFC.pushedMessage());
|
||||
}, "Test that NDEFWriter.push succeeds when message is ArrayBufferView.");
|
||||
|
||||
nfc_test(async () => {
|
||||
nfc_test(async (t, mockNFC) => {
|
||||
const writer = new NDEFWriter();
|
||||
await writer.push(createMessage([createRecord('empty')]));
|
||||
const receivedMessage = mockNFC.pushedMessage();
|
||||
assert_equals(receivedMessage.data.length, 1);
|
||||
assert_equals(receivedMessage.data[0].recordType, 'empty', 'recordType');
|
||||
}, "NDEFWriter.push with 'empty' record should succeed.");
|
||||
|
||||
nfc_test(async (t, mockNFC) => {
|
||||
|
@ -433,4 +436,11 @@ nfc_test(async (t, mockNFC) => {
|
|||
await promise_rejects(t, 'NotAllowedError', p);
|
||||
}, "NDEFWriter.push should fail when there are NDEF records on the NFC device \
|
||||
and NDEFPushOptions.overwrite is false.");
|
||||
|
||||
nfc_test(async (t, mockNFC) => {
|
||||
const writer = new NDEFWriter();
|
||||
mockNFC.simulateDataTransferFails();
|
||||
await promise_rejects(t, 'NetworkError', writer.push(test_text_data));
|
||||
}, "NDEFWriter.push should fail with NetworkError when NFC data transfer fails.");
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue