| Index: content/renderer/manifest/manifest_parser_unittest.cc
|
| diff --git a/content/renderer/manifest/manifest_parser_unittest.cc b/content/renderer/manifest/manifest_parser_unittest.cc
|
| index 9a8569d14b243805339a68291c412ee07f76546b..47ae44d145415d3aa467b5b3b7f72a3f4504f6ac 100644
|
| --- a/content/renderer/manifest/manifest_parser_unittest.cc
|
| +++ b/content/renderer/manifest/manifest_parser_unittest.cc
|
| @@ -631,84 +631,6 @@ TEST_F(ManifestParserTest, IconTypeParseRules) {
|
| }
|
| }
|
|
|
| -TEST_F(ManifestParserTest, IconDensityParseRules) {
|
| - // Smoke test.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": 42 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, 42);
|
| - EXPECT_EQ(0u, GetErrorCount());
|
| - }
|
| -
|
| - // Decimal value.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": 2.5 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, 2.5);
|
| - EXPECT_EQ(0u, GetErrorCount());
|
| - }
|
| -
|
| - // Parse fail if it isn't a float.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": {} } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, Manifest::Icon::kDefaultDensity);
|
| - EXPECT_EQ(1u, GetErrorCount());
|
| - EXPECT_EQ("Manifest parsing error: icon 'density' ignored, "
|
| - "must be float greater than 0.",
|
| - errors()[0]);
|
| - }
|
| -
|
| - // Parse fail if it isn't a float.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\":\"2\" } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, Manifest::Icon::kDefaultDensity);
|
| - EXPECT_EQ(1u, GetErrorCount());
|
| - EXPECT_EQ("Manifest parsing error: icon 'density' ignored, "
|
| - "must be float greater than 0.",
|
| - errors()[0]);
|
| - }
|
| -
|
| - // Edge case: 1.0.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": 1.00 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, 1);
|
| - EXPECT_EQ(0u, GetErrorCount());
|
| - }
|
| -
|
| - // Edge case: values between 0.0 and 1.0 are allowed.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": 0.42 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, 0.42);
|
| - EXPECT_EQ(0u, GetErrorCount());
|
| - }
|
| -
|
| - // 0 is an invalid value.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": 0.0 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, Manifest::Icon::kDefaultDensity);
|
| - EXPECT_EQ(1u, GetErrorCount());
|
| - EXPECT_EQ("Manifest parsing error: icon 'density' ignored, "
|
| - "must be float greater than 0.",
|
| - errors()[0]);
|
| - }
|
| -
|
| - // Negative values are invalid.
|
| - {
|
| - Manifest manifest =
|
| - ParseManifest("{ \"icons\": [ {\"src\": \"\", \"density\": -2.5 } ] }");
|
| - EXPECT_EQ(manifest.icons[0].density, Manifest::Icon::kDefaultDensity);
|
| - EXPECT_EQ(1u, GetErrorCount());
|
| - EXPECT_EQ("Manifest parsing error: icon 'density' ignored, "
|
| - "must be float greater than 0.",
|
| - errors()[0]);
|
| - }
|
| -}
|
| -
|
| TEST_F(ManifestParserTest, IconSizesParseRules) {
|
| // Smoke test.
|
| {
|
|
|