forked from mirrors/gecko-dev
Automatic update from web-platform-tests Mark some WPT tests as timeout=long A recent change in testharness.js seems to have caused a detectable performance regression on the MSAN bots. We intend to follow through on this to see if it can be avoided, but for now there are 3 tests that are consistently timing out on MSAN that did not previously: external/wpt/encoding/textdecoder-labels.any.worker.html external/wpt/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.html external/wpt/url/url-constructor.any.worker.html This CL adds 'long' timeouts to each of the tests. Unfortunately the canvas test is part of a generated test suite, so far that I added support for 'timeout=long' to the worker variant of gentestutils.py... and discovered ~20 other test files that were already marked as having a long timeout but weren't previously generating the correct code! So they unfortunately get bundled in with this. Bug: 1170588 Change-Id: I3b471b3a21b4e9f8c126f4e012c7f9949636e4b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2648976 Reviewed-by: Yi Xu <yiyix@chromium.org> Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#847254} -- wpt-commits: 473c0c1c14bf24d72dc11f6b58d822f4acce4fab wpt-pr: 27329
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
// META: title=Encoding API: Encoding labels
|
|
// META: script=resources/encodings.js
|
|
// META: timeout=long
|
|
|
|
var whitespace = [' ', '\t', '\n', '\f', '\r'];
|
|
encodings_table.forEach(function(section) {
|
|
section.encodings.filter(function(encoding) {
|
|
return encoding.name !== 'replacement';
|
|
}).forEach(function(encoding) {
|
|
encoding.labels.forEach(function(label) {
|
|
const textDecoderName = encoding.name.toLowerCase(); // ASCII names only, so safe
|
|
test(function(t) {
|
|
assert_equals(
|
|
new TextDecoder(label).encoding, textDecoderName,
|
|
'label for encoding should match');
|
|
assert_equals(
|
|
new TextDecoder(label.toUpperCase()).encoding, textDecoderName,
|
|
'label matching should be case-insensitive');
|
|
whitespace.forEach(function(ws) {
|
|
assert_equals(
|
|
new TextDecoder(ws + label).encoding, textDecoderName,
|
|
'label for encoding with leading whitespace should match');
|
|
assert_equals(
|
|
new TextDecoder(label + ws).encoding, textDecoderName,
|
|
'label for encoding with trailing whitespace should match');
|
|
assert_equals(
|
|
new TextDecoder(ws + label + ws).encoding, textDecoderName,
|
|
'label for encoding with surrounding whitespace should match');
|
|
});
|
|
}, label + ' => ' + encoding.name);
|
|
});
|
|
});
|
|
});
|