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

Unified Diff: ppapi/tests/test_file_io.cc

Issue 18063005: Do PPB_FileIO Query and Read in the plugin process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up and add comments. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_file_io.cc
diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc
index ed2183b669afc6f4906f78d0376ce41de498d5d8..443f7866e57be06a6fb22c443ba9f7b0ab780346 100644
--- a/ppapi/tests/test_file_io.cc
+++ b/ppapi/tests/test_file_io.cc
@@ -568,10 +568,14 @@ std::string TestFileIO::TestTouchQuery() {
CHECK_CALLBACK_BEHAVIOR(callback);
ASSERT_EQ(4, callback.result());
- // last_access_time's granularity is 1 day
- // last_modified_time's granularity is 2 seconds
const PP_Time last_access_time = 123 * 24 * 3600.0;
- const PP_Time last_modified_time = 246.0;
+ // last_modified_time's granularity is 2 seconds
+ // NOTE: In NaCl on Windows, NaClDescIO uses _fstat64 to retrieve file info.
+ // This function returns strange values for very small time values (near the
+ // Unix Epoch). For a value like 246.0, it returns -1. For larger values, it
+ // returns values that are exactly an hour less. The value below is handled
+ // correctly, and is only 100 days after the start of Unix time.
+ const PP_Time last_modified_time = 100 * 24 * 3600.0;
callback.WaitForResult(file_io.Touch(last_access_time, last_modified_time,
callback.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback);

Powered by Google App Engine
This is Rietveld 408576698