diff options
| author | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-06-20 00:09:05 +0000 |
|---|---|---|
| committer | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-06-20 00:09:05 +0000 |
| commit | b9ae2ccd1bb97b3e2722ff09234e2b6eb00abaed (patch) | |
| tree | c10a41f5c13b50a5039ffa8d50b94165062b8997 /third_party/WebKit/LayoutTests | |
| parent | 77819f78780eca5e509d63a6482ac44a141d1d06 (diff) | |
| download | chromium_src-b9ae2ccd1bb97b3e2722ff09234e2b6eb00abaed.zip chromium_src-b9ae2ccd1bb97b3e2722ff09234e2b6eb00abaed.tar.gz chromium_src-b9ae2ccd1bb97b3e2722ff09234e2b6eb00abaed.tar.bz2 | |
Source/WebCore: Make DOMFileSystem selectively structure clonable so it can be the body of a web intent.
https://bugs.webkit.org/show_bug.cgi?id=88267
Patch by Steve VanDeBogart <vandebo@chromium.org> on 2012-06-19
Reviewed by David Levin.
This functionality will allow FileSystem API objects to be dispatched to
web content in order to enable, for instance, an intent notifying web
content that a particular filesystem has been mounted by the local
system. The goal at this point is not to enable across-the-board
clonability, but just for handling the particular use case.
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::V8ObjectMap::Writer::writeDOMFileSystem):
(WebCore::V8ObjectMap::Serializer::writeDOMFileSystem):
(WebCore::V8ObjectMap::Serializer::doSerialize):
(WebCore::V8ObjectMap::Reader::read):
(WebCore::V8ObjectMap::Reader::readDOMFileSystem):
LayoutTests: Add filesystem regression test to check that the filesystem object is
not serializable as created by javascript.
https://bugs.webkit.org/show_bug.cgi?id=88267
Patch by Greg Billock <gbillock@google.com> on 2012-06-19
Reviewed by David Levin.
* fast/filesystem/filesystem-unserializable-expected.html: Added.
* fast/filesystem/filesystem-unserializable.html: Added.
* fast/filesystem/script-tests/filesystem-unserializable.js: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@120776 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests')
4 files changed, 61 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog index 4cb304c..f51839c 100644 --- a/third_party/WebKit/LayoutTests/ChangeLog +++ b/third_party/WebKit/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2012-06-19 Greg Billock <gbillock@google.com> + + Add filesystem regression test to check that the filesystem object is + not serializable as created by javascript. + https://bugs.webkit.org/show_bug.cgi?id=88267 + + Reviewed by David Levin. + + * fast/filesystem/filesystem-unserializable-expected.html: Added. + * fast/filesystem/filesystem-unserializable.html: Added. + * fast/filesystem/script-tests/filesystem-unserializable.js: Added. + 2012-06-19 Beth Dakin <bdakin@apple.com> Skipping failing tests to keep the bots green. Filed diff --git a/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable-expected.txt b/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable-expected.txt new file mode 100644 index 0000000..f07c8e1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable-expected.txt @@ -0,0 +1,10 @@ +This tests if the filesystem object is unserializable by default + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +DATA_CLONE_ERR: DOM Exception 25 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable.html b/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable.html new file mode 100644 index 0000000..2bc6167 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/filesystem/filesystem-unserializable.html @@ -0,0 +1,10 @@ +<html> +<head> +<script src="../js/resources/js-test-pre.js"></script> +<script src="resources/fs-test-util.js"></script> +</head> +<body> +<script src="script-tests/filesystem-unserializable.js"></script> +<script src="../js/resources/js-test-post.js"></script> +</body> +</html> diff --git a/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/filesystem-unserializable.js b/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/filesystem-unserializable.js new file mode 100644 index 0000000..da40914 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/filesystem/script-tests/filesystem-unserializable.js @@ -0,0 +1,29 @@ +description("This tests if the filesystem object is unserializable by default"); + +function errorCallback(error) +{ + testFailed("Error occurred: " + error.code); + finishJSTest(); +} + +function fileSystemCallback(fs) +{ + try { + postMessage(fs, '*'); + } catch (e) { + debug(e.message); + } + + finishJSTest(); +} + +function onmessage() +{ +} + +if (window.webkitRequestFileSystem) { + window.addEventListener('message', onmessage, false); + window.jsTestIsAsync = true; + webkitRequestFileSystem(window.TEMPORARY, 100, fileSystemCallback, errorCallback); +} else + debug("This test requires FileSystem API support."); |
