Bug 1275160 - Web Manifest: Don't special case orientation. r=mconley

--HG--
extra : rebase_source : 6b7fe33f599e76ff7e7723e072b3b0f5afb09ef6
This commit is contained in:
Marcos Caceres 2016-05-25 18:35:00 -04:00
parent 72e617b1ca
commit d73e3757e9
2 changed files with 3 additions and 4 deletions

View File

@ -149,8 +149,7 @@ this.ManifestProcessor = { // jshint ignore:line
if (value && typeof value === "string" && this.orientationTypes.has(value.toLowerCase())) {
return value.toLowerCase();
}
// The spec special-cases orientation to return the empty string.
return '';
return undefined;
}
function processDisplayMember() {

View File

@ -22,7 +22,7 @@ typeTests.forEach((type) => {
orientation: type
});
var result = processor.process(data);
is(result.orientation, '', expected);
is(result.orientation, undefined, expected);
});
var validOrientations = [
@ -69,7 +69,7 @@ invalidOrientations.forEach((orientation) => {
var expected = `Expect orientation to be empty string: ${orientation}.`;
data.jsonText = JSON.stringify({ orientation });
var result = processor.process(data);
is(result.orientation, "", expected);
is(result.orientation, undefined, expected);
});
//Trim tests