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

Side by Side Diff: LayoutTests/imported/web-platform-tests/IndexedDB/abort-in-initial-upgradeneeded.html

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <!-- Submitted from TestTWF Paris -->
3 <title>Test that an abort in the initial upgradeneeded sets version back to 0</t itle>
4 <script src=../../../resources/testharness.js></script>
5 <script src=../../../resources/testharnessreport.js></script>
6 <script src=support.js></script>
7
8 <script>
9
10 var db, open_rq = createdb(async_test(), undefined, 2);
11
12 open_rq.onupgradeneeded = function(e) {
13 db = e.target.result;
14 assert_equals(db.version, 2);
15 transaction = e.target.transaction;
16 transaction.oncomplete = fail(this, "unexpected transaction.complete");
17 transaction.onabort = function(e) {
18 assert_equals(e.target.db.version, 0);
19 }
20 db.onabort = function() {}
21
22 transaction.abort();
23 }
24
25 open_rq.onerror = function(e) {
26 assert_equals(open_rq, e.target);
27 assert_equals(e.target.result, undefined);
28 assert_equals(e.target.error.name, "AbortError");
29 assert_equals(db.version, 0);
30 assert_equals(open_rq.transaction, null);
31 this.done();
32 }
33 </script>
34
35 <div id=log></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698