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 | |
348 int num_galleries() const { | 343 int num_galleries() const { |
349 return ensure_media_directories_exists_->num_galleries(); | 344 return ensure_media_directories_exists_->num_galleries(); |
350 } | 345 } |
351 | 346 |
352 int test_jpg_size() const { return test_jpg_size_; } | 347 int test_jpg_size() const { return test_jpg_size_; } |
353 | 348 |
354 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { | 349 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { |
355 return ensure_media_directories_exists_.get(); | 350 return ensure_media_directories_exists_.get(); |
356 } | 351 } |
357 | 352 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 560 |
566 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; | 561 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; |
567 } | 562 } |
568 | 563 |
569 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { | 564 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { |
570 RemoveAllGalleries(); | 565 RemoveAllGalleries(); |
571 MakeSingleFakeGallery(NULL); | 566 MakeSingleFakeGallery(NULL); |
572 | 567 |
573 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); | 568 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); |
574 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); | 569 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); |
575 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg")); | |
576 | 570 |
577 base::ListValue custom_args; | 571 base::ListValue custom_args; |
578 #if defined(USE_PROPRIETARY_CODECS) | 572 #if defined(USE_PROPRIETARY_CODECS) |
579 custom_args.AppendBoolean(true); | 573 custom_args.AppendBoolean(true); |
580 #else | 574 #else |
581 custom_args.AppendBoolean(false); | 575 custom_args.AppendBoolean(false); |
582 #endif | 576 #endif |
583 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) | 577 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) |
584 << message_; | 578 << message_; |
585 } | 579 } |
OLD | NEW |