mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7
This commit is contained in:
parent
581c8ba1c8
commit
79b1e6c40c
1728 changed files with 20243 additions and 5349 deletions
|
@ -48,11 +48,39 @@ Manifest.prototype = {
|
|||
},
|
||||
|
||||
by_type:function(type) {
|
||||
var ret = [] ;
|
||||
if (this.data.items.hasOwnProperty(type)) {
|
||||
return this.data.items[type];
|
||||
} else {
|
||||
return [];
|
||||
ret = this.data.items[type].slice(0) ;
|
||||
}
|
||||
// local_changes.items in manifest is an Object just as
|
||||
// items is. However, the properties of local_changes.items
|
||||
// are Objects and the properties of items are Arrays.
|
||||
// So we need to extract any relevant local changes by iterating
|
||||
// over the Object and pulling out the referenced nodes as array items.
|
||||
if (this.data.hasOwnProperty("local_changes")) {
|
||||
var local = this.data.local_changes ;
|
||||
// add in any local items
|
||||
if (local.items.hasOwnProperty(type)) {
|
||||
Object.keys(local.items[type]).forEach(function(ref) {
|
||||
ret.push(local.items[type][ref][0]) ;
|
||||
}.bind(this));
|
||||
}
|
||||
// remove any items that are locally deleted but not yet committed
|
||||
// note that the deleted and deleted_reftests properties of the local_changes
|
||||
// object are always present, even if they are empty
|
||||
if (ret.length && local.deleted.length) {
|
||||
// make a hash of the deleted to speed searching
|
||||
var dels = {} ;
|
||||
local.deleted.forEach(function(x) { dels[x] = true; } );
|
||||
for (var j = ret.length-1; j >= 0; j--) {
|
||||
if ( dels[ret[j].path] || (type === "reftest" && local.deleted_reftests[ret[j].path]) ){
|
||||
// we have a match
|
||||
ret.splice(j, 1) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret ;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -69,7 +97,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 +144,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 +377,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 +441,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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue