05-Attributes.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. {
  2. "name": "Attributes",
  3. "options": {},
  4. "file": "Attributes.html",
  5. "expected": [
  6. {
  7. "event": "processinginstruction",
  8. "data": [
  9. "!doctype",
  10. "!doctype html"
  11. ]
  12. },
  13. {
  14. "event": "text",
  15. "data": [
  16. "\n"
  17. ]
  18. },
  19. {
  20. "event": "opentagname",
  21. "data": [
  22. "html"
  23. ]
  24. },
  25. {
  26. "event": "opentag",
  27. "data": [
  28. "html",
  29. {}
  30. ]
  31. },
  32. {
  33. "event": "text",
  34. "data": [
  35. "\n"
  36. ]
  37. },
  38. {
  39. "event": "opentagname",
  40. "data": [
  41. "head"
  42. ]
  43. },
  44. {
  45. "event": "opentag",
  46. "data": [
  47. "head",
  48. {}
  49. ]
  50. },
  51. {
  52. "event": "text",
  53. "data": [
  54. "\n\t"
  55. ]
  56. },
  57. {
  58. "event": "opentagname",
  59. "data": [
  60. "title"
  61. ]
  62. },
  63. {
  64. "event": "opentag",
  65. "data": [
  66. "title",
  67. {}
  68. ]
  69. },
  70. {
  71. "event": "text",
  72. "data": [
  73. "Attributes test"
  74. ]
  75. },
  76. {
  77. "event": "closetag",
  78. "data": [
  79. "title"
  80. ]
  81. },
  82. {
  83. "event": "text",
  84. "data": [
  85. "\n"
  86. ]
  87. },
  88. {
  89. "event": "closetag",
  90. "data": [
  91. "head"
  92. ]
  93. },
  94. {
  95. "event": "text",
  96. "data": [
  97. "\n"
  98. ]
  99. },
  100. {
  101. "event": "opentagname",
  102. "data": [
  103. "body"
  104. ]
  105. },
  106. {
  107. "event": "opentag",
  108. "data": [
  109. "body",
  110. {}
  111. ]
  112. },
  113. {
  114. "event": "text",
  115. "data": [
  116. "\n\t"
  117. ]
  118. },
  119. {
  120. "event": "comment",
  121. "data": [
  122. " Normal attributes "
  123. ]
  124. },
  125. {
  126. "event": "commentend",
  127. "data": []
  128. },
  129. {
  130. "event": "text",
  131. "data": [
  132. "\n\t"
  133. ]
  134. },
  135. {
  136. "event": "opentagname",
  137. "data": [
  138. "button"
  139. ]
  140. },
  141. {
  142. "event": "attribute",
  143. "data": [
  144. "id",
  145. "test0"
  146. ]
  147. },
  148. {
  149. "event": "attribute",
  150. "data": [
  151. "class",
  152. "value0"
  153. ]
  154. },
  155. {
  156. "event": "attribute",
  157. "data": [
  158. "title",
  159. "value1"
  160. ]
  161. },
  162. {
  163. "event": "opentag",
  164. "data": [
  165. "button",
  166. {
  167. "id": "test0",
  168. "class": "value0",
  169. "title": "value1"
  170. }
  171. ]
  172. },
  173. {
  174. "event": "text",
  175. "data": [
  176. "class=\"value0\" title=\"value1\""
  177. ]
  178. },
  179. {
  180. "event": "closetag",
  181. "data": [
  182. "button"
  183. ]
  184. },
  185. {
  186. "event": "text",
  187. "data": [
  188. "\n\n\t"
  189. ]
  190. },
  191. {
  192. "event": "comment",
  193. "data": [
  194. " Attributes with no quotes or value "
  195. ]
  196. },
  197. {
  198. "event": "commentend",
  199. "data": []
  200. },
  201. {
  202. "event": "text",
  203. "data": [
  204. "\n\t"
  205. ]
  206. },
  207. {
  208. "event": "opentagname",
  209. "data": [
  210. "button"
  211. ]
  212. },
  213. {
  214. "event": "attribute",
  215. "data": [
  216. "id",
  217. "test1"
  218. ]
  219. },
  220. {
  221. "event": "attribute",
  222. "data": [
  223. "class",
  224. "value2"
  225. ]
  226. },
  227. {
  228. "event": "attribute",
  229. "data": [
  230. "disabled",
  231. ""
  232. ]
  233. },
  234. {
  235. "event": "opentag",
  236. "data": [
  237. "button",
  238. {
  239. "id": "test1",
  240. "class": "value2",
  241. "disabled": ""
  242. }
  243. ]
  244. },
  245. {
  246. "event": "text",
  247. "data": [
  248. "class=value2 disabled"
  249. ]
  250. },
  251. {
  252. "event": "closetag",
  253. "data": [
  254. "button"
  255. ]
  256. },
  257. {
  258. "event": "text",
  259. "data": [
  260. "\n\n\t"
  261. ]
  262. },
  263. {
  264. "event": "comment",
  265. "data": [
  266. " Attributes with no space between them. No valid, but accepted by the browser "
  267. ]
  268. },
  269. {
  270. "event": "commentend",
  271. "data": []
  272. },
  273. {
  274. "event": "text",
  275. "data": [
  276. "\n\t"
  277. ]
  278. },
  279. {
  280. "event": "opentagname",
  281. "data": [
  282. "button"
  283. ]
  284. },
  285. {
  286. "event": "attribute",
  287. "data": [
  288. "id",
  289. "test2"
  290. ]
  291. },
  292. {
  293. "event": "attribute",
  294. "data": [
  295. "class",
  296. "value4"
  297. ]
  298. },
  299. {
  300. "event": "attribute",
  301. "data": [
  302. "title",
  303. "value5"
  304. ]
  305. },
  306. {
  307. "event": "opentag",
  308. "data": [
  309. "button",
  310. {
  311. "id": "test2",
  312. "class": "value4",
  313. "title": "value5"
  314. }
  315. ]
  316. },
  317. {
  318. "event": "text",
  319. "data": [
  320. "class=\"value4\"title=\"value5\""
  321. ]
  322. },
  323. {
  324. "event": "closetag",
  325. "data": [
  326. "button"
  327. ]
  328. },
  329. {
  330. "event": "text",
  331. "data": [
  332. "\n"
  333. ]
  334. },
  335. {
  336. "event": "closetag",
  337. "data": [
  338. "body"
  339. ]
  340. },
  341. {
  342. "event": "text",
  343. "data": [
  344. "\n"
  345. ]
  346. },
  347. {
  348. "event": "closetag",
  349. "data": [
  350. "html"
  351. ]
  352. }
  353. ]
  354. }