Skip to content

Commit 8dcf033

Browse files
committed
Bug 1949782 [wpt PR 50864] - Consolidate reference_file and is_test_reference into a single param, a=testonly
Automatic update from web-platform-tests Consolidate reference_file and is_test_reference into a single param The Canvas WPT test generator was using two variables to control how a test file links to it's reference file: 'reference_file' and 'is_test_reference'. In the context of documenting all parameters, having to explain why we have two different parameters to do this one thing is awkward. The logic and documentation will be simpler by using a single 'reference_file_link' parameter. Bug: 393561071 Change-Id: Id4523455f72ceb94684799cd672d11d87c106653 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6219871 Reviewed-by: Andres Ricardo Perez <andresrperezchromium.org> Commit-Queue: Jean-Philippe Gravel <jpgravelchromium.org> Cr-Commit-Position: refs/heads/main{#1423298} -- wpt-commits: 463424c2cb676beafcdfeb2a4848b54e9f66dc6a wpt-pr: 50864 UltraBlame original commit: 6f5dfaea7dde13f02bac8198a7c253beaadb1a17
1 parent c667f47 commit 8dcf033

File tree

7 files changed

+60
-50
lines changed

7 files changed

+60
-50
lines changed

testing/web-platform/tests/html/canvas/tools/gentest.py

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7660,10 +7660,57 @@
76607660
)
76617661
:
76627662

7663+
#
7664+
Generate
7665+
reference
7666+
file
7667+
.
7668+
7669+
if
7670+
canvas_type
7671+
!
7672+
=
7673+
_CanvasType
7674+
.
7675+
WORKER
7676+
or
7677+
needs_worker_reference
7678+
:
7679+
7680+
_render
7681+
(
7682+
jinja_env
7683+
ref_templates
7684+
[
7685+
self
7686+
.
7687+
template_type
7688+
]
7689+
params
7690+
7691+
ref_output_paths
7692+
[
7693+
canvas_type
7694+
]
7695+
)
7696+
7697+
#
7698+
Generate
7699+
test
7700+
file
7701+
with
7702+
a
7703+
link
7704+
to
7705+
the
7706+
reference
7707+
file
7708+
.
7709+
76637710
params
76647711
[
76657712
'
7666-
reference_file
7713+
reference_file_link
76677714
'
76687715
]
76697716
=
@@ -7694,43 +7741,6 @@
76947741
canvas_type
76957742
]
76967743
)
7697-
7698-
if
7699-
canvas_type
7700-
!
7701-
=
7702-
_CanvasType
7703-
.
7704-
WORKER
7705-
or
7706-
needs_worker_reference
7707-
:
7708-
7709-
params
7710-
[
7711-
'
7712-
is_test_reference
7713-
'
7714-
]
7715-
=
7716-
True
7717-
7718-
_render
7719-
(
7720-
jinja_env
7721-
ref_templates
7722-
[
7723-
self
7724-
.
7725-
template_type
7726-
]
7727-
params
7728-
7729-
ref_output_paths
7730-
[
7731-
canvas_type
7732-
]
7733-
)
77347744

77357745
def
77367746
_write_testharness_test

testing/web-platform/tests/html/canvas/tools/templates/reftest_element.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070
{
7171
%
7272
if
73-
not
74-
is_test_reference
73+
reference_file_link
7574
%
7675
}
7776
<
@@ -86,7 +85,7 @@
8685
"
8786
{
8887
{
89-
reference_file
88+
reference_file_link
9089
}
9190
}
9291
"
@@ -351,7 +350,8 @@
351350
2
352351
)
353352
if
354-
is_test_reference
353+
not
354+
reference_file_link
355355
else
356356
code
357357
|

testing/web-platform/tests/html/canvas/tools/templates/reftest_element_grid.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@
113113
{
114114
%
115115
if
116-
not
117-
is_test_reference
116+
reference_file_link
118117
%
119118
}
120119
<
@@ -129,7 +128,7 @@
129128
"
130129
{
131130
{
132-
reference_file
131+
reference_file_link
133132
}
134133
}
135134
"
@@ -570,7 +569,8 @@
570569
4
571570
)
572571
if
573-
is_test_reference
572+
not
573+
reference_file_link
574574
else
575575
variant
576576
.

testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"
8080
{
8181
{
82-
reference_file
82+
reference_file_link
8383
}
8484
}
8585
"

testing/web-platform/tests/html/canvas/tools/templates/reftest_offscreen_grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"
123123
{
124124
{
125-
reference_file
125+
reference_file_link
126126
}
127127
}
128128
"

testing/web-platform/tests/html/canvas/tools/templates/reftest_worker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"
6464
{
6565
{
66-
reference_file
66+
reference_file_link
6767
}
6868
}
6969
"

testing/web-platform/tests/html/canvas/tools/templates/reftest_worker_grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"
9090
{
9191
{
92-
reference_file
92+
reference_file_link
9393
}
9494
}
9595
"

0 commit comments

Comments
 (0)