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

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

Issue 2705783004: Throw security errors for attribute access on detached windows. (Closed)
Patch Set: 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 <script>
7 var accessTest = async_test("Test cross-origin access on a detached window");
8 window.onload = accessTest.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");
16 test(function() {
dcheng 2017/02/19 09:05:51 This is a bit unsatisfactory, but otherwise, the t
17 assert_throws("SecurityError", function () {
18 Object.getOwnPropertyDescriptor(window, "document").get.call(detachedWindo w);
19 });
20 }, "attribute access with detached window receiver");
21 accessTest.done();
22 });
23 </script>
24 </head>
25 <body>
26 <iframe src="http://localhost:8000/http/tests/security/resources/blank.html"></i frame>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698