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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-test.js

Issue 2780933003: DevTools: support UISourceCode rename in automapping (Closed)
Patch Set: fix test Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
1 var initialize_AutomappingTest = function() { 1 var initialize_AutomappingTest = function() {
2 2
3 InspectorTest.addFiles = function(testFileSystem, files) 3 InspectorTest.addFiles = function(testFileSystem, files)
4 { 4 {
5 for (var filePath in files) { 5 for (var filePath in files) {
6 var file = files[filePath]; 6 var file = files[filePath];
7 testFileSystem.addFile(filePath, file.content, file.time ? file.time.get Time() : 0); 7 testFileSystem.addFile(filePath, file.content, file.time ? file.time.get Time() : 0);
8 } 8 }
9 } 9 }
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 for (var url in assets) { 59 for (var url in assets) {
60 var asset = assets[url]; 60 var asset = assets[url];
61 var contentType = asset.contentType || Common.resourceTypes.Script; 61 var contentType = asset.contentType || Common.resourceTypes.Script;
62 var contentProvider = new Common.StaticContentProvider(url, contentT ype, Promise.resolve(asset.content)); 62 var contentProvider = new Common.StaticContentProvider(url, contentT ype, Promise.resolve(asset.content));
63 var metadata = typeof asset.content === "string" || asset.time ? new Workspace.UISourceCodeMetadata(asset.time, asset.content.length) : null; 63 var metadata = typeof asset.content === "string" || asset.time ? new Workspace.UISourceCodeMetadata(asset.time, asset.content.length) : null;
64 var uiSourceCode = this._networkProject.createUISourceCode(url, cont entType); 64 var uiSourceCode = this._networkProject.createUISourceCode(url, cont entType);
65 this._networkProject.addUISourceCodeWithProvider(uiSourceCode, conte ntProvider, metadata); 65 this._networkProject.addUISourceCodeWithProvider(uiSourceCode, conte ntProvider, metadata);
66 } 66 }
67 }, 67 },
68 68
69 waitUntilMappingIsStabilized: function(callback) 69 waitUntilMappingIsStabilized: function()
70 { 70 {
71 this._stabilizedCallback = callback; 71 var promise = new Promise(x => this._stabilizedCallback = x);
72 this._checkStabilized(); 72 this._checkStabilized();
73 return promise;
73 }, 74 },
74 75
75 _onSweepHappened: function() 76 _onSweepHappened: function()
76 { 77 {
77 this._failedBindingsCount = 0; 78 this._failedBindingsCount = 0;
78 this._checkStabilized(); 79 this._checkStabilized();
79 }, 80 },
80 81
81 _onBindingAdded: function(binding) 82 _onBindingAdded: function(binding)
82 { 83 {
(...skipping 22 matching lines...) Expand all
105 if (stabilized) { 106 if (stabilized) {
106 InspectorTest.addResult("Mapping has stabilized."); 107 InspectorTest.addResult("Mapping has stabilized.");
107 var callback = this._stabilizedCallback; 108 var callback = this._stabilizedCallback;
108 delete this._stabilizedCallback; 109 delete this._stabilizedCallback;
109 callback.call(null); 110 callback.call(null);
110 } 111 }
111 } 112 }
112 } 113 }
113 114
114 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698