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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/custom-elements-helpers.js

Issue 2303013002: Add UMA metric to track usage of sending a mousedown to select elements. (Closed)
Patch Set: W3C auto test import CL. Created 4 years, 3 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 function create_window_in_test(t, srcdoc) {
2 let p = new Promise((resolve) => {
3 let f = document.createElement('iframe');
4 f.srcdoc = srcdoc ? srcdoc : '';
5 f.onload = (event) => {
6 let w = f.contentWindow;
7 t.add_cleanup(() => f.parentNode && f.remove());
8 resolve(w);
9 };
10 document.body.appendChild(f);
11 });
12 return p;
13 }
14
15 function test_with_window(f, name, srcdoc) {
16 promise_test((t) => {
17 return create_window_in_test(t, srcdoc)
18 .then((w) => {
19 f(w);
20 });
21 }, name);
22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698