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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/IndexedDB/abort-in-initial-upgradeneeded.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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
1 <!doctype html> 1 <!doctype html>
2 <!-- Submitted from TestTWF Paris --> 2 <!-- Submitted from TestTWF Paris -->
3 <title>Test that an abort in the initial upgradeneeded sets version back to 0</t itle> 3 <title>Test that an abort in the initial upgradeneeded sets version back to 0</t itle>
4 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharness.js></script>
5 <script src=/resources/testharnessreport.js></script> 5 <script src=/resources/testharnessreport.js></script>
6 <script src=support.js></script> 6 <script src=support.js></script>
7 7
8 <script> 8 <script>
9 9
10 var db, open_rq = createdb(async_test(), undefined, 2); 10 var db, open_rq = createdb(async_test(), undefined, 2);
11 11
12 open_rq.onupgradeneeded = function(e) { 12 open_rq.onupgradeneeded = function(e) {
13 db = e.target.result; 13 db = e.target.result;
14 assert_equals(db.version, 2); 14 assert_equals(db.version, 2);
15 transaction = e.target.transaction; 15 var transaction = e.target.transaction;
16 transaction.oncomplete = fail(this, "unexpected transaction.complete"); 16 transaction.oncomplete = fail(this, "unexpected transaction.complete");
17 transaction.onabort = function(e) { 17 transaction.onabort = function(e) {
18 assert_equals(e.target.db.version, 0); 18 assert_equals(e.target.db.version, 0);
19 } 19 }
20 db.onabort = function() {} 20 db.onabort = function() {}
21 21
22 transaction.abort(); 22 transaction.abort();
23 } 23 }
24 24
25 open_rq.onerror = function(e) { 25 open_rq.onerror = function(e) {
26 assert_equals(open_rq, e.target); 26 assert_equals(open_rq, e.target);
27 assert_equals(e.target.result, undefined); 27 assert_equals(e.target.result, undefined);
28 assert_equals(e.target.error.name, "AbortError"); 28 assert_equals(e.target.error.name, "AbortError");
29 assert_equals(db.version, 0); 29 assert_equals(db.version, 0);
30 assert_equals(open_rq.transaction, null); 30 assert_equals(open_rq.transaction, null);
31 this.done(); 31 this.done();
32 } 32 }
33 </script> 33 </script>
34 34
35 <div id=log></div> 35 <div id=log></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698