Skip to content

Commit 42df69f

Browse files
committed
2 parents babd9a9 + 4b2fa54 commit 42df69f

File tree

808 files changed

+52750
-33046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

808 files changed

+52750
-33046
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => ({ v: i }));
12+
const insert = Array.from({ length: 32 }, (_, i) => ({ v: -i }));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => i + 0.5);
12+
const insert = Array.from({ length: 32 }, (_, i) => ({ v: -i }));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => i + 0.5);
12+
const insert = Array.from({ length: 32 }, (_, i) => -(i + 0.25));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => i | 0);
12+
const insert = Array.from({ length: 32 }, (_, i) => ({ v: -i }));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => i | 0);
12+
const insert = Array.from({ length: 32 }, (_, i) => -(i + 0.25));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function test(array, start, del, insert) {
2+
return array.toSpliced(start, del, ...insert);
3+
}
4+
noInline(test);
5+
6+
function shouldBe(a, b) {
7+
if (a !== b)
8+
throw new Error(`Expected ${b} but got ${a}`);
9+
}
10+
11+
const src = Array.from({ length: 1024 }, (_, i) => i | 0);
12+
const insert = Array.from({ length: 32 }, (_, i) => -(i | 0));
13+
14+
let result;
15+
for (let i = 0; i < 1e5; ++i)
16+
result = test(src, 496, 32, insert);
17+
18+
shouldBe(result.length, 1024);
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
function sameArray(a, b) {
2+
if (a.length !== b.length)
3+
throw new Error(`length: expected ${b.length} but got ${a.length}`);
4+
for (let i = 0; i < a.length; ++i) {
5+
if (a[i] !== b[i])
6+
throw new Error(`${i}: expected ${b[i]} but got ${a[i]}`);
7+
}
8+
}
9+
10+
/* int32 → int32, delete only */
11+
{
12+
const src = [0, 1, 2, 3, 4, 5];
13+
sameArray(src.toSpliced(2, 2), [0, 1, 4, 5]);
14+
sameArray(src, [0, 1, 2, 3, 4, 5]);
15+
}
16+
17+
/* int32 → int32, insert int32 */
18+
{
19+
const src = [10, 11, 12, 13];
20+
sameArray(src.toSpliced(2, 0, 99, 98), [10, 11, 99, 98, 12, 13]);
21+
sameArray(src, [10, 11, 12, 13]);
22+
}
23+
24+
/* int32 → double, insert double */
25+
{
26+
const src = [1, 2, 3, 4];
27+
sameArray(src.toSpliced(2, 1, 3.25, 4.25), [1, 2, 3.25, 4.25, 4]);
28+
sameArray(src, [1, 2, 3, 4]);
29+
}
30+
31+
/* int32 → contiguous, insert object */
32+
{
33+
const src = [7, 8, 9];
34+
const obj = { v: 42 };
35+
sameArray(src.toSpliced(1, 1, obj), [7, obj, 9]);
36+
sameArray(src, [7, 8, 9]);
37+
}
38+
39+
/* double → double, delete last */
40+
{
41+
const src = [0.5, 1.5, 2.5, 3.5];
42+
sameArray(src.toSpliced(-1), [0.5, 1.5, 2.5]);
43+
sameArray(src, [0.5, 1.5, 2.5, 3.5]);
44+
}
45+
46+
/* double → double, insert int32 */
47+
{
48+
const src = [5.5, 6.5, 7.5];
49+
sameArray(src.toSpliced(1, 0, 100), [5.5, 100, 6.5, 7.5]);
50+
sameArray(src, [5.5, 6.5, 7.5]);
51+
}
52+
53+
/* double → contiguous, insert string & object */
54+
{
55+
const src = [2.2, 3.3, 4.4];
56+
const o = { x: 1 };
57+
sameArray(src.toSpliced(0, 1, "str", o), ["str", o, 3.3, 4.4]);
58+
sameArray(src, [2.2, 3.3, 4.4]);
59+
}
60+
61+
/* contiguous → contiguous, delete middle */
62+
{
63+
const a = { a: 1 };
64+
const b = { b: 2 };
65+
const c = { c: 3 };
66+
const src = [a, b, c];
67+
sameArray(src.toSpliced(1, 1), [a, c]);
68+
sameArray(src, [a, b, c]);
69+
}
70+
71+
/* contiguous → contiguous, insert mix */
72+
{
73+
const src = ["x", "y", "z"];
74+
sameArray(src.toSpliced(2, 0, 7, 8.8), ["x", "y", 7, 8.8, "z"]);
75+
sameArray(src, ["x", "y", "z"]);
76+
}
77+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
function sameArray(a, b) {
2+
if (a.length !== b.length)
3+
throw new Error(`length: expected ${b.length} but got ${a.length}`);
4+
for (let i = 0; i < a.length; ++i) {
5+
if (a[i] !== b[i])
6+
throw new Error(`${i}: expected ${b[i]} but got ${a[i]}`);
7+
}
8+
}
9+
10+
function shouldBe(a, b) {
11+
if (a !== b)
12+
throw new Error(`Expected ${b} but got ${a}`);
13+
}
14+
15+
const array = [, , , 1, 2, 3, 4];
16+
const result = array.toSpliced(0, 0, 9, 8, 7);
17+
18+
sameArray(result, [9, 8, 7, undefined, undefined, undefined, 1, 2, 3, 4]);
19+
20+
shouldBe(Object.hasOwn(result, 3), true);
21+
shouldBe(Object.hasOwn(result, 4), true);
22+
shouldBe(Object.hasOwn(result, 5), true);

