blob: 49c5f67201fabdc848fb3863813b489371938989 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests different types of search-and-replace in SourceFrame\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.showPanel('sources');
await TestRunner.addScriptTag('resources/search.js');
UI.viewManager.showView('sources');
SourcesTestRunner.showScriptSource('search.js', didShowScriptSource);
function didShowScriptSource(sourceFrame) {
var searchConfig = new UI.SearchableView.SearchConfig('(replac)eMe[38]', false, true);
SourcesTestRunner.replaceAndDumpChange(sourceFrame, searchConfig, '$1d', false);
var searchConfig = new UI.SearchableView.SearchConfig('(replace)Me[45]', false, true);
SourcesTestRunner.replaceAndDumpChange(sourceFrame, searchConfig, '$1d', true);
TestRunner.completeTest();
}
})();