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

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

Issue 489753002: Added proper extension manifest parser for launcher_page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Blank line. Created 6 years, 4 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_launcher_page_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_launcher_page_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_launcher_page_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..be7ba7553dddde82d58e729e83a673b3ac1693d8
--- /dev/null
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_launcher_page_unittest.cc
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/command_line.h"
+#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
+#include "extensions/common/constants.h"
+#include "extensions/common/extension.h"
+#include "extensions/common/manifest_handlers/launcher_page_info.h"
+#include "extensions/common/switches.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace extensions {
+
+namespace {
+
+// The ID of test manifests requiring whitelisting.
+const char kWhitelistID[] = "lmadimbbgapmngbiclpjjngmdickadpl";
+
+} // namespace
+
+typedef ExtensionManifestTest LauncherPageManifestTest;
+
+TEST_F(LauncherPageManifestTest, ValidLauncherPage) {
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ extensions::switches::kWhitelistedExtensionID, kWhitelistID);
+ scoped_refptr<extensions::Extension> extension(
+ LoadAndExpectSuccess("init_valid_launcher_page.json"));
+ ASSERT_TRUE(extension.get());
+ extensions::LauncherPageInfo* info =
+ extensions::LauncherPageHandler::GetInfo(extension.get());
+ ASSERT_TRUE(info);
+ EXPECT_EQ("test.html", info->page);
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698