mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
This commit is contained in:
parent
fb4f421c8b
commit
296fa2512b
21852 changed files with 2080936 additions and 892894 deletions
|
@ -74,6 +74,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">Count of matching tests</label>
|
||||
<div class="col-sm-9" id="testcount">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<button type="submit" class="btn btn-success toggleStart" disabled>Start</button>
|
||||
|
@ -183,6 +189,7 @@
|
|||
<p>
|
||||
<button class="btn btn-info test">Show Test</button>
|
||||
<button class="btn btn-info ref">Show Reference</button>
|
||||
<span class="reftestWarn"></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
@ -88,10 +90,10 @@ class HTML(object):
|
|||
e.g.
|
||||
|
||||
h = HTML()
|
||||
print h.html(
|
||||
print(h.html(
|
||||
html.head(),
|
||||
html.body([html.h1("Hello World!")], class_="body-class")
|
||||
)
|
||||
))
|
||||
Would give
|
||||
<!DOCTYPE html><html><head></head><body class="body-class"><h1>Hello World!</h1></body></html>"""
|
||||
def __getattr__(self, name):
|
||||
|
@ -272,28 +274,23 @@ def result_bodies(UAs, results_by_test):
|
|||
|
||||
def generate_html(UAs, results_by_test):
|
||||
"""Generate all the HTML output"""
|
||||
doc = h(h.html([
|
||||
h.head(h.meta(charset="utf8"),
|
||||
h.title("Implementation Report"),
|
||||
h.link(href="report.css", rel="stylesheet")),
|
||||
h.body(h.h1("Implementation Report"),
|
||||
h.h2("Summary"),
|
||||
summary(UAs, results_by_test),
|
||||
h.h2("Full Results"),
|
||||
h.table(
|
||||
h.thead(
|
||||
h.tr(
|
||||
h.th("Test"),
|
||||
h.th("Subtest"),
|
||||
[h.th(UA) for UA in sorted(UAs)]
|
||||
)
|
||||
),
|
||||
result_bodies(UAs, results_by_test)
|
||||
)
|
||||
)
|
||||
]))
|
||||
|
||||
return doc
|
||||
return h(h.html(
|
||||
h.head(
|
||||
h.meta(charset="utf8"),
|
||||
h.title("Implementation Report"),
|
||||
h.link(href="report.css", rel="stylesheet")),
|
||||
h.body(
|
||||
h.h1("Implementation Report"),
|
||||
h.h2("Summary"),
|
||||
summary(UAs, results_by_test),
|
||||
h.h2("Full Results"),
|
||||
h.table(
|
||||
h.thead(
|
||||
h.tr(
|
||||
h.th("Test"),
|
||||
h.th("Subtest"),
|
||||
[h.th(UA) for UA in sorted(UAs)])),
|
||||
result_bodies(UAs, results_by_test)))))
|
||||
|
||||
|
||||
def main(filenames):
|
||||
|
@ -304,7 +301,7 @@ def main(filenames):
|
|||
|
||||
if __name__ == "__main__":
|
||||
if not sys.argv[1:]:
|
||||
print """Please supply a list of UA name, filename pairs e.g.
|
||||
print("""Please supply a list of UA name, filename pairs e.g.
|
||||
|
||||
python report.py Firefox firefox.json Chrome chrome.json IE internet_explorer.json"""
|
||||
print main(sys.argv[1:])
|
||||
python report.py Firefox firefox.json Chrome chrome.json IE internet_explorer.json""")
|
||||
print(main(sys.argv[1:]))
|
||||
|
|
|
@ -90,7 +90,8 @@ html.done section + section {
|
|||
|
||||
#manualUI {
|
||||
position: fixed;
|
||||
top: 100px;
|
||||
z-index: 2000;
|
||||
top: -20px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: block;
|
||||
|
@ -121,6 +122,10 @@ body {
|
|||
max-width: 800px;
|
||||
}
|
||||
|
||||
.navbar-brand > img {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #fff;
|
||||
}
|
||||
|
@ -195,3 +200,9 @@ td.ERROR {
|
|||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
.reftestWarn {
|
||||
color: yellow;
|
||||
background: black;
|
||||
padding: 8px;
|
||||
}
|
||||
|
|
|
@ -48,11 +48,22 @@ Manifest.prototype = {
|
|||
},
|
||||
|
||||
by_type:function(type) {
|
||||
var ret = [] ;
|
||||
if (this.data.items.hasOwnProperty(type)) {
|
||||
return this.data.items[type];
|
||||
} else {
|
||||
return [];
|
||||
for (var propertyName in this.data.items[type]) {
|
||||
var arr = this.data.items[type][propertyName][0];
|
||||
var item = arr[arr.length - 1];
|
||||
item.path = propertyName;
|
||||
if ('string' === typeof arr[0]) {
|
||||
item.url = arr[0];
|
||||
}
|
||||
if (Array.isArray(arr[1])) {
|
||||
item.references = arr[1];
|
||||
}
|
||||
ret.push(item);
|
||||
}
|
||||
}
|
||||
return ret ;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -69,7 +80,7 @@ function ManifestIterator(manifest, path, test_types, use_regex) {
|
|||
this.regex_pattern = path;
|
||||
} else {
|
||||
// Split paths by either a comma or whitespace, and ignore empty sub-strings.
|
||||
this.paths = path.split(/[,\s]+/).filter(function(s) { return s.length > 0 });
|
||||
this.paths = path.split(/[,\s]+/).filter(function(s) { return s.length > 0; });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,9 +127,10 @@ ManifestIterator.prototype = {
|
|||
type: this.test_types[this.test_types_index],
|
||||
url: manifest_item.url
|
||||
};
|
||||
if (manifest_item.hasOwnProperty("ref_url")) {
|
||||
test.ref_type = manifest_item.ref_type;
|
||||
test.ref_url = manifest_item.ref_url;
|
||||
if (manifest_item.hasOwnProperty("references")) {
|
||||
test.ref_length = manifest_item.references.length;
|
||||
test.ref_type = manifest_item.references[0][1];
|
||||
test.ref_url = manifest_item.references[0][0];
|
||||
}
|
||||
return test;
|
||||
},
|
||||
|
@ -348,6 +360,7 @@ function ManualUI(elem, runner) {
|
|||
this.fail_button = this.elem.querySelector("button.fail");
|
||||
this.ref_buttons = this.elem.querySelector(".reftestUI");
|
||||
this.ref_type = this.ref_buttons.querySelector(".refType");
|
||||
this.ref_warning = this.elem.querySelector(".reftestWarn");
|
||||
this.test_button = this.ref_buttons.querySelector("button.test");
|
||||
this.ref_button = this.ref_buttons.querySelector("button.ref");
|
||||
|
||||
|
@ -411,6 +424,13 @@ ManualUI.prototype = {
|
|||
if (test.type == "reftest") {
|
||||
this.show_ref();
|
||||
this.ref_type.textContent = test.ref_type === "==" ? "equal" : "unequal";
|
||||
if (test.ref_length > 1) {
|
||||
this.ref_warning.textContent = "WARNING: only presenting first of " + test.ref_length + " references";
|
||||
this.ref_warning.style.display = "inline";
|
||||
} else {
|
||||
this.ref_warning.textContent = "";
|
||||
this.ref_warning.style.display = "none";
|
||||
}
|
||||
} else {
|
||||
this.hide_ref();
|
||||
}
|
||||
|
@ -424,22 +444,35 @@ ManualUI.prototype = {
|
|||
function TestControl(elem, runner) {
|
||||
this.elem = elem;
|
||||
this.path_input = this.elem.querySelector(".path");
|
||||
this.path_input.addEventListener("change", function() {
|
||||
this.set_counts();
|
||||
}.bind(this), false);
|
||||
this.use_regex_input = this.elem.querySelector("#use_regex");
|
||||
this.use_regex_input.addEventListener("change", function() {
|
||||
this.set_counts();
|
||||
}.bind(this), false);
|
||||
this.pause_button = this.elem.querySelector("button.togglePause");
|
||||
this.start_button = this.elem.querySelector("button.toggleStart");
|
||||
this.type_checkboxes = Array.prototype.slice.call(
|
||||
this.elem.querySelectorAll("input[type=checkbox].test-type"));
|
||||
this.type_checkboxes.forEach(function(elem) {
|
||||
elem.addEventListener("change", function() {
|
||||
this.set_counts();
|
||||
}.bind(this),
|
||||
false);
|
||||
elem.addEventListener("click", function() {
|
||||
this.start_button.disabled = this.get_test_types().length < 1;
|
||||
}.bind(this),
|
||||
false);
|
||||
}.bind(this));
|
||||
|
||||
this.timeout_input = this.elem.querySelector(".timeout_multiplier");
|
||||
this.render_checkbox = this.elem.querySelector(".render");
|
||||
this.testcount_area = this.elem.querySelector("#testcount");
|
||||
this.runner = runner;
|
||||
this.runner.done_callbacks.push(this.on_done.bind(this));
|
||||
this.set_start();
|
||||
this.set_counts();
|
||||
}
|
||||
|
||||
TestControl.prototype = {
|
||||
|
@ -493,6 +526,21 @@ TestControl.prototype = {
|
|||
|
||||
},
|
||||
|
||||
set_counts: function() {
|
||||
if (this.runner.manifest_loading) {
|
||||
setTimeout(function() {
|
||||
this.set_counts();
|
||||
}.bind(this), 1000);
|
||||
return;
|
||||
}
|
||||
var path = this.get_path();
|
||||
var test_types = this.get_test_types();
|
||||
var use_regex = this.get_use_regex();
|
||||
var iterator = new ManifestIterator(this.runner.manifest, path, test_types, use_regex);
|
||||
var count = iterator.count();
|
||||
this.testcount_area.textContent = count;
|
||||
},
|
||||
|
||||
get_path: function() {
|
||||
return this.path_input.value;
|
||||
},
|
||||
|
@ -585,6 +633,7 @@ function Runner(manifest_path) {
|
|||
this.results = new Results(this);
|
||||
|
||||
this.start_after_manifest_load = false;
|
||||
this.manifest_loading = true;
|
||||
this.manifest.load(this.manifest_loaded.bind(this));
|
||||
}
|
||||
|
||||
|
@ -600,6 +649,7 @@ Runner.prototype = {
|
|||
},
|
||||
|
||||
manifest_loaded: function() {
|
||||
this.manifest_loading = false;
|
||||
if (this.start_after_manifest_load) {
|
||||
this.do_start();
|
||||
}
|
||||
|
|
|
@ -8,12 +8,21 @@ localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os
|
|||
|
||||
root = localpaths.repo_root
|
||||
|
||||
import manifest
|
||||
from manifest import manifest, update
|
||||
|
||||
def main(request, response):
|
||||
path = os.path.join(root, "MANIFEST.json")
|
||||
manifest_file = manifest.manifest.load(root, path)
|
||||
manifest.update.update(root, "/", manifest_file)
|
||||
manifest.manifest.write(manifest_file, path)
|
||||
|
||||
manifest_file = None
|
||||
try:
|
||||
manifest_file = manifest.load(root, path)
|
||||
except manifest.ManifestVersionMismatch:
|
||||
pass
|
||||
if manifest_file is None:
|
||||
manifest_file = manifest.Manifest("/")
|
||||
|
||||
update.update(root, manifest_file)
|
||||
|
||||
manifest.write(manifest_file, path)
|
||||
|
||||
return [("Content-Type", "application/json")], json.dumps({"url": "/MANIFEST.json"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue