Update web-platform-tests to revision 5e3ea8f49fee68c327388bfd1dd1375a8ce12a0e.

This commit is contained in:
Ms2ger 2015-07-09 14:05:01 +02:00
parent 12195a5c4a
commit bfb96b9448
1166 changed files with 35123 additions and 900 deletions

View file

@ -0,0 +1,38 @@
// The SanityChecker is used in debug mode to identify problems with the
// structure of the testsuite. In release mode it is mocked out to do nothing.
function SanityChecker() {}
SanityChecker.prototype.checkScenario = function(scenario, resourceInvoker) {
// Check if scenario is valid.
test(function() {
var expectedFields = SPEC_JSON["test_expansion_schema"];
for (var field in expectedFields) {
if (field == "expansion")
continue
assert_own_property(scenario, field,
"The scenario should contain field '" + field + "'.")
var expectedFieldList = expectedFields[field];
if (!expectedFieldList.hasOwnProperty('length')) {
var expectedFieldList = [];
for (var key in expectedFields[field]) {
expectedFieldList = expectedFieldList.concat(expectedFields[field][key])
}
}
assert_in_array(scenario[field], expectedFieldList,
"Scenario's " + field + " is one of: " +
expectedFieldList.join(", ")) + "."
}
// Check if the protocol is matched.
assert_equals(scenario["source_scheme"] + ":", location.protocol,
"Protocol of the test page should match the scenario.")
assert_own_property(resourceInvoker, scenario.subresource,
"Subresource should be supported");
}, "[MixedContentTestCase] The test scenario should be valid.");
}