blob: 22553d2a3f0793f812bdd7d338deb5d13a8190a1 [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 inline stylesheets do not appear in navigator.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
await TestRunner.loadHTML(`
<style>
</style>
`);
await TestRunner.evaluateInPageAnonymously(`
function injectStyleSheet()
{
var style = document.createElement('style');
style.textContent = '* {color: blue; }';
document.head.appendChild(style);
}
`);
Promise.all([UI.inspectorView.showPanel('sources'), TestRunner.evaluateInPageAnonymously('injectStyleSheet()')])
.then(onInjected);
function onInjected() {
var sourcesNavigator = new Sources.NetworkNavigatorView();
SourcesTestRunner.dumpNavigatorView(sourcesNavigator);
TestRunner.completeTest();
}
})();