1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

270 Commits

Author SHA1 Message Date
Witold Filipczyk
760dff4419 [js] element.contains 2021-05-15 20:50:03 +02:00
Witold Filipczyk
09988b7fcd [js] element.getAttributeNode 2021-05-14 21:49:56 +02:00
Witold Filipczyk
5c5621aadd [js] document.attributes 2021-05-13 17:41:18 +02:00
Witold Filipczyk
c71b0f2ee1 [js] document.scripts 2021-05-12 20:05:15 +02:00
Witold Filipczyk
35d7847808 [js] document.images 2021-05-12 20:01:08 +02:00
Witold Filipczyk
22cd7a0052 [js] document.links 2021-05-12 17:37:01 +02:00
Witold Filipczyk
ed3a11b288 [js] document.head 2021-05-12 17:28:03 +02:00
Witold Filipczyk
51fe9d1968 [js] document.documentElement 2021-05-12 17:22:34 +02:00
Witold Filipczyk
937b77cfdf [js] document.body 2021-05-12 17:16:10 +02:00
Witold Filipczyk
8e97e8b048 [js] document.anchors 2021-05-12 17:08:05 +02:00
Witold Filipczyk
799f256157 [js] getElementsByClassName 2021-05-12 16:30:36 +02:00
Witold Filipczyk
d22e77a796 [js] getElementsByTagName
TODO: sanitize input for this function
2021-05-12 16:23:46 +02:00
Witold Filipczyk
3e30d82fb4 [js] jsGetElementsByName 2021-05-11 19:02:54 +02:00
Witold Filipczyk
a8e27fc730 [js] lastElementChild 2021-05-10 19:14:39 +02:00
Witold Filipczyk
39c0e7679d [js] firstElementChild 2021-05-10 19:08:36 +02:00
Witold Filipczyk
6798ffc8b0 [js] lastChild 2021-05-09 21:53:14 +02:00
Witold Filipczyk
8c7517189d [js] firstChild 2021-05-09 21:38:23 +02:00
Witold Filipczyk
e020f83d34 [js] innerHTML and outerHTML getters (libxml++) 2021-05-09 21:21:24 +02:00
Witold Filipczyk
471c9282ee [js] childElementCount 2021-05-08 21:51:34 +02:00
Witold Filipczyk
d9073ea9b1 [js] hasAttributes 2021-05-08 19:55:58 +02:00
Witold Filipczyk
0bdbb6aca6 [js] element.hasAttribute(...) 2021-05-07 19:03:53 +02:00
Witold Filipczyk
745387e386 [js] location.hash getter 2021-05-06 16:06:37 +02:00
Witold Filipczyk
955a259f5d [js] location.host getter 2021-05-06 15:53:20 +02:00
Witold Filipczyk
4c4ea4bdd9 [js] location.hostname getter 2021-05-06 15:46:39 +02:00
Witold Filipczyk
7c618d3a6f [js] location.origin 2021-05-06 15:40:17 +02:00
Witold Filipczyk
d5f63e6fca [js] location.pathname getter 2021-05-06 15:31:31 +02:00
Witold Filipczyk
9de0a934ff [js] location.search getter 2021-05-06 15:17:46 +02:00
Witold Filipczyk
07dba347ac [js] location.port getter 2021-05-06 15:06:35 +02:00
Witold Filipczyk
b07d39364c [js] textContent (read) 2021-05-05 15:21:37 +02:00
Witold Filipczyk
9b738edb18 [js] location.protocol (read) 2021-05-04 20:55:06 +02:00
Witold Filipczyk
1e8f86628d [js] className (read) 2021-05-04 18:34:10 +02:00
Witold Filipczyk
b0ee34bdd5 [js] dir (read) 2021-05-04 16:24:56 +02:00
Witold Filipczyk
63b07c01d8 [js] tagName 2021-05-04 16:06:50 +02:00
Witold Filipczyk
adadc03821 [js] title (read) 2021-05-04 15:42:52 +02:00
Witold Filipczyk
cf5841b8de [js] outerHTML (read) 2021-05-04 15:32:29 +02:00
Witold Filipczyk
3bd33b9dd3 [js] innerHTML read property 2021-05-03 18:25:31 +02:00
Witold Filipczyk
63d892838c [getElementById] small success. see test/ecmascript/element.html
Now memory leaks, etc. are not taken into account.
For the beginning I will implement read properties.
2021-05-02 17:27:35 +02:00
Witold Filipczyk
d4a1ce5a38 [blockquote] Rewritten a bit. Refs #112
It does not crash on test file and shows > for pior test cases.
2021-03-28 12:14:43 +02:00
Witold Filipczyk
089189638b [blockquote] More draw_blockquote_chars. Refs #103 2021-03-15 20:20:15 +01:00
Witold Filipczyk
90cbad07d3 [blockquote] test case 2021-03-09 19:46:59 +01:00
nobody@earth.com
31ac8dd5d7 [smjs document replace] rewritten to struct string 2021-02-25 13:40:41 +01:00
nobody@earth.com
f953744189 [smjs document replace] fixed property location, replace and writeln functions, tests 2021-02-24 11:23:34 +01:00
nobody@earth.com
a19b95f20c [smjs local storage] spider monkey local storage 2021-02-22 23:27:19 +01:00
nobody@earth.com
c3e0e0f50d [smjs] Console log Cleanup 2021-02-22 01:52:56 +01:00
nobody@earth.com
c6a3d04e21 SpiderMonkey Update v0.1.a - Console Log 2021-02-21 22:33:29 +01:00
Witold Filipczyk
dfbd75c958 [select] off by two. Refs #88
Also changed a bit utf8_to_unicode.
2021-01-17 21:56:40 +01:00
Witold Filipczyk
d1ecd45828 [mozjs52] It compiles, but often segfaults. No idea yet how to fix it. 2020-10-27 14:53:24 +01:00
Witold Filipczyk
a5b68a25a1 [mozjs45] Code is unstable, but at least compiles. 2020-10-23 22:34:58 +02:00
Witold Filipczyk
4fb19bd1fd [python3] big_file.cgi ported to Python3. Refs #38 2020-01-03 20:20:43 +01:00
Witold Filipczyk
a27e9b168c [python3] adjust code to Python3 in test scripts. Refs #38
I don't know how to fix big_file.cgi
If you know how to get equivalent of this script in Python3, tell me.
2020-01-01 16:07:14 +01:00
Witold Filipczyk
25dd2ecae9 Changed ecmascript engine to mozjs-17.0.
Was not tested, especially smjs is likely buggy.
2019-02-10 21:00:37 +01:00
Witold Filipczyk
7b970144ba Cursor down causes wrong rendering. 2017-11-21 21:39:48 +01:00
witekfl
5284ea185a Anchors (all, but first) are not accessible inside <ul>. 2012-06-12 13:40:31 +02:00
witekfl
4933e26488 The last test commit. 2012-05-27 19:42:43 +02:00
witekfl
c9a9d56f07 Test commit 3. 2012-05-27 19:34:57 +02:00
witekfl
2669b71e1d Test commit. 2012-05-27 19:16:16 +02:00
witekfl
c4b10d8b39 Test commit. 2012-05-27 18:53:34 +02:00
witekfl
ce48dc5ffd test files for html { } and body { } 2012-05-22 14:15:24 +02:00
Miciah Dashiel Butler Masters
0189b6bfc9 Add support & test for the CSS list-style property
Recognise the list-style property and apply it by setting the
appropriate flag on the element's parattr based on the property's value.

