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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc

Issue 191583002: Media Galleries API Metadata: Image metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
375 int num_galleries() const { 380 int num_galleries() const {
376 return ensure_media_directories_exists_->num_galleries(); 381 return ensure_media_directories_exists_->num_galleries();
377 } 382 }
378 383
379 int test_jpg_size() const { return test_jpg_size_; } 384 int test_jpg_size() const { return test_jpg_size_; }
380 385
381 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { 386 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const {
382 return ensure_media_directories_exists_.get(); 387 return ensure_media_directories_exists_.get();
383 } 388 }
384 389
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 605
601 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_; 606 ASSERT_TRUE(RunMediaGalleriesTestWithArg("tourl", custom_args)) << message_;
602 } 607 }
603 608
604 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { 609 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) {
605 RemoveAllGalleries(); 610 RemoveAllGalleries();
606 MakeSingleFakeGallery(NULL); 611 MakeSingleFakeGallery(NULL);
607 612
608 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); 613 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4"));
609 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); 614 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3"));
615 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg"));
610 616
611 base::ListValue custom_args; 617 base::ListValue custom_args;
612 #if defined(USE_PROPRIETARY_CODECS) 618 #if defined(USE_PROPRIETARY_CODECS)
613 custom_args.AppendBoolean(true); 619 custom_args.AppendBoolean(true);
614 #else 620 #else
615 custom_args.AppendBoolean(false); 621 custom_args.AppendBoolean(false);
616 #endif 622 #endif
617 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) 623 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args))
618 << message_; 624 << message_;
619 } 625 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698