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

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: change loader path again Created 6 years, 9 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 | « no previous file | chrome/chrome.gyp » ('j') | chrome/chrome.isolate » ('J')
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 xml_contents.c_str(), xml_contents.size())); 362 xml_contents.c_str(), xml_contents.size()));
363 } 363 }
364 #endif // defined(OS_MACOSX) 364 #endif // defined(OS_MACOSX)
365 365
366 base::FilePath GetCommonDataDir() const { 366 base::FilePath GetCommonDataDir() const {
367 return test_data_dir_.AppendASCII("api_test") 367 return test_data_dir_.AppendASCII("api_test")
368 .AppendASCII("media_galleries") 368 .AppendASCII("media_galleries")
369 .AppendASCII("common"); 369 .AppendASCII("common");
370 } 370 }
371 371
372 base::FilePath GetWallpaperTestDataDir() const {
373 return test_data_dir_.AppendASCII("api_test")
374 .AppendASCII("wallpaper");
375 }
376
372 int num_galleries() const { 377 int num_galleries() const {
373 return ensure_media_directories_exists_->num_galleries(); 378 return ensure_media_directories_exists_->num_galleries();
374 } 379 }
375 380
376 int test_jpg_size() const { return test_jpg_size_; } 381 int test_jpg_size() const { return test_jpg_size_; }
377 382
378 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const { 383 EnsureMediaDirectoriesExists* ensure_media_directories_exists() const {
379 return ensure_media_directories_exists_.get(); 384 return ensure_media_directories_exists_.get();
380 } 385 }
381 386
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 588
584 ASSERT_TRUE(RunMediaGalleriesTest("scan")) << message_; 589 ASSERT_TRUE(RunMediaGalleriesTest("scan")) << message_;
585 } 590 }
586 591
587 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) { 592 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppBrowserTest, GetMetadata) {
588 RemoveAllGalleries(); 593 RemoveAllGalleries();
589 MakeSingleFakeGallery(); 594 MakeSingleFakeGallery();
590 595
591 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4")); 596 AddFileToSingleFakeGallery(media::GetTestDataFilePath("90rotation.mp4"));
592 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3")); 597 AddFileToSingleFakeGallery(media::GetTestDataFilePath("id3_png_test.mp3"));
598 AddFileToSingleFakeGallery(GetWallpaperTestDataDir().AppendASCII("test.jpg"));
593 599
594 base::ListValue custom_args; 600 base::ListValue custom_args;
595 #if defined(USE_PROPRIETARY_CODECS) 601 #if defined(USE_PROPRIETARY_CODECS)
596 custom_args.AppendBoolean(true); 602 custom_args.AppendBoolean(true);
597 #else 603 #else
598 custom_args.AppendBoolean(false); 604 custom_args.AppendBoolean(false);
599 #endif 605 #endif
600 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) 606 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args))
601 << message_; 607 << message_;
602 } 608 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | chrome/chrome.isolate » ('J')

Powered by Google App Engine
This is Rietveld 408576698