Add test/list-style.html with an example of each possible list-style
value (many are unsupported by the HTML engine).
2011-11-14 04:34:50 +00:00
Witold Filipczyk
cbf70d5304 Refactoring: use struct string instead of unsigned char.
It probably doesn't make sense, but there is one warning less on OpenBSD.
2010-09-19 13:56:54 +02:00
Witold Filipczyk
79340fa4ac Better looking symbols for LI elements. 2010-08-11 21:22:21 +02:00
Kalle Olavi Niemitalo
7bb51e7139 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	configure.in
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (kept 0.13.GIT)
	po/be.po (kept 0.13.GIT)
	po/bg.po (kept 0.13.GIT)
	po/ca.po (kept 0.13.GIT)
	po/cs.po (kept 0.13.GIT)
	po/da.po (kept 0.13.GIT)
	po/de.po (kept 0.13.GIT)
	po/el.po (kept 0.13.GIT)
	po/es.po (kept 0.13.GIT)
	po/et.po (kept 0.13.GIT)
	po/fi.po (kept 0.13.GIT)
	po/fr.po (kept 0.13.GIT)
	po/gl.po (kept 0.13.GIT)
	po/hr.po (kept 0.13.GIT)
	po/hu.po (kept 0.13.GIT)
	po/id.po (kept 0.13.GIT)
	po/is.po (kept 0.13.GIT)
	po/it.po (kept 0.13.GIT)
	po/lt.po (kept 0.13.GIT)
	po/nb.po (kept 0.13.GIT)
	po/nl.po (kept 0.13.GIT)
	po/pl.po (kept 0.13.GIT)
	po/pt.po (kept 0.13.GIT)
	po/pt_BR.po (kept 0.13.GIT)
	po/ro.po (kept 0.13.GIT)
	po/ru.po (kept 0.13.GIT)
	po/sk.po (kept 0.13.GIT)
	po/sr.po (kept 0.13.GIT)
	po/sv.po (kept 0.13.GIT)
	po/tr.po (kept 0.13.GIT)
	po/uk.po (kept 0.13.GIT)
	src/ecmascript/ecmascript.c
