blob: 34d7ba3acdad2b6b6a2671c65171c82144bf576d [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 that JS object to node resolution still works even if script evals are prohibited by Content-Security-Policy. The test passes if it doesn't crash. Bug 78705.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
var remoteObject = await TestRunner.evaluateInPageRemoteObject('document');
TestRunner.addResult('didReceiveDocumentObject');
var nodeId = await TestRunner.DOMAgent.requestNode(remoteObject.objectId);
TestRunner.addResult('didRequestNode error = ' + (nodeId ? 'null' : 'error'));
TestRunner.completeTest();
})();