| Index: webkit/fileapi/media/native_media_file_util_unittest.cc
|
| diff --git a/webkit/fileapi/media/native_media_file_util_unittest.cc b/webkit/fileapi/media/native_media_file_util_unittest.cc
|
| index 071922c8384d7dd48087df0803dfb85924835749..1c0bc4da2b0ae9eddcc7365361482ea66376b27b 100644
|
| --- a/webkit/fileapi/media/native_media_file_util_unittest.cc
|
| +++ b/webkit/fileapi/media/native_media_file_util_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/bind.h"
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "base/format_macros.h"
|
| +#include "base/location.h"
|
| #include "base/message_loop.h"
|
| #include "base/stringprintf.h"
|
| #include "base/time.h"
|
| @@ -49,10 +50,11 @@ const FilteringTestCase kFilteringTestCases[] = {
|
| { FPL("foobar.cod"), false, false }, // Unsupported media file.
|
| };
|
|
|
| -void ExpectEqHelper(const std::string& test_name,
|
| +void ExpectEqHelper(const tracked_objects::Location& location,
|
| + const std::string& test_name,
|
| base::PlatformFileError expected,
|
| base::PlatformFileError actual) {
|
| - EXPECT_EQ(expected, actual) << test_name;
|
| + EXPECT_EQ(expected, actual) << location.ToString() << ": " << test_name;
|
| }
|
|
|
| void ExpectMetadataEqHelper(const std::string& test_name,
|
| @@ -190,10 +192,10 @@ TEST_F(NativeMediaFileUtilTest, DirectoryExistsAndFileExistsFiltering) {
|
| base::StringPrintf("DirectoryExistsAndFileExistsFiltering %" PRIuS, i);
|
| if (kFilteringTestCases[i].is_directory) {
|
| operation->DirectoryExists(
|
| - url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, base::Bind(&ExpectEqHelper, FROM_HERE, test_name, expectation));
|
| } else {
|
| operation->FileExists(
|
| - url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, base::Bind(&ExpectEqHelper, FROM_HERE, test_name, expectation));
|
| }
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| @@ -242,10 +244,11 @@ TEST_F(NativeMediaFileUtilTest, CreateFileAndCreateDirectoryFiltering) {
|
| if (kFilteringTestCases[i].is_directory) {
|
| operation->CreateDirectory(
|
| url, false, false,
|
| - base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + base::Bind(&ExpectEqHelper, FROM_HERE, test_name, expectation));
|
| } else {
|
| operation->CreateFile(
|
| - url, false, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, false, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| }
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| @@ -286,7 +289,8 @@ TEST_F(NativeMediaFileUtilTest, CopySourceFiltering) {
|
| expectation = base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| }
|
| operation->Copy(
|
| - url, dest_url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, dest_url, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -348,7 +352,8 @@ TEST_F(NativeMediaFileUtilTest, CopyDestFiltering) {
|
| }
|
| }
|
| operation->Copy(
|
| - src_url, url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + src_url, url, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -388,7 +393,8 @@ TEST_F(NativeMediaFileUtilTest, MoveSourceFiltering) {
|
| expectation = base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
|
| }
|
| operation->Move(
|
| - url, dest_url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, dest_url, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -451,7 +457,8 @@ TEST_F(NativeMediaFileUtilTest, MoveDestFiltering) {
|
| }
|
| }
|
| operation->Move(
|
| - src_url, url, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + src_url, url, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -512,7 +519,8 @@ TEST_F(NativeMediaFileUtilTest, RemoveFiltering) {
|
| expectation = base::PLATFORM_FILE_ERROR_NOT_FOUND;
|
| }
|
| operation->Remove(
|
| - url, false, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, false, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -544,7 +552,8 @@ TEST_F(NativeMediaFileUtilTest, TruncateFiltering) {
|
| expectation = base::PLATFORM_FILE_ERROR_ACCESS_DENIED;
|
| }
|
| operation->Truncate(
|
| - url, 0, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, 0, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
| @@ -575,7 +584,8 @@ TEST_F(NativeMediaFileUtilTest, TouchFileFiltering) {
|
| expectation = base::PLATFORM_FILE_ERROR_FAILED;
|
| }
|
| operation->TouchFile(
|
| - url, time, time, base::Bind(&ExpectEqHelper, test_name, expectation));
|
| + url, time, time, base::Bind(&ExpectEqHelper, FROM_HERE,
|
| + test_name, expectation));
|
| MessageLoop::current()->RunUntilIdle();
|
| }
|
| }
|
|
|