| 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;
|
|
|