OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "chrome/browser/extensions/startup_helper.h" | 11 #include "chrome/browser/extensions/startup_helper.h" |
12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 // Tests the environment for packing extensions from the command line | 19 // Tests the environment for packing extensions from the command line |
20 // via the --pack-extension switch. | 20 // when using the --pack-extension switch. |
21 class PackExtensionTest : public testing::Test { | 21 class PackExtensionTest : public testing::Test { |
22 public: | 22 public: |
23 PackExtensionTest() | 23 PackExtensionTest() |
24 : ui_thread_(content::BrowserThread::UI, &message_loop_), | 24 : ui_thread_(content::BrowserThread::UI, &message_loop_), |
25 file_thread_(content::BrowserThread::FILE, &message_loop_) { | 25 file_thread_(content::BrowserThread::FILE, &message_loop_) { |
26 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 26 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
27 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 27 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
28 } | 28 } |
29 | 29 |
30 protected: | 30 protected: |
(...skipping 24 matching lines...) Expand all Loading... |
55 TEST_F(PackExtensionTest, PackagedApp) { | 55 TEST_F(PackExtensionTest, PackagedApp) { |
56 ASSERT_TRUE(TestPackExtension(test_data_dir_.AppendASCII("packaged_app"))); | 56 ASSERT_TRUE(TestPackExtension(test_data_dir_.AppendASCII("packaged_app"))); |
57 } | 57 } |
58 | 58 |
59 TEST_F(PackExtensionTest, PlatformApp) { | 59 TEST_F(PackExtensionTest, PlatformApp) { |
60 ASSERT_TRUE(TestPackExtension(test_data_dir_.AppendASCII("platform_apps") | 60 ASSERT_TRUE(TestPackExtension(test_data_dir_.AppendASCII("platform_apps") |
61 .AppendASCII("minimal"))); | 61 .AppendASCII("minimal"))); |
62 } | 62 } |
63 | 63 |
64 } // namespace extensions | 64 } // namespace extensions |
OLD | NEW |