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

Unified Diff: LayoutTests/storage/indexeddb/noblobs.html

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: aaaaaaaand one more nit. Created 6 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: LayoutTests/storage/indexeddb/noblobs.html
diff --git a/LayoutTests/storage/indexeddb/noblobs.html b/LayoutTests/storage/indexeddb/noblobs.html
deleted file mode 100644
index fa767fea7580aa5b5d4f402e069f61dab6743281..0000000000000000000000000000000000000000
--- a/LayoutTests/storage/indexeddb/noblobs.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<input type="file" id="fileInput" multiple></input>
-<script>
-
-description("Confirm Blob/File/FileList limitations of WebKit's IndexedDB implementation.");
-// FIXME: This verifies that blob-type data is rejected for now, rather than silently failing.
-// Tracked for the Chromium port as: http://crbug.com/108012
-
-fileInput = document.getElementById("fileInput");
-if (window.eventSender) {
- var fileRect = fileInput.getClientRects()[0];
- var targetX = fileRect.left + fileRect.width / 2;
- var targetY = fileRect.top + fileRect.height / 2;
- eventSender.beginDragWithFiles(['resources/test-data.html', 'resources/test-data.txt']);
- eventSender.mouseMoveTo(targetX, targetY);
- eventSender.mouseUp();
-}
-
-function prepareDatabase()
-{
- db = event.target.result;
- var trans = event.target.transaction;
- evalAndLog("store = db.createObjectStore('storeName')");
- evalAndLog("store.put('value', 'key')");
- trans.onerror = unexpectedErrorCallback;
- trans.onabort = unexpectedAbortCallback;
-}
-
-function testBlob()
-{
- debug("");
- debug("testBlob():");
-
- shouldBeTrue("FileReader != null");
- evalAndLog("test_content = 'This is a test. This is only a test.'");
- evalAndLog("blob = new Blob([test_content])");
- validateExceptions("blob", testFile);
-}
-
-function testFile()
-{
- debug("");
- debug("testFile():");
- evalAndLog("file = fileInput.files[0]");
- validateExceptions("file", testFileList);
-}
-
-function testFileList()
-{
- debug("");
- debug("testFileList():");
- evalAndLog("filelist = fileInput.files");
- validateExceptions("filelist", finishJSTest);
-}
-
-function validateExceptions(variable, onComplete)
-{
- debug("");
- debug("validateExceptions(" + variable + "):");
- evalAndLog("transaction = db.transaction('storeName', 'readwrite')");
- evalAndLog("store = transaction.objectStore('storeName')");
- evalAndExpectException("store.put(" + variable + ", 'key')", "DOMException.DATA_CLONE_ERR");
- evalAndExpectException("store.add(" + variable + ", 'key')", "DOMException.DATA_CLONE_ERR");
- evalAndLog("request = store.openCursor()");
- request.onsuccess = function () {
- evalAndLog("cursor = request.result");
- evalAndExpectException("cursor.update(" + variable + ")", "DOMException.DATA_CLONE_ERR");
- };
- transaction.oncomplete = onComplete;
-}
-
-if (window.eventSender) {
- indexedDBTest(prepareDatabase, testBlob);
-} else {
- alert("Select file(s) using the input control above to initiate the test");
- document.getElementById("fileInput").onchange = function() { indexedDBTest(prepareDatabase, testBlob); };
-}
-
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698