blob: da454e6808960849ba906495c802cbbce6d7148a [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(`Verify that SourceMap bindings are generating UISourceCodes properly.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadModule('bindings_test_runner');
var contentScriptsNavigator = new Sources.ContentScriptsNavigatorView();
contentScriptsNavigator.show(UI.inspectorView.element);
TestRunner.markStep('initialWorkspace');
SourcesTestRunner.dumpNavigatorView(contentScriptsNavigator, false);
TestRunner.markStep('attachFrame1');
await BindingsTestRunner.attachFrame('frame1', './resources/contentscript-frame.html', '_test_attachFrame1.js'),
SourcesTestRunner.dumpNavigatorView(contentScriptsNavigator, false);
TestRunner.markStep('attachFrame2');
await BindingsTestRunner.attachFrame('frame2', './resources/contentscript-frame.html', '_test_attachFrame2.js'),
SourcesTestRunner.dumpNavigatorView(contentScriptsNavigator, false);
TestRunner.markStep('detachFrame1');
await BindingsTestRunner.detachFrame('frame1', '_test_detachFrame1.js');
SourcesTestRunner.dumpNavigatorView(contentScriptsNavigator, false);
TestRunner.markStep('detachFrame2');
await BindingsTestRunner.detachFrame('frame2', '_test_detachFrame2.js');
SourcesTestRunner.dumpNavigatorView(contentScriptsNavigator, false);
TestRunner.completeTest();
})();