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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/extensions/extension_info_map.h" | 9 #include "chrome/browser/extensions/extension_info_map.h" |
10 #include "chrome/browser/extensions/extension_protocols.h" | 10 #include "chrome/browser/extensions/extension_protocols.h" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "content/public/browser/resource_request_info.h" | 12 #include "content/public/browser/resource_request_info.h" |
13 #include "content/test/mock_resource_context.h" | 13 #include "content/test/mock_resource_context.h" |
14 #include "content/test/test_browser_thread.h" | 14 #include "content/test/test_browser_thread.h" |
15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
16 #include "net/url_request/url_request_status.h" | 16 #include "net/url_request/url_request_status.h" |
17 #include "net/url_request/url_request_test_util.h" | 17 #include "net/url_request/url_request_test_util.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
| 21 using extensions::Extension; |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 scoped_refptr<Extension> CreateTestExtension(const std::string& name, | 25 scoped_refptr<Extension> CreateTestExtension(const std::string& name, |
25 bool incognito_split_mode) { | 26 bool incognito_split_mode) { |
26 DictionaryValue manifest; | 27 DictionaryValue manifest; |
27 manifest.SetString("name", name); | 28 manifest.SetString("name", name); |
28 manifest.SetString("version", "1"); | 29 manifest.SetString("version", "1"); |
29 manifest.SetString("incognito", incognito_split_mode ? "split" : "spanning"); | 30 manifest.SetString("incognito", incognito_split_mode ? "split" : "spanning"); |
30 | 31 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 cases[i].name; | 145 cases[i].name; |
145 } else { | 146 } else { |
146 EXPECT_EQ(net::ERR_ADDRESS_UNREACHABLE, request.status().error()) << | 147 EXPECT_EQ(net::ERR_ADDRESS_UNREACHABLE, request.status().error()) << |
147 cases[i].name; | 148 cases[i].name; |
148 } | 149 } |
149 } | 150 } |
150 } | 151 } |
151 } | 152 } |
152 | 153 |
153 } // namespace | 154 } // namespace |
OLD | NEW |