Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5556)

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 1730013: fullscreen window app launch container (Closed)
Patch Set: added tests Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index e5c0777bf000e92d3eda6cb1ca32f235310f102c..66f899153f68a7e456d08cf6acd7e30498f551d0 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -61,7 +61,8 @@ class ManifestTest : public testing::Test {
EXPECT_FALSE(extension.get()) <<
"Expected failure loading extension '" << name <<
"', but didn't get one.";
- EXPECT_TRUE(MatchPatternASCII(error, expected_error));
+ EXPECT_TRUE(MatchPatternASCII(error, expected_error)) << name <<
+ " expected '" << expected_error << "' but got '" << error << "'";
}
bool enable_apps_;
@@ -81,6 +82,7 @@ TEST_F(ManifestTest, ValidApp) {
EXPECT_EQ("mail/", extension->web_extent().paths()[0]);
EXPECT_EQ("foobar/", extension->web_extent().paths()[1]);
EXPECT_EQ(Extension::LAUNCH_WINDOW, extension->launch_container());
+ EXPECT_EQ(false, extension->launch_fullscreen());
EXPECT_EQ("mail/", extension->launch_web_url());
}
@@ -130,12 +132,17 @@ TEST_F(ManifestTest, AppLaunchContainer) {
extension.reset(LoadAndExpectSuccess("launch_default.json"));
EXPECT_EQ(Extension::LAUNCH_TAB, extension->launch_container());
+ extension.reset(LoadAndExpectSuccess("launch_fullscreen.json"));
+ EXPECT_EQ(true, extension->launch_fullscreen());
+
LoadAndExpectError("launch_container_invalid_type.json",
errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_invalid_value.json",
errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_without_launch_url.json",
errors::kLaunchContainerWithoutURL);
+ LoadAndExpectError("launch_fullscreen_invalid.json",
+ errors::kInvalidLaunchFullscreen);
}
TEST_F(ManifestTest, AppLaunchURL) {
« no previous file with comments | « chrome/common/extensions/extension_constants.cc ('k') | chrome/test/data/extensions/manifest_tests/launch_fullscreen.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698