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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp

Issue 2565283002: Fix webkitGetEntry for non-native files. (Closed)
Patch Set: . Created 4 years 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: third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp b/third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp
index 659dfe8ef8e09b642ec78d6dac39dc5763190651..87eae3eada1eed5fd527fcffe84ef34f1e9dcf02 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp
@@ -22,7 +22,7 @@ TEST_F(DataObjectTest, addItemWithFilenameAndNoTitle) {
String filePath = testing::blinkRootDir();
filePath.append("/Source/core/clipboard/DataObjectTest.cpp");
- m_dataObject->addFilename(filePath, String());
+ m_dataObject->addFilename(filePath, String(), "fileSystemId");
hashimoto 2016/12/12 05:55:39 Instead of adding filesystem ID to all existing te
hirono 2016/12/13 08:12:13 Done.
EXPECT_EQ(1U, m_dataObject->length());
DataObjectItem* item = m_dataObject->item(0);
@@ -34,13 +34,15 @@ TEST_F(DataObjectTest, addItemWithFilenameAndNoTitle) {
EXPECT_TRUE(file->hasBackingFile());
EXPECT_EQ(File::IsUserVisible, file->getUserVisibility());
EXPECT_EQ(filePath, file->path());
+ EXPECT_TRUE(item->hasFileSystemId());
+ EXPECT_EQ("fileSystemId", item->fileSystemId());
}
TEST_F(DataObjectTest, addItemWithFilenameAndTitle) {
String filePath = testing::blinkRootDir();
filePath.append("/Source/core/clipboard/DataObjectTest.cpp");
- m_dataObject->addFilename(filePath, "name.cpp");
+ m_dataObject->addFilename(filePath, "name.cpp", "fileSystemId");
EXPECT_EQ(1U, m_dataObject->length());
DataObjectItem* item = m_dataObject->item(0);
@@ -53,6 +55,8 @@ TEST_F(DataObjectTest, addItemWithFilenameAndTitle) {
EXPECT_EQ(File::IsUserVisible, file->getUserVisibility());
EXPECT_EQ(filePath, file->path());
EXPECT_EQ("name.cpp", file->name());
+ EXPECT_TRUE(item->hasFileSystemId());
+ EXPECT_EQ("fileSystemId", item->fileSystemId());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698