2009-07-11 16:47:33 +03:00
Kalle Olavi Niemitalo
6f9501346e Remove GFDL-licensed test file
In recent ELinks release announcements, I have described:

  This release of ELinks is mostly licensed under version 2 of the GNU
  General Public License.  More permissive licences apply to some parts
  of it, and there is also one test file under the GNU Free Documentation
  License; please see COPYING for the list.

Remove that test file, so its GPL-incompatible licence need not be
mentioned in future announcements.  The file however remains
downloadable as part of the elinks.git repository and releases like
elinks-0.11.6.tar.gz.  Those should still be covered by the licence.
2009-07-09 00:11:52 +03:00
Miciah Dashiel Butler Masters
874202ef7a Don't fail assertion on 0-second meta-refresh
In start_document_refresh, use register_bottom_half instead of
install_timer if the timeout is 0 because install_timer asserts that it is
given a delay greater than 0.

Add a test case, test/refresh-0timeout.html.  Note that
document.browse.minimum_refresh_time must be set to 0 to reproduce the
assertion failure.
2009-06-18 18:13:25 +00:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
29c34df62e Fix assertion failure if IMG/@usemap refers to a different file.
Change test/imgmap2.html so it can be used for testing this too.

Debian Iceweasel 3.0.4 does not appear to support such external
client-side image maps.  Well, that's one place where ELinks is
superior, I guess.  There might be a security problem though if ELinks
were to let scripts of the referring page examine the links in the
image map.
2009-01-01 19:12:41 +00:00
Kalle Olavi Niemitalo
dc41f0bd4c test: Don't refer to deleted files from imgmap.html.
align.html and poocs.net.html have been deleted.
Point the links to href_tests.html and nbsp.html instead.
2009-01-01 18:36:34 +00:00
Kalle Olavi Niemitalo
5be3f71ddd Add test/image.png and use it in test/imgmap.html.
This makes the image-map test work sensibly in graphical browsers too.
2009-01-01 18:35:11 +00:00
Kalle Olavi Niemitalo
25da8085b3 Fix double-free crash if EOF immediately follows </MAP>.
look_for_link() used to return 0 both when it found the closing </MAP>
tag, and when it hit the end of the file.  In the first case, it also
added *menu to the memory_list; in the second case, it did not.  The
caller get_image_map() supposedly distinguished between these cases by
checking whether pos >= eof, and freed *menu separately if so.

However, if the </MAP> was at the very end of the HTML file, so that
not even a newline followed it, then look_for_link() left pos == eof
even though it had found the </MAP> and added *menu to the memory_list.
This made get_image_map() misinterpret the result and mem_free(*menu)
even though *menu had already been freed as part of the memory_list;
thus the crash.

To fix this, make look_for_link() return -1 instead of 0 if it hits
EOF without finding the </MAP>.  Then make get_image_map() check the
return value instead of comparing pos to eof.  And add a test case,
although not an automated one.

Alternatively, look_for_link() could have been changed to decrement
pos between finding the </MAP> and returning 0.  Then, the pos >= eof
comparison in get_image_map() would have been false.  That scheme
would however have been a bit more difficult to understand and
maintain, I think.

Reported by Paul B. Mahol.
(cherry picked from commit a2404407ce)
2008-12-31 20:15:44 +00:00
Witold Filipczyk
90779b1985 Avoid deprecation warning introduced in Python-2.6. 2008-12-06 18:07:07 +01:00
Kalle Olavi Niemitalo
0ec4f380fa Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	AUTHORS
2008-11-10 00:07:20 +02:00
Peter Collingbourne
658b9cc70f Fixed bug relating to newlines in hidden input fields
This patch fixes an issue whereby a newline character appearing within
a hidden input field is incorrectly reinterpreted as a space character.
The patch handles almost all cases, and includes a test case.
15/18 tests pass, but the remainder currently fail due to the fact
that ELinks does not currently support textarea scripting.
2008-11-09 23:28:46 +02:00
Kalle Olavi Niemitalo
75302f8e62 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
2008-10-03 10:55:11 +03:00
Kalle Olavi Niemitalo
22975bb0ec Remove unclearly licensed test files.
test/align.html: from www.czech-tv.cz
test/css/idnes_mail.html: apparently from idnes.cz
test/erreurs_en.htm: unclear origin
test/javascript_broken.html: presumably from www.hotjobs.com
test/poocs.net.html: presumably from poocs.net

