Update web-platform-tests to revision a89693b62066da0e4808c0bc76c581188398e73d

This commit is contained in:
WPT Sync Bot 2018-05-24 21:43:23 -04:00
parent 1e79f27cd4
commit 7ddb44a302
102 changed files with 1119 additions and 421 deletions

View file

@ -2403,15 +2403,11 @@ policies and contribution forms [3].
log.removeChild(log.lastChild);
}
var harness_url = get_harness_url();
if (harness_url !== undefined) {
var stylesheet = output_document.createElementNS(xhtml_ns, "link");
stylesheet.setAttribute("rel", "stylesheet");
stylesheet.setAttribute("href", harness_url + "testharness.css");
var heads = output_document.getElementsByTagName("head");
if (heads.length) {
heads[0].appendChild(stylesheet);
}
var stylesheet = output_document.createElementNS(xhtml_ns, "style");
stylesheet.textContent = stylesheetContent;
var heads = output_document.getElementsByTagName("head");
if (heads.length) {
heads[0].appendChild(stylesheet);
}
var status_text_harness = {};
@ -2921,16 +2917,6 @@ policies and contribution forms [3].
return undefined;
}
/** Returns the URL path at which the files for testharness.js are assumed to reside (e.g., '/resources/').
The path is derived from inspecting the 'src' of the <script> tag that included 'testharness.js'. */
function get_harness_url()
{
var script_url = get_script_url();
// Exclude the 'testharness.js' file from the returned path, but '+ 1' to include the trailing slash.
return script_url ? script_url.slice(0, script_url.lastIndexOf('/') + 1) : undefined;
}
function supports_post_message(w)
{
var supports;
@ -3009,5 +2995,113 @@ policies and contribution forms [3].
test_environment.on_tests_ready();
/**
* Stylesheet
*/
var stylesheetContent = `
html {
font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
}
#log .warning,
#log .warning a {
color: black;
background: yellow;
}
#log .error,
#log .error a {
color: white;
background: red;
}
section#summary {
margin-bottom:1em;
}
table#results {
border-collapse:collapse;
table-layout:fixed;
width:100%;
}
table#results th:first-child,
table#results td:first-child {
width:4em;
}
table#results th:last-child,
table#results td:last-child {
width:50%;
}
table#results.assertions th:last-child,
table#results.assertions td:last-child {
width:35%;
}
table#results th {
padding:0;
padding-bottom:0.5em;
border-bottom:medium solid black;
}
table#results td {
padding:1em;
padding-bottom:0.5em;
border-bottom:thin solid black;
}
tr.pass > td:first-child {
color:green;
}
tr.fail > td:first-child {
color:red;
}
tr.timeout > td:first-child {
color:red;
}
tr.notrun > td:first-child {
color:blue;
}
.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {
font-variant:small-caps;
}
table#results span {
display:block;
}
table#results span.expected {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
table#results span.actual {
font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
white-space:pre;
}
span.ok {
color:green;
}
tr.error {
color:red;
}
span.timeout {
color:red;
}
span.ok, span.timeout, span.error {
font-variant:small-caps;
}
`;
})(this);
// vim: set expandtab shiftwidth=4 tabstop=4: