|
158 | 158 | "has max-age": function(c) { |
159 | 159 | assert.equal(c.maxAge, 1234); |
160 | 160 | }, |
161 | | - "has same-site 'none'": function(c) { |
162 | | - assert.equal(c.sameSite, "none"); |
| 161 | + "has same-site 'undefined'": function(c) { |
| 162 | + assert.equal(c.sameSite, undefined); |
163 | 163 | }, |
164 | 164 | "has extensions": function(c) { |
165 | 165 | assert.ok(c.extensions); |
@@ -677,19 +677,47 @@ vows |
677 | 677 | assert.equal(c.extensions, null); |
678 | 678 | } |
679 | 679 | }, |
680 | | - absent: { |
| 680 | + none: { |
681 | 681 | topic: function() { |
682 | | - return Cookie.parse("abc=xyzzy; SameSite=example.com") || null; |
| 682 | + return Cookie.parse("abc=xyz; SameSite=NoNe") || null; |
683 | 683 | }, |
684 | 684 | parsed: function(c) { |
685 | 685 | assert.ok(c); |
686 | 686 | }, |
687 | | - "is set to 'none' (by prototype)": function(c) { |
| 687 | + "is none (lowercased)": function(c) { |
688 | 688 | assert.equal(c.sameSite, "none"); |
689 | 689 | }, |
690 | 690 | "no extensions": function(c) { |
691 | 691 | assert.equal(c.extensions, null); |
692 | 692 | } |
| 693 | + }, |
| 694 | + bad: { |
| 695 | + topic: function() { |
| 696 | + return Cookie.parse("abc=xyzzy; SameSite=example.com") || null; |
| 697 | + }, |
| 698 | + parsed: function(c) { |
| 699 | + assert.ok(c); |
| 700 | + }, |
| 701 | + "is set to 'undefined'": function(c) { |
| 702 | + assert.equal(c.sameSite, undefined); |
| 703 | + }, |
| 704 | + "no extensions": function(c) { |
| 705 | + assert.equal(c.extensions, null); |
| 706 | + } |
| 707 | + }, |
| 708 | + absent: { |
| 709 | + topic: function() { |
| 710 | + return Cookie.parse("abc=xyzzy;") || null; |
| 711 | + }, |
| 712 | + parsed: function(c) { |
| 713 | + assert.ok(c); |
| 714 | + }, |
| 715 | + "is set to 'undefined'": function(c) { |
| 716 | + assert.equal(c.sameSite, undefined); |
| 717 | + }, |
| 718 | + "no extensions": function(c) { |
| 719 | + assert.equal(c.extensions, null); |
| 720 | + } |
693 | 721 | } |
694 | 722 | }, |
695 | 723 | "empty string": { |
|
0 commit comments