I did not find in the source tree a licence to distribute any of these.
2008-10-03 10:39:12 +03:00
Kalle Olavi Niemitalo
b40736cafe Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/fr.po (kept 0.13.GIT version)
	po/pl.po (kept 0.13.GIT version)
2008-09-27 16:28:28 +03:00
Kalle Olavi Niemitalo
fe78a0249a test/optgroup.html is under GNU Free Documentation License
test/optgroup.html was added on 2004-04-17 with no comment about licensing.
I contacted the author via <http://iccl.fi/feedback.cgi?id=mail>, asking
for a licence.  The author noted that a developer of ELinks had originally
asked on the #debian.fi channel whether the file could be used, and he had
allowed it then.  That permission grant had not been recorded in the source
tree though, and it is not clear whether modification had been allowed.
Anyway, the author now explicitly grants us the GNU free documentation
licence on this file, and is willing to consider other licences.
2008-09-24 02:08:51 +03:00
Kalle Olavi Niemitalo
bbee237ff0 Merge branch 'elinks-0.12' into elinks-0.13 2008-07-20 14:47:40 +03:00
Kalle Olavi Niemitalo
327fc1e46e 1034: NEWS, comments, and tests 2008-07-20 14:34:12 +03:00
Witold Filipczyk
0b2edbd33a upload test: Display filename. 2008-05-03 12:08:54 +02:00
Witold Filipczyk
10caf7a4bc Added test for uploading big files.
the big_file.cgi calculates size and md5sum of sent file.
2008-04-27 12:41:01 +02:00
Witold Filipczyk
ac48b3e4e6 test: raw deflate
(cherry picked from commit c48dc625e3)
2008-03-01 15:27:04 +02:00
Witold Filipczyk
faa47cea6f test: a http server to test the decompression on Windows.
Run: python w32.py. The server listens on port 8900.
It handles only one request. The proper output are numbers
0 through 33999. I have no free disk to test it, but I'm afraid
that the ELinks will hang on Windows after reading 65536 bytes.
Let me know of results of such a test. The ELinks must be compiled
with the zlib library.
2008-03-01 13:53:33 +01:00
Witold Filipczyk
c48dc625e3 test: raw deflate 2008-02-28 19:17:50 +01:00
Witold Filipczyk
8e0938d2fc Encoding tests rewritten. They do not create files in /tmp. 2008-02-17 21:54:18 +02:00
Witold Filipczyk
99c144381a chunked encoding tests: All these tests fail. 2008-02-17 21:54:17 +02:00
Witold Filipczyk
3fd6ae4a2d Three CGI tests for content-encoding.
The output should be:
Two lines should be visible.
The second line.

All three tests fail currently when the ELinks is invoked like this:
$ elinks -no-connect path_to_chunked_test
2008-02-17 21:54:17 +02:00
Witold Filipczyk
d61519666e Encoding tests rewritten. They do not create files in /tmp. 2008-02-14 10:39:56 +01:00
Witold Filipczyk
55f96ecc3f chunked encoding tests: All these tests fail. 2008-02-13 11:12:58 +01:00
Witold Filipczyk
d14740af2e Three CGI tests for content-encoding.
The output should be:
Two lines should be visible.
The second line.

All three tests fail currently when the ELinks is invoked like this:
$ elinks -no-connect path_to_chunked_test
2008-01-21 14:44:10 +01:00
Laurent MONIN
286a6a09d8 Add a simple testcase for missing ; in meta refresh content attribute. 2007-09-14 11:56:55 +02:00
Miciah Dashiel Butler Masters
23262b3145 Fix process_head to check for cache-control information even if no refresh
Previously, process_head immediately returned if there was no refresh, never giving the cache-control check further down a chance to run.

Also add new tests:

   nocache.html
   refresh+nocache.html
2007-09-12 23:33:40 +02:00
Laurent MONIN
24d88d2f3e Add a simple testcase for missing ; in meta refresh content attribute. 2007-09-08 21:06:28 +02:00
Miciah Dashiel Butler Masters
2d0180d1e7 Fix process_head to check for cache-control information even if no refresh
Previously, process_head immediately returned if there was no refresh, never giving the cache-control check further down a chance to run.

Also add new tests:

   nocache.html
   refresh+nocache.html
