summaryrefslogtreecommitdiffstats
path: root/WebKitTools
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebKitTools
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebKitTools')
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json10
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg1
-rw-r--r--WebKitTools/BuildSlaveSupport/gtk/README52
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/buildbot/log/run38
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/buildbot/run77
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon73
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/log/run38
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/run74
-rw-r--r--WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf87
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/pulseaudio/run24
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/xvfb/log/run37
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/xvfb/run41
-rwxr-xr-xWebKitTools/BuildSlaveSupport/win/kill-old-processes3
-rw-r--r--WebKitTools/ChangeLog660
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp7
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp21
-rw-r--r--WebKitTools/DumpRenderTree/chromium/AccessibilityController.h11
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h1
-rw-r--r--WebKitTools/DumpRenderTree/chromium/EventSender.cpp103
-rw-r--r--WebKitTools/DumpRenderTree/chromium/EventSender.h6
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp26
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.h4
-rw-r--r--WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp53
-rw-r--r--WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h7
-rw-r--r--WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp6
-rw-r--r--WebKitTools/DumpRenderTree/chromium/WebViewHost.h1
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.cpp59
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.h4
-rw-r--r--WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp6
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm1
-rw-r--r--WebKitTools/DumpRenderTree/mac/UIDelegate.mm17
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro1
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp105
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h18
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp8
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h4
-rw-r--r--WebKitTools/DumpRenderTree/qt/main.cpp14
-rw-r--r--WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp28
-rw-r--r--WebKitTools/GNUmakefile.am4
-rw-r--r--WebKitTools/MiniBrowser/mac/BrowserWindowController.m6
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.cpp12
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.h11
-rw-r--r--WebKitTools/MiniBrowser/qt/MiniBrowser.pro2
-rw-r--r--WebKitTools/MiniBrowser/qt/main.cpp22
-rw-r--r--WebKitTools/QueueStatusServer/handlers/dashboard.py1
-rw-r--r--WebKitTools/QueueStatusServer/handlers/queuestatus.py2
-rw-r--r--WebKitTools/QueueStatusServer/model/queues.py2
-rwxr-xr-xWebKitTools/Scripts/build-webkit9
-rwxr-xr-xWebKitTools/Scripts/check-for-global-initializers5
-rwxr-xr-xWebKitTools/Scripts/create-html-entity-table183
-rwxr-xr-xWebKitTools/Scripts/enumerate-included-framework-headers61
-rwxr-xr-xWebKitTools/Scripts/prepare-ChangeLog2
-rw-r--r--WebKitTools/Scripts/webkitdirs.pm2
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/committers.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/ports.py19
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/bugzilla.py9
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py22
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py11
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py49
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py35
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py69
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/base.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/test.py16
-rwxr-xr-xWebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py363
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py151
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checker.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py10
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py3
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py6
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl5
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp25
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h5
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.cpp17
-rw-r--r--WebKitTools/iExploder/htdocs/cssproperties.in20
-rw-r--r--WebKitTools/iExploder/htdocs/htmlattrs.in12
-rw-r--r--WebKitTools/iExploder/htdocs/htmltags.in13
-rw-r--r--WebKitTools/wx/build/settings.py6
89 files changed, 2260 insertions, 699 deletions
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
index 49d770d..89a768a 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -23,6 +23,7 @@
{ "name": "apple-windows-4", "platform": "win"},
{ "name": "apple-windows-5", "platform": "win"},
{ "name": "apple-windows-6", "platform": "win"},
+ { "name": "apple-windows-7", "platform": "win"},
{ "name": "gtk-linux-slave-1", "platform": "gtk"},
{ "name": "gtk-linux-slave-2", "platform": "gtk"},
@@ -96,7 +97,7 @@
{
"name": "Windows Debug (Build)", "type": "Build", "builddir": "win-debug",
"platform": "win", "configuration": "debug", "architectures": ["i386"],
- "triggers": ["win-debug-tests"],
+ "triggers": ["win-debug-tests", "win-debug-tests-wk2"],
"slavenames": ["apple-windows-1", "test-slave"]
},
{
@@ -104,6 +105,10 @@
"platform": "win", "configuration": "debug", "architectures": ["i386"],
"slavenames": ["apple-windows-4", "apple-windows-3", "apple-windows-5", "apple-windows-6", "test-slave"]
},
+ { "name": "Windows Debug (WebKit2 Tests)", "type": "TestWebKit2", "builddir": "win-debug-tests-wk2",
+ "platform": "win", "configuration": "debug", "architectures": ["i386"],
+ "slavenames": ["apple-windows-7", "test-slave"]
+ },
{
"name": "GTK Linux 32-bit Release", "type": "BuildAndTest", "builddir": "gtk-linux-32-release",
"platform": "gtk", "configuration": "release", "architectures": ["i386"],
@@ -218,6 +223,9 @@
},
{ "type": "Triggerable", "name": "win-debug-tests",
"builderNames": ["Windows Debug (Tests)"]
+ },
+ { "type": "Triggerable", "name": "win-debug-tests-wk2",
+ "builderNames": ["Windows Debug (WebKit2 Tests)"]
}
]
}
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index a0beddb..f30ac16 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -130,6 +130,7 @@ class DownloadBuiltProduct(transfer.FileDownload):
slavedest = WithProperties("WebKitBuild/%(configuration)s.zip")
mastersrc = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")
haltOnFailure = True
+ flunkOnFailure = True
def __init__(self):
transfer.FileDownload.__init__(self, self.mastersrc, self.slavedest)
diff --git a/WebKitTools/BuildSlaveSupport/gtk/README b/WebKitTools/BuildSlaveSupport/gtk/README
new file mode 100644
index 0000000..9e58ae2
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/README
@@ -0,0 +1,52 @@
+==============================================
+ Running a GTK+ build slave under daemontools
+==============================================
+
+This directory contains several scripts which can be used to run a WebKitGTK+
+build slave under daemontools [1]. This is convenient because daemontools
+will automatically restart services when they die, and that means less human
+intervention is needed.
+
+
+Dependencies
+============
+
+In order to use the provided service control files, you will need the
+following:
+
+* The GNU Bash shell (the scripts contain some bash-isms)
+
+* The daemontools package (or one of its drop-in replacements, like runit
+ or freedt; but only daemontools has been tested so far).
+
+* The crash dump monitor also uses "inotifywait" (part of inotify-tools [2])
+
+In short, in a Debian-based system you can ensure you have the needed bits
+with the following command:
+
+ apt-get install inotify-tools daemontools-run
+
+
+Setup
+=====
+
+1. Follow the instructions at http://trac.webkit.org/wiki/BuildBot
+
+2. Install the dependencies outlined above.
+
+3. Copy "daemontools-buildbot.conf" to "/etc/daemontools-buildbot.conf"
+
+4. Edit the configuration file to suit your needs, the comments should
+ be self-explanatory.
+
+5. Drop the "buildbot", "pulseaudio" and "xvfb" directories (plus
+ "crashmon", if desired) to the service control directory of
+ daemontools; for Debian-based setups that would be "/etc/service"
+
+
+References
+==========
+
+[1] http://cr.yp.to/daemontools.html
+[2] http://wiki.github.com/rvoicilas/inotify-tools/
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run b/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run
new file mode 100755
index 0000000..cc2c87e
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run
@@ -0,0 +1,38 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${buildbot_log_path:=/var/log/buildbot}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${buildbot_log_path}"
+chown "${buildbot_user}" "${buildbot_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${buildbot_log_path}"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/buildbot/run b/WebKitTools/BuildSlaveSupport/gtk/buildbot/run
new file mode 100755
index 0000000..b26fe58
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/buildbot/run
@@ -0,0 +1,77 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+
+if ! [ "${buildbot_path}" ] ; then
+ echo "No \${buildbot_path} defined! (will sleep for 5 minutes)"
+ sleep 300
+ exit 111
+fi
+
+
+if ! [ "${WEBKIT_TESTFONTS}" ] ; then
+ echo "No \${WEBKIT_TESTFONTS} environment variable! (will sleep for 5 minutes)"
+ sleep 300
+ exit 111
+fi
+
+
+if [ "${coredump_output:=''}" ] ; then
+ # Ensure that the output directory exists.
+ if [[ ! -d ${crashmon_output} ]] ; then
+ mkdir -p "${crashmon_output}"
+ fi
+
+ ulimit -c "${crashmon_max_size:=unlimited}"
+fi
+
+
+if [ "${ccache_path}" ] ; then
+ export PATH="${ccache_path}:${PATH}"
+fi
+
+: ${buildbot_user:=${USER}}
+
+cd "${buildbot_path}"
+exec /usr/bin/env - \
+ TERM=dumb \
+ TZ=PST8PDT \
+ PATH="${PATH}" \
+ SHELL=/bin/bash \
+ LANG=en_US.UTF-8 \
+ USER="${buildbot_user}" \
+ LOGNAME="${buildbot_user}" \
+ HOME="/home/${buildbot_user}" \
+ DISPLAY="${xvfb_display:-':10'}" \
+ MAIL="/var/mail/${buildbot_user}" \
+ /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/twistd -noy buildbot.tac
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon b/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon
new file mode 100755
index 0000000..41705a2
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon
@@ -0,0 +1,73 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Carlos Lopez <clopez@igalia.com>, Igalia S.L.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+set -e
+
+[ "${coredir}" ] || {
+ echo "Env var '\${coredir}' not defined!" >&2
+ exit 111
+}
+[ "${programpath}" ] || {
+ echo "Env var '\${programpath}' not defined" >&2
+ exit 111
+}
+[ "${arch}" ] || {
+ echo "Env var '\${arch}' not defined" >&2
+ exit 111
+}
+[ "${mailto}" ] || {
+ echo "Env var '\${mailto}' not defined" >&2
+ exit 111
+}
+
+
+inotifywait -q -m --format '%f' --exclude '.trace.html$' -e close_write "${coredir}" | \
+while read -r coredump
+do
+ if grep -qE '^core-when_[[:digit:]]{10\,12}-_-who_[[:print:]]+-_-why_' <<< "${coredump}"
+ then
+ # Get revision number from Subversion sources
+ rev=$(cd "${crashmon_src_path}" && svn info | sed -e '/^Revision:/s/Revision: //p' -e d)
+
+ # Get the who from the coredump name
+ programfile=$(echo "${coredump}" \
+ | awk -F'-_-who_' '{ print $2 }'\
+ | awk -F'-_-why_' '{ print $1 }')
+
+ # Sometimes programfile gets cut when it is a long name:
+ # Search using wildcards
+ fullprogrampath=$(find "${programpath}" -executable -name "${programfile}"\* | head -n1)
+
+ ( printf "<html><head><title>StackTrace for ${programfile} from svn"
+ printf " rev ${rev}</title></head>\n<body>Core dump file: "
+ printf "<a href=\"cores/${coredump}\">${coredump}</a><br/>\n"
+ printf "<pre>Executable crashed: ${fullprogrampath}</pre>\n"
+ printf "<br/><hr><b>Stack Trace:</b><hr><br/>\n<pre>"
+
+ gdb -ex "thread apply all bt" --batch "${fullprogrampath}" "${coredump}" 2>&1 \
+ | sed -e 's/\&/\&amp/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g' -e "s/'/\&\#039;/g"
+
+ printf "</pre></body></html>\n"
+ ) > "/var/www/svn_${rev}.${coredump}.trace.html"
+
+ # Make sure the web server can read it
+ chmod 644 "${coredump}"
+ fi
+done
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run b/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run
new file mode 100755
index 0000000..4dcd71f
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run
@@ -0,0 +1,38 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${crashmon_log_path:=/var/log/crashmon}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${crashmon_log_path}"
+chown "${buildbot_user}" "${crashmon_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${crashmon_log_path}"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/run b/WebKitTools/BuildSlaveSupport/gtk/crashmon/run
new file mode 100755
index 0000000..38be3fe
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/run
@@ -0,0 +1,74 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${USER:-${LOGNAME}}}
+: ${crashmon_output:=''}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+
+if [ ! -d "${crashmon_output}" ]
+then
+ if ! [ "${crashmon_output}" ]
+ then
+ echo "Dump directory '${crashmon_output}' does not exist (sleeping)"
+ fi
+ sleep $(( 60 * 60 * 4 ))
+ exit 111
+fi
+
+
+if ! [ "${buildbot_bits}" ]
+then
+ # Guess bits (32/64) from uname -m
+ machine=$(uname -m)
+ case ${machine} in
+ x86_64 | amd64 | ia64 | ppc64)
+ buildbot_bits="64" ;;
+ *)
+ buildbot_bits="32" ;;
+ esac
+fi
+
+: ${crashmon_bin_path:="${buildbot_path}/gtk-linux-${buildbot_bits}-debug/build/WebKitBuild/Debug/Programs"}
+
+
+cd "${crashmon_output}"
+exec /usr/bin/env - \
+ PATH="${PATH}" \
+ SHELL="/bin/bash" \
+ USER="${buildbot_user}" \
+ arch="${buildbot_bits}" \
+ LOGNAME="${buildbot_user}" \
+ coredir="${crashmon_output}" \
+ HOME="/home/${buildbot_user}" \
+ mailto="${crashmon_mailto:-''}" \
+ programpath="${crashmon_bin_path}" \
+ /usr/bin/setuidgid "${buildbot_user}" "$(pwd)/crashmon"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf b/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf
new file mode 100644
index 0000000..59c1c0b
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf
@@ -0,0 +1,87 @@
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+
+# Path to the Buildbot slave directory
+#
+buildbot_path="/home/slave/webkitgtk"
+
+# User account used to run Buildbot.
+#
+buildbot_user="slave"
+
+# Path to a directory where to log Buildbot output
+#
+buildbot_log_path="/var/log/buildbot"
+
+
+# Display number under which Xvfb will run
+#
+xvfb_display=":10"
+
+# Graphical mode which Xvfb will report to applications
+#
+xvfb_mode="1024x768x24"
+
+# Path to a directory where to log Xvfb error output
+#
+xvfb_log_path="/var/log/xvfb"
+
+
+# Output directory for core dumps. Set this to an empty string to
+# disable recording them.
+#
+crashmon_output="/var/www/webkitgtk-coredumps"
+
+# Maximum size of core dumps. With the default "unlimited" setting
+# it is recommended to have ~20GB for cores in 64-bit machines.
+# For 32-bit bots, less space is needed.
+#
+crashmon_max_size="unlimited"
+
+# Path to a directory where to log crashmon output
+#
+crashmon_log_path="/var/log/crashmon"
+
+# A list of e-mail addresses where to send notifications of core dumps.
+# Leave empty to disable mail notifications.
+#
+# WARNING: E-mail addresses will be flooded with messages!
+#
+crashmon_mailto=""
+
+# Base directory where to find sources and built binaries of which
+# crash dumps are to be catched. Usually you will not need to change this.
+#
+crashmon_src_path="${buildbot_path}/gtk-linux-${buildbot_bits}-debug/build"
+crashmon_bin_path="${crashmon_src_path}/WebKitBuild/Debug/Programs"
+
+
+# If you want to use ccache, set a path to where synlinks with tool
+# names pointing to ccache are installed. In Debian systems this
+# would be /usr/lib/ccache. Set to empty to disable.
+#
+ccache_path="/usr/lib/ccache"
+
+
+# Environment variables. Prefix them with "env_".
+#
+env_CFLAGS="-pipe"
+env_CXXFLAGS="-pipe"
+env_WebKitMakeArguments="-j3"
+env_WEBKIT_TESTFONTS="/home/${buildbot_user}/testfonts"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run b/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run
new file mode 100755
index 0000000..37ba0de
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run
@@ -0,0 +1,24 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+exec 2>&1
+exec /usr/bin/pulseaudio --system \
+ --disallow-exit --disallow-module-loading \
+ --log-target=syslog
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run b/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run
new file mode 100755
index 0000000..1c83922
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run
@@ -0,0 +1,37 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${xvfb_log_path:=/var/log/xvfb}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${xvfb_log_path}"
+chown "${buildbot_user}" "${xvfb_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${xvfb_log_path}"
diff --git a/WebKitTools/BuildSlaveSupport/gtk/xvfb/run b/WebKitTools/BuildSlaveSupport/gtk/xvfb/run
new file mode 100755
index 0000000..89cd301
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/xvfb/run
@@ -0,0 +1,41 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${xvfb_display:=':10'}
+: ${xvfb_mode:='1024x768x24'}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "xvfb${xvfb_display}"
+exec /usr/bin/Xvfb "${xvfb_display}" \
+ -fbdir "xvfb${xvfb_display}" \
+ -screen 0 "${xvfb_mode}" \
+ -nolisten inet6 \
+ -nolisten inet
+
diff --git a/WebKitTools/BuildSlaveSupport/win/kill-old-processes b/WebKitTools/BuildSlaveSupport/win/kill-old-processes
index 50fb8a5..6760e08 100755
--- a/WebKitTools/BuildSlaveSupport/win/kill-old-processes
+++ b/WebKitTools/BuildSlaveSupport/win/kill-old-processes
@@ -28,7 +28,8 @@ import os, sys
def main():
tasksToKill = ["DumpRenderTree.exe", "DumpRenderTree_debug.exe", "testapi.exe", "testapi_debug.exe",
"svn.exe", "httpd.exe", "cl.exe", "link.exe", "midl.exe", "devenv.exe", "perl.exe",
- "imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe"]
+ "imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe", "WebKit2WebProcess.exe",
+ "WebKit2WebProcess_debug.exe", "WebKitTestRunner.exe", "WebKitTestRunner_debug.exe"]
for task in tasksToKill:
os.system("taskkill /f /im " + task)
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 179fdc1..905a8e2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,663 @@
+2010-09-02 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
+ https://bugs.webkit.org/show_bug.cgi?id=45073
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ (EventSender::EventSender):
+ (EventSender::mouseScrollBy):
+ (EventSender::continuousMouseScrollBy):
+ (EventSender::sendCurrentTouchEvent):
+ (EventSender::handleMouseWheel):
+ * DumpRenderTree/chromium/EventSender.h:
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (mouseScrollByCallback):
+ (continuousMouseScrollByCallback):
+
+2010-09-01 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Land a patched version of r66542 - change TestRunner to have an
+ separate cleanup method and fix the ordering of cleanup between
+ TestRunner and the printing module, and then wrap everything in a
+ try/finally block to ensure reliable cleanup without needing to
+ rely on stuff happening in the destructor of the TestRunner.
+
+ Also refactor run_webkit_tests.run() to be much smaller and cleaner
+ by creating a bunch of helper methods and moving more stuff into
+ the TestRunner class.
+
+ This fixes the crash at the end of the linux test run of
+ new-run-webkit-tests (and undoes the rollout in 66547).
+
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Added.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Added.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-09-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix TestNetscapePlugIn to compile without access to QuickDraw private headers.
+
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+
+2010-09-01 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Have kill-old-processes kill debug and release variants of WebKit2WebWebProcess
+ and WebKitTestRunner.
+
+ * BuildSlaveSupport/win/kill-old-processes:
+
+2010-09-01 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Remove obsolete include path from DumpRenderTree.pro
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2010-09-01 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] QWebPage::allowGeolocationRequest should be async API
+ https://bugs.webkit.org/show_bug.cgi?id=41364
+
+ Implements new async API for geolocation permission similar to
+ Notification. WebPage maintains list of geolocation permission request
+ QtWebkit and set's when LayoutTestController gets the access from test JS
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ (WebCore::WebPage::requestPermission):
+ (WebCore::WebPage::cancelPermission):
+ (WebCore::WebPage::permissionSet):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::processLine):
+ (WebCore::DumpRenderTree::geolocationPermissionSet):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::setGeolocationPermission):
+ (LayoutTestController::setGeolocationPermissionCommon):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-09-01 Andras Becsi <abecsi@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Auto-generate WebKit2 forwarding headers
+ https://bugs.webkit.org/show_bug.cgi?id=44692
+
+ * MiniBrowser/qt/BrowserWindow.h: use source style includes
+ * MiniBrowser/qt/MiniBrowser.pro: add missing include paths
+ * Scripts/enumerate-included-framework-headers: Removed.
+
+2010-08-31 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
+
+ Reviewed by Adam Barth.
+
+ Allow Ctrl+C inside Bugzilla::fetch_bug_dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=44789
+
+ * Scripts/webkitpy/common/net/bugzilla.py:
+
+2010-08-31 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Adam Barth.
+
+ ews: Add support for EFL-EWS
+ https://bugs.webkit.org/show_bug.cgi?id=44982
+
+ * QueueStatusServer/model/queues.py: Add "efl-ews" to queues list.
+ * Scripts/webkitpy/common/config/ports.py: Define a EflPort class
+ and add it to the ports dict.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py: Define a
+ EflEWS class.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Add
+ a test case for the EFL EWS.
+
+2010-08-31 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42195
+ <rdar://problem/8186761> WebKitTestRunner needs to support layoutTestController.setXSSAuditorEnabled
+
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setXSSAuditorEnabled):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ Added setXSSAuditorEnabled, calling through to an WKBundle private method. Calling this method
+ makes WebProcess use a different value for this preference than UIProcess thinks it uses.
+
+ * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues):
+ Reset xssAuditorEnabled. Even though the value doesn't change, this calls through to WebProcess,
+ which forgets its override.
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ WebKitTestRunner needs layoutTestController.addUserStyleSheet
+ https://bugs.webkit.org/show_bug.cgi?id=42680
+
+ WebKitTestRunner needs layoutTestController.addUserScript
+ https://bugs.webkit.org/show_bug.cgi?id=42681
+
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::addUserScript):
+ (WTR::LayoutTestController::addUserStyleSheet):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
+2010-08-31 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r66542.
+ http://trac.webkit.org/changeset/66542
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ r66542 - the weird logging dependencies in Python stuck again ...
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Removed.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-08-31 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Implementing LayoutTestController::markerTextForListItem() in Chromium's DRT.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::markerTextForListItem):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
+2010-08-31 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ new-run-webkit-tests: add more unit tests
+
+ Add more unit tests for new-run-webkit-tests; we now cover all but
+ the most obscure code paths in the generic code. We still need to
+ add coverage for the http server and web socket paths, and add better
+ coverage of the platform-specific logic. Note that the rebaselining
+ tool is still not well tested.
+
+ Also clean up some of the configuration logic for the printing
+ module and the way it interacts with the Python logging module; that
+ is a crufty interface, to be certain.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Added.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Added.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/check-for-global-initializers: Add a file that ends up having global initializers
+ in a debug build when built with certain compilers.
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * DumpRenderTree/gtk/EventSender.h: Remove GTK+ typedefs.
+
+2010-08-31 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Show more status on queue status pages
+ https://bugs.webkit.org/show_bug.cgi?id=44938
+
+ I upped the number of status lines from 6 to 15 --
+ this has been bugging me for a while...
+
+ I also disabled showing the chromium-win EWS queue
+ since it's been down for almost 5 months now.
+
+ * QueueStatusServer/handlers/dashboard.py:
+ * QueueStatusServer/handlers/queuestatus.py:
+ * QueueStatusServer/model/queues.py:
+
+2010-08-31 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Read command line arguments and open them as URLs in new windows
+ https://bugs.webkit.org/show_bug.cgi?id=44944
+
+ Extend MiniBrowser to accept command line arguments and open them as URLs in new browser windows.
+
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2010-08-31 Adrian Perez <aperez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ Support scripts to run Buildbot slaves under daemontools (gtk related)
+ https://bugs.webkit.org/show_bug.cgi?id=40053
+
+ * BuildSlaveSupport/gtk: Added.
+ * BuildSlaveSupport/gtk/README: Added.
+ * BuildSlaveSupport/gtk/buildbot: Added.
+ * BuildSlaveSupport/gtk/buildbot/log: Added.
+ * BuildSlaveSupport/gtk/buildbot/log/run: Added.
+ * BuildSlaveSupport/gtk/buildbot/run: Added.
+ * BuildSlaveSupport/gtk/crashmon: Added.
+ * BuildSlaveSupport/gtk/crashmon/crashmon: Added.
+ * BuildSlaveSupport/gtk/crashmon/log: Added.
+ * BuildSlaveSupport/gtk/crashmon/log/run: Added.
+ * BuildSlaveSupport/gtk/crashmon/run: Added.
+ * BuildSlaveSupport/gtk/daemontools-buildbot.conf: Added.
+ * BuildSlaveSupport/gtk/pulseaudio: Added.
+ * BuildSlaveSupport/gtk/pulseaudio/run: Added.
+ * BuildSlaveSupport/gtk/xvfb: Added.
+ * BuildSlaveSupport/gtk/xvfb/log: Added.
+ * BuildSlaveSupport/gtk/xvfb/log/run: Added.
+ * BuildSlaveSupport/gtk/xvfb/run: Added.
+
+2010-08-27 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Notifications should support a click event.
+ Adds necessary hooks to chromium's DRT so that clicks on desktop notifications
+ can be simulated during a layout test. Requires storing a list of active
+ notifications so that they can be referred to later for clicking.
+ https://bugs.webkit.org/show_bug.cgi?id=44800
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::simulateDesktopNotificationClick):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (NotificationPresenter::simulateClick):
+ (NotificationPresenter::show):
+ (NotificationPresenter::cancel):
+ (NotificationPresenter::objectDestroyed):
+ * DumpRenderTree/chromium/NotificationPresenter.h:
+
+2010-08-30 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add missing parts of didFinishDocumentLoadForFrame
+ https://bugs.webkit.org/show_bug.cgi?id=44913
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (didFinishDocumentLoadForFrame): Added
+ (-[BrowserWindowController awakeFromNib]): Updated struct
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage): Rearranged function ptr
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize): Updated struct
+
+2010-08-30 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Unreviewed: Add myself to the list of Committers.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-08-30 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix fast/notifications/notifications-display-close-events.html failure
+ https://bugs.webkit.org/show_bug.cgi?id=44585
+
+ Apply http://crrev.com/48893. We should dispatch display events
+ asynchronously.
+
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (deferredDisplayDispatch):
+ (NotificationPresenter::show):
+
+2010-08-30 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ allow ports with windowed plugins to support windowless plugin tests
+
+ https://bugs.webkit.org/show_bug.cgi?id=40730
+
+ Ports that implement plugins windowed by default need to have a way of
+ supporting plugin tests that assume the plugin is windowless. Add this
+ feature to the tests and support it in the webkit test plugin. Also
+ add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+ Unskip the following tests on Qt:
+
+ plugins/mouse-events.html
+ plugins/keyboard-events.html
+ plugins/mouse-events-fixedpos.html
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginSetProperty):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
+ (webkit_test_plugin_handle_event):
+
+2010-08-30 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after addition of fileapi directory in WebCore.
+
+ * wx/build/settings.py:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Fixed compilation error, now that we have included the
+ GtkVersioning.h we have to remove some version dependent code from
+ EventSender.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] gdk_display_get_core_pointer and gdk_device_get_core_pointer
+ are deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=44787
+
+ We have replaced GtkVersioning.cpp with GtkVersioning.c and
+ created a function (getDefaultGDKPointerDevice) to get the pointer
+ of the window with the new APIs. We added that function to DRT and
+ copyandpaste unit test.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (prepareMouseButtonEvent):
+ (mouseMoveToCallback):
+ (keyDownCallback):
+ * GNUmakefile.am:
+
+2010-08-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add new window menu to MiniBrowser
+
+ Implement newWindow function and add a menu item for opening new window in MiniBrowser.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::newWindow):
+ * MiniBrowser/qt/BrowserWindow.h:
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2010-08-29 James Robinson <jamesr@chromium.org>
+
+ Reviewed by David Levin.
+
+ Make failing the download step fail the build
+ https://bugs.webkit.org/show_bug.cgi?id=44298
+
+ If the download step fails on a test bot, this ensures that
+ the build goes red instead of only the download step going red
+ and the overall build staying green.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Remove dependency to base/keyboard_codes.h
+ https://bugs.webkit.org/show_bug.cgi?id=44847
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ Use webkit_support::VKEY_* instead of base::VKEY_*.
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=40589
+
+ * Scripts/prepare-ChangeLog: Only prepend namespaces to non-empty
+ function names.
+
+2010-08-26 Holger Hans Peter Freyther <holger@moiji-mobile.com>
+
+ Reviewed by Darin Adler.
+
+ [iExploder] Add new CSS Properties and HTML Attributes
+ https://bugs.webkit.org/show_bug.cgi?id=44746
+
+ Updated the files with the update-iexploder-cssproperties script
+ and manually readded the -webkit-binding CSS Property to the list.
+
+ * iExploder/htdocs/cssproperties.in:
+ * iExploder/htdocs/htmlattrs.in:
+ * iExploder/htdocs/htmltags.in:
+
+2010-08-26 Holger Hans Peter Freyther <holger@moiji-mobile.com>
+
+ Reviewed by Darin Adler.
+
+ Fix Coverage build after the addition of ANGLE
+ https://bugs.webkit.org/show_bug.cgi?id=44744
+
+ ANGLE is using libtool to build a static library and the version of
+ libtool on Leopard refuses to handle the -fprofile-arcs and -ftest-coverage
+ parameters. The easiest way to handle this is to not build ANGLE with
+ coverage information.
+
+ This is achieved by applying the XCode options for each project
+ separately and exclude ANGLE.
+
+ * Scripts/build-webkit: Remove -framework AppKit due link errors.
+ * Scripts/webkitdirs.pm: Do not apply the XCode options for ANGLE.
+
+2010-08-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after directory addition.
+
+ * wx/build/settings.py:
+
+2010-08-28 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Add AX notification for childrenChanged
+ https://bugs.webkit.org/show_bug.cgi?id=44472
+
+ * DumpRenderTree/chromium/AccessibilityController.cpp:
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::reset):
+ (AccessibilityController::getRootElement):
+ (AccessibilityController::dumpAccessibilityNotifications):
+ * DumpRenderTree/chromium/AccessibilityController.h:
+ (AccessibilityController::shouldDumpAccessibilityNotifications):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didChangeAccessibilityObjectChildren):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2010-08-28 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Update commit-queue failure message
+ https://bugs.webkit.org/show_bug.cgi?id=44798
+
+ The commit-queue auto-restarts itself and has for a very long time.
+ No need for people to email me to request a restart anymore.
+
+ * Scripts/webkitpy/common/net/bugzilla.py:
+ * Scripts/webkitpy/common/net/bugzilla_unittest.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2010-07-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+
+ Added basic full screen support to DumpRenderTree: when a webView requests
+ that DumpRenderTree go "full screen", just call the provided callback listener object's
+ will/did Enter/Exit full screen methods. Also, register a new user default which
+ enables full screen support.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:supportsFullscreenForElement:]):
+ (-[UIDelegate webView:enterFullscreenForElement:listener:]):
+ (-[UIDelegate webView:exitFullscreenForElement:listener:]):
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Unreviewed. Add myself to the committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-08-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [DRT/Chromium] Fix inspector test failures
+ https://bugs.webkit.org/show_bug.cgi?id=44748
+
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
+ (DRTDevToolsAgent::createClientMessageLoop):
+ Returns a valid WebKitClientMessageLoop instance
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+
+2010-08-26 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add Windows WebKit2 Tester to buildbot
+ <rdar://problem/7887703>
+
+ Reviewed by Dan Bernstein.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2010-08-26 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
+ https://bugs.webkit.org/show_bug.cgi?id=42152
+
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (LoadHTMLStringItem::invoke): Implementation using
+ webkit_web_frame_load_string().
+
+2010-08-25 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/8334338> run-webkit-tests sometimes hangs when using
+ WebKitTestRunner (44331)
+
+ Reviewed by Darin Adler.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ The hang occurs when WebKitTestRunner begins launching the WebKit2
+ web process then exits before it finishes launching. Work around this by
+ looking for the --print-supported-features argument and exiting without
+ creating the web process.
+
+2010-08-26 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ new-run-webkit-tests: add rebaselining tests for test_expectations
+
+ This patch adds more unit tests for the rebaselining code in the
+ test_expectations module. It doesn't add any tests for
+ rebaseline_chromium_webkit_tests itself; that will come some other
+ time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44648
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py:
+
+2010-08-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add HTTP caching support
+ https://bugs.webkit.org/show_bug.cgi?id=44261
+
+ Ignore new soup API that we decided to merge into the soup backend
+ while it is being cooked. It follows the libsoup style, and will
+ be removed from WebKit as soon as it is merged into libsoup.
+
+ * Scripts/webkitpy/style/checker.py:
+
+2010-08-26 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DumpRenderTree runs only one test from command mode
+ https://bugs.webkit.org/show_bug.cgi?id=44012
+
+ Enables support to run multiple test files and single
+ folder containing html files in stand alone mode
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::processArgsLine):
+ (WebCore::DumpRenderTree::loadNextTestInStandAloneMode):
+ (WebCore::DumpRenderTree::processLine):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::DumpRenderTree::setStandAloneMode):
+ (WebCore::DumpRenderTree::isStandAloneMode):
+ * DumpRenderTree/qt/main.cpp:
+ (main):
+
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Updating webkitpy test expectations.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
index 0d556b1..44fafa1 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
@@ -139,6 +139,7 @@ enum {
ID_PROPERTY_CACHED_PRIVATE_BROWSING_ENABLED,
ID_PROPERTY_THROW_EXCEPTION_PROPERTY,
ID_LAST_SET_WINDOW_ARGUMENTS,
+ ID_PROPERTY_WINDOWED_PLUGIN,
NUM_PROPERTY_IDENTIFIERS
};
@@ -154,7 +155,8 @@ static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = {
"privateBrowsingEnabled",
"cachedPrivateBrowsingEnabled",
"testThrowExceptionProperty",
- "lastSetWindowArguments"
+ "lastSetWindowArguments",
+ "windowedPlugin"
};
enum {
@@ -328,6 +330,9 @@ static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant*
} else if (name == pluginPropertyIdentifiers[ID_PROPERTY_THROW_EXCEPTION_PROPERTY]) {
browser->setexception(obj, "plugin object testThrowExceptionProperty SUCCESS");
return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_WINDOWED_PLUGIN]) {
+ browser->setvalue(plugin->npp, NPPVpluginWindowBool, (void *)NPVARIANT_TO_BOOLEAN(*variant));
+ return true;
}
return false;
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index ab22b4e..c02e918 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -26,9 +26,12 @@
#include "PluginObject.h"
#include "PluginTest.h"
-
#include <string>
+#if !defined(NP_NO_CARBON) && defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+extern "C" void GlobalToLocal(Point*);
+#endif
+
using namespace std;
#define CRASH() do { \
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
index afe850c..2487e1a 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
@@ -44,15 +44,12 @@ AccessibilityController::AccessibilityController(TestShell* shell)
: m_shell(shell)
{
- bindMethod("logFocusEvents",
- &AccessibilityController::logFocusEventsCallback);
- bindMethod("logScrollingStartEvents",
- &AccessibilityController::logScrollingStartEventsCallback);
+ bindMethod("dumpAccessibilityNotifications", &AccessibilityController::dumpAccessibilityNotifications);
+ bindMethod("logFocusEvents", &AccessibilityController::logFocusEventsCallback);
+ bindMethod("logScrollingStartEvents", &AccessibilityController::logScrollingStartEventsCallback);
- bindProperty("focusedElement",
- &AccessibilityController::focusedElementGetterCallback);
- bindProperty("rootElement",
- &AccessibilityController::rootElementGetterCallback);
+ bindProperty("focusedElement", &AccessibilityController::focusedElementGetterCallback);
+ bindProperty("rootElement", &AccessibilityController::rootElementGetterCallback);
bindFallbackMethod(&AccessibilityController::fallbackCallback);
}
@@ -68,6 +65,8 @@ void AccessibilityController::reset()
m_rootElement = WebAccessibilityObject();
m_focusedElement = WebAccessibilityObject();
m_elements.clear();
+
+ m_dumpAccessibilityNotifications = false;
}
void AccessibilityController::setFocusedElement(const WebAccessibilityObject& focusedElement)
@@ -89,6 +88,12 @@ AccessibilityUIElement* AccessibilityController::getRootElement()
return m_elements.createRoot(m_rootElement);
}
+void AccessibilityController::dumpAccessibilityNotifications(const CppArgumentList&, CppVariant* result)
+{
+ m_dumpAccessibilityNotifications = true;
+ result->setNull();
+}
+
void AccessibilityController::logFocusEventsCallback(const CppArgumentList&, CppVariant* result)
{
// As of r49031, this is not being used upstream.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
index 3cde7cc..0817ec3 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
@@ -52,8 +52,19 @@ public:
void setFocusedElement(const WebKit::WebAccessibilityObject&);
AccessibilityUIElement* getFocusedElement();
AccessibilityUIElement* getRootElement();
+
+ // This function sets a flag that tells the test_shell to dump all
+ // accessibility notifications.
+ void dumpAccessibilityNotifications(const CppArgumentList&, CppVariant*);
+
+public:
+ // The following methods are not exposed to JavaScript.
+ bool shouldDumpAccessibilityNotifications() { return m_dumpAccessibilityNotifications; }
private:
+ // If true, the test_shell will dump all accessibility notifications.
+ bool m_dumpAccessibilityNotifications;
+
// Bound methods and properties
void logFocusEventsCallback(const CppArgumentList&, CppVariant*);
void logScrollingStartEventsCallback(const CppArgumentList&, CppVariant*);
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
index 639ee52..ba1edd7 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
@@ -84,6 +84,11 @@ WebCString DRTDevToolsAgent::debuggerScriptSource()
return webkit_support::GetDevToolsDebuggerScriptSource();
}
+WebDevToolsAgentClient::WebKitClientMessageLoop* DRTDevToolsAgent::createClientMessageLoop()
+{
+ return webkit_support::CreateDevToolsMessageLoop();
+}
+
void DRTDevToolsAgent::asyncCall(const DRTDevToolsCallArgs &args)
{
webkit_support::PostTaskFromHere(
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
index 3613349..8747cea 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
@@ -64,6 +64,7 @@ public:
virtual void forceRepaint();
virtual void runtimePropertyChanged(const WebKit::WebString& name, const WebKit::WebString& value);
virtual WebKit::WebCString debuggerScriptSource();
+ virtual WebKitClientMessageLoop* createClientMessageLoop();
void asyncCall(const DRTDevToolsCallArgs&);
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
index bb3c07f..49421f6 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
@@ -44,7 +44,6 @@
#include "EventSender.h"
#include "TestShell.h"
-#include "base/keyboard_codes.h"
#include "public/WebDragData.h"
#include "public/WebDragOperation.h"
#include "public/WebPoint.h"
@@ -61,7 +60,6 @@
// FIXME: layout before each event?
-using namespace base;
using namespace std;
using namespace WebKit;
@@ -211,16 +209,16 @@ bool getEditCommand(const WebKeyboardEvent& event, string* name)
return false;
switch (event.windowsKeyCode) {
- case base::VKEY_LEFT:
+ case webkit_support::VKEY_LEFT:
*name = "MoveToBeginningOfLine";
break;
- case base::VKEY_RIGHT:
+ case webkit_support::VKEY_RIGHT:
*name = "MoveToEndOfLine";
break;
- case base::VKEY_UP:
+ case webkit_support::VKEY_UP:
*name = "MoveToBeginningOfDocument";
break;
- case base::VKEY_DOWN:
+ case webkit_support::VKEY_DOWN:
*name = "MoveToEndOfDocument";
break;
default:
@@ -257,7 +255,6 @@ EventSender::EventSender(TestShell* shell)
bindMethod("mouseUp", &EventSender::mouseUp);
bindMethod("contextClick", &EventSender::contextClick);
bindMethod("mouseMoveTo", &EventSender::mouseMoveTo);
- bindMethod("mouseWheelTo", &EventSender::mouseWheelTo);
bindMethod("leapForward", &EventSender::leapForward);
bindMethod("keyDown", &EventSender::keyDown);
bindMethod("dispatchMessage", &EventSender::dispatchMessage);
@@ -268,6 +265,8 @@ EventSender::EventSender(TestShell* shell)
bindMethod("textZoomOut", &EventSender::textZoomOut);
bindMethod("zoomPageIn", &EventSender::zoomPageIn);
bindMethod("zoomPageOut", &EventSender::zoomPageOut);
+ bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
+ bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy);
bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousClick);
bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles);
bindMethod("addTouchPoint", &EventSender::addTouchPoint);
@@ -474,32 +473,6 @@ void EventSender::mouseMoveTo(const CppArgumentList& arguments, CppVariant* resu
}
}
-void EventSender::mouseWheelTo(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- // Force a layout here just to make sure every position has been
- // determined before we send events (as well as all the other methods
- // that send an event do). The layout test calling this
- // (scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html, only one
- // for now) does not rely on this though.
- webview()->layout();
-
- int horizontal = arguments[0].toInt32();
- int vertical = arguments[1].toInt32();
-
- WebMouseWheelEvent event;
- initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
- event.wheelTicksX = static_cast<float>(horizontal);
- event.wheelTicksY = static_cast<float>(vertical);
- event.deltaX = -horizontal * scrollbarPixelsPerTick;
- event.deltaY = -vertical * scrollbarPixelsPerTick;
- webview()->handleInputEvent(event);
-}
-
void EventSender::doMouseMove(const WebMouseEvent& e)
{
lastMousePos = WebPoint(e.x, e.y);
@@ -532,29 +505,29 @@ void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
bool needsShiftKeyModifier = false;
if ("\n" == codeStr) {
generateChar = true;
- text = code = base::VKEY_RETURN;
+ text = code = webkit_support::VKEY_RETURN;
} else if ("rightArrow" == codeStr)
- code = base::VKEY_RIGHT;
+ code = webkit_support::VKEY_RIGHT;
else if ("downArrow" == codeStr)
- code = base::VKEY_DOWN;
+ code = webkit_support::VKEY_DOWN;
else if ("leftArrow" == codeStr)
- code = base::VKEY_LEFT;
+ code = webkit_support::VKEY_LEFT;
else if ("upArrow" == codeStr)
- code = base::VKEY_UP;
+ code = webkit_support::VKEY_UP;
else if ("insert" == codeStr)
- code = base::VKEY_INSERT;
+ code = webkit_support::VKEY_INSERT;
else if ("delete" == codeStr)
- code = base::VKEY_DELETE;
+ code = webkit_support::VKEY_DELETE;
else if ("pageUp" == codeStr)
- code = base::VKEY_PRIOR;
+ code = webkit_support::VKEY_PRIOR;
else if ("pageDown" == codeStr)
- code = base::VKEY_NEXT;
+ code = webkit_support::VKEY_NEXT;
else if ("home" == codeStr)
- code = base::VKEY_HOME;
+ code = webkit_support::VKEY_HOME;
else if ("end" == codeStr)
- code = base::VKEY_END;
+ code = webkit_support::VKEY_END;
else if ("printScreen" == codeStr)
- code = base::VKEY_SNAPSHOT;
+ code = webkit_support::VKEY_SNAPSHOT;
else {
// Compare the input string with the function-key names defined by the
// DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key
@@ -564,7 +537,7 @@ void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
snprintf(functionChars, 10, "F%d", i);
string functionKeyName(functionChars);
if (functionKeyName == codeStr) {
- code = base::VKEY_F1 + (i - 1);
+ code = webkit_support::VKEY_F1 + (i - 1);
break;
}
}
@@ -716,6 +689,16 @@ void EventSender::zoomPageOut(const CppArgumentList&, CppVariant* result)
result->setNull();
}
+void EventSender::mouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+ handleMouseWheel(arguments, result, false);
+}
+
+void EventSender::continuousMouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+ handleMouseWheel(arguments, result, true);
+}
+
void EventSender::replaySavedEvents()
{
replayingSavedEvents = true;
@@ -891,6 +874,34 @@ void EventSender::sendCurrentTouchEvent(const WebInputEvent::Type type)
}
}
+void EventSender::handleMouseWheel(const CppArgumentList& arguments, CppVariant* result, bool continuous)
+{
+ result->setNull();
+
+ if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
+ return;
+
+ // Force a layout here just to make sure every position has been
+ // determined before we send events (as well as all the other methods
+ // that send an event do).
+ webview()->layout();
+
+ int horizontal = arguments[0].toInt32();
+ int vertical = arguments[1].toInt32();
+
+ WebMouseWheelEvent event;
+ initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
+ event.wheelTicksX = static_cast<float>(horizontal);
+ event.wheelTicksY = static_cast<float>(vertical);
+ event.deltaX = event.wheelTicksX;
+ event.deltaY = event.wheelTicksY;
+ if (!continuous) {
+ event.deltaX *= scrollbarPixelsPerTick;
+ event.deltaY *= scrollbarPixelsPerTick;
+ }
+ webview()->handleInputEvent(event);
+}
+
void EventSender::touchEnd(const CppArgumentList&, CppVariant* result)
{
result->setNull();
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.h b/WebKitTools/DumpRenderTree/chromium/EventSender.h
index ac475a3..0d8fe5d 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.h
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.h
@@ -66,7 +66,6 @@ public:
void mouseDown(const CppArgumentList&, CppVariant*);
void mouseUp(const CppArgumentList&, CppVariant*);
void mouseMoveTo(const CppArgumentList&, CppVariant*);
- void mouseWheelTo(const CppArgumentList&, CppVariant*);
void leapForward(const CppArgumentList&, CppVariant*);
void keyDown(const CppArgumentList&, CppVariant*);
void dispatchMessage(const CppArgumentList&, CppVariant*);
@@ -74,6 +73,8 @@ public:
void textZoomOut(const CppArgumentList&, CppVariant*);
void zoomPageIn(const CppArgumentList&, CppVariant*);
void zoomPageOut(const CppArgumentList&, CppVariant*);
+ void mouseScrollBy(const CppArgumentList&, CppVariant*);
+ void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
void scheduleAsynchronousClick(const CppArgumentList&, CppVariant*);
void beginDragWithFiles(const CppArgumentList&, CppVariant*);
CppVariant dragMode;
@@ -137,6 +138,9 @@ private:
// Compose a touch event from the current touch points and send it.
void sendCurrentTouchEvent(const WebKit::WebInputEvent::Type);
+ // Handle a request to send a wheel event.
+ void handleMouseWheel(const CppArgumentList&, CppVariant*, bool continuous);
+
ScopedRunnableMethodFactory<EventSender> m_methodFactory;
// Non-owning pointer. The EventSender is owned by the TestShell.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index beae21e..2999d3a 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -36,8 +36,10 @@
#include "TestShell.h"
#include "WebViewHost.h"
#include "public/WebAnimationController.h"
+#include "public/WebBindings.h"
#include "public/WebConsoleMessage.h"
#include "public/WebDocument.h"
+#include "public/WebElement.h"
#include "public/WebFrame.h"
#include "public/WebGeolocationServiceMock.h"
#include "public/WebInputElement.h"
@@ -139,6 +141,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("numberOfPages", &LayoutTestController::numberOfPages);
bindMethod("dumpSelectionRect", &LayoutTestController::dumpSelectionRect);
bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
+ bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
// The following are stubs.
bindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
@@ -179,6 +182,8 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("abortModal", &LayoutTestController::abortModal);
bindMethod("setMockSpeechInputResult", &LayoutTestController::setMockSpeechInputResult);
+ bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
+
// The fallback method is called when an unknown method is invoked.
bindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -942,6 +947,18 @@ void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentL
result->set(true);
}
+void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentList& arguments, CppVariant* result)
+{
+ if (arguments.size() != 1 || !arguments[0].isString()) {
+ result->set(false);
+ return;
+ }
+ if (m_shell->notificationPresenter()->simulateClick(cppVariantToWebString(arguments[0])))
+ result->set(true);
+ else
+ result->set(false);
+}
+
//
// Unimplemented stubs
//
@@ -1428,3 +1445,12 @@ WebKit::WebSpeechInputController* LayoutTestController::speechInputController(We
m_speechInputControllerMock.set(WebSpeechInputControllerMock::create(listener));
return m_speechInputControllerMock.get();
}
+
+void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
+{
+ WebElement element;
+ if (!WebBindings::getElement(args[0].value.objectValue, &element))
+ result->setNull();
+ else
+ result->set(element.document().frame()->markerTextForListItem(element).utf8());
+}
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 352e89f..6706157 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -218,6 +218,8 @@ public:
// Grants permission for desktop notifications to an origin
void grantDesktopNotificationPermission(const CppArgumentList&, CppVariant*);
+ // Simulates a click on a desktop notification.
+ void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*);
void setEditingBehavior(const CppArgumentList&, CppVariant*);
@@ -310,6 +312,8 @@ public:
// Speech input related functions.
void setMockSpeechInputResult(const CppArgumentList&, CppVariant*);
+ void markerTextForListItem(const CppArgumentList&, CppVariant*);
+
public:
// The following methods are not exposed to JavaScript.
void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
index 95353a7..1098e38 100644
--- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
@@ -31,18 +31,31 @@
#include "config.h"
#include "NotificationPresenter.h"
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
+#include "base/task.h" // FIXME: Remove this
#include "googleurl/src/gurl.h"
#include "public/WebNotification.h"
#include "public/WebNotificationPermissionCallback.h"
#include "public/WebSecurityOrigin.h"
#include "public/WebString.h"
#include "public/WebURL.h"
+#include "webkit/support/webkit_support.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
using namespace WebKit;
+static WebString identifierForNotification(const WebNotification& notification)
+{
+ if (notification.isHTML())
+ return notification.url().spec().utf16();
+ return notification.title();
+}
+
+static void deferredDisplayDispatch(WebNotification notification)
+{
+ notification.dispatchDisplayEvent();
+}
+
void NotificationPresenter::grantPermission(const WebString& origin)
{
// Make sure it's in the form of an origin.
@@ -50,17 +63,28 @@ void NotificationPresenter::grantPermission(const WebString& origin)
m_allowedOrigins.add(WTF::String(url.GetOrigin().spec().c_str()));
}
+bool NotificationPresenter::simulateClick(const WebString& title)
+{
+ WTF::String id(title.data(), title.length());
+ if (m_activeNotifications.find(id) == m_activeNotifications.end())
+ return false;
+
+ const WebNotification& notification = m_activeNotifications.find(id)->second;
+ WebNotification eventTarget(notification);
+ eventTarget.dispatchClickEvent();
+ return true;
+}
+
// The output from all these methods matches what DumpRenderTree produces.
bool NotificationPresenter::show(const WebNotification& notification)
{
+ WebString identifier = identifierForNotification(notification);
if (!notification.replaceId().isEmpty()) {
WTF::String replaceId(notification.replaceId().data(), notification.replaceId().length());
if (m_replacements.find(replaceId) != m_replacements.end())
printf("REPLACING NOTIFICATION %s\n",
m_replacements.find(replaceId)->second.utf8().data());
- WebString identifier = notification.isHTML() ?
- notification.url().spec().utf16() : notification.title();
m_replacements.set(replaceId, WTF::String(identifier.data(), identifier.length()));
}
@@ -78,27 +102,30 @@ bool NotificationPresenter::show(const WebNotification& notification)
notification.body().utf8().data());
}
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.set(id, notification);
+
WebNotification eventTarget(notification);
- eventTarget.dispatchDisplayEvent();
+ webkit_support::PostTaskFromHere(NewRunnableFunction(&deferredDisplayDispatch, eventTarget));
return true;
}
void NotificationPresenter::cancel(const WebNotification& notification)
{
- WebString identifier;
- if (notification.isHTML())
- identifier = notification.url().spec().utf16();
- else
- identifier = notification.title();
-
+ WebString identifier = identifierForNotification(notification);
printf("DESKTOP NOTIFICATION CLOSED: %s\n", identifier.utf8().data());
WebNotification eventTarget(notification);
eventTarget.dispatchCloseEvent(false);
+
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.remove(id);
}
void NotificationPresenter::objectDestroyed(const WebKit::WebNotification& notification)
{
- // Nothing to do. Not storing the objects.
+ WebString identifier = identifierForNotification(notification);
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.remove(id);
}
WebNotificationPresenter::Permission NotificationPresenter::checkPermission(const WebURL& url)
diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
index 5c7a400..896f345 100644
--- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
+++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
@@ -31,6 +31,7 @@
#ifndef NotificationPresenter_h
#define NotificationPresenter_h
+#include "public/WebNotification.h"
#include "public/WebNotificationPresenter.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -47,6 +48,9 @@ public:
// Called by the LayoutTestController to simulate a user granting permission.
void grantPermission(const WebKit::WebString& origin);
+ // Called by the LayoutTestController to simulate a user clicking on a notification.
+ bool simulateClick(const WebKit::WebString& notificationIdentifier);
+
// WebKit::WebNotificationPresenter interface
virtual bool show(const WebKit::WebNotification&);
virtual void cancel(const WebKit::WebNotification&);
@@ -63,6 +67,9 @@ private:
// Set of allowed origins.
HashSet<WTF::String> m_allowedOrigins;
+ // Map of active notifications.
+ HashMap<WTF::String, WebKit::WebNotification> m_activeNotifications;
+
// Map of active replacement IDs to the titles of those notifications
HashMap<WTF::String, WTF::String> m_replacements;
};
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index a145bf9..fae3f56 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -489,6 +489,12 @@ void WebViewHost::focusAccessibilityObject(const WebAccessibilityObject& object)
m_shell->accessibilityController()->setFocusedElement(object);
}
+void WebViewHost::didChangeAccessibilityObjectChildren(const WebAccessibilityObject& object)
+{
+ if (m_shell->accessibilityController()->shouldDumpAccessibilityNotifications())
+ printf("didChangeAccessibilityObjectChildren - new count: %d\n", object.childCount());
+}
+
WebNotificationPresenter* WebViewHost::notificationPresenter()
{
return m_shell->notificationPresenter();
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index d95c59f..5067342 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -126,6 +126,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
virtual int historyBackListCount();
virtual int historyForwardListCount();
virtual void focusAccessibilityObject(const WebKit::WebAccessibilityObject&);
+ virtual void didChangeAccessibilityObjectChildren(const WebKit::WebAccessibilityObject&);
virtual WebKit::WebNotificationPresenter* notificationPresenter();
virtual WebKit::WebGeolocationService* geolocationService();
virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index fa3af64..63a4b81 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Zan Dobersek <zandobersek@gmail.com>
* Copyright (C) 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2010 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +34,7 @@
#include "DumpRenderTree.h"
+#include <GtkVersioning.h>
#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
@@ -86,37 +88,6 @@ static void sendOrQueueEvent(GdkEvent*, bool = true);
static void dispatchEvent(GdkEvent* event);
static guint getStateFlags();
-#if !GTK_CHECK_VERSION(2, 17, 3)
-static void gdk_window_get_root_coords(GdkWindow* window, gint x, gint y, gint* rootX, gint* rootY)
-{
- gdk_window_get_root_origin(window, rootX, rootY);
- *rootX = *rootX + x;
- *rootY = *rootY + y;
-}
-#endif
-
-#if !GTK_CHECK_VERSION(2, 14, 0)
-static GdkWindow* gtk_widget_get_window(GtkWidget* widget)
-{
- g_return_val_if_fail(GTK_IS_WIDGET(widget), 0);
- return widget->window;
-}
-#endif
-
-#if !GTK_CHECK_VERSION(2, 21, 2)
-static GdkDragAction gdk_drag_context_get_selected_action(GdkDragContext* context)
-{
- g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), static_cast<GdkDragAction>(0));
- return context->action;
-}
-
-static GdkDragAction gdk_drag_context_get_actions(GdkDragContext* context)
-{
- g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), GDK_ACTION_DEFAULT);
- return context->actions;
-}
-#endif
-
static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
return JSValueMakeBoolean(context, dragMode);
@@ -161,7 +132,7 @@ bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber)
event->button.y = lastMousePositionY;
event->button.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(event->button.window);
- event->button.device = gdk_device_get_core_pointer();
+ event->button.device = getDefaultGDKPointerDevice(event->button.window);
event->button.state = getStateFlags();
event->button.time = GDK_CURRENT_TIME;
event->button.axes = 0;
@@ -285,7 +256,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
event->motion.time = GDK_CURRENT_TIME;
event->motion.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(event->motion.window);
- event->motion.device = gdk_device_get_core_pointer();
+ event->button.device = getDefaultGDKPointerDevice(event->motion.window);
event->motion.state = getStateFlags();
event->motion.axes = 0;
@@ -298,7 +269,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
if (!view)
@@ -323,13 +294,13 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
g_object_ref(event->scroll.window);
if (horizontal < 0)
- event->scroll.direction = GDK_SCROLL_LEFT;
- else if (horizontal > 0)
event->scroll.direction = GDK_SCROLL_RIGHT;
+ else if (horizontal > 0)
+ event->scroll.direction = GDK_SCROLL_LEFT;
else if (vertical < 0)
- event->scroll.direction = GDK_SCROLL_UP;
- else if (vertical > 0)
event->scroll.direction = GDK_SCROLL_DOWN;
+ else if (vertical > 0)
+ event->scroll.direction = GDK_SCROLL_UP;
else
g_assert_not_reached();
@@ -337,6 +308,12 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
return JSValueMakeUndefined(context);
}
+static JSValueRef continuousMouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // GTK doesn't support continuous scroll events.
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
@@ -558,8 +535,9 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
pressEvent->key.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(pressEvent->key.window);
#ifndef GTK_API_VERSION_2
- gdk_event_set_device(pressEvent, gdk_device_get_associated_device(gdk_display_get_core_pointer(gdk_drawable_get_display(pressEvent->key.window))));
+ gdk_event_set_device(pressEvent, getDefaultGDKPointerDevice(pressEvent->key.window));
#endif
+
// When synthesizing an event, an invalid hardware_keycode value
// can cause it to be badly processed by Gtk+.
GdkKeymapKey* keys;
@@ -624,7 +602,8 @@ static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function
}
static JSStaticFunction staticFunctions[] = {
- { "mouseWheelTo", mouseWheelToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "continuousMouseScrollBy", continuousMouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "contextClick", contextClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "mouseUp", mouseUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.h b/WebKitTools/DumpRenderTree/gtk/EventSender.h
index e9b758d..f440f0d 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.h
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.h
@@ -32,10 +32,6 @@
typedef const struct OpaqueJSContext* JSContextRef;
typedef struct OpaqueJSValue* JSObjectRef;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GdkDragContext GdkDragContext;
-typedef void* gpointer;
-typedef int gboolean;
JSObjectRef makeEventSender(JSContextRef context, bool isTopFrame);
void replaySavedEvents();
diff --git a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
index afe81be..0f44f54 100644
--- a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
@@ -22,6 +22,7 @@
#include "DumpRenderTree.h"
+#include <GOwnPtr.h>
#include <JavaScriptCore/JSStringRef.h>
#include <webkit/webkit.h>
#include <string.h>
@@ -58,7 +59,10 @@ bool LoadItem::invoke() const
bool LoadHTMLStringItem::invoke() const
{
- return false;
+ GOwnPtr<gchar> content(JSStringCopyUTF8CString(m_content.get()));
+ GOwnPtr<gchar> baseURL(JSStringCopyUTF8CString(m_baseURL.get()));
+ webkit_web_frame_load_string(mainFrame, content.get(), 0, 0, baseURL.get());
+ return true;
}
bool ReloadItem::invoke() const
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 12a4a50..e756ebf 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -389,6 +389,7 @@ static void resetDefaultsToConsistentValues()
[defaults setObject:@"0.500000 0.500000 0.500000" forKey:@"AppleOtherHighlightColor"];
[defaults setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"];
[defaults setBool:YES forKey:WebKitEnableFullDocumentTeardownPreferenceKey];
+ [defaults setBool:YES forKey:WebKitFullScreenEnabledPreferenceKey];
// Scrollbars are drawn either using AppKit (which uses NSUserDefaults) or using HIToolbox (which uses CFPreferences / kCFPreferencesAnyApplication / kCFPreferencesCurrentUser / kCFPreferencesAnyHost)
[defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"];
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
index f9afdb1..6194c26 100644
--- a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
@@ -227,6 +227,23 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
return NO;
}
+- (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element
+{
+ return YES;
+}
+
+- (void)webView:(WebView *)webView enterFullScreenForElement:(DOMElement*)element listener:(NSObject<WebKitFullScreenListener>*)listener
+{
+ [listener webkitWillEnterFullScreen];
+ [listener webkitDidEnterFullScreen];
+}
+
+- (void)webView:(WebView *)webView exitFullScreenForElement:(DOMElement*)element listener:(NSObject<WebKitFullScreenListener>*)listener
+{
+ [listener webkitWillExitFullScreen];
+ [listener webkitDidExitFullScreen];
+}
+
- (BOOL)webView:(WebView *)webView didPressMissingPluginButton:(DOMElement *)element
{
printf("MISSING PLUGIN BUTTON PRESSED\n");
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
index 63554b2..5b81901 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -6,7 +6,6 @@ BASEDIR = $$PWD/../
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
-INCLUDEPATH += /usr/include/freetype2
INCLUDEPATH += ../../..
INCLUDEPATH += ../../../JavaScriptCore
INCLUDEPATH += ../../../JavaScriptCore/ForwardingHeaders
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 4a57d1d..00ccdb5 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -159,7 +159,7 @@ WebPage::WebPage(QObject* parent, DumpRenderTree* drt)
connect(this, SIGNAL(requestPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(requestPermission(QWebFrame*, QWebPage::PermissionDomain)));
connect(this, SIGNAL(checkPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain, QWebPage::PermissionPolicy&)), this, SLOT(checkPermission(QWebFrame*, QWebPage::PermissionDomain, QWebPage::PermissionPolicy&)));
- connect(this, SIGNAL(cancelRequestsForPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(cancelRequestsForPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)));
+ connect(this, SIGNAL(cancelRequestsForPermission(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(cancelPermission(QWebFrame*, QWebPage::PermissionDomain)));
}
WebPage::~WebPage()
@@ -202,6 +202,8 @@ void WebPage::resetSettings()
QWebSettings::setMaximumPagesInCache(0); // reset to default
settings()->setUserStyleSheetUrl(QUrl()); // reset to default
+
+ m_pendingGeolocationRequests.clear();
}
QWebPage *WebPage::createWindow(QWebPage::WebWindowType)
@@ -224,6 +226,15 @@ void WebPage::requestPermission(QWebFrame* frame, QWebPage::PermissionDomain dom
if (!m_drt->layoutTestController()->ignoreReqestForPermission())
setUserPermission(frame, domain, PermissionGranted);
break;
+ case GeolocationPermissionDomain:
+ if (m_drt->layoutTestController()->isGeolocationPermissionSet())
+ if (m_drt->layoutTestController()->geolocationPermission())
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
+ else
+ m_pendingGeolocationRequests.append(frame);
+ break;
default:
break;
}
@@ -243,8 +254,35 @@ void WebPage::checkPermission(QWebFrame* frame, QWebPage::PermissionDomain domai
}
}
-void WebPage::cancelRequestsForPermission(QWebFrame*, QWebPage::PermissionDomain)
+void WebPage::cancelPermission(QWebFrame* frame, QWebPage::PermissionDomain domain)
+{
+ switch (domain) {
+ case GeolocationPermissionDomain:
+ m_pendingGeolocationRequests.removeOne(frame);
+ break;
+ default:
+ break;
+ }
+}
+
+void WebPage::permissionSet(QWebPage::PermissionDomain domain)
{
+ switch (domain) {
+ case GeolocationPermissionDomain:
+ {
+ Q_ASSERT(m_drt->layoutTestController()->isGeolocationPermissionSet());
+ foreach (QWebFrame* frame, m_pendingGeolocationRequests)
+ if (m_drt->layoutTestController()->geolocationPermission())
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
+
+ m_pendingGeolocationRequests.clear();
+ break;
+ }
+ default:
+ break;
+ }
}
static QString urlSuitableForTestResult(const QString& url)
@@ -367,11 +405,6 @@ QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QS
#endif
}
-bool WebPage::allowGeolocationRequest(QWebFrame *)
-{
- return m_drt->layoutTestController()->geolocationPermission();
-}
-
void WebPage::setViewGeometry(const QRect& rect)
{
if (WebViewGraphicsBased* v = qobject_cast<WebViewGraphicsBased*>(view()))
@@ -391,7 +424,7 @@ DumpRenderTree::DumpRenderTree()
: m_dumpPixels(false)
, m_stdin(0)
, m_enableTextOutput(false)
- , m_singleFileMode(false)
+ , m_standAloneMode(false)
, m_graphicsBased(false)
, m_persistentStoragePath(QString(getenv("DUMPRENDERTREE_TEMP")))
{
@@ -431,6 +464,9 @@ DumpRenderTree::DumpRenderTree()
connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
+ // async geolocation permission set by controller
+ connect(m_controller, SIGNAL(geolocationPermissionSet()), this, SLOT(geolocationPermissionSet()));
+
connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
m_eventSender = new EventSender(m_page);
m_textInputController = new TextInputController(m_page);
@@ -605,6 +641,40 @@ void DumpRenderTree::readLine()
processLine(QString::fromLocal8Bit(line.constData(), line.length()));
}
+void DumpRenderTree::processArgsLine(const QStringList &args)
+{
+ setStandAloneMode(true);
+
+ for (int i = 1; i < args.size(); ++i)
+ if (!args.at(i).startsWith('-'))
+ m_standAloneModeTestList.append(args[i]);
+
+ QFileInfo firstEntry(m_standAloneModeTestList.first());
+ if (firstEntry.isDir()) {
+ QDir folderEntry(m_standAloneModeTestList.first());
+ QStringList supportedExt;
+ // Check for all supported extensions (from Scripts/webkitpy/layout_tests/layout_package/test_files.py).
+ supportedExt << "*.html" << "*.shtml" << "*.xml" << "*.xhtml" << "*.xhtmlmp" << "*.pl" << "*.php" << "*.svg";
+ m_standAloneModeTestList = folderEntry.entryList(supportedExt, QDir::Files);
+ for (int i = 0; i < m_standAloneModeTestList.size(); ++i)
+ m_standAloneModeTestList[i] = folderEntry.absoluteFilePath(m_standAloneModeTestList[i]);
+ }
+
+ processLine(m_standAloneModeTestList.first());
+ m_standAloneModeTestList.removeFirst();
+
+ connect(this, SIGNAL(ready()), this, SLOT(loadNextTestInStandAloneMode()));
+}
+
+void DumpRenderTree::loadNextTestInStandAloneMode()
+{
+ if (m_standAloneModeTestList.isEmpty())
+ emit quit();
+
+ processLine(m_standAloneModeTestList.first());
+ m_standAloneModeTestList.removeFirst();
+}
+
void DumpRenderTree::processLine(const QString &input)
{
QString line = input;
@@ -636,14 +706,9 @@ void DumpRenderTree::processLine(const QString &input)
fi = QFileInfo(currentDir, line.prepend(QLatin1String("LayoutTests/")));
if (!fi.exists()) {
- if (isSingleFileMode())
- emit quit();
- else
- emit ready();
-
+ emit ready();
return;
}
-
}
open(QUrl::fromLocalFile(fi.absoluteFilePath()));
@@ -834,7 +899,7 @@ void DumpRenderTree::dump()
QWebFrame *mainFrame = m_page->mainFrame();
- if (isSingleFileMode()) {
+ if (isStandAloneMode()) {
QString markup = mainFrame->toHtml();
fprintf(stdout, "Source:\n\n%s\n", markup.toUtf8().constData());
}
@@ -922,10 +987,7 @@ void DumpRenderTree::dump()
fflush(stdout);
fflush(stderr);
- if (isSingleFileMode())
- emit quit();
- else
- emit ready();
+ emit ready();
}
void DumpRenderTree::titleChanged(const QString &s)
@@ -999,6 +1061,11 @@ int DumpRenderTree::windowCount() const
return windows.count() + 1;
}
+void DumpRenderTree::geolocationPermissionSet()
+{
+ m_page->permissionSet(QWebPage::GeolocationPermissionDomain);
+}
+
void DumpRenderTree::switchFocus(bool focused)
{
QFocusEvent event((focused) ? QEvent::FocusIn : QEvent::FocusOut, Qt::ActiveWindowFocusReason);
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
index de0c6c5..3d34443 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -79,9 +79,6 @@ public:
void setTextOutputEnabled(bool enable) { m_enableTextOutput = enable; }
bool isTextOutputEnabled() { return m_enableTextOutput; }
- void setSingleFileMode(bool flag) { m_singleFileMode = flag; }
- bool isSingleFileMode() { return m_singleFileMode; }
-
void setGraphicsBased(bool flag) { m_graphicsBased = flag; }
bool isGraphicsBased() { return m_graphicsBased; }
@@ -106,6 +103,7 @@ public:
#if defined(Q_WS_X11)
static void initializeFonts();
#endif
+ void processArgsLine(const QStringList&);
public Q_SLOTS:
void initJSObjects();
@@ -128,8 +126,13 @@ private Q_SLOTS:
void showPage();
void hidePage();
void dryRunPrint(QWebFrame*);
+ void loadNextTestInStandAloneMode();
+ void geolocationPermissionSet();
private:
+ void setStandAloneMode(bool flag) { m_standAloneMode = flag; }
+ bool isStandAloneMode() { return m_standAloneMode; }
+
QString dumpFramesAsText(QWebFrame* frame);
QString dumpBackForwardList(QWebPage* page);
QString dumpFrameScrollPosition(QWebFrame* frame);
@@ -137,6 +140,7 @@ private:
bool m_dumpPixels;
QString m_expectedHash;
+ QStringList m_standAloneModeTestList;
WebPage *m_page;
QWidget* m_mainView;
@@ -150,7 +154,7 @@ private:
QList<QObject*> windows;
bool m_enableTextOutput;
- bool m_singleFileMode;
+ bool m_standAloneMode;
bool m_graphicsBased;
QString m_persistentStoragePath;
};
@@ -188,12 +192,13 @@ public:
QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
+ void permissionSet(QWebPage::PermissionDomain domain);
+
public slots:
bool shouldInterruptJavaScript() { return false; }
- bool allowGeolocationRequest(QWebFrame *frame);
void requestPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
void checkPermission(QWebFrame* frame, QWebPage::PermissionDomain domain, QWebPage::PermissionPolicy& policy);
- void cancelRequestsForPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
+ void cancelPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
protected:
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, NavigationType type);
@@ -204,6 +209,7 @@ private slots:
private:
QWebInspector* m_webInspector;
+ QList<QWebFrame*> m_pendingGeolocationRequests;
DumpRenderTree *m_drt;
};
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 74baf37..b783141 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -68,6 +68,8 @@ void LayoutTestController::reset()
m_userStyleSheetEnabled = false;
m_desktopNotificationAllowedOrigins.clear();
m_ignoreDesktopNotification = false;
+ m_isGeolocationPermissionSet = false;
+ m_geolocationPermission = false;
DumpRenderTreeSupportQt::dumpEditingCallbacks(false);
DumpRenderTreeSupportQt::dumpFrameLoader(false);
@@ -715,6 +717,12 @@ void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double
void LayoutTestController::setGeolocationPermission(bool allow)
{
+ setGeolocationPermissionCommon(allow);
+ emit geolocationPermissionSet();
+}
+
+void LayoutTestController::setGeolocationPermissionCommon(bool allow)
+{
m_isGeolocationPermissionSet = true;
m_geolocationPermission = allow;
}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 207e093..7e58f44 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -85,6 +85,7 @@ signals:
void showPage();
void hidePage();
+ void geolocationPermissionSet();
public slots:
void maybeDump(bool ok);
@@ -239,6 +240,9 @@ private slots:
void processWork();
private:
+ void setGeolocationPermissionCommon(bool allow);
+
+private:
bool m_hasDumped;
bool m_textDump;
bool m_dumpBackForwardList;
diff --git a/WebKitTools/DumpRenderTree/qt/main.cpp b/WebKitTools/DumpRenderTree/qt/main.cpp
index 7d1c08c..8349d73 100644
--- a/WebKitTools/DumpRenderTree/qt/main.cpp
+++ b/WebKitTools/DumpRenderTree/qt/main.cpp
@@ -143,7 +143,8 @@ int main(int argc, char* argv[])
QStringList args = app.arguments();
if (args.count() < 2) {
- qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename";
+ qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename [filename2..n]";
+ qDebug() << "Or folder containing test files: DumpRenderTree [-v|--pixel-tests] dirpath";
exit(0);
}
@@ -161,15 +162,8 @@ int main(int argc, char* argv[])
if (args.contains(QLatin1String("-"))) {
QObject::connect(&dumper, SIGNAL(ready()), &dumper, SLOT(readLine()), Qt::QueuedConnection);
QTimer::singleShot(0, &dumper, SLOT(readLine()));
- } else {
- dumper.setSingleFileMode(true);
- for (int i = 1; i < args.size(); ++i) {
- if (!args.at(i).startsWith('-')) {
- dumper.processLine(args.at(i));
- break;
- }
- }
- }
+ } else
+ dumper.processArgsLine(args);
return app.exec();
diff --git a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
index 8216f7a..8c4e98d 100644
--- a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
+++ b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -267,7 +267,33 @@ webkit_test_plugin_handle_event(NPP instance, void* event)
return 0;
XEvent* evt = static_cast<XEvent*>(event);
- pluginLog(instance, "event %d", evt->type);
+
+ switch (evt->type) {
+ case ButtonRelease:
+ pluginLog(instance, "mouseUp at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+ break;
+ case ButtonPress:
+ pluginLog(instance, "mouseDown at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+ break;
+ case KeyRelease:
+ pluginLog(instance, "keyUp '%c'", evt->xkey.keycode);
+ break;
+ case KeyPress:
+ pluginLog(instance, "keyDown '%c'", evt->xkey.keycode);
+ break;
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ break;
+ case FocusIn:
+ pluginLog(instance, "getFocusEvent");
+ break;
+ case FocusOut:
+ pluginLog(instance, "loseFocusEvent");
+ break;
+ default:
+ pluginLog(instance, "event %d", evt->type);
+ }
return 0;
}
diff --git a/WebKitTools/GNUmakefile.am b/WebKitTools/GNUmakefile.am
index 33d4614..39df421 100644
--- a/WebKitTools/GNUmakefile.am
+++ b/WebKitTools/GNUmakefile.am
@@ -36,6 +36,7 @@ dumprendertree_cppflags := \
-I$(srcdir)/WebKitTools/DumpRenderTree/cairo \
-I$(srcdir)/WebKitTools/DumpRenderTree/gtk \
-I$(srcdir)/WebKit/gtk \
+ -I$(srcdir)/WebCore/platform/gtk \
-I$(top_builddir)/WebKit/gtk \
-I$(top_builddir)/DerivedSources \
$(global_cppflags) \
@@ -72,7 +73,8 @@ Programs_DumpRenderTree_SOURCES = \
WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp \
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
- WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+ WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
+ WebCore/platform/gtk/GtkVersioning.c
Programs_DumpRenderTree_CXXFLAGS = \
$(global_cxxflags) \
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 6422cca..0b4e170 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -172,6 +172,11 @@ static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void *
[(BrowserWindowController *)clientInfo didCommitLoadForFrame:frame];
}
+static void didFinishDocumentLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
+{
+ LOG(@"didFinishDocumentLoadForFrame");
+}
+
static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
LOG(@"didFinishLoadForFrame");
@@ -379,6 +384,7 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt
didReceiveServerRedirectForProvisionalLoadForFrame,
didFailProvisionalLoadWithErrorForFrame,
didCommitLoadForFrame,
+ didFinishDocumentLoadForFrame,
didFinishLoadForFrame,
didFailLoadWithErrorForFrame,
didReceiveTitleForFrame,
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
index 9efe64f..2e0dccd 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
@@ -79,10 +79,13 @@ QGraphicsWKView* BrowserView::view() const
BrowserWindow::BrowserWindow()
{
+ setAttribute(Qt::WA_DeleteOnClose);
+
m_menu = new QMenuBar();
m_browser = new BrowserView();
m_addressBar = new QLineEdit();
+ m_menu->addAction("New Window", this, SLOT(newWindow()));
m_menu->addAction("Quit", this, SLOT(close()));
m_browser->setFocus(Qt::OtherFocusReason);
@@ -111,6 +114,15 @@ void BrowserWindow::load(const QString& url)
m_browser->load(QUrl(url));
}
+BrowserWindow* BrowserWindow::newWindow(const QString& url)
+{
+ BrowserWindow* window = new BrowserWindow();
+ window->resize(960, 640);
+ window->show();
+ window->load(url);
+ return window;
+}
+
void BrowserWindow::changeLocation()
{
QString string = m_addressBar->text();
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.h b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
index fa11390..99d3e82 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.h
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
@@ -28,13 +28,13 @@
#define PLATFORM(x) 0
-#include <stdint.h>
+#include "WKContext.h"
+#include "WKRetainPtr.h"
+#include "qgraphicswkview.h"
#include <QtGui>
-#include <WebKit2/WKRetainPtr.h>
-#include <WebKit2/WKContext.h>
#include <QGraphicsScene>
#include <QGraphicsView>
-#include <WebKit2/qgraphicswkview.h>
+#include <stdint.h>
class BrowserView : public QGraphicsView {
Q_OBJECT
@@ -62,6 +62,9 @@ public:
~BrowserWindow();
void load(const QString& url);
+public slots:
+ BrowserWindow* newWindow(const QString& url = "about:blank");
+
protected slots:
void changeLocation();
void loadProgress(int progress);
diff --git a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
index b34b8f7..274b9e5 100644
--- a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
+++ b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
@@ -14,6 +14,8 @@ isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
INCLUDEPATH += \
+ $$PWD/../../../WebKit2/ \
+ $$PWD/../../../WebKit2/UIProcess/API/cpp \
$$PWD/../../../WebKit2/UIProcess/API/C \
$$PWD/../../../WebKit2/UIProcess/API/qt \
$$OUTPUT_DIR/include
diff --git a/WebKitTools/MiniBrowser/qt/main.cpp b/WebKitTools/MiniBrowser/qt/main.cpp
index b261397..2bc346b 100644
--- a/WebKitTools/MiniBrowser/qt/main.cpp
+++ b/WebKitTools/MiniBrowser/qt/main.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010 University of Szeged
*
* All rights reserved.
*
@@ -31,10 +32,23 @@
int main(int argc, char** argv) {
QApplication app(argc, argv);
- BrowserWindow window;
- window.resize(960, 640);
- window.show();
- window.load(argc > 1 ? argv[1] : "http://www.google.com");
+ QStringList args = QApplication::arguments();
+ QStringList urls = args;
+ urls.removeAt(0);
+
+ if (urls.isEmpty()) {
+ QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
+ if (QDir(defaultUrl).exists())
+ urls.append(defaultUrl);
+ else
+ urls.append("http://www.google.com");
+ }
+
+ BrowserWindow* window = 0;
+ foreach (QString url, urls) {
+ window = new BrowserWindow();
+ window->newWindow(url);
+ }
app.exec();
diff --git a/WebKitTools/QueueStatusServer/handlers/dashboard.py b/WebKitTools/QueueStatusServer/handlers/dashboard.py
index bbb65b8..26de263 100644
--- a/WebKitTools/QueueStatusServer/handlers/dashboard.py
+++ b/WebKitTools/QueueStatusServer/handlers/dashboard.py
@@ -43,7 +43,6 @@ class Dashboard(webapp.RequestHandler):
_queues_to_display = [
["Style", "style-queue"],
["Cr-Linux", "chromium-ews"],
- ["Cr-Win", "cr-win-ews"],
["Qt", "qt-ews"],
["Gtk", "gtk-ews"],
["Mac", "mac-ews"],
diff --git a/WebKitTools/QueueStatusServer/handlers/queuestatus.py b/WebKitTools/QueueStatusServer/handlers/queuestatus.py
index 6282a98..5295b17 100644
--- a/WebKitTools/QueueStatusServer/handlers/queuestatus.py
+++ b/WebKitTools/QueueStatusServer/handlers/queuestatus.py
@@ -49,7 +49,7 @@ class QueueStatus(webapp.RequestHandler):
def get(self, queue_name):
work_items = WorkItems.all().filter("queue_name =", queue_name).get()
- statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue_name).order("-date").fetch(6)
+ statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue_name).order("-date").fetch(15)
template_values = {
"display_queue_name": display_name_for_queue(queue_name),
"work_item_rows": self._rows_for_work_items(work_items),
diff --git a/WebKitTools/QueueStatusServer/model/queues.py b/WebKitTools/QueueStatusServer/model/queues.py
index 2f0884f..9658dd4 100644
--- a/WebKitTools/QueueStatusServer/model/queues.py
+++ b/WebKitTools/QueueStatusServer/model/queues.py
@@ -33,11 +33,11 @@ queues = [
"commit-queue",
"style-queue",
"chromium-ews",
- "cr-win-ews",
"qt-ews",
"gtk-ews",
"mac-ews",
"win-ews",
+ "efl-ews",
]
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index acd7736..4234905 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -2,6 +2,7 @@
# Copyright (C) 2005, 2006 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 moiji-mobile.com All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -330,9 +331,7 @@ if (isGtk()) {
}
foreach (@features) {
- if ($_->{option} eq "coverage") {
- push @options, XcodeCoverageSupportOptions() if $coverageSupport;
- } else {
+ if ($_->{option} ne "coverage") {
my $option = option($_->{define}, ${$_->{value}}, $_->{default});
push @options, $option unless $option eq "";
}
@@ -441,7 +440,9 @@ for my $dir (@projects) {
$result = buildQMakeQtProject($dir, $clean, @options);
} elsif (isAppleMacWebKit()) {
$dir = "MiniBrowser" if $dir eq "WebKitTools/MiniBrowser";
- $result = buildXCodeProject($dir, $clean, @options, @ARGV);
+ my @local_options = @options;
+ push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $dir ne "ANGLE";
+ $result = buildXCodeProject($dir, $clean, @local_options, @ARGV);
} elsif (isAppleWinWebKit()) {
if ($dir eq "WebKit") {
$result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
diff --git a/WebKitTools/Scripts/check-for-global-initializers b/WebKitTools/Scripts/check-for-global-initializers
index 0472901..102fa09 100755
--- a/WebKitTools/Scripts/check-for-global-initializers
+++ b/WebKitTools/Scripts/check-for-global-initializers
@@ -105,18 +105,19 @@ for my $file (sort @files) {
next if $shortName eq "nodes.o";
}
if ($target eq "WebCore") {
+ next if $shortName eq "BidiRun.o";
next if $shortName eq "CachedPage.o";
next if $shortName eq "CachedResource.o";
+ next if $shortName eq "FEGaussianBlur.o";
next if $shortName eq "Frame.o";
next if $shortName eq "JSCustomSQLTransactionCallback.o";
next if $shortName eq "JSLazyEventListener.o";
next if $shortName eq "Node.o";
next if $shortName eq "Page.o";
next if $shortName eq "Range.o";
- next if $shortName eq "BidiRun.o";
next if $shortName eq "RenderObject.o";
- next if $shortName eq "SubresourceLoader.o";
next if $shortName eq "SVGElementInstance.o";
+ next if $shortName eq "SubresourceLoader.o";
next if $shortName eq "XMLHttpRequest.o";
}
if ($target eq "WebKit") {
diff --git a/WebKitTools/Scripts/create-html-entity-table b/WebKitTools/Scripts/create-html-entity-table
deleted file mode 100755
index c408207..0000000
--- a/WebKitTools/Scripts/create-html-entity-table
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import os.path
-import string
-import sys
-
-# Hack sys.path to avoid executing webkitpy __init__.py code which may
-# use Python 2.5 features. This code needs to run on Python 2.3 in order
-# to support Mac OS X Tiger.
-scripts_directory = sys.path[0]
-sys.path.append("%s/webkitpy/thirdparty" % scripts_directory)
-
-import simplejson
-
-
-def convert_entity_to_cpp_name(entity):
- postfix = "EntityName"
- if entity[-1] == ";":
- return "%sSemicolon%s" % (entity[:-1], postfix)
- return "%s%s" % (entity, postfix)
-
-
-def convert_entity_to_uchar_array(entity):
- return "{'%s'}" % "', '".join(entity)
-
-
-def convert_value_to_int(value):
- assert(value[0] == "U")
- assert(value[1] == "+")
- return "0x" + value[2:]
-
-
-def offset_table_entry(offset):
- return " &staticEntityTable[%s]," % offset
-
-
-program_name = os.path.basename(__file__)
-if len(sys.argv) < 4 or sys.argv[1] != "-o":
- print >> sys.stderr, "Usage: %s -o OUTPUT_FILE INPUT_FILE" % program_name
- exit(1)
-
-output_path = sys.argv[2]
-input_path = sys.argv[3]
-
-html_entity_names_file = open(input_path)
-entries = simplejson.load(html_entity_names_file)
-html_entity_names_file.close()
-
-entries.sort(lambda a, b: cmp(a['entity'], b['entity']))
-entity_count = len(entries)
-
-output_file = open(output_path, "w")
-
-print >> output_file, """/*
- * Copyright (C) 2010 Google, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// THIS FILE IS GENERATED BY WebKitTools/Scripts/create-html-entity-table
-// DO NOT EDIT (unless you are a ninja)!
-
-#include "config.h"
-#include "HTMLEntityTable.h"
-
-namespace WebCore {
-
-namespace {
-"""
-
-for entry in entries:
- print >> output_file, "const UChar %sEntityName[] = %s;" % (
- convert_entity_to_cpp_name(entry["entity"]),
- convert_entity_to_uchar_array(entry["entity"]))
-
-print >> output_file, """
-HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count
-
-index = {}
-offset = 0
-for entry in entries:
- letter = entry["entity"][0]
- if not index.get(letter):
- index[letter] = offset
- print >> output_file, ' { %sEntityName, %s, %s },' % (
- convert_entity_to_cpp_name(entry["entity"]),
- len(entry["entity"]),
- convert_value_to_int(entry["value"]))
- offset += 1
-
-print >> output_file, """};
-"""
-
-print >> output_file, "const HTMLEntityTableEntry* uppercaseOffset[] = {"
-for letter in string.uppercase:
- print >> output_file, offset_table_entry(index[letter])
-print >> output_file, offset_table_entry(index['a'])
-print >> output_file, """};
-
-const HTMLEntityTableEntry* lowercaseOffset[] = {"""
-for letter in string.lowercase:
- print >> output_file, offset_table_entry(index[letter])
-print >> output_file, offset_table_entry(entity_count)
-print >> output_file, """};
-
-}
-
-const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c)
-{
- if (c >= 'A' && c <= 'Z')
- return uppercaseOffset[c - 'A'];
- if (c >= 'a' && c <= 'z')
- return lowercaseOffset[c - 'a'];
- return 0;
-}
-
-const HTMLEntityTableEntry* HTMLEntityTable::lastEntryStartingWith(UChar c)
-{
- if (c >= 'A' && c <= 'Z')
- return uppercaseOffset[c - 'A' + 1] - 1;
- if (c >= 'a' && c <= 'z')
- return lowercaseOffset[c - 'a' + 1] - 1;
- return 0;
-}
-
-const HTMLEntityTableEntry* HTMLEntityTable::firstEntry()
-{
- return &staticEntityTable[0];
-}
-
-const HTMLEntityTableEntry* HTMLEntityTable::lastEntry()
-{
- return &staticEntityTable[%s - 1];
-}
-
-}
-""" % entity_count
diff --git a/WebKitTools/Scripts/enumerate-included-framework-headers b/WebKitTools/Scripts/enumerate-included-framework-headers
deleted file mode 100755
index 598a790..0000000
--- a/WebKitTools/Scripts/enumerate-included-framework-headers
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2009, 2010 University of Szeged
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# A script to find and enumerate headers included from the given frameworks by files in the
-# current directory (and subdirectories).
-
-# FIXME: This should be rewritten in perl.
-# FIXME: Currently only works for qt.
-
-platform_prefixes=android/\|brew/\|cf/\|chromium/\|curl\|efl/\|gtk/\|haiku/\|mac/\|soup\|v8\|win/\|wx/
-
-for framework in $*; do
- headers=`find . \( -name '*.cpp' -o -name '*.h' \) -exec grep "<$framework/" {} ';' | sed -e 's|.*/\(.*\.h\).*|\1|' | sort -u`
-
- for header in $headers
- do
- header_paths=`find ../$framework -name $header | sed "s/..\/$framework\///"`
-
- if test `echo $header_paths | wc -w` -eq 1
- then
- header_path=$header_paths
- if test `echo $header_path | grep -c -E $platform_prefixes` -ne 0
- then
- continue
- fi
- else
- for path in $header_paths
- do
- if test `echo $path | grep -c -E $platform_prefixes` -eq 0
- then
- header_path=$path
- break
- fi
- done
- fi
-
- echo -n "$header_path "
- done
-done
diff --git a/WebKitTools/Scripts/prepare-ChangeLog b/WebKitTools/Scripts/prepare-ChangeLog
index 45aca1b..c2adaf5 100755
--- a/WebKitTools/Scripts/prepare-ChangeLog
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -715,7 +715,7 @@ sub get_function_line_ranges_for_c($$)
if (!$in_braces and $potential_start) {
$start = $potential_start;
$name = $potential_name;
- if (@namespaces && (length($name) < 2 || substr($name,1,1) ne "[")) {
+ if (@namespaces && $name && (length($name) < 2 || substr($name,1,1) ne "[")) {
$name = join ('::', @namespaces, $name);
}
}
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 3901611..b4d3f60 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -403,7 +403,7 @@ sub XcodeCoverageSupportOptions()
push @coverageSupportOptions, "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES";
push @coverageSupportOptions, "EXTRA_LINK= \$(EXTRA_LINK) -ftest-coverage -fprofile-arcs";
push @coverageSupportOptions, "OTHER_CFLAGS= \$(OTHER_CFLAGS) -DCOVERAGE -MD";
- push @coverageSupportOptions, "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ftest-coverage -fprofile-arcs -framework AppKit";
+ push @coverageSupportOptions, "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ftest-coverage -fprofile-arcs -lgcov";
return @coverageSupportOptions;
}
diff --git a/WebKitTools/Scripts/webkitpy/common/config/committers.py b/WebKitTools/Scripts/webkitpy/common/config/committers.py
index 5110db1..19ebc5f 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/committers.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/committers.py
@@ -81,6 +81,7 @@ committers_unable_to_review = [
Committer("Ben Murdoch", "benm@google.com", "benm"),
Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org"], "icefox"),
Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
+ Committer("Benjamin Poulain", ["benjamin.poulain@nokia.com", "ikipou@gmail.com"]),
Committer("Brent Fulgham", "bfulgham@webkit.org", "bfulgham"),
Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
Committer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
@@ -88,7 +89,6 @@ committers_unable_to_review = [
Committer("Carol Szabo", "carol.szabo@nokia.com"),
Committer("Chang Shu", "Chang.Shu@nokia.com"),
Committer("Chris Evans", "cevans@google.com"),
- Committer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
Committer("Chris Petersen", "cpetersen@apple.com", "cpetersen"),
Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
Committer("Collin Jackson", "collinj@webkit.org"),
@@ -167,6 +167,7 @@ committers_unable_to_review = [
Committer("Tony Gentilcore", "tonyg@chromium.org", "tonyg-cr"),
Committer("Trey Matteson", "trey@usa.net", "trey"),
Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]),
+ Committer("Vangelis Kokkevis", "vangelis@chromium.org", "vangelis"),
Committer("Victor Wang", "victorw@chromium.org", "victorw"),
Committer("Vitaly Repeshko", "vitalyr@chromium.org"),
Committer("William Siegrist", "wsiegrist@apple.com", "wms"),
@@ -204,6 +205,7 @@ reviewers_list = [
Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"),
Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"),
+ Reviewer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
Reviewer("Chris Fleizach", "cfleizach@apple.com", "cfleizach"),
Reviewer("Chris Jerdonek", "cjerdonek@webkit.org", "cjerdonek"),
Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"),
diff --git a/WebKitTools/Scripts/webkitpy/common/config/ports.py b/WebKitTools/Scripts/webkitpy/common/config/ports.py
index 9d4ac3f..ebd88b1 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/ports.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/ports.py
@@ -49,6 +49,7 @@ class WebKitPort(object):
"mac": MacPort,
"win": WinPort,
"qt": QtPort,
+ "efl": EflPort,
}
default_port = {
"Windows": WinPort,
@@ -177,6 +178,24 @@ class QtPort(WebKitPort):
return command
+class EflPort(WebKitPort):
+
+ @classmethod
+ def name(cls):
+ return "Efl"
+
+ @classmethod
+ def flag(cls):
+ return "--port=efl"
+
+ @classmethod
+ def build_webkit_command(cls, build_style=None):
+ command = WebKitPort.build_webkit_command(build_style=build_style)
+ command.append("--efl")
+ command.append(WebKitPort.makeArgs())
+ return command
+
+
class ChromiumPort(WebKitPort):
@classmethod
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
index 40db32c..2b2258e 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
@@ -341,11 +341,8 @@ class CommitterValidator(object):
flag_name, contribution_guidlines)
message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed). " % (
flag_name, committers_list)
- message += "Due to bug 30084 the %s will require a restart after your change. " % queue_name
- message += "Please contact %s to request a %s restart. " % (
- queue_administrator, queue_name)
- message += "After restart the %s will correctly respect your %s rights." % (
- queue_name, flag_name)
+ message += "The %s restarts itself every 2 hours. After restart the %s will correctly respect your %s rights." % (
+ queue_name, queue_name, flag_name)
return message
def _validate_setter_email(self, patch, result_key, rejection_function):
@@ -521,6 +518,8 @@ class Bugzilla(object):
def fetch_bug_dictionary(self, bug_id):
try:
return self._parse_bug_page(self._fetch_bug_page(bug_id))
+ except KeyboardInterrupt:
+ raise
except:
self.authenticate()
return self._parse_bug_page(self._fetch_bug_page(bug_id))
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
index 3556121..280696e 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
@@ -68,7 +68,7 @@ class CommitterValidatorTest(unittest.TestCase):
- If you do not have review rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have review rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your review rights."""
+- If you have review rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your review rights."""
self.assertEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html
new file mode 100644
index 0000000..38c54e3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html
@@ -0,0 +1 @@
+exception
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html
new file mode 100644
index 0000000..c253983
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html
@@ -0,0 +1 @@
+keyboard
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt
new file mode 100644
index 0000000..9427269
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt
@@ -0,0 +1 @@
+error-txt
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html
new file mode 100644
index 0000000..8276753
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html
@@ -0,0 +1 @@
+error
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt b/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
index 6e66caa..16556e3 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
@@ -8,3 +8,5 @@ WONTFIX : failures/expected/missing_image.html = MISSING PASS
WONTFIX : failures/expected/missing_text.html = MISSING PASS
WONTFIX : failures/expected/text.html = TEXT
WONTFIX : failures/expected/timeout.html = TIMEOUT
+WONTFIX SKIP : failures/expected/keyboard.html = CRASH
+WONTFIX SKIP : failures/expected/exception.html = CRASH
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index 6343400..ec33086 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -169,6 +169,11 @@ class SingleTestThread(threading.Thread):
self._output_dir = output_dir
def run(self):
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
test_info = self._test_info
driver = self._port.create_driver(self._image_path, self._shell_args)
driver.start()
@@ -287,6 +292,11 @@ class TestShellThread(WatchableThread):
def run(self):
"""Delegate main work to a helper method and watch for uncaught
exceptions."""
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
self._thread_id = thread.get_ident()
self._start_time = time.time()
self._num_tests = 0
@@ -303,9 +313,9 @@ class TestShellThread(WatchableThread):
self._exception_info = sys.exc_info()
self._stop_time = time.time()
# Re-raise it and die.
- _log.error('%s dying: %s' % (self.getName(),
+ _log.error('%s dying, exception raised: %s' % (self.getName(),
self._exception_info))
- raise
+
self._stop_time = time.time()
def run_in_main_thread(self, test_runner, result_summary):
@@ -321,14 +331,8 @@ class TestShellThread(WatchableThread):
If test_runner is not None, then we call test_runner.UpdateSummary()
with the results of each test."""
- batch_size = 0
+ batch_size = self._options.batch_size
batch_count = 0
- if self._options.batch_size:
- try:
- batch_size = int(self._options.batch_size)
- except:
- _log.info("Ignoring invalid batch size '%s'" %
- self._options.batch_size)
# Append tests we're running to the existing tests_run.txt file.
# This is created in run_webkit_tests.py:_PrepareListsAndPrintOutput.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
index a9c6d5b..9421ff8 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
@@ -34,7 +34,6 @@ import optparse
import pdb
import sys
import unittest
-import logging
from webkitpy.common.array_stream import ArrayStream
from webkitpy.layout_tests.layout_package import metered_stream
@@ -97,13 +96,19 @@ class TestMeteredStream(unittest.TestCase):
m.write("foo")
self.assertEquals(a.get(), ['foo'])
+ import logging
+ b = ArrayStream()
+ logger = logging.getLogger()
+ handler = logging.StreamHandler(b)
+ logger.addHandler(handler)
m.update("bar")
- # FIXME: figure out how to test that this went to the logger. Is this
- # good enough?
+ logger.handlers.remove(handler)
self.assertEquals(a.get(), ['foo'])
+ self.assertEquals(b.get(), ['bar\n'])
m.progress("dropped")
self.assertEquals(a.get(), ['foo'])
+ self.assertEquals(b.get(), ['bar\n'])
if __name__ == '__main__':
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
index a9e015f..d420631 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
@@ -126,19 +126,6 @@ def print_options():
]
-def configure_logging(options, meter):
- """Configures the logging system."""
- log_fmt = '%(message)s'
- log_datefmt = '%y%m%d %H:%M:%S'
- log_level = logging.INFO
- if options.verbose:
- log_fmt = ('%(asctime)s %(filename)s:%(lineno)-4d %(levelname)s '
- '%(message)s')
- log_level = logging.DEBUG
-
- logging.basicConfig(level=log_level, format=log_fmt,
- datefmt=log_datefmt, stream=meter)
-
def parse_print_options(print_options, verbose, child_processes,
is_fully_parallel):
@@ -190,6 +177,28 @@ def parse_print_options(print_options, verbose, child_processes,
return switches
+def _configure_logging(stream, verbose):
+ log_fmt = '%(message)s'
+ log_datefmt = '%y%m%d %H:%M:%S'
+ log_level = logging.INFO
+ if verbose:
+ log_fmt = ('%(asctime)s %(filename)s:%(lineno)-4d %(levelname)s '
+ '%(message)s')
+ log_level = logging.DEBUG
+
+ root = logging.getLogger()
+ handler = logging.StreamHandler(stream)
+ handler.setFormatter(logging.Formatter(log_fmt, None))
+ root.addHandler(handler)
+ root.setLevel(log_level)
+ return handler
+
+
+def _restore_logging(handler_to_remove):
+ root = logging.getLogger()
+ root.handlers.remove(handler_to_remove)
+
+
class Printer(object):
"""Class handling all non-debug-logging printing done by run-webkit-tests.
@@ -237,12 +246,22 @@ class Printer(object):
self._meter = metered_stream.MeteredStream(options.verbose,
regular_output)
- configure_logging(self._options, self._meter)
+ self._logging_handler = _configure_logging(self._meter,
+ options.verbose)
self.switches = parse_print_options(options.print_options,
options.verbose, child_processes, is_fully_parallel)
- # These two routines just hide the implmentation of the switches.
+ def cleanup(self):
+ """Restore logging configuration to its initial settings."""
+ if self._logging_handler:
+ _restore_logging(self._logging_handler)
+ self._logging_handler = None
+
+ def __del__(self):
+ self.cleanup()
+
+ # These two routines just hide the implementation of the switches.
def disabled(self, option):
return not option in self.switches
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
index 40c691f..29139d0 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
@@ -37,6 +37,7 @@ import unittest
import logging
from webkitpy.common import array_stream
+from webkitpy.common.system import logtesting
from webkitpy.layout_tests import port
from webkitpy.layout_tests.layout_package import printing
from webkitpy.layout_tests.layout_package import dump_render_tree_thread
@@ -53,25 +54,24 @@ def get_options(args):
class TestUtilityFunctions(unittest.TestCase):
def test_configure_logging(self):
- # FIXME: We need to figure out how to reset the basic logger.
- # FIXME: If other testing classes call logging.basicConfig() then
- # FIXME: these calls become no-ops and we can't control the
- # FIXME: configuration to test things properly.
options, args = get_options([])
stream = array_stream.ArrayStream()
- printing.configure_logging(options, stream)
+ handler = printing._configure_logging(stream, options.verbose)
logging.info("this should be logged")
- # self.assertFalse(stream.empty())
+ self.assertFalse(stream.empty())
stream.reset()
logging.debug("this should not be logged")
- # self.assertTrue(stream.empty())
+ self.assertTrue(stream.empty())
+
+ printing._restore_logging(handler)
stream.reset()
options, args = get_options(['--verbose'])
- printing.configure_logging(options, stream)
+ handler = printing._configure_logging(stream, options.verbose)
logging.debug("this should be logged")
- # self.assertFalse(stream.empty())
+ self.assertFalse(stream.empty())
+ printing._restore_logging(handler)
def test_print_options(self):
options, args = get_options([])
@@ -190,6 +190,14 @@ class Testprinter(unittest.TestCase):
do_helper(method_name, switch, 'hello', exp_err, exp_bot)
do_helper(method_name, 'everything', 'hello', exp_err, exp_bot)
+ def test_configure_and_cleanup(self):
+ # This test verifies that calling cleanup repeatedly and deleting
+ # the object is safe.
+ printer, err, out = self.get_printer(['--print', 'everything'])
+ printer.cleanup()
+ printer.cleanup()
+ printer = None
+
def test_print_actual(self):
# Actual results need to be logged to the buildbot's stream.
self.do_switch_tests('print_actual', 'actual', to_buildbot=True)
@@ -421,11 +429,12 @@ class Testprinter(unittest.TestCase):
self.assertFalse(err.empty())
self.assertTrue(out.empty())
- def test_write(self):
+ def test_write_nothing(self):
printer, err, out = self.get_printer(['--print', 'nothing'])
printer.write("foo")
self.assertTrue(err.empty())
+ def test_write_misc(self):
printer, err, out = self.get_printer(['--print', 'misc'])
printer.write("foo")
self.assertFalse(err.empty())
@@ -433,6 +442,7 @@ class Testprinter(unittest.TestCase):
printer.write("foo", "config")
self.assertTrue(err.empty())
+ def test_write_everything(self):
printer, err, out = self.get_printer(['--print', 'everything'])
printer.write("foo")
self.assertFalse(err.empty())
@@ -440,11 +450,10 @@ class Testprinter(unittest.TestCase):
printer.write("foo", "config")
self.assertFalse(err.empty())
- # FIXME: this should be logged somewhere, but it actually
- # disappears into the ether in the logging subsystem.
+ def test_write_verbose(self):
printer, err, out = self.get_printer(['--verbose'])
printer.write("foo")
- self.assertTrue(err.empty())
+ self.assertTrue(not err.empty() and "foo" in err.get()[0])
self.assertTrue(out.empty())
def test_print_unexpected_results(self):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
index 086321d..3d8349b 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
@@ -477,6 +477,7 @@ class TestExpectationsFile:
the updated string.
"""
+ assert(platform)
f_orig = self._get_iterable_expectations(self._expectations)
f_new = []
@@ -487,6 +488,8 @@ class TestExpectationsFile:
lineno += 1
action = self._get_platform_update_action(line, lineno, tests,
platform)
+ assert(action in (NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM,
+ ADD_PLATFORMS_EXCEPT_THIS))
if action == NO_CHANGE:
# Save the original line back to the file
_log.debug('No change to test: %s', line)
@@ -522,9 +525,6 @@ class TestExpectationsFile:
_log.info('Test updated: ')
_log.info(' old: %s', line)
_log.info(' new: %s', new_line)
- else:
- _log.error('Unknown update action: %d; line: %s',
- action, line)
_log.info('Total tests removed: %d', tests_removed)
_log.info('Total tests updated: %d', tests_updated)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
index 22214b0..26eb18d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
@@ -93,14 +93,16 @@ class Base(unittest.TestCase):
self.get_test('failures/expected/image_checksum.html'),
self.get_test('failures/expected/crash.html'),
self.get_test('failures/expected/missing_text.html'),
+ self.get_test('failures/expected/image.html'),
self.get_test('passes/text.html')]
def get_basic_expectations(self):
return """
BUG_TEST : failures/expected/text.html = TEXT
-BUG_TEST SKIP : failures/expected/crash.html = CRASH
-BUG_TEST REBASELINE : failure/expected/missing_image.html = MISSING
-BUG_TEST : failures/expected/image_checksum.html = IMAGE
+BUG_TEST WONTFIX SKIP : failures/expected/crash.html = CRASH
+BUG_TEST REBASELINE : failures/expected/missing_image.html = MISSING
+BUG_TEST WONTFIX : failures/expected/image_checksum.html = IMAGE
+BUG_TEST WONTFIX WIN : failures/expected/image.html = IMAGE
"""
def parse_exp(self, expectations, overrides=None, is_lint_mode=False,
@@ -125,6 +127,13 @@ class TestExpectationsTest(Base):
self.assert_exp('failures/expected/text.html', TEXT)
self.assert_exp('failures/expected/image_checksum.html', IMAGE)
self.assert_exp('passes/text.html', PASS)
+ self.assert_exp('failures/expected/image.html', PASS)
+
+ def test_multiple_results(self):
+ self.parse_exp('BUGX : failures/expected/text.html = TEXT CRASH')
+ self.assertEqual(self._exp.get_expectations(
+ self.get_test('failures/expected/text.html')),
+ set([TEXT, CRASH]))
def test_defer(self):
self.parse_exp('BUGX DEFER : failures/expected/text.html = TEXT')
@@ -183,6 +192,20 @@ BUGX DEFER : failures/expected = IMAGE
self.assertRaises(ValueError, self._exp.expectation_to_string,
-1)
+ def test_get_test_set(self):
+ # Handle some corner cases for this routine not covered by other tests.
+ self.parse_exp(self.get_basic_expectations())
+ s = self._exp._expected_failures.get_test_set(WONTFIX)
+ self.assertEqual(s,
+ set([self.get_test('failures/expected/crash.html'),
+ self.get_test('failures/expected/image_checksum.html')]))
+ s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH)
+ self.assertEqual(s,
+ set([self.get_test('failures/expected/crash.html')]))
+ s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH,
+ include_skips=False)
+ self.assertEqual(s, set([]))
+
def test_syntax_missing_expectation(self):
# This is missing the expectation.
self.assertRaises(SyntaxError, self.parse_exp,
@@ -230,6 +253,13 @@ BUG_TEST : failures/expected/text.html = IMAGE""")
BUG_TEST : failures/expected/text.html = TEXT
BUG_TEST : failures/expected/text.html = IMAGE""")
+ def test_semantic_missing_file(self):
+ # This should log a non-fatal error.
+ self.parse_exp('BUG_TEST : missing_file.html = TEXT')
+ self.assertEqual(
+ len(self._exp._expected_failures.get_non_fatal_errors()), 1)
+
+
def test_overrides(self):
self.parse_exp(self.get_basic_expectations(), """
BUG_OVERRIDE : failures/expected/text.html = IMAGE""")
@@ -256,20 +286,43 @@ BUG_OVERRIDE : failures/expected/text.html = IMAGE""")
class RebaseliningTest(Base):
"""Test rebaselining-specific functionality."""
+ def assertRemove(self, platform, input_expectations, expected_expectations):
+ self.parse_exp(input_expectations)
+ test = self.get_test('failures/expected/text.html')
+ actual_expectations = self._exp.remove_platform_from_expectations(
+ test, platform)
+ self.assertEqual(expected_expectations, actual_expectations)
+
def test_no_get_rebaselining_failures(self):
self.parse_exp(self.get_basic_expectations())
self.assertEqual(len(self._exp.get_rebaselining_failures()), 0)
- def test_basic(self):
+ def test_get_rebaselining_failures_expand(self):
self.parse_exp("""
BUG_TEST REBASELINE : failures/expected/text.html = TEXT
""")
self.assertEqual(len(self._exp.get_rebaselining_failures()), 1)
- new_exp_str = self._exp.remove_platform_from_expectations(
- self.get_test('failures/expected/text.html'), 'TEST')
- # FIXME: actually test rebaselining
- # self.assertEqual(new_exp_str, '\n')
+ def test_remove_expand(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE : failures/expected/text.html = TEXT\n',
+ 'BUGX REBASELINE WIN : failures/expected/text.html = TEXT\n')
+
+ def test_remove_mac_win(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE MAC WIN : failures/expected/text.html = TEXT\n',
+ 'BUGX REBASELINE WIN : failures/expected/text.html = TEXT\n')
+
+ def test_remove_mac_mac(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE MAC : failures/expected/text.html = TEXT\n',
+ '')
+
+ def test_remove_nothing(self):
+ self.assertRemove('mac',
+ '\n\n',
+ '\n\n')
+
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index af1af93..0dda774 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -327,7 +327,6 @@ class Port(object):
if not self._webkit_base_dir:
abspath = os.path.abspath(__file__)
self._webkit_base_dir = abspath[0:abspath.find('WebKitTools')]
- _log.debug("Using WebKit root: %s" % self._webkit_base_dir)
return os.path.join(self._webkit_base_dir, *comps)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
index 4fe3ec1..e309334 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
@@ -118,10 +118,10 @@ class TestPort(base.Port):
return file.read()
def test_base_platform_names(self):
- return ('test',)
+ return ('mac', 'win')
def test_platform_name(self):
- return 'test'
+ return 'mac'
def test_platform_names(self):
return self.test_base_platform_names()
@@ -151,7 +151,10 @@ class TestDriver(base.Driver):
def run_test(self, uri, timeoutms, image_hash):
basename = uri[(uri.rfind("/") + 1):uri.rfind(".html")]
- error = ''
+ if 'error' in basename:
+ error = basename + "_error\n"
+ else:
+ error = ''
checksum = None
# There are four currently supported types of tests: text, image,
# image hash (checksum), and stderr output. The fake output
@@ -170,10 +173,13 @@ class TestDriver(base.Driver):
# will allow us to see if any results get crossed by the rest of the
# program.
if 'failures' in uri:
+ if 'keyboard' in basename:
+ raise KeyboardInterrupt
+ if 'exception' in basename:
+ raise ValueError('exception from ' + basename)
+
crash = 'crash' in basename
timeout = 'timeout' in basename
- if 'error' in basename:
- error = basename + "_error\n"
if 'text' in basename:
output = basename + '_failed-txt\n'
else:
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 7163e1b..4132260 100755
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -75,7 +75,6 @@ from test_types import image_diff
from test_types import text_diff
from test_types import test_type_base
-from webkitpy.common.system.executive import Executive
from webkitpy.thirdparty import simplejson
import port
@@ -106,12 +105,11 @@ class TestInfo:
self._image_hash = None
def _read_image_hash(self):
- try:
- with codecs.open(self._expected_hash_path, "r", "ascii") as hash_file:
- return hash_file.read()
- except IOError, e:
- if errno.ENOENT != e.errno:
- raise
+ if not os.path.exists(self._expected_hash_path):
+ return None
+
+ with codecs.open(self._expected_hash_path, "r", "ascii") as hash_file:
+ return hash_file.read()
def image_hash(self):
# Read the image_hash lazily to reduce startup time.
@@ -273,35 +271,42 @@ class TestRunner:
# options.results_directory, use_tls=True, port=9323)
# a list of TestType objects
- self._test_types = []
+ self._test_types = [text_diff.TestTextDiff]
+ if options.pixel_tests:
+ self._test_types.append(image_diff.ImageDiff)
# a set of test files, and the same tests as a list
self._test_files = set()
self._test_files_list = None
self._result_queue = Queue.Queue()
-
self._retrying = False
- # Hack for dumping threads on the bots
- self._last_thread_dump = None
-
- def __del__(self):
- _log.debug("flushing stdout")
- sys.stdout.flush()
- _log.debug("flushing stderr")
- sys.stderr.flush()
- _log.debug("stopping http server")
- self._port.stop_http_server()
- _log.debug("stopping websocket server")
- self._port.stop_websocket_server()
-
- def gather_file_paths(self, paths):
+ def collect_tests(self, args, last_unexpected_results):
"""Find all the files to test.
Args:
- paths: a list of globs to use instead of the defaults."""
+ args: list of test arguments from the command line
+ last_unexpected_results: list of unexpected results to retest, if any
+
+ """
+ paths = [arg for arg in args if arg and arg != '']
+ paths += last_unexpected_results
+ if self._options.test_list:
+ paths += read_test_files(self._options.test_list)
self._test_files = test_files.gather_test_files(self._port, paths)
+ def lint(self):
+ # Creating the expecations for each platform/configuration pair does
+ # all the test list parsing and ensures it's correct syntax (e.g. no
+ # dupes).
+ for platform_name in self._port.test_platform_names():
+ self.parse_expectations(platform_name, is_debug_mode=True)
+ self.parse_expectations(platform_name, is_debug_mode=False)
+ self._printer.write("")
+ _log.info("If there are no fail messages, errors or exceptions, "
+ "then the lint succeeded.")
+ return 0
+
def parse_expectations(self, test_platform_name, is_debug_mode):
"""Parse the expectations from the test_list files and return a data
structure holding them. Throws an error if the test_list files have
@@ -336,8 +341,8 @@ class TestRunner:
self._printer.print_expected("Found: %d tests" %
(len(self._test_files)))
if not num_all_test_files:
- _log.critical("No tests to run.")
- sys.exit(1)
+ _log.critical('No tests to run.')
+ return None
skipped = set()
if num_all_test_files > 1 and not self._options.force:
@@ -468,10 +473,6 @@ class TestRunner:
return result_summary
- def add_test_type(self, test_type):
- """Add a TestType to the TestRunner."""
- self._test_types.append(test_type)
-
def _get_dir_for_test_file(self, test_file):
"""Returns the highest-level directory by which to shard the given
test file."""
@@ -643,7 +644,7 @@ class TestRunner:
"""
# FIXME: We should use webkitpy.tool.grammar.pluralize here.
plural = ""
- if self._options.child_processes > 1:
+ if not self._is_single_threaded():
plural = "s"
self._printer.print_update('Starting %s%s ...' %
(self._port.driver_name(), plural))
@@ -714,6 +715,49 @@ class TestRunner:
"""Returns whether the test runner needs an HTTP server."""
return self._contains_tests(self.HTTP_SUBDIR)
+ def set_up_run(self):
+ """Configures the system to be ready to run tests.
+
+ Returns a ResultSummary object if we should continue to run tests,
+ or None if we should abort.
+
+ """
+ # This must be started before we check the system dependencies,
+ # since the helper may do things to make the setup correct.
+ self._printer.print_update("Starting helper ...")
+ self._port.start_helper()
+
+ # Check that the system dependencies (themes, fonts, ...) are correct.
+ if not self._options.nocheck_sys_deps:
+ self._printer.print_update("Checking system dependencies ...")
+ if not self._port.check_sys_deps(self.needs_http()):
+ self._port.stop_helper()
+ return None
+
+ if self._options.clobber_old_results:
+ self._clobber_old_results()
+
+ # Create the output directory if it doesn't already exist.
+ self._port.maybe_make_directory(self._options.results_directory)
+
+ self._port.setup_test_run()
+
+ self._printer.print_update("Preparing tests ...")
+ result_summary = self.prepare_lists_and_print_output()
+ if not result_summary:
+ return None
+
+ if self.needs_http():
+ self._printer.print_update('Starting HTTP server ...')
+ self._port.start_http_server()
+
+ if self._contains_tests(self.WEBSOCKET_SUBDIR):
+ self._printer.print_update('Starting WebSocket server ...')
+ self._port.start_websocket_server()
+ # self._websocket_secure_server.Start()
+
+ return result_summary
+
def run(self, result_summary):
"""Run all our tests on all our test files.
@@ -726,19 +770,12 @@ class TestRunner:
Return:
The number of unexpected results (0 == success)
"""
- if not self._test_files:
- return 0
- start_time = time.time()
+ # gather_test_files() must have been called first to initialize us.
+ # If we didn't find any files to test, we've errored out already in
+ # prepare_lists_and_print_output().
+ assert(len(self._test_files))
- if self.needs_http():
- self._printer.print_update('Starting HTTP server ...')
-
- self._port.start_http_server()
-
- if self._contains_tests(self.WEBSOCKET_SUBDIR):
- self._printer.print_update('Starting WebSocket server ...')
- self._port.start_websocket_server()
- # self._websocket_secure_server.Start()
+ start_time = time.time()
keyboard_interrupted, thread_timings, test_timings, \
individual_test_timings = (
@@ -801,6 +838,20 @@ class TestRunner:
# bot red for those.
return unexpected_results['num_regressions']
+ def clean_up_run(self):
+ """Restores the system after we're done running tests."""
+
+ _log.debug("flushing stdout")
+ sys.stdout.flush()
+ _log.debug("flushing stderr")
+ sys.stderr.flush()
+ _log.debug("stopping http server")
+ self._port.stop_http_server()
+ _log.debug("stopping websocket server")
+ self._port.stop_websocket_server()
+ _log.debug("stopping helper")
+ self._port.stop_helper()
+
def update_summary(self, result_summary):
"""Update the summary and print results with any completed tests."""
while True:
@@ -819,6 +870,20 @@ class TestRunner:
self._printer.print_progress(result_summary, self._retrying,
self._test_files_list)
+ def _clobber_old_results(self):
+ # Just clobber the actual test results directories since the other
+ # files in the results directory are explicitly used for cross-run
+ # tracking.
+ self._printer.print_update("Clobbering old results in %s" %
+ self._options.results_directory)
+ layout_tests_dir = self._port.layout_tests_dir()
+ possible_dirs = os.listdir(layout_tests_dir)
+ for dirname in possible_dirs:
+ if os.path.isdir(os.path.join(layout_tests_dir, dirname)):
+ shutil.rmtree(os.path.join(self._options.results_directory,
+ dirname),
+ ignore_errors=True)
+
def _get_failures(self, result_summary, include_crashes):
"""Filters a dict of results and returns only the failures.
@@ -911,6 +976,33 @@ class TestRunner:
_log.info("JSON files uploaded.")
+ def _print_config(self):
+ """Prints the configuration for the test run."""
+ p = self._printer
+ p.print_config("Using port '%s'" % self._port.name())
+ p.print_config("Placing test results in %s" %
+ self._options.results_directory)
+ if self._options.new_baseline:
+ p.print_config("Placing new baselines in %s" %
+ self._port.baseline_path())
+ p.print_config("Using %s build" % self._options.configuration)
+ if self._options.pixel_tests:
+ p.print_config("Pixel tests enabled")
+ else:
+ p.print_config("Pixel tests disabled")
+
+ p.print_config("Regular timeout: %s, slow test timeout: %s" %
+ (self._options.time_out_ms,
+ self._options.slow_time_out_ms))
+
+ if self._is_single_threaded():
+ p.print_config("Running one %s" % self._port.driver_name())
+ else:
+ p.print_config("Running %s %ss in parallel" %
+ (self._options.child_processes,
+ self._port.driver_name()))
+ p.print_config("")
+
def _print_expected_results_of_type(self, result_summary,
result_type, result_type_str):
"""Print the number of the tests in a given result class.
@@ -1266,12 +1358,12 @@ def read_test_files(files):
return tests
-def run(port_obj, options, args, regular_output=sys.stderr,
+def run(port, options, args, regular_output=sys.stderr,
buildbot_output=sys.stdout):
"""Run the tests.
Args:
- port_obj: Port object for port-specific behavior
+ port: Port object for port-specific behavior
options: a dictionary of command line options
args: a list of sub directories or files to test
regular_output: a stream-like object that we can send logging/debug
@@ -1281,24 +1373,61 @@ def run(port_obj, options, args, regular_output=sys.stderr,
Returns:
the number of unexpected results that occurred, or -1 if there is an
error.
- """
- # Configure the printing subsystem for printing output, logging debug
- # info, and tracing tests.
-
- if not options.child_processes:
- # FIXME: Investigate perf/flakiness impact of using cpu_count + 1.
- options.child_processes = port_obj.default_child_processes()
+ """
+ _set_up_derived_options(port, options)
- printer = printing.Printer(port_obj, options, regular_output=regular_output,
- buildbot_output=buildbot_output,
- child_processes=int(options.child_processes),
- is_fully_parallel=options.experimental_fully_parallel)
+ printer = printing.Printer(port, options, regular_output, buildbot_output,
+ int(options.child_processes), options.experimental_fully_parallel)
if options.help_printing:
printer.help_printing()
+ printer.cleanup()
return 0
- executive = Executive()
+ last_unexpected_results = _gather_unexpected_results(options)
+ if options.print_last_failures:
+ printer.write("\n".join(last_unexpected_results) + "\n")
+ printer.cleanup()
+ return 0
+
+ # We wrap any parts of the run that are slow or likely to raise exceptions
+ # in a try/finally to ensure that we clean up the logging configuration.
+ num_unexpected_results = -1
+ try:
+ test_runner = TestRunner(port, options, printer)
+ test_runner._print_config()
+
+ printer.print_update("Collecting tests ...")
+ test_runner.collect_tests(args, last_unexpected_results)
+
+ printer.print_update("Parsing expectations ...")
+ if options.lint_test_files:
+ return test_runner.lint()
+ test_runner.parse_expectations(port.test_platform_name(),
+ options.configuration == 'Debug')
+
+ printer.print_update("Checking build ...")
+ if not port.check_build(test_runner.needs_http()):
+ return -1
+
+ result_summary = test_runner.set_up_run()
+ if result_summary:
+ num_unexpected_results = test_runner.run(result_summary)
+ test_runner.clean_up_run()
+ _log.debug("Testing completed, Exit status: %d" %
+ num_unexpected_results)
+ finally:
+ printer.cleanup()
+
+ return num_unexpected_results
+
+
+def _set_up_derived_options(port_obj, options):
+ """Sets the options values that depend on other options values."""
+
+ if not options.child_processes:
+ # FIXME: Investigate perf/flakiness impact of using cpu_count + 1.
+ options.child_processes = str(port_obj.default_child_processes())
if not options.configuration:
options.configuration = port_obj.default_configuration()
@@ -1318,30 +1447,6 @@ def run(port_obj, options, args, regular_output=sys.stderr,
# Debug or Release.
options.results_directory = port_obj.results_directory()
- last_unexpected_results = []
- if options.print_last_failures or options.retest_last_failures:
- unexpected_results_filename = os.path.join(
- options.results_directory, "unexpected_results.json")
- with codecs.open(unexpected_results_filename, "r", "utf-8") as file:
- results = simplejson.load(file)
- last_unexpected_results = results['tests'].keys()
- if options.print_last_failures:
- printer.write("\n".join(last_unexpected_results) + "\n")
- return 0
-
- if options.clobber_old_results:
- # Just clobber the actual test results directories since the other
- # files in the results directory are explicitly used for cross-run
- # tracking.
- printer.print_update("Clobbering old results in %s" %
- options.results_directory)
- layout_tests_dir = port_obj.layout_tests_dir()
- possible_dirs = os.listdir(layout_tests_dir)
- for dirname in possible_dirs:
- if os.path.isdir(os.path.join(layout_tests_dir, dirname)):
- shutil.rmtree(os.path.join(options.results_directory, dirname),
- ignore_errors=True)
-
if not options.time_out_ms:
if options.configuration == "Debug":
options.time_out_ms = str(2 * TestRunner.DEFAULT_TEST_TIMEOUT_MS)
@@ -1349,92 +1454,18 @@ def run(port_obj, options, args, regular_output=sys.stderr,
options.time_out_ms = str(TestRunner.DEFAULT_TEST_TIMEOUT_MS)
options.slow_time_out_ms = str(5 * int(options.time_out_ms))
- printer.print_config("Regular timeout: %s, slow test timeout: %s" %
- (options.time_out_ms, options.slow_time_out_ms))
-
- if int(options.child_processes) == 1:
- printer.print_config("Running one %s" % port_obj.driver_name())
- else:
- printer.print_config("Running %s %ss in parallel" % (
- options.child_processes, port_obj.driver_name()))
-
- # Include all tests if none are specified.
- new_args = []
- for arg in args:
- if arg and arg != '':
- new_args.append(arg)
-
- paths = new_args
- if not paths:
- paths = []
- paths += last_unexpected_results
- if options.test_list:
- paths += read_test_files(options.test_list)
-
- # Create the output directory if it doesn't already exist.
- port_obj.maybe_make_directory(options.results_directory)
- printer.print_update("Collecting tests ...")
-
- test_runner = TestRunner(port_obj, options, printer)
- test_runner.gather_file_paths(paths)
-
- if options.lint_test_files:
- # Creating the expecations for each platform/configuration pair does
- # all the test list parsing and ensures it's correct syntax (e.g. no
- # dupes).
- for platform_name in port_obj.test_platform_names():
- test_runner.parse_expectations(platform_name, is_debug_mode=True)
- test_runner.parse_expectations(platform_name, is_debug_mode=False)
- printer.write("")
- _log.info("If there are no fail messages, errors or exceptions, "
- "then the lint succeeded.")
- return 0
-
- printer.print_config("Using port '%s'" % port_obj.name())
- printer.print_config("Placing test results in %s" %
- options.results_directory)
- if options.new_baseline:
- printer.print_config("Placing new baselines in %s" %
- port_obj.baseline_path())
- printer.print_config("Using %s build" % options.configuration)
- if options.pixel_tests:
- printer.print_config("Pixel tests enabled")
- else:
- printer.print_config("Pixel tests disabled")
- printer.print_config("")
-
- printer.print_update("Parsing expectations ...")
- test_runner.parse_expectations(port_obj.test_platform_name(),
- options.configuration == 'Debug')
-
- printer.print_update("Checking build ...")
- if not port_obj.check_build(test_runner.needs_http()):
- return -1
-
- printer.print_update("Starting helper ...")
- port_obj.start_helper()
-
- # Check that the system dependencies (themes, fonts, ...) are correct.
- if not options.nocheck_sys_deps:
- printer.print_update("Checking system dependencies ...")
- if not port_obj.check_sys_deps(test_runner.needs_http()):
- return -1
-
- printer.print_update("Preparing tests ...")
- result_summary = test_runner.prepare_lists_and_print_output()
-
- port_obj.setup_test_run()
-
- test_runner.add_test_type(text_diff.TestTextDiff)
- if options.pixel_tests:
- test_runner.add_test_type(image_diff.ImageDiff)
- num_unexpected_results = test_runner.run(result_summary)
- port_obj.stop_helper()
-
- _log.debug("Exit status: %d" % num_unexpected_results)
- return num_unexpected_results
+def _gather_unexpected_results(options):
+ """Returns the unexpected results from the previous run, if any."""
+ last_unexpected_results = []
+ if options.print_last_failures or options.retest_last_failures:
+ unexpected_results_filename = os.path.join(
+ options.results_directory, "unexpected_results.json")
+ with codecs.open(unexpected_results_filename, "r", "utf-8") as file:
+ results = simplejson.load(file)
+ last_unexpected_results = results['tests'].keys()
+ return last_unexpected_results
def _compat_shim_callback(option, opt_str, value, parser):
@@ -1597,7 +1628,7 @@ def parse_args(args=None):
# Restart DumpRenderTree every n tests (default: 1000)
optparse.make_option("--batch-size",
help=("Run a the tests in batches (n), after every n tests, "
- "DumpRenderTree is relaunched.")),
+ "DumpRenderTree is relaunched."), type="int", default=0),
# old-run-webkit-tests calls --run-singly: -1|--singly
# Isolate each test case run (implies --nthly 1 --verbose)
optparse.make_option("--run-singly", action="store_true",
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 3a3b14e..4cbfdfc 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -41,6 +41,7 @@ import threading
import unittest
from webkitpy.common import array_stream
+from webkitpy.common.system import outputcapture
from webkitpy.layout_tests import port
from webkitpy.layout_tests import run_webkit_tests
from webkitpy.layout_tests.layout_package import dump_render_tree_thread
@@ -48,75 +49,139 @@ from webkitpy.layout_tests.layout_package import dump_render_tree_thread
from webkitpy.thirdparty.mock import Mock
-def passing_run(args, port_obj=None, record_results=False,
+def passing_run(args=[], port_obj=None, record_results=False,
tests_included=False):
- args.extend(['--print', 'nothing'])
+ new_args = ['--print', 'nothing']
+ if not '--platform' in args:
+ new_args.extend(['--platform', 'test'])
+ if not record_results:
+ new_args.append('--no-record-results')
+ new_args.extend(args)
if not tests_included:
# We use the glob to test that globbing works.
- args.extend(['passes', 'failures/expected/*'])
- if not record_results:
- args.append('--no-record-results')
- options, args = run_webkit_tests.parse_args(args)
+ new_args.extend(['passes', 'failures/expected/*'])
+ options, parsed_args = run_webkit_tests.parse_args(new_args)
if port_obj is None:
port_obj = port.get(options.platform, options)
- res = run_webkit_tests.run(port_obj, options, args)
+ res = run_webkit_tests.run(port_obj, options, parsed_args)
return res == 0
-def logging_run(args, tests_included=False):
- args.extend(['--no-record-results'])
+def logging_run(args=[], tests_included=False):
+ new_args = ['--no-record-results']
+ if not '--platform' in args:
+ new_args.extend(['--platform', 'test'])
+ if args:
+ new_args.extend(args)
if not tests_included:
- args.extend(['passes', 'failures/expected/*'])
- options, args = run_webkit_tests.parse_args(args)
+ new_args.extend(['passes', 'failures/expected/*'])
+ options, parsed_args = run_webkit_tests.parse_args(new_args)
port_obj = port.get(options.platform, options)
buildbot_output = array_stream.ArrayStream()
regular_output = array_stream.ArrayStream()
- res = run_webkit_tests.run(port_obj, options, args,
+ res = run_webkit_tests.run(port_obj, options, parsed_args,
buildbot_output=buildbot_output,
regular_output=regular_output)
return (res, buildbot_output, regular_output)
class MainTest(unittest.TestCase):
- def test_fast(self):
- self.assertTrue(passing_run(['--platform', 'test']))
- self.assertTrue(passing_run(['--platform', 'test', '--run-singly']))
- self.assertTrue(passing_run(['--platform', 'test',
- 'passes/text.html'], tests_included=True))
+ def test_basic(self):
+ self.assertTrue(passing_run())
- def test_unexpected_failures(self):
- # Run tests including the unexpected failures.
- self.assertFalse(passing_run(['--platform', 'test'],
- tests_included=True))
+ def test_batch_size(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--batch-size', '2']))
- def test_one_child_process(self):
+ def test_child_process_1(self):
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print', 'config', '--child-processes',
- '1'])
+ ['--print', 'config', '--child-processes', '1'])
self.assertTrue('Running one DumpRenderTree\n'
in regular_output.get())
- def test_two_child_processes(self):
+ def test_child_processes_2(self):
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print', 'config', '--child-processes',
- '2'])
+ ['--print', 'config', '--child-processes', '2'])
self.assertTrue('Running 2 DumpRenderTrees in parallel\n'
in regular_output.get())
+ def test_exception_raised(self):
+ self.assertRaises(ValueError, logging_run,
+ ['failures/expected/exception.html'], tests_included=True)
+
+ def test_full_results_html(self):
+ # FIXME: verify html?
+ self.assertTrue(passing_run(['--full-results-html']))
+
+ def test_help_printing(self):
+ res, out, err = logging_run(['--help-printing'])
+ self.assertEqual(res, 0)
+ self.assertTrue(out.empty())
+ self.assertFalse(err.empty())
+
+ def test_keyboard_interrupt(self):
+ # Note that this also tests running a test marked as SKIP if
+ # you specify it explicitly.
+ self.assertRaises(KeyboardInterrupt, passing_run,
+ ['failures/expected/keyboard.html'], tests_included=True)
+
def test_last_results(self):
- passing_run(['--platform', 'test'], record_results=True)
+ passing_run(['--clobber-old-results'], record_results=True)
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print-last-failures'])
+ ['--print-last-failures'])
self.assertEqual(regular_output.get(), ['\n\n'])
self.assertEqual(buildbot_output.get(), [])
+ def test_lint_test_files(self):
+ # FIXME: add errors?
+ res, out, err = logging_run(['--lint-test-files'], tests_included=True)
+ self.assertEqual(res, 0)
+ self.assertTrue(out.empty())
+ self.assertTrue(any(['lint succeeded' in msg for msg in err.get()]))
+
def test_no_tests_found(self):
- self.assertRaises(SystemExit, logging_run,
- ['--platform', 'test', 'resources'],
- tests_included=True)
- self.assertRaises(SystemExit, logging_run,
- ['--platform', 'test', 'foo'],
- tests_included=True)
+ res, out, err = logging_run(['resources'], tests_included=True)
+ self.assertEqual(res, -1)
+ self.assertTrue(out.empty())
+ self.assertTrue('No tests to run.\n' in err.get())
+
+ def test_no_tests_found_2(self):
+ res, out, err = logging_run(['foo'], tests_included=True)
+ self.assertEqual(res, -1)
+ self.assertTrue(out.empty())
+ self.assertTrue('No tests to run.\n' in err.get())
+
+ def test_randomize_order(self):
+ # FIXME: verify order was shuffled
+ self.assertTrue(passing_run(['--randomize-order']))
+
+ def test_run_chunk(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--run-chunk', '1:4']))
+
+ def test_run_force(self):
+ # This raises an exception because we run
+ # failures/expected/exception.html, which is normally SKIPped.
+ self.assertRaises(ValueError, logging_run, ['--force'])
+
+ def test_run_part(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--run-part', '1:2']))
+
+ def test_run_singly(self):
+ self.assertTrue(passing_run(['--run-singly']))
+
+ def test_single_file(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['passes/text.html'], tests_included=True))
+
+ def test_unexpected_failures(self):
+ # Run tests including the unexpected failures.
+ res, out, err = logging_run(tests_included=True)
+ self.assertEqual(res, 1)
+ self.assertFalse(out.empty())
+ self.assertFalse(err.empty())
+
def _mocked_open(original_open, file_list):
def _wrapper(name, mode, encoding):
@@ -144,7 +209,7 @@ class RebaselineTest(unittest.TestCase):
# is missing, update the expected generic location.
file_list = []
codecs.open = _mocked_open(original_open, file_list)
- passing_run(['--platform', 'test', '--pixel-tests',
+ passing_run(['--pixel-tests',
'--reset-results',
'passes/image.html',
'failures/expected/missing_image.html'],
@@ -165,7 +230,7 @@ class RebaselineTest(unittest.TestCase):
# is mssing, then create a new expectation in the platform dir.
file_list = []
codecs.open = _mocked_open(original_open, file_list)
- passing_run(['--platform', 'test', '--pixel-tests',
+ passing_run(['--pixel-tests',
'--new-baseline',
'passes/image.html',
'failures/expected/missing_image.html'],
@@ -208,6 +273,7 @@ class DryrunTest(unittest.TestCase):
if sys.platform != "darwin":
return
+ self.assertTrue(passing_run(['--platform', 'test']))
self.assertTrue(passing_run(['--platform', 'dryrun',
'fast/html']))
self.assertTrue(passing_run(['--platform', 'dryrun-mac',
@@ -223,6 +289,11 @@ class TestThread(dump_render_tree_thread.WatchableThread):
self._timeout_queue = Queue.Queue()
def run(self):
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
self._thread_id = thread.get_ident()
try:
self._started_queue.put('')
@@ -284,8 +355,11 @@ class WaitForThreadsToFinishTest(unittest.TestCase):
self.assertTrue(interrupted)
def test_timeout(self):
+ oc = outputcapture.OutputCapture()
+ oc.capture_output()
interrupted = self.run_one_thread('Timeout')
self.assertFalse(interrupted)
+ oc.restore_output()
def test_exception(self):
self.assertRaises(ValueError, self.run_one_thread, 'Exception')
@@ -293,6 +367,8 @@ class WaitForThreadsToFinishTest(unittest.TestCase):
class StandaloneFunctionsTest(unittest.TestCase):
def test_log_wedged_thread(self):
+ oc = outputcapture.OutputCapture()
+ oc.capture_output()
logger = run_webkit_tests._log
astream = array_stream.ArrayStream()
handler = TestHandler(astream)
@@ -310,6 +386,7 @@ class StandaloneFunctionsTest(unittest.TestCase):
self.assertFalse(astream.empty())
self.assertFalse(child_thread.isAlive())
+ oc.restore_output()
def test_find_thread_stack(self):
id, stack = sys._current_frames().items()[0]
diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py
index ee33003..f8eefa4 100644
--- a/WebKitTools/Scripts/webkitpy/style/checker.py
+++ b/WebKitTools/Scripts/webkitpy/style/checker.py
@@ -212,6 +212,10 @@ _SKIPPED_FILES_WITH_WARNING = [
"WebKit/qt/Api/",
"WebKit/qt/tests/",
"WebKit/qt/examples/",
+ # Soup API that is still being cooked, will be removed from WebKit
+ # in a few months when it is merged into soup proper. The style
+ # follows the libsoup style completely.
+ "WebCore/platform/network/soup/cache/",
]
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py b/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
index c0bb4ac..747b8b4 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
@@ -93,7 +93,7 @@ class TestExpectationsTestCase(unittest.TestCase):
["passes/text.html = CRASH TIMEOUT FAIL PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 TEST : passes/text.html = PASS FAIL"],
+ ["BUG1234 MAC : passes/text.html = PASS FAIL"],
"")
self.assert_lines_lint(
["SKIP BUG1234 : passes/text.html = TIMEOUT PASS"],
@@ -105,10 +105,10 @@ class TestExpectationsTestCase(unittest.TestCase):
["BUG1234 DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 TEST DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
+ ["BUG1234 MAC DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 DEBUG TEST : passes/text.html = TIMEOUT PASS"],
+ ["BUG1234 DEBUG MAC : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
["SLOW DEFER BUG1234 : passes/text.html = PASS"],
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
index 432a877..86e2e15 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
@@ -109,6 +109,16 @@ class GtkEWS(AbstractEarlyWarningSystem):
]
+class EflEWS(AbstractEarlyWarningSystem):
+ name = "efl-ews"
+ port_name = "efl"
+ watchers = AbstractEarlyWarningSystem.watchers + [
+ "leandro@profusion.mobi",
+ "antognolli@profusion.mobi",
+ "lucas.demarchi@profusion.mobi",
+ ]
+
+
class QtEWS(AbstractEarlyWarningSystem):
name = "qt-ews"
port_name = "qt"
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
index 67393d8..1f04923 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
@@ -75,6 +75,9 @@ class EarlyWarningSytemTest(QueuesTest):
def test_gtk_ews(self):
self._test_ews(GtkEWS())
+ def test_efl_ews(self):
+ self._test_ews(EflEWS())
+
def test_mac_ews(self):
ews = MacEWS()
expected_stderr = self._default_expected_stderr(ews)
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index d729d98..f86e9a2 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -141,7 +141,7 @@ class CommitQueueTest(QueuesTest):
# FIXME: The commit-queue warns about bad committers twice. This is due to the fact that we access Attachment.reviewer() twice and it logs each time.
"next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
-MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Rejecting patch 128 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Rejecting patch 128 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
@@ -164,7 +164,7 @@ MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Reject
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
@@ -188,7 +188,7 @@ MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Reject
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
index 7993d78..f3c5e88 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -44,6 +44,7 @@ module WTR {
void setAcceptsEditing(in boolean value);
void setCanOpenWindows(in boolean value);
void setCloseRemainingWindowsWhenComplete(in boolean value);
+ void setXSSAuditorEnabled(in boolean value);
unsigned long windowCount();
// Special DOM functions.
@@ -61,6 +62,10 @@ module WTR {
// Animation testing.
int numberOfActiveAnimations();
boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+
+ // UserContent testing.
+ void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
+ void addUserStyleSheet(in DOMString source, in boolean allFrames);
};
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index b2aa836..ecc302f 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -133,6 +133,8 @@ void InjectedBundle::beginTesting()
WKBundleSetShouldTrackVisitedLinks(m_bundle, false);
WKBundleRemoveAllVisitedLinks(m_bundle);
+ WKBundleRemoveAllUserContent(m_bundle);
+
m_mainPage->reset();
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 424f7ab..c7f9a84 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -100,6 +100,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didReceiveServerRedirectForProvisionalLoadForFrame,
didFailProvisionalLoadWithErrorForFrame,
didCommitLoadForFrame,
+ didFinishDocumentLoadForFrame,
didFinishLoadForFrame,
didFailLoadWithErrorForFrame,
didReceiveTitleForFrame,
@@ -107,7 +108,6 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didCancelClientRedirectForFrame,
willPerformClientRedirectForFrame,
didChangeLocationWithinPageForFrame,
- didFinishDocumentLoadForFrame,
didHandleOnloadEventsForFrame,
didDisplayInsecureContentForFrame,
didRunInsecureContentForFrame
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index f2393f1..d54bb1d 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -32,6 +32,7 @@
#include <WebKit2/WKBundleFrame.h>
#include <WebKit2/WKBundleFramePrivate.h>
#include <WebKit2/WKBundlePagePrivate.h>
+#include <WebKit2/WKBundleScriptWorld.h>
#include <WebKit2/WKBundlePrivate.h>
#include <WebKit2/WKRetainPtr.h>
#include <WebKit2/WebKit2.h>
@@ -163,6 +164,25 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
}
+void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
+{
+ WKRetainPtr<WKStringRef> sourceWK = toWK(source);
+ WKRetainPtr<WKBundleScriptWorldRef> scriptWorld(AdoptWK, WKBundleScriptWorldCreateWorld());
+
+ WKBundleAddUserScript(InjectedBundle::shared().bundle(), scriptWorld.get(), sourceWK.get(), 0, 0, 0,
+ (runAtStart ? kWKInjectAtDocumentStart : kWKInjectAtDocumentEnd),
+ (allFrames ? kWKInjectInAllFrames : kWKInjectInTopFrameOnly));
+}
+
+void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)
+{
+ WKRetainPtr<WKStringRef> sourceWK = toWK(source);
+ WKRetainPtr<WKBundleScriptWorldRef> scriptWorld(AdoptWK, WKBundleScriptWorldCreateWorld());
+
+ WKBundleAddUserStyleSheet(InjectedBundle::shared().bundle(), scriptWorld.get(), sourceWK.get(), 0, 0, 0,
+ (allFrames ? kWKInjectInAllFrames : kWKInjectInTopFrameOnly));
+}
+
void LayoutTestController::keepWebHistory()
{
WKBundleSetShouldTrackVisitedLinks(InjectedBundle::shared().bundle(), true);
@@ -219,6 +239,11 @@ void LayoutTestController::setCanOpenWindows(bool)
// For now, just ignore this setting, and if we find later it's needed we can add it.
}
+void LayoutTestController::setXSSAuditorEnabled(bool enabled)
+{
+ WKBundleOverrideXSSAuditorEnabledForTestRunner(InjectedBundle::shared().bundle(), true);
+}
+
unsigned LayoutTestController::windowCount()
{
return InjectedBundle::shared().pageCount();
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 7c3125c..2c112a7 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -62,6 +62,7 @@ public:
void setAcceptsEditing(bool value) { m_shouldAllowEditing = value; }
void setCanOpenWindows(bool);
void setCloseRemainingWindowsWhenComplete(bool value) { m_shouldCloseExtraWindows = value; }
+ void setXSSAuditorEnabled(bool);
unsigned windowCount();
// Special DOM functions.
@@ -80,6 +81,10 @@ public:
unsigned numberOfActiveAnimations() const;
bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
+ // UserContent testing.
+ void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
+ void addUserStyleSheet(JSStringRef source, bool allFrames);
+
enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
WhatToDump whatToDump() const { return m_whatToDump; }
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index c8a78d5..6f97b9f 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -95,6 +95,8 @@ void TestController::initialize(int argc, const char* argv[])
{
platformInitialize();
+ bool printSupportedFeatures = false;
+
for (int i = 1; i < argc; ++i) {
std::string argument(argv[i]);
@@ -106,7 +108,11 @@ void TestController::initialize(int argc, const char* argv[])
m_verbose = true;
continue;
}
-
+ if (argument == "--print-supported-features") {
+ printSupportedFeatures = true;
+ break;
+ }
+
// Skip any other arguments that begin with '--'.
if (argument.length() >= 2 && argument[0] == '-' && argument[1] == '-')
continue;
@@ -114,6 +120,13 @@ void TestController::initialize(int argc, const char* argv[])
m_paths.push_back(argument);
}
+ if (printSupportedFeatures) {
+ // FIXME: On Windows, DumpRenderTree uses this to expose whether it supports 3d
+ // transforms and accelerated compositing. When we support those features, we
+ // should match DRT's behavior.
+ exit(0);
+ }
+
m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
if (m_usingServerMode)
m_printSeparators = true;
@@ -158,6 +171,7 @@ void TestController::initialize(int argc, const char* argv[])
0,
0,
0,
+ 0,
didFinishLoadForFrame,
0,
0,
@@ -184,6 +198,7 @@ void TestController::resetStateToConsistentValues()
WKPreferencesRef preferences = WKContextGetPreferences(m_context.get());
WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing);
+ WKPreferencesSetXSSAuditorEnabled(preferences, false);
m_mainWebView->focus();
diff --git a/WebKitTools/iExploder/htdocs/cssproperties.in b/WebKitTools/iExploder/htdocs/cssproperties.in
index fc2ee50..9ced1c3 100644
--- a/WebKitTools/iExploder/htdocs/cssproperties.in
+++ b/WebKitTools/iExploder/htdocs/cssproperties.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/css/CSSPropertyNames.in)
+# From WebKit svn r66165 (WebCore/css/CSSPropertyNames.in)
-webkit-animation
-webkit-animation-delay
-webkit-animation-direction
@@ -14,11 +14,18 @@
-webkit-background-composite
-webkit-background-origin
-webkit-background-size
--webkit-binding
+-webkit-border-end
+-webkit-border-end-color
+-webkit-border-end-style
+-webkit-border-end-width
-webkit-border-fit
-webkit-border-horizontal-spacing
-webkit-border-image
-webkit-border-radius
+-webkit-border-start
+-webkit-border-start-color
+-webkit-border-start-style
+-webkit-border-start-width
-webkit-border-vertical-spacing
-webkit-box-align
-webkit-box-direction
@@ -41,15 +48,20 @@
-webkit-column-rule-color
-webkit-column-rule-style
-webkit-column-rule-width
+-webkit-column-span
-webkit-column-width
-webkit-columns
-webkit-font-size-delta
-webkit-font-smoothing
-webkit-highlight
+-webkit-hyphenate-character
+-webkit-hyphenate-locale
+-webkit-hyphens
-webkit-line-break
-webkit-line-clamp
-webkit-margin-bottom-collapse
-webkit-margin-collapse
+-webkit-margin-end
-webkit-margin-start
-webkit-margin-top-collapse
-webkit-marquee
@@ -74,6 +86,7 @@
-webkit-mask-size
-webkit-match-nearest-mail-blockquote-color
-webkit-nbsp-mode
+-webkit-padding-end
-webkit-padding-start
-webkit-perspective
-webkit-perspective-origin
@@ -261,6 +274,9 @@ column-span
column-width
column-width-policy
+# Removed from WebKit between r53119 and r66165
+-webkit-binding
+
# Removed from WebKit between r44660 and r53119
-webkit-border-bottom-left-radius
-webkit-border-bottom-right-radius
diff --git a/WebKitTools/iExploder/htdocs/htmlattrs.in b/WebKitTools/iExploder/htdocs/htmlattrs.in
index 56b4050..0dc8116 100644
--- a/WebKitTools/iExploder/htdocs/htmlattrs.in
+++ b/WebKitTools/iExploder/htdocs/htmlattrs.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/html/HTMLAttributeNames.in)
+# From WebKit svn r66165 (WebCore/html/HTMLAttributeNames.in)
abbr
accept
accept_charset
@@ -20,6 +20,7 @@ aria-expanded
aria-flowto
aria-grabbed
aria-haspopup
+aria-help
aria-hidden
aria-label
aria-labeledby
@@ -38,6 +39,7 @@ aria-valuemax
aria-valuemin
aria-valuenow
aria-valuetext
+async
autocomplete
autofocus
autoplay
@@ -94,6 +96,7 @@ frameborder
headers
height
hidden
+high
href
hreflang
hspace
@@ -113,6 +116,7 @@ longdesc
loop
loopend
loopstart
+low
lowsrc
manifest
marginheight
@@ -136,6 +140,7 @@ onbeforecopy
onbeforecut
onbeforeload
onbeforepaste
+onbeforeprocess
onbeforeunload
onblur
oncanplay
@@ -158,6 +163,8 @@ onemptied
onended
onerror
onfocus
+onfocusin
+onfocusout
onhashchange
oninput
oninvalid
@@ -212,6 +219,7 @@ onwebkitanimationstart
onwebkitbeginfullscreen
onwebkitendfullscreen
onwebkittransitionend
+optimum
pattern
placeholder
playcount
@@ -244,6 +252,7 @@ size
sortable
sortdirection
span
+speech
spellcheck
src
standby
@@ -268,6 +277,7 @@ version
viewsource
vlink
vspace
+webkitdirectory
width
wrap
diff --git a/WebKitTools/iExploder/htdocs/htmltags.in b/WebKitTools/iExploder/htdocs/htmltags.in
index f01d2a7..319d528 100644
--- a/WebKitTools/iExploder/htdocs/htmltags.in
+++ b/WebKitTools/iExploder/htdocs/htmltags.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/html/HTMLTagNames.in)
+# From WebKit svn r66165 (WebCore/html/HTMLTagNames.in)
a
abbr
acronym
@@ -12,6 +12,7 @@ b
base
basefont
bdo
+bgsound
big
blockquote
body
@@ -24,12 +25,14 @@ cite
code
col
colgroup
+command
datagrid
datalist
dcell
dcol
dd
del
+details
dfn
dir
div
@@ -39,6 +42,8 @@ dt
em
embed
fieldset
+figcaption
+figure
font
footer
form
@@ -52,6 +57,7 @@ h5
h6
head
header
+hgroup
hr
html
i
@@ -70,9 +76,11 @@ li
link
listing
map
+mark
marquee
menu
meta
+meter
nav
nobr
noembed
@@ -88,6 +96,7 @@ p
param
plaintext
pre
+progress
q
rp
rt
@@ -104,6 +113,7 @@ strike
strong
style
sub
+summary
sup
table
tbody
@@ -114,6 +124,7 @@ th
thead
title
tr
+track
tt
u
ul
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index 74d9789..7dfaa5f 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -109,10 +109,12 @@ webcore_dirs = [
'WebCore/DerivedSources',
'WebCore/dom',
'WebCore/dom/default',
- 'WebCore/editing',
- 'WebCore/history',
+ 'WebCore/editing',
+ 'WebCore/fileapi',
+ 'WebCore/history',
'WebCore/html',
'WebCore/html/canvas',
+ 'WebCore/html/parser',
'WebCore/inspector',
'WebCore/loader',
'WebCore/loader/appcache',