| OLD | NEW |
| 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 "ios/web/navigation/navigation_item_impl.h" | 5 #import "ios/web/navigation/navigation_item_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "testing/gtest_mac.h" | 13 #import "testing/gtest_mac.h" |
| 14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
| 15 | 15 |
| 16 namespace web { | 16 namespace web { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 static NSString* const kHTTPHeaderKey1 = @"key1"; | 19 static NSString* const kHTTPHeaderKey1 = @"key1"; |
| 20 static NSString* const kHTTPHeaderKey2 = @"key2"; | 20 static NSString* const kHTTPHeaderKey2 = @"key2"; |
| 21 static NSString* const kHTTPHeaderValue1 = @"value1"; | 21 static NSString* const kHTTPHeaderValue1 = @"value1"; |
| 22 static NSString* const kHTTPHeaderValue2 = @"value2"; | 22 static NSString* const kHTTPHeaderValue2 = @"value2"; |
| 23 | 23 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 item_->RemoveHttpRequestHeaderForKey(kHTTPHeaderKey1); | 104 item_->RemoveHttpRequestHeaderForKey(kHTTPHeaderKey1); |
| 105 EXPECT_NSEQ(@{kHTTPHeaderKey2 : kHTTPHeaderValue2}, | 105 EXPECT_NSEQ(@{kHTTPHeaderKey2 : kHTTPHeaderValue2}, |
| 106 item_->GetHttpRequestHeaders()); | 106 item_->GetHttpRequestHeaders()); |
| 107 | 107 |
| 108 item_->RemoveHttpRequestHeaderForKey(kHTTPHeaderKey2); | 108 item_->RemoveHttpRequestHeaderForKey(kHTTPHeaderKey2); |
| 109 EXPECT_FALSE(item_->GetHttpRequestHeaders()); | 109 EXPECT_FALSE(item_->GetHttpRequestHeaders()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace | 112 } // namespace |
| 113 } // namespace web | 113 } // namespace web |
| OLD | NEW |