2008-01-14 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Mon, 14 Jan 2008 12:36:29 +0000 (12:36 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Mon, 14 Jan 2008 12:36:29 +0000 (12:36 -0000)
* HttpCookieTest.cs: Added HttpOnly test cases.

svn path=/trunk/mcs/; revision=92854

mcs/class/System.Web/Test/System.Web/ChangeLog
mcs/class/System.Web/Test/System.Web/HttpCookieTest.cs

index c11b23230421333a1b234566382f057bede0e427..2a7f93891b27c40e78e645d98861d62118d35179 100644 (file)
@@ -1,3 +1,7 @@
+2008-01-14  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * HttpCookieTest.cs: Added HttpOnly test cases.
+
 2007-12-19  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * HttpCookieCollectionTest.cs: Added test for string indexer and
index 04c9320f91412c10016194a288c0f33d02490a59..8417e4efc063106c14cafabad9c6f7dfbaadcb81 100644 (file)
@@ -393,5 +393,17 @@ namespace MonoTests.System.Web {
                                + "%2b%253d%2bc%255e2&three=a%2b%2526%2bb",
                                cookie2.Values.ToString (), "#J10");
                }
+#if NET_2_0
+               [Test]
+               public void HttpOnly ()
+               {
+                       HttpCookie biscuit = new HttpCookie ("mium");
+                       Assert.IsFalse (biscuit.HttpOnly, "default");
+                       biscuit.HttpOnly = true;
+                       Assert.IsTrue (biscuit.HttpOnly, "true");
+                       biscuit.HttpOnly = false;
+                       Assert.IsFalse (biscuit.HttpOnly, "false");
+               }
+#endif
        }
 }