Commit Graph

71 Commits

Author SHA1 Message Date
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
iska 27c020371d Rename NSString category method for clarity and add category tests 2015-04-16 20:37:49 +02:00
iska 575dbc50d4 Add HTML Parser implementation for the <template> tag
Also activate the <template> tests
2015-04-16 20:03:18 +02:00
iska c524b25051 Add HTML5 Lib's test detail message to all assertions in the Tree Construction tests 2015-04-12 19:35:53 +02:00
iska 0911e46dba Add HTMLKit Parser Performance test
This tests measures the parsing time of the HTML Living Standard page, about 8.1MB in
size (as of 23 October 2014)
2015-04-12 18:33:01 +02:00
iska 4158ef0237 Use a accumulator-character-token in the tokenizer to reduce the initialization overhead
Initializing character tokens, and the NSString objects they use, results in a relatively high overhead. The tokenizer
now accumulated all successive characters in on accumulator token until a non-character token is emitted.

This change reduces the execution time of the performance test on the local machine by 48% (reference to baseline)
2015-04-11 22:12:51 +02:00
iska 936c76d142 Remove the superfluous allObjects method from the tokenizer class
Being a NSEnumerator, the tokenizer cannot be reset, hence the change in the tests to create a new
instance for each iteration.
2015-04-11 21:47:55 +02:00
iska 8bfccb124f Use the debug description for Tree Construction tests which dumps a tree structure 2015-04-11 21:44:40 +02:00
iska 0ac909fb66 Add HTML5 Lib Tree Construction tests
https://github.com/html5lib/html5lib-tests
2015-04-11 00:51:37 +02:00
iska 83c9841122 Add implementation for HTML Node Tree Enumerator
Tree-Order (pre-order) enumeration for HTML Node and its descendants
2015-03-29 00:00:01 +01:00
iska 3b4970202d Move Tokenizer tests loading into the helper HTML5Lib Tokenizer Test class
Helps keeping the test-case class uncluttered
2015-03-25 23:01:42 +01:00