<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195321] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195321">195321</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-01-19 15:41:11 -0800 (Tue, 19 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Split all storage/indexeddb/modern tests into separate HTML + JS format.
https://bugs.webkit.org/show_bug.cgi?id=153251

Reviewed by Sam Weinig.

* storage/indexeddb/modern/abort-requests-cancelled-expected.txt:
* storage/indexeddb/modern/abort-requests-cancelled.html:
* storage/indexeddb/modern/aborted-put-expected.txt:
* storage/indexeddb/modern/aborted-put.html:
* storage/indexeddb/modern/autoincrement-abort-expected.txt:
* storage/indexeddb/modern/autoincrement-abort.html:
* storage/indexeddb/modern/basic-add-expected.txt:
* storage/indexeddb/modern/basic-add.html:
* storage/indexeddb/modern/basic-put-expected.txt:
* storage/indexeddb/modern/basic-put.html:
* storage/indexeddb/modern/create-index-failures-expected.txt:
* storage/indexeddb/modern/create-index-failures.html:
* storage/indexeddb/modern/createobjectstore-basic-expected.txt:
* storage/indexeddb/modern/createobjectstore-basic.html:
* storage/indexeddb/modern/createobjectstore-failures-expected.txt:
* storage/indexeddb/modern/createobjectstore-failures.html:
* storage/indexeddb/modern/cursor-1-expected.txt:
* storage/indexeddb/modern/cursor-1.html:
* storage/indexeddb/modern/cursor-2-expected.txt:
* storage/indexeddb/modern/cursor-2.html:
* storage/indexeddb/modern/cursor-3-expected.txt:
* storage/indexeddb/modern/cursor-3.html:
* storage/indexeddb/modern/cursor-4-expected.txt:
* storage/indexeddb/modern/cursor-4.html:
* storage/indexeddb/modern/cursor-5-expected.txt:
* storage/indexeddb/modern/cursor-5.html:
* storage/indexeddb/modern/cursor-6-expected.txt:
* storage/indexeddb/modern/cursor-6.html:
* storage/indexeddb/modern/cursor-7-expected.txt:
* storage/indexeddb/modern/cursor-7.html:
* storage/indexeddb/modern/cursor-8-expected.txt:
* storage/indexeddb/modern/cursor-8.html:
* storage/indexeddb/modern/date-basic-expected.txt:
* storage/indexeddb/modern/date-basic.html:
* storage/indexeddb/modern/deletedatabase-1-expected.txt:
* storage/indexeddb/modern/deletedatabase-1.html:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:
* storage/indexeddb/modern/deletedatabase-2.html:
* storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt:
* storage/indexeddb/modern/deletedatabase-null-name-exception.html:
* storage/indexeddb/modern/deletedatabase-request-event-expected.txt:
* storage/indexeddb/modern/deletedatabase-request-event.html:
* storage/indexeddb/modern/deletedatabase-request-expected.txt:
* storage/indexeddb/modern/deletedatabase-request.html:
* storage/indexeddb/modern/deleteindex-1-expected.txt:
* storage/indexeddb/modern/deleteindex-1.html:
* storage/indexeddb/modern/deleteindex-2-expected.txt:
* storage/indexeddb/modern/deleteindex-2.html:
* storage/indexeddb/modern/deleteobjectstore-1-expected.txt:
* storage/indexeddb/modern/deleteobjectstore-1.html:
* storage/indexeddb/modern/double-abort-expected.txt:
* storage/indexeddb/modern/double-abort.html:
* storage/indexeddb/modern/double-open-expected.txt:
* storage/indexeddb/modern/double-open.html:
* storage/indexeddb/modern/get-index-failures-expected.txt:
* storage/indexeddb/modern/get-index-failures.html:
* storage/indexeddb/modern/get-keyrange-expected.txt:
* storage/indexeddb/modern/get-keyrange.html:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
* storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
* storage/indexeddb/modern/idbdatabase-transaction-failures.html:
* storage/indexeddb/modern/idbindex-properties-basic-expected.txt:
* storage/indexeddb/modern/idbindex-properties-basic.html:
* storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-clear-1.html:
* storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt:
* storage/indexeddb/modern/idbobjectstore-clear-2.html:
* storage/indexeddb/modern/idbobjectstore-count-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-count-1.html:
* storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-count-failures.html:
* storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-1.html:
* storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-2.html:
* storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-failures.html:
* storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-get-failures.html:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:
* storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
* storage/indexeddb/modern/idbtransaction-objectstore-failures.html:
* storage/indexeddb/modern/index-1-expected.txt:
* storage/indexeddb/modern/index-1.html:
* storage/indexeddb/modern/index-2-expected.txt:
* storage/indexeddb/modern/index-2.html:
* storage/indexeddb/modern/index-3-expected.txt:
* storage/indexeddb/modern/index-3.html:
* storage/indexeddb/modern/index-4-expected.txt:
* storage/indexeddb/modern/index-4.html:
* storage/indexeddb/modern/index-5-expected.txt:
* storage/indexeddb/modern/index-5.html:
* storage/indexeddb/modern/index-cursor-1-expected.txt:
* storage/indexeddb/modern/index-cursor-1.html:
* storage/indexeddb/modern/index-cursor-2-expected.txt:
* storage/indexeddb/modern/index-cursor-2.html:
* storage/indexeddb/modern/index-cursor-3-expected.txt:
* storage/indexeddb/modern/index-cursor-3.html:
* storage/indexeddb/modern/index-get-count-basic-expected.txt:
* storage/indexeddb/modern/index-get-count-basic.html:
* storage/indexeddb/modern/index-get-count-failures-expected.txt:
* storage/indexeddb/modern/index-get-count-failures.html:
* storage/indexeddb/modern/keypath-basic-expected.txt:
* storage/indexeddb/modern/keypath-basic.html:
* storage/indexeddb/modern/objectstore-attributes-expected.txt:
* storage/indexeddb/modern/objectstore-attributes.html:
* storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt:
* storage/indexeddb/modern/objectstore-cursor-advance-failures.html:
* storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt:
* storage/indexeddb/modern/objectstore-cursor-continue-failures.html:
* storage/indexeddb/modern/opencursor-failures-expected.txt:
* storage/indexeddb/modern/opencursor-failures.html:
* storage/indexeddb/modern/opendatabase-request-event-expected.txt:
* storage/indexeddb/modern/opendatabase-request-event.html:
* storage/indexeddb/modern/opendatabase-request-expected.txt:
* storage/indexeddb/modern/opendatabase-request.html:
* storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt:
* storage/indexeddb/modern/opendatabase-success-after-versionchange.html:
* storage/indexeddb/modern/opendatabase-versions-expected.txt:
* storage/indexeddb/modern/opendatabase-versions.html:
* storage/indexeddb/modern/request-readystate-expected.txt:
* storage/indexeddb/modern/request-readystate.html:
* storage/indexeddb/modern/resources/abort-requests-cancelled.js: Copied from LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html.
* storage/indexeddb/modern/resources/aborted-put.js: Copied from LayoutTests/storage/indexeddb/modern/aborted-put.html.
* storage/indexeddb/modern/resources/autoincrement-abort.js: Copied from LayoutTests/storage/indexeddb/modern/autoincrement-abort.html.
* storage/indexeddb/modern/resources/basic-add.js: Copied from LayoutTests/storage/indexeddb/modern/basic-add.html.
* storage/indexeddb/modern/resources/basic-put.js: Copied from LayoutTests/storage/indexeddb/modern/basic-put.html.
* storage/indexeddb/modern/resources/create-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/create-index-failures.html.
* storage/indexeddb/modern/resources/createobjectstore-basic.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html.
* storage/indexeddb/modern/resources/createobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html.
* storage/indexeddb/modern/resources/cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-1.html.
* storage/indexeddb/modern/resources/cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-2.html.
* storage/indexeddb/modern/resources/cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-3.html.
* storage/indexeddb/modern/resources/cursor-4.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-4.html.
* storage/indexeddb/modern/resources/cursor-5.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-5.html.
* storage/indexeddb/modern/resources/cursor-6.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-6.html.
* storage/indexeddb/modern/resources/cursor-7.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-7.html.
* storage/indexeddb/modern/resources/cursor-8.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-8.html.
* storage/indexeddb/modern/resources/date-basic.js: Copied from LayoutTests/storage/indexeddb/modern/date-basic.html.
* storage/indexeddb/modern/resources/deletedatabase-1.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-1.html.
* storage/indexeddb/modern/resources/deletedatabase-2.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-2.html.
* storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js: Added.
* storage/indexeddb/modern/resources/deletedatabase-request-event.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html.
* storage/indexeddb/modern/resources/deletedatabase-request.js: Added.
* storage/indexeddb/modern/resources/deleteindex-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-1.html.
* storage/indexeddb/modern/resources/deleteindex-2.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-2.html.
* storage/indexeddb/modern/resources/deleteobjectstore-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html.
* storage/indexeddb/modern/resources/double-abort.js: Copied from LayoutTests/storage/indexeddb/modern/double-abort.html.
* storage/indexeddb/modern/resources/double-open.js: Added.
* storage/indexeddb/modern/resources/get-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/get-index-failures.html.
* storage/indexeddb/modern/resources/get-keyrange.js: Copied from LayoutTests/storage/indexeddb/modern/get-keyrange.html.
* storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html.
* storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html.
* storage/indexeddb/modern/resources/idbindex-properties-basic.js: Copied from LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html.
* storage/indexeddb/modern/resources/idbobjectstore-clear-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html.
* storage/indexeddb/modern/resources/idbobjectstore-clear-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html.
* storage/indexeddb/modern/resources/idbobjectstore-count-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html.
* storage/indexeddb/modern/resources/idbobjectstore-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html.
* storage/indexeddb/modern/resources/idbobjectstore-delete-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html.
* storage/indexeddb/modern/resources/idbobjectstore-delete-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html.
* storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html.
* storage/indexeddb/modern/resources/idbobjectstore-get-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html.
* storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html.
* storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js: Added.
* storage/indexeddb/modern/resources/index-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-1.html.
* storage/indexeddb/modern/resources/index-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-2.html.
* storage/indexeddb/modern/resources/index-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-3.html.
* storage/indexeddb/modern/resources/index-4.js: Copied from LayoutTests/storage/indexeddb/modern/index-4.html.
* storage/indexeddb/modern/resources/index-5.js: Copied from LayoutTests/storage/indexeddb/modern/index-5.html.
* storage/indexeddb/modern/resources/index-cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-1.html.
* storage/indexeddb/modern/resources/index-cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-2.html.
* storage/indexeddb/modern/resources/index-cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-3.html.
* storage/indexeddb/modern/resources/index-get-count-basic.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-basic.html.
* storage/indexeddb/modern/resources/index-get-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-failures.html.
* storage/indexeddb/modern/resources/keypath-basic.js: Copied from LayoutTests/storage/indexeddb/modern/keypath-basic.html.
* storage/indexeddb/modern/resources/objectstore-attributes.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-attributes.html.
* storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html.
* storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html.
* storage/indexeddb/modern/resources/opencursor-failures.js: Copied from LayoutTests/storage/indexeddb/modern/opencursor-failures.html.
* storage/indexeddb/modern/resources/opendatabase-request-event.js: Added.
* storage/indexeddb/modern/resources/opendatabase-request.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-request.html.
* storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html.
* storage/indexeddb/modern/resources/opendatabase-versions.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-versions.html.
* storage/indexeddb/modern/resources/request-readystate.js: Added.
* storage/indexeddb/modern/resources/transaction-scheduler-1.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html.
* storage/indexeddb/modern/resources/transaction-scheduler-2.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html.
* storage/indexeddb/modern/resources/transaction-scheduler-3.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html.
* storage/indexeddb/modern/resources/transaction-scheduler-5.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html.
* storage/indexeddb/modern/resources/transaction-scheduler-6.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html.
* storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html:
* storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html.
* storage/indexeddb/modern/resources/versionchange-event.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-event.html.
* storage/indexeddb/modern/transaction-scheduler-1-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-1.html:
* storage/indexeddb/modern/transaction-scheduler-2-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-2.html:
* storage/indexeddb/modern/transaction-scheduler-3-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-3.html:
* storage/indexeddb/modern/transaction-scheduler-5-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-5.html:
* storage/indexeddb/modern/transaction-scheduler-6-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-6.html:
* storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt:
* storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt:
* storage/indexeddb/modern/versionchange-abort-then-reopen.html:
* storage/indexeddb/modern/versionchange-event-expected.txt:
* storage/indexeddb/modern/versionchange-event.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledhtml">trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortedputexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernabortedputhtml">trunk/LayoutTests/storage/indexeddb/modern/aborted-put.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernautoincrementabortexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernautoincrementaborthtml">trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbasicaddexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/basic-add-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbasicaddhtml">trunk/LayoutTests/storage/indexeddb/modern/basic-add.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbasicputexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/basic-put-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernbasicputhtml">trunk/LayoutTests/storage/indexeddb/modern/basic-put.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateindexfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/create-index-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateindexfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/create-index-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateobjectstorebasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateobjectstorebasichtml">trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor1html">trunk/LayoutTests/storage/indexeddb/modern/cursor-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor2html">trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor3expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor3html">trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor4expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor4html">trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor5expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor5html">trunk/LayoutTests/storage/indexeddb/modern/cursor-5.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor6expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-6-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor6html">trunk/LayoutTests/storage/indexeddb/modern/cursor-6.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor7expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-7-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor7html">trunk/LayoutTests/storage/indexeddb/modern/cursor-7.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor8expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/cursor-8-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderncursor8html">trunk/LayoutTests/storage/indexeddb/modern/cursor-8.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndatebasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/date-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndatebasichtml">trunk/LayoutTests/storage/indexeddb/modern/date-basic.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabase1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabase1html">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabase2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabase2html">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabasenullnameexceptionexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabasenullnameexceptionhtml">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesteventexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesteventhtml">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequestexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesthtml">trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteindex1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteindex1html">trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteindex2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteindex2html">trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1html">trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndoubleabortexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndoubleaborthtml">trunk/LayoutTests/storage/indexeddb/modern/double-abort.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndoubleopenexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/double-open-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderndoubleopenhtml">trunk/LayoutTests/storage/indexeddb/modern/double-open.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetindexfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/get-index-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetindexfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/get-index-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetkeyrangeexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderngetkeyrangehtml">trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbindexpropertiesbasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbindexpropertiesbasichtml">trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstorecount1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstorecount1html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstorecountfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstorecountfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete1html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete2html">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredeletefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoredeletefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex1html">trunk/LayoutTests/storage/indexeddb/modern/index-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex2html">trunk/LayoutTests/storage/indexeddb/modern/index-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex3expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex3html">trunk/LayoutTests/storage/indexeddb/modern/index-3.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex4expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex4html">trunk/LayoutTests/storage/indexeddb/modern/index-4.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex5expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindex5html">trunk/LayoutTests/storage/indexeddb/modern/index-5.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor1html">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor2html">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor3expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexcursor3html">trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexgetcountbasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexgetcountbasichtml">trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexgetcountfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernindexgetcountfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernkeypathbasicexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/keypath-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernkeypathbasichtml">trunk/LayoutTests/storage/indexeddb/modern/keypath-basic.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstoreattributesexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstoreattributeshtml">trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorecursoradvancefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorecursoradvancefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorecursorcontinuefailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernobjectstorecursorcontinuefailureshtml">trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopencursorfailuresexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopencursorfailureshtml">trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequestexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesthtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabasesuccessafterversionchangeexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabasesuccessafterversionchangehtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaseversionsexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaseversionshtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernrequestreadystateexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/request-readystate-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernrequestreadystatehtml">trunk/LayoutTests/storage/indexeddb/modern/request-readystate.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionsstoponnavigation2html">trunk/LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler1expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler1html">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler2expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler2html">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler3expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler3html">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler5expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler5html">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler6expectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionscheduler6html">trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmoderntransactionsstoponnavigationexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernversionchangeabortthenreopenexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernversionchangeabortthenreopenhtml">trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernversionchangeeventexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernversionchangeeventhtml">trunk/LayoutTests/storage/indexeddb/modern/versionchange-event.html</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesabortrequestscancelledjs">trunk/LayoutTests/storage/indexeddb/modern/resources/abort-requests-cancelled.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesabortedputjs">trunk/LayoutTests/storage/indexeddb/modern/resources/aborted-put.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesautoincrementabortjs">trunk/LayoutTests/storage/indexeddb/modern/resources/autoincrement-abort.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesbasicaddjs">trunk/LayoutTests/storage/indexeddb/modern/resources/basic-add.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesbasicputjs">trunk/LayoutTests/storage/indexeddb/modern/resources/basic-put.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescreateindexfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/create-index-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescreateobjectstorebasicjs">trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-basic.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescreateobjectstorefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor1js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor2js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor3js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-3.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor4js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-4.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor5js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-5.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor6js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-6.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor7js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-7.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcescursor8js">trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-8.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdatebasicjs">trunk/LayoutTests/storage/indexeddb/modern/resources/date-basic.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabase1js">trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabase2js">trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabasenullnameexceptionjs">trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabaserequesteventjs">trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request-event.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabaserequestjs">trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeleteindex1js">trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeleteindex2js">trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdeleteobjectstore1js">trunk/LayoutTests/storage/indexeddb/modern/resources/deleteobjectstore-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdoubleabortjs">trunk/LayoutTests/storage/indexeddb/modern/resources/double-abort.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesdoubleopenjs">trunk/LayoutTests/storage/indexeddb/modern/resources/double-open.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesgetindexfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/get-index-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesgetkeyrangejs">trunk/LayoutTests/storage/indexeddb/modern/resources/get-keyrange.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbdatabasedeleteobjectstorefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbdatabasetransactionfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbindexpropertiesbasicjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbindex-properties-basic.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreclear1js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreclear2js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstorecount1js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstorecountfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredelete1js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredelete2js">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredeletefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoregetfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-get-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreputandclearfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesidbtransactionobjectstorefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindex1js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindex2js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindex3js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-3.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindex4js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-4.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindex5js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-5.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor1js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor2js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor3js">trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-3.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindexgetcountbasicjs">trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-basic.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesindexgetcountfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourceskeypathbasicjs">trunk/LayoutTests/storage/indexeddb/modern/resources/keypath-basic.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesobjectstoreattributesjs">trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-attributes.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorecursoradvancefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorecursorcontinuefailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesopencursorfailuresjs">trunk/LayoutTests/storage/indexeddb/modern/resources/opencursor-failures.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaserequesteventjs">trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request-event.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaserequestjs">trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesopendatabasesuccessafterversionchangejs">trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaseversionsjs">trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-versions.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesrequestreadystatejs">trunk/LayoutTests/storage/indexeddb/modern/resources/request-readystate.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler1js">trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-1.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler2js">trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-2.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler3js">trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-3.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler5js">trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-5.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler6js">trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-6.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesversionchangeabortthenreopenjs">trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesversionchangeeventjs">trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-event.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/ChangeLog        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,220 @@
</span><ins>+2016-01-19  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Split all storage/indexeddb/modern tests into separate HTML + JS format.
+        https://bugs.webkit.org/show_bug.cgi?id=153251
+
+        Reviewed by Sam Weinig.
+
+        * storage/indexeddb/modern/abort-requests-cancelled-expected.txt:
+        * storage/indexeddb/modern/abort-requests-cancelled.html:
+        * storage/indexeddb/modern/aborted-put-expected.txt:
+        * storage/indexeddb/modern/aborted-put.html:
+        * storage/indexeddb/modern/autoincrement-abort-expected.txt:
+        * storage/indexeddb/modern/autoincrement-abort.html:
+        * storage/indexeddb/modern/basic-add-expected.txt:
+        * storage/indexeddb/modern/basic-add.html:
+        * storage/indexeddb/modern/basic-put-expected.txt:
+        * storage/indexeddb/modern/basic-put.html:
+        * storage/indexeddb/modern/create-index-failures-expected.txt:
+        * storage/indexeddb/modern/create-index-failures.html:
+        * storage/indexeddb/modern/createobjectstore-basic-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-basic.html:
+        * storage/indexeddb/modern/createobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-failures.html:
+        * storage/indexeddb/modern/cursor-1-expected.txt:
+        * storage/indexeddb/modern/cursor-1.html:
+        * storage/indexeddb/modern/cursor-2-expected.txt:
+        * storage/indexeddb/modern/cursor-2.html:
+        * storage/indexeddb/modern/cursor-3-expected.txt:
+        * storage/indexeddb/modern/cursor-3.html:
+        * storage/indexeddb/modern/cursor-4-expected.txt:
+        * storage/indexeddb/modern/cursor-4.html:
+        * storage/indexeddb/modern/cursor-5-expected.txt:
+        * storage/indexeddb/modern/cursor-5.html:
+        * storage/indexeddb/modern/cursor-6-expected.txt:
+        * storage/indexeddb/modern/cursor-6.html:
+        * storage/indexeddb/modern/cursor-7-expected.txt:
+        * storage/indexeddb/modern/cursor-7.html:
+        * storage/indexeddb/modern/cursor-8-expected.txt:
+        * storage/indexeddb/modern/cursor-8.html:
+        * storage/indexeddb/modern/date-basic-expected.txt:
+        * storage/indexeddb/modern/date-basic.html:
+        * storage/indexeddb/modern/deletedatabase-1-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-1.html:
+        * storage/indexeddb/modern/deletedatabase-2-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-2.html:
+        * storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-null-name-exception.html:
+        * storage/indexeddb/modern/deletedatabase-request-event-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-request-event.html:
+        * storage/indexeddb/modern/deletedatabase-request-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-request.html:
+        * storage/indexeddb/modern/deleteindex-1-expected.txt:
+        * storage/indexeddb/modern/deleteindex-1.html:
+        * storage/indexeddb/modern/deleteindex-2-expected.txt:
+        * storage/indexeddb/modern/deleteindex-2.html:
+        * storage/indexeddb/modern/deleteobjectstore-1-expected.txt:
+        * storage/indexeddb/modern/deleteobjectstore-1.html:
+        * storage/indexeddb/modern/double-abort-expected.txt:
+        * storage/indexeddb/modern/double-abort.html:
+        * storage/indexeddb/modern/double-open-expected.txt:
+        * storage/indexeddb/modern/double-open.html:
+        * storage/indexeddb/modern/get-index-failures-expected.txt:
+        * storage/indexeddb/modern/get-index-failures.html:
+        * storage/indexeddb/modern/get-keyrange-expected.txt:
+        * storage/indexeddb/modern/get-keyrange.html:
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
+        * storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-transaction-failures.html:
+        * storage/indexeddb/modern/idbindex-properties-basic-expected.txt:
+        * storage/indexeddb/modern/idbindex-properties-basic.html:
+        * storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-1.html:
+        * storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-2.html:
+        * storage/indexeddb/modern/idbobjectstore-count-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-1.html:
+        * storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-1.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-2.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-get-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures.html:
+        * storage/indexeddb/modern/index-1-expected.txt:
+        * storage/indexeddb/modern/index-1.html:
+        * storage/indexeddb/modern/index-2-expected.txt:
+        * storage/indexeddb/modern/index-2.html:
+        * storage/indexeddb/modern/index-3-expected.txt:
+        * storage/indexeddb/modern/index-3.html:
+        * storage/indexeddb/modern/index-4-expected.txt:
+        * storage/indexeddb/modern/index-4.html:
+        * storage/indexeddb/modern/index-5-expected.txt:
+        * storage/indexeddb/modern/index-5.html:
+        * storage/indexeddb/modern/index-cursor-1-expected.txt:
+        * storage/indexeddb/modern/index-cursor-1.html:
+        * storage/indexeddb/modern/index-cursor-2-expected.txt:
+        * storage/indexeddb/modern/index-cursor-2.html:
+        * storage/indexeddb/modern/index-cursor-3-expected.txt:
+        * storage/indexeddb/modern/index-cursor-3.html:
+        * storage/indexeddb/modern/index-get-count-basic-expected.txt:
+        * storage/indexeddb/modern/index-get-count-basic.html:
+        * storage/indexeddb/modern/index-get-count-failures-expected.txt:
+        * storage/indexeddb/modern/index-get-count-failures.html:
+        * storage/indexeddb/modern/keypath-basic-expected.txt:
+        * storage/indexeddb/modern/keypath-basic.html:
+        * storage/indexeddb/modern/objectstore-attributes-expected.txt:
+        * storage/indexeddb/modern/objectstore-attributes.html:
+        * storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-advance-failures.html:
+        * storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-continue-failures.html:
+        * storage/indexeddb/modern/opencursor-failures-expected.txt:
+        * storage/indexeddb/modern/opencursor-failures.html:
+        * storage/indexeddb/modern/opendatabase-request-event-expected.txt:
+        * storage/indexeddb/modern/opendatabase-request-event.html:
+        * storage/indexeddb/modern/opendatabase-request-expected.txt:
+        * storage/indexeddb/modern/opendatabase-request.html:
+        * storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt:
+        * storage/indexeddb/modern/opendatabase-success-after-versionchange.html:
+        * storage/indexeddb/modern/opendatabase-versions-expected.txt:
+        * storage/indexeddb/modern/opendatabase-versions.html:
+        * storage/indexeddb/modern/request-readystate-expected.txt:
+        * storage/indexeddb/modern/request-readystate.html:
+        * storage/indexeddb/modern/resources/abort-requests-cancelled.js: Copied from LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html.
+        * storage/indexeddb/modern/resources/aborted-put.js: Copied from LayoutTests/storage/indexeddb/modern/aborted-put.html.
+        * storage/indexeddb/modern/resources/autoincrement-abort.js: Copied from LayoutTests/storage/indexeddb/modern/autoincrement-abort.html.
+        * storage/indexeddb/modern/resources/basic-add.js: Copied from LayoutTests/storage/indexeddb/modern/basic-add.html.
+        * storage/indexeddb/modern/resources/basic-put.js: Copied from LayoutTests/storage/indexeddb/modern/basic-put.html.
+        * storage/indexeddb/modern/resources/create-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/create-index-failures.html.
+        * storage/indexeddb/modern/resources/createobjectstore-basic.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html.
+        * storage/indexeddb/modern/resources/createobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html.
+        * storage/indexeddb/modern/resources/cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-1.html.
+        * storage/indexeddb/modern/resources/cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-2.html.
+        * storage/indexeddb/modern/resources/cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-3.html.
+        * storage/indexeddb/modern/resources/cursor-4.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-4.html.
+        * storage/indexeddb/modern/resources/cursor-5.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-5.html.
+        * storage/indexeddb/modern/resources/cursor-6.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-6.html.
+        * storage/indexeddb/modern/resources/cursor-7.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-7.html.
+        * storage/indexeddb/modern/resources/cursor-8.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-8.html.
+        * storage/indexeddb/modern/resources/date-basic.js: Copied from LayoutTests/storage/indexeddb/modern/date-basic.html.
+        * storage/indexeddb/modern/resources/deletedatabase-1.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-1.html.
+        * storage/indexeddb/modern/resources/deletedatabase-2.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-2.html.
+        * storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js: Added.
+        * storage/indexeddb/modern/resources/deletedatabase-request-event.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html.
+        * storage/indexeddb/modern/resources/deletedatabase-request.js: Added.
+        * storage/indexeddb/modern/resources/deleteindex-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-1.html.
+        * storage/indexeddb/modern/resources/deleteindex-2.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-2.html.
+        * storage/indexeddb/modern/resources/deleteobjectstore-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html.
+        * storage/indexeddb/modern/resources/double-abort.js: Copied from LayoutTests/storage/indexeddb/modern/double-abort.html.
+        * storage/indexeddb/modern/resources/double-open.js: Added.
+        * storage/indexeddb/modern/resources/get-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/get-index-failures.html.
+        * storage/indexeddb/modern/resources/get-keyrange.js: Copied from LayoutTests/storage/indexeddb/modern/get-keyrange.html.
+        * storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html.
+        * storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html.
+        * storage/indexeddb/modern/resources/idbindex-properties-basic.js: Copied from LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-count-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-get-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html.
+        * storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js: Added.
+        * storage/indexeddb/modern/resources/index-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-1.html.
+        * storage/indexeddb/modern/resources/index-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-2.html.
+        * storage/indexeddb/modern/resources/index-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-3.html.
+        * storage/indexeddb/modern/resources/index-4.js: Copied from LayoutTests/storage/indexeddb/modern/index-4.html.
+        * storage/indexeddb/modern/resources/index-5.js: Copied from LayoutTests/storage/indexeddb/modern/index-5.html.
+        * storage/indexeddb/modern/resources/index-cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-1.html.
+        * storage/indexeddb/modern/resources/index-cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-2.html.
+        * storage/indexeddb/modern/resources/index-cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-3.html.
+        * storage/indexeddb/modern/resources/index-get-count-basic.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-basic.html.
+        * storage/indexeddb/modern/resources/index-get-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-failures.html.
+        * storage/indexeddb/modern/resources/keypath-basic.js: Copied from LayoutTests/storage/indexeddb/modern/keypath-basic.html.
+        * storage/indexeddb/modern/resources/objectstore-attributes.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-attributes.html.
+        * storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html.
+        * storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html.
+        * storage/indexeddb/modern/resources/opencursor-failures.js: Copied from LayoutTests/storage/indexeddb/modern/opencursor-failures.html.
+        * storage/indexeddb/modern/resources/opendatabase-request-event.js: Added.
+        * storage/indexeddb/modern/resources/opendatabase-request.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-request.html.
+        * storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html.
+        * storage/indexeddb/modern/resources/opendatabase-versions.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-versions.html.
+        * storage/indexeddb/modern/resources/request-readystate.js: Added.
+        * storage/indexeddb/modern/resources/transaction-scheduler-1.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-2.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-3.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-5.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-6.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html.
+        * storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html:
+        * storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html.
+        * storage/indexeddb/modern/resources/versionchange-event.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-event.html.
+        * storage/indexeddb/modern/transaction-scheduler-1-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-1.html:
+        * storage/indexeddb/modern/transaction-scheduler-2-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-2.html:
+        * storage/indexeddb/modern/transaction-scheduler-3-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-3.html:
+        * storage/indexeddb/modern/transaction-scheduler-5-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-5.html:
+        * storage/indexeddb/modern/transaction-scheduler-6-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-6.html:
+        * storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt:
+        * storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt:
+        * storage/indexeddb/modern/versionchange-abort-then-reopen.html:
+        * storage/indexeddb/modern/versionchange-event-expected.txt:
+        * storage/indexeddb/modern/versionchange-event.html:
+
</ins><span class="cx"> 2016-01-19  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         outline-offset does not work for inlines.
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Error handling: &quot;objectStore.put({ bar: 'A' }, 1);&quot; (error)
</span><span class="cx"> Error handling: &quot;objectStore.put({ bar: 'B' }, 2);&quot; (error)
</span><span class="lines">@@ -20,5 +24,7 @@
</span><span class="cx"> Error handling: &quot;objectStore.get(2);&quot; (error)
</span><span class="cx"> Error handling: &quot;objectStore.get(3);&quot; (error)
</span><span class="cx"> readonly transaction aborted
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,156 +1,10 @@
</span><del>-This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var database;
-var objectStore;
-
-function setupRequest(code)
-{
-    var request = eval(code);
-    request.onsuccess = function()
-    {
-        log (&quot;Success handling: \&quot;&quot; + code + &quot;\&quot;&quot;);
-    }
-    request.onerror = function(e)
-    {
-        log (&quot;Error handling: \&quot;&quot; + code + &quot;\&quot; (&quot; + e.type + &quot;)&quot;);
-        e.stopPropagation();
-    }   
-}
-
-startTest();
-
-function startTest() {
-    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
-    createRequest.onupgradeneeded = function(event) {
-        log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
-        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
-        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
-
-        versionTransaction.abort();
-
-        versionTransaction.onabort = function(event) {
-            log(&quot;Initial upgrade versionchange transaction aborted&quot;);
-            database.close();
-            continueTest1();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log(&quot;Initial upgrade versionchange transaction error &quot; + event);
-        }
-    }
-}
-
-function continueTest1() {
-    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
-    createRequest.onupgradeneeded = function(event) {
-        log(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        database = event.target.result;
-        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    
-        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
-        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
-        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
-    
-        versionTransaction.onabort = function(event) {
-            log(&quot;Second upgrade versionchange transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log(&quot;Second upgrade versionchange transaction completed&quot;);
-            continueTest2();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log(&quot;Second upgrade versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-function continueTest2() {
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    setupRequest(&quot;objectStore.get(1);&quot;);
-    setupRequest(&quot;objectStore.get(2);&quot;);
-    setupRequest(&quot;objectStore.get(3);&quot;);
-    setupRequest(&quot;objectStore.put({ bar: 'D' }, 4);&quot;);
-    setupRequest(&quot;objectStore.put({ bar: 'E' }, 5);&quot;);
-    setupRequest(&quot;objectStore.put({ bar: 'F' }, 6);&quot;);
-
-    transaction.abort();
-
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction aborted&quot;);
-        continueTest3();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction unexpected complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest3() {
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    setupRequest(&quot;objectStore.get(1);&quot;);
-    setupRequest(&quot;objectStore.get(2);&quot;);
-    setupRequest(&quot;objectStore.get(3);&quot;);
-
-    transaction.abort();
-
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction aborted&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction unexpected complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/abort-requests-cancelled.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortedputexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates some object stores, putting some values in them, committing the transaction. In a new transaction, it then overwrites those values, but then aborts the transaction. Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: First upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: [object IDBTransaction] - versionchange
</span><span class="cx"> ALERT: [object IDBDatabase]
</span><span class="lines">@@ -17,8 +22,7 @@
</span><span class="cx"> ALERT: get1 'foo' succeeded - value was 'bar'
</span><span class="cx"> ALERT: get2 'far' succeeded - value was 'undefined'
</span><span class="cx"> ALERT: Third version change transaction complete
</span><del>-ALERT: Done
-This test creates some object stores, putting some values in them, committing the transaction.
-In a new transaction, it then overwrites those values, but then aborts the transaction.
-Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernabortedputhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/aborted-put.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/aborted-put.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/aborted-put.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,203 +1,9 @@
</span><del>-This test creates some object stores, putting some values in them, committing the transaction.&lt;br&gt;
-In a new transaction, it then overwrites those values, but then aborts the transaction.&lt;br&gt;
-Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;);
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event)
-{
-    alert(&quot;First upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + &quot; - &quot; + tx.mode);
-    alert(db);
-
-    var os1 = db.createObjectStore(&quot;TestObjectStore1&quot;);
-    var os2 = db.createObjectStore(&quot;TestObjectStore2&quot;);
-
-    var putRequest = os1.put(&quot;bar&quot;, &quot;foo&quot;);
-    
-    putRequest.onsuccess = function(event) {
-        alert(&quot;put succeeded - key was '&quot; + putRequest.result + &quot;'&quot;);
-        
-        var getRequest1 = os1.get(&quot;foo&quot;);
-        getRequest1.onsuccess = function(event) {
-            alert(&quot;get 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
-        }
-
-        getRequest1.onerror = function(event) {
-            alert(&quot;get 'foo' unexpectedly failed - &quot; + event);
-            done();
-        }
-        
-        var getRequest2 = os2.get(&quot;far&quot;);
-        getRequest2.onsuccess = function(event) {
-            alert(&quot;get 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
-        }
-
-        getRequest2.onerror = function(event) {
-            alert(&quot;get 'far' unexpectedly failed - &quot; + event);
-            done();
-        }
-    }
-
-    putRequest.onerror = function(event) {
-        alert(&quot;put unexpectedly failed - &quot; + event);
-        done();
-    }
-    
-    tx.onabort = function(event) {
-        alert(&quot;First version change transaction unexpected abort&quot;);
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert(&quot;First version change transaction completed&quot;);
-        db.close();
-        continueTest1();
-    }
-
-    tx.onerror = function(event) {
-        alert(&quot;First version change transaction unexpected error - &quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;, 2);
-
-    request.onupgradeneeded = function(event) {
-        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-        var tx = request.transaction;
-        var db = event.target.result;
-
-        alert(tx + &quot; - &quot; + tx.mode);
-        alert(db);
-
-        var os1 = tx.objectStore(&quot;TestObjectStore1&quot;);
-        var os2 = tx.objectStore(&quot;TestObjectStore2&quot;);
-        var putRequest1 = os1.put(&quot;baz&quot;, &quot;foo&quot;);
-        var putRequest2 = os2.put(&quot;boo&quot;, &quot;far&quot;);
-    
-        putRequest1.onerror = function(e) {
-            alert(&quot;Unexpected error overwriting bar with baz - &quot; + e);
-            done();
-        }
-
-        putRequest2.onerror = function(e) {
-            alert(&quot;Writing into second object store unexpectedly failed - &quot; + e);
-            done();
-        }
-        
-        putRequest2.onsuccess = function(e) {
-            var getRequest1 = os1.get(&quot;foo&quot;);
-            var getRequest2 = os2.get(&quot;far&quot;);
-            
-            getRequest1.onsuccess = function(event) {
-                alert(&quot;get1 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
-            }
-
-            getRequest1.onerror = function(event) {
-                alert(&quot;get1 unexpectedly failed - &quot; + event);
-                done();
-            }
-
-            getRequest2.onsuccess = function(event) {
-                alert(&quot;get2 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
-                tx.abort();
-            }
-
-            getRequest2.onerror = function(event) {
-                alert(&quot;get2 unexpectedly failed - &quot; + event);
-                done();
-            }
-        }
-        
-        tx.onabort = function(event) {
-            alert(&quot;Second version change transaction abort&quot;);
-            db.close();
-            continueTest2();
-        }
-
-        tx.oncomplete = function(event) {
-            alert(&quot;Second version change transaction unexpected complete&quot;);
-            done();
-        }
-
-        tx.onerror = function(event) {
-            alert(&quot;Second version change transaction error - &quot; + event);
-        }
-    }
-}
-
-function continueTest2()
-{
-    var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;, 2);
-
-    request.onupgradeneeded = function(event) {
-        alert(&quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-        var tx = request.transaction;
-        var db = event.target.result;
-
-        alert(tx + &quot; - &quot; + tx.mode);
-        alert(db);
-
-        var os1 = tx.objectStore(&quot;TestObjectStore1&quot;);
-        var os2 = tx.objectStore(&quot;TestObjectStore2&quot;);
-        var getRequest1 = os1.get(&quot;foo&quot;);
-        var getRequest2 = os2.get(&quot;far&quot;);
-    
-        getRequest1.onsuccess = function(event) {
-            alert(&quot;get1 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
-        }
-
-        getRequest1.onerror = function(event) {
-            alert(&quot;get1 'foo' unexpectedly failed - &quot; + event);
-            done();
-        }
-
-        getRequest2.onsuccess = function(event) {
-            alert(&quot;get2 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
-        }
-
-        getRequest2.onerror = function(event) {
-            alert(&quot;get2 'far' unexpectedly failed - &quot; + event);
-            done();
-        }
-        
-        tx.onabort = function(event) {
-            alert(&quot;Third version change transaction unexpected abort&quot;);
-            done();
-        }
-
-        tx.oncomplete = function(event) {
-            alert(&quot;Third version change transaction complete&quot;);
-            done();
-        }
-
-        tx.onerror = function(event) {
-            alert(&quot;Third version change transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/aborted-put.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernautoincrementabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates a new database with an objectstore that autoincrements. It then puts some things in that object store, checking the keys that were used. But it then aborts that transaction. Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Opening readwrite transaction to bump the key generator, but it will be aborted
</span><span class="lines">@@ -24,9 +29,7 @@
</span><span class="cx"> ALERT: Key used for put was 11
</span><span class="cx"> ALERT: Key used for put was 12
</span><span class="cx"> ALERT: readwrite transaction complete
</span><del>-ALERT: Done
-This test creates a new database with an objectstore that autoincrements.
-It then puts some things in that object store, checking the keys that were used.
-But it then aborts that transaction.
-Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernautoincrementaborthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,159 +1,9 @@
</span><del>-This test creates a new database with an objectstore that autoincrements.&lt;br&gt;
-It then puts some things in that object store, checking the keys that were used.&lt;br&gt;
-But it then aborts that transaction.&lt;br&gt;
-Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;AutoincrementAbortDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true });
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function putChecker(event) {
-    alert(&quot;Key used for put was &quot; + event.target.result);
-}
-
-function continueTest1()
-{
-    alert(&quot;Opening readwrite transaction to bump the key generator, but it will be aborted&quot;);
-    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore('TestObjectStore');
-    
-    var request = objectStore.put(&quot;bar1&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar2&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar3&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar4&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar5&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar6&quot;);
-    request.onsuccess = function(event) {
-        putChecker(event);
-        transaction.abort();
-    }
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction abort&quot;);
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction unexpected complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-function continueTest2()
-{
-    alert(&quot;Opening readwrite transaction to make sure the key generator had successfully reverted&quot;);
-    
-    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore('TestObjectStore');
-
-    var request = objectStore.put(&quot;bar1&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar2&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar3&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar4&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar5&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar6&quot;);
-    request.onsuccess = putChecker;
-
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction unexpected abort&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction complete&quot;);
-        continueTest3();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-function continueTest3()
-{
-    alert(&quot;Opening readwrite transaction to make sure the key generator picks up where it should've left off&quot;);
-    
-    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore('TestObjectStore');
-
-    var request = objectStore.put(&quot;bar1&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar2&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar3&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar4&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar5&quot;);
-    request.onsuccess = putChecker;
-    var request = objectStore.put(&quot;bar6&quot;);
-    request.onsuccess = putChecker;
-
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction unexpected abort&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/autoincrement-abort.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbasicaddexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/basic-add-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/basic-add-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/basic-add-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: [object IDBTransaction] - versionchange
</span><span class="cx"> ALERT: [object IDBDatabase]
</span><span class="lines">@@ -5,6 +10,7 @@
</span><span class="cx"> ALERT: put 2 failed - error
</span><span class="cx"> ALERT: get succeeded - key was 'bar'
</span><span class="cx"> ALERT: version change transaction completed
</span><del>-ALERT: Done
-This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbasicaddhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/basic-add.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/basic-add.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/basic-add.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,78 +1,9 @@
</span><del>-This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open(&quot;NewDatabaseAddTestDatabase&quot;);
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + &quot; - &quot; + tx.mode);
-    alert(db);
-
-    var os = db.createObjectStore(&quot;TestObjectStore&quot;);
-    var putRequest1 = os.add(&quot;bar&quot;, &quot;foo&quot;);
-    var putRequest2 = os.add(&quot;baz&quot;, &quot;foo&quot;);
-
-    putRequest1.onsuccess = function(event) {
-        alert(&quot;put 1 succeeded - key was '&quot; + putRequest1.result + &quot;'&quot;);
-    }
-
-    putRequest1.onerror = function(event) {
-        alert(&quot;put 1 unexpectedly failed - &quot; + event);
-        done();
-    }
-
-    putRequest2.onsuccess = function(event) {
-        alert(&quot;put 2 unexpectedly succeeded - key was '&quot; + putRequest2.result + &quot;'&quot;);
-        done();
-    }
-
-    putRequest2.onerror = function(event) {
-        alert(&quot;put 2 failed - &quot; + event.type);
-
-        var getRequest = os.get(&quot;foo&quot;);
-        
-        getRequest.onsuccess = function(event) {
-            alert(&quot;get succeeded - key was '&quot; + getRequest.result + &quot;'&quot;);
-        }
-
-        getRequest.onerror = function(event) {
-            alert(&quot;get unexpectedly failed - &quot; + event.type);
-            done();
-        }
-        
-        event.stopPropagation();
-        event.preventDefault();
-    }
-        
-    tx.onabort = function(event) {
-        alert(&quot;version change transaction unexpected abort&quot;);
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert(&quot;version change transaction completed&quot;);
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert(&quot;version change transaction unexpected error - &quot; + event);
-        done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/basic-add.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbasicputexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/basic-put-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/basic-put-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/basic-put-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -4,5 +4,7 @@
</span><span class="cx"> ALERT: put succeeded - key was 'foo'
</span><span class="cx"> ALERT: get succeeded - value was 'bar'
</span><span class="cx"> ALERT: version change transaction completed
</span><del>-ALERT: Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernbasicputhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/basic-put.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/basic-put.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/basic-put.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,64 +1,9 @@
</span><del>-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open(&quot;NewDatabasePutTestDatabase&quot;);
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + &quot; - &quot; + tx.mode);
-    alert(db);
-
-    var os = db.createObjectStore(&quot;TestObjectStore&quot;);
-    var putRequest = os.put(&quot;bar&quot;, &quot;foo&quot;);
-    
-    putRequest.onsuccess = function(event) {
-        alert(&quot;put succeeded - key was '&quot; + putRequest.result + &quot;'&quot;);
-        
-        var getRequest = os.get(&quot;foo&quot;);
-        getRequest.onsuccess = function(event) {
-            alert(&quot;get succeeded - value was '&quot; + getRequest.result + &quot;'&quot;);
-        }
-
-        getRequest.onerror = function(event) {
-            alert(&quot;get unexpectedly failed - &quot; + event);
-            done();
-        }
-    }
-
-    putRequest.onerror = function(event) {
-        alert(&quot;put unexpectedly failed - &quot; + event);
-        done();
-    }
-    
-    tx.onabort = function(event) {
-        alert(&quot;version change transaction unexpected abort&quot;);
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert(&quot;version change transaction completed&quot;);
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert(&quot;version change transaction unexpected error - &quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/basic-put.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateindexfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/create-index-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/create-index-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/create-index-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to create index with null name
</span><span class="cx"> Failed to create index with invalid key path
</span><span class="lines">@@ -9,5 +13,7 @@
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="cx"> Failed to create index outside of a version change transaction
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateindexfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/create-index-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/create-index-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/create-index-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,130 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCreateIndexFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    try {
-        objectStore.createIndex(null, &quot;foo&quot;);
-    } catch(e) {
-        log(&quot;Failed to create index with null name&quot;);
-    }
-    
-    try {
-        objectStore.createIndex(&quot;TestIndex1&quot;, null);
-    } catch(e) {
-        log(&quot;Failed to create index with invalid key path&quot;);
-    }
-    
-    database.deleteObjectStore(&quot;TestObjectStore&quot;);
-    try {
-        objectStore.createIndex(&quot;TestIndex2&quot;, &quot;foo&quot;);
-    } catch(e) {
-        log(&quot;Failed to create index on a deleted object store&quot;);
-    }
-
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    
-    try {
-        objectStore.createIndex(&quot;TestIndex3&quot;, [&quot;foo&quot;, &quot;bar&quot;], { multiEntry: true });
-    } catch(e) {
-        log(&quot;Failed to create multi-entry index with an array key path&quot;);
-    }
-    
-    objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;);
-    try {
-        objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;);
-    } catch(e) {
-        log(&quot;Failed to create index that already exists&quot;);
-    }
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var createWhileInactive = function() {
-        try {
-            objectStore.createIndex(&quot;TestIndex5&quot;, &quot;foo&quot;);
-        } catch(e) {
-            log(&quot;Failed to create index while the transaction is inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(createWhileInactive, 0);
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    try {
-        objectStore.createIndex(&quot;TestIndex6&quot;, &quot;foo&quot;);
-    } catch(e) {
-        log(&quot;Failed to create index outside of a version change transaction&quot;);
-    }
-        
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/create-index-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateobjectstorebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions. At various stages it verifies the object stores in the database are as-expected.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: FirstAbortedObjectStore
</span><span class="lines">@@ -21,7 +26,7 @@
</span><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: FirstCommittedObjectStore
</span><span class="cx"> ALERT: SecondCommittedObjectStore
</span><del>-ALERT: Done
-This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions.
-At various stages it verifies the object stores in the database are as-expected.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateobjectstorebasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,138 +1,9 @@
</span><del>-This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions.&lt;br&gt;
-At various stages it verifies the object stores in the database are as-expected.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function dumpObjectStores(database) {
-    var list = database.objectStoreNames;
-    alert(&quot;Object store names:&quot;);
-    for (var i = 0; i &lt; list.length; ++i) { 
-        alert(list[i]);
-    }
-}
-
-var createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;FirstAbortedObjectStore&quot;);
-    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
-
-    request.onsuccess = function(event) {
-        alert(&quot;Put succeeded&quot;);
-        versionTransaction.abort();
-    }
-    request.onerror = function(event) {
-        alert(&quot;Put failed - &quot; + event);
-        done();
-    }
-    
-    dumpObjectStores(database);    
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction aborted&quot;);
-        dumpObjectStores(database);
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction error &quot; + event);
-    }
-}
-
-function continueTest1()
-{
-    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 1);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        dumpObjectStores(database);
-        var objectStore = database.createObjectStore(&quot;FirstCommittedObjectStore&quot;);
-
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Second upgrade versionchange transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Second upgrade versionchange transaction complete&quot;);
-            dumpObjectStores(database);
-            continueTest2();
-            database.close();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Second upgrade versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-function continueTest2()
-{
-    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 2);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        var objectStore = database.createObjectStore(&quot;SecondCommittedObjectStore&quot;);
-
-        dumpObjectStores(database);    
-    
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Third upgrade versionchange transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Third upgrade versionchange transaction complete&quot;);
-            dumpObjectStores(database);
-            database.close(); 
-            continueTest3();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Third upgrade versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-function continueTest3()
-{
-    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 3);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Fourth upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-        var database = event.target.result;
-        dumpObjectStores(database);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/createobjectstore-basic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Failed to create object store with both autoincrement and an empty keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
</span><span class="cx"> ALERT: Object store names:
</span><span class="lines">@@ -20,5 +25,7 @@
</span><span class="cx"> ALERT: Failed to create object store outside of onupgradeneeded: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
</span><span class="cx"> ALERT: Object store names:
</span><span class="cx"> ALERT: TestObjectStore1
</span><del>-ALERT: Done
-This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,103 +1,9 @@
</span><del>-This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function dumpObjectStores(database) {
-    var list = database.objectStoreNames;
-    alert(&quot;Object store names:&quot;);
-    for (var i = 0; i &lt; list.length; ++i) { 
-        alert(list[i]);
-    }
-}
-
-var createRequest = window.indexedDB.open(&quot;CreateObjectStoreFailuresTestDatabase&quot;, 1);
-var database;
-var versionTransaction;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    versionTransaction = createRequest.transaction;
-    database = event.target.result;
-
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: &quot;&quot; });
-    } catch (e) {
-        alert(&quot;Failed to create object store with both autoincrement and an empty keypath: &quot; + e);
-        dumpObjectStores(database);
-    }
-
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: ['foo'] });
-    } catch (e) {
-        alert(&quot;Failed to create object store with both autoincrement and a sequence keypath: &quot; + e);
-        dumpObjectStores(database);
-    }
-    
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { keyPath: &quot;'foo bar'&quot;});
-    } catch (e) {
-        alert(&quot;Failed to create object store with invalid keyPath: &quot; + e);
-        dumpObjectStores(database);
-    }
-
-    database.createObjectStore(&quot;TestObjectStore1&quot;);
-    alert(&quot;Actually created an object store&quot;);
-    dumpObjectStores(database);
-    
-    try {
-        database.createObjectStore(&quot;TestObjectStore1&quot;);
-    } catch(e) {
-        alert(&quot;Failed to create TestObjectStore a second time: &quot; + e);
-        dumpObjectStores(database);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        dumpObjectStores(database);
-
-        try {
-            database.createObjectStore(&quot;TestObjectStore2&quot;);
-        } catch(e) {
-            alert(&quot;Failed to create object store while there is no version change transaction: &quot; + e);
-            dumpObjectStores(database);
-        }
-    
-        setTimeout(finishUp, 0);
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function finishUp()
-{
-    try {
-        database.createObjectStore(&quot;TestObjectStore99&quot;);
-    } catch(e) {
-        alert(&quot;Failed to create object store outside of onupgradeneeded: &quot; + e);
-        dumpObjectStores(database);
-    }
-    
-    done();
-}
-
-&lt;/script&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/createobjectstore-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests basic IDBCursor functionality
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Success opening cursor
</span><span class="cx"> Cursor is: [object IDBCursorWithValue]
</span><span class="lines">@@ -73,5 +77,7 @@
</span><span class="cx"> Cursor key is: Hello
</span><span class="cx"> Cursor primary key is: foo
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,95 +1,10 @@
</span><del>-This tests basic IDBCursor functionality&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor1Database&quot;, 1);
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor is: &quot; + cursor);
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
-}
-
-function setupRequest(request)
-{
-    // FIXME: Right now (until https://bugs.webkit.org/show_bug.cgi?id=151196 is resolved) what should be successful cursor operations will actually always fail.
-    request.onsuccess = function() {
-        log(&quot;Success opening cursor&quot;);
-        logCursor(request.result);  
-    }
-    request.onerror = function(e) {
-        log(&quot;Error opening cursor (expected for now)&quot;);
-        logCursor(request.result);
-        e.stopPropagation();
-    } 
-}
-
-var objectStore;
-var index;
-
-function testCursorDirection(direction)
-{
-    var range = IDBKeyRange.lowerBound(-Infinity);
-    var request = objectStore.openCursor(range, direction);
-    setupRequest(request);
-    request = index.openCursor(range, direction);
-    setupRequest(request);
-    request = index.openKeyCursor(range, direction);
-    setupRequest(request);
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-
-    for (var i = 0; i &lt; 10; ++i) {
-        objectStore.put(&quot;Record &quot; + i, i);
-    }
-    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
-
-    testCursorDirection(&quot;next&quot;);
-    testCursorDirection(&quot;nextunique&quot;);
-    testCursorDirection(&quot;prev&quot;);
-    testCursorDirection(&quot;prevunique&quot;);
-      
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test checks basic functionality walking a &quot;next&quot; and &quot;prev&quot; cursor on an object store with some records.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Success iterating next cursor
</span><span class="cx"> Cursor is: [object IDBCursorWithValue]
</span><span class="lines">@@ -155,5 +159,7 @@
</span><span class="cx"> Cursor value is: Record 0
</span><span class="cx"> Cursor primary key is: 0
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,88 +1,10 @@
</span><del>-This test checks basic functionality walking a &quot;next&quot; and &quot;prev&quot; cursor on an object store with some records.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor2Database&quot;, 1);
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor is: &quot; + cursor);
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor value is: &quot; + cursor.value);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
-}
-
-var objectStore;
-var shouldStartPrevious = true;
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            if (shouldStartPrevious) {
-                setupRequest(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
-                shouldStartPrevious = false;
-            }
-            return;
-        }
-
-        log(&quot;Success iterating &quot; + request.result.direction + &quot; cursor&quot;);
-        logCursor(request.result);
-        request.result.continue();
-    }
-
-    request.onerror = function(e) {
-        log(&quot;Error iterating cursor&quot;);
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 10; ++i) {
-        objectStore.put(&quot;Record &quot; + i, i);
-    }
-    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
-    
-    setupRequest(objectStore.openCursor());
-      
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><del>-This test various uses of advance() and continue() on a &quot;next&quot; cursor&quot;.
</del><ins>+This test various uses of advance() and continue() on a &quot;next&quot; cursor.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Success iterating cursor
</span><span class="cx"> Cursor is: [object IDBCursorWithValue]
</span><span class="lines">@@ -71,5 +75,7 @@
</span><span class="cx"> Cursor value is: Record 9
</span><span class="cx"> Cursor primary key is: 9
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,98 +1,10 @@
</span><del>-This test various uses of advance() and continue() on a &quot;next&quot; cursor&quot;.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor3Database&quot;, 1);
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor is: &quot; + cursor);
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor value is: &quot; + cursor.value);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
-}
-
-var objectStore;
-
-function setupRequest1(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            setupRequest2(objectStore.openCursor());
-            return;
-        }
-        log(&quot;Success iterating cursor&quot;);
-        logCursor(request.result);
-        request.result.continue(request.result.key + 2);
-    }
-    request.onerror = function(e) {
-        log(&quot;Error iterating cursor&quot;);
-        done();
-    } 
-}
-
-function setupRequest2(request)
-{
-    request.onsuccess = function() {
-        if (!request.result)
-            return;
-        log(&quot;Success iterating cursor&quot;);
-        logCursor(request.result);
-        request.result.advance(3);        
-    }
-    request.onerror = function(e) {
-        log(&quot;Error iterating cursor&quot;);
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 10; ++i) {
-        objectStore.put(&quot;Record &quot; + i, i);
-    }
-    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
-    
-    setupRequest1(objectStore.openCursor());
-      
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-3.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor4expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><del>-This test various uses of advance() and continue() on a &quot;prev&quot; cursor&quot;.
</del><ins>+This test various uses of advance() and continue() on a &quot;prev&quot; cursor.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Success iterating cursor
</span><span class="cx"> Cursor is: [object IDBCursorWithValue]
</span><span class="lines">@@ -64,5 +68,7 @@
</span><span class="cx"> Cursor value is: Record 0
</span><span class="cx"> Cursor primary key is: 0
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor4html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,97 +1,10 @@
</span><del>-This test various uses of advance() and continue() on a &quot;prev&quot; cursor&quot;.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor4Database&quot;, 1);
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor is: &quot; + cursor);
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor value is: &quot; + cursor.value);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
-}
-
-var objectStore;
-
-function setupRequest1(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            setupRequest2(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
-            return;
-        }
-        log(&quot;Success iterating cursor&quot;);
-        logCursor(request.result);
-        request.result.continue(request.result.key - 2);
-    }
-    request.onerror = function(e) {
-        log(&quot;Error iterating cursor&quot;);
-        done();
-    } 
-}
-
-function setupRequest2(request)
-{
-    request.onsuccess = function() {
-        if (!request.result)
-            return;
-        log(&quot;Success iterating cursor&quot;);
-        logCursor(request.result);
-        request.result.advance(3);        
-    }
-    request.onerror = function(e) {
-        log(&quot;Error iterating cursor&quot;);
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 10; ++i) {
-        objectStore.put(&quot;Record &quot; + i, i);
-    }
-        
-    setupRequest1(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
-      
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-4.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor5expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-5-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-5-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-5-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,9 +1,15 @@
</span><span class="cx"> This tests iterating a &quot;next&quot; cursor in a read-write transaction while changing records.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Cursor open at key 0
</span><span class="cx"> Record 0 deleted, even though that's where the cursor currently points.
</span><span class="cx"> Cursor iterated to key 1
</span><span class="cx"> Cursor iterated to key 2 with value 'Scary new actual record!'
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor5html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-5.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-5.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-5.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,77 +1,10 @@
</span><del>-This tests iterating a &quot;next&quot; cursor in a read-write transaction while changing records.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor5Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 3; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        log(&quot;Cursor open at key &quot; + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.delete(0).onsuccess = function() {
-            log(&quot;Record 0 deleted, even though that's where the cursor currently points.&quot;);
-        }
-        
-        // Now that cursor iteration has begun, manually delete and then replace a record 
-        // that will eventually be iterated to, making sure the new value is picked up. 
-        objectStore.delete(2);
-        objectStore.put(&quot;Scary new actual record!&quot;, 2);
-    
-        request.onsuccess = function() {
-            log(&quot;Cursor iterated to key &quot; + request.result.key);
-            
-            request.onsuccess = function() {
-                log(&quot;Cursor iterated to key &quot; + request.result.key + &quot; with value '&quot; + request.result.value + &quot;'&quot;);
-            }
-            
-            request.result.continue();
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-5.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor6expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-6-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-6-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-6-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,9 +1,15 @@
</span><span class="cx"> This tests iterating a &quot;prev&quot; cursor in a read-write transaction while changing records.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Cursor open at key 2
</span><span class="cx"> Record 2 deleted, even though that's where the cursor currently points.
</span><span class="cx"> Cursor iterated to key 1
</span><span class="cx"> Cursor iterated to key 0 with value 'Scary new actual record!'
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor6html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-6.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-6.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-6.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,78 +1,10 @@
</span><del>-This tests iterating a &quot;prev&quot; cursor in a read-write transaction while changing records.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor6Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 3; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
-    request.onsuccess = function() {
-        log(&quot;Cursor open at key &quot; + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 2, after an iteration its next key should be 1.
-        objectStore.delete(2).onsuccess = function() {
-            log(&quot;Record 2 deleted, even though that's where the cursor currently points.&quot;);
-        }
-        
-        // Now that cursor iteration has begun, manually delete and then replace a record 
-        // that will eventually be iterated to, making sure the new value is picked up. 
-        objectStore.delete(0);
-        objectStore.put(&quot;Scary new actual record!&quot;, 0);
-    
-        request.onsuccess = function() {
-            log(&quot;Cursor iterated to key &quot; + request.result.key);
-            
-            request.onsuccess = function() {
-                log(&quot;Cursor iterated to key &quot; + request.result.key + &quot; with value '&quot; + request.result.value + &quot;'&quot;);
-            }
-            
-            request.result.continue();
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-6.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor7expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-7-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-7-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-7-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,8 +1,14 @@
</span><span class="cx"> This tests iterating a &quot;next&quot; cursor in a read-write transaction combined with clearing the object store.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Cursor open at key 0
</span><span class="cx"> Object store cleared.
</span><span class="cx"> Cursor iterated to key 100
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor7html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-7.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-7.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-7.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,71 +1,10 @@
</span><del>-This tests iterating a &quot;next&quot; cursor in a read-write transaction combined with clearing the object store.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor7Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 3; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        log(&quot;Cursor open at key &quot; + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.clear().onsuccess = function() {
-            log(&quot;Object store cleared.&quot;);
-        }
-        
-        // The cursor is currently on key 0, which no longer exists.
-        // It's next key would have been 1, but the object store has been cleared.
-        // Whatever key we put in the object store that is greater than 0 will be the actual next key.
-        objectStore.put(&quot;Record 100&quot;, 100);
-    
-        request.onsuccess = function() {
-            log(&quot;Cursor iterated to key &quot; + request.result.key);
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-7.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor8expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-8-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-8-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-8-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,8 +1,14 @@
</span><span class="cx"> This tests iterating a &quot;prev&quot; cursor in a read-write transaction while changing records.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Cursor open at key 2
</span><span class="cx"> Object store cleared.
</span><span class="cx"> Cursor iterated to key -100
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderncursor8html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/cursor-8.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/cursor-8.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/cursor-8.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,72 +1,10 @@
</span><del>-This tests iterating a &quot;prev&quot; cursor in a read-write transaction while changing records.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Cursor8Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 3; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
-    request.onsuccess = function() {
-        log(&quot;Cursor open at key &quot; + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.clear().onsuccess = function() {
-            log(&quot;Object store cleared.&quot;);
-        }
-        
-        // The cursor is currently on key 2, which no longer exists.
-        // It's next key would have been 1, but the object store has been cleared.
-        // Whatever key we put in the object store that is less than 2 will be the actual next key.
-        objectStore.put(&quot;Record -100&quot;, -100);
-    
-        request.onsuccess = function() {
-            log(&quot;Cursor iterated to key &quot; + request.result.key);
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/cursor-8.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndatebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/date-basic-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/date-basic-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/date-basic-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests using Date objects as keys and values.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Success getting key 'Fri Nov 04 1955 17:00:00 GMT-0700 (PDT)' of type object, result is 'Flux capacitor' of type string
</span><span class="lines">@@ -13,5 +18,7 @@
</span><span class="cx"> ALERT: Success getting key 'c' of type string, result is 'Wed Oct 21 2015 09:00:00 GMT-0700 (PDT)' of type object
</span><span class="cx"> ALERT: Result is a Date object, btw
</span><span class="cx"> ALERT: readonly transaction complete
</span><del>-ALERT: Done
-This tests using Date objects as keys and values.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndatebasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/date-basic.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/date-basic.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/date-basic.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,100 +1,9 @@
</span><del>-This tests using Date objects as keys and values.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;DateBasicDatabase&quot;, 1);
-var database;
-
-var date1 = new Date(&quot;1955-11-05T00:00:00&quot;);
-var date2 = new Date(&quot;1955-11-12T18:00:00&quot;);
-var date3 = new Date(&quot;2015-10-21T16:00:00&quot;);
-    
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    objectStore.put(&quot;Flux capacitor&quot;, date1);
-    objectStore.put(&quot;Fish under the sea&quot;, date2);
-    objectStore.put(&quot;Hoverboards&quot;, date3);
-    
-    objectStore.put(date1, &quot;a&quot;);
-    objectStore.put(date2, &quot;b&quot;);
-    objectStore.put(date3, &quot;c&quot;);
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-var objectStore;
-
-function testGet(key) {
-    var request = objectStore.get(key);
-    request.onsuccess = function()
-    {
-        alert(&quot;Success getting key '&quot; + key + &quot;' of type &quot; + typeof(key) + &quot;, result is '&quot; + request.result + &quot;' of type &quot; + typeof(request.result));
-        if (key instanceof Date)
-            alert(&quot;Key is a Date object, btw&quot;);
-        if (request.result instanceof Date)
-            alert(&quot;Result is a Date object, btw&quot;);
-    }
-    request.onerror = function()
-    {
-        alert(&quot;Expected error getting key '&quot; + key + &quot;'&quot;);
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-    testGet(date1);
-    testGet(date2);
-    testGet(date3);
-    testGet(&quot;a&quot;);
-    testGet(&quot;b&quot;);
-    testGet(&quot;c&quot;);
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/date-basic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabase1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade old version - 0 new version - 1
</span><span class="cx"> Version change complete
</span><span class="cx"> Requesting deleteDatabase
</span><span class="lines">@@ -9,5 +13,7 @@
</span><span class="cx"> Second upgrade old version - 0 new version - 1
</span><span class="cx"> Unable to get object store in second upgrade transaction (which is correct because it should not be there)
</span><span class="cx"> Second database upgrade success
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabase1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,132 +1,10 @@
</span><del>-This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var request = window.indexedDB.open(&quot;DeleteDatabase1TestDatabase&quot;);
-request.onsuccess = function()
-{
-    log(&quot;open db success&quot;);
-}
-request.onerror = function(e)
-{
-    log(&quot;Unexpected error&quot;);
-        done();
-}
-
-request.onupgradeneeded = function(e)
-{
-    log(&quot;Initial upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-    
-    var versionTransaction = request.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put(&quot;This is a record&quot;, 1);
-        
-    request.transaction.oncomplete = function()
-    {
-        log(&quot;Version change complete&quot;);
-        database.onversionchange = function(e)
-        {
-            log(&quot;First connection received versionchange event: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
-            database.close();
-        }
-        continueTest1();
-    }
-    request.transaction.onabort = function()
-    {
-        log(&quot;Version change unexpected abort&quot;);
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        log(&quot;Version change unexpected error&quot;);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    log(&quot;Requesting deleteDatabase&quot;);
-    var request = window.indexedDB.deleteDatabase(&quot;DeleteDatabase1TestDatabase&quot;);
-    request.onsuccess = function(e)
-    {
-        log(&quot;Delete database success: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
-        continueTest2();
-    }
-    request.onerror = function(e)
-    {
-        log(&quot;Delete database unexpected error&quot;);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-        log(&quot;Delete database unexpected upgradeneeded&quot;);
-            done();
-    }
-}
-
-function continueTest2()
-{
-    log(&quot;Recreating database to make sure it's new and empty&quot;);
-    var request = window.indexedDB.open(&quot;DeleteDatabase1TestDatabase&quot;);
-
-    request.onupgradeneeded = function(e)
-    {
-        log(&quot;Second upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-        var versionTransaction = request.transaction;
-        
-        try {
-            var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        } catch(e) {
-            log(&quot;Unable to get object store in second upgrade transaction (which is correct because it should not be there)&quot;);
-        }
-
-        versionTransaction.oncomplete = function(e)
-        {
-            log(&quot;Second database upgrade success&quot;);
-            done();
-        }
-        
-        versionTransaction.onabort = function(e)
-        {
-            log(&quot;Second database upgrade unexpected abort&quot;);
-            done();
-        }
-            
-        versionTransaction.onerror = function(e)
-        {
-            log(&quot;Second database upgrade unexpected error&quot;);
-            done();
-        }
-    }
-
-    request.onsuccess = function(e)
-    {
-        log(&quot;Second database opening unexpected success&quot;);
-        done();
-    }
-    
-    request.onerror = function(e)
-    {
-        log(&quot;Second database opening unexpected error&quot;);
-        done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/deletedatabase-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabase2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,5 +1,8 @@
</span><del>-This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.
-That open connection also has an in-progress transaction at the time it gets the versionChange event.
</del><ins>+This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event. That open connection also has an in-progress transaction at the time it gets the versionChange event.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade old version - 0 new version - 1
</span><span class="cx"> Requesting deleteDatabase
</span><span class="cx"> First connection received versionchange event: oldVersion 1, newVersion null
</span><span class="lines">@@ -10,5 +13,7 @@
</span><span class="cx"> Second upgrade old version - 0 new version - 1
</span><span class="cx"> Unable to get object store in second upgrade transaction (which is correct because it should not be there)
</span><span class="cx"> Second database upgrade success
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabase2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,149 +1,10 @@
</span><del>-This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.&lt;br&gt;
-That open connection also has an in-progress transaction at the time it gets the versionChange event.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var stopSpinning = false;
-
-var request = window.indexedDB.open(&quot;DeleteDatabase2TestDatabase&quot;);
-request.onsuccess = function()
-{
-    log(&quot;open db success&quot;);
-}
-request.onerror = function(e)
-{
-    log(&quot;Open request error: &quot; + request.error.name);
-}
-
-request.onupgradeneeded = function(e)
-{
-    log(&quot;Initial upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-    
-    var versionTransaction = request.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put(&quot;This is a record&quot;, 1);
-    
-    // Spin the transaction until told to stop spinning it.
-    var keepGoing = function() {
-        if (!stopSpinning)
-            objectStore.get(1).onsuccess = keepGoing;
-    }
-    objectStore.get(1).onsuccess = keepGoing;
-
-    database.onversionchange = function(e)
-    {
-        log(&quot;First connection received versionchange event: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
-        
-        var shutErDown = function() {
-            database.close();
-            stopSpinning = true;
-        }
-        window.setTimeout(shutErDown, 0);
-    }
-        
-    request.transaction.oncomplete = function()
-    {
-        log(&quot;First version change complete&quot;);
-    }
-    
-    request.transaction.onabort = function()
-    {
-        log(&quot;Version change unexpected abort&quot;);
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        log(&quot;Version change unexpected error&quot;);
-        done();
-    }
-    
-    window.setTimeout(continueTest1, 0);
-}
-
-function continueTest1()
-{
-    log(&quot;Requesting deleteDatabase&quot;);
-    var request = window.indexedDB.deleteDatabase(&quot;DeleteDatabase2TestDatabase&quot;);
-    request.onsuccess = function(e)
-    {
-        log(&quot;Delete database success: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
-        continueTest2();
-    }
-    request.onerror = function(e)
-    {
-        log(&quot;Delete database unexpected error&quot;);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-        log(&quot;Delete database unexpected upgradeneeded&quot;);
-            done();
-    }
-}
-
-function continueTest2()
-{
-    log(&quot;Recreating database to make sure it's new and empty&quot;);
-    var request = window.indexedDB.open(&quot;DeleteDatabase2TestDatabase&quot;);
-
-    request.onupgradeneeded = function(e)
-    {
-        log(&quot;Second upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-        var versionTransaction = request.transaction;
-        
-        try {
-            var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        } catch(e) {
-            log(&quot;Unable to get object store in second upgrade transaction (which is correct because it should not be there)&quot;);
-        }
-
-        versionTransaction.oncomplete = function(e)
-        {
-            log(&quot;Second database upgrade success&quot;);
-            done();
-        }
-        
-        versionTransaction.onabort = function(e)
-        {
-            log(&quot;Second database upgrade unexpected abort&quot;);
-            done();
-        }
-            
-        versionTransaction.onerror = function(e)
-        {
-            log(&quot;Second database upgrade unexpected error&quot;);
-            done();
-        }
-    }
-
-    request.onsuccess = function(e)
-    {
-        log(&quot;Second database opening unexpected success&quot;);
-        done();
-    }
-    
-    request.onerror = function(e)
-    {
-        log(&quot;Second database opening unexpected error&quot;);
-        done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/deletedatabase-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabasenullnameexceptionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><ins>+This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: TypeError: Not enough arguments
</span><del>-ALERT: Done
-This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabasenullnameexceptionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-null-name-exception.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,23 +1,9 @@
</span><del>-This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-try {
-        var request = window.indexedDB.deleteDatabase();
-} catch (e) {
-        alert(e);
-}
-
-done();
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/deletedatabase-null-name-exception.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesteventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,5 +1,11 @@
</span><ins>+This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><span class="cx"> ALERT: success
</span><del>-ALERT: Done
-This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesteventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,31 +1,9 @@
</span><del>-This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.deleteDatabase(&quot;TestDatabase&quot;);
-
-request.onsuccess = function()
-{
-        alert(&quot;success&quot;);
-        done();
-}
-request.onerror = function(e)
-{
-        alert(&quot;error &quot; + e);
-        done();
-}
-
-alert(request);
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/deletedatabase-request-event.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequestexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><ins>+This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><del>-ALERT: Done
-This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,20 +1,9 @@
</span><del>-This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.deleteDatabase(&quot;TestDatabase&quot;);
-alert(request);
-
-done();
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/deletedatabase-request.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteindex1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests deleting an index and then committing the transaction.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Count is: 2
</span><span class="cx"> Cursor at record: A / 1
</span><span class="lines">@@ -8,5 +12,7 @@
</span><span class="cx"> Object store has indexes:
</span><span class="cx"> Unable to get index from object store (it shouldn't exist)
</span><span class="cx"> Transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteindex1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,113 +1,10 @@
</span><del>-This tests deleting an index and then committing the transaction.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var index;
-var objectStore;
-var database;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log(&quot;Count is: &quot; + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor) {
-            objectStore.deleteIndex(&quot;TestIndex1&quot;);
-            log(&quot;Deleted the index&quot;);
-            return;
-        }
-
-        log(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
-        cursor.continue();
-    }
-    cursorRequest.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open(&quot;DeleteIndex1Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put({ bar: &quot;A&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot; }, 2);
-
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest() {
-    var transaction = database.transaction(&quot;TestObjectStore&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    var names = objectStore.indexNames;
-    log(&quot;Object store has indexes:&quot;)
-    for (var i = 0; i &lt; names.length; ++i)
-        log(names[i]);
-    
-    try {
-        objectStore.index(&quot;TestIndex1&quot;);
-    } catch(e) {
-        log(&quot;Unable to get index from object store (it shouldn't exist)&quot;);
-    }
-
-    transaction.onabort = function(event) {
-        log(&quot;Transaction unexpected abort&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;Transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;Transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/deleteindex-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteindex2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests deleting an index and then aborting the transaction.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Count is: 2
</span><span class="cx"> Cursor at record: A / 1
</span><span class="lines">@@ -13,5 +17,7 @@
</span><span class="cx"> Cursor at record: A / 1
</span><span class="cx"> Cursor at record: A / 2
</span><span class="cx"> Third upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteindex2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,138 +1,10 @@
</span><del>-This tests deleting an index and then aborting the transaction.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var index;
-var objectStore;
-var database;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log(&quot;Count is: &quot; + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor)
-            return;
-
-        log(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
-        cursor.continue();
-    }
-    cursorRequest.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put({ bar: &quot;A&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot; }, 2);
-
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        database.close();
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1() {
-    var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 2);
-    createRequest.onupgradeneeded = function(event) {
-        log(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        database = event.target.result;
-        var versionTransaction = createRequest.transaction;
-        objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        objectStore.deleteIndex(&quot;TestIndex1&quot;);
-        log(&quot;Deleted the index&quot;);
-        versionTransaction.abort();
-        log(&quot;Aborted the transaction&quot;);
-
-        versionTransaction.onabort = function(event) {
-            log(&quot;Second upgrade versionchange transaction abort&quot;);
-            database.close();
-            continueTest2();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log(&quot;Second upgrade versionchange transaction unexpected complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log(&quot;Second upgrade versionchange transaction error &quot; + event);
-        }
-    }
-}
-
-function continueTest2() {
-    var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 3);
-    createRequest.onupgradeneeded = function(event) {
-        log(&quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        index = objectStore.index(&quot;TestIndex1&quot;);
-    
-        checkIndexValues();    
-        
-        versionTransaction.onabort = function(event) {
-            log(&quot;Third upgrade versionchange transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log(&quot;Third upgrade versionchange transaction complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log(&quot;Third upgrade versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/deleteindex-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates an object store then populates it, then commits that transaction. It then deletes it, but aborts that transaction. Finally it checks to make sure everything from step 1 is there as expected.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Second upgrade needed: Old version - 1 New version - 2
</span><span class="lines">@@ -16,8 +21,7 @@
</span><span class="cx"> ALERT: Value gotten was AH AH AH AH AH
</span><span class="cx"> ALERT: Value gotten was AH AH AH AH AH
</span><span class="cx"> ALERT: Final transaction complete
</span><del>-ALERT: Done
-This test creates an object store then populates it, then commits that transaction.
-It then deletes it, but aborts that transaction.
-Finally it checks to make sure everything from step 1 is there as expected.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,139 +1,9 @@
</span><del>-This test creates an object store then populates it, then commits that transaction.&lt;br&gt;
-It then deletes it, but aborts that transaction.&lt;br&gt;
-Finally it checks to make sure everything from step 1 is there as expected.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    for (var i = 0; i &lt; 10; ++i)
-        objectStore.put(&quot;AH AH AH AH AH&quot;, i + &quot; puts&quot;);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        database.close();
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert(&quot;Value gotten was &quot; + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 2);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request error - &quot; + event);
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Request unexpected success - &quot; + event);
-        done();
-    }
-
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-        var versionTransaction = openRequest.transaction;
-        var database = event.target.result;
-        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        
-        alert(&quot;Deleting object store&quot;);        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-
-        versionTransaction.abort();
-
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Second version change transaction abort&quot;);
-            continueTest2();
-            database.close();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Second version change transaction unexpected complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Second version change transaction error - &quot; + event);
-        }
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request unexpected error - &quot; + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Request unexpected upgradeneeded - &quot; + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting final transaction&quot;);
-        var database = event.target.result;
-        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-        var request;
-        for (var i = 0; i &lt; 10; ++i) {
-            request = objectStore.get(i + &quot; puts&quot;);
-            request.onsuccess = getChecker;
-        }
-
-        transaction.onabort = function(event) {
-            alert(&quot;Final transaction unexpected abort&quot;);
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert(&quot;Final transaction complete&quot;);
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert(&quot;Final transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/deleteobjectstore-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndoubleabortexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/double-abort-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,5 +1,12 @@
</span><ins>+This test aborts the same transaction twice, making the appropriate exception is thrown.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction aborted
</span><del>-ALERT: Done
-This test aborts the same transaction twice, making the appropriate exception is thrown.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndoubleaborthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/double-abort.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/double-abort.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/double-abort.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,47 +1,9 @@
</span><del>-This test aborts the same transaction twice, making the appropriate exception is thrown.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;DoubleAbortTestDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-
-    versionTransaction.abort();
-    try {
-        versionTransaction.abort();
-    } catch (e) {
-        alert(&quot;Second abort failed: &quot; + e);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/double-abort.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndoubleopenexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/double-open-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/double-open-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/double-open-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,10 @@
</span><span class="cx"> This test makes sure that quickly opening the same database multiple times is successful without the backend ASSERTing or crashing.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Second request done
</span><del>-done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderndoubleopenhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/double-open.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/double-open.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/double-open.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,38 +1,10 @@
</span><del>-This test makes sure that quickly opening the same database multiple times is successful without the backend ASSERTing or crashing.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-function log(msg)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&lt;br&gt;&quot;;
-}
-
-function done()
-{
-    log(&quot;done&quot;);
-    if (testRunner)
-        testRunner.notifyDone();
-}
-
-if (testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-var req1 = indexedDB.open(&quot;testDB&quot;);
-req1.onerror = function() {
-    log(&quot;First request unexpected error&quot;);
-    done();
-}
-
-var req2 = indexedDB.open(&quot;testDB&quot;);
-req2.onsuccess = function() {
-    log(&quot;Second request done&quot;);
-    done();
-}
-req2.onerror = function() {
-    log(&quot;Second request unexpected error&quot;);
-    done();
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/double-open.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetindexfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/get-index-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-index-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-index-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBObjectStore.index().
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="cx"> Got an index as expected: [object IDBIndex]
</span><span class="lines">@@ -8,5 +12,7 @@
</span><span class="cx"> Second upgrade needed: Old version - 1 New version - 2
</span><span class="cx"> Failed to get an index from a deleted object store
</span><span class="cx"> Second versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetindexfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/get-index-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-index-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-index-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,120 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.index().&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetIndexFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    var index = objectStore.index(&quot;TestIndex&quot;);
-    log(&quot;Got an index as expected: &quot; + index);
-
-    try {
-        objectStore.index(null);
-    } catch(e) {
-        log(&quot;Failed to get an index with a null name&quot;);
-    }
-
-    try {
-        objectStore.index(&quot;DoesNotExistdex&quot;);
-    } catch(e) {
-        log(&quot;Failed to get an index that doesn't exist&quot;);
-    }
-
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        continueTest2();
-        database.close();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest2()
-{
-    var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetIndexFailuresDatabase&quot;, 2);
-    createRequest.onupgradeneeded = function(event) {
-        log(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.index(&quot;TestIndex&quot;);
-        } catch(e) {
-            log(&quot;Failed to get an index from a deleted object store&quot;);
-        }        
-            
-        versionTransaction.onabort = function(event) {
-            log(&quot;Second versionchange transaction unexpected aborted&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log(&quot;Second versionchange transaction complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log(&quot;Second versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/get-index-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetkeyrangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Success getting keyRange [-1 (Closed), undefined (Open)]
</span><span class="lines">@@ -123,5 +128,7 @@
</span><span class="cx"> ALERT: Success getting keyRange [Fri Nov 04 1955 17:00:00 GMT-0700 (PDT) (Open), Wed Oct 21 2015 09:00:00 GMT-0700 (PDT) (Open)]
</span><span class="cx"> ALERT: Result is Fish under the sea
</span><span class="cx"> ALERT: readonly transaction complete
</span><del>-ALERT: Done
-This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderngetkeyrangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,171 +1,9 @@
</span><del>-This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;GetKeyRangeDatabase&quot;, 1);
-var database;
-
-var date1 = new Date(&quot;1955-11-05T00:00:00&quot;);
-var date2 = new Date(&quot;1955-11-12T18:00:00&quot;);
-var date3 = new Date(&quot;2015-10-21T16:00:00&quot;);
-    
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    objectStore.put(&quot;Flux capacitor&quot;, date1);
-    objectStore.put(&quot;Fish under the sea&quot;, date2);
-    objectStore.put(&quot;Hoverboards&quot;, date3);
-
-    for (var i = 0; i &lt; 100; ++i)
-        objectStore.put(&quot;\&quot;&quot; + i + &quot;\&quot;&quot;, i);
-
-    objectStore.put(&quot;PosInf&quot;, Infinity);
-    objectStore.put(&quot;NegInf&quot;, -Infinity);
-
-    objectStore.put(&quot;A&quot;, &quot;A&quot;);
-    objectStore.put(&quot;As&quot;, &quot;As&quot;);
-    objectStore.put(&quot;AS&quot;, &quot;AS&quot;);
-    objectStore.put(&quot;a&quot;, &quot;a&quot;);
-
-    objectStore.put(&quot;array 1&quot;, [1, &quot;hello&quot;]);
-    objectStore.put(&quot;array 2&quot;, [2, &quot;goodbye&quot;]);
-    objectStore.put(&quot;array 3&quot;, []);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-var objectStore;
-
-function testGet(keyRange) {
-    var request = objectStore.get(keyRange);
-    request.onsuccess = function()
-    {
-        alert(&quot;Success getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + (keyRange.lowerOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;), &quot; + keyRange.upper + &quot; (&quot; + (keyRange.upperOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;)]&quot;);
-        alert(&quot;Result is &quot; + request.result);
-    }
-    request.onerror = function()
-    {
-        alert(&quot;Unexpected error getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + keyRange.lowerOpen + &quot;), &quot; + keyRange.upper + &quot; (&quot; + keyRange.upperOpen + &quot;)]&quot;);
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    testGet(IDBKeyRange.lowerBound(-1));
-    testGet(IDBKeyRange.lowerBound(-1, true));
-    testGet(IDBKeyRange.lowerBound(0));
-    testGet(IDBKeyRange.lowerBound(0, true));
-    testGet(IDBKeyRange.lowerBound(0.1));
-    testGet(IDBKeyRange.lowerBound(0.1, true));
-    testGet(IDBKeyRange.lowerBound(99));
-    testGet(IDBKeyRange.lowerBound(99, true));
-    testGet(IDBKeyRange.lowerBound(99.1));
-    testGet(IDBKeyRange.lowerBound(99.1, true));
-    
-    testGet(IDBKeyRange.upperBound(100));
-    testGet(IDBKeyRange.upperBound(100, true));
-    testGet(IDBKeyRange.upperBound(99));
-    testGet(IDBKeyRange.upperBound(99, true));
-    testGet(IDBKeyRange.upperBound(98.99999));
-    testGet(IDBKeyRange.upperBound(98.99999, true));
-    testGet(IDBKeyRange.upperBound(98));
-    testGet(IDBKeyRange.upperBound(98, true));
-    testGet(IDBKeyRange.upperBound(0));
-    testGet(IDBKeyRange.upperBound(0, true));
-    testGet(IDBKeyRange.upperBound(-0.1));
-    testGet(IDBKeyRange.upperBound(-0.1, true));
-    
-    testGet(IDBKeyRange.bound(2.5, 3.5));
-    testGet(IDBKeyRange.bound(-0.5, 0.5));
-    testGet(IDBKeyRange.bound(98.5, 99.5));
-    testGet(IDBKeyRange.bound(-1, 0));
-    testGet(IDBKeyRange.bound(-1, 0, true));
-    testGet(IDBKeyRange.bound(-1, 0, false, true));
-    testGet(IDBKeyRange.bound(-1, 0, true, true));
-    testGet(IDBKeyRange.bound(3, 4));
-    testGet(IDBKeyRange.bound(3, 4, true));
-    testGet(IDBKeyRange.bound(3, 4, false, true));
-    testGet(IDBKeyRange.bound(3, 4, true, true));
-    testGet(IDBKeyRange.bound(99, 100));
-    testGet(IDBKeyRange.bound(99, 100, true));
-    testGet(IDBKeyRange.bound(99, 100, false, true));
-    testGet(IDBKeyRange.bound(99, 100, true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
-
-    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;));
-    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true));
-    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, false, true));
-    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true, true));
-    
-    testGet(IDBKeyRange.bound(Infinity, []));
-    testGet(IDBKeyRange.bound(Infinity, [], true));
-    testGet(IDBKeyRange.bound(Infinity, [], false, true));
-    testGet(IDBKeyRange.bound(Infinity, [], true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
-    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
-
-    testGet(IDBKeyRange.bound(date1, date3));
-    testGet(IDBKeyRange.bound(date1, date3, true));
-    testGet(IDBKeyRange.bound(date1, date3, false, true));
-    testGet(IDBKeyRange.bound(date1, date3, true, true));
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/get-keyrange.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: readwrite put success - about to try to delete an objectstore
</span><span class="lines">@@ -7,5 +12,7 @@
</span><span class="cx"> ALERT: Failed to deleteObjectStore with a non-existent objectstore - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
</span><span class="cx"> ALERT: Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: A request was placed against a transaction which is either currently not active, or which is finished.
</span><span class="cx"> ALERT: Second version change transaction complete
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,144 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        alert(&quot;readwrite put success - about to try to delete an objectstore&quot;);
-        try {
-            database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        } catch(e) {
-            alert(&quot;Failed to deleteObjectStore without a versionchange transaction - &quot; + e);
-        }
-    }
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction unexpected aborted&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction complete&quot;);
-        database.close();
-        continueTest2();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 2);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request unexpected error - &quot; + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Request unexpected success - &quot; + event);
-        done();
-    }
-
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-        var versionTransaction = openRequest.transaction;
-        database = event.target.result;
-
-        try {
-            database.deleteObjectStore(&quot;NonexistentObjectStore&quot;);
-        } catch(e) {
-            alert(&quot;Failed to deleteObjectStore with a non-existent objectstore - &quot; + e);
-        }
-
-        // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
-        var canFinish = false;
-        var spinGet = function() { 
-            objectStore.get(&quot;foo&quot;).onsuccess = function() {
-                if (!canFinish)
-                    spinGet();
-            }
-        }
-        spinGet();
-        
-        // After the versionChange transaction becomes inactive, but while it's still in-progress, try to delete the objectstore
-        var tryInactiveDelete = function() 
-        {
-            try {
-                database.deleteObjectStore(&quot;TestObjectStore&quot;);
-            } catch(e) {
-                alert(&quot;Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - &quot; + e);
-            }
-            canFinish = true;
-        }
-        
-        setTimeout(tryInactiveDelete, 0);
-
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Second version change transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Second version change transaction complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Second version change transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbdatabase-deleteobjectstore-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBDatabase.transaction()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Failed to start a transaction while a versionChange transaction was in progress - Error: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="lines">@@ -6,5 +11,7 @@
</span><span class="cx"> ALERT: Failed to start a transaction with an invalid mode - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('blahblah') is not one of 'readonly' or 'readwrite'.
</span><span class="cx"> ALERT: Failed to explicitly start a versionchange transaction - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('versionchange') is not one of 'readonly' or 'readwrite'.
</span><span class="cx"> ALERT: Failed to explicitly start a transaction with the close pending flag set - Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling IDBDatabase.transaction()
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,90 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling IDBDatabase.transaction()
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBDatabaseTransactionFailuresDatabase&quot;);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put FAILED - &quot; + event);
-        done();
-    }
-    
-    try {
-        database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    } catch(e) {
-        alert(&quot;Failed to start a transaction while a versionChange transaction was in progress - &quot; + e);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    try {
-        database.transaction([], &quot;readonly&quot;);
-    } catch(e) {
-        alert(&quot;Failed to start a transaction with an empty set of object stores - &quot; + e);
-    }
-
-    try {
-        database.transaction(&quot;NonexistentObjectStore&quot;, &quot;readonly&quot;);
-    } catch(e) {
-        alert(&quot;Failed to start a transaction to a nonexistent object store - &quot; + e);
-    }
-
-    try {
-        database.transaction(&quot;TestObjectStore&quot;, &quot;blahblah&quot;);
-    } catch(e) {
-        alert(&quot;Failed to start a transaction with an invalid mode - &quot; + e);
-    }
-
-    try {
-        database.transaction(&quot;TestObjectStore&quot;, &quot;versionchange&quot;);
-    } catch(e) {
-        alert(&quot;Failed to explicitly start a versionchange transaction - &quot; + e);
-    }
-    
-    try {
-        database.close();
-        database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    } catch(e) {
-        alert(&quot;Failed to explicitly start a transaction with the close pending flag set - &quot; + e);
-    }
-    
-    done();
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbdatabase-transaction-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbindexpropertiesbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests getting basic properties on an IDBIndex.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: TestIndex1
</span><span class="cx"> ALERT: [object IDBObjectStore]
</span><span class="lines">@@ -85,6 +90,7 @@
</span><span class="cx"> ALERT: false
</span><span class="cx"> ALERT: false
</span><span class="cx"> ALERT: readonly transaction complete
</span><del>-ALERT: Done
-This tests getting basic properties on an IDBIndex.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbindexpropertiesbasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,100 +1,10 @@
</span><del>-This tests getting basic properties on an IDBIndex.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function gol(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function logIndex(index)
-{
-    alert(index.name);
-    alert(index.objectStore);
-    alert(index.objectStore.name);
-    alert(index.keyPath);
-    alert(index.multiEntry);
-    alert(index.unique);
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBIndexPropertiesBasicDatabase&quot;, 1);
-var database;
-
-var indexes = new Array();
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    
-    indexes.push(objectStore.createIndex(&quot;TestIndex1&quot;, &quot;foo&quot;));
-    indexes.push(objectStore.createIndex(&quot;TestIndex2&quot;, &quot;foo&quot;, { unique: false, multiEntry: false }));
-    indexes.push(objectStore.createIndex(&quot;TestIndex3&quot;, &quot;foo&quot;, { unique: true, multiEntry: false }));
-    indexes.push(objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;, { unique: false, multiEntry: true }));
-    indexes.push(objectStore.createIndex(&quot;TestIndex5&quot;, &quot;foo&quot;, { unique: true, multiEntry: true }));
-    indexes.push(objectStore.createIndex(&quot;TestIndex6&quot;, [ &quot;foo&quot; ]));
-    indexes.push(objectStore.createIndex(&quot;TestIndex7&quot;, [ &quot;foo&quot;, &quot;bar&quot; ]));
-
-    for (index in indexes)
-        logIndex(indexes[index]);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    logIndex(objectStore.index(&quot;TestIndex1&quot;));
-    logIndex(objectStore.index(&quot;TestIndex2&quot;));
-    logIndex(objectStore.index(&quot;TestIndex3&quot;));
-    logIndex(objectStore.index(&quot;TestIndex4&quot;));
-    logIndex(objectStore.index(&quot;TestIndex5&quot;));
-    logIndex(objectStore.index(&quot;TestIndex6&quot;));
-    logIndex(objectStore.index(&quot;TestIndex7&quot;));
-
-    transaction.onabort = function(event) {
-        alert(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/idbindex-properties-basic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates an object store then populates it. It then clears it and makes sure it has nothing left in it.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Success opening database connection - Starting readwrite transaction
</span><span class="lines">@@ -21,7 +26,7 @@
</span><span class="cx"> ALERT: Value gotten was undefined
</span><span class="cx"> ALERT: Value gotten was undefined
</span><span class="cx"> ALERT: Readwrite transaction complete
</span><del>-ALERT: Done
-This test creates an object store then populates it.
-It then clears it and makes sure it has nothing left in it.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,111 +1,9 @@
</span><del>-This test creates an object store then populates it.&lt;br&gt;
-It then clears it and makes sure it has nothing left in it.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreClearDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;, { autoIncrement: true });
-    var request = objectStore.put(&quot;bar1&quot;);
-    var request = objectStore.put(&quot;bar2&quot;);
-    var request = objectStore.put(&quot;bar3&quot;);
-    var request = objectStore.put(&quot;bar4&quot;);
-    var request = objectStore.put(&quot;bar5&quot;);
-    var request = objectStore.put(&quot;bar6&quot;);
-    var request = objectStore.put(&quot;bar7&quot;);
-    var request = objectStore.put(&quot;bar8&quot;);
-    var request = objectStore.put(&quot;bar9&quot;);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert(&quot;Value gotten was &quot; + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClearDatabase&quot;, 1);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request unexpected error - &quot; + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Request unexpected upgradeneeded - &quot; + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting readwrite transaction&quot;);
-        var database = event.target.result;
-        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-        var request;
-        for (var i = 1; i &lt;= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-        
-        request = objectStore.clear();
-        request.onsuccess = function() {
-            alert(&quot;Object store cleared&quot;);
-            var newRequests;
-            for (var i = 1; i &lt;= 9; ++i) {
-                newRequests = objectStore.get(i);
-                newRequests.onsuccess = getChecker;
-            }    
-        }
-
-        transaction.onabort = function(event) {
-            alert(&quot;Readwrite transaction unexpected abort&quot;);
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert(&quot;Readwrite transaction complete&quot;);
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert(&quot;Readwrite transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-clear-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates an object store then populates it, then commits that transaction. It then clears it, but aborts that transaction. Finally it checks to make sure everything from step 1 is still in there.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Success opening database connection - Starting readwrite transaction
</span><span class="lines">@@ -32,8 +37,7 @@
</span><span class="cx"> ALERT: Value gotten was bar8
</span><span class="cx"> ALERT: Value gotten was bar9
</span><span class="cx"> ALERT: Readwrite transaction complete
</span><del>-ALERT: Done
-This test creates an object store then populates it, then commits that transaction.
-It then clears it, but aborts that transaction.
-Finally it checks to make sure everything from step 1 is still in there.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,167 +1,9 @@
</span><del>-This test creates an object store then populates it, then commits that transaction.&lt;br&gt;
-It then clears it, but aborts that transaction.&lt;br&gt;
-Finally it checks to make sure everything from step 1 is still in there.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;, { autoIncrement: true });
-    var request = objectStore.put(&quot;bar1&quot;);
-    var request = objectStore.put(&quot;bar2&quot;);
-    var request = objectStore.put(&quot;bar3&quot;);
-    var request = objectStore.put(&quot;bar4&quot;);
-    var request = objectStore.put(&quot;bar5&quot;);
-    var request = objectStore.put(&quot;bar6&quot;);
-    var request = objectStore.put(&quot;bar7&quot;);
-    var request = objectStore.put(&quot;bar8&quot;);
-    var request = objectStore.put(&quot;bar9&quot;);
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert(&quot;Value gotten was &quot; + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request unexpected error - &quot; + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Request unexpected upgradeneeded - &quot; + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting readwrite transaction&quot;);
-        var database = event.target.result;
-        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-        var request;
-        for (var i = 1; i &lt;= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-        
-        request = objectStore.clear();
-        request.onsuccess = function() {
-            alert(&quot;Object store cleared, making sure its all gone.&quot;);
-            var newRequests;
-            for (var i = 1; i &lt;= 9; ++i) {
-                newRequests = objectStore.get(i);
-                newRequests.onsuccess = getChecker;
-            }
-            
-            // We'll be on the last request here, can just override it.
-            newRequests.onsuccess = function(event) {
-                getChecker(event);
-                transaction.abort();
-            }
-        }
-        
-        // Just for fun clear it twice, won't change anything
-        objectStore.clear();
-
-        transaction.onabort = function(event) {
-            alert(&quot;Readwrite transaction abort&quot;);
-            continueTest2();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert(&quot;Readwrite transaction unexpected complete&quot;);
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert(&quot;Readwrite transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
-
-    openRequest.onerror = function(event) {
-        alert(&quot;Request unexpected error - &quot; + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert(&quot;Request unexpected blocked - &quot; + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert(&quot;Request unexpected upgradeneeded - &quot; + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting final transaction&quot;);
-        var database = event.target.result;
-        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-        var request;
-        for (var i = 1; i &lt;= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-
-        transaction.onabort = function(event) {
-            alert(&quot;Readwrite transaction unexpected abort&quot;);
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert(&quot;Readwrite transaction complete&quot;);
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert(&quot;Readwrite transaction unexpected error - &quot; + event);
-            done();
-        }
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-clear-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstorecount1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test exercises various uses of IDBObjectStore.count()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Count is: 1
</span><span class="cx"> ALERT: Count is: 0
</span><span class="lines">@@ -50,5 +55,7 @@
</span><span class="cx"> ALERT: Count is: 3
</span><span class="cx"> ALERT: Count is: 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><del>-ALERT: Done
-This test exercises various uses of IDBObjectStore.count()
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstorecount1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,92 +1,9 @@
</span><del>-This test exercises various uses of IDBObjectStore.count()
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCount1Database&quot;, 1);
-var database;
-var objectStore;
-
-function getCount(arg)
-{
-    var request;
-    if (arg == undefined)
-        request = objectStore.count();
-    else
-        request = objectStore.count(arg);
-    
-    request.onsuccess = function() {
-        alert(&quot;Count is: &quot; + request.result);
-    }
-    request.onerror = function(error) {
-        alert(&quot;Unexpected error getting count: &quot; + error);
-        done();
-    }
-}
-
-function getCounts()
-{
-    getCount();
-    getCount(IDBKeyRange.bound(3, 6));    
-    getCount(IDBKeyRange.bound(3, 6, true, false));    
-    getCount(IDBKeyRange.bound(3, 6, false, true));
-    getCount(7);    
-}
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    
-    objectStore.put(1, 1);
-    getCounts();
-    objectStore.put(2, 2);
-    getCounts();
-    objectStore.put(3, 3);
-    getCounts();
-    objectStore.put(4, 4);
-    getCounts();
-    objectStore.put(5, 5);
-    getCounts();
-    objectStore.put(6, 6);
-    getCounts();
-    objectStore.put(7, 7);
-    getCounts();
-    objectStore.put(8, 8);
-    getCounts();
-    objectStore.put(9, 9);
-    getCounts();
-    objectStore.put(10, 10);
-    getCounts();
-
-    // FIXME: Once objectStore.delete() is implemented, also test counts after deleting previous records.
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-count-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstorecountfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBObjectStore.count().
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Failed to count records in object store with an invalid key
</span><span class="cx"> ALERT: Failed to count records in object store that's been deleted
</span><span class="lines">@@ -4,5 +9,7 @@
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Failed to count records in object store while transaction is inactive
</span><span class="cx"> ALERT: readonly transaction complete
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.count().
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstorecountfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,105 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.count().
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCountFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        try {
-            objectStore.count(NaN);
-        } catch(e) {
-            alert(&quot;Failed to count records in object store with an invalid key&quot;);
-        }
-        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.count();
-        } catch(e) {
-            alert(&quot;Failed to count records in object store that's been deleted&quot;);
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-    
-    var getWhileInactive = function() {
-        try {
-            objectStore.count();
-        } catch(e) {
-            alert(&quot;Failed to count records in object store while transaction is inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(getWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-count-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test exercises various uses of IDBObjectStore.delete()
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Count is 113
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="lines">@@ -21,5 +25,7 @@
</span><span class="cx"> Deleted &quot;[object IDBKeyRange]&quot;, and there should now be 3 less things total.
</span><span class="cx"> Count is 4
</span><span class="cx"> readwrite transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,140 +1,10 @@
</span><del>-This test exercises various uses of IDBObjectStore.delete()&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function logCount()
-{
-    var req = objectStore.count();
-    req.onsuccess = function() { 
-        log(&quot;Count is &quot; + req.result);
-    }
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDelete1Database&quot;, 1);
-var database;
-var objectStore;
-
-var date1 = new Date(&quot;1999-12-28T23:00:00&quot;);
-var date2 = new Date(&quot;1999-12-29T23:00:00&quot;);
-var date3 = new Date(&quot;1999-12-30T23:00:00&quot;);
-var date4 = new Date(&quot;1999-12-31T23:00:00&quot;);
-var date5 = new Date(&quot;2000-01-01T00:00:00&quot;);
-var date6 = new Date(&quot;2000-01-02T00:00:00&quot;);
-var date7 = new Date(&quot;2000-01-03T00:00:00&quot;);
-var date8 = new Date(&quot;2000-01-04T00:00:00&quot;);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    
-    // Just for the heck of it.
-    objectStore.delete(&quot;foo&quot;);
-    objectStore.put(&quot;boo&quot;, &quot;foo&quot;);
-    objectStore.delete(&quot;foo&quot;);
-
-    objectStore.put(&quot;boo&quot;, &quot;foo&quot;);
-    objectStore.put(&quot;bop&quot;, &quot;fop&quot;);
-    objectStore.put(&quot;boq&quot;, &quot;foq&quot;);
-    objectStore.put(&quot;bor&quot;, &quot;for&quot;);
-    objectStore.put(&quot;bos&quot;, &quot;fos&quot;);
-    
-    for (var i = 0; i &lt; 100; ++i)
-        objectStore.put(&quot;number &quot; + i, i);
-
-    objectStore.put(&quot;date 1&quot;, date1);
-    objectStore.put(&quot;date 2&quot;, date2);
-    objectStore.put(&quot;date 3&quot;, date3);
-    objectStore.put(&quot;date 4&quot;, date4);
-    objectStore.put(&quot;date 5&quot;, date5);
-    objectStore.put(&quot;date 6&quot;, date6);
-    objectStore.put(&quot;date 7&quot;, date7);
-    objectStore.put(&quot;date 8&quot;, date8);
-
-    logCount();
-
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    // The pairs of things in the array are the things to delete followed by the expected decrease in the total count of objects.
-    var thingsToDelete = [
-        date8, 1,
-        date8, 0, 
-        &quot;balyhoo&quot;, 0, 
-        IDBKeyRange.bound(date6, date7, true, true), 0,
-        IDBKeyRange.bound(date6, date7, true), 1,
-        IDBKeyRange.bound(date5, date6, false, true), 1,
-        IDBKeyRange.bound(date1, date6), 5,
-        IDBKeyRange.bound(1, 98), 98, 
-        IDBKeyRange.bound(&quot;foo&quot;, &quot;fos&quot;, true, true), 3
-    ];
-    var currentThing = 0;
-    
-    var runDeleteTests = function()
-    {
-        if (!thingsToDelete[currentThing])
-            return;
-        
-        objectStore.delete(thingsToDelete[currentThing]).onsuccess = function() {
-            log(&quot;Deleted \&quot;&quot; + thingsToDelete[currentThing] + &quot;\&quot;, and there should now be &quot; + thingsToDelete[currentThing + 1] + &quot; less things total.&quot;);
-            logCount();
-            currentThing += 2;
-            runDeleteTests();
-        }
-    }
-    runDeleteTests();
-    
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/idbobjectstore-delete-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,9 +1,15 @@
</span><span class="cx"> This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="cx"> After delete, record for &quot;foo&quot; has value: undefined
</span><span class="cx"> readwrite transaction aborted
</span><span class="cx"> Record for &quot;foo&quot; has final value: bar
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,114 +1,10 @@
</span><del>-This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function logCount()
-{
-    var req = objectStore.count();
-    req.onsuccess = function() { 
-        log(&quot;Count is &quot; + req.result);
-    }
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDelete2Database&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    database.createObjectStore(&quot;TestObjectStore&quot;).put(&quot;bar&quot;, &quot;foo&quot;);
-
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    transaction.objectStore(&quot;TestObjectStore&quot;).delete(&quot;foo&quot;).onsuccess = function()
-    {
-        var request = transaction.objectStore(&quot;TestObjectStore&quot;).get(&quot;foo&quot;);
-        request.onsuccess = function()
-        {
-            log(&quot;After delete, record for \&quot;foo\&quot; has value: &quot; + request.result);
-            transaction.abort();
-        }
-    }
-
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction aborted&quot;);
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction unexpected complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-function continueTest2()
-{   
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-
-    var request = transaction.objectStore(&quot;TestObjectStore&quot;).get(&quot;foo&quot;);
-    request.onsuccess = function()
-    {
-        log(&quot;Record for \&quot;foo\&quot; has final value: &quot; + request.result);
-    }
-
-    transaction.onabort = function(event)
-    {
-        log(&quot;readonly transaction unexpected abort&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event)
-    {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event)
-    {
-        log(&quot;readonly transaction unexpected error&quot;);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/idbobjectstore-delete-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredeletefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBObjectStore.delete().
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to delete record from object store with an invalid key
</span><span class="cx"> Failed to delete record from object store that has been deleted
</span><span class="lines">@@ -6,5 +10,7 @@
</span><span class="cx"> Failed to delete a record in read-only transaction
</span><span class="cx"> Failed to delete record with inactive transaction
</span><span class="cx"> readwrite transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoredeletefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,120 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.delete().&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDeleteFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        try {
-            objectStore.delete(NaN);
-        } catch(e) {
-            log(&quot;Failed to delete record from object store with an invalid key&quot;);
-        }
-        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.delete(&quot;foo&quot;);
-        } catch(e) {
-            log(&quot;Failed to delete record from object store that has been deleted&quot;);
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-    try {
-        objectStore.delete(&quot;foo&quot;);
-    } catch(e) {
-        log(&quot;Failed to delete a record in read-only transaction&quot;);
-    }
-    
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            objectStore.delete(&quot;foo&quot;);
-        } catch(e) {
-            log(&quot;Failed to delete record with inactive transaction&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/idbobjectstore-delete-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBObjectStore.get().
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Failed to get record from object store with an invalid key
</span><span class="cx"> ALERT: Failed to get record from object store that has been deleted
</span><span class="lines">@@ -4,5 +9,7 @@
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><span class="cx"> ALERT: Failed to get record from object store while the transaction is inactive
</span><span class="cx"> ALERT: readonly transaction complete
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.get().
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,105 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.get().
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        try {
-            objectStore.get(NaN);
-        } catch(e) {
-            alert(&quot;Failed to get record from object store with an invalid key&quot;);
-        }
-        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.get(&quot;foo&quot;);
-        } catch(e) {
-            alert(&quot;Failed to get record from object store that has been deleted&quot;);
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var getWhileInactive = function() {
-        try {
-            objectStore.get(&quot;foo&quot;);
-        } catch(e) {
-            alert(&quot;Failed to get record from object store while the transaction is inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(getWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-get-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Failed to put record into object store with an invalid key
</span><span class="cx"> ALERT: Failed to put record into object store that has been deleted
</span><span class="lines">@@ -7,5 +12,7 @@
</span><span class="cx"> ALERT: Failed to put record into object store with inactive transaction
</span><span class="cx"> ALERT: Failed to clear object store with inactive transaction
</span><span class="cx"> ALERT: readwrite transaction complete
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,127 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBObjectStorePutAndClearFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        try {
-            objectStore.put(&quot;bar&quot;, NaN);
-        } catch(e) {
-            alert(&quot;Failed to put record into object store with an invalid key&quot;);
-        }
-        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-        } catch(e) {
-            alert(&quot;Failed to put record into object store that has been deleted&quot;);
-        } 
-
-        try {
-            objectStore.clear();
-        } catch(e) {
-            alert(&quot;Failed to clear object store that has been deleted&quot;);
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    
-    try {
-        objectStore.clear();
-    } catch(e) {
-        alert(&quot;Failed to clear object store in read-only transaction&quot;);
-    }
-    
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-        } catch(e) {
-            alert(&quot;Failed to put record into object store with inactive transaction&quot;);
-        }
-        
-        try {
-            objectStore.clear();
-        } catch(e) {
-            alert(&quot;Failed to clear object store with inactive transaction&quot;);
-        }
-        
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbobjectstore-put-and-clear-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This tests some obvious failures that can happen while calling transaction.objectStore()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: [object IDBTransaction] - versionchange
</span><span class="cx"> ALERT: [object IDBDatabase]
</span><span class="lines">@@ -7,6 +12,7 @@
</span><span class="cx"> ALERT: Caught attempt to access valid object store on a transaction that is already finishing
</span><span class="cx"> ALERT: put failed (because transaction was aborted)
</span><span class="cx"> ALERT: First version change transaction unexpected error - [object Event]
</span><del>-ALERT: Done
-This tests some obvious failures that can happen while calling transaction.objectStore()
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernidbtransactionobjectstorefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,78 +1,9 @@
</span><del>-This tests some obvious failures that can happen while calling transaction.objectStore()&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open(&quot;TransactionObjectStoreFailuresTestDatabase&quot;);
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event)
-{
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + &quot; - &quot; + tx.mode);
-    alert(db);
-
-    var os1 = db.createObjectStore(&quot;TestObjectStore1&quot;);
-    var os2 = db.createObjectStore(&quot;TestObjectStore2&quot;);
-
-    var putRequest = os1.put(&quot;bar&quot;, &quot;foo&quot;);
-    
-    putRequest.onerror = function() {
-        alert(&quot;put failed (because transaction was aborted)&quot;);
-    }
-    
-    try {
-        tx.objectStore(&quot;&quot;);
-    } catch(e) {
-        alert(&quot;Caught attempt to access empty-named object store on the transaction&quot;);
-    }
-    
-    try {
-        tx.objectStore();
-    } catch(e) {
-        alert(&quot;Caught attempt to access null-named object store on the transaction&quot;);
-    }
-     
-    try {
-        tx.objectStore(&quot;ThisObjectStoreDoesNotExist&quot;);
-    } catch(e) {
-        alert(&quot;Caught attempt to access non-existant object store on the transaction&quot;);
-    }
-    
-    tx.abort();
-    
-    try {
-        tx.objectStore(&quot;TestObjectStore1&quot;);
-    } catch(e) {
-        alert(&quot;Caught attempt to access valid object store on a transaction that is already finishing&quot;);
-    }
-      
-    tx.onabort = function(event) {
-        alert(&quot;First version change transaction abort&quot;);
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert(&quot;First version change transaction unexpected complete&quot;);
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert(&quot;First version change transaction unexpected error - &quot; + event);
-        done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/idbtransaction-objectstore-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests the expected values from some more complex index situations.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> get &quot;good&quot; result is: [object Object]
</span><span class="cx"> bar is good
</span><span class="lines">@@ -132,5 +136,7 @@
</span><span class="cx"> count result is: 11
</span><span class="cx"> 
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,106 +1,10 @@
</span><del>-This tests the expected values from some more complex index situations.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Index1Database&quot;, 1);
-
-function checkKey(index, key)
-{
-    var request1 = index.get(key);
-    var request2 = index.getKey(key);
-
-    request1.onsuccess = function() {
-        log(&quot;get \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request1.result);
-        for (n in request1.result)
-            log(n + &quot; is &quot; + request1.result[n]);
-    }
-    request2.onsuccess = function() {
-        log(&quot;getKey \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request2.result);
-        for (n in request2.result)
-            log(n + &quot; is &quot; + request2.result[n]);
-    } 
-}
-
-function checkIndex(index)
-{
-    checkKey(index, &quot;good&quot;);
-    checkKey(index, &quot;bad&quot;);
-    checkKey(index, &quot;ok&quot;);
-    checkKey(index, &quot;meh&quot;);
-    checkKey(index, &quot;super&quot;);
-    checkKey(index, &quot;thanksForAsking&quot;);
-    checkKey(index, [ &quot;good&quot;, &quot;bad&quot; ]);
-    checkKey(index, [ &quot;ok&quot;, &quot;meh&quot; ]);
-    checkKey(index, [ &quot;super&quot;, &quot;thanksForAsking&quot; ]);
-    checkKey(index, &quot;This is to test&quot;);
-    checkKey(index, &quot;multiEntry indexes&quot;);
-    checkKey(index, [&quot;This is to test&quot;, &quot;multiEntry indexes&quot; ]);
-    
-    var request = index.count();
-    request.onsuccess = function() {
-        log(&quot;count result is: &quot; + request.result);
-        log(&quot; &quot;);
-    }
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    var index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
-    var index3 = objectStore.createIndex(&quot;TestIndex3&quot;, [ &quot;bar&quot;, &quot;baz&quot; ]);
-    var index4 = objectStore.createIndex(&quot;TestIndex4&quot;, &quot;bar&quot;, { multiEntry: true });
-
-    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
-    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 2);
-    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 3);
-    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 4);
-    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 5);
-    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 6);
-    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 7);
-    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 8);
-    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 9);
-    objectStore.put({ bar: [ &quot;This is to test&quot;, &quot;multiEntry indexes&quot; ]}, 10);
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    checkIndex(index4);
-  
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests indexes are left in appropriate states after aborted transactions.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> get &quot;good&quot; result is: [object Object]
</span><span class="cx"> bar is good
</span><span class="lines">@@ -146,5 +150,7 @@
</span><span class="cx"> count result is: 3
</span><span class="cx"> 
</span><span class="cx"> readwrite transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,165 +1,10 @@
</span><del>-This tests indexes are left in appropriate states after aborted transactions.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Index2Database&quot;, 1);
-
-function checkKey(index, key)
-{
-    var request1 = index.get(key);
-    var request2 = index.getKey(key);
-
-    request1.onsuccess = function() {
-        log(&quot;get \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request1.result);
-        for (n in request1.result)
-            log(n + &quot; is &quot; + request1.result[n]);
-    }
-    request2.onsuccess = function() {
-        log(&quot;getKey \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request2.result);
-        for (n in request2.result)
-            log(n + &quot; is &quot; + request2.result[n]);
-    } 
-}
-
-function checkIndex(index)
-{
-    checkKey(index, &quot;good&quot;);
-    checkKey(index, &quot;bad&quot;);
-    checkKey(index, &quot;multiEntry&quot;);
-    checkKey(index, &quot;test&quot;);
-    
-    var request = index.count();
-    request.onsuccess = function() {
-        log(&quot;count result is: &quot; + request.result);
-        log(&quot; &quot;);
-    }
-}
-
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    var index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
-    var index3 = objectStore.createIndex(&quot;TestIndex3&quot;, &quot;bar&quot;, { multiEntry: true });
-
-    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
-    objectStore.put({ bar: [ &quot;multiEntry&quot;, &quot;test&quot; ]}, 2);
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var index1 = objectStore.index(&quot;TestIndex1&quot;);
-    var index2 = objectStore.index(&quot;TestIndex2&quot;);
-    var index3 = objectStore.index(&quot;TestIndex3&quot;);
-    
-    objectStore.delete(1).onsuccess = function() {
-       log(&quot;Deleted key 1 from objectstore&quot;);
-       log(&quot;&quot;);
-    }
-
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-
-    objectStore.clear().onsuccess = function() {
-       log(&quot;Cleared objectstore&quot;);
-       log(&quot;&quot;);
-    }
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    
-    objectStore.get(0).onsuccess = function() {
-        log(&quot;All done. Moving on to final part&quot;);
-        transaction.abort();
-    }
-    
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction aborted&quot;);
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction unexpected complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-function continueTest2()
-{   
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var index1 = objectStore.index(&quot;TestIndex1&quot;);
-    var index2 = objectStore.index(&quot;TestIndex2&quot;);
-    var index3 = objectStore.index(&quot;TestIndex3&quot;);
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readwrite transaction unexpected abort&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readwrite transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readwrite transaction unexpected error&quot;);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-3-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-3-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-3-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test exercises the &quot;unique&quot; constraint of indexes.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> First put success
</span><span class="cx"> Value of 1 is: [object Object]
</span><span class="lines">@@ -19,5 +23,7 @@
</span><span class="cx"> Count in index 1 is: 1
</span><span class="cx"> Count in index 2 is: 1
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-3.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-3.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-3.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,117 +1,10 @@
</span><del>-This test exercises the &quot;unique&quot; constraint of indexes.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;Index3Database&quot;, 1);
-var objectStore;
-
-function checkObjectStore()
-{
-    var req1 = objectStore.get(1);
-    req1.onsuccess = function() {
-        log(&quot;Value of 1 is: &quot; + req1.result);
-    }
-    var req2 = objectStore.get(2);
-    req2.onsuccess = function() {
-        log(&quot;Value of 2 is: &quot; + req2.result);
-    }
-    var req3 = objectStore.get(3);
-    req3.onsuccess = function() {
-        log(&quot;Value of 3 is: &quot; + req3.result);
-    }
-}
-
-function checkIndex(index, name)
-{
-    var req = index.count();
-    req.onsuccess = function() {
-        log(&quot;Count in index &quot; + name + &quot; is: &quot; + req.result);
-    }
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var i1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;, { unique: true });
-    var i2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;bar&quot;, { multiEntry: true, unique: true });
-
-    var request1 = objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
-    request1.onsuccess = function() {
-        log(&quot;First put success&quot;);
-    }
-    request1.onerror = function() {
-        log(&quot;First put unexpected failure&quot;);
-        done();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    var request2 = objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 2);
-    request2.onsuccess = function() {
-        log(&quot;Second put unexpected success&quot;);
-        done();
-    }
-    request2.onerror = function(e) {
-        log(&quot;Second put failure&quot;);
-        e.stopPropagation();
-        e.preventDefault();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    var request3 = objectStore.put({ bar: [ &quot;gnarly&quot;, &quot;great&quot;, &quot;good&quot; ]}, 3);
-    request3.onsuccess = function() {
-        log(&quot;Third put unexpected success&quot;);
-        done();
-    }
-    request3.onerror = function(e) {
-        log(&quot;Third put failure&quot;);
-        e.stopPropagation();
-        e.preventDefault();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-3.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex4expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-4-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-4-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-4-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests that indexes added to an object store with existing records are populated upon their creation.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Count is: 18
</span><span class="cx"> Cursor at record: A / 1
</span><span class="lines">@@ -19,5 +23,7 @@
</span><span class="cx"> Cursor at record: H / 16
</span><span class="cx"> Cursor at record: I / 17
</span><span class="cx"> Cursor at record: I / 18
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex4html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-4.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-4.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-4.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,97 +1,10 @@
</span><del>-This tests that indexes added to an object store with existing records are populated upon their creation.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var index;
-var objectStore;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log(&quot;Count is: &quot; + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor) {
-            done();
-            return;
-        }
-        log(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
-        cursor.continue();
-
-    }
-    cursorRequest.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open(&quot;Index4Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put({ bar: &quot;A&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot; }, 2);
-    objectStore.put({ bar: &quot;B&quot; }, 3);
-    objectStore.put({ bar: &quot;B&quot; }, 4);
-    objectStore.put({ bar: &quot;C&quot; }, 5);
-    objectStore.put({ bar: &quot;C&quot; }, 6);
-    objectStore.put({ bar: &quot;D&quot; }, 7);
-    objectStore.put({ bar: &quot;D&quot; }, 8);
-    objectStore.put({ bar: &quot;E&quot; }, 9);
-    objectStore.put({ bar: &quot;E&quot; }, 10);
-    objectStore.put({ bar: &quot;F&quot; }, 11);
-    objectStore.put({ bar: &quot;F&quot; }, 12);
-    objectStore.put({ bar: &quot;G&quot; }, 13);
-    objectStore.put({ bar: &quot;G&quot; }, 14);    
-    objectStore.put({ bar: &quot;H&quot; }, 15);
-    objectStore.put({ bar: &quot;H&quot; }, 16);  
-    objectStore.put({ bar: &quot;I&quot; }, 17);
-    objectStore.put({ bar: &quot;I&quot; }, 18);  
-
-    // This index should be populated with the above values upon its creation.
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-4.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex5expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-5-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,8 +1,13 @@
</span><del>-This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index.
-(The index creation should fail).
</del><ins>+This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index. (The index creation should fail).
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Error getting cursor count
</span><span class="cx"> Error opening or iterating cursor
</span><span class="cx"> Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindex5html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-5.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-5.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-5.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,85 +1,10 @@
</span><del>-This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index.&lt;br&gt;
-(The index creation should fail).&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var index;
-var objectStore;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log(&quot;Count is: &quot; + countRequest.result);
-    }
-    countRequest.onerror = function(e) {
-        log(&quot;Error getting cursor count&quot;);
-        e.stopPropagation();
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        log(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
-        
-        if (cursor.key != undefined)
-            cursor.continue();
-        else
-            done();
-    }
-    cursorRequest.onerror = function(e) {
-        log(&quot;Error opening or iterating cursor&quot;);
-        e.stopPropagation();
-    } 
-}
-
-var createRequest = window.indexedDB.open(&quot;Index5Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    objectStore.put({ bar: &quot;A&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot; }, 2);
-
-    // This index should be populated with the above values upon its creation, but that should fail because
-    // of constraint violations.
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;, { unique: true });
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-5.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests cursors that iterate over entire indexes.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> 
</span><span class="cx"> Starting a new cursor: testCursorDirection(index1, 'next')
</span><span class="lines">@@ -402,5 +406,7 @@
</span><span class="cx"> Cursor key is: a
</span><span class="cx"> Cursor primary key is: 1
</span><span class="cx"> Cursor value is: [object Object]
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,134 +1,10 @@
</span><del>-This tests cursors that iterate over entire indexes.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source.name);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
-    log(&quot;Cursor value is: &quot; + cursor.value);  
-}
-
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            startNextCursor();
-            return;
-        }
-        log(&quot;Success opening or iterating cursor&quot;);
-        logCursor(request.result);  
-        request.result.continue();
-    }
-    request.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(request.result);
-        done();
-    } 
-}
-
-function testCursorDirection(index, direction)
-{
-    var range = IDBKeyRange.lowerBound(-Infinity);
-    var request = index.openCursor(range, direction);
-    setupRequest(request);
-}
-
-var index1;
-var index2;
-
-var cursorCommands = [
-    &quot;testCursorDirection(index2, 'prevunique')&quot;,
-    &quot;testCursorDirection(index1, 'prevunique')&quot;,
-    &quot;testCursorDirection(index2, 'prev')&quot;,
-    &quot;testCursorDirection(index1, 'prev')&quot;,
-    &quot;testCursorDirection(index2, 'nextunique')&quot;,
-    &quot;testCursorDirection(index1, 'nextunique')&quot;,
-    &quot;testCursorDirection(index2, 'next')&quot;,
-    &quot;testCursorDirection(index1, 'next')&quot;,
-];
-
-function startNextCursor()
-{
-    if (!cursorCommands.length) {
-        done();
-        return;
-    }
-    
-    var command = cursorCommands.pop();
-    log (&quot;&quot;);
-    log(&quot;Starting a new cursor: &quot; + command);
-    eval(command);
-}
-    
-var createRequest = window.indexedDB.open(&quot;IndexCursor1Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
-
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 3);
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 2);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 5);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 6);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 4);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 7);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 9);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 8);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 11);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 12);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 10);
-
-    var req1 = index1.count();
-    req1.onsuccess = function() {
-        log(&quot;TestIndex1 count is: &quot; + req1.result);
-    }
-
-    var req2 = index2.count();
-    req2.onsuccess = function() {
-        log(&quot;TestIndex2 count is: &quot; + req2.result);
-    }
-    
-    startNextCursor();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-cursor-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests cursors that iterate over parts of indexes.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> 
</span><span class="cx"> Starting a new cursor: testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))
</span><span class="lines">@@ -425,5 +429,7 @@
</span><span class="cx"> Cursor key is: B
</span><span class="cx"> Cursor primary key is: 4
</span><span class="cx"> Cursor value is: [object Object]
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,138 +1,10 @@
</span><del>-This tests cursors that iterate over parts of indexes.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source.name);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
-    log(&quot;Cursor value is: &quot; + cursor.value);  
-}
-
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            startNextCursor();
-            return;
-        }
-        log(&quot;Success opening or iterating cursor&quot;);
-        logCursor(request.result);  
-        request.result.continue();
-    }
-    request.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(request.result);
-        done();
-    } 
-}
-
-var index;
-
-function testCursorDirection(direction, range)
-{
-    var request = index.openCursor(range, direction);
-    setupRequest(request);
-}
-
-var cursorCommands = [
-    &quot;testCursorDirection('prevunique', IDBKeyRange.only('B'))&quot;,
-    &quot;testCursorDirection('prev', IDBKeyRange.only('B'))&quot;,
-    &quot;testCursorDirection('nextunique', IDBKeyRange.only('B'))&quot;,
-    &quot;testCursorDirection('next', IDBKeyRange.only('B'))&quot;,
-    &quot;testCursorDirection('prevunique', IDBKeyRange.lowerBound('C'))&quot;,
-    &quot;testCursorDirection('prev', IDBKeyRange.lowerBound('C'))&quot;,
-    &quot;testCursorDirection('nextunique', IDBKeyRange.lowerBound('C'))&quot;,
-    &quot;testCursorDirection('next', IDBKeyRange.lowerBound('C'))&quot;,
-    &quot;testCursorDirection('prevunique', IDBKeyRange.upperBound('B'))&quot;,
-    &quot;testCursorDirection('prev', IDBKeyRange.upperBound('B'))&quot;,
-    &quot;testCursorDirection('nextunique', IDBKeyRange.upperBound('B'))&quot;,
-    &quot;testCursorDirection('next', IDBKeyRange.upperBound('B'))&quot;,
-    &quot;testCursorDirection('prevunique', IDBKeyRange.bound('B', 'C'))&quot;,
-    &quot;testCursorDirection('prev', IDBKeyRange.bound('B', 'C'))&quot;,
-    &quot;testCursorDirection('nextunique', IDBKeyRange.bound('B', 'C'))&quot;,
-    &quot;testCursorDirection('next', IDBKeyRange.bound('B', 'C'))&quot;,
-    &quot;testCursorDirection('prevunique', IDBKeyRange.bound('B', 'D', true, true))&quot;,
-    &quot;testCursorDirection('prev', IDBKeyRange.bound('B', 'D', true, true))&quot;,
-    &quot;testCursorDirection('nextunique', IDBKeyRange.bound('B', 'D', true, true))&quot;,
-    &quot;testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))&quot;,
-];
-
-function startNextCursor()
-{
-    if (!cursorCommands.length) {
-        done();
-        return;
-    }
-
-    var command = cursorCommands.pop();
-    log (&quot;&quot;);
-    log(&quot;Starting a new cursor: &quot; + command);
-    eval(command);
-}
-    
-var createRequest = window.indexedDB.open(&quot;IndexCursor2Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 3);
-    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 2);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 5);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 6);
-    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 4);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 7);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 9);
-    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 8);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 11);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 12);
-    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 10);
-
-    var req = index.count();
-    req.onsuccess = function() {
-        log(&quot;TestIndex1 count is: &quot; + req.result);
-    }
-
-    startNextCursor();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-cursor-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,10 +1,11 @@
</span><span class="cx"> This tests that index cursors properly handle changing indexes.
</span><del>-Initial upgrade needed: Old version - 0 New version - 1
</del><span class="cx"> 
</span><del>-Starting a new cursor: testCursorDirection(index, 'next')
</del><ins>+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</ins><span class="cx"> 
</span><del>-TestIndex1 count is: 18
</del><span class="cx"> 
</span><ins>+Initial upgrade needed: Old version - 0 New version - 1
+Starting a new cursor: testCursorDirection(index, 'next')
+TestIndex1 count is: 18
</ins><span class="cx"> Success opening or iterating cursor
</span><span class="cx"> Cursor direction is: next
</span><span class="cx"> Cursor source is: TestIndex1
</span><span class="lines">@@ -83,11 +84,8 @@
</span><span class="cx"> Cursor value is: [object Object]
</span><span class="cx"> Deleted key 18 from object store
</span><span class="cx"> Success opening or iterating cursor
</span><del>-
</del><span class="cx"> Starting a new cursor: testCursorDirection(index, 'prev')
</span><del>-
</del><span class="cx"> TestIndex1 count is: 18
</span><del>-
</del><span class="cx"> Success opening or iterating cursor
</span><span class="cx"> Cursor direction is: prev
</span><span class="cx"> Cursor source is: TestIndex1
</span><span class="lines">@@ -166,11 +164,8 @@
</span><span class="cx"> Cursor value is: [object Object]
</span><span class="cx"> Deleted key 1 from object store
</span><span class="cx"> Success opening or iterating cursor
</span><del>-
</del><span class="cx"> Starting a new cursor: testCursorDirection(index, 'nextunique')
</span><del>-
</del><span class="cx"> TestIndex1 count is: 18
</span><del>-
</del><span class="cx"> Success opening or iterating cursor
</span><span class="cx"> Cursor direction is: nextunique
</span><span class="cx"> Cursor source is: TestIndex1
</span><span class="lines">@@ -231,11 +226,8 @@
</span><span class="cx"> Deleted key 18 from object store
</span><span class="cx"> Deleted key 1 from object store
</span><span class="cx"> Success opening or iterating cursor
</span><del>-
</del><span class="cx"> Starting a new cursor: testCursorDirection(index, 'prevunique')
</span><del>-
</del><span class="cx"> TestIndex1 count is: 18
</span><del>-
</del><span class="cx"> Success opening or iterating cursor
</span><span class="cx"> Cursor direction is: prevunique
</span><span class="cx"> Cursor source is: TestIndex1
</span><span class="lines">@@ -279,5 +271,7 @@
</span><span class="cx"> Deleted key 2 from object store
</span><span class="cx"> Deleted key 1 from object store
</span><span class="cx"> Success opening or iterating cursor
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexcursor3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,177 +1,10 @@
</span><del>-This tests that index cursors properly handle changing indexes.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var index;
-var objectStore;
-
-function logCursor(cursor)
-{
-    log(&quot;Cursor direction is: &quot; + cursor.direction);
-    log(&quot;Cursor source is: &quot; + cursor.source.name);    
-    log(&quot;Cursor key is: &quot; + cursor.key);    
-    log(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
-    log(&quot;Cursor value is: &quot; + cursor.value);  
-}
-
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        log(&quot;Success opening or iterating cursor&quot;);
-        if (request.result)
-            logCursor(request.result);
-
-        if (request.result &amp;&amp; request.iteratedOnce) {
-            var primaryKey = request.result.primaryKey;
-            if (primaryKey) {
-                objectStore.delete(primaryKey).onsuccess = function() {
-                    log(&quot;Deleted key &quot; + primaryKey + &quot; from object store&quot;);
-                }
-                var nextPrimaryKey = primaryKey;
-                if (request.result.direction.startsWith(&quot;next&quot;)) {
-                    nextPrimaryKey++;
-                    if (nextPrimaryKey &gt; 18)
-                        nextPrimaryKey = 0;
-                } else
-                    nextPrimaryKey--;
-
-                if (nextPrimaryKey &gt; 0) {
-                    objectStore.delete(nextPrimaryKey).onsuccess = function() {
-                        log(&quot;Deleted key &quot; + nextPrimaryKey + &quot; from object store&quot;);
-                    }
-                }
-                
-                // Delete an additional item for unique cursors to make sure they iterate deeper into the sets
-                // of primary keys and/or skip some index keys altogether.
-                if (request.result.direction.endsWith(&quot;unique&quot;)) {                
-                    var nextNextPrimaryKey = nextPrimaryKey;
-                    if (request.result.direction.startsWith(&quot;next&quot;)) {
-                        nextNextPrimaryKey++;
-                        if (nextNextPrimaryKey &gt; 18)
-                            nextNextPrimaryKey = 0;
-                    } else
-                        nextNextPrimaryKey--;
-
-                    if (nextNextPrimaryKey &gt; 0) {
-                        objectStore.delete(nextNextPrimaryKey).onsuccess = function() {
-                            log(&quot;Deleted key &quot; + nextNextPrimaryKey + &quot; from object store&quot;);
-                        }
-                    }
-                }
-            }
-        }
-     
-        request.iteratedOnce = true;
-
-        if (request.result)
-            request.result.continue();
-        else
-            startNextCursor();
-    }
-    request.onerror = function(e) {
-        log(&quot;Unexpected error opening or iterating cursor&quot;);
-        logCursor(request.result);
-        done();
-    } 
-}
-
-function testCursorDirection(index, direction)
-{
-    var range = IDBKeyRange.lowerBound(-Infinity);
-    var request = index.openCursor(range, direction);
-    setupRequest(request);
-}
-
-var cursorCommands = [
-    &quot;testCursorDirection(index, 'prevunique')&quot;,
-    &quot;testCursorDirection(index, 'nextunique')&quot;,
-    &quot;testCursorDirection(index, 'prev')&quot;,
-    &quot;testCursorDirection(index, 'next')&quot;,
-];
-
-function startNextCursor()
-{
-    if (!cursorCommands.length) {
-        done();
-        return;
-    }
-    
-    populateObjectStore();
-
-    var command = cursorCommands.pop();
-    log(&quot;&lt;br&gt;Starting a new cursor: &quot; + command);
-    var req = index.count();
-    req.onsuccess = function() {
-        log(&quot;&lt;br&gt;TestIndex1 count is: &quot; + req.result + &quot;&lt;br&gt;&quot;);
-    }
-    
-    eval(command);
-}
-
-function populateObjectStore()
-{
-    objectStore.put({ bar: &quot;A&quot; }, 1);
-    objectStore.put({ bar: &quot;A&quot; }, 2);
-    objectStore.put({ bar: &quot;B&quot; }, 3);
-    objectStore.put({ bar: &quot;B&quot; }, 4);
-    objectStore.put({ bar: &quot;C&quot; }, 5);
-    objectStore.put({ bar: &quot;C&quot; }, 6);
-    objectStore.put({ bar: &quot;D&quot; }, 7);
-    objectStore.put({ bar: &quot;D&quot; }, 8);
-    objectStore.put({ bar: &quot;E&quot; }, 9);
-    objectStore.put({ bar: &quot;E&quot; }, 10);
-    objectStore.put({ bar: &quot;F&quot; }, 11);
-    objectStore.put({ bar: &quot;F&quot; }, 12);
-    objectStore.put({ bar: &quot;G&quot; }, 13);
-    objectStore.put({ bar: &quot;G&quot; }, 14);    
-    objectStore.put({ bar: &quot;H&quot; }, 15);
-    objectStore.put({ bar: &quot;H&quot; }, 16);  
-    objectStore.put({ bar: &quot;I&quot; }, 17);
-    objectStore.put({ bar: &quot;I&quot; }, 18);  
-}
-
-var createRequest = window.indexedDB.open(&quot;IndexCursor3Database&quot;, 1);
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
-    
-    startNextCursor();
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-cursor-3.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexgetcountbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests the most basic operation of the IDBIndex methods get(), getKey(), and count().
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> get result is: [object Object]
</span><span class="cx"> bar is good
</span><span class="lines">@@ -6,5 +10,7 @@
</span><span class="cx"> getKey result is: foo
</span><span class="cx"> count result is: 1
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexgetcountbasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,67 +1,10 @@
</span><del>-This tests the most basic operation of the IDBIndex methods get(), getKey(), and count().&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IndexGetCountBasicDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
-
-    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, &quot;foo&quot;);
-    
-    var request1 = index.get(&quot;good&quot;);
-    request1.onsuccess = function() {
-        log(&quot;get result is: &quot; + request1.result);
-        for (n in request1.result)
-            log(n + &quot; is &quot; + request1.result[n]);
-    }
-
-    request2 = index.getKey(&quot;good&quot;);
-    request2.onsuccess = function() {
-        log(&quot;getKey result is: &quot; + request2.result);
-    }
-    
-    var request3 = index.count();
-    request3.onsuccess = function() {
-        log(&quot;count result is: &quot; + request3.result);
-    }
-        
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-get-count-basic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexgetcountfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling the IDBIndex methods get(), getKey(), and count().
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to get with a null key
</span><span class="cx"> Failed to getKey with a null key
</span><span class="lines">@@ -14,5 +18,7 @@
</span><span class="cx"> Failed to getKey while transaction inactive
</span><span class="cx"> Failed to count while transaction inactive
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernindexgetcountfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,171 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling the IDBIndex methods get(), getKey(), and count().&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IndexGetCountFailuresDatabase&quot;, 1);
-var database;
-var index;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
-    
-    try {
-        index.get(null);
-    } catch(e) {
-        log(&quot;Failed to get with a null key&quot;);
-    }
-
-    try {
-        index.getKey(null);
-    } catch(e) {
-        log(&quot;Failed to getKey with a null key&quot;);
-    }
-
-    try {
-        index.count(null);
-    } catch(e) {
-        log(&quot;Failed to count with a null range&quot;);
-    }
-    
-    objectStore.deleteIndex(&quot;TestIndex&quot;);
-    
-    try {
-        index.get(&quot;test&quot;);
-    } catch(e) {
-        log(&quot;Failed to get with deleted IDBIndex&quot;);
-    }
-    
-    try {
-        index.getKey(&quot;test&quot;);
-    } catch(e) {
-        log(&quot;Failed to getKey with deleted IDBIndex&quot;);
-    }
-    
-    try {
-        index.count();
-    } catch(e) {
-        log(&quot;Failed to count with deleted IDBIndex&quot;);
-    }
-    
-    try {
-        objectStore.deleteIndex(&quot;TestIndex&quot;);
-    } catch(e) {
-        log(&quot;Failed to delete a nonexistent IDBIndex&quot;);
-    }
-
-    database.deleteObjectStore(&quot;TestObjectStore&quot;);
-    try {
-        index.get(null);
-    } catch(e) {
-         log(&quot;Failed to get with deleted IDBObjectStore&quot;);
-    }
-
-    try {
-        index.getKey(null);
-    } catch(e) {
-         log(&quot;Failed to getKey with deleted IDBObjectStore&quot;);
-    }
-
-    try {
-        index.count(null);
-    } catch(e) {
-         log(&quot;Failed to count with deleted IDBObjectStore&quot;);
-    }
-
-    var objectStore = database.createObjectStore(&quot;TestObjectStore2&quot;);
-    objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
-        
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore2&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore2&quot;);
-    index = objectStore.index(&quot;TestIndex&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            index.get(null);
-        } catch(e) {
-             log(&quot;Failed to get while transaction inactive&quot;);
-        }
-
-        try {
-            index.getKey(null);
-        } catch(e) {
-             log(&quot;Failed to getKey while transaction inactive&quot;);
-        }
-
-        try {
-            index.count(null);
-        } catch(e) {
-             log(&quot;Failed to count while transaction inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/index-get-count-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernkeypathbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/keypath-basic-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/keypath-basic-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/keypath-basic-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates some object stores with keypaths. It then puts some values in them. It makes sure the keys used are as expected.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: object put SUCCESS - foo1
</span><span class="cx"> ALERT: array put SUCCESS - foo2
</span><span class="lines">@@ -4,8 +9,7 @@
</span><span class="cx"> ALERT: Second object put SUCCESS - baz1
</span><span class="cx"> ALERT: Second array put SUCCESS - baz2
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction complete
</span><del>-ALERT: Done
-This test creates some object stores with keypaths.
-It then puts some values in them.
-It makes sure the keys used are as expected.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernkeypathbasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/keypath-basic.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/keypath-basic.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/keypath-basic.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,74 +1,9 @@
</span><del>-This test creates some object stores with keypaths.&lt;br&gt;
-It then puts some values in them.&lt;br&gt;
-It makes sure the keys used are as expected.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;KeypathBasicTestDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;    
-    var objectStore1 = database.createObjectStore(&quot;OS1&quot;, { keyPath: &quot;foo&quot; });
-    var objectStore2 = database.createObjectStore(&quot;OS2&quot;, { keyPath: &quot;foo.bar&quot; });
-
-    var object = new Object;
-    object.stuff = &quot;bar1&quot;;
-    object.foo = &quot;foo1&quot;;
-        
-    var request1 = objectStore1.put(object);
-    request1.onsuccess = function(event) {
-        alert(&quot;object put SUCCESS - &quot; + request1.result);
-    }
-
-    var array = { foo: &quot;foo2&quot;, stuff: &quot;bar2&quot; };
-
-    var request2 = objectStore1.put(array);
-    request2.onsuccess = function(event) {
-        alert(&quot;array put SUCCESS - &quot; + request2.result);
-    }
-    
-    object.foo = new Object;
-    object.foo.bar = &quot;baz1&quot;;
-    var request3 = objectStore2.put(object);
-    request3.onsuccess = function(event) {
-        alert(&quot;Second object put SUCCESS - &quot; + request3.result);
-    }
-
-    array.foo = { bar: &quot;baz2&quot; };
-
-    var request4 = objectStore2.put(array);
-    request4.onsuccess = function(event) {
-        alert(&quot;Second array put SUCCESS - &quot; + request4.result);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/keypath-basic.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstoreattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test exercises the readonly attributes on an IDBObjectStore.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> First upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> [object IDBTransaction] - versionchange
</span><span class="cx"> [object IDBDatabase]
</span><span class="lines">@@ -26,5 +30,7 @@
</span><span class="cx"> Baz index
</span><span class="cx"> Foo index
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstoreattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,107 +1,10 @@
</span><del>-This test exercises the readonly attributes on an IDBObjectStore.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open(&quot;ObjectStoreAttributesTestDatabase&quot;);
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var database;
-
-request.onupgradeneeded = function(event)
-{
-    log(&quot;First upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    
-    var tx = request.transaction;
-    database = event.target.result;
-
-    log(tx + &quot; - &quot; + tx.mode);
-    log(database);
-
-    var os1 = database.createObjectStore('TestObjectStore1', { autoIncrement: true , keyPath: &quot;foo&quot; });
-    var os2 = database.createObjectStore('TestObjectStore2', { autoIncrement: false });
-
-    log(os1.name);
-    log(os2.name);
-    log(os1.autoIncrement);
-    log(os2.autoIncrement);
-    log(os1.keyPath);
-    log(os2.keyPath);
-    log(os1.transaction);
-    log(os2.transaction);
-    log(os1.transaction == tx);
-    log(os2.transaction == tx);
-    log(os1.transaction == os2.transaction);
-    
-    os2.createIndex(&quot;Foo index&quot;, &quot;foo&quot;);
-    os2.createIndex(&quot;Bar index&quot;, &quot;bar&quot;);
-    
-    var names = os2.indexNames;
-    log(&quot;Object store has indexes:&quot;)
-    for (var i = 0; i &lt; names.length; ++i)
-        log(names[i]);
-    
-    os2.createIndex(&quot;Baz index&quot;, &quot;baz&quot;);
-    log(&quot;After adding another, object store now has indexes:&quot;);
-    names = os2.indexNames;
-    for (var i = 0; i &lt; names.length; ++i)
-        log(names[i]);
-    
-    tx.onabort = function(event) {
-        log(&quot;First version change transaction unexpected abort&quot;);
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        log(&quot;First version change transaction completed&quot;);
-        continueTest();
-    }
-
-    tx.onerror = function(event) {
-        log(&quot;First version change transaction unexpected error - &quot; + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    var transaction = database.transaction(&quot;TestObjectStore2&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore2&quot;);
-    
-    log(&quot;In a new transaction, object store has indexes:&quot;);
-    var names = objectStore.indexNames;
-    for (var i = 0; i &lt; names.length; ++i)
-        log(names[i]);
-
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/objectstore-attributes.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorecursoradvancefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBCursor.advance() on object store cursors.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to advance object store cursor with undefined count argument
</span><span class="cx"> Failed to advance object store cursor with '0' count argument
</span><span class="lines">@@ -8,5 +12,7 @@
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="cx"> Failed to advance object store cursor while transaction inactive
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorecursoradvancefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,144 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling IDBCursor.advance() on object store cursors.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBAdvanceFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    for (var i = 0; i &lt; 10; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        var cursor = request.result;
-
-        try {
-            cursor.advance();
-        } catch(e) {
-            log(&quot;Failed to advance object store cursor with undefined count argument&quot;);
-        }
-
-        try {
-            cursor.advance(0);
-        } catch(e) {
-            log(&quot;Failed to advance object store cursor with '0' count argument&quot;);
-        }
-
-        try {
-            cursor.advance(-1);
-        } catch(e) {
-            log(&quot;Failed to advance object store cursor with negative count argument&quot;);
-        }
-
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        try {
-            cursor.advance(1);
-        } catch(e) {
-            log(&quot;Failed to advance object store cursor after deleting object store&quot;);
-        }
-
-        // Recreate the object store for use in the next stage of testing
-        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        for (var i = 0; i &lt; 10; ++i)
-            objectStore.put(&quot;Record &quot; + i, i);
-    }
-    
-    var os2 = database.createObjectStore(&quot;TestObjectStore2&quot;);
-    for (var i = 0; i &lt; 10; ++i)
-        os2.put(&quot;Record &quot; + i, i);
-        
-    var request2 = os2.openCursor();
-    request2.onsuccess = function() {
-        var cursor = request2.result;
-        cursor.continue();
-        try {
-            cursor.advance(1);
-        } catch(e) {
-            log(&quot;Failed to advance an object store cursor when it is already fetching the next record&quot;);
-        }
-        request2.onsuccess = undefined;
-    }
-
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var cursor = objectStore.openCursor();
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            cursor.advance(1);
-        } catch(e) {
-            log(&quot;Failed to advance object store cursor while transaction inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/objectstore-cursor-advance-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorecursorcontinuefailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while calling IDBCursor.continue() on object store cursors.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to continue a 'next' object store cursor to a key less than the current key
</span><span class="cx"> Failed to continue object store cursor with invalid key
</span><span class="lines">@@ -8,5 +12,7 @@
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><span class="cx"> Failed to continue object store cursor while transaction inactive
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernobjectstorecursorcontinuefailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,148 +1,10 @@
</span><del>-This tests some obvious failures that can happen while calling IDBCursor.continue() on object store cursors.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;IDBContinueFailuresDatabase&quot;, 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    for (var i = 0; i &lt; 10; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        var cursor = request.result;
-
-        try {
-            cursor.continue(-1);
-        } catch(e) {
-            log(&quot;Failed to continue a 'next' object store cursor to a key less than the current key&quot;);
-        }
-
-        try {
-            cursor.continue(NaN);
-        } catch(e) {
-            log(&quot;Failed to continue object store cursor with invalid key&quot;);
-        }
-
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        try {
-            cursor.continue();
-        } catch(e) {
-            log(&quot;Failed to continue object store cursor after deleting object store&quot;);
-        }
-
-        // Recreate the object store for use in the next stage of testing
-        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        for (var i = 0; i &lt; 10; ++i)
-            objectStore.put(&quot;Record &quot; + i, i);
-    }
-    
-    var request2 = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
-    request2.onsuccess = function() {
-        var cursor = request2.result;
-        try {
-            cursor.continue(100);
-        } catch(e) {
-            log(&quot;Failed to continue a 'prev' object store cursor to a key greater than the current key&quot;);
-        }
-    }
-
-    var os2 = database.createObjectStore(&quot;TestObjectStore2&quot;);
-    for (var i = 0; i &lt; 10; ++i)
-        os2.put(&quot;Record &quot; + i, i);
-        
-    var request3 = os2.openCursor();
-    request3.onsuccess = function() {
-        var cursor = request3.result;
-        cursor.continue();
-        try {
-            cursor.continue();
-        } catch(e) {
-            log(&quot;Failed to continue an object store cursor when it is already fetching the next record&quot;);
-        }
-        request3.onsuccess = undefined;
-    }
-
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var cursor = objectStore.openCursor();
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            cursor.continue();
-        } catch(e) {
-            log(&quot;Failed to continue object store cursor while transaction inactive&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/objectstore-cursor-continue-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopencursorfailuresexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This tests some obvious failures that can happen while opening cursors.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Failed to open object store cursor with invalid keypath
</span><span class="cx"> Failed to open object store cursor with invalid direction
</span><span class="lines">@@ -17,5 +21,7 @@
</span><span class="cx"> Failed to open index cursor from inactive transaction
</span><span class="cx"> Failed to open index key cursor from inactive transaction
</span><span class="cx"> readonly transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopencursorfailureshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,188 +1,10 @@
</span><del>-This tests some obvious failures that can happen while opening cursors.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;OpenCursorFailuresDatabase&quot;, 1);
-var database;
-var objectStore;
-var index;
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
-    var request = objectStore.put({ bar: &quot;bar&quot; }, &quot;foo&quot;);
-
-    request.onsuccess = function() {
-        try {
-            objectStore.openCursor(NaN);
-        } catch(e) {
-            log(&quot;Failed to open object store cursor with invalid keypath&quot;);
-        }
-        
-        try {
-            objectStore.openCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
-        } catch(e) {
-            log(&quot;Failed to open object store cursor with invalid direction&quot;);
-        }
-        
-        try {
-            index.openCursor(NaN);
-        } catch(e) {
-            log(&quot;Failed to open index cursor with invalid keypath&quot;);
-        }
-
-        try {
-            index.openCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
-        } catch(e) {
-            log(&quot;Failed to open index cursor with invalid direction&quot;);
-        }
-
-        try {
-            index.openKeyCursor(NaN);
-        } catch(e) {
-            log(&quot;Failed to open index key cursor with invalid keypath&quot;);
-        }
-
-        try {
-            index.openKeyCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
-        } catch(e) {
-            log(&quot;Failed to open index key cursor with invalid direction&quot;);
-        }
-        
-        database.deleteObjectStore(&quot;TestObjectStore&quot;);
-        
-        try {
-            objectStore.openCursor();
-        } catch(e) {
-            log(&quot;Failed to open object store cursor on deleted object store&quot;);
-        }
-        
-        try {
-            index.openCursor();
-        } catch(e) {
-            log(&quot;Failed to open index cursor on deleted object store&quot;);
-        }
-
-        try {
-            index.openKeyCursor();
-        } catch(e) {
-            log(&quot;Failed to open index key cursor on deleted object store&quot;);
-        }
-        
-        // Recreate the objectstore because we'll need it in phase 2.
-        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-        index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
-        objectStore.put({ bar: &quot;bar&quot; }, &quot;foo&quot;);
-    }
-    
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    try {
-        objectStore.openCursor();
-    } catch(e) {
-        log(&quot;Failed to open object store cursor from completed transaction&quot;);
-    }
-    
-    try {
-        index.openCursor();
-    } catch(e) {
-        log(&quot;Failed to open index cursor from completed transaction&quot;);
-    }
-
-    try {
-        index.openKeyCursor();
-    } catch(e) {
-        log(&quot;Failed to open index key cursor from completed transaction&quot;);
-    }
-        
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
-    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    index = objectStore.index(&quot;TestIndex&quot;);
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get(&quot;foo&quot;).onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var getWhileInactive = function() {
-        try {
-            objectStore.openCursor();
-        } catch(e) {
-            log(&quot;Failed to open object store cursor from inactive transaction&quot;);
-        }
-    
-        try {
-            index.openCursor();
-        } catch(e) {
-            log(&quot;Failed to open index cursor from inactive transaction&quot;);
-        }
-
-        try {
-            index.openKeyCursor();
-        } catch(e) {
-            log(&quot;Failed to open index key cursor from inactive transaction&quot;);
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(getWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log(&quot;readonly transaction unexpected abort&quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log(&quot;readonly transaction complete&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log(&quot;readonly transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/opencursor-failures.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Caught exception TypeError: Type error
</span><span class="cx"> ALERT: Caught exception TypeError: Value -1 is outside the range [0, 9007199254740991]
</span><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><span class="lines">@@ -2,3 +7,5 @@
</span><span class="cx"> ALERT: upgradeneeded: old version - 0 new version - 1
</span><del>-ALERT: Done
-This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,47 +1,9 @@
</span><del>-This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-try {
-    window.indexedDB.open(&quot;TestDatabase&quot;, 0);
-} catch (e) {
-    alert(&quot;Caught exception &quot; + e);
-}
-
-try {
-    window.indexedDB.open(&quot;TestDatabase&quot;, -1);
-} catch (e) {
-    alert(&quot;Caught exception &quot; + e);
-}
-
-var request = window.indexedDB.open(&quot;TestDatabase&quot;);
-alert(request);
-
-request.onsuccess = function()
-{
-        alert(&quot;success&quot;);
-        done();
-}
-request.onerror = function(e)
-{
-        alert(&quot;error &quot; + e);
-        done();
-}
-
-request.onupgradeneeded = function(e)
-{
-    alert(&quot;upgradeneeded: old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-        done();
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/opendatabase-request-event.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequestexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><span class="cx"> ALERT: [object IDBOpenDBRequest]
</span><span class="cx"> ALERT: TypeError: Not enough arguments
</span><span class="lines">@@ -2,3 +7,5 @@
</span><span class="cx"> ALERT: TypeError: Type error
</span><del>-ALERT: Done
-This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,35 +1,9 @@
</span><del>-This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.open(&quot;TestDatabase&quot;);
-alert(request);
-
-request = window.indexedDB.open(&quot;&quot;);
-alert(request);
-
-try {
-        var request = window.indexedDB.open();
-} catch (e) {
-        alert(e);
-}
-
-try {
-        var request = window.indexedDB.open(&quot;name&quot;, 0);
-} catch (e) {
-        alert(e);
-}
-
-done();
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/opendatabase-request.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabasesuccessafterversionchangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,10 +1,13 @@
</span><del>-This test verifies that:
-- Opening a new database results in the onupgradeneeded handler being called on the IDBOpenDBRequest.
-- The versionchange transaction representing the upgrade commits successfully.
-- After that transaction commits, the onsuccess handler on the original IDBOpenDBRequest is called.
</del><ins>+This test verifies that: - Opening a new database results in the onupgradeneeded handler being called on the IDBOpenDBRequest. - The versionchange transaction representing the upgrade commits successfully. - After that transaction commits, the onsuccess handler on the original IDBOpenDBRequest is called.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> upgradeneeded: old version - 0 new version - 1
</span><span class="cx"> [object IDBTransaction]
</span><span class="cx"> Version change complete
</span><span class="cx"> Got the onsuccess handler as expected.
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabasesuccessafterversionchangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,61 +1,10 @@
</span><del>-This test verifies that:&lt;br&gt;
-    - Opening a new database results in the onupgradeneeded handler being called on the IDBOpenDBRequest.&lt;br&gt;
-    - The versionchange transaction representing the upgrade commits successfully.&lt;br&gt;
-    - After that transaction commits, the onsuccess handler on the original IDBOpenDBRequest is called.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var request = window.indexedDB.open(&quot;OpenDatabaseSuccessAfterVersionChangeDatabase&quot;);
-
-request.onsuccess = function()
-{
-    log(&quot;Got the onsuccess handler as expected.&quot;);
-        done();
-}
-request.onerror = function(e)
-{
-    log(&quot;Unexpected onerror handler called&quot;);
-        done();
-}
-
-request.onupgradeneeded = function(e)
-{
-    log(&quot;upgradeneeded: old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-    log(request.transaction);
-    
-    request.transaction.oncomplete = function()
-    {
-        log(&quot;Version change complete&quot;);
-    }
-    
-    request.transaction.onabort = function()
-    {
-        log(&quot;Version change unexpected abort&quot;);
-        done();
-    }
-    
-    request.transaction.onerror = function()
-    {
-        log(&quot;Version change unexpected error&quot;);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/opendatabase-success-after-versionchange.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaseversionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test creates a new database with the default version, commits that versionchange transaction, and then reopens it at different versions to make sure the IDBOpenDBRequests behave appropriately.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> [object IDBOpenDBRequest] (firstPhase)
</span><span class="cx"> upgradeneeded (firstPhase): old version - 0 new version - 1
</span><span class="cx"> [object IDBTransaction]
</span><span class="lines">@@ -13,6 +17,7 @@
</span><span class="cx"> [object IDBOpenDBRequest] (fourthPhase)
</span><span class="cx"> Open request error (thirdPhase) AbortError
</span><span class="cx"> Expected error (fourthPhase) - VersionError
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaseversionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,140 +1,10 @@
</span><del>-This test creates a new database with the default version, commits that versionchange transaction, and then reopens it at different versions to make sure the IDBOpenDBRequests behave appropriately.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;&lt;br&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-function log(msg)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&lt;br&gt;&quot;;
-}
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;);
-log(request + &quot; (firstPhase)&quot;);
-
-request.onsuccess = function()
-{
-    log(&quot;First version change successful&quot;);
-}
-request.onerror = function(e)
-{
-    log(&quot;Open request error (firstPhase) &quot; + request.error.name);
-}
-
-request.onupgradeneeded = function(e)
-{
-    var database = event.target.result;
-
-    log(&quot;upgradeneeded (firstPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-    log(request.transaction);
-    request.transaction.oncomplete = function()
-    {
-        log(&quot;Version change complete (firstPhase). Database version is now - &quot; + database.version);
-        database.close();
-        secondPhase();
-    }
-    request.transaction.onabort = function()
-    {
-        log(&quot;Version change transaction unexpected abort! (firstPhase)&quot;);
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        log(&quot;Version change transaction unexpected error! (firstPhase)&quot;);
-        done();
-    }
-}
-
-function secondPhase()
-{
-    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 1);
-    log(request + &quot; (secondPhase)&quot;);
-    request.onsuccess = function()
-    {
-        log(&quot;Successfully opened database at version 1 (secondPhase)&quot;);
-        request.result.close();
-        request.result.close(); // Close it twice just for the heck of it
-        thirdPhase();
-    }
-    request.onerror = function(e)
-    {
-        log(&quot;Unexpected error (secondPhase)&quot; + e);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-            log(&quot;Unexpected upgrade needed (secondPhase)&quot; + e);
-            done();
-    }
-}
-
-function thirdPhase()
-{
-    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 2);
-    log(request + &quot; (thirdPhase)&quot;);
-    request.onsuccess = function()
-    {
-        log(&quot;Version change to version 2 successful&quot;);
-    }
-    request.onerror = function(e)
-    {
-        log(&quot;Open request error (thirdPhase) &quot; + request.error.name);
-    }
-    request.onupgradeneeded = function(e)
-    {
-        var database = event.target.result;
-
-        log(&quot;upgradeneeded (thirdPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-        log(request.transaction);
-        request.transaction.oncomplete = function()
-        {
-            log(&quot;Version change complete (thirdPhase). Database version is now - &quot; + database.version);
-            database.close();
-            fourthPhase();
-        }
-        request.transaction.onabort = function()
-        {
-            log(&quot;Version change transaction unexpected abort! (thirdPhase)&quot;);
-            done();
-        }
-        request.transaction.onerror = function()
-        {
-            log(&quot;Version change transaction unexpected error! (thirdPhase)&quot;);
-            done();
-        }
-    } 
-}
-
-function fourthPhase()
-{
-    // We've upgraded to version 2, so version 1 should not be openable.
-    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 1);
-    log(request + &quot; (fourthPhase)&quot;);
-    request.onsuccess = function()
-    {
-        log(&quot;Unexpected success (fourthPhase)&quot;);
-        done();
-    }
-    request.onerror = function(e)
-    {
-        log(&quot;Expected error (fourthPhase) - &quot; + request.error.name);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-        log(&quot;Unexpected upgradeneeded (fourthPhase)&quot;);
-        done();
-    } 
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/opendatabase-versions.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernrequestreadystateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/request-readystate-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/request-readystate-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/request-readystate-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,4 +1,8 @@
</span><span class="cx"> This test makes sure that IDBRequest.readyState returns expected values.
</span><ins>+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> After calling indexedDB.open(), create request readyState is: pending
</span><span class="cx"> Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> Create request readyState is: done
</span><span class="lines">@@ -7,5 +11,7 @@
</span><span class="cx"> After calling continue(), request readyState is: pending
</span><span class="cx"> After continue() completed, request readyState is: done
</span><span class="cx"> Initial upgrade versionchange transaction complete
</span><del>-Done
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernrequestreadystatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/request-readystate.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/request-readystate.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/request-readystate.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,65 +1,10 @@
</span><del>-This test makes sure that IDBRequest.readyState returns expected values.&lt;br&gt;
-&lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById(&quot;logger&quot;).innerHTML += message + &quot;&lt;br&gt;&quot;;
-}
-
-var createRequest = window.indexedDB.open(&quot;RequestReadyStateDatabase&quot;, 1);
-log(&quot;After calling indexedDB.open(), create request readyState is: &quot; + createRequest.readyState);
-
-createRequest.onupgradeneeded = function(event) {
-    log(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-    log(&quot;Create request readyState is: &quot; + createRequest.readyState);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-
-    for (var i = 0; i &lt; 2; ++i)
-        objectStore.put(&quot;Record &quot; + i, i);
-    
-    var request = objectStore.openCursor();
-    log(&quot;After calling openCursor, request readyState is: &quot; + request.readyState);
-    request.onsuccess = function() {
-        log(&quot;After successful opening of the cursor, request readyState is: &quot; + request.readyState);
-
-        request.onsuccess = function() {
-            log(&quot;After continue() completed, request readyState is: &quot; + request.readyState);
-        }
-
-        request.result.continue();
-        log(&quot;After calling continue(), request readyState is: &quot; + request.readyState);
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log(&quot;Initial upgrade versionchange transaction complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;resources/request-readystate.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesabortrequestscancelledjsfromrev195319trunkLayoutTestsstorageindexeddbmodernabortrequestscancelledhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/abort-requests-cancelled.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/abort-requests-cancelled.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/abort-requests-cancelled.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,151 @@
</span><ins>+description(&quot;This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var database;
+var objectStore;
+
+function setupRequest(code)
+{
+    var request = eval(code);
+    request.onsuccess = function()
+    {
+        log (&quot;Success handling: \&quot;&quot; + code + &quot;\&quot;&quot;);
+    }
+    request.onerror = function(e)
+    {
+        log (&quot;Error handling: \&quot;&quot; + code + &quot;\&quot; (&quot; + e.type + &quot;)&quot;);
+        e.stopPropagation();
+    }   
+}
+
+startTest();
+
+function startTest() {
+    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
+
+        versionTransaction.abort();
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;Initial upgrade versionchange transaction aborted&quot;);
+            database.close();
+            continueTest1();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;Initial upgrade versionchange transaction error &quot; + event);
+        }
+    }
+}
+
+function continueTest1() {
+    var createRequest = window.indexedDB.open(&quot;AbortRequestsCancelledDatabase&quot;, 1);
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        database = event.target.result;
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+        setupRequest(&quot;objectStore.put({ bar: 'A' }, 1);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'B' }, 2);&quot;);
+        setupRequest(&quot;objectStore.put({ bar: 'C' }, 3);&quot;);
+    
+        versionTransaction.onabort = function(event) {
+            debug(&quot;Second upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;Second upgrade versionchange transaction completed&quot;);
+            continueTest2();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;Second upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2() {
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    setupRequest(&quot;objectStore.get(1);&quot;);
+    setupRequest(&quot;objectStore.get(2);&quot;);
+    setupRequest(&quot;objectStore.get(3);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'D' }, 4);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'E' }, 5);&quot;);
+    setupRequest(&quot;objectStore.put({ bar: 'F' }, 6);&quot;);
+
+    transaction.abort();
+
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction aborted&quot;);
+        continueTest3();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest3() {
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    setupRequest(&quot;objectStore.get(1);&quot;);
+    setupRequest(&quot;objectStore.get(2);&quot;);
+    setupRequest(&quot;objectStore.get(3);&quot;);
+
+    transaction.abort();
+
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction aborted&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesabortedputjsfromrev195319trunkLayoutTestsstorageindexeddbmodernabortedputhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/aborted-put.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/aborted-put.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/aborted-put.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/aborted-put.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,198 @@
</span><ins>+description(&quot;This test creates some object stores, putting some values in them, committing the transaction. \
+In a new transaction, it then overwrites those values, but then aborts the transaction. \
+Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;);
+
+function done()
+{
+    finishJSTest();
+}
+
+request.onupgradeneeded = function(event)
+{
+    debug(&quot;ALERT: &quot; + &quot;First upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+    debug(&quot;ALERT: &quot; + db);
+
+    var os1 = db.createObjectStore(&quot;TestObjectStore1&quot;);
+    var os2 = db.createObjectStore(&quot;TestObjectStore2&quot;);
+
+    var putRequest = os1.put(&quot;bar&quot;, &quot;foo&quot;);
+    
+    putRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put succeeded - key was '&quot; + putRequest.result + &quot;'&quot;);
+        
+        var getRequest1 = os1.get(&quot;foo&quot;);
+        getRequest1.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
+        }
+
+        getRequest1.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get 'foo' unexpectedly failed - &quot; + event);
+            done();
+        }
+        
+        var getRequest2 = os2.get(&quot;far&quot;);
+        getRequest2.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
+        }
+
+        getRequest2.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get 'far' unexpectedly failed - &quot; + event);
+            done();
+        }
+    }
+
+    putRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put unexpectedly failed - &quot; + event);
+        done();
+    }
+    
+    tx.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction unexpected abort&quot;);
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction completed&quot;);
+        db.close();
+        continueTest1();
+    }
+
+    tx.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction unexpected error - &quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;, 2);
+
+    request.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+        var tx = request.transaction;
+        var db = event.target.result;
+
+        debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+        debug(&quot;ALERT: &quot; + db);
+
+        var os1 = tx.objectStore(&quot;TestObjectStore1&quot;);
+        var os2 = tx.objectStore(&quot;TestObjectStore2&quot;);
+        var putRequest1 = os1.put(&quot;baz&quot;, &quot;foo&quot;);
+        var putRequest2 = os2.put(&quot;boo&quot;, &quot;far&quot;);
+    
+        putRequest1.onerror = function(e) {
+            debug(&quot;ALERT: &quot; + &quot;Unexpected error overwriting bar with baz - &quot; + e);
+            done();
+        }
+
+        putRequest2.onerror = function(e) {
+            debug(&quot;ALERT: &quot; + &quot;Writing into second object store unexpectedly failed - &quot; + e);
+            done();
+        }
+        
+        putRequest2.onsuccess = function(e) {
+            var getRequest1 = os1.get(&quot;foo&quot;);
+            var getRequest2 = os2.get(&quot;far&quot;);
+            
+            getRequest1.onsuccess = function(event) {
+                debug(&quot;ALERT: &quot; + &quot;get1 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
+            }
+
+            getRequest1.onerror = function(event) {
+                debug(&quot;ALERT: &quot; + &quot;get1 unexpectedly failed - &quot; + event);
+                done();
+            }
+
+            getRequest2.onsuccess = function(event) {
+                debug(&quot;ALERT: &quot; + &quot;get2 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
+                tx.abort();
+            }
+
+            getRequest2.onerror = function(event) {
+                debug(&quot;ALERT: &quot; + &quot;get2 unexpectedly failed - &quot; + event);
+                done();
+            }
+        }
+        
+        tx.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction abort&quot;);
+            db.close();
+            continueTest2();
+        }
+
+        tx.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction unexpected complete&quot;);
+            done();
+        }
+
+        tx.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction error - &quot; + event);
+        }
+    }
+}
+
+function continueTest2()
+{
+    var request = window.indexedDB.open(&quot;AbortedPutTestDatabase&quot;, 2);
+
+    request.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+        var tx = request.transaction;
+        var db = event.target.result;
+
+        debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+        debug(&quot;ALERT: &quot; + db);
+
+        var os1 = tx.objectStore(&quot;TestObjectStore1&quot;);
+        var os2 = tx.objectStore(&quot;TestObjectStore2&quot;);
+        var getRequest1 = os1.get(&quot;foo&quot;);
+        var getRequest2 = os2.get(&quot;far&quot;);
+    
+        getRequest1.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get1 'foo' succeeded - value was '&quot; + getRequest1.result + &quot;'&quot;);
+        }
+
+        getRequest1.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get1 'foo' unexpectedly failed - &quot; + event);
+            done();
+        }
+
+        getRequest2.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get2 'far' succeeded - value was '&quot; + getRequest2.result + &quot;'&quot;);
+        }
+
+        getRequest2.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get2 'far' unexpectedly failed - &quot; + event);
+            done();
+        }
+        
+        tx.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third version change transaction unexpected abort&quot;);
+            done();
+        }
+
+        tx.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third version change transaction complete&quot;);
+            done();
+        }
+
+        tx.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third version change transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesautoincrementabortjsfromrev195319trunkLayoutTestsstorageindexeddbmodernautoincrementaborthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/autoincrement-abort.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/autoincrement-abort.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/autoincrement-abort.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/autoincrement-abort.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,158 @@
</span><ins>+description(&quot;This test creates a new database with an objectstore that autoincrements. \
+It then puts some things in that object store, checking the keys that were used. \
+But it then aborts that transaction. \
+Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.&quot;);
+
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;AutoincrementAbortDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true });
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function putChecker(event) {
+    debug(&quot;ALERT: &quot; + &quot;Key used for put was &quot; + event.target.result);
+}
+
+function continueTest1()
+{
+    debug(&quot;ALERT: &quot; + &quot;Opening readwrite transaction to bump the key generator, but it will be aborted&quot;);
+    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore('TestObjectStore');
+    
+    var request = objectStore.put(&quot;bar1&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar2&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar3&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar4&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar5&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar6&quot;);
+    request.onsuccess = function(event) {
+        putChecker(event);
+        transaction.abort();
+    }
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction abort&quot;);
+        continueTest2();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+function continueTest2()
+{
+    debug(&quot;ALERT: &quot; + &quot;Opening readwrite transaction to make sure the key generator had successfully reverted&quot;);
+    
+    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore('TestObjectStore');
+
+    var request = objectStore.put(&quot;bar1&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar2&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar3&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar4&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar5&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar6&quot;);
+    request.onsuccess = putChecker;
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected abort&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction complete&quot;);
+        continueTest3();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+function continueTest3()
+{
+    debug(&quot;ALERT: &quot; + &quot;Opening readwrite transaction to make sure the key generator picks up where it should've left off&quot;);
+    
+    var transaction = database.transaction('TestObjectStore', &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore('TestObjectStore');
+
+    var request = objectStore.put(&quot;bar1&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar2&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar3&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar4&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar5&quot;);
+    request.onsuccess = putChecker;
+    var request = objectStore.put(&quot;bar6&quot;);
+    request.onsuccess = putChecker;
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected abort&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesbasicaddjsfromrev195319trunkLayoutTestsstorageindexeddbmodernbasicaddhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/basic-add.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/basic-add.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/basic-add.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/basic-add.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+description(&quot;This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open(&quot;NewDatabaseAddTestDatabase&quot;);
+
+function done()
+{
+    finishJSTest();
+}
+
+request.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+    debug(&quot;ALERT: &quot; + db);
+
+    var os = db.createObjectStore(&quot;TestObjectStore&quot;);
+    var putRequest1 = os.add(&quot;bar&quot;, &quot;foo&quot;);
+    var putRequest2 = os.add(&quot;baz&quot;, &quot;foo&quot;);
+
+    putRequest1.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put 1 succeeded - key was '&quot; + putRequest1.result + &quot;'&quot;);
+    }
+
+    putRequest1.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put 1 unexpectedly failed - &quot; + event);
+        done();
+    }
+
+    putRequest2.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put 2 unexpectedly succeeded - key was '&quot; + putRequest2.result + &quot;'&quot;);
+        done();
+    }
+
+    putRequest2.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put 2 failed - &quot; + event.type);
+
+        var getRequest = os.get(&quot;foo&quot;);
+        
+        getRequest.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get succeeded - key was '&quot; + getRequest.result + &quot;'&quot;);
+        }
+
+        getRequest.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get unexpectedly failed - &quot; + event.type);
+            done();
+        }
+        
+        event.stopPropagation();
+        event.preventDefault();
+    }
+        
+    tx.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction unexpected abort&quot;);
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction completed&quot;);
+        done();
+    }
+
+    tx.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction unexpected error - &quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesbasicputjsfromrev195319trunkLayoutTestsstorageindexeddbmodernbasicputhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/basic-put.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/basic-put.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/basic-put.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/basic-put.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open(&quot;NewDatabasePutTestDatabase&quot;);
+
+function done()
+{
+    finishJSTest();
+}
+
+request.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+    debug(&quot;ALERT: &quot; + db);
+
+    var os = db.createObjectStore(&quot;TestObjectStore&quot;);
+    var putRequest = os.put(&quot;bar&quot;, &quot;foo&quot;);
+    
+    putRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put succeeded - key was '&quot; + putRequest.result + &quot;'&quot;);
+        
+        var getRequest = os.get(&quot;foo&quot;);
+        getRequest.onsuccess = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get succeeded - value was '&quot; + getRequest.result + &quot;'&quot;);
+        }
+
+        getRequest.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;get unexpectedly failed - &quot; + event);
+            done();
+        }
+    }
+
+    putRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put unexpectedly failed - &quot; + event);
+        done();
+    }
+    
+    tx.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction unexpected abort&quot;);
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction completed&quot;);
+        done();
+    }
+
+    tx.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;version change transaction unexpected error - &quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescreateindexfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmoderncreateindexfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/create-index-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/create-index-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/create-index-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/create-index-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCreateIndexFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    try {
+        objectStore.createIndex(null, &quot;foo&quot;);
+    } catch(e) {
+        debug(&quot;Failed to create index with null name&quot;);
+    }
+    
+    try {
+        objectStore.createIndex(&quot;TestIndex1&quot;, null);
+    } catch(e) {
+        debug(&quot;Failed to create index with invalid key path&quot;);
+    }
+    
+    database.deleteObjectStore(&quot;TestObjectStore&quot;);
+    try {
+        objectStore.createIndex(&quot;TestIndex2&quot;, &quot;foo&quot;);
+    } catch(e) {
+        debug(&quot;Failed to create index on a deleted object store&quot;);
+    }
+
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+    try {
+        objectStore.createIndex(&quot;TestIndex3&quot;, [&quot;foo&quot;, &quot;bar&quot;], { multiEntry: true });
+    } catch(e) {
+        debug(&quot;Failed to create multi-entry index with an array key path&quot;);
+    }
+    
+    objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;);
+    try {
+        objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;);
+    } catch(e) {
+        debug(&quot;Failed to create index that already exists&quot;);
+    }
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var createWhileInactive = function() {
+        try {
+            objectStore.createIndex(&quot;TestIndex5&quot;, &quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;Failed to create index while the transaction is inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(createWhileInactive, 0);
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    try {
+        objectStore.createIndex(&quot;TestIndex6&quot;, &quot;foo&quot;);
+    } catch(e) {
+        debug(&quot;Failed to create index outside of a version change transaction&quot;);
+    }
+        
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescreateobjectstorebasicjsfromrev195319trunkLayoutTestsstorageindexeddbmoderncreateobjectstorebasichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-basic.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-basic.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-basic.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,133 @@
</span><ins>+description(&quot;This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions. \
+At various stages it verifies the object stores in the database are as-expected.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function dumpObjectStores(database) {
+    var list = database.objectStoreNames;
+    debug(&quot;ALERT: &quot; + &quot;Object store names:&quot;);
+    for (var i = 0; i &lt; list.length; ++i) { 
+        debug(&quot;ALERT: &quot; + list[i]);
+    }
+}
+
+var createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;FirstAbortedObjectStore&quot;);
+    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
+
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Put succeeded&quot;);
+        versionTransaction.abort();
+    }
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Put failed - &quot; + event);
+        done();
+    }
+    
+    dumpObjectStores(database);    
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction aborted&quot;);
+        dumpObjectStores(database);
+        continueTest1();
+        database.close();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction error &quot; + event);
+    }
+}
+
+function continueTest1()
+{
+    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 1);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+        dumpObjectStores(database);
+        var objectStore = database.createObjectStore(&quot;FirstCommittedObjectStore&quot;);
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction complete&quot;);
+            dumpObjectStores(database);
+            continueTest2();
+            database.close();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2()
+{
+    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 2);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+        var objectStore = database.createObjectStore(&quot;SecondCommittedObjectStore&quot;);
+
+        dumpObjectStores(database);    
+    
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction complete&quot;);
+            dumpObjectStores(database);
+            database.close(); 
+            continueTest3();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest3()
+{
+    createRequest = window.indexedDB.open(&quot;CreateObjectStoreTestDatabase&quot;, 3);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Fourth upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+        var database = event.target.result;
+        dumpObjectStores(database);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescreateobjectstorefailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmoderncreateobjectstorefailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/createobjectstore-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+description(&quot;This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function dumpObjectStores(database) {
+    var list = database.objectStoreNames;
+    debug(&quot;ALERT: &quot; + &quot;Object store names:&quot;);
+    for (var i = 0; i &lt; list.length; ++i) { 
+        debug(&quot;ALERT: &quot; + list[i]);
+    }
+}
+
+var createRequest = window.indexedDB.open(&quot;CreateObjectStoreFailuresTestDatabase&quot;, 1);
+var database;
+var versionTransaction;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    versionTransaction = createRequest.transaction;
+    database = event.target.result;
+
+    try {
+        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: &quot;&quot; });
+    } catch (e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to create object store with both autoincrement and an empty keypath: &quot; + e);
+        dumpObjectStores(database);
+    }
+
+    try {
+        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: ['foo'] });
+    } catch (e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to create object store with both autoincrement and a sequence keypath: &quot; + e);
+        dumpObjectStores(database);
+    }
+    
+    try {
+        var objectStore = database.createObjectStore('TestObjectStore', { keyPath: &quot;'foo bar'&quot;});
+    } catch (e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to create object store with invalid keyPath: &quot; + e);
+        dumpObjectStores(database);
+    }
+
+    database.createObjectStore(&quot;TestObjectStore1&quot;);
+    debug(&quot;ALERT: &quot; + &quot;Actually created an object store&quot;);
+    dumpObjectStores(database);
+    
+    try {
+        database.createObjectStore(&quot;TestObjectStore1&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to create TestObjectStore a second time: &quot; + e);
+        dumpObjectStores(database);
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        dumpObjectStores(database);
+
+        try {
+            database.createObjectStore(&quot;TestObjectStore2&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to create object store while there is no version change transaction: &quot; + e);
+            dumpObjectStores(database);
+        }
+    
+        setTimeout(finishUp, 0);
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function finishUp()
+{
+    try {
+        database.createObjectStore(&quot;TestObjectStore99&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to create object store outside of onupgradeneeded: &quot; + e);
+        dumpObjectStores(database);
+    }
+    
+    done();
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor1jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+description(&quot;This tests basic IDBCursor functionality&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor1Database&quot;, 1);
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor is: &quot; + cursor);
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
+}
+
+function setupRequest(request)
+{
+    // FIXME: Right now (until https://bugs.webkit.org/show_bug.cgi?id=151196 is resolved) what should be successful cursor operations will actually always fail.
+    request.onsuccess = function() {
+        debug(&quot;Success opening cursor&quot;);
+        logCursor(request.result);  
+    }
+    request.onerror = function(e) {
+        debug(&quot;Error opening cursor (expected for now)&quot;);
+        logCursor(request.result);
+        e.stopPropagation();
+    } 
+}
+
+var objectStore;
+var index;
+
+function testCursorDirection(direction)
+{
+    var range = IDBKeyRange.lowerBound(-Infinity);
+    var request = objectStore.openCursor(range, direction);
+    setupRequest(request);
+    request = index.openCursor(range, direction);
+    setupRequest(request);
+    request = index.openKeyCursor(range, direction);
+    setupRequest(request);
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+
+    for (var i = 0; i &lt; 10; ++i) {
+        objectStore.put(&quot;Record &quot; + i, i);
+    }
+    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
+
+    testCursorDirection(&quot;next&quot;);
+    testCursorDirection(&quot;nextunique&quot;);
+    testCursorDirection(&quot;prev&quot;);
+    testCursorDirection(&quot;prevunique&quot;);
+      
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor2jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+description(&quot;This test checks basic functionality walking a \&quot;next\&quot; and \&quot;prev\&quot; cursor on an object store with some records.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor2Database&quot;, 1);
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor is: &quot; + cursor);
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor value is: &quot; + cursor.value);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
+}
+
+var objectStore;
+var shouldStartPrevious = true;
+function setupRequest(request)
+{
+    request.onsuccess = function() {
+        if (!request.result) {
+            if (shouldStartPrevious) {
+                setupRequest(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
+                shouldStartPrevious = false;
+            }
+            return;
+        }
+
+        debug(&quot;Success iterating &quot; + request.result.direction + &quot; cursor&quot;);
+        logCursor(request.result);
+        request.result.continue();
+    }
+
+    request.onerror = function(e) {
+        debug(&quot;Error iterating cursor&quot;);
+        done();
+    } 
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 10; ++i) {
+        objectStore.put(&quot;Record &quot; + i, i);
+    }
+    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
+    
+    setupRequest(objectStore.openCursor());
+      
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor3jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor3html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-3.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-3.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-3.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+description(&quot;This test various uses of advance() and continue() on a \&quot;next\&quot; cursor.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor3Database&quot;, 1);
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor is: &quot; + cursor);
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor value is: &quot; + cursor.value);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
+}
+
+var objectStore;
+
+function setupRequest1(request)
+{
+    request.onsuccess = function() {
+        if (!request.result) {
+            setupRequest2(objectStore.openCursor());
+            return;
+        }
+        debug(&quot;Success iterating cursor&quot;);
+        logCursor(request.result);
+        request.result.continue(request.result.key + 2);
+    }
+    request.onerror = function(e) {
+        debug(&quot;Error iterating cursor&quot;);
+        done();
+    } 
+}
+
+function setupRequest2(request)
+{
+    request.onsuccess = function() {
+        if (!request.result)
+            return;
+        debug(&quot;Success iterating cursor&quot;);
+        logCursor(request.result);
+        request.result.advance(3);        
+    }
+    request.onerror = function(e) {
+        debug(&quot;Error iterating cursor&quot;);
+        done();
+    } 
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 10; ++i) {
+        objectStore.put(&quot;Record &quot; + i, i);
+    }
+    objectStore.put({ bar: &quot;Hello&quot; }, &quot;foo&quot;);
+    
+    setupRequest1(objectStore.openCursor());
+      
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor4jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor4html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-4.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-4.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-4.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+description(&quot;This test various uses of advance() and continue() on a \&quot;prev\&quot; cursor.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor4Database&quot;, 1);
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor is: &quot; + cursor);
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source + &quot; (&quot; + cursor.source.name + &quot;)&quot;);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor value is: &quot; + cursor.value);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);    
+}
+
+var objectStore;
+
+function setupRequest1(request)
+{
+    request.onsuccess = function() {
+        if (!request.result) {
+            setupRequest2(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
+            return;
+        }
+        debug(&quot;Success iterating cursor&quot;);
+        logCursor(request.result);
+        request.result.continue(request.result.key - 2);
+    }
+    request.onerror = function(e) {
+        debug(&quot;Error iterating cursor&quot;);
+        done();
+    } 
+}
+
+function setupRequest2(request)
+{
+    request.onsuccess = function() {
+        if (!request.result)
+            return;
+        debug(&quot;Success iterating cursor&quot;);
+        logCursor(request.result);
+        request.result.advance(3);        
+    }
+    request.onerror = function(e) {
+        debug(&quot;Error iterating cursor&quot;);
+        done();
+    } 
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 10; ++i) {
+        objectStore.put(&quot;Record &quot; + i, i);
+    }
+        
+    setupRequest1(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;));
+      
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor5jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor5html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-5.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-5.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-5.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-5.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+description(&quot;This tests iterating a \&quot;next\&quot; cursor in a read-write transaction while changing records.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor5Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 3; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor();
+    request.onsuccess = function() {
+        debug(&quot;Cursor open at key &quot; + request.result.key);
+
+        // This tests deleting the current record out of underneath the cursor.
+        // Its current key should be 0, after an iteration its next key should be 1.
+        objectStore.delete(0).onsuccess = function() {
+            debug(&quot;Record 0 deleted, even though that's where the cursor currently points.&quot;);
+        }
+        
+        // Now that cursor iteration has begun, manually delete and then replace a record 
+        // that will eventually be iterated to, making sure the new value is picked up. 
+        objectStore.delete(2);
+        objectStore.put(&quot;Scary new actual record!&quot;, 2);
+    
+        request.onsuccess = function() {
+            debug(&quot;Cursor iterated to key &quot; + request.result.key);
+            
+            request.onsuccess = function() {
+                debug(&quot;Cursor iterated to key &quot; + request.result.key + &quot; with value '&quot; + request.result.value + &quot;'&quot;);
+            }
+            
+            request.result.continue();
+        }
+        request.result.continue();
+    }
+          
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor6jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor6html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-6.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-6.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-6.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-6.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+description(&quot;This tests iterating a \&quot;prev\&quot; cursor in a read-write transaction while changing records.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor6Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 3; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
+    request.onsuccess = function() {
+        debug(&quot;Cursor open at key &quot; + request.result.key);
+
+        // This tests deleting the current record out of underneath the cursor.
+        // Its current key should be 2, after an iteration its next key should be 1.
+        objectStore.delete(2).onsuccess = function() {
+            debug(&quot;Record 2 deleted, even though that's where the cursor currently points.&quot;);
+        }
+        
+        // Now that cursor iteration has begun, manually delete and then replace a record 
+        // that will eventually be iterated to, making sure the new value is picked up. 
+        objectStore.delete(0);
+        objectStore.put(&quot;Scary new actual record!&quot;, 0);
+    
+        request.onsuccess = function() {
+            debug(&quot;Cursor iterated to key &quot; + request.result.key);
+            
+            request.onsuccess = function() {
+                debug(&quot;Cursor iterated to key &quot; + request.result.key + &quot; with value '&quot; + request.result.value + &quot;'&quot;);
+            }
+            
+            request.result.continue();
+        }
+        request.result.continue();
+    }
+          
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor7jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor7html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-7.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-7.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-7.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-7.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+description(&quot;This tests iterating a \&quot;next\&quot; cursor in a read-write transaction combined with clearing the object store.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor7Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 3; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor();
+    request.onsuccess = function() {
+        debug(&quot;Cursor open at key &quot; + request.result.key);
+
+        // This tests deleting the current record out of underneath the cursor.
+        // Its current key should be 0, after an iteration its next key should be 1.
+        objectStore.clear().onsuccess = function() {
+            debug(&quot;Object store cleared.&quot;);
+        }
+        
+        // The cursor is currently on key 0, which no longer exists.
+        // It's next key would have been 1, but the object store has been cleared.
+        // Whatever key we put in the object store that is greater than 0 will be the actual next key.
+        objectStore.put(&quot;Record 100&quot;, 100);
+    
+        request.onsuccess = function() {
+            debug(&quot;Cursor iterated to key &quot; + request.result.key);
+        }
+        request.result.continue();
+    }
+          
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcescursor8jsfromrev195319trunkLayoutTestsstorageindexeddbmoderncursor8html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-8.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/cursor-8.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-8.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/cursor-8.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+description(&quot;This tests iterating a \&quot;prev\&quot; cursor in a read-write transaction while changing records.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Cursor8Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 3; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
+    request.onsuccess = function() {
+        debug(&quot;Cursor open at key &quot; + request.result.key);
+
+        // This tests deleting the current record out of underneath the cursor.
+        // Its current key should be 0, after an iteration its next key should be 1.
+        objectStore.clear().onsuccess = function() {
+            debug(&quot;Object store cleared.&quot;);
+        }
+        
+        // The cursor is currently on key 2, which no longer exists.
+        // It's next key would have been 1, but the object store has been cleared.
+        // Whatever key we put in the object store that is less than 2 will be the actual next key.
+        objectStore.put(&quot;Record -100&quot;, -100);
+    
+        request.onsuccess = function() {
+            debug(&quot;Cursor iterated to key &quot; + request.result.key);
+        }
+        request.result.continue();
+    }
+          
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdatebasicjsfromrev195319trunkLayoutTestsstorageindexeddbmoderndatebasichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/date-basic.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/date-basic.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/date-basic.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/date-basic.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,95 @@
</span><ins>+description(&quot;This tests using Date objects as keys and values.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;DateBasicDatabase&quot;, 1);
+var database;
+
+var date1 = new Date(&quot;1955-11-05T00:00:00&quot;);
+var date2 = new Date(&quot;1955-11-12T18:00:00&quot;);
+var date3 = new Date(&quot;2015-10-21T16:00:00&quot;);
+    
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    objectStore.put(&quot;Flux capacitor&quot;, date1);
+    objectStore.put(&quot;Fish under the sea&quot;, date2);
+    objectStore.put(&quot;Hoverboards&quot;, date3);
+    
+    objectStore.put(date1, &quot;a&quot;);
+    objectStore.put(date2, &quot;b&quot;);
+    objectStore.put(date3, &quot;c&quot;);
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+var objectStore;
+
+function testGet(key) {
+    var request = objectStore.get(key);
+    request.onsuccess = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Success getting key '&quot; + key + &quot;' of type &quot; + typeof(key) + &quot;, result is '&quot; + request.result + &quot;' of type &quot; + typeof(request.result));
+        if (key instanceof Date)
+            debug(&quot;ALERT: &quot; + &quot;Key is a Date object, btw&quot;);
+        if (request.result instanceof Date)
+            debug(&quot;ALERT: &quot; + &quot;Result is a Date object, btw&quot;);
+    }
+    request.onerror = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Expected error getting key '&quot; + key + &quot;'&quot;);
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+    testGet(date1);
+    testGet(date2);
+    testGet(date3);
+    testGet(&quot;a&quot;);
+    testGet(&quot;b&quot;);
+    testGet(&quot;c&quot;);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabase1jsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeletedatabase1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,127 @@
</span><ins>+description(&quot;This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var request = window.indexedDB.open(&quot;DeleteDatabase1TestDatabase&quot;);
+request.onsuccess = function()
+{
+    debug(&quot;open db success&quot;);
+}
+request.onerror = function(e)
+{
+    debug(&quot;Unexpected error&quot;);
+        done();
+}
+
+request.onupgradeneeded = function(e)
+{
+    debug(&quot;Initial upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+    
+    var versionTransaction = request.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put(&quot;This is a record&quot;, 1);
+        
+    request.transaction.oncomplete = function()
+    {
+        debug(&quot;Version change complete&quot;);
+        database.onversionchange = function(e)
+        {
+            debug(&quot;First connection received versionchange event: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
+            database.close();
+        }
+        continueTest1();
+    }
+    request.transaction.onabort = function()
+    {
+        debug(&quot;Version change unexpected abort&quot;);
+        done();
+    }
+    request.transaction.onerror = function()
+    {
+        debug(&quot;Version change unexpected error&quot;);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    debug(&quot;Requesting deleteDatabase&quot;);
+    var request = window.indexedDB.deleteDatabase(&quot;DeleteDatabase1TestDatabase&quot;);
+    request.onsuccess = function(e)
+    {
+        debug(&quot;Delete database success: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
+        continueTest2();
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;Delete database unexpected error&quot;);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+        debug(&quot;Delete database unexpected upgradeneeded&quot;);
+            done();
+    }
+}
+
+function continueTest2()
+{
+    debug(&quot;Recreating database to make sure it's new and empty&quot;);
+    var request = window.indexedDB.open(&quot;DeleteDatabase1TestDatabase&quot;);
+
+    request.onupgradeneeded = function(e)
+    {
+        debug(&quot;Second upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+        var versionTransaction = request.transaction;
+        
+        try {
+            var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        } catch(e) {
+            debug(&quot;Unable to get object store in second upgrade transaction (which is correct because it should not be there)&quot;);
+        }
+
+        versionTransaction.oncomplete = function(e)
+        {
+            debug(&quot;Second database upgrade success&quot;);
+            done();
+        }
+        
+        versionTransaction.onabort = function(e)
+        {
+            debug(&quot;Second database upgrade unexpected abort&quot;);
+            done();
+        }
+            
+        versionTransaction.onerror = function(e)
+        {
+            debug(&quot;Second database upgrade unexpected error&quot;);
+            done();
+        }
+    }
+
+    request.onsuccess = function(e)
+    {
+        debug(&quot;Second database opening unexpected success&quot;);
+        done();
+    }
+    
+    request.onerror = function(e)
+    {
+        debug(&quot;Second database opening unexpected error&quot;);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabase2jsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeletedatabase2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,144 @@
</span><ins>+description(&quot;This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event. \
+That open connection also has an in-progress transaction at the time it gets the versionChange event.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var stopSpinning = false;
+
+var request = window.indexedDB.open(&quot;DeleteDatabase2TestDatabase&quot;);
+request.onsuccess = function()
+{
+    debug(&quot;open db success&quot;);
+}
+request.onerror = function(e)
+{
+    debug(&quot;Open request error: &quot; + request.error.name);
+}
+
+request.onupgradeneeded = function(e)
+{
+    debug(&quot;Initial upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+    
+    var versionTransaction = request.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put(&quot;This is a record&quot;, 1);
+    
+    // Spin the transaction until told to stop spinning it.
+    var keepGoing = function() {
+        if (!stopSpinning)
+            objectStore.get(1).onsuccess = keepGoing;
+    }
+    objectStore.get(1).onsuccess = keepGoing;
+
+    database.onversionchange = function(e)
+    {
+        debug(&quot;First connection received versionchange event: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
+        
+        var shutErDown = function() {
+            database.close();
+            stopSpinning = true;
+        }
+        window.setTimeout(shutErDown, 0);
+    }
+        
+    request.transaction.oncomplete = function()
+    {
+        debug(&quot;First version change complete&quot;);
+    }
+    
+    request.transaction.onabort = function()
+    {
+        debug(&quot;Version change unexpected abort&quot;);
+        done();
+    }
+    request.transaction.onerror = function()
+    {
+        debug(&quot;Version change unexpected error&quot;);
+        done();
+    }
+    
+    window.setTimeout(continueTest1, 0);
+}
+
+function continueTest1()
+{
+    debug(&quot;Requesting deleteDatabase&quot;);
+    var request = window.indexedDB.deleteDatabase(&quot;DeleteDatabase2TestDatabase&quot;);
+    request.onsuccess = function(e)
+    {
+        debug(&quot;Delete database success: oldVersion &quot; + e.oldVersion + &quot;, newVersion &quot; + e.newVersion);
+        continueTest2();
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;Delete database unexpected error&quot;);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+        debug(&quot;Delete database unexpected upgradeneeded&quot;);
+            done();
+    }
+}
+
+function continueTest2()
+{
+    debug(&quot;Recreating database to make sure it's new and empty&quot;);
+    var request = window.indexedDB.open(&quot;DeleteDatabase2TestDatabase&quot;);
+
+    request.onupgradeneeded = function(e)
+    {
+        debug(&quot;Second upgrade old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+        var versionTransaction = request.transaction;
+        
+        try {
+            var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        } catch(e) {
+            debug(&quot;Unable to get object store in second upgrade transaction (which is correct because it should not be there)&quot;);
+        }
+
+        versionTransaction.oncomplete = function(e)
+        {
+            debug(&quot;Second database upgrade success&quot;);
+            done();
+        }
+        
+        versionTransaction.onabort = function(e)
+        {
+            debug(&quot;Second database upgrade unexpected abort&quot;);
+            done();
+        }
+            
+        versionTransaction.onerror = function(e)
+        {
+            debug(&quot;Second database upgrade unexpected error&quot;);
+            done();
+        }
+    }
+
+    request.onsuccess = function(e)
+    {
+        debug(&quot;Second database opening unexpected success&quot;);
+        done();
+    }
+    
+    request.onerror = function(e)
+    {
+        debug(&quot;Second database opening unexpected error&quot;);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabasenullnameexceptionjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+description(&quot;This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+try {
+        var request = window.indexedDB.deleteDatabase();
+} catch (e) {
+        debug(&quot;ALERT: &quot; + e);
+}
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabaserequesteventjsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeletedatabaserequesteventhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request-event.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request-event.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request-event.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+description(&quot;This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var request = window.indexedDB.deleteDatabase(&quot;TestDatabase&quot;);
+
+request.onsuccess = function()
+{
+        debug(&quot;ALERT: &quot; + &quot;success&quot;);
+        done();
+}
+request.onerror = function(e)
+{
+        debug(&quot;ALERT: &quot; + &quot;error &quot; + e);
+        done();
+}
+
+debug(&quot;ALERT: &quot; + request);
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeletedatabaserequestjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+description(&quot;This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var request = window.indexedDB.deleteDatabase(&quot;TestDatabase&quot;);
+debug(&quot;ALERT: &quot; + request);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeleteindex1jsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeleteindex1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,107 @@
</span><ins>+description(&quot;This tests deleting an index and then committing the transaction.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var index;
+var objectStore;
+var database;
+
+function checkIndexValues()
+{
+    var countRequest = index.count();
+    countRequest.onsuccess = function() {
+        debug(&quot;Count is: &quot; + countRequest.result);
+    }
+
+    var cursorRequest = index.openCursor();
+    cursorRequest.onsuccess = function() {
+        var cursor = cursorRequest.result;
+        if (!cursor) {
+            objectStore.deleteIndex(&quot;TestIndex1&quot;);
+            debug(&quot;Deleted the index&quot;);
+            return;
+        }
+
+        debug(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
+        cursor.continue();
+    }
+    cursorRequest.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(cursorRequest.result);
+        done();
+    } 
+}
+
+var createRequest = window.indexedDB.open(&quot;DeleteIndex1Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put({ bar: &quot;A&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot; }, 2);
+
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    
+    checkIndexValues();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest() {
+    var transaction = database.transaction(&quot;TestObjectStore&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    var names = objectStore.indexNames;
+    debug(&quot;Object store has indexes:&quot;)
+    for (var i = 0; i &lt; names.length; ++i)
+        debug(names[i]);
+    
+    try {
+        objectStore.index(&quot;TestIndex1&quot;);
+    } catch(e) {
+        debug(&quot;Unable to get index from object store (it shouldn't exist)&quot;);
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;Transaction unexpected abort&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;Transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;Transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeleteindex2jsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeleteindex2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deleteindex-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,132 @@
</span><ins>+description(&quot;This tests deleting an index and then aborting the transaction.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var index;
+var objectStore;
+var database;
+
+function checkIndexValues()
+{
+    var countRequest = index.count();
+    countRequest.onsuccess = function() {
+        debug(&quot;Count is: &quot; + countRequest.result);
+    }
+
+    var cursorRequest = index.openCursor();
+    cursorRequest.onsuccess = function() {
+        var cursor = cursorRequest.result;
+        if (!cursor)
+            return;
+
+        debug(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
+        cursor.continue();
+    }
+    cursorRequest.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(cursorRequest.result);
+        done();
+    } 
+}
+
+var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put({ bar: &quot;A&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot; }, 2);
+
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    
+    checkIndexValues();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        database.close();
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1() {
+    var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 2);
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        database = event.target.result;
+        var versionTransaction = createRequest.transaction;
+        objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        objectStore.deleteIndex(&quot;TestIndex1&quot;);
+        debug(&quot;Deleted the index&quot;);
+        versionTransaction.abort();
+        debug(&quot;Aborted the transaction&quot;);
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;Second upgrade versionchange transaction abort&quot;);
+            database.close();
+            continueTest2();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;Second upgrade versionchange transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;Second upgrade versionchange transaction error &quot; + event);
+        }
+    }
+}
+
+function continueTest2() {
+    var createRequest = window.indexedDB.open(&quot;DeleteIndex2Database&quot;, 3);
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        index = objectStore.index(&quot;TestIndex1&quot;);
+    
+        checkIndexValues();    
+        
+        versionTransaction.onabort = function(event) {
+            debug(&quot;Third upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;Third upgrade versionchange transaction complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;Third upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdeleteobjectstore1jsfromrev195319trunkLayoutTestsstorageindexeddbmoderndeleteobjectstore1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/deleteobjectstore-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/deleteobjectstore-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/deleteobjectstore-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+description(&quot;This test creates an object store then populates it, then commits that transaction. \
+It then deletes it, but aborts that transaction. \
+Finally it checks to make sure everything from step 1 is there as expected.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        objectStore.put(&quot;AH AH AH AH AH&quot;, i + &quot; puts&quot;);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        database.close();
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function getChecker(event) {
+    debug(&quot;ALERT: &quot; + &quot;Value gotten was &quot; + event.target.result);
+}
+
+function continueTest1()
+{
+    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 2);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request error - &quot; + event);
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected success - &quot; + event);
+        done();
+    }
+
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+        var versionTransaction = openRequest.transaction;
+        var database = event.target.result;
+        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        
+        debug(&quot;ALERT: &quot; + &quot;Deleting object store&quot;);        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+
+        versionTransaction.abort();
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction abort&quot;);
+            continueTest2();
+            database.close();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction error - &quot; + event);
+        }
+    }
+}
+
+function continueTest2()
+{
+    var openRequest = window.indexedDB.open(&quot;DeleteObjectStore1Database&quot;, 1);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected upgradeneeded - &quot; + event);
+        done();
+    }
+
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting final transaction&quot;);
+        var database = event.target.result;
+        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+        var request;
+        for (var i = 0; i &lt; 10; ++i) {
+            request = objectStore.get(i + &quot; puts&quot;);
+            request.onsuccess = getChecker;
+        }
+
+        transaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Final transaction unexpected abort&quot;);
+            done();
+        }
+
+        transaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Final transaction complete&quot;);
+            done();
+        }
+
+        transaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Final transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdoubleabortjsfromrev195319trunkLayoutTestsstorageindexeddbmoderndoubleaborthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/double-abort.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/double-abort.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/double-abort.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/double-abort.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+description(&quot;This test aborts the same transaction twice, making the appropriate exception is thrown.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;DoubleAbortTestDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+
+    versionTransaction.abort();
+    try {
+        versionTransaction.abort();
+    } catch (e) {
+        debug(&quot;ALERT: &quot; + &quot;Second abort failed: &quot; + e);
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesdoubleopenjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/double-open.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/double-open.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/double-open.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+description(&quot;This test makes sure that quickly opening the same database multiple times is successful without the backend ASSERTing or crashing.&quot;);
+
+function log(msg)
+{
+    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&quot;;
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+if (testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+var req1 = indexedDB.open(&quot;testDB&quot;);
+req1.onerror = function() {
+    debug(&quot;First request unexpected error&quot;);
+    done();
+}
+
+var req2 = indexedDB.open(&quot;testDB&quot;);
+req2.onsuccess = function() {
+    debug(&quot;Second request done&quot;);
+    done();
+}
+req2.onerror = function() {
+    debug(&quot;Second request unexpected error&quot;);
+    done();
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesgetindexfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmoderngetindexfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/get-index-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/get-index-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/get-index-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/get-index-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.index().&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetIndexFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    var index = objectStore.index(&quot;TestIndex&quot;);
+    debug(&quot;Got an index as expected: &quot; + index);
+
+    try {
+        objectStore.index(null);
+    } catch(e) {
+        debug(&quot;Failed to get an index with a null name&quot;);
+    }
+
+    try {
+        objectStore.index(&quot;DoesNotExistdex&quot;);
+    } catch(e) {
+        debug(&quot;Failed to get an index that doesn't exist&quot;);
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        continueTest2();
+        database.close();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest2()
+{
+    var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetIndexFailuresDatabase&quot;, 2);
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.index(&quot;TestIndex&quot;);
+        } catch(e) {
+            debug(&quot;Failed to get an index from a deleted object store&quot;);
+        }        
+            
+        versionTransaction.onabort = function(event) {
+            debug(&quot;Second versionchange transaction unexpected aborted&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;Second versionchange transaction complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;Second versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesgetkeyrangejsfromrev195319trunkLayoutTestsstorageindexeddbmoderngetkeyrangehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/get-keyrange.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/get-keyrange.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/get-keyrange.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/get-keyrange.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+description(&quot;This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;GetKeyRangeDatabase&quot;, 1);
+var database;
+
+var date1 = new Date(&quot;1955-11-05T00:00:00&quot;);
+var date2 = new Date(&quot;1955-11-12T18:00:00&quot;);
+var date3 = new Date(&quot;2015-10-21T16:00:00&quot;);
+    
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    objectStore.put(&quot;Flux capacitor&quot;, date1);
+    objectStore.put(&quot;Fish under the sea&quot;, date2);
+    objectStore.put(&quot;Hoverboards&quot;, date3);
+
+    for (var i = 0; i &lt; 100; ++i)
+        objectStore.put(&quot;\&quot;&quot; + i + &quot;\&quot;&quot;, i);
+
+    objectStore.put(&quot;PosInf&quot;, Infinity);
+    objectStore.put(&quot;NegInf&quot;, -Infinity);
+
+    objectStore.put(&quot;A&quot;, &quot;A&quot;);
+    objectStore.put(&quot;As&quot;, &quot;As&quot;);
+    objectStore.put(&quot;AS&quot;, &quot;AS&quot;);
+    objectStore.put(&quot;a&quot;, &quot;a&quot;);
+
+    objectStore.put(&quot;array 1&quot;, [1, &quot;hello&quot;]);
+    objectStore.put(&quot;array 2&quot;, [2, &quot;goodbye&quot;]);
+    objectStore.put(&quot;array 3&quot;, []);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+var objectStore;
+
+function testGet(keyRange) {
+    var request = objectStore.get(keyRange);
+    request.onsuccess = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Success getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + (keyRange.lowerOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;), &quot; + keyRange.upper + &quot; (&quot; + (keyRange.upperOpen ? &quot;Open&quot; : &quot;Closed&quot;) + &quot;)]&quot;);
+        debug(&quot;ALERT: &quot; + &quot;Result is &quot; + request.result);
+    }
+    request.onerror = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected error getting keyRange [&quot; + keyRange.lower + &quot; (&quot; + keyRange.lowerOpen + &quot;), &quot; + keyRange.upper + &quot; (&quot; + keyRange.upperOpen + &quot;)]&quot;);
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    testGet(IDBKeyRange.lowerBound(-1));
+    testGet(IDBKeyRange.lowerBound(-1, true));
+    testGet(IDBKeyRange.lowerBound(0));
+    testGet(IDBKeyRange.lowerBound(0, true));
+    testGet(IDBKeyRange.lowerBound(0.1));
+    testGet(IDBKeyRange.lowerBound(0.1, true));
+    testGet(IDBKeyRange.lowerBound(99));
+    testGet(IDBKeyRange.lowerBound(99, true));
+    testGet(IDBKeyRange.lowerBound(99.1));
+    testGet(IDBKeyRange.lowerBound(99.1, true));
+    
+    testGet(IDBKeyRange.upperBound(100));
+    testGet(IDBKeyRange.upperBound(100, true));
+    testGet(IDBKeyRange.upperBound(99));
+    testGet(IDBKeyRange.upperBound(99, true));
+    testGet(IDBKeyRange.upperBound(98.99999));
+    testGet(IDBKeyRange.upperBound(98.99999, true));
+    testGet(IDBKeyRange.upperBound(98));
+    testGet(IDBKeyRange.upperBound(98, true));
+    testGet(IDBKeyRange.upperBound(0));
+    testGet(IDBKeyRange.upperBound(0, true));
+    testGet(IDBKeyRange.upperBound(-0.1));
+    testGet(IDBKeyRange.upperBound(-0.1, true));
+    
+    testGet(IDBKeyRange.bound(2.5, 3.5));
+    testGet(IDBKeyRange.bound(-0.5, 0.5));
+    testGet(IDBKeyRange.bound(98.5, 99.5));
+    testGet(IDBKeyRange.bound(-1, 0));
+    testGet(IDBKeyRange.bound(-1, 0, true));
+    testGet(IDBKeyRange.bound(-1, 0, false, true));
+    testGet(IDBKeyRange.bound(-1, 0, true, true));
+    testGet(IDBKeyRange.bound(3, 4));
+    testGet(IDBKeyRange.bound(3, 4, true));
+    testGet(IDBKeyRange.bound(3, 4, false, true));
+    testGet(IDBKeyRange.bound(3, 4, true, true));
+    testGet(IDBKeyRange.bound(99, 100));
+    testGet(IDBKeyRange.bound(99, 100, true));
+    testGet(IDBKeyRange.bound(99, 100, false, true));
+    testGet(IDBKeyRange.bound(99, 100, true, true));
+
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
+
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(&quot;AS&quot;, &quot;a&quot;, true, true));
+    
+    testGet(IDBKeyRange.bound(Infinity, []));
+    testGet(IDBKeyRange.bound(Infinity, [], true));
+    testGet(IDBKeyRange.bound(Infinity, [], false, true));
+    testGet(IDBKeyRange.bound(Infinity, [], true, true));
+
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
+
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, false, true));
+    testGet(IDBKeyRange.bound(Infinity, &quot;a&quot;, true, true));
+
+    testGet(IDBKeyRange.bound(date1, date3));
+    testGet(IDBKeyRange.bound(date1, date3, true));
+    testGet(IDBKeyRange.bound(date1, date3, false, true));
+    testGet(IDBKeyRange.bound(date1, date3, true, true));
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbdatabasedeleteobjectstorefailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbdatabasedeleteobjectstorefailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,140 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        debug(&quot;ALERT: &quot; + &quot;readwrite put success - about to try to delete an objectstore&quot;);
+        try {
+            database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to deleteObjectStore without a versionchange transaction - &quot; + e);
+        }
+    }
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected aborted&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction complete&quot;);
+        database.close();
+        continueTest2();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest2()
+{
+    var openRequest = window.indexedDB.open(&quot;IDBDatabaseDeleteObjectStoreFailuresDatabase&quot;, 2);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected success - &quot; + event);
+        done();
+    }
+
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+        var versionTransaction = openRequest.transaction;
+        database = event.target.result;
+
+        try {
+            database.deleteObjectStore(&quot;NonexistentObjectStore&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to deleteObjectStore with a non-existent objectstore - &quot; + e);
+        }
+
+        // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+        var objectStore = versionTransaction.objectStore(&quot;TestObjectStore&quot;);
+        var canFinish = false;
+        var spinGet = function() { 
+            objectStore.get(&quot;foo&quot;).onsuccess = function() {
+                if (!canFinish)
+                    spinGet();
+            }
+        }
+        spinGet();
+        
+        // After the versionChange transaction becomes inactive, but while it's still in-progress, try to delete the objectstore
+        var tryInactiveDelete = function() 
+        {
+            try {
+                database.deleteObjectStore(&quot;TestObjectStore&quot;);
+            } catch(e) {
+                debug(&quot;ALERT: &quot; + &quot;Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - &quot; + e);
+            }
+            canFinish = true;
+        }
+        
+        setTimeout(tryInactiveDelete, 0);
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second version change transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbdatabasetransactionfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbdatabasetransactionfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBDatabase.transaction()&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBDatabaseTransactionFailuresDatabase&quot;);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put FAILED - &quot; + event);
+        done();
+    }
+    
+    try {
+        database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to start a transaction while a versionChange transaction was in progress - &quot; + e);
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+function continueTest()
+{
+    try {
+        database.transaction([], &quot;readonly&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to start a transaction with an empty set of object stores - &quot; + e);
+    }
+
+    try {
+        database.transaction(&quot;NonexistentObjectStore&quot;, &quot;readonly&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to start a transaction to a nonexistent object store - &quot; + e);
+    }
+
+    try {
+        database.transaction(&quot;TestObjectStore&quot;, &quot;blahblah&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to start a transaction with an invalid mode - &quot; + e);
+    }
+
+    try {
+        database.transaction(&quot;TestObjectStore&quot;, &quot;versionchange&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to explicitly start a versionchange transaction - &quot; + e);
+    }
+    
+    try {
+        database.close();
+        database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to explicitly start a transaction with the close pending flag set - &quot; + e);
+    }
+    
+    done();
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbindexpropertiesbasicjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbindexpropertiesbasichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbindex-properties-basic.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbindex-properties-basic.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbindex-properties-basic.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,94 @@
</span><ins>+description(&quot;This tests getting basic properties on an IDBIndex.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function gol(message)
+{
+    debug(&quot;ALERT: &quot; + message);
+}
+
+function logIndex(index)
+{
+    debug(&quot;ALERT: &quot; + index.name);
+    debug(&quot;ALERT: &quot; + index.objectStore);
+    debug(&quot;ALERT: &quot; + index.objectStore.name);
+    debug(&quot;ALERT: &quot; + index.keyPath);
+    debug(&quot;ALERT: &quot; + index.multiEntry);
+    debug(&quot;ALERT: &quot; + index.unique);
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBIndexPropertiesBasicDatabase&quot;, 1);
+var database;
+
+var indexes = new Array();
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+    indexes.push(objectStore.createIndex(&quot;TestIndex1&quot;, &quot;foo&quot;));
+    indexes.push(objectStore.createIndex(&quot;TestIndex2&quot;, &quot;foo&quot;, { unique: false, multiEntry: false }));
+    indexes.push(objectStore.createIndex(&quot;TestIndex3&quot;, &quot;foo&quot;, { unique: true, multiEntry: false }));
+    indexes.push(objectStore.createIndex(&quot;TestIndex4&quot;, &quot;foo&quot;, { unique: false, multiEntry: true }));
+    indexes.push(objectStore.createIndex(&quot;TestIndex5&quot;, &quot;foo&quot;, { unique: true, multiEntry: true }));
+    indexes.push(objectStore.createIndex(&quot;TestIndex6&quot;, [ &quot;foo&quot; ]));
+    indexes.push(objectStore.createIndex(&quot;TestIndex7&quot;, [ &quot;foo&quot;, &quot;bar&quot; ]));
+
+    for (index in indexes)
+        logIndex(indexes[index]);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    logIndex(objectStore.index(&quot;TestIndex1&quot;));
+    logIndex(objectStore.index(&quot;TestIndex2&quot;));
+    logIndex(objectStore.index(&quot;TestIndex3&quot;));
+    logIndex(objectStore.index(&quot;TestIndex4&quot;));
+    logIndex(objectStore.index(&quot;TestIndex5&quot;));
+    logIndex(objectStore.index(&quot;TestIndex6&quot;));
+    logIndex(objectStore.index(&quot;TestIndex7&quot;));
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreclear1jsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,107 @@
</span><ins>+description(&quot;This test creates an object store then populates it. \
+It then clears it and makes sure it has nothing left in it.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreClearDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;, { autoIncrement: true });
+    var request = objectStore.put(&quot;bar1&quot;);
+    var request = objectStore.put(&quot;bar2&quot;);
+    var request = objectStore.put(&quot;bar3&quot;);
+    var request = objectStore.put(&quot;bar4&quot;);
+    var request = objectStore.put(&quot;bar5&quot;);
+    var request = objectStore.put(&quot;bar6&quot;);
+    var request = objectStore.put(&quot;bar7&quot;);
+    var request = objectStore.put(&quot;bar8&quot;);
+    var request = objectStore.put(&quot;bar9&quot;);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function getChecker(event) {
+    debug(&quot;ALERT: &quot; + &quot;Value gotten was &quot; + event.target.result);
+}
+
+function continueTest1()
+{
+    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClearDatabase&quot;, 1);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected upgradeneeded - &quot; + event);
+        done();
+    }
+
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting readwrite transaction&quot;);
+        var database = event.target.result;
+        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+        var request;
+        for (var i = 1; i &lt;= 9; ++i) {
+            request = objectStore.get(i);
+            request.onsuccess = getChecker;
+        }
+        
+        request = objectStore.clear();
+        request.onsuccess = function() {
+            debug(&quot;ALERT: &quot; + &quot;Object store cleared&quot;);
+            var newRequests;
+            for (var i = 1; i &lt;= 9; ++i) {
+                newRequests = objectStore.get(i);
+                newRequests.onsuccess = getChecker;
+            }    
+        }
+
+        transaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected abort&quot;);
+            done();
+        }
+
+        transaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction complete&quot;);
+            done();
+        }
+
+        transaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreclear2jsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoreclear2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,163 @@
</span><ins>+description(&quot;This test creates an object store then populates it, then commits that transaction. \
+It then clears it, but aborts that transaction. \
+Finally it checks to make sure everything from step 1 is still in there.&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;, { autoIncrement: true });
+    var request = objectStore.put(&quot;bar1&quot;);
+    var request = objectStore.put(&quot;bar2&quot;);
+    var request = objectStore.put(&quot;bar3&quot;);
+    var request = objectStore.put(&quot;bar4&quot;);
+    var request = objectStore.put(&quot;bar5&quot;);
+    var request = objectStore.put(&quot;bar6&quot;);
+    var request = objectStore.put(&quot;bar7&quot;);
+    var request = objectStore.put(&quot;bar8&quot;);
+    var request = objectStore.put(&quot;bar9&quot;);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function getChecker(event) {
+    debug(&quot;ALERT: &quot; + &quot;Value gotten was &quot; + event.target.result);
+}
+
+function continueTest1()
+{
+    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected upgradeneeded - &quot; + event);
+        done();
+    }
+
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting readwrite transaction&quot;);
+        var database = event.target.result;
+        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+        var request;
+        for (var i = 1; i &lt;= 9; ++i) {
+            request = objectStore.get(i);
+            request.onsuccess = getChecker;
+        }
+        
+        request = objectStore.clear();
+        request.onsuccess = function() {
+            debug(&quot;ALERT: &quot; + &quot;Object store cleared, making sure its all gone.&quot;);
+            var newRequests;
+            for (var i = 1; i &lt;= 9; ++i) {
+                newRequests = objectStore.get(i);
+                newRequests.onsuccess = getChecker;
+            }
+            
+            // We'll be on the last request here, can just override it.
+            newRequests.onsuccess = function(event) {
+                getChecker(event);
+                transaction.abort();
+            }
+        }
+        
+        // Just for fun clear it twice, won't change anything
+        objectStore.clear();
+
+        transaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction abort&quot;);
+            continueTest2();
+        }
+
+        transaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected complete&quot;);
+            done();
+        }
+
+        transaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2()
+{
+    var openRequest = window.indexedDB.open(&quot;IDBObjectStoreClear2Database&quot;, 1);
+
+    openRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected error - &quot; + event);
+        done();
+    }
+    openRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected blocked - &quot; + event);
+        done();
+    }
+    openRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Request unexpected upgradeneeded - &quot; + event);
+        done();
+    }
+
+    openRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting final transaction&quot;);
+        var database = event.target.result;
+        var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+        var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+        var request;
+        for (var i = 1; i &lt;= 9; ++i) {
+            request = objectStore.get(i);
+            request.onsuccess = getChecker;
+        }
+
+        transaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected abort&quot;);
+            done();
+        }
+
+        transaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction complete&quot;);
+            done();
+        }
+
+        transaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Readwrite transaction unexpected error - &quot; + event);
+            done();
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstorecount1jsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstorecount1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+description(&quot;This test exercises various uses of IDBObjectStore.count()&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCount1Database&quot;, 1);
+var database;
+var objectStore;
+
+function getCount(arg)
+{
+    var request;
+    if (arg == undefined)
+        request = objectStore.count();
+    else
+        request = objectStore.count(arg);
+    
+    request.onsuccess = function() {
+        debug(&quot;ALERT: &quot; + &quot;Count is: &quot; + request.result);
+    }
+    request.onerror = function(error) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected error getting count: &quot; + error);
+        done();
+    }
+}
+
+function getCounts()
+{
+    getCount();
+    getCount(IDBKeyRange.bound(3, 6));    
+    getCount(IDBKeyRange.bound(3, 6, true, false));    
+    getCount(IDBKeyRange.bound(3, 6, false, true));
+    getCount(7);    
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+    objectStore.put(1, 1);
+    getCounts();
+    objectStore.put(2, 2);
+    getCounts();
+    objectStore.put(3, 3);
+    getCounts();
+    objectStore.put(4, 4);
+    getCounts();
+    objectStore.put(5, 5);
+    getCounts();
+    objectStore.put(6, 6);
+    getCounts();
+    objectStore.put(7, 7);
+    getCounts();
+    objectStore.put(8, 8);
+    getCounts();
+    objectStore.put(9, 9);
+    getCounts();
+    objectStore.put(10, 10);
+    getCounts();
+
+    // FIXME: Once objectStore.delete() is implemented, also test counts after deleting previous records.
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstorecountfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstorecountfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.count().&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreCountFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.count(NaN);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to count records in object store with an invalid key&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.count();
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to count records in object store that's been deleted&quot;);
+        } 
+
+        // Recreate the objectstore because we'll need it in phase 2.
+        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+    
+    var getWhileInactive = function() {
+        try {
+            objectStore.count();
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to count records in object store while transaction is inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(getWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredelete1jsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+description(&quot;This test exercises various uses of IDBObjectStore.delete()&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+function logCount()
+{
+    var req = objectStore.count();
+    req.onsuccess = function() { 
+        debug(&quot;Count is &quot; + req.result);
+    }
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDelete1Database&quot;, 1);
+var database;
+var objectStore;
+
+var date1 = new Date(&quot;1999-12-28T23:00:00&quot;);
+var date2 = new Date(&quot;1999-12-29T23:00:00&quot;);
+var date3 = new Date(&quot;1999-12-30T23:00:00&quot;);
+var date4 = new Date(&quot;1999-12-31T23:00:00&quot;);
+var date5 = new Date(&quot;2000-01-01T00:00:00&quot;);
+var date6 = new Date(&quot;2000-01-02T00:00:00&quot;);
+var date7 = new Date(&quot;2000-01-03T00:00:00&quot;);
+var date8 = new Date(&quot;2000-01-04T00:00:00&quot;);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    
+    // Just for the heck of it.
+    objectStore.delete(&quot;foo&quot;);
+    objectStore.put(&quot;boo&quot;, &quot;foo&quot;);
+    objectStore.delete(&quot;foo&quot;);
+
+    objectStore.put(&quot;boo&quot;, &quot;foo&quot;);
+    objectStore.put(&quot;bop&quot;, &quot;fop&quot;);
+    objectStore.put(&quot;boq&quot;, &quot;foq&quot;);
+    objectStore.put(&quot;bor&quot;, &quot;for&quot;);
+    objectStore.put(&quot;bos&quot;, &quot;fos&quot;);
+    
+    for (var i = 0; i &lt; 100; ++i)
+        objectStore.put(&quot;number &quot; + i, i);
+
+    objectStore.put(&quot;date 1&quot;, date1);
+    objectStore.put(&quot;date 2&quot;, date2);
+    objectStore.put(&quot;date 3&quot;, date3);
+    objectStore.put(&quot;date 4&quot;, date4);
+    objectStore.put(&quot;date 5&quot;, date5);
+    objectStore.put(&quot;date 6&quot;, date6);
+    objectStore.put(&quot;date 7&quot;, date7);
+    objectStore.put(&quot;date 8&quot;, date8);
+
+    logCount();
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{   
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // The pairs of things in the array are the things to delete followed by the expected decrease in the total count of objects.
+    var thingsToDelete = [
+        date8, 1,
+        date8, 0, 
+        &quot;balyhoo&quot;, 0, 
+        IDBKeyRange.bound(date6, date7, true, true), 0,
+        IDBKeyRange.bound(date6, date7, true), 1,
+        IDBKeyRange.bound(date5, date6, false, true), 1,
+        IDBKeyRange.bound(date1, date6), 5,
+        IDBKeyRange.bound(1, 98), 98, 
+        IDBKeyRange.bound(&quot;foo&quot;, &quot;fos&quot;, true, true), 3
+    ];
+    var currentThing = 0;
+    
+    var runDeleteTests = function()
+    {
+        if (!thingsToDelete[currentThing])
+            return;
+        
+        objectStore.delete(thingsToDelete[currentThing]).onsuccess = function() {
+            debug(&quot;Deleted \&quot;&quot; + thingsToDelete[currentThing] + &quot;\&quot;, and there should now be &quot; + thingsToDelete[currentThing + 1] + &quot; less things total.&quot;);
+            logCount();
+            currentThing += 2;
+            runDeleteTests();
+        }
+    }
+    runDeleteTests();
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredelete2jsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoredelete2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,111 @@
</span><ins>+description(&quot;This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+function logCount()
+{
+    var req = objectStore.count();
+    req.onsuccess = function() { 
+        debug(&quot;Count is &quot; + req.result);
+    }
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDelete2Database&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    database.createObjectStore(&quot;TestObjectStore&quot;).put(&quot;bar&quot;, &quot;foo&quot;);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{   
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    transaction.objectStore(&quot;TestObjectStore&quot;).delete(&quot;foo&quot;).onsuccess = function()
+    {
+        var request = transaction.objectStore(&quot;TestObjectStore&quot;).get(&quot;foo&quot;);
+        request.onsuccess = function()
+        {
+            debug(&quot;After delete, record for \&quot;foo\&quot; has value: &quot; + request.result);
+            transaction.abort();
+        }
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction aborted&quot;);
+        continueTest2();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+function continueTest2()
+{   
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+
+    var request = transaction.objectStore(&quot;TestObjectStore&quot;).get(&quot;foo&quot;);
+    request.onsuccess = function()
+    {
+        debug(&quot;Record for \&quot;foo\&quot; has final value: &quot; + request.result);
+    }
+
+    transaction.onabort = function(event)
+    {
+        debug(&quot;readonly transaction unexpected abort&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event)
+    {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event)
+    {
+        debug(&quot;readonly transaction unexpected error&quot;);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoredeletefailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoredeletefailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,117 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.delete().&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreDeleteFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.delete(NaN);
+        } catch(e) {
+            debug(&quot;Failed to delete record from object store with an invalid key&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.delete(&quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;Failed to delete record from object store that has been deleted&quot;);
+        } 
+
+        // Recreate the objectstore because we'll need it in phase 2.
+        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+    try {
+        objectStore.delete(&quot;foo&quot;);
+    } catch(e) {
+        debug(&quot;Failed to delete a record in read-only transaction&quot;);
+    }
+    
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var testWhileInactive = function() {
+        try {
+            objectStore.delete(&quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;Failed to delete record with inactive transaction&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(testWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoregetfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoregetfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-get-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-get-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-get-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.get().&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStoreGetFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.get(NaN);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to get record from object store with an invalid key&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.get(&quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to get record from object store that has been deleted&quot;);
+        } 
+
+        // Recreate the objectstore because we'll need it in phase 2.
+        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var getWhileInactive = function() {
+        try {
+            objectStore.get(&quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to get record from object store while the transaction is inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(getWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbobjectstoreputandclearfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernidbobjectstoreputandclearfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().&quot;);
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBObjectStorePutAndClearFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.put(&quot;bar&quot;, NaN);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to put record into object store with an invalid key&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to put record into object store that has been deleted&quot;);
+        } 
+
+        try {
+            objectStore.clear();
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to clear object store that has been deleted&quot;);
+        } 
+
+        // Recreate the objectstore because we'll need it in phase 2.
+        var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        objectStore.put(&quot;bar&quot;, &quot;foo&quot;);    
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    
+    try {
+        objectStore.clear();
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Failed to clear object store in read-only transaction&quot;);
+    }
+    
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var testWhileInactive = function() {
+        try {
+            objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to put record into object store with inactive transaction&quot;);
+        }
+        
+        try {
+            objectStore.clear();
+        } catch(e) {
+            debug(&quot;ALERT: &quot; + &quot;Failed to clear object store with inactive transaction&quot;);
+        }
+        
+        canFinish = true;
+    }
+    
+    setTimeout(testWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesidbtransactionobjectstorefailuresjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling transaction.objectStore()&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open(&quot;TransactionObjectStoreFailuresTestDatabase&quot;);
+
+function done()
+{
+    finishJSTest();
+}
+
+request.onupgradeneeded = function(event)
+{
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+    var tx = request.transaction;
+    var db = event.target.result;
+
+    debug(&quot;ALERT: &quot; + tx + &quot; - &quot; + tx.mode);
+    debug(&quot;ALERT: &quot; + db);
+
+    var os1 = db.createObjectStore(&quot;TestObjectStore1&quot;);
+    var os2 = db.createObjectStore(&quot;TestObjectStore2&quot;);
+
+    var putRequest = os1.put(&quot;bar&quot;, &quot;foo&quot;);
+    
+    putRequest.onerror = function() {
+        debug(&quot;ALERT: &quot; + &quot;put failed (because transaction was aborted)&quot;);
+    }
+    
+    try {
+        tx.objectStore(&quot;&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Caught attempt to access empty-named object store on the transaction&quot;);
+    }
+    
+    try {
+        tx.objectStore();
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Caught attempt to access null-named object store on the transaction&quot;);
+    }
+     
+    try {
+        tx.objectStore(&quot;ThisObjectStoreDoesNotExist&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Caught attempt to access non-existant object store on the transaction&quot;);
+    }
+    
+    tx.abort();
+    
+    try {
+        tx.objectStore(&quot;TestObjectStore1&quot;);
+    } catch(e) {
+        debug(&quot;ALERT: &quot; + &quot;Caught attempt to access valid object store on a transaction that is already finishing&quot;);
+    }
+      
+    tx.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction abort&quot;);
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction unexpected complete&quot;);
+        done();
+    }
+
+    tx.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;First version change transaction unexpected error - &quot; + event);
+        done();
+    }
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindex1jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindex1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,101 @@
</span><ins>+description(&quot;This tests the expected values from some more complex index situations.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Index1Database&quot;, 1);
+
+function checkKey(index, key)
+{
+    var request1 = index.get(key);
+    var request2 = index.getKey(key);
+
+    request1.onsuccess = function() {
+        debug(&quot;get \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request1.result);
+        for (n in request1.result)
+            debug(n + &quot; is &quot; + request1.result[n]);
+    }
+    request2.onsuccess = function() {
+        debug(&quot;getKey \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request2.result);
+        for (n in request2.result)
+            debug(n + &quot; is &quot; + request2.result[n]);
+    } 
+}
+
+function checkIndex(index)
+{
+    checkKey(index, &quot;good&quot;);
+    checkKey(index, &quot;bad&quot;);
+    checkKey(index, &quot;ok&quot;);
+    checkKey(index, &quot;meh&quot;);
+    checkKey(index, &quot;super&quot;);
+    checkKey(index, &quot;thanksForAsking&quot;);
+    checkKey(index, [ &quot;good&quot;, &quot;bad&quot; ]);
+    checkKey(index, [ &quot;ok&quot;, &quot;meh&quot; ]);
+    checkKey(index, [ &quot;super&quot;, &quot;thanksForAsking&quot; ]);
+    checkKey(index, &quot;This is to test&quot;);
+    checkKey(index, &quot;multiEntry indexes&quot;);
+    checkKey(index, [&quot;This is to test&quot;, &quot;multiEntry indexes&quot; ]);
+    
+    var request = index.count();
+    request.onsuccess = function() {
+        debug(&quot;count result is: &quot; + request.result);
+        debug(&quot;&quot;);
+    }
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    var index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
+    var index3 = objectStore.createIndex(&quot;TestIndex3&quot;, [ &quot;bar&quot;, &quot;baz&quot; ]);
+    var index4 = objectStore.createIndex(&quot;TestIndex4&quot;, &quot;bar&quot;, { multiEntry: true });
+
+    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
+    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 2);
+    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 3);
+    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 4);
+    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 5);
+    objectStore.put({ bar: &quot;ok&quot;, baz: &quot;meh&quot; }, 6);
+    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 7);
+    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 8);
+    objectStore.put({ bar: &quot;super&quot;, baz: &quot;thanksForAsking&quot; }, 9);
+    objectStore.put({ bar: [ &quot;This is to test&quot;, &quot;multiEntry indexes&quot; ]}, 10);
+    
+    checkIndex(index1);
+    checkIndex(index2);
+    checkIndex(index3);
+    checkIndex(index4);
+  
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindex2jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindex2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,160 @@
</span><ins>+description(&quot;This tests indexes are left in appropriate states after aborted transactions.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Index2Database&quot;, 1);
+
+function checkKey(index, key)
+{
+    var request1 = index.get(key);
+    var request2 = index.getKey(key);
+
+    request1.onsuccess = function() {
+        debug(&quot;get \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request1.result);
+        for (n in request1.result)
+            debug(n + &quot; is &quot; + request1.result[n]);
+    }
+    request2.onsuccess = function() {
+        debug(&quot;getKey \&quot;&quot; + key + &quot;\&quot; result is: &quot; + request2.result);
+        for (n in request2.result)
+            debug(n + &quot; is &quot; + request2.result[n]);
+    } 
+}
+
+function checkIndex(index)
+{
+    checkKey(index, &quot;good&quot;);
+    checkKey(index, &quot;bad&quot;);
+    checkKey(index, &quot;multiEntry&quot;);
+    checkKey(index, &quot;test&quot;);
+    
+    var request = index.count();
+    request.onsuccess = function() {
+        debug(&quot;count result is: &quot; + request.result);
+        debug(&quot;&quot;);
+    }
+}
+
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    var index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
+    var index3 = objectStore.createIndex(&quot;TestIndex3&quot;, &quot;bar&quot;, { multiEntry: true });
+
+    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
+    objectStore.put({ bar: [ &quot;multiEntry&quot;, &quot;test&quot; ]}, 2);
+    
+    checkIndex(index1);
+    checkIndex(index2);
+    checkIndex(index3);
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected abort&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{   
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var index1 = objectStore.index(&quot;TestIndex1&quot;);
+    var index2 = objectStore.index(&quot;TestIndex2&quot;);
+    var index3 = objectStore.index(&quot;TestIndex3&quot;);
+    
+    objectStore.delete(1).onsuccess = function() {
+       debug(&quot;Deleted key 1 from objectstore&quot;);
+       debug(&quot;&quot;);
+    }
+
+    checkIndex(index1);
+    checkIndex(index2);
+    checkIndex(index3);
+
+    objectStore.clear().onsuccess = function() {
+       debug(&quot;Cleared objectstore&quot;);
+       debug(&quot;&quot;);
+    }
+    
+    checkIndex(index1);
+    checkIndex(index2);
+    checkIndex(index3);
+    
+    objectStore.get(0).onsuccess = function() {
+        debug(&quot;All done. Moving on to final part&quot;);
+        transaction.abort();
+    }
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction aborted&quot;);
+        continueTest2();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction unexpected complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+function continueTest2()
+{   
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var index1 = objectStore.index(&quot;TestIndex1&quot;);
+    var index2 = objectStore.index(&quot;TestIndex2&quot;);
+    var index3 = objectStore.index(&quot;TestIndex3&quot;);
+    
+    checkIndex(index1);
+    checkIndex(index2);
+    checkIndex(index3);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readwrite transaction unexpected abort&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readwrite transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readwrite transaction unexpected error&quot;);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindex3jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindex3html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-3.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-3.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-3.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-3.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+description(&quot;This test exercises the \&quot;unique\&quot; constraint of indexes.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;Index3Database&quot;, 1);
+var objectStore;
+
+function checkObjectStore()
+{
+    var req1 = objectStore.get(1);
+    req1.onsuccess = function() {
+        debug(&quot;Value of 1 is: &quot; + req1.result);
+    }
+    var req2 = objectStore.get(2);
+    req2.onsuccess = function() {
+        debug(&quot;Value of 2 is: &quot; + req2.result);
+    }
+    var req3 = objectStore.get(3);
+    req3.onsuccess = function() {
+        debug(&quot;Value of 3 is: &quot; + req3.result);
+    }
+}
+
+function checkIndex(index, name)
+{
+    var req = index.count();
+    req.onsuccess = function() {
+        debug(&quot;Count in index &quot; + name + &quot; is: &quot; + req.result);
+    }
+}
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var i1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;, { unique: true });
+    var i2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;bar&quot;, { multiEntry: true, unique: true });
+
+    var request1 = objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 1);
+    request1.onsuccess = function() {
+        debug(&quot;First put success&quot;);
+    }
+    request1.onerror = function() {
+        debug(&quot;First put unexpected failure&quot;);
+        done();
+    }
+    
+    checkObjectStore();
+    checkIndex(i1, 1);
+    checkIndex(i2, 2);
+    
+    var request2 = objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, 2);
+    request2.onsuccess = function() {
+        debug(&quot;Second put unexpected success&quot;);
+        done();
+    }
+    request2.onerror = function(e) {
+        debug(&quot;Second put failure&quot;);
+        e.stopPropagation();
+        e.preventDefault();
+    }
+    
+    checkObjectStore();
+    checkIndex(i1, 1);
+    checkIndex(i2, 2);
+    
+    var request3 = objectStore.put({ bar: [ &quot;gnarly&quot;, &quot;great&quot;, &quot;good&quot; ]}, 3);
+    request3.onsuccess = function() {
+        debug(&quot;Third put unexpected success&quot;);
+        done();
+    }
+    request3.onerror = function(e) {
+        debug(&quot;Third put failure&quot;);
+        e.stopPropagation();
+        e.preventDefault();
+    }
+    
+    checkObjectStore();
+    checkIndex(i1, 1);
+    checkIndex(i2, 2);
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindex4jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindex4html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-4.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-4.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-4.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-4.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+description(&quot;This tests that indexes added to an object store with existing records are populated upon their creation.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var index;
+var objectStore;
+
+function checkIndexValues()
+{
+    var countRequest = index.count();
+    countRequest.onsuccess = function() {
+        debug(&quot;Count is: &quot; + countRequest.result);
+    }
+
+    var cursorRequest = index.openCursor();
+    cursorRequest.onsuccess = function() {
+        var cursor = cursorRequest.result;
+        if (!cursor) {
+            done();
+            return;
+        }
+        debug(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
+        cursor.continue();
+
+    }
+    cursorRequest.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(cursorRequest.result);
+        done();
+    } 
+}
+
+var createRequest = window.indexedDB.open(&quot;Index4Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put({ bar: &quot;A&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot; }, 2);
+    objectStore.put({ bar: &quot;B&quot; }, 3);
+    objectStore.put({ bar: &quot;B&quot; }, 4);
+    objectStore.put({ bar: &quot;C&quot; }, 5);
+    objectStore.put({ bar: &quot;C&quot; }, 6);
+    objectStore.put({ bar: &quot;D&quot; }, 7);
+    objectStore.put({ bar: &quot;D&quot; }, 8);
+    objectStore.put({ bar: &quot;E&quot; }, 9);
+    objectStore.put({ bar: &quot;E&quot; }, 10);
+    objectStore.put({ bar: &quot;F&quot; }, 11);
+    objectStore.put({ bar: &quot;F&quot; }, 12);
+    objectStore.put({ bar: &quot;G&quot; }, 13);
+    objectStore.put({ bar: &quot;G&quot; }, 14);    
+    objectStore.put({ bar: &quot;H&quot; }, 15);
+    objectStore.put({ bar: &quot;H&quot; }, 16);  
+    objectStore.put({ bar: &quot;I&quot; }, 17);
+    objectStore.put({ bar: &quot;I&quot; }, 18);  
+
+    // This index should be populated with the above values upon its creation.
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    
+    checkIndexValues();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindex5jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindex5html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-5.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-5.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-5.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-5.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+description(&quot;This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index. (The index creation should fail).&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var index;
+var objectStore;
+
+function checkIndexValues()
+{
+    var countRequest = index.count();
+    countRequest.onsuccess = function() {
+        debug(&quot;Count is: &quot; + countRequest.result);
+    }
+    countRequest.onerror = function(e) {
+        debug(&quot;Error getting cursor count&quot;);
+        e.stopPropagation();
+    }
+
+    var cursorRequest = index.openCursor();
+    cursorRequest.onsuccess = function() {
+        var cursor = cursorRequest.result;
+        debug(&quot;Cursor at record: &quot; + cursor.key + &quot; / &quot; + cursor.primaryKey);
+        
+        if (cursor.key != undefined)
+            cursor.continue();
+        else
+            done();
+    }
+    cursorRequest.onerror = function(e) {
+        debug(&quot;Error opening or iterating cursor&quot;);
+        e.stopPropagation();
+    } 
+}
+
+var createRequest = window.indexedDB.open(&quot;Index5Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    objectStore.put({ bar: &quot;A&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot; }, 2);
+
+    // This index should be populated with the above values upon its creation, but that should fail because
+    // of constraint violations.
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;, { unique: true });
+    
+    checkIndexValues();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor1jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindexcursor1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+description(&quot;This tests cursors that iterate over entire indexes.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source.name);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
+    debug(&quot;Cursor value is: &quot; + cursor.value);  
+}
+
+function setupRequest(request)
+{
+    request.onsuccess = function() {
+        if (!request.result) {
+            startNextCursor();
+            return;
+        }
+        debug(&quot;Success opening or iterating cursor&quot;);
+        logCursor(request.result);  
+        request.result.continue();
+    }
+    request.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(request.result);
+        done();
+    } 
+}
+
+function testCursorDirection(index, direction)
+{
+    var range = IDBKeyRange.lowerBound(-Infinity);
+    var request = index.openCursor(range, direction);
+    setupRequest(request);
+}
+
+var index1;
+var index2;
+
+var cursorCommands = [
+    &quot;testCursorDirection(index2, 'prevunique')&quot;,
+    &quot;testCursorDirection(index1, 'prevunique')&quot;,
+    &quot;testCursorDirection(index2, 'prev')&quot;,
+    &quot;testCursorDirection(index1, 'prev')&quot;,
+    &quot;testCursorDirection(index2, 'nextunique')&quot;,
+    &quot;testCursorDirection(index1, 'nextunique')&quot;,
+    &quot;testCursorDirection(index2, 'next')&quot;,
+    &quot;testCursorDirection(index1, 'next')&quot;,
+];
+
+function startNextCursor()
+{
+    if (!cursorCommands.length) {
+        done();
+        return;
+    }
+    
+    var command = cursorCommands.pop();
+    log (&quot;&quot;);
+    debug(&quot;Starting a new cursor: &quot; + command);
+    eval(command);
+}
+    
+var createRequest = window.indexedDB.open(&quot;IndexCursor1Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index1 = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    index2 = objectStore.createIndex(&quot;TestIndex2&quot;, &quot;baz&quot;);
+
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 3);
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 2);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 5);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 6);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 4);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 7);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 9);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 8);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 11);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 12);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 10);
+
+    var req1 = index1.count();
+    req1.onsuccess = function() {
+        debug(&quot;TestIndex1 count is: &quot; + req1.result);
+    }
+
+    var req2 = index2.count();
+    req2.onsuccess = function() {
+        debug(&quot;TestIndex2 count is: &quot; + req2.result);
+    }
+    
+    startNextCursor();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor2jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindexcursor2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,133 @@
</span><ins>+description(&quot;This tests cursors that iterate over parts of indexes.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source.name);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
+    debug(&quot;Cursor value is: &quot; + cursor.value);  
+}
+
+function setupRequest(request)
+{
+    request.onsuccess = function() {
+        if (!request.result) {
+            startNextCursor();
+            return;
+        }
+        debug(&quot;Success opening or iterating cursor&quot;);
+        logCursor(request.result);  
+        request.result.continue();
+    }
+    request.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(request.result);
+        done();
+    } 
+}
+
+var index;
+
+function testCursorDirection(direction, range)
+{
+    var request = index.openCursor(range, direction);
+    setupRequest(request);
+}
+
+var cursorCommands = [
+    &quot;testCursorDirection('prevunique', IDBKeyRange.only('B'))&quot;,
+    &quot;testCursorDirection('prev', IDBKeyRange.only('B'))&quot;,
+    &quot;testCursorDirection('nextunique', IDBKeyRange.only('B'))&quot;,
+    &quot;testCursorDirection('next', IDBKeyRange.only('B'))&quot;,
+    &quot;testCursorDirection('prevunique', IDBKeyRange.lowerBound('C'))&quot;,
+    &quot;testCursorDirection('prev', IDBKeyRange.lowerBound('C'))&quot;,
+    &quot;testCursorDirection('nextunique', IDBKeyRange.lowerBound('C'))&quot;,
+    &quot;testCursorDirection('next', IDBKeyRange.lowerBound('C'))&quot;,
+    &quot;testCursorDirection('prevunique', IDBKeyRange.upperBound('B'))&quot;,
+    &quot;testCursorDirection('prev', IDBKeyRange.upperBound('B'))&quot;,
+    &quot;testCursorDirection('nextunique', IDBKeyRange.upperBound('B'))&quot;,
+    &quot;testCursorDirection('next', IDBKeyRange.upperBound('B'))&quot;,
+    &quot;testCursorDirection('prevunique', IDBKeyRange.bound('B', 'C'))&quot;,
+    &quot;testCursorDirection('prev', IDBKeyRange.bound('B', 'C'))&quot;,
+    &quot;testCursorDirection('nextunique', IDBKeyRange.bound('B', 'C'))&quot;,
+    &quot;testCursorDirection('next', IDBKeyRange.bound('B', 'C'))&quot;,
+    &quot;testCursorDirection('prevunique', IDBKeyRange.bound('B', 'D', true, true))&quot;,
+    &quot;testCursorDirection('prev', IDBKeyRange.bound('B', 'D', true, true))&quot;,
+    &quot;testCursorDirection('nextunique', IDBKeyRange.bound('B', 'D', true, true))&quot;,
+    &quot;testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))&quot;,
+];
+
+function startNextCursor()
+{
+    if (!cursorCommands.length) {
+        done();
+        return;
+    }
+
+    var command = cursorCommands.pop();
+    log (&quot;&quot;);
+    debug(&quot;Starting a new cursor: &quot; + command);
+    eval(command);
+}
+    
+var createRequest = window.indexedDB.open(&quot;IndexCursor2Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 3);
+    objectStore.put({ bar: &quot;A&quot;, baz: &quot;a&quot; }, 2);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 5);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 6);
+    objectStore.put({ bar: &quot;B&quot;, baz: &quot;b&quot; }, 4);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 7);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 9);
+    objectStore.put({ bar: &quot;C&quot;, baz: &quot;c&quot; }, 8);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 11);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 12);
+    objectStore.put({ bar: &quot;D&quot;, baz: &quot;d&quot; }, 10);
+
+    var req = index.count();
+    req.onsuccess = function() {
+        debug(&quot;TestIndex1 count is: &quot; + req.result);
+    }
+
+    startNextCursor();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindexcursor3jsfromrev195319trunkLayoutTestsstorageindexeddbmodernindexcursor3html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-3.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-3.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-cursor-3.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,172 @@
</span><ins>+description(&quot;This tests that index cursors properly handle changing indexes.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var index;
+var objectStore;
+
+function logCursor(cursor)
+{
+    debug(&quot;Cursor direction is: &quot; + cursor.direction);
+    debug(&quot;Cursor source is: &quot; + cursor.source.name);    
+    debug(&quot;Cursor key is: &quot; + cursor.key);    
+    debug(&quot;Cursor primary key is: &quot; + cursor.primaryKey);
+    debug(&quot;Cursor value is: &quot; + cursor.value);  
+}
+
+function setupRequest(request)
+{
+    request.onsuccess = function() {
+        debug(&quot;Success opening or iterating cursor&quot;);
+        if (request.result)
+            logCursor(request.result);
+
+        if (request.result &amp;&amp; request.iteratedOnce) {
+            var primaryKey = request.result.primaryKey;
+            if (primaryKey) {
+                objectStore.delete(primaryKey).onsuccess = function() {
+                    debug(&quot;Deleted key &quot; + primaryKey + &quot; from object store&quot;);
+                }
+                var nextPrimaryKey = primaryKey;
+                if (request.result.direction.startsWith(&quot;next&quot;)) {
+                    nextPrimaryKey++;
+                    if (nextPrimaryKey &gt; 18)
+                        nextPrimaryKey = 0;
+                } else
+                    nextPrimaryKey--;
+
+                if (nextPrimaryKey &gt; 0) {
+                    objectStore.delete(nextPrimaryKey).onsuccess = function() {
+                        debug(&quot;Deleted key &quot; + nextPrimaryKey + &quot; from object store&quot;);
+                    }
+                }
+                
+                // Delete an additional item for unique cursors to make sure they iterate deeper into the sets
+                // of primary keys and/or skip some index keys altogether.
+                if (request.result.direction.endsWith(&quot;unique&quot;)) {                
+                    var nextNextPrimaryKey = nextPrimaryKey;
+                    if (request.result.direction.startsWith(&quot;next&quot;)) {
+                        nextNextPrimaryKey++;
+                        if (nextNextPrimaryKey &gt; 18)
+                            nextNextPrimaryKey = 0;
+                    } else
+                        nextNextPrimaryKey--;
+
+                    if (nextNextPrimaryKey &gt; 0) {
+                        objectStore.delete(nextNextPrimaryKey).onsuccess = function() {
+                            debug(&quot;Deleted key &quot; + nextNextPrimaryKey + &quot; from object store&quot;);
+                        }
+                    }
+                }
+            }
+        }
+     
+        request.iteratedOnce = true;
+
+        if (request.result)
+            request.result.continue();
+        else
+            startNextCursor();
+    }
+    request.onerror = function(e) {
+        debug(&quot;Unexpected error opening or iterating cursor&quot;);
+        logCursor(request.result);
+        done();
+    } 
+}
+
+function testCursorDirection(index, direction)
+{
+    var range = IDBKeyRange.lowerBound(-Infinity);
+    var request = index.openCursor(range, direction);
+    setupRequest(request);
+}
+
+var cursorCommands = [
+    &quot;testCursorDirection(index, 'prevunique')&quot;,
+    &quot;testCursorDirection(index, 'nextunique')&quot;,
+    &quot;testCursorDirection(index, 'prev')&quot;,
+    &quot;testCursorDirection(index, 'next')&quot;,
+];
+
+function startNextCursor()
+{
+    if (!cursorCommands.length) {
+        done();
+        return;
+    }
+    
+    populateObjectStore();
+
+    var command = cursorCommands.pop();
+    debug(&quot;Starting a new cursor: &quot; + command);
+    var req = index.count();
+    req.onsuccess = function() {
+        debug(&quot;TestIndex1 count is: &quot; + req.result + &quot;&quot;);
+    }
+    
+    eval(command);
+}
+
+function populateObjectStore()
+{
+    objectStore.put({ bar: &quot;A&quot; }, 1);
+    objectStore.put({ bar: &quot;A&quot; }, 2);
+    objectStore.put({ bar: &quot;B&quot; }, 3);
+    objectStore.put({ bar: &quot;B&quot; }, 4);
+    objectStore.put({ bar: &quot;C&quot; }, 5);
+    objectStore.put({ bar: &quot;C&quot; }, 6);
+    objectStore.put({ bar: &quot;D&quot; }, 7);
+    objectStore.put({ bar: &quot;D&quot; }, 8);
+    objectStore.put({ bar: &quot;E&quot; }, 9);
+    objectStore.put({ bar: &quot;E&quot; }, 10);
+    objectStore.put({ bar: &quot;F&quot; }, 11);
+    objectStore.put({ bar: &quot;F&quot; }, 12);
+    objectStore.put({ bar: &quot;G&quot; }, 13);
+    objectStore.put({ bar: &quot;G&quot; }, 14);    
+    objectStore.put({ bar: &quot;H&quot; }, 15);
+    objectStore.put({ bar: &quot;H&quot; }, 16);  
+    objectStore.put({ bar: &quot;I&quot; }, 17);
+    objectStore.put({ bar: &quot;I&quot; }, 18);  
+}
+
+var createRequest = window.indexedDB.open(&quot;IndexCursor3Database&quot;, 1);
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.createIndex(&quot;TestIndex1&quot;, &quot;bar&quot;);
+    
+    startNextCursor();
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindexgetcountbasicjsfromrev195319trunkLayoutTestsstorageindexeddbmodernindexgetcountbasichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-basic.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-get-count-basic.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-basic.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-basic.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+description(&quot;This tests the most basic operation of the IDBIndex methods get(), getKey(), and count().&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IndexGetCountBasicDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
+
+    objectStore.put({ bar: &quot;good&quot;, baz: &quot;bad&quot; }, &quot;foo&quot;);
+    
+    var request1 = index.get(&quot;good&quot;);
+    request1.onsuccess = function() {
+        debug(&quot;get result is: &quot; + request1.result);
+        for (n in request1.result)
+            debug(n + &quot; is &quot; + request1.result[n]);
+    }
+
+    request2 = index.getKey(&quot;good&quot;);
+    request2.onsuccess = function() {
+        debug(&quot;getKey result is: &quot; + request2.result);
+    }
+    
+    var request3 = index.count();
+    request3.onsuccess = function() {
+        debug(&quot;count result is: &quot; + request3.result);
+    }
+        
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesindexgetcountfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernindexgetcountfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/index-get-count-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling the IDBIndex methods get(), getKey(), and count().&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IndexGetCountFailuresDatabase&quot;, 1);
+var database;
+var index;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
+    
+    try {
+        index.get(null);
+    } catch(e) {
+        debug(&quot;Failed to get with a null key&quot;);
+    }
+
+    try {
+        index.getKey(null);
+    } catch(e) {
+        debug(&quot;Failed to getKey with a null key&quot;);
+    }
+
+    try {
+        index.count(null);
+    } catch(e) {
+        debug(&quot;Failed to count with a null range&quot;);
+    }
+    
+    objectStore.deleteIndex(&quot;TestIndex&quot;);
+    
+    try {
+        index.get(&quot;test&quot;);
+    } catch(e) {
+        debug(&quot;Failed to get with deleted IDBIndex&quot;);
+    }
+    
+    try {
+        index.getKey(&quot;test&quot;);
+    } catch(e) {
+        debug(&quot;Failed to getKey with deleted IDBIndex&quot;);
+    }
+    
+    try {
+        index.count();
+    } catch(e) {
+        debug(&quot;Failed to count with deleted IDBIndex&quot;);
+    }
+    
+    try {
+        objectStore.deleteIndex(&quot;TestIndex&quot;);
+    } catch(e) {
+        debug(&quot;Failed to delete a nonexistent IDBIndex&quot;);
+    }
+
+    database.deleteObjectStore(&quot;TestObjectStore&quot;);
+    try {
+        index.get(null);
+    } catch(e) {
+         debug(&quot;Failed to get with deleted IDBObjectStore&quot;);
+    }
+
+    try {
+        index.getKey(null);
+    } catch(e) {
+         debug(&quot;Failed to getKey with deleted IDBObjectStore&quot;);
+    }
+
+    try {
+        index.count(null);
+    } catch(e) {
+         debug(&quot;Failed to count with deleted IDBObjectStore&quot;);
+    }
+
+    var objectStore = database.createObjectStore(&quot;TestObjectStore2&quot;);
+    objectStore.createIndex(&quot;TestIndex&quot;, &quot;foo&quot;);
+        
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore2&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore2&quot;);
+    index = objectStore.index(&quot;TestIndex&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var testWhileInactive = function() {
+        try {
+            index.get(null);
+        } catch(e) {
+             debug(&quot;Failed to get while transaction inactive&quot;);
+        }
+
+        try {
+            index.getKey(null);
+        } catch(e) {
+             debug(&quot;Failed to getKey while transaction inactive&quot;);
+        }
+
+        try {
+            index.count(null);
+        } catch(e) {
+             debug(&quot;Failed to count while transaction inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(testWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourceskeypathbasicjsfromrev195319trunkLayoutTestsstorageindexeddbmodernkeypathbasichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/keypath-basic.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/keypath-basic.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/keypath-basic.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/keypath-basic.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+description(&quot;This test creates some object stores with keypaths. It then puts some values in them. It makes sure the keys used are as expected.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;KeypathBasicTestDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;    
+    var objectStore1 = database.createObjectStore(&quot;OS1&quot;, { keyPath: &quot;foo&quot; });
+    var objectStore2 = database.createObjectStore(&quot;OS2&quot;, { keyPath: &quot;foo.bar&quot; });
+
+    var object = new Object;
+    object.stuff = &quot;bar1&quot;;
+    object.foo = &quot;foo1&quot;;
+        
+    var request1 = objectStore1.put(object);
+    request1.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;object put SUCCESS - &quot; + request1.result);
+    }
+
+    var array = { foo: &quot;foo2&quot;, stuff: &quot;bar2&quot; };
+
+    var request2 = objectStore1.put(array);
+    request2.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;array put SUCCESS - &quot; + request2.result);
+    }
+    
+    object.foo = new Object;
+    object.foo.bar = &quot;baz1&quot;;
+    var request3 = objectStore2.put(object);
+    request3.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second object put SUCCESS - &quot; + request3.result);
+    }
+
+    array.foo = { bar: &quot;baz2&quot; };
+
+    var request4 = objectStore2.put(array);
+    request4.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second array put SUCCESS - &quot; + request4.result);
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesobjectstoreattributesjsfromrev195319trunkLayoutTestsstorageindexeddbmodernobjectstoreattributeshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-attributes.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/objectstore-attributes.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-attributes.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-attributes.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+description(&quot;This test exercises the readonly attributes on an IDBObjectStore.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+var request = window.indexedDB.open(&quot;ObjectStoreAttributesTestDatabase&quot;);
+
+function log(message)
+{
+    debug(message);
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var database;
+
+request.onupgradeneeded = function(event)
+{
+    debug(&quot;First upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    
+    var tx = request.transaction;
+    database = event.target.result;
+
+    debug(tx + &quot; - &quot; + tx.mode);
+    debug(database);
+
+    var os1 = database.createObjectStore('TestObjectStore1', { autoIncrement: true , keyPath: &quot;foo&quot; });
+    var os2 = database.createObjectStore('TestObjectStore2', { autoIncrement: false });
+
+    debug(os1.name);
+    debug(os2.name);
+    debug(os1.autoIncrement);
+    debug(os2.autoIncrement);
+    debug(os1.keyPath);
+    debug(os2.keyPath);
+    debug(os1.transaction);
+    debug(os2.transaction);
+    debug(os1.transaction == tx);
+    debug(os2.transaction == tx);
+    debug(os1.transaction == os2.transaction);
+    
+    os2.createIndex(&quot;Foo index&quot;, &quot;foo&quot;);
+    os2.createIndex(&quot;Bar index&quot;, &quot;bar&quot;);
+    
+    var names = os2.indexNames;
+    debug(&quot;Object store has indexes:&quot;)
+    for (var i = 0; i &lt; names.length; ++i)
+        debug(names[i]);
+    
+    os2.createIndex(&quot;Baz index&quot;, &quot;baz&quot;);
+    debug(&quot;After adding another, object store now has indexes:&quot;);
+    names = os2.indexNames;
+    for (var i = 0; i &lt; names.length; ++i)
+        debug(names[i]);
+    
+    tx.onabort = function(event) {
+        debug(&quot;First version change transaction unexpected abort&quot;);
+        done();
+    }
+
+    tx.oncomplete = function(event) {
+        debug(&quot;First version change transaction completed&quot;);
+        continueTest();
+    }
+
+    tx.onerror = function(event) {
+        debug(&quot;First version change transaction unexpected error - &quot; + event);
+        done();
+    }
+}
+
+function continueTest()
+{
+    var transaction = database.transaction(&quot;TestObjectStore2&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore2&quot;);
+    
+    debug(&quot;In a new transaction, object store has indexes:&quot;);
+    var names = objectStore.indexNames;
+    for (var i = 0; i &lt; names.length; ++i)
+        debug(names[i]);
+
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorecursoradvancefailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernobjectstorecursoradvancefailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,139 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBCursor.advance() on object store cursors.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBAdvanceFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor();
+    request.onsuccess = function() {
+        var cursor = request.result;
+
+        try {
+            cursor.advance();
+        } catch(e) {
+            debug(&quot;Failed to advance object store cursor with undefined count argument&quot;);
+        }
+
+        try {
+            cursor.advance(0);
+        } catch(e) {
+            debug(&quot;Failed to advance object store cursor with '0' count argument&quot;);
+        }
+
+        try {
+            cursor.advance(-1);
+        } catch(e) {
+            debug(&quot;Failed to advance object store cursor with negative count argument&quot;);
+        }
+
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        try {
+            cursor.advance(1);
+        } catch(e) {
+            debug(&quot;Failed to advance object store cursor after deleting object store&quot;);
+        }
+
+        // Recreate the object store for use in the next stage of testing
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        for (var i = 0; i &lt; 10; ++i)
+            objectStore.put(&quot;Record &quot; + i, i);
+    }
+    
+    var os2 = database.createObjectStore(&quot;TestObjectStore2&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        os2.put(&quot;Record &quot; + i, i);
+        
+    var request2 = os2.openCursor();
+    request2.onsuccess = function() {
+        var cursor = request2.result;
+        cursor.continue();
+        try {
+            cursor.advance(1);
+        } catch(e) {
+            debug(&quot;Failed to advance an object store cursor when it is already fetching the next record&quot;);
+        }
+        request2.onsuccess = undefined;
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var cursor = objectStore.openCursor();
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var testWhileInactive = function() {
+        try {
+            cursor.advance(1);
+        } catch(e) {
+            debug(&quot;Failed to advance object store cursor while transaction inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(testWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesobjectstorecursorcontinuefailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernobjectstorecursorcontinuefailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,143 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while calling IDBCursor.continue() on object store cursors.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;IDBContinueFailuresDatabase&quot;, 1);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor();
+    request.onsuccess = function() {
+        var cursor = request.result;
+
+        try {
+            cursor.continue(-1);
+        } catch(e) {
+            debug(&quot;Failed to continue a 'next' object store cursor to a key less than the current key&quot;);
+        }
+
+        try {
+            cursor.continue(NaN);
+        } catch(e) {
+            debug(&quot;Failed to continue object store cursor with invalid key&quot;);
+        }
+
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        try {
+            cursor.continue();
+        } catch(e) {
+            debug(&quot;Failed to continue object store cursor after deleting object store&quot;);
+        }
+
+        // Recreate the object store for use in the next stage of testing
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        for (var i = 0; i &lt; 10; ++i)
+            objectStore.put(&quot;Record &quot; + i, i);
+    }
+    
+    var request2 = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), &quot;prev&quot;);
+    request2.onsuccess = function() {
+        var cursor = request2.result;
+        try {
+            cursor.continue(100);
+        } catch(e) {
+            debug(&quot;Failed to continue a 'prev' object store cursor to a key greater than the current key&quot;);
+        }
+    }
+
+    var os2 = database.createObjectStore(&quot;TestObjectStore2&quot;);
+    for (var i = 0; i &lt; 10; ++i)
+        os2.put(&quot;Record &quot; + i, i);
+        
+    var request3 = os2.openCursor();
+    request3.onsuccess = function() {
+        var cursor = request3.result;
+        cursor.continue();
+        try {
+            cursor.continue();
+        } catch(e) {
+            debug(&quot;Failed to continue an object store cursor when it is already fetching the next record&quot;);
+        }
+        request3.onsuccess = undefined;
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var cursor = objectStore.openCursor();
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var testWhileInactive = function() {
+        try {
+            cursor.continue();
+        } catch(e) {
+            debug(&quot;Failed to continue object store cursor while transaction inactive&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(testWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesopencursorfailuresjsfromrev195319trunkLayoutTestsstorageindexeddbmodernopencursorfailureshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/opencursor-failures.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/opencursor-failures.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/opencursor-failures.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/opencursor-failures.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,183 @@
</span><ins>+description(&quot;This tests some obvious failures that can happen while opening cursors.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;OpenCursorFailuresDatabase&quot;, 1);
+var database;
+var objectStore;
+var index;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
+    var request = objectStore.put({ bar: &quot;bar&quot; }, &quot;foo&quot;);
+
+    request.onsuccess = function() {
+        try {
+            objectStore.openCursor(NaN);
+        } catch(e) {
+            debug(&quot;Failed to open object store cursor with invalid keypath&quot;);
+        }
+        
+        try {
+            objectStore.openCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
+        } catch(e) {
+            debug(&quot;Failed to open object store cursor with invalid direction&quot;);
+        }
+        
+        try {
+            index.openCursor(NaN);
+        } catch(e) {
+            debug(&quot;Failed to open index cursor with invalid keypath&quot;);
+        }
+
+        try {
+            index.openCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
+        } catch(e) {
+            debug(&quot;Failed to open index cursor with invalid direction&quot;);
+        }
+
+        try {
+            index.openKeyCursor(NaN);
+        } catch(e) {
+            debug(&quot;Failed to open index key cursor with invalid keypath&quot;);
+        }
+
+        try {
+            index.openKeyCursor(&quot;foo&quot;, &quot;invalid direction&quot;);
+        } catch(e) {
+            debug(&quot;Failed to open index key cursor with invalid direction&quot;);
+        }
+        
+        database.deleteObjectStore(&quot;TestObjectStore&quot;);
+        
+        try {
+            objectStore.openCursor();
+        } catch(e) {
+            debug(&quot;Failed to open object store cursor on deleted object store&quot;);
+        }
+        
+        try {
+            index.openCursor();
+        } catch(e) {
+            debug(&quot;Failed to open index cursor on deleted object store&quot;);
+        }
+
+        try {
+            index.openKeyCursor();
+        } catch(e) {
+            debug(&quot;Failed to open index key cursor on deleted object store&quot;);
+        }
+        
+        // Recreate the objectstore because we'll need it in phase 2.
+        objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+        index = objectStore.createIndex(&quot;TestIndex&quot;, &quot;bar&quot;);
+        objectStore.put({ bar: &quot;bar&quot; }, &quot;foo&quot;);
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        continueTest1();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+function continueTest1()
+{
+    try {
+        objectStore.openCursor();
+    } catch(e) {
+        debug(&quot;Failed to open object store cursor from completed transaction&quot;);
+    }
+    
+    try {
+        index.openCursor();
+    } catch(e) {
+        debug(&quot;Failed to open index cursor from completed transaction&quot;);
+    }
+
+    try {
+        index.openKeyCursor();
+    } catch(e) {
+        debug(&quot;Failed to open index key cursor from completed transaction&quot;);
+    }
+        
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;);
+    objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    index = objectStore.index(&quot;TestIndex&quot;);
+
+    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
+    var canFinish = false;
+    var spinGet = function() { 
+        objectStore.get(&quot;foo&quot;).onsuccess = function() {
+            if (!canFinish)
+                spinGet();
+        }
+    }
+    spinGet();
+
+    var getWhileInactive = function() {
+        try {
+            objectStore.openCursor();
+        } catch(e) {
+            debug(&quot;Failed to open object store cursor from inactive transaction&quot;);
+        }
+    
+        try {
+            index.openCursor();
+        } catch(e) {
+            debug(&quot;Failed to open index cursor from inactive transaction&quot;);
+        }
+
+        try {
+            index.openKeyCursor();
+        } catch(e) {
+            debug(&quot;Failed to open index key cursor from inactive transaction&quot;);
+        }
+        canFinish = true;
+    }
+    
+    setTimeout(getWhileInactive, 0);
+    
+    transaction.onabort = function(event) {
+        debug(&quot;readonly transaction unexpected abort&quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;readonly transaction complete&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;readonly transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaserequesteventjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request-event.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request-event.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request-event.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+description(&quot;This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+try {
+    window.indexedDB.open(&quot;TestDatabase&quot;, 0);
+} catch (e) {
+    debug(&quot;ALERT: &quot; + &quot;Caught exception &quot; + e);
+}
+
+try {
+    window.indexedDB.open(&quot;TestDatabase&quot;, -1);
+} catch (e) {
+    debug(&quot;ALERT: &quot; + &quot;Caught exception &quot; + e);
+}
+
+var request = window.indexedDB.open(&quot;TestDatabase&quot;);
+debug(&quot;ALERT: &quot; + request);
+
+request.onsuccess = function()
+{
+        debug(&quot;ALERT: &quot; + &quot;success&quot;);
+        done();
+}
+request.onerror = function(e)
+{
+        debug(&quot;ALERT: &quot; + &quot;error &quot; + e);
+        done();
+}
+
+request.onupgradeneeded = function(e)
+{
+    debug(&quot;ALERT: &quot; + &quot;upgradeneeded: old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+        done();
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaserequestjsfromrev195319trunkLayoutTestsstorageindexeddbmodernopendatabaserequesthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-request.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+description(&quot;This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var request = window.indexedDB.open(&quot;TestDatabase&quot;);
+debug(&quot;ALERT: &quot; + request);
+
+request = window.indexedDB.open(&quot;&quot;);
+debug(&quot;ALERT: &quot; + request);
+
+try {
+        var request = window.indexedDB.open();
+} catch (e) {
+        debug(&quot;ALERT: &quot; + e);
+}
+
+try {
+        var request = window.indexedDB.open(&quot;name&quot;, 0);
+} catch (e) {
+        debug(&quot;ALERT: &quot; + e);
+}
+
+done();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesopendatabasesuccessafterversionchangejsfromrev195319trunkLayoutTestsstorageindexeddbmodernopendatabasesuccessafterversionchangehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+description(&quot;This test verifies that: \
+    - Opening a new database results in the onupgradeneeded handler being called on the IDBOpenDBRequest. \
+    - The versionchange transaction representing the upgrade commits successfully. \
+    - After that transaction commits, the onsuccess handler on the original IDBOpenDBRequest is called.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var request = window.indexedDB.open(&quot;OpenDatabaseSuccessAfterVersionChangeDatabase&quot;);
+
+request.onsuccess = function()
+{
+    debug(&quot;Got the onsuccess handler as expected.&quot;);
+        done();
+}
+request.onerror = function(e)
+{
+    debug(&quot;Unexpected onerror handler called&quot;);
+        done();
+}
+
+request.onupgradeneeded = function(e)
+{
+    debug(&quot;upgradeneeded: old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+    debug(request.transaction);
+    
+    request.transaction.oncomplete = function()
+    {
+        debug(&quot;Version change complete&quot;);
+    }
+    
+    request.transaction.onabort = function()
+    {
+        debug(&quot;Version change unexpected abort&quot;);
+        done();
+    }
+    
+    request.transaction.onerror = function()
+    {
+        debug(&quot;Version change unexpected error&quot;);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesopendatabaseversionsjsfromrev195319trunkLayoutTestsstorageindexeddbmodernopendatabaseversionshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-versions.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/opendatabase-versions.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-versions.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/opendatabase-versions.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,138 @@
</span><ins>+description(&quot;This test creates a new database with the default version, commits that versionchange transaction, and then reopens it at different versions to make sure the IDBOpenDBRequests behave appropriately.&quot;);
+
+
+
+function log(msg)
+{
+    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&quot;;
+}
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;);
+debug(request + &quot; (firstPhase)&quot;);
+
+request.onsuccess = function()
+{
+    debug(&quot;First version change successful&quot;);
+}
+request.onerror = function(e)
+{
+    debug(&quot;Open request error (firstPhase) &quot; + request.error.name);
+}
+
+request.onupgradeneeded = function(e)
+{
+    var database = event.target.result;
+
+    debug(&quot;upgradeneeded (firstPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+    debug(request.transaction);
+    request.transaction.oncomplete = function()
+    {
+        debug(&quot;Version change complete (firstPhase). Database version is now - &quot; + database.version);
+        database.close();
+        secondPhase();
+    }
+    request.transaction.onabort = function()
+    {
+        debug(&quot;Version change transaction unexpected abort! (firstPhase)&quot;);
+        done();
+    }
+    request.transaction.onerror = function()
+    {
+        debug(&quot;Version change transaction unexpected error! (firstPhase)&quot;);
+        done();
+    }
+}
+
+function secondPhase()
+{
+    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 1);
+    debug(request + &quot; (secondPhase)&quot;);
+    request.onsuccess = function()
+    {
+        debug(&quot;Successfully opened database at version 1 (secondPhase)&quot;);
+        request.result.close();
+        request.result.close(); // Close it twice just for the heck of it
+        thirdPhase();
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;Unexpected error (secondPhase)&quot; + e);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+            debug(&quot;Unexpected upgrade needed (secondPhase)&quot; + e);
+            done();
+    }
+}
+
+function thirdPhase()
+{
+    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 2);
+    debug(request + &quot; (thirdPhase)&quot;);
+    request.onsuccess = function()
+    {
+        debug(&quot;Version change to version 2 successful&quot;);
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;Open request error (thirdPhase) &quot; + request.error.name);
+    }
+    request.onupgradeneeded = function(e)
+    {
+        var database = event.target.result;
+
+        debug(&quot;upgradeneeded (thirdPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+        debug(request.transaction);
+        request.transaction.oncomplete = function()
+        {
+            debug(&quot;Version change complete (thirdPhase). Database version is now - &quot; + database.version);
+            database.close();
+            fourthPhase();
+        }
+        request.transaction.onabort = function()
+        {
+            debug(&quot;Version change transaction unexpected abort! (thirdPhase)&quot;);
+            done();
+        }
+        request.transaction.onerror = function()
+        {
+            debug(&quot;Version change transaction unexpected error! (thirdPhase)&quot;);
+            done();
+        }
+    } 
+}
+
+function fourthPhase()
+{
+    // We've upgraded to version 2, so version 1 should not be openable.
+    var request = window.indexedDB.open(&quot;VersionTestDatabase&quot;, 1);
+    debug(request + &quot; (fourthPhase)&quot;);
+    request.onsuccess = function()
+    {
+        debug(&quot;Unexpected success (fourthPhase)&quot;);
+        done();
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;Expected error (fourthPhase) - &quot; + request.error.name);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+        debug(&quot;Unexpected upgradeneeded (fourthPhase)&quot;);
+        done();
+    } 
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesrequestreadystatejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/request-readystate.js (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/request-readystate.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/request-readystate.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+description(&quot;This test makes sure that IDBRequest.readyState returns expected values.&quot;);
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+function log(message)
+{
+    debug(message);
+}
+
+var createRequest = window.indexedDB.open(&quot;RequestReadyStateDatabase&quot;, 1);
+debug(&quot;After calling indexedDB.open(), create request readyState is: &quot; + createRequest.readyState);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    debug(&quot;Create request readyState is: &quot; + createRequest.readyState);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+
+    for (var i = 0; i &lt; 2; ++i)
+        objectStore.put(&quot;Record &quot; + i, i);
+    
+    var request = objectStore.openCursor();
+    debug(&quot;After calling openCursor, request readyState is: &quot; + request.readyState);
+    request.onsuccess = function() {
+        debug(&quot;After successful opening of the cursor, request readyState is: &quot; + request.readyState);
+
+        request.onsuccess = function() {
+            debug(&quot;After continue() completed, request readyState is: &quot; + request.readyState);
+        }
+
+        request.result.continue();
+        debug(&quot;After calling continue(), request readyState is: &quot; + request.readyState);
+    }
+          
+    versionTransaction.onabort = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;Initial upgrade versionchange transaction unexpected error&quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler1jsfromrev195319trunkLayoutTestsstorageindexeddbmoderntransactionscheduler1html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-1.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-1.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-1.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+description(&quot;This test makes sure that two read-only transactions to an object store are active at the same time.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put FAILED - &quot; + event);
+        done();
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+function continueTest()
+{
+    var request1 = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;, 1);
+    var request2 = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;, 1);
+
+    setupRequest(request1, &quot;request 1&quot;);
+    setupRequest(request2, &quot;request 2&quot;);
+}
+
+function setupRequest(request, reqName)
+{
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - &quot; + reqName);
+        var database = event.target.result;
+    
+        startTransactionLoop(event.target.result.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
+    }
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected error - &quot; + reqName + &quot; - &quot; + event);
+        done();
+    }
+    request.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected blocked - &quot; + reqName + &quot; - &quot; + event);
+        done();
+    }
+    request.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected upgradeneeded - &quot; + reqName + &quot; - &quot; + event);
+        done();
+    } 
+}
+
+var numberOfOpenTransactions = 0;
+
+function startTransactionLoop(transaction, isFirstTime)
+{
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.get(&quot;bar&quot;);
+    
+    request.onsuccess = function(event) {
+        if (isFirstTime)
+            numberOfOpenTransactions++;
+        
+        if (numberOfOpenTransactions == 2) {
+            debug(&quot;ALERT: &quot; + &quot;Two transactions open at once. Yay.&quot;);
+            done();
+        }
+        startTransactionLoop(event.target.transaction, false);
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected request error - &quot; + event);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction complete - &quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler2jsfromrev195319trunkLayoutTestsstorageindexeddbmoderntransactionscheduler2html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-2.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-2.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-2.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+description(&quot;This test makes sure that two read-only transactions to two different object stores are active at the same time.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;OS1&quot;);
+    var request = objectStore.put(&quot;foo1&quot;, &quot;bar1&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put1 FAILED - &quot; + event);
+        done();
+    }
+    
+    objectStore = database.createObjectStore(&quot;OS2&quot;);
+    request = objectStore.put(&quot;foo2&quot;, &quot;bar2&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put2 FAILED - &quot; + event);
+        done();
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+function continueTest()
+{
+    var request1 = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;, 1);
+    var request2 = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;, 1);
+
+    setupRequest(request1, &quot;OS1&quot;);
+    setupRequest(request2, &quot;OS2&quot;);
+}
+
+function setupRequest(request, osname)
+{
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting transaction to ObjectStore &quot; + osname);
+        startTransactionLoop(event.target.result.transaction(osname, &quot;readonly&quot;), osname, true);
+    }
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected error - &quot; + osname + &quot; - &quot; + event);
+        done();
+    }
+    request.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected blocked - &quot; + osname + &quot; - &quot; + event);
+        done();
+    }
+    request.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected upgradeneeded - &quot; + osname + &quot; - &quot; + event);
+        done();
+    } 
+}
+
+var numberOfOpenTransactions = 0;
+
+function startTransactionLoop(transaction, osname, isFirstTime)
+{
+    var objectStore = transaction.objectStore(osname);
+    var request = objectStore.get(&quot;bar&quot;);
+    
+    request.onsuccess = function(event) {
+        if (isFirstTime)
+            numberOfOpenTransactions++;
+        
+        if (numberOfOpenTransactions == 2) {
+            debug(&quot;ALERT: &quot; + &quot;Two transactions open at once. Yay.&quot;);
+            done();
+        }
+        startTransactionLoop(event.target.transaction, osname, false);
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected request error - &quot; + event);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction complete - &quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler3jsfromrev195319trunkLayoutTestsstorageindexeddbmoderntransactionscheduler3html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-3.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-3.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-3.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,139 @@
</span><ins>+description(&quot;This test makes sure that a write transaction is blocked by a read transaction with overlapping scope. It also makes sure the write transaction starts after the read transaction completes.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;TransactionScheduler3Database&quot;);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;OS&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put FAILED - &quot; + event);
+        done();
+    }
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+var secondDatabaseConnection;
+function continueTest()
+{
+    var longRunningReadRequest = window.indexedDB.open(&quot;TransactionScheduler3Database&quot;, 1);
+    longRunningReadRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting readonly transaction&quot;);
+        secondDatabaseConnection = event.target.result;
+        readTransactionLoop(secondDatabaseConnection.transaction(&quot;OS&quot;, &quot;readonly&quot;), true);
+    }
+    longRunningReadRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected error - &quot; + event);
+        done();
+    }
+    longRunningReadRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected blocked - &quot; + event);
+        done();
+    }
+    longRunningReadRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected upgradeneeded - &quot; + event);
+        done();
+    } 
+}
+
+var shouldEndReadTransaction = false;
+
+function readTransactionLoop(transaction, isFirstTime)
+{
+    var objectStore = transaction.objectStore(&quot;OS&quot;);
+    var request = objectStore.get(&quot;foo&quot;);
+    
+    request.onsuccess = function(event) {
+        if (!shouldEndReadTransaction)
+            readTransactionLoop(event.target.transaction, false);
+        
+        // Now that the read transaction is open, the write transaction can be started, but it will be blocked to start with.
+        if (isFirstTime)
+             startWriteTransaction()
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected request error - &quot; + event);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Read transaction complete - &quot; + event);
+    }
+}
+
+function startWriteTransaction()
+{
+    debug(&quot;ALERT: &quot; + &quot;Creating write transaction&quot;);
+    var transaction = secondDatabaseConnection.transaction(&quot;OS&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;OS&quot;);
+    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    setTimeout(&quot;shouldEndReadTransaction = true;&quot;, 0);
+
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction put success&quot;);
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction put unexpected error - &quot; + event);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction unexpected error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction unexpected abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction complete - &quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler5jsfromrev195319trunkLayoutTestsstorageindexeddbmoderntransactionscheduler5html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-5.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-5.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-5.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,164 @@
</span><ins>+description(&quot;This test creates two object stores. \
+It then opens two long running read-only transactions, one per object store. \
+It then opens a read-write transaction to both object stores. \
+The read-only transactions both need to finish before the read-write transaction starts.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;TransactionScheduler5Database&quot;);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;OS1&quot;);
+    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;first put FAILED - &quot; + event);
+        done();
+    }
+
+    objectStore = database.createObjectStore(&quot;OS2&quot;);
+    request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
+    
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;second put FAILED - &quot; + event);
+        done();
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+        database.close();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+var secondDatabaseConnection;
+var readWriteTransaction;
+
+function setupReadTransactionCallbacks(transaction)
+{
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Read transaction complete - &quot; + event);
+    }
+
+    transaction.hasDoneFirstRead = false;
+}
+
+function continueTest()
+{
+    var openDBRequest = window.indexedDB.open(&quot;TransactionScheduler5Database&quot;, 1);
+    openDBRequest.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Success opening database connection - Starting transactions&quot;);
+        secondDatabaseConnection = event.target.result;
+        
+        var transaction1 = secondDatabaseConnection.transaction(&quot;OS1&quot;, &quot;readonly&quot;);
+        setupReadTransactionCallbacks(transaction1);
+        var transaction2 = secondDatabaseConnection.transaction(&quot;OS2&quot;, &quot;readonly&quot;);
+        setupReadTransactionCallbacks(transaction2);
+
+        readTransactionLoop(transaction1, &quot;OS1&quot;, false);
+        readTransactionLoop(transaction2, &quot;OS2&quot;, true);
+    }
+    openDBRequest.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected error - &quot; + event);
+        done();
+    }
+    openDBRequest.onblocked = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected blocked - &quot; + event);
+        done();
+    }
+    openDBRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Long running read request unexpected upgradeneeded - &quot; + event);
+        done();
+    } 
+}
+
+var shouldEndReadTransaction = false;
+
+function readTransactionLoop(transaction, osname, shouldStartWrite)
+{
+    var objectStore = transaction.objectStore(osname);
+    var request = objectStore.get(&quot;foo&quot;);
+    
+    request.onsuccess = function(event) {
+        if (shouldEndReadTransaction &amp;&amp; transaction.hasDoneFirstRead)
+            return;
+
+        transaction.hasDoneFirstRead = true;
+        readTransactionLoop(event.target.transaction, osname, false);
+        
+        if (shouldStartWrite)
+             startWriteTransaction();
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected request error - &quot; + event);
+        done();
+    }
+}
+
+function startWriteTransaction()
+{
+    debug(&quot;ALERT: &quot; + &quot;Starting write transaction&quot;);
+    var transaction = secondDatabaseConnection.transaction([&quot;OS1&quot;, &quot;OS2&quot;], &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;OS1&quot;);
+    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    shouldEndReadTransaction = true;
+
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write to OS1 successful&quot;);
+    }
+    
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction put unexpected error - &quot; + event);
+        done();
+    }
+
+    objectStore = transaction.objectStore(&quot;OS2&quot;);
+    request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write to OS2 successful&quot;);
+        done();
+    }
+    
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write transaction put unexpected error - &quot; + event);
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionscheduler6jsfromrev195319trunkLayoutTestsstorageindexeddbmoderntransactionscheduler6html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-6.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-6.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-6.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+description(&quot;This test starts two read-only transactions to an object store followed by a read-write transaction. \
+It verifies that the read-write doesn't start until both read-onlys have finished.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;TransactionScheduler6Database&quot;);
+var database;
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    database = event.target.result;
+    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;put FAILED - &quot; + event);
+        done();
+    }
+    
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction aborted&quot;);
+        done();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction completed&quot;);
+        continueTest();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;versionchange transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+function continueTest()
+{
+    startTransactionLoop(database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
+    startTransactionLoop(database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
+    
+    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
+
+    request.onsuccess = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write in readwrite transaction succeeded&quot;);
+    }
+    
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Write in readwrite transaction unexpectedly failed&quot;);
+        done();
+    }
+    
+    transaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction expectedly aborted&quot;);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction completed&quot;);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;readwrite transaction error'ed - &quot; + event);
+        done();
+    }
+}
+
+var numberOfOpenTransactions = 0;
+
+function startTransactionLoop(transaction, isFirstTime)
+{
+    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
+    var request = objectStore.get(&quot;bar&quot;);
+    
+    request.onsuccess = function(event) {
+        if (isFirstTime) {
+            debug(&quot;ALERT: &quot; + &quot;Starting a readonly transaction&quot;);
+            numberOfOpenTransactions++;
+        }
+        
+        if (numberOfOpenTransactions == 2)
+            return;
+
+        startTransactionLoop(event.target.transaction, false);
+    }
+
+    request.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected request error - &quot; + event);
+        done();
+    }
+
+    transaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction error - &quot; + event);
+        done();
+    }
+
+    transaction.onabort = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;Unexpected transaction abort - &quot; + event);
+        done();
+    }
+
+    transaction.oncomplete = function(event) {
+        --numberOfOpenTransactions;
+        debug(&quot;ALERT: &quot; + &quot;readonly transaction completed&quot;);
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcestransactionsstoponnavigation2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,13 +1,13 @@
</span><del>-Makes sure transactions stop on navigation to a new page.&lt;br&gt;
-If the previous page's transaction is blindly charging forward, this test will probably timeout.&lt;br&gt;
-If the previous page's connection/transactions did not clean up properly, the delete request in this test will incorrectly be blocked.&lt;br&gt;
-If every thing is peachy keen, the delete request in this test will correctly succeed.&lt;br&gt;
</del><ins>+Makes sure transactions stop on navigation to a new page.
+If the previous page's transaction is blindly charging forward, this test will probably timeout.
+If the previous page's connection/transactions did not clean up properly, the delete request in this test will incorrectly be blocked.
+If every thing is peachy keen, the delete request in this test will correctly succeed.
</ins><span class="cx"> &lt;div id=&quot;logger&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><span class="cx"> function log(msg)
</span><span class="cx"> {
</span><del>-    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&lt;br&gt;&quot;;
</del><ins>+    document.getElementById(&quot;logger&quot;).innerHTML += msg + &quot;&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function done()
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesversionchangeabortthenreopenjsfromrev195319trunkLayoutTestsstorageindexeddbmodernversionchangeabortthenreopenhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,111 @@
</span><ins>+description(&quot;This test opens a new database, then aborts the version change transaction. \
+It then reopens the database, making sure it's a default, empty database, and changes the version successfully. \
+It then reopens the database, upgrading it's version. It aborts this versionchange, as well. \
+Finally it reopens the database again, upgrading its version, making sure things had reverted back to before the second aborted versionchange.&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 1);
+
+createRequest.onupgradeneeded = function(event) {
+    debug(&quot;ALERT: &quot; + &quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+    var versionTransaction = createRequest.transaction;
+    var database = event.target.result;
+
+    versionTransaction.abort();
+
+    versionTransaction.onabort = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction aborted&quot;);
+        continueTest1();
+        database.close();
+    }
+
+    versionTransaction.oncomplete = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction unexpected complete&quot;);
+        done();
+    }
+
+    versionTransaction.onerror = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Initial upgrade versionchange transaction error &quot; + event);
+    }
+}
+
+function continueTest1()
+{
+    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 1);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction unexpected abort&quot;);
+            done();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction complete&quot;);
+            continueTest2();
+            database.close();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Second upgrade versionchange transaction unexpected error&quot; + event);
+            done();
+        }
+    }
+}
+
+function continueTest2()
+{
+    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 2);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+
+        var versionTransaction = createRequest.transaction;
+        var database = event.target.result;
+
+        versionTransaction.abort();
+    
+        versionTransaction.onabort = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction aborted&quot;);
+            continueTest3();
+            database.close();
+        }
+
+        versionTransaction.oncomplete = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction unexpected complete&quot;);
+            done();
+        }
+
+        versionTransaction.onerror = function(event) {
+            debug(&quot;ALERT: &quot; + &quot;Third upgrade versionchange transaction error&quot; + event);
+        }
+    }
+}
+
+function continueTest3()
+{
+    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 2);
+
+    createRequest.onupgradeneeded = function(event) {
+        debug(&quot;ALERT: &quot; + &quot;Fourth upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+        var database = event.target.result;
+        done();
+    }
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesversionchangeeventjsfromrev195319trunkLayoutTestsstorageindexeddbmodernversionchangeeventhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-event.js (from rev 195319, trunk/LayoutTests/storage/indexeddb/modern/versionchange-event.html) (0 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-event.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/versionchange-event.js        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+description(&quot;This test: \
+-Opens a connection to a database at version 1, creating the database \
+-Commits the version change transaction for that database \
+-Opens a second connection to that database, requesting version 1 \
+-Opens a third connection to that database, requesting version 2 \
+-Makes sure the first and second connections get the versionchange event \
+-Closes the first and second connections \
+-Makes sure the versionchange transaction for the second connection starts successfully&quot;);
+
+
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+}
+
+function done()
+{
+    finishJSTest();
+}
+
+var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;);
+var connection1;
+var connection2;
+
+request.onsuccess = function()
+{
+    debug(&quot;ALERT: &quot; + &quot;First version change successful&quot;);
+}
+request.onerror = function(e)
+{
+    debug(&quot;ALERT: &quot; + &quot;Unexpected error (firstPhase)&quot;);
+        done();
+}
+
+request.onupgradeneeded = function(e)
+{
+    var database = event.target.result;
+
+    debug(&quot;ALERT: &quot; + &quot;upgradeneeded (firstPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
+    request.transaction.oncomplete = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Version change complete (firstPhase). Database version is now - &quot; + database.version);
+
+        connection1 = database;
+        connection1.onversionchange = function(e)
+        {
+            connection1.oldVersion = e.oldVersion;
+            connection1.newVersion = e.newVersion;
+            connection1.close();
+        }
+        secondPhase();
+    }
+    request.transaction.onabort = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Version change transaction unexpected abort (firstPhase)&quot;);
+        done();
+    }
+    request.transaction.onerror = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Version change transaction unexpected error (firstPhase)&quot;);
+        done();
+    }
+}
+
+function secondPhase()
+{
+    var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;, 1);
+    request.onsuccess = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Open success (secondPhase)&quot;);
+        connection2 = request.result;
+        connection2.onversionchange = function(e)
+        {
+            connection2.oldVersion = e.oldVersion;
+            connection2.newVersion = e.newVersion;
+            connection2.close();
+        }
+        thirdPhase();
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected open error (secondPhase)&quot; + e);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+            debug(&quot;ALERT: &quot; + &quot;Unexpected upgrade needed (secondPhase)&quot;);
+            done();
+    }
+}
+
+function thirdPhase()
+{
+    var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;, 2);
+    debug(&quot;ALERT: &quot; + &quot;thirdPhase - Requested database connection with version 2&quot;);
+    request.onsuccess = function()
+    {
+        debug(&quot;ALERT: &quot; + &quot;Version change to version 2 successful&quot;);
+    }
+    request.onerror = function(e)
+    {
+        debug(&quot;ALERT: &quot; + &quot;Unexpected open error (thirdPhase)&quot; + e);
+        done();
+    }
+    request.onupgradeneeded = function(e)
+    {
+            debug(&quot;ALERT: &quot; + &quot;Expected upgrade needed (thirdPhase)&quot;);
+            debug(&quot;ALERT: &quot; + &quot;firstPhase connection had received oldVersion: &quot; + connection1.oldVersion + &quot;, newVersion: &quot; + connection1.newVersion);
+            debug(&quot;ALERT: &quot; + &quot;secondPhase connection had received oldVersion: &quot; + connection2.oldVersion + &quot;, newVersion: &quot; + connection2.newVersion);
+
+            done();
+    }
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test makes sure that two read-only transactions to an object store are active at the same time.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="cx"> ALERT: Success opening database connection - request 1
</span><span class="lines">@@ -3,4 +8,6 @@
</span><span class="cx"> ALERT: Success opening database connection - request 2
</span><span class="cx"> ALERT: Two transactions open at once. Yay.
</span><del>-ALERT: Done
-This test makes sure that two read-only transactions to an object store are active at the same time.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,120 +1,9 @@
</span><del>-This test makes sure that two read-only transactions to an object store are active at the same time.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put FAILED - &quot; + event);
-        done();
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    var request1 = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;, 1);
-    var request2 = window.indexedDB.open(&quot;TransactionScheduler1Database&quot;, 1);
-
-    setupRequest(request1, &quot;request 1&quot;);
-    setupRequest(request2, &quot;request 2&quot;);
-}
-
-function setupRequest(request, reqName)
-{
-    request.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - &quot; + reqName);
-        var database = event.target.result;
-    
-        startTransactionLoop(event.target.result.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
-    }
-    request.onerror = function(event) {
-        alert(&quot;Unexpected error - &quot; + reqName + &quot; - &quot; + event);
-        done();
-    }
-    request.onblocked = function(event) {
-        alert(&quot;Unexpected blocked - &quot; + reqName + &quot; - &quot; + event);
-        done();
-    }
-    request.onupgradeneeded = function(event) {
-        alert(&quot;Unexpected upgradeneeded - &quot; + reqName + &quot; - &quot; + event);
-        done();
-    } 
-}
-
-var numberOfOpenTransactions = 0;
-
-function startTransactionLoop(transaction, isFirstTime)
-{
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.get(&quot;bar&quot;);
-    
-    request.onsuccess = function(event) {
-        if (isFirstTime)
-            numberOfOpenTransactions++;
-        
-        if (numberOfOpenTransactions == 2) {
-            alert(&quot;Two transactions open at once. Yay.&quot;);
-            done();
-        }
-        startTransactionLoop(event.target.transaction, false);
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Unexpected request error - &quot; + event);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;Unexpected transaction error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;Unexpected transaction abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;Unexpected transaction complete - &quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/transaction-scheduler-1.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test makes sure that two read-only transactions to two different object stores are active at the same time.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="cx"> ALERT: Success opening database connection - Starting transaction to ObjectStore OS1
</span><span class="lines">@@ -3,4 +8,6 @@
</span><span class="cx"> ALERT: Success opening database connection - Starting transaction to ObjectStore OS2
</span><span class="cx"> ALERT: Two transactions open at once. Yay.
</span><del>-ALERT: Done
-This test makes sure that two read-only transactions to two different object stores are active at the same time.
</del><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,126 +1,9 @@
</span><del>-This test makes sure that two read-only transactions to two different object stores are active at the same time.
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;OS1&quot;);
-    var request = objectStore.put(&quot;foo1&quot;, &quot;bar1&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put1 FAILED - &quot; + event);
-        done();
-    }
-    
-    objectStore = database.createObjectStore(&quot;OS2&quot;);
-    request = objectStore.put(&quot;foo2&quot;, &quot;bar2&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put2 FAILED - &quot; + event);
-        done();
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    var request1 = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;, 1);
-    var request2 = window.indexedDB.open(&quot;TransactionScheduler2Database&quot;, 1);
-
-    setupRequest(request1, &quot;OS1&quot;);
-    setupRequest(request2, &quot;OS2&quot;);
-}
-
-function setupRequest(request, osname)
-{
-    request.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting transaction to ObjectStore &quot; + osname);
-        startTransactionLoop(event.target.result.transaction(osname, &quot;readonly&quot;), osname, true);
-    }
-    request.onerror = function(event) {
-        alert(&quot;Unexpected error - &quot; + osname + &quot; - &quot; + event);
-        done();
-    }
-    request.onblocked = function(event) {
-        alert(&quot;Unexpected blocked - &quot; + osname + &quot; - &quot; + event);
-        done();
-    }
-    request.onupgradeneeded = function(event) {
-        alert(&quot;Unexpected upgradeneeded - &quot; + osname + &quot; - &quot; + event);
-        done();
-    } 
-}
-
-var numberOfOpenTransactions = 0;
-
-function startTransactionLoop(transaction, osname, isFirstTime)
-{
-    var objectStore = transaction.objectStore(osname);
-    var request = objectStore.get(&quot;bar&quot;);
-    
-    request.onsuccess = function(event) {
-        if (isFirstTime)
-            numberOfOpenTransactions++;
-        
-        if (numberOfOpenTransactions == 2) {
-            alert(&quot;Two transactions open at once. Yay.&quot;);
-            done();
-        }
-        startTransactionLoop(event.target.transaction, osname, false);
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Unexpected request error - &quot; + event);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;Unexpected transaction error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;Unexpected transaction abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;Unexpected transaction complete - &quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/transaction-scheduler-2.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test makes sure that a write transaction is blocked by a read transaction with overlapping scope. It also makes sure the write transaction starts after the read transaction completes.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="cx"> ALERT: Success opening database connection - Starting readonly transaction
</span><span class="lines">@@ -5,7 +10,7 @@
</span><span class="cx"> ALERT: Read transaction complete - [object Event]
</span><span class="cx"> ALERT: Write transaction put success
</span><span class="cx"> ALERT: Write transaction complete - [object Event]
</span><del>-ALERT: Done
-This test makes sure that a write transaction is blocked by a read transaction with overlapping scope.
-It also makes sure the write transaction starts after the read transaction completes.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,142 +1,9 @@
</span><del>-This test makes sure that a write transaction is blocked by a read transaction with overlapping scope.&lt;br&gt;
-It also makes sure the write transaction starts after the read transaction completes.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;TransactionScheduler3Database&quot;);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;OS&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put FAILED - &quot; + event);
-        done();
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-var secondDatabaseConnection;
-function continueTest()
-{
-    var longRunningReadRequest = window.indexedDB.open(&quot;TransactionScheduler3Database&quot;, 1);
-    longRunningReadRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting readonly transaction&quot;);
-        secondDatabaseConnection = event.target.result;
-        readTransactionLoop(secondDatabaseConnection.transaction(&quot;OS&quot;, &quot;readonly&quot;), true);
-    }
-    longRunningReadRequest.onerror = function(event) {
-        alert(&quot;Long running read request unexpected error - &quot; + event);
-        done();
-    }
-    longRunningReadRequest.onblocked = function(event) {
-        alert(&quot;Long running read request unexpected blocked - &quot; + event);
-        done();
-    }
-    longRunningReadRequest.onupgradeneeded = function(event) {
-        alert(&quot;Long running read request unexpected upgradeneeded - &quot; + event);
-        done();
-    } 
-}
-
-var shouldEndReadTransaction = false;
-
-function readTransactionLoop(transaction, isFirstTime)
-{
-    var objectStore = transaction.objectStore(&quot;OS&quot;);
-    var request = objectStore.get(&quot;foo&quot;);
-    
-    request.onsuccess = function(event) {
-        if (!shouldEndReadTransaction)
-            readTransactionLoop(event.target.transaction, false);
-        
-        // Now that the read transaction is open, the write transaction can be started, but it will be blocked to start with.
-        if (isFirstTime)
-             startWriteTransaction()
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Unexpected request error - &quot; + event);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;Unexpected transaction error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        alert(&quot;Unexpected transaction abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;Read transaction complete - &quot; + event);
-    }
-}
-
-function startWriteTransaction()
-{
-    alert(&quot;Creating write transaction&quot;);
-    var transaction = secondDatabaseConnection.transaction(&quot;OS&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;OS&quot;);
-    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
-
-    setTimeout(&quot;shouldEndReadTransaction = true;&quot;, 0);
-
-    request.onsuccess = function(event) {
-        alert(&quot;Write transaction put success&quot;);
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Write transaction put unexpected error - &quot; + event);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;Write transaction unexpected error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        alert(&quot;Write transaction unexpected abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;Write transaction complete - &quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/transaction-scheduler-3.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler5expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test creates two object stores. It then opens two long running read-only transactions, one per object store. It then opens a read-write transaction to both object stores. The read-only transactions both need to finish before the read-write transaction starts.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="cx"> ALERT: Success opening database connection - Starting transactions
</span><span class="lines">@@ -6,9 +11,7 @@
</span><span class="cx"> ALERT: Read transaction complete - [object Event]
</span><span class="cx"> ALERT: Write to OS1 successful
</span><span class="cx"> ALERT: Write to OS2 successful
</span><del>-ALERT: Done
-This test creates two object stores.
-It then opens two long running read-only transactions, one per object store.
-It then opens a read-write transaction to both object stores.
-The read-only transactions both need to finish before the read-write transaction starts.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler5html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,166 +1,9 @@
</span><del>-This test creates two object stores.&lt;br&gt;
-It then opens two long running read-only transactions, one per object store.&lt;br&gt;
-It then opens a read-write transaction to both object stores.&lt;br&gt;
-The read-only transactions both need to finish before the read-write transaction starts.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;TransactionScheduler5Database&quot;);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;OS1&quot;);
-    var request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;first put FAILED - &quot; + event);
-        done();
-    }
-
-    objectStore = database.createObjectStore(&quot;OS2&quot;);
-    request = objectStore.put(&quot;bar&quot;, &quot;foo&quot;);
-    
-    request.onerror = function(event) {
-        alert(&quot;second put FAILED - &quot; + event);
-        done();
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-var secondDatabaseConnection;
-var readWriteTransaction;
-
-function setupReadTransactionCallbacks(transaction)
-{
-    transaction.onerror = function(event) {
-        alert(&quot;Unexpected transaction error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        alert(&quot;Unexpected transaction abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;Read transaction complete - &quot; + event);
-    }
-
-    transaction.hasDoneFirstRead = false;
-}
-
-function continueTest()
-{
-    var openDBRequest = window.indexedDB.open(&quot;TransactionScheduler5Database&quot;, 1);
-    openDBRequest.onsuccess = function(event) {
-        alert(&quot;Success opening database connection - Starting transactions&quot;);
-        secondDatabaseConnection = event.target.result;
-        
-        var transaction1 = secondDatabaseConnection.transaction(&quot;OS1&quot;, &quot;readonly&quot;);
-        setupReadTransactionCallbacks(transaction1);
-        var transaction2 = secondDatabaseConnection.transaction(&quot;OS2&quot;, &quot;readonly&quot;);
-        setupReadTransactionCallbacks(transaction2);
-
-        readTransactionLoop(transaction1, &quot;OS1&quot;, false);
-        readTransactionLoop(transaction2, &quot;OS2&quot;, true);
-    }
-    openDBRequest.onerror = function(event) {
-        alert(&quot;Long running read request unexpected error - &quot; + event);
-        done();
-    }
-    openDBRequest.onblocked = function(event) {
-        alert(&quot;Long running read request unexpected blocked - &quot; + event);
-        done();
-    }
-    openDBRequest.onupgradeneeded = function(event) {
-        alert(&quot;Long running read request unexpected upgradeneeded - &quot; + event);
-        done();
-    } 
-}
-
-var shouldEndReadTransaction = false;
-
-function readTransactionLoop(transaction, osname, shouldStartWrite)
-{
-    var objectStore = transaction.objectStore(osname);
-    var request = objectStore.get(&quot;foo&quot;);
-    
-    request.onsuccess = function(event) {
-        if (shouldEndReadTransaction &amp;&amp; transaction.hasDoneFirstRead)
-            return;
-
-        transaction.hasDoneFirstRead = true;
-        readTransactionLoop(event.target.transaction, osname, false);
-        
-        if (shouldStartWrite)
-             startWriteTransaction();
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Unexpected request error - &quot; + event);
-        done();
-    }
-}
-
-function startWriteTransaction()
-{
-    alert(&quot;Starting write transaction&quot;);
-    var transaction = secondDatabaseConnection.transaction([&quot;OS1&quot;, &quot;OS2&quot;], &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;OS1&quot;);
-    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
-
-    shouldEndReadTransaction = true;
-
-    request.onsuccess = function(event) {
-        alert(&quot;Write to OS1 successful&quot;);
-    }
-    
-    request.onerror = function(event) {
-        alert(&quot;Write transaction put unexpected error - &quot; + event);
-        done();
-    }
-
-    objectStore = transaction.objectStore(&quot;OS2&quot;);
-    request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function(event) {
-        alert(&quot;Write to OS2 successful&quot;);
-        done();
-    }
-    
-    request.onerror = function(event) {
-        alert(&quot;Write transaction put unexpected error - &quot; + event);
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/transaction-scheduler-5.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler6expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test starts two read-only transactions to an object store followed by a read-write transaction. It verifies that the read-write doesn't start until both read-onlys have finished.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: versionchange transaction completed
</span><span class="cx"> ALERT: Starting a readonly transaction
</span><span class="lines">@@ -6,7 +11,7 @@
</span><span class="cx"> ALERT: readonly transaction completed
</span><span class="cx"> ALERT: Write in readwrite transaction succeeded
</span><span class="cx"> ALERT: readwrite transaction completed
</span><del>-ALERT: Done
-This test starts two read-only transactions to an object store followed by a read-write transaction.
-It verifies that the read-write doesn't start until both read-onlys have finished.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionscheduler6html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,124 +1,9 @@
</span><del>-This test starts two read-only transactions to an object store followed by a read-write transaction.&lt;br&gt;
-It verifies that the read-write doesn't start until both read-onlys have finished.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;TransactionScheduler6Database&quot;);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;foo&quot;, &quot;bar&quot;);
-
-    request.onerror = function(event) {
-        alert(&quot;put FAILED - &quot; + event);
-        done();
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert(&quot;versionchange transaction aborted&quot;);
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;versionchange transaction completed&quot;);
-        continueTest();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;versionchange transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    startTransactionLoop(database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
-    startTransactionLoop(database.transaction(&quot;TestObjectStore&quot;, &quot;readonly&quot;), true);
-    
-    var transaction = database.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.put(&quot;baz&quot;, &quot;foo&quot;);
-
-    request.onsuccess = function(event) {
-        alert(&quot;Write in readwrite transaction succeeded&quot;);
-    }
-    
-    request.onerror = function(event) {
-        alert(&quot;Write in readwrite transaction unexpectedly failed&quot;);
-        done();
-    }
-    
-    transaction.onabort = function(event) {
-        alert(&quot;readwrite transaction expectedly aborted&quot;);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert(&quot;readwrite transaction completed&quot;);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;readwrite transaction error'ed - &quot; + event);
-        done();
-    }
-}
-
-var numberOfOpenTransactions = 0;
-
-function startTransactionLoop(transaction, isFirstTime)
-{
-    var objectStore = transaction.objectStore(&quot;TestObjectStore&quot;);
-    var request = objectStore.get(&quot;bar&quot;);
-    
-    request.onsuccess = function(event) {
-        if (isFirstTime) {
-            alert(&quot;Starting a readonly transaction&quot;);
-            numberOfOpenTransactions++;
-        }
-        
-        if (numberOfOpenTransactions == 2)
-            return;
-
-        startTransactionLoop(event.target.transaction, false);
-    }
-
-    request.onerror = function(event) {
-        alert(&quot;Unexpected request error - &quot; + event);
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert(&quot;Unexpected transaction error - &quot; + event);
-        done();
-    }
-
-    transaction.onabort = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;Unexpected transaction abort - &quot; + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        --numberOfOpenTransactions;
-        alert(&quot;readonly transaction completed&quot;);
-    }
-}
-
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/transaction-scheduler-6.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmoderntransactionsstoponnavigationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,7 +1,2 @@
</span><del>-Makes sure transactions stop on navigation to a new page.
-If the previous page's transaction is blindly charging forward, this test will probably timeout.
-If the previous page's connection/transactions did not clean up properly, the delete request in this test will incorrectly be blocked.
-If every thing is peachy keen, the delete request in this test will correctly succeed.
-Delete request was successful.
-Done.
-
</del><ins>+Makes sure transactions stop on navigation to a new page. If the previous page's transaction is blindly charging forward, this test will probably timeout. If the previous page's connection/transactions did not clean up properly, the delete request in this test will incorrectly be blocked. If every thing is peachy keen, the delete request in this test will correctly succeed.
+Delete request was successful.Done.
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernversionchangeabortthenreopenexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test opens a new database, then aborts the version change transaction. It then reopens the database, making sure it's a default, empty database, and changes the version successfully. It then reopens the database, upgrading it's version. It aborts this versionchange, as well. Finally it reopens the database again, upgrading its version, making sure things had reverted back to before the second aborted versionchange.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: Initial upgrade needed: Old version - 0 New version - 1
</span><span class="cx"> ALERT: Initial upgrade versionchange transaction aborted
</span><span class="cx"> ALERT: Second upgrade needed: Old version - 0 New version - 1
</span><span class="lines">@@ -5,9 +10,7 @@
</span><span class="cx"> ALERT: Third upgrade needed: Old version - 1 New version - 2
</span><span class="cx"> ALERT: Third upgrade versionchange transaction aborted
</span><span class="cx"> ALERT: Fourth upgrade needed: Old version - 1 New version - 2
</span><del>-ALERT: Done
-This test opens a new database, then aborts the version change transaction.
-It then reopens the database, making sure it's a default, empty database, and changes the version successfully.
-It then reopens the database, upgrading it's version. It aborts this versionchange, as well.
-Finally it reopens the database again, upgrading its version, making sure things had reverted back to before the second aborted versionchange.
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernversionchangeabortthenreopenhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,113 +1,9 @@
</span><del>-This test opens a new database, then aborts the version change transaction.&lt;br&gt;
-It then reopens the database, making sure it's a default, empty database, and changes the version successfully.&lt;br&gt;
-It then reopens the database, upgrading it's version. It aborts this versionchange, as well.&lt;br&gt;
-Finally it reopens the database again, upgrading its version, making sure things had reverted back to before the second aborted versionchange.&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-
-    versionTransaction.abort();
-
-    versionTransaction.onabort = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction aborted&quot;);
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction unexpected complete&quot;);
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert(&quot;Initial upgrade versionchange transaction error &quot; + event);
-    }
-}
-
-function continueTest1()
-{
-    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 1);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Second upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Second upgrade versionchange transaction unexpected abort&quot;);
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Second upgrade versionchange transaction complete&quot;);
-            continueTest2();
-            database.close();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Second upgrade versionchange transaction unexpected error&quot; + event);
-            done();
-        }
-    }
-}
-
-function continueTest2()
-{
-    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 2);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Third upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-
-        versionTransaction.abort();
-    
-        versionTransaction.onabort = function(event) {
-            alert(&quot;Third upgrade versionchange transaction aborted&quot;);
-            continueTest3();
-            database.close();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert(&quot;Third upgrade versionchange transaction unexpected complete&quot;);
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert(&quot;Third upgrade versionchange transaction error&quot; + event);
-        }
-    }
-}
-
-function continueTest3()
-{
-    createRequest = window.indexedDB.open(&quot;VersionChangeAbortTestDatabase&quot;, 2);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert(&quot;Fourth upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
-        var database = event.target.result;
-        done();
-    }
-}
-
-&lt;/script&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/versionchange-abort-then-reopen.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernversionchangeeventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,3 +1,8 @@
</span><ins>+This test: -Opens a connection to a database at version 1, creating the database -Commits the version change transaction for that database -Opens a second connection to that database, requesting version 1 -Opens a third connection to that database, requesting version 2 -Makes sure the first and second connections get the versionchange event -Closes the first and second connections -Makes sure the versionchange transaction for the second connection starts successfully
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
</ins><span class="cx"> ALERT: upgradeneeded (firstPhase): old version - 0 new version - 1
</span><span class="cx"> ALERT: Version change complete (firstPhase). Database version is now - 1
</span><span class="cx"> ALERT: First version change successful
</span><span class="lines">@@ -6,13 +11,7 @@
</span><span class="cx"> ALERT: Expected upgrade needed (thirdPhase)
</span><span class="cx"> ALERT: firstPhase connection had received oldVersion: 1, newVersion: 2
</span><span class="cx"> ALERT: secondPhase connection had received oldVersion: 1, newVersion: 2
</span><del>-ALERT: Done
-This test:
--Opens a connection to a database at version 1, creating the database
--Commits the version change transaction for that database
--Opens a second connection to that database, requesting version 1
--Opens a third connection to that database, requesting version 2
--Makes sure the first and second connections get the versionchange event
--Closes the first and second connections
--Makes sure the versionchange transaction for the second connection starts successfully
</del><ins>+PASS successfullyParsed is true
</ins><span class="cx"> 
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernversionchangeeventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/modern/versionchange-event.html (195320 => 195321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/versionchange-event.html        2016-01-19 23:17:45 UTC (rev 195320)
+++ trunk/LayoutTests/storage/indexeddb/modern/versionchange-event.html        2016-01-19 23:41:11 UTC (rev 195321)
</span><span class="lines">@@ -1,116 +1,9 @@
</span><del>-This test:&lt;br&gt;
--Opens a connection to a database at version 1, creating the database&lt;br&gt;
--Commits the version change transaction for that database&lt;br&gt;
--Opens a second connection to that database, requesting version 1&lt;br&gt;
--Opens a third connection to that database, requesting version 2&lt;br&gt;
--Makes sure the first and second connections get the versionchange event&lt;br&gt;
--Closes the first and second connections&lt;br&gt;
--Makes sure the versionchange transaction for the second connection starts successfully&lt;br&gt;
-&lt;script&gt;
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert(&quot;Done&quot;);
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;);
-var connection1;
-var connection2;
-
-request.onsuccess = function()
-{
-    alert(&quot;First version change successful&quot;);
-}
-request.onerror = function(e)
-{
-    alert(&quot;Unexpected error (firstPhase)&quot;);
-        done();
-}
-
-request.onupgradeneeded = function(e)
-{
-    var database = event.target.result;
-
-    alert(&quot;upgradeneeded (firstPhase): old version - &quot; + e.oldVersion + &quot; new version - &quot; + e.newVersion);
-    request.transaction.oncomplete = function()
-    {
-        alert(&quot;Version change complete (firstPhase). Database version is now - &quot; + database.version);
-
-        connection1 = database;
-        connection1.onversionchange = function(e)
-        {
-            connection1.oldVersion = e.oldVersion;
-            connection1.newVersion = e.newVersion;
-            connection1.close();
-        }
-        secondPhase();
-    }
-    request.transaction.onabort = function()
-    {
-        alert(&quot;Version change transaction unexpected abort (firstPhase)&quot;);
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        alert(&quot;Version change transaction unexpected error (firstPhase)&quot;);
-        done();
-    }
-}
-
-function secondPhase()
-{
-    var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;, 1);
-    request.onsuccess = function()
-    {
-        alert(&quot;Open success (secondPhase)&quot;);
-        connection2 = request.result;
-        connection2.onversionchange = function(e)
-        {
-            connection2.oldVersion = e.oldVersion;
-            connection2.newVersion = e.newVersion;
-            connection2.close();
-        }
-        thirdPhase();
-    }
-    request.onerror = function(e)
-    {
-        alert(&quot;Unexpected open error (secondPhase)&quot; + e);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-            alert(&quot;Unexpected upgrade needed (secondPhase)&quot;);
-            done();
-    }
-}
-
-function thirdPhase()
-{
-    var request = window.indexedDB.open(&quot;VersionChangeTestDatabase&quot;, 2);
-    alert(&quot;thirdPhase - Requested database connection with version 2&quot;);
-    request.onsuccess = function()
-    {
-        alert(&quot;Version change to version 2 successful&quot;);
-    }
-    request.onerror = function(e)
-    {
-        alert(&quot;Unexpected open error (thirdPhase)&quot; + e);
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-            alert(&quot;Expected upgrade needed (thirdPhase)&quot;);
-            alert(&quot;firstPhase connection had received oldVersion: &quot; + connection1.oldVersion + &quot;, newVersion: &quot; + connection1.newVersion);
-            alert(&quot;secondPhase connection had received oldVersion: &quot; + connection2.oldVersion + &quot;, newVersion: &quot; + connection2.newVersion);
-
-            done();
-    }
-}
-&lt;/script&gt;
</del><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/versionchange-event.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>