Commit Graph

277 Commits

Author SHA1 Message Date
Vincent Sanders
7706ba5beb fix mime sniff test with comment tag 2017-03-20 23:39:15 +00:00
Vincent Sanders
399d19ce25 extend mime sniff coverage with bad mp4 tests 2017-03-20 23:21:26 +00:00
Vincent Sanders
3c94073590 extend mime sniffing tests to cover rss and atom feed detection 2017-03-20 16:24:44 +00:00
Vincent Sanders
4eb7c5497e extend mime sniffing test coverage to most of current implementation 2017-03-20 15:27:08 +00:00
Vincent Sanders
e1779b426a add mime sniffing test cases for more header content types 2017-03-20 14:49:03 +00:00
Vincent Sanders
85e7bdf047 extend mime sniffing test coverage 2017-03-20 12:22:22 +00:00
Vincent Sanders
f39d78dc2e mimimal mime sniffing test 2017-03-20 00:48:11 +00:00
Vincent Sanders
eb5e5ff486 add test to messages buffer lookup api 2017-03-14 23:23:46 +00:00
Vincent Sanders
5395c2b98e free resources in messages test 2017-03-14 23:12:02 +00:00
Vincent Sanders
925c69f16a add additional string handling tests 2017-03-14 23:07:26 +00:00
Vincent Sanders
0e8ab04051 extend human readable size tests to cover buffer cycling 2017-03-14 13:49:23 +00:00
Vincent Sanders
f7c0ea5156 have more comprehensive separate test case for snstrjoin 2017-03-14 13:37:34 +00:00
Vincent Sanders
3d33157a86 add utility string handling 2017-03-14 11:59:04 +00:00
Vincent Sanders
fcc1a1e4c2 improve numerical ipv6 urldb prefix search test coverage 2017-03-13 23:52:56 +00:00
Vincent Sanders
2406acfeb3 fix urldb numerical v6 address handling 2017-03-13 23:44:06 +00:00
Vincent Sanders
089179a5b1 iterate urldb v6 numerical adresses as well as ipv4 2017-03-13 22:23:50 +00:00
Vincent Sanders
6eff2522c8 add urldb tests for content type setting 2017-03-13 22:04:38 +00:00
Vincent Sanders
d55d7f3e1e add urldb tests for urls which cannot be found 2017-03-13 21:53:42 +00:00
Vincent Sanders
ce6c0b9026 add persistance flag tests to urldb 2017-03-13 21:20:47 +00:00
Vincent Sanders
9a004753d2 extend the session addition test with all the urls from the add/set/get test 2017-03-13 20:07:56 +00:00
Vincent Sanders
44ad580a75 extend urldb tests with url creation, setting and getting operations 2017-03-13 16:44:30 +00:00
Vincent Sanders
363c32c07a extend nsurl component API test case 2017-03-10 11:36:02 +00:00
Vincent Sanders
fc1be0144c extend nsurl parent API tests 2017-03-10 11:06:51 +00:00
Vincent Sanders
510efac384 add nsurl get_utf8 test case 2017-03-10 10:22:17 +00:00
Vincent Sanders
b307fa4311 nsurl tests were not exercising unicode 2017-03-10 09:02:42 +00:00
Vincent Sanders
01d7392a6a replace tmpnam with something more suitable for the test files 2017-03-09 22:11:55 +00:00
Vincent Sanders
ae8623a0a2 fix compilation warnings in urldb test 2017-03-09 13:22:37 +00:00
Vincent Sanders
5ebec85282 actually check the generated database files against reference test data 2017-03-08 22:22:54 +00:00
Vincent Sanders
0da0dcc342 remove urldb_add_host and path from public API
The urldb_add_host and urldb_add_path API were only public for the
urldb test code which was calling them incorrectly in any case as the
url bloom filters were not updated so serialising and adding data to
entries was inconsistent.

