| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <!-- | 3 <!-- |
| 4 Copyright 2014 The Chromium Authors. All rights reserved. | 4 Copyright 2014 The Chromium Authors. All rights reserved. |
| 5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
| 6 found in the LICENSE file. | 6 found in the LICENSE file. |
| 7 --> | 7 --> |
| 8 <head> | 8 <head> |
| 9 <title>IDB test that db's corrupted while open are properly handled Part 2 / 2</
title> | 9 <title>IDB test that db's corrupted while open are properly handled Part 2 / 2</
title> |
| 10 <script type="text/javascript" src="common.js"></script> | 10 <script type="text/javascript" src="common.js"></script> |
| 11 <script> | 11 <script> |
| 12 | 12 |
| 13 function test() { | 13 function test() { |
| 14 dbname = "corrupted_open_db_detection.html"; | 14 dbname = "corrupted_open_db_detection.html"; |
| 15 request = webkitIndexedDB.open(dbname); | 15 request = indexedDB.open(dbname); |
| 16 request.onupgradeneeded = upgradeNeeded; | 16 request.onupgradeneeded = upgradeNeeded; |
| 17 request.onsuccess = onSuccess; | 17 request.onsuccess = onSuccess; |
| 18 request.onerror = unexpectedErrorCallback; | 18 request.onerror = unexpectedErrorCallback; |
| 19 request.onblocked = unexpectedBlockedCallback; | 19 request.onblocked = unexpectedBlockedCallback; |
| 20 } | 20 } |
| 21 | 21 |
| 22 var gotUpgradeNeeded = false; | 22 var gotUpgradeNeeded = false; |
| 23 function upgradeNeeded(evt) { | 23 function upgradeNeeded(evt) { |
| 24 event = evt; | 24 event = evt; |
| 25 shouldBe("event.dataLoss", "'total'"); | 25 shouldBe("event.dataLoss", "'total'"); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 37 shouldBeTrue("gotUpgradeNeeded"); | 37 shouldBeTrue("gotUpgradeNeeded"); |
| 38 done(); | 38 done(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 </script> | 41 </script> |
| 42 </head> | 42 </head> |
| 43 <body onLoad="test()"> | 43 <body onLoad="test()"> |
| 44 <div id="status">Starting...</div> | 44 <div id="status">Starting...</div> |
| 45 </body> | 45 </body> |
| 46 </html> | 46 </html> |
| OLD | NEW |