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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webusb/resources/featurepolicytest.js

Issue 2815003005: Integrate WebUSB with Feature Policy (Closed)
Patch Set: Add Feature Policy tests that set headers Created 3 years, 7 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 assert_usb_available_in_iframe(test, origin, expected) {
2 let frame = document.createElement('iframe');
3 frame.src = origin + '/webusb/resources/check-availability.html';
4
5 window.addEventListener('message', test.step_func(evt => {
6 if (evt.source == frame.contentWindow) {
7 assert_equals(evt.data, expected);
8 document.body.removeChild(frame);
9 test.done();
10 }
11 }));
12
13 document.body.appendChild(frame);
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698