| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/url_request/view_cache_helper.h" | 5 #include "net/url_request/view_cache_helper.h" |
| 6 | 6 |
| 7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
| 8 #include "net/base/net_errors.h" |
| 8 #include "net/base/test_completion_callback.h" | 9 #include "net/base/test_completion_callback.h" |
| 9 #include "net/disk_cache/disk_cache.h" | 10 #include "net/disk_cache/disk_cache.h" |
| 10 #include "net/http/http_cache.h" | 11 #include "net/http/http_cache.h" |
| 11 #include "net/url_request/url_request_context.h" | 12 #include "net/url_request/url_request_context.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 class TestURLRequestContext : public net::URLRequestContext { | 17 class TestURLRequestContext : public net::URLRequestContext { |
| 17 public: | 18 public: |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 int flags = 1 << 12; | 193 int flags = 1 << 12; |
| 193 WriteHeaders(entry, flags, "something"); | 194 WriteHeaders(entry, flags, "something"); |
| 194 entry->Close(); | 195 entry->Close(); |
| 195 | 196 |
| 196 std::string data; | 197 std::string data; |
| 197 rv = helper.GetEntryInfoHTML(key, context, &data, &cb); | 198 rv = helper.GetEntryInfoHTML(key, context, &data, &cb); |
| 198 EXPECT_EQ(net::OK, cb.GetResult(rv)); | 199 EXPECT_EQ(net::OK, cb.GetResult(rv)); |
| 199 | 200 |
| 200 EXPECT_NE(std::string::npos, data.find("RESPONSE_INFO_TRUNCATED")); | 201 EXPECT_NE(std::string::npos, data.find("RESPONSE_INFO_TRUNCATED")); |
| 201 } | 202 } |
| OLD | NEW |