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

Side by Side Diff: extensions/browser/api/api_resource_manager_unittest.cc

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. Created 6 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
« no previous file with comments | « extensions/BUILD.gn ('k') | extensions/browser/api/storage/storage_api_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "content/public/test/test_browser_thread_bundle.h" 8 #include "content/public/test/test_browser_thread_bundle.h"
9 #include "extensions/browser/api/api_resource.h" 9 #include "extensions/browser/api/api_resource.h"
10 #include "extensions/browser/api/api_resource_manager.h" 10 #include "extensions/browser/api/api_resource_manager.h"
11 #include "extensions/browser/extensions_test.h" 11 #include "extensions/browser/extensions_test.h"
12 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
13 #include "extensions/common/id_util.h"
14 #include "extensions/common/test_util.h" 13 #include "extensions/common/test_util.h"
15 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
16 #include "url/gurl.h" 15 #include "url/gurl.h"
17 16
18 using content::BrowserThread; 17 using content::BrowserThread;
19 using content::NotificationService; 18 using content::NotificationService;
20 19
21 namespace extensions { 20 namespace extensions {
22 21
23 class ApiResourceManagerUnitTest : public ExtensionsTest { 22 class ApiResourceManagerUnitTest : public ExtensionsTest {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 59
61 // Confirm neither extension can get the other's resource. 60 // Confirm neither extension can get the other's resource.
62 ASSERT_TRUE(manager->Get(extension_one_id, resource_two_id) == NULL); 61 ASSERT_TRUE(manager->Get(extension_one_id, resource_two_id) == NULL);
63 ASSERT_TRUE(manager->Get(extension_two_id, resource_one_id) == NULL); 62 ASSERT_TRUE(manager->Get(extension_two_id, resource_one_id) == NULL);
64 63
65 // And make sure we're not susceptible to any Jedi mind tricks. 64 // And make sure we're not susceptible to any Jedi mind tricks.
66 ASSERT_TRUE(manager->Get(std::string(), resource_one_id) == NULL); 65 ASSERT_TRUE(manager->Get(std::string(), resource_one_id) == NULL);
67 } 66 }
68 67
69 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/BUILD.gn ('k') | extensions/browser/api/storage/storage_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698