This also changes the tests to use the urldb_add_url API which is less
buggy and results in a smaller, cleaner urldb API.
2017-03-08 13:27:00 +00:00
Vincent Sanders
4076cc64d2 Change url entry expiry timestamps in test database to far future 2017-03-08 10:10:55 +00:00
Vincent Sanders
ac446f9aff add a urldb test for a complete session where something is added to the database 2017-03-07 00:35:57 +00:00
Michael Drake
7996c29b0c Test: Fix up for rearranged nsurl source. 2017-02-08 17:32:56 +00:00
Daniel Silverstone
57fec3504f Add dom change event test 2017-02-05 12:39:50 +00:00
Daniel Silverstone
51062e55b0 Ensure hash table test doesn't go over-time 2017-02-05 11:57:26 +00:00
Daniel Silverstone
4b3f2bb946 Fix up tests to not use system libidn 2017-02-05 11:57:16 +00:00
Vincent Sanders
9be0f4ccaf fixup usage of directory creation macro in Makefiles 2017-01-07 13:21:25 +00:00
Vincent Sanders
2d9ed9cbc4 rename default build output directory target 2017-01-05 23:02:03 +00:00
Vincent Sanders
48f868a955 move tree compatability layer to amiga frontend 2016-12-31 01:04:27 +00:00
Michael Drake
2d5db505e7 Test: Add trailing whitespace and garbage datetime string parse tests. 2016-08-17 09:11:02 +01:00
Vincent Sanders
02360ec7be add some corestrings API tests and fix corestrings fini. 2016-08-14 23:49:53 +01:00
Vincent Sanders
0e5824c8e8 add bloom filter test for adding NULL string 2016-08-14 23:32:20 +01:00
Michael Drake
78d53fff1f Tests: Add some basic tests for date string parsing. 2016-08-13 13:11:48 +01:00
Michael Drake
68b20a382d Tests: Fix option handling test data. 2016-08-11 08:42:51 +01:00
Vincent Sanders
94de23dce9 add more tests for partial iterator in url database 2016-08-09 13:15:36 +01:00
Vincent Sanders
6a26755576 add more API coverage to url database unit tests 2016-08-09 12:41:16 +01:00
Vincent Sanders
115985f069 extend url database unit testing to cover more API 2016-08-09 12:26:37 +01:00
Vincent Sanders
d35ad1b8e7 add cookies tests to url database unit testing 2016-08-09 10:47:47 +01:00
Vincent Sanders
54860ee6b8 add cookie database load and restore unit test 2016-08-09 00:09:33 +01:00
Vincent Sanders
5830a4c040 extend url database checks to cover authentication detail setter and getter 2016-08-08 23:59:21 +01:00
Vincent Sanders
4bc029340e add some basic url database iteration tests 2016-08-08 23:45:01 +01:00
Vincent Sanders
958fb6aa5e add url databse write output to unit test 2016-08-08 23:13:23 +01:00
Vincent Sanders
4448fa6cbf Fix warnings in unit tests 2016-08-08 22:12:16 +01:00
Michael Drake
1158536bff Tests: Squash more warnings. 2016-08-08 18:09:37 +01:00
Michael Drake
4b90528d3c Tests: Squash some warnings. 2016-08-08 18:03:57 +01:00
Vincent Sanders
c1aec1cfa0 fix urldb warning and test build 2016-08-08 13:52:54 +01:00
Vincent Sanders
aa10f2f1ef wrap urldb tests in check harness and add minimal session test 2016-08-08 13:44:18 +01:00
Vincent Sanders
cc3c1eb99b add unit test for user message handling 2016-08-06 23:43:23 +01:00
Vincent Sanders
124d3fe9f0 add some more bad values to choices file to ensure parser can cope 2016-08-06 10:43:52 +01:00
Vincent Sanders
c0f4bbb308 remove erroneous parameter check to nsoption_snoptionf
The API check and bounds check for option indexes was from an unsigned
enum so checking for negative numbers was causing "comparison is always
false" errors in compilation.
2016-08-06 10:27:32 +01:00
Vincent Sanders
40ae120360 fix formatted option no init test 2016-08-06 01:29:43 +01:00
Vincent Sanders
62b76bf31a improve option test coverage futher 2016-08-06 01:20:37 +01:00
Vincent Sanders
b2a78c5c6e improve user option testing to cover all the API 2016-08-06 00:06:44 +01:00
Vincent Sanders
afc79d5912 Improve user option testing and API parameter checking 2016-08-05 22:34:44 +01:00
Vincent Sanders
e8df81fdb3 add tests for utility string handling 2016-08-04 00:19:48 +01:00
Vincent Sanders
5a73f0797f add url escape test for complete garbage input 2016-08-03 16:06:17 +01:00
Vincent Sanders
eb5e0599af Improve percent escaping testing, parameter checking and documentation 2016-08-03 15:04:28 +01:00
Vincent Sanders
908db8a51d Add url percent escape test with minimal test vectors 2016-07-31 13:25:20 +01:00
Michael Drake
fa2e3b7784 URL unescape: return the new length to the caller.
The avoids situations were we threw away the length, only for
the caller to have to strlen the returned string.

