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

Side by Side Diff: components/image_fetcher/core/request_metadata_unittest.cc

Issue 2793983002: [ImageFetcher] Return http response headers (Closed)
Patch Set: Compare headers as well Created 3 years, 8 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
« no previous file with comments | « components/image_fetcher/core/request_metadata.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "components/image_fetcher/core/request_metadata.h" 5 #include "components/image_fetcher/core/request_metadata.h"
6 6
7 #include "base/memory/ref_counted.h"
8 #include "net/http/http_response_headers.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace image_fetcher { 11 namespace image_fetcher {
10 12
11 TEST(RequestMetadataTest, Equality) { 13 TEST(RequestMetadataTest, Equality) {
12 RequestMetadata rhs; 14 RequestMetadata rhs;
13 RequestMetadata lhs; 15 RequestMetadata lhs;
14 rhs.mime_type = "testMimeType"; 16 rhs.mime_type = "testMimeType";
15 lhs.mime_type = "testMimeType"; 17 lhs.mime_type = "testMimeType";
16 rhs.http_response_code = 1; 18 rhs.http_response_code = 1;
(...skipping 21 matching lines...) Expand all
38 lhs.http_response_code = 2; 40 lhs.http_response_code = 2;
39 EXPECT_NE(rhs, lhs); 41 EXPECT_NE(rhs, lhs);
40 lhs.http_response_code = 1; 42 lhs.http_response_code = 1;
41 43
42 lhs.from_http_cache = false; 44 lhs.from_http_cache = false;
43 EXPECT_NE(rhs, lhs); 45 EXPECT_NE(rhs, lhs);
44 lhs.from_http_cache = true; 46 lhs.from_http_cache = true;
45 } 47 }
46 48
47 } // namespace image_fetcher 49 } // namespace image_fetcher
OLDNEW
« no previous file with comments | « components/image_fetcher/core/request_metadata.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698