[System] UriKind.RelativeOrAbsolute workaround.
[mono.git] / mcs / class / System.Web / Test / standalone-tests / Menu_4.0_List.cs
1 //
2 // Authors:
3 //   Marek Habersack (mhabersack@novell.com)
4 //
5 // (C) 2010 Novell, Inc http://novell.com/
6 //
7
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 #if NET_4_0
29 using System;
30 using System.Collections.Generic;
31 using System.IO;
32 using System.Web.Util;
33
34 using StandAloneRunnerSupport;
35 using StandAloneTests;
36
37 using NUnit.Framework;
38
39 namespace StandAloneTests.Menu_40_List
40 {
41         [TestCase ("Menu_40_List", "Menu control List rendering mode for 4.0", Disabled=true)]
42         public sealed class Test_01 : ITestCase
43         {
44                 public string PhysicalPath {
45                         get { return Path.Combine (Consts.BasePhysicalDir, "Menu_4.0_List"); }
46                 }
47                 
48                 public string VirtualPath  {
49                         get { return "/"; }
50                 }
51
52                 public bool SetUp (List <TestRunItem> runItems)
53                 {
54                         runItems.Add (new TestRunItem ("test_01.aspx", Test_01_Aspx));
55                         return true;
56                 }
57                 
58                 void Test_01_Aspx (string result, TestRunItem runItem)
59                 {
60                         string originalHtml = "<a href=\"#MyMenu1_SkipLink\"><img alt=\"Skip Navigation Links\" src=\"/WebResource.axd\" width=\"0\" height=\"0\" style=\"border-width:0px;\" /></a><div id=\"MyMenu1\">\r\n\t<ul class=\"level1\">\r\n\t\t<li><a title=\"Root description\" class=\"popout level1\" href=\"./\">Root</a><ul class=\"level2\">\r\n\t\t\t<li><a title=\"Mono Project Home Page\" class=\"popout level2\" href=\"http://mono-project.com/\">Mono</a><ul class=\"level3\">\r\n\t\t\t\t<li><a title=\"How to report Mono bugs\" class=\"popout level3\" href=\"http://mono-project.com/Bugs\">Mono Bugs</a><ul class=\"level4\">\r\n\t\t\t\t\t<li><a title=\"Includes Mono bugs interface\" class=\"level4\" href=\"http://bugzilla.novell.com\">Novell Bugzilla</a></li>\r\n\t\t\t\t</ul></li>\r\n\t\t\t</ul></li><li><a title=\"Main page of the Google search engine\" class=\"popout level2\" href=\"http://google.com\">Google</a><ul class=\"level3\">\r\n\t\t\t\t<li><a title=\"Google language translation interface\" class=\"level3\" href=\"http://translate.google.com\">Translator</a></li><li><a title=\"Google code search engine\" class=\"level3\" href=\"http://google.com/codesearch\">Code Search</a></li>\r\n\t\t\t</ul></li>\r\n\t\t</ul></li>\r\n\t</ul>\r\n</div><a id=\"MyMenu1_SkipLink\"></a>";
61                         Helpers.ExtractAndCompareCodeFromHtml (Helpers.StripWebResourceAxdQuery (result), originalHtml, "#A1");
62                 }
63         }
64 }
65 #endif