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

Side by Side Diff: ios/web/web_state/error_translation_util_unittest.mm

Issue 2605913002: Fix include import in ios/web (Closed)
Patch Set: add missing #import Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import "ios/web/web_state/error_translation_util.h" 5 #import "ios/web/web_state/error_translation_util.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.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 // Test fixture for error translation testing. 16 // Test fixture for error translation testing.
17 typedef PlatformTest ErrorTranslationUtilTest; 17 typedef PlatformTest ErrorTranslationUtilTest;
18 18
19 namespace { 19 namespace {
20 // Returns net error domain. 20 // Returns net error domain.
21 NSString* GetNetErrorDomain() { 21 NSString* GetNetErrorDomain() {
22 return base::SysUTF8ToNSString(net::kErrorDomain); 22 return base::SysUTF8ToNSString(net::kErrorDomain);
23 } 23 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 EXPECT_NSEQ([underlying_error domain], [net_underlying_error domain]); 124 EXPECT_NSEQ([underlying_error domain], [net_underlying_error domain]);
125 EXPECT_EQ([underlying_error code], [net_underlying_error code]); 125 EXPECT_EQ([underlying_error code], [net_underlying_error code]);
126 126
127 // Final underlying error should have net error domain and specified code. 127 // Final underlying error should have net error domain and specified code.
128 NSError* final_net_underlying_error = 128 NSError* final_net_underlying_error =
129 [net_underlying_error userInfo][NSUnderlyingErrorKey]; 129 [net_underlying_error userInfo][NSUnderlyingErrorKey];
130 EXPECT_TRUE(final_net_underlying_error); 130 EXPECT_TRUE(final_net_underlying_error);
131 EXPECT_NSEQ(GetNetErrorDomain(), [final_net_underlying_error domain]); 131 EXPECT_NSEQ(GetNetErrorDomain(), [final_net_underlying_error domain]);
132 EXPECT_EQ(net::ERR_CONNECTION_RESET, [final_net_underlying_error code]); 132 EXPECT_EQ(net::ERR_CONNECTION_RESET, [final_net_underlying_error code]);
133 } 133 }
OLDNEW
« no previous file with comments | « ios/web/web_state/error_translation_util.mm ('k') | ios/web/web_state/global_web_state_event_tracker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698