File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 < meta name ="timeout " content ="long ">
88 < script src ="/resources/testharness.js "> </ script >
99 < script src ="/resources/testharnessreport.js "> </ script >
10- < script src ="/cookies/resources/cookie-test.js "> </ script >
10+ < script src ="/resources/testdriver.js "> </ script >
11+ < script src ="/resources/testdriver-vendor.js "> </ script >
1112 </ head >
1213 < body >
1314 < script >
Original file line number Diff line number Diff line change 77 < meta name ="timeout " content ="long ">
88 < script src ="/resources/testharness.js "> </ script >
99 < script src ="/resources/testharnessreport.js "> </ script >
10+ < script src ="/resources/testdriver.js "> </ script >
11+ < script src ="/resources/testdriver-vendor.js "> </ script >
1012 < script src ="/cookies/resources/cookie-test.js "> </ script >
1113 </ head >
1214 < body >
Original file line number Diff line number Diff line change 66 < meta name =help href ="https://tools.ietf.org/html/rfc6265#section-5.2.3 ">
77 < meta name ="timeout " content ="long ">
88 < script src ="/resources/testharness.js "> </ script >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/resources/cookie-test.js "> </ script >
1012 </ head >
1113 < body >
Original file line number Diff line number Diff line change 1- function expireCookie ( cookie ) {
2- const cookies = Array . isArray ( cookie ) ? cookie : [ cookie ] ;
3- for ( let c of cookies ) {
4- document . cookie = c += "; max-age=0" ;
5- }
6- }
7-
8- function getCookies ( ) {
9- return document . cookie ;
10- }
11-
1+ // Note: this function has a dependency on testdriver.js. Any test files calling
2+ // it should include testdriver.js and testdriver-vendor.js
123window . addEventListener ( "message" , ( e ) => {
13- if ( e . data == "getCookies" ) {
14- const cookies = getCookies ( ) ;
15- e . source . postMessage ( { "cookies" : cookies } , '*' ) ;
4+ let test_window = window . top ;
5+ while ( test_window . opener && ! test_window . opener . closed ) {
6+ test_window = test_window . opener . top ;
167 }
17-
18- if ( typeof e . data == "object" && 'expireCookie' in e . data ) {
19- expireCookie ( e . data . expireCookie ) ;
20- e . source . postMessage ( "expired" , '*' ) ;
8+ test_driver . set_test_context ( test_window ) ;
9+ if ( e . data == "getAndExpireCookiesForRedirectTest" ) {
10+ const cookies = document . cookie ;
11+ test_driver . delete_all_cookies ( ) . then ( ( ) => {
12+ e . source . postMessage ( { "cookies" : cookies } , '*' ) ;
13+ } ) ;
2114 }
2215} ) ;
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
Original file line number Diff line number Diff line change 66 < meta name =help href ="http://tools.ietf.org/html/rfc6265#section-5.1.4 ">
77</ head >
88< body >
9+ < script src ="/resources/testdriver.js "> </ script >
10+ < script src ="/resources/testdriver-vendor.js "> </ script >
911 < script src ="/cookies/attributes/resources/path-redirect-shared.js "> </ script >
1012</ body >
1113</ html >
You can’t perform that action at this time.
0 commit comments