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

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

Issue 2823103002: [Devtools] Fixed cookie size from being off by 1 byte (Closed)
Patch Set: [Devtools] Fixed cookie size from being off by 1 byte Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/components/cookie-parser-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 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 {
(...skipping 28 matching lines...) Expand all
39 { 39 {
40 var parser = new SDK.CookieParser(); 40 var parser = new SDK.CookieParser();
41 InspectorTest.addResult("source: " + header); 41 InspectorTest.addResult("source: " + header);
42 InspectorTest.dumpCookies(parser.parseSetCookie(header)); 42 InspectorTest.dumpCookies(parser.parseSetCookie(header));
43 } 43 }
44 44
45 } 45 }
46 46
47 var test = function() 47 var test = function()
48 { 48 {
49 InspectorTest.addResult("Make sure we always add 1 byte for the trailing \\n of the cookie (ie: 4 bytes).");
50 InspectorTest.addResult("Should be 4: " + (new SDK.CookieParser()).parseSetC ookie("a=b")[0].size());
51 InspectorTest.addResult("");
52
49 InspectorTest.parseAndDumpCookie("cookie=value"); 53 InspectorTest.parseAndDumpCookie("cookie=value");
50 InspectorTest.parseAndDumpCookie("$version=1; a=b,c = d, e=f"); 54 InspectorTest.parseAndDumpCookie("$version=1; a=b,c = d, e=f");
51 InspectorTest.parseAndDumpCookie("$version=1; a=b;c = d; e =f"); 55 InspectorTest.parseAndDumpCookie("$version=1; a=b;c = d; e =f");
52 InspectorTest.parseAndDumpCookie("cooke1 = value1; another cookie = another value"); 56 InspectorTest.parseAndDumpCookie("cooke1 = value1; another cookie = another value");
53 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com;"); 57 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com;");
54 InspectorTest.parseAndDumpCookie("cooke1 = value; $Path=/; $Domain=.example. com ; Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.com;"); 58 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; "); 59 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;"); 60 InspectorTest.parseAndDumpCookie("$version =1; cooke1 = value; $Path=/; $Dom ain =.example.com; \n Cookie2 = value2; $Path = /foo; $DOMAIN = foo.example.c om;");
57 61
58 InspectorTest.parseAndDumpSetCookie("cookie=value"); 62 InspectorTest.parseAndDumpSetCookie("cookie=value");
59 InspectorTest.parseAndDumpSetCookie("a=b\n c=d\n f"); 63 InspectorTest.parseAndDumpSetCookie("a=b\n c=d\n f");
60 InspectorTest.parseAndDumpSetCookie("cooke1 = value; Path=/; Domain=.example .com;"); 64 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"); 65 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;"); 66 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;"); 67 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; SameS ite=Lax;"); 68 InspectorTest.parseAndDumpSetCookie("cooke1 = value; HttpOnly; Secure; SameS ite=Lax;");
65 InspectorTest.parseAndDumpSetCookie("cooke1 = value; HttpOnly; Secure; SameS ite=Secure;"); 69 InspectorTest.parseAndDumpSetCookie("cooke1 = value; HttpOnly; Secure; SameS ite=Secure;");
66 InspectorTest.parseAndDumpSetCookie("cooke1; Path=/; Domain=.example.com;"); 70 InspectorTest.parseAndDumpSetCookie("cooke1; Path=/; Domain=.example.com;");
67 InspectorTest.parseAndDumpSetCookie("cooke1=; Path=/; Domain=.example.com;") ; 71 InspectorTest.parseAndDumpSetCookie("cooke1=; Path=/; Domain=.example.com;") ;
68 InspectorTest.completeTest(); 72 InspectorTest.completeTest();
69 } 73 }
70 74
71 </script> 75 </script>
72 </head> 76 </head>
73 <body onload="runTest()"> 77 <body onload="runTest()">
74 <p>Tests inspector cookie parser</p> 78 <p>Tests inspector cookie parser</p>
75 </body> 79 </body>
76 </html> 80 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/components/cookie-parser-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698