self.ElementsTestRunner=self.ElementsTestRunner||{},ElementsTestRunner.doAddAttribute=function(e,t,n,s){ElementsTestRunner.domActionTestForNodeId(e,t,(function(e,t){ElementsTestRunner.editNodePart(e,"webkit-html-attribute"),eventSender.keyDown("Tab"),TestRunner.deprecatedRunAfterPendingDispatches((function(){const e=ElementsTestRunner.firstElementsTreeOutline()._shadowRoot.getSelection().anchorNode.parentElement;e.textContent=n,e.dispatchEvent(TestRunner.createKeyEvent("Enter")),TestRunner.addSniffer(Elements.ElementsTreeOutline.prototype,"_updateModifiedNodes",t)}))}),s)},ElementsTestRunner.domActionTestForNodeId=function(e,t,n,s){ElementsTestRunner.domActionTest(e,(function(e,n){ElementsTestRunner.selectNodeWithId(t,n)}),n,s)},ElementsTestRunner.domActionTest=function(e,t,n,s){const r=ElementsTestRunner.expandedNodeWithId(e);function d(e){n(e,u)}function u(){TestRunner.addResult("==== after ===="),ElementsTestRunner.dumpElementsTree(r),s()}TestRunner.addResult("==== before ===="),ElementsTestRunner.dumpElementsTree(r),t(r,(function(e){TestRunner.deprecatedRunAfterPendingDispatches(d.bind(null,e))}))},ElementsTestRunner.editNodePart=function(e,t){const n=ElementsTestRunner.firstElementsTreeOutline().findTreeElement(e);let s=n.listItemElement.getElementsByClassName(t)[0];return!s&&n.childrenListElement&&(s=n.childrenListElement.getElementsByClassName(t)[0]),n._startEditingTarget(s),s},ElementsTestRunner.editNodePartAndRun=function(e,t,n,s,r){const d=ElementsTestRunner.editNodePart(e,t);d.textContent=n,d.dispatchEvent(TestRunner.createKeyEvent("Enter")),r?TestRunner.addSniffer(Elements.ElementsTreeOutline.prototype,"_updateModifiedNodes",s):TestRunner.deprecatedRunAfterPendingDispatches(s)};