Note, there seems to be a case of the amiga front end writing
beyond end of allocation.  Added a TODO for now.
2016-07-24 14:03:16 +01:00
Vincent Sanders
c313524998 reduce curl usage to fetcher, url unescaping and time parsing 2016-06-29 23:06:53 +01:00
Vincent Sanders
a60c4749ff fix url database test after API header changes 2016-06-14 00:16:42 +01:00
Vincent Sanders
a996bee9fa fix test include path to account for public API headers 2016-05-30 11:53:20 +01:00
Vincent Sanders
2dab078f21 move bitmap API header to core include directory 2016-05-26 23:01:03 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Vincent Sanders
51f8e7c6a4 fix test target 2016-05-21 12:17:54 +01:00
Vincent Sanders
6a36d4ec2b remove all core usage of warn_user API 2016-04-26 12:50:16 +01:00
Vincent Sanders
d2dd574106 fix urldb test build 2016-04-17 22:27:53 +01:00
Vincent Sanders
7b78985983 make check library probe faliure silent 2016-04-16 23:50:21 +01:00
Michael Drake
356615573a Test: Remove duplicate noscript element. 2016-02-06 12:51:44 +00:00
Vincent Sanders
f06ec6390a add noscript warning to all tests so it is obvious when js is disabled 2016-02-04 15:11:19 +00:00
Michael Drake
3cc80b6a7d Add test for document.write() adding a STYLE element. 2016-02-02 12:19:00 +00:00
John-Mark Bell
25b88e42e6 Test for [TreatNullAs=EmptyString] 2016-02-01 20:50:42 +00:00
Michael Drake
b1dbc046f1 Add paragraph proto test. 2016-02-01 15:36:12 +00:00
Michael Drake
9c57ddf0b2 1 isn't prime. 2016-01-23 17:44:42 +00:00
Michael Drake
4b0ebae56a Add a couple of general JS tests.
The primes one prints its execution time:

  NetSurf without -v: 1300ish
             with -v: 5000ish
      Firefox 38.5.0:  300ish
2016-01-23 10:32:26 +00:00
Daniel Silverstone
4137739b8a Tests for body onload behaviour 2015-11-22 16:53:22 +00:00
Michael Drake
396b445599 Add failing test.
1. Add "id" attribute.
2. Remove "ID" attribute.
3. Check id value.

In NetSurf it isn't removed, in Firefox it is.
There's a case sensitivity/conversion issue somewhere.

