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 "base/json/json_file_value_serializer.h" | 5 #include "base/json/json_file_value_serializer.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/browser/extensions/extension_info_map.h" | 8 #include "chrome/browser/extensions/extension_info_map.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 namespace { | 27 namespace { |
28 | 28 |
29 class ExtensionInfoMapTest : public extensions::ExtensionTest { | 29 class ExtensionInfoMapTest : public extensions::ExtensionTest { |
30 public: | 30 public: |
31 ExtensionInfoMapTest() | 31 ExtensionInfoMapTest() |
32 : ui_thread_(BrowserThread::UI, &message_loop_), | 32 : ui_thread_(BrowserThread::UI, &message_loop_), |
33 io_thread_(BrowserThread::IO, &message_loop_) { | 33 io_thread_(BrowserThread::IO, &message_loop_) { |
34 } | 34 } |
35 | 35 |
36 private: | 36 private: |
37 MessageLoop message_loop_; | 37 base::MessageLoop message_loop_; |
38 content::TestBrowserThread ui_thread_; | 38 content::TestBrowserThread ui_thread_; |
39 content::TestBrowserThread io_thread_; | 39 content::TestBrowserThread io_thread_; |
40 }; | 40 }; |
41 | 41 |
42 // Returns a barebones test Extension object with the given name. | 42 // Returns a barebones test Extension object with the given name. |
43 static scoped_refptr<Extension> CreateExtension(const std::string& name) { | 43 static scoped_refptr<Extension> CreateExtension(const std::string& name) { |
44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
45 base::FilePath path(FILE_PATH_LITERAL("c:\\foo")); | 45 base::FilePath path(FILE_PATH_LITERAL("c:\\foo")); |
46 #elif defined(OS_POSIX) | 46 #elif defined(OS_POSIX) |
47 base::FilePath path(FILE_PATH_LITERAL("/foo")); | 47 base::FilePath path(FILE_PATH_LITERAL("/foo")); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 EXPECT_FALSE(match); | 176 EXPECT_FALSE(match); |
177 | 177 |
178 // Sandboxed origins should not have any permissions. | 178 // Sandboxed origins should not have any permissions. |
179 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo( | 179 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo( |
180 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")), | 180 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")), |
181 app_url)); | 181 app_url)); |
182 EXPECT_FALSE(match); | 182 EXPECT_FALSE(match); |
183 } | 183 } |
184 | 184 |
185 } // namespace | 185 } // namespace |
OLD | NEW |