Skip to content

Commit f3a0e06

Browse files
authored
Use WPT version of test harness for HTML core test conversion (#1859)
When converting tests to HTML for use in WPT, use the path to the test harness in WPT's resources/ directory. This is also important because the WPT test runner users this path inclusion to discover the tests. There are several more things I want to simplify here but I'm starting with just this because it matches the sed transform that @past originally wrote in web-platform-tests/wpt#49277
1 parent 1463895 commit f3a0e06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ def build_html_from_js(tests, html_dir, use_sync):
165165
html_file = os.path.join(html_dir, subdir, html_filename)
166166
js_harness = "sync_index.js" if use_sync else "async_index.js"
167167
harness_dir = os.path.join(js_prefix, 'harness')
168+
168169
with open(html_file, 'w+') as f:
169170
content = HTML_HEADER.replace('{PREFIX}', harness_dir) \
170-
.replace('{WPT_PREFIX}', harness_dir) \
171+
.replace('{WPT_PREFIX}', '/resources') \
171172
.replace('{JS_HARNESS}', js_harness)
172173
content += ' <script src="' + js_filename + '"></script>'
173174
content += HTML_BOTTOM

0 commit comments

Comments
 (0)