blob: 2e3d34c798ac443eeb85455d7d04a40b2bf089c8 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @param {string} folderPath
* @return {!{isolatedFileSystem: !Persistence.IsolatedFileSystem, project: !Workspace.Project, testFileSystem: !BindingsTestRunner.TestFileSystem}}
*/
BindingsTestRunner.createOverrideProject = async function(folderPath) {
const testFileSystem = new BindingsTestRunner.TestFileSystem(folderPath);
const isolatedFileSystem = await testFileSystem.reportCreatedPromise('overrides');
isolatedFileSystem._type = 'overrides';
const project =
Workspace.workspace.project(Persistence.FileSystemWorkspaceBinding.projectId(isolatedFileSystem.path()));
console.assert(project);
return {isolatedFileSystem, project, testFileSystem};
};
/**
* @param {boolean} enabled
*/
BindingsTestRunner.setOverridesEnabled = function(enabled) {
Common.settings.moduleSetting('persistenceNetworkOverridesEnabled').set(enabled);
};