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

Side by Side Diff: chrome/browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc

Issue 2318033002: c/browser, c/common, components M-N: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix ItunesFileUtilTest Created 4 years, 3 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 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 "chrome/browser/media_galleries/fileapi/itunes_data_provider.h" 5 #include "chrome/browser/media_galleries/fileapi/itunes_data_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 void SetLibraryChangeCallback(const base::Closure& callback) { 108 void SetLibraryChangeCallback(const base::Closure& callback) {
109 EXPECT_TRUE(library_changed_callback_.is_null()); 109 EXPECT_TRUE(library_changed_callback_.is_null());
110 library_changed_callback_ = callback; 110 library_changed_callback_ = callback;
111 } 111 }
112 112
113 ITunesDataProvider* data_provider() const { 113 ITunesDataProvider* data_provider() const {
114 return ImportedMediaGalleryRegistry::ITunesDataProvider(); 114 return ImportedMediaGalleryRegistry::ITunesDataProvider();
115 } 115 }
116 116
117 const base::FilePath& library_dir() const { 117 const base::FilePath& library_dir() const { return library_dir_.GetPath(); }
118 return library_dir_.path();
119 }
120 118
121 base::FilePath XmlFile() const { 119 base::FilePath XmlFile() const {
122 return library_dir_.path().AppendASCII("library.xml"); 120 return library_dir_.GetPath().AppendASCII("library.xml");
Reilly Grant (use Gerrit) 2016/09/14 18:06:19 I'm assuming this is correct because it is existin
vabr (Chromium) 2016/09/14 20:14:39 This is guaranteed by FilePath itself ([1]), so de
123 } 121 }
124 122
125 void ExpectTrackLocation(const std::string& artist, const std::string& album, 123 void ExpectTrackLocation(const std::string& artist, const std::string& album,
126 const std::string& track_name) { 124 const std::string& track_name) {
127 base::FilePath track = 125 base::FilePath track =
128 library_dir().AppendASCII(track_name).NormalizePathSeparators(); 126 library_dir().AppendASCII(track_name).NormalizePathSeparators();
129 EXPECT_EQ(track.value(), 127 EXPECT_EQ(track.value(),
130 data_provider()->GetTrackLocation( 128 data_provider()->GetTrackLocation(
131 artist, album, track_name).NormalizePathSeparators().value()); 129 artist, album, track_name).NormalizePathSeparators().value());
132 } 130 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 460
463 IN_PROC_BROWSER_TEST_F(ITunesDataProviderUniqueNameTest, UniqueNameTest) { 461 IN_PROC_BROWSER_TEST_F(ITunesDataProviderUniqueNameTest, UniqueNameTest) {
464 RunTest(); 462 RunTest();
465 } 463 }
466 464
467 IN_PROC_BROWSER_TEST_F(ITunesDataProviderEscapeTest, EscapeTest) { 465 IN_PROC_BROWSER_TEST_F(ITunesDataProviderEscapeTest, EscapeTest) {
468 RunTest(); 466 RunTest();
469 } 467 }
470 468
471 } // namespace itunes 469 } // namespace itunes
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698