27 Commits

Author SHA1 Message Date
Iskandar Abudiab 3333274cfb Use HTMLElement's designated initialiser in tests
Fixes #43
2021-04-29 18:14:15 +02:00
Jarek Pendowski b945c13fa8 Fixed error with operator precedence in Xcode 12.
Removed ambiguity in the test.
2020-08-28 18:14:01 +02:00
Iskandar Abudiab 834cda2d86 Update project settings for Xcode 11 2019-12-28 16:28:44 +01:00
iska 153d48c19c Set iterator and range detach operations to noop
Leave the housekeeping to the NSHashTable itself, which should purge
null-references automatically (not necessarily right away)

Also update tests accordingly: Use `allObjects.count` instead of simply
`count` on the NSHashTable, since `allObjects.count` returns non-null
references.

This should fix #36
2019-08-06 21:26:21 +02:00
iska 23f4e40d08 Add tests for HTML Serialization
Fixes #33
2019-08-06 20:39:40 +02:00
iska f4f7f48845 Move test class into correct folder 2019-08-03 19:47:29 +02:00
iska 12276e91b3 Implement a HTML Tree Visitor
The tree visitor walks the DOM in tree order and calls the provided
node visitor upon entring and leaving a node.
2019-07-31 21:58:07 +02:00
iska 7cbfdb9c78 Introduce prefix for category methods to prevent collisions
See:
https://github.com/iabudiab/HTMLKit/issues/35
2019-03-26 23:23:08 +01:00
iska 7617fceff1 Add test for bug fix issue #30 2018-07-16 22:09:35 +02:00
iska 9dd3c70fc3 Remove foreign attributes adjustment
Fixes #30

Foreign attributes were handled incorrectly because attribute names
were implemented as pure strings without namespace prefix. This change
keeps the attributes as strings and eliminates any handling in regards
to namespaces.

Spec note about attributes:
"If designed today they would just have a name and value."

https://dom.spec.whatwg.org/#attr
2018-05-10 18:41:54 +02:00
Vladimir Vlasov 7c32b5f219 Fix the issue 28 2018-05-03 19:00:29 +03:00
iska 923e271429 Fix eq, lt & gt selectors for the zero-index case
Fixes #25
2018-04-18 23:51:39 +02:00
iska b7bf9d2b04 Use HTMLOrderedDictionary when cloning element's attributes 2018-03-21 22:19:24 +01:00
iska 14b8b5390f Add test case for node deep-clone 2018-03-18 21:45:04 +01:00
Iskandar Abudiab a5599c4163 Merge pull request #23 from CRivlaldo/iterator
Fix the issue #22
2018-03-18 21:26:27 +01:00
Vladimir fa431550d7 Fix the issue 22 (fix a test name) 2018-03-17 11:34:22 +03:00
Vladimir 70c6aee814 Fix the issue 22 2018-03-17 11:33:30 +03:00
Vladimir 7309b97b92 Fix the HTMLElement attributes copying 2018-03-17 10:40:00 +03:00
iska 2dfdeb22ca Fix HTMLElement attribute value serialization
Fixes #17
2017-11-06 21:58:08 +01:00
iska 135715b606 Fix HTMLText serialization
Fixes #16
2017-11-06 21:55:41 +01:00
iska 4e1959bd81 Fix strict-prototypes blocks declarations throughout codebase 2017-09-23 02:31:48 +02:00
iska 4a41b89ecf Update tokenizer implementation as per spec as of 2017.09.09
- Use new initial states in tests according to:
https://github.com/html5lib/html5lib-tests/pull/101

- Implement tokenization errors introduced in:
https://github.com/whatwg/html/pull/2701
https://github.com/html5lib/html5lib-tests/pull/92
2017-09-10 02:23:31 +02:00
Martin Waitz 22de41d912 Fix typo Dowcument -> Document 2017-03-31 08:53:11 +02:00
Martin Waitz 36f5df015a [Tests] fix includes 2017-03-13 23:11:16 +01:00
iska 7ef19f5e20 Ignore performance tests
For now these are ignored for faster testing/iterations.
The test fixture should also be replaced with several smaller
and more representative ones, since it is relatively big.
2017-03-13 23:04:58 +01:00
iska a102f5cd7d Fix loading of test resources
Building and testing the project via Xcode copies the resources into
the testing bundle, which is not the case for SwiftPM. Hence the helper
method, that tries loading the resource from the bundle first. If it is
nil then the resource is loaded from the test module path directly.
2017-03-13 23:01:53 +01:00
iska f1fd0f3ef6 Move test files into HTMLKitTests subfolder Swift Package Manager 2017-02-25 02:07:02 +01:00