3333 } ) ;
3434} ( ) ) ;
3535
36- window . submitToServer = function ( ) {
37- stop ( ) ;
38- return {
39- then : function ( afterLoading ) {
40- var iframe = document . getElementById ( 'post_iframe' ) ;
41- var form = document . getElementById ( 'post_form' ) ;
42- iframe . onload = function ( ) {
43- start ( ) ;
44- afterLoading . call ( null , iframe . contentWindow . Cookies ) ;
45- } ;
46- form . action = 'post_iframe.html?bust=' . concat ( + new Date ( ) ) ;
47- form . submit ( ) ;
48- }
49- } ;
50- } ;
51-
5236var lifecycle = {
5337 teardown : function ( ) {
5438 Cookies . defaults = { } ;
@@ -375,7 +359,7 @@ test('RFC 6265 - disallowed characters in cookie-name', function () {
375359 Cookies . remove ( ' ' ) ;
376360} ) ;
377361
378- test ( 'cookie-name - browser processing for 2 bytes characters' , function ( ) {
362+ test ( 'cookie-name - 2 bytes characters' , function ( ) {
379363 expect ( 2 ) ;
380364
381365 Cookies . set ( 'ã' , 'v' ) ;
@@ -384,7 +368,7 @@ test('cookie-name - browser processing for 2 bytes characters', function () {
384368 Cookies . remove ( 'ã' ) ;
385369} ) ;
386370
387- test ( 'cookie-name - browser processing for 3 bytes characters' , function ( ) {
371+ test ( 'cookie-name - 3 bytes characters' , function ( ) {
388372 expect ( 2 ) ;
389373
390374 Cookies . set ( '₯' , 'v' ) ;
@@ -393,7 +377,7 @@ test('cookie-name - browser processing for 3 bytes characters', function () {
393377 Cookies . remove ( '₯' ) ;
394378} ) ;
395379
396- test ( 'cookie-name - browser processing for 4 bytes characters' , function ( ) {
380+ test ( 'cookie-name - 4 bytes characters' , function ( ) {
397381 expect ( 2 ) ;
398382
399383 Cookies . set ( '𩸽' , 'v' ) ;
@@ -402,7 +386,7 @@ test('cookie-name - browser processing for 4 bytes characters', function () {
402386 Cookies . remove ( '𩸽' ) ;
403387} ) ;
404388
405- test ( 'cookie-value - browser processing for 2 bytes characters' , function ( ) {
389+ test ( 'cookie-value - 2 bytes characters' , function ( ) {
406390 expect ( 2 ) ;
407391
408392 Cookies . set ( 'c' , 'ã' ) ;
@@ -411,7 +395,7 @@ test('cookie-value - browser processing for 2 bytes characters', function () {
411395 Cookies . remove ( 'c' ) ;
412396} ) ;
413397
414- test ( 'cookie-value - browser processing for 3 bytes characters' , function ( ) {
398+ test ( 'cookie-value - 3 bytes characters' , function ( ) {
415399 expect ( 2 ) ;
416400
417401 Cookies . set ( 'c' , '₯' ) ;
@@ -420,7 +404,7 @@ test('cookie-value - browser processing for 3 bytes characters', function () {
420404 Cookies . remove ( 'c' ) ;
421405} ) ;
422406
423- test ( 'cookie-value - browser processing for 4 bytes characters' , function ( ) {
407+ test ( 'cookie-value - 4 bytes characters' , function ( ) {
424408 expect ( 2 ) ;
425409
426410 Cookies . set ( 'c' , '𩸽' ) ;
@@ -429,30 +413,6 @@ test('cookie-value - browser processing for 4 bytes characters', function () {
429413 Cookies . remove ( 'c' ) ;
430414} ) ;
431415
432- //test('server processing for 2 bytes characters', function () {
433- // expect(1);
434- // Cookies.set('ã', 'ã');
435- // window.submitToServer().then(function (Cookies) {
436- // strictEqual(Cookies.get('ã'), 'ã', 'should handle ã character');
437- // });
438- //});
439- //
440- //test('server processing for 3 bytes characters', function () {
441- // expect(1);
442- // Cookies.set('₯', '₯');
443- // window.submitToServer().then(function (Cookies) {
444- // strictEqual(Cookies.get('₯'), '₯', 'should handle ₯ character');
445- // });
446- //});
447- //
448- //test('server processing for 4 bytes characters', function () {
449- // expect(1);
450- // Cookies.set('𩸽', '𩸽');
451- // window.submitToServer().then(function (Cookies) {
452- // strictEqual(Cookies.get('𩸽'), '𩸽', 'should handle 𩸽 character');
453- // });
454- //});
455-
456416module ( 'removeCookie' , lifecycle ) ;
457417
458418test ( 'deletion' , function ( ) {
0 commit comments