OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_value_serializer.h" | 9 #include "base/json/json_value_serializer.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/version.h" | 12 #include "base/version.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "content/test/test_browser_thread.h" | 15 #include "content/test/test_browser_thread.h" |
16 | 16 |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
19 namespace { | 21 namespace { |
20 // File name of the Pepper Flash plugin on different platforms. | 22 // File name of the Pepper Flash plugin on different platforms. |
21 const FilePath::CharType kDataPath[] = | 23 const FilePath::CharType kDataPath[] = |
22 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
23 FILE_PATH_LITERAL("components/flapper/mac"); | 25 FILE_PATH_LITERAL("components/flapper/mac"); |
24 #elif defined(OS_WIN) | 26 #elif defined(OS_WIN) |
25 FILE_PATH_LITERAL("components\\flapper\\windows"); | 27 FILE_PATH_LITERAL("components\\flapper\\windows"); |
26 #else // OS_LINUX, etc. | 28 #else // OS_LINUX, etc. |
27 #if defined(ARCH_CPU_X86) | 29 #if defined(ARCH_CPU_X86) |
28 FILE_PATH_LITERAL("components/flapper/linux"); | 30 FILE_PATH_LITERAL("components/flapper/linux"); |
(...skipping 30 matching lines...) Expand all Loading... |
59 // This just tests the API (i.e., Pepper interfaces). | 61 // This just tests the API (i.e., Pepper interfaces). |
60 EXPECT_TRUE(VetoPepperFlashIntefaces( | 62 EXPECT_TRUE(VetoPepperFlashIntefaces( |
61 static_cast<base::DictionaryValue*>(root.get()))); | 63 static_cast<base::DictionaryValue*>(root.get()))); |
62 | 64 |
63 // This checks that the whole manifest is compatible. | 65 // This checks that the whole manifest is compatible. |
64 Version version; | 66 Version version; |
65 EXPECT_TRUE(CheckPepperFlashManifest( | 67 EXPECT_TRUE(CheckPepperFlashManifest( |
66 static_cast<base::DictionaryValue*>(root.get()), &version)); | 68 static_cast<base::DictionaryValue*>(root.get()), &version)); |
67 EXPECT_TRUE(version.IsValid()); | 69 EXPECT_TRUE(version.IsValid()); |
68 } | 70 } |
OLD | NEW |