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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/observer.html

Issue 2031113002: IndexedDB Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expected files 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/LayoutTests/storage/indexeddb/observer.html
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/observer.html b/third_party/WebKit/LayoutTests/storage/indexeddb/observer.html
new file mode 100644
index 0000000000000000000000000000000000000000..a6bed80b6fa542628549f8b9a40c78c39c77c875
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/observer.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>IndexedDB: UpgradeNeeded Tests</title>
Marijn Kruisselbrink 2016/06/06 23:09:10 This seems wrong?
palakj1 2016/06/07 00:11:16 Sorry. updated.
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+
+function callback(){
+ console.log('callit');
Marijn Kruisselbrink 2016/06/06 23:09:10 Logging to the console almost never seems like the
palakj1 2016/06/07 00:11:16 Done
+}
+
+(function () {
Marijn Kruisselbrink 2016/06/06 23:09:10 Wrapping the async_test inside a (function() { ...
palakj1 2016/06/07 00:11:16 Got your point. Done.
+ async_test(function(t) {
+ var description = 'observers constructor test';
+ var dbname = location.pathname + ' - ' + description;
+ var openRequest = indexedDB.open(dbname);
+ var obs1 = new IDBObserver(callback, {transaction: true, values: true});
+ openRequest.onupgradeneeded= t.step_func(function() {
+ var db = openRequest.result;
+ db.createObjectStore('store');
+ });
+ openRequest.onsuccess = t.step_func(function() {
+ var db = openRequest.result;
+ var tx = db.transaction('store', 'readwrite');
+ obs1.observe(db,tx);
+ t.done();
+ });
+
+ }, 'observers constructor test');
+}());
+
+
Marijn Kruisselbrink 2016/06/06 23:09:10 Maybe also run the same tests from a worker contex
palakj1 2016/06/07 00:11:16 I'll work on this.
+</script>

Powered by Google App Engine
This is Rietveld 408576698