Bug 1244764 P5 Fix devtools test to work with new Cache add()/addAll() behavior. r=ehsan
authorBen Kelly <ben@wanderview.com>
Thu, 04 Feb 2016 07:59:52 -0800
changeset 283113 30210bbd013e29fd60e3b87f8ffa4997a95fd235
parent 283112 c9e84bd323962fe1ff5b418af11d26de58907344
child 283114 6391ae6db0ff732c8affd9143e8d080c22d1c4c6
push id29974
push usercbook@mozilla.com
push dateFri, 05 Feb 2016 10:53:43 +0000
treeherdermozilla-central@1dbe350b57b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1244764
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1244764 P5 Fix devtools test to work with new Cache add()/addAll() behavior. r=ehsan
devtools/client/storage/test/storage-listings.html
--- a/devtools/client/storage/test/storage-listings.html
+++ b/devtools/client/storage/test/storage-listings.html
@@ -92,20 +92,25 @@ let idbGenerator = function*() {
 
 function deleteDB(dbName) {
   return new Promise(resolve => {
     dump("removing database " + dbName + " from " + document.location + "\n");
     indexedDB.deleteDatabase(dbName).onsuccess = resolve;
   });
 }
 
+function fetchPut(cache, url) {
+  let response = yield fetch(url);
+  yield cache.put(url, response);
+}
+
 let cacheGenerator = function*() {
   let cache = yield caches.open("plop");
-  yield cache.add("404_cached_file.js");
-  yield cache.add("browser_storage_basic.js");
+  yield fetchPut(cache, "404_cached_file.js");
+  yield fetchPut(cache, "browser_storage_basic.js");
 };
 
 window.setup = function*() {
   yield idbGenerator();
   yield cacheGenerator();
 };
 
 window.clear = function*() {