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

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js

Issue 2784733002: DevTools: prepare tests for Persistence2.0 release (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
index f2594adfbfdd5f6289d777c76ad87acd6f941043..a3e76fd66cd99148b08034046328c7e477c03ec3 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
@@ -32,6 +32,14 @@ Persistence.Persistence = class extends Common.Object {
}
/**
+ * @param {function(function(!Persistence.PersistenceBinding), function(!Persistence.PersistenceBinding)):{dispose: function()}} mappingFactory
+ */
+ _setMappingForTest(mappingFactory) {
+ this._mapping.dispose();
+ this._mapping = mappingFactory(this._validateBinding.bind(this), this._onBindingRemoved.bind(this));
+ }
+
+ /**
* @param {!Persistence.PersistenceBinding} binding
*/
_validateBinding(binding) {

Powered by Google App Engine
This is Rietveld 408576698