servo/tests/wpt/webgl/tools/unit.patch
Samson 5853c00628
Remove message from WebGL subtest name and remove stale expectations (#35791)
* Remove message from WebGL subtest name

This causes stale expectations: https://github.com/servo/servo/issues/35750

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-03-12 09:08:39 +00:00

38 lines
1 KiB
Diff
Vendored

--- a/conformance/conformance/more/unit.js
+++ b/conformance/conformance/more/unit.js
@@ -53,6 +53,10 @@ if (window.internals) {
window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
}
+if (window.async_test) {
+ var __overall_test = async_test('Overall test');
+}
+
/* -- end platform specific code --*/
Tests = {
autorun : true,
@@ -892,9 +892,14 @@ GLConstants = [
0x809D
];
+var WPT_TEST_ID = 0;
function reportTestResultsToHarness(success, msg) {
if (window.parent.webglTestHarness) {
window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg);
+ } else if (window.test) { // WPT test harness
+ test(function () {
+ assert_true(success, msg);
+ }, "WebGL test #" + (WPT_TEST_ID++));
}
}
@@ -907,6 +911,9 @@ function notifyFinishedToHarness() {
if (window.parent.webglTestHarness) {
window.parent.webglTestHarness.notifyFinished(window.location.pathname);
}
+ if (window.__overall_test) {
+ window.__overall_test.done();
+ }
}
function initTests() {