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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp b/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp
index 2006d072ba171a1a80d23f96c5a0fe416f84efa7..a289f817b6f0c957d01e11f87453cf0852e31e04 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueSerializerForModulesTest.cpp
@@ -10,12 +10,12 @@
#include "bindings/core/v8/V8BindingForTesting.h"
#include "bindings/core/v8/V8DOMException.h"
#include "bindings/modules/v8/V8CryptoKey.h"
-#include "bindings/modules/v8/V8DOMFileSystem.h"
+#include "bindings/modules/v8/V8FileSystem.h"
#include "bindings/modules/v8/V8RTCCertificate.h"
#include "bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules.h"
#include "core/dom/DOMArrayBuffer.h"
#include "modules/crypto/CryptoResultImpl.h"
-#include "modules/filesystem/DOMFileSystem.h"
+#include "modules/filesystem/FileSystem.h"
#include "modules/peerconnection/RTCCertificate.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/testing/UnitTestHelpers.h"
@@ -876,11 +876,11 @@ TEST(V8ScriptValueSerializerForModulesTest, DecodeCryptoKeyInvalid) {
->IsNull());
}
-TEST(V8ScriptValueSerializerForModulesTest, RoundTripDOMFileSystem) {
+TEST(V8ScriptValueSerializerForModulesTest, RoundTripFileSystem) {
ScopedEnableV8BasedStructuredClone enable;
V8TestingScope scope;
- DOMFileSystem* fs = DOMFileSystem::create(
+ FileSystem* fs = FileSystem::create(
scope.getExecutionContext(), "http_example.com_0:Persistent",
FileSystemTypePersistent,
KURL(ParsedURLString, "filesystem:http://example.com/persistent/"));
@@ -889,22 +889,22 @@ TEST(V8ScriptValueSerializerForModulesTest, RoundTripDOMFileSystem) {
v8::Local<v8::Value> wrapper = toV8(fs, scope.getScriptState());
v8::Local<v8::Value> result = roundTrip(wrapper, scope);
ASSERT_FALSE(result.IsEmpty());
- ASSERT_TRUE(V8DOMFileSystem::hasInstance(result, scope.isolate()));
- DOMFileSystem* newFS = V8DOMFileSystem::toImpl(result.As<v8::Object>());
+ ASSERT_TRUE(V8FileSystem::hasInstance(result, scope.isolate()));
+ FileSystem* newFS = V8FileSystem::toImpl(result.As<v8::Object>());
EXPECT_EQ("http_example.com_0:Persistent", newFS->name());
EXPECT_EQ(FileSystemTypePersistent, newFS->type());
EXPECT_EQ("filesystem:http://example.com/persistent/",
newFS->rootURL().getString());
}
-TEST(V8ScriptValueSerializerForModulesTest, RoundTripDOMFileSystemNotClonable) {
+TEST(V8ScriptValueSerializerForModulesTest, RoundTripFileSystemNotClonable) {
ScopedEnableV8BasedStructuredClone enable;
V8TestingScope scope;
ExceptionState exceptionState(scope.isolate(),
ExceptionState::ExecutionContext, "Window",
"postMessage");
- DOMFileSystem* fs = DOMFileSystem::create(
+ FileSystem* fs = FileSystem::create(
scope.getExecutionContext(), "http_example.com_0:Persistent",
FileSystemTypePersistent,
KURL(ParsedURLString, "filesystem:http://example.com/persistent/0/"));
@@ -916,7 +916,7 @@ TEST(V8ScriptValueSerializerForModulesTest, RoundTripDOMFileSystemNotClonable) {
exceptionState));
}
-TEST(V8ScriptValueSerializerForModulesTest, DecodeDOMFileSystem) {
+TEST(V8ScriptValueSerializerForModulesTest, DecodeFileSystem) {
ScopedEnableV8BasedStructuredClone enable;
V8TestingScope scope;
@@ -934,15 +934,15 @@ TEST(V8ScriptValueSerializerForModulesTest, DecodeDOMFileSystem) {
// Decode test.
v8::Local<v8::Value> result =
V8ScriptValueDeserializerForModules(scriptState, input).deserialize();
- ASSERT_TRUE(V8DOMFileSystem::hasInstance(result, scope.isolate()));
- DOMFileSystem* newFS = V8DOMFileSystem::toImpl(result.As<v8::Object>());
+ ASSERT_TRUE(V8FileSystem::hasInstance(result, scope.isolate()));
+ FileSystem* newFS = V8FileSystem::toImpl(result.As<v8::Object>());
EXPECT_EQ("http_example.com_0:Persistent", newFS->name());
EXPECT_EQ(FileSystemTypePersistent, newFS->type());
EXPECT_EQ("filesystem:http://example.com/persistent/",
newFS->rootURL().getString());
}
-TEST(V8ScriptValueSerializerForModulesTest, DecodeInvalidDOMFileSystem) {
+TEST(V8ScriptValueSerializerForModulesTest, DecodeInvalidFileSystem) {
ScopedEnableV8BasedStructuredClone enable;
V8TestingScope scope;
ScriptState* scriptState = scope.getScriptState();

Powered by Google App Engine
This is Rietveld 408576698