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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | remoting/host/pairing_registry_delegate_linux.cc » ('j') | 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) 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 "net/url_request/url_fetcher_impl.h" 5 #include "net/url_request/url_fetcher_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 SpawnedTestServer::kLocalhost, 1451 SpawnedTestServer::kLocalhost,
1452 base::FilePath(kDocRoot)); 1452 base::FilePath(kDocRoot));
1453 ASSERT_TRUE(test_server.Start()); 1453 ASSERT_TRUE(test_server.Start());
1454 1454
1455 base::ScopedTempDir temp_dir; 1455 base::ScopedTempDir temp_dir;
1456 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 1456 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
1457 1457
1458 // Create a directory before trying to fetch. 1458 // Create a directory before trying to fetch.
1459 static const char kFileToFetch[] = "simple.html"; 1459 static const char kFileToFetch[] = "simple.html";
1460 file_path_ = temp_dir.path().AppendASCII(kFileToFetch); 1460 file_path_ = temp_dir.path().AppendASCII(kFileToFetch);
1461 ASSERT_TRUE(file_util::CreateDirectory(file_path_)); 1461 ASSERT_TRUE(base::CreateDirectory(file_path_));
1462 ASSERT_TRUE(base::PathExists(file_path_)); 1462 ASSERT_TRUE(base::PathExists(file_path_));
1463 1463
1464 // Get a small file. 1464 // Get a small file.
1465 expected_file_error_ = ERR_ACCESS_DENIED; 1465 expected_file_error_ = ERR_ACCESS_DENIED;
1466 expected_file_ = test_server.GetDocumentRoot().AppendASCII(kFileToFetch); 1466 expected_file_ = test_server.GetDocumentRoot().AppendASCII(kFileToFetch);
1467 CreateFetcherForFile( 1467 CreateFetcherForFile(
1468 test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch), 1468 test_server.GetURL(std::string(kTestServerFilePrefix) + kFileToFetch),
1469 file_path_); 1469 file_path_);
1470 1470
1471 base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). 1471 base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 1529
1530 base::MessageLoop::current()->RunUntilIdle(); 1530 base::MessageLoop::current()->RunUntilIdle();
1531 ASSERT_EQ(kTake[i], base::PathExists(file_path_)) << 1531 ASSERT_EQ(kTake[i], base::PathExists(file_path_)) <<
1532 "FilePath: " << file_path_.value(); 1532 "FilePath: " << file_path_.value();
1533 } 1533 }
1534 } 1534 }
1535 1535
1536 } // namespace 1536 } // namespace
1537 1537
1538 } // namespace net 1538 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | remoting/host/pairing_registry_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698