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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 662553002: Convert ARRAYSIZE_UNSAFE -> arraysize in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 6324 matching lines...) Expand 10 before | Expand all | Expand 10 after
6335 // entries get overridden by Init(). 6335 // entries get overridden by Init().
6336 context.set_http_user_agent_settings(NULL); 6336 context.set_http_user_agent_settings(NULL);
6337 6337
6338 struct { 6338 struct {
6339 const char* request; 6339 const char* request;
6340 const char* expected_response; 6340 const char* expected_response;
6341 } tests[] = { { "echoheader?Accept-Language", "None" }, 6341 } tests[] = { { "echoheader?Accept-Language", "None" },
6342 { "echoheader?Accept-Charset", "None" }, 6342 { "echoheader?Accept-Charset", "None" },
6343 { "echoheader?User-Agent", "" } }; 6343 { "echoheader?User-Agent", "" } };
6344 6344
6345 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); i++) { 6345 for (size_t i = 0; i < arraysize(tests); i++) {
6346 TestDelegate d; 6346 TestDelegate d;
6347 scoped_ptr<URLRequest> req(context.CreateRequest( 6347 scoped_ptr<URLRequest> req(context.CreateRequest(
6348 test_server_.GetURL(tests[i].request), DEFAULT_PRIORITY, &d, NULL)); 6348 test_server_.GetURL(tests[i].request), DEFAULT_PRIORITY, &d, NULL));
6349 req->Start(); 6349 req->Start();
6350 base::RunLoop().Run(); 6350 base::RunLoop().Run();
6351 EXPECT_EQ(tests[i].expected_response, d.data_received()) 6351 EXPECT_EQ(tests[i].expected_response, d.data_received())
6352 << " Request = \"" << tests[i].request << "\""; 6352 << " Request = \"" << tests[i].request << "\"";
6353 } 6353 }
6354 } 6354 }
6355 6355
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
8283 8283
8284 EXPECT_FALSE(r->is_pending()); 8284 EXPECT_FALSE(r->is_pending());
8285 EXPECT_EQ(1, d->response_started_count()); 8285 EXPECT_EQ(1, d->response_started_count());
8286 EXPECT_FALSE(d->received_data_before_response()); 8286 EXPECT_FALSE(d->received_data_before_response());
8287 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 8287 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
8288 } 8288 }
8289 } 8289 }
8290 #endif // !defined(DISABLE_FTP_SUPPORT) 8290 #endif // !defined(DISABLE_FTP_SUPPORT)
8291 8291
8292 } // namespace net 8292 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_throttler_simulation_unittest.cc ('k') | net/websockets/websocket_frame_parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698