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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc

Issue 12316077: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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/manifest_tests/extension_manifests_validapp_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
index 75aa59f86ae1c61817163b0ca0a786980e953077..c334a48296279d9f6fd3c755773b4605024f474a 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
@@ -2,24 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
-
#include "base/values.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/common/extensions/app_launcher_info.h"
+#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST_F(ExtensionManifestTest, ValidApp) {
+class ValidAppManifestTest : public ExtensionManifestTest {
+ protected:
+ virtual void SetUp() OVERRIDE {
+ ExtensionManifestTest::SetUp();
+ (new extensions::AppLaunchManifestHandler)->Register();
+ }
+};
+
+TEST_F(ValidAppManifestTest, ValidApp) {
scoped_refptr<extensions::Extension> extension(
LoadAndExpectSuccess("valid_app.json"));
extensions::URLPatternSet expected_patterns;
AddPattern(&expected_patterns, "http://www.google.com/mail/*");
AddPattern(&expected_patterns, "http://www.google.com/foobar/*");
EXPECT_EQ(expected_patterns, extension->web_extent());
- EXPECT_EQ(extension_misc::LAUNCH_TAB, extension->launch_container());
- EXPECT_EQ("http://www.google.com/mail/", extension->launch_web_url());
+ EXPECT_EQ(extension_misc::LAUNCH_TAB,
+ extensions::AppLauncherInfo::GetLaunchContainer(extension));
+ EXPECT_EQ("http://www.google.com/mail/",
+ extensions::AppLauncherInfo::GetLaunchWebURL(extension));
}
-TEST_F(ExtensionManifestTest, AllowUnrecognizedPermissions) {
+TEST_F(ValidAppManifestTest, AllowUnrecognizedPermissions) {
std::string error;
scoped_ptr<DictionaryValue> manifest(LoadManifest("valid_app.json", &error));
ListValue* permissions = NULL;

Powered by Google App Engine
This is Rietveld 408576698