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

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

Issue 14694010: Consolidate manifest handler registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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"
11 #include "chrome/common/extensions/extension_manifest_constants.h" 11 #include "chrome/common/extensions/extension_manifest_constants.h"
12 #include "chrome/common/extensions/extension_unittest.h"
13 #include "content/public/test/test_browser_thread.h" 12 #include "content/public/test/test_browser_thread.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
17 16
18 using content::BrowserThread; 17 using content::BrowserThread;
19 using extensions::APIPermission; 18 using extensions::APIPermission;
20 using extensions::Extension; 19 using extensions::Extension;
21 using extensions::Manifest; 20 using extensions::Manifest;
22 using WebKit::WebSecurityOrigin; 21 using WebKit::WebSecurityOrigin;
23 using WebKit::WebString; 22 using WebKit::WebString;
24 23
25 namespace keys = extension_manifest_keys; 24 namespace keys = extension_manifest_keys;
26 25
27 namespace { 26 namespace {
28 27
29 class ExtensionInfoMapTest : public extensions::ExtensionTest { 28 class ExtensionInfoMapTest : public testing::Test {
30 public: 29 public:
31 ExtensionInfoMapTest() 30 ExtensionInfoMapTest()
32 : ui_thread_(BrowserThread::UI, &message_loop_), 31 : ui_thread_(BrowserThread::UI, &message_loop_),
33 io_thread_(BrowserThread::IO, &message_loop_) { 32 io_thread_(BrowserThread::IO, &message_loop_) {
34 } 33 }
35 34
36 private: 35 private:
37 MessageLoop message_loop_; 36 MessageLoop message_loop_;
38 content::TestBrowserThread ui_thread_; 37 content::TestBrowserThread ui_thread_;
39 content::TestBrowserThread io_thread_; 38 content::TestBrowserThread io_thread_;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 EXPECT_FALSE(match); 175 EXPECT_FALSE(match);
177 176
178 // Sandboxed origins should not have any permissions. 177 // Sandboxed origins should not have any permissions.
179 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo( 178 match = info_map->extensions().GetExtensionOrAppByURL(ExtensionURLInfo(
180 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")), 179 WebSecurityOrigin::createFromString(WebString::fromUTF8("null")),
181 app_url)); 180 app_url));
182 EXPECT_FALSE(match); 181 EXPECT_FALSE(match);
183 } 182 }
184 183
185 } // namespace 184 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_icon_manager_unittest.cc ('k') | chrome/browser/extensions/extension_prefs_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698