Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/observer.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/observer.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/observer.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3d0f6bff962dd4d1507c7e6963ccd906f9878c95 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/observer.js |
| @@ -0,0 +1,25 @@ |
| +if (self.importScripts) { |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
It doesn't really make sense to have this file in
|
| + importScripts('../resources/fetch-test-helpers.js'); |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
After moving the file you'll have to change this t
palakj1
2016/06/09 18:13:38
Done
|
| +} |
| + |
| +function callback(){}; |
| + |
| +test(function(t) { |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
This should still be an async_test, like the one y
palakj1
2016/06/09 18:13:38
done
|
| + 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= function() { |
|
Marijn Kruisselbrink
2016/06/08 20:44:41
nit: space before =
palakj1
2016/06/09 18:13:38
Done
|
| + var db = openRequest.result; |
| + db.createObjectStore('store'); |
| + }; |
| + openRequest.onsuccess = function() { |
| + var db = openRequest.result; |
| + var tx = db.transaction('store', 'readwrite'); |
| + obs1.observe(db,tx); |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
nit: space after ,
palakj1
2016/06/09 18:13:38
Done
|
| + done(); |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
this should be t.done()
palakj1
2016/06/09 18:13:38
Done
|
| + }; |
| + |
| +}, 'observers constructor test'); |
| + |
| +// done(); |
|
Marijn Kruisselbrink
2016/06/08 20:44:40
And you'll need to uncomment this (to signal "all
palakj1
2016/06/09 18:13:38
Done
|