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

Unified Diff: Source/web/WebDragDataTest.cpp

Issue 925913002: Fixed WebDragData's wrong dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/web/WebDragDataTest.cpp
diff --git a/Source/web/WebDragDataTest.cpp b/Source/web/WebDragDataTest.cpp
index d7dd4a6c96ec44f8413b284d697108cd08b4dca3..7ba73ca264a95e423d10478c5f7fff63cda2652d 100644
--- a/Source/web/WebDragDataTest.cpp
+++ b/Source/web/WebDragDataTest.cpp
@@ -13,27 +13,27 @@ namespace blink {
TEST(WebDragDataTest, items)
{
- WebDragData data(DataObject::create());
+ RefPtrWillBeRawPtr<DataObject> dataObject = DataObject::create();
// Native file.
- data.getValue()->add(File::create("/native/path"));
+ dataObject->add(File::create("/native/path"));
// Blob file.
const RefPtr<BlobDataHandle> blobDataHandle = BlobDataHandle::create();
- data.getValue()->add(File::create("name", 0.0, blobDataHandle));
+ dataObject->add(File::create("name", 0.0, blobDataHandle));
// User visible snapshot file.
{
FileMetadata metadata;
metadata.platformPath = "/native/visible/snapshot";
- data.getValue()->add(File::createForFileSystemFile("name", metadata, File::IsUserVisible));
+ dataObject->add(File::createForFileSystemFile("name", metadata, File::IsUserVisible));
}
// Not user visible snapshot file.
{
FileMetadata metadata;
metadata.platformPath = "/native/not-visible/snapshot";
- data.getValue()->add(File::createForFileSystemFile("name", metadata, File::IsNotUserVisible));
+ dataObject->add(File::createForFileSystemFile("name", metadata, File::IsNotUserVisible));
}
// User visible file system URL file.
@@ -41,7 +41,7 @@ TEST(WebDragDataTest, items)
FileMetadata metadata;
metadata.length = 1234;
KURL url(ParsedURLStringTag(), "filesystem:http://example.com/isolated/hash/visible-non-native-file");
- data.getValue()->add(File::createForFileSystemFile(url, metadata, File::IsUserVisible));
+ dataObject->add(File::createForFileSystemFile(url, metadata, File::IsUserVisible));
}
// Not user visible file system URL file.
@@ -49,9 +49,10 @@ TEST(WebDragDataTest, items)
FileMetadata metadata;
metadata.length = 1234;
KURL url(ParsedURLStringTag(), "filesystem:http://example.com/isolated/hash/not-visible-non-native-file");
- data.getValue()->add(File::createForFileSystemFile(url, metadata, File::IsNotUserVisible));
+ dataObject->add(File::createForFileSystemFile(url, metadata, File::IsNotUserVisible));
}
+ WebDragData data = dataObject->toWebDragData();
WebVector<WebDragData::Item> items = data.items();
ASSERT_EQ(6u, items.size());

Powered by Google App Engine
This is Rietveld 408576698