Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-focus.js

Issue 2955943002: DevTools: migrate inspector-protocol/dom tests to a new test runner (Closed)
Patch Set: rebaseline Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 (async function(testRunner) {
2 var {page, session, dp} = await testRunner.startHTML(`
3 <input></input>
4 <input id='second'></input>
5 `, '');
6
7 testRunner.log(await session.evaluate(getActiveElement));
8 var document = (await dp.DOM.getDocument()).result.root;
9 var node = (await dp.DOM.querySelector({nodeId: document.nodeId, selector: '#s econd'})).result;
10 await dp.DOM.focus({nodeId: node.nodeId});
11 testRunner.log(await session.evaluate(getActiveElement));
12 testRunner.completeTest();
13
14 function getActiveElement() {
15 var el = document.activeElement;
16 return el ? (el.id || el.tagName) : '(none)';
17 }
18 })
19
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698