wpt: disable unhandled features from testharness framework

This commit is contained in:
Pierre Tachoire
2023-10-10 16:23:32 +02:00
parent a42d054fe7
commit 5240870596

View File

@@ -180,9 +180,9 @@
this_obj.output_handler.show_status(); this_obj.output_handler.show_status();
}); });
add_completion_callback(function (tests, harness_status, asserts_run) { // add_completion_callback(function (tests, harness_status, asserts_run) {
this_obj.output_handler.show_results(tests, harness_status, asserts_run); // this_obj.output_handler.show_results(tests, harness_status, asserts_run);
}); // });
this.setup_messages(settings.message_events); this.setup_messages(settings.message_events);
}; };
@@ -218,15 +218,15 @@
}; };
WindowTestEnvironment.prototype.test_timeout = function() { WindowTestEnvironment.prototype.test_timeout = function() {
var metas = document.getElementsByTagName("meta"); // var metas = document.getElementsByTagName("meta");
for (var i = 0; i < metas.length; i++) { // for (var i = 0; i < metas.length; i++) {
if (metas[i].name == "timeout") { // if (metas[i].name == "timeout") {
if (metas[i].content == "long") { // if (metas[i].content == "long") {
return settings.harness_timeout.long; // return settings.harness_timeout.long;
} // }
break; // break;
} // }
} // }
return settings.harness_timeout.normal; return settings.harness_timeout.normal;
}; };
@@ -4096,7 +4096,7 @@
if (!this.enabled || this.phase === this.COMPLETE) { if (!this.enabled || this.phase === this.COMPLETE) {
return; return;
} }
this.resolve_log(); //this.resolve_log();
if (this.phase < this.HAVE_RESULTS) { if (this.phase < this.HAVE_RESULTS) {
this.phase = this.HAVE_RESULTS; this.phase = this.HAVE_RESULTS;
} }
@@ -4120,7 +4120,7 @@
return; return;
} }
if (!this.output_node) { if (!this.output_node) {
this.resolve_log(); //this.resolve_log();
} }
this.phase = this.COMPLETE; this.phase = this.COMPLETE;
@@ -4136,10 +4136,10 @@
var stylesheet = output_document.createElementNS(xhtml_ns, "style"); var stylesheet = output_document.createElementNS(xhtml_ns, "style");
stylesheet.textContent = stylesheetContent; stylesheet.textContent = stylesheetContent;
var heads = output_document.getElementsByTagName("head"); // var heads = output_document.getElementsByTagName("head");
if (heads.length) { // if (heads.length) {
heads[0].appendChild(stylesheet); // heads[0].appendChild(stylesheet);
} // }
var status_number = {}; var status_number = {};
forEach(tests, forEach(tests,
@@ -4735,21 +4735,21 @@
return undefined; return undefined;
} }
var scripts = document.getElementsByTagName("script"); //var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) { //for (var i = 0; i < scripts.length; i++) {
var src; // var src;
if (scripts[i].src) { // if (scripts[i].src) {
src = scripts[i].src; // src = scripts[i].src;
} else if (scripts[i].href) { // } else if (scripts[i].href) {
//SVG case // //SVG case
src = scripts[i].href.baseVal; // src = scripts[i].href.baseVal;
} // }
var matches = src && src.match(/^(.*\/|)testharness\.js$/); // var matches = src && src.match(/^(.*\/|)testharness\.js$/);
if (matches) { // if (matches) {
return src; // return src;
} // }
} //}
return undefined; return undefined;
} }
@@ -4757,11 +4757,11 @@
function get_title() function get_title()
{ {
if ('document' in global_scope) { if ('document' in global_scope) {
//Don't use document.title to work around an Opera/Presto bug in XHTML documents ////Don't use document.title to work around an Opera/Presto bug in XHTML documents
var title = document.getElementsByTagName("title")[0]; //var title = document.getElementsByTagName("title")[0];
if (title && title.firstChild && title.firstChild.data) { //if (title && title.firstChild && title.firstChild.data) {
return title.firstChild.data; // return title.firstChild.data;
} //}
} }
if ('META_TITLE' in global_scope && META_TITLE) { if ('META_TITLE' in global_scope && META_TITLE) {
return META_TITLE; return META_TITLE;