Changeset 154505 in webkit
- Timestamp:
- Aug 23, 2013 12:17:58 PM (11 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154500 r154505 1 2013-08-23 Alexey Proskuryakov <ap@apple.com> 2 3 http/tests/cache/partitioned-cache.html breaks subsequent cookie tests 4 https://bugs.webkit.org/show_bug.cgi?id=120212 5 6 Reviewed by Tim Horton. 7 8 The test never deleted its localhost cookie, so subsequent third party cookie 9 relaxing tests saw the existing cookie and failed. 10 11 There is no need to use cookies in this test, and it's actually slightly incorrect, 12 as the network layer may refuse to use a cached result simply because cookies changed, 13 and then we wouldn't test 3rd party data blocking. 14 15 * platform/qt/http/tests/cache/partitioned-cache-expected.txt: 16 * http/tests/cache/partitioned-cache-expected.txt: Updated results. It took me 17 a long time to understand what the test was doing, so made it a bit more self-descriptive. 18 19 * http/tests/cache/partitioned-cache.html: Tabs to spaces. 20 21 * http/tests/cache/resources/echo-cookie.cgi: Removed. 22 * http/tests/cache/resources/partitioned-cache-echo-state.php: Added. 23 * http/tests/cache/resources/partitioned-cache-loader.html: 24 Changed to use a local file on the server to modify resource content. 25 1 26 2013-08-23 Bear Travis <betravis@adobe.com> 2 27 -
trunk/LayoutTests/http/tests/cache/partitioned-cache-expected.txt
r151705 r154505 1 CONSOLE MESSAGE: line 10: localhost 2 CONSOLE MESSAGE: line 10: 127.0.0.1 1 CONSOLE MESSAGE: line 13: Document domain is now localhost 2 CONSOLE MESSAGE: line 14: Setting server-side persistent state to "localhost" 3 CONSOLE MESSAGE: line 23: Server state retrieved via a 1st party resource: "localhost" 4 CONSOLE MESSAGE: line 13: Document domain is now 127.0.0.1 5 CONSOLE MESSAGE: line 14: Setting server-side persistent state to "127.0.0.1" 6 CONSOLE MESSAGE: line 26: Server state retrieved via a 3rd party resource (possibly a cached result, but it shouldn't be): "127.0.0.1" 3 7 PASS response is "127.0.0.1" 4 8 -
trunk/LayoutTests/http/tests/cache/partitioned-cache.html
r143986 r154505 3 3 <script> 4 4 if (window.testRunner) { 5 testRunner.dumpAsText(); 6 testRunner.dumpChildFramesAsText(); 7 testRunner.waitUntilDone(); 8 testRunner.setCanOpenWindows(true); 9 testRunner.setCloseRemainingWindowsWhenComplete(true); 10 internals.settings.setStorageBlockingPolicy('BlockThirdParty'); 5 testRunner.dumpAsText(); 6 testRunner.dumpChildFramesAsText(); 7 testRunner.waitUntilDone(); 8 internals.settings.setStorageBlockingPolicy('BlockThirdParty'); 11 9 } 12 10 -
trunk/LayoutTests/http/tests/cache/resources/partitioned-cache-loader.html
r143986 r154505 3 3 <script src="../../resources/js-test-pre.js"></script> 4 4 <script> 5 var scriptElement = document.createElement('script'); 6 document.cookie = 'value=' + document.domain; 7 scriptElement.setAttribute('src', 'http://localhost:8000/cache/resources/echo-cookie.cgi'); 8 document.head.appendChild(scriptElement); 9 window.onload = function() { 10 console.log(response); 11 shouldBeEqualToString('response', document.domain); 12 if (document.domain == 'localhost') { 13 document.cookie = 'value=127.0.0.1'; 14 document.location = 'http://127.0.0.1:8000/cache/resources/partitioned-cache-loader.html'; 15 } else if (window.testRunner) { 16 internals.settings.setStorageBlockingPolicy('AllowAll'); 17 testRunner.notifyDone(); 18 } 19 }; 5 function setServerState(string) 6 { 7 var xhr = new XMLHttpRequest; 8 xhr.open('POST', '/resources/write-temp-file.php?filename=partitioned-cache-state&data=' + string, false); 9 xhr.send(); 10 } 11 12 console.log('Document domain is now ' + document.domain); 13 console.log('Setting server-side persistent state to "' + document.domain + '"'); 14 setServerState(document.domain); 15 16 var scriptElement = document.createElement('script'); 17 scriptElement.setAttribute('src', 'http://localhost:8000/cache/resources/partitioned-cache-echo-state.php'); 18 document.head.appendChild(scriptElement); 19 20 window.onload = function() { 21 if (document.domain == 'localhost') { 22 console.log('Server state retrieved via a 1st party resource: "' + response + '"'); 23 document.location = 'http://127.0.0.1:8000/cache/resources/partitioned-cache-loader.html'; 24 } else { 25 console.log('Server state retrieved via a 3rd party resource (possibly a cached result, but it shouldn\'t be): "' + response + '"'); 26 shouldBeEqualToString('response', document.domain); 27 if (window.testRunner) { 28 internals.settings.setStorageBlockingPolicy('AllowAll'); 29 testRunner.notifyDone(); 30 } 31 } 32 } 20 33 </script> 21 34 </head> -
trunk/LayoutTests/platform/qt/http/tests/cache/partitioned-cache-expected.txt
r151732 r154505 1 CONSOLE MESSAGE: line 10: localhost 2 CONSOLE MESSAGE: line 10: localhost 1 CONSOLE MESSAGE: line 13: Document domain is now localhost 2 CONSOLE MESSAGE: line 14: Setting server-side persistent state to "localhost" 3 CONSOLE MESSAGE: line 23: Server state retrieved via a 1st party resource: "localhost" 4 CONSOLE MESSAGE: line 13: Document domain is now 127.0.0.1 5 CONSOLE MESSAGE: line 14: Setting server-side persistent state to "127.0.0.1" 6 CONSOLE MESSAGE: line 26: Server state retrieved via a 3rd party resource (possibly a cached result, but it shouldn't be): "localhost" 3 7 FAIL response should be 127.0.0.1. Was localhost. 4 8
Note: See TracChangeset
for help on using the changeset viewer.