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

Side by Side Diff: content/common/gpu/media/jpeg_decode_accelerator_unittest.cc

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This has to be included first. 5 // This has to be included first.
6 // See http://code.google.com/p/googletest/issues/detail?id=371 6 // See http://code.google.com/p/googletest/issues/detail?id=371
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 ASSERT_NO_FATAL_FAILURE( 368 ASSERT_NO_FATAL_FAILURE(
369 ReadTestJpegImage(default_jpeg_file, image_data_1280x720_default_.get())); 369 ReadTestJpegImage(default_jpeg_file, image_data_1280x720_default_.get()));
370 370
371 image_data_invalid_.reset(new TestImageFile("failure.jpg")); 371 image_data_invalid_.reset(new TestImageFile("failure.jpg"));
372 image_data_invalid_->data_str.resize(100, 0); 372 image_data_invalid_->data_str.resize(100, 0);
373 image_data_invalid_->visible_size.SetSize(1280, 720); 373 image_data_invalid_->visible_size.SetSize(1280, 720);
374 image_data_invalid_->output_size = media::VideoFrame::AllocationSize( 374 image_data_invalid_->output_size = media::VideoFrame::AllocationSize(
375 media::PIXEL_FORMAT_I420, image_data_invalid_->visible_size); 375 media::PIXEL_FORMAT_I420, image_data_invalid_->visible_size);
376 376
377 // |user_jpeg_filenames_| may include many files and use ';' as delimiter. 377 // |user_jpeg_filenames_| may include many files and use ';' as delimiter.
378 std::vector<base::FilePath::StringType> filenames = base::SplitString( 378 std::vector<base::FilePath::StringType> filenames;
379 user_jpeg_filenames_, base::FilePath::StringType(1, ';'), 379 base::SplitString(user_jpeg_filenames_, ';', &filenames);
380 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
381 for (const auto& filename : filenames) { 380 for (const auto& filename : filenames) {
382 base::FilePath input_file = media::GetTestDataFilePath(filename); 381 base::FilePath input_file = media::GetTestDataFilePath(filename);
383 TestImageFile* image_data = new TestImageFile(filename); 382 TestImageFile* image_data = new TestImageFile(filename);
384 ASSERT_NO_FATAL_FAILURE(ReadTestJpegImage(input_file, image_data)); 383 ASSERT_NO_FATAL_FAILURE(ReadTestJpegImage(input_file, image_data));
385 image_data_user_.push_back(image_data); 384 image_data_user_.push_back(image_data);
386 } 385 }
387 } 386 }
388 387
389 void JpegDecodeAcceleratorTestEnvironment::TearDown() { 388 void JpegDecodeAcceleratorTestEnvironment::TearDown() {
390 base::DeleteFile(test_1280x720_jpeg_file_, false); 389 base::DeleteFile(test_1280x720_jpeg_file_, false);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 #endif 572 #endif
574 573
575 content::g_env = 574 content::g_env =
576 reinterpret_cast<content::JpegDecodeAcceleratorTestEnvironment*>( 575 reinterpret_cast<content::JpegDecodeAcceleratorTestEnvironment*>(
577 testing::AddGlobalTestEnvironment( 576 testing::AddGlobalTestEnvironment(
578 new content::JpegDecodeAcceleratorTestEnvironment( 577 new content::JpegDecodeAcceleratorTestEnvironment(
579 jpeg_filenames))); 578 jpeg_filenames)));
580 579
581 return RUN_ALL_TESTS(); 580 return RUN_ALL_TESTS();
582 } 581 }
OLDNEW
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/common/gpu/media/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698