From d73e3757e9566524d5a3bf3db913122df81e9eaf Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Wed, 25 May 2016 18:35:00 -0400 Subject: [PATCH] Bug 1275160 - Web Manifest: Don't special case orientation. r=mconley --HG-- extra : rebase_source : 6b7fe33f599e76ff7e7723e072b3b0f5afb09ef6 --- dom/manifest/ManifestProcessor.jsm | 3 +-- dom/manifest/test/test_ManifestProcessor_orientation.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dom/manifest/ManifestProcessor.jsm b/dom/manifest/ManifestProcessor.jsm index ab733a43fa2d..c4f837009ade 100644 --- a/dom/manifest/ManifestProcessor.jsm +++ b/dom/manifest/ManifestProcessor.jsm @@ -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() { diff --git a/dom/manifest/test/test_ManifestProcessor_orientation.html b/dom/manifest/test/test_ManifestProcessor_orientation.html index ab0b025c1b84..67f19a9ff56e 100644 --- a/dom/manifest/test/test_ManifestProcessor_orientation.html +++ b/dom/manifest/test/test_ManifestProcessor_orientation.html @@ -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