Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js
index 849fd86b8c0a6c2538ede9fbf7cf0e5923158b98..1f6c7cb319eeb8c8df930dc3269776c884ea960e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js
@@ -7,11 +7,11 @@ InspectorTest.preloadPanel("resources");
InspectorTest.dumpCacheTree = function()
{
- WebInspector.panels.resources.cacheStorageListTreeElement.expand();
+ UI.panels.resources.cacheStorageListTreeElement.expand();
InspectorTest.addResult("Dumping CacheStorage tree:");
- var cachesTreeElement = WebInspector.panels.resources.cacheStorageListTreeElement;
+ var cachesTreeElement = UI.panels.resources.cacheStorageListTreeElement;
var promise = new Promise(function(resolve, reject) {
- InspectorTest.addSnifferPromise(WebInspector.ServiceWorkerCacheModel.prototype, "_updateCacheNames").then(crawlCacheTree).catch(reject);
+ InspectorTest.addSnifferPromise(SDK.ServiceWorkerCacheModel.prototype, "_updateCacheNames").then(crawlCacheTree).catch(reject);
function crawlCacheTree()
{
@@ -27,7 +27,7 @@ InspectorTest.dumpCacheTree = function()
var cacheTreeElement = cachesTreeElement.childAt(i);
InspectorTest.addResult(" cache: " + cacheTreeElement.title);
var view = cacheTreeElement._view;
- InspectorTest.addSniffer(WebInspector.ServiceWorkerCacheView.prototype, "_updateDataCallback", addDataResult, false);
+ InspectorTest.addSniffer(Resources.ServiceWorkerCacheView.prototype, "_updateDataCallback", addDataResult, false);
if (!view)
cacheTreeElement.onselect(false);
else
@@ -65,22 +65,22 @@ InspectorTest.dumpCacheTree = function()
}
}
});
- WebInspector.panels.resources.cacheStorageListTreeElement._refreshCaches();
+ UI.panels.resources.cacheStorageListTreeElement._refreshCaches();
return promise;
}
// If optionalEntry is not specified, then the whole cache is deleted.
InspectorTest.deleteCacheFromInspector = function(cacheName, optionalEntry)
{
- WebInspector.panels.resources.cacheStorageListTreeElement.expand();
+ UI.panels.resources.cacheStorageListTreeElement.expand();
if (optionalEntry) {
InspectorTest.addResult("Deleting CacheStorage entry " + optionalEntry + " in cache " + cacheName);
} else {
InspectorTest.addResult("Deleting CacheStorage cache " + cacheName);
}
- var cachesTreeElement = WebInspector.panels.resources.cacheStorageListTreeElement;
+ var cachesTreeElement = UI.panels.resources.cacheStorageListTreeElement;
var promise = new Promise(function(resolve, reject) {
- InspectorTest.addSnifferPromise(WebInspector.ServiceWorkerCacheModel.prototype, "_updateCacheNames")
+ InspectorTest.addSnifferPromise(SDK.ServiceWorkerCacheModel.prototype, "_updateCacheNames")
.then(function() {
if (!cachesTreeElement.childCount()) {
reject("Error: Could not find CacheStorage cache " + cacheName);
@@ -94,14 +94,14 @@ InspectorTest.deleteCacheFromInspector = function(cacheName, optionalEntry)
continue;
if (!optionalEntry) {
// Here we're deleting the whole cache.
- InspectorTest.addSniffer(WebInspector.ServiceWorkerCacheModel.prototype, "_cacheRemoved", resolve)
+ InspectorTest.addSniffer(SDK.ServiceWorkerCacheModel.prototype, "_cacheRemoved", resolve)
cacheTreeElement._clearCache();
return;
}
// Here we're deleting only the entry. We verify that it is present in the table.
var view = cacheTreeElement._view;
- InspectorTest.addSniffer(WebInspector.ServiceWorkerCacheView.prototype, "_updateDataCallback", deleteEntryOrReject, false);
+ InspectorTest.addSniffer(Resources.ServiceWorkerCacheView.prototype, "_updateDataCallback", deleteEntryOrReject, false);
if (!view)
cacheTreeElement.onselect(false);
else
@@ -124,13 +124,13 @@ InspectorTest.deleteCacheFromInspector = function(cacheName, optionalEntry)
reject("Error: Could not find CacheStorage cache " + cacheName);
}).catch(reject);
});
- WebInspector.panels.resources.cacheStorageListTreeElement._refreshCaches();
+ UI.panels.resources.cacheStorageListTreeElement._refreshCaches();
return promise;
}
InspectorTest.waitForCacheRefresh = function(callback)
{
- InspectorTest.addSniffer(WebInspector.ServiceWorkerCacheModel.prototype, "_updateCacheNames", callback, false);
+ InspectorTest.addSniffer(SDK.ServiceWorkerCacheModel.prototype, "_updateCacheNames", callback, false);
}
InspectorTest.createCache = function(cacheName)

Powered by Google App Engine
This is Rietveld 408576698