LayoutTests/TestExpectations

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4589,19 +4589,15 @@ imported/w3c/web-platform-tests/css/css-fonts/font-weight-lighter-001.xht [ Imag
45894589
imported/w3c/web-platform-tests/css/css-fonts/font-weight-normal-001.xht [ ImageOnlyFailure ]
45904590

45914591
# webkit.org/b/203763 2019 WebGL test gardening: These tests pass in Safari and the conformance suite, but timeout in TestRunner and MiniBrowser.
4592-
webgl/1.0.3/conformance/uniforms/gl-uniform-arrays.html [ Skip ]
45934592
webgl/2.0.0/conformance2/rendering/blitframebuffer-filter-outofbounds.html [ Skip ]
45944593

45954594
# webkit.org/b/203908 Tests generate inconsistent results or time out
45964595
webgl/1.0.3/conformance/textures/texture-npot-video.html [ Skip ]
4597-
webgl/1.0.3/conformance/canvas/rapid-resizing.html [ Skip ]
45984596

45994597
# WebGL 2 Conformance Suite rules for regular bots post ANGLE backend adoption.
46004598
# DEQP is skipped on the main fleet of bots because of the long run time.
46014599
webgl/2.0.0/deqp [ Skip ]
46024600

4603-
webkit.org/b/214893 [ Debug ] webgl/2.0.0/conformance/uniforms/gl-uniform-arrays.html [ Slow ]
4604-
46054601
# webkit.org/b/208211 Additional inconsitencies between Intel bots and AMD machine
46064602
webgl/2.0.0/conformance2/rendering/clipping-wide-points.html [ Pass Failure ]
46074603
webgl/2.0.0/conformance2/textures/misc/tex-3d-size-limit.html [ Pass Failure ]
@@ -4698,12 +4694,12 @@ webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bi
46984694
webgl/1.0.x [ Skip ]
46994695

47004696
# Explicitly enable tests which we have fixed and do not have corresponding 1.0.3 test functionality.
4701-
webgl/1.0.x/conformance/canvas/to-data-url-test.html [ Pass ]
47024697
webgl/1.0.x/conformance/context/constants-and-properties.html [ Pass ]
47034698
webgl/1.0.x/conformance/textures/misc/exif-orientation.html [ Pass ]
47044699

47054700
webgl/1.0.x/conformance/attribs [ Pass ]
47064701
webgl/1.0.x/conformance/buffers [ Pass ]
4702+
webgl/1.0.x/conformance/canvas [ Pass ]
47074703
webgl/1.0.x/conformance/context [ Pass ]
47084704
webgl/1.0.x/conformance/extensions [ Pass ]
47094705
webgl/1.0.x/conformance/glsl [ Pass ]
@@ -4718,6 +4714,7 @@ webgl/1.0.x/conformance/renderbuffers [ Pass ]
47184714
webgl/1.0.x/conformance/rendering [ Pass ]
47194715
webgl/1.0.x/conformance/state [ Pass ]
47204716
webgl/1.0.x/conformance/textures/canvas/ [ Pass ]
4717+
webgl/1.0.x/conformance/uniforms [ Pass Slow ]
47214718

47224719
# Debug builds on slower machines run close to the time out especially with GPUP enabled
47234720
webkit.org/b/238691 [ Debug ] webgl/1.0.3/conformance/state/gl-object-get-calls.html [ Slow ]
@@ -4728,7 +4725,6 @@ webgl/2.0.y [ Skip ]
47284725
webkit.org/b/254730 [ Debug ] webgl/2.0.y/conformance/extensions/webgl-compressed-texture-astc.html [ Slow ]
47294726

47304727
# Explicitly enable tests which we have fixed and do not have corresponding 2.0.0 test functionality.
4731-
webgl/2.0.y/conformance/canvas/to-data-url-test.html [ Pass ]
47324728
webgl/2.0.y/conformance/textures/misc/exif-orientation.html [ Pass ]
47334729
webgl/2.0.y/conformance/extensions/webgl-multi-draw.html [ Pass Slow ]
47344730
webgl/2.0.y/conformance2/extensions/ext-texture-filter-anisotropic.html [ Pass ]
@@ -4738,13 +4734,15 @@ webgl/2.0.y/conformance2/state/gl-object-get-calls.html [ Pass Slow ]
47384734
webgl/2.0.y/conformance2/vertex_arrays/vertex-array-object.html [ Pass ]
47394735
webgl/2.0.y/conformance2/transform_feedback/transform_feedback.html [ Pass ]
47404736
webgl/2.0.y/conformance2/transform_feedback/simultaneous_binding.html [ Pass ]
4737+
webgl/2.0.y/conformance2/textures/misc/tex-unpack-params-with-flip-y-and-premultiply-alpha.html [ Pass ]
47414738
webgl/1.0.x/conformance/extensions/oes-vertex-array-object.html [ Pass ]
47424739

47434740
webgl/2.0.y/conformance2/offscreencanvas [ Pass ]
47444741

47454742
# Explicitly turn on conformance test until all of webgl/2.0.y is enabled
47464743
webgl/2.0.y/conformance/attribs [ Pass ]
47474744
webgl/2.0.y/conformance/buffers [ Pass ]
4745+
webgl/2.0.y/conformance/canvas [ Pass ]
47484746
webgl/2.0.y/conformance/context [ Pass ]
47494747
webgl/2.0.y/conformance/extensions [ Pass ]
47504748
webgl/2.0.y/conformance/glsl [ Pass ]
@@ -4758,6 +4756,8 @@ webgl/2.0.y/conformance/reading [ Pass ]
47584756
webgl/2.0.y/conformance/renderbuffers [ Pass ]
47594757
webgl/2.0.y/conformance/rendering [ Pass ]
47604758
webgl/2.0.y/conformance/textures/canvas/ [ Pass ]
4759+
webgl/2.0.y/conformance2/canvas [ Pass ]
4760+
webgl/2.0.y/conformance/uniforms [ Pass Slow ]
47614761
webgl/2.0.y/conformance2/context [ Pass ]
47624762
webgl/2.0.y/conformance2/extensions/ext-conservative-depth.html [ Pass ]
47634763
webgl/2.0.y/conformance2/extensions/ext-render-snorm.html [ Pass ]
@@ -4777,8 +4777,10 @@ webgl/2.0.y/conformance2/rendering/rasterizer-discard-and-implicit-clear.html [
47774777
webgl/2.0.y/conformance2/state [ Pass ]
47784778
webgl/2.0.y/conformance2/textures/canvas/ [ Pass ]
47794779
webgl/2.0.y/conformance2/textures/webgl_canvas [ Pass ]
4780+
webgl/2.0.y/conformance2/uniforms [ Pass ]
47804781
webgl/2.0.y/conformance2/wasm [ Pass ]
47814782

4783+
47824784
webkit.org/b/282031 webgl/1.0.x/conformance/context/context-lost-restored.html [ Failure ]
47834785
webkit.org/b/282031 webgl/1.0.x/conformance/context/context-lost.html [ Failure ]
47844786
webkit.org/b/282031 webgl/1.0.x/conformance/offscreencanvas/context-lost-restored.html [ Failure ]
@@ -4792,6 +4794,7 @@ webkit.org/b/282031 webgl/2.0.y/conformance/offscreencanvas/context-lost.html [
47924794
fast/canvas/webgl/invalid-passed-params.html [ Skip ]
47934795
webgl/1.0.3/conformance/attribs [ Skip ]
47944796
webgl/1.0.3/conformance/buffers [ Skip ]
4797+
webgl/1.0.3/conformance/canvas [ Skip ]
47954798
webgl/1.0.3/conformance/context [ Skip ]
47964799
webgl/1.0.3/conformance/extensions [ Skip ]
47974800
webgl/1.0.3/conformance/glsl [ Skip ]
@@ -4804,8 +4807,10 @@ webgl/1.0.3/conformance/reading [ Skip ]
48044807
webgl/1.0.3/conformance/renderbuffers [ Skip ]
48054808
webgl/1.0.3/conformance/rendering [ Skip ]
48064809
webgl/1.0.3/conformance/state [ Skip ]
4810+
webgl/1.0.3/conformance/uniforms [ Skip ]
48074811
webgl/2.0.0/conformance/attribs [ Skip ]
48084812
webgl/2.0.0/conformance/buffers [ Skip ]
4813+
webgl/2.0.0/conformance/canvas [ Skip ]
48094814
webgl/2.0.0/conformance/context [ Skip ]
48104815
webgl/2.0.0/conformance/extensions [ Skip ]
48114816
webgl/2.0.0/conformance/glsl [ Skip ]
@@ -4818,6 +4823,7 @@ webgl/2.0.0/conformance/reading [ Skip ]
48184823
webgl/2.0.0/conformance/renderbuffers [ Skip ]
48194824
webgl/2.0.0/conformance/rendering [ Skip ]
48204825
webgl/2.0.0/conformance/textures/canvas/ [ Skip ]
4826+
webgl/2.0.0/conformance/uniforms [ Skip ]
48214827
webgl/2.0.0/conformance2/context [ Skip ]
48224828
webgl/2.0.0/conformance2/context/constants-and-properties-2.html [ Skip ]
48234829
webgl/2.0.0/conformance2/state [ Skip ]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Tests CSS container queries don't break when using nested shadow DOM
2+
3+
PASS if not crash

0 commit comments

Comments
 (0)