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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/embedded-enforcement/iframe-csp-attribute.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 years, 10 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <script>
9 test(t => {
10 var i = document.createElement('iframe');
11 assert_equals('', i.csp);
12 assert_true('csp' in i);
13 assert_equals('string', typeof i.csp);
14 }, "<iframe> has a 'csp' attibute which is an empty string if undefined.") ;
15
16 test(t => {
17 var i = document.createElement('iframe');
18 i.setAttribute('csp', 123456);
19 assert_equals('123456', i.csp);
20 }, "<iframe>'s csp attribute is always a string.");
21
22 test(t => {
23 var i = document.createElement('iframe');
24 i.csp = 'value';
25 assert_equals('value', i.getAttribute('csp'));
26 }, "<iframe>'s 'csp content attribute reflects the IDL attribute.");
27
28 test(t => {
29 var i = document.createElement('iframe');
30 i.setAttribute('csp', 'value');
31 assert_equals('value', i.csp);
32 }, "<iframe>'s IDL attribute reflects the DOM attribute.");
33 </script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698