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

Side by Side Diff: LayoutTests/http/tests/dom/location-stringify.html

Issue 1193793003: bindings: Makes almost all attributes accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function log(str) 4 function log(str)
5 { 5 {
6 var li = document.createElement("li"); 6 var li = document.createElement("li");
7 li.appendChild(document.createTextNode(str)); 7 li.appendChild(document.createTextNode(str));
8 var console = document.getElementById("console"); 8 var console = document.getElementById("console");
9 console.appendChild(li); 9 console.appendChild(li);
10 } 10 }
11 11
12 function assertEqual(message, actual, expected) 12 function assertEqual(message, actual, expected)
13 { 13 {
14 if (actual != expected) 14 if (actual != expected)
15 log("\n" + message + ": Failure, actual: " + actual + "; expected: " + e xpected); 15 log("\n" + message + ": Failure, actual: " + actual + "; expected: " + e xpected);
16 else 16 else
17 log("\n" + message + ": Success"); 17 log("\n" + message + ": Success");
18 } 18 }
19 19
20 function runTests() { 20 function runTests() {
21 if (window.testRunner) { 21 if (window.testRunner) {
22 testRunner.dumpAsText(); 22 testRunner.dumpAsText();
23 } 23 }
24 assertEqual("stringify", JSON.stringify(window.location), '{"hash":"","searc h":"","pathname":"/dom/location-stringify.html","port":"8000","hostname":"127.0. 0.1","host":"127.0.0.1:8000","protocol":"http:","origin":"http://127.0.0.1:8000" ,"href":"http://127.0.0.1:8000/dom/location-stringify.html","ancestorOrigins":{} }'); 24 assertEqual("stringify", JSON.stringify(window.location), '{"ancestorOrigins ":{},"href":"http://127.0.0.1:8000/dom/location-stringify.html","origin":"http:/ /127.0.0.1:8000","protocol":"http:","host":"127.0.0.1:8000","hostname":"127.0.0. 1","port":"8000","pathname":"/dom/location-stringify.html","search":"","hash":"" }');
25 } 25 }
26 </script> 26 </script>
27 </head> 27 </head>
28 <body onload="runTests();"> 28 <body onload="runTests();">
29 <p> 29 <p>
30 Tests that Location interface is [Unforgeable], thus JSON.stringify() works well for Location objects. 30 Tests that Location interface is [Unforgeable], thus JSON.stringify() works well for Location objects.
31 </p> 31 </p>
32 <ul id="console" dir=ltr></ul> 32 <ul id="console" dir=ltr></ul>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698