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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 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 "base/json/json_value_serializer.h" 5 #include "base/json/json_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"
11 #include "content/test/test_browser_thread.h" 11 #include "content/test/test_browser_thread.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using content::BrowserThread;
15
14 namespace keys = extension_manifest_keys; 16 namespace keys = extension_manifest_keys;
15 17
16 namespace { 18 namespace {
17 19
18 class ExtensionInfoMapTest : public testing::Test { 20 class ExtensionInfoMapTest : public testing::Test {
19 public: 21 public:
20 ExtensionInfoMapTest() 22 ExtensionInfoMapTest()
21 : ui_thread_(BrowserThread::UI, &message_loop_), 23 : ui_thread_(BrowserThread::UI, &message_loop_),
22 io_thread_(BrowserThread::IO, &message_loop_) { 24 io_thread_(BrowserThread::IO, &message_loop_) {
23 } 25 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 match->HasAPIPermission(ExtensionAPIPermission::kTab)); 154 match->HasAPIPermission(ExtensionAPIPermission::kTab));
153 EXPECT_FALSE(match && 155 EXPECT_FALSE(match &&
154 match->HasAPIPermission(ExtensionAPIPermission::kNotification)); 156 match->HasAPIPermission(ExtensionAPIPermission::kNotification));
155 157
156 // Random URL should not have any permissions. 158 // Random URL should not have any permissions.
157 match = info_map->extensions().GetByURL(GURL("http://evil.com/a.html")); 159 match = info_map->extensions().GetByURL(GURL("http://evil.com/a.html"));
158 EXPECT_FALSE(match); 160 EXPECT_FALSE(match);
159 } 161 }
160 162
161 } // namespace 163 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map.cc ('k') | chrome/browser/extensions/extension_management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698