mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 912918 - Part 3: Keep validating after errors when possible. r=paul
--HG-- extra : rebase_source : c4241212495876f6539a82f9ce8b5df52463f960
This commit is contained in:
parent
addc9c2cfe
commit
dd38817660
@ -112,7 +112,6 @@ AppValidator.prototype._getManifest = function () {
|
||||
AppValidator.prototype.validateManifest = function (manifest) {
|
||||
if (!manifest.name) {
|
||||
this.error(strings.GetStringFromName("validator.missNameManifestProperty"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!manifest.icons || Object.keys(manifest.icons).length === 0) {
|
||||
|
@ -141,8 +141,34 @@
|
||||
next();
|
||||
});
|
||||
},
|
||||
|
||||
// Test multiple failures (missing name [error] and icon [warning])
|
||||
function () {
|
||||
let validator = createHosted("no-name-or-icon");
|
||||
validator.validate().then(() => {
|
||||
checkNoNameOrIcon(validator);
|
||||
});
|
||||
},
|
||||
function () {
|
||||
let validator = createPackaged("no-name-or-icon");
|
||||
validator.validate().then(() => {
|
||||
checkNoNameOrIcon(validator);
|
||||
});
|
||||
}
|
||||
];
|
||||
|
||||
function checkNoNameOrIcon(validator) {
|
||||
is(validator.errors.length, 1, "app with no name has an error");
|
||||
is(validator.errors[0],
|
||||
strings.GetStringFromName("validator.missNameManifestProperty"),
|
||||
"with expected message");
|
||||
is(validator.warnings.length, 1, "app with no icon has a warning");
|
||||
is(validator.warnings[0],
|
||||
strings.GetStringFromName("validator.missIconsManifestProperty"),
|
||||
"with expected message");
|
||||
next();
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"launch_path": "/home.html"
|
||||
}
|
Loading…
Reference in New Issue
Block a user