It the test works when we add/remove with the same case.
2015-10-29 16:55:42 +00:00
Michael Drake
218839d05a Fix title. 2015-10-29 16:50:36 +00:00
Michael Drake
6098646e72 Add binding for DIV element's align getter/setter, and test.
Currently the second part of the test fails.
2015-10-29 11:47:53 +00:00
Daniel Silverstone
36bf691cee Add .id and .className support to Element along with a test 2015-10-25 21:47:35 +01:00
Daniel Silverstone
c752c85618 Correct some incorrect error case handling and add tests to demonstrate fix 2015-10-21 18:55:39 +02:00
Daniel Silverstone
2f52338328 Fix up Element to return null rather than undefined, add tests 2015-10-21 18:46:43 +02:00
Vincent Sanders
b7eb35ef24 putforwards test on location 2015-10-05 23:09:07 +01:00
Vincent Sanders
fbc3f36fb5 initial js navigator binding 2015-10-05 15:46:22 +01:00
Vincent Sanders
46945f6362 Improve location implementation to be more complete 2015-09-20 10:35:32 +01:00
Michael Drake
4b07aead3f Add Node::nodeType to test index. 2015-08-11 20:49:32 +01:00
Michael Drake
78c5ab6f9f Add Node::nodeType test. 2015-08-11 17:21:08 +01:00
Vincent Sanders
e91255b409 add simple javascript test calling operation with too few arguemnts 2015-08-11 14:36:43 +01:00
Daniel Silverstone
0df3439eb2 Fix constructor injection to use new constructor type, add test 2015-08-09 18:54:37 +01:00
Daniel Silverstone
db40a6439a Disambiguate references 2015-08-09 11:57:13 +01:00
Vincent Sanders
82beca0432 Complete hash table tests and clean up ineterface. 2015-07-12 17:28:03 +01:00
Vincent Sanders
3862549ed9 Add initial tests for hash table. 2015-07-12 11:24:20 +01:00
Vincent Sanders
3f3ac6e909 add some more nsurl compare unit tests to improve coverage 2015-07-10 23:05:02 +01:00
Vincent Sanders
956283366b Complete API coverage in nsurl unit test 2015-07-10 22:50:24 +01:00
Vincent Sanders
22023d616a Add nsurl unit tests for the component handling parts of the API 2015-07-10 16:25:35 +01:00
Vincent Sanders
e5ff82ff52 Improve nsurl unit test to exercise the compare API 2015-07-10 11:53:31 +01:00
Vincent Sanders
2e7b69be0a Extend bloom filter test to check item count is correct 2015-07-10 11:31:48 +01:00
Vincent Sanders
94b5c95676 Add unit test for bloom filter
Adds check based unit test for teh bloom filter implementation. This
is based on Roberts original test code in utils/bloom.c and uses
/usr/share/dict as a source of strings to check bloom creation, no
false negatives and the false positive rate is below 15%.
2015-07-10 10:48:26 +01:00
Vincent Sanders
7b2d15a036 Add tests for all asserts in nsurl API and for access and access_leaf 2015-07-09 23:29:44 +01:00
Vincent Sanders
eb962f94c3 Add some basic API assert check tests to ensure bad parameters are caught 2015-07-09 17:12:12 +01:00
Vincent Sanders
6f1ed5979d remove unused sources from urldb test 2015-07-09 08:05:06 +01:00
Vincent Sanders
be879ad526 add libidn to test pkgconfig 2015-07-09 08:00:08 +01:00
Vincent Sanders
cb3f267d45 Add coverage to the unit test makefile targets
The tests now only require that the test name is added to the TESTS
variable and a testname_SRCS is set with a list of required sources to
compile.
2015-07-08 22:17:20 +01:00
Vincent Sanders
8756793079 convert nsurl tests to use check unit test framework 2015-07-08 00:40:42 +01:00
Vincent Sanders
bd802e763e Restructure test makefile to be called from main makefile
This changes the make test to be executed from the main netsurf
makefile instead of being standalone. It also fixes up the urldbtest
to run.
2015-07-07 16:02:54 +01:00
Vincent Sanders
ccfc2aeefa make nsurl unit test work again 2015-07-07 00:05:30 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Michael Drake
30909f8ed5 Move FILE_SCHEME_PREFIX to corestrings. 2015-02-26 16:14:23 +00:00
Vincent Sanders
02ff3920ce remove unused url_init function 2014-10-31 00:50:32 +00:00
Michael Drake
6f09b64c59 Add some nsurl_nice tests. 2014-10-30 22:34:09 +00:00
Vincent Sanders
d06df231bc Update the core to use the split operations table headers
Second in the series to decouple the core API usage from the frontends.
2014-10-16 22:33:43 +01:00
Vincent Sanders
02bbaa3e88 split version info into its own header and remove unnecessary nesurf.h includes
The netsurf.h header should *only* contain the registration, core
initialisation and finalisation methods. Version information is best
placed in its own header.

