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

Unified Diff: Source/core/html/forms/FileInputTypeTest.cpp

Issue 884393002: Upgrade Blink to milliseconds-based last modified filetimes, part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sof-fileinfo-modtime-in-ms-1
Patch Set: Stop using time_t over getFileModificationTime(); not sound Created 5 years, 10 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
« no previous file with comments | « Source/core/html/FormDataList.cpp ('k') | Source/modules/filesystem/DOMFileSystemBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/FileInputTypeTest.cpp
diff --git a/Source/core/html/forms/FileInputTypeTest.cpp b/Source/core/html/forms/FileInputTypeTest.cpp
index e256f0bec2fbecd812d9cee7c4ac02ad02aad35d..25db7eed0dd9af1f79f3714ef30afb3edd2b9f5c 100644
--- a/Source/core/html/forms/FileInputTypeTest.cpp
+++ b/Source/core/html/forms/FileInputTypeTest.cpp
@@ -10,6 +10,8 @@
#include "core/fileapi/FileList.h"
#include "core/html/HTMLInputElement.h"
#include "core/page/DragData.h"
+#include "wtf/DateMath.h"
+
#include <gtest/gtest.h>
namespace blink {
@@ -18,16 +20,14 @@ TEST(FileInputTypeTest, createFileList)
{
Vector<FileChooserFileInfo> files;
- // Natvie file.
- files.append(FileChooserFileInfo(
- "/native/path/native-file",
- "display-name"));
+ // Native file.
+ files.append(FileChooserFileInfo("/native/path/native-file", "display-name"));
// Non-native file.
KURL url(ParsedURLStringTag(), "filesystem:http://example.com/isolated/hash/non-native-file");
FileMetadata metadata;
metadata.length = 64;
- metadata.modificationTime = 24 * 60 * 60 /* sec */;
+ metadata.modificationTimeMS = 1.0 * msPerDay + 3;
files.append(FileChooserFileInfo(url, metadata));
@@ -43,7 +43,7 @@ TEST(FileInputTypeTest, createFileList)
EXPECT_EQ("non-native-file", list->item(1)->name());
EXPECT_EQ(url, list->item(1)->fileSystemURL());
EXPECT_EQ(64u, list->item(1)->size());
- EXPECT_EQ(24 * 60 * 60 * 1000 /* ms */, list->item(1)->lastModified());
+ EXPECT_EQ(1.0 * msPerDay + 3, list->item(1)->lastModified());
}
TEST(FileInputTypeTest, ignoreDroppedNonNativeFiles)
« no previous file with comments | « Source/core/html/FormDataList.cpp ('k') | Source/modules/filesystem/DOMFileSystemBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698