Commit 457d8f93 authored by Joshua Bell's avatar Joshua Bell Committed by Commit Bot

Encoding: Deflake some web platform tests via sharding

encoding/api-invalid-label.any.js had 3287 subtests
encoding/textdecoder-fatal-single-byte.any.js had 7169 subtests

Pragmatically, the encoding tests need to sharded down to 1000
or they flakily timeout (e.g. on win debug and MSAN bots). Apply
that here, and update expectations.

Bug: 862938, 517704
Change-Id: I1b1bd13dd997700791ec25de9d0c75c1e5f72960
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2045144Reviewed-by: default avatarJarryd Goodman <jarrydg@chromium.org>
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740359}
parent b7f3781e
......@@ -25,7 +25,6 @@ crbug.com/454267 [ Linux ] virtual/gpu/fast/canvas/canvas-arc-360-winding.html [
crbug.com/454267 [ Linux ] virtual/gpu/fast/canvas/canvas-ellipse-360-winding.html [ Crash ]
crbug.com/522315 [ Linux ] virtual/gpu/fast/canvas/quadraticCurveTo.xml [ Crash ]
crbug.com/517704 [ Linux ] external/wpt/encoding/api-invalid-label.html [ Timeout Pass ]
crbug.com/708175 [ Linux ] external/wpt/IndexedDB/interleaved-cursors-small.html [ Timeout ]
crbug.com/708175 [ Linux ] external/wpt/IndexedDB/interleaved-cursors-large.html [ Timeout ]
......
......@@ -4123,9 +4123,6 @@ crbug.com/785230 [ Win ] external/wpt/css/css-text-decor/text-decoration-skip-in
crbug.com/912362 external/wpt/web-animations/timing-model/timelines/timelines.html [ Failure ]
# Decoding test timeout on Win7. Marked flaky to get imported in case it's flaky timeout everywhere.
crbug.com/862938 external/wpt/encoding/textdecoder-fatal-single-byte.any.worker.html [ Pass Timeout ]
# Unclear if XHR events should still be fired after its frame is discarded.
crbug.com/881180 external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
crbug.com/881180 virtual/omt-worker-fetch/external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
......
// META: title=Encoding API: invalid label
// META: timeout=long
// META: variant=?1-1000
// META: variant=?1001-2000
// META: variant=?2001-3000
// META: variant=?3001-last
// META: script=resources/encodings.js
// META: script=/common/subset-tests.js
var tests = ["invalid-invalidLabel"];
setup(function() {
......@@ -18,7 +23,7 @@ setup(function() {
});
tests.forEach(function(input) {
test(function() {
subsetTest(test, function() {
assert_throws_js(RangeError, function() { new TextDecoder(input); });
}, 'Invalid label ' + format_value(input) + ' should be rejected by TextDecoder.');
});
// META: timeout=long
// META: title=Encoding API: Fatal flag for single byte encodings
// META: timeout=long
// META: variant=?1-1000
// META: variant=?1001-2000
// META: variant=?2001-3000
// META: variant=?3001-4000
// META: variant=?4001-5000
// META: variant=?5001-6000
// META: variant=?6001-7000
// META: variant=?7001-last
// META: script=/common/subset-tests.js
var singleByteEncodings = [
{encoding: 'IBM866', bad: []},
......@@ -36,14 +45,14 @@ var singleByteEncodings = [
singleByteEncodings.forEach(function(t) {
for (var i = 0; i < 256; ++i) {
if (t.bad.indexOf(i) != -1) {
test(function() {
subsetTest(test, function() {
assert_throws_js(TypeError, function() {
new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array([i]));
});
}, 'Throw due to fatal flag: ' + t.encoding + ' doesn\'t have a pointer ' + i);
}
else {
test(function() {
subsetTest(test, function() {
assert_equals(typeof new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array([i])), "string");
}, 'Not throw: ' + t.encoding + ' has a pointer ' + i);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment