| Index: net/base/directory_lister_unittest.cc
|
| diff --git a/net/base/directory_lister_unittest.cc b/net/base/directory_lister_unittest.cc
|
| index 005ce0d51285e81b4caec6c62b5a3b5f5bda27c4..4ea711ef2a77ced063e222006f4cb6f4b4d9aba7 100644
|
| --- a/net/base/directory_lister_unittest.cc
|
| +++ b/net/base/directory_lister_unittest.cc
|
| @@ -20,12 +20,10 @@ namespace net {
|
|
|
| class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
|
| public:
|
| - ListerDelegate(bool recursive,
|
| - bool quit_loop_after_each_file)
|
| + ListerDelegate(bool recursive, bool quit_loop_after_each_file)
|
| : error_(-1),
|
| recursive_(recursive),
|
| - quit_loop_after_each_file_(quit_loop_after_each_file) {
|
| - }
|
| + quit_loop_after_each_file_(quit_loop_after_each_file) {}
|
|
|
| virtual void OnListFile(
|
| const DirectoryLister::DirectoryListerData& data) OVERRIDE {
|
| @@ -47,11 +45,10 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
|
| void CheckRecursiveSort() {
|
| // Check that we got files in the right order.
|
| if (!file_list_.empty()) {
|
| - for (size_t previous = 0, current = 1;
|
| - current < file_list_.size();
|
| + for (size_t previous = 0, current = 1; current < file_list_.size();
|
| previous++, current++) {
|
| - EXPECT_TRUE(file_util::LocaleAwareCompareFilenames(
|
| - paths_[previous], paths_[current]));
|
| + EXPECT_TRUE(file_util::LocaleAwareCompareFilenames(paths_[previous],
|
| + paths_[current]));
|
| }
|
| }
|
| }
|
| @@ -59,8 +56,7 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
|
| void CheckSort() {
|
| // Check that we got files in the right order.
|
| if (!file_list_.empty()) {
|
| - for (size_t previous = 0, current = 1;
|
| - current < file_list_.size();
|
| + for (size_t previous = 0, current = 1; current < file_list_.size();
|
| previous++, current++) {
|
| // Directories should come before files.
|
| if (file_list_[previous].IsDirectory() &&
|
| @@ -72,8 +68,7 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
|
| EXPECT_EQ(file_list_[previous].IsDirectory(),
|
| file_list_[current].IsDirectory());
|
| EXPECT_TRUE(file_util::LocaleAwareCompareFilenames(
|
| - file_list_[previous].GetName(),
|
| - file_list_[current].GetName()));
|
| + file_list_[previous].GetName(), file_list_[current].GetName()));
|
| }
|
| }
|
| }
|
| @@ -92,7 +87,6 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
|
|
|
| class DirectoryListerTest : public PlatformTest {
|
| public:
|
| -
|
| virtual void SetUp() OVERRIDE {
|
| const int kMaxDepth = 3;
|
| const int kBranchingFactor = 4;
|
| @@ -125,9 +119,7 @@ class DirectoryListerTest : public PlatformTest {
|
| PlatformTest::SetUp();
|
| }
|
|
|
| - const base::FilePath& root_path() const {
|
| - return temp_root_dir_.path();
|
| - }
|
| + const base::FilePath& root_path() const { return temp_root_dir_.path(); }
|
|
|
| private:
|
| base::ScopedTempDir temp_root_dir_;
|
| @@ -145,8 +137,8 @@ TEST_F(DirectoryListerTest, BigDirTest) {
|
|
|
| TEST_F(DirectoryListerTest, BigDirRecursiveTest) {
|
| ListerDelegate delegate(true, false);
|
| - DirectoryLister lister(root_path(), true, DirectoryLister::FULL_PATH,
|
| - &delegate);
|
| + DirectoryLister lister(
|
| + root_path(), true, DirectoryLister::FULL_PATH, &delegate);
|
| lister.Start();
|
|
|
| base::MessageLoop::current()->Run();
|
|
|