| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/base64.h" | 5 #include "base/base64.h" |
| 6 #include "base/base_paths_win.h" | 6 #include "base/base_paths_win.h" |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 void TouchFile(const base::FilePath& file) { | 33 void TouchFile(const base::FilePath& file) { |
| 34 ASSERT_EQ(1, file_util::WriteFile(file, " ", 1)); | 34 ASSERT_EQ(1, file_util::WriteFile(file, " ", 1)); |
| 35 } | 35 } |
| 36 | 36 |
| 37 class ITunesFinderWinTest : public InProcessBrowserTest { | 37 class ITunesFinderWinTest : public InProcessBrowserTest { |
| 38 public: | 38 public: |
| 39 ITunesFinderWinTest() : test_finder_callback_called_(false) {} | 39 ITunesFinderWinTest() : test_finder_callback_called_(false) {} |
| 40 | 40 |
| 41 virtual ~ITunesFinderWinTest() {} |
| 42 |
| 41 virtual void SetUp() OVERRIDE { | 43 virtual void SetUp() OVERRIDE { |
| 42 ASSERT_TRUE(app_data_dir_.CreateUniqueTempDir()); | 44 ASSERT_TRUE(app_data_dir_.CreateUniqueTempDir()); |
| 43 ASSERT_TRUE(music_dir_.CreateUniqueTempDir()); | 45 ASSERT_TRUE(music_dir_.CreateUniqueTempDir()); |
| 44 app_data_dir_override_.reset( | 46 app_data_dir_override_.reset( |
| 45 new base::ScopedPathOverride(base::DIR_APP_DATA, app_data_dir())); | 47 new base::ScopedPathOverride(base::DIR_APP_DATA, app_data_dir())); |
| 46 music_dir_override_.reset( | 48 music_dir_override_.reset( |
| 47 new base::ScopedPathOverride(chrome::DIR_USER_MUSIC, music_dir())); | 49 new base::ScopedPathOverride(chrome::DIR_USER_MUSIC, music_dir())); |
| 48 InProcessBrowserTest::SetUp(); | 50 InProcessBrowserTest::SetUp(); |
| 49 } | 51 } |
| 50 | 52 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 "</plist>", EncodePath(library_xml).c_str()); | 188 "</plist>", EncodePath(library_xml).c_str()); |
| 187 WritePrefFile(xml); | 189 WritePrefFile(xml); |
| 188 TestFindITunesLibrary(); | 190 TestFindITunesLibrary(); |
| 189 EXPECT_TRUE(test_finder_callback_called()); | 191 EXPECT_TRUE(test_finder_callback_called()); |
| 190 EXPECT_TRUE(EmptyResult()); | 192 EXPECT_TRUE(EmptyResult()); |
| 191 } | 193 } |
| 192 | 194 |
| 193 } // namespace | 195 } // namespace |
| 194 | 196 |
| 195 } // namespace itunes | 197 } // namespace itunes |
| OLD | NEW |