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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/detached-window-cross-origin-access.html

Issue 2706923002: Rework security checks to be based on Window rather than Frame. (Closed)
Patch Set: Do not hardcode V8Window::wrapperTypeInfo 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script>
7 var t = async_test("Test that cross-origin access on a detached window throws a SecurityError.");
8 window.onload = t.step_func(function () {
9 var detachedWindow = window[0];
10 document.querySelector('iframe').remove();
11 test(function() {
12 assert_throws("SecurityError", function () {
13 window.requestAnimationFrame.call(detachedWindow, function () { });
14 });
15 }, "method call with detached window receiver should throw");
16 test(function() {
17 assert_throws("SecurityError", function () {
18 Object.getOwnPropertyDescriptor(window, "document").get.call(detachedWindo w);
19 });
20 }, "attribute access with detached window receiver should throw");
21 t.done();
22 });
23 </script>
24 </head>
25 <body>
26 <iframe src="data:text/html,"></iframe>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698