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

Side by Side Diff: LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="resources/cross-frame-access.js"></script> 3 <script src="resources/cross-frame-access.js"></script>
4 <script> 4 <script>
5 var windowConstructorPropertiesNotAllowed = [ 5 var windowConstructorPropertiesNotAllowed = [
6 "Attr", 6 "Attr",
7 "Audio", 7 "Audio",
8 "CDATASection", 8 "CDATASection",
9 "CSSPrimitiveValue", 9 "CSSPrimitiveValue",
10 "CSSRule", 10 "CSSRule",
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 ]; 276 ];
277 for (var i = 0; i < locationProperties.length; i++) 277 for (var i = 0; i < locationProperties.length; i++)
278 shouldBeFalse("canGetDescriptor(targetLocation, '" + locationPro perties[i] + "')"); 278 shouldBeFalse("canGetDescriptor(targetLocation, '" + locationPro perties[i] + "')");
279 var locationPropertiesAllowed = [ 279 var locationPropertiesAllowed = [
280 "assign", "replace" 280 "assign", "replace"
281 ]; 281 ];
282 for (var i = 0; i < locationPropertiesAllowed.length; i++) 282 for (var i = 0; i < locationPropertiesAllowed.length; i++)
283 shouldBeTrue("canGetDescriptor(targetLocation, '" + locationProp ertiesAllowed[i] + "')"); 283 shouldBeTrue("canGetDescriptor(targetLocation, '" + locationProp ertiesAllowed[i] + "')");
284 284
285 log("----- tests access to cross domain history object -----"); 285 log("----- tests access to cross domain history object -----");
286 window.targetHistory = targetWindow.history; 286 shouldThrowException("targetWindow.history");
287 var historyProperties = [
288 "length", "back", "forward", "go", "pushState", "replaceState", "customProperty"
289 ];
290 for (var i = 0; i < historyProperties.length; i++)
291 shouldBeFalse("canGetDescriptor(targetHistory, '" + historyPrope rties[i] + "')");
292 } 287 }
293 </script> 288 </script>
294 </head> 289 </head>
295 <body> 290 <body>
296 <p>This test checks cross-frame access security of getOwnPropertyDescriptor (htt ps://bugs.webkit.org/show_bug.cgi?id=32119).</p> 291 <p>This test checks cross-frame access security of getOwnPropertyDescriptor (htt ps://bugs.webkit.org/show_bug.cgi?id=32119).</p>
297 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe> 292 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe>
298 <pre id="console"></pre> 293 <pre id="console"></pre>
299 </body> 294 </body>
300 </html> 295 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698