PageRenderTime 65ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/unit/navigation/index.html

https://github.com/tqc/jquery-mobile
HTML | 313 lines | 243 code | 61 blank | 9 comment | 0 complexity | 4dc64aa74de623447958155328401789 MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQuery Mobile Navigation Test Suite</title>
  7. <script src="../../../js/jquery.tag.inserter.js"></script>
  8. <script src="../jquery.setNameSpace.js"></script>
  9. <script src="../../../tests/jquery.testHelper.js"></script>
  10. <script type="text/javascript">
  11. $.testHelper.setPushState();
  12. </script>
  13. <script src="../../../js/"></script>
  14. <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css"/>
  15. <link rel="stylesheet" href="../../../external/qunit.css"/>
  16. <script src="../../../external/qunit.js"></script>
  17. <script type="text/javascript" src="navigation_helpers.js"></script>
  18. <script type="text/javascript" src="navigation_core.js"></script>
  19. <script type="text/javascript" src="navigation_paths.js"></script>
  20. <script src="../swarminject.js"></script>
  21. </head>
  22. <body>
  23. <h1 id="qunit-header">jQuery Mobile Navigation Test Suite</h1>
  24. <h2 id="qunit-banner"></h2>
  25. <h2 id="qunit-userAgent"></h2>
  26. <ol id="qunit-tests">
  27. </ol>
  28. <div id="harmless-default-page" data-nstest-role="page" class="first-page">
  29. </div>
  30. <div id="foo" data-nstest-role="page" class="foo-class">
  31. <a href="#bar" data-nstest-transition="flip"></a>
  32. <a id="bad-internal-page-link" href="#non-existent-page"></a>
  33. </div>
  34. <div id="prefetch" data-nstest-role="page">
  35. <a href="prefetched.html" data-nstest-prefetch>Prefetch test</a>
  36. </div>
  37. <div id="foozball" data-nstest-role="page">
  38. </div>
  39. <div id="bar" data-nstest-role="page">
  40. <a href="#baz"></a>
  41. </div>
  42. <div id="baz" data-nstest-role="page">
  43. <a href="#foo"></a>
  44. </div>
  45. <div id="fade-trans" data-nstest-role="page">
  46. <a href="#flip-trans" data-nstest-transition="fade"></a>
  47. </div>
  48. <div id="flip-trans" data-nstest-role="page">
  49. <a href="#fade-trans" data-nstest-transition="flip"></a>
  50. </div>
  51. <div id="no-trans" data-nstest-role="page">
  52. <a href="#pop-trans"></a>
  53. </div>
  54. <div id="pop-trans" data-nstest-role="page">
  55. <a href="#no-trans" data-nstest-transition="pop"></a>
  56. </div>
  57. <div id="default-trans" data-nstest-role="page">
  58. <a href="#no-trans"></a>
  59. </div>
  60. <div id="data-url" data-nstest-role="page">
  61. <a href="data-url-tests/data-url.html"></a>
  62. </div>
  63. <div id="non-data-url" data-nstest-role="page">
  64. <a href="data-url-tests/non-data-url.html"></a>
  65. </div>
  66. <div id="nested-data-url" data-nstest-role="page">
  67. <a href="data-url-tests/nested.html"></a>
  68. </div>
  69. <div id="single-quotes-data-url" data-nstest-role="page">
  70. <a href="data-url-tests/single-quotes.html"></a>
  71. </div>
  72. <div id="reverse-attr-data-url" data-nstest-role="page">
  73. <a href="data-url-tests/reverse-attr.html"></a>
  74. </div>
  75. <div id="ajax-disabled-form" data-nstest-role="page">
  76. <form method="POST" id="non-ajax-form" action="/ajax-disabled-form" data-nstest-ajax="false">
  77. </form>
  78. <form method="POST" id="ajax-form" action="/ajax-disabled-form">
  79. </form>
  80. <form method="POST" id="rand-ajax-form" action="/ajax-disabled-form" data-nstest-ajax="foo">
  81. </form>
  82. </div>
  83. <div id="default-trans-dialog" data-nstest-role="page">
  84. <a href="#no-trans-dialog" data-nstest-rel="dialog"></a>
  85. </div>
  86. <div id="no-trans-dialog" data-nstest-role="page">
  87. </div>
  88. <div id="dup-history-first" data-nstest-role="page">
  89. <a href="#dup-history-second" data-nstest-transition="slideup" data-nstest-role="button" >
  90. Page 2
  91. </a>
  92. </div>
  93. <div id="dup-history-second" data-nstest-role="page">
  94. <a href="#dup-history-first" data-nstest-transition="slideup" data-nstest-role="button">
  95. Page 1
  96. </a>
  97. <a href="#dup-history-dialog" data-nstest-role="button" data-nstest-transition="pop" data-nstest-rel="dialog">Dialog</a>
  98. </div>
  99. <div id="dup-history-dialog" data-nstest-role="dialog">
  100. <div data-nstest-role="header" data-nstest-position="inline">
  101. <h1>Dialog</h1>
  102. </div>
  103. </div>
  104. <div id="skip-dialog-first" data-nstest-role="page">
  105. <div data-nstest-role="content">
  106. <a href="#skip-dialog" data-nstest-role="button" data-nstest-transition="pop" data-nstest-rel="dialog">Dialog</a>
  107. </div>
  108. </div>
  109. <div id="skip-dialog" data-nstest-role="dialog">
  110. <div data-nstest-role="content">
  111. <a href="#skip-dialog-second">Page 2</a>
  112. </div>
  113. </div>
  114. <div id="skip-dialog-second" data-nstest-role="page">
  115. <a href="#" data-nstest-rel="back">Go Back</a>
  116. </div>
  117. <div id="dialog-double-hash-test-dialog" data-nstest-role="dialog">
  118. <div data-nstest-role="header">
  119. <h1>Dialog</h1>
  120. </div>
  121. </div>
  122. <div id="dialog-double-hash-test" data-nstest-role="page">
  123. <div data-nstest-role="content">
  124. <a href="#dialog-double-hash-test-dialog">Dialog</a>
  125. </div>
  126. </div>
  127. <div id="nested-dialog-page" data-nstest-role="page">
  128. <div data-nstest-role="content">
  129. <a href="#nested-dialog-first">Dialog</a>
  130. </div>
  131. </div>
  132. <div id="nested-dialog-first" data-nstest-role="dialog">
  133. <div data-nstest-role="content">
  134. <a href="#nested-dialog-second">Dialog 2</a>
  135. </div>
  136. </div>
  137. <div id="nested-dialog-second" data-nstest-role="dialog">
  138. </div>
  139. <div id="relative-after-embeded-page-first" data-nstest-role="page">
  140. <div data-nstest-role="content">
  141. <a href="#relative-after-embeded-page-second">second page</a>
  142. </div>
  143. </div>
  144. <div id="relative-after-embeded-page-second" data-nstest-role="page">
  145. <div data-nstest-role="content">
  146. <a href="data-url-tests/data-url.html">file path page</a>
  147. </div>
  148. </div>
  149. <div id="ajax-title-page" data-nstest-title="Title Attr 1" data-nstest-role="page">
  150. <a href="title1.html" id="titletest1" data-nstest-transition="none">test</a>
  151. <a href="title2.html" id="titletest2" data-nstest-transition="none">test</a>
  152. <a href="title3.html" id="titletest3" data-nstest-transition="none">test</a>
  153. </div>
  154. <div data-nstest-role="page" id="titletest4" data-nstest-title="Title Attr 2">
  155. <div data-nstest-role="header"><h1>Title Heading</h1></div>
  156. </div>
  157. <div data-nstest-role="page" id="titletest5" data-nstest-title="Title Attr">
  158. <div data-nstest-role="header"><h1>Title Heading</h1></div>
  159. </div>
  160. <div data-nstest-role="page" id="self-link">
  161. <a href="#self-link">self!</a>
  162. </div>
  163. <div data-nstest-role="page" id="dialog-param-link">
  164. <a href="dialog-param-test/dialog-param.html">go</a>
  165. </div>
  166. <div data-nstest-role="page" id="pathing-tests">
  167. <!-- doc rel links -->
  168. <a href="file.html" id="doc-rel-test-one">go</a>
  169. <a href="path-tests/file.html" id="doc-rel-test-two">go</a>
  170. <a href="path-tests/sub-dir/file.html" id="doc-rel-test-three">go</a>
  171. <a href="path-tests/sub-dir/" id="doc-rel-test-four">go</a>
  172. <a href="../../unit/navigation/path-tests/parent-ref.html" id="doc-rel-test-five">go</a>
  173. <a href="../../unit/navigation/path-tests/parent/" id="doc-rel-test-six">go</a>
  174. <!-- site rel links -->
  175. <!-- these will be altered before the test suite runs to use the current path -->
  176. <a href="file.html" id="site-rel-test-one" class="site-rel">go</a>
  177. <a href="path-tests/file.html" id="site-rel-test-two" class="site-rel">go</a>
  178. <a href="path-tests/sub-dir/file.html" id="site-rel-test-three" class="site-rel">go</a>
  179. <a href="path-tests/sub-dir/" id="site-rel-test-four" class="site-rel">go</a>
  180. <a href="../../unit/navigation/path-tests/parent-ref.html" id="site-rel-test-five" class="site-rel">go</a>
  181. <a href="../../unit/navigation/path-tests/parent/" id="site-rel-test-six" class="site-rel">go</a>
  182. <!-- protocol rel links -->
  183. <!-- these will be altered before the test suite runs to use the
  184. current domain and path -->
  185. <a href="file.html" id="protocol-rel-test-one" class="protocol-rel">go</a>
  186. <a href="path-tests/file.html" id="protocol-rel-test-two" class="protocol-rel">go</a>
  187. <a href="path-tests/sub-dir/file.html" id="protocol-rel-test-three" class="protocol-rel">go</a>
  188. <a href="path-tests/sub-dir/" id="protocol-rel-test-four" class="protocol-rel">go</a>
  189. <a href="../../unit/navigation/path-tests/parent-ref.html" id="protocol-rel-test-five" class="protocol-rel">go</a>
  190. <a href="../../unit/navigation/path-tests/parent/" id="protocol-rel-test-six" class="protocol-rel">go</a>
  191. <!-- absolute links -->
  192. <!-- these will be altered before the test suite runs to use the
  193. current protocol, domain and path -->
  194. <a href="file.html" id="absolute-test-one" class="absolute">go</a>
  195. <a href="path-tests/file.html" id="absolute-test-two" class="absolute">go</a>
  196. <a href="path-tests/sub-dir/file.html" id="absolute-test-three" class="absolute">go</a>
  197. <a href="path-tests/sub-dir/" id="absolute-test-four" class="absolute">go</a>
  198. <a href="../../unit/navigation/path-tests/parent-ref.html" id="absolute-test-five" class="absolute">go</a>
  199. <a href="../../unit/navigation/path-tests/parent/" id="absolute-test-six" class="absolute">go</a>
  200. </div>
  201. <div data-nstest-role="page" id="pathing-tests-reset">
  202. <div class="reset-value">page didn't change!</div>
  203. </div>
  204. <div data-nstest-role="page" id="internal-no-action-form-page">
  205. <div data-nstest-role="content">
  206. <form>
  207. <input type="hidden" name="foo" value="1">
  208. <input type="hidden" name="bar" value="2">
  209. </form>
  210. <a href="form-tests/form-no-action.html">External page containing form with no action.</a>
  211. </div>
  212. </div>
  213. <div id="active-state-page1" data-nstest-role="page">
  214. <div data-nstest-role="content">
  215. <a href="#active-state-page2" data-nstest-role="button">page2</a>
  216. </div>
  217. </div>
  218. <div id="active-state-page2" data-nstest-role="page">
  219. <div data-nstest-role="content">
  220. <a href="#active-state-page1" data-nstest-role="button">href button</a>
  221. <a href="#active-state-page1" data-nstest-rel="back" data-nstest-role="button">back button</a>
  222. </div>
  223. </div>
  224. <div id="odd-clicks-page" data-nstest-role="page">
  225. <a href="#odd-clicks-page-dest" id="right-or-middle-click">foo</a>
  226. </div>
  227. <div id="odd-clicks-page-dest" data-nstest-role="page"></div>
  228. <div id="inject-links-page" data-nstest-role="page">
  229. <a href="#injected-test-page" id="static-injected-test-page-link">static link</a>
  230. </div>
  231. <div id="prefetched-dialog-page" data-nstest-role="page">
  232. <a href="prefetched-dialog.html"
  233. id="prefetched-dialog-link"
  234. data-nstest-role="prefetch"
  235. data-nstest-rel="dialog">
  236. static link
  237. </a>
  238. </div>
  239. <div id="link-hijacking-test" data-nstest-role="page">
  240. <div id="hijackable">
  241. <a href="#link-hijacking-destination" id="hijacked-link"></a>
  242. <a href="#link-hijacking-destination" id="unhijacked-link-by-attr" data-nstest-ajax="false"></a>
  243. </div>
  244. <div id="not-hijackable" data-nstest-ajax="false">
  245. <a href="#link-hijacking-destination" id="unhijacked-link-by-parent"></a>
  246. </div>
  247. </div>
  248. <div id="link-hijacking-destination" data-nstest-role="page">
  249. hello!
  250. </div>
  251. </body>
  252. </html>