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

Side by Side Diff: LayoutTests/fast/dom/Document/location-unforgeable.html

Issue 884213006: Make document.location unforgeable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: drop DoNotCheckSecurity Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLDocument/document-special-properties-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Document has an unforgeable attribute location</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script>
6 // https://html.spec.whatwg.org/#document
7 // https://heycam.github.io/webidl/#Unforgeable
8 test(function() {
9 assert_true(document.hasOwnProperty("location"), "property exist on the obje ct itself");
10 var descriptor = Object.getOwnPropertyDescriptor(document, "location");
11 assert_false(descriptor.configurable, "property is not configurable");
12 assert_throws(new TypeError(), function() {
13 Object.defineProperty(document, "location", {get: function () {}});
14 }, "attempting to modify property throws TypeError");
15 });
16 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLDocument/document-special-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698