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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/promise-realm.html

Issue 2713413002: Blink bindings: use v8 to enforce method call access checks (Closed)
Patch Set: Restore comment Created 3 years, 9 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <iframe id="same-origin-window"></iframe> 8 <iframe id="same-origin-window"></iframe>
9 <iframe id="cross-origin-window" src="//www1.web-paltform.test/resources/dummy.h tml"></iframe> 9 <iframe id="cross-origin-window" src="//www1.web-paltform.test/resources/dummy.h tml"></iframe>
10 <script defer> 10 <script defer>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 p = fetch.call(same); 43 p = fetch.call(same);
44 assert_equals( 44 assert_equals(
45 p.constructor.constructor, 45 p.constructor.constructor,
46 Function, 46 Function,
47 "type mismatch error, case 3"); 47 "type mismatch error, case 3");
48 p.then(() => { 48 p.then(() => {
49 assert_unreached("type mismatch error, case 3: must be a reject promise"); 49 assert_unreached("type mismatch error, case 3: must be a reject promise");
50 }); 50 });
51 51
52 p = fetch.call(cross, 'resources/dummy.html'); 52 assert_throws("SecurityError", function () {
53 assert_equals( 53 fetch.call(cross, 'resources/dummy.html')
54 p.constructor.constructor,
55 Function,
56 "cross origin access");
57 p.then(() => {
58 assert_unreached("cross origin access: must be a reject promise");
59 }); 54 });
60 }, "Reject promises must be created in the current realm"); 55 }, "Reject promises must be created in the current realm");
61 56
62 done(); 57 done();
63 58
64 }; 59 };
65 </script> 60 </script>
66 </body> 61 </body>
67 </html> 62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698