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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbtransaction-oncomplete.htm

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IDBTransaction - complete event</title>
3 <link rel="author" href="mailto:odinho@opera.com" title="Odin Hørthe Omdal">
4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 <script src="support.js"></script>
7
8 <script>
9 var db, store,
10 t = async_test(document.title, {timeout: 10000}),
11 open_rq = createdb(t),
12 stages = [];
13
14 open_rq.onupgradeneeded = function(e) {
15 stages.push("upgradeneeded");
16
17 db = e.target.result;
18 store = db.createObjectStore('store');
19
20 e.target.transaction.oncomplete = function() {
21 stages.push("complete");
22 };
23 };
24
25 open_rq.onsuccess = function(e) {
26 stages.push("success");
27
28 // Making a totally new transaction to check
29 db.transaction('store').objectStore('store').count().onsuccess = t.step_ func(function(e) {
30 assert_array_equals(stages, [ "upgradeneeded",
31 "complete",
32 "success" ]);
33 t.done();
34 });
35 // XXX: Make one with real transactions, not only open() versionchange o ne
36
37 /*db.transaction.objectStore('store').openCursor().onsuccess = function( e) {
38 stages.push("opencursor1");
39 }
40
41 store.openCursor().onsuccess = function(e) {
42 stages.push("opencursor2");
43 }
44
45 e.target.transaction.objectStore('store').openCursor().onsuccess = funct ion(e) {
46 stages.push("opencursor3");
47 }
48 */
49 }
50
51 </script>
52
53 <div id="log"></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698