Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: chrome/browser/extensions/extension_info_map_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 15 matching lines...) Expand all
26 namespace { 26 namespace {
27 27
28 class ExtensionInfoMapTest : public testing::Test { 28 class ExtensionInfoMapTest : public testing::Test {
29 public: 29 public:
30 ExtensionInfoMapTest() 30 ExtensionInfoMapTest()
31 : ui_thread_(BrowserThread::UI, &message_loop_), 31 : ui_thread_(BrowserThread::UI, &message_loop_),
32 io_thread_(BrowserThread::IO, &message_loop_) { 32 io_thread_(BrowserThread::IO, &message_loop_) {
33 } 33 }
34 34
35 private: 35 private:
36 MessageLoop message_loop_; 36 base::MessageLoop message_loop_;
37 content::TestBrowserThread ui_thread_; 37 content::TestBrowserThread ui_thread_;
38 content::TestBrowserThread io_thread_; 38 content::TestBrowserThread io_thread_;
39 }; 39 };
40 40
41 // Returns a barebones test Extension object with the given name. 41 // Returns a barebones test Extension object with the given name.
42 static scoped_refptr<Extension> CreateExtension(const std::string& name) { 42 static scoped_refptr<Extension> CreateExtension(const std::string& name) {
43 #if defined(OS_WIN) 43 #if defined(OS_WIN)
44 base::FilePath path(FILE_PATH_LITERAL("c:\\foo")); 44 base::FilePath path(FILE_PATH_LITERAL("c:\\foo"));
45 #elif defined(OS_POSIX) 45 #elif defined(OS_POSIX)
46 base::FilePath path(FILE_PATH_LITERAL("/foo")); 46 base::FilePath path(FILE_PATH_LITERAL("/foo"));
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 EXPECT_FALSE(match); 175 EXPECT_FALSE(match);
176 176
177 // Sandboxed origins should not have any permissions. 177 // Sandboxed origins should not have any permissions.
178 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo( 178 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo(
179 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")), 179 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")),
180 app_url)); 180 app_url));
181 EXPECT_FALSE(match); 181 EXPECT_FALSE(match);
182 } 182 }
183 183
184 } // namespace 184 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_icon_manager_unittest.cc ('k') | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698