Commit Graph

108 Commits (806da21e2b8ce8f02a669f37c5d39eeb037c9ef7)

Author SHA1 Message Date
Jacek Migdal 32d20b4aa7 Port more tests from webpage-spec.
https://github.com/ariya/phantomjs/issues/12439
2014-12-11 20:38:35 -08:00
Jacek Migdal 3b8282cb2e Port the tests from webpage-spec.js
Callback, clip-rect, confirm, object, prompt, scroll-position,
viewport-size and window.

https://github.com/ariya/phantomjs/issues/12439
2014-12-07 16:59:11 -08:00
Ariya Hidayat eddb0db1d2 Port the tests for mousedown, mouseup, and mousemove events.
https://github.com/ariya/phantomjs/issues/12439
2014-10-10 06:40:42 -07:00
Ariya Hidayat 619225b1da Port the tests of keyup, keydown, and keypress events.
https://github.com/ariya/phantomjs/issues/12439
2014-10-09 07:16:59 -07:00
Ariya Hidayat ce66f290c3 Port the test of web page's zoom factor.
https://github.com/ariya/phantomjs/issues/12439
2014-10-08 06:51:16 -07:00
Ariya Hidayat 2cbb695490 Port the tests of the web page's setContent().
https://github.com/ariya/phantomjs/issues/12439
2014-10-02 22:31:49 -07:00
Ariya Hidayat a5f0ff7433 Port the test for console.log multiple arguments.
https://github.com/ariya/phantomjs/issues/12439
2014-09-29 21:29:44 -07:00
Ariya Hidayat 7c61f8857d Port the tests of web page properties and functions.
https://github.com/ariya/phantomjs/issues/12439
2014-09-18 23:17:21 -07:00
Ariya Hidayat b36da277e9 Port the user agent test.
https://github.com/ariya/phantomjs/issues/12439
2014-09-17 21:57:42 -07:00
Ariya Hidayat 83f4baf8c6 Port the test to check for plugin non-existence.
https://github.com/ariya/phantomjs/issues/12439
2014-09-14 09:35:41 -05:00
Ariya Hidayat f85238322e Port the test to change the encoded URL of network request.
https://github.com/ariya/phantomjs/issues/12439
2014-09-13 20:00:21 -05:00
Ariya Hidayat 3b972fbfbb Port the test to change the URL of network request.
https://github.com/ariya/phantomjs/issues/12439
2014-09-12 23:29:40 -05:00
Ariya Hidayat dca6f77a36 Port the test for onRepaintRequested handler.
https://github.com/ariya/phantomjs/issues/12439
2014-09-11 09:57:07 -07:00
Ariya Hidayat d52df7a1cf Port the test to abort network request.
https://github.com/ariya/phantomjs/issues/12439
2014-09-11 09:57:03 -07:00
Ariya Hidayat f95ef19fcb Port the test to check for resource received upon error.
https://github.com/ariya/phantomjs/issues/12439
2014-09-10 21:29:07 -07:00
Ariya Hidayat f29b76bb7f Port the test for resource request error handling.
https://github.com/ariya/phantomjs/issues/12439
2014-09-09 23:08:16 -07:00
Ariya Hidayat f20835735c Port custom headers testing of web page.
The HTTP server launched by the test runner has a new endpoint called
/echo. This simply echoes back some information (current on the made
request, in the future it will be expanded to further information)
formatted as JSON. This echo system facilitates easy testing for request
header manipulation feature.

