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

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

Issue 2119863003: Revert of DevTools: protocol setting files properly handles mimetypes and directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/Source/core/html/forms/FileInputTypeTest.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/FileInputTypeTest.cpp b/third_party/WebKit/Source/core/html/forms/FileInputTypeTest.cpp
index bee7386a187d9bf36bee38af7b869da21125bb9d..21cf25f30dd24e29d90bf684c5be6ea8a1afdd5b 100644
--- a/third_party/WebKit/Source/core/html/forms/FileInputTypeTest.cpp
+++ b/third_party/WebKit/Source/core/html/forms/FileInputTypeTest.cpp
@@ -4,7 +4,6 @@
#include "core/html/forms/FileInputType.h"
-#include "core/HTMLNames.h"
#include "core/clipboard/DataObject.h"
#include "core/dom/Document.h"
#include "core/fileapi/FileList.h"
@@ -75,36 +74,4 @@
EXPECT_EQ(String("/native/path"), fileInput->files()->item(0)->path());
}
-TEST(FileInputTypeTest, setFilesFromPaths)
-{
- Document* document = Document::create();
- HTMLInputElement* input =
- HTMLInputElement::create(*document, nullptr, false);
- InputType* fileInput = FileInputType::create(*input);
- Vector<String> paths;
- paths.append("/native/path");
- paths.append("/native/path2");
- fileInput->setFilesFromPaths(paths);
- ASSERT_EQ(1u, fileInput->files()->length());
- EXPECT_EQ(String("/native/path"), fileInput->files()->item(0)->path());
-
- // Try to upload multiple files without multipleAttr
- paths.clear();
- paths.append("/native/path1");
- paths.append("/native/path2");
- fileInput->setFilesFromPaths(paths);
- ASSERT_EQ(1u, fileInput->files()->length());
- EXPECT_EQ(String("/native/path1"), fileInput->files()->item(0)->path());
-
- // Try to upload multiple files with multipleAttr
- input->setBooleanAttribute(HTMLNames::multipleAttr, true);
- paths.clear();
- paths.append("/native/real/path1");
- paths.append("/native/real/path2");
- fileInput->setFilesFromPaths(paths);
- ASSERT_EQ(2u, fileInput->files()->length());
- EXPECT_EQ(String("/native/real/path1"), fileInput->files()->item(0)->path());
- EXPECT_EQ(String("/native/real/path2"), fileInput->files()->item(1)->path());
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/FileInputType.cpp ('k') | third_party/WebKit/Source/core/html/forms/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698