Changeset 249746 in webkit
- Timestamp:
- Sep 10, 2019 5:35:19 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249744 r249746 1 2019-09-10 Chris Dumez <cdumez@apple.com> 2 3 Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/cookies/private-cookie-storage.html 4 https://bugs.webkit.org/show_bug.cgi?id=201648 5 6 Reviewed by Alex Christensen. 7 8 Use testRunner.setShouldSwapToEphemeralSessionOnNextNavigation() / setShouldSwapToDefaultSessionOnNextNavigation() to 9 truly switch session on WebKit2 instead of using the testRunner.setPrivateBrowsingEnabled_DEPRECATED() hack. 10 11 * http/tests/cookies/private-cookie-storage-expected.txt: 12 * http/tests/cookies/private-cookie-storage.html: 13 * http/tests/cookies/resources/cookies-test-pre.js: 14 (testCookies): 15 1 16 2019-09-10 Ryan Haddad <ryanhaddad@apple.com> 2 17 -
trunk/LayoutTests/http/tests/cookies/private-cookie-storage-expected.txt
r197720 r249746 4 4 5 5 6 Cookies before setting (should be empty):7 Cookies before enabling private browsing (should be key1=value1):key1=value18 PASS cookie is 'key1=value1'.9 Cookies after enabling private browsing (should be empty):10 PASS cookie is ''.11 Cookies after setting in private browsing (should be key2=value2):key2=value212 PASS cookie is 'key2=value2'.13 6 Cookies after disabling private browsing (should be key1=value1):key1=value1 14 7 PASS cookie is 'key1=value1'. -
trunk/LayoutTests/http/tests/cookies/private-cookie-storage.html
r249542 r249746 2 2 <script> 3 3 description("This test checks that cookies set from a Set-Cookie header in private browsing mode are stored in the same cookie storage as cookies set with document.cookie."); 4 jsTestIsAsync = true; 4 5 5 debug("Cookies before setting (should be empty):" + document.cookie); 6 function runTest() { 7 if (window.location.search === "?stepTwo") { 8 debug("Cookies after enabling private browsing (should be empty): " + document.cookie); 9 if (!testCookies("")) { // We're using a different cookie storage now. key1=value1 is still in the default cookie storage. 10 finishJSTest(); 11 return; 12 } 13 document.cookie = "key2=value2"; 14 debug("Cookies after setting in private browsing (should be key2=value2):" + document.cookie); 15 if (!testCookies("key2=value2")) { 16 finishJSTest(); 17 return; 18 } 19 clearCookies(); 6 20 7 document.cookie = "key1=value1"; 8 debug("Cookies before enabling private browsing (should be key1=value1):" + document.cookie); 9 testCookies("key1=value1"); 21 if (window.testRunner) 22 testRunner.setShouldSwapToDefaultSessionOnNextNavigation(true); 23 window.location = "/cookies/private-cookie-storage.html?stepThree"; 24 } else if (window.location.search === "?stepThree") { 25 debug("Cookies after disabling private browsing (should be key1=value1):" + document.cookie); 26 testCookies("key1=value1"); 27 finishJSTest(); 28 } else { 29 debug("Cookies before setting (should be empty):" + document.cookie); 10 30 11 if (window.testRunner) { testRunner.setPrivateBrowsingEnabled_DEPRECATED(true); } 31 document.cookie = "key1=value1"; 32 debug("Cookies before enabling private browsing (should be key1=value1):" + document.cookie); 33 if (!testCookies("key1=value1")) { 34 finishJSTest(); 35 return; 36 } 37 38 if (window.testRunner) 39 testRunner.setShouldSwapToEphemeralSessionOnNextNavigation(true); 40 window.location = "/cookies/private-cookie-storage.html?stepTwo"; 41 } 42 } 12 43 13 debug("Cookies after enabling private browsing (should be empty):" + document.cookie); 14 testCookies(""); // We're using a different cookie storage now. key1=value1 is still in the default cookie storage. 15 document.cookie = "key2=value2"; 16 debug("Cookies after setting in private browsing (should be key2=value2):" + document.cookie); 17 testCookies("key2=value2"); 18 clearCookies(); 19 20 if (window.testRunner) { testRunner.setPrivateBrowsingEnabled_DEPRECATED(false); } 21 22 debug("Cookies after disabling private browsing (should be key1=value1):" + document.cookie); 23 testCookies("key1=value1"); 24 44 onload = runTest; 25 45 </script> 26 46 <script src="resources/cookies-test-post.js"></script> -
trunk/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js
r174190 r249746 48 48 cookie = normalizeCookie(cookie); 49 49 50 if (cookie === result) 50 if (cookie === result) { 51 51 testPassed("cookie is '" + cookie + "'."); 52 else 52 return true; 53 } else { 53 54 testFailed("cookie was '" + cookie + "'. Expected '" + result + "'."); 55 return false; 56 } 54 57 } 55 58 -
trunk/Tools/DumpRenderTree/PlatformWin.cmake
r245968 r249746 7 7 win/DRTDesktopNotificationPresenter.cpp 8 8 win/DRTDropSource.cpp 9 win/DefaultPolicyDelegate.cpp 9 10 win/DumpRenderTree.cpp 10 11 win/EditingDelegate.cpp -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r249675 r249746 2568 2568 ASSERT(m_shouldSwapToEphemeralSessionOnNextNavigation != m_shouldSwapToDefaultSessionOnNextNavigation); 2569 2569 setPrivateBrowsingEnabled(m_shouldSwapToEphemeralSessionOnNextNavigation); 2570 m_shouldSwapToEphemeralSessionOnNextNavigation = false; 2571 m_shouldSwapToDefaultSessionOnNextNavigation = false; 2570 2572 } 2571 2573 } -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r249571 r249746 30 30 #include "DumpRenderTree.h" 31 31 32 #include "DefaultPolicyDelegate.h" 32 33 #include "EditingDelegate.h" 33 34 #include "FrameLoadDelegate.h" … … 996 997 } 997 998 998 webView->setPolicyDelegate( nullptr);999 webView->setPolicyDelegate(DefaultPolicyDelegate::sharedInstance()); 999 1000 policyDelegate->setPermissive(false); 1000 1001 policyDelegate->setControllerToNotifyDone(nullptr);
Note: See TracChangeset
for help on using the changeset viewer.