Chromium Code Reviews| 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..425c1ba1838857c03b9dd8bbd7d53659aec192f8 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/observer.html |
| @@ -0,0 +1,29 @@ |
| +<!DOCTYPE html> |
| +<title>IndexedDB: Observer Tests</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script> |
|
Marijn Kruisselbrink
2016/06/08 20:44:41
Rather than duplicating the test, you can just <sc
|
| + |
| +function callback(){ |
| +} |
| + |
| +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'); |
| + |
| + |
| +</script> |