PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/mcs/class/System.Web/Test/standalone-tests/RootBuilderChildControlTypes_Bug603541.cs

https://bitbucket.org/foobar22/mono
C# | 86 lines | 51 code | 9 blank | 26 comment | 0 complexity | 7c53f0be21817cb5017eb8167278791d MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, CC-BY-SA-3.0, GPL-2.0, Unlicense, Apache-2.0, LGPL-2.0
  1. //
  2. // Authors:
  3. // Marek Habersack (mhabersack@novell.com)
  4. //
  5. // (C) 2010 Novell, Inc http://novell.com/
  6. //
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining
  9. // a copy of this software and associated documentation files (the
  10. // "Software"), to deal in the Software without restriction, including
  11. // without limitation the rights to use, copy, modify, merge, publish,
  12. // distribute, sublicense, and/or sell copies of the Software, and to
  13. // permit persons to whom the Software is furnished to do so, subject to
  14. // the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be
  17. // included in all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  20. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  22. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  23. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  24. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  25. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. //
  27. using System;
  28. using System.Collections.Generic;
  29. using System.IO;
  30. using System.Web.Util;
  31. using StandAloneRunnerSupport;
  32. using StandAloneTests;
  33. using NUnit.Framework;
  34. namespace StandAloneTests.Control_GetUniqueIDRelativeTo
  35. {
  36. [TestCase ("RootBuilderChildControlTypes_Bug603541", "HTML control types mapped by RootBuilder")]
  37. public sealed class RootBuilderChildControlTypes_Bug603541 : ITestCase
  38. {
  39. public string PhysicalPath {
  40. get { return Path.Combine (Consts.BasePhysicalDir, "RootBuilderChildControlTypes_Bug603541"); }
  41. }
  42. public string VirtualPath {
  43. get { return "/"; }
  44. }
  45. public bool SetUp (List <TestRunItem> runItems)
  46. {
  47. runItems.Add (new TestRunItem ("Default.aspx", Default_Aspx));
  48. return true;
  49. }
  50. void Default_Aspx (string result, TestRunItem runItem)
  51. {
  52. string originalHtml = @"<pre id=""log"">a: System.Web.UI.HtmlControls.HtmlAnchor
  53. button: System.Web.UI.HtmlControls.HtmlButton
  54. img: System.Web.UI.HtmlControls.HtmlImage
  55. link: System.Web.UI.HtmlControls.HtmlGenericControl
  56. meta: System.Web.UI.HtmlControls.HtmlGenericControl
  57. select: System.Web.UI.HtmlControls.HtmlSelect
  58. table: System.Web.UI.HtmlControls.HtmlTable
  59. td: System.Web.UI.HtmlControls.HtmlTableCell
  60. tr: System.Web.UI.HtmlControls.HtmlTableRow
  61. th: System.Web.UI.HtmlControls.HtmlTableCell
  62. textarea: System.Web.UI.HtmlControls.HtmlTextArea
  63. inputButton: System.Web.UI.HtmlControls.HtmlInputButton
  64. inputSubmit: System.Web.UI.HtmlControls.HtmlInputSubmit
  65. inputReset: System.Web.UI.HtmlControls.HtmlInputReset
  66. inputCheckbox: System.Web.UI.HtmlControls.HtmlInputCheckBox
  67. inputFile: System.Web.UI.HtmlControls.HtmlInputFile
  68. inputHidden: System.Web.UI.HtmlControls.HtmlInputHidden
  69. inputImage: System.Web.UI.HtmlControls.HtmlInputImage
  70. inputRadio: System.Web.UI.HtmlControls.HtmlInputRadioButton
  71. inputText: System.Web.UI.HtmlControls.HtmlInputText
  72. inputPassword: System.Web.UI.HtmlControls.HtmlInputPassword
  73. </pre>";
  74. Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
  75. }
  76. }
  77. }