Commit Graph

81 Commits

Author SHA1 Message Date
iska 46629ada01 Update html5lib-tests to latest commit before the Blink changes on 16.09.2015 2015-12-23 21:11:06 +01:00
iska 6c28dad930 Finalize parsing for <ruby> elements in the HTML Parser
https://github.com/whatwg/html/pull/101
2015-12-23 20:44:16 +01:00
iska 518fd5eacb Add tests for parsing extension selectors 2015-12-22 02:37:28 +01:00
iska 9670e11fa5 Refactor private HTML Node methods into separate extension to hide them from public API 2015-12-20 19:08:25 +01:00
iska d924063b02 Add implementation for a DOM Token List
https://dom.spec.whatwg.org/#interface-domtokenlist
2015-11-30 20:22:11 +01:00
iska 9815d3b39e Add nullability annotations throughout the code base 2015-11-30 02:49:58 +01:00
iska a33f4e0834 Use nodes tree description in HTML Parser tests 2015-11-29 03:29:13 +01:00
iska 9e4007dcba Use nullability annotations for HTML Ordered Dictionary 2015-11-29 03:29:12 +01:00
iska 6b81d6e465 Add tests for the CSS Selector Parser 2015-11-28 21:11:48 +01:00
iska 94fed8afa1 Add CSS test fixtures
Tests are adapted from the official suite:
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/static/flat/

Test file format:
Each test file is a HTML fragment with:

<script> element with id="selectors": contains a JSON array of several selector
definitions. Each selector definition has a selector string as input, a "match" array
of the expected matched IDs. Some selectors must fail with a parse error, such
selectors have an "error" key with the error location in the selector string.

<div> element with id="testDOM": contains the DOM fragment which should be
used to select the elements for each of the defined selectors.
2015-11-28 21:10:31 +01:00
iska c57d3453fc Add id & class selector tests 2015-10-26 22:27:00 +01:00
iska 203d153487 Fix hyphen-attribute test 2015-10-26 22:26:19 +01:00
iska 7896f1687e Remove temp test case from type selector tests class 2015-10-23 23:51:30 +02:00
iska 55bb8effb2 Add tests for the CSS Combinator selectors 2015-10-23 23:48:47 +02:00
iska b5bb0a48b6 Add tests for the Nth-Expression selectors 2015-10-23 22:50:20 +02:00
iska 118ea137f4 Update existing type and attribute tests for new structure 2015-10-20 21:31:08 +02:00
iska 6cfe3b6f83 Add implementation for CSS nth-expressions
https://drafts.csswg.org/css-syntax/#anb-microsyntax
2015-10-10 21:34:50 +02:00
iska a54cae8829 Fix type & attribute selectors and their tests after merge with new DOM 2015-06-07 22:34:50 +02:00
iska 5e5b903c52 Fix import in CSS Selector test classes 2015-06-06 23:29:04 +02:00
iska 40b6e41e12 Merge branch 'develop' into feature/css_selectors
Conflicts:
	HTMLKit.xcodeproj/project.pbxproj
	HTMLKit/HTMLNodeFilter.h
2015-06-06 20:20:27 +02:00
iska a7caa34762 Disable HTML DOM checks in parser's performance test
The baseline was set before the DOM validations were implemented.
2015-06-06 20:10:28 +02:00
iska df53870880 Drop the "Node" suffix from HTML Node's first child & last child properties
https://dom.spec.whatwg.org/#interface-node
2015-06-06 19:04:03 +02:00
iska 7f25aacaf1 Add test cases for the Tree Walker class 2015-06-06 19:00:02 +02:00
iska a390edf599 Reintroduce the HTMLNodeFilterValue for Tree Walker implementation
While the Node Iterator treats skip & reject the same way, the Tree Walker can skip over a node
and all its children if rejected.

This reverses dc3de7a470
2015-06-05 23:00:50 +02:00
iska 40400864d8 Add block-based API for Node Filter
- HTMLNodeFilterBlock is a block-based class implementation conforming to HTMLNodeFilter
- HTMLNode & NodeIterator get block-based initializers
2015-06-05 18:06:23 +02:00
iska dc3de7a470 Remove the HTMLNodeFilterValue enum since Reject and Skip are semantically equivalent 2015-06-05 17:05:22 +02:00
iska c1b18f527c Refactor Node Iterator's initializers so that the filter argument is last 2015-06-05 17:04:28 +02:00
iska d4bb3c6636 Add implementation for the removing steps of the HTML Node Iterator
https://dom.spec.whatwg.org/#interface-nodeiterator
2015-06-05 16:47:37 +02:00
iska 066bdeffa8 Add Node Iterator test cases for iteration and filtering logic 2015-05-29 00:39:52 +02:00
iska e1c3533a1c Remove unused import in Tree Construction test class 2015-05-28 22:57:31 +02:00
iska cd6e8bf4fc Remove Tree Enumerator since it was superseded by the Node Iterator implementation 2015-05-28 01:22:29 +02:00
iska ac561570f3 Use correct DOM import in test classes 2015-05-28 00:43:27 +02:00
iska 165cdb5a75 Fix HTML Element initializer usage after arguments reordering 2015-05-28 00:42:59 +02:00
iska aece7138a4 Rename Tree Enumeration Tests to Node Iterator Tests 2015-05-28 00:42:20 +02:00
iska 915f4cc064 Remove baseURI property from HTMLNode
Proper support will be implemented when needed.
2015-05-27 00:38:07 +02:00
iska 11af0509a3 Rename type property to nodeType in HTMLNode for better clarity 2015-05-27 00:37:23 +02:00
iska 74aec57785 Add method to set inner HTML of an Element 2015-05-21 00:20:20 +02:00
iska 62b385d9b4 Add test cases for changing selectors' properties for the Type & Attribute selectors 2015-05-14 21:42:53 +02:00
iska 221b085fe5 Add tests for the Type & Attribute selectors 2015-05-14 21:18:55 +02:00
iska 2c9f68e2ea Add Node methods to prepend nodes 2015-05-02 21:08:21 +02:00
iska bf061d6367 Add support for inserting a Document Fragment
Previous implementation would just insert the fragment as a child node, whereas it should insert its
child nodes.
2015-05-02 20:47:40 +02:00
iska 40baea8ece Move tests for Mutation Algorithms into separate class 2015-04-27 19:43:43 +02:00
iska a2c6f22495 Add comments for insertion and replacement tests 2015-04-25 22:31:47 +02:00
iska b2f1864c80 Add tests for validating the replacing child node within a Document 2015-04-25 22:31:12 +02:00
iska bc6bbf1d63 Add tests for validation for inserting an Element & Document Type into a Document 2015-04-25 15:27:25 +02:00
iska 71aed89574 Fix validation for inserting a Document Fragment into a Document 2015-04-25 15:13:43 +02:00
iska 3ddfa15b15 Add tests to validate the insertions of nodes into a given parent
These tests check the implementation of the Mutation Algorithms of the DOM Standard
https://dom.spec.whatwg.org/#mutation-algorithms
2015-04-25 13:20:15 +02:00
iska 1bc896efc9 Add tests for HTML Node methods
Todo: Tests for negative cases, e.g. invalid manipulations that lead to hierarchy or not found errors.
2015-04-23 00:43:06 +02:00
iska 5aaa223437 Improve error message for the Tokenizer tests 2015-04-17 00:53:12 +02:00
iska 1829af229a Add Ordered Dictionary tests
- Remove index checks, an exception will be thrown by the underlying array
- Fix indexed subscript method name
- Change behaviour of "setObject:forKey:atIndex:" so that an existing key is moved
2015-04-17 00:43:47 +02:00