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

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

Issue 3067033: Mark URLRequestTestFTP.FTPCheckWrongPassword and .FTPCheckWrongUser as flaky. (Closed)
Patch Set: Created 10 years, 4 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 | « no previous file | 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/url_request/url_request_unittest.h" 5 #include "net/url_request/url_request_unittest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 int64 file_size = 0; 2304 int64 file_size = 0;
2305 file_util::GetFileSize(app_path, &file_size); 2305 file_util::GetFileSize(app_path, &file_size);
2306 2306
2307 EXPECT_FALSE(r.is_pending()); 2307 EXPECT_FALSE(r.is_pending());
2308 EXPECT_EQ(1, d.response_started_count()); 2308 EXPECT_EQ(1, d.response_started_count());
2309 EXPECT_FALSE(d.received_data_before_response()); 2309 EXPECT_FALSE(d.received_data_before_response());
2310 EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size)); 2310 EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size));
2311 } 2311 }
2312 } 2312 }
2313 2313
2314 TEST_F(URLRequestTestFTP, FTPCheckWrongPassword) { 2314 // Flaky, see http://crbug.com/25045.
2315 TEST_F(URLRequestTestFTP, FLAKY_FTPCheckWrongPassword) {
2315 ASSERT_TRUE(NULL != server_.get()); 2316 ASSERT_TRUE(NULL != server_.get());
2316 FilePath app_path; 2317 FilePath app_path;
2317 PathService::Get(base::DIR_SOURCE_ROOT, &app_path); 2318 PathService::Get(base::DIR_SOURCE_ROOT, &app_path);
2318 app_path = app_path.AppendASCII("LICENSE"); 2319 app_path = app_path.AppendASCII("LICENSE");
2319 TestDelegate d; 2320 TestDelegate d;
2320 { 2321 {
2321 TestURLRequest r(server_->TestServerPage("/LICENSE", 2322 TestURLRequest r(server_->TestServerPage("/LICENSE",
2322 "chrome", "wrong_password"), &d); 2323 "chrome", "wrong_password"), &d);
2323 r.Start(); 2324 r.Start();
2324 EXPECT_TRUE(r.is_pending()); 2325 EXPECT_TRUE(r.is_pending());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 int64 file_size = 0; 2358 int64 file_size = 0;
2358 file_util::GetFileSize(app_path, &file_size); 2359 file_util::GetFileSize(app_path, &file_size);
2359 2360
2360 EXPECT_FALSE(r.is_pending()); 2361 EXPECT_FALSE(r.is_pending());
2361 EXPECT_EQ(1, d.response_started_count()); 2362 EXPECT_EQ(1, d.response_started_count());
2362 EXPECT_FALSE(d.received_data_before_response()); 2363 EXPECT_FALSE(d.received_data_before_response());
2363 EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size)); 2364 EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size));
2364 } 2365 }
2365 } 2366 }
2366 2367
2367 TEST_F(URLRequestTestFTP, FTPCheckWrongUser) { 2368 // Flaky, see http://crbug.com/25045.
2369 TEST_F(URLRequestTestFTP, FLAKY_FTPCheckWrongUser) {
2368 ASSERT_TRUE(NULL != server_.get()); 2370 ASSERT_TRUE(NULL != server_.get());
2369 FilePath app_path; 2371 FilePath app_path;
2370 PathService::Get(base::DIR_SOURCE_ROOT, &app_path); 2372 PathService::Get(base::DIR_SOURCE_ROOT, &app_path);
2371 app_path = app_path.AppendASCII("LICENSE"); 2373 app_path = app_path.AppendASCII("LICENSE");
2372 TestDelegate d; 2374 TestDelegate d;
2373 { 2375 {
2374 TestURLRequest r(server_->TestServerPage("/LICENSE", 2376 TestURLRequest r(server_->TestServerPage("/LICENSE",
2375 "wrong_user", "chrome"), &d); 2377 "wrong_user", "chrome"), &d);
2376 r.Start(); 2378 r.Start();
2377 EXPECT_TRUE(r.is_pending()); 2379 EXPECT_TRUE(r.is_pending());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 TestURLRequest 2563 TestURLRequest
2562 req(server_->TestServerPage("echoheaderoverride?Accept-Charset"), &d); 2564 req(server_->TestServerPage("echoheaderoverride?Accept-Charset"), &d);
2563 req.set_context(new TestURLRequestContext()); 2565 req.set_context(new TestURLRequestContext());
2564 net::HttpRequestHeaders headers; 2566 net::HttpRequestHeaders headers;
2565 headers.SetHeader(net::HttpRequestHeaders::kAcceptCharset, "koi-8r"); 2567 headers.SetHeader(net::HttpRequestHeaders::kAcceptCharset, "koi-8r");
2566 req.SetExtraRequestHeaders(headers); 2568 req.SetExtraRequestHeaders(headers);
2567 req.Start(); 2569 req.Start();
2568 MessageLoop::current()->Run(); 2570 MessageLoop::current()->Run();
2569 EXPECT_EQ(std::string("koi-8r"), d.data_received()); 2571 EXPECT_EQ(std::string("koi-8r"), d.data_received());
2570 } 2572 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698