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

Unified Diff: LayoutTests/virtual/serviceworker/http/tests/serviceworker/indexeddb-expected.txt

Issue 185643009: Implement ServiceWorker::postMessage() [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass raw pointer -> PassOwnPtr Created 6 years, 9 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/virtual/serviceworker/http/tests/serviceworker/indexeddb-expected.txt
diff --git a/LayoutTests/virtual/serviceworker/http/tests/serviceworker/indexeddb-expected.txt b/LayoutTests/virtual/serviceworker/http/tests/serviceworker/indexeddb-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..75184bc5b353d41d799035782c3e55d8c2567031
--- /dev/null
+++ b/LayoutTests/virtual/serviceworker/http/tests/serviceworker/indexeddb-expected.txt
@@ -0,0 +1,30 @@
+Verify that IndexedDB is functional in a ServiceWorker
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+messageChannel = new MessageChannel()
+messageChannel.port1.onmessage = onMessageHandler
+
+navigator.serviceWorker.register('indexeddb-worker.js')
+serviceWorker.postMessage({port: messageChannel.port2}, [messageChannel.port2])
+[ServiceWorker] Preparing the database in the service worker
+[ServiceWorker] indexedDB.deleteDatabase('db')
+[ServiceWorker] indexedDB.open('db')
+[ServiceWorker] db.createObjectStore('store')
+[ServiceWorker] tx = db.transaction('store', 'readwrite')
+[ServiceWorker] store = tx.objectStore('store')
+[ServiceWorker] store.put('value', 'key')
+
+Verifying the database from the page
+
+request = indexedDB.open('db')
+db = request.result
+tx = db.transaction('store')
+store = tx.objectStore('store')
+request = store.get('key')
+PASS request.result is 'value'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Powered by Google App Engine
This is Rietveld 408576698