| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 xml_contents.c_str(), xml_contents.size())); | 363 xml_contents.c_str(), xml_contents.size())); |
| 364 } | 364 } |
| 365 #endif // defined(OS_MACOSX) | 365 #endif // defined(OS_MACOSX) |
| 366 | 366 |
| 367 base::FilePath GetCommonDataDir() const { | 367 base::FilePath GetCommonDataDir() const { |
| 368 return test_data_dir_.AppendASCII("api_test") | 368 return test_data_dir_.AppendASCII("api_test") |
| 369 .AppendASCII("media_galleries") | 369 .AppendASCII("media_galleries") |
| 370 .AppendASCII("common"); | 370 .AppendASCII("common"); |
| 371 } | 371 } |
| 372 | 372 |
| 373 base::FilePath GetWallpaperTestDataDir() const { |
| 374 return test_data_dir_.AppendASCII("api_test") |
| 375 .AppendASCII("wallpaper"); |
| 376 } |
| 377 |
| 373 int num_galleries() const { | 378 int num_galleries() const { |
| 374 return ensure_media_directories_exists_->num_galleries(); | 379 return ensure_media_directories_exists_->num_galleries(); |
| 375 } | 380 } |
| 376 | 381 |
| 377 int test_jpg_size() const { return test_jpg_size_; } | 382 int test_jpg_size() const { return test_jpg_size_; } |
| 378 | 383 |
| 379 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { | 384 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { |
| 380 return ensure_media_directories_exists_.get(); | 385 return ensure_media_directories_exists_.get(); |
| 381 } | 386 } |
| 382 | 387 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 576 |
| 572 ASSERT_TRUE(RunMediaGalleriesTest("scan")) << message_; | 577 ASSERT_TRUE(RunMediaGalleriesTest("scan")) << message_; |
| 573 } | 578 } |
| 574 | 579 |
| 575 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { | 580 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { |
| 576 RemoveAllGalleries(); | 581 RemoveAllGalleries(); |
| 577 MakeSingleFakeGallery(); | 582 MakeSingleFakeGallery(); |
| 578 | 583 |
| 579 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); | 584 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); |
| 580 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); | 585 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); |
| 586 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg")); |
| 581 | 587 |
| 582 base::ListValue custom_args; | 588 base::ListValue custom_args; |
| 583 #if defined(USE_PROPRIETARY_CODECS) | 589 #if defined(USE_PROPRIETARY_CODECS) |
| 584 custom_args.AppendBoolean(true); | 590 custom_args.AppendBoolean(true); |
| 585 #else | 591 #else |
| 586 custom_args.AppendBoolean(false); | 592 custom_args.AppendBoolean(false); |
| 587 #endif | 593 #endif |
| 588 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) | 594 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) |
| 589 << message_; | 595 << message_; |
| 590 } | 596 } |
| OLD | NEW |