Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1774)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java

Issue 2821623003: Allow WebView setCookie api to set secure cookies for http urls. (Closed)
Patch Set: Add a test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/native/cookie_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
index 9b0f2c09b8bd6494629f693d0130788f78da0c90..f094c9acb31ea230b739dea88ed18d28bf226335 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
@@ -160,6 +160,16 @@ public class CookieManagerTest extends AwTestBase {
@MediumTest
@Feature({"AndroidWebView", "Privacy"})
+ public void testSetSecureCookieForHttpUrl() throws Throwable {
+ String url = "http://www.example.com";
+ String secureUrl = "https://www.example.com";
+ String cookie = "name=test";
+ mCookieManager.setCookie(url, cookie + ";secure");
+ assertEquals(cookie, mCookieManager.getCookie(secureUrl));
+ }
+
+ @MediumTest
+ @Feature({"AndroidWebView", "Privacy"})
public void testHasCookie() throws Throwable {
assertFalse(mCookieManager.hasCookies());
mCookieManager.setCookie("http://www.example.com", "name=test");
« no previous file with comments | « no previous file | android_webview/native/cookie_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698