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

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

Issue 22794012: Rename extension_manifest_keys namespace to extensions::manifest_keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/message_loop.h" 6 #include "base/message_loop/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"
12 #include "content/public/test/test_browser_thread.h" 11 #include "content/public/test/test_browser_thread.h"
12 #include "extensions/common/manifest_constants.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using content::BrowserThread; 15 using content::BrowserThread;
16 using extensions::APIPermission; 16 using extensions::APIPermission;
17 using extensions::Extension; 17 using extensions::Extension;
18 using extensions::Manifest; 18 using extensions::Manifest;
19 19
20 namespace keys = extension_manifest_keys; 20 namespace keys = extensions::manifest_keys;
21 21
22 namespace { 22 namespace {
23 23
24 class ExtensionInfoMapTest : public testing::Test { 24 class ExtensionInfoMapTest : public testing::Test {
25 public: 25 public:
26 ExtensionInfoMapTest() 26 ExtensionInfoMapTest()
27 : ui_thread_(BrowserThread::UI, &message_loop_), 27 : ui_thread_(BrowserThread::UI, &message_loop_),
28 io_thread_(BrowserThread::IO, &message_loop_) { 28 io_thread_(BrowserThread::IO, &message_loop_) {
29 } 29 }
30 30
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 EXPECT_FALSE(match && 161 EXPECT_FALSE(match &&
162 match->HasAPIPermission(APIPermission::kNotification)); 162 match->HasAPIPermission(APIPermission::kNotification));
163 163
164 // Random URL should not have any permissions. 164 // Random URL should not have any permissions.
165 GURL evil_url("http://evil.com/a.html"); 165 GURL evil_url("http://evil.com/a.html");
166 match = info_map->extensions().GetExtensionOrAppByURL(evil_url); 166 match = info_map->extensions().GetExtensionOrAppByURL(evil_url);
167 EXPECT_FALSE(match); 167 EXPECT_FALSE(match);
168 } 168 }
169 169
170 } // namespace 170 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/convert_web_app.cc ('k') | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698