| OLD | NEW |
| 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 "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 xml_contents.c_str(), xml_contents.size())); | 365 xml_contents.c_str(), xml_contents.size())); |
| 366 } | 366 } |
| 367 #endif // defined(OS_MACOSX) | 367 #endif // defined(OS_MACOSX) |
| 368 | 368 |
| 369 base::FilePath GetCommonDataDir() const { | 369 base::FilePath GetCommonDataDir() const { |
| 370 return test_data_dir_.AppendASCII("api_test") | 370 return test_data_dir_.AppendASCII("api_test") |
| 371 .AppendASCII("media_galleries") | 371 .AppendASCII("media_galleries") |
| 372 .AppendASCII("common"); | 372 .AppendASCII("common"); |
| 373 } | 373 } |
| 374 | 374 |
| 375 base::FilePath GetWallpaperTestDataDir() const { | |
| 376 return test_data_dir_.AppendASCII("api_test") | |
| 377 .AppendASCII("wallpaper"); | |
| 378 } | |
| 379 | |
| 380 int num_galleries() const { | 375 int num_galleries() const { |
| 381 return ensure_media_directories_exists_->num_galleries(); | 376 return ensure_media_directories_exists_->num_galleries(); |
| 382 } | 377 } |
| 383 | 378 |
| 384 int test_jpg_size() const { return test_jpg_size_; } | 379 int test_jpg_size() const { return test_jpg_size_; } |
| 385 | 380 |
| 386 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { | 381 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { |
| 387 return ensure_media_directories_exists_.get(); | 382 return ensure_media_directories_exists_.get(); |
| 388 } | 383 } |
| 389 | 384 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 600 |
| 606 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; | 601 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; |
| 607 } | 602 } |
| 608 | 603 |
| 609 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { | 604 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { |
| 610 RemoveAllGalleries(); | 605 RemoveAllGalleries(); |
| 611 MakeSingleFakeGallery(NULL); | 606 MakeSingleFakeGallery(NULL); |
| 612 | 607 |
| 613 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); | 608 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); |
| 614 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); | 609 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); |
| 615 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg")); | |
| 616 | 610 |
| 617 base::ListValue custom_args; | 611 base::ListValue custom_args; |
| 618 #if defined(USE_PROPRIETARY_CODECS) | 612 #if defined(USE_PROPRIETARY_CODECS) |
| 619 custom_args.AppendBoolean(true); | 613 custom_args.AppendBoolean(true); |
| 620 #else | 614 #else |
| 621 custom_args.AppendBoolean(false); | 615 custom_args.AppendBoolean(false); |
| 622 #endif | 616 #endif |
| 623 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) | 617 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) |
| 624 << message_; | 618 << message_; |
| 625 } | 619 } |
| OLD | NEW |