OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/component_updater/flash_component_installer.h" | 5 #include "chrome/browser/component_updater/flash_component_installer.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/version.h" | 13 #include "base/version.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "content/public/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "ppapi/shared_impl/test_globals.h" | 17 #include "ppapi/shared_impl/test_globals.h" |
18 | 18 |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 | 22 |
| 23 namespace component_updater { |
| 24 |
23 namespace { | 25 namespace { |
24 // File name of the Pepper Flash plugin on different platforms. | 26 // File name of the Pepper Flash plugin on different platforms. |
25 const base::FilePath::CharType kDataPath[] = | 27 const base::FilePath::CharType kDataPath[] = |
26 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
27 FILE_PATH_LITERAL("components/flapper/mac"); | 29 FILE_PATH_LITERAL("components/flapper/mac"); |
28 #elif defined(OS_WIN) | 30 #elif defined(OS_WIN) |
29 FILE_PATH_LITERAL("components\\flapper\\windows"); | 31 FILE_PATH_LITERAL("components\\flapper\\windows"); |
30 #else // OS_LINUX, etc. | 32 #else // OS_LINUX, etc. |
31 #if defined(ARCH_CPU_X86) | 33 #if defined(ARCH_CPU_X86) |
32 FILE_PATH_LITERAL("components/flapper/linux"); | 34 FILE_PATH_LITERAL("components/flapper/linux"); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>( | 77 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>( |
76 serializer.Deserialize(NULL, &error))); | 78 serializer.Deserialize(NULL, &error))); |
77 ASSERT_TRUE(root); | 79 ASSERT_TRUE(root); |
78 ASSERT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY)); | 80 ASSERT_TRUE(root->IsType(base::Value::TYPE_DICTIONARY)); |
79 | 81 |
80 // This checks that the whole manifest is compatible. | 82 // This checks that the whole manifest is compatible. |
81 Version version; | 83 Version version; |
82 EXPECT_TRUE(CheckPepperFlashManifest(*root, &version)); | 84 EXPECT_TRUE(CheckPepperFlashManifest(*root, &version)); |
83 EXPECT_TRUE(version.IsValid()); | 85 EXPECT_TRUE(version.IsValid()); |
84 } | 86 } |
| 87 |
| 88 } // namespace component_updater |
| 89 |
OLD | NEW |