Chromium Code Reviews| 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..33a7a84b4d395e89ec9aa93afd61fca62e8501c4 |
| --- /dev/null |
| +++ b/chrome/common/extensions/manifest_tests/extension_manifests_launcher_page_unittest.cc |
| @@ -0,0 +1,38 @@ |
| +// 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 "base/memory/linked_ptr.h" |
|
calamity
2014/08/21 02:53:08
I think you can remove this.
Matt Giuca
2014/08/22 02:48:40
Done.
|
| +#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" |
| +#include "extensions/common/constants.h" |
| +#include "extensions/common/extension.h" |
| +#include "extensions/common/manifest_constants.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 |
| + |
| +class LauncherPageManifestTest : public ExtensionManifestTest {}; |
|
calamity
2014/08/21 02:53:08
I've seen typedef around more often. Any reason no
Matt Giuca
2014/08/22 02:48:40
Done.
|
| + |
| +TEST_F(LauncherPageManifestTest, ValidLauncherPage) { |
| + CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| + extensions::switches::kWhitelistedExtensionID, kWhitelistID); |
| + scoped_refptr<extensions::Extension> extension( |
| + LoadAndExpectSuccess("init_valid_launcher_page.json")); |
| + extensions::LauncherPageInfo* info = |
| + static_cast<extensions::LauncherPageInfo*>( |
| + extension->GetManifestData(extensions::manifest_keys::kLauncherPage)); |
| + ASSERT_TRUE(info); |
| + EXPECT_EQ("test.html", info->page); |
| +} |
| + |
| +} // namespace extensions |