Bug 1331851 - Intermittent browser/components/preferences/in-content/tests/browser_advanced_siteData.js | Test timed out draft
authorFischer.json <fischer.json@gmail.com>
Fri, 03 Feb 2017 16:53:33 +0800
changeset 479149 2a8f5327018ebf364634c9acebffc083c1760d07
parent 470073 2aede0a97bc685e163196cc451b947a04ae6a598
child 544598 6611ccda04b19bb7b4227c06618f4a6169c5fb01
push id44159
push userbmo:fliu@mozilla.com
push dateMon, 06 Feb 2017 02:31:38 +0000
bugs1331851
milestone54.0a1
Bug 1331851 - Intermittent browser/components/preferences/in-content/tests/browser_advanced_siteData.js | Test timed out MozReview-Commit-ID: Def1trhWrIE
browser/components/preferences/in-content/tests/site_data_test.html
--- a/browser/components/preferences/in-content/tests/site_data_test.html
+++ b/browser/components/preferences/in-content/tests/site_data_test.html
@@ -16,14 +16,14 @@
       request.onupgradeneeded = function(e) {
         let db = e.target.result;
         db.createObjectStore("TestStore", { keyPath: "id" });
       };
       request.onsuccess = function(e) {
         let db = e.target.result;
         let tx = db.transaction("TestStore", "readwrite");
         let store = tx.objectStore("TestStore");
+        tx.oncomplete = () => window.dispatchEvent(new Event("test-indexedDB-done"));
         store.put({ id: "test_id", description: "Site Data Test"});
-        window.dispatchEvent(new Event("test-indexedDB-done"));
       }
     </script>
   </body>
 </html>