| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var initialize_CacheStorageTest = function() { | 5 var initialize_CacheStorageTest = function() { |
| 6 InspectorTest.preloadPanel("resources"); | 6 InspectorTest.preloadPanel("resources"); |
| 7 | 7 |
| 8 InspectorTest.dumpCacheTree = function() | 8 InspectorTest.dumpCacheTree = function() |
| 9 { | 9 { |
| 10 WebInspector.panels.resources.cacheStorageListTreeElement.expand(); | 10 WebInspector.panels.resources.cacheStorageListTreeElement.expand(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 view._updateData(true); | 35 view._updateData(true); |
| 36 view = cacheTreeElement._view; | 36 view = cacheTreeElement._view; |
| 37 | 37 |
| 38 function addDataResult() | 38 function addDataResult() |
| 39 { | 39 { |
| 40 if (view._entries.length == 0) { | 40 if (view._entries.length == 0) { |
| 41 InspectorTest.addResult(" (cache empty)"); | 41 InspectorTest.addResult(" (cache empty)"); |
| 42 nextOrResolve(); | 42 nextOrResolve(); |
| 43 return; | 43 return; |
| 44 } | 44 } |
| 45 for (var entry of view._entries) | 45 var dataGrid = view._dataGrid; |
| 46 InspectorTest.addResult(" '" + entry.request + "'
: '" + entry.response + "'"); | 46 for (var node of dataGrid.rootNode().children) { |
| 47 var entries = []; |
| 48 for (var j = 0; j < node.element().children.length; j++)
{ |
| 49 var td = node.element().children[j]; |
| 50 if (td.textContent) |
| 51 entries.push(td.textContent); |
| 52 } |
| 53 InspectorTest.addResult(" " + entries.join(", "))
; |
| 54 } |
| 47 nextOrResolve(); | 55 nextOrResolve(); |
| 48 } | 56 } |
| 49 | 57 |
| 50 function nextOrResolve() | 58 function nextOrResolve() |
| 51 { | 59 { |
| 52 var next = i + 1; | 60 var next = i + 1; |
| 53 if (next < cachesTreeElement.childCount()) | 61 if (next < cachesTreeElement.childCount()) |
| 54 queryView(next); | 62 queryView(next); |
| 55 else | 63 else |
| 56 resolve(); | 64 resolve(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 { | 211 { |
| 204 caches.keys() | 212 caches.keys() |
| 205 .then(function(keys) { | 213 .then(function(keys) { |
| 206 return Promise.all(keys.map(function(key) { | 214 return Promise.all(keys.map(function(key) { |
| 207 return caches.delete(key); | 215 return caches.delete(key); |
| 208 })); | 216 })); |
| 209 }) | 217 }) |
| 210 .then(resolve) | 218 .then(resolve) |
| 211 .catch(onCacheStorageError.bind(this, reject)); | 219 .catch(onCacheStorageError.bind(this, reject)); |
| 212 } | 220 } |
| OLD | NEW |