public void EnabledViewState() { WebControlTestClass c = new WebControlTestClass(); c.SetTrackingVS(); c.Enabled = false; object o = c.Save(); c = new WebControlTestClass(); c.Load(o); Assert.IsFalse(c.Enabled, "not enabled"); }
public void EnabledViewState2() { WebControlTestClass c = new WebControlTestClass(); c.Enabled = false; c.SetTrackingVS(); c.Width = 100; // to cause saveviewstate return not null object o = c.Save(); c = new WebControlTestClass(); c.Enabled = false; c.Load(o); Assert.IsFalse(c.Enabled, "not enabled"); }
public void CopyEnabled() { Label l = new Label(), ll = new Label(); l.Enabled = false; ll.CopyBaseAttributes(l); Assert.IsFalse(ll.Enabled, "enabled should be copied"); WebControlTestClass c = new WebControlTestClass(); c.SetTrackingVS(); c.CopyBaseAttributes(l); object o = c.Save(); c = new WebControlTestClass(); c.Load(o); Assert.IsFalse(c.Enabled, "enabled should be copied#2"); }
public void ViewState() { WebControlTestClass w; WebControlTestClass w_copy; object state; w = new WebControlTestClass(HtmlTextWriterTag.Xml); w_copy = new WebControlTestClass(HtmlTextWriterTag.Xml); w.SetTrackingVS(); w.BackColor = Color.Red; w.Attributes["test"] = "testme"; w.BorderColor = Color.Green; w.BorderStyle = BorderStyle.Dotted; w.BorderWidth = new Unit("12px"); w.Enabled = false; w.ForeColor = Color.BlueViolet; w.Height = new Unit(6.5); w.TabIndex = 10; w.ToolTip = "I am a tip"; w.Width = new Unit(6.5, UnitType.Cm); w.Enabled = true; w.Attributes["PrivateTag"] = "blah"; w.Attributes["Style"] = "background-color: #ff00ff"; state = w.Save(); w_copy.Load(state); w_copy.SetTrackingVS(); /* MS: <xml tabindex="10" title="I am a tip" test="testme" PrivateTag="blah" * style="color:BlueViolet;background-color:Red;border-color:Green;border-width:12px;border-style:Dotted;height:6px;width:6.5cm;background-color: #ff00ff"> * </xml> */ HtmlDiff.AssertAreEqual(w.Render(), w_copy.Render(), "VS1"); }
public void EnabledViewState2 () { WebControlTestClass c = new WebControlTestClass (); c.Enabled = false; c.SetTrackingVS (); c.Width = 100; // to cause saveviewstate return not null object o = c.Save (); c = new WebControlTestClass (); c.Enabled = false; c.Load (o); Assert.IsFalse (c.Enabled, "not enabled"); }
public void EnabledViewState () { WebControlTestClass c = new WebControlTestClass (); c.SetTrackingVS (); c.Enabled = false; object o = c.Save (); c = new WebControlTestClass (); c.Load (o); Assert.IsFalse (c.Enabled, "not enabled"); }
public void ViewState() { WebControlTestClass w; WebControlTestClass w_copy; object state; w = new WebControlTestClass(HtmlTextWriterTag.Xml); w_copy = new WebControlTestClass(HtmlTextWriterTag.Xml); w.SetTrackingVS (); w.BackColor = Color.Red; w.Attributes["test"] = "testme"; w.BorderColor = Color.Green; w.BorderStyle = BorderStyle.Dotted; w.BorderWidth = new Unit("12px"); w.Enabled = false; w.ForeColor = Color.BlueViolet; w.Height = new Unit(6.5); w.TabIndex = 10; w.ToolTip = "I am a tip"; w.Width = new Unit(6.5, UnitType.Cm); w.Enabled = true; w.Attributes["PrivateTag"] = "blah"; w.Attributes["Style"] = "background-color: #ff00ff"; state = w.Save(); w_copy.Load(state); w_copy.SetTrackingVS(); /* MS: <xml tabindex="10" title="I am a tip" test="testme" PrivateTag="blah" style="color:BlueViolet;background-color:Red;border-color:Green;border-width:12px;border-style:Dotted;height:6px;width:6.5cm;background-color: #ff00ff"> </xml> */ HtmlDiff.AssertAreEqual (w.Render(), w_copy.Render(), "VS1"); }
public void CopyEnabled () { Label l = new Label (), ll = new Label (); l.Enabled = false; ll.CopyBaseAttributes (l); Assert.IsFalse (ll.Enabled, "enabled should be copied"); WebControlTestClass c = new WebControlTestClass (); c.SetTrackingVS (); c.CopyBaseAttributes (l); object o = c.Save (); c = new WebControlTestClass (); c.Load (o); Assert.IsFalse (c.Enabled, "enabled should be copied#2"); }