blob: a7c9b5b7bc6ffb6f1182ce3c8c3e5ca02e95e84a [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 elements panel updates dom tree structure upon setting attribute on non HTML elements. PASSes if there is no crash.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
await TestRunner.navigatePromise('resources/set-attribute-non-html.svg');
var targetNode;
TestRunner.runTestSuite([
function testDumpInitial(next) {
function callback(node) {
targetNode = node;
next();
}
ElementsTestRunner.selectNodeWithId('node', callback);
},
function testSetAttributeText(next) {
function callback(error) {
next();
}
targetNode.setAttribute('foo', 'foo2=\'baz2\' foo3=\'baz3\'', callback);
}
]);
})();