Commit Graph

55 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov f37c7e29e0 Remove QT source and make phantomjs compile with unmodified QT, fix binary encoding of web response 2015-02-07 01:48:33 +03:00
Zack Weinberg 50ae50e871 Add a command-line option --local-urls={true,false}
The default is 'true'.  When set 'false', file: and qrc: URLs are
treated as invalid (unknown scheme) rather than opening local files,
as requested in issue #12752.

In order to test this, I added a mechanism to test/run-tests.py
allowing individual tests to be annotated with command-line
options to pass to phantomjs or the script.
2014-11-21 15:51:35 +00:00
Zack Weinberg f4eb3645f2 Make ciphersuite selection configurable; match Chromium by default. (#12524)
New option --ssl-ciphers takes a colon-separated list of OpenSSL
cipher names and sets the client cipher list to exactly that list.

The default for this option is arranged to match Chromium 35, which
has had its cipher selection optimized for the modern Web
(see https://briansmith.org/browser-ciphersuites-01.html for
rationales).  (Newer versions are the same except that they also add
ChaCha20-based ciphersuites, which OpenSSL 1.0.1 hasn't yet picked up.)
2014-08-30 20:49:58 -04:00
Zack Weinberg e8cddbfe7b Enable support for modern SSL (#12524).
* --ssl-protocol= option now accepts 'tlsv1.2', 'tlsv1.1', 'tlsv1.0'
   and 'default' as well as the existing 'tlsv1', 'sslv3', and 'any'.

 * The default is now none of the above, but rather QSsl::SecureProtocols,
   which means "whatever subset of ANY is still considered secure and also
   supported by the OpenSSL library in use".  (As of this writing, Qt's idea
   of "still considered secure" includes everything from SSLv3 on up, which
   is technically wrong -- SSLv3 has known breaks -- but we can live with.
   Qt currently doesn't have a way to select "TLSv1.0 and up".)
2014-08-30 20:49:38 -04:00
Ariya Hidayat 48fabe0646 Remove CoffeeScript support.
https://github.com/ariya/phantomjs/issues/12410
2014-07-30 01:29:21 -07:00
Vitaliy Slobodin cf12fc4a23 Long live PhantomJS 2!
https://github.com/ariya/phantomjs/issues/10448
2014-07-27 07:47:34 -07:00
Aaron Stone 394e2f8699 Add option --script-language to explicitly set javascript or coffeescript
https://github.com/ariya/phantomjs/issues/11744
2013-12-13 06:58:04 -08:00
Vitaliy Slobodin 4d916971b3 Fix including http:// in the proxy URL:
The proxy host parsed incorrectly, when it was typed with a scheme (http or https).
Now proxy can be specified with the scheme.

Fix invalid type conversion:
m_proxyPort converts to its ASCII representation.
Use `QString::number` to include a proxy port properly.

Issues:
https://github.com/ariya/phantomjs/issues/11117
https://github.com/ariya/phantomjs/issues/10811
2013-05-29 00:38:15 +04:00
Vitaliy Slobodin 78242e5d6c Fix command line option typo
Issue #11219: https://github.com/ariya/phantomjs/issues/11219
2013-04-12 23:12:20 -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
Ivan De Marino 78d90641df Importing new GhostDriver 1.0.3.
See the https://github.com/detro/ghostdriver/ project for details.
2013-03-18 09:20:50 +00:00
James M. Greene 1604b4d6c1 Updated help output to prefer true/false to yes/no
Similarly, I updated the API Reference too:
7cddd19676

This arguably makes more sense to PhantomJS's typical audience of web developers.
2013-02-04 23:58:10 -08:00
James M. Greene 1a487d2bbf Added myself to the copyright list 2013-01-16 08:00:51 -08:00
James M. Greene 360dc3a30c Corrected default value for disk-cache help
Fixes http://code.google.com/p/phantomjs/issues/detail?id=908
2013-01-16 08:00:51 -08:00
Ivan De Marino f5652e5110 Fix "--webdriver-selenium-grid-hub" CLI parameter.
I had forgotten to update the option parsing code,
and the option was never picked.

Related issue: [GhostDriver #130](https://github.com/detro/ghostdriver/issues/130).
2012-12-13 23:45:54 -08:00
Ivan De Marino ffa9fab316 Embedding GhostDriver into PhantomJS(!!!)
Finally. After so much work, this is finally a reality.
To launch PhantomJS in "Remote WebDriver mode":

```bash
$ phantomjs --webdriver=OPTIONAL_IP:OPTIONAL_PORT
```

Also, GhostDriver brings along support for Selenium Grid: now PhantomJS can register itself to a Selenium Grid HUB.
Just launch it in Webdriver Mode with the following extra options:
```bash
$ phantomjs --webdriver=OPTIONAL_IP:OPTIONAL_PORT --webdriver-selenium-grid-hub=http://url.to.selenium.grid.hub:port
```

http://code.google.com/p/phantomjs/issues/detail?id=49
2012-11-27 07:58:34 -08:00
Vitaliy Slobodin f3d920908a QSslConfiguration: SSLv3 should be the default value
http://code.google.com/p/phantomjs/issues/detail?id=174
2012-10-29 06:36:11 -07:00
Vitaliy Slobodin b834f2a590 Allow to specify the SSL protocol for a requests.
http://code.google.com/p/phantomjs/issues/detail?id=174
2012-10-29 06:36:08 -07:00
Jon Leighton e7c37d4a2b Fix --help and --version
https://code.google.com/p/phantomjs/issues/detail?id=789
2012-09-19 21:56:56 +01:00
Ryan Cumming 23fe144a39 Treat all args after the script name as script args
This fixes CapserJS which builds a command line like this:
phantomjs bin/bootstrap.js --casper-path=~/capserjs --cli

That works on Phantom 1.6 but not on master due to the qcommandline
port.

Fix by extending qcommandlne to take a ParameterFence flag which causes
it to treat any options after a parameter as arguments. Switch
"scriptname" to use that so the 1.6 behaviour is restored.

http://code.google.com/p/phantomjs/issues/detail?id=55
2012-09-17 22:05:42 -07:00
Jakub 1ab5c66df8 Update src/config.cpp
This is a patch to resolve issue i reported in ticket 773 <http://code.google.com/p/phantomjs/issues/detail?id=773>. 
I did build it and run tests seems to be working fine.

I hope this helps a bit :) Also i'm sending friday hugs to everyone on the team.
2012-09-14 12:05:52 +02:00
Ariya Hidayat 93686d8306 Allow bypassing automatic use and detection of system proxy.
Pass the command-line option --proxy-type=none to completely bypass any proxy.

http://code.google.com/p/phantomjs/issues/detail?id=580
2012-09-03 18:20:02 -07:00
Ivan De Marino b3a0eeff87 Fix handling of boolean values in Config.cpp
http://code.google.com/p/phantomjs/issues/detail?id=55
2012-09-03 13:44:21 -07:00
Ariya Hidayat 08bd78f7b9 Use QCommandLine for command-line options handling.
http://code.google.com/p/phantomjs/issues/detail?id=55
2012-09-03 06:02:05 -07:00
Ivan De Marino 5f0ed88a90 Handling "window opening" in PhantomJS.
This addresses [Issue #151](http://code.google.com/p/phantomjs/issues/detail?id=151).

Summary of the new API:
- page.pages[]
- page.pagesWindowName[]
- page.getPage(windowName)
- page.windowName
- page.onPageCreated = function(newPage) { ... }

The page object created by the user holds responsibility of the "child" pages it creates.
If a page closes (i.e. window.close()) or a call to "page.pages[i].release()" is done,
the array "page.pages[]" will automatically update to contain only the pages still open.
2012-07-13 09:56:47 -07:00
Jon Leighton 28d507d24f Allow debug/warning messages to be enabled at runtime.
https://code.google.com/p/phantomjs/issues/detail?id=575
2012-06-14 23:34:40 -07:00
Nera Liu c85a26a229 Add --local-storage-quota and --local-storage-path options for issue 300.
Add sanity check for the configuration of --local-storage-quota and --local-storage-path.

issue 300 - http://code.google.com/p/phantomjs/issues/detail?id=300
2012-05-19 21:04:01 +08:00
Ariya Hidayat 14b1ec6688 Remove setting and command-line option for plugins loading.
http://code.google.com/p/phantomjs/issues/detail?id=418
2012-03-23 07:42:17 -07:00
Jon Leighton a48770cba3 support for backtraces (part 2).
add a default error handler on all pages. people can override if they
need.
ensure error handler can be removed without errors.

Hack ScriptSourceCode so we can pass in a raw string and not have it
validated as a URL

change source location hint for webpage.evaluate().

http://code.google.com/p/phantomjs/issues/detail?id=166
 Please enter the commit message for your changes. Lines starting
2012-03-17 18:40:41 -07:00
Ariya Hidayat c12f1aab4a Control web security setting.
This is through --web-security command-line option and
webSecurityEnabled configuration setting.

When web security is off (disabled), universal access to any location
from any document is granted. Use it with caution!

Patch by Danny Wang <wangyang0123@gmail.com>.
Originally from https://github.com/ariya/phantomjs/pull/212.

http://code.google.com/p/phantomjs/issues/detail?id=28
2012-03-12 23:37:50 -07:00
Stephen Young 7615582e0c Proxy authentication support.
This is through --proxy-auth command-line option and proxyAuth
configuration setting.

http://code.google.com/p/phantomjs/issues/detail?id=105
2012-03-12 20:51:14 -07:00
Ivan De Marino 49c2900767 Adding short version of "--help" and "--version" command-line arguments.
This covers [Issue #408](http://code.google.com/p/phantomjs/issues/detail?id=408).
2012-03-05 21:20:52 -08:00
Jon Leighton e88e008ecf Add option to specify whether or not the remote debugger should autorun.
http://code.google.com/p/phantomjs/issues/detail?id=399
2012-02-28 07:46:09 -08:00
execjosh 12504321e1 Add conventional "--help" option
Most command-line programs provide an option to display the usage
message.  Currently, this is achieved by passing no options at all.
This change allows for a more intuitive way for users to check the
list of available options.

http://code.google.com/p/phantomjs/issues/detail?id=347
2012-01-12 03:02:46 -08:00
Ivan De Marino e7ab5e31da Removing a 1 liner method (aka, almost useless) that indeed is not declared (hence, unusable).
Ehm? What?
2012-01-04 17:06:10 +00:00
Will 91b272760b Allow proxy type to be set on the command line.
http://code.google.com/p/phantomjs/issues/detail?id=266
2011-12-26 13:16:31 -08:00
Ariya Hidayat ac95479424 Merge pull request #166 from jgornick/add-socks5-proxy
Added ability to specify SOCKS5 proxy type.

http://code.google.com/p/phantomjs/issues/detail?id=266
2011-11-21 20:47:56 -08:00
Leo Franchi 610fb41922 Add support for remotely debugging a script.
This adds a new parameter --remote-debugger-port=<port>. When set,
phantomjs is operating in debug mode and will expose a webkit remote
debugger on the desired port. It can be attached to from any WebKit
browser on the given port and debugged.
2011-11-15 19:02:06 -05:00
Joe Gornick cd9f40b22d Merge branch 'master' of git://github.com/ariya/phantomjs into add-socks5-proxy 2011-11-08 23:23:28 -06:00
Joe Gornick d91c5af9b2 Added ability to specify SOCKS5 proxy type. 2011-11-08 21:58:48 -06:00
Ivan De Marino 19b32cff0a Refactored and Centralised how we handle the loading of resource files.
* Some code reuse
* Centralised in Utils the loading of resource files
* It is safe to assume, when loading a resource file, that IT'S THERE and IT'S READABLE
* ALSO, I removed the unused 'shims' (we forgot them in there :P)
2011-10-16 20:35:21 +01:00
Ariya Hidayat 76de868075 Make HTTP authentication as page settings.
http://code.google.com/p/phantomjs/issues/detail?id=45
2011-09-16 17:34:02 -07:00
Ariya Hidayat 5449251a6c Unify the name to 'cookiesFile' everywhere.
http://code.google.com/p/phantomjs/issues/detail?id=91
http://code.google.com/p/phantomjs/issues/detail?id=180
2011-09-15 09:40:22 -07:00
Ariya Hidayat 059e72588c Rename option/config to localToRemoteUrlAccess(Enabled). 2011-09-07 09:27:20 -07:00
Ariya Hidayat d35f81bbda Decouple static helper methods from a class. 2011-09-06 17:00:59 -07:00
Ariya Hidayat cebe64ec31 Config to limit the disk cache size.
Based on the previous patch at https://github.com/ariya/phantomjs/pull/144.

http://code.google.com/p/phantomjs/issues/detail?id=220
2011-09-06 16:33:11 -07:00
mintbridge af71868c23 add basic http auth support to networkaccessmanager, and add the ability to pass the auth credentials in from the command line 2011-09-02 16:35:58 +01:00
execjosh d792cd8d05 Remove ini file related stuff from Config 2011-08-30 00:50:59 +09:00
execjosh 3c4699b609 Add "--config" command-line option 2011-08-30 00:45:39 +09:00
execjosh 26f7185bf6 Implement JSON config loader 2011-08-30 00:43:41 +09:00