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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc

Issue 10828372: Deflakify DownloadExtensionTest by not depending on the icon loader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 27 matching lines...) Expand all
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "content/public/common/page_transition_types.h" 39 #include "content/public/common/page_transition_types.h"
40 #include "content/public/test/download_test_observer.h" 40 #include "content/public/test/download_test_observer.h"
41 #include "content/test/net/url_request_slow_download_job.h" 41 #include "content/test/net/url_request_slow_download_job.h"
42 #include "net/base/data_url.h" 42 #include "net/base/data_url.h"
43 #include "net/base/net_util.h" 43 #include "net/base/net_util.h"
44 #include "net/url_request/url_request.h" 44 #include "net/url_request/url_request.h"
45 #include "net/url_request/url_request_context.h" 45 #include "net/url_request/url_request_context.h"
46 #include "net/url_request/url_request_job.h" 46 #include "net/url_request/url_request_job.h"
47 #include "net/url_request/url_request_job_factory.h" 47 #include "net/url_request/url_request_job_factory.h"
48 #include "ui/gfx/codec/png_codec.h"
49 #include "webkit/blob/blob_data.h" 48 #include "webkit/blob/blob_data.h"
50 #include "webkit/blob/blob_storage_controller.h" 49 #include "webkit/blob/blob_storage_controller.h"
51 #include "webkit/blob/blob_url_request_job.h" 50 #include "webkit/blob/blob_url_request_job.h"
52 #include "webkit/fileapi/file_system_context.h" 51 #include "webkit/fileapi/file_system_context.h"
53 #include "webkit/fileapi/file_system_operation_interface.h" 52 #include "webkit/fileapi/file_system_operation_interface.h"
54 #include "webkit/fileapi/file_system_url.h" 53 #include "webkit/fileapi/file_system_url.h"
55 54
56 using content::BrowserContext; 55 using content::BrowserContext;
57 using content::BrowserThread; 56 using content::BrowserThread;
58 using content::DownloadItem; 57 using content::DownloadItem;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 SetUpExtensionFunction(function); 499 SetUpExtensionFunction(function);
501 scoped_ptr<base::Value> result(RunFunctionAndReturnResult(function, args)); 500 scoped_ptr<base::Value> result(RunFunctionAndReturnResult(function, args));
502 EXPECT_TRUE(result.get()); 501 EXPECT_TRUE(result.get());
503 return result.get() && result->GetAsString(result_string); 502 return result.get() && result->GetAsString(result_string);
504 } 503 }
505 504
506 std::string DownloadItemIdAsArgList(const DownloadItem* download_item) { 505 std::string DownloadItemIdAsArgList(const DownloadItem* download_item) {
507 return base::StringPrintf("[%d]", download_item->GetId()); 506 return base::StringPrintf("[%d]", download_item->GetId());
508 } 507 }
509 508
510 // Checks if a data URL encoded image is a PNG of a given size.
511 void ExpectDataURLIsPNGWithSize(const std::string& url, int expected_size) {
512 std::string mime_type;
513 std::string charset;
514 std::string data;
515 EXPECT_FALSE(url.empty());
516 EXPECT_TRUE(net::DataURL::Parse(GURL(url), &mime_type, &charset, &data));
517 EXPECT_STREQ("image/png", mime_type.c_str());
518 EXPECT_FALSE(data.empty());
519
520 if (data.empty())
521 return;
522
523 int width = -1, height = -1;
524 std::vector<unsigned char> decoded_data;
525 EXPECT_TRUE(gfx::PNGCodec::Decode(
526 reinterpret_cast<const unsigned char*>(data.c_str()), data.length(),
527 gfx::PNGCodec::FORMAT_RGBA, &decoded_data,
528 &width, &height));
529 EXPECT_EQ(expected_size, width);
530 EXPECT_EQ(expected_size, height);
531 }
532
533 const FilePath& downloads_directory() { 509 const FilePath& downloads_directory() {
534 return downloads_directory_.path(); 510 return downloads_directory_.path();
535 } 511 }
536 512
537 DownloadsEventsListener* events_listener() { return events_listener_.get(); } 513 DownloadsEventsListener* events_listener() { return events_listener_.get(); }
538 514
539 private: 515 private:
540 void SetUpExtensionFunction(UIThreadExtensionFunction* function) { 516 void SetUpExtensionFunction(UIThreadExtensionFunction* function) {
541 if (extension_) { 517 if (extension_) {
542 // Recreate the tab each time for insulation. 518 // Recreate the tab each time for insulation.
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 EXPECT_STREQ(download_extension_errors::kInvalidOperationError, 866 EXPECT_STREQ(download_extension_errors::kInvalidOperationError,
891 error.c_str()); 867 error.c_str());
892 868
893 // Calling resume on a non-existent download yields kInvalidOperationError 869 // Calling resume on a non-existent download yields kInvalidOperationError
894 error = RunFunctionAndReturnError( 870 error = RunFunctionAndReturnError(
895 new DownloadsResumeFunction(), "[-42]"); 871 new DownloadsResumeFunction(), "[-42]");
896 EXPECT_STREQ(download_extension_errors::kInvalidOperationError, 872 EXPECT_STREQ(download_extension_errors::kInvalidOperationError,
897 error.c_str()); 873 error.c_str());
898 } 874 }
899 875
876 UIThreadExtensionFunction* MockedGetFileIconFunction(
877 const FilePath& expected_path,
878 IconLoader::IconSize icon_size,
879 const std::string& response) {
880 scoped_refptr<DownloadsGetFileIconFunction> function(
881 new DownloadsGetFileIconFunction());
882 function->SetIconExtractorForTesting(new MockIconExtractorImpl(
883 expected_path, icon_size, response));
884 return function.release();
885 }
886
900 // Test downloads.getFileIcon() on in-progress, finished, cancelled and deleted 887 // Test downloads.getFileIcon() on in-progress, finished, cancelled and deleted
901 // download items. 888 // download items.
902 // The test fails under ASan, see http://crbug.com/138211 889 // The test fails under ASan, see http://crbug.com/138211
asanka 2012/08/17 20:35:36 You should re-enable these tests. The failure mode
benjhayden 2012/08/17 21:35:57 Done.
903 #if defined(ADDRESS_SANITIZER) 890 #if defined(ADDRESS_SANITIZER)
904 #define MAYBE_DownloadExtensionTest_FileIcon_Active \ 891 #define MAYBE_DownloadExtensionTest_FileIcon_Active \
905 DISABLED_DownloadExtensionTest_FileIcon_Active 892 DISABLED_DownloadExtensionTest_FileIcon_Active
906 #else 893 #else
907 #define MAYBE_DownloadExtensionTest_FileIcon_Active \ 894 #define MAYBE_DownloadExtensionTest_FileIcon_Active \
908 DownloadExtensionTest_FileIcon_Active 895 DownloadExtensionTest_FileIcon_Active
909 #endif 896 #endif
910 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, 897 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
911 MAYBE_DownloadExtensionTest_FileIcon_Active) { 898 MAYBE_DownloadExtensionTest_FileIcon_Active) {
912 DownloadItem* download_item = CreateSlowTestDownload(); 899 DownloadItem* download_item = CreateSlowTestDownload();
913 ASSERT_TRUE(download_item); 900 ASSERT_TRUE(download_item);
901 std::string args32(base::StringPrintf("[%d, {\"size\": 32}]",
902 download_item->GetId()));
903 std::string result_string;
914 904
915 // Get the icon for the in-progress download. This call should succeed even 905 // Get the icon for the in-progress download. This call should succeed even
916 // if the file type isn't registered. 906 // if the file type isn't registered.
917 std::string args = base::StringPrintf("[%d, {}]", download_item->GetId());
918 std::string result_string;
919 EXPECT_TRUE(RunFunctionAndReturnString(new DownloadsGetFileIconFunction(),
920 args, &result_string));
921
922 // Note: We are checking if the result is a Data URL that has encoded
923 // image/png data for an icon of a specific size. Of these, only the icon size
924 // is specified in the API contract. The image type (image/png) and URL type
925 // (Data) are implementation details.
926
927 // The default size for icons returned by getFileIcon() is 32x32.
928 ExpectDataURLIsPNGWithSize(result_string, 32);
929
930 // Test whether the correct path is being pased into the icon extractor. 907 // Test whether the correct path is being pased into the icon extractor.
931 FilePath expected_path(download_item->GetTargetFilePath()); 908 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
932 scoped_refptr<DownloadsGetFileIconFunction> function( 909 download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
933 new DownloadsGetFileIconFunction()); 910 base::StringPrintf("[%d, {}]", download_item->GetId()), &result_string));
934 function->SetIconExtractorForTesting(new MockIconExtractorImpl(
935 expected_path, IconLoader::NORMAL, "foo"));
936 EXPECT_TRUE(RunFunctionAndReturnString(function.release(), args,
937 &result_string));
938 911
939 // Now try a 16x16 icon. 912 // Now try a 16x16 icon.
940 args = base::StringPrintf("[%d, {\"size\": 16}]", download_item->GetId()); 913 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
941 EXPECT_TRUE(RunFunctionAndReturnString(new DownloadsGetFileIconFunction(), 914 download_item->GetTargetFilePath(), IconLoader::SMALL, "foo"),
942 args, &result_string)); 915 base::StringPrintf("[%d, {\"size\": 16}]", download_item->GetId()),
943 ExpectDataURLIsPNGWithSize(result_string, 16); 916 &result_string));
944 917
945 // Explicitly asking for 32x32 should give us a 32x32 icon. 918 // Explicitly asking for 32x32 should give us a 32x32 icon.
946 args = base::StringPrintf("[%d, {\"size\": 32}]", download_item->GetId()); 919 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
947 EXPECT_TRUE(RunFunctionAndReturnString(new DownloadsGetFileIconFunction(), 920 download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
948 args, &result_string)); 921 args32, &result_string));
949 ExpectDataURLIsPNGWithSize(result_string, 32);
950 922
951 // Finish the download and try again. 923 // Finish the download and try again.
952 FinishPendingSlowDownloads(); 924 FinishPendingSlowDownloads();
953 EXPECT_EQ(DownloadItem::COMPLETE, download_item->GetState()); 925 EXPECT_EQ(DownloadItem::COMPLETE, download_item->GetState());
954 EXPECT_TRUE(RunFunctionAndReturnString(new DownloadsGetFileIconFunction(), 926 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
955 args, &result_string)); 927 download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
956 ExpectDataURLIsPNGWithSize(result_string, 32); 928 args32, &result_string));
957 929
958 // Check the path passed to the icon extractor post-completion. 930 // Check the path passed to the icon extractor post-completion.
959 function = new DownloadsGetFileIconFunction(); 931 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
960 function->SetIconExtractorForTesting(new MockIconExtractorImpl( 932 download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
961 expected_path, IconLoader::NORMAL, "foo")); 933 args32, &result_string));
962 EXPECT_TRUE(RunFunctionAndReturnString(function.release(), args,
963 &result_string));
964 934
965 // Now create another download. 935 // Now create another download.
966 download_item = CreateSlowTestDownload(); 936 download_item = CreateSlowTestDownload();
937 args32 = base::StringPrintf("[%d, {\"size\": 32}]", download_item->GetId());
967 ASSERT_TRUE(download_item); 938 ASSERT_TRUE(download_item);
968 expected_path = download_item->GetTargetFilePath();
969 939
970 // Cancel the download. As long as the download has a target path, we should 940 // Cancel the download. As long as the download has a target path, we should
971 // be able to query the file icon. 941 // be able to query the file icon.
972 download_item->Cancel(true); 942 download_item->Cancel(true);
973 // Let cleanup complete on the FILE thread. 943 // Let cleanup complete on the FILE thread.
974 content::RunAllPendingInMessageLoop(BrowserThread::FILE); 944 content::RunAllPendingInMessageLoop(BrowserThread::FILE);
975 args = base::StringPrintf("[%d, {\"size\": 32}]", download_item->GetId());
976 EXPECT_TRUE(RunFunctionAndReturnString(new DownloadsGetFileIconFunction(),
977 args, &result_string));
978 ExpectDataURLIsPNGWithSize(result_string, 32);
979
980 // Check the path passed to the icon extractor post-cancellation. 945 // Check the path passed to the icon extractor post-cancellation.
981 function = new DownloadsGetFileIconFunction(); 946 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
982 function->SetIconExtractorForTesting(new MockIconExtractorImpl( 947 download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
983 expected_path, IconLoader::NORMAL, "foo")); 948 args32,
984 EXPECT_TRUE(RunFunctionAndReturnString(function.release(), args, 949 &result_string));
985 &result_string));
986 950
987 // Simulate an error during icon load by invoking the mock with an empty 951 // Simulate an error during icon load by invoking the mock with an empty
988 // result string. 952 // result string.
989 function = new DownloadsGetFileIconFunction(); 953 std::string error = RunFunctionAndReturnError(MockedGetFileIconFunction(
990 function->SetIconExtractorForTesting(new MockIconExtractorImpl( 954 download_item->GetTargetFilePath(), IconLoader::NORMAL, ""),
991 expected_path, IconLoader::NORMAL, "")); 955 args32);
992 std::string error = RunFunctionAndReturnError(function.release(), args);
993 EXPECT_STREQ(download_extension_errors::kIconNotFoundError, 956 EXPECT_STREQ(download_extension_errors::kIconNotFoundError,
994 error.c_str()); 957 error.c_str());
995 958
996 // Once the download item is deleted, we should return kInvalidOperationError. 959 // Once the download item is deleted, we should return kInvalidOperationError.
997 download_item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); 960 download_item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
998 error = RunFunctionAndReturnError(new DownloadsGetFileIconFunction(), args); 961 download_item = NULL;
962 error = RunFunctionAndReturnError(new DownloadsGetFileIconFunction(), args32);
999 EXPECT_STREQ(download_extension_errors::kInvalidOperationError, 963 EXPECT_STREQ(download_extension_errors::kInvalidOperationError,
1000 error.c_str()); 964 error.c_str());
1001 } 965 }
1002 966
1003 // Test that we can acquire file icons for history downloads regardless of 967 // Test that we can acquire file icons for history downloads regardless of
1004 // whether they exist or not. If the file doesn't exist we should receive a 968 // whether they exist or not. If the file doesn't exist we should receive a
1005 // generic icon from the OS/toolkit that may or may not be specific to the file 969 // generic icon from the OS/toolkit that may or may not be specific to the file
1006 // type. 970 // type.
1007 // The test fails under ASan, see http://crbug.com/138211 971 // The test fails under ASan, see http://crbug.com/138211
1008 #if defined(ADDRESS_SANITIZER) 972 #if defined(ADDRESS_SANITIZER)
(...skipping 20 matching lines...) Expand all
1029 FilePath real_path = all_downloads[0]->GetFullPath(); 993 FilePath real_path = all_downloads[0]->GetFullPath();
1030 FilePath fake_path = all_downloads[1]->GetFullPath(); 994 FilePath fake_path = all_downloads[1]->GetFullPath();
1031 995
1032 EXPECT_EQ(0, file_util::WriteFile(real_path, "", 0)); 996 EXPECT_EQ(0, file_util::WriteFile(real_path, "", 0));
1033 ASSERT_TRUE(file_util::PathExists(real_path)); 997 ASSERT_TRUE(file_util::PathExists(real_path));
1034 ASSERT_FALSE(file_util::PathExists(fake_path)); 998 ASSERT_FALSE(file_util::PathExists(fake_path));
1035 999
1036 for (DownloadManager::DownloadVector::iterator iter = all_downloads.begin(); 1000 for (DownloadManager::DownloadVector::iterator iter = all_downloads.begin();
1037 iter != all_downloads.end(); 1001 iter != all_downloads.end();
1038 ++iter) { 1002 ++iter) {
1039 std::string args(base::StringPrintf("[%d, {\"size\": 32}]",
1040 (*iter)->GetId()));
1041 std::string result_string; 1003 std::string result_string;
1042 EXPECT_TRUE(RunFunctionAndReturnString(
1043 new DownloadsGetFileIconFunction(), args, &result_string));
1044 // Note: We are checking if the result is a Data URL that has encoded
1045 // image/png data for an icon of a specific size. Of these, only the icon
1046 // size is specified in the API contract. The image type (image/png) and URL
1047 // type (Data) are implementation details.
1048 ExpectDataURLIsPNGWithSize(result_string, 32);
1049
1050 // Use a MockIconExtractorImpl to test if the correct path is being passed 1004 // Use a MockIconExtractorImpl to test if the correct path is being passed
1051 // into the DownloadFileIconExtractor. 1005 // into the DownloadFileIconExtractor.
1052 scoped_refptr<DownloadsGetFileIconFunction> function( 1006 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
1053 new DownloadsGetFileIconFunction()); 1007 (*iter)->GetFullPath(), IconLoader::NORMAL, "hello"),
1054 function->SetIconExtractorForTesting(new MockIconExtractorImpl( 1008 base::StringPrintf("[%d, {\"size\": 32}]", (*iter)->GetId()),
1055 (*iter)->GetFullPath(), IconLoader::NORMAL, "hello")); 1009 &result_string));
1056 EXPECT_TRUE(RunFunctionAndReturnString(function.release(), args,
1057 &result_string));
1058 EXPECT_STREQ("hello", result_string.c_str()); 1010 EXPECT_STREQ("hello", result_string.c_str());
1059 } 1011 }
1060 1012
1061 // The temporary files should be cleaned up when the ScopedTempDir is removed. 1013 // The temporary files should be cleaned up when the ScopedTempDir is removed.
1062 } 1014 }
1063 1015
1064 // Test passing the empty query to search(). 1016 // Test passing the empty query to search().
1065 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, 1017 IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
1066 DownloadExtensionTest_SearchEmptyQuery) { 1018 DownloadExtensionTest_SearchEmptyQuery) {
1067 ScopedCancellingItem item(CreateSlowTestDownload()); 1019 ScopedCancellingItem item(CreateSlowTestDownload());
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 new DownloadsGetFileIconFunction(), 1356 new DownloadsGetFileIconFunction(),
1405 base::StringPrintf("[%d, {}]", off_item->GetId())); 1357 base::StringPrintf("[%d, {}]", off_item->GetId()));
1406 EXPECT_STREQ(download_extension_errors::kInvalidOperationError, 1358 EXPECT_STREQ(download_extension_errors::kInvalidOperationError,
1407 error.c_str()); 1359 error.c_str());
1408 1360
1409 GoOffTheRecord(); 1361 GoOffTheRecord();
1410 1362
1411 // Do the FileIcon test for both the on- and off-items while off the record. 1363 // Do the FileIcon test for both the on- and off-items while off the record.
1412 // NOTE(benjhayden): This does not include the FileIcon test from history, 1364 // NOTE(benjhayden): This does not include the FileIcon test from history,
1413 // just active downloads. This shouldn't be a problem. 1365 // just active downloads. This shouldn't be a problem.
1414 EXPECT_TRUE(RunFunctionAndReturnString( 1366 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
1415 new DownloadsGetFileIconFunction(), 1367 on_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
1416 base::StringPrintf("[%d, {}]", on_item->GetId()), &result_string)); 1368 base::StringPrintf("[%d, {}]", on_item->GetId()), &result_string));
1417 EXPECT_TRUE(RunFunctionAndReturnString( 1369 EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
1418 new DownloadsGetFileIconFunction(), 1370 off_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),
1419 base::StringPrintf("[%d, {}]", off_item->GetId()), &result_string)); 1371 base::StringPrintf("[%d, {}]", off_item->GetId()), &result_string));
1420 1372
1421 // Do the pause/resume/cancel test for both the on- and off-items while off 1373 // Do the pause/resume/cancel test for both the on- and off-items while off
1422 // the record. 1374 // the record.
1423 EXPECT_TRUE(RunFunction(new DownloadsPauseFunction(), on_item_arg)); 1375 EXPECT_TRUE(RunFunction(new DownloadsPauseFunction(), on_item_arg));
1424 EXPECT_TRUE(on_item->IsPaused()); 1376 EXPECT_TRUE(on_item->IsPaused());
1425 EXPECT_TRUE(RunFunction(new DownloadsPauseFunction(), on_item_arg)); 1377 EXPECT_TRUE(RunFunction(new DownloadsPauseFunction(), on_item_arg));
1426 EXPECT_TRUE(on_item->IsPaused()); 1378 EXPECT_TRUE(on_item->IsPaused());
1427 EXPECT_TRUE(RunFunction(new DownloadsResumeFunction(), on_item_arg)); 1379 EXPECT_TRUE(RunFunction(new DownloadsResumeFunction(), on_item_arg));
1428 EXPECT_FALSE(on_item->IsPaused()); 1380 EXPECT_FALSE(on_item->IsPaused());
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 " \"state\": {" 2107 " \"state\": {"
2156 " \"previous\": \"in_progress\"," 2108 " \"previous\": \"in_progress\","
2157 " \"current\": \"complete\"}}]", 2109 " \"current\": \"complete\"}}]",
2158 result_id, 2110 result_id,
2159 GetFilename("on_record.txt.crdownload").c_str(), 2111 GetFilename("on_record.txt.crdownload").c_str(),
2160 GetFilename("on_record.txt").c_str()))); 2112 GetFilename("on_record.txt").c_str())));
2161 std::string disk_data; 2113 std::string disk_data;
2162 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data)); 2114 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data));
2163 EXPECT_STREQ(kPayloadData, disk_data.c_str()); 2115 EXPECT_STREQ(kPayloadData, disk_data.c_str());
2164 } 2116 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698