2007-09-04 12:08:08 +00:00
Witold Filipczyk
1b0bad8cbc test, CGI: added a simple form to test CGI. 2007-06-17 19:42:54 +03:00
Kalle Olavi Niemitalo
55f4307511 SEE compatibility in forms.namedItem.html. 2007-06-10 15:16:51 +03:00
Kalle Olavi Niemitalo
c9b2fbbd46 SMJS: Fix error "forms.namedItem is not a function".
Commit 63752c854b303f5f58636a512a137bf3702e051b on 2004-12-27
seems to have broken this.
2007-06-10 13:11:53 +03:00
Witold Filipczyk
9179c8d3f6 test: The CGI script showing POST DATA sent to it.
TODO: Combine print-post.sh and print-vars.sh into one script.
2007-03-10 13:45:49 +02:00
Jonas Fonseca
45d82029be Add simple script to testing the various features of the -remote option
It should test the most important use cases.
2006-12-04 21:50:01 +01:00
Jonas Fonseca
85e3a09470 Add a stupid test script to print CGI variables set by ELinks
To use it to test whether that CGI works put the following in your
elinks.conf:

      set protocol.file.cgi.policy = 1
      set protocol.file.cgi.path = "/path/to/elinks/test/cgi"

Then point ELinks to the print-vars.sh script inside the CGI test directory
in the ELinks source directory.
2006-11-30 20:46:10 +01:00
Witold Filipczyk
31729c7c59 Test case for scroll. Scrolling currently only works with SEE.
TODO: window.status and SpiderMonkey setTimeout.
2006-10-23 23:08:14 +02:00
Kalle Olavi Niemitalo
0c8d40049f Bug 811: Added test/nbsp.html.
ELinks currently fails this test.  Also, it does not support all the
DOM features used here.  I don't know whether the scripts should be
simplified or ELinks should be enhanced to support them.
2006-10-15 13:37:27 +03:00
Kalle Olavi Niemitalo
1c0598d5ba ECMAScript: More accessKey tests. 2006-08-20 17:07:26 +03:00
Kalle Olavi Niemitalo
4a638c2e84 ECMAScript: Added a test for the accessKey property.
ELinks currently fails this test.
2006-08-20 12:15:57 +03:00
Jonas Fonseca
9f3456c872 Add support for parsing space separated CSS class attribute values
Sequentially apply style for stuff like class="class1 class2".
2006-06-06 15:21:56 +02:00
Witold Filipczyk
a558fe67b9 OnClick test 2006-04-30 16:56:40 +02:00
Miciah Dashiel Butler Masters
a464157d4d SEE & SMJS: document.write(ln): use all arguments
Additionally add a test to test/ecmascript/document_write.html.

Thanks to Kirk Reiser for observing that ELinks only printed the first.
2006-02-12 04:33:42 +00:00
Jonas Fonseca
03c467bcbf Move URI normalization to the test library 2006-01-28 15:03:19 +01:00
7a6a5918fe Test file for document.write 2006-01-27 16:55:41 +01:00
Laurent MONIN
61e07bf6ba Add a css media test file (see bug 722). 2006-01-14 01:56:22 +01:00
witekfl
d8592e4f99 Alternative experimental ECMAScript engine. 2006-01-10 19:17:29 +01:00
Jonas Fonseca
b1514c7a35 Check if the test 'trash' directory could be entered
Original patch by Alex Riesen <raa.lkml@gmail.com> for GIT.
2006-01-06 17:46:55 +01:00
Jonas Fonseca
23f0085842 Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB 2006-01-03 00:34:10 +01:00
Jonas Fonseca
021af4e87c Although aware ELinks doesn't need another sgml/doctype here is DocBook
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00
Jonas Fonseca
9a0bf83756 Add basic stuff for XBEL parsing/highlighting using the DOM engine 2005-12-30 22:19:32 +01:00
Jonas Fonseca
66248849cd Add an RSS test file 2005-12-30 22:18:22 +01:00
Laurent MONIN
0fed31e6bd Add a file for script types testing. 2005-11-02 16:55:15 +01:00
Laurent MONIN
80af673860 More sub/sup tests. 2005-10-19 23:05:41 +02:00
Petr Baudis
06ea255a22 Convert part of the build to the new build system
The root makefile is converted as well as some leaf Makefiles. This
also brings in the required infrastructure and adjusts configure.in
appropriately.

I converted only makefiles containing no configurable stuff, since
that'll require more consideration yet.
2005-09-15 21:03:56 +02:00
Jonas Fonseca
7462f22635 Remove now obsolete .cvsignore files. 2005-09-15 18:33:20 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00