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/net/web_http_protocol_handler_delegate.h" | 5 #include "ios/web/net/web_http_protocol_handler_delegate.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
12 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
13 #include "ios/web/public/test/scoped_testing_web_client.h" | 14 #include "ios/web/public/test/scoped_testing_web_client.h" |
14 #include "ios/web/public/web_client.h" | 15 #include "ios/web/public/web_client.h" |
15 #include "net/url_request/url_request_test_util.h" | 16 #include "net/url_request/url_request_test_util.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 namespace web { | 19 namespace web { |
19 | 20 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Empty scheme. | 113 // Empty scheme. |
113 request.reset( | 114 request.reset( |
114 [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@":foo"]]); | 115 [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@":foo"]]); |
115 ASSERT_TRUE([request URL]); | 116 ASSERT_TRUE([request URL]); |
116 ASSERT_TRUE([[request URL] scheme]); | 117 ASSERT_TRUE([[request URL] scheme]); |
117 ASSERT_FALSE([[[request URL] scheme] length]); | 118 ASSERT_FALSE([[[request URL] scheme] length]); |
118 EXPECT_FALSE(delegate_->IsRequestSupported(request)); | 119 EXPECT_FALSE(delegate_->IsRequestSupported(request)); |
119 } | 120 } |
120 | 121 |
121 } // namespace web | 122 } // namespace web |
OLD | NEW |