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

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js

Issue 2459113002: [IDBObservers] Moving options from constructor to .observe call. (Closed)
Patch Set: change bitset to pass by value Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer-tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js
index a77f11a1f66278cb398765e54901bb6f9512cd9c..dfcf7295440e7e2788cec51475714d9e63e9bcbe 100644
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer.js
@@ -7,7 +7,7 @@ async_test(function(t) {
var dbname = location.pathname + ' - ' + 'empty transaction';
var openRequest = indexedDB.open(dbname);
var callback_count = 0;
- var obs = new IDBObserver(t.step_func(function() { callback_count++; }), {operationTypes: ['put']});
+ var obs = new IDBObserver(t.step_func(function() { callback_count++; }));
openRequest.onupgradeneeded = t.step_func(function() {
openRequest.result.createObjectStore('store');
@@ -16,7 +16,7 @@ async_test(function(t) {
var db = openRequest.result;
var tx1 = db.transaction('store', 'readwrite');
var tx2 = db.transaction('store', 'readwrite');
- obs.observe(db, tx1);
+ obs.observe(db, tx1, {operationTypes: ['put']});
tx2.objectStore('store').put(1, 1);
tx1.oncomplete = t.step_func(function() {
countCallbacks(callback_count, 0);
@@ -37,7 +37,7 @@ async_test(function(t) {
var obs;
openRequest.onupgradeneeded = t.step_func(function() {
openRequest.result.createObjectStore('store');
- obs = new IDBObserver(t.step_func(function(changes) { callback_count++; }), { operationTypes: ['put'] });
+ obs = new IDBObserver(t.step_func(function(changes) { callback_count++; }));
});
openRequest.onsuccess = t.step_func(function() {
var db = openRequest.result;
@@ -45,7 +45,7 @@ async_test(function(t) {
var tx2 = db.transaction('store', 'readwrite');
tx1.objectStore('store').get(1);
tx2.objectStore('store').put(1, 1);
- obs.observe(db, tx1);
+ obs.observe(db, tx1, { operationTypes: ['put'] });
tx1.oncomplete = t.step_func(function() {
countCallbacks(callback_count, 0);
});
@@ -62,11 +62,11 @@ async_test(function(t) {
var dbname = location.pathname + ' - ' + 'ignore observe call';
var openRequest = indexedDB.open(dbname);
var callback_count = 0;
- var obs = new IDBObserver(t.step_func(function() { callback_count++; }), { operationTypes: ['put'] });
+ var obs = new IDBObserver(t.step_func(function() { callback_count++; }));
openRequest.onupgradeneeded = t.step_func(function() {
var db = openRequest.result;
db.createObjectStore('store');
- obs.observe(db, openRequest.transaction);
+ obs.observe(db, openRequest.transaction, { operationTypes: ['put'] });
});
openRequest.onsuccess = t.step_func(function() {
var db = openRequest.result;
@@ -84,7 +84,7 @@ async_test(function(t) {
var dbname = location.pathname + ' - ' + 'abort associated transaction';
var openRequest = indexedDB.open(dbname);
var callback_count = 0;
- var obs = new IDBObserver(t.step_func(function() { callback_count++; }), { operationTypes: ['put'] });
+ var obs = new IDBObserver(t.step_func(function() { callback_count++; }));
openRequest.onupgradeneeded = t.step_func(function() {
openRequest.result.createObjectStore('store');
});
@@ -94,7 +94,7 @@ async_test(function(t) {
var tx2 = db.transaction('store', 'readwrite');
tx1.objectStore('store').get(1);
tx2.objectStore('store').put(1, 1);
- obs.observe(db, tx1);
+ obs.observe(db, tx1, { operationTypes: ['put'] });
tx1.abort();
tx1.onabort = t.step_func(function(){
@@ -113,7 +113,7 @@ async_test(function(t) {
var dbname = location.pathname + ' - ' + 'abort transaction';
var openRequest = indexedDB.open(dbname);
var callback_count = 0;
- var obs = new IDBObserver(t.step_func(function() { callback_count++; }), { operationTypes: ['put'] });
+ var obs = new IDBObserver(t.step_func(function() { callback_count++; }));
openRequest.onupgradeneeded = t.step_func(function() {
openRequest.result.createObjectStore('store');
});
@@ -125,7 +125,7 @@ async_test(function(t) {
tx1.objectStore('store').get(1);
tx2.objectStore('store').put(1, 1);
tx3.objectStore('store').put(1, 1);
- obs.observe(db, tx1);
+ obs.observe(db, tx1, { operationTypes: ['put'] });
tx2.abort();
tx1.oncomplete = t.step_func(function() {
countCallbacks(callback_count, 0);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/storage/indexeddb/resources/observer-tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698