2006-10-05 Igor Zelmanovich <igorz@mainsoft.com>
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 5 Oct 2006 10:04:35 +0000 (10:04 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 5 Oct 2006 10:04:35 +0000 (10:04 -0000)
* WebControl.cs: fixed: CreateControlStyle()

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

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs

index 277f5933cdbdb9e42254f7f32a69572b070cb1d8..c72a6955199c16f91c65be6da245fe7945c59996 100644 (file)
@@ -1,3 +1,7 @@
+2006-10-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * WebControl.cs: fixed: CreateControlStyle()
+
 2006-10-04 Igor Zelmanovich <igorz@mainsoft.com>
 
        * FormView.cs:
index cd1332cdc564bffed4d1f707302230b8a049b347..a04960e029412122cc3da025b839edd706311aed 100644 (file)
@@ -508,8 +508,7 @@ namespace System.Web.UI.WebControls {
 
                protected virtual Style CreateControlStyle() 
                {
-                       style = new Style (ViewState);
-                       return style;
+                       return new Style (ViewState);
                }
 
                protected override void LoadViewState (object savedState) 
index b4d495c51f052329b51053addea85c9f02a8dc5a..7712feb93e8170c3e6487b2b36e5d29c4a6cd80f 100644 (file)
@@ -1,3 +1,7 @@
+2006-10-05 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * WebControlTest.cs: added test
+                       
 2006-10-04 Igor Zelmanovich <igorz@mainsoft.com>
 
        * FormViewTest.cs: removed NotWorking attribute
index cdf22f1006e0c562d819ce3732c6282aa5d6c6ff..0e5e641be5871a4da1fabff3852590a7fc0d6832 100644 (file)
@@ -178,6 +178,19 @@ namespace MonoTests.System.Web.UI.WebControls
                                return result;
                        }
 
+                       public Style DoCreateControlStyle () {
+                               return base.CreateControlStyle ();
+                       }
+               }
+
+               [Test]
+               public void CreateControlStyle () {
+                       WebControlTestClass w = new WebControlTestClass ();
+                       Assert.AreEqual (false, w.ControlStyleCreated, "CreateControlStyle#1");
+                       Style s = w.DoCreateControlStyle ();
+                       Assert.AreEqual (false, w.ControlStyleCreated, "CreateControlStyle#2");
+                       s = w.ControlStyle;
+                       Assert.AreEqual (true, w.ControlStyleCreated, "CreateControlStyle#3");
                }
 
                [Test]