https://github.com/ariya/phantomjs/issues/12439
2014-09-07 21:13:59 -07:00
Ariya Hidayat 2c10f6095b Port loading tests of web page.
https://github.com/ariya/phantomjs/issues/12439
2014-09-06 22:58:02 -07:00
Ariya Hidayat 3a9fc49679 Enable even more tests (to 322 specs).
https://github.com/ariya/phantomjs/issues/10448
2014-08-24 20:24:39 -07:00
Ariya Hidayat 0cd703085d Reenable some more tests.
Now that the failing tests are isolated (among other, PDF crashing of
https://github.com/ariya/phantomjs/issues/12500), more tests should be
enabled. Going from 270 specs to 316 specs.

https://github.com/ariya/phantomjs/issues/10448
2014-08-24 20:00:04 -07:00
Ariya Hidayat 8cabfed4b3 Remove GIF format for screen capture export (render).
This is to reduce maintenance burden.  A GIF representation of a web
page can be produced by converting its PNG capture. There are numerous
third-party tools which can do the job better (optimized palette,
minimized loss, etc).

https://github.com/ariya/phantomjs/issues/12480
2014-08-23 09:20:20 -07:00
Zack Weinberg 7102e87bf4 Eliminate console spam during normal test execution.
Three tests were (potentially) dumping text to console.log during the
run, which they should never do.

Fixing that revealed that one of them, the test for interrupting a
long-running JS script, was not actually testing what it was supposed
to test. Fixing *that* revealed that the long-running-script hook is
broken and does not actually interrupt JS infinite loops; that test
has been temporarily disabled.

 #12230 (Test suite improvements).
2014-08-19 20:24:27 -07:00
Zack Weinberg 406f736e14 Do not use github.com in tests.
Two tests were spuriously failing because they tried to load pages on
`github.com` that were no longer structured as expected.  Use a local
webserver instead.

 #12230 (Test suite improvements).
2014-08-19 20:24:27 -07:00
Ariya Hidayat e2682edf48 Disable some failing and/or crashing unit tests.
Also, reorder the tests since webpage-spec.js seems to be sensitive to
any previously executed tests.

https://github.com/ariya/phantomjs/issues/10448
2014-07-28 03:33:13 -07:00
Zack Weinberg d65601fe90 Expose HTTP status and reason to onResourceError (#12252). 2014-06-03 20:52:44 -04:00
Ivan De Marino 8f685818aa Fixed tests that dealt with manipulating request URLs.
Related to #11952.

Those tests use "http://phantomjs.org" as fixture.
The website "/images" directory has been renamed "/img",
breaking the tests.

Maybe not the greatest way to go about it, but
for now it will do. We probably need to have fixtures
served by a local server.
2014-03-09 01:02:49 +00:00
Vasyl Vavrychuk 3ae9d38d40 fixed test suite 'WebPage render image'
Previously the test suite 'WebPage render image' made a series of
webpage.open without waiting them to complete. This effected next
runned tests because on load handlers for pages were fired after
'WebPage render image' test finish.

https://github.com/ariya/phantomjs/issues/11780
2014-01-09 17:47:11 -08:00
James McParlane dca15d7ff6 Added onRepaint callback to webpage API.
Enables subscription to RepaintRequested events.
When the callback is invoked the time that the repaint was requested as well as the x,y and width,height of the repainted rectangle are provided as parameters.
Usage: page.onRepaint = function(time, x, y, width, height) { }

https://github.com/ariya/phantomjs/issues/11793
2014-01-06 23:05:30 +00:00
Brad Daily 7659f2551c Adding tests for #11867
This tests mousedown, mouseup, click, and doubleclick for clicks with
modifier events. The mousedown/mouseup tests pass in 1.9.2, the
click/doubleclick do not. All pass with a build from this branch.
2014-01-01 13:47:33 -05:00
Vitaliy Slobodin efcc6c7861 Define the new page callback for interrupting a long-running JavaScript
Issues:
https://github.com/ariya/phantomjs/issues/11198
https://github.com/ariya/phantomjs/issues/11183
https://github.com/ariya/phantomjs/issues/11189
2013-11-23 22:09:39 -08:00
Ivan De Marino c466d8aeef WebServer Headers for Request are treated case-insensitive
To achieve this, Request Headers are stored in both "original" and "lowercase".
In this way we don't mangle with the request object we have received, while
still be able to handle headers when NOT in the classic "Camel-Case" format.

Fixes #11421.
2013-06-21 23:51:05 +01:00
Ariya Hidayat b4c4429e86 Unit tests: reduce the flakiness of loading progress tests.
For whatever reason, swapping the order with the render() tests solve the
intermittent random failures. Also, split the tests between loading
start and finish checks (to better recognize which one is failing, if
there is a failure), also make the tests more asynchoronous.

https://github.com/ariya/phantomjs/issues/11091
2013-06-08 02:18:31 -07:00
Ariya Hidayat 01587211cb Unit test: secure connection check becomes async.
Issue #10882: https://github.com/ariya/phantomjs/issues/10882
2013-06-08 02:05:07 -07:00
Ariya Hidayat 44c3d6080d Unit tests: robustify the tests of PDF, GIF, PNG, JPEG rendering.
Issue #10973 https://github.com/ariya/phantomjs/issues/10973
2013-06-08 02:04:59 -07:00
Ariya Hidayat 9f1f56bc3b Unit tests: terminate any web servers after finishing the tests.
Issue #11163: https://github.com/ariya/phantomjs/issues/11163
Issue #11243: https://github.com/ariya/phantomjs/issues/11243
2013-06-08 02:04:48 -07:00
Ariya Hidayat f57fa468ab Unit test: tweak secure connection check.
The main wikipedia page can be slow to load and thus triggers the timeout.
Let's use the fast Google site so that we don't get flaky outcome.

Issue #10882: https://github.com/ariya/phantomjs/issues/10882
2013-06-08 02:04:39 -07:00
Vitaliy Slobodin 5528d75c9d Network request header manipulation
Issue: https://github.com/ariya/phantomjs/issues/11299 (#11299)

User should be able  to manipulate HTTP headers per each network request, not only using global setting page.customHeaders.
2013-05-13 22:48:58 -07:00
Andrew Galloni 3ae632e704 ChangeUrl to accept an encoded string
Issue #11243: https://github.com/ariya/phantomjs/issues/11243.
2013-04-29 07:07:53 -07:00
execjosh d925a510d9 Improve WebPage CJK support tests.
This is for issue #10249: https://github.com/ariya/phantomjs/issues/10249.
2013-04-22 22:35:08 -07:00
Pavel fcdd274f2e Show postData in onResourceRequested callback.
Issue #10158 https://github.com/ariya/phantomjs/issues/10158
2013-03-31 02:54:37 -07:00
Vitaliy Slobodin 47dc82681d Fire `onResourceReceived` callback when the resource error occured.
Issue #11163: https://github.com/ariya/phantomjs/issues/11163
2013-03-31 02:39:53 -07:00
Jonathan Wilkins 9f9053ec44 Add support for specifying non-default CA certificate bundles.
This is done via SSL_CERT_DIR and --ssl-certstore.

Fixes issue #10916.

https://github.com/ariya/phantomjs/issues/10916
2013-03-20 08:27:54 -07:00
Tom Aizenberg 52883ced68 WebPage: network timeout setting.
Fixes issue #11129.

https://github.com/ariya/phantomjs/issues/11129
2013-03-19 22:57:26 -07:00
Max Desyatov 0147fcbc07 Support for specifying request body encoding for WebPage::openUrl
Added a simple test in test/webpage-spec.js

Test data from http://code.google.com/p/phantomjs/issues/detail?id=1043
2013-03-18 21:43:22 -07:00
Ivan De Marino 005db037cf Tests for the new "page.loading" property.
This commit provides the unit tests for the new property, as asked by
Ariya in #11091.
2013-03-18 09:19:41 +00:00
Vitaliy Slobodin 212e4b7cd9 Reworked api for canceling network requests. Added experimental API for changing the url of the network request.
Issue:
http://code.google.com/p/phantomjs/issues/detail?id=539

Stub
2013-02-24 09:00:07 -08:00
bongole 0734811514 Add rendering to stdout and stderr.
This feature renders PDF, GIF and other format supported by Qt to
stdout or stderr.

*NOTE*
"/dev/stdout" and "/dev/stderr" are converted to System::stdout and
System::stderr on Windows.

Issue: https://code.google.com/p/phantomjs/issues/detail?id=973
2013-01-21 21:44:18 -08:00
Vitaliy Slobodin 6d81933941 Pass the resource URL to the resourceError handler.
http://code.google.com/p/phantomjs/issues/detail?id=997
2013-01-21 21:42:10 -08:00
Ivan De Marino 7e7325c0f5 Fixing up indentation for our Jasmine test specs.
Just getting rid of an itch of mine.
2013-01-17 23:52:47 +00:00
Ivan De Marino 12bb24f418 FIX: 'resource request errors' close the server.
The test "should handle resource request errors"
was not closing the server at the end of the test,
interfering with the successive tests.
2013-01-17 23:47:41 +00:00