OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/command_line.h" | |
6 #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.
| |
7 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" | |
8 #include "extensions/common/constants.h" | |
9 #include "extensions/common/extension.h" | |
10 #include "extensions/common/manifest_constants.h" | |
11 #include "extensions/common/manifest_handlers/launcher_page_info.h" | |
12 #include "extensions/common/switches.h" | |
13 #include "testing/gtest/include/gtest/gtest.h" | |
14 | |
15 namespace extensions { | |
16 | |
17 namespace { | |
18 | |
19 // The ID of test manifests requiring whitelisting. | |
20 const char kWhitelistID[] = "lmadimbbgapmngbiclpjjngmdickadpl"; | |
21 | |
22 } // namespace | |
23 | |
24 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.
| |
25 | |
26 TEST_F(LauncherPageManifestTest, ValidLauncherPage) { | |
27 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | |
28 extensions::switches::kWhitelistedExtensionID, kWhitelistID); | |
29 scoped_refptr<extensions::Extension> extension( | |
30 LoadAndExpectSuccess("init_valid_launcher_page.json")); | |
31 extensions::LauncherPageInfo* info = | |
32 static_cast<extensions::LauncherPageInfo*>( | |
33 extension->GetManifestData(extensions::manifest_keys::kLauncherPage)); | |
34 ASSERT_TRUE(info); | |
35 EXPECT_EQ("test.html", info->page); | |
36 } | |
37 | |
38 } // namespace extensions | |
OLD | NEW |