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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/components/cookie-parser.html

Issue 1615773005: Rename first-party-only cookies to same-site cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests. Created 4 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 5
6 function initialize_CookieTests() 6 function initialize_CookieTests()
7 { 7 {
8 8
9 InspectorTest.dumpCookie = function(cookie) 9 InspectorTest.dumpCookie = function(cookie)
10 { 10 {
11 var requestDate = new Date("Mon Oct 18 2010 17:00:00 GMT+0000"); 11 var requestDate = new Date("Mon Oct 18 2010 17:00:00 GMT+0000");
12 var expires = cookie.expiresDate(requestDate); 12 var expires = cookie.expiresDate(requestDate);
13 13
14 var output = "name: " + cookie.name() + ", value: " + cookie.value() + ", ht tpOnly: " + cookie.httpOnly() + 14 var output = "name: " + cookie.name() + ", value: " + cookie.value() + ", ht tpOnly: " + cookie.httpOnly() +
15 ", first-party-only: " + cookie.firstPartyOnly() + ", secure: " + cookie .secure() + 15 ", sameSite: " + cookie.sameSite() + ", secure: " + cookie.secure() +
16 ", session: " + cookie.session() + ", path: " + cookie.path() + 16 ", session: " + cookie.session() + ", path: " + cookie.path() +
17 ", domain: " + cookie.domain() + ", port: " + cookie.port() + 17 ", domain: " + cookie.domain() + ", port: " + cookie.port() +
18 ", expires: " + (expires ? expires.getTime() : "n/a") + 18 ", expires: " + (expires ? expires.getTime() : "n/a") +
19 ", size: " + cookie.size(); 19 ", size: " + cookie.size();
20 20
21 InspectorTest.addResult(output); 21 InspectorTest.addResult(output);
22 InspectorTest.addObject(cookie.attributes()); 22 InspectorTest.addObject(cookie.attributes());
23 } 23 }
24 24
25 InspectorTest.dumpCookies = function(cookies) 25 InspectorTest.dumpCookies = function(cookies)
(...skipping 28 matching lines...) Expand all
54 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com ; Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.com;"); 54 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com ; Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.com;");
55 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com\nCookie2 = value2; $Path = /foo; $DOMAIN = foo.example.com; "); 55 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com\nCookie2 = value2; $Path = /foo; $DOMAIN = foo.example.com; ");
56 InspectorTest.parseAndDumpCookie("$version =1; cooke1 = value; $Path=/; $Dom ain =.example.com; \n Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.c om;"); 56 InspectorTest.parseAndDumpCookie("$version =1; cooke1 = value; $Path=/; $Dom ain =.example.com; \n Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.c om;");
57 57
58 InspectorTest.parseAndDumpSetCookie("cookie=value"); 58 InspectorTest.parseAndDumpSetCookie("cookie=value");
59 InspectorTest.parseAndDumpSetCookie("a=b\n c=d\n f"); 59 InspectorTest.parseAndDumpSetCookie("a=b\n c=d\n f");
60 InspectorTest.parseAndDumpSetCookie("cooke1 = value; Path=/; Domain=.example .com;"); 60 InspectorTest.parseAndDumpSetCookie("cooke1 = value; Path=/; Domain=.example .com;");
61 InspectorTest.parseAndDumpSetCookie("cooke1 = value; Path=/; Domain= .examp le.com \nCookie2 = value2; Path = /foo; Domain = foo.example.com"); 61 InspectorTest.parseAndDumpSetCookie("cooke1 = value; Path=/; Domain= .examp le.com \nCookie2 = value2; Path = /foo; Domain = foo.example.com");
62 InspectorTest.parseAndDumpSetCookie("cooke1 = value; expires = Mon, Oct 18 2 010 17:00 GMT+0000; Domain =.example.com\nCookie2 = value2; Path = /foo; DOMAI N = foo.example.com; HttpOnly; Secure; Discard;"); 62 InspectorTest.parseAndDumpSetCookie("cooke1 = value; expires = Mon, Oct 18 2 010 17:00 GMT+0000; Domain =.example.com\nCookie2 = value2; Path = /foo; DOMAI N = foo.example.com; HttpOnly; Secure; Discard;");
63 InspectorTest.parseAndDumpSetCookie("cooke1 = value; max-age= 1440; Domain =.example.com\n Cookie2 = value2; Path = /foo; DOMAIN = foo.example.com; HttpOn ly; Secure; Discard;"); 63 InspectorTest.parseAndDumpSetCookie("cooke1 = value; max-age= 1440; Domain =.example.com\n Cookie2 = value2; Path = /foo; DOMAIN = foo.example.com; HttpOn ly; Secure; Discard;");
64 InspectorTest.parseAndDumpSetCookie("cooke1 = value; HttpOnly; Secure; First -Party-Only;"); 64 InspectorTest.parseAndDumpSetCookie("cooke1 = value; HttpOnly; Secure; SameS ite;");
65 InspectorTest.parseAndDumpSetCookie("cooke1; Path=/; Domain=.example.com;"); 65 InspectorTest.parseAndDumpSetCookie("cooke1; Path=/; Domain=.example.com;");
66 InspectorTest.parseAndDumpSetCookie("cooke1=; Path=/; Domain=.example.com;") ; 66 InspectorTest.parseAndDumpSetCookie("cooke1=; Path=/; Domain=.example.com;") ;
67 InspectorTest.completeTest(); 67 InspectorTest.completeTest();
68 } 68 }
69 69
70 </script> 70 </script>
71 </head> 71 </head>
72 <body onload="runTest()"> 72 <body onload="runTest()">
73 <p>Tests inspector cookie parser</p> 73 <p>Tests inspector cookie parser</p>
74 </body> 74 </body>
75 </html> 75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698