Also remove any unneeded inclusion of this header limiting it to
solely the places the relevant API is required.
2014-10-13 15:08:16 +01:00
Vincent Sanders
4488c8a2e4 fallback to old url creation behaviour if the IDNA host parse fails 2014-06-09 18:05:36 +01:00
Michael Drake
ef6b20fe83 Update test suite for corestrings and log module changes. Update test data for rejection of hostless http(s) urls. 2014-02-11 11:34:42 +00:00
Michael Drake
cf8ffa412a Remove old hotlist, cookies, and history_global_core modules.
New versions of expand/collapse node functions for these modules aren't yet implemented.
2013-09-02 22:41:04 +01:00
Michael Drake
68078d7ea7 Fix up for cookies_old rename. 2013-07-22 10:21:37 +01:00
Vincent Sanders
ee6e6eec05 move options include 2013-05-28 14:16:10 +01:00
Vincent Sanders
c1e864656d add tests for new options API 2013-05-28 14:16:10 +01:00
Vincent Sanders
7f7ff93745 add recusion and infinite loop tests 2013-05-22 19:12:26 +01:00
Michael Drake
d64416774d Fix up for various core changes. 2013-04-08 17:50:55 +01:00
Michael Drake
0d7d76a6f3 Fix for http_only param change. 2013-04-08 17:25:12 +01:00
Vincent Sanders
9b568abf96 add default property handler for array indexing 2013-01-22 22:54:34 +00:00
Vincent Sanders
04825c62df implement document.URL and document.documentURI 2012-12-07 15:50:24 +00:00
Vincent Sanders
897acff532 make events work on elements 2012-12-04 18:01:11 +00:00
Vincent Sanders
3052864773 issue click events at dom 2012-12-03 17:09:44 +00:00
Vincent Sanders
c2cd36fda8 improve location interface implementation 2012-11-21 18:51:44 +00:00
Vincent Sanders
7757008433 add window enumeration test 2012-11-19 17:26:23 +00:00
Vincent Sanders
4769698d13 add enumeration test on the document node 2012-11-18 21:49:25 +00:00
Vincent Sanders
fa9046fc97 implement childElementCount 2012-11-18 17:35:52 +00:00
Vincent Sanders
99d3633e03 implement previousElementSibling and nextElementSibling 2012-11-18 12:59:10 +00:00
Vincent Sanders
bec8711528 implement lastElementChild 2012-11-18 12:38:07 +00:00
Vincent Sanders
82cae10284 more enumeration tests and update test index 2012-11-16 21:52:27 +00:00
Vincent Sanders
e36b8f6579 safely deal with NULL strings 2012-11-16 15:31:14 +00:00
Vincent Sanders
9acba6cbcc add node enumeration test 2012-11-13 23:22:10 +00:00
John-Mark Bell
617d655c7b Remove libxml 2012-11-10 00:11:57 +00:00
Vincent Sanders
2810fe764d make javascript tests acessible from index and tidy them up a little 2012-11-09 18:03:02 +00:00
Vincent Sanders
16c1059723 add another javascript test 2012-11-06 18:20:41 +00:00
Vincent Sanders
478b57c5d7 working docuemnt.cookie 2012-11-04 16:37:51 +00:00
Vincent Sanders
3f1b683845 implement dom-getElementsByTagName and nodelist and htmlcollection 2012-11-03 21:37:06 +00:00
Vincent Sanders
85c973f986 add jsstring to jsval conversion macro that copes with null jsstrings 2012-11-03 17:37:59 +00:00
Daniel Silverstone
180f7ff42c Merge Vincent's Javascript work onto master 2012-11-03 15:13:43 +00:00