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

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

Issue 1791623002: Revert of Media Galleries Partial Deprecation: Remove image metadata & libexif. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual revert/rebase. Created 4 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
« no previous file with comments | « build/linux/sysroot_scripts/sysroot-creator-wheezy.sh ('k') | chrome/browser_tests.isolate » ('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 <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
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
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 }
OLDNEW
« no previous file with comments | « build/linux/sysroot_scripts/sysroot-creator-wheezy.sh ('k') | chrome/browser_tests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698