OLD | NEW |
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/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 "chrome/browser/extensions/api/api_resource.h" | 7 #include "chrome/browser/extensions/api/api_resource.h" |
8 #include "chrome/browser/extensions/api/api_resource_manager.h" | 8 #include "chrome/browser/extensions/api/api_resource_manager.h" |
9 #include "chrome/browser/extensions/extension_function_test_utils.h" | 9 #include "chrome/browser/extensions/extension_function_test_utils.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/extensions/extension.h" | |
12 #include "chrome/common/extensions/extension_test_util.h" | 11 #include "chrome/common/extensions/extension_test_util.h" |
13 #include "chrome/test/base/browser_with_test_window_test.h" | 12 #include "chrome/test/base/browser_with_test_window_test.h" |
14 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "extensions/common/extension.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace utils = extension_function_test_utils; | 18 namespace utils = extension_function_test_utils; |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 class ApiResourceManagerUnitTest : public BrowserWithTestWindowTest { | 24 class ApiResourceManagerUnitTest : public BrowserWithTestWindowTest { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Confirm neither extension can get the other's resource. | 59 // Confirm neither extension can get the other's resource. |
60 ASSERT_TRUE(manager->Get(extension_one_id, resource_two_id) == NULL); | 60 ASSERT_TRUE(manager->Get(extension_one_id, resource_two_id) == NULL); |
61 ASSERT_TRUE(manager->Get(extension_two_id, resource_one_id) == NULL); | 61 ASSERT_TRUE(manager->Get(extension_two_id, resource_one_id) == NULL); |
62 | 62 |
63 // And make sure we're not susceptible to any Jedi mind tricks. | 63 // And make sure we're not susceptible to any Jedi mind tricks. |
64 ASSERT_TRUE(manager->Get(std::string(), resource_one_id) == NULL); | 64 ASSERT_TRUE(manager->Get(std::string(), resource_one_id) == NULL); |
65 } | 65 } |
66 | 66 |
67 } // namespace extensions | 67 } // namespace extensions |
OLD | NEW |