| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 xml_contents.c_str(), xml_contents.size())); | 333 xml_contents.c_str(), xml_contents.size())); |
| 334 } | 334 } |
| 335 #endif // defined(OS_MACOSX) | 335 #endif // defined(OS_MACOSX) |
| 336 | 336 |
| 337 base::FilePath GetCommonDataDir() const { | 337 base::FilePath GetCommonDataDir() const { |
| 338 return test_data_dir_.AppendASCII("api_test") | 338 return test_data_dir_.AppendASCII("api_test") |
| 339 .AppendASCII("media_galleries") | 339 .AppendASCII("media_galleries") |
| 340 .AppendASCII("common"); | 340 .AppendASCII("common"); |
| 341 } | 341 } |
| 342 | 342 |
| 343 base::FilePath GetWallpaperTestDataDir() const { |
| 344 return test_data_dir_.AppendASCII("api_test") |
| 345 .AppendASCII("wallpaper"); |
| 346 } |
| 347 |
| 343 int num_galleries() const { | 348 int num_galleries() const { |
| 344 return ensure_media_directories_exists_->num_galleries(); | 349 return ensure_media_directories_exists_->num_galleries(); |
| 345 } | 350 } |
| 346 | 351 |
| 347 int test_jpg_size() const { return test_jpg_size_; } | 352 int test_jpg_size() const { return test_jpg_size_; } |
| 348 | 353 |
| 349 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { | 354 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { |
| 350 return ensure_media_directories_exists_.get(); | 355 return ensure_media_directories_exists_.get(); |
| 351 } | 356 } |
| 352 | 357 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 565 |
| 561 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; | 566 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; |
| 562 } | 567 } |
| 563 | 568 |
| 564 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { | 569 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { |
| 565 RemoveAllGalleries(); | 570 RemoveAllGalleries(); |
| 566 MakeSingleFakeGallery(NULL); | 571 MakeSingleFakeGallery(NULL); |
| 567 | 572 |
| 568 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); | 573 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); |
| 569 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); | 574 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); |
| 575 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg")); |
| 570 | 576 |
| 571 base::ListValue custom_args; | 577 base::ListValue custom_args; |
| 572 #if defined(USE_PROPRIETARY_CODECS) | 578 #if defined(USE_PROPRIETARY_CODECS) |
| 573 custom_args.AppendBoolean(true); | 579 custom_args.AppendBoolean(true); |
| 574 #else | 580 #else |
| 575 custom_args.AppendBoolean(false); | 581 custom_args.AppendBoolean(false); |
| 576 #endif | 582 #endif |
| 577 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) | 583 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) |
| 578 << message_; | 584 << message_; |
| 579 } | 585 } |
| OLD | NEW |