Commit Graph

1661 Commits (8cabfed4b3e9f3b3e7e2d7ccd156dee9743ac7d9)

Author SHA1 Message Date
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).
2014-08-23 09:20:20 -07:00
Ariya Hidayat 51c8c9cc62 Fix OS X stdout, stdin, and stderr.
To prevent unintended macro expansion, don't use the name
stdout/stdin/stderr in the native System object. Those properties are
achieved by shadowing it in the module interface (JavaScript side).
2014-08-22 07:56:40 -07:00
Milian Wolff 9e832a1569 Disable the phantom QPA on Windows.
It cannot, nor should it, be selected on windows machines. There, we
stick to the Windows QPA which is required to get a lot of things up
and running, like an eventloop, socket integration etc. pp.

There was code in the phantom QPA to make it compile, but it never
actually worked since a lot of things where missing (such as
instantiating QWindowsContext among others).
2014-08-22 16:35:26 +02:00
Vitaliy Slobodin 22e74549a3 Disable colorized output in tests on Windows.
2014-08-20 20:57:09 -07:00
Marcel Duran 3be7005a17 run-jasmine example: Ensure exit code is always returned.
2014-08-20 20:56:15 -07:00
Zack Weinberg 1e7829db97 Fix crash on exit if pages have been closed (#12482)
Regression from #12431: the loop to clear all surviving pages
neglects to check for entries in `m_pages` which have already
been closed, fully destructed, and therefore replaced by NULL
2014-08-20 14:38:45 -04:00
Ariya Hidayat b5626bff97 Add a simple test for exit behavior.
2014-08-20 05:51:19 -07:00
Milian Wolff a9809996b1 Stop processing of JavaScript after phantom.exit().
This code:

    console.log("Hello World!");
    console.log("Meh, noone should see me!");

currently produces this unexpected output:

    Hello World!
    Meh, noone should see me!

This patch fixes it to only output the first line, by loading a blank
page on phantom.exit(). Direct deletion of the web page can trigger
crashes, so this is a safe workaround.
2014-08-20 05:50:30 -07:00
Ariya Hidayat 77c47044cf Remove misc references to CoffeeScript.
2014-08-19 20:37:06 -07:00
Artem 5e018bd650 Update sleepsort.js
2014-08-19 20:35:06 -07:00
Ariya Hidayat a6f6130767 Travis CI can't build PhantomJS anymore.
2014-08-19 20:30:22 -07:00
Zack Weinberg 26934f32a9 Add a -v/--verbose option to run-tests.{sh,js}.
The newer ConsoleReporter is very quiet by default, which is nice, but
this provides a way to get something more like the older one-line-per-test

 #12230 (Test suite improvements).
2014-08-19 20:24:28 -07:00
Zack Weinberg b524d53d36 Add ability to run tests selectively.
* Anything on the command line after "" will be understood
   as a regular expression (if there is more than one argument, they are
   concatenated, with spaces in between) and only the tests whose "full
   names" match that regexp will be run.  The full name of a test is the
   "describe" string plus a space plus the "it" string.  Note well that,
   unlike the test-runner output, there is no colon in there.

 * and run-tests.js now correctly handle being invoked from
   an arbitrary directory; the cwd does not have to be the project root.

 * Shell portability fixes for

 #12230 (Test suite improvements).
2014-08-19 20:24:28 -07:00
Zack Weinberg 6fb347d296 Fix jasmine.ConsoleReporter.specFailureDetails.
The new Jasmine includes a version of this formerly external add-on, but it
is buggy and doesn't print details of failing tests.

 #12230 (Test suite improvements).
2014-08-19 20:24:27 -07:00
Zack Weinberg e6b67bddc5 Import Jasmine 1.3.1.
The newer jasmine-console behavior requires minor adjustments to the
 ConsoleReporter we create in run-tests.js.  Also, en passant fix for
 a bug in the final callback: exiting with status equal to the number
 of failed tests does not work, because the _exit() system call takes
 only the low eight bits of the value passed.  If a test run happened
 to have 256 failing tests, the old code would have spuriously exited
 successfully.  Instead, just exit(1) if any tests fail.

 #12230 (Test suite improvements).
2014-08-19 20:24:27 -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 in tests.
Two tests were spuriously failing because they tried to load pages on
`` that were no longer structured as expected.  Use a local
webserver instead.

 #12230 (Test suite improvements).
2014-08-19 20:24:27 -07:00
Craig Teegarden f245d3ed22 update modernizr to 2.8.2 - specifically shows phantomjs supports "legacyflexbox" instead of the current "flexbox"
2014-08-19 20:18:46 -07:00
Zack Weinberg 9bbff95a57 Correction to fontconfig usage on Unix-not-OSX.
The PhantomJS QPA hardcoded usage of QFontconfigDatabase on
Unix-not-OSX, causing build failures in "bundle all the libraries" mode.
Use QGenericUnixFontDatabase instead, which is QFontconfigDatabase if
fontconfig is enabled, and QBasicFontDatabase if it isn't.  This means
that the bundled-qtdeps build will use only the fonts bundled with Qt,
and won't be able to find them on a machine that doesn't have the source
tree, which is suboptimal, but at least this makes the bundled-qtdeps
build complete successfully again.

Part of issue #12467.
2014-08-19 16:44:12 -04:00
Ariya Hidayat 2681756efd Obsolete links to any wiki page.
The documentation has been using GitHub pages for a while already.
2014-08-19 07:27:39 -07:00
Zack Weinberg 30a4a01bca 80-column compliance for messages.
Cosmetic fix as part of issue #12467.
2014-08-19 07:20:50 -07:00
Zack Weinberg 8d23afb782 Add --system-qtdeps build mode.
In this mode, system-provided libraries will be used for all of
Qt's dependencies, but Qt and QtWebkit themselves are still the
bundled copies.  This mode actually works.

Now that this mode exists, disable fontconfig in the "everything
bundled" mode, because it drags in the system freetype and several
other system libraries.  (There is no bundled fontconfig.)

Part of issue #12467.
2014-08-19 07:20:49 -07:00
Zack Weinberg 4246ed0533 Correct SQLITE3SRCDIR setting.
This is how we arrange for QtWebkit to use QtBase's bundled copy of
sqlite; without it, QtWebkit will attempt to use a system-provided
library instead, and if headers are unavailable, the build will fail.

Part of issue #12467.
2014-08-19 07:20:49 -07:00
Zack Weinberg e9e6f30e69 Add option to build against system qtbase but bundled qtwebkit.
As with the system-qtwebkit option, this does not actually work at this
point, but it enables experimentation toward getting it to work.

Part of issue #12467.
2014-08-19 07:20:49 -07:00
Zack Weinberg 9254f6855e Rationalize handshake between and
* now handles building qt and qtwebkit.
 * is now only responsible for accumulating arguments
   to pass to qt's configure script.
 * doesn't have command line arguments of its own;
   anything on its command line will be passed directly to qt's
   configure script.
 * first pass of adjustments to the qt configure parameters
   to try to get a more static build - unfortunately, system
   sqlite, libz, libpng, and libexpat are still getting pulled
   in somehow (mostly via fontconfig, I think).

Part of issue #12467.
2014-08-19 07:20:49 -07:00
Zack Weinberg 615f33c9c4 Add capability to build PhantomJS against system Qt/Webkit.
Invoking with --system-qtwebkit will skip the build of Qt and
QtWebkit and use the qmake in $PATH to build PhantomJS proper.

This doesn't actually *work* at the moment because the bundled
copy of Webkit has patches not yet merged upstream, but it's still
useful to have for testing purposes.

Part of issue #12467.
2014-08-19 07:20:48 -07:00
Zack Weinberg 5b5e63af23 Better Qt version check.
* Allow any patchlevel of Qt 5.3.x.
 * Do it in the master .pro file instead of main.cpp; this makes the build
   fail immediately rather than after compiling a bunch of stuff.

Part of issue #12467.
2014-08-19 07:20:48 -07:00
Zack Weinberg b81d7aec0a Update .gitignore for Qt 5.3.
* Ignore src/phantomjs_plugin_import.cpp, which is now created during
   the build.
 * Add leading slashes to a bunch of files that should not be ignored if
   they crop up in subdirectories.

Part of issue #12467.
2014-08-19 07:20:48 -07:00
Vitaliy Slobodin 0c8eb88c15 Add build script for Windows 2014-08-18 23:35:27 +04:00
John Gozde de2a19da9c Use Array.prototype.slice in window.callPhantom.
window.callPhantom formerly used Array.prototype.splice for cloning
its arguments to the internal This relied on
non-standard behaviour of the splice method when only a single
argument was passed to it (it requires 2 arguments).

The correct method for cloning the arguments array is to use
Array.prototype.slice, which accepts a single argument (index) and
returns a new array from the specified index.
2014-08-18 00:15:08 -07:00
Petteri Räty a86ae1948c Fix rasterize example exit status on failure.
2014-08-17 23:23:05 -07:00
Ariya Hidayat fbe8eefc29 Launcher for ECMA-262 test suite (
2014-08-16 20:46:28 -07:00
Ariya Hidayat 25ddf566e7 Fix path handling when running the build process.
2014-08-16 13:22:10 -07:00
Mike McQuaid 0a8b13403f don't require ICU on OSX
This isn't needed for the full build, only QtWebKit which has it's own ways of finding the system ICU.
2014-08-16 11:18:27 -07:00
Ariya Hidayat f532b73cb2 More tests for the arguments object.
2014-08-15 22:42:23 -07:00
Ariya Hidayat 3c9cf90d12 Remove website/ directory.
The web site has been based on GitHub pages for 2.5 years already.
2014-08-15 22:42:22 -07:00
Ariya Hidayat eca1081b6e Remove patches/ since they are for 1.x only.
2014-08-15 22:42:21 -07:00
Milian Wolff aa0300607c Stop early when QtBase or QtWebKit failed to compile.
Currently, the build script will continue to try to build PhantomJS
even when either QtBase or QtWebKit failed to compile. In such a
case, the script should return early and emit an error message.
2014-08-15 21:54:56 -07:00
Milian Wolff 4bf75c50b0 Simplify Env code by reusing QProcessEnvironment.
This gets rid of the custom parse code and slims down the API.
2014-08-15 21:49:46 -07:00
Ariya Hidayat 3136898976 Some tests for JavaScript's Function.
2014-08-09 11:53:19 -07:00
Ariya Hidayat bbdaa9e884 A simple assertion for the fortcoming revamped test system.
2014-08-09 10:59:22 -07:00
Vitaly Slobodin 28045aaf6b Merge pull request #12430 from KDAB/remove_coffeescript_test
Remove CoffeeScript references from unit tests
2014-08-08 18:24:26 +04:00
Vitaly Slobodin 2ebe5fd8a8 Merge pull request #12428 from KDAB/cleanup_qt5merge
Fixup wrong merge: remove src/qt/src
2014-08-08 18:24:02 +04:00
Milian Wolff 0c55c0a9e0 Remove CoffeeScript references from unit tests
2014-08-06 15:08:24 +02:00
Milian Wolff 514972db80 Fixup wrong merge: remove src/qt/src
This reapplies the patch of issue #11590 and drops the patch
from issue #11264. The former is still valid, while the latter
is hopefully resolved properly in Qt5 (see e.g. this:
2014-08-06 15:00:34 +02:00
Ariya Hidayat 48fabe0646 Remove CoffeeScript support.
2014-07-30 01:29:21 -07:00
Ariya Hidayat 64b6fd2f4b ChangeLog for 1.9.7.
2014-07-30 01:29:20 -07:00
Ariya Hidayat 20a73a6d40 Update ChangeLog for 1.9.6.
2014-07-30 01:29:20 -07:00
Ariya Hidayat dc8d3c7052 Update ChangeLog for 1.9.3.
2014-07-30 01:29:19 -07:00
Ariya Hidayat 13e788f2c1 Travis CI: Get more dependencies for building Qt 5.
2014-07-28 06:51:35 -07:00